shalu-dashboard-ui.js 3.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739
  1. import { defineComponent as te, computed as L, openBlock as pe, createElementBlock as Qe, normalizeStyle as Sr, toDisplayString as Bi, Fragment as wt, isVNode as nu, Comment as Q9, Text as TS, reactive as tn, getCurrentInstance as vn, onMounted as it, onUpdated as ep, onUnmounted as nl, watch as se, inject as Ge, provide as pt, ref as U, unref as B, shallowRef as ae, watchEffect as ht, onBeforeUnmount as yt, triggerRef as zle, createVNode as M, h as jg, Transition as co, withDirectives as bi, resolveDirective as Vle, cloneVNode as Ns, render as sf, nextTick as Tt, toRef as Nn, withModifiers as lf, vShow as Bs, onBeforeMount as H9, Teleport as PS, createTextVNode as Kt, isRef as tp, toRefs as $S, toRaw as qo, onBeforeUpdate as G9, TransitionGroup as JM, onActivated as Fle, getCurrentScope as j9, onScopeDispose as f0, createElementVNode as He, warn as Wle, mergeProps as _n, renderSlot as zn, useAttrs as Qle, useSlots as Z9, createCommentVNode as _t, normalizeClass as Ye, createBlock as je, withCtx as we, resolveDynamicComponent as Ec, readonly as Hle, onDeactivated as Gle, vModelRadio as U9, renderList as ag, withKeys as Y4, pushScopeId as AS, popScopeId as ES, resolveComponent as cl } from "vue";
  2. var Ri = /* @__PURE__ */ ((t) => (t[t.STATIC = 0] = "STATIC", t[t.API = 1] = "API", t))(Ri || {});
  3. const eI = {
  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. }, jle = {
  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 Zle(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 Zg = /* @__PURE__ */ te({
  78. __name: "index",
  79. props: eI,
  80. setup(t) {
  81. const e = t, n = L(() => {
  82. const r = Zle(e), i = {};
  83. return r.color.length > 9 && (i.backgroundImage = r.color, i.webkitBackgroundClip = "text", i.webkitTextFillColor = "transparent"), {
  84. ...i,
  85. ...r,
  86. width: "100%",
  87. height: "100%",
  88. lineHeight: e.height + "px"
  89. };
  90. });
  91. return (r, i) => (pe(), Qe("div", {
  92. class: "cus-title",
  93. style: Sr(n.value)
  94. }, Bi(r.text), 5));
  95. }
  96. });
  97. function Ug(t) {
  98. "@babel/helpers - typeof";
  99. return Ug = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  100. return typeof e;
  101. } : function(e) {
  102. return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  103. }, Ug(t);
  104. }
  105. function Ule(t, e) {
  106. if (Ug(t) != "object" || !t) return t;
  107. var n = t[Symbol.toPrimitive];
  108. if (n !== void 0) {
  109. var r = n.call(t, e || "default");
  110. if (Ug(r) != "object") return r;
  111. throw new TypeError("@@toPrimitive must return a primitive value.");
  112. }
  113. return (e === "string" ? String : Number)(t);
  114. }
  115. function Xle(t) {
  116. var e = Ule(t, "string");
  117. return Ug(e) == "symbol" ? e : e + "";
  118. }
  119. function Yle(t, e, n) {
  120. return (e = Xle(e)) in t ? Object.defineProperty(t, e, {
  121. value: n,
  122. enumerable: !0,
  123. configurable: !0,
  124. writable: !0
  125. }) : t[e] = n, t;
  126. }
  127. function q4(t, e) {
  128. var n = Object.keys(t);
  129. if (Object.getOwnPropertySymbols) {
  130. var r = Object.getOwnPropertySymbols(t);
  131. e && (r = r.filter(function(i) {
  132. return Object.getOwnPropertyDescriptor(t, i).enumerable;
  133. })), n.push.apply(n, r);
  134. }
  135. return n;
  136. }
  137. function j(t) {
  138. for (var e = 1; e < arguments.length; e++) {
  139. var n = arguments[e] != null ? arguments[e] : {};
  140. e % 2 ? q4(Object(n), !0).forEach(function(r) {
  141. Yle(t, r, n[r]);
  142. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : q4(Object(n)).forEach(function(r) {
  143. Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
  144. });
  145. }
  146. return t;
  147. }
  148. function I() {
  149. return I = Object.assign ? Object.assign.bind() : function(t) {
  150. for (var e = 1; e < arguments.length; e++) {
  151. var n = arguments[e];
  152. for (var r in n) ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
  153. }
  154. return t;
  155. }, I.apply(null, arguments);
  156. }
  157. const qle = (t) => typeof t == "function", Kle = Array.isArray, Jle = (t) => typeof t == "string", eue = (t) => t !== null && typeof t == "object", tue = /^on[^a-z]/, nue = (t) => tue.test(t), X9 = (t) => {
  158. const e = /* @__PURE__ */ Object.create(null);
  159. return (n) => e[n] || (e[n] = t(n));
  160. }, rue = /-(\w)/g, tI = X9((t) => t.replace(rue, (e, n) => n ? n.toUpperCase() : "")), iue = /\B([A-Z])/g, aue = X9((t) => t.replace(iue, "-$1").toLowerCase()), oue = Object.prototype.hasOwnProperty, K4 = (t, e) => oue.call(t, e);
  161. function sue(t, e, n, r) {
  162. const i = t[n];
  163. if (i != null) {
  164. const a = K4(i, "default");
  165. if (a && r === void 0) {
  166. const o = i.default;
  167. r = i.type !== Function && qle(o) ? o() : o;
  168. }
  169. i.type === Boolean && (!K4(e, n) && !a ? r = !1 : r === "" && (r = !0));
  170. }
  171. return r;
  172. }
  173. function lue(t) {
  174. return Object.keys(t).reduce((e, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (e[n] = t[n]), e), {});
  175. }
  176. function Wp(t) {
  177. return typeof t == "number" ? `${t}px` : t;
  178. }
  179. function Ld(t) {
  180. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  181. return typeof t == "function" ? t(e) : t ?? n;
  182. }
  183. function uue(t) {
  184. let e;
  185. const n = new Promise((i) => {
  186. e = t(() => {
  187. i(!0);
  188. });
  189. }), r = () => {
  190. e == null || e();
  191. };
  192. return r.then = (i, a) => n.then(i, a), r.promise = n, r;
  193. }
  194. function ye() {
  195. const t = [];
  196. for (let e = 0; e < arguments.length; e++) {
  197. const n = e < 0 || arguments.length <= e ? void 0 : arguments[e];
  198. if (n) {
  199. if (Jle(n))
  200. t.push(n);
  201. else if (Kle(n))
  202. for (let r = 0; r < n.length; r++) {
  203. const i = ye(n[r]);
  204. i && t.push(i);
  205. }
  206. else if (eue(n))
  207. for (const r in n)
  208. n[r] && t.push(r);
  209. }
  210. }
  211. return t.join(" ");
  212. }
  213. var Y9 = function() {
  214. if (typeof Map < "u")
  215. return Map;
  216. function t(e, n) {
  217. var r = -1;
  218. return e.some(function(i, a) {
  219. return i[0] === n ? (r = a, !0) : !1;
  220. }), r;
  221. }
  222. return (
  223. /** @class */
  224. function() {
  225. function e() {
  226. this.__entries__ = [];
  227. }
  228. return Object.defineProperty(e.prototype, "size", {
  229. /**
  230. * @returns {boolean}
  231. */
  232. get: function() {
  233. return this.__entries__.length;
  234. },
  235. enumerable: !0,
  236. configurable: !0
  237. }), e.prototype.get = function(n) {
  238. var r = t(this.__entries__, n), i = this.__entries__[r];
  239. return i && i[1];
  240. }, e.prototype.set = function(n, r) {
  241. var i = t(this.__entries__, n);
  242. ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
  243. }, e.prototype.delete = function(n) {
  244. var r = this.__entries__, i = t(r, n);
  245. ~i && r.splice(i, 1);
  246. }, e.prototype.has = function(n) {
  247. return !!~t(this.__entries__, n);
  248. }, e.prototype.clear = function() {
  249. this.__entries__.splice(0);
  250. }, e.prototype.forEach = function(n, r) {
  251. r === void 0 && (r = null);
  252. for (var i = 0, a = this.__entries__; i < a.length; i++) {
  253. var o = a[i];
  254. n.call(r, o[1], o[0]);
  255. }
  256. }, e;
  257. }()
  258. );
  259. }(), n2 = typeof window < "u" && typeof document < "u" && window.document === document, h1 = function() {
  260. 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")();
  261. }(), cue = function() {
  262. return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(h1) : function(t) {
  263. return setTimeout(function() {
  264. return t(Date.now());
  265. }, 1e3 / 60);
  266. };
  267. }(), fue = 2;
  268. function due(t, e) {
  269. var n = !1, r = !1, i = 0;
  270. function a() {
  271. n && (n = !1, t()), r && s();
  272. }
  273. function o() {
  274. cue(a);
  275. }
  276. function s() {
  277. var l = Date.now();
  278. if (n) {
  279. if (l - i < fue)
  280. return;
  281. r = !0;
  282. } else
  283. n = !0, r = !1, setTimeout(o, e);
  284. i = l;
  285. }
  286. return s;
  287. }
  288. var hue = 20, pue = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], vue = typeof MutationObserver < "u", gue = (
  289. /** @class */
  290. function() {
  291. function t() {
  292. this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = due(this.refresh.bind(this), hue);
  293. }
  294. return t.prototype.addObserver = function(e) {
  295. ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
  296. }, t.prototype.removeObserver = function(e) {
  297. var n = this.observers_, r = n.indexOf(e);
  298. ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
  299. }, t.prototype.refresh = function() {
  300. var e = this.updateObservers_();
  301. e && this.refresh();
  302. }, t.prototype.updateObservers_ = function() {
  303. var e = this.observers_.filter(function(n) {
  304. return n.gatherActive(), n.hasActive();
  305. });
  306. return e.forEach(function(n) {
  307. return n.broadcastActive();
  308. }), e.length > 0;
  309. }, t.prototype.connect_ = function() {
  310. !n2 || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), vue ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
  311. attributes: !0,
  312. childList: !0,
  313. characterData: !0,
  314. subtree: !0
  315. })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
  316. }, t.prototype.disconnect_ = function() {
  317. !n2 || !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);
  318. }, t.prototype.onTransitionEnd_ = function(e) {
  319. var n = e.propertyName, r = n === void 0 ? "" : n, i = pue.some(function(a) {
  320. return !!~r.indexOf(a);
  321. });
  322. i && this.refresh();
  323. }, t.getInstance = function() {
  324. return this.instance_ || (this.instance_ = new t()), this.instance_;
  325. }, t.instance_ = null, t;
  326. }()
  327. ), q9 = function(t, e) {
  328. for (var n = 0, r = Object.keys(e); n < r.length; n++) {
  329. var i = r[n];
  330. Object.defineProperty(t, i, {
  331. value: e[i],
  332. enumerable: !1,
  333. writable: !1,
  334. configurable: !0
  335. });
  336. }
  337. return t;
  338. }, hh = function(t) {
  339. var e = t && t.ownerDocument && t.ownerDocument.defaultView;
  340. return e || h1;
  341. }, K9 = MS(0, 0, 0, 0);
  342. function p1(t) {
  343. return parseFloat(t) || 0;
  344. }
  345. function J4(t) {
  346. for (var e = [], n = 1; n < arguments.length; n++)
  347. e[n - 1] = arguments[n];
  348. return e.reduce(function(r, i) {
  349. var a = t["border-" + i + "-width"];
  350. return r + p1(a);
  351. }, 0);
  352. }
  353. function mue(t) {
  354. for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
  355. var a = i[r], o = t["padding-" + a];
  356. n[a] = p1(o);
  357. }
  358. return n;
  359. }
  360. function yue(t) {
  361. var e = t.getBBox();
  362. return MS(0, 0, e.width, e.height);
  363. }
  364. function bue(t) {
  365. var e = t.clientWidth, n = t.clientHeight;
  366. if (!e && !n)
  367. return K9;
  368. var r = hh(t).getComputedStyle(t), i = mue(r), a = i.left + i.right, o = i.top + i.bottom, s = p1(r.width), l = p1(r.height);
  369. if (r.boxSizing === "border-box" && (Math.round(s + a) !== e && (s -= J4(r, "left", "right") + a), Math.round(l + o) !== n && (l -= J4(r, "top", "bottom") + o)), !Oue(t)) {
  370. var u = Math.round(s + a) - e, c = Math.round(l + o) - n;
  371. Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
  372. }
  373. return MS(i.left, i.top, s, l);
  374. }
  375. var _ue = /* @__PURE__ */ function() {
  376. return typeof SVGGraphicsElement < "u" ? function(t) {
  377. return t instanceof hh(t).SVGGraphicsElement;
  378. } : function(t) {
  379. return t instanceof hh(t).SVGElement && typeof t.getBBox == "function";
  380. };
  381. }();
  382. function Oue(t) {
  383. return t === hh(t).document.documentElement;
  384. }
  385. function Sue(t) {
  386. return n2 ? _ue(t) ? yue(t) : bue(t) : K9;
  387. }
  388. function xue(t) {
  389. var e = t.x, n = t.y, r = t.width, i = t.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
  390. return q9(o, {
  391. x: e,
  392. y: n,
  393. width: r,
  394. height: i,
  395. top: n,
  396. right: e + r,
  397. bottom: i + n,
  398. left: e
  399. }), o;
  400. }
  401. function MS(t, e, n, r) {
  402. return { x: t, y: e, width: n, height: r };
  403. }
  404. var wue = (
  405. /** @class */
  406. function() {
  407. function t(e) {
  408. this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = MS(0, 0, 0, 0), this.target = e;
  409. }
  410. return t.prototype.isActive = function() {
  411. var e = Sue(this.target);
  412. return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
  413. }, t.prototype.broadcastRect = function() {
  414. var e = this.contentRect_;
  415. return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
  416. }, t;
  417. }()
  418. ), Cue = (
  419. /** @class */
  420. /* @__PURE__ */ function() {
  421. function t(e, n) {
  422. var r = xue(n);
  423. q9(this, { target: e, contentRect: r });
  424. }
  425. return t;
  426. }()
  427. ), Tue = (
  428. /** @class */
  429. function() {
  430. function t(e, n, r) {
  431. if (this.activeObservations_ = [], this.observations_ = new Y9(), typeof e != "function")
  432. throw new TypeError("The callback provided as parameter 1 is not a function.");
  433. this.callback_ = e, this.controller_ = n, this.callbackCtx_ = r;
  434. }
  435. return t.prototype.observe = function(e) {
  436. if (!arguments.length)
  437. throw new TypeError("1 argument required, but only 0 present.");
  438. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  439. if (!(e instanceof hh(e).Element))
  440. throw new TypeError('parameter 1 is not of type "Element".');
  441. var n = this.observations_;
  442. n.has(e) || (n.set(e, new wue(e)), this.controller_.addObserver(this), this.controller_.refresh());
  443. }
  444. }, t.prototype.unobserve = function(e) {
  445. if (!arguments.length)
  446. throw new TypeError("1 argument required, but only 0 present.");
  447. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  448. if (!(e instanceof hh(e).Element))
  449. throw new TypeError('parameter 1 is not of type "Element".');
  450. var n = this.observations_;
  451. n.has(e) && (n.delete(e), n.size || this.controller_.removeObserver(this));
  452. }
  453. }, t.prototype.disconnect = function() {
  454. this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
  455. }, t.prototype.gatherActive = function() {
  456. var e = this;
  457. this.clearActive(), this.observations_.forEach(function(n) {
  458. n.isActive() && e.activeObservations_.push(n);
  459. });
  460. }, t.prototype.broadcastActive = function() {
  461. if (this.hasActive()) {
  462. var e = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
  463. return new Cue(r.target, r.broadcastRect());
  464. });
  465. this.callback_.call(e, n, e), this.clearActive();
  466. }
  467. }, t.prototype.clearActive = function() {
  468. this.activeObservations_.splice(0);
  469. }, t.prototype.hasActive = function() {
  470. return this.activeObservations_.length > 0;
  471. }, t;
  472. }()
  473. ), J9 = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Y9(), ej = (
  474. /** @class */
  475. /* @__PURE__ */ function() {
  476. function t(e) {
  477. if (!(this instanceof t))
  478. throw new TypeError("Cannot call a class as a function.");
  479. if (!arguments.length)
  480. throw new TypeError("1 argument required, but only 0 present.");
  481. var n = gue.getInstance(), r = new Tue(e, n, this);
  482. J9.set(this, r);
  483. }
  484. return t;
  485. }()
  486. );
  487. [
  488. "observe",
  489. "unobserve",
  490. "disconnect"
  491. ].forEach(function(t) {
  492. ej.prototype[t] = function() {
  493. var e;
  494. return (e = J9.get(this))[t].apply(e, arguments);
  495. };
  496. });
  497. var tj = function() {
  498. return typeof h1.ResizeObserver < "u" ? h1.ResizeObserver : ej;
  499. }();
  500. const r2 = (t) => t != null && t !== "", sr = (t, e) => {
  501. const n = I({}, t);
  502. return Object.keys(e).forEach((r) => {
  503. const i = n[r];
  504. if (i)
  505. i.type || i.default ? i.default = e[r] : i.def ? i.def(e[r]) : n[r] = {
  506. type: i,
  507. default: e[r]
  508. };
  509. else
  510. throw new Error(`not have ${r} prop`);
  511. }), n;
  512. }, Pue = (t) => {
  513. const e = Object.keys(t), n = {}, r = {}, i = {};
  514. for (let a = 0, o = e.length; a < o; a++) {
  515. const s = e[a];
  516. nue(s) ? (n[s[2].toLowerCase() + s.slice(3)] = t[s], r[s] = t[s]) : i[s] = t[s];
  517. }
  518. return {
  519. onEvents: r,
  520. events: n,
  521. extraAttrs: i
  522. };
  523. }, $ue = function() {
  524. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  525. const n = {}, r = /;(?![^(]*\))/g, i = /:(.+)/;
  526. return typeof t == "object" ? t : (t.split(r).forEach(function(a) {
  527. if (a) {
  528. const o = a.split(i);
  529. if (o.length > 1) {
  530. const s = e ? tI(o[0].trim()) : o[0].trim();
  531. n[s] = o[1].trim();
  532. }
  533. }
  534. }), n);
  535. }, v1 = (t, e) => t[e] !== void 0, nj = Symbol("skipFlatten"), Yn = function() {
  536. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  537. const n = Array.isArray(t) ? t : [t], r = [];
  538. return n.forEach((i) => {
  539. Array.isArray(i) ? r.push(...Yn(i, e)) : i && i.type === wt ? i.key === nj ? r.push(i) : r.push(...Yn(i.children, e)) : i && nu(i) ? e && !nI(i) ? r.push(i) : e || r.push(i) : r2(i) && r.push(i);
  540. }), r;
  541. }, rj = function(t) {
  542. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  543. if (nu(t))
  544. return t.type === wt ? e === "default" ? Yn(t.children) : [] : t.children && t.children[e] ? Yn(t.children[e](n)) : [];
  545. {
  546. const r = t.$slots[e] && t.$slots[e](n);
  547. return Yn(r);
  548. }
  549. }, Cs = (t) => {
  550. var e;
  551. let n = ((e = t == null ? void 0 : t.vnode) === null || e === void 0 ? void 0 : e.el) || t && (t.$el || t);
  552. for (; n && !n.tagName; )
  553. n = n.nextSibling;
  554. return n;
  555. }, Aue = (t) => {
  556. const e = {};
  557. if (t.$ && t.$.vnode) {
  558. const n = t.$.vnode.props || {};
  559. Object.keys(t.$props).forEach((r) => {
  560. const i = t.$props[r], a = aue(r);
  561. (i !== void 0 || a in n) && (e[r] = i);
  562. });
  563. } else if (nu(t) && typeof t.type == "object") {
  564. const n = t.props || {}, r = {};
  565. Object.keys(n).forEach((a) => {
  566. r[tI(a)] = n[a];
  567. });
  568. const i = t.type.props || {};
  569. Object.keys(i).forEach((a) => {
  570. const o = sue(i, r, a, r[a]);
  571. (o !== void 0 || a in r) && (e[a] = o);
  572. });
  573. }
  574. return e;
  575. }, Eue = function(t) {
  576. 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;
  577. if (t.$) {
  578. const a = t[e];
  579. if (a !== void 0)
  580. return typeof a == "function" && r ? a(n) : a;
  581. i = t.$slots[e], i = r && i ? i(n) : i;
  582. } else if (nu(t)) {
  583. const a = t.props && t.props[e];
  584. if (a !== void 0 && t.props !== null)
  585. return typeof a == "function" && r ? a(n) : a;
  586. t.type === wt ? i = t.children : t.children && t.children[e] && (i = t.children[e], i = r && i ? i(n) : i);
  587. }
  588. return Array.isArray(i) && (i = Yn(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
  589. };
  590. function e8() {
  591. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  592. return t.$ ? n = I(I({}, n), t.$attrs) : n = I(I({}, n), t.props), Pue(n)[e ? "onEvents" : "events"];
  593. }
  594. function Mue(t, e) {
  595. let r = ((nu(t) ? t.props : t.$attrs) || {}).style || {};
  596. return typeof r == "string" && (r = $ue(r, e)), r;
  597. }
  598. function Iue(t) {
  599. return t.length === 1 && t[0].type === wt;
  600. }
  601. function nI(t) {
  602. return t && (t.type === Q9 || t.type === wt && t.children.length === 0 || t.type === TS && t.children.trim() === "");
  603. }
  604. function os() {
  605. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  606. const e = [];
  607. return t.forEach((n) => {
  608. Array.isArray(n) ? e.push(...n) : (n == null ? void 0 : n.type) === wt ? e.push(...os(n.children)) : e.push(n);
  609. }), e.filter((n) => !nI(n));
  610. }
  611. function Ui(t) {
  612. return Array.isArray(t) && t.length === 1 && (t = t[0]), t && t.__v_isVNode && typeof t.type != "symbol";
  613. }
  614. function IS(t, e) {
  615. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  616. var r, i;
  617. return (r = e[n]) !== null && r !== void 0 ? r : (i = t[n]) === null || i === void 0 ? void 0 : i.call(t);
  618. }
  619. const ph = te({
  620. compatConfig: {
  621. MODE: 3
  622. },
  623. name: "ResizeObserver",
  624. props: {
  625. disabled: Boolean,
  626. onResize: Function
  627. },
  628. emits: ["resize"],
  629. setup(t, e) {
  630. let {
  631. slots: n
  632. } = e;
  633. const r = tn({
  634. width: 0,
  635. height: 0,
  636. offsetHeight: 0,
  637. offsetWidth: 0
  638. });
  639. let i = null, a = null;
  640. const o = () => {
  641. a && (a.disconnect(), a = null);
  642. }, s = (c) => {
  643. const {
  644. onResize: f
  645. } = t, d = c[0].target, {
  646. width: h,
  647. height: p
  648. } = d.getBoundingClientRect(), {
  649. offsetWidth: v,
  650. offsetHeight: g
  651. } = d, m = Math.floor(h), y = Math.floor(p);
  652. if (r.width !== m || r.height !== y || r.offsetWidth !== v || r.offsetHeight !== g) {
  653. const b = {
  654. width: m,
  655. height: y,
  656. offsetWidth: v,
  657. offsetHeight: g
  658. };
  659. I(r, b), f && Promise.resolve().then(() => {
  660. f(I(I({}, b), {
  661. offsetWidth: v,
  662. offsetHeight: g
  663. }), d);
  664. });
  665. }
  666. }, l = vn(), u = () => {
  667. const {
  668. disabled: c
  669. } = t;
  670. if (c) {
  671. o();
  672. return;
  673. }
  674. const f = Cs(l);
  675. f !== i && (o(), i = f), !a && f && (a = new tj(s), a.observe(f));
  676. };
  677. return it(() => {
  678. u();
  679. }), ep(() => {
  680. u();
  681. }), nl(() => {
  682. o();
  683. }), se(() => t.disabled, () => {
  684. u();
  685. }, {
  686. flush: "post"
  687. }), () => {
  688. var c;
  689. return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
  690. };
  691. }
  692. });
  693. let ij = (t) => setTimeout(t, 16), aj = (t) => clearTimeout(t);
  694. typeof window < "u" && "requestAnimationFrame" in window && (ij = (t) => window.requestAnimationFrame(t), aj = (t) => window.cancelAnimationFrame(t));
  695. let t8 = 0;
  696. const rI = /* @__PURE__ */ new Map();
  697. function oj(t) {
  698. rI.delete(t);
  699. }
  700. function xt(t) {
  701. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  702. t8 += 1;
  703. const n = t8;
  704. function r(i) {
  705. if (i === 0)
  706. oj(n), t();
  707. else {
  708. const a = ij(() => {
  709. r(i - 1);
  710. });
  711. rI.set(n, a);
  712. }
  713. }
  714. return r(e), n;
  715. }
  716. xt.cancel = (t) => {
  717. const e = rI.get(t);
  718. return oj(e), aj(e);
  719. };
  720. const ru = function() {
  721. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  722. e[n] = arguments[n];
  723. return e;
  724. }, np = (t) => {
  725. const e = t;
  726. return e.install = function(n) {
  727. n.component(e.displayName || e.name, t);
  728. }, t;
  729. };
  730. function g1() {
  731. return {
  732. type: [Function, Array]
  733. };
  734. }
  735. function $t(t) {
  736. return {
  737. type: Object,
  738. default: t
  739. };
  740. }
  741. function nt(t) {
  742. return {
  743. type: Boolean,
  744. default: t
  745. };
  746. }
  747. function tt(t) {
  748. return {
  749. type: Function,
  750. default: t
  751. };
  752. }
  753. function fa(t, e) {
  754. return {
  755. validator: () => !0,
  756. default: t
  757. };
  758. }
  759. function uf(t) {
  760. return {
  761. type: Array,
  762. default: t
  763. };
  764. }
  765. function hn(t) {
  766. return {
  767. type: String,
  768. default: t
  769. };
  770. }
  771. function gn(t, e) {
  772. return t ? {
  773. type: t,
  774. default: e
  775. } : fa(e);
  776. }
  777. let pr = !1;
  778. try {
  779. const t = Object.defineProperty({}, "passive", {
  780. get() {
  781. pr = !0;
  782. }
  783. });
  784. window.addEventListener("testPassive", null, t), window.removeEventListener("testPassive", null, t);
  785. } catch {
  786. }
  787. function vr(t, e, n, r) {
  788. if (t && t.addEventListener) {
  789. let i = r;
  790. i === void 0 && pr && (e === "touchstart" || e === "touchmove" || e === "wheel") && (i = {
  791. passive: !1
  792. }), t.addEventListener(e, n, i);
  793. }
  794. return {
  795. remove: () => {
  796. t && t.removeEventListener && t.removeEventListener(e, n);
  797. }
  798. };
  799. }
  800. const iI = "anticon", sj = Symbol("GlobalFormContextKey"), Due = (t) => {
  801. pt(sj, t);
  802. }, Rue = () => Ge(sj, {
  803. validateMessages: L(() => {
  804. })
  805. }), kue = () => ({
  806. iconPrefixCls: String,
  807. getTargetContainer: {
  808. type: Function
  809. },
  810. getPopupContainer: {
  811. type: Function
  812. },
  813. prefixCls: String,
  814. getPrefixCls: {
  815. type: Function
  816. },
  817. renderEmpty: {
  818. type: Function
  819. },
  820. transformCellText: {
  821. type: Function
  822. },
  823. csp: $t(),
  824. input: $t(),
  825. autoInsertSpaceInButton: {
  826. type: Boolean,
  827. default: void 0
  828. },
  829. locale: $t(),
  830. pageHeader: $t(),
  831. componentSize: {
  832. type: String
  833. },
  834. componentDisabled: {
  835. type: Boolean,
  836. default: void 0
  837. },
  838. direction: {
  839. type: String,
  840. default: "ltr"
  841. },
  842. space: $t(),
  843. virtual: {
  844. type: Boolean,
  845. default: void 0
  846. },
  847. dropdownMatchSelectWidth: {
  848. type: [Number, Boolean],
  849. default: !0
  850. },
  851. form: $t(),
  852. pagination: $t(),
  853. theme: $t(),
  854. select: $t(),
  855. wave: $t()
  856. }), aI = Symbol("configProvider"), lj = {
  857. getPrefixCls: (t, e) => e || (t ? `ant-${t}` : "ant"),
  858. iconPrefixCls: L(() => iI),
  859. getPopupContainer: L(() => () => document.body),
  860. direction: L(() => "ltr")
  861. }, DS = () => Ge(aI, lj), Lue = (t) => pt(aI, t), uj = Symbol("DisabledContextKey"), Ko = () => Ge(uj, U(void 0)), cj = (t) => {
  862. const e = Ko();
  863. return pt(uj, L(() => {
  864. var n;
  865. return (n = t.value) !== null && n !== void 0 ? n : e.value;
  866. })), t;
  867. }, Nue = {
  868. // Options.jsx
  869. items_per_page: "/ page",
  870. jump_to: "Go to",
  871. jump_to_confirm: "confirm",
  872. page: "",
  873. // Pagination.jsx
  874. prev_page: "Previous Page",
  875. next_page: "Next Page",
  876. prev_5: "Previous 5 Pages",
  877. next_5: "Next 5 Pages",
  878. prev_3: "Previous 3 Pages",
  879. next_3: "Next 3 Pages"
  880. }, Bue = {
  881. locale: "en_US",
  882. today: "Today",
  883. now: "Now",
  884. backToToday: "Back to today",
  885. ok: "Ok",
  886. clear: "Clear",
  887. month: "Month",
  888. year: "Year",
  889. timeSelect: "select time",
  890. dateSelect: "select date",
  891. weekSelect: "Choose a week",
  892. monthSelect: "Choose a month",
  893. yearSelect: "Choose a year",
  894. decadeSelect: "Choose a decade",
  895. yearFormat: "YYYY",
  896. dateFormat: "M/D/YYYY",
  897. dayFormat: "D",
  898. dateTimeFormat: "M/D/YYYY HH:mm:ss",
  899. monthBeforeYear: !0,
  900. previousMonth: "Previous month (PageUp)",
  901. nextMonth: "Next month (PageDown)",
  902. previousYear: "Last year (Control + left)",
  903. nextYear: "Next year (Control + right)",
  904. previousDecade: "Last decade",
  905. nextDecade: "Next decade",
  906. previousCentury: "Last century",
  907. nextCentury: "Next century"
  908. }, fj = {
  909. placeholder: "Select time",
  910. rangePlaceholder: ["Start time", "End time"]
  911. }, n8 = {
  912. lang: I({
  913. placeholder: "Select date",
  914. yearPlaceholder: "Select year",
  915. quarterPlaceholder: "Select quarter",
  916. monthPlaceholder: "Select month",
  917. weekPlaceholder: "Select week",
  918. rangePlaceholder: ["Start date", "End date"],
  919. rangeYearPlaceholder: ["Start year", "End year"],
  920. rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
  921. rangeMonthPlaceholder: ["Start month", "End month"],
  922. rangeWeekPlaceholder: ["Start week", "End week"]
  923. }, Bue),
  924. timePickerLocale: I({}, fj)
  925. }, Ti = "${label} is not a valid ${type}", zs = {
  926. locale: "en",
  927. Pagination: Nue,
  928. DatePicker: n8,
  929. TimePicker: fj,
  930. Calendar: n8,
  931. global: {
  932. placeholder: "Please select"
  933. },
  934. Table: {
  935. filterTitle: "Filter menu",
  936. filterConfirm: "OK",
  937. filterReset: "Reset",
  938. filterEmptyText: "No filters",
  939. filterCheckall: "Select all items",
  940. filterSearchPlaceholder: "Search in filters",
  941. emptyText: "No data",
  942. selectAll: "Select current page",
  943. selectInvert: "Invert current page",
  944. selectNone: "Clear all data",
  945. selectionAll: "Select all data",
  946. sortTitle: "Sort",
  947. expand: "Expand row",
  948. collapse: "Collapse row",
  949. triggerDesc: "Click to sort descending",
  950. triggerAsc: "Click to sort ascending",
  951. cancelSort: "Click to cancel sorting"
  952. },
  953. Tour: {
  954. Next: "Next",
  955. Previous: "Previous",
  956. Finish: "Finish"
  957. },
  958. Modal: {
  959. okText: "OK",
  960. cancelText: "Cancel",
  961. justOkText: "OK"
  962. },
  963. Popconfirm: {
  964. okText: "OK",
  965. cancelText: "Cancel"
  966. },
  967. Transfer: {
  968. titles: ["", ""],
  969. searchPlaceholder: "Search here",
  970. itemUnit: "item",
  971. itemsUnit: "items",
  972. remove: "Remove",
  973. selectCurrent: "Select current page",
  974. removeCurrent: "Remove current page",
  975. selectAll: "Select all data",
  976. removeAll: "Remove all data",
  977. selectInvert: "Invert current page"
  978. },
  979. Upload: {
  980. uploading: "Uploading...",
  981. removeFile: "Remove file",
  982. uploadError: "Upload error",
  983. previewFile: "Preview file",
  984. downloadFile: "Download file"
  985. },
  986. Empty: {
  987. description: "No data"
  988. },
  989. Icon: {
  990. icon: "icon"
  991. },
  992. Text: {
  993. edit: "Edit",
  994. copy: "Copy",
  995. copied: "Copied",
  996. expand: "Expand"
  997. },
  998. PageHeader: {
  999. back: "Back"
  1000. },
  1001. Form: {
  1002. optional: "(optional)",
  1003. defaultValidateMessages: {
  1004. default: "Field validation error for ${label}",
  1005. required: "Please enter ${label}",
  1006. enum: "${label} must be one of [${enum}]",
  1007. whitespace: "${label} cannot be a blank character",
  1008. date: {
  1009. format: "${label} date format is invalid",
  1010. parse: "${label} cannot be converted to a date",
  1011. invalid: "${label} is an invalid date"
  1012. },
  1013. types: {
  1014. string: Ti,
  1015. method: Ti,
  1016. array: Ti,
  1017. object: Ti,
  1018. number: Ti,
  1019. date: Ti,
  1020. boolean: Ti,
  1021. integer: Ti,
  1022. float: Ti,
  1023. regexp: Ti,
  1024. email: Ti,
  1025. url: Ti,
  1026. hex: Ti
  1027. },
  1028. string: {
  1029. len: "${label} must be ${len} characters",
  1030. min: "${label} must be at least ${min} characters",
  1031. max: "${label} must be up to ${max} characters",
  1032. range: "${label} must be between ${min}-${max} characters"
  1033. },
  1034. number: {
  1035. len: "${label} must be equal to ${len}",
  1036. min: "${label} must be minimum ${min}",
  1037. max: "${label} must be maximum ${max}",
  1038. range: "${label} must be between ${min}-${max}"
  1039. },
  1040. array: {
  1041. len: "Must be ${len} ${label}",
  1042. min: "At least ${min} ${label}",
  1043. max: "At most ${max} ${label}",
  1044. range: "The amount of ${label} must be between ${min}-${max}"
  1045. },
  1046. pattern: {
  1047. mismatch: "${label} does not match the pattern ${pattern}"
  1048. }
  1049. }
  1050. },
  1051. Image: {
  1052. preview: "Preview"
  1053. },
  1054. QRCode: {
  1055. expired: "QR code expired",
  1056. refresh: "Refresh",
  1057. scanned: "Scanned"
  1058. }
  1059. }, dj = te({
  1060. compatConfig: {
  1061. MODE: 3
  1062. },
  1063. name: "LocaleReceiver",
  1064. props: {
  1065. componentName: String,
  1066. defaultLocale: {
  1067. type: [Object, Function]
  1068. },
  1069. children: {
  1070. type: Function
  1071. }
  1072. },
  1073. setup(t, e) {
  1074. let {
  1075. slots: n
  1076. } = e;
  1077. const r = Ge("localeData", {}), i = L(() => {
  1078. const {
  1079. componentName: o = "global",
  1080. defaultLocale: s
  1081. } = t, l = s || zs[o || "global"], {
  1082. antLocale: u
  1083. } = r, c = o && u ? u[o] : {};
  1084. return I(I({}, typeof l == "function" ? l() : l), c || {});
  1085. }), a = L(() => {
  1086. const {
  1087. antLocale: o
  1088. } = r, s = o && o.locale;
  1089. return o && o.exist && !s ? zs.locale : s;
  1090. });
  1091. return () => {
  1092. const o = t.children || n.default, {
  1093. antLocale: s
  1094. } = r;
  1095. return o == null ? void 0 : o(i.value, a.value, s);
  1096. };
  1097. }
  1098. });
  1099. function RS(t, e, n) {
  1100. const r = Ge("localeData", {});
  1101. return [L(() => {
  1102. const {
  1103. antLocale: a
  1104. } = r, o = B(e) || zs[t || "global"], s = t && a ? a[t] : {};
  1105. return I(I(I({}, typeof o == "function" ? o() : o), s || {}), B(n) || {});
  1106. })];
  1107. }
  1108. function oI(t) {
  1109. for (var e = 0, n, r = 0, i = t.length; i >= 4; ++r, i -= 4)
  1110. 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): */
  1111. (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
  1112. n >>> 24, e = /* Math.imul(k, m): */
  1113. (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
  1114. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  1115. switch (i) {
  1116. case 3:
  1117. e ^= (t.charCodeAt(r + 2) & 255) << 16;
  1118. case 2:
  1119. e ^= (t.charCodeAt(r + 1) & 255) << 8;
  1120. case 1:
  1121. e ^= t.charCodeAt(r) & 255, e = /* Math.imul(h, m): */
  1122. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  1123. }
  1124. return e ^= e >>> 13, e = /* Math.imul(h, m): */
  1125. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
  1126. }
  1127. const r8 = "%";
  1128. class zue {
  1129. constructor(e) {
  1130. this.cache = /* @__PURE__ */ new Map(), this.instanceId = e;
  1131. }
  1132. get(e) {
  1133. return this.cache.get(Array.isArray(e) ? e.join(r8) : e) || null;
  1134. }
  1135. update(e, n) {
  1136. const r = Array.isArray(e) ? e.join(r8) : e, i = this.cache.get(r), a = n(i);
  1137. a === null ? this.cache.delete(r) : this.cache.set(r, a);
  1138. }
  1139. }
  1140. const hj = "data-token-hash", Hc = "data-css-hash", Vue = "data-cache-path", Nd = "__cssinjs_instance__";
  1141. function Xg() {
  1142. const t = Math.random().toString(12).slice(2);
  1143. if (typeof document < "u" && document.head && document.body) {
  1144. const e = document.body.querySelectorAll(`style[${Hc}]`) || [], {
  1145. firstChild: n
  1146. } = document.head;
  1147. Array.from(e).forEach((i) => {
  1148. i[Nd] = i[Nd] || t, i[Nd] === t && document.head.insertBefore(i, n);
  1149. });
  1150. const r = {};
  1151. Array.from(document.querySelectorAll(`style[${Hc}]`)).forEach((i) => {
  1152. var a;
  1153. const o = i.getAttribute(Hc);
  1154. r[o] ? i[Nd] === t && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : r[o] = !0;
  1155. });
  1156. }
  1157. return new zue(t);
  1158. }
  1159. const pj = Symbol("StyleContextKey"), Fue = () => {
  1160. var t, e, n;
  1161. const r = vn();
  1162. let i;
  1163. if (r && r.appContext) {
  1164. 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__;
  1165. a ? i = a : (i = Xg(), r.appContext.config.globalProperties && (r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  1166. } else
  1167. i = Xg();
  1168. return i;
  1169. }, vj = {
  1170. cache: Xg(),
  1171. defaultCache: !0,
  1172. hashPriority: "low"
  1173. }, kS = () => {
  1174. const t = Fue();
  1175. return Ge(pj, ae(I(I({}, vj), {
  1176. cache: t
  1177. })));
  1178. }, Wue = (t) => {
  1179. const e = kS(), n = ae(I(I({}, vj), {
  1180. cache: Xg()
  1181. }));
  1182. return se([() => B(t), e], () => {
  1183. const r = I({}, e.value), i = B(t);
  1184. Object.keys(i).forEach((o) => {
  1185. const s = i[o];
  1186. i[o] !== void 0 && (r[o] = s);
  1187. });
  1188. const {
  1189. cache: a
  1190. } = i;
  1191. r.cache = r.cache || Xg(), r.defaultCache = !a && e.value.defaultCache, n.value = r;
  1192. }, {
  1193. immediate: !0
  1194. }), pt(pj, n), n;
  1195. }, Que = () => ({
  1196. autoClear: nt(),
  1197. /** @private Test only. Not work in production. */
  1198. mock: hn(),
  1199. /**
  1200. * Only set when you need ssr to extract style on you own.
  1201. * If not provided, it will auto create <style /> on the end of Provider in server side.
  1202. */
  1203. cache: $t(),
  1204. /** Tell children that this context is default generated context */
  1205. defaultCache: nt(),
  1206. /** Use `:where` selector to reduce hashId css selector priority */
  1207. hashPriority: hn(),
  1208. /** Tell cssinjs where to inject style in */
  1209. container: gn(),
  1210. /** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
  1211. ssrInline: nt(),
  1212. /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  1213. transformers: uf(),
  1214. /**
  1215. * Linters to lint css before inject in document.
  1216. * Styles will be linted after transforming.
  1217. * Please note that `linters` do not support dynamic update.
  1218. */
  1219. linters: uf()
  1220. });
  1221. np(te({
  1222. name: "AStyleProvider",
  1223. inheritAttrs: !1,
  1224. props: Que(),
  1225. setup(t, e) {
  1226. let {
  1227. slots: n
  1228. } = e;
  1229. return Wue(t), () => {
  1230. var r;
  1231. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  1232. };
  1233. }
  1234. }));
  1235. function Hue() {
  1236. return !1;
  1237. }
  1238. let i2 = !1;
  1239. function Gue() {
  1240. return i2;
  1241. }
  1242. const jue = process.env.NODE_ENV === "production" ? Hue : Gue;
  1243. if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  1244. const t = window;
  1245. if (typeof t.webpackHotUpdate == "function") {
  1246. const e = t.webpackHotUpdate;
  1247. t.webpackHotUpdate = function() {
  1248. return i2 = !0, setTimeout(() => {
  1249. i2 = !1;
  1250. }, 0), e(...arguments);
  1251. };
  1252. }
  1253. }
  1254. function gj(t, e, n, r) {
  1255. const i = kS(), a = ae(""), o = ae();
  1256. ht(() => {
  1257. a.value = [t, ...e.value].join("%");
  1258. });
  1259. const s = jue(), l = (u) => {
  1260. i.value.cache.update(u, (c) => {
  1261. const [f = 0, d] = c || [];
  1262. return f - 1 === 0 ? (r == null || r(d, !1), null) : [f - 1, d];
  1263. });
  1264. };
  1265. return se(a, (u, c) => {
  1266. c && l(c), i.value.cache.update(u, (f) => {
  1267. const [d = 0, h] = f || [];
  1268. let p = h;
  1269. process.env.NODE_ENV !== "production" && h && s && (r == null || r(p, s), p = null);
  1270. const v = p || n();
  1271. return [d + 1, v];
  1272. }), o.value = i.value.cache.get(a.value)[1];
  1273. }, {
  1274. immediate: !0
  1275. }), yt(() => {
  1276. l(a.value);
  1277. }), o;
  1278. }
  1279. function wa() {
  1280. return !!(typeof window < "u" && window.document && window.document.createElement);
  1281. }
  1282. function $l(t, e) {
  1283. return t && t.contains ? t.contains(e) : !1;
  1284. }
  1285. const i8 = "data-vc-order", Zue = "vc-util-key", a2 = /* @__PURE__ */ new Map();
  1286. function mj() {
  1287. let {
  1288. mark: t
  1289. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  1290. return t ? t.startsWith("data-") ? t : `data-${t}` : Zue;
  1291. }
  1292. function LS(t) {
  1293. return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
  1294. }
  1295. function Uue(t) {
  1296. return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
  1297. }
  1298. function yj(t) {
  1299. return Array.from((a2.get(t) || t).children).filter((e) => e.tagName === "STYLE");
  1300. }
  1301. function bj(t) {
  1302. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1303. if (!wa())
  1304. return null;
  1305. const {
  1306. csp: n,
  1307. prepend: r
  1308. } = e, i = document.createElement("style");
  1309. i.setAttribute(i8, Uue(r)), n != null && n.nonce && (i.nonce = n == null ? void 0 : n.nonce), i.innerHTML = t;
  1310. const a = LS(e), {
  1311. firstChild: o
  1312. } = a;
  1313. if (r) {
  1314. if (r === "queue") {
  1315. const s = yj(a).filter((l) => ["prepend", "prependQueue"].includes(l.getAttribute(i8)));
  1316. if (s.length)
  1317. return a.insertBefore(i, s[s.length - 1].nextSibling), i;
  1318. }
  1319. a.insertBefore(i, o);
  1320. } else
  1321. a.appendChild(i);
  1322. return i;
  1323. }
  1324. function _j(t) {
  1325. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1326. const n = LS(e);
  1327. return yj(n).find((r) => r.getAttribute(mj(e)) === t);
  1328. }
  1329. function m1(t) {
  1330. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1331. const n = _j(t, e);
  1332. n && LS(e).removeChild(n);
  1333. }
  1334. function Xue(t, e) {
  1335. const n = a2.get(t);
  1336. if (!n || !$l(document, n)) {
  1337. const r = bj("", e), {
  1338. parentNode: i
  1339. } = r;
  1340. a2.set(t, i), t.removeChild(r);
  1341. }
  1342. }
  1343. function Yg(t, e) {
  1344. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  1345. var r, i, a;
  1346. const o = LS(n);
  1347. Xue(o, n);
  1348. const s = _j(e, n);
  1349. if (s)
  1350. 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;
  1351. const l = bj(t, n);
  1352. return l.setAttribute(mj(n), e), l;
  1353. }
  1354. function Yue(t, e) {
  1355. if (t.length !== e.length)
  1356. return !1;
  1357. for (let n = 0; n < t.length; n++)
  1358. if (t[n] !== e[n])
  1359. return !1;
  1360. return !0;
  1361. }
  1362. class vh {
  1363. constructor() {
  1364. this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  1365. }
  1366. size() {
  1367. return this.keys.length;
  1368. }
  1369. internalGet(e) {
  1370. let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = {
  1371. map: this.cache
  1372. };
  1373. return e.forEach((i) => {
  1374. var a;
  1375. r ? r = (a = r == null ? void 0 : r.map) === null || a === void 0 ? void 0 : a.get(i) : r = void 0;
  1376. }), r != null && r.value && n && (r.value[1] = this.cacheCallTimes++), r == null ? void 0 : r.value;
  1377. }
  1378. get(e) {
  1379. var n;
  1380. return (n = this.internalGet(e, !0)) === null || n === void 0 ? void 0 : n[0];
  1381. }
  1382. has(e) {
  1383. return !!this.internalGet(e);
  1384. }
  1385. set(e, n) {
  1386. if (!this.has(e)) {
  1387. if (this.size() + 1 > vh.MAX_CACHE_SIZE + vh.MAX_CACHE_OFFSET) {
  1388. const [i] = this.keys.reduce((a, o) => {
  1389. const [, s] = a;
  1390. return this.internalGet(o)[1] < s ? [o, this.internalGet(o)[1]] : a;
  1391. }, [this.keys[0], this.cacheCallTimes]);
  1392. this.delete(i);
  1393. }
  1394. this.keys.push(e);
  1395. }
  1396. let r = this.cache;
  1397. e.forEach((i, a) => {
  1398. if (a === e.length - 1)
  1399. r.set(i, {
  1400. value: [n, this.cacheCallTimes++]
  1401. });
  1402. else {
  1403. const o = r.get(i);
  1404. o ? o.map || (o.map = /* @__PURE__ */ new Map()) : r.set(i, {
  1405. map: /* @__PURE__ */ new Map()
  1406. }), r = r.get(i).map;
  1407. }
  1408. });
  1409. }
  1410. deleteByPath(e, n) {
  1411. var r;
  1412. const i = e.get(n[0]);
  1413. if (n.length === 1)
  1414. return i.map ? e.set(n[0], {
  1415. map: i.map
  1416. }) : e.delete(n[0]), (r = i.value) === null || r === void 0 ? void 0 : r[0];
  1417. const a = this.deleteByPath(i.map, n.slice(1));
  1418. return (!i.map || i.map.size === 0) && !i.value && e.delete(n[0]), a;
  1419. }
  1420. delete(e) {
  1421. if (this.has(e))
  1422. return this.keys = this.keys.filter((n) => !Yue(n, e)), this.deleteByPath(this.cache, e);
  1423. }
  1424. }
  1425. vh.MAX_CACHE_SIZE = 20;
  1426. vh.MAX_CACHE_OFFSET = 5;
  1427. let o2 = {};
  1428. function cf(t, e) {
  1429. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error(`Warning: ${e}`);
  1430. }
  1431. function que(t, e) {
  1432. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.warn(`Note: ${e}`);
  1433. }
  1434. function Kue() {
  1435. o2 = {};
  1436. }
  1437. function Oj(t, e, n) {
  1438. !e && !o2[n] && (t(!1, n), o2[n] = !0);
  1439. }
  1440. function oa(t, e) {
  1441. Oj(cf, t, e);
  1442. }
  1443. function a8(t, e) {
  1444. Oj(que, t, e);
  1445. }
  1446. function Jue() {
  1447. }
  1448. let Xr = Jue;
  1449. process.env.NODE_ENV !== "production" && (Xr = (t, e, n) => {
  1450. oa(t, `[ant-design-vue: ${e}] ${n}`), process.env.NODE_ENV === "test" && Kue();
  1451. });
  1452. let o8 = 0;
  1453. class Sj {
  1454. constructor(e) {
  1455. this.derivatives = Array.isArray(e) ? e : [e], this.id = o8, e.length === 0 && Xr(e.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), o8 += 1;
  1456. }
  1457. getDerivativeToken(e) {
  1458. return this.derivatives.reduce((n, r) => r(e, n), void 0);
  1459. }
  1460. }
  1461. const qw = new vh();
  1462. function xj(t) {
  1463. const e = Array.isArray(t) ? t : [t];
  1464. return qw.has(e) || qw.set(e, new Sj(e)), qw.get(e);
  1465. }
  1466. const s8 = /* @__PURE__ */ new WeakMap();
  1467. function y1(t) {
  1468. let e = s8.get(t) || "";
  1469. return e || (Object.keys(t).forEach((n) => {
  1470. const r = t[n];
  1471. e += n, r instanceof Sj ? e += r.id : r && typeof r == "object" ? e += y1(r) : e += r;
  1472. }), s8.set(t, e)), e;
  1473. }
  1474. function ece(t, e) {
  1475. return oI(`${e}_${y1(t)}`);
  1476. }
  1477. const og = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), wj = "_bAmBoO_";
  1478. function tce(t, e, n) {
  1479. var r, i;
  1480. if (wa()) {
  1481. Yg(t, og);
  1482. const a = document.createElement("div");
  1483. 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");
  1484. const o = n ? n(a) : (r = getComputedStyle(a).content) === null || r === void 0 ? void 0 : r.includes(wj);
  1485. return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), m1(og), o;
  1486. }
  1487. return !1;
  1488. }
  1489. let Kw;
  1490. function nce() {
  1491. return Kw === void 0 && (Kw = tce(`@layer ${og} { .${og} { content: "${wj}"!important; } }`, (t) => {
  1492. t.className = og;
  1493. })), Kw;
  1494. }
  1495. const l8 = {}, rce = process.env.NODE_ENV === "production", ice = process.env.NODE_ENV === "prerender", ace = !rce && !ice ? "css-dev-only-do-not-override" : "css", bc = /* @__PURE__ */ new Map();
  1496. function oce(t) {
  1497. bc.set(t, (bc.get(t) || 0) + 1);
  1498. }
  1499. function sce(t, e) {
  1500. typeof document < "u" && document.querySelectorAll(`style[${hj}="${t}"]`).forEach((r) => {
  1501. var i;
  1502. r[Nd] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r));
  1503. });
  1504. }
  1505. const lce = 0;
  1506. function uce(t, e) {
  1507. bc.set(t, (bc.get(t) || 0) - 1);
  1508. const n = Array.from(bc.keys()), r = n.filter((i) => (bc.get(i) || 0) <= 0);
  1509. n.length - r.length > lce && r.forEach((i) => {
  1510. sce(i, e), bc.delete(i);
  1511. });
  1512. }
  1513. const cce = (t, e, n, r) => {
  1514. const i = n.getDerivativeToken(t);
  1515. let a = I(I({}, i), e);
  1516. return r && (a = r(a)), a;
  1517. };
  1518. function fce(t, e) {
  1519. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : U({});
  1520. const r = kS(), i = L(() => I({}, ...e.value)), a = L(() => y1(i.value)), o = L(() => y1(n.value.override || l8));
  1521. return gj("token", L(() => [n.value.salt || "", t.value.id, a.value, o.value]), () => {
  1522. const {
  1523. salt: l = "",
  1524. override: u = l8,
  1525. formatToken: c,
  1526. getComputedToken: f
  1527. } = n.value, d = f ? f(i.value, u, t.value) : cce(i.value, u, t.value, c), h = ece(d, l);
  1528. d._tokenKey = h, oce(h);
  1529. const p = `${ace}-${oI(h)}`;
  1530. return d._hashId = p, [d, p];
  1531. }, (l) => {
  1532. var u;
  1533. uce(l[0]._tokenKey, (u = r.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  1534. });
  1535. }
  1536. var dce = {
  1537. animationIterationCount: 1,
  1538. aspectRatio: 1,
  1539. borderImageOutset: 1,
  1540. borderImageSlice: 1,
  1541. borderImageWidth: 1,
  1542. boxFlex: 1,
  1543. boxFlexGroup: 1,
  1544. boxOrdinalGroup: 1,
  1545. columnCount: 1,
  1546. columns: 1,
  1547. flex: 1,
  1548. flexGrow: 1,
  1549. flexPositive: 1,
  1550. flexShrink: 1,
  1551. flexNegative: 1,
  1552. flexOrder: 1,
  1553. gridRow: 1,
  1554. gridRowEnd: 1,
  1555. gridRowSpan: 1,
  1556. gridRowStart: 1,
  1557. gridColumn: 1,
  1558. gridColumnEnd: 1,
  1559. gridColumnSpan: 1,
  1560. gridColumnStart: 1,
  1561. msGridRow: 1,
  1562. msGridRowSpan: 1,
  1563. msGridColumn: 1,
  1564. msGridColumnSpan: 1,
  1565. fontWeight: 1,
  1566. lineHeight: 1,
  1567. opacity: 1,
  1568. order: 1,
  1569. orphans: 1,
  1570. tabSize: 1,
  1571. widows: 1,
  1572. zIndex: 1,
  1573. zoom: 1,
  1574. WebkitLineClamp: 1,
  1575. // SVG-related properties
  1576. fillOpacity: 1,
  1577. floodOpacity: 1,
  1578. stopOpacity: 1,
  1579. strokeDasharray: 1,
  1580. strokeDashoffset: 1,
  1581. strokeMiterlimit: 1,
  1582. strokeOpacity: 1,
  1583. strokeWidth: 1
  1584. }, Cj = "comm", Tj = "rule", Pj = "decl", hce = "@import", pce = "@keyframes", vce = "@layer", $j = Math.abs, sI = String.fromCharCode;
  1585. function Aj(t) {
  1586. return t.trim();
  1587. }
  1588. function y_(t, e, n) {
  1589. return t.replace(e, n);
  1590. }
  1591. function gce(t, e, n) {
  1592. return t.indexOf(e, n);
  1593. }
  1594. function qg(t, e) {
  1595. return t.charCodeAt(e) | 0;
  1596. }
  1597. function Kg(t, e, n) {
  1598. return t.slice(e, n);
  1599. }
  1600. function Ss(t) {
  1601. return t.length;
  1602. }
  1603. function mce(t) {
  1604. return t.length;
  1605. }
  1606. function gy(t, e) {
  1607. return e.push(t), t;
  1608. }
  1609. var NS = 1, gh = 1, Ej = 0, Ca = 0, Bn = 0, rp = "";
  1610. function lI(t, e, n, r, i, a, o, s) {
  1611. return { value: t, root: e, parent: n, type: r, props: i, children: a, line: NS, column: gh, length: o, return: "", siblings: s };
  1612. }
  1613. function yce() {
  1614. return Bn;
  1615. }
  1616. function bce() {
  1617. return Bn = Ca > 0 ? qg(rp, --Ca) : 0, gh--, Bn === 10 && (gh = 1, NS--), Bn;
  1618. }
  1619. function qa() {
  1620. return Bn = Ca < Ej ? qg(rp, Ca++) : 0, gh++, Bn === 10 && (gh = 1, NS++), Bn;
  1621. }
  1622. function Gc() {
  1623. return qg(rp, Ca);
  1624. }
  1625. function b_() {
  1626. return Ca;
  1627. }
  1628. function BS(t, e) {
  1629. return Kg(rp, t, e);
  1630. }
  1631. function s2(t) {
  1632. switch (t) {
  1633. case 0:
  1634. case 9:
  1635. case 10:
  1636. case 13:
  1637. case 32:
  1638. return 5;
  1639. case 33:
  1640. case 43:
  1641. case 44:
  1642. case 47:
  1643. case 62:
  1644. case 64:
  1645. case 126:
  1646. case 59:
  1647. case 123:
  1648. case 125:
  1649. return 4;
  1650. case 58:
  1651. return 3;
  1652. case 34:
  1653. case 39:
  1654. case 40:
  1655. case 91:
  1656. return 2;
  1657. case 41:
  1658. case 93:
  1659. return 1;
  1660. }
  1661. return 0;
  1662. }
  1663. function _ce(t) {
  1664. return NS = gh = 1, Ej = Ss(rp = t), Ca = 0, [];
  1665. }
  1666. function Oce(t) {
  1667. return rp = "", t;
  1668. }
  1669. function Jw(t) {
  1670. return Aj(BS(Ca - 1, l2(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
  1671. }
  1672. function Sce(t) {
  1673. for (; (Bn = Gc()) && Bn < 33; )
  1674. qa();
  1675. return s2(t) > 2 || s2(Bn) > 3 ? "" : " ";
  1676. }
  1677. function xce(t, e) {
  1678. for (; --e && qa() && !(Bn < 48 || Bn > 102 || Bn > 57 && Bn < 65 || Bn > 70 && Bn < 97); )
  1679. ;
  1680. return BS(t, b_() + (e < 6 && Gc() == 32 && qa() == 32));
  1681. }
  1682. function l2(t) {
  1683. for (; qa(); )
  1684. switch (Bn) {
  1685. case t:
  1686. return Ca;
  1687. case 34:
  1688. case 39:
  1689. t !== 34 && t !== 39 && l2(Bn);
  1690. break;
  1691. case 40:
  1692. t === 41 && l2(t);
  1693. break;
  1694. case 92:
  1695. qa();
  1696. break;
  1697. }
  1698. return Ca;
  1699. }
  1700. function wce(t, e) {
  1701. for (; qa() && t + Bn !== 57; )
  1702. if (t + Bn === 84 && Gc() === 47)
  1703. break;
  1704. return "/*" + BS(e, Ca - 1) + "*" + sI(t === 47 ? t : qa());
  1705. }
  1706. function Cce(t) {
  1707. for (; !s2(Gc()); )
  1708. qa();
  1709. return BS(t, Ca);
  1710. }
  1711. function Tce(t) {
  1712. return Oce(__("", null, null, null, [""], t = _ce(t), 0, [0], t));
  1713. }
  1714. function __(t, e, n, r, i, a, o, s, l) {
  1715. 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; )
  1716. switch (p = y, y = qa()) {
  1717. case 40:
  1718. if (p != 108 && qg(x, f - 1) == 58) {
  1719. gce(x += y_(Jw(y), "&", "&\f"), "&\f", $j(u ? s[u - 1] : 0)) != -1 && (m = -1);
  1720. break;
  1721. }
  1722. case 34:
  1723. case 39:
  1724. case 91:
  1725. x += Jw(y);
  1726. break;
  1727. case 9:
  1728. case 10:
  1729. case 13:
  1730. case 32:
  1731. x += Sce(p);
  1732. break;
  1733. case 92:
  1734. x += xce(b_() - 1, 7);
  1735. continue;
  1736. case 47:
  1737. switch (Gc()) {
  1738. case 42:
  1739. case 47:
  1740. gy(Pce(wce(qa(), b_()), e, n, l), l);
  1741. break;
  1742. default:
  1743. x += "/";
  1744. }
  1745. break;
  1746. case 123 * v:
  1747. s[u++] = Ss(x) * m;
  1748. case 125 * v:
  1749. case 59:
  1750. case 0:
  1751. switch (y) {
  1752. case 0:
  1753. case 125:
  1754. g = 0;
  1755. case 59 + c:
  1756. m == -1 && (x = y_(x, /\f/g, "")), h > 0 && Ss(x) - f && gy(h > 32 ? c8(x + ";", r, n, f - 1, l) : c8(y_(x, " ", "") + ";", r, n, f - 2, l), l);
  1757. break;
  1758. case 59:
  1759. x += ";";
  1760. default:
  1761. if (gy(S = u8(x, e, n, u, c, i, s, b, _ = [], O = [], f, a), a), y === 123)
  1762. if (c === 0)
  1763. __(x, e, S, S, _, a, f, s, O);
  1764. else
  1765. switch (d === 99 && qg(x, 3) === 110 ? 100 : d) {
  1766. case 100:
  1767. case 108:
  1768. case 109:
  1769. case 115:
  1770. __(t, S, S, r && gy(u8(t, S, S, 0, 0, i, s, b, i, _ = [], f, O), O), i, O, f, s, r ? _ : O);
  1771. break;
  1772. default:
  1773. __(x, S, S, S, [""], O, 0, s, O);
  1774. }
  1775. }
  1776. u = c = h = 0, v = m = 1, b = x = "", f = o;
  1777. break;
  1778. case 58:
  1779. f = 1 + Ss(x), h = p;
  1780. default:
  1781. if (v < 1) {
  1782. if (y == 123)
  1783. --v;
  1784. else if (y == 125 && v++ == 0 && bce() == 125)
  1785. continue;
  1786. }
  1787. switch (x += sI(y), y * v) {
  1788. case 38:
  1789. m = c > 0 ? 1 : (x += "\f", -1);
  1790. break;
  1791. case 44:
  1792. s[u++] = (Ss(x) - 1) * m, m = 1;
  1793. break;
  1794. case 64:
  1795. Gc() === 45 && (x += Jw(qa())), d = Gc(), c = f = Ss(b = x += Cce(b_())), y++;
  1796. break;
  1797. case 45:
  1798. p === 45 && Ss(x) == 2 && (v = 0);
  1799. }
  1800. }
  1801. return a;
  1802. }
  1803. function u8(t, e, n, r, i, a, o, s, l, u, c, f) {
  1804. for (var d = i - 1, h = i === 0 ? a : [""], p = mce(h), v = 0, g = 0, m = 0; v < r; ++v)
  1805. for (var y = 0, b = Kg(t, d + 1, d = $j(g = o[v])), _ = t; y < p; ++y)
  1806. (_ = Aj(g > 0 ? h[y] + " " + b : y_(b, /&\f/g, h[y]))) && (l[m++] = _);
  1807. return lI(t, e, n, i === 0 ? Tj : s, l, u, c, f);
  1808. }
  1809. function Pce(t, e, n, r) {
  1810. return lI(t, e, n, Cj, sI(yce()), Kg(t, 2, -2), 0, r);
  1811. }
  1812. function c8(t, e, n, r, i) {
  1813. return lI(t, e, n, Pj, Kg(t, 0, r), Kg(t, r + 1, -1), r, i);
  1814. }
  1815. function u2(t, e) {
  1816. for (var n = "", r = 0; r < t.length; r++)
  1817. n += e(t[r], r, t, e) || "";
  1818. return n;
  1819. }
  1820. function $ce(t, e, n, r) {
  1821. switch (t.type) {
  1822. case vce:
  1823. if (t.children.length) break;
  1824. case hce:
  1825. case Pj:
  1826. return t.return = t.return || t.value;
  1827. case Cj:
  1828. return "";
  1829. case pce:
  1830. return t.return = t.value + "{" + u2(t.children, r) + "}";
  1831. case Tj:
  1832. if (!Ss(t.value = t.props.join(","))) return "";
  1833. }
  1834. return Ss(n = u2(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
  1835. }
  1836. function Mj(t, e) {
  1837. const {
  1838. path: n,
  1839. parentSelectors: r
  1840. } = e;
  1841. oa(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${t}${r.length ? ` Selector info: ${r.join(" -> ")}` : ""}`);
  1842. }
  1843. const Ace = (t, e, n) => {
  1844. if (t === "content") {
  1845. const r = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
  1846. (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) !== "'")) && Mj(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`, n);
  1847. }
  1848. }, Ece = (t, e, n) => {
  1849. t === "animation" && n.hashId && e !== "none" && Mj(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`, n);
  1850. }, f8 = "data-ant-cssinjs-cache-path", Mce = "_FILE_STYLE__";
  1851. let jc, Ij = !0;
  1852. function Ice() {
  1853. var t;
  1854. if (!jc && (jc = {}, wa())) {
  1855. const e = document.createElement("div");
  1856. e.className = f8, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
  1857. let n = getComputedStyle(e).content || "";
  1858. n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
  1859. const [a, o] = i.split(":");
  1860. jc[a] = o;
  1861. });
  1862. const r = document.querySelector(`style[${f8}]`);
  1863. r && (Ij = !1, (t = r.parentNode) === null || t === void 0 || t.removeChild(r)), document.body.removeChild(e);
  1864. }
  1865. }
  1866. function Dce(t) {
  1867. return Ice(), !!jc[t];
  1868. }
  1869. function Rce(t) {
  1870. const e = jc[t];
  1871. let n = null;
  1872. if (e && wa())
  1873. if (Ij)
  1874. n = Mce;
  1875. else {
  1876. const r = document.querySelector(`style[${Hc}="${jc[t]}"]`);
  1877. r ? n = r.innerHTML : delete jc[t];
  1878. }
  1879. return [n, e];
  1880. }
  1881. const d8 = wa(), Dj = "_skip_check_", Rj = "_multi_value_";
  1882. function h8(t) {
  1883. return u2(Tce(t), $ce).replace(/\{%%%\:[^;];}/g, ";");
  1884. }
  1885. function kce(t) {
  1886. return typeof t == "object" && t && (Dj in t || Rj in t);
  1887. }
  1888. function Lce(t, e, n) {
  1889. if (!e)
  1890. return t;
  1891. const r = `.${e}`, i = n === "low" ? `:where(${r})` : r;
  1892. return t.split(",").map((o) => {
  1893. var s;
  1894. const l = o.trim().split(/\s+/);
  1895. let u = l[0] || "";
  1896. const c = ((s = u.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
  1897. return u = `${c}${i}${u.slice(c.length)}`, [u, ...l.slice(1)].join(" ");
  1898. }).join(",");
  1899. }
  1900. const c2 = /* @__PURE__ */ new Set();
  1901. process.env.NODE_ENV;
  1902. const f2 = function(t) {
  1903. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
  1904. root: n,
  1905. injectHash: r,
  1906. parentSelectors: i
  1907. } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
  1908. root: !0,
  1909. parentSelectors: []
  1910. };
  1911. const {
  1912. hashId: a,
  1913. layer: o,
  1914. path: s,
  1915. hashPriority: l,
  1916. transformers: u = [],
  1917. linters: c = []
  1918. } = e;
  1919. let f = "", d = {};
  1920. function h(g) {
  1921. const m = g.getName(a);
  1922. if (!d[m]) {
  1923. const [y] = f2(g.style, e, {
  1924. root: !1,
  1925. parentSelectors: i
  1926. });
  1927. d[m] = `@keyframes ${g.getName(a)}${y}`;
  1928. }
  1929. }
  1930. function p(g) {
  1931. let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  1932. return g.forEach((y) => {
  1933. Array.isArray(y) ? p(y, m) : y && m.push(y);
  1934. }), m;
  1935. }
  1936. if (p(Array.isArray(t) ? t : [t]).forEach((g) => {
  1937. const m = typeof g == "string" && !n ? {} : g;
  1938. if (typeof m == "string")
  1939. f += `${m}
  1940. `;
  1941. else if (m._keyframe)
  1942. h(m);
  1943. else {
  1944. const y = u.reduce((b, _) => {
  1945. var O;
  1946. return ((O = _ == null ? void 0 : _.visit) === null || O === void 0 ? void 0 : O.call(_, b)) || b;
  1947. }, m);
  1948. Object.keys(y).forEach((b) => {
  1949. var _;
  1950. const O = y[b];
  1951. if (typeof O == "object" && O && (b !== "animationName" || !O._keyframe) && !kce(O)) {
  1952. let S = !1, x = b.trim(), C = !1;
  1953. (n || r) && a ? x.startsWith("@") ? S = !0 : x = Lce(b, a, l) : n && !a && (x === "&" || x === "") && (x = "", C = !0);
  1954. const [T, w] = f2(O, e, {
  1955. root: C,
  1956. injectHash: S,
  1957. parentSelectors: [...i, x]
  1958. });
  1959. d = I(I({}, d), w), f += `${x}${T}`;
  1960. } else {
  1961. let S = function(C, T) {
  1962. process.env.NODE_ENV !== "production" && (typeof O != "object" || !(O != null && O[Dj])) && [Ace, Ece, ...c].forEach(($) => $(C, T, {
  1963. path: s,
  1964. hashId: a,
  1965. parentSelectors: i
  1966. }));
  1967. const w = C.replace(/[A-Z]/g, ($) => `-${$.toLowerCase()}`);
  1968. let P = T;
  1969. !dce[C] && typeof P == "number" && P !== 0 && (P = `${P}px`), C === "animationName" && (T != null && T._keyframe) && (h(T), P = T.getName(a)), f += `${w}:${P};`;
  1970. };
  1971. const x = (_ = O == null ? void 0 : O.value) !== null && _ !== void 0 ? _ : O;
  1972. typeof O == "object" && (O != null && O[Rj]) && Array.isArray(x) ? x.forEach((C) => {
  1973. S(b, C);
  1974. }) : S(b, x);
  1975. }
  1976. });
  1977. }
  1978. }), !n)
  1979. f = `{${f}}`;
  1980. else if (o && nce()) {
  1981. const g = o.split(",");
  1982. f = `@layer ${g[g.length - 1].trim()} {${f}}`, g.length > 1 && (f = `@layer ${o}{%%%:%}${f}`);
  1983. }
  1984. return [f, d];
  1985. };
  1986. function Nce(t, e) {
  1987. return oI(`${t.join("%")}${e}`);
  1988. }
  1989. function d2(t, e) {
  1990. const n = kS(), r = L(() => t.value.token._tokenKey), i = L(() => [r.value, ...t.value.path]);
  1991. let a = d8;
  1992. return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), gj(
  1993. "style",
  1994. i,
  1995. // Create cache if needed
  1996. () => {
  1997. const {
  1998. path: o,
  1999. hashId: s,
  2000. layer: l,
  2001. nonce: u,
  2002. clientOnly: c,
  2003. order: f = 0
  2004. } = t.value, d = i.value.join("|");
  2005. if (Dce(d)) {
  2006. const [x, C] = Rce(d);
  2007. if (x)
  2008. return [x, r.value, C, {}, c, f];
  2009. }
  2010. const h = e(), {
  2011. hashPriority: p,
  2012. container: v,
  2013. transformers: g,
  2014. linters: m,
  2015. cache: y
  2016. } = n.value, [b, _] = f2(h, {
  2017. hashId: s,
  2018. hashPriority: p,
  2019. layer: l,
  2020. path: o.join("-"),
  2021. transformers: g,
  2022. linters: m
  2023. }), O = h8(b), S = Nce(i.value, O);
  2024. if (a) {
  2025. const x = {
  2026. mark: Hc,
  2027. prepend: "queue",
  2028. attachTo: v,
  2029. priority: f
  2030. }, C = typeof u == "function" ? u() : u;
  2031. C && (x.csp = {
  2032. nonce: C
  2033. });
  2034. const T = Yg(O, S, x);
  2035. T[Nd] = y.instanceId, T.setAttribute(hj, r.value), process.env.NODE_ENV !== "production" && T.setAttribute(Vue, i.value.join("|")), Object.keys(_).forEach((w) => {
  2036. c2.has(w) || (c2.add(w), Yg(h8(_[w]), `_effect-${w}`, {
  2037. mark: Hc,
  2038. prepend: "queue",
  2039. attachTo: v
  2040. }));
  2041. });
  2042. }
  2043. return [O, r.value, S, _, c, f];
  2044. },
  2045. // Remove cache if no need
  2046. (o, s) => {
  2047. let [, , l] = o;
  2048. (s || n.value.autoClear) && d8 && m1(l, {
  2049. mark: Hc
  2050. });
  2051. }
  2052. ), (o) => o;
  2053. }
  2054. class Ot {
  2055. constructor(e, n) {
  2056. this._keyframe = !0, this.name = e, this.style = n;
  2057. }
  2058. getName() {
  2059. let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
  2060. return e ? `${e}-${this.name}` : this.name;
  2061. }
  2062. }
  2063. const Bce = "4.2.3", b1 = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
  2064. function Or(t, e) {
  2065. zce(t) && (t = "100%");
  2066. var n = Vce(t);
  2067. 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);
  2068. }
  2069. function my(t) {
  2070. return Math.min(1, Math.max(0, t));
  2071. }
  2072. function zce(t) {
  2073. return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
  2074. }
  2075. function Vce(t) {
  2076. return typeof t == "string" && t.indexOf("%") !== -1;
  2077. }
  2078. function kj(t) {
  2079. return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
  2080. }
  2081. function yy(t) {
  2082. return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
  2083. }
  2084. function Mc(t) {
  2085. return t.length === 1 ? "0" + t : String(t);
  2086. }
  2087. function Fce(t, e, n) {
  2088. return {
  2089. r: Or(t, 255) * 255,
  2090. g: Or(e, 255) * 255,
  2091. b: Or(n, 255) * 255
  2092. };
  2093. }
  2094. function p8(t, e, n) {
  2095. t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  2096. var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = 0, s = (r + i) / 2;
  2097. if (r === i)
  2098. o = 0, a = 0;
  2099. else {
  2100. var l = r - i;
  2101. switch (o = s > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
  2102. case t:
  2103. a = (e - n) / l + (e < n ? 6 : 0);
  2104. break;
  2105. case e:
  2106. a = (n - t) / l + 2;
  2107. break;
  2108. case n:
  2109. a = (t - e) / l + 4;
  2110. break;
  2111. }
  2112. a /= 6;
  2113. }
  2114. return { h: a, s: o, l: s };
  2115. }
  2116. function eC(t, e, n) {
  2117. 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;
  2118. }
  2119. function Wce(t, e, n) {
  2120. var r, i, a;
  2121. if (t = Or(t, 360), e = Or(e, 100), n = Or(n, 100), e === 0)
  2122. i = n, a = n, r = n;
  2123. else {
  2124. var o = n < 0.5 ? n * (1 + e) : n + e - n * e, s = 2 * n - o;
  2125. r = eC(s, o, t + 1 / 3), i = eC(s, o, t), a = eC(s, o, t - 1 / 3);
  2126. }
  2127. return { r: r * 255, g: i * 255, b: a * 255 };
  2128. }
  2129. function h2(t, e, n) {
  2130. t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  2131. 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;
  2132. if (r === i)
  2133. a = 0;
  2134. else {
  2135. switch (r) {
  2136. case t:
  2137. a = (e - n) / s + (e < n ? 6 : 0);
  2138. break;
  2139. case e:
  2140. a = (n - t) / s + 2;
  2141. break;
  2142. case n:
  2143. a = (t - e) / s + 4;
  2144. break;
  2145. }
  2146. a /= 6;
  2147. }
  2148. return { h: a, s: l, v: o };
  2149. }
  2150. function Qce(t, e, n) {
  2151. t = Or(t, 360) * 6, e = Or(e, 100), n = Or(n, 100);
  2152. 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];
  2153. return { r: u * 255, g: c * 255, b: f * 255 };
  2154. }
  2155. function p2(t, e, n, r) {
  2156. var i = [
  2157. Mc(Math.round(t).toString(16)),
  2158. Mc(Math.round(e).toString(16)),
  2159. Mc(Math.round(n).toString(16))
  2160. ];
  2161. 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("");
  2162. }
  2163. function Hce(t, e, n, r, i) {
  2164. var a = [
  2165. Mc(Math.round(t).toString(16)),
  2166. Mc(Math.round(e).toString(16)),
  2167. Mc(Math.round(n).toString(16)),
  2168. Mc(Gce(r))
  2169. ];
  2170. 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("");
  2171. }
  2172. function Gce(t) {
  2173. return Math.round(parseFloat(t) * 255).toString(16);
  2174. }
  2175. function v8(t) {
  2176. return Mi(t) / 255;
  2177. }
  2178. function Mi(t) {
  2179. return parseInt(t, 16);
  2180. }
  2181. function jce(t) {
  2182. return {
  2183. r: t >> 16,
  2184. g: (t & 65280) >> 8,
  2185. b: t & 255
  2186. };
  2187. }
  2188. var v2 = {
  2189. aliceblue: "#f0f8ff",
  2190. antiquewhite: "#faebd7",
  2191. aqua: "#00ffff",
  2192. aquamarine: "#7fffd4",
  2193. azure: "#f0ffff",
  2194. beige: "#f5f5dc",
  2195. bisque: "#ffe4c4",
  2196. black: "#000000",
  2197. blanchedalmond: "#ffebcd",
  2198. blue: "#0000ff",
  2199. blueviolet: "#8a2be2",
  2200. brown: "#a52a2a",
  2201. burlywood: "#deb887",
  2202. cadetblue: "#5f9ea0",
  2203. chartreuse: "#7fff00",
  2204. chocolate: "#d2691e",
  2205. coral: "#ff7f50",
  2206. cornflowerblue: "#6495ed",
  2207. cornsilk: "#fff8dc",
  2208. crimson: "#dc143c",
  2209. cyan: "#00ffff",
  2210. darkblue: "#00008b",
  2211. darkcyan: "#008b8b",
  2212. darkgoldenrod: "#b8860b",
  2213. darkgray: "#a9a9a9",
  2214. darkgreen: "#006400",
  2215. darkgrey: "#a9a9a9",
  2216. darkkhaki: "#bdb76b",
  2217. darkmagenta: "#8b008b",
  2218. darkolivegreen: "#556b2f",
  2219. darkorange: "#ff8c00",
  2220. darkorchid: "#9932cc",
  2221. darkred: "#8b0000",
  2222. darksalmon: "#e9967a",
  2223. darkseagreen: "#8fbc8f",
  2224. darkslateblue: "#483d8b",
  2225. darkslategray: "#2f4f4f",
  2226. darkslategrey: "#2f4f4f",
  2227. darkturquoise: "#00ced1",
  2228. darkviolet: "#9400d3",
  2229. deeppink: "#ff1493",
  2230. deepskyblue: "#00bfff",
  2231. dimgray: "#696969",
  2232. dimgrey: "#696969",
  2233. dodgerblue: "#1e90ff",
  2234. firebrick: "#b22222",
  2235. floralwhite: "#fffaf0",
  2236. forestgreen: "#228b22",
  2237. fuchsia: "#ff00ff",
  2238. gainsboro: "#dcdcdc",
  2239. ghostwhite: "#f8f8ff",
  2240. goldenrod: "#daa520",
  2241. gold: "#ffd700",
  2242. gray: "#808080",
  2243. green: "#008000",
  2244. greenyellow: "#adff2f",
  2245. grey: "#808080",
  2246. honeydew: "#f0fff0",
  2247. hotpink: "#ff69b4",
  2248. indianred: "#cd5c5c",
  2249. indigo: "#4b0082",
  2250. ivory: "#fffff0",
  2251. khaki: "#f0e68c",
  2252. lavenderblush: "#fff0f5",
  2253. lavender: "#e6e6fa",
  2254. lawngreen: "#7cfc00",
  2255. lemonchiffon: "#fffacd",
  2256. lightblue: "#add8e6",
  2257. lightcoral: "#f08080",
  2258. lightcyan: "#e0ffff",
  2259. lightgoldenrodyellow: "#fafad2",
  2260. lightgray: "#d3d3d3",
  2261. lightgreen: "#90ee90",
  2262. lightgrey: "#d3d3d3",
  2263. lightpink: "#ffb6c1",
  2264. lightsalmon: "#ffa07a",
  2265. lightseagreen: "#20b2aa",
  2266. lightskyblue: "#87cefa",
  2267. lightslategray: "#778899",
  2268. lightslategrey: "#778899",
  2269. lightsteelblue: "#b0c4de",
  2270. lightyellow: "#ffffe0",
  2271. lime: "#00ff00",
  2272. limegreen: "#32cd32",
  2273. linen: "#faf0e6",
  2274. magenta: "#ff00ff",
  2275. maroon: "#800000",
  2276. mediumaquamarine: "#66cdaa",
  2277. mediumblue: "#0000cd",
  2278. mediumorchid: "#ba55d3",
  2279. mediumpurple: "#9370db",
  2280. mediumseagreen: "#3cb371",
  2281. mediumslateblue: "#7b68ee",
  2282. mediumspringgreen: "#00fa9a",
  2283. mediumturquoise: "#48d1cc",
  2284. mediumvioletred: "#c71585",
  2285. midnightblue: "#191970",
  2286. mintcream: "#f5fffa",
  2287. mistyrose: "#ffe4e1",
  2288. moccasin: "#ffe4b5",
  2289. navajowhite: "#ffdead",
  2290. navy: "#000080",
  2291. oldlace: "#fdf5e6",
  2292. olive: "#808000",
  2293. olivedrab: "#6b8e23",
  2294. orange: "#ffa500",
  2295. orangered: "#ff4500",
  2296. orchid: "#da70d6",
  2297. palegoldenrod: "#eee8aa",
  2298. palegreen: "#98fb98",
  2299. paleturquoise: "#afeeee",
  2300. palevioletred: "#db7093",
  2301. papayawhip: "#ffefd5",
  2302. peachpuff: "#ffdab9",
  2303. peru: "#cd853f",
  2304. pink: "#ffc0cb",
  2305. plum: "#dda0dd",
  2306. powderblue: "#b0e0e6",
  2307. purple: "#800080",
  2308. rebeccapurple: "#663399",
  2309. red: "#ff0000",
  2310. rosybrown: "#bc8f8f",
  2311. royalblue: "#4169e1",
  2312. saddlebrown: "#8b4513",
  2313. salmon: "#fa8072",
  2314. sandybrown: "#f4a460",
  2315. seagreen: "#2e8b57",
  2316. seashell: "#fff5ee",
  2317. sienna: "#a0522d",
  2318. silver: "#c0c0c0",
  2319. skyblue: "#87ceeb",
  2320. slateblue: "#6a5acd",
  2321. slategray: "#708090",
  2322. slategrey: "#708090",
  2323. snow: "#fffafa",
  2324. springgreen: "#00ff7f",
  2325. steelblue: "#4682b4",
  2326. tan: "#d2b48c",
  2327. teal: "#008080",
  2328. thistle: "#d8bfd8",
  2329. tomato: "#ff6347",
  2330. turquoise: "#40e0d0",
  2331. violet: "#ee82ee",
  2332. wheat: "#f5deb3",
  2333. white: "#ffffff",
  2334. whitesmoke: "#f5f5f5",
  2335. yellow: "#ffff00",
  2336. yellowgreen: "#9acd32"
  2337. };
  2338. function Cd(t) {
  2339. var e = { r: 0, g: 0, b: 0 }, n = 1, r = null, i = null, a = null, o = !1, s = !1;
  2340. return typeof t == "string" && (t = Xce(t)), typeof t == "object" && (ps(t.r) && ps(t.g) && ps(t.b) ? (e = Fce(t.r, t.g, t.b), o = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : ps(t.h) && ps(t.s) && ps(t.v) ? (r = yy(t.s), i = yy(t.v), e = Qce(t.h, r, i), o = !0, s = "hsv") : ps(t.h) && ps(t.s) && ps(t.l) && (r = yy(t.s), a = yy(t.l), e = Wce(t.h, r, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (n = t.a)), n = kj(n), {
  2341. ok: o,
  2342. format: t.format || s,
  2343. r: Math.min(255, Math.max(e.r, 0)),
  2344. g: Math.min(255, Math.max(e.g, 0)),
  2345. b: Math.min(255, Math.max(e.b, 0)),
  2346. a: n
  2347. };
  2348. }
  2349. var Zce = "[-\\+]?\\d+%?", Uce = "[-\\+]?\\d*\\.\\d+%?", Il = "(?:".concat(Uce, ")|(?:").concat(Zce, ")"), tC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), nC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), Qa = {
  2350. CSS_UNIT: new RegExp(Il),
  2351. rgb: new RegExp("rgb" + tC),
  2352. rgba: new RegExp("rgba" + nC),
  2353. hsl: new RegExp("hsl" + tC),
  2354. hsla: new RegExp("hsla" + nC),
  2355. hsv: new RegExp("hsv" + tC),
  2356. hsva: new RegExp("hsva" + nC),
  2357. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2358. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2359. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2360. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  2361. };
  2362. function Xce(t) {
  2363. if (t = t.trim().toLowerCase(), t.length === 0)
  2364. return !1;
  2365. var e = !1;
  2366. if (v2[t])
  2367. t = v2[t], e = !0;
  2368. else if (t === "transparent")
  2369. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  2370. var n = Qa.rgb.exec(t);
  2371. return n ? { r: n[1], g: n[2], b: n[3] } : (n = Qa.rgba.exec(t), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Qa.hsl.exec(t), n ? { h: n[1], s: n[2], l: n[3] } : (n = Qa.hsla.exec(t), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Qa.hsv.exec(t), n ? { h: n[1], s: n[2], v: n[3] } : (n = Qa.hsva.exec(t), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Qa.hex8.exec(t), n ? {
  2372. r: Mi(n[1]),
  2373. g: Mi(n[2]),
  2374. b: Mi(n[3]),
  2375. a: v8(n[4]),
  2376. format: e ? "name" : "hex8"
  2377. } : (n = Qa.hex6.exec(t), n ? {
  2378. r: Mi(n[1]),
  2379. g: Mi(n[2]),
  2380. b: Mi(n[3]),
  2381. format: e ? "name" : "hex"
  2382. } : (n = Qa.hex4.exec(t), n ? {
  2383. r: Mi(n[1] + n[1]),
  2384. g: Mi(n[2] + n[2]),
  2385. b: Mi(n[3] + n[3]),
  2386. a: v8(n[4] + n[4]),
  2387. format: e ? "name" : "hex8"
  2388. } : (n = Qa.hex3.exec(t), n ? {
  2389. r: Mi(n[1] + n[1]),
  2390. g: Mi(n[2] + n[2]),
  2391. b: Mi(n[3] + n[3]),
  2392. format: e ? "name" : "hex"
  2393. } : !1)))))))));
  2394. }
  2395. function ps(t) {
  2396. return !!Qa.CSS_UNIT.exec(String(t));
  2397. }
  2398. var en = (
  2399. /** @class */
  2400. function() {
  2401. function t(e, n) {
  2402. e === void 0 && (e = ""), n === void 0 && (n = {});
  2403. var r;
  2404. if (e instanceof t)
  2405. return e;
  2406. typeof e == "number" && (e = jce(e)), this.originalInput = e;
  2407. var i = Cd(e);
  2408. 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;
  2409. }
  2410. return t.prototype.isDark = function() {
  2411. return this.getBrightness() < 128;
  2412. }, t.prototype.isLight = function() {
  2413. return !this.isDark();
  2414. }, t.prototype.getBrightness = function() {
  2415. var e = this.toRgb();
  2416. return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
  2417. }, t.prototype.getLuminance = function() {
  2418. var e = this.toRgb(), n, r, i, a = e.r / 255, o = e.g / 255, s = e.b / 255;
  2419. 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;
  2420. }, t.prototype.getAlpha = function() {
  2421. return this.a;
  2422. }, t.prototype.setAlpha = function(e) {
  2423. return this.a = kj(e), this.roundA = Math.round(100 * this.a) / 100, this;
  2424. }, t.prototype.isMonochrome = function() {
  2425. var e = this.toHsl().s;
  2426. return e === 0;
  2427. }, t.prototype.toHsv = function() {
  2428. var e = h2(this.r, this.g, this.b);
  2429. return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
  2430. }, t.prototype.toHsvString = function() {
  2431. var e = h2(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.v * 100);
  2432. return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
  2433. }, t.prototype.toHsl = function() {
  2434. var e = p8(this.r, this.g, this.b);
  2435. return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
  2436. }, t.prototype.toHslString = function() {
  2437. var e = p8(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.l * 100);
  2438. return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
  2439. }, t.prototype.toHex = function(e) {
  2440. return e === void 0 && (e = !1), p2(this.r, this.g, this.b, e);
  2441. }, t.prototype.toHexString = function(e) {
  2442. return e === void 0 && (e = !1), "#" + this.toHex(e);
  2443. }, t.prototype.toHex8 = function(e) {
  2444. return e === void 0 && (e = !1), Hce(this.r, this.g, this.b, this.a, e);
  2445. }, t.prototype.toHex8String = function(e) {
  2446. return e === void 0 && (e = !1), "#" + this.toHex8(e);
  2447. }, t.prototype.toHexShortString = function(e) {
  2448. return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
  2449. }, t.prototype.toRgb = function() {
  2450. return {
  2451. r: Math.round(this.r),
  2452. g: Math.round(this.g),
  2453. b: Math.round(this.b),
  2454. a: this.a
  2455. };
  2456. }, t.prototype.toRgbString = function() {
  2457. var e = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
  2458. return this.a === 1 ? "rgb(".concat(e, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(e, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
  2459. }, t.prototype.toPercentageRgb = function() {
  2460. var e = function(n) {
  2461. return "".concat(Math.round(Or(n, 255) * 100), "%");
  2462. };
  2463. return {
  2464. r: e(this.r),
  2465. g: e(this.g),
  2466. b: e(this.b),
  2467. a: this.a
  2468. };
  2469. }, t.prototype.toPercentageRgbString = function() {
  2470. var e = function(n) {
  2471. return Math.round(Or(n, 255) * 100);
  2472. };
  2473. 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, ")");
  2474. }, t.prototype.toName = function() {
  2475. if (this.a === 0)
  2476. return "transparent";
  2477. if (this.a < 1)
  2478. return !1;
  2479. for (var e = "#" + p2(this.r, this.g, this.b, !1), n = 0, r = Object.entries(v2); n < r.length; n++) {
  2480. var i = r[n], a = i[0], o = i[1];
  2481. if (e === o)
  2482. return a;
  2483. }
  2484. return !1;
  2485. }, t.prototype.toString = function(e) {
  2486. var n = !!e;
  2487. e = e ?? this.format;
  2488. var r = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (e.startsWith("hex") || e === "name");
  2489. 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());
  2490. }, t.prototype.toNumber = function() {
  2491. return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
  2492. }, t.prototype.clone = function() {
  2493. return new t(this.toString());
  2494. }, t.prototype.lighten = function(e) {
  2495. e === void 0 && (e = 10);
  2496. var n = this.toHsl();
  2497. return n.l += e / 100, n.l = my(n.l), new t(n);
  2498. }, t.prototype.brighten = function(e) {
  2499. e === void 0 && (e = 10);
  2500. var n = this.toRgb();
  2501. 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);
  2502. }, t.prototype.darken = function(e) {
  2503. e === void 0 && (e = 10);
  2504. var n = this.toHsl();
  2505. return n.l -= e / 100, n.l = my(n.l), new t(n);
  2506. }, t.prototype.tint = function(e) {
  2507. return e === void 0 && (e = 10), this.mix("white", e);
  2508. }, t.prototype.shade = function(e) {
  2509. return e === void 0 && (e = 10), this.mix("black", e);
  2510. }, t.prototype.desaturate = function(e) {
  2511. e === void 0 && (e = 10);
  2512. var n = this.toHsl();
  2513. return n.s -= e / 100, n.s = my(n.s), new t(n);
  2514. }, t.prototype.saturate = function(e) {
  2515. e === void 0 && (e = 10);
  2516. var n = this.toHsl();
  2517. return n.s += e / 100, n.s = my(n.s), new t(n);
  2518. }, t.prototype.greyscale = function() {
  2519. return this.desaturate(100);
  2520. }, t.prototype.spin = function(e) {
  2521. var n = this.toHsl(), r = (n.h + e) % 360;
  2522. return n.h = r < 0 ? 360 + r : r, new t(n);
  2523. }, t.prototype.mix = function(e, n) {
  2524. n === void 0 && (n = 50);
  2525. var r = this.toRgb(), i = new t(e).toRgb(), a = n / 100, o = {
  2526. r: (i.r - r.r) * a + r.r,
  2527. g: (i.g - r.g) * a + r.g,
  2528. b: (i.b - r.b) * a + r.b,
  2529. a: (i.a - r.a) * a + r.a
  2530. };
  2531. return new t(o);
  2532. }, t.prototype.analogous = function(e, n) {
  2533. e === void 0 && (e = 6), n === void 0 && (n = 30);
  2534. var r = this.toHsl(), i = 360 / n, a = [this];
  2535. for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e; )
  2536. r.h = (r.h + i) % 360, a.push(new t(r));
  2537. return a;
  2538. }, t.prototype.complement = function() {
  2539. var e = this.toHsl();
  2540. return e.h = (e.h + 180) % 360, new t(e);
  2541. }, t.prototype.monochromatic = function(e) {
  2542. e === void 0 && (e = 6);
  2543. for (var n = this.toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / e; e--; )
  2544. o.push(new t({ h: r, s: i, v: a })), a = (a + s) % 1;
  2545. return o;
  2546. }, t.prototype.splitcomplement = function() {
  2547. var e = this.toHsl(), n = e.h;
  2548. return [
  2549. this,
  2550. new t({ h: (n + 72) % 360, s: e.s, l: e.l }),
  2551. new t({ h: (n + 216) % 360, s: e.s, l: e.l })
  2552. ];
  2553. }, t.prototype.onBackground = function(e) {
  2554. var n = this.toRgb(), r = new t(e).toRgb(), i = n.a + r.a * (1 - n.a);
  2555. return new t({
  2556. r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
  2557. g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
  2558. b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
  2559. a: i
  2560. });
  2561. }, t.prototype.triad = function() {
  2562. return this.polyad(3);
  2563. }, t.prototype.tetrad = function() {
  2564. return this.polyad(4);
  2565. }, t.prototype.polyad = function(e) {
  2566. for (var n = this.toHsl(), r = n.h, i = [this], a = 360 / e, o = 1; o < e; o++)
  2567. i.push(new t({ h: (r + o * a) % 360, s: n.s, l: n.l }));
  2568. return i;
  2569. }, t.prototype.equals = function(e) {
  2570. return this.toRgbString() === new t(e).toRgbString();
  2571. }, t;
  2572. }()
  2573. ), by = 2, g8 = 0.16, Yce = 0.05, qce = 0.05, Kce = 0.15, Lj = 5, Nj = 4, Jce = [{
  2574. index: 7,
  2575. opacity: 0.15
  2576. }, {
  2577. index: 6,
  2578. opacity: 0.25
  2579. }, {
  2580. index: 5,
  2581. opacity: 0.3
  2582. }, {
  2583. index: 5,
  2584. opacity: 0.45
  2585. }, {
  2586. index: 5,
  2587. opacity: 0.65
  2588. }, {
  2589. index: 5,
  2590. opacity: 0.85
  2591. }, {
  2592. index: 4,
  2593. opacity: 0.9
  2594. }, {
  2595. index: 3,
  2596. opacity: 0.95
  2597. }, {
  2598. index: 2,
  2599. opacity: 0.97
  2600. }, {
  2601. index: 1,
  2602. opacity: 0.98
  2603. }];
  2604. function m8(t) {
  2605. var e = t.r, n = t.g, r = t.b, i = h2(e, n, r);
  2606. return {
  2607. h: i.h * 360,
  2608. s: i.s,
  2609. v: i.v
  2610. };
  2611. }
  2612. function _y(t) {
  2613. var e = t.r, n = t.g, r = t.b;
  2614. return "#".concat(p2(e, n, r, !1));
  2615. }
  2616. function efe(t, e, n) {
  2617. var r = n / 100, i = {
  2618. r: (e.r - t.r) * r + t.r,
  2619. g: (e.g - t.g) * r + t.g,
  2620. b: (e.b - t.b) * r + t.b
  2621. };
  2622. return i;
  2623. }
  2624. function y8(t, e, n) {
  2625. var r;
  2626. return Math.round(t.h) >= 60 && Math.round(t.h) <= 240 ? r = n ? Math.round(t.h) - by * e : Math.round(t.h) + by * e : r = n ? Math.round(t.h) + by * e : Math.round(t.h) - by * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
  2627. }
  2628. function b8(t, e, n) {
  2629. if (t.h === 0 && t.s === 0)
  2630. return t.s;
  2631. var r;
  2632. return n ? r = t.s - g8 * e : e === Nj ? r = t.s + g8 : r = t.s + Yce * e, r > 1 && (r = 1), n && e === Lj && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Number(r.toFixed(2));
  2633. }
  2634. function _8(t, e, n) {
  2635. var r;
  2636. return n ? r = t.v + qce * e : r = t.v - Kce * e, r > 1 && (r = 1), Number(r.toFixed(2));
  2637. }
  2638. function ff(t) {
  2639. for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], r = Cd(t), i = Lj; i > 0; i -= 1) {
  2640. var a = m8(r), o = _y(Cd({
  2641. h: y8(a, i, !0),
  2642. s: b8(a, i, !0),
  2643. v: _8(a, i, !0)
  2644. }));
  2645. n.push(o);
  2646. }
  2647. n.push(_y(r));
  2648. for (var s = 1; s <= Nj; s += 1) {
  2649. var l = m8(r), u = _y(Cd({
  2650. h: y8(l, s),
  2651. s: b8(l, s),
  2652. v: _8(l, s)
  2653. }));
  2654. n.push(u);
  2655. }
  2656. return e.theme === "dark" ? Jce.map(function(c) {
  2657. var f = c.index, d = c.opacity, h = _y(efe(Cd(e.backgroundColor || "#141414"), Cd(n[f]), d * 100));
  2658. return h;
  2659. }) : n;
  2660. }
  2661. var rC = {
  2662. red: "#F5222D",
  2663. volcano: "#FA541C",
  2664. orange: "#FA8C16",
  2665. gold: "#FAAD14",
  2666. yellow: "#FADB14",
  2667. lime: "#A0D911",
  2668. green: "#52C41A",
  2669. cyan: "#13C2C2",
  2670. blue: "#1890FF",
  2671. geekblue: "#2F54EB",
  2672. purple: "#722ED1",
  2673. magenta: "#EB2F96",
  2674. grey: "#666666"
  2675. }, O_ = {}, iC = {};
  2676. Object.keys(rC).forEach(function(t) {
  2677. O_[t] = ff(rC[t]), O_[t].primary = O_[t][5], iC[t] = ff(rC[t], {
  2678. theme: "dark",
  2679. backgroundColor: "#141414"
  2680. }), iC[t].primary = iC[t][5];
  2681. });
  2682. var tfe = O_.blue;
  2683. const nfe = (t) => {
  2684. const {
  2685. controlHeight: e
  2686. } = t;
  2687. return {
  2688. controlHeightSM: e * 0.75,
  2689. controlHeightXS: e * 0.5,
  2690. controlHeightLG: e * 1.25
  2691. };
  2692. };
  2693. function rfe(t) {
  2694. const {
  2695. sizeUnit: e,
  2696. sizeStep: n
  2697. } = t;
  2698. return {
  2699. sizeXXL: e * (n + 8),
  2700. sizeXL: e * (n + 4),
  2701. sizeLG: e * (n + 2),
  2702. sizeMD: e * (n + 1),
  2703. sizeMS: e * n,
  2704. size: e * n,
  2705. sizeSM: e * (n - 1),
  2706. sizeXS: e * (n - 2),
  2707. sizeXXS: e * (n - 3)
  2708. // 4
  2709. };
  2710. }
  2711. const Bj = {
  2712. blue: "#1677ff",
  2713. purple: "#722ED1",
  2714. cyan: "#13C2C2",
  2715. green: "#52C41A",
  2716. magenta: "#EB2F96",
  2717. pink: "#eb2f96",
  2718. red: "#F5222D",
  2719. orange: "#FA8C16",
  2720. yellow: "#FADB14",
  2721. volcano: "#FA541C",
  2722. geekblue: "#2F54EB",
  2723. gold: "#FAAD14",
  2724. lime: "#A0D911"
  2725. }, zS = I(I({}, Bj), {
  2726. // Color
  2727. colorPrimary: "#1677ff",
  2728. colorSuccess: "#52c41a",
  2729. colorWarning: "#faad14",
  2730. colorError: "#ff4d4f",
  2731. colorInfo: "#1677ff",
  2732. colorTextBase: "",
  2733. colorBgBase: "",
  2734. // Font
  2735. fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
  2736. 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
  2737. 'Noto Color Emoji'`,
  2738. fontSize: 14,
  2739. // Line
  2740. lineWidth: 1,
  2741. lineType: "solid",
  2742. // Motion
  2743. motionUnit: 0.1,
  2744. motionBase: 0,
  2745. motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  2746. motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  2747. motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  2748. motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  2749. motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  2750. motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  2751. motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  2752. motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  2753. // Radius
  2754. borderRadius: 6,
  2755. // Size
  2756. sizeUnit: 4,
  2757. sizeStep: 4,
  2758. sizePopupArrow: 16,
  2759. // Control Base
  2760. controlHeight: 32,
  2761. // zIndex
  2762. zIndexBase: 0,
  2763. zIndexPopupBase: 1e3,
  2764. // Image
  2765. opacityImage: 1,
  2766. // Wireframe
  2767. wireframe: !1
  2768. });
  2769. function ife(t, e) {
  2770. let {
  2771. generateColorPalettes: n,
  2772. generateNeutralColorPalettes: r
  2773. } = e;
  2774. const {
  2775. colorSuccess: i,
  2776. colorWarning: a,
  2777. colorError: o,
  2778. colorInfo: s,
  2779. colorPrimary: l,
  2780. colorBgBase: u,
  2781. colorTextBase: c
  2782. } = t, f = n(l), d = n(i), h = n(a), p = n(o), v = n(s), g = r(u, c);
  2783. return I(I({}, g), {
  2784. colorPrimaryBg: f[1],
  2785. colorPrimaryBgHover: f[2],
  2786. colorPrimaryBorder: f[3],
  2787. colorPrimaryBorderHover: f[4],
  2788. colorPrimaryHover: f[5],
  2789. colorPrimary: f[6],
  2790. colorPrimaryActive: f[7],
  2791. colorPrimaryTextHover: f[8],
  2792. colorPrimaryText: f[9],
  2793. colorPrimaryTextActive: f[10],
  2794. colorSuccessBg: d[1],
  2795. colorSuccessBgHover: d[2],
  2796. colorSuccessBorder: d[3],
  2797. colorSuccessBorderHover: d[4],
  2798. colorSuccessHover: d[4],
  2799. colorSuccess: d[6],
  2800. colorSuccessActive: d[7],
  2801. colorSuccessTextHover: d[8],
  2802. colorSuccessText: d[9],
  2803. colorSuccessTextActive: d[10],
  2804. colorErrorBg: p[1],
  2805. colorErrorBgHover: p[2],
  2806. colorErrorBorder: p[3],
  2807. colorErrorBorderHover: p[4],
  2808. colorErrorHover: p[5],
  2809. colorError: p[6],
  2810. colorErrorActive: p[7],
  2811. colorErrorTextHover: p[8],
  2812. colorErrorText: p[9],
  2813. colorErrorTextActive: p[10],
  2814. colorWarningBg: h[1],
  2815. colorWarningBgHover: h[2],
  2816. colorWarningBorder: h[3],
  2817. colorWarningBorderHover: h[4],
  2818. colorWarningHover: h[4],
  2819. colorWarning: h[6],
  2820. colorWarningActive: h[7],
  2821. colorWarningTextHover: h[8],
  2822. colorWarningText: h[9],
  2823. colorWarningTextActive: h[10],
  2824. colorInfoBg: v[1],
  2825. colorInfoBgHover: v[2],
  2826. colorInfoBorder: v[3],
  2827. colorInfoBorderHover: v[4],
  2828. colorInfoHover: v[4],
  2829. colorInfo: v[6],
  2830. colorInfoActive: v[7],
  2831. colorInfoTextHover: v[8],
  2832. colorInfoText: v[9],
  2833. colorInfoTextActive: v[10],
  2834. colorBgMask: new en("#000").setAlpha(0.45).toRgbString(),
  2835. colorWhite: "#fff"
  2836. });
  2837. }
  2838. const afe = (t) => {
  2839. let e = t, n = t, r = t, i = t;
  2840. 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), {
  2841. borderRadius: t > 16 ? 16 : t,
  2842. borderRadiusXS: r,
  2843. borderRadiusSM: n,
  2844. borderRadiusLG: e,
  2845. borderRadiusOuter: i
  2846. };
  2847. };
  2848. function ofe(t) {
  2849. const {
  2850. motionUnit: e,
  2851. motionBase: n,
  2852. borderRadius: r,
  2853. lineWidth: i
  2854. } = t;
  2855. return I({
  2856. // motion
  2857. motionDurationFast: `${(n + e).toFixed(1)}s`,
  2858. motionDurationMid: `${(n + e * 2).toFixed(1)}s`,
  2859. motionDurationSlow: `${(n + e * 3).toFixed(1)}s`,
  2860. // line
  2861. lineWidthBold: i + 1
  2862. }, afe(r));
  2863. }
  2864. const vs = (t, e) => new en(t).setAlpha(e).toRgbString(), Qp = (t, e) => new en(t).darken(e).toHexString(), sfe = (t) => {
  2865. const e = ff(t);
  2866. return {
  2867. 1: e[0],
  2868. 2: e[1],
  2869. 3: e[2],
  2870. 4: e[3],
  2871. 5: e[4],
  2872. 6: e[5],
  2873. 7: e[6],
  2874. 8: e[4],
  2875. 9: e[5],
  2876. 10: e[6]
  2877. // 8: colors[7],
  2878. // 9: colors[8],
  2879. // 10: colors[9],
  2880. };
  2881. }, lfe = (t, e) => {
  2882. const n = t || "#fff", r = e || "#000";
  2883. return {
  2884. colorBgBase: n,
  2885. colorTextBase: r,
  2886. colorText: vs(r, 0.88),
  2887. colorTextSecondary: vs(r, 0.65),
  2888. colorTextTertiary: vs(r, 0.45),
  2889. colorTextQuaternary: vs(r, 0.25),
  2890. colorFill: vs(r, 0.15),
  2891. colorFillSecondary: vs(r, 0.06),
  2892. colorFillTertiary: vs(r, 0.04),
  2893. colorFillQuaternary: vs(r, 0.02),
  2894. colorBgLayout: Qp(n, 4),
  2895. colorBgContainer: Qp(n, 0),
  2896. colorBgElevated: Qp(n, 0),
  2897. colorBgSpotlight: vs(r, 0.85),
  2898. colorBorder: Qp(n, 15),
  2899. colorBorderSecondary: Qp(n, 6)
  2900. };
  2901. };
  2902. function ufe(t) {
  2903. const e = new Array(10).fill(null).map((n, r) => {
  2904. const i = r - 1, a = t * Math.pow(2.71828, i / 5), o = r > 1 ? Math.floor(a) : Math.ceil(a);
  2905. return Math.floor(o / 2) * 2;
  2906. });
  2907. return e[1] = t, e.map((n) => {
  2908. const r = n + 8;
  2909. return {
  2910. size: n,
  2911. lineHeight: r / n
  2912. };
  2913. });
  2914. }
  2915. const cfe = (t) => {
  2916. const e = ufe(t), n = e.map((i) => i.size), r = e.map((i) => i.lineHeight);
  2917. return {
  2918. fontSizeSM: n[0],
  2919. fontSize: n[1],
  2920. fontSizeLG: n[2],
  2921. fontSizeXL: n[3],
  2922. fontSizeHeading1: n[6],
  2923. fontSizeHeading2: n[5],
  2924. fontSizeHeading3: n[4],
  2925. fontSizeHeading4: n[3],
  2926. fontSizeHeading5: n[2],
  2927. lineHeight: r[1],
  2928. lineHeightLG: r[2],
  2929. lineHeightSM: r[0],
  2930. lineHeightHeading1: r[6],
  2931. lineHeightHeading2: r[5],
  2932. lineHeightHeading3: r[4],
  2933. lineHeightHeading4: r[3],
  2934. lineHeightHeading5: r[2]
  2935. };
  2936. };
  2937. function ffe(t) {
  2938. const e = Object.keys(Bj).map((n) => {
  2939. const r = ff(t[n]);
  2940. return new Array(10).fill(1).reduce((i, a, o) => (i[`${n}-${o + 1}`] = r[o], i), {});
  2941. }).reduce((n, r) => (n = I(I({}, n), r), n), {});
  2942. return I(I(I(I(I(I(I({}, t), e), ife(t, {
  2943. generateColorPalettes: sfe,
  2944. generateNeutralColorPalettes: lfe
  2945. })), cfe(t.fontSize)), rfe(t)), nfe(t)), ofe(t));
  2946. }
  2947. function aC(t) {
  2948. return t >= 0 && t <= 255;
  2949. }
  2950. function Oy(t, e) {
  2951. const {
  2952. r: n,
  2953. g: r,
  2954. b: i,
  2955. a
  2956. } = new en(t).toRgb();
  2957. if (a < 1)
  2958. return t;
  2959. const {
  2960. r: o,
  2961. g: s,
  2962. b: l
  2963. } = new en(e).toRgb();
  2964. for (let u = 0.01; u <= 1; u += 0.01) {
  2965. 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);
  2966. if (aC(c) && aC(f) && aC(d))
  2967. return new en({
  2968. r: c,
  2969. g: f,
  2970. b: d,
  2971. a: Math.round(u * 100) / 100
  2972. }).toRgbString();
  2973. }
  2974. return new en({
  2975. r: n,
  2976. g: r,
  2977. b: i,
  2978. a: 1
  2979. }).toRgbString();
  2980. }
  2981. var dfe = function(t, e) {
  2982. var n = {};
  2983. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  2984. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  2985. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  2986. return n;
  2987. };
  2988. function hfe(t) {
  2989. const {
  2990. override: e
  2991. } = t, n = dfe(t, ["override"]), r = I({}, e);
  2992. Object.keys(zS).forEach((h) => {
  2993. delete r[h];
  2994. });
  2995. const i = I(I({}, n), r), a = 480, o = 576, s = 768, l = 992, u = 1200, c = 1600, f = 2e3;
  2996. return I(I(I({}, i), {
  2997. colorLink: i.colorInfoText,
  2998. colorLinkHover: i.colorInfoHover,
  2999. colorLinkActive: i.colorInfoActive,
  3000. // ============== Background ============== //
  3001. colorFillContent: i.colorFillSecondary,
  3002. colorFillContentHover: i.colorFill,
  3003. colorFillAlter: i.colorFillQuaternary,
  3004. colorBgContainerDisabled: i.colorFillTertiary,
  3005. // ============== Split ============== //
  3006. colorBorderBg: i.colorBgContainer,
  3007. colorSplit: Oy(i.colorBorderSecondary, i.colorBgContainer),
  3008. // ============== Text ============== //
  3009. colorTextPlaceholder: i.colorTextQuaternary,
  3010. colorTextDisabled: i.colorTextQuaternary,
  3011. colorTextHeading: i.colorText,
  3012. colorTextLabel: i.colorTextSecondary,
  3013. colorTextDescription: i.colorTextTertiary,
  3014. colorTextLightSolid: i.colorWhite,
  3015. colorHighlight: i.colorError,
  3016. colorBgTextHover: i.colorFillSecondary,
  3017. colorBgTextActive: i.colorFill,
  3018. colorIcon: i.colorTextTertiary,
  3019. colorIconHover: i.colorText,
  3020. colorErrorOutline: Oy(i.colorErrorBg, i.colorBgContainer),
  3021. colorWarningOutline: Oy(i.colorWarningBg, i.colorBgContainer),
  3022. // Font
  3023. fontSizeIcon: i.fontSizeSM,
  3024. // Control
  3025. lineWidth: i.lineWidth,
  3026. controlOutlineWidth: i.lineWidth * 2,
  3027. // Checkbox size and expand icon size
  3028. controlInteractiveSize: i.controlHeight / 2,
  3029. controlItemBgHover: i.colorFillTertiary,
  3030. controlItemBgActive: i.colorPrimaryBg,
  3031. controlItemBgActiveHover: i.colorPrimaryBgHover,
  3032. controlItemBgActiveDisabled: i.colorFill,
  3033. controlTmpOutline: i.colorFillQuaternary,
  3034. controlOutline: Oy(i.colorPrimaryBg, i.colorBgContainer),
  3035. lineType: i.lineType,
  3036. borderRadius: i.borderRadius,
  3037. borderRadiusXS: i.borderRadiusXS,
  3038. borderRadiusSM: i.borderRadiusSM,
  3039. borderRadiusLG: i.borderRadiusLG,
  3040. fontWeightStrong: 600,
  3041. opacityLoading: 0.65,
  3042. linkDecoration: "none",
  3043. linkHoverDecoration: "none",
  3044. linkFocusDecoration: "none",
  3045. controlPaddingHorizontal: 12,
  3046. controlPaddingHorizontalSM: 8,
  3047. paddingXXS: i.sizeXXS,
  3048. paddingXS: i.sizeXS,
  3049. paddingSM: i.sizeSM,
  3050. padding: i.size,
  3051. paddingMD: i.sizeMD,
  3052. paddingLG: i.sizeLG,
  3053. paddingXL: i.sizeXL,
  3054. paddingContentHorizontalLG: i.sizeLG,
  3055. paddingContentVerticalLG: i.sizeMS,
  3056. paddingContentHorizontal: i.sizeMS,
  3057. paddingContentVertical: i.sizeSM,
  3058. paddingContentHorizontalSM: i.size,
  3059. paddingContentVerticalSM: i.sizeXS,
  3060. marginXXS: i.sizeXXS,
  3061. marginXS: i.sizeXS,
  3062. marginSM: i.sizeSM,
  3063. margin: i.size,
  3064. marginMD: i.sizeMD,
  3065. marginLG: i.sizeLG,
  3066. marginXL: i.sizeXL,
  3067. marginXXL: i.sizeXXL,
  3068. boxShadow: `
  3069. 0 1px 2px 0 rgba(0, 0, 0, 0.03),
  3070. 0 1px 6px -1px rgba(0, 0, 0, 0.02),
  3071. 0 2px 4px 0 rgba(0, 0, 0, 0.02)
  3072. `,
  3073. boxShadowSecondary: `
  3074. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  3075. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  3076. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  3077. `,
  3078. boxShadowTertiary: `
  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. screenXS: a,
  3084. screenXSMin: a,
  3085. screenXSMax: o - 1,
  3086. screenSM: o,
  3087. screenSMMin: o,
  3088. screenSMMax: s - 1,
  3089. screenMD: s,
  3090. screenMDMin: s,
  3091. screenMDMax: l - 1,
  3092. screenLG: l,
  3093. screenLGMin: l,
  3094. screenLGMax: u - 1,
  3095. screenXL: u,
  3096. screenXLMin: u,
  3097. screenXLMax: c - 1,
  3098. screenXXL: c,
  3099. screenXXLMin: c,
  3100. screenXXLMax: f - 1,
  3101. screenXXXL: f,
  3102. screenXXXLMin: f,
  3103. // FIXME: component box-shadow, should be removed
  3104. boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
  3105. boxShadowCard: `
  3106. 0 1px 2px -2px ${new en("rgba(0, 0, 0, 0.16)").toRgbString()},
  3107. 0 3px 6px 0 ${new en("rgba(0, 0, 0, 0.12)").toRgbString()},
  3108. 0 5px 12px 4px ${new en("rgba(0, 0, 0, 0.09)").toRgbString()}
  3109. `,
  3110. boxShadowDrawerRight: `
  3111. -6px 0 16px 0 rgba(0, 0, 0, 0.08),
  3112. -3px 0 6px -4px rgba(0, 0, 0, 0.12),
  3113. -9px 0 28px 8px rgba(0, 0, 0, 0.05)
  3114. `,
  3115. boxShadowDrawerLeft: `
  3116. 6px 0 16px 0 rgba(0, 0, 0, 0.08),
  3117. 3px 0 6px -4px rgba(0, 0, 0, 0.12),
  3118. 9px 0 28px 8px rgba(0, 0, 0, 0.05)
  3119. `,
  3120. boxShadowDrawerUp: `
  3121. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  3122. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  3123. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  3124. `,
  3125. boxShadowDrawerDown: `
  3126. 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
  3127. 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
  3128. 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
  3129. `,
  3130. boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
  3131. boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
  3132. boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
  3133. boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  3134. }), r);
  3135. }
  3136. const pfe = (t, e, n, r, i) => {
  3137. 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);
  3138. return {
  3139. pointerEvents: "none",
  3140. width: t,
  3141. height: t,
  3142. overflow: "hidden",
  3143. "&::after": {
  3144. content: '""',
  3145. position: "absolute",
  3146. width: y,
  3147. height: y,
  3148. bottom: 0,
  3149. insetInline: 0,
  3150. margin: "auto",
  3151. borderRadius: {
  3152. _skip_check_: !0,
  3153. value: `0 0 ${e}px 0`
  3154. },
  3155. transform: "translateY(50%) rotate(-135deg)",
  3156. boxShadow: i,
  3157. zIndex: 0,
  3158. background: "transparent"
  3159. },
  3160. "&::before": {
  3161. position: "absolute",
  3162. bottom: 0,
  3163. insetInlineStart: 0,
  3164. width: t,
  3165. height: t / 2,
  3166. background: r,
  3167. clipPath: {
  3168. _multi_value_: !0,
  3169. 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')`]
  3170. },
  3171. content: '""'
  3172. }
  3173. };
  3174. };
  3175. function vfe(t, e) {
  3176. return b1.reduce((n, r) => {
  3177. const i = t[`${r}-1`], a = t[`${r}-3`], o = t[`${r}-6`], s = t[`${r}-7`];
  3178. return I(I({}, n), e(r, {
  3179. lightColor: i,
  3180. lightBorderColor: a,
  3181. darkColor: o,
  3182. textColor: s
  3183. }));
  3184. }, {});
  3185. }
  3186. const mh = {
  3187. overflow: "hidden",
  3188. whiteSpace: "nowrap",
  3189. textOverflow: "ellipsis"
  3190. }, nn = (t) => ({
  3191. boxSizing: "border-box",
  3192. margin: 0,
  3193. padding: 0,
  3194. color: t.colorText,
  3195. fontSize: t.fontSize,
  3196. // font-variant: @font-variant-base;
  3197. lineHeight: t.lineHeight,
  3198. listStyle: "none",
  3199. // font-feature-settings: @font-feature-settings-base;
  3200. fontFamily: t.fontFamily
  3201. }), ip = () => ({
  3202. display: "inline-flex",
  3203. alignItems: "center",
  3204. color: "inherit",
  3205. fontStyle: "normal",
  3206. lineHeight: 0,
  3207. textAlign: "center",
  3208. textTransform: "none",
  3209. // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  3210. verticalAlign: "-0.125em",
  3211. textRendering: "optimizeLegibility",
  3212. "-webkit-font-smoothing": "antialiased",
  3213. "-moz-osx-font-smoothing": "grayscale",
  3214. "> *": {
  3215. lineHeight: 1
  3216. },
  3217. svg: {
  3218. display: "inline-block"
  3219. }
  3220. }), _1 = () => ({
  3221. // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  3222. "&::before": {
  3223. display: "table",
  3224. content: '""'
  3225. },
  3226. "&::after": {
  3227. // https://github.com/ant-design/ant-design/issues/21864
  3228. display: "table",
  3229. clear: "both",
  3230. content: '""'
  3231. }
  3232. }), gfe = (t) => ({
  3233. a: {
  3234. color: t.colorLink,
  3235. textDecoration: t.linkDecoration,
  3236. backgroundColor: "transparent",
  3237. outline: "none",
  3238. cursor: "pointer",
  3239. transition: `color ${t.motionDurationSlow}`,
  3240. "-webkit-text-decoration-skip": "objects",
  3241. "&:hover": {
  3242. color: t.colorLinkHover
  3243. },
  3244. "&:active": {
  3245. color: t.colorLinkActive
  3246. },
  3247. "&:active,\n &:hover": {
  3248. textDecoration: t.linkHoverDecoration,
  3249. outline: 0
  3250. },
  3251. // https://github.com/ant-design/ant-design/issues/22503
  3252. "&:focus": {
  3253. textDecoration: t.linkFocusDecoration,
  3254. outline: 0
  3255. },
  3256. "&[disabled]": {
  3257. color: t.colorTextDisabled,
  3258. cursor: "not-allowed"
  3259. }
  3260. }
  3261. }), mfe = (t, e) => {
  3262. const {
  3263. fontFamily: n,
  3264. fontSize: r
  3265. } = t, i = `[class^="${e}"], [class*=" ${e}"]`;
  3266. return {
  3267. [i]: {
  3268. fontFamily: n,
  3269. fontSize: r,
  3270. boxSizing: "border-box",
  3271. "&::before, &::after": {
  3272. boxSizing: "border-box"
  3273. },
  3274. [i]: {
  3275. boxSizing: "border-box",
  3276. "&::before, &::after": {
  3277. boxSizing: "border-box"
  3278. }
  3279. }
  3280. }
  3281. };
  3282. }, d0 = (t) => ({
  3283. outline: `${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,
  3284. outlineOffset: 1,
  3285. transition: "outline-offset 0s, outline 0s"
  3286. }), VS = (t) => ({
  3287. "&:focus-visible": I({}, d0(t))
  3288. });
  3289. function Sn(t, e, n) {
  3290. return (r) => {
  3291. const i = L(() => r == null ? void 0 : r.value), [a, o, s] = ap(), {
  3292. getPrefixCls: l,
  3293. iconPrefixCls: u
  3294. } = DS(), c = L(() => l()), f = L(() => ({
  3295. theme: a.value,
  3296. token: o.value,
  3297. hashId: s.value,
  3298. path: ["Shared", c.value]
  3299. }));
  3300. d2(f, () => [{
  3301. // Link
  3302. "&": gfe(o.value)
  3303. }]);
  3304. const d = L(() => ({
  3305. theme: a.value,
  3306. token: o.value,
  3307. hashId: s.value,
  3308. path: [t, i.value, u.value]
  3309. }));
  3310. return [d2(d, () => {
  3311. const {
  3312. token: h,
  3313. flush: p
  3314. } = bfe(o.value), v = typeof n == "function" ? n(h) : n, g = I(I({}, v), o.value[t]), m = `.${i.value}`, y = Bt(h, {
  3315. componentCls: m,
  3316. prefixCls: i.value,
  3317. iconCls: `.${u.value}`,
  3318. antCls: `.${c.value}`
  3319. }, g), b = e(y, {
  3320. hashId: s.value,
  3321. prefixCls: i.value,
  3322. rootPrefixCls: c.value,
  3323. iconPrefixCls: u.value,
  3324. overrideComponentToken: o.value[t]
  3325. });
  3326. return p(t, g), [mfe(o.value, i.value), b];
  3327. }), s];
  3328. };
  3329. }
  3330. const zj = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
  3331. let g2 = !0;
  3332. function Bt() {
  3333. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  3334. e[n] = arguments[n];
  3335. if (!zj)
  3336. return I({}, ...e);
  3337. g2 = !1;
  3338. const r = {};
  3339. return e.forEach((i) => {
  3340. Object.keys(i).forEach((o) => {
  3341. Object.defineProperty(r, o, {
  3342. configurable: !0,
  3343. enumerable: !0,
  3344. get: () => i[o]
  3345. });
  3346. });
  3347. }), g2 = !0, r;
  3348. }
  3349. function yfe() {
  3350. }
  3351. function bfe(t) {
  3352. let e, n = t, r = yfe;
  3353. return zj && (e = /* @__PURE__ */ new Set(), n = new Proxy(t, {
  3354. get(i, a) {
  3355. return g2 && e.add(a), i[a];
  3356. }
  3357. }), r = (i, a) => {
  3358. Array.from(e);
  3359. }), {
  3360. token: n,
  3361. keys: e,
  3362. flush: r
  3363. };
  3364. }
  3365. const _fe = xj(ffe), Vj = {
  3366. token: zS,
  3367. hashed: !0
  3368. }, Fj = Symbol("DesignTokenContext"), m2 = ae(), Ofe = (t) => {
  3369. pt(Fj, t), se(t, () => {
  3370. m2.value = B(t), zle(m2);
  3371. }, {
  3372. immediate: !0,
  3373. deep: !0
  3374. });
  3375. }, Sfe = te({
  3376. props: {
  3377. value: $t()
  3378. },
  3379. setup(t, e) {
  3380. let {
  3381. slots: n
  3382. } = e;
  3383. return Ofe(L(() => t.value)), () => {
  3384. var r;
  3385. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  3386. };
  3387. }
  3388. });
  3389. function ap() {
  3390. const t = Ge(Fj, L(() => m2.value || Vj)), e = L(() => `${Bce}-${t.value.hashed || ""}`), n = L(() => t.value.theme || _fe), r = fce(n, L(() => [zS, t.value.token]), L(() => ({
  3391. salt: e.value,
  3392. override: I({
  3393. override: t.value.token
  3394. }, t.value.components),
  3395. formatToken: hfe
  3396. })));
  3397. return [n, L(() => r.value[0]), L(() => t.value.hashed ? r.value[1] : "")];
  3398. }
  3399. const Wj = te({
  3400. compatConfig: {
  3401. MODE: 3
  3402. },
  3403. setup() {
  3404. const [, t] = ap(), e = L(() => new en(t.value.colorBgBase).toHsl().l < 0.5 ? {
  3405. opacity: 0.65
  3406. } : {});
  3407. return () => M("svg", {
  3408. style: e.value,
  3409. width: "184",
  3410. height: "152",
  3411. viewBox: "0 0 184 152",
  3412. xmlns: "http://www.w3.org/2000/svg"
  3413. }, [M("g", {
  3414. fill: "none",
  3415. "fill-rule": "evenodd"
  3416. }, [M("g", {
  3417. transform: "translate(24 31.67)"
  3418. }, [M("ellipse", {
  3419. "fill-opacity": ".8",
  3420. fill: "#F5F5F7",
  3421. cx: "67.797",
  3422. cy: "106.89",
  3423. rx: "67.797",
  3424. ry: "12.668"
  3425. }, null), M("path", {
  3426. 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",
  3427. fill: "#AEB8C2"
  3428. }, null), M("path", {
  3429. 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",
  3430. fill: "url(#linearGradient-1)",
  3431. transform: "translate(13.56)"
  3432. }, null), M("path", {
  3433. 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",
  3434. fill: "#F5F5F7"
  3435. }, null), M("path", {
  3436. 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",
  3437. fill: "#DCE0E6"
  3438. }, null)]), M("path", {
  3439. 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",
  3440. fill: "#DCE0E6"
  3441. }, null), M("g", {
  3442. transform: "translate(149.65 15.383)",
  3443. fill: "#FFF"
  3444. }, [M("ellipse", {
  3445. cx: "20.654",
  3446. cy: "3.167",
  3447. rx: "2.849",
  3448. ry: "2.815"
  3449. }, null), M("path", {
  3450. d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
  3451. }, null)])])]);
  3452. }
  3453. });
  3454. Wj.PRESENTED_IMAGE_DEFAULT = !0;
  3455. const Qj = te({
  3456. compatConfig: {
  3457. MODE: 3
  3458. },
  3459. setup() {
  3460. const [, t] = ap(), e = L(() => {
  3461. const {
  3462. colorFill: n,
  3463. colorFillTertiary: r,
  3464. colorFillQuaternary: i,
  3465. colorBgContainer: a
  3466. } = t.value;
  3467. return {
  3468. borderColor: new en(n).onBackground(a).toHexString(),
  3469. shadowColor: new en(r).onBackground(a).toHexString(),
  3470. contentColor: new en(i).onBackground(a).toHexString()
  3471. };
  3472. });
  3473. return () => M("svg", {
  3474. width: "64",
  3475. height: "41",
  3476. viewBox: "0 0 64 41",
  3477. xmlns: "http://www.w3.org/2000/svg"
  3478. }, [M("g", {
  3479. transform: "translate(0 1)",
  3480. fill: "none",
  3481. "fill-rule": "evenodd"
  3482. }, [M("ellipse", {
  3483. fill: e.value.shadowColor,
  3484. cx: "32",
  3485. cy: "33",
  3486. rx: "32",
  3487. ry: "7"
  3488. }, null), M("g", {
  3489. "fill-rule": "nonzero",
  3490. stroke: e.value.borderColor
  3491. }, [M("path", {
  3492. 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"
  3493. }, null), M("path", {
  3494. 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",
  3495. fill: e.value.contentColor
  3496. }, null)])])]);
  3497. }
  3498. });
  3499. Qj.PRESENTED_IMAGE_SIMPLE = !0;
  3500. const xfe = (t) => {
  3501. const {
  3502. componentCls: e,
  3503. margin: n,
  3504. marginXS: r,
  3505. marginXL: i,
  3506. fontSize: a,
  3507. lineHeight: o
  3508. } = t;
  3509. return {
  3510. [e]: {
  3511. marginInline: r,
  3512. fontSize: a,
  3513. lineHeight: o,
  3514. textAlign: "center",
  3515. // 原来 &-image 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
  3516. [`${e}-image`]: {
  3517. height: t.emptyImgHeight,
  3518. marginBottom: r,
  3519. opacity: t.opacityImage,
  3520. img: {
  3521. height: "100%"
  3522. },
  3523. svg: {
  3524. height: "100%",
  3525. margin: "auto"
  3526. }
  3527. },
  3528. // 原来 &-footer 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
  3529. [`${e}-footer`]: {
  3530. marginTop: n
  3531. },
  3532. "&-normal": {
  3533. marginBlock: i,
  3534. color: t.colorTextDisabled,
  3535. [`${e}-image`]: {
  3536. height: t.emptyImgHeightMD
  3537. }
  3538. },
  3539. "&-small": {
  3540. marginBlock: r,
  3541. color: t.colorTextDisabled,
  3542. [`${e}-image`]: {
  3543. height: t.emptyImgHeightSM
  3544. }
  3545. }
  3546. }
  3547. };
  3548. }, wfe = Sn("Empty", (t) => {
  3549. const {
  3550. componentCls: e,
  3551. controlHeightLG: n
  3552. } = t, r = Bt(t, {
  3553. emptyImgCls: `${e}-img`,
  3554. emptyImgHeight: n * 2.5,
  3555. emptyImgHeightMD: n,
  3556. emptyImgHeightSM: n * 0.875
  3557. });
  3558. return [xfe(r)];
  3559. });
  3560. var Cfe = function(t, e) {
  3561. var n = {};
  3562. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  3563. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  3564. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  3565. return n;
  3566. };
  3567. const Hj = M(Wj, null, null), Gj = M(Qj, null, null), Tfe = () => ({
  3568. prefixCls: String,
  3569. imageStyle: $t(),
  3570. image: fa(),
  3571. description: fa()
  3572. }), uI = te({
  3573. name: "AEmpty",
  3574. compatConfig: {
  3575. MODE: 3
  3576. },
  3577. inheritAttrs: !1,
  3578. props: Tfe(),
  3579. setup(t, e) {
  3580. let {
  3581. slots: n = {},
  3582. attrs: r
  3583. } = e;
  3584. const {
  3585. direction: i,
  3586. prefixCls: a
  3587. } = It("empty", t), [o, s] = wfe(a);
  3588. return () => {
  3589. var l, u;
  3590. const c = a.value, f = I(I({}, t), r), {
  3591. image: d = ((l = n.image) === null || l === void 0 ? void 0 : l.call(n)) || Hj,
  3592. description: h = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
  3593. imageStyle: p,
  3594. class: v = ""
  3595. } = f, g = Cfe(f, ["image", "description", "imageStyle", "class"]);
  3596. return o(M(dj, {
  3597. componentName: "Empty",
  3598. children: (m) => {
  3599. const y = typeof h < "u" ? h : m.description, b = typeof y == "string" ? y : "empty";
  3600. let _ = null;
  3601. return typeof d == "string" ? _ = M("img", {
  3602. alt: b,
  3603. src: d
  3604. }, null) : _ = d, M("div", j({
  3605. class: ye(c, v, s.value, {
  3606. [`${c}-normal`]: d === Gj,
  3607. [`${c}-rtl`]: i.value === "rtl"
  3608. })
  3609. }, g), [M("div", {
  3610. class: `${c}-image`,
  3611. style: p
  3612. }, [_]), y && M("p", {
  3613. class: `${c}-description`
  3614. }, [y]), n.default && M("div", {
  3615. class: `${c}-footer`
  3616. }, [os(n.default())])]);
  3617. }
  3618. }, null));
  3619. };
  3620. }
  3621. });
  3622. uI.PRESENTED_IMAGE_DEFAULT = Hj;
  3623. uI.PRESENTED_IMAGE_SIMPLE = Gj;
  3624. const Hp = np(uI), cI = (t) => {
  3625. const {
  3626. prefixCls: e
  3627. } = It("empty", t);
  3628. return ((r) => {
  3629. switch (r) {
  3630. case "Table":
  3631. case "List":
  3632. return M(Hp, {
  3633. image: Hp.PRESENTED_IMAGE_SIMPLE
  3634. }, null);
  3635. case "Select":
  3636. case "TreeSelect":
  3637. case "Cascader":
  3638. case "Transfer":
  3639. case "Mentions":
  3640. return M(Hp, {
  3641. image: Hp.PRESENTED_IMAGE_SIMPLE,
  3642. class: `${e.value}-small`
  3643. }, null);
  3644. default:
  3645. return M(Hp, null, null);
  3646. }
  3647. })(t.componentName);
  3648. };
  3649. function Pfe(t) {
  3650. return M(cI, {
  3651. componentName: t
  3652. }, null);
  3653. }
  3654. const jj = Symbol("SizeContextKey"), Zj = () => Ge(jj, U(void 0)), Uj = (t) => {
  3655. const e = Zj();
  3656. return pt(jj, L(() => t.value || e.value)), t;
  3657. }, It = (t, e) => {
  3658. const n = Zj(), r = Ko(), i = Ge(aI, I(I({}, lj), {
  3659. renderEmpty: (x) => jg(cI, {
  3660. componentName: x
  3661. })
  3662. })), a = L(() => i.getPrefixCls(t, e.prefixCls)), o = L(() => {
  3663. var x, C;
  3664. return (x = e.direction) !== null && x !== void 0 ? x : (C = i.direction) === null || C === void 0 ? void 0 : C.value;
  3665. }), s = L(() => {
  3666. var x;
  3667. return (x = e.iconPrefixCls) !== null && x !== void 0 ? x : i.iconPrefixCls.value;
  3668. }), l = L(() => i.getPrefixCls()), u = L(() => {
  3669. var x;
  3670. return (x = i.autoInsertSpaceInButton) === null || x === void 0 ? void 0 : x.value;
  3671. }), c = i.renderEmpty, f = i.space, d = i.pageHeader, h = i.form, p = L(() => {
  3672. var x, C;
  3673. return (x = e.getTargetContainer) !== null && x !== void 0 ? x : (C = i.getTargetContainer) === null || C === void 0 ? void 0 : C.value;
  3674. }), v = L(() => {
  3675. var x, C, T;
  3676. 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;
  3677. }), g = L(() => {
  3678. var x, C;
  3679. return (x = e.dropdownMatchSelectWidth) !== null && x !== void 0 ? x : (C = i.dropdownMatchSelectWidth) === null || C === void 0 ? void 0 : C.value;
  3680. }), m = L(() => {
  3681. var x;
  3682. return (e.virtual === void 0 ? ((x = i.virtual) === null || x === void 0 ? void 0 : x.value) !== !1 : e.virtual !== !1) && g.value !== !1;
  3683. }), y = L(() => e.size || n.value), b = L(() => {
  3684. var x, C, T;
  3685. 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;
  3686. }), _ = L(() => {
  3687. var x;
  3688. return (x = e.disabled) !== null && x !== void 0 ? x : r.value;
  3689. }), O = L(() => {
  3690. var x;
  3691. return (x = e.csp) !== null && x !== void 0 ? x : i.csp;
  3692. }), S = L(() => {
  3693. var x, C;
  3694. return (x = e.wave) !== null && x !== void 0 ? x : (C = i.wave) === null || C === void 0 ? void 0 : C.value;
  3695. });
  3696. return {
  3697. configProvider: i,
  3698. prefixCls: a,
  3699. direction: o,
  3700. size: y,
  3701. getTargetContainer: p,
  3702. getPopupContainer: v,
  3703. space: f,
  3704. pageHeader: d,
  3705. form: h,
  3706. autoInsertSpaceInButton: u,
  3707. renderEmpty: c,
  3708. virtual: m,
  3709. dropdownMatchSelectWidth: g,
  3710. rootPrefixCls: l,
  3711. getPrefixCls: i.getPrefixCls,
  3712. autocomplete: b,
  3713. csp: O,
  3714. iconPrefixCls: s,
  3715. disabled: _,
  3716. select: i.select,
  3717. wave: S
  3718. };
  3719. };
  3720. function or(t, e) {
  3721. const n = I({}, t);
  3722. for (let r = 0; r < e.length; r += 1) {
  3723. const i = e[r];
  3724. delete n[i];
  3725. }
  3726. return n;
  3727. }
  3728. function O8(t) {
  3729. return typeof t == "object" && t != null && t.nodeType === 1;
  3730. }
  3731. function S8(t, e) {
  3732. return (!e || t !== "hidden") && t !== "visible" && t !== "clip";
  3733. }
  3734. function oC(t, e) {
  3735. if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
  3736. var n = getComputedStyle(t, null);
  3737. return S8(n.overflowY, e) || S8(n.overflowX, e) || function(r) {
  3738. var i = function(a) {
  3739. if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
  3740. try {
  3741. return a.ownerDocument.defaultView.frameElement;
  3742. } catch {
  3743. return null;
  3744. }
  3745. }(r);
  3746. return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
  3747. }(t);
  3748. }
  3749. return !1;
  3750. }
  3751. function Sy(t, e, n, r, i, a, o, s) {
  3752. 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;
  3753. }
  3754. var x8 = function(t, e) {
  3755. 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) {
  3756. return de !== o;
  3757. };
  3758. if (!O8(t)) throw new TypeError("Invalid target");
  3759. for (var u, c, f = document.scrollingElement || document.documentElement, d = [], h = t; O8(h) && l(h); ) {
  3760. if ((h = (c = (u = h).parentElement) == null ? u.getRootNode().host || null : c) === f) {
  3761. d.push(h);
  3762. break;
  3763. }
  3764. h != null && h === document.body && oC(h) && !oC(document.documentElement) || h != null && oC(h, s) && d.push(h);
  3765. }
  3766. 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; $++) {
  3767. var A = d[$], D = A.getBoundingClientRect(), E = D.height, R = D.width, N = D.top, V = D.right, z = D.bottom, W = D.left;
  3768. if (r === "if-needed" && O >= 0 && C >= 0 && x <= v && S <= p && O >= N && x <= z && C >= W && S <= V) return P;
  3769. 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;
  3770. if (f === A) oe = i === "start" ? T : i === "end" ? T - v : i === "nearest" ? Sy(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 : Sy(g, g + p, p, Q, ne, g + w, g + w + _, _), oe = Math.max(0, oe + m), K = Math.max(0, K + g);
  3771. else {
  3772. oe = i === "start" ? T - N - Z : i === "end" ? T - z + ee + X : i === "nearest" ? Sy(N, z, 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 : Sy(W, V, R, Q, ne + ie, w, w + _, _);
  3773. var re = A.scrollLeft, fe = A.scrollTop;
  3774. 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)));
  3775. }
  3776. P.push({ el: A, top: oe, left: K });
  3777. }
  3778. return P;
  3779. };
  3780. function Xj(t) {
  3781. return t === Object(t) && Object.keys(t).length !== 0;
  3782. }
  3783. function $fe(t, e) {
  3784. e === void 0 && (e = "auto");
  3785. var n = "scrollBehavior" in document.body.style;
  3786. t.forEach(function(r) {
  3787. var i = r.el, a = r.top, o = r.left;
  3788. i.scroll && n ? i.scroll({
  3789. top: a,
  3790. left: o,
  3791. behavior: e
  3792. }) : (i.scrollTop = a, i.scrollLeft = o);
  3793. });
  3794. }
  3795. function Afe(t) {
  3796. return t === !1 ? {
  3797. block: "end",
  3798. inline: "nearest"
  3799. } : Xj(t) ? t : {
  3800. block: "start",
  3801. inline: "nearest"
  3802. };
  3803. }
  3804. function Efe(t, e) {
  3805. var n = t.isConnected || t.ownerDocument.documentElement.contains(t);
  3806. if (Xj(e) && typeof e.behavior == "function")
  3807. return e.behavior(n ? x8(t, e) : []);
  3808. if (n) {
  3809. var r = Afe(e);
  3810. return $fe(x8(t, r), r.behavior);
  3811. }
  3812. }
  3813. function Mfe(t, e) {
  3814. for (var n = 0; n < e.length; n++) {
  3815. var r = e[n];
  3816. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
  3817. }
  3818. }
  3819. function Yj(t, e, n) {
  3820. return n && Mfe(t, n), t;
  3821. }
  3822. function S_() {
  3823. return (S_ = Object.assign || function(t) {
  3824. for (var e = 1; e < arguments.length; e++) {
  3825. var n = arguments[e];
  3826. for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
  3827. }
  3828. return t;
  3829. }).apply(this, arguments);
  3830. }
  3831. function qj(t, e) {
  3832. t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
  3833. }
  3834. function Kj(t, e) {
  3835. if (t == null) return {};
  3836. var n, r, i = {}, a = Object.keys(t);
  3837. for (r = 0; r < a.length; r++) e.indexOf(n = a[r]) >= 0 || (i[n] = t[n]);
  3838. return i;
  3839. }
  3840. function w8(t) {
  3841. return ((e = t) != null && typeof e == "object" && Array.isArray(e) === !1) == 1 && Object.prototype.toString.call(t) === "[object Object]";
  3842. var e;
  3843. }
  3844. var Jj = Object.prototype, eZ = Jj.toString, Ife = Jj.hasOwnProperty, tZ = /^\s*function (\w+)/;
  3845. function C8(t) {
  3846. var e, n = (e = t == null ? void 0 : t.type) !== null && e !== void 0 ? e : t;
  3847. if (n) {
  3848. var r = n.toString().match(tZ);
  3849. return r ? r[1] : "";
  3850. }
  3851. return "";
  3852. }
  3853. var df = function(t) {
  3854. var e, n;
  3855. return w8(t) !== !1 && typeof (e = t.constructor) == "function" && w8(n = e.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
  3856. }, nZ = function(t) {
  3857. return t;
  3858. }, Rr = nZ;
  3859. if (process.env.NODE_ENV !== "production") {
  3860. var Dfe = typeof console < "u";
  3861. Rr = Dfe ? function(t) {
  3862. console.warn("[VueTypes warn]: " + t);
  3863. } : nZ;
  3864. }
  3865. var Jg = function(t, e) {
  3866. return Ife.call(t, e);
  3867. }, Rfe = Number.isInteger || function(t) {
  3868. return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
  3869. }, yh = Array.isArray || function(t) {
  3870. return eZ.call(t) === "[object Array]";
  3871. }, bh = function(t) {
  3872. return eZ.call(t) === "[object Function]";
  3873. }, O1 = function(t) {
  3874. return df(t) && Jg(t, "_vueTypes_name");
  3875. }, rZ = function(t) {
  3876. return df(t) && (Jg(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(e) {
  3877. return Jg(t, e);
  3878. }));
  3879. };
  3880. function fI(t, e) {
  3881. return Object.defineProperty(t.bind(e), "__original", { value: t });
  3882. }
  3883. function Af(t, e, n) {
  3884. var r;
  3885. n === void 0 && (n = !1);
  3886. var i = !0, a = "";
  3887. r = df(t) ? t : { type: t };
  3888. var o = O1(r) ? r._vueTypes_name + " - " : "";
  3889. if (rZ(r) && r.type !== null) {
  3890. if (r.type === void 0 || r.type === !0 || !r.required && e === void 0) return i;
  3891. yh(r.type) ? (i = r.type.some(function(f) {
  3892. return Af(f, e, !0) === !0;
  3893. }), a = r.type.map(function(f) {
  3894. return C8(f);
  3895. }).join(" or ")) : i = (a = C8(r)) === "Array" ? yh(e) : a === "Object" ? df(e) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(f) {
  3896. if (f == null) return "";
  3897. var d = f.constructor.toString().match(tZ);
  3898. return d ? d[1] : "";
  3899. }(e) === a : e instanceof r.type;
  3900. }
  3901. if (!i) {
  3902. var s = o + 'value "' + e + '" should be of type "' + a + '"';
  3903. return n === !1 ? (Rr(s), !1) : s;
  3904. }
  3905. if (Jg(r, "validator") && bh(r.validator)) {
  3906. var l = Rr, u = [];
  3907. if (Rr = function(f) {
  3908. u.push(f);
  3909. }, i = r.validator(e), Rr = l, !i) {
  3910. var c = (u.length > 1 ? "* " : "") + u.join(`
  3911. * `);
  3912. return u.length = 0, n === !1 ? (Rr(c), i) : c;
  3913. }
  3914. }
  3915. return i;
  3916. }
  3917. function Xi(t, e) {
  3918. var n = Object.defineProperties(e, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get: function() {
  3919. return this.required = !0, this;
  3920. } }, def: { value: function(i) {
  3921. return i !== void 0 || this.default ? bh(i) || Af(this, i, !0) === !0 ? (this.default = yh(i) ? function() {
  3922. return [].concat(i);
  3923. } : df(i) ? function() {
  3924. return Object.assign({}, i);
  3925. } : i, this) : (Rr(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  3926. } } }), r = n.validator;
  3927. return bh(r) && (n.validator = fI(r, n)), n;
  3928. }
  3929. function Jo(t, e) {
  3930. var n = Xi(t, e);
  3931. return Object.defineProperty(n, "validate", { value: function(r) {
  3932. return bh(this.validator) && Rr(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
  3933. ` + JSON.stringify(this)), this.validator = fI(r, this), this;
  3934. } });
  3935. }
  3936. function T8(t, e, n) {
  3937. var r, i, a = (r = e, i = {}, Object.getOwnPropertyNames(r).forEach(function(f) {
  3938. i[f] = Object.getOwnPropertyDescriptor(r, f);
  3939. }), Object.defineProperties({}, i));
  3940. if (a._vueTypes_name = t, !df(n)) return a;
  3941. var o, s, l = n.validator, u = Kj(n, ["validator"]);
  3942. if (bh(l)) {
  3943. var c = a.validator;
  3944. c && (c = (s = (o = c).__original) !== null && s !== void 0 ? s : o), a.validator = fI(c ? function(f) {
  3945. return c.call(this, f) && l.call(this, f);
  3946. } : l, a);
  3947. }
  3948. return Object.assign(a, u);
  3949. }
  3950. function FS(t) {
  3951. return t.replace(/^(?!\s*$)/gm, " ");
  3952. }
  3953. var kfe = function() {
  3954. return Jo("any", {});
  3955. }, Lfe = function() {
  3956. return Jo("function", { type: Function });
  3957. }, Nfe = function() {
  3958. return Jo("boolean", { type: Boolean });
  3959. }, Bfe = function() {
  3960. return Jo("string", { type: String });
  3961. }, zfe = function() {
  3962. return Jo("number", { type: Number });
  3963. }, Vfe = function() {
  3964. return Jo("array", { type: Array });
  3965. }, Ffe = function() {
  3966. return Jo("object", { type: Object });
  3967. }, Wfe = function() {
  3968. return Xi("integer", { type: Number, validator: function(t) {
  3969. return Rfe(t);
  3970. } });
  3971. }, Qfe = function() {
  3972. return Xi("symbol", { validator: function(t) {
  3973. return typeof t == "symbol";
  3974. } });
  3975. };
  3976. function Hfe(t, e) {
  3977. if (e === void 0 && (e = "custom validation failed"), typeof t != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  3978. return Xi(t.name || "<<anonymous function>>", { validator: function(n) {
  3979. var r = t(n);
  3980. return r || Rr(this._vueTypes_name + " - " + e), r;
  3981. } });
  3982. }
  3983. function Gfe(t) {
  3984. if (!yh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  3985. var e = 'oneOf - value should be one of "' + t.join('", "') + '".', n = t.reduce(function(r, i) {
  3986. if (i != null) {
  3987. var a = i.constructor;
  3988. r.indexOf(a) === -1 && r.push(a);
  3989. }
  3990. return r;
  3991. }, []);
  3992. return Xi("oneOf", { type: n.length > 0 ? n : void 0, validator: function(r) {
  3993. var i = t.indexOf(r) !== -1;
  3994. return i || Rr(e), i;
  3995. } });
  3996. }
  3997. function jfe(t) {
  3998. if (!yh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  3999. for (var e = !1, n = [], r = 0; r < t.length; r += 1) {
  4000. var i = t[r];
  4001. if (rZ(i)) {
  4002. if (O1(i) && i._vueTypes_name === "oneOf") {
  4003. n = n.concat(i.type);
  4004. continue;
  4005. }
  4006. if (bh(i.validator) && (e = !0), i.type !== !0 && i.type) {
  4007. n = n.concat(i.type);
  4008. continue;
  4009. }
  4010. }
  4011. n.push(i);
  4012. }
  4013. return n = n.filter(function(a, o) {
  4014. return n.indexOf(a) === o;
  4015. }), Xi("oneOfType", e ? { type: n, validator: function(a) {
  4016. var o = [], s = t.some(function(l) {
  4017. var u = Af(O1(l) && l._vueTypes_name === "oneOf" ? l.type || null : l, a, !0);
  4018. return typeof u == "string" && o.push(u), u === !0;
  4019. });
  4020. return s || Rr("oneOfType - provided value does not match any of the " + o.length + ` passed-in validators:
  4021. ` + FS(o.join(`
  4022. `))), s;
  4023. } } : { type: n });
  4024. }
  4025. function Zfe(t) {
  4026. return Xi("arrayOf", { type: Array, validator: function(e) {
  4027. var n, r = e.every(function(i) {
  4028. return (n = Af(t, i, !0)) === !0;
  4029. });
  4030. return r || Rr(`arrayOf - value validation error:
  4031. ` + FS(n)), r;
  4032. } });
  4033. }
  4034. function Ufe(t) {
  4035. return Xi("instanceOf", { type: t });
  4036. }
  4037. function Xfe(t) {
  4038. return Xi("objectOf", { type: Object, validator: function(e) {
  4039. var n, r = Object.keys(e).every(function(i) {
  4040. return (n = Af(t, e[i], !0)) === !0;
  4041. });
  4042. return r || Rr(`objectOf - value validation error:
  4043. ` + FS(n)), r;
  4044. } });
  4045. }
  4046. function Yfe(t) {
  4047. var e = Object.keys(t), n = e.filter(function(i) {
  4048. var a;
  4049. return !!(!((a = t[i]) === null || a === void 0) && a.required);
  4050. }), r = Xi("shape", { type: Object, validator: function(i) {
  4051. var a = this;
  4052. if (!df(i)) return !1;
  4053. var o = Object.keys(i);
  4054. if (n.length > 0 && n.some(function(l) {
  4055. return o.indexOf(l) === -1;
  4056. })) {
  4057. var s = n.filter(function(l) {
  4058. return o.indexOf(l) === -1;
  4059. });
  4060. return Rr(s.length === 1 ? 'shape - required property "' + s[0] + '" is not defined.' : 'shape - required properties "' + s.join('", "') + '" are not defined.'), !1;
  4061. }
  4062. return o.every(function(l) {
  4063. if (e.indexOf(l) === -1) return a._vueTypes_isLoose === !0 || (Rr('shape - shape definition does not include a "' + l + '" property. Allowed keys: "' + e.join('", "') + '".'), !1);
  4064. var u = Af(t[l], i[l], !0);
  4065. return typeof u == "string" && Rr('shape - "' + l + `" property validation error:
  4066. ` + FS(u)), u === !0;
  4067. });
  4068. } });
  4069. return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get: function() {
  4070. return this._vueTypes_isLoose = !0, this;
  4071. } }), r;
  4072. }
  4073. var Po = function() {
  4074. function t() {
  4075. }
  4076. return t.extend = function(e) {
  4077. var n = this;
  4078. if (yh(e)) return e.forEach(function(f) {
  4079. return n.extend(f);
  4080. }), this;
  4081. var r = e.name, i = e.validate, a = i !== void 0 && i, o = e.getter, s = o !== void 0 && o, l = Kj(e, ["name", "validate", "getter"]);
  4082. if (Jg(this, r)) throw new TypeError('[VueTypes error]: Type "' + r + '" already defined');
  4083. var u, c = l.type;
  4084. return O1(c) ? (delete l.type, Object.defineProperty(this, r, s ? { get: function() {
  4085. return T8(r, c, l);
  4086. } } : { value: function() {
  4087. var f, d = T8(r, c, l);
  4088. return d.validator && (d.validator = (f = d.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
  4089. } })) : (u = s ? { get: function() {
  4090. var f = Object.assign({}, l);
  4091. return a ? Jo(r, f) : Xi(r, f);
  4092. }, enumerable: !0 } : { value: function() {
  4093. var f, d, h = Object.assign({}, l);
  4094. return f = a ? Jo(r, h) : Xi(r, h), h.validator && (f.validator = (d = h.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
  4095. }, enumerable: !0 }, Object.defineProperty(this, r, u));
  4096. }, Yj(t, null, [{ key: "any", get: function() {
  4097. return kfe();
  4098. } }, { key: "func", get: function() {
  4099. return Lfe().def(this.defaults.func);
  4100. } }, { key: "bool", get: function() {
  4101. return Nfe().def(this.defaults.bool);
  4102. } }, { key: "string", get: function() {
  4103. return Bfe().def(this.defaults.string);
  4104. } }, { key: "number", get: function() {
  4105. return zfe().def(this.defaults.number);
  4106. } }, { key: "array", get: function() {
  4107. return Vfe().def(this.defaults.array);
  4108. } }, { key: "object", get: function() {
  4109. return Ffe().def(this.defaults.object);
  4110. } }, { key: "integer", get: function() {
  4111. return Wfe().def(this.defaults.integer);
  4112. } }, { key: "symbol", get: function() {
  4113. return Qfe();
  4114. } }]), t;
  4115. }();
  4116. function iZ(t) {
  4117. var e;
  4118. return t === void 0 && (t = { func: function() {
  4119. }, bool: !0, string: "", number: 0, array: function() {
  4120. return [];
  4121. }, object: function() {
  4122. return {};
  4123. }, integer: 0 }), (e = function(n) {
  4124. function r() {
  4125. return n.apply(this, arguments) || this;
  4126. }
  4127. return qj(r, n), Yj(r, null, [{ key: "sensibleDefaults", get: function() {
  4128. return S_({}, this.defaults);
  4129. }, set: function(i) {
  4130. this.defaults = i !== !1 ? S_({}, i !== !0 ? i : t) : {};
  4131. } }]), r;
  4132. }(Po)).defaults = S_({}, t), e;
  4133. }
  4134. Po.defaults = {}, Po.custom = Hfe, Po.oneOf = Gfe, Po.instanceOf = Ufe, Po.oneOfType = jfe, Po.arrayOf = Zfe, Po.objectOf = Xfe, Po.shape = Yfe, Po.utils = { validate: function(t, e) {
  4135. return Af(e, t, !0) === !0;
  4136. }, toType: function(t, e, n) {
  4137. return n === void 0 && (n = !1), n ? Jo(t, e) : Xi(t, e);
  4138. } };
  4139. (function(t) {
  4140. function e() {
  4141. return t.apply(this, arguments) || this;
  4142. }
  4143. return qj(e, t), e;
  4144. })(iZ());
  4145. const Y = iZ({
  4146. func: void 0,
  4147. bool: void 0,
  4148. string: void 0,
  4149. number: void 0,
  4150. array: void 0,
  4151. object: void 0,
  4152. integer: void 0
  4153. });
  4154. Y.extend([{
  4155. name: "looseBool",
  4156. getter: !0,
  4157. type: Boolean,
  4158. default: void 0
  4159. }, {
  4160. name: "style",
  4161. getter: !0,
  4162. type: [String, Object],
  4163. default: void 0
  4164. }, {
  4165. name: "VueNode",
  4166. getter: !0,
  4167. type: null
  4168. }]);
  4169. function qfe(t) {
  4170. return t.default = void 0, t;
  4171. }
  4172. const Qi = (t, e, n) => {
  4173. oa(t, `[ant-design-vue: ${e}] ${n}`);
  4174. };
  4175. function P8(t, e) {
  4176. const {
  4177. key: n
  4178. } = t;
  4179. let r;
  4180. return "value" in t && ({
  4181. value: r
  4182. } = t), n ?? (r !== void 0 ? r : `rc-index-key-${e}`);
  4183. }
  4184. function aZ(t, e) {
  4185. const {
  4186. label: n,
  4187. value: r,
  4188. options: i
  4189. } = t || {};
  4190. return {
  4191. label: n || (e ? "children" : "label"),
  4192. value: r || "value",
  4193. options: i || "options"
  4194. };
  4195. }
  4196. function Kfe(t) {
  4197. let {
  4198. fieldNames: e,
  4199. childrenAsData: n
  4200. } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  4201. const r = [], {
  4202. label: i,
  4203. value: a,
  4204. options: o
  4205. } = aZ(e, !1);
  4206. function s(l, u) {
  4207. l.forEach((c) => {
  4208. const f = c[i];
  4209. if (u || !(o in c)) {
  4210. const d = c[a];
  4211. r.push({
  4212. key: P8(c, r.length),
  4213. groupOption: u,
  4214. data: c,
  4215. label: f,
  4216. value: d
  4217. });
  4218. } else {
  4219. let d = f;
  4220. d === void 0 && n && (d = c.label), r.push({
  4221. key: P8(c, r.length),
  4222. group: !0,
  4223. data: c,
  4224. label: d
  4225. }), s(c[o], !0);
  4226. }
  4227. });
  4228. }
  4229. return s(t, !1), r;
  4230. }
  4231. function y2(t) {
  4232. const e = I({}, t);
  4233. return "props" in e || Object.defineProperty(e, "props", {
  4234. get() {
  4235. return cf(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
  4236. }
  4237. }), e;
  4238. }
  4239. function Jfe(t, e) {
  4240. if (!e || !e.length)
  4241. return null;
  4242. let n = !1;
  4243. function r(a, o) {
  4244. let [s, ...l] = o;
  4245. if (!s)
  4246. return [a];
  4247. const u = a.split(s);
  4248. return n = n || u.length > 1, u.reduce((c, f) => [...c, ...r(f, l)], []).filter((c) => c);
  4249. }
  4250. const i = r(t, e);
  4251. return n ? i : null;
  4252. }
  4253. function ede() {
  4254. return "";
  4255. }
  4256. function tde(t) {
  4257. return t ? t.ownerDocument : window.document;
  4258. }
  4259. function oZ() {
  4260. }
  4261. const nde = () => ({
  4262. action: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def([]),
  4263. showAction: Y.any.def([]),
  4264. hideAction: Y.any.def([]),
  4265. getPopupClassNameFromAlign: Y.any.def(ede),
  4266. onPopupVisibleChange: Function,
  4267. afterPopupVisibleChange: Y.func.def(oZ),
  4268. popup: Y.any,
  4269. arrow: Y.bool.def(!0),
  4270. popupStyle: {
  4271. type: Object,
  4272. default: void 0
  4273. },
  4274. prefixCls: Y.string.def("rc-trigger-popup"),
  4275. popupClassName: Y.string.def(""),
  4276. popupPlacement: String,
  4277. builtinPlacements: Y.object,
  4278. popupTransitionName: String,
  4279. popupAnimation: Y.any,
  4280. mouseEnterDelay: Y.number.def(0),
  4281. mouseLeaveDelay: Y.number.def(0.1),
  4282. zIndex: Number,
  4283. focusDelay: Y.number.def(0),
  4284. blurDelay: Y.number.def(0.15),
  4285. getPopupContainer: Function,
  4286. getDocument: Y.func.def(tde),
  4287. forceRender: {
  4288. type: Boolean,
  4289. default: void 0
  4290. },
  4291. destroyPopupOnHide: {
  4292. type: Boolean,
  4293. default: !1
  4294. },
  4295. mask: {
  4296. type: Boolean,
  4297. default: !1
  4298. },
  4299. maskClosable: {
  4300. type: Boolean,
  4301. default: !0
  4302. },
  4303. // onPopupAlign: PropTypes.func.def(noop),
  4304. popupAlign: Y.object.def(() => ({})),
  4305. popupVisible: {
  4306. type: Boolean,
  4307. default: void 0
  4308. },
  4309. defaultPopupVisible: {
  4310. type: Boolean,
  4311. default: !1
  4312. },
  4313. maskTransitionName: String,
  4314. maskAnimation: String,
  4315. stretch: String,
  4316. alignPoint: {
  4317. type: Boolean,
  4318. default: void 0
  4319. },
  4320. autoDestroy: {
  4321. type: Boolean,
  4322. default: !1
  4323. },
  4324. mobile: Object,
  4325. getTriggerDOMNode: Function
  4326. }), dI = {
  4327. visible: Boolean,
  4328. prefixCls: String,
  4329. zIndex: Number,
  4330. destroyPopupOnHide: Boolean,
  4331. forceRender: Boolean,
  4332. arrow: {
  4333. type: Boolean,
  4334. default: !0
  4335. },
  4336. // Legacy Motion
  4337. animation: [String, Object],
  4338. transitionName: String,
  4339. // Measure
  4340. stretch: {
  4341. type: String
  4342. },
  4343. // Align
  4344. align: {
  4345. type: Object
  4346. },
  4347. point: {
  4348. type: Object
  4349. },
  4350. getRootDomNode: {
  4351. type: Function
  4352. },
  4353. getClassNameFromAlign: {
  4354. type: Function
  4355. },
  4356. onAlign: {
  4357. type: Function
  4358. },
  4359. onMouseenter: {
  4360. type: Function
  4361. },
  4362. onMouseleave: {
  4363. type: Function
  4364. },
  4365. onMousedown: {
  4366. type: Function
  4367. },
  4368. onTouchstart: {
  4369. type: Function
  4370. }
  4371. }, rde = I(I({}, dI), {
  4372. mobile: {
  4373. type: Object
  4374. }
  4375. }), ide = I(I({}, dI), {
  4376. mask: Boolean,
  4377. mobile: {
  4378. type: Object
  4379. },
  4380. maskAnimation: String,
  4381. maskTransitionName: String
  4382. });
  4383. function hI(t) {
  4384. let {
  4385. prefixCls: e,
  4386. animation: n,
  4387. transitionName: r
  4388. } = t;
  4389. return n ? {
  4390. name: `${e}-${n}`
  4391. } : r ? {
  4392. name: r
  4393. } : {};
  4394. }
  4395. function sZ(t) {
  4396. const {
  4397. prefixCls: e,
  4398. visible: n,
  4399. zIndex: r,
  4400. mask: i,
  4401. maskAnimation: a,
  4402. maskTransitionName: o
  4403. } = t;
  4404. if (!i)
  4405. return null;
  4406. let s = {};
  4407. return (o || a) && (s = hI({
  4408. prefixCls: e,
  4409. transitionName: o,
  4410. animation: a
  4411. })), M(co, j({
  4412. appear: !0
  4413. }, s), {
  4414. default: () => [bi(M("div", {
  4415. style: {
  4416. zIndex: r
  4417. },
  4418. class: `${e}-mask`
  4419. }, null), [[Vle("if"), n]])]
  4420. });
  4421. }
  4422. sZ.displayName = "Mask";
  4423. const ade = te({
  4424. compatConfig: {
  4425. MODE: 3
  4426. },
  4427. name: "MobilePopupInner",
  4428. inheritAttrs: !1,
  4429. props: rde,
  4430. emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  4431. setup(t, e) {
  4432. let {
  4433. expose: n,
  4434. slots: r
  4435. } = e;
  4436. const i = U();
  4437. return n({
  4438. forceAlign: () => {
  4439. },
  4440. getElement: () => i.value
  4441. }), () => {
  4442. var a;
  4443. const {
  4444. zIndex: o,
  4445. visible: s,
  4446. prefixCls: l,
  4447. mobile: {
  4448. popupClassName: u,
  4449. popupStyle: c,
  4450. popupMotion: f = {},
  4451. popupRender: d
  4452. } = {}
  4453. } = t, h = I({
  4454. zIndex: o
  4455. }, c);
  4456. let p = Yn((a = r.default) === null || a === void 0 ? void 0 : a.call(r));
  4457. p.length > 1 && (p = M("div", {
  4458. class: `${l}-content`
  4459. }, [p])), d && (p = d(p));
  4460. const v = ye(l, u);
  4461. return M(co, j({
  4462. ref: i
  4463. }, f), {
  4464. default: () => [s ? M("div", {
  4465. class: v,
  4466. style: h
  4467. }, [p]) : null]
  4468. });
  4469. };
  4470. }
  4471. });
  4472. var ode = function(t, e, n, r) {
  4473. function i(a) {
  4474. return a instanceof n ? a : new n(function(o) {
  4475. o(a);
  4476. });
  4477. }
  4478. return new (n || (n = Promise))(function(a, o) {
  4479. function s(c) {
  4480. try {
  4481. u(r.next(c));
  4482. } catch (f) {
  4483. o(f);
  4484. }
  4485. }
  4486. function l(c) {
  4487. try {
  4488. u(r.throw(c));
  4489. } catch (f) {
  4490. o(f);
  4491. }
  4492. }
  4493. function u(c) {
  4494. c.done ? a(c.value) : i(c.value).then(s, l);
  4495. }
  4496. u((r = r.apply(t, e || [])).next());
  4497. });
  4498. };
  4499. const $8 = ["measure", "align", null, "motion"], sde = (t, e) => {
  4500. const n = ae(null), r = ae(), i = ae(!1);
  4501. function a(l) {
  4502. i.value || (n.value = l);
  4503. }
  4504. function o() {
  4505. xt.cancel(r.value);
  4506. }
  4507. function s(l) {
  4508. o(), r.value = xt(() => {
  4509. let u = n.value;
  4510. switch (n.value) {
  4511. case "align":
  4512. u = "motion";
  4513. break;
  4514. case "motion":
  4515. u = "stable";
  4516. break;
  4517. }
  4518. a(u), l == null || l();
  4519. });
  4520. }
  4521. return se(t, () => {
  4522. a("measure");
  4523. }, {
  4524. immediate: !0,
  4525. flush: "post"
  4526. }), it(() => {
  4527. se(n, () => {
  4528. switch (n.value) {
  4529. case "measure":
  4530. e();
  4531. break;
  4532. }
  4533. n.value && (r.value = xt(() => ode(void 0, void 0, void 0, function* () {
  4534. const l = $8.indexOf(n.value), u = $8[l + 1];
  4535. u && l !== -1 && a(u);
  4536. })));
  4537. }, {
  4538. immediate: !0,
  4539. flush: "post"
  4540. });
  4541. }), yt(() => {
  4542. i.value = !0, o();
  4543. }), [n, s];
  4544. }, lde = (t) => {
  4545. const e = ae({
  4546. width: 0,
  4547. height: 0
  4548. });
  4549. function n(i) {
  4550. e.value = {
  4551. width: i.offsetWidth,
  4552. height: i.offsetHeight
  4553. };
  4554. }
  4555. return [L(() => {
  4556. const i = {};
  4557. if (t.value) {
  4558. const {
  4559. width: a,
  4560. height: o
  4561. } = e.value;
  4562. 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`);
  4563. }
  4564. return i;
  4565. }), n];
  4566. };
  4567. function A8(t, e) {
  4568. var n = Object.keys(t);
  4569. if (Object.getOwnPropertySymbols) {
  4570. var r = Object.getOwnPropertySymbols(t);
  4571. e && (r = r.filter(function(i) {
  4572. return Object.getOwnPropertyDescriptor(t, i).enumerable;
  4573. })), n.push.apply(n, r);
  4574. }
  4575. return n;
  4576. }
  4577. function E8(t) {
  4578. for (var e = 1; e < arguments.length; e++) {
  4579. var n = arguments[e] != null ? arguments[e] : {};
  4580. e % 2 ? A8(Object(n), !0).forEach(function(r) {
  4581. ude(t, r, n[r]);
  4582. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : A8(Object(n)).forEach(function(r) {
  4583. Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
  4584. });
  4585. }
  4586. return t;
  4587. }
  4588. function b2(t) {
  4589. "@babel/helpers - typeof";
  4590. return b2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  4591. return typeof e;
  4592. } : function(e) {
  4593. return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  4594. }, b2(t);
  4595. }
  4596. function ude(t, e, n) {
  4597. return e in t ? Object.defineProperty(t, e, {
  4598. value: n,
  4599. enumerable: !0,
  4600. configurable: !0,
  4601. writable: !0
  4602. }) : t[e] = n, t;
  4603. }
  4604. var Gp, cde = {
  4605. Webkit: "-webkit-",
  4606. Moz: "-moz-",
  4607. // IE did it wrong again ...
  4608. ms: "-ms-",
  4609. O: "-o-"
  4610. };
  4611. function S1() {
  4612. if (Gp !== void 0)
  4613. return Gp;
  4614. Gp = "";
  4615. var t = document.createElement("p").style, e = "Transform";
  4616. for (var n in cde)
  4617. n + e in t && (Gp = n);
  4618. return Gp;
  4619. }
  4620. function lZ() {
  4621. return S1() ? "".concat(S1(), "TransitionProperty") : "transitionProperty";
  4622. }
  4623. function WS() {
  4624. return S1() ? "".concat(S1(), "Transform") : "transform";
  4625. }
  4626. function M8(t, e) {
  4627. var n = lZ();
  4628. n && (t.style[n] = e, n !== "transitionProperty" && (t.style.transitionProperty = e));
  4629. }
  4630. function sC(t, e) {
  4631. var n = WS();
  4632. n && (t.style[n] = e, n !== "transform" && (t.style.transform = e));
  4633. }
  4634. function fde(t) {
  4635. return t.style.transitionProperty || t.style[lZ()];
  4636. }
  4637. function dde(t) {
  4638. var e = window.getComputedStyle(t, null), n = e.getPropertyValue("transform") || e.getPropertyValue(WS());
  4639. if (n && n !== "none") {
  4640. var r = n.replace(/[^0-9\-.,]/g, "").split(",");
  4641. return {
  4642. x: parseFloat(r[12] || r[4], 0),
  4643. y: parseFloat(r[13] || r[5], 0)
  4644. };
  4645. }
  4646. return {
  4647. x: 0,
  4648. y: 0
  4649. };
  4650. }
  4651. var hde = /matrix\((.*)\)/, pde = /matrix3d\((.*)\)/;
  4652. function vde(t, e) {
  4653. var n = window.getComputedStyle(t, null), r = n.getPropertyValue("transform") || n.getPropertyValue(WS());
  4654. if (r && r !== "none") {
  4655. var i, a = r.match(hde);
  4656. if (a)
  4657. a = a[1], i = a.split(",").map(function(s) {
  4658. return parseFloat(s, 10);
  4659. }), i[4] = e.x, i[5] = e.y, sC(t, "matrix(".concat(i.join(","), ")"));
  4660. else {
  4661. var o = r.match(pde)[1];
  4662. i = o.split(",").map(function(s) {
  4663. return parseFloat(s, 10);
  4664. }), i[12] = e.x, i[13] = e.y, sC(t, "matrix3d(".concat(i.join(","), ")"));
  4665. }
  4666. } else
  4667. sC(t, "translateX(".concat(e.x, "px) translateY(").concat(e.y, "px) translateZ(0)"));
  4668. }
  4669. var gde = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, h0;
  4670. function I8(t) {
  4671. var e = t.style.display;
  4672. t.style.display = "none", t.offsetHeight, t.style.display = e;
  4673. }
  4674. function jd(t, e, n) {
  4675. var r = n;
  4676. if (b2(e) === "object") {
  4677. for (var i in e)
  4678. e.hasOwnProperty(i) && jd(t, i, e[i]);
  4679. return;
  4680. }
  4681. if (typeof r < "u") {
  4682. typeof r == "number" && (r = "".concat(r, "px")), t.style[e] = r;
  4683. return;
  4684. }
  4685. return h0(t, e);
  4686. }
  4687. function mde(t) {
  4688. var e, n, r, i = t.ownerDocument, a = i.body, o = i && i.documentElement;
  4689. 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, {
  4690. left: n,
  4691. top: r
  4692. };
  4693. }
  4694. function uZ(t, e) {
  4695. var n = t["page".concat(e ? "Y" : "X", "Offset")], r = "scroll".concat(e ? "Top" : "Left");
  4696. if (typeof n != "number") {
  4697. var i = t.document;
  4698. n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  4699. }
  4700. return n;
  4701. }
  4702. function cZ(t) {
  4703. return uZ(t);
  4704. }
  4705. function fZ(t) {
  4706. return uZ(t, !0);
  4707. }
  4708. function em(t) {
  4709. var e = mde(t), n = t.ownerDocument, r = n.defaultView || n.parentWindow;
  4710. return e.left += cZ(r), e.top += fZ(r), e;
  4711. }
  4712. function pI(t) {
  4713. return t != null && t == t.window;
  4714. }
  4715. function dZ(t) {
  4716. return pI(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
  4717. }
  4718. function yde(t, e, n) {
  4719. var r = n, i = "", a = dZ(t);
  4720. return r = r || a.defaultView.getComputedStyle(t, null), r && (i = r.getPropertyValue(e) || r[e]), i;
  4721. }
  4722. var bde = new RegExp("^(".concat(gde, ")(?!px)[a-z%]+$"), "i"), _de = /^(top|right|bottom|left)$/, lC = "currentStyle", uC = "runtimeStyle", Du = "left", Ode = "px";
  4723. function Sde(t, e) {
  4724. var n = t[lC] && t[lC][e];
  4725. if (bde.test(n) && !_de.test(e)) {
  4726. var r = t.style, i = r[Du], a = t[uC][Du];
  4727. t[uC][Du] = t[lC][Du], r[Du] = e === "fontSize" ? "1em" : n || 0, n = r.pixelLeft + Ode, r[Du] = i, t[uC][Du] = a;
  4728. }
  4729. return n === "" ? "auto" : n;
  4730. }
  4731. typeof window < "u" && (h0 = window.getComputedStyle ? yde : Sde);
  4732. function xy(t, e) {
  4733. return t === "left" ? e.useCssRight ? "right" : t : e.useCssBottom ? "bottom" : t;
  4734. }
  4735. function D8(t) {
  4736. if (t === "left")
  4737. return "right";
  4738. if (t === "right")
  4739. return "left";
  4740. if (t === "top")
  4741. return "bottom";
  4742. if (t === "bottom")
  4743. return "top";
  4744. }
  4745. function R8(t, e, n) {
  4746. jd(t, "position") === "static" && (t.style.position = "relative");
  4747. var r = -999, i = -999, a = xy("left", n), o = xy("top", n), s = D8(a), l = D8(o);
  4748. a !== "left" && (r = 999), o !== "top" && (i = 999);
  4749. var u = "", c = em(t);
  4750. ("left" in e || "top" in e) && (u = fde(t) || "", M8(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")), I8(t);
  4751. var f = em(t), d = {};
  4752. for (var h in e)
  4753. if (e.hasOwnProperty(h)) {
  4754. var p = xy(h, n), v = h === "left" ? r : i, g = c[h] - f[h];
  4755. p === h ? d[p] = v + g : d[p] = v - g;
  4756. }
  4757. jd(t, d), I8(t), ("left" in e || "top" in e) && M8(t, u);
  4758. var m = {};
  4759. for (var y in e)
  4760. if (e.hasOwnProperty(y)) {
  4761. var b = xy(y, n), _ = e[y] - c[y];
  4762. y === b ? m[b] = d[b] + _ : m[b] = d[b] - _;
  4763. }
  4764. jd(t, m);
  4765. }
  4766. function xde(t, e) {
  4767. var n = em(t), r = dde(t), i = {
  4768. x: r.x,
  4769. y: r.y
  4770. };
  4771. "left" in e && (i.x = r.x + e.left - n.left), "top" in e && (i.y = r.y + e.top - n.top), vde(t, i);
  4772. }
  4773. function wde(t, e, n) {
  4774. if (n.ignoreShake) {
  4775. var r = em(t), i = r.left.toFixed(0), a = r.top.toFixed(0), o = e.left.toFixed(0), s = e.top.toFixed(0);
  4776. if (i === o && a === s)
  4777. return;
  4778. }
  4779. n.useCssRight || n.useCssBottom ? R8(t, e, n) : n.useCssTransform && WS() in document.body.style ? xde(t, e) : R8(t, e, n);
  4780. }
  4781. function vI(t, e) {
  4782. for (var n = 0; n < t.length; n++)
  4783. e(t[n]);
  4784. }
  4785. function hZ(t) {
  4786. return h0(t, "boxSizing") === "border-box";
  4787. }
  4788. var Cde = ["margin", "border", "padding"], _2 = -1, Tde = 2, O2 = 1, Pde = 0;
  4789. function $de(t, e, n) {
  4790. var r = {}, i = t.style, a;
  4791. for (a in e)
  4792. e.hasOwnProperty(a) && (r[a] = i[a], i[a] = e[a]);
  4793. n.call(t);
  4794. for (a in e)
  4795. e.hasOwnProperty(a) && (i[a] = r[a]);
  4796. }
  4797. function Lv(t, e, n) {
  4798. var r = 0, i, a, o;
  4799. for (a = 0; a < e.length; a++)
  4800. if (i = e[a], i)
  4801. for (o = 0; o < n.length; o++) {
  4802. var s = void 0;
  4803. i === "border" ? s = "".concat(i).concat(n[o], "Width") : s = i + n[o], r += parseFloat(h0(t, s)) || 0;
  4804. }
  4805. return r;
  4806. }
  4807. var zo = {
  4808. getParent: function(e) {
  4809. var n = e;
  4810. do
  4811. n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
  4812. while (n && n.nodeType !== 1 && n.nodeType !== 9);
  4813. return n;
  4814. }
  4815. };
  4816. vI(["Width", "Height"], function(t) {
  4817. zo["doc".concat(t)] = function(e) {
  4818. var n = e.document;
  4819. return Math.max(
  4820. // firefox chrome documentElement.scrollHeight< body.scrollHeight
  4821. // ie standard mode : documentElement.scrollHeight> body.scrollHeight
  4822. n.documentElement["scroll".concat(t)],
  4823. // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
  4824. n.body["scroll".concat(t)],
  4825. zo["viewport".concat(t)](n)
  4826. );
  4827. }, zo["viewport".concat(t)] = function(e) {
  4828. var n = "client".concat(t), r = e.document, i = r.body, a = r.documentElement, o = a[n];
  4829. return r.compatMode === "CSS1Compat" && o || i && i[n] || o;
  4830. };
  4831. });
  4832. function k8(t, e, n) {
  4833. var r = n;
  4834. if (pI(t))
  4835. return e === "width" ? zo.viewportWidth(t) : zo.viewportHeight(t);
  4836. if (t.nodeType === 9)
  4837. return e === "width" ? zo.docWidth(t) : zo.docHeight(t);
  4838. var i = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(e === "width" ? t.getBoundingClientRect().width : t.getBoundingClientRect().height), o = hZ(t), s = 0;
  4839. (a == null || a <= 0) && (a = void 0, s = h0(t, e), (s == null || Number(s) < 0) && (s = t.style[e] || 0), s = Math.floor(parseFloat(s)) || 0), r === void 0 && (r = o ? O2 : _2);
  4840. var l = a !== void 0 || o, u = a || s;
  4841. return r === _2 ? l ? u - Lv(t, ["border", "padding"], i) : s : l ? r === O2 ? u : u + (r === Tde ? -Lv(t, ["border"], i) : Lv(t, ["margin"], i)) : s + Lv(t, Cde.slice(r), i);
  4842. }
  4843. var Ade = {
  4844. position: "absolute",
  4845. visibility: "hidden",
  4846. display: "block"
  4847. };
  4848. function L8() {
  4849. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  4850. e[n] = arguments[n];
  4851. var r, i = e[0];
  4852. return i.offsetWidth !== 0 ? r = k8.apply(void 0, e) : $de(i, Ade, function() {
  4853. r = k8.apply(void 0, e);
  4854. }), r;
  4855. }
  4856. vI(["width", "height"], function(t) {
  4857. var e = t.charAt(0).toUpperCase() + t.slice(1);
  4858. zo["outer".concat(e)] = function(r, i) {
  4859. return r && L8(r, t, i ? Pde : O2);
  4860. };
  4861. var n = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  4862. zo[t] = function(r, i) {
  4863. var a = i;
  4864. if (a !== void 0) {
  4865. if (r) {
  4866. var o = hZ(r);
  4867. return o && (a += Lv(r, ["padding", "border"], n)), jd(r, t, a);
  4868. }
  4869. return;
  4870. }
  4871. return r && L8(r, t, _2);
  4872. };
  4873. });
  4874. function pZ(t, e) {
  4875. for (var n in e)
  4876. e.hasOwnProperty(n) && (t[n] = e[n]);
  4877. return t;
  4878. }
  4879. var ft = {
  4880. getWindow: function(e) {
  4881. if (e && e.document && e.setTimeout)
  4882. return e;
  4883. var n = e.ownerDocument || e;
  4884. return n.defaultView || n.parentWindow;
  4885. },
  4886. getDocument: dZ,
  4887. offset: function(e, n, r) {
  4888. if (typeof n < "u")
  4889. wde(e, n, r || {});
  4890. else
  4891. return em(e);
  4892. },
  4893. isWindow: pI,
  4894. each: vI,
  4895. css: jd,
  4896. clone: function(e) {
  4897. var n, r = {};
  4898. for (n in e)
  4899. e.hasOwnProperty(n) && (r[n] = e[n]);
  4900. var i = e.overflow;
  4901. if (i)
  4902. for (n in e)
  4903. e.hasOwnProperty(n) && (r.overflow[n] = e.overflow[n]);
  4904. return r;
  4905. },
  4906. mix: pZ,
  4907. getWindowScrollLeft: function(e) {
  4908. return cZ(e);
  4909. },
  4910. getWindowScrollTop: function(e) {
  4911. return fZ(e);
  4912. },
  4913. merge: function() {
  4914. for (var e = {}, n = 0; n < arguments.length; n++)
  4915. ft.mix(e, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
  4916. return e;
  4917. },
  4918. viewportWidth: 0,
  4919. viewportHeight: 0
  4920. };
  4921. pZ(ft, zo);
  4922. var cC = ft.getParent;
  4923. function S2(t) {
  4924. if (ft.isWindow(t) || t.nodeType === 9)
  4925. return null;
  4926. var e = ft.getDocument(t), n = e.body, r, i = ft.css(t, "position"), a = i === "fixed" || i === "absolute";
  4927. if (!a)
  4928. return t.nodeName.toLowerCase() === "html" ? null : cC(t);
  4929. for (r = cC(t); r && r !== n && r.nodeType !== 9; r = cC(r))
  4930. if (i = ft.css(r, "position"), i !== "static")
  4931. return r;
  4932. return null;
  4933. }
  4934. var N8 = ft.getParent;
  4935. function Ede(t) {
  4936. if (ft.isWindow(t) || t.nodeType === 9)
  4937. return !1;
  4938. var e = ft.getDocument(t), n = e.body, r = null;
  4939. for (
  4940. r = N8(t);
  4941. // 修复元素位于 document.documentElement 下导致崩溃问题
  4942. r && r !== n && r !== e;
  4943. r = N8(r)
  4944. ) {
  4945. var i = ft.css(r, "position");
  4946. if (i === "fixed")
  4947. return !0;
  4948. }
  4949. return !1;
  4950. }
  4951. function gI(t, e) {
  4952. for (var n = {
  4953. left: 0,
  4954. right: 1 / 0,
  4955. top: 0,
  4956. bottom: 1 / 0
  4957. }, r = S2(t), i = ft.getDocument(t), a = i.defaultView || i.parentWindow, o = i.body, s = i.documentElement; r; ) {
  4958. if ((navigator.userAgent.indexOf("MSIE") === -1 || r.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
  4959. // viewport. In some browsers, el.offsetParent may be
  4960. // document.documentElement, so check for that too.
  4961. r !== o && r !== s && ft.css(r, "overflow") !== "visible") {
  4962. var l = ft.offset(r);
  4963. l.left += r.clientLeft, l.top += r.clientTop, n.top = Math.max(n.top, l.top), n.right = Math.min(
  4964. n.right,
  4965. // consider area without scrollBar
  4966. l.left + r.clientWidth
  4967. ), n.bottom = Math.min(n.bottom, l.top + r.clientHeight), n.left = Math.max(n.left, l.left);
  4968. } else if (r === o || r === s)
  4969. break;
  4970. r = S2(r);
  4971. }
  4972. var u = null;
  4973. if (!ft.isWindow(t) && t.nodeType !== 9) {
  4974. u = t.style.position;
  4975. var c = ft.css(t, "position");
  4976. c === "absolute" && (t.style.position = "fixed");
  4977. }
  4978. 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);
  4979. if (m.overflowX === "hidden" && (v = a.innerWidth), m.overflowY === "hidden" && (g = a.innerHeight), t.style && (t.style.position = u), e || Ede(t))
  4980. 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);
  4981. else {
  4982. var y = Math.max(v, f + h);
  4983. n.right = Math.min(n.right, y);
  4984. var b = Math.max(g, d + p);
  4985. n.bottom = Math.min(n.bottom, b);
  4986. }
  4987. return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
  4988. }
  4989. function Mde(t, e, n, r) {
  4990. var i = ft.clone(t), a = {
  4991. width: e.width,
  4992. height: e.height
  4993. };
  4994. 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);
  4995. }
  4996. function mI(t) {
  4997. var e, n, r;
  4998. if (!ft.isWindow(t) && t.nodeType !== 9)
  4999. e = ft.offset(t), n = ft.outerWidth(t), r = ft.outerHeight(t);
  5000. else {
  5001. var i = ft.getWindow(t);
  5002. e = {
  5003. left: ft.getWindowScrollLeft(i),
  5004. top: ft.getWindowScrollTop(i)
  5005. }, n = ft.viewportWidth(i), r = ft.viewportHeight(i);
  5006. }
  5007. return e.width = n, e.height = r, e;
  5008. }
  5009. function B8(t, e) {
  5010. var n = e.charAt(0), r = e.charAt(1), i = t.width, a = t.height, o = t.left, s = t.top;
  5011. return n === "c" ? s += a / 2 : n === "b" && (s += a), r === "c" ? o += i / 2 : r === "r" && (o += i), {
  5012. left: o,
  5013. top: s
  5014. };
  5015. }
  5016. function wy(t, e, n, r, i) {
  5017. var a = B8(e, n[1]), o = B8(t, n[0]), s = [o.left - a.left, o.top - a.top];
  5018. return {
  5019. left: Math.round(t.left - s[0] + r[0] - i[0]),
  5020. top: Math.round(t.top - s[1] + r[1] - i[1])
  5021. };
  5022. }
  5023. function z8(t, e, n) {
  5024. return t.left < n.left || t.left + e.width > n.right;
  5025. }
  5026. function V8(t, e, n) {
  5027. return t.top < n.top || t.top + e.height > n.bottom;
  5028. }
  5029. function Ide(t, e, n) {
  5030. return t.left > n.right || t.left + e.width < n.left;
  5031. }
  5032. function Dde(t, e, n) {
  5033. return t.top > n.bottom || t.top + e.height < n.top;
  5034. }
  5035. function Cy(t, e, n) {
  5036. var r = [];
  5037. return ft.each(t, function(i) {
  5038. r.push(i.replace(e, function(a) {
  5039. return n[a];
  5040. }));
  5041. }), r;
  5042. }
  5043. function Ty(t, e) {
  5044. return t[e] = -t[e], t;
  5045. }
  5046. function F8(t, e) {
  5047. var n;
  5048. return /%$/.test(t) ? n = parseInt(t.substring(0, t.length - 1), 10) / 100 * e : n = parseInt(t, 10), n || 0;
  5049. }
  5050. function W8(t, e) {
  5051. t[0] = F8(t[0], e.width), t[1] = F8(t[1], e.height);
  5052. }
  5053. function vZ(t, e, n, r) {
  5054. var i = n.points, a = n.offset || [0, 0], o = n.targetOffset || [0, 0], s = n.overflow, l = n.source || t;
  5055. a = [].concat(a), o = [].concat(o), s = s || {};
  5056. var u = {}, c = 0, f = !!(s && s.alwaysByViewport), d = gI(l, f), h = mI(l);
  5057. W8(a, h), W8(o, e);
  5058. var p = wy(h, e, i, a, o), v = ft.merge(h, p);
  5059. if (d && (s.adjustX || s.adjustY) && r) {
  5060. if (s.adjustX && z8(p, h, d)) {
  5061. var g = Cy(i, /[lr]/gi, {
  5062. l: "r",
  5063. r: "l"
  5064. }), m = Ty(a, 0), y = Ty(o, 0), b = wy(h, e, g, m, y);
  5065. Ide(b, h, d) || (c = 1, i = g, a = m, o = y);
  5066. }
  5067. if (s.adjustY && V8(p, h, d)) {
  5068. var _ = Cy(i, /[tb]/gi, {
  5069. t: "b",
  5070. b: "t"
  5071. }), O = Ty(a, 1), S = Ty(o, 1), x = wy(h, e, _, O, S);
  5072. Dde(x, h, d) || (c = 1, i = _, a = O, o = S);
  5073. }
  5074. c && (p = wy(h, e, i, a, o), ft.mix(v, p));
  5075. var C = z8(p, h, d), T = V8(p, h, d);
  5076. if (C || T) {
  5077. var w = i;
  5078. C && (w = Cy(i, /[lr]/gi, {
  5079. l: "r",
  5080. r: "l"
  5081. })), T && (w = Cy(i, /[tb]/gi, {
  5082. t: "b",
  5083. b: "t"
  5084. })), i = w, a = n.offset || [0, 0], o = n.targetOffset || [0, 0];
  5085. }
  5086. u.adjustX = s.adjustX && C, u.adjustY = s.adjustY && T, (u.adjustX || u.adjustY) && (v = Mde(p, h, d, u));
  5087. }
  5088. 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, {
  5089. left: v.left,
  5090. top: v.top
  5091. }, {
  5092. useCssRight: n.useCssRight,
  5093. useCssBottom: n.useCssBottom,
  5094. useCssTransform: n.useCssTransform,
  5095. ignoreShake: n.ignoreShake
  5096. }), {
  5097. points: i,
  5098. offset: a,
  5099. targetOffset: o,
  5100. overflow: u
  5101. };
  5102. }
  5103. function Rde(t, e) {
  5104. var n = gI(t, e), r = mI(t);
  5105. return !n || r.left + r.width <= n.left || r.top + r.height <= n.top || r.left >= n.right || r.top >= n.bottom;
  5106. }
  5107. function yI(t, e, n) {
  5108. var r = n.target || e, i = mI(r), a = !Rde(r, n.overflow && n.overflow.alwaysByViewport);
  5109. return vZ(t, i, n, a);
  5110. }
  5111. yI.__getOffsetParent = S2;
  5112. yI.__getVisibleRectForElement = gI;
  5113. function kde(t, e, n) {
  5114. 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);
  5115. "pageX" in e ? r = e.pageX : r = s + e.clientX, "pageY" in e ? i = e.pageY : i = l + e.clientY;
  5116. var f = {
  5117. left: r,
  5118. top: i,
  5119. width: 0,
  5120. height: 0
  5121. }, d = r >= 0 && r <= s + u && i >= 0 && i <= l + c, h = [n.points[0], "cc"];
  5122. return vZ(t, f, E8(E8({}, n), {}, {
  5123. points: h
  5124. }), d);
  5125. }
  5126. function Pn(t) {
  5127. 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;
  5128. if (Array.isArray(t) && (i = os(t)[0]), !i)
  5129. return null;
  5130. const a = Ns(i, e, r);
  5131. return a.props = n ? I(I({}, a.props), e) : a.props, Xr(typeof a.props.class != "object", "class must be string"), a;
  5132. }
  5133. function Lde(t, e, n) {
  5134. sf(Ns(t, I({}, e)), n);
  5135. }
  5136. const gZ = (t) => {
  5137. if (!t)
  5138. return !1;
  5139. if (t.offsetParent)
  5140. return !0;
  5141. if (t.getBBox) {
  5142. const e = t.getBBox();
  5143. if (e.width || e.height)
  5144. return !0;
  5145. }
  5146. if (t.getBoundingClientRect) {
  5147. const e = t.getBoundingClientRect();
  5148. if (e.width || e.height)
  5149. return !0;
  5150. }
  5151. return !1;
  5152. };
  5153. function Nde(t, e) {
  5154. 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;
  5155. }
  5156. function Bde(t, e) {
  5157. t !== document.activeElement && $l(e, t) && typeof t.focus == "function" && t.focus();
  5158. }
  5159. function Q8(t, e) {
  5160. let n = null, r = null;
  5161. function i(o) {
  5162. let [{
  5163. target: s
  5164. }] = o;
  5165. if (!document.documentElement.contains(s)) return;
  5166. const {
  5167. width: l,
  5168. height: u
  5169. } = s.getBoundingClientRect(), c = Math.floor(l), f = Math.floor(u);
  5170. (n !== c || r !== f) && Promise.resolve().then(() => {
  5171. e({
  5172. width: c,
  5173. height: f
  5174. });
  5175. }), n = c, r = f;
  5176. }
  5177. const a = new tj(i);
  5178. return t && a.observe(t), () => {
  5179. a.disconnect();
  5180. };
  5181. }
  5182. const zde = (t, e) => {
  5183. let n = !1, r = null;
  5184. function i() {
  5185. clearTimeout(r);
  5186. }
  5187. function a(o) {
  5188. if (!n || o === !0) {
  5189. if (t() === !1)
  5190. return;
  5191. n = !0, i(), r = setTimeout(() => {
  5192. n = !1;
  5193. }, e.value);
  5194. } else
  5195. i(), r = setTimeout(() => {
  5196. n = !1, a();
  5197. }, e.value);
  5198. }
  5199. return [a, () => {
  5200. n = !1, i();
  5201. }];
  5202. };
  5203. function Vde() {
  5204. this.__data__ = [], this.size = 0;
  5205. }
  5206. function p0(t, e) {
  5207. return t === e || t !== t && e !== e;
  5208. }
  5209. function QS(t, e) {
  5210. for (var n = t.length; n--; )
  5211. if (p0(t[n][0], e))
  5212. return n;
  5213. return -1;
  5214. }
  5215. var Fde = Array.prototype, Wde = Fde.splice;
  5216. function Qde(t) {
  5217. var e = this.__data__, n = QS(e, t);
  5218. if (n < 0)
  5219. return !1;
  5220. var r = e.length - 1;
  5221. return n == r ? e.pop() : Wde.call(e, n, 1), --this.size, !0;
  5222. }
  5223. function Hde(t) {
  5224. var e = this.__data__, n = QS(e, t);
  5225. return n < 0 ? void 0 : e[n][1];
  5226. }
  5227. function Gde(t) {
  5228. return QS(this.__data__, t) > -1;
  5229. }
  5230. function jde(t, e) {
  5231. var n = this.__data__, r = QS(n, t);
  5232. return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
  5233. }
  5234. function rl(t) {
  5235. var e = -1, n = t == null ? 0 : t.length;
  5236. for (this.clear(); ++e < n; ) {
  5237. var r = t[e];
  5238. this.set(r[0], r[1]);
  5239. }
  5240. }
  5241. rl.prototype.clear = Vde;
  5242. rl.prototype.delete = Qde;
  5243. rl.prototype.get = Hde;
  5244. rl.prototype.has = Gde;
  5245. rl.prototype.set = jde;
  5246. function Zde() {
  5247. this.__data__ = new rl(), this.size = 0;
  5248. }
  5249. function Ude(t) {
  5250. var e = this.__data__, n = e.delete(t);
  5251. return this.size = e.size, n;
  5252. }
  5253. function Xde(t) {
  5254. return this.__data__.get(t);
  5255. }
  5256. function Yde(t) {
  5257. return this.__data__.has(t);
  5258. }
  5259. var mZ = typeof global == "object" && global && global.Object === Object && global, qde = typeof self == "object" && self && self.Object === Object && self, fo = mZ || qde || Function("return this")(), Ta = fo.Symbol, yZ = Object.prototype, Kde = yZ.hasOwnProperty, Jde = yZ.toString, jp = Ta ? Ta.toStringTag : void 0;
  5260. function ehe(t) {
  5261. var e = Kde.call(t, jp), n = t[jp];
  5262. try {
  5263. t[jp] = void 0;
  5264. var r = !0;
  5265. } catch {
  5266. }
  5267. var i = Jde.call(t);
  5268. return r && (e ? t[jp] = n : delete t[jp]), i;
  5269. }
  5270. var the = Object.prototype, nhe = the.toString;
  5271. function rhe(t) {
  5272. return nhe.call(t);
  5273. }
  5274. var ihe = "[object Null]", ahe = "[object Undefined]", H8 = Ta ? Ta.toStringTag : void 0;
  5275. function bu(t) {
  5276. return t == null ? t === void 0 ? ahe : ihe : H8 && H8 in Object(t) ? ehe(t) : rhe(t);
  5277. }
  5278. function xr(t) {
  5279. var e = typeof t;
  5280. return t != null && (e == "object" || e == "function");
  5281. }
  5282. var ohe = "[object AsyncFunction]", she = "[object Function]", lhe = "[object GeneratorFunction]", uhe = "[object Proxy]";
  5283. function bI(t) {
  5284. if (!xr(t))
  5285. return !1;
  5286. var e = bu(t);
  5287. return e == she || e == lhe || e == ohe || e == uhe;
  5288. }
  5289. var fC = fo["__core-js_shared__"], G8 = function() {
  5290. var t = /[^.]+$/.exec(fC && fC.keys && fC.keys.IE_PROTO || "");
  5291. return t ? "Symbol(src)_1." + t : "";
  5292. }();
  5293. function che(t) {
  5294. return !!G8 && G8 in t;
  5295. }
  5296. var fhe = Function.prototype, dhe = fhe.toString;
  5297. function Ef(t) {
  5298. if (t != null) {
  5299. try {
  5300. return dhe.call(t);
  5301. } catch {
  5302. }
  5303. try {
  5304. return t + "";
  5305. } catch {
  5306. }
  5307. }
  5308. return "";
  5309. }
  5310. var hhe = /[\\^$.*+?()[\]{}|]/g, phe = /^\[object .+?Constructor\]$/, vhe = Function.prototype, ghe = Object.prototype, mhe = vhe.toString, yhe = ghe.hasOwnProperty, bhe = RegExp(
  5311. "^" + mhe.call(yhe).replace(hhe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  5312. );
  5313. function _he(t) {
  5314. if (!xr(t) || che(t))
  5315. return !1;
  5316. var e = bI(t) ? bhe : phe;
  5317. return e.test(Ef(t));
  5318. }
  5319. function Ohe(t, e) {
  5320. return t == null ? void 0 : t[e];
  5321. }
  5322. function Mf(t, e) {
  5323. var n = Ohe(t, e);
  5324. return _he(n) ? n : void 0;
  5325. }
  5326. var tm = Mf(fo, "Map"), nm = Mf(Object, "create");
  5327. function She() {
  5328. this.__data__ = nm ? nm(null) : {}, this.size = 0;
  5329. }
  5330. function xhe(t) {
  5331. var e = this.has(t) && delete this.__data__[t];
  5332. return this.size -= e ? 1 : 0, e;
  5333. }
  5334. var whe = "__lodash_hash_undefined__", Che = Object.prototype, The = Che.hasOwnProperty;
  5335. function Phe(t) {
  5336. var e = this.__data__;
  5337. if (nm) {
  5338. var n = e[t];
  5339. return n === whe ? void 0 : n;
  5340. }
  5341. return The.call(e, t) ? e[t] : void 0;
  5342. }
  5343. var $he = Object.prototype, Ahe = $he.hasOwnProperty;
  5344. function Ehe(t) {
  5345. var e = this.__data__;
  5346. return nm ? e[t] !== void 0 : Ahe.call(e, t);
  5347. }
  5348. var Mhe = "__lodash_hash_undefined__";
  5349. function Ihe(t, e) {
  5350. var n = this.__data__;
  5351. return this.size += this.has(t) ? 0 : 1, n[t] = nm && e === void 0 ? Mhe : e, this;
  5352. }
  5353. function hf(t) {
  5354. var e = -1, n = t == null ? 0 : t.length;
  5355. for (this.clear(); ++e < n; ) {
  5356. var r = t[e];
  5357. this.set(r[0], r[1]);
  5358. }
  5359. }
  5360. hf.prototype.clear = She;
  5361. hf.prototype.delete = xhe;
  5362. hf.prototype.get = Phe;
  5363. hf.prototype.has = Ehe;
  5364. hf.prototype.set = Ihe;
  5365. function Dhe() {
  5366. this.size = 0, this.__data__ = {
  5367. hash: new hf(),
  5368. map: new (tm || rl)(),
  5369. string: new hf()
  5370. };
  5371. }
  5372. function Rhe(t) {
  5373. var e = typeof t;
  5374. return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
  5375. }
  5376. function HS(t, e) {
  5377. var n = t.__data__;
  5378. return Rhe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
  5379. }
  5380. function khe(t) {
  5381. var e = HS(this, t).delete(t);
  5382. return this.size -= e ? 1 : 0, e;
  5383. }
  5384. function Lhe(t) {
  5385. return HS(this, t).get(t);
  5386. }
  5387. function Nhe(t) {
  5388. return HS(this, t).has(t);
  5389. }
  5390. function Bhe(t, e) {
  5391. var n = HS(this, t), r = n.size;
  5392. return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
  5393. }
  5394. function il(t) {
  5395. var e = -1, n = t == null ? 0 : t.length;
  5396. for (this.clear(); ++e < n; ) {
  5397. var r = t[e];
  5398. this.set(r[0], r[1]);
  5399. }
  5400. }
  5401. il.prototype.clear = Dhe;
  5402. il.prototype.delete = khe;
  5403. il.prototype.get = Lhe;
  5404. il.prototype.has = Nhe;
  5405. il.prototype.set = Bhe;
  5406. var zhe = 200;
  5407. function Vhe(t, e) {
  5408. var n = this.__data__;
  5409. if (n instanceof rl) {
  5410. var r = n.__data__;
  5411. if (!tm || r.length < zhe - 1)
  5412. return r.push([t, e]), this.size = ++n.size, this;
  5413. n = this.__data__ = new il(r);
  5414. }
  5415. return n.set(t, e), this.size = n.size, this;
  5416. }
  5417. function Ka(t) {
  5418. var e = this.__data__ = new rl(t);
  5419. this.size = e.size;
  5420. }
  5421. Ka.prototype.clear = Zde;
  5422. Ka.prototype.delete = Ude;
  5423. Ka.prototype.get = Xde;
  5424. Ka.prototype.has = Yde;
  5425. Ka.prototype.set = Vhe;
  5426. var Fhe = "__lodash_hash_undefined__";
  5427. function Whe(t) {
  5428. return this.__data__.set(t, Fhe), this;
  5429. }
  5430. function Qhe(t) {
  5431. return this.__data__.has(t);
  5432. }
  5433. function _h(t) {
  5434. var e = -1, n = t == null ? 0 : t.length;
  5435. for (this.__data__ = new il(); ++e < n; )
  5436. this.add(t[e]);
  5437. }
  5438. _h.prototype.add = _h.prototype.push = Whe;
  5439. _h.prototype.has = Qhe;
  5440. function Hhe(t, e) {
  5441. for (var n = -1, r = t == null ? 0 : t.length; ++n < r; )
  5442. if (e(t[n], n, t))
  5443. return !0;
  5444. return !1;
  5445. }
  5446. function x1(t, e) {
  5447. return t.has(e);
  5448. }
  5449. var Ghe = 1, jhe = 2;
  5450. function bZ(t, e, n, r, i, a) {
  5451. var o = n & Ghe, s = t.length, l = e.length;
  5452. if (s != l && !(o && l > s))
  5453. return !1;
  5454. var u = a.get(t), c = a.get(e);
  5455. if (u && c)
  5456. return u == e && c == t;
  5457. var f = -1, d = !0, h = n & jhe ? new _h() : void 0;
  5458. for (a.set(t, e), a.set(e, t); ++f < s; ) {
  5459. var p = t[f], v = e[f];
  5460. if (r)
  5461. var g = o ? r(v, p, f, e, t, a) : r(p, v, f, t, e, a);
  5462. if (g !== void 0) {
  5463. if (g)
  5464. continue;
  5465. d = !1;
  5466. break;
  5467. }
  5468. if (h) {
  5469. if (!Hhe(e, function(m, y) {
  5470. if (!x1(h, y) && (p === m || i(p, m, n, r, a)))
  5471. return h.push(y);
  5472. })) {
  5473. d = !1;
  5474. break;
  5475. }
  5476. } else if (!(p === v || i(p, v, n, r, a))) {
  5477. d = !1;
  5478. break;
  5479. }
  5480. }
  5481. return a.delete(t), a.delete(e), d;
  5482. }
  5483. var w1 = fo.Uint8Array;
  5484. function Zhe(t) {
  5485. var e = -1, n = Array(t.size);
  5486. return t.forEach(function(r, i) {
  5487. n[++e] = [i, r];
  5488. }), n;
  5489. }
  5490. function _I(t) {
  5491. var e = -1, n = Array(t.size);
  5492. return t.forEach(function(r) {
  5493. n[++e] = r;
  5494. }), n;
  5495. }
  5496. var Uhe = 1, Xhe = 2, Yhe = "[object Boolean]", qhe = "[object Date]", Khe = "[object Error]", Jhe = "[object Map]", epe = "[object Number]", tpe = "[object RegExp]", npe = "[object Set]", rpe = "[object String]", ipe = "[object Symbol]", ape = "[object ArrayBuffer]", ope = "[object DataView]", j8 = Ta ? Ta.prototype : void 0, dC = j8 ? j8.valueOf : void 0;
  5497. function spe(t, e, n, r, i, a, o) {
  5498. switch (n) {
  5499. case ope:
  5500. if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
  5501. return !1;
  5502. t = t.buffer, e = e.buffer;
  5503. case ape:
  5504. return !(t.byteLength != e.byteLength || !a(new w1(t), new w1(e)));
  5505. case Yhe:
  5506. case qhe:
  5507. case epe:
  5508. return p0(+t, +e);
  5509. case Khe:
  5510. return t.name == e.name && t.message == e.message;
  5511. case tpe:
  5512. case rpe:
  5513. return t == e + "";
  5514. case Jhe:
  5515. var s = Zhe;
  5516. case npe:
  5517. var l = r & Uhe;
  5518. if (s || (s = _I), t.size != e.size && !l)
  5519. return !1;
  5520. var u = o.get(t);
  5521. if (u)
  5522. return u == e;
  5523. r |= Xhe, o.set(t, e);
  5524. var c = bZ(s(t), s(e), r, i, a, o);
  5525. return o.delete(t), c;
  5526. case ipe:
  5527. if (dC)
  5528. return dC.call(t) == dC.call(e);
  5529. }
  5530. return !1;
  5531. }
  5532. function OI(t, e) {
  5533. for (var n = -1, r = e.length, i = t.length; ++n < r; )
  5534. t[i + n] = e[n];
  5535. return t;
  5536. }
  5537. var wi = Array.isArray;
  5538. function _Z(t, e, n) {
  5539. var r = e(t);
  5540. return wi(t) ? r : OI(r, n(t));
  5541. }
  5542. function lpe(t, e) {
  5543. for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
  5544. var o = t[n];
  5545. e(o, n, t) && (a[i++] = o);
  5546. }
  5547. return a;
  5548. }
  5549. function OZ() {
  5550. return [];
  5551. }
  5552. var upe = Object.prototype, cpe = upe.propertyIsEnumerable, Z8 = Object.getOwnPropertySymbols, SI = Z8 ? function(t) {
  5553. return t == null ? [] : (t = Object(t), lpe(Z8(t), function(e) {
  5554. return cpe.call(t, e);
  5555. }));
  5556. } : OZ;
  5557. function fpe(t, e) {
  5558. for (var n = -1, r = Array(t); ++n < t; )
  5559. r[n] = e(n);
  5560. return r;
  5561. }
  5562. function no(t) {
  5563. return t != null && typeof t == "object";
  5564. }
  5565. var dpe = "[object Arguments]";
  5566. function U8(t) {
  5567. return no(t) && bu(t) == dpe;
  5568. }
  5569. var SZ = Object.prototype, hpe = SZ.hasOwnProperty, ppe = SZ.propertyIsEnumerable, Oh = U8(/* @__PURE__ */ function() {
  5570. return arguments;
  5571. }()) ? U8 : function(t) {
  5572. return no(t) && hpe.call(t, "callee") && !ppe.call(t, "callee");
  5573. };
  5574. function vpe() {
  5575. return !1;
  5576. }
  5577. var xZ = typeof exports == "object" && exports && !exports.nodeType && exports, X8 = xZ && typeof module == "object" && module && !module.nodeType && module, gpe = X8 && X8.exports === xZ, Y8 = gpe ? fo.Buffer : void 0, mpe = Y8 ? Y8.isBuffer : void 0, Sh = mpe || vpe, ype = 9007199254740991, bpe = /^(?:0|[1-9]\d*)$/;
  5578. function GS(t, e) {
  5579. var n = typeof t;
  5580. return e = e ?? ype, !!e && (n == "number" || n != "symbol" && bpe.test(t)) && t > -1 && t % 1 == 0 && t < e;
  5581. }
  5582. var _pe = 9007199254740991;
  5583. function xI(t) {
  5584. return typeof t == "number" && t > -1 && t % 1 == 0 && t <= _pe;
  5585. }
  5586. var Ope = "[object Arguments]", Spe = "[object Array]", xpe = "[object Boolean]", wpe = "[object Date]", Cpe = "[object Error]", Tpe = "[object Function]", Ppe = "[object Map]", $pe = "[object Number]", Ape = "[object Object]", Epe = "[object RegExp]", Mpe = "[object Set]", Ipe = "[object String]", Dpe = "[object WeakMap]", Rpe = "[object ArrayBuffer]", kpe = "[object DataView]", Lpe = "[object Float32Array]", Npe = "[object Float64Array]", Bpe = "[object Int8Array]", zpe = "[object Int16Array]", Vpe = "[object Int32Array]", Fpe = "[object Uint8Array]", Wpe = "[object Uint8ClampedArray]", Qpe = "[object Uint16Array]", Hpe = "[object Uint32Array]", ln = {};
  5587. ln[Lpe] = ln[Npe] = ln[Bpe] = ln[zpe] = ln[Vpe] = ln[Fpe] = ln[Wpe] = ln[Qpe] = ln[Hpe] = !0;
  5588. ln[Ope] = ln[Spe] = ln[Rpe] = ln[xpe] = ln[kpe] = ln[wpe] = ln[Cpe] = ln[Tpe] = ln[Ppe] = ln[$pe] = ln[Ape] = ln[Epe] = ln[Mpe] = ln[Ipe] = ln[Dpe] = !1;
  5589. function Gpe(t) {
  5590. return no(t) && xI(t.length) && !!ln[bu(t)];
  5591. }
  5592. function jS(t) {
  5593. return function(e) {
  5594. return t(e);
  5595. };
  5596. }
  5597. var wZ = typeof exports == "object" && exports && !exports.nodeType && exports, sg = wZ && typeof module == "object" && module && !module.nodeType && module, jpe = sg && sg.exports === wZ, hC = jpe && mZ.process, xh = function() {
  5598. try {
  5599. var t = sg && sg.require && sg.require("util").types;
  5600. return t || hC && hC.binding && hC.binding("util");
  5601. } catch {
  5602. }
  5603. }(), q8 = xh && xh.isTypedArray, ZS = q8 ? jS(q8) : Gpe, Zpe = Object.prototype, Upe = Zpe.hasOwnProperty;
  5604. function CZ(t, e) {
  5605. var n = wi(t), r = !n && Oh(t), i = !n && !r && Sh(t), a = !n && !r && !i && ZS(t), o = n || r || i || a, s = o ? fpe(t.length, String) : [], l = s.length;
  5606. for (var u in t)
  5607. (e || Upe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
  5608. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  5609. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  5610. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
  5611. GS(u, l))) && s.push(u);
  5612. return s;
  5613. }
  5614. var Xpe = Object.prototype;
  5615. function US(t) {
  5616. var e = t && t.constructor, n = typeof e == "function" && e.prototype || Xpe;
  5617. return t === n;
  5618. }
  5619. function TZ(t, e) {
  5620. return function(n) {
  5621. return t(e(n));
  5622. };
  5623. }
  5624. var Ype = TZ(Object.keys, Object), qpe = Object.prototype, Kpe = qpe.hasOwnProperty;
  5625. function PZ(t) {
  5626. if (!US(t))
  5627. return Ype(t);
  5628. var e = [];
  5629. for (var n in Object(t))
  5630. Kpe.call(t, n) && n != "constructor" && e.push(n);
  5631. return e;
  5632. }
  5633. function op(t) {
  5634. return t != null && xI(t.length) && !bI(t);
  5635. }
  5636. function v0(t) {
  5637. return op(t) ? CZ(t) : PZ(t);
  5638. }
  5639. function x2(t) {
  5640. return _Z(t, v0, SI);
  5641. }
  5642. var Jpe = 1, eve = Object.prototype, tve = eve.hasOwnProperty;
  5643. function nve(t, e, n, r, i, a) {
  5644. var o = n & Jpe, s = x2(t), l = s.length, u = x2(e), c = u.length;
  5645. if (l != c && !o)
  5646. return !1;
  5647. for (var f = l; f--; ) {
  5648. var d = s[f];
  5649. if (!(o ? d in e : tve.call(e, d)))
  5650. return !1;
  5651. }
  5652. var h = a.get(t), p = a.get(e);
  5653. if (h && p)
  5654. return h == e && p == t;
  5655. var v = !0;
  5656. a.set(t, e), a.set(e, t);
  5657. for (var g = o; ++f < l; ) {
  5658. d = s[f];
  5659. var m = t[d], y = e[d];
  5660. if (r)
  5661. var b = o ? r(y, m, d, e, t, a) : r(m, y, d, t, e, a);
  5662. if (!(b === void 0 ? m === y || i(m, y, n, r, a) : b)) {
  5663. v = !1;
  5664. break;
  5665. }
  5666. g || (g = d == "constructor");
  5667. }
  5668. if (v && !g) {
  5669. var _ = t.constructor, O = e.constructor;
  5670. _ != O && "constructor" in t && "constructor" in e && !(typeof _ == "function" && _ instanceof _ && typeof O == "function" && O instanceof O) && (v = !1);
  5671. }
  5672. return a.delete(t), a.delete(e), v;
  5673. }
  5674. var w2 = Mf(fo, "DataView"), C2 = Mf(fo, "Promise"), Zd = Mf(fo, "Set"), T2 = Mf(fo, "WeakMap"), K8 = "[object Map]", rve = "[object Object]", J8 = "[object Promise]", eN = "[object Set]", tN = "[object WeakMap]", nN = "[object DataView]", ive = Ef(w2), ave = Ef(tm), ove = Ef(C2), sve = Ef(Zd), lve = Ef(T2), da = bu;
  5675. (w2 && da(new w2(new ArrayBuffer(1))) != nN || tm && da(new tm()) != K8 || C2 && da(C2.resolve()) != J8 || Zd && da(new Zd()) != eN || T2 && da(new T2()) != tN) && (da = function(t) {
  5676. var e = bu(t), n = e == rve ? t.constructor : void 0, r = n ? Ef(n) : "";
  5677. if (r)
  5678. switch (r) {
  5679. case ive:
  5680. return nN;
  5681. case ave:
  5682. return K8;
  5683. case ove:
  5684. return J8;
  5685. case sve:
  5686. return eN;
  5687. case lve:
  5688. return tN;
  5689. }
  5690. return e;
  5691. });
  5692. var uve = 1, rN = "[object Arguments]", iN = "[object Array]", Py = "[object Object]", cve = Object.prototype, aN = cve.hasOwnProperty;
  5693. function fve(t, e, n, r, i, a) {
  5694. var o = wi(t), s = wi(e), l = o ? iN : da(t), u = s ? iN : da(e);
  5695. l = l == rN ? Py : l, u = u == rN ? Py : u;
  5696. var c = l == Py, f = u == Py, d = l == u;
  5697. if (d && Sh(t)) {
  5698. if (!Sh(e))
  5699. return !1;
  5700. o = !0, c = !1;
  5701. }
  5702. if (d && !c)
  5703. return a || (a = new Ka()), o || ZS(t) ? bZ(t, e, n, r, i, a) : spe(t, e, l, n, r, i, a);
  5704. if (!(n & uve)) {
  5705. var h = c && aN.call(t, "__wrapped__"), p = f && aN.call(e, "__wrapped__");
  5706. if (h || p) {
  5707. var v = h ? t.value() : t, g = p ? e.value() : e;
  5708. return a || (a = new Ka()), i(v, g, n, r, a);
  5709. }
  5710. }
  5711. return d ? (a || (a = new Ka()), nve(t, e, n, r, i, a)) : !1;
  5712. }
  5713. function XS(t, e, n, r, i) {
  5714. return t === e ? !0 : t == null || e == null || !no(t) && !no(e) ? t !== t && e !== e : fve(t, e, n, r, XS, i);
  5715. }
  5716. function YS(t, e) {
  5717. return XS(t, e);
  5718. }
  5719. const dve = {
  5720. align: Object,
  5721. target: [Object, Function],
  5722. onAlign: Function,
  5723. monitorBufferTime: Number,
  5724. monitorWindowResize: Boolean,
  5725. disabled: Boolean
  5726. };
  5727. function oN(t) {
  5728. return typeof t != "function" ? null : t();
  5729. }
  5730. function sN(t) {
  5731. return typeof t != "object" || !t ? null : t;
  5732. }
  5733. const hve = te({
  5734. compatConfig: {
  5735. MODE: 3
  5736. },
  5737. name: "Align",
  5738. props: dve,
  5739. emits: ["align"],
  5740. setup(t, e) {
  5741. let {
  5742. expose: n,
  5743. slots: r
  5744. } = e;
  5745. const i = U({}), a = U(), [o, s] = zde(() => {
  5746. const {
  5747. disabled: d,
  5748. target: h,
  5749. align: p,
  5750. onAlign: v
  5751. } = t;
  5752. if (!d && h && a.value) {
  5753. const g = a.value;
  5754. let m;
  5755. const y = oN(h), b = sN(h);
  5756. i.value.element = y, i.value.point = b, i.value.align = p;
  5757. const {
  5758. activeElement: _
  5759. } = document;
  5760. return y && gZ(y) ? m = yI(g, y, p) : b && (m = kde(g, b, p)), Bde(_, g), v && m && v(g, m), !0;
  5761. }
  5762. return !1;
  5763. }, L(() => t.monitorBufferTime)), l = U({
  5764. cancel: () => {
  5765. }
  5766. }), u = U({
  5767. cancel: () => {
  5768. }
  5769. }), c = () => {
  5770. const d = t.target, h = oN(d), p = sN(d);
  5771. a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = Q8(a.value, o)), (i.value.element !== h || !Nde(i.value.point, p) || !YS(i.value.align, t.align)) && (o(), l.value.element !== h && (l.value.cancel(), l.value.element = h, l.value.cancel = Q8(h, o)));
  5772. };
  5773. it(() => {
  5774. Tt(() => {
  5775. c();
  5776. });
  5777. }), ep(() => {
  5778. Tt(() => {
  5779. c();
  5780. });
  5781. }), se(() => t.disabled, (d) => {
  5782. d ? s() : o();
  5783. }, {
  5784. immediate: !0,
  5785. flush: "post"
  5786. });
  5787. const f = U(null);
  5788. return se(() => t.monitorWindowResize, (d) => {
  5789. d ? f.value || (f.value = vr(window, "resize", o)) : f.value && (f.value.remove(), f.value = null);
  5790. }, {
  5791. flush: "post"
  5792. }), nl(() => {
  5793. l.value.cancel(), u.value.cancel(), f.value && f.value.remove(), s();
  5794. }), n({
  5795. forceAlign: () => o(!0)
  5796. }), () => {
  5797. const d = r == null ? void 0 : r.default();
  5798. return d ? Pn(d[0], {
  5799. ref: a
  5800. }, !0, !0) : null;
  5801. };
  5802. }
  5803. });
  5804. ru("bottomLeft", "bottomRight", "topLeft", "topRight");
  5805. const pve = (t) => t !== void 0 && (t === "topLeft" || t === "topRight") ? "slide-down" : "slide-up", g0 = function(t) {
  5806. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  5807. return I(t ? {
  5808. name: t,
  5809. appear: !0,
  5810. // type: 'animation',
  5811. // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
  5812. // appearActiveClass: `antdv-base-transtion`,
  5813. // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
  5814. enterFromClass: `${t}-enter ${t}-enter-prepare ${t}-enter-start`,
  5815. enterActiveClass: `${t}-enter ${t}-enter-prepare`,
  5816. enterToClass: `${t}-enter ${t}-enter-active`,
  5817. leaveFromClass: ` ${t}-leave`,
  5818. leaveActiveClass: `${t}-leave ${t}-leave-active`,
  5819. leaveToClass: `${t}-leave ${t}-leave-active`
  5820. } : {
  5821. css: !1
  5822. }, e);
  5823. }, wI = function(t) {
  5824. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  5825. return I(t ? {
  5826. name: t,
  5827. appear: !0,
  5828. // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
  5829. appearActiveClass: `${t}`,
  5830. appearToClass: `${t}-appear ${t}-appear-active`,
  5831. enterFromClass: `${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,
  5832. enterActiveClass: `${t}`,
  5833. enterToClass: `${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,
  5834. leaveActiveClass: `${t} ${t}-leave`,
  5835. leaveToClass: `${t}-leave-active`
  5836. } : {
  5837. css: !1
  5838. }, e);
  5839. }, es = (t, e, n) => n !== void 0 ? n : `${t}-${e}`, vve = te({
  5840. compatConfig: {
  5841. MODE: 3
  5842. },
  5843. name: "PopupInner",
  5844. inheritAttrs: !1,
  5845. props: dI,
  5846. emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  5847. setup(t, e) {
  5848. let {
  5849. expose: n,
  5850. attrs: r,
  5851. slots: i
  5852. } = e;
  5853. const a = ae(), o = ae(), s = ae(), [l, u] = lde(Nn(t, "stretch")), c = () => {
  5854. t.stretch && u(t.getRootDomNode());
  5855. }, f = ae(!1);
  5856. let d;
  5857. se(() => t.visible, (S) => {
  5858. clearTimeout(d), S ? d = setTimeout(() => {
  5859. f.value = t.visible;
  5860. }) : f.value = !1;
  5861. }, {
  5862. immediate: !0
  5863. });
  5864. const [h, p] = sde(f, c), v = ae(), g = () => t.point ? t.point : t.getRootDomNode, m = () => {
  5865. var S;
  5866. (S = a.value) === null || S === void 0 || S.forceAlign();
  5867. }, y = (S, x) => {
  5868. var C;
  5869. const T = t.getClassNameFromAlign(x), w = s.value;
  5870. s.value !== T && (s.value = T), h.value === "align" && (w !== T ? Promise.resolve().then(() => {
  5871. m();
  5872. }) : p(() => {
  5873. var P;
  5874. (P = v.value) === null || P === void 0 || P.call(v);
  5875. }), (C = t.onAlign) === null || C === void 0 || C.call(t, S, x));
  5876. }, b = L(() => {
  5877. const S = typeof t.animation == "object" ? t.animation : hI(t);
  5878. return ["onAfterEnter", "onAfterLeave"].forEach((x) => {
  5879. const C = S[x];
  5880. S[x] = (T) => {
  5881. p(), h.value = "stable", C == null || C(T);
  5882. };
  5883. }), S;
  5884. }), _ = () => new Promise((S) => {
  5885. v.value = S;
  5886. });
  5887. se([b, h], () => {
  5888. !b.value && h.value === "motion" && p();
  5889. }, {
  5890. immediate: !0
  5891. }), n({
  5892. forceAlign: m,
  5893. getElement: () => o.value.$el || o.value
  5894. });
  5895. const O = L(() => {
  5896. var S;
  5897. return !(!((S = t.align) === null || S === void 0) && S.points && (h.value === "align" || h.value === "stable"));
  5898. });
  5899. return () => {
  5900. var S;
  5901. const {
  5902. zIndex: x,
  5903. align: C,
  5904. prefixCls: T,
  5905. destroyPopupOnHide: w,
  5906. onMouseenter: P,
  5907. onMouseleave: $,
  5908. onTouchstart: A = () => {
  5909. },
  5910. onMousedown: D
  5911. } = t, E = h.value, R = [I(I({}, l.value), {
  5912. zIndex: x,
  5913. opacity: E === "motion" || E === "stable" || !f.value ? null : 0,
  5914. // pointerEvents: statusValue === 'stable' ? null : 'none',
  5915. pointerEvents: !f.value && E !== "stable" ? "none" : null
  5916. }), r.style];
  5917. let N = Yn((S = i.default) === null || S === void 0 ? void 0 : S.call(i, {
  5918. visible: t.visible
  5919. }));
  5920. N.length > 1 && (N = M("div", {
  5921. class: `${T}-content`
  5922. }, [N]));
  5923. const V = ye(T, r.class, s.value, !t.arrow && `${T}-arrow-hidden`), W = f.value || !t.visible ? g0(b.value.name, b.value) : {};
  5924. return M(co, j(j({
  5925. ref: o
  5926. }, W), {}, {
  5927. onBeforeEnter: _
  5928. }), {
  5929. default: () => !w || t.visible ? bi(M(hve, {
  5930. target: g(),
  5931. key: "popup",
  5932. ref: a,
  5933. monitorWindowResize: !0,
  5934. disabled: O.value,
  5935. align: C,
  5936. onAlign: y
  5937. }, {
  5938. default: () => M("div", {
  5939. class: V,
  5940. onMouseenter: P,
  5941. onMouseleave: $,
  5942. onMousedown: lf(D, ["capture"]),
  5943. [pr ? "onTouchstartPassive" : "onTouchstart"]: lf(A, ["capture"]),
  5944. style: R
  5945. }, [N])
  5946. }), [[Bs, f.value]]) : null
  5947. });
  5948. };
  5949. }
  5950. }), gve = te({
  5951. compatConfig: {
  5952. MODE: 3
  5953. },
  5954. name: "Popup",
  5955. inheritAttrs: !1,
  5956. props: ide,
  5957. setup(t, e) {
  5958. let {
  5959. attrs: n,
  5960. slots: r,
  5961. expose: i
  5962. } = e;
  5963. const a = ae(!1), o = ae(!1), s = ae(), l = ae();
  5964. return se([() => t.visible, () => t.mobile], () => {
  5965. a.value = t.visible, t.visible && t.mobile && (o.value = !0);
  5966. }, {
  5967. immediate: !0,
  5968. flush: "post"
  5969. }), i({
  5970. forceAlign: () => {
  5971. var u;
  5972. (u = s.value) === null || u === void 0 || u.forceAlign();
  5973. },
  5974. getElement: () => {
  5975. var u;
  5976. return (u = s.value) === null || u === void 0 ? void 0 : u.getElement();
  5977. }
  5978. }), () => {
  5979. const u = I(I(I({}, t), n), {
  5980. visible: a.value
  5981. }), c = o.value ? M(ade, j(j({}, u), {}, {
  5982. mobile: t.mobile,
  5983. ref: s
  5984. }), {
  5985. default: r.default
  5986. }) : M(vve, j(j({}, u), {}, {
  5987. ref: s
  5988. }), {
  5989. default: r.default
  5990. });
  5991. return M("div", {
  5992. ref: l
  5993. }, [M(sZ, u, null), c]);
  5994. };
  5995. }
  5996. });
  5997. function mve(t, e, n) {
  5998. return n ? t[0] === e[0] : t[0] === e[0] && t[1] === e[1];
  5999. }
  6000. function lN(t, e, n) {
  6001. const r = t[e] || {};
  6002. return I(I({}, r), n);
  6003. }
  6004. function yve(t, e, n, r) {
  6005. const {
  6006. points: i
  6007. } = n, a = Object.keys(t);
  6008. for (let o = 0; o < a.length; o += 1) {
  6009. const s = a[o];
  6010. if (mve(t[s].points, i, r))
  6011. return `${e}-placement-${s}`;
  6012. }
  6013. return "";
  6014. }
  6015. const qS = {
  6016. methods: {
  6017. setState() {
  6018. 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;
  6019. if (this.getDerivedStateFromProps) {
  6020. const r = this.getDerivedStateFromProps(Aue(this), I(I({}, this.$data), n));
  6021. if (r === null)
  6022. return;
  6023. n = I(I({}, n), r || {});
  6024. }
  6025. I(this.$data, n), this._.isMounted && this.$forceUpdate(), Tt(() => {
  6026. e && e();
  6027. });
  6028. },
  6029. __emit() {
  6030. const t = [].slice.call(arguments, 0);
  6031. let e = t[0];
  6032. e = `on${e[0].toUpperCase()}${e.substring(1)}`;
  6033. const n = this.$props[e] || this.$attrs[e];
  6034. if (t.length && n)
  6035. if (Array.isArray(n))
  6036. for (let r = 0, i = n.length; r < i; r++)
  6037. n[r](...t.slice(1));
  6038. else
  6039. n(...t.slice(1));
  6040. }
  6041. }
  6042. }, $Z = Symbol("PortalContextKey"), CI = function(t) {
  6043. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
  6044. inTriggerContext: !0
  6045. };
  6046. pt($Z, {
  6047. inTriggerContext: e.inTriggerContext,
  6048. shouldRender: L(() => {
  6049. const {
  6050. sPopupVisible: n,
  6051. popupRef: r,
  6052. forceRender: i,
  6053. autoDestroy: a
  6054. } = t || {};
  6055. let o = !1;
  6056. return (n || r || i) && (o = !0), !n && a && (o = !1), o;
  6057. })
  6058. });
  6059. }, bve = () => {
  6060. CI({}, {
  6061. inTriggerContext: !1
  6062. });
  6063. const t = Ge($Z, {
  6064. shouldRender: L(() => !1),
  6065. inTriggerContext: !1
  6066. });
  6067. return {
  6068. shouldRender: L(() => t.shouldRender.value || t.inTriggerContext === !1)
  6069. };
  6070. }, AZ = te({
  6071. compatConfig: {
  6072. MODE: 3
  6073. },
  6074. name: "Portal",
  6075. inheritAttrs: !1,
  6076. props: {
  6077. getContainer: Y.func.isRequired,
  6078. didUpdate: Function
  6079. },
  6080. setup(t, e) {
  6081. let {
  6082. slots: n
  6083. } = e, r = !0, i;
  6084. const {
  6085. shouldRender: a
  6086. } = bve();
  6087. function o() {
  6088. a.value && (i = t.getContainer());
  6089. }
  6090. H9(() => {
  6091. r = !1, o();
  6092. }), it(() => {
  6093. i || o();
  6094. });
  6095. const s = se(a, () => {
  6096. a.value && !i && (i = t.getContainer()), i && s();
  6097. });
  6098. return ep(() => {
  6099. Tt(() => {
  6100. var l;
  6101. a.value && ((l = t.didUpdate) === null || l === void 0 || l.call(t, t));
  6102. });
  6103. }), () => {
  6104. var l;
  6105. return a.value ? r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : i ? M(PS, {
  6106. to: i
  6107. }, n) : null : null;
  6108. };
  6109. }
  6110. });
  6111. let pC;
  6112. function _ve(t) {
  6113. if (typeof document > "u")
  6114. return 0;
  6115. if (pC === void 0) {
  6116. const e = document.createElement("div");
  6117. e.style.width = "100%", e.style.height = "200px";
  6118. const n = document.createElement("div"), r = n.style;
  6119. 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);
  6120. const i = e.offsetWidth;
  6121. n.style.overflow = "scroll";
  6122. let a = e.offsetWidth;
  6123. i === a && (a = n.clientWidth), document.body.removeChild(n), pC = i - a;
  6124. }
  6125. return pC;
  6126. }
  6127. const Ove = `vc-util-locker-${Date.now()}`;
  6128. let uN = 0;
  6129. function Sve() {
  6130. return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
  6131. }
  6132. function xve(t) {
  6133. const e = L(() => !!t && !!t.value);
  6134. uN += 1;
  6135. const n = `${Ove}_${uN}`;
  6136. ht((r) => {
  6137. if (wa()) {
  6138. if (e.value) {
  6139. const i = _ve(), a = Sve();
  6140. Yg(`
  6141. html body {
  6142. overflow-y: hidden;
  6143. ${a ? `width: calc(100% - ${i}px);` : ""}
  6144. }`, n);
  6145. } else
  6146. m1(n);
  6147. r(() => {
  6148. m1(n);
  6149. });
  6150. }
  6151. }, {
  6152. flush: "post"
  6153. });
  6154. }
  6155. let Ru = 0;
  6156. const x_ = wa(), cN = (t) => {
  6157. if (!x_)
  6158. return null;
  6159. if (t) {
  6160. if (typeof t == "string")
  6161. return document.querySelectorAll(t)[0];
  6162. if (typeof t == "function")
  6163. return t();
  6164. if (typeof t == "object" && t instanceof window.HTMLElement)
  6165. return t;
  6166. }
  6167. return document.body;
  6168. }, EZ = te({
  6169. compatConfig: {
  6170. MODE: 3
  6171. },
  6172. name: "PortalWrapper",
  6173. inheritAttrs: !1,
  6174. props: {
  6175. wrapperClassName: String,
  6176. forceRender: {
  6177. type: Boolean,
  6178. default: void 0
  6179. },
  6180. getContainer: Y.any,
  6181. visible: {
  6182. type: Boolean,
  6183. default: void 0
  6184. },
  6185. autoLock: nt(),
  6186. didUpdate: Function
  6187. },
  6188. setup(t, e) {
  6189. let {
  6190. slots: n
  6191. } = e;
  6192. const r = ae(), i = ae(), a = ae(), o = ae(1), s = wa() && document.createElement("div"), l = () => {
  6193. var h, p;
  6194. 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;
  6195. };
  6196. let u = null;
  6197. const c = function() {
  6198. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || r.value && !r.value.parentNode ? (u = cN(t.getContainer), u ? (u.appendChild(r.value), !0) : !1) : !0;
  6199. }, f = () => x_ ? (r.value || (r.value = s, c(!0)), d(), r.value) : null, d = () => {
  6200. const {
  6201. wrapperClassName: h
  6202. } = t;
  6203. r.value && h && h !== r.value.className && (r.value.className = h);
  6204. };
  6205. return ep(() => {
  6206. d(), c();
  6207. }), xve(L(() => t.autoLock && t.visible && wa() && (r.value === document.body || r.value === s))), it(() => {
  6208. let h = !1;
  6209. se([() => t.visible, () => t.getContainer], (p, v) => {
  6210. let [g, m] = p, [y, b] = v;
  6211. x_ && (u = cN(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;
  6212. }, {
  6213. immediate: !0,
  6214. flush: "post"
  6215. }), Tt(() => {
  6216. c() || (a.value = xt(() => {
  6217. o.value += 1;
  6218. }));
  6219. });
  6220. }), yt(() => {
  6221. const {
  6222. visible: h
  6223. } = t;
  6224. x_ && u === document.body && (Ru = h && Ru ? Ru - 1 : Ru), l(), xt.cancel(a.value);
  6225. }), () => {
  6226. const {
  6227. forceRender: h,
  6228. visible: p
  6229. } = t;
  6230. let v = null;
  6231. const g = {
  6232. getOpenCount: () => Ru,
  6233. getContainer: f
  6234. };
  6235. return o.value && (h || p || i.value) && (v = M(AZ, {
  6236. getContainer: f,
  6237. ref: i,
  6238. didUpdate: t.didUpdate
  6239. }, {
  6240. default: () => {
  6241. var m;
  6242. return (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g);
  6243. }
  6244. })), v;
  6245. };
  6246. }
  6247. }), wve = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], KS = te({
  6248. compatConfig: {
  6249. MODE: 3
  6250. },
  6251. name: "Trigger",
  6252. mixins: [qS],
  6253. inheritAttrs: !1,
  6254. props: nde(),
  6255. setup(t) {
  6256. const e = L(() => {
  6257. const {
  6258. popupPlacement: i,
  6259. popupAlign: a,
  6260. builtinPlacements: o
  6261. } = t;
  6262. return i && o ? lN(o, i, a) : a;
  6263. }), n = ae(null), r = (i) => {
  6264. n.value = i;
  6265. };
  6266. return {
  6267. vcTriggerContext: Ge("vcTriggerContext", {}),
  6268. popupRef: n,
  6269. setPopupRef: r,
  6270. triggerRef: ae(null),
  6271. align: e,
  6272. focusTime: null,
  6273. clickOutsideHandler: null,
  6274. contextmenuOutsideHandler1: null,
  6275. contextmenuOutsideHandler2: null,
  6276. touchOutsideHandler: null,
  6277. attachId: null,
  6278. delayTimer: null,
  6279. hasPopupMouseDown: !1,
  6280. preClickTime: null,
  6281. preTouchTime: null,
  6282. mouseDownTimeout: null,
  6283. childOriginEvents: {}
  6284. };
  6285. },
  6286. data() {
  6287. const t = this.$props;
  6288. let e;
  6289. return this.popupVisible !== void 0 ? e = !!t.popupVisible : e = !!t.defaultPopupVisible, wve.forEach((n) => {
  6290. this[`fire${n}`] = (r) => {
  6291. this.fireEvents(n, r);
  6292. };
  6293. }), {
  6294. prevPopupVisible: e,
  6295. sPopupVisible: e,
  6296. point: null
  6297. };
  6298. },
  6299. watch: {
  6300. popupVisible(t) {
  6301. t !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = t);
  6302. }
  6303. },
  6304. created() {
  6305. pt("vcTriggerContext", {
  6306. onPopupMouseDown: this.onPopupMouseDown,
  6307. onPopupMouseenter: this.onPopupMouseenter,
  6308. onPopupMouseleave: this.onPopupMouseleave
  6309. }), CI(this);
  6310. },
  6311. deactivated() {
  6312. this.setPopupVisible(!1);
  6313. },
  6314. mounted() {
  6315. this.$nextTick(() => {
  6316. this.updatedCal();
  6317. });
  6318. },
  6319. updated() {
  6320. this.$nextTick(() => {
  6321. this.updatedCal();
  6322. });
  6323. },
  6324. beforeUnmount() {
  6325. this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), xt.cancel(this.attachId);
  6326. },
  6327. methods: {
  6328. updatedCal() {
  6329. const t = this.$props;
  6330. if (this.$data.sPopupVisible) {
  6331. let n;
  6332. !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 ? {
  6333. passive: !1
  6334. } : !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));
  6335. } else
  6336. this.clearOutsideHandler();
  6337. },
  6338. onMouseenter(t) {
  6339. const {
  6340. mouseEnterDelay: e
  6341. } = this.$props;
  6342. this.fireEvents("onMouseenter", t), this.delaySetPopupVisible(!0, e, e ? null : t);
  6343. },
  6344. onMouseMove(t) {
  6345. this.fireEvents("onMousemove", t), this.setPoint(t);
  6346. },
  6347. onMouseleave(t) {
  6348. this.fireEvents("onMouseleave", t), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
  6349. },
  6350. onPopupMouseenter() {
  6351. const {
  6352. vcTriggerContext: t = {}
  6353. } = this;
  6354. t.onPopupMouseenter && t.onPopupMouseenter(), this.clearDelayTimer();
  6355. },
  6356. onPopupMouseleave(t) {
  6357. var e;
  6358. if (t && t.relatedTarget && !t.relatedTarget.setTimeout && $l((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement(), t.relatedTarget))
  6359. return;
  6360. this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
  6361. const {
  6362. vcTriggerContext: n = {}
  6363. } = this;
  6364. n.onPopupMouseleave && n.onPopupMouseleave(t);
  6365. },
  6366. onFocus(t) {
  6367. this.fireEvents("onFocus", t), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
  6368. },
  6369. onMousedown(t) {
  6370. this.fireEvents("onMousedown", t), this.preClickTime = Date.now();
  6371. },
  6372. onTouchstart(t) {
  6373. this.fireEvents("onTouchstart", t), this.preTouchTime = Date.now();
  6374. },
  6375. onBlur(t) {
  6376. $l(t.target, t.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", t), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
  6377. },
  6378. onContextmenu(t) {
  6379. t.preventDefault(), this.fireEvents("onContextmenu", t), this.setPopupVisible(!0, t);
  6380. },
  6381. onContextmenuClose() {
  6382. this.isContextmenuToShow() && this.close();
  6383. },
  6384. onClick(t) {
  6385. if (this.fireEvents("onClick", t), this.focusTime) {
  6386. let n;
  6387. 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)
  6388. return;
  6389. this.focusTime = 0;
  6390. }
  6391. this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && t && t.preventDefault && t.preventDefault(), t && t.domEvent && t.domEvent.preventDefault();
  6392. const e = !this.$data.sPopupVisible;
  6393. (this.isClickToHide() && !e || e && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, t);
  6394. },
  6395. onPopupMouseDown() {
  6396. const {
  6397. vcTriggerContext: t = {}
  6398. } = this;
  6399. this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
  6400. this.hasPopupMouseDown = !1;
  6401. }, 0), t.onPopupMouseDown && t.onPopupMouseDown(...arguments);
  6402. },
  6403. onDocumentClick(t) {
  6404. if (this.$props.mask && !this.$props.maskClosable)
  6405. return;
  6406. const e = t.target, n = this.getRootDomNode(), r = this.getPopupDomNode();
  6407. // mousedown on the target should also close popup when action is contextMenu.
  6408. // https://github.com/ant-design/ant-design/issues/29853
  6409. (!$l(n, e) || this.isContextMenuOnly()) && !$l(r, e) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
  6410. },
  6411. getPopupDomNode() {
  6412. var t;
  6413. return ((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement()) || null;
  6414. },
  6415. getRootDomNode() {
  6416. var t, e, n, r;
  6417. const {
  6418. getTriggerDOMNode: i
  6419. } = this.$props;
  6420. if (i) {
  6421. const a = ((e = (t = this.triggerRef) === null || t === void 0 ? void 0 : t.$el) === null || e === void 0 ? void 0 : e.nodeName) === "#comment" ? null : Cs(this.triggerRef);
  6422. return Cs(i(a));
  6423. }
  6424. try {
  6425. const a = ((r = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || r === void 0 ? void 0 : r.nodeName) === "#comment" ? null : Cs(this.triggerRef);
  6426. if (a)
  6427. return a;
  6428. } catch {
  6429. }
  6430. return Cs(this);
  6431. },
  6432. handleGetPopupClassFromAlign(t) {
  6433. const e = [], n = this.$props, {
  6434. popupPlacement: r,
  6435. builtinPlacements: i,
  6436. prefixCls: a,
  6437. alignPoint: o,
  6438. getPopupClassNameFromAlign: s
  6439. } = n;
  6440. return r && i && e.push(yve(i, a, t, o)), s && e.push(s(t)), e.join(" ");
  6441. },
  6442. getPopupAlign() {
  6443. const t = this.$props, {
  6444. popupPlacement: e,
  6445. popupAlign: n,
  6446. builtinPlacements: r
  6447. } = t;
  6448. return e && r ? lN(r, e, n) : n;
  6449. },
  6450. getComponent() {
  6451. const t = {};
  6452. this.isMouseEnterToShow() && (t.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (t.onMouseleave = this.onPopupMouseleave), t.onMousedown = this.onPopupMouseDown, t[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
  6453. const {
  6454. handleGetPopupClassFromAlign: e,
  6455. getRootDomNode: n,
  6456. $attrs: r
  6457. } = this, {
  6458. prefixCls: i,
  6459. destroyPopupOnHide: a,
  6460. popupClassName: o,
  6461. popupAnimation: s,
  6462. popupTransitionName: l,
  6463. popupStyle: u,
  6464. mask: c,
  6465. maskAnimation: f,
  6466. maskTransitionName: d,
  6467. zIndex: h,
  6468. stretch: p,
  6469. alignPoint: v,
  6470. mobile: g,
  6471. arrow: m,
  6472. forceRender: y
  6473. } = this.$props, {
  6474. sPopupVisible: b,
  6475. point: _
  6476. } = this.$data, O = I(I({
  6477. prefixCls: i,
  6478. arrow: m,
  6479. destroyPopupOnHide: a,
  6480. visible: b,
  6481. point: v ? _ : null,
  6482. align: this.align,
  6483. animation: s,
  6484. getClassNameFromAlign: e,
  6485. stretch: p,
  6486. getRootDomNode: n,
  6487. mask: c,
  6488. zIndex: h,
  6489. transitionName: l,
  6490. maskAnimation: f,
  6491. maskTransitionName: d,
  6492. class: o,
  6493. style: u,
  6494. onAlign: r.onPopupAlign || oZ
  6495. }, t), {
  6496. ref: this.setPopupRef,
  6497. mobile: g,
  6498. forceRender: y
  6499. });
  6500. return M(gve, O, {
  6501. default: this.$slots.popup || (() => Eue(this, "popup"))
  6502. });
  6503. },
  6504. attachParent(t) {
  6505. xt.cancel(this.attachId);
  6506. const {
  6507. getPopupContainer: e,
  6508. getDocument: n
  6509. } = this.$props, r = this.getRootDomNode();
  6510. let i;
  6511. e ? (r || e.length === 0) && (i = e(r)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(t) : this.attachId = xt(() => {
  6512. this.attachParent(t);
  6513. });
  6514. },
  6515. getContainer() {
  6516. const {
  6517. $props: t
  6518. } = this, {
  6519. getDocument: e
  6520. } = t, n = e(this.getRootDomNode()).createElement("div");
  6521. return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
  6522. },
  6523. setPopupVisible(t, e) {
  6524. const {
  6525. alignPoint: n,
  6526. sPopupVisible: r,
  6527. onPopupVisibleChange: i
  6528. } = this;
  6529. this.clearDelayTimer(), r !== t && (v1(this, "popupVisible") || this.setState({
  6530. sPopupVisible: t,
  6531. prevPopupVisible: r
  6532. }), i && i(t)), n && e && t && this.setPoint(e);
  6533. },
  6534. setPoint(t) {
  6535. const {
  6536. alignPoint: e
  6537. } = this.$props;
  6538. !e || !t || this.setState({
  6539. point: {
  6540. pageX: t.pageX,
  6541. pageY: t.pageY
  6542. }
  6543. });
  6544. },
  6545. handlePortalUpdate() {
  6546. this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
  6547. },
  6548. delaySetPopupVisible(t, e, n) {
  6549. const r = e * 1e3;
  6550. if (this.clearDelayTimer(), r) {
  6551. const i = n ? {
  6552. pageX: n.pageX,
  6553. pageY: n.pageY
  6554. } : null;
  6555. this.delayTimer = setTimeout(() => {
  6556. this.setPopupVisible(t, i), this.clearDelayTimer();
  6557. }, r);
  6558. } else
  6559. this.setPopupVisible(t, n);
  6560. },
  6561. clearDelayTimer() {
  6562. this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
  6563. },
  6564. clearOutsideHandler() {
  6565. 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);
  6566. },
  6567. createTwoChains(t) {
  6568. let e = () => {
  6569. };
  6570. const n = e8(this);
  6571. return this.childOriginEvents[t] && n[t] ? this[`fire${t}`] : (e = this.childOriginEvents[t] || n[t] || e, e);
  6572. },
  6573. isClickToShow() {
  6574. const {
  6575. action: t,
  6576. showAction: e
  6577. } = this.$props;
  6578. return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
  6579. },
  6580. isContextMenuOnly() {
  6581. const {
  6582. action: t
  6583. } = this.$props;
  6584. return t === "contextmenu" || t.length === 1 && t[0] === "contextmenu";
  6585. },
  6586. isContextmenuToShow() {
  6587. const {
  6588. action: t,
  6589. showAction: e
  6590. } = this.$props;
  6591. return t.indexOf("contextmenu") !== -1 || e.indexOf("contextmenu") !== -1;
  6592. },
  6593. isClickToHide() {
  6594. const {
  6595. action: t,
  6596. hideAction: e
  6597. } = this.$props;
  6598. return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
  6599. },
  6600. isMouseEnterToShow() {
  6601. const {
  6602. action: t,
  6603. showAction: e
  6604. } = this.$props;
  6605. return t.indexOf("hover") !== -1 || e.indexOf("mouseenter") !== -1;
  6606. },
  6607. isMouseLeaveToHide() {
  6608. const {
  6609. action: t,
  6610. hideAction: e
  6611. } = this.$props;
  6612. return t.indexOf("hover") !== -1 || e.indexOf("mouseleave") !== -1;
  6613. },
  6614. isFocusToShow() {
  6615. const {
  6616. action: t,
  6617. showAction: e
  6618. } = this.$props;
  6619. return t.indexOf("focus") !== -1 || e.indexOf("focus") !== -1;
  6620. },
  6621. isBlurToHide() {
  6622. const {
  6623. action: t,
  6624. hideAction: e
  6625. } = this.$props;
  6626. return t.indexOf("focus") !== -1 || e.indexOf("blur") !== -1;
  6627. },
  6628. forcePopupAlign() {
  6629. var t;
  6630. this.$data.sPopupVisible && ((t = this.popupRef) === null || t === void 0 || t.forceAlign());
  6631. },
  6632. fireEvents(t, e) {
  6633. this.childOriginEvents[t] && this.childOriginEvents[t](e);
  6634. const n = this.$props[t] || this.$attrs[t];
  6635. n && n(e);
  6636. },
  6637. close() {
  6638. this.setPopupVisible(!1);
  6639. }
  6640. },
  6641. render() {
  6642. const {
  6643. $attrs: t
  6644. } = this, e = os(rj(this)), {
  6645. alignPoint: n,
  6646. getPopupContainer: r
  6647. } = this.$props, i = e[0];
  6648. this.childOriginEvents = e8(i);
  6649. const a = {
  6650. key: "trigger"
  6651. };
  6652. 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) => {
  6653. u && (!u.relatedTarget || !$l(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
  6654. });
  6655. const o = ye(i && i.props && i.props.class, t.class);
  6656. o && (a.class = o);
  6657. const s = Pn(i, I(I({}, a), {
  6658. ref: "triggerRef"
  6659. }), !0, !0), l = M(EZ, {
  6660. key: "portal",
  6661. getContainer: r && (() => r(this.getRootDomNode())),
  6662. didUpdate: this.handlePortalUpdate,
  6663. visible: this.$data.sPopupVisible
  6664. }, {
  6665. default: this.getComponent
  6666. });
  6667. return M(wt, null, [s, l]);
  6668. }
  6669. });
  6670. var Cve = function(t, e) {
  6671. var n = {};
  6672. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  6673. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  6674. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  6675. return n;
  6676. };
  6677. const Tve = (t) => {
  6678. const e = t === !0 ? 0 : 1;
  6679. return {
  6680. bottomLeft: {
  6681. points: ["tl", "bl"],
  6682. offset: [0, 4],
  6683. overflow: {
  6684. adjustX: e,
  6685. adjustY: 1
  6686. }
  6687. },
  6688. bottomRight: {
  6689. points: ["tr", "br"],
  6690. offset: [0, 4],
  6691. overflow: {
  6692. adjustX: e,
  6693. adjustY: 1
  6694. }
  6695. },
  6696. topLeft: {
  6697. points: ["bl", "tl"],
  6698. offset: [0, -4],
  6699. overflow: {
  6700. adjustX: e,
  6701. adjustY: 1
  6702. }
  6703. },
  6704. topRight: {
  6705. points: ["br", "tr"],
  6706. offset: [0, -4],
  6707. overflow: {
  6708. adjustX: e,
  6709. adjustY: 1
  6710. }
  6711. }
  6712. };
  6713. }, Pve = te({
  6714. name: "SelectTrigger",
  6715. inheritAttrs: !1,
  6716. props: {
  6717. dropdownAlign: Object,
  6718. visible: {
  6719. type: Boolean,
  6720. default: void 0
  6721. },
  6722. disabled: {
  6723. type: Boolean,
  6724. default: void 0
  6725. },
  6726. dropdownClassName: String,
  6727. dropdownStyle: Y.object,
  6728. placement: String,
  6729. empty: {
  6730. type: Boolean,
  6731. default: void 0
  6732. },
  6733. prefixCls: String,
  6734. popupClassName: String,
  6735. animation: String,
  6736. transitionName: String,
  6737. getPopupContainer: Function,
  6738. dropdownRender: Function,
  6739. containerWidth: Number,
  6740. dropdownMatchSelectWidth: Y.oneOfType([Number, Boolean]).def(!0),
  6741. popupElement: Y.any,
  6742. direction: String,
  6743. getTriggerDOMNode: Function,
  6744. onPopupVisibleChange: Function,
  6745. onPopupMouseEnter: Function,
  6746. onPopupFocusin: Function,
  6747. onPopupFocusout: Function
  6748. },
  6749. setup(t, e) {
  6750. let {
  6751. slots: n,
  6752. attrs: r,
  6753. expose: i
  6754. } = e;
  6755. const a = L(() => {
  6756. const {
  6757. dropdownMatchSelectWidth: s
  6758. } = t;
  6759. return Tve(s);
  6760. }), o = U();
  6761. return i({
  6762. getPopupElement: () => o.value
  6763. }), () => {
  6764. const s = I(I({}, t), r), {
  6765. empty: l = !1
  6766. } = s, u = Cve(s, ["empty"]), {
  6767. visible: c,
  6768. dropdownAlign: f,
  6769. prefixCls: d,
  6770. popupElement: h,
  6771. dropdownClassName: p,
  6772. dropdownStyle: v,
  6773. direction: g = "ltr",
  6774. placement: m,
  6775. dropdownMatchSelectWidth: y,
  6776. containerWidth: b,
  6777. dropdownRender: _,
  6778. animation: O,
  6779. transitionName: S,
  6780. getPopupContainer: x,
  6781. getTriggerDOMNode: C,
  6782. onPopupVisibleChange: T,
  6783. onPopupMouseEnter: w,
  6784. onPopupFocusin: P,
  6785. onPopupFocusout: $
  6786. } = u, A = `${d}-dropdown`;
  6787. let D = h;
  6788. _ && (D = _({
  6789. menuNode: h,
  6790. props: t
  6791. }));
  6792. const E = O ? `${A}-${O}` : S, R = I({
  6793. minWidth: `${b}px`
  6794. }, v);
  6795. return typeof y == "number" ? R.width = `${y}px` : y && (R.width = `${b}px`), M(KS, j(j({}, t), {}, {
  6796. showAction: T ? ["click"] : [],
  6797. hideAction: T ? ["click"] : [],
  6798. popupPlacement: m || (g === "rtl" ? "bottomRight" : "bottomLeft"),
  6799. builtinPlacements: a.value,
  6800. prefixCls: A,
  6801. popupTransitionName: E,
  6802. popupAlign: f,
  6803. popupVisible: c,
  6804. getPopupContainer: x,
  6805. popupClassName: ye(p, {
  6806. [`${A}-empty`]: l
  6807. }),
  6808. popupStyle: R,
  6809. getTriggerDOMNode: C,
  6810. onPopupVisibleChange: T
  6811. }), {
  6812. default: n.default,
  6813. popup: () => M("div", {
  6814. ref: o,
  6815. onMouseenter: w,
  6816. onFocusin: P,
  6817. onFocusout: $
  6818. }, [D])
  6819. });
  6820. };
  6821. }
  6822. }), ge = {
  6823. /**
  6824. * MAC_ENTER
  6825. */
  6826. MAC_ENTER: 3,
  6827. /**
  6828. * BACKSPACE
  6829. */
  6830. BACKSPACE: 8,
  6831. /**
  6832. * TAB
  6833. */
  6834. TAB: 9,
  6835. /**
  6836. * NUMLOCK on FF/Safari Mac
  6837. */
  6838. NUM_CENTER: 12,
  6839. /**
  6840. * ENTER
  6841. */
  6842. ENTER: 13,
  6843. /**
  6844. * SHIFT
  6845. */
  6846. SHIFT: 16,
  6847. /**
  6848. * CTRL
  6849. */
  6850. CTRL: 17,
  6851. /**
  6852. * ALT
  6853. */
  6854. ALT: 18,
  6855. /**
  6856. * PAUSE
  6857. */
  6858. PAUSE: 19,
  6859. /**
  6860. * CAPS_LOCK
  6861. */
  6862. CAPS_LOCK: 20,
  6863. /**
  6864. * ESC
  6865. */
  6866. ESC: 27,
  6867. /**
  6868. * SPACE
  6869. */
  6870. SPACE: 32,
  6871. /**
  6872. * PAGE_UP
  6873. */
  6874. PAGE_UP: 33,
  6875. /**
  6876. * PAGE_DOWN
  6877. */
  6878. PAGE_DOWN: 34,
  6879. /**
  6880. * END
  6881. */
  6882. END: 35,
  6883. /**
  6884. * HOME
  6885. */
  6886. HOME: 36,
  6887. /**
  6888. * LEFT
  6889. */
  6890. LEFT: 37,
  6891. /**
  6892. * UP
  6893. */
  6894. UP: 38,
  6895. /**
  6896. * RIGHT
  6897. */
  6898. RIGHT: 39,
  6899. /**
  6900. * DOWN
  6901. */
  6902. DOWN: 40,
  6903. /**
  6904. * PRINT_SCREEN
  6905. */
  6906. PRINT_SCREEN: 44,
  6907. /**
  6908. * INSERT
  6909. */
  6910. INSERT: 45,
  6911. /**
  6912. * DELETE
  6913. */
  6914. DELETE: 46,
  6915. /**
  6916. * ZERO
  6917. */
  6918. ZERO: 48,
  6919. /**
  6920. * ONE
  6921. */
  6922. ONE: 49,
  6923. /**
  6924. * TWO
  6925. */
  6926. TWO: 50,
  6927. /**
  6928. * THREE
  6929. */
  6930. THREE: 51,
  6931. /**
  6932. * FOUR
  6933. */
  6934. FOUR: 52,
  6935. /**
  6936. * FIVE
  6937. */
  6938. FIVE: 53,
  6939. /**
  6940. * SIX
  6941. */
  6942. SIX: 54,
  6943. /**
  6944. * SEVEN
  6945. */
  6946. SEVEN: 55,
  6947. /**
  6948. * EIGHT
  6949. */
  6950. EIGHT: 56,
  6951. /**
  6952. * NINE
  6953. */
  6954. NINE: 57,
  6955. /**
  6956. * QUESTION_MARK
  6957. */
  6958. QUESTION_MARK: 63,
  6959. /**
  6960. * A
  6961. */
  6962. A: 65,
  6963. /**
  6964. * B
  6965. */
  6966. B: 66,
  6967. /**
  6968. * C
  6969. */
  6970. C: 67,
  6971. /**
  6972. * D
  6973. */
  6974. D: 68,
  6975. /**
  6976. * E
  6977. */
  6978. E: 69,
  6979. /**
  6980. * F
  6981. */
  6982. F: 70,
  6983. /**
  6984. * G
  6985. */
  6986. G: 71,
  6987. /**
  6988. * H
  6989. */
  6990. H: 72,
  6991. /**
  6992. * I
  6993. */
  6994. I: 73,
  6995. /**
  6996. * J
  6997. */
  6998. J: 74,
  6999. /**
  7000. * K
  7001. */
  7002. K: 75,
  7003. /**
  7004. * L
  7005. */
  7006. L: 76,
  7007. /**
  7008. * M
  7009. */
  7010. M: 77,
  7011. /**
  7012. * N
  7013. */
  7014. N: 78,
  7015. /**
  7016. * O
  7017. */
  7018. O: 79,
  7019. /**
  7020. * P
  7021. */
  7022. P: 80,
  7023. /**
  7024. * Q
  7025. */
  7026. Q: 81,
  7027. /**
  7028. * R
  7029. */
  7030. R: 82,
  7031. /**
  7032. * S
  7033. */
  7034. S: 83,
  7035. /**
  7036. * T
  7037. */
  7038. T: 84,
  7039. /**
  7040. * U
  7041. */
  7042. U: 85,
  7043. /**
  7044. * V
  7045. */
  7046. V: 86,
  7047. /**
  7048. * W
  7049. */
  7050. W: 87,
  7051. /**
  7052. * X
  7053. */
  7054. X: 88,
  7055. /**
  7056. * Y
  7057. */
  7058. Y: 89,
  7059. /**
  7060. * Z
  7061. */
  7062. Z: 90,
  7063. /**
  7064. * META
  7065. */
  7066. META: 91,
  7067. /**
  7068. * WIN_KEY_RIGHT
  7069. */
  7070. WIN_KEY_RIGHT: 92,
  7071. /**
  7072. * CONTEXT_MENU
  7073. */
  7074. CONTEXT_MENU: 93,
  7075. /**
  7076. * NUM_ZERO
  7077. */
  7078. NUM_ZERO: 96,
  7079. /**
  7080. * NUM_ONE
  7081. */
  7082. NUM_ONE: 97,
  7083. /**
  7084. * NUM_TWO
  7085. */
  7086. NUM_TWO: 98,
  7087. /**
  7088. * NUM_THREE
  7089. */
  7090. NUM_THREE: 99,
  7091. /**
  7092. * NUM_FOUR
  7093. */
  7094. NUM_FOUR: 100,
  7095. /**
  7096. * NUM_FIVE
  7097. */
  7098. NUM_FIVE: 101,
  7099. /**
  7100. * NUM_SIX
  7101. */
  7102. NUM_SIX: 102,
  7103. /**
  7104. * NUM_SEVEN
  7105. */
  7106. NUM_SEVEN: 103,
  7107. /**
  7108. * NUM_EIGHT
  7109. */
  7110. NUM_EIGHT: 104,
  7111. /**
  7112. * NUM_NINE
  7113. */
  7114. NUM_NINE: 105,
  7115. /**
  7116. * NUM_MULTIPLY
  7117. */
  7118. NUM_MULTIPLY: 106,
  7119. /**
  7120. * NUM_PLUS
  7121. */
  7122. NUM_PLUS: 107,
  7123. /**
  7124. * NUM_MINUS
  7125. */
  7126. NUM_MINUS: 109,
  7127. /**
  7128. * NUM_PERIOD
  7129. */
  7130. NUM_PERIOD: 110,
  7131. /**
  7132. * NUM_DIVISION
  7133. */
  7134. NUM_DIVISION: 111,
  7135. /**
  7136. * F1
  7137. */
  7138. F1: 112,
  7139. /**
  7140. * F2
  7141. */
  7142. F2: 113,
  7143. /**
  7144. * F3
  7145. */
  7146. F3: 114,
  7147. /**
  7148. * F4
  7149. */
  7150. F4: 115,
  7151. /**
  7152. * F5
  7153. */
  7154. F5: 116,
  7155. /**
  7156. * F6
  7157. */
  7158. F6: 117,
  7159. /**
  7160. * F7
  7161. */
  7162. F7: 118,
  7163. /**
  7164. * F8
  7165. */
  7166. F8: 119,
  7167. /**
  7168. * F9
  7169. */
  7170. F9: 120,
  7171. /**
  7172. * F10
  7173. */
  7174. F10: 121,
  7175. /**
  7176. * F11
  7177. */
  7178. F11: 122,
  7179. /**
  7180. * F12
  7181. */
  7182. F12: 123,
  7183. /**
  7184. * NUMLOCK
  7185. */
  7186. NUMLOCK: 144,
  7187. /**
  7188. * SEMICOLON
  7189. */
  7190. SEMICOLON: 186,
  7191. /**
  7192. * DASH
  7193. */
  7194. DASH: 189,
  7195. /**
  7196. * EQUALS
  7197. */
  7198. EQUALS: 187,
  7199. /**
  7200. * COMMA
  7201. */
  7202. COMMA: 188,
  7203. /**
  7204. * PERIOD
  7205. */
  7206. PERIOD: 190,
  7207. /**
  7208. * SLASH
  7209. */
  7210. SLASH: 191,
  7211. /**
  7212. * APOSTROPHE
  7213. */
  7214. APOSTROPHE: 192,
  7215. /**
  7216. * SINGLE_QUOTE
  7217. */
  7218. SINGLE_QUOTE: 222,
  7219. /**
  7220. * OPEN_SQUARE_BRACKET
  7221. */
  7222. OPEN_SQUARE_BRACKET: 219,
  7223. /**
  7224. * BACKSLASH
  7225. */
  7226. BACKSLASH: 220,
  7227. /**
  7228. * CLOSE_SQUARE_BRACKET
  7229. */
  7230. CLOSE_SQUARE_BRACKET: 221,
  7231. /**
  7232. * WIN_KEY
  7233. */
  7234. WIN_KEY: 224,
  7235. /**
  7236. * MAC_FF_META
  7237. */
  7238. MAC_FF_META: 224,
  7239. /**
  7240. * WIN_IME
  7241. */
  7242. WIN_IME: 229,
  7243. // ======================== Function ========================
  7244. /**
  7245. * whether text and modified key is entered at the same time.
  7246. */
  7247. isTextModifyingKeyEvent: function(e) {
  7248. const {
  7249. keyCode: n
  7250. } = e;
  7251. if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
  7252. n >= ge.F1 && n <= ge.F12)
  7253. return !1;
  7254. switch (n) {
  7255. case ge.ALT:
  7256. case ge.CAPS_LOCK:
  7257. case ge.CONTEXT_MENU:
  7258. case ge.CTRL:
  7259. case ge.DOWN:
  7260. case ge.END:
  7261. case ge.ESC:
  7262. case ge.HOME:
  7263. case ge.INSERT:
  7264. case ge.LEFT:
  7265. case ge.MAC_FF_META:
  7266. case ge.META:
  7267. case ge.NUMLOCK:
  7268. case ge.NUM_CENTER:
  7269. case ge.PAGE_DOWN:
  7270. case ge.PAGE_UP:
  7271. case ge.PAUSE:
  7272. case ge.PRINT_SCREEN:
  7273. case ge.RIGHT:
  7274. case ge.SHIFT:
  7275. case ge.UP:
  7276. case ge.WIN_KEY:
  7277. case ge.WIN_KEY_RIGHT:
  7278. return !1;
  7279. default:
  7280. return !0;
  7281. }
  7282. },
  7283. /**
  7284. * whether character is entered.
  7285. */
  7286. isCharacterKey: function(e) {
  7287. 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)
  7288. return !0;
  7289. switch (e) {
  7290. case ge.SPACE:
  7291. case ge.QUESTION_MARK:
  7292. case ge.NUM_PLUS:
  7293. case ge.NUM_MINUS:
  7294. case ge.NUM_PERIOD:
  7295. case ge.NUM_DIVISION:
  7296. case ge.SEMICOLON:
  7297. case ge.DASH:
  7298. case ge.EQUALS:
  7299. case ge.COMMA:
  7300. case ge.PERIOD:
  7301. case ge.SLASH:
  7302. case ge.APOSTROPHE:
  7303. case ge.SINGLE_QUOTE:
  7304. case ge.OPEN_SQUARE_BRACKET:
  7305. case ge.BACKSLASH:
  7306. case ge.CLOSE_SQUARE_BRACKET:
  7307. return !0;
  7308. default:
  7309. return !1;
  7310. }
  7311. }
  7312. }, pf = (t, e) => {
  7313. let {
  7314. slots: n
  7315. } = e;
  7316. var r;
  7317. const {
  7318. class: i,
  7319. customizeIcon: a,
  7320. customizeIconProps: o,
  7321. onMousedown: s,
  7322. onClick: l
  7323. } = t;
  7324. let u;
  7325. return typeof a == "function" ? u = a(o) : u = nu(a) ? Ns(a) : a, M("span", {
  7326. class: i,
  7327. onMousedown: (c) => {
  7328. c.preventDefault(), s && s(c);
  7329. },
  7330. style: {
  7331. userSelect: "none",
  7332. WebkitUserSelect: "none"
  7333. },
  7334. unselectable: "on",
  7335. onClick: l,
  7336. "aria-hidden": !0
  7337. }, [u !== void 0 ? u : M("span", {
  7338. class: i.split(/\s+/).map((c) => `${c}-icon`)
  7339. }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
  7340. };
  7341. pf.inheritAttrs = !1;
  7342. pf.displayName = "TransBtn";
  7343. pf.props = {
  7344. class: String,
  7345. customizeIcon: Y.any,
  7346. customizeIconProps: Y.any,
  7347. onMousedown: Function,
  7348. onClick: Function
  7349. };
  7350. var $ve = function(t, e) {
  7351. var n = {};
  7352. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7353. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7354. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7355. return n;
  7356. };
  7357. const Ave = te({
  7358. compatConfig: {
  7359. MODE: 3
  7360. },
  7361. // inheritAttrs: false,
  7362. props: {
  7363. disabled: Y.looseBool,
  7364. type: Y.string,
  7365. value: Y.any,
  7366. tag: {
  7367. type: String,
  7368. default: "input"
  7369. },
  7370. size: Y.string,
  7371. onChange: Function,
  7372. onInput: Function,
  7373. onBlur: Function,
  7374. onFocus: Function,
  7375. onKeydown: Function,
  7376. onCompositionstart: Function,
  7377. onCompositionend: Function,
  7378. onKeyup: Function,
  7379. onPaste: Function,
  7380. onMousedown: Function
  7381. },
  7382. emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  7383. setup(t, e) {
  7384. let {
  7385. expose: n
  7386. } = e;
  7387. const r = ae(null);
  7388. return n({
  7389. focus: () => {
  7390. r.value && r.value.focus();
  7391. },
  7392. blur: () => {
  7393. r.value && r.value.blur();
  7394. },
  7395. input: r,
  7396. setSelectionRange: (l, u, c) => {
  7397. var f;
  7398. (f = r.value) === null || f === void 0 || f.setSelectionRange(l, u, c);
  7399. },
  7400. select: () => {
  7401. var l;
  7402. (l = r.value) === null || l === void 0 || l.select();
  7403. },
  7404. getSelectionStart: () => {
  7405. var l;
  7406. return (l = r.value) === null || l === void 0 ? void 0 : l.selectionStart;
  7407. },
  7408. getSelectionEnd: () => {
  7409. var l;
  7410. return (l = r.value) === null || l === void 0 ? void 0 : l.selectionEnd;
  7411. },
  7412. getScrollTop: () => {
  7413. var l;
  7414. return (l = r.value) === null || l === void 0 ? void 0 : l.scrollTop;
  7415. }
  7416. }), () => {
  7417. const {
  7418. tag: l,
  7419. value: u
  7420. } = t, c = $ve(t, ["tag", "value"]);
  7421. return M(l, j(j({}, c), {}, {
  7422. ref: r,
  7423. value: u
  7424. }), null);
  7425. };
  7426. }
  7427. });
  7428. function Eve() {
  7429. const t = document.documentElement.clientWidth, e = window.innerHeight || document.documentElement.clientHeight;
  7430. return {
  7431. width: t,
  7432. height: e
  7433. };
  7434. }
  7435. function MZ(t) {
  7436. const e = t.getBoundingClientRect(), n = document.documentElement;
  7437. return {
  7438. left: e.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
  7439. top: e.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  7440. };
  7441. }
  7442. function Mve(t) {
  7443. return Object.keys(t).reduce((e, n) => {
  7444. const r = t[n];
  7445. return typeof r > "u" || r === null || (e += `${n}: ${t[n]};`), e;
  7446. }, "");
  7447. }
  7448. var Ive = function(t, e) {
  7449. var n = {};
  7450. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7451. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7452. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7453. return n;
  7454. };
  7455. const TI = te({
  7456. compatConfig: {
  7457. MODE: 3
  7458. },
  7459. inheritAttrs: !1,
  7460. props: {
  7461. disabled: Y.looseBool,
  7462. type: Y.string,
  7463. value: Y.any,
  7464. lazy: Y.bool.def(!0),
  7465. tag: {
  7466. type: String,
  7467. default: "input"
  7468. },
  7469. size: Y.string,
  7470. style: Y.oneOfType([String, Object]),
  7471. class: Y.string
  7472. },
  7473. emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  7474. setup(t, e) {
  7475. let {
  7476. emit: n,
  7477. attrs: r,
  7478. expose: i
  7479. } = e;
  7480. const a = ae(null), o = U(), s = U(!1);
  7481. se([() => t.value, s], () => {
  7482. s.value || (o.value = t.value);
  7483. }, {
  7484. immediate: !0
  7485. });
  7486. const l = (x) => {
  7487. n("change", x);
  7488. }, u = (x) => {
  7489. s.value = !0, x.target.composing = !0, n("compositionstart", x);
  7490. }, c = (x) => {
  7491. s.value = !1, x.target.composing = !1, n("compositionend", x);
  7492. const C = document.createEvent("HTMLEvents");
  7493. C.initEvent("input", !0, !0), x.target.dispatchEvent(C), l(x);
  7494. }, f = (x) => {
  7495. if (s.value && t.lazy) {
  7496. o.value = x.target.value;
  7497. return;
  7498. }
  7499. n("input", x);
  7500. }, d = (x) => {
  7501. n("blur", x);
  7502. }, h = (x) => {
  7503. n("focus", x);
  7504. }, p = () => {
  7505. a.value && a.value.focus();
  7506. }, v = () => {
  7507. a.value && a.value.blur();
  7508. }, g = (x) => {
  7509. n("keydown", x);
  7510. }, m = (x) => {
  7511. n("keyup", x);
  7512. }, y = (x, C, T) => {
  7513. var w;
  7514. (w = a.value) === null || w === void 0 || w.setSelectionRange(x, C, T);
  7515. }, b = () => {
  7516. var x;
  7517. (x = a.value) === null || x === void 0 || x.select();
  7518. };
  7519. i({
  7520. focus: p,
  7521. blur: v,
  7522. input: L(() => {
  7523. var x;
  7524. return (x = a.value) === null || x === void 0 ? void 0 : x.input;
  7525. }),
  7526. setSelectionRange: y,
  7527. select: b,
  7528. getSelectionStart: () => {
  7529. var x;
  7530. return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionStart();
  7531. },
  7532. getSelectionEnd: () => {
  7533. var x;
  7534. return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionEnd();
  7535. },
  7536. getScrollTop: () => {
  7537. var x;
  7538. return (x = a.value) === null || x === void 0 ? void 0 : x.getScrollTop();
  7539. }
  7540. });
  7541. const _ = (x) => {
  7542. n("mousedown", x);
  7543. }, O = (x) => {
  7544. n("paste", x);
  7545. }, S = L(() => t.style && typeof t.style != "string" ? Mve(t.style) : t.style);
  7546. return () => {
  7547. const x = Ive(t, ["style", "lazy"]);
  7548. return M(Ave, j(j(j({}, x), r), {}, {
  7549. style: S.value,
  7550. onInput: f,
  7551. onChange: l,
  7552. onBlur: d,
  7553. onFocus: h,
  7554. ref: a,
  7555. value: o.value,
  7556. onCompositionstart: u,
  7557. onCompositionend: c,
  7558. onKeyup: m,
  7559. onKeydown: g,
  7560. onPaste: O,
  7561. onMousedown: _
  7562. }), null);
  7563. };
  7564. }
  7565. }), Dve = {
  7566. inputRef: Y.any,
  7567. prefixCls: String,
  7568. id: String,
  7569. inputElement: Y.VueNode,
  7570. disabled: {
  7571. type: Boolean,
  7572. default: void 0
  7573. },
  7574. autofocus: {
  7575. type: Boolean,
  7576. default: void 0
  7577. },
  7578. autocomplete: String,
  7579. editable: {
  7580. type: Boolean,
  7581. default: void 0
  7582. },
  7583. activeDescendantId: String,
  7584. value: String,
  7585. open: {
  7586. type: Boolean,
  7587. default: void 0
  7588. },
  7589. tabindex: Y.oneOfType([Y.number, Y.string]),
  7590. /** Pass accessibility props to input */
  7591. attrs: Y.object,
  7592. onKeydown: {
  7593. type: Function
  7594. },
  7595. onMousedown: {
  7596. type: Function
  7597. },
  7598. onChange: {
  7599. type: Function
  7600. },
  7601. onPaste: {
  7602. type: Function
  7603. },
  7604. onCompositionstart: {
  7605. type: Function
  7606. },
  7607. onCompositionend: {
  7608. type: Function
  7609. },
  7610. onFocus: {
  7611. type: Function
  7612. },
  7613. onBlur: {
  7614. type: Function
  7615. }
  7616. }, IZ = te({
  7617. compatConfig: {
  7618. MODE: 3
  7619. },
  7620. name: "SelectInput",
  7621. inheritAttrs: !1,
  7622. props: Dve,
  7623. setup(t) {
  7624. let e = null;
  7625. const n = Ge("VCSelectContainerEvent");
  7626. return () => {
  7627. var r;
  7628. const {
  7629. prefixCls: i,
  7630. id: a,
  7631. inputElement: o,
  7632. disabled: s,
  7633. tabindex: l,
  7634. autofocus: u,
  7635. autocomplete: c,
  7636. editable: f,
  7637. activeDescendantId: d,
  7638. value: h,
  7639. onKeydown: p,
  7640. onMousedown: v,
  7641. onChange: g,
  7642. onPaste: m,
  7643. onCompositionstart: y,
  7644. onCompositionend: b,
  7645. onFocus: _,
  7646. onBlur: O,
  7647. open: S,
  7648. inputRef: x,
  7649. attrs: C
  7650. } = t;
  7651. let T = o || M(TI, null, null);
  7652. const w = T.props || {}, {
  7653. onKeydown: P,
  7654. onInput: $,
  7655. onFocus: A,
  7656. onBlur: D,
  7657. onMousedown: E,
  7658. onCompositionstart: R,
  7659. onCompositionend: N,
  7660. style: V
  7661. } = w;
  7662. return T = Pn(T, I(I(I(I(I({
  7663. type: "search"
  7664. }, w), {
  7665. id: a,
  7666. ref: x,
  7667. disabled: s,
  7668. tabindex: l,
  7669. lazy: !1,
  7670. autocomplete: c || "off",
  7671. autofocus: u,
  7672. class: ye(`${i}-selection-search-input`, (r = T == null ? void 0 : T.props) === null || r === void 0 ? void 0 : r.class),
  7673. role: "combobox",
  7674. "aria-expanded": S,
  7675. "aria-haspopup": "listbox",
  7676. "aria-owns": `${a}_list`,
  7677. "aria-autocomplete": "list",
  7678. "aria-controls": `${a}_list`,
  7679. "aria-activedescendant": d
  7680. }), C), {
  7681. value: f ? h : "",
  7682. readonly: !f,
  7683. unselectable: f ? null : "on",
  7684. style: I(I({}, V), {
  7685. opacity: f ? null : 0
  7686. }),
  7687. onKeydown: (z) => {
  7688. p(z), P && P(z);
  7689. },
  7690. onMousedown: (z) => {
  7691. v(z), E && E(z);
  7692. },
  7693. onInput: (z) => {
  7694. g(z), $ && $(z);
  7695. },
  7696. onCompositionstart(z) {
  7697. y(z), R && R(z);
  7698. },
  7699. onCompositionend(z) {
  7700. b(z), N && N(z);
  7701. },
  7702. onPaste: m,
  7703. onFocus: function() {
  7704. 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]);
  7705. },
  7706. onBlur: function() {
  7707. for (var z = arguments.length, W = new Array(z), F = 0; F < z; F++)
  7708. W[F] = arguments[F];
  7709. e = setTimeout(() => {
  7710. D && D(W[0]), O && O(W[0]), n == null || n.blur(W[0]);
  7711. }, 100);
  7712. }
  7713. }), T.type === "textarea" ? {} : {
  7714. type: "search"
  7715. }), !0, !0), T;
  7716. };
  7717. }
  7718. }), Rve = `accept acceptcharset accesskey action allowfullscreen allowtransparency
  7719. alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
  7720. charset checked classid classname colspan cols content contenteditable contextmenu
  7721. controls coords crossorigin data datetime default defer dir disabled download draggable
  7722. enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
  7723. headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
  7724. is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
  7725. mediagroup method min minlength multiple muted name novalidate nonce open
  7726. optimum pattern placeholder poster preload radiogroup readonly rel required
  7727. reversed role rowspan rows sandbox scope scoped scrolling seamless selected
  7728. shape size sizes span spellcheck src srcdoc srclang srcset start step style
  7729. summary tabindex target title type usemap value width wmode wrap`, kve = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
  7730. onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
  7731. onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
  7732. onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
  7733. onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
  7734. onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
  7735. onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, fN = `${Rve} ${kve}`.split(/[\s\n]+/), Lve = "aria-", Nve = "data-";
  7736. function dN(t, e) {
  7737. return t.indexOf(e) === 0;
  7738. }
  7739. function JS(t) {
  7740. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  7741. e === !1 ? n = {
  7742. aria: !0,
  7743. data: !0,
  7744. attr: !0
  7745. } : e === !0 ? n = {
  7746. aria: !0
  7747. } : n = I({}, e);
  7748. const r = {};
  7749. return Object.keys(t).forEach((i) => {
  7750. // Aria
  7751. (n.aria && (i === "role" || dN(i, Lve)) || // Data
  7752. n.data && dN(i, Nve) || // Attr
  7753. n.attr && (fN.includes(i) || fN.includes(i.toLowerCase()))) && (r[i] = t[i]);
  7754. }), r;
  7755. }
  7756. const DZ = Symbol("OverflowContextProviderKey"), P2 = te({
  7757. compatConfig: {
  7758. MODE: 3
  7759. },
  7760. name: "OverflowContextProvider",
  7761. inheritAttrs: !1,
  7762. props: {
  7763. value: {
  7764. type: Object
  7765. }
  7766. },
  7767. setup(t, e) {
  7768. let {
  7769. slots: n
  7770. } = e;
  7771. return pt(DZ, L(() => t.value)), () => {
  7772. var r;
  7773. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  7774. };
  7775. }
  7776. }), Bve = () => Ge(DZ, L(() => null));
  7777. var zve = function(t, e) {
  7778. var n = {};
  7779. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7780. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7781. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7782. return n;
  7783. };
  7784. const Zf = void 0, w_ = te({
  7785. compatConfig: {
  7786. MODE: 3
  7787. },
  7788. name: "Item",
  7789. props: {
  7790. prefixCls: String,
  7791. item: Y.any,
  7792. renderItem: Function,
  7793. responsive: Boolean,
  7794. itemKey: {
  7795. type: [String, Number]
  7796. },
  7797. registerSize: Function,
  7798. display: Boolean,
  7799. order: Number,
  7800. component: Y.any,
  7801. invalidate: Boolean
  7802. },
  7803. setup(t, e) {
  7804. let {
  7805. slots: n,
  7806. expose: r
  7807. } = e;
  7808. const i = L(() => t.responsive && !t.display), a = U();
  7809. r({
  7810. itemNodeRef: a
  7811. });
  7812. function o(s) {
  7813. t.registerSize(t.itemKey, s);
  7814. }
  7815. return nl(() => {
  7816. o(null);
  7817. }), () => {
  7818. var s;
  7819. const {
  7820. prefixCls: l,
  7821. invalidate: u,
  7822. item: c,
  7823. renderItem: f,
  7824. responsive: d,
  7825. registerSize: h,
  7826. itemKey: p,
  7827. display: v,
  7828. order: g,
  7829. component: m = "div"
  7830. } = t, y = zve(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 !== Zf ? f(c) : b;
  7831. let O;
  7832. u || (O = {
  7833. opacity: i.value ? 0 : 1,
  7834. height: i.value ? 0 : Zf,
  7835. overflowY: i.value ? "hidden" : Zf,
  7836. order: d ? g : Zf,
  7837. pointerEvents: i.value ? "none" : Zf,
  7838. position: i.value ? "absolute" : Zf
  7839. });
  7840. const S = {};
  7841. return i.value && (S["aria-hidden"] = !0), M(ph, {
  7842. disabled: !d,
  7843. onResize: (x) => {
  7844. let {
  7845. offsetWidth: C
  7846. } = x;
  7847. o(C);
  7848. }
  7849. }, {
  7850. default: () => M(m, j(j(j({
  7851. class: ye(!u && l),
  7852. style: O
  7853. }, S), y), {}, {
  7854. ref: a
  7855. }), {
  7856. default: () => [_]
  7857. })
  7858. });
  7859. };
  7860. }
  7861. });
  7862. var vC = function(t, e) {
  7863. var n = {};
  7864. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7865. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7866. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7867. return n;
  7868. };
  7869. const Vve = te({
  7870. compatConfig: {
  7871. MODE: 3
  7872. },
  7873. name: "RawItem",
  7874. inheritAttrs: !1,
  7875. props: {
  7876. component: Y.any,
  7877. title: Y.any,
  7878. id: String,
  7879. onMouseenter: {
  7880. type: Function
  7881. },
  7882. onMouseleave: {
  7883. type: Function
  7884. },
  7885. onClick: {
  7886. type: Function
  7887. },
  7888. onKeydown: {
  7889. type: Function
  7890. },
  7891. onFocus: {
  7892. type: Function
  7893. },
  7894. role: String,
  7895. tabindex: Number
  7896. },
  7897. setup(t, e) {
  7898. let {
  7899. slots: n,
  7900. attrs: r
  7901. } = e;
  7902. const i = Bve();
  7903. return () => {
  7904. var a;
  7905. if (!i.value) {
  7906. const {
  7907. component: f = "div"
  7908. } = t, d = vC(t, ["component"]);
  7909. return M(f, j(j({}, d), r), {
  7910. default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
  7911. });
  7912. }
  7913. const o = i.value, {
  7914. className: s
  7915. } = o, l = vC(o, ["className"]), {
  7916. class: u
  7917. } = r, c = vC(r, ["class"]);
  7918. return M(P2, {
  7919. value: null
  7920. }, {
  7921. default: () => [M(w_, j(j(j({
  7922. class: ye(s, u)
  7923. }, l), c), t), n)]
  7924. });
  7925. };
  7926. }
  7927. });
  7928. var Fve = function(t, e) {
  7929. var n = {};
  7930. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7931. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7932. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7933. return n;
  7934. };
  7935. const RZ = "responsive", kZ = "invalidate";
  7936. function Wve(t) {
  7937. return `+ ${t.length} ...`;
  7938. }
  7939. const Qve = () => ({
  7940. id: String,
  7941. prefixCls: String,
  7942. data: Array,
  7943. itemKey: [String, Number, Function],
  7944. /** Used for `responsive`. It will limit render node to avoid perf issue */
  7945. itemWidth: {
  7946. type: Number,
  7947. default: 10
  7948. },
  7949. renderItem: Function,
  7950. /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  7951. renderRawItem: Function,
  7952. maxCount: [Number, String],
  7953. renderRest: Function,
  7954. /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  7955. renderRawRest: Function,
  7956. suffix: Y.any,
  7957. component: String,
  7958. itemComponent: Y.any,
  7959. /** @private This API may be refactor since not well design */
  7960. onVisibleChange: Function,
  7961. /** When set to `full`, ssr will render full items by default and remove at client side */
  7962. ssr: String,
  7963. onMousedown: Function
  7964. }), Ms = te({
  7965. name: "Overflow",
  7966. inheritAttrs: !1,
  7967. props: Qve(),
  7968. emits: ["visibleChange"],
  7969. setup(t, e) {
  7970. let {
  7971. attrs: n,
  7972. emit: r,
  7973. slots: i
  7974. } = e;
  7975. 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 === RZ)), b = L(() => t.maxCount === kZ), _ = L(() => y.value || typeof t.maxCount == "number" && t.data.length > t.maxCount), O = L(() => {
  7976. let E = t.data;
  7977. 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;
  7978. }), S = L(() => y.value ? t.data.slice(p.value + 1) : t.data.slice(O.value.length)), x = (E, R) => {
  7979. var N;
  7980. return typeof t.itemKey == "function" ? t.itemKey(E) : (N = t.itemKey && (E == null ? void 0 : E[t.itemKey])) !== null && N !== void 0 ? N : R;
  7981. }, C = L(() => t.renderItem || ((E) => E)), T = (E, R) => {
  7982. h.value = E, R || (v.value = E < t.data.length - 1, r("visibleChange", E));
  7983. }, w = (E, R) => {
  7984. o.value = R.clientWidth;
  7985. }, P = (E, R) => {
  7986. const N = new Map(l.value);
  7987. R === null ? N.delete(E) : N.set(E, R), l.value = N;
  7988. }, $ = (E, R) => {
  7989. u.value = c.value, c.value = R;
  7990. }, A = (E, R) => {
  7991. f.value = R;
  7992. }, D = (E) => l.value.get(x(O.value[E], E));
  7993. return se([s, l, c, f, () => t.itemKey, O], () => {
  7994. if (s.value && m.value && O.value) {
  7995. let E = f.value;
  7996. const R = O.value.length, N = R - 1;
  7997. if (!R) {
  7998. T(0), d.value = null;
  7999. return;
  8000. }
  8001. for (let V = 0; V < R; V += 1) {
  8002. const z = D(V);
  8003. if (z === void 0) {
  8004. T(V - 1, !0);
  8005. break;
  8006. }
  8007. if (E += z, // Only one means `totalWidth` is the final width
  8008. N === 0 && E <= s.value || // Last two width will be the final width
  8009. V === N - 1 && E + D(N) <= s.value) {
  8010. T(N), d.value = null;
  8011. break;
  8012. } else if (E + m.value > s.value) {
  8013. T(V - 1), d.value = E - z - f.value + c.value;
  8014. break;
  8015. }
  8016. }
  8017. t.suffix && D(0) + f.value > s.value && (d.value = null);
  8018. }
  8019. }), () => {
  8020. const E = v.value && !!S.value.length, {
  8021. itemComponent: R,
  8022. renderRawItem: N,
  8023. renderRawRest: V,
  8024. renderRest: z,
  8025. prefixCls: W = "rc-overflow",
  8026. suffix: F,
  8027. component: Q = "div",
  8028. id: Z,
  8029. onMousedown: ne
  8030. } = t, {
  8031. class: ee,
  8032. style: oe
  8033. } = n, K = Fve(n, ["class", "style"]);
  8034. let ie = {};
  8035. d.value !== null && y.value && (ie = {
  8036. position: "absolute",
  8037. left: `${d.value}px`,
  8038. top: 0
  8039. });
  8040. const X = {
  8041. prefixCls: g.value,
  8042. responsive: y.value,
  8043. component: R,
  8044. invalidate: b.value
  8045. }, H = N ? (de, Ee) => {
  8046. const $e = x(de, Ee);
  8047. return M(P2, {
  8048. key: $e,
  8049. value: I(I({}, X), {
  8050. order: Ee,
  8051. item: de,
  8052. itemKey: $e,
  8053. registerSize: P,
  8054. display: Ee <= p.value
  8055. })
  8056. }, {
  8057. default: () => [N(de, Ee)]
  8058. });
  8059. } : (de, Ee) => {
  8060. const $e = x(de, Ee);
  8061. return M(w_, j(j({}, X), {}, {
  8062. order: Ee,
  8063. key: $e,
  8064. item: de,
  8065. renderItem: C.value,
  8066. itemKey: $e,
  8067. registerSize: P,
  8068. display: Ee <= p.value
  8069. }), null);
  8070. };
  8071. let G = () => null;
  8072. const re = {
  8073. order: E ? p.value : Number.MAX_SAFE_INTEGER,
  8074. className: `${g.value} ${g.value}-rest`,
  8075. registerSize: $,
  8076. display: E
  8077. };
  8078. if (V)
  8079. V && (G = () => M(P2, {
  8080. value: I(I({}, X), re)
  8081. }, {
  8082. default: () => [V(S.value)]
  8083. }));
  8084. else {
  8085. const de = z || Wve;
  8086. G = () => M(w_, j(j({}, X), re), {
  8087. default: () => typeof de == "function" ? de(S.value) : de
  8088. });
  8089. }
  8090. const fe = () => {
  8091. var de;
  8092. return M(Q, j({
  8093. id: Z,
  8094. class: ye(!b.value && W, ee),
  8095. style: oe,
  8096. onMousedown: ne
  8097. }, K), {
  8098. default: () => [O.value.map(H), _.value ? G() : null, F && M(w_, j(j({}, X), {}, {
  8099. order: p.value,
  8100. class: `${g.value}-suffix`,
  8101. registerSize: A,
  8102. display: !0,
  8103. style: ie
  8104. }), {
  8105. default: () => F
  8106. }), (de = i.default) === null || de === void 0 ? void 0 : de.call(i)]
  8107. });
  8108. };
  8109. return M(ph, {
  8110. disabled: !y.value,
  8111. onResize: w
  8112. }, {
  8113. default: fe
  8114. });
  8115. };
  8116. }
  8117. });
  8118. Ms.Item = Vve;
  8119. Ms.RESPONSIVE = RZ;
  8120. Ms.INVALIDATE = kZ;
  8121. const Hve = Symbol("TreeSelectLegacyContextPropsKey");
  8122. function PI() {
  8123. return Ge(Hve, {});
  8124. }
  8125. const Gve = {
  8126. id: String,
  8127. prefixCls: String,
  8128. values: Y.array,
  8129. open: {
  8130. type: Boolean,
  8131. default: void 0
  8132. },
  8133. searchValue: String,
  8134. inputRef: Y.any,
  8135. placeholder: Y.any,
  8136. disabled: {
  8137. type: Boolean,
  8138. default: void 0
  8139. },
  8140. mode: String,
  8141. showSearch: {
  8142. type: Boolean,
  8143. default: void 0
  8144. },
  8145. autofocus: {
  8146. type: Boolean,
  8147. default: void 0
  8148. },
  8149. autocomplete: String,
  8150. activeDescendantId: String,
  8151. tabindex: Y.oneOfType([Y.number, Y.string]),
  8152. compositionStatus: Boolean,
  8153. removeIcon: Y.any,
  8154. choiceTransitionName: String,
  8155. maxTagCount: Y.oneOfType([Y.number, Y.string]),
  8156. maxTagTextLength: Number,
  8157. maxTagPlaceholder: Y.any.def(() => (t) => `+ ${t.length} ...`),
  8158. tagRender: Function,
  8159. onToggleOpen: {
  8160. type: Function
  8161. },
  8162. onRemove: Function,
  8163. onInputChange: Function,
  8164. onInputPaste: Function,
  8165. onInputKeyDown: Function,
  8166. onInputMouseDown: Function,
  8167. onInputCompositionStart: Function,
  8168. onInputCompositionEnd: Function
  8169. }, hN = (t) => {
  8170. t.preventDefault(), t.stopPropagation();
  8171. }, jve = te({
  8172. name: "MultipleSelectSelector",
  8173. inheritAttrs: !1,
  8174. props: Gve,
  8175. setup(t) {
  8176. const e = ae(), n = ae(0), r = ae(!1), i = PI(), 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("");
  8177. ht(() => {
  8178. l.value = o.value;
  8179. }), it(() => {
  8180. se(l, () => {
  8181. n.value = e.value.scrollWidth;
  8182. }, {
  8183. flush: "post",
  8184. immediate: !0
  8185. });
  8186. });
  8187. function u(p, v, g, m, y) {
  8188. return M("span", {
  8189. class: ye(`${a.value}-item`, {
  8190. [`${a.value}-item-disabled`]: g
  8191. }),
  8192. title: typeof p == "string" || typeof p == "number" ? p.toString() : void 0
  8193. }, [M("span", {
  8194. class: `${a.value}-item-content`
  8195. }, [v]), m && M(pf, {
  8196. class: `${a.value}-item-remove`,
  8197. onMousedown: hN,
  8198. onClick: y,
  8199. customizeIcon: t.removeIcon
  8200. }, {
  8201. default: () => [Kt("×")]
  8202. })]);
  8203. }
  8204. function c(p, v, g, m, y, b) {
  8205. var _;
  8206. const O = (x) => {
  8207. hN(x), t.onToggleOpen(!open);
  8208. };
  8209. let S = b;
  8210. return i.keyEntities && (S = ((_ = i.keyEntities[p]) === null || _ === void 0 ? void 0 : _.node) || {}), M("span", {
  8211. key: p,
  8212. onMousedown: O
  8213. }, [t.tagRender({
  8214. label: v,
  8215. value: p,
  8216. disabled: g,
  8217. closable: m,
  8218. onClose: y,
  8219. option: S
  8220. })]);
  8221. }
  8222. function f(p) {
  8223. const {
  8224. disabled: v,
  8225. label: g,
  8226. value: m,
  8227. option: y
  8228. } = p, b = !t.disabled && !v;
  8229. let _ = g;
  8230. if (typeof t.maxTagTextLength == "number" && (typeof g == "string" || typeof g == "number")) {
  8231. const S = String(_);
  8232. S.length > t.maxTagTextLength && (_ = `${S.slice(0, t.maxTagTextLength)}...`);
  8233. }
  8234. const O = (S) => {
  8235. var x;
  8236. S && S.stopPropagation(), (x = t.onRemove) === null || x === void 0 || x.call(t, p);
  8237. };
  8238. return typeof t.tagRender == "function" ? c(m, _, v, b, O, y) : u(g, _, v, b, O);
  8239. }
  8240. function d(p) {
  8241. const {
  8242. maxTagPlaceholder: v = (m) => `+ ${m.length} ...`
  8243. } = t, g = typeof v == "function" ? v(p) : v;
  8244. return u(g, g, !1);
  8245. }
  8246. const h = (p) => {
  8247. const v = p.target.composing;
  8248. l.value = p.target.value, v || t.onInputChange(p);
  8249. };
  8250. return () => {
  8251. const {
  8252. id: p,
  8253. prefixCls: v,
  8254. values: g,
  8255. open: m,
  8256. inputRef: y,
  8257. placeholder: b,
  8258. disabled: _,
  8259. autofocus: O,
  8260. autocomplete: S,
  8261. activeDescendantId: x,
  8262. tabindex: C,
  8263. compositionStatus: T,
  8264. onInputPaste: w,
  8265. onInputKeyDown: P,
  8266. onInputMouseDown: $,
  8267. onInputCompositionStart: A,
  8268. onInputCompositionEnd: D
  8269. } = t, E = M("div", {
  8270. class: `${a.value}-search`,
  8271. style: {
  8272. width: n.value + "px"
  8273. },
  8274. key: "input"
  8275. }, [M(IZ, {
  8276. inputRef: y,
  8277. open: m,
  8278. prefixCls: v,
  8279. id: p,
  8280. inputElement: null,
  8281. disabled: _,
  8282. autofocus: O,
  8283. autocomplete: S,
  8284. editable: s.value,
  8285. activeDescendantId: x,
  8286. value: l.value,
  8287. onKeydown: P,
  8288. onMousedown: $,
  8289. onChange: h,
  8290. onPaste: w,
  8291. onCompositionstart: A,
  8292. onCompositionend: D,
  8293. tabindex: C,
  8294. attrs: JS(t, !0),
  8295. onFocus: () => r.value = !0,
  8296. onBlur: () => r.value = !1
  8297. }, null), M("span", {
  8298. ref: e,
  8299. class: `${a.value}-search-mirror`,
  8300. "aria-hidden": !0
  8301. }, [l.value, Kt(" ")])]), R = M(Ms, {
  8302. prefixCls: `${a.value}-overflow`,
  8303. data: g,
  8304. renderItem: f,
  8305. renderRest: d,
  8306. suffix: E,
  8307. itemKey: "key",
  8308. maxCount: t.maxTagCount,
  8309. key: "overflow"
  8310. }, null);
  8311. return M(wt, null, [R, !g.length && !o.value && !T && M("span", {
  8312. class: `${a.value}-placeholder`
  8313. }, [b])]);
  8314. };
  8315. }
  8316. }), Zve = {
  8317. inputElement: Y.any,
  8318. id: String,
  8319. prefixCls: String,
  8320. values: Y.array,
  8321. open: {
  8322. type: Boolean,
  8323. default: void 0
  8324. },
  8325. searchValue: String,
  8326. inputRef: Y.any,
  8327. placeholder: Y.any,
  8328. compositionStatus: {
  8329. type: Boolean,
  8330. default: void 0
  8331. },
  8332. disabled: {
  8333. type: Boolean,
  8334. default: void 0
  8335. },
  8336. mode: String,
  8337. showSearch: {
  8338. type: Boolean,
  8339. default: void 0
  8340. },
  8341. autofocus: {
  8342. type: Boolean,
  8343. default: void 0
  8344. },
  8345. autocomplete: String,
  8346. activeDescendantId: String,
  8347. tabindex: Y.oneOfType([Y.number, Y.string]),
  8348. activeValue: String,
  8349. backfill: {
  8350. type: Boolean,
  8351. default: void 0
  8352. },
  8353. optionLabelRender: Function,
  8354. onInputChange: Function,
  8355. onInputPaste: Function,
  8356. onInputKeyDown: Function,
  8357. onInputMouseDown: Function,
  8358. onInputCompositionStart: Function,
  8359. onInputCompositionEnd: Function
  8360. }, $I = te({
  8361. name: "SingleSelector",
  8362. setup(t) {
  8363. const e = ae(!1), n = L(() => t.mode === "combobox"), r = L(() => n.value || t.showSearch), i = L(() => {
  8364. let c = t.searchValue || "";
  8365. return n.value && t.activeValue && !e.value && (c = t.activeValue), c;
  8366. }), a = PI();
  8367. se([n, () => t.activeValue], () => {
  8368. n.value && (e.value = !1);
  8369. }, {
  8370. immediate: !0
  8371. });
  8372. const o = L(() => t.mode !== "combobox" && !t.open && !t.showSearch ? !1 : !!i.value || t.compositionStatus), s = L(() => {
  8373. const c = t.values[0];
  8374. return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
  8375. }), l = () => {
  8376. if (t.values[0])
  8377. return null;
  8378. const c = o.value ? {
  8379. visibility: "hidden"
  8380. } : void 0;
  8381. return M("span", {
  8382. class: `${t.prefixCls}-selection-placeholder`,
  8383. style: c
  8384. }, [t.placeholder]);
  8385. }, u = (c) => {
  8386. c.target.composing || (e.value = !0, t.onInputChange(c));
  8387. };
  8388. return () => {
  8389. var c, f, d, h;
  8390. const {
  8391. inputElement: p,
  8392. prefixCls: v,
  8393. id: g,
  8394. values: m,
  8395. inputRef: y,
  8396. disabled: b,
  8397. autofocus: _,
  8398. autocomplete: O,
  8399. activeDescendantId: S,
  8400. open: x,
  8401. tabindex: C,
  8402. optionLabelRender: T,
  8403. onInputKeyDown: w,
  8404. onInputMouseDown: P,
  8405. onInputPaste: $,
  8406. onInputCompositionStart: A,
  8407. onInputCompositionEnd: D
  8408. } = t, E = m[0];
  8409. let R = null;
  8410. if (E && a.customSlots) {
  8411. 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) || {};
  8412. 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));
  8413. } else
  8414. R = T && E ? T(E.option) : E == null ? void 0 : E.label;
  8415. return M(wt, null, [M("span", {
  8416. class: `${v}-selection-search`
  8417. }, [M(IZ, {
  8418. inputRef: y,
  8419. prefixCls: v,
  8420. id: g,
  8421. open: x,
  8422. inputElement: p,
  8423. disabled: b,
  8424. autofocus: _,
  8425. autocomplete: O,
  8426. editable: r.value,
  8427. activeDescendantId: S,
  8428. value: i.value,
  8429. onKeydown: w,
  8430. onMousedown: P,
  8431. onChange: u,
  8432. onPaste: $,
  8433. onCompositionstart: A,
  8434. onCompositionend: D,
  8435. tabindex: C,
  8436. attrs: JS(t, !0)
  8437. }, null)]), !n.value && E && !o.value && M("span", {
  8438. class: `${v}-selection-item`,
  8439. title: s.value
  8440. }, [M(wt, {
  8441. key: (h = E.key) !== null && h !== void 0 ? h : E.value
  8442. }, [R])]), l()]);
  8443. };
  8444. }
  8445. });
  8446. $I.props = Zve;
  8447. $I.inheritAttrs = !1;
  8448. function Uve(t) {
  8449. return ![
  8450. // System function button
  8451. ge.ESC,
  8452. ge.SHIFT,
  8453. ge.BACKSPACE,
  8454. ge.TAB,
  8455. ge.WIN_KEY,
  8456. ge.ALT,
  8457. ge.META,
  8458. ge.WIN_KEY_RIGHT,
  8459. ge.CTRL,
  8460. ge.SEMICOLON,
  8461. ge.EQUALS,
  8462. ge.CAPS_LOCK,
  8463. ge.CONTEXT_MENU,
  8464. // F1-F12
  8465. ge.F1,
  8466. ge.F2,
  8467. ge.F3,
  8468. ge.F4,
  8469. ge.F5,
  8470. ge.F6,
  8471. ge.F7,
  8472. ge.F8,
  8473. ge.F9,
  8474. ge.F10,
  8475. ge.F11,
  8476. ge.F12
  8477. ].includes(t);
  8478. }
  8479. function LZ() {
  8480. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = null, n;
  8481. yt(() => {
  8482. clearTimeout(n);
  8483. });
  8484. function r(i) {
  8485. (i || e === null) && (e = i), clearTimeout(n), n = setTimeout(() => {
  8486. e = null;
  8487. }, t);
  8488. }
  8489. return [() => e, r];
  8490. }
  8491. function rm() {
  8492. const t = (e) => {
  8493. t.current = e;
  8494. };
  8495. return t;
  8496. }
  8497. const Xve = te({
  8498. name: "Selector",
  8499. inheritAttrs: !1,
  8500. props: {
  8501. id: String,
  8502. prefixCls: String,
  8503. showSearch: {
  8504. type: Boolean,
  8505. default: void 0
  8506. },
  8507. open: {
  8508. type: Boolean,
  8509. default: void 0
  8510. },
  8511. /** Display in the Selector value, it's not same as `value` prop */
  8512. values: Y.array,
  8513. multiple: {
  8514. type: Boolean,
  8515. default: void 0
  8516. },
  8517. mode: String,
  8518. searchValue: String,
  8519. activeValue: String,
  8520. inputElement: Y.any,
  8521. autofocus: {
  8522. type: Boolean,
  8523. default: void 0
  8524. },
  8525. activeDescendantId: String,
  8526. tabindex: Y.oneOfType([Y.number, Y.string]),
  8527. disabled: {
  8528. type: Boolean,
  8529. default: void 0
  8530. },
  8531. placeholder: Y.any,
  8532. removeIcon: Y.any,
  8533. // Tags
  8534. maxTagCount: Y.oneOfType([Y.number, Y.string]),
  8535. maxTagTextLength: Number,
  8536. maxTagPlaceholder: Y.any,
  8537. tagRender: Function,
  8538. optionLabelRender: Function,
  8539. /** Check if `tokenSeparators` contains `\n` or `\r\n` */
  8540. tokenWithEnter: {
  8541. type: Boolean,
  8542. default: void 0
  8543. },
  8544. // Motion
  8545. choiceTransitionName: String,
  8546. onToggleOpen: {
  8547. type: Function
  8548. },
  8549. /** `onSearch` returns go next step boolean to check if need do toggle open */
  8550. onSearch: Function,
  8551. onSearchSubmit: Function,
  8552. onRemove: Function,
  8553. onInputKeyDown: {
  8554. type: Function
  8555. },
  8556. /**
  8557. * @private get real dom for trigger align.
  8558. * This may be removed after React provides replacement of `findDOMNode`
  8559. */
  8560. domRef: Function
  8561. },
  8562. setup(t, e) {
  8563. let {
  8564. expose: n
  8565. } = e;
  8566. const r = rm(), i = U(!1), [a, o] = LZ(0), s = (m) => {
  8567. const {
  8568. which: y
  8569. } = m;
  8570. (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), Uve(y) && t.onToggleOpen(!0);
  8571. }, l = () => {
  8572. o(!0);
  8573. };
  8574. let u = null;
  8575. const c = (m) => {
  8576. t.onSearch(m, !0, i.value) !== !1 && t.onToggleOpen(!0);
  8577. }, f = () => {
  8578. i.value = !0;
  8579. }, d = (m) => {
  8580. i.value = !1, t.mode !== "combobox" && c(m.target.value);
  8581. }, h = (m) => {
  8582. let {
  8583. target: {
  8584. value: y
  8585. }
  8586. } = m;
  8587. if (t.tokenWithEnter && u && /[\r\n]/.test(u)) {
  8588. const b = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
  8589. y = y.replace(b, u);
  8590. }
  8591. u = null, c(y);
  8592. }, p = (m) => {
  8593. const {
  8594. clipboardData: y
  8595. } = m;
  8596. u = y.getData("text");
  8597. }, v = (m) => {
  8598. let {
  8599. target: y
  8600. } = m;
  8601. y !== r.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
  8602. r.current.focus();
  8603. }) : r.current.focus());
  8604. }, g = (m) => {
  8605. const y = a();
  8606. m.target !== r.current && !y && m.preventDefault(), (t.mode !== "combobox" && (!t.showSearch || !y) || !t.open) && (t.open && t.onSearch("", !0, !1), t.onToggleOpen());
  8607. };
  8608. return n({
  8609. focus: () => {
  8610. r.current.focus();
  8611. },
  8612. blur: () => {
  8613. r.current.blur();
  8614. }
  8615. }), () => {
  8616. const {
  8617. prefixCls: m,
  8618. domRef: y,
  8619. mode: b
  8620. } = t, _ = {
  8621. inputRef: r,
  8622. onInputKeyDown: s,
  8623. onInputMouseDown: l,
  8624. onInputChange: h,
  8625. onInputPaste: p,
  8626. compositionStatus: i.value,
  8627. onInputCompositionStart: f,
  8628. onInputCompositionEnd: d
  8629. }, O = b === "multiple" || b === "tags" ? M(jve, j(j({}, t), _), null) : M($I, j(j({}, t), _), null);
  8630. return M("div", {
  8631. ref: y,
  8632. class: `${m}-selector`,
  8633. onClick: v,
  8634. onMousedown: g
  8635. }, [O]);
  8636. };
  8637. }
  8638. });
  8639. function Yve(t, e, n) {
  8640. function r(i) {
  8641. var a, o, s;
  8642. let l = i.target;
  8643. l.shadowRoot && i.composed && (l = i.composedPath()[0] || l);
  8644. 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()];
  8645. e.value && u.every((c) => c && !c.contains(l) && c !== l) && n(!1);
  8646. }
  8647. it(() => {
  8648. window.addEventListener("mousedown", r);
  8649. }), yt(() => {
  8650. window.removeEventListener("mousedown", r);
  8651. });
  8652. }
  8653. function qve() {
  8654. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  8655. const e = ae(!1);
  8656. let n;
  8657. const r = () => {
  8658. clearTimeout(n);
  8659. };
  8660. return it(() => {
  8661. r();
  8662. }), [e, (a, o) => {
  8663. r(), n = setTimeout(() => {
  8664. e.value = a, o && o();
  8665. }, t);
  8666. }, r];
  8667. }
  8668. const NZ = Symbol("BaseSelectContextKey");
  8669. function Kve(t) {
  8670. return pt(NZ, t);
  8671. }
  8672. function Jve() {
  8673. return Ge(NZ, {});
  8674. }
  8675. const AI = () => {
  8676. if (typeof navigator > "u" || typeof window > "u")
  8677. return !1;
  8678. const t = navigator.userAgent || navigator.vendor || window.opera;
  8679. 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));
  8680. };
  8681. function BZ(t) {
  8682. if (!tp(t)) return tn(t);
  8683. const e = new Proxy({}, {
  8684. get(n, r, i) {
  8685. return Reflect.get(t.value, r, i);
  8686. },
  8687. set(n, r, i) {
  8688. return t.value[r] = i, !0;
  8689. },
  8690. deleteProperty(n, r) {
  8691. return Reflect.deleteProperty(t.value, r);
  8692. },
  8693. has(n, r) {
  8694. return Reflect.has(t.value, r);
  8695. },
  8696. ownKeys() {
  8697. return Object.keys(t.value);
  8698. },
  8699. getOwnPropertyDescriptor() {
  8700. return {
  8701. enumerable: !0,
  8702. configurable: !0
  8703. };
  8704. }
  8705. });
  8706. return tn(e);
  8707. }
  8708. var ege = function(t, e) {
  8709. var n = {};
  8710. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  8711. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  8712. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  8713. return n;
  8714. };
  8715. const tge = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], nge = () => ({
  8716. prefixCls: String,
  8717. id: String,
  8718. omitDomProps: Array,
  8719. // >>> Value
  8720. displayValues: Array,
  8721. onDisplayValuesChange: Function,
  8722. // >>> Active
  8723. /** Current dropdown list active item string value */
  8724. activeValue: String,
  8725. /** Link search input with target element */
  8726. activeDescendantId: String,
  8727. onActiveValueChange: Function,
  8728. // >>> Search
  8729. searchValue: String,
  8730. /** Trigger onSearch, return false to prevent trigger open event */
  8731. onSearch: Function,
  8732. /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  8733. onSearchSplit: Function,
  8734. maxLength: Number,
  8735. OptionList: Y.any,
  8736. /** Tell if provided `options` is empty */
  8737. emptyOptions: Boolean
  8738. }), zZ = () => ({
  8739. showSearch: {
  8740. type: Boolean,
  8741. default: void 0
  8742. },
  8743. tagRender: {
  8744. type: Function
  8745. },
  8746. optionLabelRender: {
  8747. type: Function
  8748. },
  8749. direction: {
  8750. type: String
  8751. },
  8752. // MISC
  8753. tabindex: Number,
  8754. autofocus: Boolean,
  8755. notFoundContent: Y.any,
  8756. placeholder: Y.any,
  8757. onClear: Function,
  8758. choiceTransitionName: String,
  8759. // >>> Mode
  8760. mode: String,
  8761. // >>> Status
  8762. disabled: {
  8763. type: Boolean,
  8764. default: void 0
  8765. },
  8766. loading: {
  8767. type: Boolean,
  8768. default: void 0
  8769. },
  8770. // >>> Open
  8771. open: {
  8772. type: Boolean,
  8773. default: void 0
  8774. },
  8775. defaultOpen: {
  8776. type: Boolean,
  8777. default: void 0
  8778. },
  8779. onDropdownVisibleChange: {
  8780. type: Function
  8781. },
  8782. // >>> Customize Input
  8783. /** @private Internal usage. Do not use in your production. */
  8784. getInputElement: {
  8785. type: Function
  8786. },
  8787. /** @private Internal usage. Do not use in your production. */
  8788. getRawInputElement: {
  8789. type: Function
  8790. },
  8791. // >>> Selector
  8792. maxTagTextLength: Number,
  8793. maxTagCount: {
  8794. type: [String, Number]
  8795. },
  8796. maxTagPlaceholder: Y.any,
  8797. // >>> Search
  8798. tokenSeparators: {
  8799. type: Array
  8800. },
  8801. // >>> Icons
  8802. allowClear: {
  8803. type: Boolean,
  8804. default: void 0
  8805. },
  8806. showArrow: {
  8807. type: Boolean,
  8808. default: void 0
  8809. },
  8810. inputIcon: Y.any,
  8811. /** Clear all icon */
  8812. clearIcon: Y.any,
  8813. /** Selector remove icon */
  8814. removeIcon: Y.any,
  8815. // >>> Dropdown
  8816. animation: String,
  8817. transitionName: String,
  8818. dropdownStyle: {
  8819. type: Object
  8820. },
  8821. dropdownClassName: String,
  8822. dropdownMatchSelectWidth: {
  8823. type: [Boolean, Number],
  8824. default: void 0
  8825. },
  8826. dropdownRender: {
  8827. type: Function
  8828. },
  8829. dropdownAlign: Object,
  8830. placement: {
  8831. type: String
  8832. },
  8833. getPopupContainer: {
  8834. type: Function
  8835. },
  8836. // >>> Focus
  8837. showAction: {
  8838. type: Array
  8839. },
  8840. onBlur: {
  8841. type: Function
  8842. },
  8843. onFocus: {
  8844. type: Function
  8845. },
  8846. // >>> Rest Events
  8847. onKeyup: Function,
  8848. onKeydown: Function,
  8849. onMousedown: Function,
  8850. onPopupScroll: Function,
  8851. onInputKeyDown: Function,
  8852. onMouseenter: Function,
  8853. onMouseleave: Function,
  8854. onClick: Function
  8855. }), rge = () => I(I({}, nge()), zZ());
  8856. function EI(t) {
  8857. return t === "tags" || t === "multiple";
  8858. }
  8859. const ige = te({
  8860. compatConfig: {
  8861. MODE: 3
  8862. },
  8863. name: "BaseSelect",
  8864. inheritAttrs: !1,
  8865. props: sr(rge(), {
  8866. showAction: [],
  8867. notFoundContent: "Not Found"
  8868. }),
  8869. setup(t, e) {
  8870. let {
  8871. attrs: n,
  8872. expose: r,
  8873. slots: i
  8874. } = e;
  8875. const a = L(() => EI(t.mode)), o = L(() => t.showSearch !== void 0 ? t.showSearch : a.value || t.mode === "combobox"), s = ae(!1);
  8876. it(() => {
  8877. s.value = AI();
  8878. });
  8879. const l = PI(), u = ae(null), c = rm(), f = ae(null), d = ae(null), h = ae(null), p = U(!1), [v, g, m] = qve();
  8880. r({
  8881. focus: () => {
  8882. var H;
  8883. (H = d.value) === null || H === void 0 || H.focus();
  8884. },
  8885. blur: () => {
  8886. var H;
  8887. (H = d.value) === null || H === void 0 || H.blur();
  8888. },
  8889. scrollTo: (H) => {
  8890. var G;
  8891. return (G = h.value) === null || G === void 0 ? void 0 : G.scrollTo(H);
  8892. }
  8893. });
  8894. const _ = L(() => {
  8895. var H;
  8896. if (t.mode !== "combobox")
  8897. return t.searchValue;
  8898. const G = (H = t.displayValues[0]) === null || H === void 0 ? void 0 : H.value;
  8899. return typeof G == "string" || typeof G == "number" ? String(G) : "";
  8900. }), O = t.open !== void 0 ? t.open : t.defaultOpen, S = ae(O), x = ae(O), C = (H) => {
  8901. S.value = t.open !== void 0 ? t.open : H, x.value = S.value;
  8902. };
  8903. se(() => t.open, () => {
  8904. C(t.open);
  8905. });
  8906. const T = L(() => !t.notFoundContent && t.emptyOptions);
  8907. ht(() => {
  8908. x.value = S.value, (t.disabled || T.value && x.value && t.mode === "combobox") && (x.value = !1);
  8909. });
  8910. const w = L(() => T.value ? !1 : x.value), P = (H) => {
  8911. const G = H !== void 0 ? H : !x.value;
  8912. x.value !== G && !t.disabled && (C(G), t.onDropdownVisibleChange && t.onDropdownVisibleChange(G));
  8913. }, $ = L(() => (t.tokenSeparators || []).some((H) => [`
  8914. `, `\r
  8915. `].includes(H))), A = (H, G, re) => {
  8916. var fe, de;
  8917. let Ee = !0, $e = H;
  8918. (fe = t.onActiveValueChange) === null || fe === void 0 || fe.call(t, null);
  8919. const Se = re ? null : Jfe(H, t.tokenSeparators);
  8920. 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, {
  8921. source: G ? "typing" : "effect"
  8922. }), Ee;
  8923. }, D = (H) => {
  8924. var G;
  8925. !H || !H.trim() || (G = t.onSearch) === null || G === void 0 || G.call(t, H, {
  8926. source: "submit"
  8927. });
  8928. };
  8929. se(x, () => {
  8930. !x.value && !a.value && t.mode !== "combobox" && A("", !1, !1);
  8931. }, {
  8932. immediate: !0,
  8933. flush: "post"
  8934. }), se(() => t.disabled, () => {
  8935. S.value && t.disabled && C(!1), t.disabled && !p.value && g(!1);
  8936. }, {
  8937. immediate: !0
  8938. });
  8939. const [E, R] = LZ(), N = function(H) {
  8940. var G;
  8941. const re = E(), {
  8942. which: fe
  8943. } = H;
  8944. 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) {
  8945. const Se = [...t.displayValues];
  8946. let be = null;
  8947. for (let he = Se.length - 1; he >= 0; he -= 1) {
  8948. const Te = Se[he];
  8949. if (!Te.disabled) {
  8950. Se.splice(he, 1), be = Te;
  8951. break;
  8952. }
  8953. }
  8954. be && t.onDisplayValuesChange(Se, {
  8955. type: "remove",
  8956. values: [be]
  8957. });
  8958. }
  8959. for (var de = arguments.length, Ee = new Array(de > 1 ? de - 1 : 0), $e = 1; $e < de; $e++)
  8960. Ee[$e - 1] = arguments[$e];
  8961. x.value && h.value && h.value.onKeydown(H, ...Ee), (G = t.onKeydown) === null || G === void 0 || G.call(t, H, ...Ee);
  8962. }, V = function(H) {
  8963. for (var G = arguments.length, re = new Array(G > 1 ? G - 1 : 0), fe = 1; fe < G; fe++)
  8964. re[fe - 1] = arguments[fe];
  8965. x.value && h.value && h.value.onKeyup(H, ...re), t.onKeyup && t.onKeyup(H, ...re);
  8966. }, z = (H) => {
  8967. const G = t.displayValues.filter((re) => re !== H);
  8968. t.onDisplayValuesChange(G, {
  8969. type: "remove",
  8970. values: [H]
  8971. });
  8972. }, W = ae(!1), F = function() {
  8973. g(!0), t.disabled || (t.onFocus && !W.value && t.onFocus(...arguments), t.showAction && t.showAction.includes("focus") && P(!0)), W.value = !0;
  8974. }, Q = U(!1), Z = function() {
  8975. if (Q.value || (p.value = !0, g(!1, () => {
  8976. W.value = !1, p.value = !1, P(!1);
  8977. }), t.disabled))
  8978. return;
  8979. const H = _.value;
  8980. H && (t.mode === "tags" ? t.onSearch(H, {
  8981. source: "submit"
  8982. }) : t.mode === "multiple" && t.onSearch("", {
  8983. source: "blur"
  8984. })), t.onBlur && t.onBlur(...arguments);
  8985. }, ne = () => {
  8986. Q.value = !0;
  8987. }, ee = () => {
  8988. Q.value = !1;
  8989. };
  8990. pt("VCSelectContainerEvent", {
  8991. focus: F,
  8992. blur: Z
  8993. });
  8994. const oe = [];
  8995. it(() => {
  8996. oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
  8997. }), yt(() => {
  8998. oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
  8999. });
  9000. const K = function(H) {
  9001. var G, re;
  9002. const {
  9003. target: fe
  9004. } = H, de = (G = f.value) === null || G === void 0 ? void 0 : G.getPopupElement();
  9005. if (de && de.contains(fe)) {
  9006. const be = setTimeout(() => {
  9007. var he;
  9008. const Te = oe.indexOf(be);
  9009. Te !== -1 && oe.splice(Te, 1), m(), !s.value && !de.contains(document.activeElement) && ((he = d.value) === null || he === void 0 || he.focus());
  9010. });
  9011. oe.push(be);
  9012. }
  9013. for (var Ee = arguments.length, $e = new Array(Ee > 1 ? Ee - 1 : 0), Se = 1; Se < Ee; Se++)
  9014. $e[Se - 1] = arguments[Se];
  9015. (re = t.onMousedown) === null || re === void 0 || re.call(t, H, ...$e);
  9016. }, ie = ae(null), X = () => {
  9017. };
  9018. return it(() => {
  9019. se(w, () => {
  9020. var H;
  9021. if (w.value) {
  9022. const G = Math.ceil((H = u.value) === null || H === void 0 ? void 0 : H.offsetWidth);
  9023. ie.value !== G && !Number.isNaN(G) && (ie.value = G);
  9024. }
  9025. }, {
  9026. immediate: !0,
  9027. flush: "post"
  9028. });
  9029. }), Yve([u, f], w, P), Kve(BZ(I(I({}, $S(t)), {
  9030. open: x,
  9031. triggerOpen: w,
  9032. showSearch: o,
  9033. multiple: a,
  9034. toggleOpen: P
  9035. }))), () => {
  9036. const H = I(I({}, t), n), {
  9037. prefixCls: G,
  9038. id: re,
  9039. open: fe,
  9040. defaultOpen: de,
  9041. mode: Ee,
  9042. // Search related
  9043. showSearch: $e,
  9044. searchValue: Se,
  9045. onSearch: be,
  9046. // Icons
  9047. allowClear: he,
  9048. clearIcon: Te,
  9049. showArrow: ze,
  9050. inputIcon: ut,
  9051. // Others
  9052. disabled: ct,
  9053. loading: Dt,
  9054. getInputElement: ve,
  9055. getPopupContainer: Xe,
  9056. placement: Rt,
  9057. // Dropdown
  9058. animation: An,
  9059. transitionName: sn,
  9060. dropdownStyle: $r,
  9061. dropdownClassName: Va,
  9062. dropdownMatchSelectWidth: Bp,
  9063. dropdownRender: zp,
  9064. dropdownAlign: py,
  9065. showAction: Hw,
  9066. direction: Gf,
  9067. // Tags
  9068. tokenSeparators: Gw,
  9069. tagRender: Vp,
  9070. optionLabelRender: jw,
  9071. // Events
  9072. onPopupScroll: jf,
  9073. onDropdownVisibleChange: F4,
  9074. onFocus: upt,
  9075. onBlur: cpt,
  9076. onKeyup: fpt,
  9077. onKeydown: dpt,
  9078. onMousedown: hpt,
  9079. onClear: Zw,
  9080. omitDomProps: Uw,
  9081. getRawInputElement: W4,
  9082. displayValues: vy,
  9083. onDisplayValuesChange: Ale,
  9084. emptyOptions: Ele,
  9085. activeDescendantId: Mle,
  9086. activeValue: Ile,
  9087. OptionList: Dle
  9088. } = H, Rle = ege(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"]), Q4 = Ee === "combobox" && ve && ve() || null, Fp = typeof W4 == "function" && W4(), Xw = I({}, Rle);
  9089. let H4;
  9090. Fp && (H4 = (Iu) => {
  9091. P(Iu);
  9092. }), tge.forEach((Iu) => {
  9093. delete Xw[Iu];
  9094. }), Uw == null || Uw.forEach((Iu) => {
  9095. delete Xw[Iu];
  9096. });
  9097. const G4 = ze !== void 0 ? ze : Dt || !a.value && Ee !== "combobox";
  9098. let j4;
  9099. G4 && (j4 = M(pf, {
  9100. class: ye(`${G}-arrow`, {
  9101. [`${G}-arrow-loading`]: Dt
  9102. }),
  9103. customizeIcon: ut,
  9104. customizeIconProps: {
  9105. loading: Dt,
  9106. searchValue: _.value,
  9107. open: x.value,
  9108. focused: v.value,
  9109. showSearch: o.value
  9110. }
  9111. }, null));
  9112. let Z4;
  9113. const kle = () => {
  9114. Zw == null || Zw(), Ale([], {
  9115. type: "clear",
  9116. values: vy
  9117. }), A("", !1, !1);
  9118. };
  9119. !ct && he && (vy.length || _.value) && (Z4 = M(pf, {
  9120. class: `${G}-clear`,
  9121. onMousedown: kle,
  9122. customizeIcon: Te
  9123. }, {
  9124. default: () => [Kt("×")]
  9125. }));
  9126. const Lle = M(Dle, {
  9127. ref: h
  9128. }, I(I({}, l.customSlots), {
  9129. option: i.option
  9130. })), Nle = ye(G, n.class, {
  9131. [`${G}-focused`]: v.value,
  9132. [`${G}-multiple`]: a.value,
  9133. [`${G}-single`]: !a.value,
  9134. [`${G}-allow-clear`]: he,
  9135. [`${G}-show-arrow`]: G4,
  9136. [`${G}-disabled`]: ct,
  9137. [`${G}-loading`]: Dt,
  9138. [`${G}-open`]: x.value,
  9139. [`${G}-customize-input`]: Q4,
  9140. [`${G}-show-search`]: o.value
  9141. }), U4 = M(Pve, {
  9142. ref: f,
  9143. disabled: ct,
  9144. prefixCls: G,
  9145. visible: w.value,
  9146. popupElement: Lle,
  9147. containerWidth: ie.value,
  9148. animation: An,
  9149. transitionName: sn,
  9150. dropdownStyle: $r,
  9151. dropdownClassName: Va,
  9152. direction: Gf,
  9153. dropdownMatchSelectWidth: Bp,
  9154. dropdownRender: zp,
  9155. dropdownAlign: py,
  9156. placement: Rt,
  9157. getPopupContainer: Xe,
  9158. empty: Ele,
  9159. getTriggerDOMNode: () => c.current,
  9160. onPopupVisibleChange: H4,
  9161. onPopupMouseEnter: X,
  9162. onPopupFocusin: ne,
  9163. onPopupFocusout: ee
  9164. }, {
  9165. default: () => Fp ? Ui(Fp) && Pn(Fp, {
  9166. ref: c
  9167. }, !1, !0) : M(Xve, j(j({}, t), {}, {
  9168. domRef: c,
  9169. prefixCls: G,
  9170. inputElement: Q4,
  9171. ref: d,
  9172. id: re,
  9173. showSearch: o.value,
  9174. mode: Ee,
  9175. activeDescendantId: Mle,
  9176. tagRender: Vp,
  9177. optionLabelRender: jw,
  9178. values: vy,
  9179. open: x.value,
  9180. onToggleOpen: P,
  9181. activeValue: Ile,
  9182. searchValue: _.value,
  9183. onSearch: A,
  9184. onSearchSubmit: D,
  9185. onRemove: z,
  9186. tokenWithEnter: $.value
  9187. }), null)
  9188. });
  9189. let Yw;
  9190. return Fp ? Yw = U4 : Yw = M("div", j(j({}, Xw), {}, {
  9191. class: Nle,
  9192. ref: u,
  9193. onMousedown: K,
  9194. onKeydown: N,
  9195. onKeyup: V
  9196. }), [v.value && !x.value && M("span", {
  9197. style: {
  9198. width: 0,
  9199. height: 0,
  9200. position: "absolute",
  9201. overflow: "hidden",
  9202. opacity: 0
  9203. },
  9204. "aria-live": "polite"
  9205. }, [`${vy.map((Iu) => {
  9206. let {
  9207. label: X4,
  9208. value: Ble
  9209. } = Iu;
  9210. return ["number", "string"].includes(typeof X4) ? X4 : Ble;
  9211. }).join(", ")}`]), U4, j4, Z4]), Yw;
  9212. };
  9213. }
  9214. }), ex = (t, e) => {
  9215. let {
  9216. height: n,
  9217. offset: r,
  9218. prefixCls: i,
  9219. onInnerResize: a
  9220. } = t, {
  9221. slots: o
  9222. } = e;
  9223. var s;
  9224. let l = {}, u = {
  9225. display: "flex",
  9226. flexDirection: "column"
  9227. };
  9228. return r !== void 0 && (l = {
  9229. height: `${n}px`,
  9230. position: "relative",
  9231. overflow: "hidden"
  9232. }, u = I(I({}, u), {
  9233. transform: `translateY(${r}px)`,
  9234. position: "absolute",
  9235. left: 0,
  9236. right: 0,
  9237. top: 0
  9238. })), M("div", {
  9239. style: l
  9240. }, [M(ph, {
  9241. onResize: (c) => {
  9242. let {
  9243. offsetHeight: f
  9244. } = c;
  9245. f && a && a();
  9246. }
  9247. }, {
  9248. default: () => [M("div", {
  9249. style: u,
  9250. class: ye({
  9251. [`${i}-holder-inner`]: i
  9252. })
  9253. }, [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)])]
  9254. })]);
  9255. };
  9256. ex.displayName = "Filter";
  9257. ex.inheritAttrs = !1;
  9258. ex.props = {
  9259. prefixCls: String,
  9260. /** Virtual filler height. Should be `count * itemMinHeight` */
  9261. height: Number,
  9262. /** Set offset of visible items. Should be the top of start item position */
  9263. offset: Number,
  9264. onInnerResize: Function
  9265. };
  9266. const VZ = (t, e) => {
  9267. let {
  9268. setRef: n
  9269. } = t, {
  9270. slots: r
  9271. } = e;
  9272. var i;
  9273. const a = Yn((i = r.default) === null || i === void 0 ? void 0 : i.call(r));
  9274. return a && a.length ? Ns(a[0], {
  9275. ref: n
  9276. }) : a;
  9277. };
  9278. VZ.props = {
  9279. setRef: {
  9280. type: Function,
  9281. default: () => {
  9282. }
  9283. }
  9284. };
  9285. const age = 20;
  9286. function pN(t) {
  9287. return "touches" in t ? t.touches[0].pageY : t.pageY;
  9288. }
  9289. const oge = te({
  9290. compatConfig: {
  9291. MODE: 3
  9292. },
  9293. name: "ScrollBar",
  9294. inheritAttrs: !1,
  9295. props: {
  9296. prefixCls: String,
  9297. scrollTop: Number,
  9298. scrollHeight: Number,
  9299. height: Number,
  9300. count: Number,
  9301. onScroll: {
  9302. type: Function
  9303. },
  9304. onStartMove: {
  9305. type: Function
  9306. },
  9307. onStopMove: {
  9308. type: Function
  9309. }
  9310. },
  9311. setup() {
  9312. return {
  9313. moveRaf: null,
  9314. scrollbarRef: rm(),
  9315. thumbRef: rm(),
  9316. visibleTimeout: null,
  9317. state: tn({
  9318. dragging: !1,
  9319. pageY: null,
  9320. startTop: null,
  9321. visible: !1
  9322. })
  9323. };
  9324. },
  9325. watch: {
  9326. scrollTop: {
  9327. handler() {
  9328. this.delayHidden();
  9329. },
  9330. flush: "post"
  9331. }
  9332. },
  9333. mounted() {
  9334. var t, e;
  9335. (t = this.scrollbarRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
  9336. passive: !1
  9337. } : !1), (e = this.thumbRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onMouseDown, pr ? {
  9338. passive: !1
  9339. } : !1);
  9340. },
  9341. beforeUnmount() {
  9342. this.removeEvents(), clearTimeout(this.visibleTimeout);
  9343. },
  9344. methods: {
  9345. delayHidden() {
  9346. clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
  9347. this.state.visible = !1;
  9348. }, 2e3);
  9349. },
  9350. onScrollbarTouchStart(t) {
  9351. t.preventDefault();
  9352. },
  9353. onContainerMouseDown(t) {
  9354. t.stopPropagation(), t.preventDefault();
  9355. },
  9356. // ======================= Clean =======================
  9357. patchEvents() {
  9358. window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, pr ? {
  9359. passive: !1
  9360. } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
  9361. },
  9362. removeEvents() {
  9363. window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
  9364. passive: !1
  9365. } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, pr ? {
  9366. passive: !1
  9367. } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, pr ? {
  9368. passive: !1
  9369. } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), xt.cancel(this.moveRaf);
  9370. },
  9371. // ======================= Thumb =======================
  9372. onMouseDown(t) {
  9373. const {
  9374. onStartMove: e
  9375. } = this.$props;
  9376. I(this.state, {
  9377. dragging: !0,
  9378. pageY: pN(t),
  9379. startTop: this.getTop()
  9380. }), e(), this.patchEvents(), t.stopPropagation(), t.preventDefault();
  9381. },
  9382. onMouseMove(t) {
  9383. const {
  9384. dragging: e,
  9385. pageY: n,
  9386. startTop: r
  9387. } = this.state, {
  9388. onScroll: i
  9389. } = this.$props;
  9390. if (xt.cancel(this.moveRaf), e) {
  9391. const a = pN(t) - n, o = r + a, s = this.getEnableScrollRange(), l = this.getEnableHeightRange(), u = l ? o / l : 0, c = Math.ceil(u * s);
  9392. this.moveRaf = xt(() => {
  9393. i(c);
  9394. });
  9395. }
  9396. },
  9397. onMouseUp() {
  9398. const {
  9399. onStopMove: t
  9400. } = this.$props;
  9401. this.state.dragging = !1, t(), this.removeEvents();
  9402. },
  9403. // ===================== Calculate =====================
  9404. getSpinHeight() {
  9405. const {
  9406. height: t,
  9407. scrollHeight: e
  9408. } = this.$props;
  9409. let n = t / e * 100;
  9410. return n = Math.max(n, age), n = Math.min(n, t / 2), Math.floor(n);
  9411. },
  9412. getEnableScrollRange() {
  9413. const {
  9414. scrollHeight: t,
  9415. height: e
  9416. } = this.$props;
  9417. return t - e || 0;
  9418. },
  9419. getEnableHeightRange() {
  9420. const {
  9421. height: t
  9422. } = this.$props, e = this.getSpinHeight();
  9423. return t - e || 0;
  9424. },
  9425. getTop() {
  9426. const {
  9427. scrollTop: t
  9428. } = this.$props, e = this.getEnableScrollRange(), n = this.getEnableHeightRange();
  9429. return t === 0 || e === 0 ? 0 : t / e * n;
  9430. },
  9431. // Not show scrollbar when height is large than scrollHeight
  9432. showScroll() {
  9433. const {
  9434. height: t,
  9435. scrollHeight: e
  9436. } = this.$props;
  9437. return e > t;
  9438. }
  9439. },
  9440. render() {
  9441. const {
  9442. dragging: t,
  9443. visible: e
  9444. } = this.state, {
  9445. prefixCls: n
  9446. } = this.$props, r = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), o = a && e;
  9447. return M("div", {
  9448. ref: this.scrollbarRef,
  9449. class: ye(`${n}-scrollbar`, {
  9450. [`${n}-scrollbar-show`]: a
  9451. }),
  9452. style: {
  9453. width: "8px",
  9454. top: 0,
  9455. bottom: 0,
  9456. right: 0,
  9457. position: "absolute",
  9458. display: o ? void 0 : "none"
  9459. },
  9460. onMousedown: this.onContainerMouseDown,
  9461. onMousemove: this.delayHidden
  9462. }, [M("div", {
  9463. ref: this.thumbRef,
  9464. class: ye(`${n}-scrollbar-thumb`, {
  9465. [`${n}-scrollbar-thumb-moving`]: t
  9466. }),
  9467. style: {
  9468. width: "100%",
  9469. height: r,
  9470. top: i,
  9471. left: 0,
  9472. position: "absolute",
  9473. background: "rgba(0, 0, 0, 0.5)",
  9474. borderRadius: "99px",
  9475. cursor: "pointer",
  9476. userSelect: "none"
  9477. },
  9478. onMousedown: this.onMouseDown
  9479. }, null)]);
  9480. }
  9481. });
  9482. function sge(t, e, n, r) {
  9483. const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = U(Symbol("update"));
  9484. se(t, () => {
  9485. o.value = Symbol("update");
  9486. });
  9487. let s;
  9488. function l() {
  9489. xt.cancel(s);
  9490. }
  9491. function u() {
  9492. l(), s = xt(() => {
  9493. i.forEach((f, d) => {
  9494. if (f && f.offsetParent) {
  9495. const {
  9496. offsetHeight: h
  9497. } = f;
  9498. a.get(d) !== h && (o.value = Symbol("update"), a.set(d, f.offsetHeight));
  9499. }
  9500. });
  9501. });
  9502. }
  9503. function c(f, d) {
  9504. const h = e(f);
  9505. i.get(h), d ? (i.set(h, d.$el || d), u()) : i.delete(h);
  9506. }
  9507. return nl(() => {
  9508. l();
  9509. }), [c, u, a, o];
  9510. }
  9511. function lge(t, e, n, r, i, a, o, s) {
  9512. let l;
  9513. return (u) => {
  9514. if (u == null) {
  9515. s();
  9516. return;
  9517. }
  9518. xt.cancel(l);
  9519. const c = e.value, f = r.itemHeight;
  9520. if (typeof u == "number")
  9521. o(u);
  9522. else if (u && typeof u == "object") {
  9523. let d;
  9524. const {
  9525. align: h
  9526. } = u;
  9527. "index" in u ? {
  9528. index: d
  9529. } = u : d = c.findIndex((g) => i(g) === u.key);
  9530. const {
  9531. offset: p = 0
  9532. } = u, v = (g, m) => {
  9533. if (g < 0 || !t.value) return;
  9534. const y = t.value.clientHeight;
  9535. let b = !1, _ = m;
  9536. if (y) {
  9537. const O = m || h;
  9538. let S = 0, x = 0, C = 0;
  9539. const T = Math.min(c.length, d);
  9540. for (let $ = 0; $ <= T; $ += 1) {
  9541. const A = i(c[$]);
  9542. x = S;
  9543. const D = n.get(A);
  9544. C = x + (D === void 0 ? f : D), S = C, $ === d && D === void 0 && (b = !0);
  9545. }
  9546. const w = t.value.scrollTop;
  9547. let P = null;
  9548. switch (O) {
  9549. case "top":
  9550. P = x - p;
  9551. break;
  9552. case "bottom":
  9553. P = C - y + p;
  9554. break;
  9555. default: {
  9556. const $ = w + y;
  9557. x < w ? _ = "top" : C > $ && (_ = "bottom");
  9558. }
  9559. }
  9560. P !== null && P !== w && o(P);
  9561. }
  9562. l = xt(() => {
  9563. b && a(), v(g - 1, _);
  9564. }, 2);
  9565. };
  9566. v(5);
  9567. }
  9568. };
  9569. }
  9570. const uge = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), FZ = (t, e) => {
  9571. let n = !1, r = null;
  9572. function i() {
  9573. clearTimeout(r), n = !0, r = setTimeout(() => {
  9574. n = !1;
  9575. }, 50);
  9576. }
  9577. return function(a) {
  9578. let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  9579. const s = (
  9580. // Pass origin wheel when on the top
  9581. a < 0 && t.value || // Pass origin wheel when on the bottom
  9582. a > 0 && e.value
  9583. );
  9584. return o && s ? (clearTimeout(r), n = !1) : (!s || n) && i(), !n && s;
  9585. };
  9586. };
  9587. function cge(t, e, n, r) {
  9588. let i = 0, a = null, o = null, s = !1;
  9589. const l = FZ(e, n);
  9590. function u(f) {
  9591. if (!t.value) return;
  9592. xt.cancel(a);
  9593. const {
  9594. deltaY: d
  9595. } = f;
  9596. i += d, o = d, !l(d) && (uge || f.preventDefault(), a = xt(() => {
  9597. r(i * (s ? 10 : 1)), i = 0;
  9598. }));
  9599. }
  9600. function c(f) {
  9601. t.value && (s = f.detail === o);
  9602. }
  9603. return [u, c];
  9604. }
  9605. const fge = 14 / 15;
  9606. function dge(t, e, n) {
  9607. let r = !1, i = 0, a = null, o = null;
  9608. const s = () => {
  9609. a && (a.removeEventListener("touchmove", l), a.removeEventListener("touchend", u));
  9610. }, l = (d) => {
  9611. if (r) {
  9612. const h = Math.ceil(d.touches[0].pageY);
  9613. let p = i - h;
  9614. i = h, n(p) && d.preventDefault(), clearInterval(o), o = setInterval(() => {
  9615. p *= fge, (!n(p, !0) || Math.abs(p) <= 0.1) && clearInterval(o);
  9616. }, 16);
  9617. }
  9618. }, u = () => {
  9619. r = !1, s();
  9620. }, c = (d) => {
  9621. s(), d.touches.length === 1 && !r && (r = !0, i = Math.ceil(d.touches[0].pageY), a = d.target, a.addEventListener("touchmove", l, {
  9622. passive: !1
  9623. }), a.addEventListener("touchend", u));
  9624. }, f = () => {
  9625. };
  9626. it(() => {
  9627. document.addEventListener("touchmove", f, {
  9628. passive: !1
  9629. }), se(t, (d) => {
  9630. e.value.removeEventListener("touchstart", c), s(), clearInterval(o), d && e.value.addEventListener("touchstart", c, {
  9631. passive: !1
  9632. });
  9633. }, {
  9634. immediate: !0
  9635. });
  9636. }), yt(() => {
  9637. document.removeEventListener("touchmove", f);
  9638. });
  9639. }
  9640. var hge = function(t, e) {
  9641. var n = {};
  9642. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  9643. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  9644. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  9645. return n;
  9646. };
  9647. const pge = [], vge = {
  9648. overflowY: "auto",
  9649. overflowAnchor: "none"
  9650. };
  9651. function gge(t, e, n, r, i, a) {
  9652. let {
  9653. getKey: o
  9654. } = a;
  9655. return t.slice(e, n + 1).map((s, l) => {
  9656. const u = e + l, c = i(s, u, {
  9657. // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
  9658. }), f = o(s);
  9659. return M(VZ, {
  9660. key: f,
  9661. setRef: (d) => r(s, d)
  9662. }, {
  9663. default: () => [c]
  9664. });
  9665. });
  9666. }
  9667. const mge = te({
  9668. compatConfig: {
  9669. MODE: 3
  9670. },
  9671. name: "List",
  9672. inheritAttrs: !1,
  9673. props: {
  9674. prefixCls: String,
  9675. data: Y.array,
  9676. height: Number,
  9677. itemHeight: Number,
  9678. /** If not match virtual scroll condition, Set List still use height of container. */
  9679. fullHeight: {
  9680. type: Boolean,
  9681. default: void 0
  9682. },
  9683. itemKey: {
  9684. type: [String, Number, Function],
  9685. required: !0
  9686. },
  9687. component: {
  9688. type: [String, Object]
  9689. },
  9690. /** Set `false` will always use real scroll instead of virtual one */
  9691. virtual: {
  9692. type: Boolean,
  9693. default: void 0
  9694. },
  9695. children: Function,
  9696. onScroll: Function,
  9697. onMousedown: Function,
  9698. onMouseenter: Function,
  9699. onVisibleChange: Function
  9700. },
  9701. setup(t, e) {
  9702. let {
  9703. expose: n
  9704. } = e;
  9705. const r = L(() => {
  9706. const {
  9707. height: z,
  9708. itemHeight: W,
  9709. virtual: F
  9710. } = t;
  9711. return !!(F !== !1 && z && W);
  9712. }), i = L(() => {
  9713. const {
  9714. height: z,
  9715. itemHeight: W,
  9716. data: F
  9717. } = t;
  9718. return r.value && F && W * F.length > z;
  9719. }), a = tn({
  9720. scrollTop: 0,
  9721. scrollMoving: !1
  9722. }), o = L(() => t.data || pge), s = ae([]);
  9723. se(o, () => {
  9724. s.value = qo(o.value).slice();
  9725. }, {
  9726. immediate: !0
  9727. });
  9728. const l = ae((z) => {
  9729. });
  9730. se(() => t.itemKey, (z) => {
  9731. typeof z == "function" ? l.value = z : l.value = (W) => W == null ? void 0 : W[z];
  9732. }, {
  9733. immediate: !0
  9734. });
  9735. const u = ae(), c = ae(), f = ae(), d = (z) => l.value(z), h = {
  9736. getKey: d
  9737. };
  9738. function p(z) {
  9739. let W;
  9740. typeof z == "function" ? W = z(a.scrollTop) : W = z;
  9741. const F = S(W);
  9742. u.value && (u.value.scrollTop = F), a.scrollTop = F;
  9743. }
  9744. const [v, g, m, y] = sge(s, d), b = tn({
  9745. scrollHeight: void 0,
  9746. start: 0,
  9747. end: 0,
  9748. offset: void 0
  9749. }), _ = ae(0);
  9750. it(() => {
  9751. Tt(() => {
  9752. var z;
  9753. _.value = ((z = c.value) === null || z === void 0 ? void 0 : z.offsetHeight) || 0;
  9754. });
  9755. }), ep(() => {
  9756. Tt(() => {
  9757. var z;
  9758. _.value = ((z = c.value) === null || z === void 0 ? void 0 : z.offsetHeight) || 0;
  9759. });
  9760. }), se([r, s], () => {
  9761. r.value || I(b, {
  9762. scrollHeight: void 0,
  9763. start: 0,
  9764. end: s.value.length - 1,
  9765. offset: void 0
  9766. });
  9767. }, {
  9768. immediate: !0
  9769. }), se([r, s, _, i], () => {
  9770. r.value && !i.value && I(b, {
  9771. scrollHeight: _.value,
  9772. start: 0,
  9773. end: s.value.length - 1,
  9774. offset: void 0
  9775. }), u.value && (a.scrollTop = u.value.scrollTop);
  9776. }, {
  9777. immediate: !0
  9778. }), se([i, r, () => a.scrollTop, s, y, () => t.height, _], () => {
  9779. if (!r.value || !i.value)
  9780. return;
  9781. let z = 0, W, F, Q;
  9782. const Z = s.value.length, ne = s.value, ee = a.scrollTop, {
  9783. itemHeight: oe,
  9784. height: K
  9785. } = t, ie = ee + K;
  9786. for (let X = 0; X < Z; X += 1) {
  9787. const H = ne[X], G = d(H);
  9788. let re = m.get(G);
  9789. re === void 0 && (re = oe);
  9790. const fe = z + re;
  9791. W === void 0 && fe >= ee && (W = X, F = z), Q === void 0 && fe > ie && (Q = X), z = fe;
  9792. }
  9793. 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, {
  9794. scrollHeight: z,
  9795. start: W,
  9796. end: Q,
  9797. offset: F
  9798. });
  9799. }, {
  9800. immediate: !0
  9801. });
  9802. const O = L(() => b.scrollHeight - t.height);
  9803. function S(z) {
  9804. let W = z;
  9805. return Number.isNaN(O.value) || (W = Math.min(W, O.value)), W = Math.max(W, 0), W;
  9806. }
  9807. const x = L(() => a.scrollTop <= 0), C = L(() => a.scrollTop >= O.value), T = FZ(x, C);
  9808. function w(z) {
  9809. p(z);
  9810. }
  9811. function P(z) {
  9812. var W;
  9813. const {
  9814. scrollTop: F
  9815. } = z.currentTarget;
  9816. F !== a.scrollTop && p(F), (W = t.onScroll) === null || W === void 0 || W.call(t, z);
  9817. }
  9818. const [$, A] = cge(r, x, C, (z) => {
  9819. p((W) => W + z);
  9820. });
  9821. dge(r, u, (z, W) => T(z, W) ? !1 : ($({
  9822. preventDefault() {
  9823. },
  9824. deltaY: z
  9825. }), !0));
  9826. function D(z) {
  9827. r.value && z.preventDefault();
  9828. }
  9829. const E = () => {
  9830. u.value && (u.value.removeEventListener("wheel", $, pr ? {
  9831. passive: !1
  9832. } : !1), u.value.removeEventListener("DOMMouseScroll", A), u.value.removeEventListener("MozMousePixelScroll", D));
  9833. };
  9834. ht(() => {
  9835. Tt(() => {
  9836. u.value && (E(), u.value.addEventListener("wheel", $, pr ? {
  9837. passive: !1
  9838. } : !1), u.value.addEventListener("DOMMouseScroll", A), u.value.addEventListener("MozMousePixelScroll", D));
  9839. });
  9840. }), yt(() => {
  9841. E();
  9842. });
  9843. const R = lge(u, s, m, t, d, g, p, () => {
  9844. var z;
  9845. (z = f.value) === null || z === void 0 || z.delayHidden();
  9846. });
  9847. n({
  9848. scrollTo: R
  9849. });
  9850. const N = L(() => {
  9851. let z = null;
  9852. return t.height && (z = I({
  9853. [t.fullHeight ? "height" : "maxHeight"]: t.height + "px"
  9854. }, vge), r.value && (z.overflowY = "hidden", a.scrollMoving && (z.pointerEvents = "none"))), z;
  9855. });
  9856. return se([() => b.start, () => b.end, s], () => {
  9857. if (t.onVisibleChange) {
  9858. const z = s.value.slice(b.start, b.end + 1);
  9859. t.onVisibleChange(z, s.value);
  9860. }
  9861. }, {
  9862. flush: "post"
  9863. }), {
  9864. state: a,
  9865. mergedData: s,
  9866. componentStyle: N,
  9867. onFallbackScroll: P,
  9868. onScrollBar: w,
  9869. componentRef: u,
  9870. useVirtual: r,
  9871. calRes: b,
  9872. collectHeight: g,
  9873. setInstance: v,
  9874. sharedConfig: h,
  9875. scrollBarRef: f,
  9876. fillerInnerRef: c,
  9877. delayHideScrollBar: () => {
  9878. var z;
  9879. (z = f.value) === null || z === void 0 || z.delayHidden();
  9880. }
  9881. };
  9882. },
  9883. render() {
  9884. const t = I(I({}, this.$props), this.$attrs), {
  9885. prefixCls: e = "rc-virtual-list",
  9886. height: n,
  9887. itemHeight: r,
  9888. // eslint-disable-next-line no-unused-vars
  9889. fullHeight: i,
  9890. data: a,
  9891. itemKey: o,
  9892. virtual: s,
  9893. component: l = "div",
  9894. onScroll: u,
  9895. children: c = this.$slots.default,
  9896. style: f,
  9897. class: d
  9898. } = t, h = hge(t, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), p = ye(e, d), {
  9899. scrollTop: v
  9900. } = this.state, {
  9901. scrollHeight: g,
  9902. offset: m,
  9903. start: y,
  9904. end: b
  9905. } = this.calRes, {
  9906. componentStyle: _,
  9907. onFallbackScroll: O,
  9908. onScrollBar: S,
  9909. useVirtual: x,
  9910. collectHeight: C,
  9911. sharedConfig: T,
  9912. setInstance: w,
  9913. mergedData: P,
  9914. delayHideScrollBar: $
  9915. } = this;
  9916. return M("div", j({
  9917. style: I(I({}, f), {
  9918. position: "relative"
  9919. }),
  9920. class: p
  9921. }, h), [M(l, {
  9922. class: `${e}-holder`,
  9923. style: _,
  9924. ref: "componentRef",
  9925. onScroll: O,
  9926. onMouseenter: $
  9927. }, {
  9928. default: () => [M(ex, {
  9929. prefixCls: e,
  9930. height: g,
  9931. offset: m,
  9932. onInnerResize: C,
  9933. ref: "fillerInnerRef"
  9934. }, {
  9935. default: () => gge(P, y, b, w, c, T)
  9936. })]
  9937. }), x && M(oge, {
  9938. ref: "scrollBarRef",
  9939. prefixCls: e,
  9940. scrollTop: v,
  9941. height: n,
  9942. scrollHeight: g,
  9943. count: P.length,
  9944. onScroll: S,
  9945. onStartMove: () => {
  9946. this.state.scrollMoving = !0;
  9947. },
  9948. onStopMove: () => {
  9949. this.state.scrollMoving = !1;
  9950. }
  9951. }, null)]);
  9952. }
  9953. });
  9954. function yge(t, e, n) {
  9955. const r = U(t());
  9956. return se(e, (i, a) => {
  9957. n ? n(i, a) && (r.value = t()) : r.value = t();
  9958. }), r;
  9959. }
  9960. function bge() {
  9961. return /(mac\sos|macintosh)/i.test(navigator.appVersion);
  9962. }
  9963. const WZ = Symbol("SelectContextKey");
  9964. function _ge(t) {
  9965. return pt(WZ, t);
  9966. }
  9967. function Oge() {
  9968. return Ge(WZ, {});
  9969. }
  9970. var Sge = function(t, e) {
  9971. var n = {};
  9972. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  9973. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  9974. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  9975. return n;
  9976. };
  9977. function vN(t) {
  9978. return typeof t == "string" || typeof t == "number";
  9979. }
  9980. const xge = te({
  9981. compatConfig: {
  9982. MODE: 3
  9983. },
  9984. name: "OptionList",
  9985. inheritAttrs: !1,
  9986. setup(t, e) {
  9987. let {
  9988. expose: n,
  9989. slots: r
  9990. } = e;
  9991. const i = Jve(), a = Oge(), o = L(() => `${i.prefixCls}-item`), s = yge(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (O) => O[0]), l = rm(), u = (O) => {
  9992. O.preventDefault();
  9993. }, c = (O) => {
  9994. l.current && l.current.scrollTo(typeof O == "number" ? {
  9995. index: O
  9996. } : O);
  9997. }, f = function(O) {
  9998. let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  9999. const x = s.value.length;
  10000. for (let C = 0; C < x; C += 1) {
  10001. const T = (O + C * S + x) % x, {
  10002. group: w,
  10003. data: P
  10004. } = s.value[T];
  10005. if (!w && !P.disabled)
  10006. return T;
  10007. }
  10008. return -1;
  10009. }, d = tn({
  10010. activeIndex: f(0)
  10011. }), h = function(O) {
  10012. let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10013. d.activeIndex = O;
  10014. const x = {
  10015. source: S ? "keyboard" : "mouse"
  10016. }, C = s.value[O];
  10017. if (!C) {
  10018. a.onActiveValue(null, -1, x);
  10019. return;
  10020. }
  10021. a.onActiveValue(C.value, O, x);
  10022. };
  10023. se([() => s.value.length, () => i.searchValue], () => {
  10024. h(a.defaultActiveFirstOption !== !1 ? f(0) : -1);
  10025. }, {
  10026. immediate: !0
  10027. });
  10028. const p = (O) => a.rawValues.has(O) && i.mode !== "combobox";
  10029. se([() => i.open, () => i.searchValue], () => {
  10030. if (!i.multiple && i.open && a.rawValues.size === 1) {
  10031. const O = Array.from(a.rawValues)[0], S = qo(s.value).findIndex((x) => {
  10032. let {
  10033. data: C
  10034. } = x;
  10035. return C[a.fieldNames.value] === O;
  10036. });
  10037. S !== -1 && (h(S), Tt(() => {
  10038. c(S);
  10039. }));
  10040. }
  10041. i.open && Tt(() => {
  10042. var O;
  10043. (O = l.current) === null || O === void 0 || O.scrollTo(void 0);
  10044. });
  10045. }, {
  10046. immediate: !0,
  10047. flush: "post"
  10048. });
  10049. const v = (O) => {
  10050. O !== void 0 && a.onSelect(O, {
  10051. selected: !a.rawValues.has(O)
  10052. }), i.multiple || i.toggleOpen(!1);
  10053. }, g = (O) => typeof O.label == "function" ? O.label() : O.label;
  10054. function m(O) {
  10055. const S = s.value[O];
  10056. if (!S) return null;
  10057. const x = S.data || {}, {
  10058. value: C
  10059. } = x, {
  10060. group: T
  10061. } = S, w = JS(x, !0), P = g(S);
  10062. return S ? M("div", j(j({
  10063. "aria-label": typeof P == "string" && !T ? P : null
  10064. }, w), {}, {
  10065. key: O,
  10066. role: T ? "presentation" : "option",
  10067. id: `${i.id}_list_${O}`,
  10068. "aria-selected": p(C)
  10069. }), [C]) : null;
  10070. }
  10071. return n({
  10072. onKeydown: (O) => {
  10073. const {
  10074. which: S,
  10075. ctrlKey: x
  10076. } = O;
  10077. switch (S) {
  10078. case ge.N:
  10079. case ge.P:
  10080. case ge.UP:
  10081. case ge.DOWN: {
  10082. let C = 0;
  10083. if (S === ge.UP ? C = -1 : S === ge.DOWN ? C = 1 : bge() && x && (S === ge.N ? C = 1 : S === ge.P && (C = -1)), C !== 0) {
  10084. const T = f(d.activeIndex + C, C);
  10085. c(T), h(T, !0);
  10086. }
  10087. break;
  10088. }
  10089. case ge.ENTER: {
  10090. const C = s.value[d.activeIndex];
  10091. C && !C.data.disabled ? v(C.value) : v(void 0), i.open && O.preventDefault();
  10092. break;
  10093. }
  10094. case ge.ESC:
  10095. i.toggleOpen(!1), i.open && O.stopPropagation();
  10096. }
  10097. },
  10098. onKeyup: () => {
  10099. },
  10100. scrollTo: (O) => {
  10101. c(O);
  10102. }
  10103. }), () => {
  10104. const {
  10105. id: O,
  10106. notFoundContent: S,
  10107. onPopupScroll: x
  10108. } = i, {
  10109. menuItemSelectedIcon: C,
  10110. fieldNames: T,
  10111. virtual: w,
  10112. listHeight: P,
  10113. listItemHeight: $
  10114. } = a, A = r.option, {
  10115. activeIndex: D
  10116. } = d, E = Object.keys(T).map((R) => T[R]);
  10117. return s.value.length === 0 ? M("div", {
  10118. role: "listbox",
  10119. id: `${O}_list`,
  10120. class: `${o.value}-empty`,
  10121. onMousedown: u
  10122. }, [S]) : M(wt, null, [M("div", {
  10123. role: "listbox",
  10124. id: `${O}_list`,
  10125. style: {
  10126. height: 0,
  10127. width: 0,
  10128. overflow: "hidden"
  10129. }
  10130. }, [m(D - 1), m(D), m(D + 1)]), M(mge, {
  10131. itemKey: "key",
  10132. ref: l,
  10133. data: s.value,
  10134. height: P,
  10135. itemHeight: $,
  10136. fullHeight: !1,
  10137. onMousedown: u,
  10138. onScroll: x,
  10139. virtual: w
  10140. }, {
  10141. default: (R, N) => {
  10142. var V;
  10143. const {
  10144. group: z,
  10145. groupOption: W,
  10146. data: F,
  10147. value: Q
  10148. } = R, {
  10149. key: Z
  10150. } = F, ne = typeof R.label == "function" ? R.label() : R.label;
  10151. if (z) {
  10152. const Te = (V = F.title) !== null && V !== void 0 ? V : vN(ne) && ne;
  10153. return M("div", {
  10154. class: ye(o.value, `${o.value}-group`),
  10155. title: Te
  10156. }, [A ? A(F) : ne !== void 0 ? ne : Z]);
  10157. }
  10158. const {
  10159. disabled: ee,
  10160. title: oe,
  10161. children: K,
  10162. style: ie,
  10163. class: X,
  10164. className: H
  10165. } = F, G = Sge(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, {
  10166. [`${de}-grouped`]: W,
  10167. [`${de}-active`]: D === N && !ee,
  10168. [`${de}-disabled`]: ee,
  10169. [`${de}-selected`]: fe
  10170. }), $e = g(R), Se = !C || typeof C == "function" || fe, be = typeof $e == "number" ? $e : $e || Q;
  10171. let he = vN(be) ? be.toString() : void 0;
  10172. return oe !== void 0 && (he = oe), M("div", j(j({}, re), {}, {
  10173. "aria-selected": fe,
  10174. class: Ee,
  10175. title: he,
  10176. onMousemove: (Te) => {
  10177. G.onMousemove && G.onMousemove(Te), !(D === N || ee) && h(N);
  10178. },
  10179. onClick: (Te) => {
  10180. ee || v(Q), G.onClick && G.onClick(Te);
  10181. },
  10182. style: ie
  10183. }), [M("div", {
  10184. class: `${de}-content`
  10185. }, [A ? A(F) : be]), Ui(C) || fe, Se && M(pf, {
  10186. class: `${o.value}-option-state`,
  10187. customizeIcon: C,
  10188. customizeIconProps: {
  10189. isSelected: fe
  10190. }
  10191. }, {
  10192. default: () => [fe ? "✓" : null]
  10193. })]);
  10194. }
  10195. })]);
  10196. };
  10197. }
  10198. });
  10199. var wge = function(t, e) {
  10200. var n = {};
  10201. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  10202. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  10203. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  10204. return n;
  10205. };
  10206. function Cge(t) {
  10207. const e = t, {
  10208. key: n,
  10209. children: r
  10210. } = e, i = e.props, {
  10211. value: a,
  10212. disabled: o
  10213. } = i, s = wge(i, ["value", "disabled"]), l = r == null ? void 0 : r.default;
  10214. return I({
  10215. key: n,
  10216. value: a !== void 0 ? a : n,
  10217. children: l,
  10218. disabled: o || o === ""
  10219. }, s);
  10220. }
  10221. function MI(t) {
  10222. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10223. return Yn(t).map((r, i) => {
  10224. var a;
  10225. if (!Ui(r) || !r.type)
  10226. return null;
  10227. const {
  10228. type: {
  10229. isSelectOptGroup: o
  10230. },
  10231. key: s,
  10232. children: l,
  10233. props: u
  10234. } = r;
  10235. if (e || !o)
  10236. return Cge(r);
  10237. 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;
  10238. return I(I({
  10239. key: `__RC_SELECT_GRP__${s === null ? i : String(s)}__`
  10240. }, u), {
  10241. label: f,
  10242. options: MI(c || [])
  10243. });
  10244. }).filter((r) => r);
  10245. }
  10246. function Tge(t, e, n) {
  10247. const r = ae(), i = ae(), a = ae(), o = ae([]);
  10248. return se([t, e], () => {
  10249. t.value ? o.value = qo(t.value).slice() : o.value = MI(e.value);
  10250. }, {
  10251. immediate: !0,
  10252. deep: !0
  10253. }), ht(() => {
  10254. const s = o.value, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
  10255. function f(d) {
  10256. let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10257. for (let p = 0; p < d.length; p += 1) {
  10258. const v = d[p];
  10259. !v[c.options] || h ? (l.set(v[c.value], v), u.set(v[c.label], v)) : f(v[c.options], !0);
  10260. }
  10261. }
  10262. f(s), r.value = s, i.value = l, a.value = u;
  10263. }), {
  10264. options: r,
  10265. valueOptions: i,
  10266. labelOptions: a
  10267. };
  10268. }
  10269. let gN = 0;
  10270. const Pge = process.env.NODE_ENV !== "test" && wa();
  10271. function $ge() {
  10272. let t;
  10273. return Pge ? (t = gN, gN += 1) : t = "TEST_OR_SSR", t;
  10274. }
  10275. function Age() {
  10276. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : U("");
  10277. const e = `rc_select_${$ge()}`;
  10278. return t.value || e;
  10279. }
  10280. function II(t) {
  10281. return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
  10282. }
  10283. const Ege = typeof window < "u" && window.document && window.document.documentElement;
  10284. process.env.NODE_ENV;
  10285. function Mge(t) {
  10286. const {
  10287. mode: e,
  10288. options: n,
  10289. children: r,
  10290. backfill: i,
  10291. allowClear: a,
  10292. placeholder: o,
  10293. getInputElement: s,
  10294. showSearch: l,
  10295. onSearch: u,
  10296. defaultOpen: c,
  10297. autofocus: f,
  10298. labelInValue: d,
  10299. value: h,
  10300. inputValue: p,
  10301. optionLabelProp: v
  10302. } = t, g = EI(e), m = l !== void 0 ? l : g || e === "combobox", y = n || MI(r);
  10303. if (oa(e !== "tags" || y.every((b) => !b.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), oa(e !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), oa(e === "combobox" || !i, "`backfill` only works with `combobox` mode."), oa(e === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), a8(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" && oa(!1, "`onSearch` should work with `showSearch` instead of use alone."), a8(!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) {
  10304. const b = II(h);
  10305. oa(!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`"), oa(!g || Array.isArray(h), "`value` should be array when `mode` is `multiple` or `tags`");
  10306. }
  10307. if (r) {
  10308. let b = null;
  10309. r.some((_) => {
  10310. var O;
  10311. if (!Ui(_) || !_.type)
  10312. return !1;
  10313. const {
  10314. type: S
  10315. } = _;
  10316. return S.isSelectOption ? !1 : S.isSelectOptGroup ? !(((O = _.children) === null || O === void 0 ? void 0 : O.default()) || []).every((T) => !Ui(T) || !_.type || T.type.isSelectOption ? !0 : (b = T.type, !1)) : (b = S, !0);
  10317. }), b && oa(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${b.displayName || b.name || b}\`.`), oa(p === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  10318. }
  10319. }
  10320. function gC(t, e) {
  10321. return II(t).join("").toUpperCase().includes(e);
  10322. }
  10323. const Ige = (t, e, n, r, i) => L(() => {
  10324. const a = n.value, o = i == null ? void 0 : i.value, s = r == null ? void 0 : r.value;
  10325. if (!a || s === !1)
  10326. return t.value;
  10327. const {
  10328. options: l,
  10329. label: u,
  10330. value: c
  10331. } = e.value, f = [], d = typeof s == "function", h = a.toUpperCase(), p = d ? s : (g, m) => o ? gC(m[o], h) : m[l] ? gC(m[u !== "children" ? u : "label"], h) : gC(m[c], h), v = d ? (g) => y2(g) : (g) => g;
  10332. return t.value.forEach((g) => {
  10333. if (g[l]) {
  10334. if (p(a, v(g)))
  10335. f.push(g);
  10336. else {
  10337. const y = g[l].filter((b) => p(a, v(b)));
  10338. y.length && f.push(I(I({}, g), {
  10339. [l]: y
  10340. }));
  10341. }
  10342. return;
  10343. }
  10344. p(a, v(g)) && f.push(g);
  10345. }), f;
  10346. }), Dge = (t, e) => {
  10347. const n = ae({
  10348. values: /* @__PURE__ */ new Map(),
  10349. options: /* @__PURE__ */ new Map()
  10350. });
  10351. return [L(() => {
  10352. const {
  10353. values: a,
  10354. options: o
  10355. } = n.value, s = t.value.map((c) => {
  10356. var f;
  10357. return c.label === void 0 ? I(I({}, c), {
  10358. label: (f = a.get(c.value)) === null || f === void 0 ? void 0 : f.label
  10359. }) : c;
  10360. }), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
  10361. return s.forEach((c) => {
  10362. l.set(c.value, c), u.set(c.value, e.value.get(c.value) || o.get(c.value));
  10363. }), n.value.values = l, n.value.options = u, s;
  10364. }), (a) => e.value.get(a) || n.value.options.get(a)];
  10365. };
  10366. function wh(t, e) {
  10367. const {
  10368. defaultValue: n,
  10369. value: r = U()
  10370. } = e || {};
  10371. let i = typeof t == "function" ? t() : t;
  10372. r.value !== void 0 && (i = B(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  10373. const a = U(i), o = U(i);
  10374. ht(() => {
  10375. let l = r.value !== void 0 ? r.value : a.value;
  10376. e.postState && (l = e.postState(l)), o.value = l;
  10377. });
  10378. function s(l) {
  10379. const u = o.value;
  10380. a.value = l, qo(o.value) !== l && e.onChange && e.onChange(l, u);
  10381. }
  10382. return se(r, () => {
  10383. a.value = r.value;
  10384. }), [o, s];
  10385. }
  10386. function fn(t) {
  10387. const e = typeof t == "function" ? t() : t, n = U(e);
  10388. function r(i) {
  10389. n.value = i;
  10390. }
  10391. return [n, r];
  10392. }
  10393. const Rge = ["inputValue"];
  10394. function QZ() {
  10395. return I(I({}, zZ()), {
  10396. prefixCls: String,
  10397. id: String,
  10398. backfill: {
  10399. type: Boolean,
  10400. default: void 0
  10401. },
  10402. // >>> Field Names
  10403. fieldNames: Object,
  10404. // >>> Search
  10405. /** @deprecated Use `searchValue` instead */
  10406. inputValue: String,
  10407. searchValue: String,
  10408. onSearch: Function,
  10409. autoClearSearchValue: {
  10410. type: Boolean,
  10411. default: void 0
  10412. },
  10413. // >>> Select
  10414. onSelect: Function,
  10415. onDeselect: Function,
  10416. // >>> Options
  10417. /**
  10418. * In Select, `false` means do nothing.
  10419. * In TreeSelect, `false` will highlight match item.
  10420. * It's by design.
  10421. */
  10422. filterOption: {
  10423. type: [Boolean, Function],
  10424. default: void 0
  10425. },
  10426. filterSort: Function,
  10427. optionFilterProp: String,
  10428. optionLabelProp: String,
  10429. options: Array,
  10430. defaultActiveFirstOption: {
  10431. type: Boolean,
  10432. default: void 0
  10433. },
  10434. virtual: {
  10435. type: Boolean,
  10436. default: void 0
  10437. },
  10438. listHeight: Number,
  10439. listItemHeight: Number,
  10440. // >>> Icon
  10441. menuItemSelectedIcon: Y.any,
  10442. mode: String,
  10443. labelInValue: {
  10444. type: Boolean,
  10445. default: void 0
  10446. },
  10447. value: Y.any,
  10448. defaultValue: Y.any,
  10449. onChange: Function,
  10450. children: Array
  10451. });
  10452. }
  10453. function kge(t) {
  10454. return !t || typeof t != "object";
  10455. }
  10456. const Lge = te({
  10457. compatConfig: {
  10458. MODE: 3
  10459. },
  10460. name: "VcSelect",
  10461. inheritAttrs: !1,
  10462. props: sr(QZ(), {
  10463. prefixCls: "vc-select",
  10464. autoClearSearchValue: !0,
  10465. listHeight: 200,
  10466. listItemHeight: 20,
  10467. dropdownMatchSelectWidth: !0
  10468. }),
  10469. setup(t, e) {
  10470. let {
  10471. expose: n,
  10472. attrs: r,
  10473. slots: i
  10474. } = e;
  10475. const a = Age(Nn(t, "id")), o = L(() => EI(t.mode)), s = L(() => !!(!t.options && t.children)), l = L(() => t.filterOption === void 0 && t.mode === "combobox" ? !1 : t.filterOption), u = L(() => aZ(t.fieldNames, s.value)), [c, f] = wh("", {
  10476. value: L(() => t.searchValue !== void 0 ? t.searchValue : t.inputValue),
  10477. postState: (X) => X || ""
  10478. }), d = Tge(Nn(t, "options"), Nn(t, "children"), u), {
  10479. valueOptions: h,
  10480. labelOptions: p,
  10481. options: v
  10482. } = d, g = (X) => II(X).map((G) => {
  10483. var re, fe;
  10484. let de, Ee, $e, Se;
  10485. kge(G) ? de = G : ($e = G.key, Ee = G.label, de = (re = G.value) !== null && re !== void 0 ? re : $e);
  10486. const be = h.value.get(de);
  10487. 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), {
  10488. label: Ee,
  10489. value: de,
  10490. key: $e,
  10491. disabled: Se,
  10492. option: be
  10493. };
  10494. }), [m, y] = wh(t.defaultValue, {
  10495. value: Nn(t, "value")
  10496. }), b = L(() => {
  10497. var X;
  10498. const H = g(m.value);
  10499. return t.mode === "combobox" && !(!((X = H[0]) === null || X === void 0) && X.value) ? [] : H;
  10500. }), [_, O] = Dge(b, h), S = L(() => {
  10501. if (!t.mode && _.value.length === 1) {
  10502. const X = _.value[0];
  10503. if (X.value === null && (X.label === null || X.label === void 0))
  10504. return [];
  10505. }
  10506. return _.value.map((X) => {
  10507. var H;
  10508. return I(I({}, X), {
  10509. label: (H = typeof X.label == "function" ? X.label() : X.label) !== null && H !== void 0 ? H : X.value
  10510. });
  10511. });
  10512. }), x = L(() => new Set(_.value.map((X) => X.value)));
  10513. ht(() => {
  10514. var X;
  10515. if (t.mode === "combobox") {
  10516. const H = (X = _.value[0]) === null || X === void 0 ? void 0 : X.value;
  10517. H != null && f(String(H));
  10518. }
  10519. }, {
  10520. flush: "post"
  10521. });
  10522. const C = (X, H) => {
  10523. const G = H ?? X;
  10524. return {
  10525. [u.value.value]: X,
  10526. [u.value.label]: G
  10527. };
  10528. }, T = ae();
  10529. ht(() => {
  10530. if (t.mode !== "tags") {
  10531. T.value = v.value;
  10532. return;
  10533. }
  10534. const X = v.value.slice(), H = (G) => h.value.has(G);
  10535. [..._.value].sort((G, re) => G.value < re.value ? -1 : 1).forEach((G) => {
  10536. const re = G.value;
  10537. H(re) || X.push(C(re, G.label));
  10538. }), T.value = X;
  10539. });
  10540. const w = Ige(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(() => Kfe($.value, {
  10541. fieldNames: u.value,
  10542. childrenAsData: s.value
  10543. })), D = (X) => {
  10544. const H = g(X);
  10545. if (y(H), t.onChange && // Trigger event only when value changed
  10546. (H.length !== _.value.length || H.some((G, re) => {
  10547. var fe;
  10548. return ((fe = _.value[re]) === null || fe === void 0 ? void 0 : fe.value) !== (G == null ? void 0 : G.value);
  10549. }))) {
  10550. const G = t.labelInValue ? H.map((fe) => I(I({}, fe), {
  10551. originLabel: fe.label,
  10552. label: typeof fe.label == "function" ? fe.label() : fe.label
  10553. })) : H.map((fe) => fe.value), re = H.map((fe) => y2(O(fe.value)));
  10554. t.onChange(
  10555. // Value
  10556. o.value ? G : G[0],
  10557. // Option
  10558. o.value ? re : re[0]
  10559. );
  10560. }
  10561. }, [E, R] = fn(null), [N, V] = fn(0), z = L(() => t.defaultActiveFirstOption !== void 0 ? t.defaultActiveFirstOption : t.mode !== "combobox"), W = function(X, H) {
  10562. let {
  10563. source: G = "keyboard"
  10564. } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  10565. V(H), t.backfill && t.mode === "combobox" && X !== null && G === "keyboard" && R(String(X));
  10566. }, F = (X, H) => {
  10567. const G = () => {
  10568. var re;
  10569. const fe = O(X), de = fe == null ? void 0 : fe[u.value.label];
  10570. return [t.labelInValue ? {
  10571. label: typeof de == "function" ? de() : de,
  10572. originLabel: de,
  10573. value: X,
  10574. key: (re = fe == null ? void 0 : fe.key) !== null && re !== void 0 ? re : X
  10575. } : X, y2(fe)];
  10576. };
  10577. if (H && t.onSelect) {
  10578. const [re, fe] = G();
  10579. t.onSelect(re, fe);
  10580. } else if (!H && t.onDeselect) {
  10581. const [re, fe] = G();
  10582. t.onDeselect(re, fe);
  10583. }
  10584. }, Q = (X, H) => {
  10585. let G;
  10586. const re = o.value ? H.selected : !0;
  10587. 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(""));
  10588. }, Z = (X, H) => {
  10589. D(X), (H.type === "remove" || H.type === "clear") && H.values.forEach((G) => {
  10590. F(G.value, !1);
  10591. });
  10592. }, ne = (X, H) => {
  10593. var G;
  10594. if (f(X), R(null), H.source === "submit") {
  10595. const re = (X || "").trim();
  10596. if (re) {
  10597. const fe = Array.from(/* @__PURE__ */ new Set([...x.value, re]));
  10598. D(fe), F(re, !0), f("");
  10599. }
  10600. return;
  10601. }
  10602. H.source !== "blur" && (t.mode === "combobox" && D(X), (G = t.onSearch) === null || G === void 0 || G.call(t, X));
  10603. }, ee = (X) => {
  10604. let H = X;
  10605. t.mode !== "tags" && (H = X.map((re) => {
  10606. const fe = p.value.get(re);
  10607. return fe == null ? void 0 : fe.value;
  10608. }).filter((re) => re !== void 0));
  10609. const G = Array.from(/* @__PURE__ */ new Set([...x.value, ...H]));
  10610. D(G), G.forEach((re) => {
  10611. F(re, !0);
  10612. });
  10613. }, oe = L(() => t.virtual !== !1 && t.dropdownMatchSelectWidth !== !1);
  10614. _ge(BZ(I(I({}, d), {
  10615. flattenOptions: A,
  10616. onActiveValue: W,
  10617. defaultActiveFirstOption: z,
  10618. onSelect: Q,
  10619. menuItemSelectedIcon: Nn(t, "menuItemSelectedIcon"),
  10620. rawValues: x,
  10621. fieldNames: u,
  10622. virtual: oe,
  10623. listHeight: Nn(t, "listHeight"),
  10624. listItemHeight: Nn(t, "listItemHeight"),
  10625. childrenAsData: s
  10626. }))), process.env.NODE_ENV !== "production" && ht(() => {
  10627. Mge(t);
  10628. }, {
  10629. flush: "post"
  10630. });
  10631. const K = U();
  10632. n({
  10633. focus() {
  10634. var X;
  10635. (X = K.value) === null || X === void 0 || X.focus();
  10636. },
  10637. blur() {
  10638. var X;
  10639. (X = K.value) === null || X === void 0 || X.blur();
  10640. },
  10641. scrollTo(X) {
  10642. var H;
  10643. (H = K.value) === null || H === void 0 || H.scrollTo(X);
  10644. }
  10645. });
  10646. const ie = L(() => or(t, [
  10647. "id",
  10648. "mode",
  10649. "prefixCls",
  10650. "backfill",
  10651. "fieldNames",
  10652. // Search
  10653. "inputValue",
  10654. "searchValue",
  10655. "onSearch",
  10656. "autoClearSearchValue",
  10657. // Select
  10658. "onSelect",
  10659. "onDeselect",
  10660. "dropdownMatchSelectWidth",
  10661. // Options
  10662. "filterOption",
  10663. "filterSort",
  10664. "optionFilterProp",
  10665. "optionLabelProp",
  10666. "options",
  10667. "children",
  10668. "defaultActiveFirstOption",
  10669. "menuItemSelectedIcon",
  10670. "virtual",
  10671. "listHeight",
  10672. "listItemHeight",
  10673. // Value
  10674. "value",
  10675. "defaultValue",
  10676. "labelInValue",
  10677. "onChange"
  10678. ]));
  10679. return () => M(ige, j(j(j({}, ie.value), r), {}, {
  10680. id: a,
  10681. prefixCls: t.prefixCls,
  10682. ref: K,
  10683. omitDomProps: Rge,
  10684. mode: t.mode,
  10685. displayValues: S.value,
  10686. onDisplayValuesChange: Z,
  10687. searchValue: c.value,
  10688. onSearch: ne,
  10689. onSearchSplit: ee,
  10690. dropdownMatchSelectWidth: t.dropdownMatchSelectWidth,
  10691. OptionList: xge,
  10692. emptyOptions: !A.value.length,
  10693. activeValue: E.value,
  10694. activeDescendantId: `${a}_list_${N.value}`
  10695. }), i);
  10696. }
  10697. }), DI = () => null;
  10698. DI.isSelectOption = !0;
  10699. DI.displayName = "ASelectOption";
  10700. const RI = () => null;
  10701. RI.isSelectOptGroup = !0;
  10702. RI.displayName = "ASelectOptGroup";
  10703. var Nge = { 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" }, Bge = Symbol("iconContext"), HZ = function() {
  10704. return Ge(Bge, {
  10705. prefixCls: U("anticon"),
  10706. rootClassName: U(""),
  10707. csp: U()
  10708. });
  10709. };
  10710. function kI() {
  10711. return !!(typeof window < "u" && window.document && window.document.createElement);
  10712. }
  10713. function zge(t, e) {
  10714. return t && t.contains ? t.contains(e) : !1;
  10715. }
  10716. var mN = "data-vc-order", Vge = "vc-icon-key", $2 = /* @__PURE__ */ new Map();
  10717. function GZ() {
  10718. var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.mark;
  10719. return e ? e.startsWith("data-") ? e : "data-".concat(e) : Vge;
  10720. }
  10721. function LI(t) {
  10722. if (t.attachTo)
  10723. return t.attachTo;
  10724. var e = document.querySelector("head");
  10725. return e || document.body;
  10726. }
  10727. function Fge(t) {
  10728. return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
  10729. }
  10730. function jZ(t) {
  10731. return Array.from(($2.get(t) || t).children).filter(function(e) {
  10732. return e.tagName === "STYLE";
  10733. });
  10734. }
  10735. function ZZ(t) {
  10736. var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  10737. if (!kI())
  10738. return null;
  10739. var n = e.csp, r = e.prepend, i = document.createElement("style");
  10740. i.setAttribute(mN, Fge(r)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = t;
  10741. var a = LI(e), o = a.firstChild;
  10742. if (r) {
  10743. if (r === "queue") {
  10744. var s = jZ(a).filter(function(l) {
  10745. return ["prepend", "prependQueue"].includes(l.getAttribute(mN));
  10746. });
  10747. if (s.length)
  10748. return a.insertBefore(i, s[s.length - 1].nextSibling), i;
  10749. }
  10750. a.insertBefore(i, o);
  10751. } else
  10752. a.appendChild(i);
  10753. return i;
  10754. }
  10755. function Wge(t) {
  10756. var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = LI(e);
  10757. return jZ(n).find(function(r) {
  10758. return r.getAttribute(GZ(e)) === t;
  10759. });
  10760. }
  10761. function Qge(t, e) {
  10762. var n = $2.get(t);
  10763. if (!n || !zge(document, n)) {
  10764. var r = ZZ("", e), i = r.parentNode;
  10765. $2.set(t, i), t.removeChild(r);
  10766. }
  10767. }
  10768. function Hge(t, e) {
  10769. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = LI(n);
  10770. Qge(r, n);
  10771. var i = Wge(e, n);
  10772. if (i)
  10773. return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== t && (i.innerHTML = t), i;
  10774. var a = ZZ(t, n);
  10775. return a.setAttribute(GZ(n), e), a;
  10776. }
  10777. function yN(t) {
  10778. for (var e = 1; e < arguments.length; e++) {
  10779. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  10780. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  10781. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  10782. }))), r.forEach(function(i) {
  10783. Gge(t, i, n[i]);
  10784. });
  10785. }
  10786. return t;
  10787. }
  10788. function Gge(t, e, n) {
  10789. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  10790. }
  10791. function jge(t, e) {
  10792. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error("Warning: ".concat(e));
  10793. }
  10794. function Zge(t, e) {
  10795. jge(t, "[@ant-design/icons-vue] ".concat(e));
  10796. }
  10797. function bN(t) {
  10798. return typeof t == "object" && typeof t.name == "string" && typeof t.theme == "string" && (typeof t.icon == "object" || typeof t.icon == "function");
  10799. }
  10800. function A2(t, e, n) {
  10801. return n ? jg(t.tag, yN({
  10802. key: e
  10803. }, n, t.attrs), (t.children || []).map(function(r, i) {
  10804. return A2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  10805. })) : jg(t.tag, yN({
  10806. key: e
  10807. }, t.attrs), (t.children || []).map(function(r, i) {
  10808. return A2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  10809. }));
  10810. }
  10811. function UZ(t) {
  10812. return ff(t)[0];
  10813. }
  10814. function XZ(t) {
  10815. return t ? Array.isArray(t) ? t : [t] : [];
  10816. }
  10817. var Uge = `
  10818. .anticon {
  10819. display: inline-block;
  10820. color: inherit;
  10821. font-style: normal;
  10822. line-height: 0;
  10823. text-align: center;
  10824. text-transform: none;
  10825. vertical-align: -0.125em;
  10826. text-rendering: optimizeLegibility;
  10827. -webkit-font-smoothing: antialiased;
  10828. -moz-osx-font-smoothing: grayscale;
  10829. }
  10830. .anticon > * {
  10831. line-height: 1;
  10832. }
  10833. .anticon svg {
  10834. display: inline-block;
  10835. }
  10836. .anticon::before {
  10837. display: none;
  10838. }
  10839. .anticon .anticon-icon {
  10840. display: block;
  10841. }
  10842. .anticon[tabindex] {
  10843. cursor: pointer;
  10844. }
  10845. .anticon-spin::before,
  10846. .anticon-spin {
  10847. display: inline-block;
  10848. -webkit-animation: loadingCircle 1s infinite linear;
  10849. animation: loadingCircle 1s infinite linear;
  10850. }
  10851. @-webkit-keyframes loadingCircle {
  10852. 100% {
  10853. -webkit-transform: rotate(360deg);
  10854. transform: rotate(360deg);
  10855. }
  10856. }
  10857. @keyframes loadingCircle {
  10858. 100% {
  10859. -webkit-transform: rotate(360deg);
  10860. transform: rotate(360deg);
  10861. }
  10862. }
  10863. `;
  10864. function YZ(t) {
  10865. return t && t.getRootNode && t.getRootNode();
  10866. }
  10867. function Xge(t) {
  10868. return kI() ? YZ(t) instanceof ShadowRoot : !1;
  10869. }
  10870. function Yge(t) {
  10871. return Xge(t) ? YZ(t) : null;
  10872. }
  10873. var qge = function() {
  10874. var e = HZ(), n = e.prefixCls, r = e.csp, i = vn(), a = Uge;
  10875. n && (a = a.replace(/anticon/g, n.value)), Tt(function() {
  10876. if (kI()) {
  10877. var o = i.vnode.el, s = Yge(o);
  10878. Hge(a, "@ant-design-vue-icons", {
  10879. prepend: !0,
  10880. csp: r.value,
  10881. attachTo: s
  10882. });
  10883. }
  10884. });
  10885. }, Kge = ["icon", "primaryColor", "secondaryColor"];
  10886. function Jge(t, e) {
  10887. if (t == null) return {};
  10888. var n = eme(t, e), r, i;
  10889. if (Object.getOwnPropertySymbols) {
  10890. var a = Object.getOwnPropertySymbols(t);
  10891. for (i = 0; i < a.length; i++)
  10892. r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  10893. }
  10894. return n;
  10895. }
  10896. function eme(t, e) {
  10897. if (t == null) return {};
  10898. var n = {}, r = Object.keys(t), i, a;
  10899. for (a = 0; a < r.length; a++)
  10900. i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  10901. return n;
  10902. }
  10903. function C_(t) {
  10904. for (var e = 1; e < arguments.length; e++) {
  10905. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  10906. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  10907. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  10908. }))), r.forEach(function(i) {
  10909. tme(t, i, n[i]);
  10910. });
  10911. }
  10912. return t;
  10913. }
  10914. function tme(t, e, n) {
  10915. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  10916. }
  10917. var lg = tn({
  10918. primaryColor: "#333",
  10919. secondaryColor: "#E6E6E6",
  10920. calculated: !1
  10921. });
  10922. function nme(t) {
  10923. var e = t.primaryColor, n = t.secondaryColor;
  10924. lg.primaryColor = e, lg.secondaryColor = n || UZ(e), lg.calculated = !!n;
  10925. }
  10926. function rme() {
  10927. return C_({}, lg);
  10928. }
  10929. var _u = function(e, n) {
  10930. var r = C_({}, e, n.attrs), i = r.icon, a = r.primaryColor, o = r.secondaryColor, s = Jge(r, Kge), l = lg;
  10931. if (a && (l = {
  10932. primaryColor: a,
  10933. secondaryColor: o || UZ(a)
  10934. }), Zge(bN(i), "icon should be icon definiton, but got ".concat(i)), !bN(i))
  10935. return null;
  10936. var u = i;
  10937. return u && typeof u.icon == "function" && (u = C_({}, u, {
  10938. icon: u.icon(l.primaryColor, l.secondaryColor)
  10939. })), A2(u.icon, "svg-".concat(u.name), C_({}, s, {
  10940. "data-icon": u.name,
  10941. width: "1em",
  10942. height: "1em",
  10943. fill: "currentColor",
  10944. "aria-hidden": "true"
  10945. }));
  10946. };
  10947. _u.props = {
  10948. icon: Object,
  10949. primaryColor: String,
  10950. secondaryColor: String,
  10951. focusable: String
  10952. };
  10953. _u.inheritAttrs = !1;
  10954. _u.displayName = "IconBase";
  10955. _u.getTwoToneColors = rme;
  10956. _u.setTwoToneColors = nme;
  10957. function ime(t, e) {
  10958. return lme(t) || sme(t, e) || ome(t, e) || ame();
  10959. }
  10960. function ame() {
  10961. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  10962. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  10963. }
  10964. function ome(t, e) {
  10965. if (t) {
  10966. if (typeof t == "string") return _N(t, e);
  10967. var n = Object.prototype.toString.call(t).slice(8, -1);
  10968. if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
  10969. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _N(t, e);
  10970. }
  10971. }
  10972. function _N(t, e) {
  10973. (e == null || e > t.length) && (e = t.length);
  10974. for (var n = 0, r = new Array(e); n < e; n++)
  10975. r[n] = t[n];
  10976. return r;
  10977. }
  10978. function sme(t, e) {
  10979. var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  10980. if (n != null) {
  10981. var r = [], i = !0, a = !1, o, s;
  10982. try {
  10983. for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
  10984. ;
  10985. } catch (l) {
  10986. a = !0, s = l;
  10987. } finally {
  10988. try {
  10989. !i && n.return != null && n.return();
  10990. } finally {
  10991. if (a) throw s;
  10992. }
  10993. }
  10994. return r;
  10995. }
  10996. }
  10997. function lme(t) {
  10998. if (Array.isArray(t)) return t;
  10999. }
  11000. function qZ(t) {
  11001. var e = XZ(t), n = ime(e, 2), r = n[0], i = n[1];
  11002. return _u.setTwoToneColors({
  11003. primaryColor: r,
  11004. secondaryColor: i
  11005. });
  11006. }
  11007. function ume() {
  11008. var t = _u.getTwoToneColors();
  11009. return t.calculated ? [t.primaryColor, t.secondaryColor] : t.primaryColor;
  11010. }
  11011. var cme = te({
  11012. name: "InsertStyles",
  11013. setup: function() {
  11014. return qge(), function() {
  11015. return null;
  11016. };
  11017. }
  11018. }), fme = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
  11019. function dme(t, e) {
  11020. return gme(t) || vme(t, e) || pme(t, e) || hme();
  11021. }
  11022. function hme() {
  11023. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  11024. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  11025. }
  11026. function pme(t, e) {
  11027. if (t) {
  11028. if (typeof t == "string") return ON(t, e);
  11029. var n = Object.prototype.toString.call(t).slice(8, -1);
  11030. if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
  11031. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ON(t, e);
  11032. }
  11033. }
  11034. function ON(t, e) {
  11035. (e == null || e > t.length) && (e = t.length);
  11036. for (var n = 0, r = new Array(e); n < e; n++)
  11037. r[n] = t[n];
  11038. return r;
  11039. }
  11040. function vme(t, e) {
  11041. var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  11042. if (n != null) {
  11043. var r = [], i = !0, a = !1, o, s;
  11044. try {
  11045. for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
  11046. ;
  11047. } catch (l) {
  11048. a = !0, s = l;
  11049. } finally {
  11050. try {
  11051. !i && n.return != null && n.return();
  11052. } finally {
  11053. if (a) throw s;
  11054. }
  11055. }
  11056. return r;
  11057. }
  11058. }
  11059. function gme(t) {
  11060. if (Array.isArray(t)) return t;
  11061. }
  11062. function SN(t) {
  11063. for (var e = 1; e < arguments.length; e++) {
  11064. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11065. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11066. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11067. }))), r.forEach(function(i) {
  11068. Nv(t, i, n[i]);
  11069. });
  11070. }
  11071. return t;
  11072. }
  11073. function Nv(t, e, n) {
  11074. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11075. }
  11076. function mme(t, e) {
  11077. if (t == null) return {};
  11078. var n = yme(t, e), r, i;
  11079. if (Object.getOwnPropertySymbols) {
  11080. var a = Object.getOwnPropertySymbols(t);
  11081. for (i = 0; i < a.length; i++)
  11082. r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  11083. }
  11084. return n;
  11085. }
  11086. function yme(t, e) {
  11087. if (t == null) return {};
  11088. var n = {}, r = Object.keys(t), i, a;
  11089. for (a = 0; a < r.length; a++)
  11090. i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  11091. return n;
  11092. }
  11093. qZ(tfe.primary);
  11094. var lt = function(e, n) {
  11095. var r, i = SN({}, 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 = mme(i, fme), h = HZ(), p = h.prefixCls, v = h.rootClassName, g = (r = {}, Nv(r, v.value, !!v.value), Nv(r, p.value, !0), Nv(r, "".concat(p.value, "-").concat(o.name), !!o.name), Nv(r, "".concat(p.value, "-spin"), !!s || o.name === "loading"), r), m = u;
  11096. m === void 0 && f && (m = -1);
  11097. var y = l ? {
  11098. msTransform: "rotate(".concat(l, "deg)"),
  11099. transform: "rotate(".concat(l, "deg)")
  11100. } : void 0, b = XZ(c), _ = dme(b, 2), O = _[0], S = _[1];
  11101. return M("span", SN({
  11102. role: "img",
  11103. "aria-label": o.name
  11104. }, d, {
  11105. onClick: f,
  11106. class: [g, a],
  11107. tabindex: m
  11108. }), [M(_u, {
  11109. icon: o,
  11110. primaryColor: O,
  11111. secondaryColor: S,
  11112. style: y
  11113. }, null), M(cme, null, null)]);
  11114. };
  11115. lt.props = {
  11116. spin: Boolean,
  11117. rotate: Number,
  11118. icon: Object,
  11119. twoToneColor: [String, Array]
  11120. };
  11121. lt.displayName = "AntdIcon";
  11122. lt.inheritAttrs = !1;
  11123. lt.getTwoToneColor = ume;
  11124. lt.setTwoToneColor = qZ;
  11125. function xN(t) {
  11126. for (var e = 1; e < arguments.length; e++) {
  11127. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11128. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11129. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11130. }))), r.forEach(function(i) {
  11131. bme(t, i, n[i]);
  11132. });
  11133. }
  11134. return t;
  11135. }
  11136. function bme(t, e, n) {
  11137. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11138. }
  11139. var tx = function(e, n) {
  11140. var r = xN({}, e, n.attrs);
  11141. return M(lt, xN({}, r, {
  11142. icon: Nge
  11143. }), null);
  11144. };
  11145. tx.displayName = "DownOutlined";
  11146. tx.inheritAttrs = !1;
  11147. var _me = { 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" };
  11148. function wN(t) {
  11149. for (var e = 1; e < arguments.length; e++) {
  11150. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11151. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11152. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11153. }))), r.forEach(function(i) {
  11154. Ome(t, i, n[i]);
  11155. });
  11156. }
  11157. return t;
  11158. }
  11159. function Ome(t, e, n) {
  11160. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11161. }
  11162. var ts = function(e, n) {
  11163. var r = wN({}, e, n.attrs);
  11164. return M(lt, wN({}, r, {
  11165. icon: _me
  11166. }), null);
  11167. };
  11168. ts.displayName = "LoadingOutlined";
  11169. ts.inheritAttrs = !1;
  11170. var Sme = { 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" };
  11171. function CN(t) {
  11172. for (var e = 1; e < arguments.length; e++) {
  11173. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11174. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11175. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11176. }))), r.forEach(function(i) {
  11177. xme(t, i, n[i]);
  11178. });
  11179. }
  11180. return t;
  11181. }
  11182. function xme(t, e, n) {
  11183. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11184. }
  11185. var NI = function(e, n) {
  11186. var r = CN({}, e, n.attrs);
  11187. return M(lt, CN({}, r, {
  11188. icon: Sme
  11189. }), null);
  11190. };
  11191. NI.displayName = "CheckOutlined";
  11192. NI.inheritAttrs = !1;
  11193. var wme = { 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" };
  11194. function TN(t) {
  11195. for (var e = 1; e < arguments.length; e++) {
  11196. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11197. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11198. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11199. }))), r.forEach(function(i) {
  11200. Cme(t, i, n[i]);
  11201. });
  11202. }
  11203. return t;
  11204. }
  11205. function Cme(t, e, n) {
  11206. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11207. }
  11208. var al = function(e, n) {
  11209. var r = TN({}, e, n.attrs);
  11210. return M(lt, TN({}, r, {
  11211. icon: wme
  11212. }), null);
  11213. };
  11214. al.displayName = "CloseOutlined";
  11215. al.inheritAttrs = !1;
  11216. var Tme = { 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" };
  11217. function PN(t) {
  11218. for (var e = 1; e < arguments.length; e++) {
  11219. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11220. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11221. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11222. }))), r.forEach(function(i) {
  11223. Pme(t, i, n[i]);
  11224. });
  11225. }
  11226. return t;
  11227. }
  11228. function Pme(t, e, n) {
  11229. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11230. }
  11231. var Da = function(e, n) {
  11232. var r = PN({}, e, n.attrs);
  11233. return M(lt, PN({}, r, {
  11234. icon: Tme
  11235. }), null);
  11236. };
  11237. Da.displayName = "CloseCircleFilled";
  11238. Da.inheritAttrs = !1;
  11239. var $me = { 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" };
  11240. function $N(t) {
  11241. for (var e = 1; e < arguments.length; e++) {
  11242. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11243. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11244. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11245. }))), r.forEach(function(i) {
  11246. Ame(t, i, n[i]);
  11247. });
  11248. }
  11249. return t;
  11250. }
  11251. function Ame(t, e, n) {
  11252. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11253. }
  11254. var nx = function(e, n) {
  11255. var r = $N({}, e, n.attrs);
  11256. return M(lt, $N({}, r, {
  11257. icon: $me
  11258. }), null);
  11259. };
  11260. nx.displayName = "SearchOutlined";
  11261. nx.inheritAttrs = !1;
  11262. function Eme(t) {
  11263. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  11264. const {
  11265. loading: n,
  11266. multiple: r,
  11267. prefixCls: i,
  11268. hasFeedback: a,
  11269. feedbackIcon: o,
  11270. showArrow: s
  11271. } = 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(Da, null, null), h = (m) => M(wt, null, [s !== !1 && m, a && o]);
  11272. let p = null;
  11273. if (l !== void 0)
  11274. p = h(l);
  11275. else if (n)
  11276. p = h(M(ts, {
  11277. spin: !0
  11278. }, null));
  11279. else {
  11280. const m = `${i}-suffix`;
  11281. p = (y) => {
  11282. let {
  11283. open: b,
  11284. showSearch: _
  11285. } = y;
  11286. return h(b && _ ? M(nx, {
  11287. class: m
  11288. }, null) : M(tx, {
  11289. class: m
  11290. }, null));
  11291. };
  11292. }
  11293. let v = null;
  11294. c !== void 0 ? v = c : r ? v = M(NI, null, null) : v = null;
  11295. let g = null;
  11296. return f !== void 0 ? g = f : g = M(al, null, null), {
  11297. clearIcon: d,
  11298. suffixIcon: p,
  11299. itemIcon: v,
  11300. removeIcon: g
  11301. };
  11302. }
  11303. function BI(t) {
  11304. const e = Symbol("contextKey");
  11305. return {
  11306. useProvide: (i, a) => {
  11307. const o = tn({});
  11308. return pt(e, o), ht(() => {
  11309. I(o, i, a || {});
  11310. }), o;
  11311. },
  11312. useInject: () => Ge(e, t) || {}
  11313. };
  11314. }
  11315. const C1 = Symbol("ContextProps"), T1 = Symbol("InternalContextProps"), Mme = function(t) {
  11316. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : L(() => !0);
  11317. const n = U(/* @__PURE__ */ new Map()), r = (o, s) => {
  11318. n.value.set(o, s), n.value = new Map(n.value);
  11319. }, i = (o) => {
  11320. n.value.delete(o), n.value = new Map(n.value);
  11321. }, a = vn();
  11322. se([e, n], () => {
  11323. if (process.env.NODE_ENV !== "production" && e.value && n.value.size > 1) {
  11324. Qi(!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.
  11325. You can set not need to be collected fields into \`a-form-item-rest\``);
  11326. let o = a;
  11327. for (; o.parent; )
  11328. console.warn("at", o.type), o = o.parent;
  11329. }
  11330. }), pt(C1, t), pt(T1, {
  11331. addFormItemField: r,
  11332. removeFormItemField: i
  11333. });
  11334. }, E2 = {
  11335. id: L(() => {
  11336. }),
  11337. onFieldBlur: () => {
  11338. },
  11339. onFieldChange: () => {
  11340. },
  11341. clearValidate: () => {
  11342. }
  11343. }, M2 = {
  11344. addFormItemField: () => {
  11345. },
  11346. removeFormItemField: () => {
  11347. }
  11348. }, ss = () => {
  11349. const t = Ge(T1, M2), e = Symbol("FormItemFieldKey"), n = vn();
  11350. return t.addFormItemField(e, n.type), yt(() => {
  11351. t.removeFormItemField(e);
  11352. }), pt(T1, M2), pt(C1, E2), Ge(C1, E2);
  11353. }, im = te({
  11354. compatConfig: {
  11355. MODE: 3
  11356. },
  11357. name: "AFormItemRest",
  11358. setup(t, e) {
  11359. let {
  11360. slots: n
  11361. } = e;
  11362. return pt(T1, M2), pt(C1, E2), () => {
  11363. var r;
  11364. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  11365. };
  11366. }
  11367. }), ro = BI({}), P1 = te({
  11368. name: "NoFormStatus",
  11369. setup(t, e) {
  11370. let {
  11371. slots: n
  11372. } = e;
  11373. return ro.useProvide({}), () => {
  11374. var r;
  11375. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  11376. };
  11377. }
  11378. });
  11379. function Is(t, e, n) {
  11380. return ye({
  11381. [`${t}-status-success`]: e === "success",
  11382. [`${t}-status-warning`]: e === "warning",
  11383. [`${t}-status-error`]: e === "error",
  11384. [`${t}-status-validating`]: e === "validating",
  11385. [`${t}-has-feedback`]: n
  11386. });
  11387. }
  11388. const m0 = (t, e) => e || t, Ime = (t) => {
  11389. const {
  11390. componentCls: e
  11391. } = t;
  11392. return {
  11393. [e]: {
  11394. display: "inline-flex",
  11395. "&-block": {
  11396. display: "flex",
  11397. width: "100%"
  11398. },
  11399. "&-vertical": {
  11400. flexDirection: "column"
  11401. }
  11402. }
  11403. };
  11404. }, Dme = (t) => {
  11405. const {
  11406. componentCls: e
  11407. } = t;
  11408. return {
  11409. [e]: {
  11410. display: "inline-flex",
  11411. "&-rtl": {
  11412. direction: "rtl"
  11413. },
  11414. "&-vertical": {
  11415. flexDirection: "column"
  11416. },
  11417. "&-align": {
  11418. flexDirection: "column",
  11419. "&-center": {
  11420. alignItems: "center"
  11421. },
  11422. "&-start": {
  11423. alignItems: "flex-start"
  11424. },
  11425. "&-end": {
  11426. alignItems: "flex-end"
  11427. },
  11428. "&-baseline": {
  11429. alignItems: "baseline"
  11430. }
  11431. },
  11432. [`${e}-item`]: {
  11433. "&:empty": {
  11434. display: "none"
  11435. }
  11436. }
  11437. }
  11438. };
  11439. }, Rme = Sn("Space", (t) => [Dme(t), Ime(t)]);
  11440. var kme = "[object Symbol]";
  11441. function rx(t) {
  11442. return typeof t == "symbol" || no(t) && bu(t) == kme;
  11443. }
  11444. function ix(t, e) {
  11445. for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
  11446. i[n] = e(t[n], n, t);
  11447. return i;
  11448. }
  11449. var Lme = 1 / 0, AN = Ta ? Ta.prototype : void 0, EN = AN ? AN.toString : void 0;
  11450. function KZ(t) {
  11451. if (typeof t == "string")
  11452. return t;
  11453. if (wi(t))
  11454. return ix(t, KZ) + "";
  11455. if (rx(t))
  11456. return EN ? EN.call(t) : "";
  11457. var e = t + "";
  11458. return e == "0" && 1 / t == -Lme ? "-0" : e;
  11459. }
  11460. var Nme = /\s/;
  11461. function Bme(t) {
  11462. for (var e = t.length; e-- && Nme.test(t.charAt(e)); )
  11463. ;
  11464. return e;
  11465. }
  11466. var zme = /^\s+/;
  11467. function Vme(t) {
  11468. return t && t.slice(0, Bme(t) + 1).replace(zme, "");
  11469. }
  11470. var MN = NaN, Fme = /^[-+]0x[0-9a-f]+$/i, Wme = /^0b[01]+$/i, Qme = /^0o[0-7]+$/i, Hme = parseInt;
  11471. function I2(t) {
  11472. if (typeof t == "number")
  11473. return t;
  11474. if (rx(t))
  11475. return MN;
  11476. if (xr(t)) {
  11477. var e = typeof t.valueOf == "function" ? t.valueOf() : t;
  11478. t = xr(e) ? e + "" : e;
  11479. }
  11480. if (typeof t != "string")
  11481. return t === 0 ? t : +t;
  11482. t = Vme(t);
  11483. var n = Wme.test(t);
  11484. return n || Qme.test(t) ? Hme(t.slice(2), n ? 2 : 8) : Fme.test(t) ? MN : +t;
  11485. }
  11486. var IN = 1 / 0, Gme = 17976931348623157e292;
  11487. function jme(t) {
  11488. if (!t)
  11489. return t === 0 ? t : 0;
  11490. if (t = I2(t), t === IN || t === -IN) {
  11491. var e = t < 0 ? -1 : 1;
  11492. return e * Gme;
  11493. }
  11494. return t === t ? t : 0;
  11495. }
  11496. function Zme(t) {
  11497. var e = jme(t), n = e % 1;
  11498. return e === e ? n ? e - n : e : 0;
  11499. }
  11500. function zI(t) {
  11501. return t;
  11502. }
  11503. var DN = Object.create, Ume = /* @__PURE__ */ function() {
  11504. function t() {
  11505. }
  11506. return function(e) {
  11507. if (!xr(e))
  11508. return {};
  11509. if (DN)
  11510. return DN(e);
  11511. t.prototype = e;
  11512. var n = new t();
  11513. return t.prototype = void 0, n;
  11514. };
  11515. }();
  11516. function JZ(t, e, n) {
  11517. switch (n.length) {
  11518. case 0:
  11519. return t.call(e);
  11520. case 1:
  11521. return t.call(e, n[0]);
  11522. case 2:
  11523. return t.call(e, n[0], n[1]);
  11524. case 3:
  11525. return t.call(e, n[0], n[1], n[2]);
  11526. }
  11527. return t.apply(e, n);
  11528. }
  11529. function Xme() {
  11530. }
  11531. function eU(t, e) {
  11532. var n = -1, r = t.length;
  11533. for (e || (e = Array(r)); ++n < r; )
  11534. e[n] = t[n];
  11535. return e;
  11536. }
  11537. var Yme = 800, qme = 16, Kme = Date.now;
  11538. function Jme(t) {
  11539. var e = 0, n = 0;
  11540. return function() {
  11541. var r = Kme(), i = qme - (r - n);
  11542. if (n = r, i > 0) {
  11543. if (++e >= Yme)
  11544. return arguments[0];
  11545. } else
  11546. e = 0;
  11547. return t.apply(void 0, arguments);
  11548. };
  11549. }
  11550. function e0e(t) {
  11551. return function() {
  11552. return t;
  11553. };
  11554. }
  11555. var $1 = function() {
  11556. try {
  11557. var t = Mf(Object, "defineProperty");
  11558. return t({}, "", {}), t;
  11559. } catch {
  11560. }
  11561. }(), t0e = $1 ? function(t, e) {
  11562. return $1(t, "toString", {
  11563. configurable: !0,
  11564. enumerable: !1,
  11565. value: e0e(e),
  11566. writable: !0
  11567. });
  11568. } : zI, tU = Jme(t0e);
  11569. function n0e(t, e) {
  11570. for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
  11571. ;
  11572. return t;
  11573. }
  11574. function nU(t, e, n, r) {
  11575. for (var i = t.length, a = n + -1; ++a < i; )
  11576. if (e(t[a], a, t))
  11577. return a;
  11578. return -1;
  11579. }
  11580. function r0e(t) {
  11581. return t !== t;
  11582. }
  11583. function i0e(t, e, n) {
  11584. for (var r = n - 1, i = t.length; ++r < i; )
  11585. if (t[r] === e)
  11586. return r;
  11587. return -1;
  11588. }
  11589. function a0e(t, e, n) {
  11590. return e === e ? i0e(t, e, n) : nU(t, r0e, n);
  11591. }
  11592. function rU(t, e) {
  11593. var n = t == null ? 0 : t.length;
  11594. return !!n && a0e(t, e, 0) > -1;
  11595. }
  11596. function VI(t, e, n) {
  11597. e == "__proto__" && $1 ? $1(t, e, {
  11598. configurable: !0,
  11599. enumerable: !0,
  11600. value: n,
  11601. writable: !0
  11602. }) : t[e] = n;
  11603. }
  11604. var o0e = Object.prototype, s0e = o0e.hasOwnProperty;
  11605. function FI(t, e, n) {
  11606. var r = t[e];
  11607. (!(s0e.call(t, e) && p0(r, n)) || n === void 0 && !(e in t)) && VI(t, e, n);
  11608. }
  11609. function sp(t, e, n, r) {
  11610. var i = !n;
  11611. n || (n = {});
  11612. for (var a = -1, o = e.length; ++a < o; ) {
  11613. var s = e[a], l = void 0;
  11614. l === void 0 && (l = t[s]), i ? VI(n, s, l) : FI(n, s, l);
  11615. }
  11616. return n;
  11617. }
  11618. var RN = Math.max;
  11619. function iU(t, e, n) {
  11620. return e = RN(e === void 0 ? t.length - 1 : e, 0), function() {
  11621. for (var r = arguments, i = -1, a = RN(r.length - e, 0), o = Array(a); ++i < a; )
  11622. o[i] = r[e + i];
  11623. i = -1;
  11624. for (var s = Array(e + 1); ++i < e; )
  11625. s[i] = r[i];
  11626. return s[e] = n(o), JZ(t, this, s);
  11627. };
  11628. }
  11629. function WI(t, e) {
  11630. return tU(iU(t, e, zI), t + "");
  11631. }
  11632. function l0e(t, e, n) {
  11633. if (!xr(n))
  11634. return !1;
  11635. var r = typeof e;
  11636. return (r == "number" ? op(n) && GS(e, n.length) : r == "string" && e in n) ? p0(n[e], t) : !1;
  11637. }
  11638. function u0e(t) {
  11639. return WI(function(e, n) {
  11640. var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
  11641. for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && l0e(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
  11642. var s = n[r];
  11643. s && t(e, s, r, a);
  11644. }
  11645. return e;
  11646. });
  11647. }
  11648. function c0e(t) {
  11649. var e = [];
  11650. if (t != null)
  11651. for (var n in Object(t))
  11652. e.push(n);
  11653. return e;
  11654. }
  11655. var f0e = Object.prototype, d0e = f0e.hasOwnProperty;
  11656. function h0e(t) {
  11657. if (!xr(t))
  11658. return c0e(t);
  11659. var e = US(t), n = [];
  11660. for (var r in t)
  11661. r == "constructor" && (e || !d0e.call(t, r)) || n.push(r);
  11662. return n;
  11663. }
  11664. function y0(t) {
  11665. return op(t) ? CZ(t, !0) : h0e(t);
  11666. }
  11667. var p0e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, v0e = /^\w*$/;
  11668. function QI(t, e) {
  11669. if (wi(t))
  11670. return !1;
  11671. var n = typeof t;
  11672. return n == "number" || n == "symbol" || n == "boolean" || t == null || rx(t) ? !0 : v0e.test(t) || !p0e.test(t) || e != null && t in Object(e);
  11673. }
  11674. var g0e = "Expected a function";
  11675. function HI(t, e) {
  11676. if (typeof t != "function" || e != null && typeof e != "function")
  11677. throw new TypeError(g0e);
  11678. var n = function() {
  11679. var r = arguments, i = e ? e.apply(this, r) : r[0], a = n.cache;
  11680. if (a.has(i))
  11681. return a.get(i);
  11682. var o = t.apply(this, r);
  11683. return n.cache = a.set(i, o) || a, o;
  11684. };
  11685. return n.cache = new (HI.Cache || il)(), n;
  11686. }
  11687. HI.Cache = il;
  11688. var m0e = 500;
  11689. function y0e(t) {
  11690. var e = HI(t, function(r) {
  11691. return n.size === m0e && n.clear(), r;
  11692. }), n = e.cache;
  11693. return e;
  11694. }
  11695. var b0e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _0e = /\\(\\)?/g, O0e = y0e(function(t) {
  11696. var e = [];
  11697. return t.charCodeAt(0) === 46 && e.push(""), t.replace(b0e, function(n, r, i, a) {
  11698. e.push(i ? a.replace(_0e, "$1") : r || n);
  11699. }), e;
  11700. });
  11701. function S0e(t) {
  11702. return t == null ? "" : KZ(t);
  11703. }
  11704. function lp(t, e) {
  11705. return wi(t) ? t : QI(t, e) ? [t] : O0e(S0e(t));
  11706. }
  11707. var x0e = 1 / 0;
  11708. function up(t) {
  11709. if (typeof t == "string" || rx(t))
  11710. return t;
  11711. var e = t + "";
  11712. return e == "0" && 1 / t == -x0e ? "-0" : e;
  11713. }
  11714. function ax(t, e) {
  11715. e = lp(e, t);
  11716. for (var n = 0, r = e.length; t != null && n < r; )
  11717. t = t[up(e[n++])];
  11718. return n && n == r ? t : void 0;
  11719. }
  11720. function kt(t, e, n) {
  11721. var r = t == null ? void 0 : ax(t, e);
  11722. return r === void 0 ? n : r;
  11723. }
  11724. var kN = Ta ? Ta.isConcatSpreadable : void 0;
  11725. function w0e(t) {
  11726. return wi(t) || Oh(t) || !!(kN && t && t[kN]);
  11727. }
  11728. function C0e(t, e, n, r, i) {
  11729. var a = -1, o = t.length;
  11730. for (n || (n = w0e), i || (i = []); ++a < o; ) {
  11731. var s = t[a];
  11732. n(s) ? OI(i, s) : i[i.length] = s;
  11733. }
  11734. return i;
  11735. }
  11736. function T0e(t) {
  11737. var e = t == null ? 0 : t.length;
  11738. return e ? C0e(t) : [];
  11739. }
  11740. function aU(t) {
  11741. return tU(iU(t, void 0, T0e), t + "");
  11742. }
  11743. var GI = TZ(Object.getPrototypeOf, Object), P0e = "[object Object]", $0e = Function.prototype, A0e = Object.prototype, oU = $0e.toString, E0e = A0e.hasOwnProperty, M0e = oU.call(Object);
  11744. function jI(t) {
  11745. if (!no(t) || bu(t) != P0e)
  11746. return !1;
  11747. var e = GI(t);
  11748. if (e === null)
  11749. return !0;
  11750. var n = E0e.call(e, "constructor") && e.constructor;
  11751. return typeof n == "function" && n instanceof n && oU.call(n) == M0e;
  11752. }
  11753. function I0e(t, e, n) {
  11754. var r = -1, i = t.length;
  11755. 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;
  11756. for (var a = Array(i); ++r < i; )
  11757. a[r] = t[r + e];
  11758. return a;
  11759. }
  11760. function D0e(t, e) {
  11761. return t && sp(e, v0(e), t);
  11762. }
  11763. function R0e(t, e) {
  11764. return t && sp(e, y0(e), t);
  11765. }
  11766. var sU = typeof exports == "object" && exports && !exports.nodeType && exports, LN = sU && typeof module == "object" && module && !module.nodeType && module, k0e = LN && LN.exports === sU, NN = k0e ? fo.Buffer : void 0, BN = NN ? NN.allocUnsafe : void 0;
  11767. function lU(t, e) {
  11768. if (e)
  11769. return t.slice();
  11770. var n = t.length, r = BN ? BN(n) : new t.constructor(n);
  11771. return t.copy(r), r;
  11772. }
  11773. function L0e(t, e) {
  11774. return sp(t, SI(t), e);
  11775. }
  11776. var N0e = Object.getOwnPropertySymbols, uU = N0e ? function(t) {
  11777. for (var e = []; t; )
  11778. OI(e, SI(t)), t = GI(t);
  11779. return e;
  11780. } : OZ;
  11781. function B0e(t, e) {
  11782. return sp(t, uU(t), e);
  11783. }
  11784. function cU(t) {
  11785. return _Z(t, y0, uU);
  11786. }
  11787. var z0e = Object.prototype, V0e = z0e.hasOwnProperty;
  11788. function F0e(t) {
  11789. var e = t.length, n = new t.constructor(e);
  11790. return e && typeof t[0] == "string" && V0e.call(t, "index") && (n.index = t.index, n.input = t.input), n;
  11791. }
  11792. function ZI(t) {
  11793. var e = new t.constructor(t.byteLength);
  11794. return new w1(e).set(new w1(t)), e;
  11795. }
  11796. function W0e(t, e) {
  11797. var n = e ? ZI(t.buffer) : t.buffer;
  11798. return new t.constructor(n, t.byteOffset, t.byteLength);
  11799. }
  11800. var Q0e = /\w*$/;
  11801. function H0e(t) {
  11802. var e = new t.constructor(t.source, Q0e.exec(t));
  11803. return e.lastIndex = t.lastIndex, e;
  11804. }
  11805. var zN = Ta ? Ta.prototype : void 0, VN = zN ? zN.valueOf : void 0;
  11806. function G0e(t) {
  11807. return VN ? Object(VN.call(t)) : {};
  11808. }
  11809. function fU(t, e) {
  11810. var n = e ? ZI(t.buffer) : t.buffer;
  11811. return new t.constructor(n, t.byteOffset, t.length);
  11812. }
  11813. var j0e = "[object Boolean]", Z0e = "[object Date]", U0e = "[object Map]", X0e = "[object Number]", Y0e = "[object RegExp]", q0e = "[object Set]", K0e = "[object String]", J0e = "[object Symbol]", eye = "[object ArrayBuffer]", tye = "[object DataView]", nye = "[object Float32Array]", rye = "[object Float64Array]", iye = "[object Int8Array]", aye = "[object Int16Array]", oye = "[object Int32Array]", sye = "[object Uint8Array]", lye = "[object Uint8ClampedArray]", uye = "[object Uint16Array]", cye = "[object Uint32Array]";
  11814. function fye(t, e, n) {
  11815. var r = t.constructor;
  11816. switch (e) {
  11817. case eye:
  11818. return ZI(t);
  11819. case j0e:
  11820. case Z0e:
  11821. return new r(+t);
  11822. case tye:
  11823. return W0e(t, n);
  11824. case nye:
  11825. case rye:
  11826. case iye:
  11827. case aye:
  11828. case oye:
  11829. case sye:
  11830. case lye:
  11831. case uye:
  11832. case cye:
  11833. return fU(t, n);
  11834. case U0e:
  11835. return new r();
  11836. case X0e:
  11837. case K0e:
  11838. return new r(t);
  11839. case Y0e:
  11840. return H0e(t);
  11841. case q0e:
  11842. return new r();
  11843. case J0e:
  11844. return G0e(t);
  11845. }
  11846. }
  11847. function dU(t) {
  11848. return typeof t.constructor == "function" && !US(t) ? Ume(GI(t)) : {};
  11849. }
  11850. var dye = "[object Map]";
  11851. function hye(t) {
  11852. return no(t) && da(t) == dye;
  11853. }
  11854. var FN = xh && xh.isMap, pye = FN ? jS(FN) : hye, vye = "[object Set]";
  11855. function gye(t) {
  11856. return no(t) && da(t) == vye;
  11857. }
  11858. var WN = xh && xh.isSet, mye = WN ? jS(WN) : gye, yye = 1, bye = 2, _ye = 4, hU = "[object Arguments]", Oye = "[object Array]", Sye = "[object Boolean]", xye = "[object Date]", wye = "[object Error]", pU = "[object Function]", Cye = "[object GeneratorFunction]", Tye = "[object Map]", Pye = "[object Number]", vU = "[object Object]", $ye = "[object RegExp]", Aye = "[object Set]", Eye = "[object String]", Mye = "[object Symbol]", Iye = "[object WeakMap]", Dye = "[object ArrayBuffer]", Rye = "[object DataView]", kye = "[object Float32Array]", Lye = "[object Float64Array]", Nye = "[object Int8Array]", Bye = "[object Int16Array]", zye = "[object Int32Array]", Vye = "[object Uint8Array]", Fye = "[object Uint8ClampedArray]", Wye = "[object Uint16Array]", Qye = "[object Uint32Array]", rn = {};
  11859. rn[hU] = rn[Oye] = rn[Dye] = rn[Rye] = rn[Sye] = rn[xye] = rn[kye] = rn[Lye] = rn[Nye] = rn[Bye] = rn[zye] = rn[Tye] = rn[Pye] = rn[vU] = rn[$ye] = rn[Aye] = rn[Eye] = rn[Mye] = rn[Vye] = rn[Fye] = rn[Wye] = rn[Qye] = !0;
  11860. rn[wye] = rn[pU] = rn[Iye] = !1;
  11861. function ug(t, e, n, r, i, a) {
  11862. var o, s = e & yye, l = e & bye, u = e & _ye;
  11863. if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
  11864. return o;
  11865. if (!xr(t))
  11866. return t;
  11867. var c = wi(t);
  11868. if (c) {
  11869. if (o = F0e(t), !s)
  11870. return eU(t, o);
  11871. } else {
  11872. var f = da(t), d = f == pU || f == Cye;
  11873. if (Sh(t))
  11874. return lU(t, s);
  11875. if (f == vU || f == hU || d && !i) {
  11876. if (o = l || d ? {} : dU(t), !s)
  11877. return l ? B0e(t, R0e(o, t)) : L0e(t, D0e(o, t));
  11878. } else {
  11879. if (!rn[f])
  11880. return i ? t : {};
  11881. o = fye(t, f, s);
  11882. }
  11883. }
  11884. a || (a = new Ka());
  11885. var h = a.get(t);
  11886. if (h)
  11887. return h;
  11888. a.set(t, o), mye(t) ? t.forEach(function(g) {
  11889. o.add(ug(g, e, n, g, t, a));
  11890. }) : pye(t) && t.forEach(function(g, m) {
  11891. o.set(m, ug(g, e, n, m, t, a));
  11892. });
  11893. var p = u ? l ? cU : x2 : l ? y0 : v0, v = c ? void 0 : p(t);
  11894. return n0e(v || t, function(g, m) {
  11895. v && (m = g, g = t[m]), FI(o, m, ug(g, e, n, m, t, a));
  11896. }), o;
  11897. }
  11898. var Hye = 1, Gye = 4;
  11899. function Zc(t) {
  11900. return ug(t, Hye | Gye);
  11901. }
  11902. var jye = 1, Zye = 2;
  11903. function Uye(t, e, n, r) {
  11904. var i = n.length, a = i;
  11905. if (t == null)
  11906. return !a;
  11907. for (t = Object(t); i--; ) {
  11908. var o = n[i];
  11909. if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
  11910. return !1;
  11911. }
  11912. for (; ++i < a; ) {
  11913. o = n[i];
  11914. var s = o[0], l = t[s], u = o[1];
  11915. if (o[2]) {
  11916. if (l === void 0 && !(s in t))
  11917. return !1;
  11918. } else {
  11919. var c = new Ka(), f;
  11920. if (!(f === void 0 ? XS(u, l, jye | Zye, r, c) : f))
  11921. return !1;
  11922. }
  11923. }
  11924. return !0;
  11925. }
  11926. function gU(t) {
  11927. return t === t && !xr(t);
  11928. }
  11929. function Xye(t) {
  11930. for (var e = v0(t), n = e.length; n--; ) {
  11931. var r = e[n], i = t[r];
  11932. e[n] = [r, i, gU(i)];
  11933. }
  11934. return e;
  11935. }
  11936. function mU(t, e) {
  11937. return function(n) {
  11938. return n == null ? !1 : n[t] === e && (e !== void 0 || t in Object(n));
  11939. };
  11940. }
  11941. function Yye(t) {
  11942. var e = Xye(t);
  11943. return e.length == 1 && e[0][2] ? mU(e[0][0], e[0][1]) : function(n) {
  11944. return n === t || Uye(n, t, e);
  11945. };
  11946. }
  11947. function qye(t, e) {
  11948. return t != null && e in Object(t);
  11949. }
  11950. function Kye(t, e, n) {
  11951. e = lp(e, t);
  11952. for (var r = -1, i = e.length, a = !1; ++r < i; ) {
  11953. var o = up(e[r]);
  11954. if (!(a = t != null && n(t, o)))
  11955. break;
  11956. t = t[o];
  11957. }
  11958. return a || ++r != i ? a : (i = t == null ? 0 : t.length, !!i && xI(i) && GS(o, i) && (wi(t) || Oh(t)));
  11959. }
  11960. function yU(t, e) {
  11961. return t != null && Kye(t, e, qye);
  11962. }
  11963. var Jye = 1, ebe = 2;
  11964. function tbe(t, e) {
  11965. return QI(t) && gU(e) ? mU(up(t), e) : function(n) {
  11966. var r = kt(n, t);
  11967. return r === void 0 && r === e ? yU(n, t) : XS(e, r, Jye | ebe);
  11968. };
  11969. }
  11970. function nbe(t) {
  11971. return function(e) {
  11972. return e == null ? void 0 : e[t];
  11973. };
  11974. }
  11975. function rbe(t) {
  11976. return function(e) {
  11977. return ax(e, t);
  11978. };
  11979. }
  11980. function ibe(t) {
  11981. return QI(t) ? nbe(up(t)) : rbe(t);
  11982. }
  11983. function bU(t) {
  11984. return typeof t == "function" ? t : t == null ? zI : typeof t == "object" ? wi(t) ? tbe(t[0], t[1]) : Yye(t) : ibe(t);
  11985. }
  11986. function abe(t) {
  11987. return function(e, n, r) {
  11988. for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
  11989. var l = o[++i];
  11990. if (n(a[l], l, a) === !1)
  11991. break;
  11992. }
  11993. return e;
  11994. };
  11995. }
  11996. var obe = abe(), mC = function() {
  11997. return fo.Date.now();
  11998. }, sbe = "Expected a function", lbe = Math.max, ube = Math.min;
  11999. function UI(t, e, n) {
  12000. var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  12001. if (typeof t != "function")
  12002. throw new TypeError(sbe);
  12003. e = I2(e) || 0, xr(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? lbe(I2(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  12004. function h(S) {
  12005. var x = r, C = i;
  12006. return r = i = void 0, u = S, o = t.apply(C, x), o;
  12007. }
  12008. function p(S) {
  12009. return u = S, s = setTimeout(m, e), c ? h(S) : o;
  12010. }
  12011. function v(S) {
  12012. var x = S - l, C = S - u, T = e - x;
  12013. return f ? ube(T, a - C) : T;
  12014. }
  12015. function g(S) {
  12016. var x = S - l, C = S - u;
  12017. return l === void 0 || x >= e || x < 0 || f && C >= a;
  12018. }
  12019. function m() {
  12020. var S = mC();
  12021. if (g(S))
  12022. return y(S);
  12023. s = setTimeout(m, v(S));
  12024. }
  12025. function y(S) {
  12026. return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  12027. }
  12028. function b() {
  12029. s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  12030. }
  12031. function _() {
  12032. return s === void 0 ? o : y(mC());
  12033. }
  12034. function O() {
  12035. var S = mC(), x = g(S);
  12036. if (r = arguments, i = this, l = S, x) {
  12037. if (s === void 0)
  12038. return p(l);
  12039. if (f)
  12040. return clearTimeout(s), s = setTimeout(m, e), h(l);
  12041. }
  12042. return s === void 0 && (s = setTimeout(m, e)), o;
  12043. }
  12044. return O.cancel = b, O.flush = _, O;
  12045. }
  12046. function D2(t, e, n) {
  12047. (n !== void 0 && !p0(t[e], n) || n === void 0 && !(e in t)) && VI(t, e, n);
  12048. }
  12049. function _U(t) {
  12050. return no(t) && op(t);
  12051. }
  12052. function R2(t, e) {
  12053. if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
  12054. return t[e];
  12055. }
  12056. function cbe(t) {
  12057. return sp(t, y0(t));
  12058. }
  12059. function fbe(t, e, n, r, i, a, o) {
  12060. var s = R2(t, n), l = R2(e, n), u = o.get(l);
  12061. if (u) {
  12062. D2(t, n, u);
  12063. return;
  12064. }
  12065. var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  12066. if (f) {
  12067. var d = wi(l), h = !d && Sh(l), p = !d && !h && ZS(l);
  12068. c = l, d || h || p ? wi(s) ? c = s : _U(s) ? c = eU(s) : h ? (f = !1, c = lU(l, !0)) : p ? (f = !1, c = fU(l, !0)) : c = [] : jI(l) || Oh(l) ? (c = s, Oh(s) ? c = cbe(s) : (!xr(s) || bI(s)) && (c = dU(l))) : f = !1;
  12069. }
  12070. f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), D2(t, n, c);
  12071. }
  12072. function XI(t, e, n, r, i) {
  12073. t !== e && obe(e, function(a, o) {
  12074. if (i || (i = new Ka()), xr(a))
  12075. fbe(t, e, o, n, XI, r, i);
  12076. else {
  12077. var s = r ? r(R2(t, o), a, o + "", t, e, i) : void 0;
  12078. s === void 0 && (s = a), D2(t, o, s);
  12079. }
  12080. }, y0);
  12081. }
  12082. function OU(t, e, n, r, i, a) {
  12083. return xr(t) && xr(e) && (a.set(e, t), XI(t, e, void 0, OU, a), a.delete(e)), t;
  12084. }
  12085. var dbe = u0e(function(t, e, n, r) {
  12086. XI(t, e, n, r);
  12087. }), SU = WI(function(t) {
  12088. return t.push(void 0, OU), JZ(dbe, void 0, t);
  12089. });
  12090. function hbe(t) {
  12091. var e = t == null ? 0 : t.length;
  12092. return e ? t[e - 1] : void 0;
  12093. }
  12094. function pbe(t) {
  12095. return function(e, n, r) {
  12096. var i = Object(e);
  12097. if (!op(e)) {
  12098. var a = bU(n);
  12099. e = v0(e), n = function(s) {
  12100. return a(i[s], s, i);
  12101. };
  12102. }
  12103. var o = t(e, n, r);
  12104. return o > -1 ? i[a ? e[o] : o] : void 0;
  12105. };
  12106. }
  12107. var vbe = Math.max;
  12108. function gbe(t, e, n) {
  12109. var r = t == null ? 0 : t.length;
  12110. if (!r)
  12111. return -1;
  12112. var i = n == null ? 0 : Zme(n);
  12113. return i < 0 && (i = vbe(r + i, 0)), nU(t, bU(e), i);
  12114. }
  12115. var mbe = pbe(gbe);
  12116. function A1(t) {
  12117. for (var e = -1, n = t == null ? 0 : t.length, r = {}; ++e < n; ) {
  12118. var i = t[e];
  12119. r[i[0]] = i[1];
  12120. }
  12121. return r;
  12122. }
  12123. var ybe = Math.min;
  12124. function bbe(t, e, n) {
  12125. for (var r = rU, i = t[0].length, a = t.length, o = a, s = Array(a), l = 1 / 0, u = []; o--; ) {
  12126. var c = t[o];
  12127. o && e && (c = ix(c, jS(e))), l = ybe(c.length, l), s[o] = i >= 120 && c.length >= 120 ? new _h(o && c) : void 0;
  12128. }
  12129. c = t[0];
  12130. var f = -1, d = s[0];
  12131. e:
  12132. for (; ++f < i && u.length < l; ) {
  12133. var h = c[f], p = h;
  12134. if (h = h !== 0 ? h : 0, !(d ? x1(d, p) : r(u, p))) {
  12135. for (o = a; --o; ) {
  12136. var v = s[o];
  12137. if (!(v ? x1(v, p) : r(t[o], p)))
  12138. continue e;
  12139. }
  12140. d && d.push(p), u.push(h);
  12141. }
  12142. }
  12143. return u;
  12144. }
  12145. function _be(t) {
  12146. return _U(t) ? t : [];
  12147. }
  12148. var Obe = WI(function(t) {
  12149. var e = ix(t, _be);
  12150. return e.length && e[0] === t[0] ? bbe(e) : [];
  12151. });
  12152. function Sbe(t, e) {
  12153. return e.length < 2 ? t : ax(t, I0e(e, 0, -1));
  12154. }
  12155. var xbe = "[object Map]", wbe = "[object Set]", Cbe = Object.prototype, Tbe = Cbe.hasOwnProperty;
  12156. function xU(t) {
  12157. if (t == null)
  12158. return !0;
  12159. if (op(t) && (wi(t) || typeof t == "string" || typeof t.splice == "function" || Sh(t) || ZS(t) || Oh(t)))
  12160. return !t.length;
  12161. var e = da(t);
  12162. if (e == xbe || e == wbe)
  12163. return !t.size;
  12164. if (US(t))
  12165. return !PZ(t).length;
  12166. for (var n in t)
  12167. if (Tbe.call(t, n))
  12168. return !1;
  12169. return !0;
  12170. }
  12171. var Pbe = "[object Number]";
  12172. function $be(t) {
  12173. return typeof t == "number" || no(t) && bu(t) == Pbe;
  12174. }
  12175. function Gl(t) {
  12176. return t == null;
  12177. }
  12178. function Abe(t) {
  12179. return t === void 0;
  12180. }
  12181. function Ebe(t, e) {
  12182. return e = lp(e, t), t = Sbe(t, e), t == null || delete t[up(hbe(e))];
  12183. }
  12184. function Mbe(t) {
  12185. return jI(t) ? void 0 : t;
  12186. }
  12187. var Ibe = 1, Dbe = 2, Rbe = 4, wU = aU(function(t, e) {
  12188. var n = {};
  12189. if (t == null)
  12190. return n;
  12191. var r = !1;
  12192. e = ix(e, function(a) {
  12193. return a = lp(a, t), r || (r = a.length > 1), a;
  12194. }), sp(t, cU(t), n), r && (n = ug(n, Ibe | Dbe | Rbe, Mbe));
  12195. for (var i = e.length; i--; )
  12196. Ebe(n, e[i]);
  12197. return n;
  12198. });
  12199. function CU(t, e, n, r) {
  12200. if (!xr(t))
  12201. return t;
  12202. e = lp(e, t);
  12203. for (var i = -1, a = e.length, o = a - 1, s = t; s != null && ++i < a; ) {
  12204. var l = up(e[i]), u = n;
  12205. if (l === "__proto__" || l === "constructor" || l === "prototype")
  12206. return t;
  12207. if (i != o) {
  12208. var c = s[l];
  12209. u = void 0, u === void 0 && (u = xr(c) ? c : GS(e[i + 1]) ? [] : {});
  12210. }
  12211. FI(s, l, u), s = s[l];
  12212. }
  12213. return t;
  12214. }
  12215. function kbe(t, e, n) {
  12216. for (var r = -1, i = e.length, a = {}; ++r < i; ) {
  12217. var o = e[r], s = ax(t, o);
  12218. n(s, o) && CU(a, lp(o, t), s);
  12219. }
  12220. return a;
  12221. }
  12222. function Lbe(t, e) {
  12223. return kbe(t, e, function(n, r) {
  12224. return yU(t, r);
  12225. });
  12226. }
  12227. var am = aU(function(t, e) {
  12228. return t == null ? {} : Lbe(t, e);
  12229. });
  12230. function YI(t, e, n) {
  12231. return t == null ? t : CU(t, e, n);
  12232. }
  12233. var Nbe = "Expected a function";
  12234. function Bbe(t, e, n) {
  12235. var r = !0, i = !0;
  12236. if (typeof t != "function")
  12237. throw new TypeError(Nbe);
  12238. return xr(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), UI(t, e, {
  12239. leading: r,
  12240. maxWait: e,
  12241. trailing: i
  12242. });
  12243. }
  12244. var zbe = 1 / 0, Vbe = Zd && 1 / _I(new Zd([, -0]))[1] == zbe ? function(t) {
  12245. return new Zd(t);
  12246. } : Xme, Fbe = 200;
  12247. function Wbe(t, e, n) {
  12248. var r = -1, i = rU, a = t.length, o = !0, s = [], l = s;
  12249. if (a >= Fbe) {
  12250. var u = Vbe(t);
  12251. if (u)
  12252. return _I(u);
  12253. o = !1, i = x1, l = new _h();
  12254. } else
  12255. l = s;
  12256. e:
  12257. for (; ++r < a; ) {
  12258. var c = t[r], f = c;
  12259. if (c = c !== 0 ? c : 0, o && f === f) {
  12260. for (var d = l.length; d--; )
  12261. if (l[d] === f)
  12262. continue e;
  12263. s.push(c);
  12264. } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
  12265. }
  12266. return s;
  12267. }
  12268. function yC(t) {
  12269. return t && t.length ? Wbe(t) : [];
  12270. }
  12271. const Qbe = () => ({
  12272. compactSize: String,
  12273. compactDirection: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  12274. isFirstItem: nt(),
  12275. isLastItem: nt()
  12276. }), ox = BI(null), sx = (t, e) => {
  12277. const n = ox.useInject(), r = L(() => {
  12278. if (!n || xU(n)) return "";
  12279. const {
  12280. compactDirection: i,
  12281. isFirstItem: a,
  12282. isLastItem: o
  12283. } = n, s = i === "vertical" ? "-vertical-" : "-";
  12284. return ye({
  12285. [`${t.value}-compact${s}item`]: !0,
  12286. [`${t.value}-compact${s}first-item`]: a,
  12287. [`${t.value}-compact${s}last-item`]: o,
  12288. [`${t.value}-compact${s}item-rtl`]: e.value === "rtl"
  12289. });
  12290. });
  12291. return {
  12292. compactSize: L(() => n == null ? void 0 : n.compactSize),
  12293. compactDirection: L(() => n == null ? void 0 : n.compactDirection),
  12294. compactItemClassnames: r
  12295. };
  12296. }, E1 = te({
  12297. name: "NoCompactStyle",
  12298. setup(t, e) {
  12299. let {
  12300. slots: n
  12301. } = e;
  12302. return ox.useProvide(null), () => {
  12303. var r;
  12304. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  12305. };
  12306. }
  12307. }), Hbe = () => ({
  12308. prefixCls: String,
  12309. size: {
  12310. type: String
  12311. },
  12312. direction: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  12313. align: Y.oneOf(ru("start", "end", "center", "baseline")),
  12314. block: {
  12315. type: Boolean,
  12316. default: void 0
  12317. }
  12318. }), Gbe = te({
  12319. name: "CompactItem",
  12320. props: Qbe(),
  12321. setup(t, e) {
  12322. let {
  12323. slots: n
  12324. } = e;
  12325. return ox.useProvide(t), () => {
  12326. var r;
  12327. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  12328. };
  12329. }
  12330. });
  12331. te({
  12332. name: "ASpaceCompact",
  12333. inheritAttrs: !1,
  12334. props: Hbe(),
  12335. setup(t, e) {
  12336. let {
  12337. attrs: n,
  12338. slots: r
  12339. } = e;
  12340. const {
  12341. prefixCls: i,
  12342. direction: a
  12343. } = It("space-compact", t), o = ox.useInject(), [s, l] = Rme(i), u = L(() => ye(i.value, l.value, {
  12344. [`${i.value}-rtl`]: a.value === "rtl",
  12345. [`${i.value}-block`]: t.block,
  12346. [`${i.value}-vertical`]: t.direction === "vertical"
  12347. }));
  12348. return () => {
  12349. var c;
  12350. const f = Yn(((c = r.default) === null || c === void 0 ? void 0 : c.call(r)) || []);
  12351. return f.length === 0 ? null : s(M("div", j(j({}, n), {}, {
  12352. class: [u.value, n.class]
  12353. }), [f.map((d, h) => {
  12354. var p;
  12355. const v = d && d.key || `${i.value}-item-${h}`, g = !o || xU(o);
  12356. return M(Gbe, {
  12357. key: v,
  12358. compactSize: (p = t.size) !== null && p !== void 0 ? p : "middle",
  12359. compactDirection: t.direction,
  12360. isFirstItem: h === 0 && (g || (o == null ? void 0 : o.isFirstItem)),
  12361. isLastItem: h === f.length - 1 && (g || (o == null ? void 0 : o.isLastItem))
  12362. }, {
  12363. default: () => [d]
  12364. });
  12365. })]));
  12366. };
  12367. }
  12368. });
  12369. const jbe = (t) => ({
  12370. animationDuration: t,
  12371. animationFillMode: "both"
  12372. }), Zbe = (t) => ({
  12373. animationDuration: t,
  12374. animationFillMode: "both"
  12375. }), lx = function(t, e, n, r) {
  12376. const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  12377. return {
  12378. [`
  12379. ${a}${t}-enter,
  12380. ${a}${t}-appear
  12381. `]: I(I({}, jbe(r)), {
  12382. animationPlayState: "paused"
  12383. }),
  12384. [`${a}${t}-leave`]: I(I({}, Zbe(r)), {
  12385. animationPlayState: "paused"
  12386. }),
  12387. [`
  12388. ${a}${t}-enter${t}-enter-active,
  12389. ${a}${t}-appear${t}-appear-active
  12390. `]: {
  12391. animationName: e,
  12392. animationPlayState: "running"
  12393. },
  12394. [`${a}${t}-leave${t}-leave-active`]: {
  12395. animationName: n,
  12396. animationPlayState: "running",
  12397. pointerEvents: "none"
  12398. }
  12399. };
  12400. }, Ube = new Ot("antFadeIn", {
  12401. "0%": {
  12402. opacity: 0
  12403. },
  12404. "100%": {
  12405. opacity: 1
  12406. }
  12407. }), Xbe = new Ot("antFadeOut", {
  12408. "0%": {
  12409. opacity: 1
  12410. },
  12411. "100%": {
  12412. opacity: 0
  12413. }
  12414. }), TU = function(t) {
  12415. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  12416. const {
  12417. antCls: n
  12418. } = t, r = `${n}-fade`, i = e ? "&" : "";
  12419. return [lx(r, Ube, Xbe, t.motionDurationMid, e), {
  12420. [`
  12421. ${i}${r}-enter,
  12422. ${i}${r}-appear
  12423. `]: {
  12424. opacity: 0,
  12425. animationTimingFunction: "linear"
  12426. },
  12427. [`${i}${r}-leave`]: {
  12428. animationTimingFunction: "linear"
  12429. }
  12430. }];
  12431. }, Ybe = new Ot("antMoveDownIn", {
  12432. "0%": {
  12433. transform: "translate3d(0, 100%, 0)",
  12434. transformOrigin: "0 0",
  12435. opacity: 0
  12436. },
  12437. "100%": {
  12438. transform: "translate3d(0, 0, 0)",
  12439. transformOrigin: "0 0",
  12440. opacity: 1
  12441. }
  12442. }), qbe = new Ot("antMoveDownOut", {
  12443. "0%": {
  12444. transform: "translate3d(0, 0, 0)",
  12445. transformOrigin: "0 0",
  12446. opacity: 1
  12447. },
  12448. "100%": {
  12449. transform: "translate3d(0, 100%, 0)",
  12450. transformOrigin: "0 0",
  12451. opacity: 0
  12452. }
  12453. }), Kbe = new Ot("antMoveLeftIn", {
  12454. "0%": {
  12455. transform: "translate3d(-100%, 0, 0)",
  12456. transformOrigin: "0 0",
  12457. opacity: 0
  12458. },
  12459. "100%": {
  12460. transform: "translate3d(0, 0, 0)",
  12461. transformOrigin: "0 0",
  12462. opacity: 1
  12463. }
  12464. }), Jbe = new Ot("antMoveLeftOut", {
  12465. "0%": {
  12466. transform: "translate3d(0, 0, 0)",
  12467. transformOrigin: "0 0",
  12468. opacity: 1
  12469. },
  12470. "100%": {
  12471. transform: "translate3d(-100%, 0, 0)",
  12472. transformOrigin: "0 0",
  12473. opacity: 0
  12474. }
  12475. }), e_e = new Ot("antMoveRightIn", {
  12476. "0%": {
  12477. transform: "translate3d(100%, 0, 0)",
  12478. transformOrigin: "0 0",
  12479. opacity: 0
  12480. },
  12481. "100%": {
  12482. transform: "translate3d(0, 0, 0)",
  12483. transformOrigin: "0 0",
  12484. opacity: 1
  12485. }
  12486. }), t_e = new Ot("antMoveRightOut", {
  12487. "0%": {
  12488. transform: "translate3d(0, 0, 0)",
  12489. transformOrigin: "0 0",
  12490. opacity: 1
  12491. },
  12492. "100%": {
  12493. transform: "translate3d(100%, 0, 0)",
  12494. transformOrigin: "0 0",
  12495. opacity: 0
  12496. }
  12497. }), n_e = new Ot("antMoveUpIn", {
  12498. "0%": {
  12499. transform: "translate3d(0, -100%, 0)",
  12500. transformOrigin: "0 0",
  12501. opacity: 0
  12502. },
  12503. "100%": {
  12504. transform: "translate3d(0, 0, 0)",
  12505. transformOrigin: "0 0",
  12506. opacity: 1
  12507. }
  12508. }), r_e = new Ot("antMoveUpOut", {
  12509. "0%": {
  12510. transform: "translate3d(0, 0, 0)",
  12511. transformOrigin: "0 0",
  12512. opacity: 1
  12513. },
  12514. "100%": {
  12515. transform: "translate3d(0, -100%, 0)",
  12516. transformOrigin: "0 0",
  12517. opacity: 0
  12518. }
  12519. }), i_e = {
  12520. "move-up": {
  12521. inKeyframes: n_e,
  12522. outKeyframes: r_e
  12523. },
  12524. "move-down": {
  12525. inKeyframes: Ybe,
  12526. outKeyframes: qbe
  12527. },
  12528. "move-left": {
  12529. inKeyframes: Kbe,
  12530. outKeyframes: Jbe
  12531. },
  12532. "move-right": {
  12533. inKeyframes: e_e,
  12534. outKeyframes: t_e
  12535. }
  12536. }, QN = (t, e) => {
  12537. const {
  12538. antCls: n
  12539. } = t, r = `${n}-${e}`, {
  12540. inKeyframes: i,
  12541. outKeyframes: a
  12542. } = i_e[e];
  12543. return [lx(r, i, a, t.motionDurationMid), {
  12544. [`
  12545. ${r}-enter,
  12546. ${r}-appear
  12547. `]: {
  12548. opacity: 0,
  12549. animationTimingFunction: t.motionEaseOutCirc
  12550. },
  12551. [`${r}-leave`]: {
  12552. animationTimingFunction: t.motionEaseInOutCirc
  12553. }
  12554. }];
  12555. }, PU = new Ot("antSlideUpIn", {
  12556. "0%": {
  12557. transform: "scaleY(0.8)",
  12558. transformOrigin: "0% 0%",
  12559. opacity: 0
  12560. },
  12561. "100%": {
  12562. transform: "scaleY(1)",
  12563. transformOrigin: "0% 0%",
  12564. opacity: 1
  12565. }
  12566. }), $U = new Ot("antSlideUpOut", {
  12567. "0%": {
  12568. transform: "scaleY(1)",
  12569. transformOrigin: "0% 0%",
  12570. opacity: 1
  12571. },
  12572. "100%": {
  12573. transform: "scaleY(0.8)",
  12574. transformOrigin: "0% 0%",
  12575. opacity: 0
  12576. }
  12577. }), AU = new Ot("antSlideDownIn", {
  12578. "0%": {
  12579. transform: "scaleY(0.8)",
  12580. transformOrigin: "100% 100%",
  12581. opacity: 0
  12582. },
  12583. "100%": {
  12584. transform: "scaleY(1)",
  12585. transformOrigin: "100% 100%",
  12586. opacity: 1
  12587. }
  12588. }), EU = new Ot("antSlideDownOut", {
  12589. "0%": {
  12590. transform: "scaleY(1)",
  12591. transformOrigin: "100% 100%",
  12592. opacity: 1
  12593. },
  12594. "100%": {
  12595. transform: "scaleY(0.8)",
  12596. transformOrigin: "100% 100%",
  12597. opacity: 0
  12598. }
  12599. }), a_e = new Ot("antSlideLeftIn", {
  12600. "0%": {
  12601. transform: "scaleX(0.8)",
  12602. transformOrigin: "0% 0%",
  12603. opacity: 0
  12604. },
  12605. "100%": {
  12606. transform: "scaleX(1)",
  12607. transformOrigin: "0% 0%",
  12608. opacity: 1
  12609. }
  12610. }), o_e = new Ot("antSlideLeftOut", {
  12611. "0%": {
  12612. transform: "scaleX(1)",
  12613. transformOrigin: "0% 0%",
  12614. opacity: 1
  12615. },
  12616. "100%": {
  12617. transform: "scaleX(0.8)",
  12618. transformOrigin: "0% 0%",
  12619. opacity: 0
  12620. }
  12621. }), s_e = new Ot("antSlideRightIn", {
  12622. "0%": {
  12623. transform: "scaleX(0.8)",
  12624. transformOrigin: "100% 0%",
  12625. opacity: 0
  12626. },
  12627. "100%": {
  12628. transform: "scaleX(1)",
  12629. transformOrigin: "100% 0%",
  12630. opacity: 1
  12631. }
  12632. }), l_e = new Ot("antSlideRightOut", {
  12633. "0%": {
  12634. transform: "scaleX(1)",
  12635. transformOrigin: "100% 0%",
  12636. opacity: 1
  12637. },
  12638. "100%": {
  12639. transform: "scaleX(0.8)",
  12640. transformOrigin: "100% 0%",
  12641. opacity: 0
  12642. }
  12643. }), u_e = {
  12644. "slide-up": {
  12645. inKeyframes: PU,
  12646. outKeyframes: $U
  12647. },
  12648. "slide-down": {
  12649. inKeyframes: AU,
  12650. outKeyframes: EU
  12651. },
  12652. "slide-left": {
  12653. inKeyframes: a_e,
  12654. outKeyframes: o_e
  12655. },
  12656. "slide-right": {
  12657. inKeyframes: s_e,
  12658. outKeyframes: l_e
  12659. }
  12660. }, Ch = (t, e) => {
  12661. const {
  12662. antCls: n
  12663. } = t, r = `${n}-${e}`, {
  12664. inKeyframes: i,
  12665. outKeyframes: a
  12666. } = u_e[e];
  12667. return [lx(r, i, a, t.motionDurationMid), {
  12668. [`
  12669. ${r}-enter,
  12670. ${r}-appear
  12671. `]: {
  12672. transform: "scale(0)",
  12673. transformOrigin: "0% 0%",
  12674. opacity: 0,
  12675. animationTimingFunction: t.motionEaseOutQuint
  12676. },
  12677. [`${r}-leave`]: {
  12678. animationTimingFunction: t.motionEaseInQuint
  12679. }
  12680. }];
  12681. }, qI = new Ot("antZoomIn", {
  12682. "0%": {
  12683. transform: "scale(0.2)",
  12684. opacity: 0
  12685. },
  12686. "100%": {
  12687. transform: "scale(1)",
  12688. opacity: 1
  12689. }
  12690. }), c_e = new Ot("antZoomOut", {
  12691. "0%": {
  12692. transform: "scale(1)"
  12693. },
  12694. "100%": {
  12695. transform: "scale(0.2)",
  12696. opacity: 0
  12697. }
  12698. }), HN = new Ot("antZoomBigIn", {
  12699. "0%": {
  12700. transform: "scale(0.8)",
  12701. opacity: 0
  12702. },
  12703. "100%": {
  12704. transform: "scale(1)",
  12705. opacity: 1
  12706. }
  12707. }), GN = new Ot("antZoomBigOut", {
  12708. "0%": {
  12709. transform: "scale(1)"
  12710. },
  12711. "100%": {
  12712. transform: "scale(0.8)",
  12713. opacity: 0
  12714. }
  12715. }), f_e = new Ot("antZoomUpIn", {
  12716. "0%": {
  12717. transform: "scale(0.8)",
  12718. transformOrigin: "50% 0%",
  12719. opacity: 0
  12720. },
  12721. "100%": {
  12722. transform: "scale(1)",
  12723. transformOrigin: "50% 0%"
  12724. }
  12725. }), d_e = new Ot("antZoomUpOut", {
  12726. "0%": {
  12727. transform: "scale(1)",
  12728. transformOrigin: "50% 0%"
  12729. },
  12730. "100%": {
  12731. transform: "scale(0.8)",
  12732. transformOrigin: "50% 0%",
  12733. opacity: 0
  12734. }
  12735. }), h_e = new Ot("antZoomLeftIn", {
  12736. "0%": {
  12737. transform: "scale(0.8)",
  12738. transformOrigin: "0% 50%",
  12739. opacity: 0
  12740. },
  12741. "100%": {
  12742. transform: "scale(1)",
  12743. transformOrigin: "0% 50%"
  12744. }
  12745. }), p_e = new Ot("antZoomLeftOut", {
  12746. "0%": {
  12747. transform: "scale(1)",
  12748. transformOrigin: "0% 50%"
  12749. },
  12750. "100%": {
  12751. transform: "scale(0.8)",
  12752. transformOrigin: "0% 50%",
  12753. opacity: 0
  12754. }
  12755. }), v_e = new Ot("antZoomRightIn", {
  12756. "0%": {
  12757. transform: "scale(0.8)",
  12758. transformOrigin: "100% 50%",
  12759. opacity: 0
  12760. },
  12761. "100%": {
  12762. transform: "scale(1)",
  12763. transformOrigin: "100% 50%"
  12764. }
  12765. }), g_e = new Ot("antZoomRightOut", {
  12766. "0%": {
  12767. transform: "scale(1)",
  12768. transformOrigin: "100% 50%"
  12769. },
  12770. "100%": {
  12771. transform: "scale(0.8)",
  12772. transformOrigin: "100% 50%",
  12773. opacity: 0
  12774. }
  12775. }), m_e = new Ot("antZoomDownIn", {
  12776. "0%": {
  12777. transform: "scale(0.8)",
  12778. transformOrigin: "50% 100%",
  12779. opacity: 0
  12780. },
  12781. "100%": {
  12782. transform: "scale(1)",
  12783. transformOrigin: "50% 100%"
  12784. }
  12785. }), y_e = new Ot("antZoomDownOut", {
  12786. "0%": {
  12787. transform: "scale(1)",
  12788. transformOrigin: "50% 100%"
  12789. },
  12790. "100%": {
  12791. transform: "scale(0.8)",
  12792. transformOrigin: "50% 100%",
  12793. opacity: 0
  12794. }
  12795. }), b_e = {
  12796. zoom: {
  12797. inKeyframes: qI,
  12798. outKeyframes: c_e
  12799. },
  12800. "zoom-big": {
  12801. inKeyframes: HN,
  12802. outKeyframes: GN
  12803. },
  12804. "zoom-big-fast": {
  12805. inKeyframes: HN,
  12806. outKeyframes: GN
  12807. },
  12808. "zoom-left": {
  12809. inKeyframes: h_e,
  12810. outKeyframes: p_e
  12811. },
  12812. "zoom-right": {
  12813. inKeyframes: v_e,
  12814. outKeyframes: g_e
  12815. },
  12816. "zoom-up": {
  12817. inKeyframes: f_e,
  12818. outKeyframes: d_e
  12819. },
  12820. "zoom-down": {
  12821. inKeyframes: m_e,
  12822. outKeyframes: y_e
  12823. }
  12824. }, ux = (t, e) => {
  12825. const {
  12826. antCls: n
  12827. } = t, r = `${n}-${e}`, {
  12828. inKeyframes: i,
  12829. outKeyframes: a
  12830. } = b_e[e];
  12831. return [lx(r, i, a, e === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
  12832. [`
  12833. ${r}-enter,
  12834. ${r}-appear
  12835. `]: {
  12836. transform: "scale(0)",
  12837. opacity: 0,
  12838. animationTimingFunction: t.motionEaseOutCirc,
  12839. "&-prepare": {
  12840. transform: "none"
  12841. }
  12842. },
  12843. [`${r}-leave`]: {
  12844. animationTimingFunction: t.motionEaseInOutCirc
  12845. }
  12846. }];
  12847. }, KI = (t) => ({
  12848. [t.componentCls]: {
  12849. // For common/openAnimation
  12850. [`${t.antCls}-motion-collapse-legacy`]: {
  12851. overflow: "hidden",
  12852. "&-active": {
  12853. transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
  12854. opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
  12855. }
  12856. },
  12857. [`${t.antCls}-motion-collapse`]: {
  12858. overflow: "hidden",
  12859. transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
  12860. opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
  12861. }
  12862. }
  12863. }), jN = (t) => {
  12864. const {
  12865. controlPaddingHorizontal: e
  12866. } = t;
  12867. return {
  12868. position: "relative",
  12869. display: "block",
  12870. minHeight: t.controlHeight,
  12871. padding: `${(t.controlHeight - t.fontSize * t.lineHeight) / 2}px ${e}px`,
  12872. color: t.colorText,
  12873. fontWeight: "normal",
  12874. fontSize: t.fontSize,
  12875. lineHeight: t.lineHeight,
  12876. boxSizing: "border-box"
  12877. };
  12878. }, __e = (t) => {
  12879. const {
  12880. antCls: e,
  12881. componentCls: n
  12882. } = t, r = `${n}-item`;
  12883. return [
  12884. {
  12885. [`${n}-dropdown`]: I(I({}, nn(t)), {
  12886. position: "absolute",
  12887. top: -9999,
  12888. zIndex: t.zIndexPopup,
  12889. boxSizing: "border-box",
  12890. padding: t.paddingXXS,
  12891. overflow: "hidden",
  12892. fontSize: t.fontSize,
  12893. // Fix select render lag of long text in chrome
  12894. // https://github.com/ant-design/ant-design/issues/11456
  12895. // https://github.com/ant-design/ant-design/issues/11843
  12896. fontVariant: "initial",
  12897. backgroundColor: t.colorBgElevated,
  12898. borderRadius: t.borderRadiusLG,
  12899. outline: "none",
  12900. boxShadow: t.boxShadowSecondary,
  12901. [`
  12902. &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
  12903. &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
  12904. `]: {
  12905. animationName: PU
  12906. },
  12907. [`
  12908. &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
  12909. &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft
  12910. `]: {
  12911. animationName: AU
  12912. },
  12913. [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
  12914. animationName: $U
  12915. },
  12916. [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
  12917. animationName: EU
  12918. },
  12919. "&-hidden": {
  12920. display: "none"
  12921. },
  12922. "&-empty": {
  12923. color: t.colorTextDisabled
  12924. },
  12925. // ========================= Options =========================
  12926. [`${r}-empty`]: I(I({}, jN(t)), {
  12927. color: t.colorTextDisabled
  12928. }),
  12929. [`${r}`]: I(I({}, jN(t)), {
  12930. cursor: "pointer",
  12931. transition: `background ${t.motionDurationSlow} ease`,
  12932. borderRadius: t.borderRadiusSM,
  12933. // =========== Group ============
  12934. "&-group": {
  12935. color: t.colorTextDescription,
  12936. fontSize: t.fontSizeSM,
  12937. cursor: "default"
  12938. },
  12939. // =========== Option ===========
  12940. "&-option": {
  12941. display: "flex",
  12942. "&-content": I({
  12943. flex: "auto"
  12944. }, mh),
  12945. "&-state": {
  12946. flex: "none"
  12947. },
  12948. [`&-active:not(${r}-option-disabled)`]: {
  12949. backgroundColor: t.controlItemBgHover
  12950. },
  12951. [`&-selected:not(${r}-option-disabled)`]: {
  12952. color: t.colorText,
  12953. fontWeight: t.fontWeightStrong,
  12954. backgroundColor: t.controlItemBgActive,
  12955. [`${r}-option-state`]: {
  12956. color: t.colorPrimary
  12957. }
  12958. },
  12959. "&-disabled": {
  12960. [`&${r}-option-selected`]: {
  12961. backgroundColor: t.colorBgContainerDisabled
  12962. },
  12963. color: t.colorTextDisabled,
  12964. cursor: "not-allowed"
  12965. },
  12966. "&-grouped": {
  12967. paddingInlineStart: t.controlPaddingHorizontal * 2
  12968. }
  12969. }
  12970. }),
  12971. // =========================== RTL ===========================
  12972. "&-rtl": {
  12973. direction: "rtl"
  12974. }
  12975. })
  12976. },
  12977. // Follow code may reuse in other components
  12978. Ch(t, "slide-up"),
  12979. Ch(t, "slide-down"),
  12980. QN(t, "move-up"),
  12981. QN(t, "move-down")
  12982. ];
  12983. }, Uf = 2;
  12984. function MU(t) {
  12985. let {
  12986. controlHeightSM: e,
  12987. controlHeight: n,
  12988. lineWidth: r
  12989. } = t;
  12990. const i = (n - e) / 2 - r, a = Math.ceil(i / 2);
  12991. return [i, a];
  12992. }
  12993. function bC(t, e) {
  12994. const {
  12995. componentCls: n,
  12996. iconCls: r
  12997. } = t, i = `${n}-selection-overflow`, a = t.controlHeightSM, [o] = MU(t), s = e ? `${n}-${e}` : "";
  12998. return {
  12999. [`${n}-multiple${s}`]: {
  13000. fontSize: t.fontSize,
  13001. /**
  13002. * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
  13003. * may update to redesign with its align logic.
  13004. */
  13005. // =========================== Overflow ===========================
  13006. [i]: {
  13007. position: "relative",
  13008. display: "flex",
  13009. flex: "auto",
  13010. flexWrap: "wrap",
  13011. maxWidth: "100%",
  13012. "&-item": {
  13013. flex: "none",
  13014. alignSelf: "center",
  13015. maxWidth: "100%",
  13016. display: "inline-flex"
  13017. }
  13018. },
  13019. // ========================= Selector =========================
  13020. [`${n}-selector`]: {
  13021. display: "flex",
  13022. flexWrap: "wrap",
  13023. alignItems: "center",
  13024. // Multiple is little different that horizontal is follow the vertical
  13025. padding: `${o - Uf}px ${Uf * 2}px`,
  13026. borderRadius: t.borderRadius,
  13027. [`${n}-show-search&`]: {
  13028. cursor: "text"
  13029. },
  13030. [`${n}-disabled&`]: {
  13031. background: t.colorBgContainerDisabled,
  13032. cursor: "not-allowed"
  13033. },
  13034. "&:after": {
  13035. display: "inline-block",
  13036. width: 0,
  13037. margin: `${Uf}px 0`,
  13038. lineHeight: `${a}px`,
  13039. content: '"\\a0"'
  13040. }
  13041. },
  13042. [`
  13043. &${n}-show-arrow ${n}-selector,
  13044. &${n}-allow-clear ${n}-selector
  13045. `]: {
  13046. paddingInlineEnd: t.fontSizeIcon + t.controlPaddingHorizontal
  13047. },
  13048. // ======================== Selections ========================
  13049. [`${n}-selection-item`]: {
  13050. position: "relative",
  13051. display: "flex",
  13052. flex: "none",
  13053. boxSizing: "border-box",
  13054. maxWidth: "100%",
  13055. height: a,
  13056. marginTop: Uf,
  13057. marginBottom: Uf,
  13058. lineHeight: `${a - t.lineWidth * 2}px`,
  13059. background: t.colorFillSecondary,
  13060. border: `${t.lineWidth}px solid ${t.colorSplit}`,
  13061. borderRadius: t.borderRadiusSM,
  13062. cursor: "default",
  13063. transition: `font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,
  13064. userSelect: "none",
  13065. marginInlineEnd: Uf * 2,
  13066. paddingInlineStart: t.paddingXS,
  13067. paddingInlineEnd: t.paddingXS / 2,
  13068. [`${n}-disabled&`]: {
  13069. color: t.colorTextDisabled,
  13070. borderColor: t.colorBorder,
  13071. cursor: "not-allowed"
  13072. },
  13073. // It's ok not to do this, but 24px makes bottom narrow in view should adjust
  13074. "&-content": {
  13075. display: "inline-block",
  13076. marginInlineEnd: t.paddingXS / 2,
  13077. overflow: "hidden",
  13078. whiteSpace: "pre",
  13079. textOverflow: "ellipsis"
  13080. },
  13081. "&-remove": I(I({}, ip()), {
  13082. display: "inline-block",
  13083. color: t.colorIcon,
  13084. fontWeight: "bold",
  13085. fontSize: 10,
  13086. lineHeight: "inherit",
  13087. cursor: "pointer",
  13088. [`> ${r}`]: {
  13089. verticalAlign: "-0.2em"
  13090. },
  13091. "&:hover": {
  13092. color: t.colorIconHover
  13093. }
  13094. })
  13095. },
  13096. // ========================== Input ==========================
  13097. [`${i}-item + ${i}-item`]: {
  13098. [`${n}-selection-search`]: {
  13099. marginInlineStart: 0
  13100. }
  13101. },
  13102. [`${n}-selection-search`]: {
  13103. display: "inline-flex",
  13104. position: "relative",
  13105. maxWidth: "100%",
  13106. marginInlineStart: t.inputPaddingHorizontalBase - o,
  13107. "\n &-input,\n &-mirror\n ": {
  13108. height: a,
  13109. fontFamily: t.fontFamily,
  13110. lineHeight: `${a}px`,
  13111. transition: `all ${t.motionDurationSlow}`
  13112. },
  13113. "&-input": {
  13114. width: "100%",
  13115. minWidth: 4.1
  13116. // fix search cursor missing
  13117. },
  13118. "&-mirror": {
  13119. position: "absolute",
  13120. top: 0,
  13121. insetInlineStart: 0,
  13122. insetInlineEnd: "auto",
  13123. zIndex: 999,
  13124. whiteSpace: "pre",
  13125. visibility: "hidden"
  13126. }
  13127. },
  13128. // ======================= Placeholder =======================
  13129. [`${n}-selection-placeholder `]: {
  13130. position: "absolute",
  13131. top: "50%",
  13132. insetInlineStart: t.inputPaddingHorizontalBase,
  13133. insetInlineEnd: t.inputPaddingHorizontalBase,
  13134. transform: "translateY(-50%)",
  13135. transition: `all ${t.motionDurationSlow}`
  13136. }
  13137. }
  13138. };
  13139. }
  13140. function O_e(t) {
  13141. const {
  13142. componentCls: e
  13143. } = t, n = Bt(t, {
  13144. controlHeight: t.controlHeightSM,
  13145. controlHeightSM: t.controlHeightXS,
  13146. borderRadius: t.borderRadiusSM,
  13147. borderRadiusSM: t.borderRadiusXS
  13148. }), [, r] = MU(t);
  13149. return [
  13150. bC(t),
  13151. // ======================== Small ========================
  13152. // Shared
  13153. bC(n, "sm"),
  13154. // Padding
  13155. {
  13156. [`${e}-multiple${e}-sm`]: {
  13157. [`${e}-selection-placeholder`]: {
  13158. insetInlineStart: t.controlPaddingHorizontalSM - t.lineWidth,
  13159. insetInlineEnd: "auto"
  13160. },
  13161. // https://github.com/ant-design/ant-design/issues/29559
  13162. [`${e}-selection-search`]: {
  13163. marginInlineStart: r
  13164. }
  13165. }
  13166. },
  13167. // ======================== Large ========================
  13168. // Shared
  13169. bC(Bt(t, {
  13170. fontSize: t.fontSizeLG,
  13171. controlHeight: t.controlHeightLG,
  13172. controlHeightSM: t.controlHeight,
  13173. borderRadius: t.borderRadiusLG,
  13174. borderRadiusSM: t.borderRadius
  13175. }), "lg")
  13176. ];
  13177. }
  13178. function _C(t, e) {
  13179. const {
  13180. componentCls: n,
  13181. inputPaddingHorizontalBase: r,
  13182. borderRadius: i
  13183. } = t, a = t.controlHeight - t.lineWidth * 2, o = Math.ceil(t.fontSize * 1.25), s = e ? `${n}-${e}` : "";
  13184. return {
  13185. [`${n}-single${s}`]: {
  13186. fontSize: t.fontSize,
  13187. // ========================= Selector =========================
  13188. [`${n}-selector`]: I(I({}, nn(t)), {
  13189. display: "flex",
  13190. borderRadius: i,
  13191. [`${n}-selection-search`]: {
  13192. position: "absolute",
  13193. top: 0,
  13194. insetInlineStart: r,
  13195. insetInlineEnd: r,
  13196. bottom: 0,
  13197. "&-input": {
  13198. width: "100%"
  13199. }
  13200. },
  13201. [`
  13202. ${n}-selection-item,
  13203. ${n}-selection-placeholder
  13204. `]: {
  13205. padding: 0,
  13206. lineHeight: `${a}px`,
  13207. transition: `all ${t.motionDurationSlow}`,
  13208. // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
  13209. "@supports (-moz-appearance: meterbar)": {
  13210. lineHeight: `${a}px`
  13211. }
  13212. },
  13213. [`${n}-selection-item`]: {
  13214. position: "relative",
  13215. userSelect: "none"
  13216. },
  13217. [`${n}-selection-placeholder`]: {
  13218. transition: "none",
  13219. pointerEvents: "none"
  13220. },
  13221. // For common baseline align
  13222. [[
  13223. "&:after",
  13224. /* For '' value baseline align */
  13225. `${n}-selection-item:after`,
  13226. /* For undefined value baseline align */
  13227. `${n}-selection-placeholder:after`
  13228. ].join(",")]: {
  13229. display: "inline-block",
  13230. width: 0,
  13231. visibility: "hidden",
  13232. content: '"\\a0"'
  13233. }
  13234. }),
  13235. [`
  13236. &${n}-show-arrow ${n}-selection-item,
  13237. &${n}-show-arrow ${n}-selection-placeholder
  13238. `]: {
  13239. paddingInlineEnd: o
  13240. },
  13241. // Opacity selection if open
  13242. [`&${n}-open ${n}-selection-item`]: {
  13243. color: t.colorTextPlaceholder
  13244. },
  13245. // ========================== Input ==========================
  13246. // We only change the style of non-customize input which is only support by `combobox` mode.
  13247. // Not customize
  13248. [`&:not(${n}-customize-input)`]: {
  13249. [`${n}-selector`]: {
  13250. width: "100%",
  13251. height: t.controlHeight,
  13252. padding: `0 ${r}px`,
  13253. [`${n}-selection-search-input`]: {
  13254. height: a
  13255. },
  13256. "&:after": {
  13257. lineHeight: `${a}px`
  13258. }
  13259. }
  13260. },
  13261. [`&${n}-customize-input`]: {
  13262. [`${n}-selector`]: {
  13263. "&:after": {
  13264. display: "none"
  13265. },
  13266. [`${n}-selection-search`]: {
  13267. position: "static",
  13268. width: "100%"
  13269. },
  13270. [`${n}-selection-placeholder`]: {
  13271. position: "absolute",
  13272. insetInlineStart: 0,
  13273. insetInlineEnd: 0,
  13274. padding: `0 ${r}px`,
  13275. "&:after": {
  13276. display: "none"
  13277. }
  13278. }
  13279. }
  13280. }
  13281. }
  13282. };
  13283. }
  13284. function S_e(t) {
  13285. const {
  13286. componentCls: e
  13287. } = t, n = t.controlPaddingHorizontalSM - t.lineWidth;
  13288. return [
  13289. _C(t),
  13290. // ======================== Small ========================
  13291. // Shared
  13292. _C(Bt(t, {
  13293. controlHeight: t.controlHeightSM,
  13294. borderRadius: t.borderRadiusSM
  13295. }), "sm"),
  13296. // padding
  13297. {
  13298. [`${e}-single${e}-sm`]: {
  13299. [`&:not(${e}-customize-input)`]: {
  13300. [`${e}-selection-search`]: {
  13301. insetInlineStart: n,
  13302. insetInlineEnd: n
  13303. },
  13304. [`${e}-selector`]: {
  13305. padding: `0 ${n}px`
  13306. },
  13307. // With arrow should provides `padding-right` to show the arrow
  13308. [`&${e}-show-arrow ${e}-selection-search`]: {
  13309. insetInlineEnd: n + t.fontSize * 1.5
  13310. },
  13311. [`
  13312. &${e}-show-arrow ${e}-selection-item,
  13313. &${e}-show-arrow ${e}-selection-placeholder
  13314. `]: {
  13315. paddingInlineEnd: t.fontSize * 1.5
  13316. }
  13317. }
  13318. }
  13319. },
  13320. // ======================== Large ========================
  13321. // Shared
  13322. _C(Bt(t, {
  13323. controlHeight: t.controlHeightLG,
  13324. fontSize: t.fontSizeLG,
  13325. borderRadius: t.borderRadiusLG
  13326. }), "lg")
  13327. ];
  13328. }
  13329. function x_e(t, e, n) {
  13330. const {
  13331. focusElCls: r,
  13332. focus: i,
  13333. borderElCls: a
  13334. } = n, o = a ? "> *" : "", s = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((l) => `&:${l} ${o}`).join(",");
  13335. return {
  13336. [`&-item:not(${e}-last-item)`]: {
  13337. marginInlineEnd: -t.lineWidth
  13338. },
  13339. "&-item": I(I({
  13340. [s]: {
  13341. zIndex: 2
  13342. }
  13343. }, r ? {
  13344. [`&${r}`]: {
  13345. zIndex: 2
  13346. }
  13347. } : {}), {
  13348. [`&[disabled] ${o}`]: {
  13349. zIndex: 0
  13350. }
  13351. })
  13352. };
  13353. }
  13354. function w_e(t, e, n) {
  13355. const {
  13356. borderElCls: r
  13357. } = n, i = r ? `> ${r}` : "";
  13358. return {
  13359. [`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]: {
  13360. borderRadius: 0
  13361. },
  13362. [`&-item:not(${e}-last-item)${e}-first-item`]: {
  13363. [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
  13364. borderStartEndRadius: 0,
  13365. borderEndEndRadius: 0
  13366. }
  13367. },
  13368. [`&-item:not(${e}-first-item)${e}-last-item`]: {
  13369. [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
  13370. borderStartStartRadius: 0,
  13371. borderEndStartRadius: 0
  13372. }
  13373. }
  13374. };
  13375. }
  13376. function cx(t) {
  13377. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
  13378. focus: !0
  13379. };
  13380. const {
  13381. componentCls: n
  13382. } = t, r = `${n}-compact`;
  13383. return {
  13384. [r]: I(I({}, x_e(t, r, e)), w_e(n, r, e))
  13385. };
  13386. }
  13387. const C_e = (t) => {
  13388. const {
  13389. componentCls: e
  13390. } = t;
  13391. return {
  13392. position: "relative",
  13393. backgroundColor: t.colorBgContainer,
  13394. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  13395. transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
  13396. input: {
  13397. cursor: "pointer"
  13398. },
  13399. [`${e}-show-search&`]: {
  13400. cursor: "text",
  13401. input: {
  13402. cursor: "auto",
  13403. color: "inherit"
  13404. }
  13405. },
  13406. [`${e}-disabled&`]: {
  13407. color: t.colorTextDisabled,
  13408. background: t.colorBgContainerDisabled,
  13409. cursor: "not-allowed",
  13410. [`${e}-multiple&`]: {
  13411. background: t.colorBgContainerDisabled
  13412. },
  13413. input: {
  13414. cursor: "not-allowed"
  13415. }
  13416. }
  13417. };
  13418. }, OC = function(t, e) {
  13419. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  13420. const {
  13421. componentCls: r,
  13422. borderHoverColor: i,
  13423. outlineColor: a,
  13424. antCls: o
  13425. } = e, s = n ? {
  13426. [`${r}-selector`]: {
  13427. borderColor: i
  13428. }
  13429. } : {};
  13430. return {
  13431. [t]: {
  13432. [`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]: I(I({}, s), {
  13433. [`${r}-focused& ${r}-selector`]: {
  13434. borderColor: i,
  13435. boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${a}`,
  13436. borderInlineEndWidth: `${e.controlLineWidth}px !important`,
  13437. outline: 0
  13438. },
  13439. [`&:hover ${r}-selector`]: {
  13440. borderColor: i,
  13441. borderInlineEndWidth: `${e.controlLineWidth}px !important`
  13442. }
  13443. })
  13444. }
  13445. };
  13446. }, T_e = (t) => {
  13447. const {
  13448. componentCls: e
  13449. } = t;
  13450. return {
  13451. [`${e}-selection-search-input`]: {
  13452. margin: 0,
  13453. padding: 0,
  13454. background: "transparent",
  13455. border: "none",
  13456. outline: "none",
  13457. appearance: "none",
  13458. "&::-webkit-search-cancel-button": {
  13459. display: "none",
  13460. "-webkit-appearance": "none"
  13461. }
  13462. }
  13463. };
  13464. }, P_e = (t) => {
  13465. const {
  13466. componentCls: e,
  13467. inputPaddingHorizontalBase: n,
  13468. iconCls: r
  13469. } = t;
  13470. return {
  13471. [e]: I(I({}, nn(t)), {
  13472. position: "relative",
  13473. display: "inline-block",
  13474. cursor: "pointer",
  13475. [`&:not(${e}-customize-input) ${e}-selector`]: I(I({}, C_e(t)), T_e(t)),
  13476. // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
  13477. // ...genHoverStyle(token),
  13478. // },
  13479. // ======================== Selection ========================
  13480. [`${e}-selection-item`]: I({
  13481. flex: 1,
  13482. fontWeight: "normal"
  13483. }, mh),
  13484. // ======================= Placeholder =======================
  13485. [`${e}-selection-placeholder`]: I(I({}, mh), {
  13486. flex: 1,
  13487. color: t.colorTextPlaceholder,
  13488. pointerEvents: "none"
  13489. }),
  13490. // ========================== Arrow ==========================
  13491. [`${e}-arrow`]: I(I({}, ip()), {
  13492. position: "absolute",
  13493. top: "50%",
  13494. insetInlineStart: "auto",
  13495. insetInlineEnd: n,
  13496. height: t.fontSizeIcon,
  13497. marginTop: -t.fontSizeIcon / 2,
  13498. color: t.colorTextQuaternary,
  13499. fontSize: t.fontSizeIcon,
  13500. lineHeight: 1,
  13501. textAlign: "center",
  13502. pointerEvents: "none",
  13503. display: "flex",
  13504. alignItems: "center",
  13505. [r]: {
  13506. verticalAlign: "top",
  13507. transition: `transform ${t.motionDurationSlow}`,
  13508. "> svg": {
  13509. verticalAlign: "top"
  13510. },
  13511. [`&:not(${e}-suffix)`]: {
  13512. pointerEvents: "auto"
  13513. }
  13514. },
  13515. [`${e}-disabled &`]: {
  13516. cursor: "not-allowed"
  13517. },
  13518. "> *:not(:last-child)": {
  13519. marginInlineEnd: 8
  13520. // FIXME: magic
  13521. }
  13522. }),
  13523. // ========================== Clear ==========================
  13524. [`${e}-clear`]: {
  13525. position: "absolute",
  13526. top: "50%",
  13527. insetInlineStart: "auto",
  13528. insetInlineEnd: n,
  13529. zIndex: 1,
  13530. display: "inline-block",
  13531. width: t.fontSizeIcon,
  13532. height: t.fontSizeIcon,
  13533. marginTop: -t.fontSizeIcon / 2,
  13534. color: t.colorTextQuaternary,
  13535. fontSize: t.fontSizeIcon,
  13536. fontStyle: "normal",
  13537. lineHeight: 1,
  13538. textAlign: "center",
  13539. textTransform: "none",
  13540. background: t.colorBgContainer,
  13541. cursor: "pointer",
  13542. opacity: 0,
  13543. transition: `color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,
  13544. textRendering: "auto",
  13545. "&:before": {
  13546. display: "block"
  13547. },
  13548. "&:hover": {
  13549. color: t.colorTextTertiary
  13550. }
  13551. },
  13552. "&:hover": {
  13553. [`${e}-clear`]: {
  13554. opacity: 1
  13555. }
  13556. }
  13557. }),
  13558. // ========================= Feedback ==========================
  13559. [`${e}-has-feedback`]: {
  13560. [`${e}-clear`]: {
  13561. insetInlineEnd: n + t.fontSize + t.paddingXXS
  13562. }
  13563. }
  13564. };
  13565. }, $_e = (t) => {
  13566. const {
  13567. componentCls: e
  13568. } = t;
  13569. return [
  13570. {
  13571. [e]: {
  13572. // ==================== BorderLess ====================
  13573. [`&-borderless ${e}-selector`]: {
  13574. backgroundColor: "transparent !important",
  13575. borderColor: "transparent !important",
  13576. boxShadow: "none !important"
  13577. },
  13578. // ==================== In Form ====================
  13579. [`&${e}-in-form-item`]: {
  13580. width: "100%"
  13581. }
  13582. }
  13583. },
  13584. // =====================================================
  13585. // == LTR ==
  13586. // =====================================================
  13587. // Base
  13588. P_e(t),
  13589. // Single
  13590. S_e(t),
  13591. // Multiple
  13592. O_e(t),
  13593. // Dropdown
  13594. __e(t),
  13595. // =====================================================
  13596. // == RTL ==
  13597. // =====================================================
  13598. {
  13599. [`${e}-rtl`]: {
  13600. direction: "rtl"
  13601. }
  13602. },
  13603. // =====================================================
  13604. // == Status ==
  13605. // =====================================================
  13606. OC(e, Bt(t, {
  13607. borderHoverColor: t.colorPrimaryHover,
  13608. outlineColor: t.controlOutline
  13609. })),
  13610. OC(`${e}-status-error`, Bt(t, {
  13611. borderHoverColor: t.colorErrorHover,
  13612. outlineColor: t.colorErrorOutline
  13613. }), !0),
  13614. OC(`${e}-status-warning`, Bt(t, {
  13615. borderHoverColor: t.colorWarningHover,
  13616. outlineColor: t.colorWarningOutline
  13617. }), !0),
  13618. // =====================================================
  13619. // == Space Compact ==
  13620. // =====================================================
  13621. cx(t, {
  13622. borderElCls: `${e}-selector`,
  13623. focusElCls: `${e}-focused`
  13624. })
  13625. ];
  13626. }, A_e = Sn("Select", (t, e) => {
  13627. let {
  13628. rootPrefixCls: n
  13629. } = e;
  13630. const r = Bt(t, {
  13631. rootPrefixCls: n,
  13632. inputPaddingHorizontalBase: t.paddingSM - 1
  13633. });
  13634. return [$_e(r)];
  13635. }, (t) => ({
  13636. zIndexPopup: t.zIndexPopupBase + 50
  13637. })), E_e = () => I(I({}, or(QZ(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  13638. value: gn([Array, Object, String, Number]),
  13639. defaultValue: gn([Array, Object, String, Number]),
  13640. notFoundContent: Y.any,
  13641. suffixIcon: Y.any,
  13642. itemIcon: Y.any,
  13643. size: hn(),
  13644. mode: hn(),
  13645. bordered: nt(!0),
  13646. transitionName: String,
  13647. choiceTransitionName: hn(""),
  13648. popupClassName: String,
  13649. /** @deprecated Please use `popupClassName` instead */
  13650. dropdownClassName: String,
  13651. placement: hn(),
  13652. status: hn(),
  13653. "onUpdate:value": tt()
  13654. }), ZN = "SECRET_COMBOBOX_MODE_DO_NOT_USE", ci = te({
  13655. compatConfig: {
  13656. MODE: 3
  13657. },
  13658. name: "ASelect",
  13659. Option: DI,
  13660. OptGroup: RI,
  13661. inheritAttrs: !1,
  13662. props: sr(E_e(), {
  13663. listHeight: 256,
  13664. listItemHeight: 24
  13665. }),
  13666. SECRET_COMBOBOX_MODE_DO_NOT_USE: ZN,
  13667. slots: Object,
  13668. setup(t, e) {
  13669. let {
  13670. attrs: n,
  13671. emit: r,
  13672. slots: i,
  13673. expose: a
  13674. } = e;
  13675. const o = U(), s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), c = () => {
  13676. var Q;
  13677. (Q = o.value) === null || Q === void 0 || Q.focus();
  13678. }, f = () => {
  13679. var Q;
  13680. (Q = o.value) === null || Q === void 0 || Q.blur();
  13681. }, d = (Q) => {
  13682. var Z;
  13683. (Z = o.value) === null || Z === void 0 || Z.scrollTo(Q);
  13684. }, h = L(() => {
  13685. const {
  13686. mode: Q
  13687. } = t;
  13688. if (Q !== "combobox")
  13689. return Q === ZN ? "combobox" : Q;
  13690. });
  13691. process.env.NODE_ENV !== "production" && Qi(!t.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
  13692. const {
  13693. prefixCls: p,
  13694. direction: v,
  13695. configProvider: g,
  13696. renderEmpty: m,
  13697. size: y,
  13698. getPrefixCls: b,
  13699. getPopupContainer: _,
  13700. disabled: O,
  13701. select: S
  13702. } = It("select", t), {
  13703. compactSize: x,
  13704. compactItemClassnames: C
  13705. } = sx(p, v), T = L(() => x.value || y.value), w = Ko(), P = L(() => {
  13706. var Q;
  13707. return (Q = O.value) !== null && Q !== void 0 ? Q : w.value;
  13708. }), [$, A] = A_e(p), D = L(() => b()), E = L(() => t.placement !== void 0 ? t.placement : v.value === "rtl" ? "bottomRight" : "bottomLeft"), R = L(() => es(D.value, pve(E.value), t.transitionName)), N = L(() => ye({
  13709. [`${p.value}-lg`]: T.value === "large",
  13710. [`${p.value}-sm`]: T.value === "small",
  13711. [`${p.value}-rtl`]: v.value === "rtl",
  13712. [`${p.value}-borderless`]: !t.bordered,
  13713. [`${p.value}-in-form-item`]: l.isFormItemInput
  13714. }, Is(p.value, u.value, l.hasFeedback), C.value, A.value)), V = function() {
  13715. for (var Q = arguments.length, Z = new Array(Q), ne = 0; ne < Q; ne++)
  13716. Z[ne] = arguments[ne];
  13717. r("update:value", Z[0]), r("change", ...Z), s.onFieldChange();
  13718. }, z = (Q) => {
  13719. r("blur", Q), s.onFieldBlur();
  13720. };
  13721. a({
  13722. blur: f,
  13723. focus: c,
  13724. scrollTo: d
  13725. });
  13726. const W = L(() => h.value === "multiple" || h.value === "tags"), F = L(() => t.showArrow !== void 0 ? t.showArrow : t.loading || !(W.value || h.value === "combobox"));
  13727. return () => {
  13728. var Q, Z, ne, ee;
  13729. const {
  13730. notFoundContent: oe,
  13731. listHeight: K = 256,
  13732. listItemHeight: ie = 24,
  13733. popupClassName: X,
  13734. dropdownClassName: H,
  13735. virtual: G,
  13736. dropdownMatchSelectWidth: re,
  13737. id: fe = s.id.value,
  13738. placeholder: de = (Q = i.placeholder) === null || Q === void 0 ? void 0 : Q.call(i),
  13739. showArrow: Ee
  13740. } = t, {
  13741. hasFeedback: $e,
  13742. feedbackIcon: Se
  13743. } = l;
  13744. let be;
  13745. oe !== void 0 ? be = oe : i.notFoundContent ? be = i.notFoundContent() : h.value === "combobox" ? be = null : be = (m == null ? void 0 : m("Select")) || M(cI, {
  13746. componentName: "Select"
  13747. }, null);
  13748. const {
  13749. suffixIcon: he,
  13750. itemIcon: Te,
  13751. removeIcon: ze,
  13752. clearIcon: ut
  13753. } = Eme(I(I({}, t), {
  13754. multiple: W.value,
  13755. prefixCls: p.value,
  13756. hasFeedback: $e,
  13757. feedbackIcon: Se,
  13758. showArrow: F.value
  13759. }), i), ct = or(t, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Dt = ye(X || H, {
  13760. [`${p.value}-dropdown-${v.value}`]: v.value === "rtl"
  13761. }, A.value);
  13762. return $(M(Lge, j(j(j({
  13763. ref: o,
  13764. virtual: G,
  13765. dropdownMatchSelectWidth: re
  13766. }, ct), n), {}, {
  13767. showSearch: (Z = t.showSearch) !== null && Z !== void 0 ? Z : (ne = S == null ? void 0 : S.value) === null || ne === void 0 ? void 0 : ne.showSearch,
  13768. placeholder: de,
  13769. listHeight: K,
  13770. listItemHeight: ie,
  13771. mode: h.value,
  13772. prefixCls: p.value,
  13773. direction: v.value,
  13774. inputIcon: he,
  13775. menuItemSelectedIcon: Te,
  13776. removeIcon: ze,
  13777. clearIcon: ut,
  13778. notFoundContent: be,
  13779. class: [N.value, n.class],
  13780. getPopupContainer: _ == null ? void 0 : _.value,
  13781. dropdownClassName: Dt,
  13782. onChange: V,
  13783. onBlur: z,
  13784. id: fe,
  13785. dropdownRender: ct.dropdownRender || i.dropdownRender,
  13786. transitionName: R.value,
  13787. children: (ee = i.default) === null || ee === void 0 ? void 0 : ee.call(i),
  13788. tagRender: t.tagRender || i.tagRender,
  13789. optionLabelRender: i.optionLabel,
  13790. maxTagPlaceholder: t.maxTagPlaceholder || i.maxTagPlaceholder,
  13791. showArrow: $e || Ee,
  13792. disabled: P.value
  13793. }), {
  13794. option: i.option
  13795. }));
  13796. };
  13797. }
  13798. });
  13799. ci.install = function(t) {
  13800. return t.component(ci.name, ci), t.component(ci.Option.displayName, ci.Option), t.component(ci.OptGroup.displayName, ci.OptGroup), t;
  13801. };
  13802. const M1 = ci.Option;
  13803. ci.OptGroup;
  13804. var M_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" };
  13805. function UN(t) {
  13806. for (var e = 1; e < arguments.length; e++) {
  13807. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13808. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13809. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13810. }))), r.forEach(function(i) {
  13811. I_e(t, i, n[i]);
  13812. });
  13813. }
  13814. return t;
  13815. }
  13816. function I_e(t, e, n) {
  13817. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13818. }
  13819. var JI = function(e, n) {
  13820. var r = UN({}, e, n.attrs);
  13821. return M(lt, UN({}, r, {
  13822. icon: M_e
  13823. }), null);
  13824. };
  13825. JI.displayName = "CheckCircleOutlined";
  13826. JI.inheritAttrs = !1;
  13827. var D_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" };
  13828. function XN(t) {
  13829. for (var e = 1; e < arguments.length; e++) {
  13830. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13831. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13832. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13833. }))), r.forEach(function(i) {
  13834. R_e(t, i, n[i]);
  13835. });
  13836. }
  13837. return t;
  13838. }
  13839. function R_e(t, e, n) {
  13840. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13841. }
  13842. var eD = function(e, n) {
  13843. var r = XN({}, e, n.attrs);
  13844. return M(lt, XN({}, r, {
  13845. icon: D_e
  13846. }), null);
  13847. };
  13848. eD.displayName = "ExclamationCircleOutlined";
  13849. eD.inheritAttrs = !1;
  13850. var k_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" };
  13851. function YN(t) {
  13852. for (var e = 1; e < arguments.length; e++) {
  13853. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13854. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13855. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13856. }))), r.forEach(function(i) {
  13857. L_e(t, i, n[i]);
  13858. });
  13859. }
  13860. return t;
  13861. }
  13862. function L_e(t, e, n) {
  13863. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13864. }
  13865. var fx = function(e, n) {
  13866. var r = YN({}, e, n.attrs);
  13867. return M(lt, YN({}, r, {
  13868. icon: k_e
  13869. }), null);
  13870. };
  13871. fx.displayName = "InfoCircleOutlined";
  13872. fx.inheritAttrs = !1;
  13873. var N_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" };
  13874. function qN(t) {
  13875. for (var e = 1; e < arguments.length; e++) {
  13876. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13877. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13878. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13879. }))), r.forEach(function(i) {
  13880. B_e(t, i, n[i]);
  13881. });
  13882. }
  13883. return t;
  13884. }
  13885. function B_e(t, e, n) {
  13886. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13887. }
  13888. var tD = function(e, n) {
  13889. var r = qN({}, e, n.attrs);
  13890. return M(lt, qN({}, r, {
  13891. icon: N_e
  13892. }), null);
  13893. };
  13894. tD.displayName = "CloseCircleOutlined";
  13895. tD.inheritAttrs = !1;
  13896. 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 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" };
  13897. function KN(t) {
  13898. for (var e = 1; e < arguments.length; e++) {
  13899. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13900. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13901. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13902. }))), r.forEach(function(i) {
  13903. V_e(t, i, n[i]);
  13904. });
  13905. }
  13906. return t;
  13907. }
  13908. function V_e(t, e, n) {
  13909. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13910. }
  13911. var Ou = function(e, n) {
  13912. var r = KN({}, e, n.attrs);
  13913. return M(lt, KN({}, r, {
  13914. icon: z_e
  13915. }), null);
  13916. };
  13917. Ou.displayName = "CheckCircleFilled";
  13918. Ou.inheritAttrs = !1;
  13919. var F_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" };
  13920. function JN(t) {
  13921. for (var e = 1; e < arguments.length; e++) {
  13922. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13923. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13924. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13925. }))), r.forEach(function(i) {
  13926. W_e(t, i, n[i]);
  13927. });
  13928. }
  13929. return t;
  13930. }
  13931. function W_e(t, e, n) {
  13932. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13933. }
  13934. var Su = function(e, n) {
  13935. var r = JN({}, e, n.attrs);
  13936. return M(lt, JN({}, r, {
  13937. icon: F_e
  13938. }), null);
  13939. };
  13940. Su.displayName = "ExclamationCircleFilled";
  13941. Su.inheritAttrs = !1;
  13942. 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 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" };
  13943. function e5(t) {
  13944. for (var e = 1; e < arguments.length; e++) {
  13945. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13946. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13947. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13948. }))), r.forEach(function(i) {
  13949. H_e(t, i, n[i]);
  13950. });
  13951. }
  13952. return t;
  13953. }
  13954. function H_e(t, e, n) {
  13955. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13956. }
  13957. var If = function(e, n) {
  13958. var r = e5({}, e, n.attrs);
  13959. return M(lt, e5({}, r, {
  13960. icon: Q_e
  13961. }), null);
  13962. };
  13963. If.displayName = "InfoCircleFilled";
  13964. If.inheritAttrs = !1;
  13965. const $y = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], G_e = (t) => ({
  13966. xs: `(max-width: ${t.screenXSMax}px)`,
  13967. sm: `(min-width: ${t.screenSM}px)`,
  13968. md: `(min-width: ${t.screenMD}px)`,
  13969. lg: `(min-width: ${t.screenLG}px)`,
  13970. xl: `(min-width: ${t.screenXL}px)`,
  13971. xxl: `(min-width: ${t.screenXXL}px)`,
  13972. xxxl: `{min-width: ${t.screenXXXL}px}`
  13973. });
  13974. function j_e() {
  13975. const [, t] = ap();
  13976. return L(() => {
  13977. const e = G_e(t.value), n = /* @__PURE__ */ new Map();
  13978. let r = -1, i = {};
  13979. return {
  13980. matchHandlers: {},
  13981. dispatch(a) {
  13982. return i = a, n.forEach((o) => o(i)), n.size >= 1;
  13983. },
  13984. subscribe(a) {
  13985. return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
  13986. },
  13987. unsubscribe(a) {
  13988. n.delete(a), n.size || this.unregister();
  13989. },
  13990. unregister() {
  13991. Object.keys(e).forEach((a) => {
  13992. const o = e[a], s = this.matchHandlers[o];
  13993. s == null || s.mql.removeListener(s == null ? void 0 : s.listener);
  13994. }), n.clear();
  13995. },
  13996. register() {
  13997. Object.keys(e).forEach((a) => {
  13998. const o = e[a], s = (u) => {
  13999. let {
  14000. matches: c
  14001. } = u;
  14002. this.dispatch(I(I({}, i), {
  14003. [a]: c
  14004. }));
  14005. }, l = window.matchMedia(o);
  14006. l.addListener(s), this.matchHandlers[o] = {
  14007. mql: l,
  14008. listener: s
  14009. }, s(l);
  14010. });
  14011. },
  14012. responsiveMap: e
  14013. };
  14014. });
  14015. }
  14016. const qi = {
  14017. adjustX: 1,
  14018. adjustY: 1
  14019. }, Ki = [0, 0], IU = {
  14020. left: {
  14021. points: ["cr", "cl"],
  14022. overflow: qi,
  14023. offset: [-4, 0],
  14024. targetOffset: Ki
  14025. },
  14026. right: {
  14027. points: ["cl", "cr"],
  14028. overflow: qi,
  14029. offset: [4, 0],
  14030. targetOffset: Ki
  14031. },
  14032. top: {
  14033. points: ["bc", "tc"],
  14034. overflow: qi,
  14035. offset: [0, -4],
  14036. targetOffset: Ki
  14037. },
  14038. bottom: {
  14039. points: ["tc", "bc"],
  14040. overflow: qi,
  14041. offset: [0, 4],
  14042. targetOffset: Ki
  14043. },
  14044. topLeft: {
  14045. points: ["bl", "tl"],
  14046. overflow: qi,
  14047. offset: [0, -4],
  14048. targetOffset: Ki
  14049. },
  14050. leftTop: {
  14051. points: ["tr", "tl"],
  14052. overflow: qi,
  14053. offset: [-4, 0],
  14054. targetOffset: Ki
  14055. },
  14056. topRight: {
  14057. points: ["br", "tr"],
  14058. overflow: qi,
  14059. offset: [0, -4],
  14060. targetOffset: Ki
  14061. },
  14062. rightTop: {
  14063. points: ["tl", "tr"],
  14064. overflow: qi,
  14065. offset: [4, 0],
  14066. targetOffset: Ki
  14067. },
  14068. bottomRight: {
  14069. points: ["tr", "br"],
  14070. overflow: qi,
  14071. offset: [0, 4],
  14072. targetOffset: Ki
  14073. },
  14074. rightBottom: {
  14075. points: ["bl", "br"],
  14076. overflow: qi,
  14077. offset: [4, 0],
  14078. targetOffset: Ki
  14079. },
  14080. bottomLeft: {
  14081. points: ["tl", "bl"],
  14082. overflow: qi,
  14083. offset: [0, 4],
  14084. targetOffset: Ki
  14085. },
  14086. leftBottom: {
  14087. points: ["br", "bl"],
  14088. overflow: qi,
  14089. offset: [-4, 0],
  14090. targetOffset: Ki
  14091. }
  14092. }, Z_e = {
  14093. prefixCls: String,
  14094. id: String,
  14095. overlayInnerStyle: Y.any
  14096. }, U_e = te({
  14097. compatConfig: {
  14098. MODE: 3
  14099. },
  14100. name: "TooltipContent",
  14101. props: Z_e,
  14102. setup(t, e) {
  14103. let {
  14104. slots: n
  14105. } = e;
  14106. return () => {
  14107. var r;
  14108. return M("div", {
  14109. class: `${t.prefixCls}-inner`,
  14110. id: t.id,
  14111. role: "tooltip",
  14112. style: t.overlayInnerStyle
  14113. }, [(r = n.overlay) === null || r === void 0 ? void 0 : r.call(n)]);
  14114. };
  14115. }
  14116. });
  14117. var X_e = function(t, e) {
  14118. var n = {};
  14119. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  14120. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  14121. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  14122. return n;
  14123. };
  14124. function t5() {
  14125. }
  14126. const Y_e = te({
  14127. compatConfig: {
  14128. MODE: 3
  14129. },
  14130. name: "Tooltip",
  14131. inheritAttrs: !1,
  14132. props: {
  14133. trigger: Y.any.def(["hover"]),
  14134. defaultVisible: {
  14135. type: Boolean,
  14136. default: void 0
  14137. },
  14138. visible: {
  14139. type: Boolean,
  14140. default: void 0
  14141. },
  14142. placement: Y.string.def("right"),
  14143. transitionName: String,
  14144. animation: Y.any,
  14145. afterVisibleChange: Y.func.def(() => {
  14146. }),
  14147. overlayStyle: {
  14148. type: Object,
  14149. default: void 0
  14150. },
  14151. overlayClassName: String,
  14152. prefixCls: Y.string.def("rc-tooltip"),
  14153. mouseEnterDelay: Y.number.def(0.1),
  14154. mouseLeaveDelay: Y.number.def(0.1),
  14155. getPopupContainer: Function,
  14156. destroyTooltipOnHide: {
  14157. type: Boolean,
  14158. default: !1
  14159. },
  14160. align: Y.object.def(() => ({})),
  14161. arrowContent: Y.any.def(null),
  14162. tipId: String,
  14163. builtinPlacements: Y.object,
  14164. overlayInnerStyle: {
  14165. type: Object,
  14166. default: void 0
  14167. },
  14168. popupVisible: {
  14169. type: Boolean,
  14170. default: void 0
  14171. },
  14172. onVisibleChange: Function,
  14173. onPopupAlign: Function,
  14174. arrow: {
  14175. type: Boolean,
  14176. default: !0
  14177. }
  14178. },
  14179. setup(t, e) {
  14180. let {
  14181. slots: n,
  14182. attrs: r,
  14183. expose: i
  14184. } = e;
  14185. const a = ae(), o = () => {
  14186. const {
  14187. prefixCls: c,
  14188. tipId: f,
  14189. overlayInnerStyle: d
  14190. } = t;
  14191. return [t.arrow ? M("div", {
  14192. class: `${c}-arrow`,
  14193. key: "arrow"
  14194. }, [IS(n, t, "arrowContent")]) : null, M(U_e, {
  14195. key: "content",
  14196. prefixCls: c,
  14197. id: f,
  14198. overlayInnerStyle: d
  14199. }, {
  14200. overlay: n.overlay
  14201. })];
  14202. };
  14203. i({
  14204. getPopupDomNode: () => a.value.getPopupDomNode(),
  14205. triggerDOM: a,
  14206. forcePopupAlign: () => {
  14207. var c;
  14208. return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
  14209. }
  14210. });
  14211. const l = ae(!1), u = ae(!1);
  14212. return ht(() => {
  14213. const {
  14214. destroyTooltipOnHide: c
  14215. } = t;
  14216. if (typeof c == "boolean")
  14217. l.value = c;
  14218. else if (c && typeof c == "object") {
  14219. const {
  14220. keepParent: f
  14221. } = c;
  14222. l.value = f === !0, u.value = f === !1;
  14223. }
  14224. }), () => {
  14225. const {
  14226. overlayClassName: c,
  14227. trigger: f,
  14228. mouseEnterDelay: d,
  14229. mouseLeaveDelay: h,
  14230. overlayStyle: p,
  14231. prefixCls: v,
  14232. afterVisibleChange: g,
  14233. transitionName: m,
  14234. animation: y,
  14235. placement: b,
  14236. align: _,
  14237. destroyTooltipOnHide: O,
  14238. defaultVisible: S
  14239. } = t, x = X_e(t, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), C = I({}, x);
  14240. t.visible !== void 0 && (C.popupVisible = t.visible);
  14241. const T = I(I(I({
  14242. popupClassName: c,
  14243. prefixCls: v,
  14244. action: f,
  14245. builtinPlacements: IU,
  14246. popupPlacement: b,
  14247. popupAlign: _,
  14248. afterPopupVisibleChange: g,
  14249. popupTransitionName: m,
  14250. popupAnimation: y,
  14251. defaultPopupVisible: S,
  14252. destroyPopupOnHide: l.value,
  14253. autoDestroy: u.value,
  14254. mouseLeaveDelay: h,
  14255. popupStyle: p,
  14256. mouseEnterDelay: d
  14257. }, C), r), {
  14258. onPopupVisibleChange: t.onVisibleChange || t5,
  14259. onPopupAlign: t.onPopupAlign || t5,
  14260. ref: a,
  14261. arrow: !!t.arrow,
  14262. popup: o()
  14263. });
  14264. return M(KS, T, {
  14265. default: n.default
  14266. });
  14267. };
  14268. }
  14269. }), q_e = () => ({
  14270. trigger: [String, Array],
  14271. open: {
  14272. type: Boolean,
  14273. default: void 0
  14274. },
  14275. /** @deprecated Please use `open` instead. */
  14276. visible: {
  14277. type: Boolean,
  14278. default: void 0
  14279. },
  14280. placement: String,
  14281. color: String,
  14282. transitionName: String,
  14283. overlayStyle: $t(),
  14284. overlayInnerStyle: $t(),
  14285. overlayClassName: String,
  14286. openClassName: String,
  14287. prefixCls: String,
  14288. mouseEnterDelay: Number,
  14289. mouseLeaveDelay: Number,
  14290. getPopupContainer: Function,
  14291. /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  14292. arrowPointAtCenter: {
  14293. type: Boolean,
  14294. default: void 0
  14295. },
  14296. arrow: {
  14297. type: [Boolean, Object],
  14298. default: !0
  14299. },
  14300. autoAdjustOverflow: {
  14301. type: [Boolean, Object],
  14302. default: void 0
  14303. },
  14304. destroyTooltipOnHide: {
  14305. type: Boolean,
  14306. default: void 0
  14307. },
  14308. align: $t(),
  14309. builtinPlacements: $t(),
  14310. children: Array,
  14311. /** @deprecated Please use `onOpenChange` instead. */
  14312. onVisibleChange: Function,
  14313. /** @deprecated Please use `onUpdate:open` instead. */
  14314. "onUpdate:visible": Function,
  14315. onOpenChange: Function,
  14316. "onUpdate:open": Function
  14317. }), K_e = {
  14318. adjustX: 1,
  14319. adjustY: 1
  14320. }, n5 = {
  14321. adjustX: 0,
  14322. adjustY: 0
  14323. }, J_e = [0, 0];
  14324. function r5(t) {
  14325. return typeof t == "boolean" ? t ? K_e : n5 : I(I({}, n5), t);
  14326. }
  14327. function e1e(t) {
  14328. const {
  14329. arrowWidth: e = 4,
  14330. horizontalArrowShift: n = 16,
  14331. verticalArrowShift: r = 8,
  14332. autoAdjustOverflow: i,
  14333. arrowPointAtCenter: a
  14334. } = t, o = {
  14335. left: {
  14336. points: ["cr", "cl"],
  14337. offset: [-4, 0]
  14338. },
  14339. right: {
  14340. points: ["cl", "cr"],
  14341. offset: [4, 0]
  14342. },
  14343. top: {
  14344. points: ["bc", "tc"],
  14345. offset: [0, -4]
  14346. },
  14347. bottom: {
  14348. points: ["tc", "bc"],
  14349. offset: [0, 4]
  14350. },
  14351. topLeft: {
  14352. points: ["bl", "tc"],
  14353. offset: [-(n + e), -4]
  14354. },
  14355. leftTop: {
  14356. points: ["tr", "cl"],
  14357. offset: [-4, -(r + e)]
  14358. },
  14359. topRight: {
  14360. points: ["br", "tc"],
  14361. offset: [n + e, -4]
  14362. },
  14363. rightTop: {
  14364. points: ["tl", "cr"],
  14365. offset: [4, -(r + e)]
  14366. },
  14367. bottomRight: {
  14368. points: ["tr", "bc"],
  14369. offset: [n + e, 4]
  14370. },
  14371. rightBottom: {
  14372. points: ["bl", "cr"],
  14373. offset: [4, r + e]
  14374. },
  14375. bottomLeft: {
  14376. points: ["tl", "bc"],
  14377. offset: [-(n + e), 4]
  14378. },
  14379. leftBottom: {
  14380. points: ["br", "cl"],
  14381. offset: [-4, r + e]
  14382. }
  14383. };
  14384. return Object.keys(o).forEach((s) => {
  14385. o[s] = a ? I(I({}, o[s]), {
  14386. overflow: r5(i),
  14387. targetOffset: J_e
  14388. }) : I(I({}, IU[s]), {
  14389. overflow: r5(i)
  14390. }), o[s].ignoreShake = !0;
  14391. }), o;
  14392. }
  14393. function DU() {
  14394. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  14395. for (let e = 0, n = t.length; e < n; e++)
  14396. if (t[e] !== void 0)
  14397. return t[e];
  14398. }
  14399. const t1e = b1.map((t) => `${t}-inverse`);
  14400. function n1e(t) {
  14401. return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...t1e, ...b1].includes(t) : b1.includes(t);
  14402. }
  14403. function r1e(t, e) {
  14404. const n = n1e(e), r = ye({
  14405. [`${t}-${e}`]: e && n
  14406. }), i = {}, a = {};
  14407. return e && !n && (i.background = e, a["--antd-arrow-background-color"] = e), {
  14408. className: r,
  14409. overlayStyle: i,
  14410. arrowStyle: a
  14411. };
  14412. }
  14413. function Ay(t) {
  14414. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  14415. return t.map((n) => `${e}${n}`).join(",");
  14416. }
  14417. const RU = 8;
  14418. function i1e(t) {
  14419. const e = RU, {
  14420. sizePopupArrow: n,
  14421. contentRadius: r,
  14422. borderRadiusOuter: i,
  14423. limitVerticalRadius: a
  14424. } = t, o = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), s = (r > 12 ? r + 2 : 12) - o, l = a ? e - o : s;
  14425. return {
  14426. dropdownArrowOffset: s,
  14427. dropdownArrowOffsetVertical: l
  14428. };
  14429. }
  14430. function a1e(t, e) {
  14431. const {
  14432. componentCls: n,
  14433. sizePopupArrow: r,
  14434. marginXXS: i,
  14435. borderRadiusXS: a,
  14436. borderRadiusOuter: o,
  14437. boxShadowPopoverArrow: s
  14438. } = t, {
  14439. colorBg: l,
  14440. showArrowCls: u,
  14441. contentRadius: c = t.borderRadiusLG,
  14442. limitVerticalRadius: f
  14443. } = e, {
  14444. dropdownArrowOffsetVertical: d,
  14445. dropdownArrowOffset: h
  14446. } = i1e({
  14447. sizePopupArrow: r,
  14448. contentRadius: c,
  14449. borderRadiusOuter: o,
  14450. limitVerticalRadius: f
  14451. }), p = r / 2 + i;
  14452. return {
  14453. [n]: {
  14454. // ============================ Basic ============================
  14455. [`${n}-arrow`]: [I(I({
  14456. position: "absolute",
  14457. zIndex: 1,
  14458. display: "block"
  14459. }, pfe(r, a, o, l, s)), {
  14460. "&:before": {
  14461. background: l
  14462. }
  14463. })],
  14464. // ========================== Placement ==========================
  14465. // Here handle the arrow position and rotate stuff
  14466. // >>>>> Top
  14467. [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
  14468. bottom: 0,
  14469. transform: "translateY(100%) rotate(180deg)"
  14470. },
  14471. [`&-placement-top ${n}-arrow`]: {
  14472. left: {
  14473. _skip_check_: !0,
  14474. value: "50%"
  14475. },
  14476. transform: "translateX(-50%) translateY(100%) rotate(180deg)"
  14477. },
  14478. [`&-placement-topLeft ${n}-arrow`]: {
  14479. left: {
  14480. _skip_check_: !0,
  14481. value: h
  14482. }
  14483. },
  14484. [`&-placement-topRight ${n}-arrow`]: {
  14485. right: {
  14486. _skip_check_: !0,
  14487. value: h
  14488. }
  14489. },
  14490. // >>>>> Bottom
  14491. [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
  14492. top: 0,
  14493. transform: "translateY(-100%)"
  14494. },
  14495. [`&-placement-bottom ${n}-arrow`]: {
  14496. left: {
  14497. _skip_check_: !0,
  14498. value: "50%"
  14499. },
  14500. transform: "translateX(-50%) translateY(-100%)"
  14501. },
  14502. [`&-placement-bottomLeft ${n}-arrow`]: {
  14503. left: {
  14504. _skip_check_: !0,
  14505. value: h
  14506. }
  14507. },
  14508. [`&-placement-bottomRight ${n}-arrow`]: {
  14509. right: {
  14510. _skip_check_: !0,
  14511. value: h
  14512. }
  14513. },
  14514. // >>>>> Left
  14515. [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
  14516. right: {
  14517. _skip_check_: !0,
  14518. value: 0
  14519. },
  14520. transform: "translateX(100%) rotate(90deg)"
  14521. },
  14522. [`&-placement-left ${n}-arrow`]: {
  14523. top: {
  14524. _skip_check_: !0,
  14525. value: "50%"
  14526. },
  14527. transform: "translateY(-50%) translateX(100%) rotate(90deg)"
  14528. },
  14529. [`&-placement-leftTop ${n}-arrow`]: {
  14530. top: d
  14531. },
  14532. [`&-placement-leftBottom ${n}-arrow`]: {
  14533. bottom: d
  14534. },
  14535. // >>>>> Right
  14536. [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
  14537. left: {
  14538. _skip_check_: !0,
  14539. value: 0
  14540. },
  14541. transform: "translateX(-100%) rotate(-90deg)"
  14542. },
  14543. [`&-placement-right ${n}-arrow`]: {
  14544. top: {
  14545. _skip_check_: !0,
  14546. value: "50%"
  14547. },
  14548. transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
  14549. },
  14550. [`&-placement-rightTop ${n}-arrow`]: {
  14551. top: d
  14552. },
  14553. [`&-placement-rightBottom ${n}-arrow`]: {
  14554. bottom: d
  14555. },
  14556. // =========================== Offset ============================
  14557. // Offset the popover to account for the dropdown arrow
  14558. // >>>>> Top
  14559. [Ay(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14560. paddingBottom: p
  14561. },
  14562. // >>>>> Bottom
  14563. [Ay(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14564. paddingTop: p
  14565. },
  14566. // >>>>> Left
  14567. [Ay(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14568. paddingRight: {
  14569. _skip_check_: !0,
  14570. value: p
  14571. }
  14572. },
  14573. // >>>>> Right
  14574. [Ay(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14575. paddingLeft: {
  14576. _skip_check_: !0,
  14577. value: p
  14578. }
  14579. }
  14580. }
  14581. };
  14582. }
  14583. const o1e = (t) => {
  14584. const {
  14585. componentCls: e,
  14586. // ant-tooltip
  14587. tooltipMaxWidth: n,
  14588. tooltipColor: r,
  14589. tooltipBg: i,
  14590. tooltipBorderRadius: a,
  14591. zIndexPopup: o,
  14592. controlHeight: s,
  14593. boxShadowSecondary: l,
  14594. paddingSM: u,
  14595. paddingXS: c,
  14596. tooltipRadiusOuter: f
  14597. } = t;
  14598. return [
  14599. {
  14600. [e]: I(I(I(I({}, nn(t)), {
  14601. position: "absolute",
  14602. zIndex: o,
  14603. display: "block",
  14604. "&": [{
  14605. width: "max-content"
  14606. }, {
  14607. width: "intrinsic"
  14608. }],
  14609. maxWidth: n,
  14610. visibility: "visible",
  14611. "&-hidden": {
  14612. display: "none"
  14613. },
  14614. "--antd-arrow-background-color": i,
  14615. // Wrapper for the tooltip content
  14616. [`${e}-inner`]: {
  14617. minWidth: s,
  14618. minHeight: s,
  14619. padding: `${u / 2}px ${c}px`,
  14620. color: r,
  14621. textAlign: "start",
  14622. textDecoration: "none",
  14623. wordWrap: "break-word",
  14624. backgroundColor: i,
  14625. borderRadius: a,
  14626. boxShadow: l
  14627. },
  14628. // Limit left and right placement radius
  14629. [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
  14630. [`${e}-inner`]: {
  14631. borderRadius: Math.min(a, RU)
  14632. }
  14633. },
  14634. [`${e}-content`]: {
  14635. position: "relative"
  14636. }
  14637. }), vfe(t, (d, h) => {
  14638. let {
  14639. darkColor: p
  14640. } = h;
  14641. return {
  14642. [`&${e}-${d}`]: {
  14643. [`${e}-inner`]: {
  14644. backgroundColor: p
  14645. },
  14646. [`${e}-arrow`]: {
  14647. "--antd-arrow-background-color": p
  14648. }
  14649. }
  14650. };
  14651. })), {
  14652. // RTL
  14653. "&-rtl": {
  14654. direction: "rtl"
  14655. }
  14656. })
  14657. },
  14658. // Arrow Style
  14659. a1e(Bt(t, {
  14660. borderRadiusOuter: f
  14661. }), {
  14662. colorBg: "var(--antd-arrow-background-color)",
  14663. showArrowCls: "",
  14664. contentRadius: a,
  14665. limitVerticalRadius: !0
  14666. }),
  14667. // Pure Render
  14668. {
  14669. [`${e}-pure`]: {
  14670. position: "relative",
  14671. maxWidth: "none"
  14672. }
  14673. }
  14674. ];
  14675. }, s1e = (t, e) => Sn("Tooltip", (r) => {
  14676. if ((e == null ? void 0 : e.value) === !1)
  14677. return [];
  14678. const {
  14679. borderRadius: i,
  14680. colorTextLightSolid: a,
  14681. colorBgDefault: o,
  14682. borderRadiusOuter: s
  14683. } = r, l = Bt(r, {
  14684. // default variables
  14685. tooltipMaxWidth: 250,
  14686. tooltipColor: a,
  14687. tooltipBorderRadius: i,
  14688. tooltipBg: o,
  14689. tooltipRadiusOuter: s > 4 ? 4 : s
  14690. });
  14691. return [o1e(l), ux(r, "zoom-big-fast")];
  14692. }, (r) => {
  14693. let {
  14694. zIndexPopupBase: i,
  14695. colorBgSpotlight: a
  14696. } = r;
  14697. return {
  14698. zIndexPopup: i + 70,
  14699. colorBgDefault: a
  14700. };
  14701. })(t), l1e = (t, e) => {
  14702. const n = {}, r = I({}, t);
  14703. return e.forEach((i) => {
  14704. t && i in t && (n[i] = t[i], delete r[i]);
  14705. }), {
  14706. picked: n,
  14707. omitted: r
  14708. };
  14709. }, kU = () => I(I({}, q_e()), {
  14710. title: Y.any
  14711. }), u1e = te({
  14712. compatConfig: {
  14713. MODE: 3
  14714. },
  14715. name: "ATooltip",
  14716. inheritAttrs: !1,
  14717. props: sr(kU(), {
  14718. trigger: "hover",
  14719. align: {},
  14720. placement: "top",
  14721. mouseEnterDelay: 0.1,
  14722. mouseLeaveDelay: 0.1,
  14723. arrowPointAtCenter: !1,
  14724. autoAdjustOverflow: !0
  14725. }),
  14726. slots: Object,
  14727. // emits: ['update:visible', 'visibleChange'],
  14728. setup(t, e) {
  14729. let {
  14730. slots: n,
  14731. emit: r,
  14732. attrs: i,
  14733. expose: a
  14734. } = e;
  14735. process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((w) => {
  14736. let [P, $] = w;
  14737. Xr(t[P] === void 0, "Tooltip", `\`${P}\` is deprecated, please use \`${$}\` instead.`);
  14738. });
  14739. const {
  14740. prefixCls: o,
  14741. getPopupContainer: s,
  14742. direction: l,
  14743. rootPrefixCls: u
  14744. } = It("tooltip", t), c = L(() => {
  14745. var w;
  14746. return (w = t.open) !== null && w !== void 0 ? w : t.visible;
  14747. }), f = U(DU([t.open, t.visible])), d = U();
  14748. let h;
  14749. se(c, (w) => {
  14750. xt.cancel(h), h = xt(() => {
  14751. f.value = !!w;
  14752. });
  14753. });
  14754. const p = () => {
  14755. var w;
  14756. const P = (w = t.title) !== null && w !== void 0 ? w : n.title;
  14757. return !P && P !== 0;
  14758. }, v = (w) => {
  14759. const P = p();
  14760. c.value === void 0 && (f.value = P ? !1 : w), P || (r("update:visible", w), r("visibleChange", w), r("update:open", w), r("openChange", w));
  14761. };
  14762. a({
  14763. getPopupDomNode: () => d.value.getPopupDomNode(),
  14764. open: f,
  14765. forcePopupAlign: () => {
  14766. var w;
  14767. return (w = d.value) === null || w === void 0 ? void 0 : w.forcePopupAlign();
  14768. }
  14769. });
  14770. const m = L(() => {
  14771. var w;
  14772. const {
  14773. builtinPlacements: P,
  14774. autoAdjustOverflow: $,
  14775. arrow: A,
  14776. arrowPointAtCenter: D
  14777. } = t;
  14778. let E = D;
  14779. return typeof A == "object" && (E = (w = A.pointAtCenter) !== null && w !== void 0 ? w : D), P || e1e({
  14780. arrowPointAtCenter: E,
  14781. autoAdjustOverflow: $
  14782. });
  14783. }), y = (w) => w || w === "", b = (w) => {
  14784. const P = w.type;
  14785. 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))) {
  14786. const {
  14787. picked: $,
  14788. omitted: A
  14789. } = l1e(Mue(w), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), D = I(I({
  14790. display: "inline-block"
  14791. }, $), {
  14792. cursor: "not-allowed",
  14793. lineHeight: 1,
  14794. width: w.props && w.props.block ? "100%" : void 0
  14795. }), E = I(I({}, A), {
  14796. pointerEvents: "none"
  14797. }), R = Pn(w, {
  14798. style: E
  14799. }, !0);
  14800. return M("span", {
  14801. style: D,
  14802. class: `${o.value}-disabled-compatible-wrapper`
  14803. }, [R]);
  14804. }
  14805. return w;
  14806. }, _ = () => {
  14807. var w, P;
  14808. return (w = t.title) !== null && w !== void 0 ? w : (P = n.title) === null || P === void 0 ? void 0 : P.call(n);
  14809. }, O = (w, P) => {
  14810. const $ = m.value, A = Object.keys($).find((D) => {
  14811. var E, R;
  14812. 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]);
  14813. });
  14814. if (A) {
  14815. const D = w.getBoundingClientRect(), E = {
  14816. top: "50%",
  14817. left: "50%"
  14818. };
  14819. 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}`;
  14820. }
  14821. }, S = L(() => r1e(o.value, t.color)), x = L(() => i["data-popover-inject"]), [C, T] = s1e(o, L(() => !x.value));
  14822. return () => {
  14823. var w, P;
  14824. const {
  14825. openClassName: $,
  14826. overlayClassName: A,
  14827. overlayStyle: D,
  14828. overlayInnerStyle: E
  14829. } = t;
  14830. let R = (P = os((w = n.default) === null || w === void 0 ? void 0 : w.call(n))) !== null && P !== void 0 ? P : null;
  14831. R = R.length === 1 ? R[0] : R;
  14832. let N = f.value;
  14833. if (c.value === void 0 && p() && (N = !1), !R)
  14834. return null;
  14835. const V = b(Ui(R) && !Iue(R) ? R : M("span", null, [R])), z = ye({
  14836. [$ || `${o.value}-open`]: !0,
  14837. [V.props && V.props.class]: V.props && V.props.class
  14838. }), W = ye(A, {
  14839. [`${o.value}-rtl`]: l.value === "rtl"
  14840. }, S.value.className, T.value), F = I(I({}, S.value.overlayStyle), E), Q = S.value.arrowStyle, Z = I(I(I({}, i), t), {
  14841. prefixCls: o.value,
  14842. arrow: !!t.arrow,
  14843. getPopupContainer: s == null ? void 0 : s.value,
  14844. builtinPlacements: m.value,
  14845. visible: N,
  14846. ref: d,
  14847. overlayClassName: W,
  14848. overlayStyle: I(I({}, Q), D),
  14849. overlayInnerStyle: F,
  14850. onVisibleChange: v,
  14851. onPopupAlign: O,
  14852. transitionName: es(u.value, "zoom-big-fast", t.transitionName)
  14853. });
  14854. return C(M(Y_e, Z, {
  14855. default: () => [f.value ? Pn(V, {
  14856. class: z
  14857. }) : V],
  14858. arrowContent: () => M("span", {
  14859. class: `${o.value}-arrow-content`
  14860. }, null),
  14861. overlay: _
  14862. }));
  14863. };
  14864. }
  14865. }), dx = np(u1e), Xf = {
  14866. adjustX: 1,
  14867. adjustY: 1
  14868. }, Yf = [0, 0], c1e = {
  14869. topLeft: {
  14870. points: ["bl", "tl"],
  14871. overflow: Xf,
  14872. offset: [0, -4],
  14873. targetOffset: Yf
  14874. },
  14875. topCenter: {
  14876. points: ["bc", "tc"],
  14877. overflow: Xf,
  14878. offset: [0, -4],
  14879. targetOffset: Yf
  14880. },
  14881. topRight: {
  14882. points: ["br", "tr"],
  14883. overflow: Xf,
  14884. offset: [0, -4],
  14885. targetOffset: Yf
  14886. },
  14887. bottomLeft: {
  14888. points: ["tl", "bl"],
  14889. overflow: Xf,
  14890. offset: [0, 4],
  14891. targetOffset: Yf
  14892. },
  14893. bottomCenter: {
  14894. points: ["tc", "bc"],
  14895. overflow: Xf,
  14896. offset: [0, 4],
  14897. targetOffset: Yf
  14898. },
  14899. bottomRight: {
  14900. points: ["tr", "br"],
  14901. overflow: Xf,
  14902. offset: [0, 4],
  14903. targetOffset: Yf
  14904. }
  14905. };
  14906. var f1e = function(t, e) {
  14907. var n = {};
  14908. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  14909. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  14910. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  14911. return n;
  14912. };
  14913. const d1e = te({
  14914. compatConfig: {
  14915. MODE: 3
  14916. },
  14917. props: {
  14918. minOverlayWidthMatchTrigger: {
  14919. type: Boolean,
  14920. default: void 0
  14921. },
  14922. arrow: {
  14923. type: Boolean,
  14924. default: !1
  14925. },
  14926. prefixCls: Y.string.def("rc-dropdown"),
  14927. transitionName: String,
  14928. overlayClassName: Y.string.def(""),
  14929. openClassName: String,
  14930. animation: Y.any,
  14931. align: Y.object,
  14932. overlayStyle: {
  14933. type: Object,
  14934. default: void 0
  14935. },
  14936. placement: Y.string.def("bottomLeft"),
  14937. overlay: Y.any,
  14938. trigger: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def("hover"),
  14939. alignPoint: {
  14940. type: Boolean,
  14941. default: void 0
  14942. },
  14943. showAction: Y.array,
  14944. hideAction: Y.array,
  14945. getPopupContainer: Function,
  14946. visible: {
  14947. type: Boolean,
  14948. default: void 0
  14949. },
  14950. defaultVisible: {
  14951. type: Boolean,
  14952. default: !1
  14953. },
  14954. mouseEnterDelay: Y.number.def(0.15),
  14955. mouseLeaveDelay: Y.number.def(0.1)
  14956. },
  14957. emits: ["visibleChange", "overlayClick"],
  14958. setup(t, e) {
  14959. let {
  14960. slots: n,
  14961. emit: r,
  14962. expose: i
  14963. } = e;
  14964. const a = U(!!t.visible);
  14965. se(() => t.visible, (h) => {
  14966. h !== void 0 && (a.value = h);
  14967. });
  14968. const o = U();
  14969. i({
  14970. triggerRef: o
  14971. });
  14972. const s = (h) => {
  14973. t.visible === void 0 && (a.value = !1), r("overlayClick", h);
  14974. }, l = (h) => {
  14975. t.visible === void 0 && (a.value = h), r("visibleChange", h);
  14976. }, u = () => {
  14977. var h;
  14978. const p = (h = n.overlay) === null || h === void 0 ? void 0 : h.call(n), v = {
  14979. prefixCls: `${t.prefixCls}-menu`,
  14980. onClick: s
  14981. };
  14982. return M(wt, {
  14983. key: nj
  14984. }, [t.arrow && M("div", {
  14985. class: `${t.prefixCls}-arrow`
  14986. }, null), Pn(p, v, !1)]);
  14987. }, c = L(() => {
  14988. const {
  14989. minOverlayWidthMatchTrigger: h = !t.alignPoint
  14990. } = t;
  14991. return h;
  14992. }), f = () => {
  14993. var h;
  14994. const p = (h = n.default) === null || h === void 0 ? void 0 : h.call(n);
  14995. return a.value && p ? Pn(p[0], {
  14996. class: t.openClassName || `${t.prefixCls}-open`
  14997. }, !1) : p;
  14998. }, d = L(() => !t.hideAction && t.trigger.indexOf("contextmenu") !== -1 ? ["click"] : t.hideAction);
  14999. return () => {
  15000. const {
  15001. prefixCls: h,
  15002. arrow: p,
  15003. showAction: v,
  15004. overlayStyle: g,
  15005. trigger: m,
  15006. placement: y,
  15007. align: b,
  15008. getPopupContainer: _,
  15009. transitionName: O,
  15010. animation: S,
  15011. overlayClassName: x
  15012. } = t, C = f1e(t, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
  15013. return M(KS, j(j({}, C), {}, {
  15014. prefixCls: h,
  15015. ref: o,
  15016. popupClassName: ye(x, {
  15017. [`${h}-show-arrow`]: p
  15018. }),
  15019. popupStyle: g,
  15020. builtinPlacements: c1e,
  15021. action: m,
  15022. showAction: v,
  15023. hideAction: d.value || [],
  15024. popupPlacement: y,
  15025. popupAlign: b,
  15026. popupTransitionName: O,
  15027. popupAnimation: S,
  15028. popupVisible: a.value,
  15029. stretch: c.value ? "minWidth" : "",
  15030. onPopupVisibleChange: l,
  15031. getPopupContainer: _
  15032. }), {
  15033. popup: u,
  15034. default: f
  15035. });
  15036. };
  15037. }
  15038. }), h1e = (t) => {
  15039. const {
  15040. componentCls: e,
  15041. colorPrimary: n
  15042. } = t;
  15043. return {
  15044. [e]: {
  15045. position: "absolute",
  15046. background: "transparent",
  15047. pointerEvents: "none",
  15048. boxSizing: "border-box",
  15049. color: `var(--wave-color, ${n})`,
  15050. boxShadow: "0 0 0 0 currentcolor",
  15051. opacity: 0.2,
  15052. // =================== Motion ===================
  15053. "&.wave-motion-appear": {
  15054. transition: [`box-shadow 0.4s ${t.motionEaseOutCirc}`, `opacity 2s ${t.motionEaseOutCirc}`].join(","),
  15055. "&-active": {
  15056. boxShadow: "0 0 0 6px currentcolor",
  15057. opacity: 0
  15058. }
  15059. }
  15060. }
  15061. };
  15062. }, p1e = Sn("Wave", (t) => [h1e(t)]);
  15063. function v1e(t) {
  15064. const e = (t || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  15065. return e && e[1] && e[2] && e[3] ? !(e[1] === e[2] && e[2] === e[3]) : !0;
  15066. }
  15067. function SC(t) {
  15068. return t && t !== "#fff" && t !== "#ffffff" && t !== "rgb(255, 255, 255)" && t !== "rgba(255, 255, 255, 1)" && v1e(t) && !/rgba\((?:\d*, ){3}0\)/.test(t) && // any transparent rgba color
  15069. t !== "transparent";
  15070. }
  15071. function g1e(t) {
  15072. const {
  15073. borderTopColor: e,
  15074. borderColor: n,
  15075. backgroundColor: r
  15076. } = getComputedStyle(t);
  15077. return SC(e) ? e : SC(n) ? n : SC(r) ? r : null;
  15078. }
  15079. function xC(t) {
  15080. return Number.isNaN(t) ? 0 : t;
  15081. }
  15082. const m1e = te({
  15083. props: {
  15084. target: $t(),
  15085. className: String
  15086. },
  15087. setup(t) {
  15088. 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);
  15089. function g() {
  15090. const {
  15091. target: x
  15092. } = t, C = getComputedStyle(x);
  15093. r(g1e(x));
  15094. const T = C.position === "static", {
  15095. borderLeftWidth: w,
  15096. borderTopWidth: P
  15097. } = C;
  15098. s(T ? x.offsetLeft : xC(-parseFloat(w))), u(T ? x.offsetTop : xC(-parseFloat(P))), f(x.offsetWidth), h(x.offsetHeight);
  15099. const {
  15100. borderTopLeftRadius: $,
  15101. borderTopRightRadius: A,
  15102. borderBottomLeftRadius: D,
  15103. borderBottomRightRadius: E
  15104. } = C;
  15105. a([$, A, E, D].map((R) => xC(parseFloat(R))));
  15106. }
  15107. let m, y, b;
  15108. const _ = () => {
  15109. clearTimeout(b), xt.cancel(y), m == null || m.disconnect();
  15110. }, O = () => {
  15111. var x;
  15112. const C = (x = e.value) === null || x === void 0 ? void 0 : x.parentElement;
  15113. C && (sf(null, C), C.parentElement && C.parentElement.removeChild(C));
  15114. };
  15115. it(() => {
  15116. _(), b = setTimeout(() => {
  15117. O();
  15118. }, 5e3);
  15119. const {
  15120. target: x
  15121. } = t;
  15122. x && (y = xt(() => {
  15123. g(), v(!0);
  15124. }), typeof ResizeObserver < "u" && (m = new ResizeObserver(g), m.observe(x)));
  15125. }), yt(() => {
  15126. _();
  15127. });
  15128. const S = (x) => {
  15129. x.propertyName === "opacity" && O();
  15130. };
  15131. return () => {
  15132. if (!p.value)
  15133. return null;
  15134. const x = {
  15135. left: `${o.value}px`,
  15136. top: `${l.value}px`,
  15137. width: `${c.value}px`,
  15138. height: `${d.value}px`,
  15139. borderRadius: i.value.map((C) => `${C}px`).join(" ")
  15140. };
  15141. return n && (x["--wave-color"] = n.value), M(co, {
  15142. appear: !0,
  15143. name: "wave-motion",
  15144. appearFromClass: "wave-motion-appear",
  15145. appearActiveClass: "wave-motion-appear",
  15146. appearToClass: "wave-motion-appear wave-motion-appear-active"
  15147. }, {
  15148. default: () => [M("div", {
  15149. ref: e,
  15150. class: t.className,
  15151. style: x,
  15152. onTransitionend: S
  15153. }, null)]
  15154. });
  15155. };
  15156. }
  15157. });
  15158. function y1e(t, e) {
  15159. const n = document.createElement("div");
  15160. n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", t == null || t.insertBefore(n, t == null ? void 0 : t.firstChild), sf(M(m1e, {
  15161. target: t,
  15162. className: e
  15163. }, null), n);
  15164. }
  15165. function b1e(t, e, n) {
  15166. function r() {
  15167. var i;
  15168. const a = Cs(t);
  15169. !((i = n == null ? void 0 : n.value) === null || i === void 0) && i.disabled || !a || y1e(a, e.value);
  15170. }
  15171. return r;
  15172. }
  15173. const _1e = te({
  15174. compatConfig: {
  15175. MODE: 3
  15176. },
  15177. name: "Wave",
  15178. props: {
  15179. disabled: Boolean
  15180. },
  15181. setup(t, e) {
  15182. let {
  15183. slots: n
  15184. } = e;
  15185. const r = vn(), {
  15186. prefixCls: i,
  15187. wave: a
  15188. } = It("wave", t), [, o] = p1e(i), s = b1e(r, L(() => ye(i.value, o.value)), a);
  15189. let l;
  15190. const u = () => {
  15191. Cs(r).removeEventListener("click", l, !0);
  15192. };
  15193. return it(() => {
  15194. se(() => t.disabled, () => {
  15195. u(), Tt(() => {
  15196. const c = Cs(r);
  15197. c == null || c.removeEventListener("click", l, !0), !(!c || c.nodeType !== 1 || t.disabled) && (l = (f) => {
  15198. f.target.tagName === "INPUT" || !gZ(f.target) || // No need wave
  15199. !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || s();
  15200. }, c.addEventListener("click", l, !0));
  15201. });
  15202. }, {
  15203. immediate: !0,
  15204. flush: "post"
  15205. });
  15206. }), yt(() => {
  15207. u();
  15208. }), () => {
  15209. var c;
  15210. return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
  15211. };
  15212. }
  15213. });
  15214. function LU(t) {
  15215. return t === "danger" ? {
  15216. danger: !0
  15217. } : {
  15218. type: t
  15219. };
  15220. }
  15221. const O1e = () => ({
  15222. prefixCls: String,
  15223. type: String,
  15224. htmlType: {
  15225. type: String,
  15226. default: "button"
  15227. },
  15228. shape: {
  15229. type: String
  15230. },
  15231. size: {
  15232. type: String
  15233. },
  15234. loading: {
  15235. type: [Boolean, Object],
  15236. default: () => !1
  15237. },
  15238. disabled: {
  15239. type: Boolean,
  15240. default: void 0
  15241. },
  15242. ghost: {
  15243. type: Boolean,
  15244. default: void 0
  15245. },
  15246. block: {
  15247. type: Boolean,
  15248. default: void 0
  15249. },
  15250. danger: {
  15251. type: Boolean,
  15252. default: void 0
  15253. },
  15254. icon: Y.any,
  15255. href: String,
  15256. target: String,
  15257. title: String,
  15258. onClick: g1(),
  15259. onMousedown: g1()
  15260. }), i5 = (t) => {
  15261. t && (t.style.width = "0px", t.style.opacity = "0", t.style.transform = "scale(0)");
  15262. }, a5 = (t) => {
  15263. Tt(() => {
  15264. t && (t.style.width = `${t.scrollWidth}px`, t.style.opacity = "1", t.style.transform = "scale(1)");
  15265. });
  15266. }, o5 = (t) => {
  15267. t && t.style && (t.style.width = null, t.style.opacity = null, t.style.transform = null);
  15268. }, S1e = te({
  15269. compatConfig: {
  15270. MODE: 3
  15271. },
  15272. name: "LoadingIcon",
  15273. props: {
  15274. prefixCls: String,
  15275. loading: [Boolean, Object],
  15276. existIcon: Boolean
  15277. },
  15278. setup(t) {
  15279. return () => {
  15280. const {
  15281. existIcon: e,
  15282. prefixCls: n,
  15283. loading: r
  15284. } = t;
  15285. if (e)
  15286. return M("span", {
  15287. class: `${n}-loading-icon`
  15288. }, [M(ts, null, null)]);
  15289. const i = !!r;
  15290. return M(co, {
  15291. name: `${n}-loading-icon-motion`,
  15292. onBeforeEnter: i5,
  15293. onEnter: a5,
  15294. onAfterEnter: o5,
  15295. onBeforeLeave: a5,
  15296. onLeave: (a) => {
  15297. setTimeout(() => {
  15298. i5(a);
  15299. });
  15300. },
  15301. onAfterLeave: o5
  15302. }, {
  15303. default: () => [i ? M("span", {
  15304. class: `${n}-loading-icon`
  15305. }, [M(ts, null, null)]) : null]
  15306. });
  15307. };
  15308. }
  15309. }), s5 = (t, e) => ({
  15310. // Border
  15311. [`> span, > ${t}`]: {
  15312. "&:not(:last-child)": {
  15313. [`&, & > ${t}`]: {
  15314. "&:not(:disabled)": {
  15315. borderInlineEndColor: e
  15316. }
  15317. }
  15318. },
  15319. "&:not(:first-child)": {
  15320. [`&, & > ${t}`]: {
  15321. "&:not(:disabled)": {
  15322. borderInlineStartColor: e
  15323. }
  15324. }
  15325. }
  15326. }
  15327. }), x1e = (t) => {
  15328. const {
  15329. componentCls: e,
  15330. fontSize: n,
  15331. lineWidth: r,
  15332. colorPrimaryHover: i,
  15333. colorErrorHover: a
  15334. } = t;
  15335. return {
  15336. [`${e}-group`]: [
  15337. {
  15338. position: "relative",
  15339. display: "inline-flex",
  15340. // Border
  15341. [`> span, > ${e}`]: {
  15342. "&:not(:last-child)": {
  15343. [`&, & > ${e}`]: {
  15344. borderStartEndRadius: 0,
  15345. borderEndEndRadius: 0
  15346. }
  15347. },
  15348. "&:not(:first-child)": {
  15349. marginInlineStart: -r,
  15350. [`&, & > ${e}`]: {
  15351. borderStartStartRadius: 0,
  15352. borderEndStartRadius: 0
  15353. }
  15354. }
  15355. },
  15356. [e]: {
  15357. position: "relative",
  15358. zIndex: 1,
  15359. "&:hover,\n &:focus,\n &:active": {
  15360. zIndex: 2
  15361. },
  15362. "&[disabled]": {
  15363. zIndex: 0
  15364. }
  15365. },
  15366. [`${e}-icon-only`]: {
  15367. fontSize: n
  15368. }
  15369. },
  15370. // Border Color
  15371. s5(`${e}-primary`, i),
  15372. s5(`${e}-danger`, a)
  15373. ]
  15374. };
  15375. };
  15376. function w1e(t, e) {
  15377. return {
  15378. // border collapse
  15379. [`&-item:not(${e}-last-item)`]: {
  15380. marginBottom: -t.lineWidth
  15381. },
  15382. "&-item": {
  15383. "&:hover,&:focus,&:active": {
  15384. zIndex: 2
  15385. },
  15386. "&[disabled]": {
  15387. zIndex: 0
  15388. }
  15389. }
  15390. };
  15391. }
  15392. function C1e(t, e) {
  15393. return {
  15394. [`&-item:not(${e}-first-item):not(${e}-last-item)`]: {
  15395. borderRadius: 0
  15396. },
  15397. [`&-item${e}-first-item:not(${e}-last-item)`]: {
  15398. [`&, &${t}-sm, &${t}-lg`]: {
  15399. borderEndEndRadius: 0,
  15400. borderEndStartRadius: 0
  15401. }
  15402. },
  15403. [`&-item${e}-last-item:not(${e}-first-item)`]: {
  15404. [`&, &${t}-sm, &${t}-lg`]: {
  15405. borderStartStartRadius: 0,
  15406. borderStartEndRadius: 0
  15407. }
  15408. }
  15409. };
  15410. }
  15411. function T1e(t) {
  15412. const e = `${t.componentCls}-compact-vertical`;
  15413. return {
  15414. [e]: I(I({}, w1e(t, e)), C1e(t.componentCls, e))
  15415. };
  15416. }
  15417. const P1e = (t) => {
  15418. const {
  15419. componentCls: e,
  15420. iconCls: n
  15421. } = t;
  15422. return {
  15423. [e]: {
  15424. outline: "none",
  15425. position: "relative",
  15426. display: "inline-block",
  15427. fontWeight: 400,
  15428. whiteSpace: "nowrap",
  15429. textAlign: "center",
  15430. backgroundImage: "none",
  15431. backgroundColor: "transparent",
  15432. border: `${t.lineWidth}px ${t.lineType} transparent`,
  15433. cursor: "pointer",
  15434. transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
  15435. userSelect: "none",
  15436. touchAction: "manipulation",
  15437. lineHeight: t.lineHeight,
  15438. color: t.colorText,
  15439. "> span": {
  15440. display: "inline-block"
  15441. },
  15442. // Leave a space between icon and text.
  15443. [`> ${n} + span, > span + ${n}`]: {
  15444. marginInlineStart: t.marginXS
  15445. },
  15446. "> a": {
  15447. color: "currentColor"
  15448. },
  15449. "&:not(:disabled)": I({}, VS(t)),
  15450. // make `btn-icon-only` not too narrow
  15451. [`&-icon-only${e}-compact-item`]: {
  15452. flex: "none"
  15453. },
  15454. // Special styles for Primary Button
  15455. [`&-compact-item${e}-primary`]: {
  15456. [`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]: {
  15457. position: "relative",
  15458. "&:before": {
  15459. position: "absolute",
  15460. top: -t.lineWidth,
  15461. insetInlineStart: -t.lineWidth,
  15462. display: "inline-block",
  15463. width: t.lineWidth,
  15464. height: `calc(100% + ${t.lineWidth * 2}px)`,
  15465. backgroundColor: t.colorPrimaryHover,
  15466. content: '""'
  15467. }
  15468. }
  15469. },
  15470. // Special styles for Primary Button
  15471. "&-compact-vertical-item": {
  15472. [`&${e}-primary`]: {
  15473. [`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]: {
  15474. position: "relative",
  15475. "&:before": {
  15476. position: "absolute",
  15477. top: -t.lineWidth,
  15478. insetInlineStart: -t.lineWidth,
  15479. display: "inline-block",
  15480. width: `calc(100% + ${t.lineWidth * 2}px)`,
  15481. height: t.lineWidth,
  15482. backgroundColor: t.colorPrimaryHover,
  15483. content: '""'
  15484. }
  15485. }
  15486. }
  15487. }
  15488. }
  15489. };
  15490. }, Vs = (t, e) => ({
  15491. "&:not(:disabled)": {
  15492. "&:hover": t,
  15493. "&:active": e
  15494. }
  15495. }), $1e = (t) => ({
  15496. minWidth: t.controlHeight,
  15497. paddingInlineStart: 0,
  15498. paddingInlineEnd: 0,
  15499. borderRadius: "50%"
  15500. }), A1e = (t) => ({
  15501. borderRadius: t.controlHeight,
  15502. paddingInlineStart: t.controlHeight / 2,
  15503. paddingInlineEnd: t.controlHeight / 2
  15504. }), k2 = (t) => ({
  15505. cursor: "not-allowed",
  15506. borderColor: t.colorBorder,
  15507. color: t.colorTextDisabled,
  15508. backgroundColor: t.colorBgContainerDisabled,
  15509. boxShadow: "none"
  15510. }), I1 = (t, e, n, r, i, a, o) => ({
  15511. [`&${t}-background-ghost`]: I(I({
  15512. color: e || void 0,
  15513. backgroundColor: "transparent",
  15514. borderColor: n || void 0,
  15515. boxShadow: "none"
  15516. }, Vs(I({
  15517. backgroundColor: "transparent"
  15518. }, a), I({
  15519. backgroundColor: "transparent"
  15520. }, o))), {
  15521. "&:disabled": {
  15522. cursor: "not-allowed",
  15523. color: r || void 0,
  15524. borderColor: i || void 0
  15525. }
  15526. })
  15527. }), nD = (t) => ({
  15528. "&:disabled": I({}, k2(t))
  15529. }), NU = (t) => I({}, nD(t)), D1 = (t) => ({
  15530. "&:disabled": {
  15531. cursor: "not-allowed",
  15532. color: t.colorTextDisabled
  15533. }
  15534. }), BU = (t) => I(I(I(I(I({}, NU(t)), {
  15535. backgroundColor: t.colorBgContainer,
  15536. borderColor: t.colorBorder,
  15537. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`
  15538. }), Vs({
  15539. color: t.colorPrimaryHover,
  15540. borderColor: t.colorPrimaryHover
  15541. }, {
  15542. color: t.colorPrimaryActive,
  15543. borderColor: t.colorPrimaryActive
  15544. })), I1(t.componentCls, t.colorBgContainer, t.colorBgContainer, t.colorTextDisabled, t.colorBorder)), {
  15545. [`&${t.componentCls}-dangerous`]: I(I(I({
  15546. color: t.colorError,
  15547. borderColor: t.colorError
  15548. }, Vs({
  15549. color: t.colorErrorHover,
  15550. borderColor: t.colorErrorBorderHover
  15551. }, {
  15552. color: t.colorErrorActive,
  15553. borderColor: t.colorErrorActive
  15554. })), I1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder)), nD(t))
  15555. }), E1e = (t) => I(I(I(I(I({}, NU(t)), {
  15556. color: t.colorTextLightSolid,
  15557. backgroundColor: t.colorPrimary,
  15558. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`
  15559. }), Vs({
  15560. color: t.colorTextLightSolid,
  15561. backgroundColor: t.colorPrimaryHover
  15562. }, {
  15563. color: t.colorTextLightSolid,
  15564. backgroundColor: t.colorPrimaryActive
  15565. })), I1(t.componentCls, t.colorPrimary, t.colorPrimary, t.colorTextDisabled, t.colorBorder, {
  15566. color: t.colorPrimaryHover,
  15567. borderColor: t.colorPrimaryHover
  15568. }, {
  15569. color: t.colorPrimaryActive,
  15570. borderColor: t.colorPrimaryActive
  15571. })), {
  15572. [`&${t.componentCls}-dangerous`]: I(I(I({
  15573. backgroundColor: t.colorError,
  15574. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`
  15575. }, Vs({
  15576. backgroundColor: t.colorErrorHover
  15577. }, {
  15578. backgroundColor: t.colorErrorActive
  15579. })), I1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder, {
  15580. color: t.colorErrorHover,
  15581. borderColor: t.colorErrorHover
  15582. }, {
  15583. color: t.colorErrorActive,
  15584. borderColor: t.colorErrorActive
  15585. })), nD(t))
  15586. }), M1e = (t) => I(I({}, BU(t)), {
  15587. borderStyle: "dashed"
  15588. }), I1e = (t) => I(I(I({
  15589. color: t.colorLink
  15590. }, Vs({
  15591. color: t.colorLinkHover
  15592. }, {
  15593. color: t.colorLinkActive
  15594. })), D1(t)), {
  15595. [`&${t.componentCls}-dangerous`]: I(I({
  15596. color: t.colorError
  15597. }, Vs({
  15598. color: t.colorErrorHover
  15599. }, {
  15600. color: t.colorErrorActive
  15601. })), D1(t))
  15602. }), D1e = (t) => I(I(I({}, Vs({
  15603. color: t.colorText,
  15604. backgroundColor: t.colorBgTextHover
  15605. }, {
  15606. color: t.colorText,
  15607. backgroundColor: t.colorBgTextActive
  15608. })), D1(t)), {
  15609. [`&${t.componentCls}-dangerous`]: I(I({
  15610. color: t.colorError
  15611. }, D1(t)), Vs({
  15612. color: t.colorErrorHover,
  15613. backgroundColor: t.colorErrorBg
  15614. }, {
  15615. color: t.colorErrorHover,
  15616. backgroundColor: t.colorErrorBg
  15617. }))
  15618. }), R1e = (t) => I(I({}, k2(t)), {
  15619. [`&${t.componentCls}:hover`]: I({}, k2(t))
  15620. }), k1e = (t) => {
  15621. const {
  15622. componentCls: e
  15623. } = t;
  15624. return {
  15625. [`${e}-default`]: BU(t),
  15626. [`${e}-primary`]: E1e(t),
  15627. [`${e}-dashed`]: M1e(t),
  15628. [`${e}-link`]: I1e(t),
  15629. [`${e}-text`]: D1e(t),
  15630. [`${e}-disabled`]: R1e(t)
  15631. };
  15632. }, rD = function(t) {
  15633. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  15634. const {
  15635. componentCls: n,
  15636. iconCls: r,
  15637. controlHeight: i,
  15638. fontSize: a,
  15639. lineHeight: o,
  15640. lineWidth: s,
  15641. borderRadius: l,
  15642. buttonPaddingHorizontal: u
  15643. } = t, c = Math.max(0, (i - a * o) / 2 - s), f = u - s, d = `${n}-icon-only`;
  15644. return [
  15645. // Size
  15646. {
  15647. [`${n}${e}`]: {
  15648. fontSize: a,
  15649. height: i,
  15650. padding: `${c}px ${f}px`,
  15651. borderRadius: l,
  15652. [`&${d}`]: {
  15653. width: i,
  15654. paddingInlineStart: 0,
  15655. paddingInlineEnd: 0,
  15656. [`&${n}-round`]: {
  15657. width: "auto"
  15658. },
  15659. "> span": {
  15660. transform: "scale(1.143)"
  15661. // 14px -> 16px
  15662. }
  15663. },
  15664. // Loading
  15665. [`&${n}-loading`]: {
  15666. opacity: t.opacityLoading,
  15667. cursor: "default"
  15668. },
  15669. [`${n}-loading-icon`]: {
  15670. transition: `width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`
  15671. },
  15672. [`&:not(${d}) ${n}-loading-icon > ${r}`]: {
  15673. marginInlineEnd: t.marginXS
  15674. }
  15675. }
  15676. },
  15677. // Shape - patch prefixCls again to override solid border radius style
  15678. {
  15679. [`${n}${n}-circle${e}`]: $1e(t)
  15680. },
  15681. {
  15682. [`${n}${n}-round${e}`]: A1e(t)
  15683. }
  15684. ];
  15685. }, L1e = (t) => rD(t), N1e = (t) => {
  15686. const e = Bt(t, {
  15687. controlHeight: t.controlHeightSM,
  15688. padding: t.paddingXS,
  15689. buttonPaddingHorizontal: 8,
  15690. borderRadius: t.borderRadiusSM
  15691. });
  15692. return rD(e, `${t.componentCls}-sm`);
  15693. }, B1e = (t) => {
  15694. const e = Bt(t, {
  15695. controlHeight: t.controlHeightLG,
  15696. fontSize: t.fontSizeLG,
  15697. borderRadius: t.borderRadiusLG
  15698. });
  15699. return rD(e, `${t.componentCls}-lg`);
  15700. }, z1e = (t) => {
  15701. const {
  15702. componentCls: e
  15703. } = t;
  15704. return {
  15705. [e]: {
  15706. [`&${e}-block`]: {
  15707. width: "100%"
  15708. }
  15709. }
  15710. };
  15711. }, V1e = Sn("Button", (t) => {
  15712. const {
  15713. controlTmpOutline: e,
  15714. paddingContentHorizontal: n
  15715. } = t, r = Bt(t, {
  15716. colorOutlineDefault: e,
  15717. buttonPaddingHorizontal: n
  15718. });
  15719. return [
  15720. // Shared
  15721. P1e(r),
  15722. // Size
  15723. N1e(r),
  15724. L1e(r),
  15725. B1e(r),
  15726. // Block
  15727. z1e(r),
  15728. // Group (type, ghost, danger, disabled, loading)
  15729. k1e(r),
  15730. // Button Group
  15731. x1e(r),
  15732. // Space Compact
  15733. cx(t, {
  15734. focus: !1
  15735. }),
  15736. T1e(t)
  15737. ];
  15738. }), F1e = () => ({
  15739. prefixCls: String,
  15740. size: {
  15741. type: String
  15742. }
  15743. }), zU = BI(), L2 = te({
  15744. compatConfig: {
  15745. MODE: 3
  15746. },
  15747. name: "AButtonGroup",
  15748. props: F1e(),
  15749. setup(t, e) {
  15750. let {
  15751. slots: n
  15752. } = e;
  15753. const {
  15754. prefixCls: r,
  15755. direction: i
  15756. } = It("btn-group", t), [, , a] = ap();
  15757. zU.useProvide(tn({
  15758. size: L(() => t.size)
  15759. }));
  15760. const o = L(() => {
  15761. const {
  15762. size: s
  15763. } = t;
  15764. let l = "";
  15765. switch (s) {
  15766. case "large":
  15767. l = "lg";
  15768. break;
  15769. case "small":
  15770. l = "sm";
  15771. break;
  15772. case "middle":
  15773. case void 0:
  15774. break;
  15775. default:
  15776. Qi(!s, "Button.Group", "Invalid prop `size`.");
  15777. }
  15778. return {
  15779. [`${r.value}`]: !0,
  15780. [`${r.value}-${l}`]: l,
  15781. [`${r.value}-rtl`]: i.value === "rtl",
  15782. [a.value]: !0
  15783. };
  15784. });
  15785. return () => {
  15786. var s;
  15787. return M("div", {
  15788. class: o.value
  15789. }, [Yn((s = n.default) === null || s === void 0 ? void 0 : s.call(n))]);
  15790. };
  15791. }
  15792. }), l5 = /^[\u4e00-\u9fa5]{2}$/, u5 = l5.test.bind(l5);
  15793. function Ey(t) {
  15794. return t === "text" || t === "link";
  15795. }
  15796. const Ur = te({
  15797. compatConfig: {
  15798. MODE: 3
  15799. },
  15800. name: "AButton",
  15801. inheritAttrs: !1,
  15802. __ANT_BUTTON: !0,
  15803. props: sr(O1e(), {
  15804. type: "default"
  15805. }),
  15806. slots: Object,
  15807. // emits: ['click', 'mousedown'],
  15808. setup(t, e) {
  15809. let {
  15810. slots: n,
  15811. attrs: r,
  15812. emit: i,
  15813. expose: a
  15814. } = e;
  15815. const {
  15816. prefixCls: o,
  15817. autoInsertSpaceInButton: s,
  15818. direction: l,
  15819. size: u
  15820. } = It("btn", t), [c, f] = V1e(o), d = zU.useInject(), h = Ko(), p = L(() => {
  15821. var E;
  15822. return (E = t.disabled) !== null && E !== void 0 ? E : h.value;
  15823. }), v = ae(null), g = ae(void 0);
  15824. let m = !1;
  15825. const y = ae(!1), b = ae(!1), _ = L(() => s.value !== !1), {
  15826. compactSize: O,
  15827. compactItemClassnames: S
  15828. } = sx(o, l), x = L(() => typeof t.loading == "object" && t.loading.delay ? t.loading.delay || !0 : !!t.loading);
  15829. se(x, (E) => {
  15830. clearTimeout(g.value), typeof x.value == "number" ? g.value = setTimeout(() => {
  15831. y.value = E;
  15832. }, x.value) : y.value = E;
  15833. }, {
  15834. immediate: !0
  15835. });
  15836. const C = L(() => {
  15837. const {
  15838. type: E,
  15839. shape: R = "default",
  15840. ghost: N,
  15841. block: V,
  15842. danger: z
  15843. } = t, W = o.value, F = {
  15844. large: "lg",
  15845. small: "sm",
  15846. middle: void 0
  15847. }, Q = O.value || (d == null ? void 0 : d.size) || u.value, Z = Q && F[Q] || "";
  15848. return [S.value, {
  15849. [f.value]: !0,
  15850. [`${W}`]: !0,
  15851. [`${W}-${R}`]: R !== "default" && R,
  15852. [`${W}-${E}`]: E,
  15853. [`${W}-${Z}`]: Z,
  15854. [`${W}-loading`]: y.value,
  15855. [`${W}-background-ghost`]: N && !Ey(E),
  15856. [`${W}-two-chinese-chars`]: b.value && _.value,
  15857. [`${W}-block`]: V,
  15858. [`${W}-dangerous`]: !!z,
  15859. [`${W}-rtl`]: l.value === "rtl"
  15860. }];
  15861. }), T = () => {
  15862. const E = v.value;
  15863. if (!E || s.value === !1)
  15864. return;
  15865. const R = E.textContent;
  15866. m && u5(R) ? b.value || (b.value = !0) : b.value && (b.value = !1);
  15867. }, w = (E) => {
  15868. if (y.value || p.value) {
  15869. E.preventDefault();
  15870. return;
  15871. }
  15872. i("click", E);
  15873. }, P = (E) => {
  15874. i("mousedown", E);
  15875. }, $ = (E, R) => {
  15876. const N = R ? " " : "";
  15877. if (E.type === TS) {
  15878. let V = E.children.trim();
  15879. return u5(V) && (V = V.split("").join(N)), M("span", null, [V]);
  15880. }
  15881. return E;
  15882. };
  15883. return ht(() => {
  15884. Qi(!(t.ghost && Ey(t.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
  15885. }), it(T), ep(T), yt(() => {
  15886. g.value && clearTimeout(g.value);
  15887. }), a({
  15888. focus: () => {
  15889. var E;
  15890. (E = v.value) === null || E === void 0 || E.focus();
  15891. },
  15892. blur: () => {
  15893. var E;
  15894. (E = v.value) === null || E === void 0 || E.blur();
  15895. }
  15896. }), () => {
  15897. var E, R;
  15898. const {
  15899. icon: N = (E = n.icon) === null || E === void 0 ? void 0 : E.call(n)
  15900. } = t, V = Yn((R = n.default) === null || R === void 0 ? void 0 : R.call(n));
  15901. m = V.length === 1 && !N && !Ey(t.type);
  15902. const {
  15903. type: z,
  15904. htmlType: W,
  15905. href: F,
  15906. title: Q,
  15907. target: Z
  15908. } = t, ne = y.value ? "loading" : N, ee = I(I({}, r), {
  15909. title: Q,
  15910. disabled: p.value,
  15911. class: [C.value, r.class, {
  15912. [`${o.value}-icon-only`]: V.length === 0 && !!ne
  15913. }],
  15914. onClick: w,
  15915. onMousedown: P
  15916. });
  15917. p.value || delete ee.disabled;
  15918. const oe = N && !y.value ? N : M(S1e, {
  15919. existIcon: !!N,
  15920. prefixCls: o.value,
  15921. loading: !!y.value
  15922. }, null), K = V.map((X) => $(X, m && _.value));
  15923. if (F !== void 0)
  15924. return c(M("a", j(j({}, ee), {}, {
  15925. href: F,
  15926. target: Z,
  15927. ref: v
  15928. }), [oe, K]));
  15929. let ie = M("button", j(j({}, ee), {}, {
  15930. ref: v,
  15931. type: W
  15932. }), [oe, K]);
  15933. if (!Ey(z)) {
  15934. const X = /* @__PURE__ */ function() {
  15935. return ie;
  15936. }();
  15937. ie = M(_1e, {
  15938. ref: "wave",
  15939. disabled: !!y.value
  15940. }, {
  15941. default: () => [X]
  15942. });
  15943. }
  15944. return c(ie);
  15945. };
  15946. }
  15947. });
  15948. Ur.Group = L2;
  15949. Ur.install = function(t) {
  15950. return t.component(Ur.name, Ur), t.component(L2.name, L2), t;
  15951. };
  15952. var W1e = { 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" };
  15953. function c5(t) {
  15954. for (var e = 1; e < arguments.length; e++) {
  15955. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  15956. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  15957. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  15958. }))), r.forEach(function(i) {
  15959. Q1e(t, i, n[i]);
  15960. });
  15961. }
  15962. return t;
  15963. }
  15964. function Q1e(t, e, n) {
  15965. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  15966. }
  15967. var hx = function(e, n) {
  15968. var r = c5({}, e, n.attrs);
  15969. return M(lt, c5({}, r, {
  15970. icon: W1e
  15971. }), null);
  15972. };
  15973. hx.displayName = "EllipsisOutlined";
  15974. hx.inheritAttrs = !1;
  15975. var H1e = { 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" };
  15976. function f5(t) {
  15977. for (var e = 1; e < arguments.length; e++) {
  15978. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  15979. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  15980. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  15981. }))), r.forEach(function(i) {
  15982. G1e(t, i, n[i]);
  15983. });
  15984. }
  15985. return t;
  15986. }
  15987. function G1e(t, e, n) {
  15988. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  15989. }
  15990. var px = function(e, n) {
  15991. var r = f5({}, e, n.attrs);
  15992. return M(lt, f5({}, r, {
  15993. icon: H1e
  15994. }), null);
  15995. };
  15996. px.displayName = "RightOutlined";
  15997. px.inheritAttrs = !1;
  15998. const VU = Symbol("OverrideContextKey"), FU = () => Ge(VU, void 0), j1e = (t) => {
  15999. var e, n, r;
  16000. const {
  16001. prefixCls: i,
  16002. mode: a,
  16003. selectable: o,
  16004. validator: s,
  16005. onClick: l,
  16006. expandIcon: u
  16007. } = FU() || {};
  16008. pt(VU, {
  16009. prefixCls: L(() => {
  16010. var c, f;
  16011. return (f = (c = t.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : i == null ? void 0 : i.value;
  16012. }),
  16013. mode: L(() => {
  16014. var c, f;
  16015. return (f = (c = t.mode) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : a == null ? void 0 : a.value;
  16016. }),
  16017. selectable: L(() => {
  16018. var c, f;
  16019. return (f = (c = t.selectable) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : o == null ? void 0 : o.value;
  16020. }),
  16021. validator: (e = t.validator) !== null && e !== void 0 ? e : s,
  16022. onClick: (n = t.onClick) !== null && n !== void 0 ? n : l,
  16023. expandIcon: (r = t.expandIcon) !== null && r !== void 0 ? r : u == null ? void 0 : u.value
  16024. });
  16025. };
  16026. function Z1e(t, e, n, r) {
  16027. let i;
  16028. if (i !== void 0)
  16029. return !!i;
  16030. if (t === e)
  16031. return !0;
  16032. if (typeof t != "object" || !t || typeof e != "object" || !e)
  16033. return !1;
  16034. const a = Object.keys(t), o = Object.keys(e);
  16035. if (a.length !== o.length)
  16036. return !1;
  16037. const s = Object.prototype.hasOwnProperty.bind(e);
  16038. for (let l = 0; l < a.length; l++) {
  16039. const u = a[l];
  16040. if (!s(u))
  16041. return !1;
  16042. const c = t[u], f = e[u];
  16043. if (i = void 0, i === !1 || i === void 0 && c !== f)
  16044. return !1;
  16045. }
  16046. return !0;
  16047. }
  16048. function Zp(t, e) {
  16049. return Z1e(qo(t), qo(e));
  16050. }
  16051. const WU = Symbol("menuContextKey"), QU = (t) => {
  16052. pt(WU, t);
  16053. }, ol = () => Ge(WU), HU = Symbol("ForceRenderKey"), U1e = (t) => {
  16054. pt(HU, t);
  16055. }, GU = () => Ge(HU, !1), jU = Symbol("menuFirstLevelContextKey"), ZU = (t) => {
  16056. pt(jU, t);
  16057. }, X1e = () => Ge(jU, !0), R1 = te({
  16058. compatConfig: {
  16059. MODE: 3
  16060. },
  16061. name: "MenuContextProvider",
  16062. inheritAttrs: !1,
  16063. props: {
  16064. mode: {
  16065. type: String,
  16066. default: void 0
  16067. },
  16068. overflowDisabled: {
  16069. type: Boolean,
  16070. default: void 0
  16071. }
  16072. },
  16073. setup(t, e) {
  16074. let {
  16075. slots: n
  16076. } = e;
  16077. const r = ol(), i = I({}, r);
  16078. return t.mode !== void 0 && (i.mode = Nn(t, "mode")), t.overflowDisabled !== void 0 && (i.overflowDisabled = Nn(t, "overflowDisabled")), QU(i), () => {
  16079. var a;
  16080. return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
  16081. };
  16082. }
  16083. }), Y1e = QU, q1e = Symbol("siderCollapsed"), My = "$$__vc-menu-more__key", UU = Symbol("KeyPathContext"), iD = () => Ge(UU, {
  16084. parentEventKeys: L(() => []),
  16085. parentKeys: L(() => []),
  16086. parentInfo: {}
  16087. }), K1e = (t, e, n) => {
  16088. const {
  16089. parentEventKeys: r,
  16090. parentKeys: i
  16091. } = iD(), a = L(() => [...r.value, t]), o = L(() => [...i.value, e]);
  16092. return pt(UU, {
  16093. parentEventKeys: a,
  16094. parentKeys: o,
  16095. parentInfo: n
  16096. }), o;
  16097. }, XU = Symbol("measure"), d5 = te({
  16098. compatConfig: {
  16099. MODE: 3
  16100. },
  16101. setup(t, e) {
  16102. let {
  16103. slots: n
  16104. } = e;
  16105. return pt(XU, !0), () => {
  16106. var r;
  16107. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  16108. };
  16109. }
  16110. }), aD = () => Ge(XU, !1), J1e = K1e;
  16111. function YU(t) {
  16112. const {
  16113. mode: e,
  16114. rtl: n,
  16115. inlineIndent: r
  16116. } = ol();
  16117. return L(() => e.value !== "inline" ? null : n.value ? {
  16118. paddingRight: `${t.value * r.value}px`
  16119. } : {
  16120. paddingLeft: `${t.value * r.value}px`
  16121. });
  16122. }
  16123. let eOe = 0;
  16124. const tOe = () => ({
  16125. id: String,
  16126. role: String,
  16127. disabled: Boolean,
  16128. danger: Boolean,
  16129. title: {
  16130. type: [String, Boolean],
  16131. default: void 0
  16132. },
  16133. icon: Y.any,
  16134. onMouseenter: Function,
  16135. onMouseleave: Function,
  16136. onClick: Function,
  16137. onKeydown: Function,
  16138. onFocus: Function,
  16139. // Internal user prop
  16140. originItemValue: $t()
  16141. }), Th = te({
  16142. compatConfig: {
  16143. MODE: 3
  16144. },
  16145. name: "AMenuItem",
  16146. inheritAttrs: !1,
  16147. props: tOe(),
  16148. slots: Object,
  16149. setup(t, e) {
  16150. let {
  16151. slots: n,
  16152. emit: r,
  16153. attrs: i
  16154. } = e;
  16155. const a = vn(), o = aD(), s = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
  16156. Qi(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(s)}"\` not support Symbol type`);
  16157. const l = `menu_item_${++eOe}_$$_${s}`, {
  16158. parentEventKeys: u,
  16159. parentKeys: c
  16160. } = iD(), {
  16161. prefixCls: f,
  16162. activeKeys: d,
  16163. disabled: h,
  16164. changeActiveKeys: p,
  16165. rtl: v,
  16166. inlineCollapsed: g,
  16167. siderCollapsed: m,
  16168. onItemClick: y,
  16169. selectedKeys: b,
  16170. registerMenuInfo: _,
  16171. unRegisterMenuInfo: O
  16172. } = ol(), S = X1e(), x = ae(!1), C = L(() => [...c.value, s]);
  16173. _(l, {
  16174. eventKey: l,
  16175. key: s,
  16176. parentEventKeys: u,
  16177. parentKeys: c,
  16178. isLeaf: !0
  16179. }), yt(() => {
  16180. O(l);
  16181. }), se(d, () => {
  16182. x.value = !!d.value.find((F) => F === s);
  16183. }, {
  16184. immediate: !0
  16185. });
  16186. const w = L(() => h.value || t.disabled), P = L(() => b.value.includes(s)), $ = L(() => {
  16187. const F = `${f.value}-item`;
  16188. return {
  16189. [`${F}`]: !0,
  16190. [`${F}-danger`]: t.danger,
  16191. [`${F}-active`]: x.value,
  16192. [`${F}-selected`]: P.value,
  16193. [`${F}-disabled`]: w.value
  16194. };
  16195. }), A = (F) => ({
  16196. key: s,
  16197. eventKey: l,
  16198. keyPath: C.value,
  16199. eventKeyPath: [...u.value, l],
  16200. domEvent: F,
  16201. item: I(I({}, t), i)
  16202. }), D = (F) => {
  16203. if (w.value)
  16204. return;
  16205. const Q = A(F);
  16206. r("click", F), y(Q);
  16207. }, E = (F) => {
  16208. w.value || (p(C.value), r("mouseenter", F));
  16209. }, R = (F) => {
  16210. w.value || (p([]), r("mouseleave", F));
  16211. }, N = (F) => {
  16212. if (r("keydown", F), F.which === ge.ENTER) {
  16213. const Q = A(F);
  16214. r("click", F), y(Q);
  16215. }
  16216. }, V = (F) => {
  16217. p(C.value), r("focus", F);
  16218. }, z = (F, Q) => {
  16219. const Z = M("span", {
  16220. class: `${f.value}-title-content`
  16221. }, [Q]);
  16222. return (!F || Ui(Q) && Q.type === "span") && Q && g.value && S && typeof Q == "string" ? M("div", {
  16223. class: `${f.value}-inline-collapsed-noicon`
  16224. }, [Q.charAt(0)]) : Z;
  16225. }, W = YU(L(() => C.value.length));
  16226. return () => {
  16227. var F, Q, Z, ne, ee;
  16228. if (o) return null;
  16229. 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;
  16230. let X = oe;
  16231. typeof oe > "u" ? X = S && ie ? K : "" : oe === !1 && (X = "");
  16232. const H = {
  16233. title: X
  16234. };
  16235. !m.value && !g.value && (H.title = null, H.open = !1);
  16236. const G = {};
  16237. t.role === "option" && (G["aria-selected"] = P.value);
  16238. const re = (ne = t.icon) !== null && ne !== void 0 ? ne : (ee = n.icon) === null || ee === void 0 ? void 0 : ee.call(n, t);
  16239. return M(dx, j(j({}, H), {}, {
  16240. placement: v.value ? "left" : "right",
  16241. overlayClassName: `${f.value}-inline-collapsed-tooltip`
  16242. }), {
  16243. default: () => [M(Ms.Item, j(j(j({
  16244. component: "li"
  16245. }, i), {}, {
  16246. id: t.id,
  16247. style: I(I({}, i.style || {}), W.value),
  16248. class: [$.value, {
  16249. [`${i.class}`]: !!i.class,
  16250. [`${f.value}-item-only-child`]: (re ? ie + 1 : ie) === 1
  16251. }],
  16252. role: t.role || "menuitem",
  16253. tabindex: t.disabled ? null : -1,
  16254. "data-menu-id": s,
  16255. "aria-disabled": t.disabled
  16256. }, G), {}, {
  16257. onMouseenter: E,
  16258. onMouseleave: R,
  16259. onClick: D,
  16260. onKeydown: N,
  16261. onFocus: V,
  16262. title: typeof oe == "string" ? oe : void 0
  16263. }), {
  16264. default: () => [Pn(typeof re == "function" ? re(t.originItemValue) : re, {
  16265. class: `${f.value}-item-icon`
  16266. }, !1), z(re, K)]
  16267. })]
  16268. });
  16269. };
  16270. }
  16271. }), Dl = {
  16272. adjustX: 1,
  16273. adjustY: 1
  16274. }, nOe = {
  16275. topLeft: {
  16276. points: ["bl", "tl"],
  16277. overflow: Dl,
  16278. offset: [0, -7]
  16279. },
  16280. bottomLeft: {
  16281. points: ["tl", "bl"],
  16282. overflow: Dl,
  16283. offset: [0, 7]
  16284. },
  16285. leftTop: {
  16286. points: ["tr", "tl"],
  16287. overflow: Dl,
  16288. offset: [-4, 0]
  16289. },
  16290. rightTop: {
  16291. points: ["tl", "tr"],
  16292. overflow: Dl,
  16293. offset: [4, 0]
  16294. }
  16295. }, rOe = {
  16296. topLeft: {
  16297. points: ["bl", "tl"],
  16298. overflow: Dl,
  16299. offset: [0, -7]
  16300. },
  16301. bottomLeft: {
  16302. points: ["tl", "bl"],
  16303. overflow: Dl,
  16304. offset: [0, 7]
  16305. },
  16306. rightTop: {
  16307. points: ["tr", "tl"],
  16308. overflow: Dl,
  16309. offset: [-4, 0]
  16310. },
  16311. leftTop: {
  16312. points: ["tl", "tr"],
  16313. overflow: Dl,
  16314. offset: [4, 0]
  16315. }
  16316. }, iOe = {
  16317. horizontal: "bottomLeft",
  16318. vertical: "rightTop",
  16319. "vertical-left": "rightTop",
  16320. "vertical-right": "leftTop"
  16321. }, h5 = te({
  16322. compatConfig: {
  16323. MODE: 3
  16324. },
  16325. name: "PopupTrigger",
  16326. inheritAttrs: !1,
  16327. props: {
  16328. prefixCls: String,
  16329. mode: String,
  16330. visible: Boolean,
  16331. // popup: React.ReactNode;
  16332. popupClassName: String,
  16333. popupOffset: Array,
  16334. disabled: Boolean,
  16335. onVisibleChange: Function
  16336. },
  16337. slots: Object,
  16338. emits: ["visibleChange"],
  16339. setup(t, e) {
  16340. let {
  16341. slots: n,
  16342. emit: r
  16343. } = e;
  16344. const i = ae(!1), {
  16345. getPopupContainer: a,
  16346. rtl: o,
  16347. subMenuOpenDelay: s,
  16348. subMenuCloseDelay: l,
  16349. builtinPlacements: u,
  16350. triggerSubMenuAction: c,
  16351. forceSubMenuRender: f,
  16352. motion: d,
  16353. defaultMotions: h,
  16354. rootClassName: p
  16355. } = ol(), v = GU(), g = L(() => o.value ? I(I({}, rOe), u.value) : I(I({}, nOe), u.value)), m = L(() => iOe[t.mode]), y = ae();
  16356. se(() => t.visible, (O) => {
  16357. xt.cancel(y.value), y.value = xt(() => {
  16358. i.value = O;
  16359. });
  16360. }, {
  16361. immediate: !0
  16362. }), yt(() => {
  16363. xt.cancel(y.value);
  16364. });
  16365. const b = (O) => {
  16366. r("visibleChange", O);
  16367. }, _ = L(() => {
  16368. var O, S;
  16369. 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;
  16370. return C ? g0(C.name, {
  16371. css: !0
  16372. }) : void 0;
  16373. });
  16374. return () => {
  16375. const {
  16376. prefixCls: O,
  16377. popupClassName: S,
  16378. mode: x,
  16379. popupOffset: C,
  16380. disabled: T
  16381. } = t;
  16382. return M(KS, {
  16383. prefixCls: O,
  16384. popupClassName: ye(`${O}-popup`, {
  16385. [`${O}-rtl`]: o.value
  16386. }, S, p.value),
  16387. stretch: x === "horizontal" ? "minWidth" : null,
  16388. getPopupContainer: a.value,
  16389. builtinPlacements: g.value,
  16390. popupPlacement: m.value,
  16391. popupVisible: i.value,
  16392. popupAlign: C && {
  16393. offset: C
  16394. },
  16395. action: T ? [] : [c.value],
  16396. mouseEnterDelay: s.value,
  16397. mouseLeaveDelay: l.value,
  16398. onPopupVisibleChange: b,
  16399. forceRender: v || f.value,
  16400. popupAnimation: _.value
  16401. }, {
  16402. popup: n.popup,
  16403. default: n.default
  16404. });
  16405. };
  16406. }
  16407. }), oD = (t, e) => {
  16408. let {
  16409. slots: n,
  16410. attrs: r
  16411. } = e;
  16412. var i;
  16413. const {
  16414. prefixCls: a,
  16415. mode: o
  16416. } = ol();
  16417. return M("ul", j(j({}, r), {}, {
  16418. class: ye(a.value, `${a.value}-sub`, `${a.value}-${o.value === "inline" ? "inline" : "vertical"}`),
  16419. "data-menu-list": !0
  16420. }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
  16421. };
  16422. oD.displayName = "SubMenuList";
  16423. const aOe = te({
  16424. compatConfig: {
  16425. MODE: 3
  16426. },
  16427. name: "InlineSubMenuList",
  16428. inheritAttrs: !1,
  16429. props: {
  16430. id: String,
  16431. open: Boolean,
  16432. keyPath: Array
  16433. },
  16434. setup(t, e) {
  16435. let {
  16436. slots: n
  16437. } = e;
  16438. const r = L(() => "inline"), {
  16439. motion: i,
  16440. mode: a,
  16441. defaultMotions: o
  16442. } = ol(), s = L(() => a.value === r.value), l = U(!s.value), u = L(() => s.value ? t.open : !1);
  16443. se(a, () => {
  16444. s.value && (l.value = !1);
  16445. }, {
  16446. flush: "post"
  16447. });
  16448. const c = L(() => {
  16449. var f, d;
  16450. 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;
  16451. return I(I({}, p), {
  16452. appear: t.keyPath.length <= 1
  16453. });
  16454. });
  16455. return () => {
  16456. var f;
  16457. return l.value ? null : M(R1, {
  16458. mode: r.value
  16459. }, {
  16460. default: () => [M(co, c.value, {
  16461. default: () => [bi(M(oD, {
  16462. id: t.id
  16463. }, {
  16464. default: () => [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]
  16465. }), [[Bs, u.value]])]
  16466. })]
  16467. });
  16468. };
  16469. }
  16470. });
  16471. let p5 = 0;
  16472. const oOe = () => ({
  16473. icon: Y.any,
  16474. title: Y.any,
  16475. disabled: Boolean,
  16476. level: Number,
  16477. popupClassName: String,
  16478. popupOffset: Array,
  16479. internalPopupClose: Boolean,
  16480. eventKey: String,
  16481. expandIcon: Function,
  16482. theme: String,
  16483. onMouseenter: Function,
  16484. onMouseleave: Function,
  16485. onTitleClick: Function,
  16486. // Internal user prop
  16487. originItemValue: $t()
  16488. }), Ph = te({
  16489. compatConfig: {
  16490. MODE: 3
  16491. },
  16492. name: "ASubMenu",
  16493. inheritAttrs: !1,
  16494. props: oOe(),
  16495. slots: Object,
  16496. setup(t, e) {
  16497. let {
  16498. slots: n,
  16499. attrs: r,
  16500. emit: i
  16501. } = e;
  16502. var a, o;
  16503. ZU(!1);
  16504. const s = aD(), l = vn(), u = typeof l.vnode.key == "symbol" ? String(l.vnode.key) : l.vnode.key;
  16505. Qi(typeof l.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
  16506. const c = r2(u) ? u : `sub_menu_${++p5}_$$_not_set_key`, f = (a = t.eventKey) !== null && a !== void 0 ? a : r2(u) ? `sub_menu_${++p5}_$$_${u}` : c, {
  16507. parentEventKeys: d,
  16508. parentInfo: h,
  16509. parentKeys: p
  16510. } = iD(), v = L(() => [...p.value, c]), g = ae([]), m = {
  16511. eventKey: f,
  16512. key: c,
  16513. parentEventKeys: d,
  16514. childrenEventKeys: g,
  16515. parentKeys: p
  16516. };
  16517. (o = h.childrenEventKeys) === null || o === void 0 || o.value.push(f), yt(() => {
  16518. var he;
  16519. h.childrenEventKeys && (h.childrenEventKeys.value = (he = h.childrenEventKeys) === null || he === void 0 ? void 0 : he.value.filter((Te) => Te != f));
  16520. }), J1e(f, c, m);
  16521. const {
  16522. prefixCls: y,
  16523. activeKeys: b,
  16524. disabled: _,
  16525. changeActiveKeys: O,
  16526. mode: S,
  16527. inlineCollapsed: x,
  16528. openKeys: C,
  16529. overflowDisabled: T,
  16530. onOpenChange: w,
  16531. registerMenuInfo: P,
  16532. unRegisterMenuInfo: $,
  16533. selectedSubMenuKeys: A,
  16534. expandIcon: D,
  16535. theme: E
  16536. } = ol(), R = u != null, N = !s && (GU() || !R);
  16537. U1e(N), (s && R || !s && !R || N) && (P(f, m), yt(() => {
  16538. $(f);
  16539. }));
  16540. const V = L(() => `${y.value}-submenu`), z = 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);
  16541. se(b, () => {
  16542. ee.value = !!b.value.find((he) => he === c);
  16543. }, {
  16544. immediate: !0
  16545. });
  16546. const oe = (he) => {
  16547. z.value || (i("titleClick", he, c), S.value === "inline" && w(c, !Q.value));
  16548. }, K = (he) => {
  16549. z.value || (O(v.value), i("mouseenter", he));
  16550. }, ie = (he) => {
  16551. z.value || (O([]), i("mouseleave", he));
  16552. }, X = YU(L(() => v.value.length)), H = (he) => {
  16553. S.value !== "inline" && w(c, he);
  16554. }, G = () => {
  16555. O(v.value);
  16556. }, re = f && `${f}-popup`, fe = L(() => ye(y.value, `${y.value}-${t.theme || E.value}`, t.popupClassName)), de = (he, Te) => {
  16557. if (!Te)
  16558. return x.value && !p.value.length && he && typeof he == "string" ? M("div", {
  16559. class: `${y.value}-inline-collapsed-noicon`
  16560. }, [he.charAt(0)]) : M("span", {
  16561. class: `${y.value}-title-content`
  16562. }, [he]);
  16563. const ze = Ui(he) && he.type === "span";
  16564. return M(wt, null, [Pn(typeof Te == "function" ? Te(t.originItemValue) : Te, {
  16565. class: `${y.value}-item-icon`
  16566. }, !1), ze ? he : M("span", {
  16567. class: `${y.value}-title-content`
  16568. }, [he])]);
  16569. }, 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 = () => {
  16570. var he, Te;
  16571. 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(IS(n, t, "title"), ut);
  16572. return M("div", {
  16573. style: X.value,
  16574. class: `${ze}-title`,
  16575. tabindex: z.value ? null : -1,
  16576. ref: W,
  16577. title: typeof Dt == "string" ? Dt : null,
  16578. "data-menu-id": c,
  16579. "aria-expanded": Z.value,
  16580. "aria-haspopup": !0,
  16581. "aria-controls": re,
  16582. "aria-disabled": z.value,
  16583. onClick: oe,
  16584. onFocus: G
  16585. }, [Dt, S.value !== "horizontal" && ct ? ct(I(I({}, t), {
  16586. isOpen: Z.value
  16587. })) : M("i", {
  16588. class: `${ze}-arrow`
  16589. }, null)]);
  16590. };
  16591. return () => {
  16592. var he;
  16593. if (s)
  16594. return R ? (he = n.default) === null || he === void 0 ? void 0 : he.call(n) : null;
  16595. const Te = V.value;
  16596. let ze = () => null;
  16597. if (!T.value && S.value !== "inline") {
  16598. const ut = S.value === "horizontal" ? [0, 8] : [10, 0];
  16599. ze = () => M(h5, {
  16600. mode: Ee.value,
  16601. prefixCls: Te,
  16602. visible: !t.internalPopupClose && Z.value,
  16603. popupClassName: fe.value,
  16604. popupOffset: t.popupOffset || ut,
  16605. disabled: z.value,
  16606. onVisibleChange: H
  16607. }, {
  16608. default: () => [be()],
  16609. popup: () => M(R1, {
  16610. mode: Se.value
  16611. }, {
  16612. default: () => [M(oD, {
  16613. id: re,
  16614. ref: F
  16615. }, {
  16616. default: n.default
  16617. })]
  16618. })
  16619. });
  16620. } else
  16621. ze = () => M(h5, null, {
  16622. default: be
  16623. });
  16624. return M(R1, {
  16625. mode: $e.value
  16626. }, {
  16627. default: () => [M(Ms.Item, j(j({
  16628. component: "li"
  16629. }, r), {}, {
  16630. role: "none",
  16631. class: ye(Te, `${Te}-${S.value}`, r.class, {
  16632. [`${Te}-open`]: Z.value,
  16633. [`${Te}-active`]: ee.value,
  16634. [`${Te}-selected`]: ne.value,
  16635. [`${Te}-disabled`]: z.value
  16636. }),
  16637. onMouseenter: K,
  16638. onMouseleave: ie,
  16639. "data-submenu-id": c
  16640. }), {
  16641. default: () => M(wt, null, [ze(), !T.value && M(aOe, {
  16642. id: re,
  16643. open: Z.value,
  16644. keyPath: v.value
  16645. }, {
  16646. default: n.default
  16647. })])
  16648. })]
  16649. });
  16650. };
  16651. }
  16652. });
  16653. function qU(t, e) {
  16654. return t.classList ? t.classList.contains(e) : ` ${t.className} `.indexOf(` ${e} `) > -1;
  16655. }
  16656. function v5(t, e) {
  16657. t.classList ? t.classList.add(e) : qU(t, e) || (t.className = `${t.className} ${e}`);
  16658. }
  16659. function g5(t, e) {
  16660. if (t.classList)
  16661. t.classList.remove(e);
  16662. else if (qU(t, e)) {
  16663. const n = t.className;
  16664. t.className = ` ${n} `.replace(` ${e} `, " ");
  16665. }
  16666. }
  16667. const sD = function() {
  16668. 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;
  16669. return {
  16670. name: t,
  16671. appear: e,
  16672. css: !0,
  16673. onBeforeEnter: (n) => {
  16674. n.style.height = "0px", n.style.opacity = "0", v5(n, t);
  16675. },
  16676. onEnter: (n) => {
  16677. Tt(() => {
  16678. n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
  16679. });
  16680. },
  16681. onAfterEnter: (n) => {
  16682. n && (g5(n, t), n.style.height = null, n.style.opacity = null);
  16683. },
  16684. onBeforeLeave: (n) => {
  16685. v5(n, t), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
  16686. },
  16687. onLeave: (n) => {
  16688. setTimeout(() => {
  16689. n.style.height = "0px", n.style.opacity = "0";
  16690. });
  16691. },
  16692. onAfterLeave: (n) => {
  16693. n && (g5(n, t), n.style && (n.style.height = null, n.style.opacity = null));
  16694. }
  16695. };
  16696. }, sOe = () => ({
  16697. title: Y.any,
  16698. // Internal user prop
  16699. originItemValue: $t()
  16700. }), k1 = te({
  16701. compatConfig: {
  16702. MODE: 3
  16703. },
  16704. name: "AMenuItemGroup",
  16705. inheritAttrs: !1,
  16706. props: sOe(),
  16707. slots: Object,
  16708. setup(t, e) {
  16709. let {
  16710. slots: n,
  16711. attrs: r
  16712. } = e;
  16713. const {
  16714. prefixCls: i
  16715. } = ol(), a = L(() => `${i.value}-item-group`), o = aD();
  16716. return () => {
  16717. var s, l;
  16718. return o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : M("li", j(j({}, r), {}, {
  16719. onClick: (u) => u.stopPropagation(),
  16720. class: a.value
  16721. }), [M("div", {
  16722. title: typeof t.title == "string" ? t.title : void 0,
  16723. class: `${a.value}-title`
  16724. }, [IS(n, t, "title")]), M("ul", {
  16725. class: `${a.value}-list`
  16726. }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)])]);
  16727. };
  16728. }
  16729. }), lOe = () => ({
  16730. prefixCls: String,
  16731. dashed: Boolean
  16732. }), L1 = te({
  16733. compatConfig: {
  16734. MODE: 3
  16735. },
  16736. name: "AMenuDivider",
  16737. props: lOe(),
  16738. setup(t) {
  16739. const {
  16740. prefixCls: e
  16741. } = ol(), n = L(() => ({
  16742. [`${e.value}-item-divider`]: !0,
  16743. [`${e.value}-item-divider-dashed`]: !!t.dashed
  16744. }));
  16745. return () => M("li", {
  16746. class: n.value
  16747. }, null);
  16748. }
  16749. });
  16750. var uOe = function(t, e) {
  16751. var n = {};
  16752. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  16753. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  16754. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  16755. return n;
  16756. };
  16757. function N2(t, e, n) {
  16758. return (t || []).map((r, i) => {
  16759. if (r && typeof r == "object") {
  16760. const a = r, {
  16761. label: o,
  16762. children: s,
  16763. key: l,
  16764. type: u
  16765. } = a, c = uOe(a, ["label", "children", "key", "type"]), f = l ?? `tmp-${i}`, d = n ? n.parentKeys.slice() : [], h = [], p = {
  16766. eventKey: f,
  16767. key: f,
  16768. parentEventKeys: U(d),
  16769. parentKeys: U(d),
  16770. childrenEventKeys: U(h),
  16771. isLeaf: !1
  16772. };
  16773. if (s || u === "group") {
  16774. if (u === "group") {
  16775. const g = N2(s, e, n);
  16776. return M(k1, j(j({
  16777. key: f
  16778. }, c), {}, {
  16779. title: o,
  16780. originItemValue: r
  16781. }), {
  16782. default: () => [g]
  16783. });
  16784. }
  16785. e.set(f, p), n && n.childrenEventKeys.push(f);
  16786. const v = N2(s, e, {
  16787. childrenEventKeys: h,
  16788. parentKeys: [].concat(d, f)
  16789. });
  16790. return M(Ph, j(j({
  16791. key: f
  16792. }, c), {}, {
  16793. title: o,
  16794. originItemValue: r
  16795. }), {
  16796. default: () => [v]
  16797. });
  16798. }
  16799. return u === "divider" ? M(L1, j({
  16800. key: f
  16801. }, c), null) : (p.isLeaf = !0, e.set(f, p), M(Th, j(j({
  16802. key: f
  16803. }, c), {}, {
  16804. originItemValue: r
  16805. }), {
  16806. default: () => [o]
  16807. }));
  16808. }
  16809. return null;
  16810. }).filter((r) => r);
  16811. }
  16812. function cOe(t) {
  16813. const e = ae([]), n = ae(!1), r = ae(/* @__PURE__ */ new Map());
  16814. return se(() => t.items, () => {
  16815. const i = /* @__PURE__ */ new Map();
  16816. n.value = !1, t.items ? (n.value = !0, e.value = N2(t.items, i)) : e.value = void 0, r.value = i;
  16817. }, {
  16818. immediate: !0,
  16819. deep: !0
  16820. }), {
  16821. itemsNodes: e,
  16822. store: r,
  16823. hasItmes: n
  16824. };
  16825. }
  16826. const fOe = (t) => {
  16827. const {
  16828. componentCls: e,
  16829. motionDurationSlow: n,
  16830. menuHorizontalHeight: r,
  16831. colorSplit: i,
  16832. lineWidth: a,
  16833. lineType: o,
  16834. menuItemPaddingInline: s
  16835. } = t;
  16836. return {
  16837. [`${e}-horizontal`]: {
  16838. lineHeight: `${r}px`,
  16839. border: 0,
  16840. borderBottom: `${a}px ${o} ${i}`,
  16841. boxShadow: "none",
  16842. "&::after": {
  16843. display: "block",
  16844. clear: "both",
  16845. height: 0,
  16846. content: '"\\20"'
  16847. },
  16848. // ======================= Item =======================
  16849. [`${e}-item, ${e}-submenu`]: {
  16850. position: "relative",
  16851. display: "inline-block",
  16852. verticalAlign: "bottom",
  16853. paddingInline: s
  16854. },
  16855. [`> ${e}-item:hover,
  16856. > ${e}-item-active,
  16857. > ${e}-submenu ${e}-submenu-title:hover`]: {
  16858. backgroundColor: "transparent"
  16859. },
  16860. [`${e}-item, ${e}-submenu-title`]: {
  16861. transition: [`border-color ${n}`, `background ${n}`].join(",")
  16862. },
  16863. // ===================== Sub Menu =====================
  16864. [`${e}-submenu-arrow`]: {
  16865. display: "none"
  16866. }
  16867. }
  16868. };
  16869. }, dOe = (t) => {
  16870. let {
  16871. componentCls: e,
  16872. menuArrowOffset: n
  16873. } = t;
  16874. return {
  16875. [`${e}-rtl`]: {
  16876. direction: "rtl"
  16877. },
  16878. [`${e}-submenu-rtl`]: {
  16879. transformOrigin: "100% 0"
  16880. },
  16881. // Vertical Arrow
  16882. [`${e}-rtl${e}-vertical,
  16883. ${e}-submenu-rtl ${e}-vertical`]: {
  16884. [`${e}-submenu-arrow`]: {
  16885. "&::before": {
  16886. transform: `rotate(-45deg) translateY(-${n})`
  16887. },
  16888. "&::after": {
  16889. transform: `rotate(45deg) translateY(${n})`
  16890. }
  16891. }
  16892. }
  16893. };
  16894. }, m5 = (t) => I({}, d0(t)), y5 = (t, e) => {
  16895. const {
  16896. componentCls: n,
  16897. colorItemText: r,
  16898. colorItemTextSelected: i,
  16899. colorGroupTitle: a,
  16900. colorItemBg: o,
  16901. colorSubItemBg: s,
  16902. colorItemBgSelected: l,
  16903. colorActiveBarHeight: u,
  16904. colorActiveBarWidth: c,
  16905. colorActiveBarBorderSize: f,
  16906. motionDurationSlow: d,
  16907. motionEaseInOut: h,
  16908. motionEaseOut: p,
  16909. menuItemPaddingInline: v,
  16910. motionDurationMid: g,
  16911. colorItemTextHover: m,
  16912. lineType: y,
  16913. colorSplit: b,
  16914. // Disabled
  16915. colorItemTextDisabled: _,
  16916. // Danger
  16917. colorDangerItemText: O,
  16918. colorDangerItemTextHover: S,
  16919. colorDangerItemTextSelected: x,
  16920. colorDangerItemBgActive: C,
  16921. colorDangerItemBgSelected: T,
  16922. colorItemBgHover: w,
  16923. menuSubMenuBg: P,
  16924. // Horizontal
  16925. colorItemTextSelectedHorizontal: $,
  16926. colorItemBgSelectedHorizontal: A
  16927. } = t;
  16928. return {
  16929. [`${n}-${e}`]: {
  16930. color: r,
  16931. background: o,
  16932. [`&${n}-root:focus-visible`]: I({}, m5(t)),
  16933. // ======================== Item ========================
  16934. [`${n}-item-group-title`]: {
  16935. color: a
  16936. },
  16937. [`${n}-submenu-selected`]: {
  16938. [`> ${n}-submenu-title`]: {
  16939. color: i
  16940. }
  16941. },
  16942. // Disabled
  16943. [`${n}-item-disabled, ${n}-submenu-disabled`]: {
  16944. color: `${_} !important`
  16945. },
  16946. // Hover
  16947. [`${n}-item:hover, ${n}-submenu-title:hover`]: {
  16948. [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
  16949. color: m
  16950. }
  16951. },
  16952. [`&:not(${n}-horizontal)`]: {
  16953. [`${n}-item:not(${n}-item-selected)`]: {
  16954. "&:hover": {
  16955. backgroundColor: w
  16956. },
  16957. "&:active": {
  16958. backgroundColor: l
  16959. }
  16960. },
  16961. [`${n}-submenu-title`]: {
  16962. "&:hover": {
  16963. backgroundColor: w
  16964. },
  16965. "&:active": {
  16966. backgroundColor: l
  16967. }
  16968. }
  16969. },
  16970. // Danger - only Item has
  16971. [`${n}-item-danger`]: {
  16972. color: O,
  16973. [`&${n}-item:hover`]: {
  16974. [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
  16975. color: S
  16976. }
  16977. },
  16978. [`&${n}-item:active`]: {
  16979. background: C
  16980. }
  16981. },
  16982. [`${n}-item a`]: {
  16983. "&, &:hover": {
  16984. color: "inherit"
  16985. }
  16986. },
  16987. [`${n}-item-selected`]: {
  16988. color: i,
  16989. // Danger
  16990. [`&${n}-item-danger`]: {
  16991. color: x
  16992. },
  16993. "a, a:hover": {
  16994. color: "inherit"
  16995. }
  16996. },
  16997. [`& ${n}-item-selected`]: {
  16998. backgroundColor: l,
  16999. // Danger
  17000. [`&${n}-item-danger`]: {
  17001. backgroundColor: T
  17002. }
  17003. },
  17004. [`${n}-item, ${n}-submenu-title`]: {
  17005. [`&:not(${n}-item-disabled):focus-visible`]: I({}, m5(t))
  17006. },
  17007. [`&${n}-submenu > ${n}`]: {
  17008. backgroundColor: P
  17009. },
  17010. [`&${n}-popup > ${n}`]: {
  17011. backgroundColor: o
  17012. },
  17013. // ====================== Horizontal ======================
  17014. [`&${n}-horizontal`]: I(I({}, e === "dark" ? {
  17015. borderBottom: 0
  17016. } : {}), {
  17017. [`> ${n}-item, > ${n}-submenu`]: {
  17018. top: f,
  17019. marginTop: -f,
  17020. marginBottom: 0,
  17021. borderRadius: 0,
  17022. "&::after": {
  17023. position: "absolute",
  17024. insetInline: v,
  17025. bottom: 0,
  17026. borderBottom: `${u}px solid transparent`,
  17027. transition: `border-color ${d} ${h}`,
  17028. content: '""'
  17029. },
  17030. "&:hover, &-active, &-open": {
  17031. "&::after": {
  17032. borderBottomWidth: u,
  17033. borderBottomColor: $
  17034. }
  17035. },
  17036. "&-selected": {
  17037. color: $,
  17038. backgroundColor: A,
  17039. "&::after": {
  17040. borderBottomWidth: u,
  17041. borderBottomColor: $
  17042. }
  17043. }
  17044. }
  17045. }),
  17046. // ================== Inline & Vertical ===================
  17047. //
  17048. [`&${n}-root`]: {
  17049. [`&${n}-inline, &${n}-vertical`]: {
  17050. borderInlineEnd: `${f}px ${y} ${b}`
  17051. }
  17052. },
  17053. // ======================== Inline ========================
  17054. [`&${n}-inline`]: {
  17055. // Sub
  17056. [`${n}-sub${n}-inline`]: {
  17057. background: s
  17058. },
  17059. // Item
  17060. [`${n}-item, ${n}-submenu-title`]: f && c ? {
  17061. width: `calc(100% + ${f}px)`
  17062. } : {},
  17063. [`${n}-item`]: {
  17064. position: "relative",
  17065. "&::after": {
  17066. position: "absolute",
  17067. insetBlock: 0,
  17068. insetInlineEnd: 0,
  17069. borderInlineEnd: `${c}px solid ${i}`,
  17070. transform: "scaleY(0.0001)",
  17071. opacity: 0,
  17072. transition: [`transform ${g} ${p}`, `opacity ${g} ${p}`].join(","),
  17073. content: '""'
  17074. },
  17075. // Danger
  17076. [`&${n}-item-danger`]: {
  17077. "&::after": {
  17078. borderInlineEndColor: x
  17079. }
  17080. }
  17081. },
  17082. [`${n}-selected, ${n}-item-selected`]: {
  17083. "&::after": {
  17084. transform: "scaleY(1)",
  17085. opacity: 1,
  17086. transition: [`transform ${g} ${h}`, `opacity ${g} ${h}`].join(",")
  17087. }
  17088. }
  17089. }
  17090. }
  17091. };
  17092. }, b5 = (t) => {
  17093. const {
  17094. componentCls: e,
  17095. menuItemHeight: n,
  17096. itemMarginInline: r,
  17097. padding: i,
  17098. menuArrowSize: a,
  17099. marginXS: o,
  17100. marginXXS: s
  17101. } = t, l = i + a + o;
  17102. return {
  17103. [`${e}-item`]: {
  17104. position: "relative"
  17105. },
  17106. [`${e}-item, ${e}-submenu-title`]: {
  17107. height: n,
  17108. lineHeight: `${n}px`,
  17109. paddingInline: i,
  17110. overflow: "hidden",
  17111. textOverflow: "ellipsis",
  17112. marginInline: r,
  17113. marginBlock: s,
  17114. width: `calc(100% - ${r * 2}px)`
  17115. },
  17116. // disable margin collapsed
  17117. [`${e}-submenu`]: {
  17118. paddingBottom: 0.02
  17119. },
  17120. [`> ${e}-item,
  17121. > ${e}-submenu > ${e}-submenu-title`]: {
  17122. height: n,
  17123. lineHeight: `${n}px`
  17124. },
  17125. [`${e}-item-group-list ${e}-submenu-title,
  17126. ${e}-submenu-title`]: {
  17127. paddingInlineEnd: l
  17128. }
  17129. };
  17130. }, hOe = (t) => {
  17131. const {
  17132. componentCls: e,
  17133. iconCls: n,
  17134. menuItemHeight: r,
  17135. colorTextLightSolid: i,
  17136. dropdownWidth: a,
  17137. controlHeightLG: o,
  17138. motionDurationMid: s,
  17139. motionEaseOut: l,
  17140. paddingXL: u,
  17141. fontSizeSM: c,
  17142. fontSizeLG: f,
  17143. motionDurationSlow: d,
  17144. paddingXS: h,
  17145. boxShadowSecondary: p
  17146. } = t, v = {
  17147. height: r,
  17148. lineHeight: `${r}px`,
  17149. listStylePosition: "inside",
  17150. listStyleType: "disc"
  17151. };
  17152. return [
  17153. {
  17154. [e]: {
  17155. "&-inline, &-vertical": I({
  17156. [`&${e}-root`]: {
  17157. boxShadow: "none"
  17158. }
  17159. }, b5(t))
  17160. },
  17161. [`${e}-submenu-popup`]: {
  17162. [`${e}-vertical`]: I(I({}, b5(t)), {
  17163. boxShadow: p
  17164. })
  17165. }
  17166. },
  17167. // Vertical only
  17168. {
  17169. [`${e}-submenu-popup ${e}-vertical${e}-sub`]: {
  17170. minWidth: a,
  17171. maxHeight: `calc(100vh - ${o * 2.5}px)`,
  17172. padding: "0",
  17173. overflow: "hidden",
  17174. borderInlineEnd: 0,
  17175. // https://github.com/ant-design/ant-design/issues/22244
  17176. // https://github.com/ant-design/ant-design/issues/26812
  17177. "&:not([class*='-active'])": {
  17178. overflowX: "hidden",
  17179. overflowY: "auto"
  17180. }
  17181. }
  17182. },
  17183. // Inline Only
  17184. {
  17185. [`${e}-inline`]: {
  17186. width: "100%",
  17187. // Motion enhance for first level
  17188. [`&${e}-root`]: {
  17189. [`${e}-item, ${e}-submenu-title`]: {
  17190. display: "flex",
  17191. alignItems: "center",
  17192. transition: [`border-color ${d}`, `background ${d}`, `padding ${s} ${l}`].join(","),
  17193. [`> ${e}-title-content`]: {
  17194. flex: "auto",
  17195. minWidth: 0,
  17196. overflow: "hidden",
  17197. textOverflow: "ellipsis"
  17198. },
  17199. "> *": {
  17200. flex: "none"
  17201. }
  17202. }
  17203. },
  17204. // >>>>> Sub
  17205. [`${e}-sub${e}-inline`]: {
  17206. padding: 0,
  17207. border: 0,
  17208. borderRadius: 0,
  17209. boxShadow: "none",
  17210. [`& > ${e}-submenu > ${e}-submenu-title`]: v,
  17211. [`& ${e}-item-group-title`]: {
  17212. paddingInlineStart: u
  17213. }
  17214. },
  17215. // >>>>> Item
  17216. [`${e}-item`]: v
  17217. }
  17218. },
  17219. // Inline Collapse Only
  17220. {
  17221. [`${e}-inline-collapsed`]: {
  17222. width: r * 2,
  17223. [`&${e}-root`]: {
  17224. [`${e}-item, ${e}-submenu ${e}-submenu-title`]: {
  17225. [`> ${e}-inline-collapsed-noicon`]: {
  17226. fontSize: f,
  17227. textAlign: "center"
  17228. }
  17229. }
  17230. },
  17231. [`> ${e}-item,
  17232. > ${e}-item-group > ${e}-item-group-list > ${e}-item,
  17233. > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
  17234. > ${e}-submenu > ${e}-submenu-title`]: {
  17235. insetInlineStart: 0,
  17236. paddingInline: `calc(50% - ${c}px)`,
  17237. textOverflow: "clip",
  17238. [`
  17239. ${e}-submenu-arrow,
  17240. ${e}-submenu-expand-icon
  17241. `]: {
  17242. opacity: 0
  17243. },
  17244. [`${e}-item-icon, ${n}`]: {
  17245. margin: 0,
  17246. fontSize: f,
  17247. lineHeight: `${r}px`,
  17248. "+ span": {
  17249. display: "inline-block",
  17250. opacity: 0
  17251. }
  17252. }
  17253. },
  17254. [`${e}-item-icon, ${n}`]: {
  17255. display: "inline-block"
  17256. },
  17257. "&-tooltip": {
  17258. pointerEvents: "none",
  17259. [`${e}-item-icon, ${n}`]: {
  17260. display: "none"
  17261. },
  17262. "a, a:hover": {
  17263. color: i
  17264. }
  17265. },
  17266. [`${e}-item-group-title`]: I(I({}, mh), {
  17267. paddingInline: h
  17268. })
  17269. }
  17270. }
  17271. ];
  17272. }, _5 = (t) => {
  17273. const {
  17274. componentCls: e,
  17275. fontSize: n,
  17276. motionDurationSlow: r,
  17277. motionDurationMid: i,
  17278. motionEaseInOut: a,
  17279. motionEaseOut: o,
  17280. iconCls: s,
  17281. controlHeightSM: l
  17282. } = t;
  17283. return {
  17284. // >>>>> Item
  17285. [`${e}-item, ${e}-submenu-title`]: {
  17286. position: "relative",
  17287. display: "block",
  17288. margin: 0,
  17289. whiteSpace: "nowrap",
  17290. cursor: "pointer",
  17291. transition: [`border-color ${r}`, `background ${r}`, `padding ${r} ${a}`].join(","),
  17292. [`${e}-item-icon, ${s}`]: {
  17293. minWidth: n,
  17294. fontSize: n,
  17295. transition: [`font-size ${i} ${o}`, `margin ${r} ${a}`, `color ${r}`].join(","),
  17296. "+ span": {
  17297. marginInlineStart: l - n,
  17298. opacity: 1,
  17299. transition: [`opacity ${r} ${a}`, `margin ${r}`, `color ${r}`].join(",")
  17300. }
  17301. },
  17302. [`${e}-item-icon`]: I({}, ip()),
  17303. [`&${e}-item-only-child`]: {
  17304. [`> ${s}, > ${e}-item-icon`]: {
  17305. marginInlineEnd: 0
  17306. }
  17307. }
  17308. },
  17309. // Disabled state sets text to gray and nukes hover/tab effects
  17310. [`${e}-item-disabled, ${e}-submenu-disabled`]: {
  17311. background: "none !important",
  17312. cursor: "not-allowed",
  17313. "&::after": {
  17314. borderColor: "transparent !important"
  17315. },
  17316. a: {
  17317. color: "inherit !important"
  17318. },
  17319. [`> ${e}-submenu-title`]: {
  17320. color: "inherit !important",
  17321. cursor: "not-allowed"
  17322. }
  17323. }
  17324. };
  17325. }, O5 = (t) => {
  17326. const {
  17327. componentCls: e,
  17328. motionDurationSlow: n,
  17329. motionEaseInOut: r,
  17330. borderRadius: i,
  17331. menuArrowSize: a,
  17332. menuArrowOffset: o
  17333. } = t;
  17334. return {
  17335. [`${e}-submenu`]: {
  17336. "&-expand-icon, &-arrow": {
  17337. position: "absolute",
  17338. top: "50%",
  17339. insetInlineEnd: t.margin,
  17340. width: a,
  17341. color: "currentcolor",
  17342. transform: "translateY(-50%)",
  17343. transition: `transform ${n} ${r}, opacity ${n}`
  17344. },
  17345. "&-arrow": {
  17346. // →
  17347. "&::before, &::after": {
  17348. position: "absolute",
  17349. width: a * 0.6,
  17350. height: a * 0.15,
  17351. backgroundColor: "currentcolor",
  17352. borderRadius: i,
  17353. transition: [`background ${n} ${r}`, `transform ${n} ${r}`, `top ${n} ${r}`, `color ${n} ${r}`].join(","),
  17354. content: '""'
  17355. },
  17356. "&::before": {
  17357. transform: `rotate(45deg) translateY(-${o})`
  17358. },
  17359. "&::after": {
  17360. transform: `rotate(-45deg) translateY(${o})`
  17361. }
  17362. }
  17363. }
  17364. };
  17365. }, pOe = (t) => {
  17366. const {
  17367. antCls: e,
  17368. componentCls: n,
  17369. fontSize: r,
  17370. motionDurationSlow: i,
  17371. motionDurationMid: a,
  17372. motionEaseInOut: o,
  17373. lineHeight: s,
  17374. paddingXS: l,
  17375. padding: u,
  17376. colorSplit: c,
  17377. lineWidth: f,
  17378. zIndexPopup: d,
  17379. borderRadiusLG: h,
  17380. radiusSubMenuItem: p,
  17381. menuArrowSize: v,
  17382. menuArrowOffset: g,
  17383. lineType: m,
  17384. menuPanelMaskInset: y
  17385. } = t;
  17386. return [
  17387. // Misc
  17388. {
  17389. "": {
  17390. [`${n}`]: I(I({}, _1()), {
  17391. // Hidden
  17392. "&-hidden": {
  17393. display: "none"
  17394. }
  17395. })
  17396. },
  17397. [`${n}-submenu-hidden`]: {
  17398. display: "none"
  17399. }
  17400. },
  17401. {
  17402. [n]: I(I(I(I(I(I(I({}, nn(t)), _1()), {
  17403. marginBottom: 0,
  17404. paddingInlineStart: 0,
  17405. // Override default ul/ol
  17406. fontSize: r,
  17407. lineHeight: 0,
  17408. listStyle: "none",
  17409. outline: "none",
  17410. transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
  17411. "ul, ol": {
  17412. margin: 0,
  17413. padding: 0,
  17414. listStyle: "none"
  17415. },
  17416. // Overflow ellipsis
  17417. "&-overflow": {
  17418. display: "flex",
  17419. [`${n}-item`]: {
  17420. flex: "none"
  17421. }
  17422. },
  17423. [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
  17424. borderRadius: t.radiusItem
  17425. },
  17426. [`${n}-item-group-title`]: {
  17427. padding: `${l}px ${u}px`,
  17428. fontSize: r,
  17429. lineHeight: s,
  17430. transition: `all ${i}`
  17431. },
  17432. [`&-horizontal ${n}-submenu`]: {
  17433. transition: [`border-color ${i} ${o}`, `background ${i} ${o}`].join(",")
  17434. },
  17435. [`${n}-submenu, ${n}-submenu-inline`]: {
  17436. transition: [`border-color ${i} ${o}`, `background ${i} ${o}`, `padding ${a} ${o}`].join(",")
  17437. },
  17438. [`${n}-submenu ${n}-sub`]: {
  17439. cursor: "initial",
  17440. transition: [`background ${i} ${o}`, `padding ${i} ${o}`].join(",")
  17441. },
  17442. [`${n}-title-content`]: {
  17443. transition: `color ${i}`
  17444. },
  17445. [`${n}-item a`]: {
  17446. "&::before": {
  17447. position: "absolute",
  17448. inset: 0,
  17449. backgroundColor: "transparent",
  17450. content: '""'
  17451. }
  17452. },
  17453. // Removed a Badge related style seems it's safe
  17454. // https://github.com/ant-design/ant-design/issues/19809
  17455. // >>>>> Divider
  17456. [`${n}-item-divider`]: {
  17457. overflow: "hidden",
  17458. lineHeight: 0,
  17459. borderColor: c,
  17460. borderStyle: m,
  17461. borderWidth: 0,
  17462. borderTopWidth: f,
  17463. marginBlock: f,
  17464. padding: 0,
  17465. "&-dashed": {
  17466. borderStyle: "dashed"
  17467. }
  17468. }
  17469. }), _5(t)), {
  17470. [`${n}-item-group`]: {
  17471. [`${n}-item-group-list`]: {
  17472. margin: 0,
  17473. padding: 0,
  17474. [`${n}-item, ${n}-submenu-title`]: {
  17475. paddingInline: `${r * 2}px ${u}px`
  17476. }
  17477. }
  17478. },
  17479. // ======================= Sub Menu =======================
  17480. "&-submenu": {
  17481. "&-popup": {
  17482. position: "absolute",
  17483. zIndex: d,
  17484. background: "transparent",
  17485. borderRadius: h,
  17486. boxShadow: "none",
  17487. transformOrigin: "0 0",
  17488. // https://github.com/ant-design/ant-design/issues/13955
  17489. "&::before": {
  17490. position: "absolute",
  17491. inset: `${y}px 0 0`,
  17492. zIndex: -1,
  17493. width: "100%",
  17494. height: "100%",
  17495. opacity: 0,
  17496. content: '""'
  17497. }
  17498. },
  17499. // https://github.com/ant-design/ant-design/issues/13955
  17500. "&-placement-rightTop::before": {
  17501. top: 0,
  17502. insetInlineStart: y
  17503. },
  17504. [`> ${n}`]: I(I(I({
  17505. borderRadius: h
  17506. }, _5(t)), O5(t)), {
  17507. [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
  17508. borderRadius: p
  17509. },
  17510. [`${n}-submenu-title::after`]: {
  17511. transition: `transform ${i} ${o}`
  17512. }
  17513. })
  17514. }
  17515. }), O5(t)), {
  17516. [`&-inline-collapsed ${n}-submenu-arrow,
  17517. &-inline ${n}-submenu-arrow`]: {
  17518. // ↓
  17519. "&::before": {
  17520. transform: `rotate(-45deg) translateX(${g})`
  17521. },
  17522. "&::after": {
  17523. transform: `rotate(45deg) translateX(-${g})`
  17524. }
  17525. },
  17526. [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
  17527. // ↑
  17528. transform: `translateY(-${v * 0.2}px)`,
  17529. "&::after": {
  17530. transform: `rotate(-45deg) translateX(-${g})`
  17531. },
  17532. "&::before": {
  17533. transform: `rotate(45deg) translateX(${g})`
  17534. }
  17535. }
  17536. })
  17537. },
  17538. // Integration with header element so menu items have the same height
  17539. {
  17540. [`${e}-layout-header`]: {
  17541. [n]: {
  17542. lineHeight: "inherit"
  17543. }
  17544. }
  17545. }
  17546. ];
  17547. }, vOe = (t, e) => Sn("Menu", (r, i) => {
  17548. let {
  17549. overrideComponentToken: a
  17550. } = i;
  17551. if ((e == null ? void 0 : e.value) === !1)
  17552. return [];
  17553. const {
  17554. colorBgElevated: o,
  17555. colorPrimary: s,
  17556. colorError: l,
  17557. colorErrorHover: u,
  17558. colorTextLightSolid: c
  17559. } = r, {
  17560. controlHeightLG: f,
  17561. fontSize: d
  17562. } = r, h = d / 7 * 5, p = Bt(r, {
  17563. menuItemHeight: f,
  17564. menuItemPaddingInline: r.margin,
  17565. menuArrowSize: h,
  17566. menuHorizontalHeight: f * 1.15,
  17567. menuArrowOffset: `${h * 0.25}px`,
  17568. menuPanelMaskInset: -7,
  17569. menuSubMenuBg: o
  17570. }), v = new en(c).setAlpha(0.65).toRgbString(), g = Bt(p, {
  17571. colorItemText: v,
  17572. colorItemTextHover: c,
  17573. colorGroupTitle: v,
  17574. colorItemTextSelected: c,
  17575. colorItemBg: "#001529",
  17576. colorSubItemBg: "#000c17",
  17577. colorItemBgActive: "transparent",
  17578. colorItemBgSelected: s,
  17579. colorActiveBarWidth: 0,
  17580. colorActiveBarHeight: 0,
  17581. colorActiveBarBorderSize: 0,
  17582. // Disabled
  17583. colorItemTextDisabled: new en(c).setAlpha(0.25).toRgbString(),
  17584. // Danger
  17585. colorDangerItemText: l,
  17586. colorDangerItemTextHover: u,
  17587. colorDangerItemTextSelected: c,
  17588. colorDangerItemBgActive: l,
  17589. colorDangerItemBgSelected: l,
  17590. menuSubMenuBg: "#001529",
  17591. // Horizontal
  17592. colorItemTextSelectedHorizontal: c,
  17593. colorItemBgSelectedHorizontal: s
  17594. }, I({}, a));
  17595. return [
  17596. // Basic
  17597. pOe(p),
  17598. // Horizontal
  17599. fOe(p),
  17600. // Vertical
  17601. hOe(p),
  17602. // Theme
  17603. y5(p, "light"),
  17604. y5(g, "dark"),
  17605. // RTL
  17606. dOe(p),
  17607. // Motion
  17608. KI(p),
  17609. Ch(p, "slide-up"),
  17610. Ch(p, "slide-down"),
  17611. ux(p, "zoom-big")
  17612. ];
  17613. }, (r) => {
  17614. const {
  17615. colorPrimary: i,
  17616. colorError: a,
  17617. colorTextDisabled: o,
  17618. colorErrorBg: s,
  17619. colorText: l,
  17620. colorTextDescription: u,
  17621. colorBgContainer: c,
  17622. colorFillAlter: f,
  17623. colorFillContent: d,
  17624. lineWidth: h,
  17625. lineWidthBold: p,
  17626. controlItemBgActive: v,
  17627. colorBgTextHover: g
  17628. } = r;
  17629. return {
  17630. dropdownWidth: 160,
  17631. zIndexPopup: r.zIndexPopupBase + 50,
  17632. radiusItem: r.borderRadiusLG,
  17633. radiusSubMenuItem: r.borderRadiusSM,
  17634. colorItemText: l,
  17635. colorItemTextHover: l,
  17636. colorItemTextHoverHorizontal: i,
  17637. colorGroupTitle: u,
  17638. colorItemTextSelected: i,
  17639. colorItemTextSelectedHorizontal: i,
  17640. colorItemBg: c,
  17641. colorItemBgHover: g,
  17642. colorItemBgActive: d,
  17643. colorSubItemBg: f,
  17644. colorItemBgSelected: v,
  17645. colorItemBgSelectedHorizontal: "transparent",
  17646. colorActiveBarWidth: 0,
  17647. colorActiveBarHeight: p,
  17648. colorActiveBarBorderSize: h,
  17649. // Disabled
  17650. colorItemTextDisabled: o,
  17651. // Danger
  17652. colorDangerItemText: a,
  17653. colorDangerItemTextHover: a,
  17654. colorDangerItemTextSelected: a,
  17655. colorDangerItemBgActive: s,
  17656. colorDangerItemBgSelected: s,
  17657. itemMarginInline: r.marginXXS
  17658. };
  17659. })(t), gOe = () => ({
  17660. id: String,
  17661. prefixCls: String,
  17662. // donot use items, now only support inner use
  17663. items: Array,
  17664. disabled: Boolean,
  17665. inlineCollapsed: Boolean,
  17666. disabledOverflow: Boolean,
  17667. forceSubMenuRender: Boolean,
  17668. openKeys: Array,
  17669. selectedKeys: Array,
  17670. activeKey: String,
  17671. selectable: {
  17672. type: Boolean,
  17673. default: !0
  17674. },
  17675. multiple: {
  17676. type: Boolean,
  17677. default: !1
  17678. },
  17679. tabindex: {
  17680. type: [Number, String]
  17681. },
  17682. motion: Object,
  17683. role: String,
  17684. theme: {
  17685. type: String,
  17686. default: "light"
  17687. },
  17688. mode: {
  17689. type: String,
  17690. default: "vertical"
  17691. },
  17692. inlineIndent: {
  17693. type: Number,
  17694. default: 24
  17695. },
  17696. subMenuOpenDelay: {
  17697. type: Number,
  17698. default: 0
  17699. },
  17700. subMenuCloseDelay: {
  17701. type: Number,
  17702. default: 0.1
  17703. },
  17704. builtinPlacements: {
  17705. type: Object
  17706. },
  17707. triggerSubMenuAction: {
  17708. type: String,
  17709. default: "hover"
  17710. },
  17711. getPopupContainer: Function,
  17712. expandIcon: Function,
  17713. onOpenChange: Function,
  17714. onSelect: Function,
  17715. onDeselect: Function,
  17716. onClick: [Function, Array],
  17717. onFocus: Function,
  17718. onBlur: Function,
  17719. onMousedown: Function,
  17720. "onUpdate:openKeys": Function,
  17721. "onUpdate:selectedKeys": Function,
  17722. "onUpdate:activeKey": Function
  17723. }), S5 = [], jl = te({
  17724. compatConfig: {
  17725. MODE: 3
  17726. },
  17727. name: "AMenu",
  17728. inheritAttrs: !1,
  17729. props: gOe(),
  17730. slots: Object,
  17731. setup(t, e) {
  17732. let {
  17733. slots: n,
  17734. emit: r,
  17735. attrs: i
  17736. } = e;
  17737. const {
  17738. direction: a,
  17739. getPrefixCls: o
  17740. } = It("menu", t), s = FU(), l = L(() => {
  17741. var K;
  17742. return o("menu", t.prefixCls || ((K = s == null ? void 0 : s.prefixCls) === null || K === void 0 ? void 0 : K.value));
  17743. }), [u, c] = vOe(l, L(() => !s)), f = ae(/* @__PURE__ */ new Map()), d = Ge(q1e, U(void 0)), h = L(() => d.value !== void 0 ? d.value : t.inlineCollapsed), {
  17744. itemsNodes: p
  17745. } = cOe(t), v = ae(!1);
  17746. it(() => {
  17747. v.value = !0;
  17748. }), ht(() => {
  17749. Qi(!(t.inlineCollapsed === !0 && t.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), Qi(!(d.value !== void 0 && t.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
  17750. });
  17751. const g = U([]), m = U([]), y = U({});
  17752. se(f, () => {
  17753. const K = {};
  17754. for (const ie of f.value.values())
  17755. K[ie.key] = ie;
  17756. y.value = K;
  17757. }, {
  17758. flush: "post"
  17759. }), ht(() => {
  17760. if (t.activeKey !== void 0) {
  17761. let K = [];
  17762. const ie = t.activeKey ? y.value[t.activeKey] : void 0;
  17763. ie && t.activeKey !== void 0 ? K = yC([].concat(B(ie.parentKeys), t.activeKey)) : K = [], Zp(g.value, K) || (g.value = K);
  17764. }
  17765. }), se(() => t.selectedKeys, (K) => {
  17766. K && (m.value = K.slice());
  17767. }, {
  17768. immediate: !0,
  17769. deep: !0
  17770. });
  17771. const b = U([]);
  17772. se([y, m], () => {
  17773. let K = [];
  17774. m.value.forEach((ie) => {
  17775. const X = y.value[ie];
  17776. X && (K = K.concat(B(X.parentKeys)));
  17777. }), K = yC(K), Zp(b.value, K) || (b.value = K);
  17778. }, {
  17779. immediate: !0
  17780. });
  17781. const _ = (K) => {
  17782. if (t.selectable) {
  17783. const {
  17784. key: ie
  17785. } = K, X = m.value.includes(ie);
  17786. let H;
  17787. t.multiple ? X ? H = m.value.filter((re) => re !== ie) : H = [...m.value, ie] : H = [ie];
  17788. const G = I(I({}, K), {
  17789. selectedKeys: H
  17790. });
  17791. Zp(H, m.value) || (t.selectedKeys === void 0 && (m.value = H), r("update:selectedKeys", H), X && t.multiple ? r("deselect", G) : r("select", G));
  17792. }
  17793. w.value !== "inline" && !t.multiple && O.value.length && A(S5);
  17794. }, O = U([]);
  17795. se(() => t.openKeys, function() {
  17796. let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : O.value;
  17797. Zp(O.value, K) || (O.value = K.slice());
  17798. }, {
  17799. immediate: !0,
  17800. deep: !0
  17801. });
  17802. let S;
  17803. const x = (K) => {
  17804. clearTimeout(S), S = setTimeout(() => {
  17805. t.activeKey === void 0 && (g.value = K), r("update:activeKey", K[K.length - 1]);
  17806. });
  17807. }, C = L(() => !!t.disabled), T = L(() => a.value === "rtl"), w = U("vertical"), P = ae(!1);
  17808. ht(() => {
  17809. var K;
  17810. (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);
  17811. });
  17812. const $ = L(() => w.value === "inline"), A = (K) => {
  17813. O.value = K, r("update:openKeys", K), r("openChange", K);
  17814. }, D = U(O.value), E = ae(!1);
  17815. se(O, () => {
  17816. $.value && (D.value = O.value);
  17817. }, {
  17818. immediate: !0
  17819. }), se($, () => {
  17820. if (!E.value) {
  17821. E.value = !0;
  17822. return;
  17823. }
  17824. $.value ? O.value = D.value : A(S5);
  17825. }, {
  17826. immediate: !0
  17827. });
  17828. const R = L(() => ({
  17829. [`${l.value}`]: !0,
  17830. [`${l.value}-root`]: !0,
  17831. [`${l.value}-${w.value}`]: !0,
  17832. [`${l.value}-inline-collapsed`]: P.value,
  17833. [`${l.value}-rtl`]: T.value,
  17834. [`${l.value}-${t.theme}`]: !0
  17835. })), N = L(() => o()), V = L(() => ({
  17836. horizontal: {
  17837. name: `${N.value}-slide-up`
  17838. },
  17839. inline: sD(`${N.value}-motion-collapse`),
  17840. other: {
  17841. name: `${N.value}-zoom-big`
  17842. }
  17843. }));
  17844. ZU(!0);
  17845. const z = function() {
  17846. let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  17847. const ie = [], X = f.value;
  17848. return K.forEach((H) => {
  17849. const {
  17850. key: G,
  17851. childrenEventKeys: re
  17852. } = X.get(H);
  17853. ie.push(G, ...z(B(re)));
  17854. }), ie;
  17855. }, W = (K) => {
  17856. var ie;
  17857. r("click", K), _(K), (ie = s == null ? void 0 : s.onClick) === null || ie === void 0 || ie.call(s);
  17858. }, F = (K, ie) => {
  17859. var X;
  17860. const H = ((X = y.value[K]) === null || X === void 0 ? void 0 : X.childrenEventKeys) || [];
  17861. let G = O.value.filter((re) => re !== K);
  17862. if (ie)
  17863. G.push(K);
  17864. else if (w.value !== "inline") {
  17865. const re = z(B(H));
  17866. G = yC(G.filter((fe) => !re.includes(fe)));
  17867. }
  17868. Zp(O, G) || A(G);
  17869. }, Q = (K, ie) => {
  17870. f.value.set(K, ie), f.value = new Map(f.value);
  17871. }, Z = (K) => {
  17872. f.value.delete(K), f.value = new Map(f.value);
  17873. }, ne = U(0), ee = L(() => {
  17874. var K;
  17875. return t.expandIcon || n.expandIcon || !((K = s == null ? void 0 : s.expandIcon) === null || K === void 0) && K.value ? (ie) => {
  17876. let X = t.expandIcon || n.expandIcon;
  17877. return X = typeof X == "function" ? X(ie) : X, Pn(X, {
  17878. class: `${l.value}-submenu-expand-icon`
  17879. }, !1);
  17880. } : null;
  17881. });
  17882. Y1e({
  17883. prefixCls: l,
  17884. activeKeys: g,
  17885. openKeys: O,
  17886. selectedKeys: m,
  17887. changeActiveKeys: x,
  17888. disabled: C,
  17889. rtl: T,
  17890. mode: w,
  17891. inlineIndent: L(() => t.inlineIndent),
  17892. subMenuCloseDelay: L(() => t.subMenuCloseDelay),
  17893. subMenuOpenDelay: L(() => t.subMenuOpenDelay),
  17894. builtinPlacements: L(() => t.builtinPlacements),
  17895. triggerSubMenuAction: L(() => t.triggerSubMenuAction),
  17896. getPopupContainer: L(() => t.getPopupContainer),
  17897. inlineCollapsed: P,
  17898. theme: L(() => t.theme),
  17899. siderCollapsed: d,
  17900. defaultMotions: L(() => v.value ? V.value : null),
  17901. motion: L(() => v.value ? t.motion : null),
  17902. overflowDisabled: ae(void 0),
  17903. onOpenChange: F,
  17904. onItemClick: W,
  17905. registerMenuInfo: Q,
  17906. unRegisterMenuInfo: Z,
  17907. selectedSubMenuKeys: b,
  17908. expandIcon: ee,
  17909. forceSubMenuRender: L(() => t.forceSubMenuRender),
  17910. rootClassName: c
  17911. });
  17912. const oe = () => {
  17913. var K;
  17914. return p.value || Yn((K = n.default) === null || K === void 0 ? void 0 : K.call(n));
  17915. };
  17916. return () => {
  17917. var K;
  17918. const ie = oe(), X = ne.value >= ie.length - 1 || w.value !== "horizontal" || t.disabledOverflow, H = (re) => w.value !== "horizontal" || t.disabledOverflow ? re : (
  17919. // Need wrap for overflow dropdown that do not response for open
  17920. re.map((fe, de) => (
  17921. // Always wrap provider to avoid sub node re-mount
  17922. M(R1, {
  17923. key: fe.key,
  17924. overflowDisabled: de > ne.value
  17925. }, {
  17926. default: () => fe
  17927. })
  17928. ))
  17929. ), G = ((K = n.overflowedIndicator) === null || K === void 0 ? void 0 : K.call(n)) || M(hx, null, null);
  17930. return u(M(Ms, j(j({}, i), {}, {
  17931. onMousedown: t.onMousedown,
  17932. prefixCls: `${l.value}-overflow`,
  17933. component: "ul",
  17934. itemComponent: Th,
  17935. class: [R.value, i.class, c.value],
  17936. role: "menu",
  17937. id: t.id,
  17938. data: H(ie),
  17939. renderRawItem: (re) => re,
  17940. renderRawRest: (re) => {
  17941. const fe = re.length, de = fe ? ie.slice(-fe) : null;
  17942. return M(wt, null, [M(Ph, {
  17943. eventKey: My,
  17944. key: My,
  17945. title: G,
  17946. disabled: X,
  17947. internalPopupClose: fe === 0
  17948. }, {
  17949. default: () => de
  17950. }), M(d5, null, {
  17951. default: () => [M(Ph, {
  17952. eventKey: My,
  17953. key: My,
  17954. title: G,
  17955. disabled: X,
  17956. internalPopupClose: fe === 0
  17957. }, {
  17958. default: () => de
  17959. })]
  17960. })]);
  17961. },
  17962. maxCount: w.value !== "horizontal" || t.disabledOverflow ? Ms.INVALIDATE : Ms.RESPONSIVE,
  17963. ssr: "full",
  17964. "data-menu-list": !0,
  17965. onVisibleChange: (re) => {
  17966. ne.value = re;
  17967. }
  17968. }), {
  17969. default: () => [M(PS, {
  17970. to: "body"
  17971. }, {
  17972. default: () => [M("div", {
  17973. style: {
  17974. display: "none"
  17975. },
  17976. "aria-hidden": !0
  17977. }, [M(d5, null, {
  17978. default: () => [H(oe())]
  17979. })])]
  17980. })]
  17981. }));
  17982. };
  17983. }
  17984. });
  17985. jl.install = function(t) {
  17986. return t.component(jl.name, jl), t.component(Th.name, Th), t.component(Ph.name, Ph), t.component(L1.name, L1), t.component(k1.name, k1), t;
  17987. };
  17988. jl.Item = Th;
  17989. jl.Divider = L1;
  17990. jl.SubMenu = Ph;
  17991. jl.ItemGroup = k1;
  17992. var Iy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
  17993. function vx(t) {
  17994. return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
  17995. }
  17996. var mOe = function(t, e) {
  17997. var n = {};
  17998. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  17999. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  18000. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  18001. return n;
  18002. };
  18003. const yOe = {
  18004. prefixCls: String,
  18005. name: String,
  18006. id: String,
  18007. type: String,
  18008. defaultChecked: {
  18009. type: [Boolean, Number],
  18010. default: void 0
  18011. },
  18012. checked: {
  18013. type: [Boolean, Number],
  18014. default: void 0
  18015. },
  18016. disabled: Boolean,
  18017. tabindex: {
  18018. type: [Number, String]
  18019. },
  18020. readonly: Boolean,
  18021. autofocus: Boolean,
  18022. value: Y.any,
  18023. required: Boolean
  18024. }, KU = te({
  18025. compatConfig: {
  18026. MODE: 3
  18027. },
  18028. name: "Checkbox",
  18029. inheritAttrs: !1,
  18030. props: sr(yOe, {
  18031. prefixCls: "rc-checkbox",
  18032. type: "checkbox",
  18033. defaultChecked: !1
  18034. }),
  18035. emits: ["click", "change"],
  18036. setup(t, e) {
  18037. let {
  18038. attrs: n,
  18039. emit: r,
  18040. expose: i
  18041. } = e;
  18042. const a = U(t.checked === void 0 ? t.defaultChecked : t.checked), o = U();
  18043. se(() => t.checked, () => {
  18044. a.value = t.checked;
  18045. }), i({
  18046. focus() {
  18047. var c;
  18048. (c = o.value) === null || c === void 0 || c.focus();
  18049. },
  18050. blur() {
  18051. var c;
  18052. (c = o.value) === null || c === void 0 || c.blur();
  18053. }
  18054. });
  18055. const s = U(), l = (c) => {
  18056. if (t.disabled)
  18057. return;
  18058. t.checked === void 0 && (a.value = c.target.checked), c.shiftKey = s.value;
  18059. const f = {
  18060. target: I(I({}, t), {
  18061. checked: c.target.checked
  18062. }),
  18063. stopPropagation() {
  18064. c.stopPropagation();
  18065. },
  18066. preventDefault() {
  18067. c.preventDefault();
  18068. },
  18069. nativeEvent: c
  18070. };
  18071. t.checked !== void 0 && (o.value.checked = !!t.checked), r("change", f), s.value = !1;
  18072. }, u = (c) => {
  18073. r("click", c), s.value = c.shiftKey;
  18074. };
  18075. return () => {
  18076. const {
  18077. prefixCls: c,
  18078. name: f,
  18079. id: d,
  18080. type: h,
  18081. disabled: p,
  18082. readonly: v,
  18083. tabindex: g,
  18084. autofocus: m,
  18085. value: y,
  18086. required: b
  18087. } = t, _ = mOe(t, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
  18088. class: O,
  18089. onFocus: S,
  18090. onBlur: x,
  18091. onKeydown: C,
  18092. onKeypress: T,
  18093. onKeyup: w
  18094. } = 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, {
  18095. [`${c}-checked`]: a.value,
  18096. [`${c}-disabled`]: p
  18097. }), D = I(I({
  18098. name: f,
  18099. id: d,
  18100. type: h,
  18101. readonly: v,
  18102. disabled: p,
  18103. tabindex: g,
  18104. class: `${c}-input`,
  18105. checked: !!a.value,
  18106. autofocus: m,
  18107. value: y
  18108. }, $), {
  18109. onChange: l,
  18110. onClick: u,
  18111. onFocus: S,
  18112. onBlur: x,
  18113. onKeydown: C,
  18114. onKeypress: T,
  18115. onKeyup: w,
  18116. required: b
  18117. });
  18118. return M("span", {
  18119. class: A
  18120. }, [M("input", j({
  18121. ref: o
  18122. }, D), null), M("span", {
  18123. class: `${c}-inner`
  18124. }, null)]);
  18125. };
  18126. }
  18127. }), JU = Symbol("radioGroupContextKey"), bOe = (t) => {
  18128. pt(JU, t);
  18129. }, _Oe = () => Ge(JU, void 0), eX = Symbol("radioOptionTypeContextKey"), OOe = (t) => {
  18130. pt(eX, t);
  18131. }, SOe = () => Ge(eX, void 0), xOe = new Ot("antRadioEffect", {
  18132. "0%": {
  18133. transform: "scale(1)",
  18134. opacity: 0.5
  18135. },
  18136. "100%": {
  18137. transform: "scale(1.6)",
  18138. opacity: 0
  18139. }
  18140. }), wOe = (t) => {
  18141. const {
  18142. componentCls: e,
  18143. antCls: n
  18144. } = t, r = `${e}-group`;
  18145. return {
  18146. [r]: I(I({}, nn(t)), {
  18147. display: "inline-block",
  18148. fontSize: 0,
  18149. // RTL
  18150. [`&${r}-rtl`]: {
  18151. direction: "rtl"
  18152. },
  18153. [`${n}-badge ${n}-badge-count`]: {
  18154. zIndex: 1
  18155. },
  18156. [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
  18157. borderInlineStart: "none"
  18158. }
  18159. })
  18160. };
  18161. }, COe = (t) => {
  18162. const {
  18163. componentCls: e,
  18164. radioWrapperMarginRight: n,
  18165. radioCheckedColor: r,
  18166. radioSize: i,
  18167. motionDurationSlow: a,
  18168. motionDurationMid: o,
  18169. motionEaseInOut: s,
  18170. motionEaseInOutCirc: l,
  18171. radioButtonBg: u,
  18172. colorBorder: c,
  18173. lineWidth: f,
  18174. radioDotSize: d,
  18175. colorBgContainerDisabled: h,
  18176. colorTextDisabled: p,
  18177. paddingXS: v,
  18178. radioDotDisabledColor: g,
  18179. lineType: m,
  18180. radioDotDisabledSize: y,
  18181. wireframe: b,
  18182. colorWhite: _
  18183. } = t, O = `${e}-inner`;
  18184. return {
  18185. [`${e}-wrapper`]: I(I({}, nn(t)), {
  18186. position: "relative",
  18187. display: "inline-flex",
  18188. alignItems: "baseline",
  18189. marginInlineStart: 0,
  18190. marginInlineEnd: n,
  18191. cursor: "pointer",
  18192. // RTL
  18193. [`&${e}-wrapper-rtl`]: {
  18194. direction: "rtl"
  18195. },
  18196. "&-disabled": {
  18197. cursor: "not-allowed",
  18198. color: t.colorTextDisabled
  18199. },
  18200. "&::after": {
  18201. display: "inline-block",
  18202. width: 0,
  18203. overflow: "hidden",
  18204. content: '"\\a0"'
  18205. },
  18206. // hashId 在 wrapper 上,只能铺平
  18207. [`${e}-checked::after`]: {
  18208. position: "absolute",
  18209. insetBlockStart: 0,
  18210. insetInlineStart: 0,
  18211. width: "100%",
  18212. height: "100%",
  18213. border: `${f}px ${m} ${r}`,
  18214. borderRadius: "50%",
  18215. visibility: "hidden",
  18216. animationName: xOe,
  18217. animationDuration: a,
  18218. animationTimingFunction: s,
  18219. animationFillMode: "both",
  18220. content: '""'
  18221. },
  18222. [e]: I(I({}, nn(t)), {
  18223. position: "relative",
  18224. display: "inline-block",
  18225. outline: "none",
  18226. cursor: "pointer",
  18227. alignSelf: "center"
  18228. }),
  18229. [`${e}-wrapper:hover &,
  18230. &:hover ${O}`]: {
  18231. borderColor: r
  18232. },
  18233. [`${e}-input:focus-visible + ${O}`]: I({}, d0(t)),
  18234. [`${e}:hover::after, ${e}-wrapper:hover &::after`]: {
  18235. visibility: "visible"
  18236. },
  18237. [`${e}-inner`]: {
  18238. "&::after": {
  18239. boxSizing: "border-box",
  18240. position: "absolute",
  18241. insetBlockStart: "50%",
  18242. insetInlineStart: "50%",
  18243. display: "block",
  18244. width: i,
  18245. height: i,
  18246. marginBlockStart: i / -2,
  18247. marginInlineStart: i / -2,
  18248. backgroundColor: b ? r : _,
  18249. borderBlockStart: 0,
  18250. borderInlineStart: 0,
  18251. borderRadius: i,
  18252. transform: "scale(0)",
  18253. opacity: 0,
  18254. transition: `all ${a} ${l}`,
  18255. content: '""'
  18256. },
  18257. boxSizing: "border-box",
  18258. position: "relative",
  18259. insetBlockStart: 0,
  18260. insetInlineStart: 0,
  18261. display: "block",
  18262. width: i,
  18263. height: i,
  18264. backgroundColor: u,
  18265. borderColor: c,
  18266. borderStyle: "solid",
  18267. borderWidth: f,
  18268. borderRadius: "50%",
  18269. transition: `all ${o}`
  18270. },
  18271. [`${e}-input`]: {
  18272. position: "absolute",
  18273. insetBlockStart: 0,
  18274. insetInlineEnd: 0,
  18275. insetBlockEnd: 0,
  18276. insetInlineStart: 0,
  18277. zIndex: 1,
  18278. cursor: "pointer",
  18279. opacity: 0
  18280. },
  18281. // 选中状态
  18282. [`${e}-checked`]: {
  18283. [O]: {
  18284. borderColor: r,
  18285. backgroundColor: b ? u : r,
  18286. "&::after": {
  18287. transform: `scale(${d / i})`,
  18288. opacity: 1,
  18289. transition: `all ${a} ${l}`
  18290. }
  18291. }
  18292. },
  18293. [`${e}-disabled`]: {
  18294. cursor: "not-allowed",
  18295. [O]: {
  18296. backgroundColor: h,
  18297. borderColor: c,
  18298. cursor: "not-allowed",
  18299. "&::after": {
  18300. backgroundColor: g
  18301. }
  18302. },
  18303. [`${e}-input`]: {
  18304. cursor: "not-allowed"
  18305. },
  18306. [`${e}-disabled + span`]: {
  18307. color: p,
  18308. cursor: "not-allowed"
  18309. },
  18310. [`&${e}-checked`]: {
  18311. [O]: {
  18312. "&::after": {
  18313. transform: `scale(${y / i})`
  18314. }
  18315. }
  18316. }
  18317. },
  18318. [`span${e} + *`]: {
  18319. paddingInlineStart: v,
  18320. paddingInlineEnd: v
  18321. }
  18322. })
  18323. };
  18324. }, TOe = (t) => {
  18325. const {
  18326. radioButtonColor: e,
  18327. controlHeight: n,
  18328. componentCls: r,
  18329. lineWidth: i,
  18330. lineType: a,
  18331. colorBorder: o,
  18332. motionDurationSlow: s,
  18333. motionDurationMid: l,
  18334. radioButtonPaddingHorizontal: u,
  18335. fontSize: c,
  18336. radioButtonBg: f,
  18337. fontSizeLG: d,
  18338. controlHeightLG: h,
  18339. controlHeightSM: p,
  18340. paddingXS: v,
  18341. borderRadius: g,
  18342. borderRadiusSM: m,
  18343. borderRadiusLG: y,
  18344. radioCheckedColor: b,
  18345. radioButtonCheckedBg: _,
  18346. radioButtonHoverColor: O,
  18347. radioButtonActiveColor: S,
  18348. radioSolidCheckedColor: x,
  18349. colorTextDisabled: C,
  18350. colorBgContainerDisabled: T,
  18351. radioDisabledButtonCheckedColor: w,
  18352. radioDisabledButtonCheckedBg: P
  18353. } = t;
  18354. return {
  18355. [`${r}-button-wrapper`]: {
  18356. position: "relative",
  18357. display: "inline-block",
  18358. height: n,
  18359. margin: 0,
  18360. paddingInline: u,
  18361. paddingBlock: 0,
  18362. color: e,
  18363. fontSize: c,
  18364. lineHeight: `${n - i * 2}px`,
  18365. background: f,
  18366. border: `${i}px ${a} ${o}`,
  18367. // strange align fix for chrome but works
  18368. // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
  18369. borderBlockStartWidth: i + 0.02,
  18370. borderInlineStartWidth: 0,
  18371. borderInlineEndWidth: i,
  18372. cursor: "pointer",
  18373. transition: [`color ${l}`, `background ${l}`, `border-color ${l}`, `box-shadow ${l}`].join(","),
  18374. a: {
  18375. color: e
  18376. },
  18377. [`> ${r}-button`]: {
  18378. position: "absolute",
  18379. insetBlockStart: 0,
  18380. insetInlineStart: 0,
  18381. zIndex: -1,
  18382. width: "100%",
  18383. height: "100%"
  18384. },
  18385. "&:not(:first-child)": {
  18386. "&::before": {
  18387. position: "absolute",
  18388. insetBlockStart: -i,
  18389. insetInlineStart: -i,
  18390. display: "block",
  18391. boxSizing: "content-box",
  18392. width: 1,
  18393. height: "100%",
  18394. paddingBlock: i,
  18395. paddingInline: 0,
  18396. backgroundColor: o,
  18397. transition: `background-color ${s}`,
  18398. content: '""'
  18399. }
  18400. },
  18401. "&:first-child": {
  18402. borderInlineStart: `${i}px ${a} ${o}`,
  18403. borderStartStartRadius: g,
  18404. borderEndStartRadius: g
  18405. },
  18406. "&:last-child": {
  18407. borderStartEndRadius: g,
  18408. borderEndEndRadius: g
  18409. },
  18410. "&:first-child:last-child": {
  18411. borderRadius: g
  18412. },
  18413. [`${r}-group-large &`]: {
  18414. height: h,
  18415. fontSize: d,
  18416. lineHeight: `${h - i * 2}px`,
  18417. "&:first-child": {
  18418. borderStartStartRadius: y,
  18419. borderEndStartRadius: y
  18420. },
  18421. "&:last-child": {
  18422. borderStartEndRadius: y,
  18423. borderEndEndRadius: y
  18424. }
  18425. },
  18426. [`${r}-group-small &`]: {
  18427. height: p,
  18428. paddingInline: v - i,
  18429. paddingBlock: 0,
  18430. lineHeight: `${p - i * 2}px`,
  18431. "&:first-child": {
  18432. borderStartStartRadius: m,
  18433. borderEndStartRadius: m
  18434. },
  18435. "&:last-child": {
  18436. borderStartEndRadius: m,
  18437. borderEndEndRadius: m
  18438. }
  18439. },
  18440. "&:hover": {
  18441. position: "relative",
  18442. color: b
  18443. },
  18444. "&:has(:focus-visible)": I({}, d0(t)),
  18445. [`${r}-inner, input[type='checkbox'], input[type='radio']`]: {
  18446. width: 0,
  18447. height: 0,
  18448. opacity: 0,
  18449. pointerEvents: "none"
  18450. },
  18451. [`&-checked:not(${r}-button-wrapper-disabled)`]: {
  18452. zIndex: 1,
  18453. color: b,
  18454. background: _,
  18455. borderColor: b,
  18456. "&::before": {
  18457. backgroundColor: b
  18458. },
  18459. "&:first-child": {
  18460. borderColor: b
  18461. },
  18462. "&:hover": {
  18463. color: O,
  18464. borderColor: O,
  18465. "&::before": {
  18466. backgroundColor: O
  18467. }
  18468. },
  18469. "&:active": {
  18470. color: S,
  18471. borderColor: S,
  18472. "&::before": {
  18473. backgroundColor: S
  18474. }
  18475. }
  18476. },
  18477. [`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]: {
  18478. color: x,
  18479. background: b,
  18480. borderColor: b,
  18481. "&:hover": {
  18482. color: x,
  18483. background: O,
  18484. borderColor: O
  18485. },
  18486. "&:active": {
  18487. color: x,
  18488. background: S,
  18489. borderColor: S
  18490. }
  18491. },
  18492. "&-disabled": {
  18493. color: C,
  18494. backgroundColor: T,
  18495. borderColor: o,
  18496. cursor: "not-allowed",
  18497. "&:first-child, &:hover": {
  18498. color: C,
  18499. backgroundColor: T,
  18500. borderColor: o
  18501. }
  18502. },
  18503. [`&-disabled${r}-button-wrapper-checked`]: {
  18504. color: w,
  18505. backgroundColor: P,
  18506. borderColor: o,
  18507. boxShadow: "none"
  18508. }
  18509. }
  18510. };
  18511. }, tX = Sn("Radio", (t) => {
  18512. const {
  18513. padding: e,
  18514. lineWidth: n,
  18515. controlItemBgActiveDisabled: r,
  18516. colorTextDisabled: i,
  18517. colorBgContainer: a,
  18518. fontSizeLG: o,
  18519. controlOutline: s,
  18520. colorPrimaryHover: l,
  18521. colorPrimaryActive: u,
  18522. colorText: c,
  18523. colorPrimary: f,
  18524. marginXS: d,
  18525. controlOutlineWidth: h,
  18526. colorTextLightSolid: p,
  18527. wireframe: v
  18528. } = 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, {
  18529. radioFocusShadow: g,
  18530. radioButtonFocusShadow: m,
  18531. radioSize: y,
  18532. radioDotSize: O,
  18533. radioDotDisabledSize: _,
  18534. radioCheckedColor: S,
  18535. radioDotDisabledColor: i,
  18536. radioSolidCheckedColor: p,
  18537. radioButtonBg: a,
  18538. radioButtonCheckedBg: a,
  18539. radioButtonColor: x,
  18540. radioButtonHoverColor: C,
  18541. radioButtonActiveColor: T,
  18542. radioButtonPaddingHorizontal: w,
  18543. radioDisabledButtonCheckedBg: r,
  18544. radioDisabledButtonCheckedColor: i,
  18545. radioWrapperMarginRight: d
  18546. });
  18547. return [wOe(A), COe(A), TOe(A)];
  18548. });
  18549. var POe = function(t, e) {
  18550. var n = {};
  18551. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  18552. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  18553. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  18554. return n;
  18555. };
  18556. const nX = () => ({
  18557. prefixCls: String,
  18558. checked: nt(),
  18559. disabled: nt(),
  18560. isGroup: nt(),
  18561. value: Y.any,
  18562. name: String,
  18563. id: String,
  18564. autofocus: nt(),
  18565. onChange: tt(),
  18566. onFocus: tt(),
  18567. onBlur: tt(),
  18568. onClick: tt(),
  18569. "onUpdate:checked": tt(),
  18570. "onUpdate:value": tt()
  18571. }), fi = te({
  18572. compatConfig: {
  18573. MODE: 3
  18574. },
  18575. name: "ARadio",
  18576. inheritAttrs: !1,
  18577. props: nX(),
  18578. setup(t, e) {
  18579. let {
  18580. emit: n,
  18581. expose: r,
  18582. slots: i,
  18583. attrs: a
  18584. } = e;
  18585. const o = ss(), s = ro.useInject(), l = SOe(), u = _Oe(), c = Ko(), f = L(() => {
  18586. var C;
  18587. return (C = v.value) !== null && C !== void 0 ? C : c.value;
  18588. }), d = U(), {
  18589. prefixCls: h,
  18590. direction: p,
  18591. disabled: v
  18592. } = It("radio", t), g = L(() => (u == null ? void 0 : u.optionType.value) === "button" || l === "button" ? `${h.value}-button` : h.value), m = Ko(), [y, b] = tX(h);
  18593. r({
  18594. focus: () => {
  18595. d.value.focus();
  18596. },
  18597. blur: () => {
  18598. d.value.blur();
  18599. }
  18600. });
  18601. const S = (C) => {
  18602. const T = C.target.checked;
  18603. n("update:checked", T), n("update:value", T), n("change", C), o.onFieldChange();
  18604. }, x = (C) => {
  18605. n("change", C), u && u.onChange && u.onChange(C);
  18606. };
  18607. return () => {
  18608. var C;
  18609. const T = u, {
  18610. prefixCls: w,
  18611. id: P = o.id.value
  18612. } = t, $ = POe(t, ["prefixCls", "id"]), A = I(I({
  18613. prefixCls: g.value,
  18614. id: P
  18615. }, or($, ["onUpdate:checked", "onUpdate:value"])), {
  18616. disabled: (C = v.value) !== null && C !== void 0 ? C : m.value
  18617. });
  18618. 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;
  18619. const D = ye({
  18620. [`${g.value}-wrapper`]: !0,
  18621. [`${g.value}-wrapper-checked`]: A.checked,
  18622. [`${g.value}-wrapper-disabled`]: A.disabled,
  18623. [`${g.value}-wrapper-rtl`]: p.value === "rtl",
  18624. [`${g.value}-wrapper-in-form-item`]: s.isFormItemInput
  18625. }, a.class, b.value);
  18626. return y(M("label", j(j({}, a), {}, {
  18627. class: D
  18628. }), [M(KU, j(j({}, A), {}, {
  18629. type: "radio",
  18630. ref: d
  18631. }), null), i.default && M("span", null, [i.default()])]));
  18632. };
  18633. }
  18634. }), $Oe = () => ({
  18635. prefixCls: String,
  18636. value: Y.any,
  18637. size: hn(),
  18638. options: uf(),
  18639. disabled: nt(),
  18640. name: String,
  18641. buttonStyle: hn("outline"),
  18642. id: String,
  18643. optionType: hn("default"),
  18644. onChange: tt(),
  18645. "onUpdate:value": tt()
  18646. }), vf = te({
  18647. compatConfig: {
  18648. MODE: 3
  18649. },
  18650. name: "ARadioGroup",
  18651. inheritAttrs: !1,
  18652. props: $Oe(),
  18653. // emits: ['update:value', 'change'],
  18654. setup(t, e) {
  18655. let {
  18656. slots: n,
  18657. emit: r,
  18658. attrs: i
  18659. } = e;
  18660. const a = ss(), {
  18661. prefixCls: o,
  18662. direction: s,
  18663. size: l
  18664. } = It("radio", t), [u, c] = tX(o), f = U(t.value), d = U(!1);
  18665. return se(() => t.value, (p) => {
  18666. f.value = p, d.value = !1;
  18667. }), bOe({
  18668. onChange: (p) => {
  18669. const v = f.value, {
  18670. value: g
  18671. } = p.target;
  18672. "value" in t || (f.value = g), !d.value && g !== v && (d.value = !0, r("update:value", g), r("change", p), a.onFieldChange()), Tt(() => {
  18673. d.value = !1;
  18674. });
  18675. },
  18676. value: f,
  18677. disabled: L(() => t.disabled),
  18678. name: L(() => t.name),
  18679. optionType: L(() => t.optionType)
  18680. }), () => {
  18681. var p;
  18682. const {
  18683. options: v,
  18684. buttonStyle: g,
  18685. id: m = a.id.value
  18686. } = t, y = `${o.value}-group`, b = ye(y, `${y}-${g}`, {
  18687. [`${y}-${l.value}`]: l.value,
  18688. [`${y}-rtl`]: s.value === "rtl"
  18689. }, i.class, c.value);
  18690. let _ = null;
  18691. return v && v.length > 0 ? _ = v.map((O) => {
  18692. if (typeof O == "string" || typeof O == "number")
  18693. return M(fi, {
  18694. key: O,
  18695. prefixCls: o.value,
  18696. disabled: t.disabled,
  18697. value: O,
  18698. checked: f.value === O
  18699. }, {
  18700. default: () => [O]
  18701. });
  18702. const {
  18703. value: S,
  18704. disabled: x,
  18705. label: C
  18706. } = O;
  18707. return M(fi, {
  18708. key: `radio-group-value-options-${S}`,
  18709. prefixCls: o.value,
  18710. disabled: x || t.disabled,
  18711. value: S,
  18712. checked: f.value === S
  18713. }, {
  18714. default: () => [C]
  18715. });
  18716. }) : _ = (p = n.default) === null || p === void 0 ? void 0 : p.call(n), u(M("div", j(j({}, i), {}, {
  18717. class: b,
  18718. id: m
  18719. }), [_]));
  18720. };
  18721. }
  18722. }), Io = te({
  18723. compatConfig: {
  18724. MODE: 3
  18725. },
  18726. name: "ARadioButton",
  18727. inheritAttrs: !1,
  18728. props: nX(),
  18729. setup(t, e) {
  18730. let {
  18731. slots: n,
  18732. attrs: r
  18733. } = e;
  18734. const {
  18735. prefixCls: i
  18736. } = It("radio", t);
  18737. return OOe("button"), () => {
  18738. var a;
  18739. return M(fi, j(j(j({}, r), t), {}, {
  18740. prefixCls: i.value
  18741. }), {
  18742. default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
  18743. });
  18744. };
  18745. }
  18746. });
  18747. fi.Group = vf;
  18748. fi.Button = Io;
  18749. fi.install = function(t) {
  18750. return t.component(fi.name, fi), t.component(fi.Group.name, fi.Group), t.component(fi.Button.name, fi.Button), t;
  18751. };
  18752. const rX = (t) => ({
  18753. // Firefox
  18754. "&::-moz-placeholder": {
  18755. opacity: 1
  18756. },
  18757. "&::placeholder": {
  18758. color: t,
  18759. userSelect: "none"
  18760. // https://github.com/ant-design/ant-design/pull/32639
  18761. },
  18762. "&:placeholder-shown": {
  18763. textOverflow: "ellipsis"
  18764. }
  18765. }), b0 = (t) => ({
  18766. borderColor: t.inputBorderHoverColor,
  18767. borderInlineEndWidth: t.lineWidth
  18768. }), N1 = (t) => ({
  18769. borderColor: t.inputBorderHoverColor,
  18770. boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,
  18771. borderInlineEndWidth: t.lineWidth,
  18772. outline: 0
  18773. }), iX = (t) => ({
  18774. color: t.colorTextDisabled,
  18775. backgroundColor: t.colorBgContainerDisabled,
  18776. borderColor: t.colorBorder,
  18777. boxShadow: "none",
  18778. cursor: "not-allowed",
  18779. opacity: 1,
  18780. "&:hover": I({}, b0(Bt(t, {
  18781. inputBorderHoverColor: t.colorBorder
  18782. })))
  18783. }), aX = (t) => {
  18784. const {
  18785. inputPaddingVerticalLG: e,
  18786. fontSizeLG: n,
  18787. lineHeightLG: r,
  18788. borderRadiusLG: i,
  18789. inputPaddingHorizontalLG: a
  18790. } = t;
  18791. return {
  18792. padding: `${e}px ${a}px`,
  18793. fontSize: n,
  18794. lineHeight: r,
  18795. borderRadius: i
  18796. };
  18797. }, oX = (t) => ({
  18798. padding: `${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM - 1}px`,
  18799. borderRadius: t.borderRadiusSM
  18800. }), gx = (t, e) => {
  18801. const {
  18802. componentCls: n,
  18803. colorError: r,
  18804. colorWarning: i,
  18805. colorErrorOutline: a,
  18806. colorWarningOutline: o,
  18807. colorErrorBorderHover: s,
  18808. colorWarningBorderHover: l
  18809. } = t;
  18810. return {
  18811. [`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]: {
  18812. borderColor: r,
  18813. "&:hover": {
  18814. borderColor: s
  18815. },
  18816. "&:focus, &-focused": I({}, N1(Bt(t, {
  18817. inputBorderActiveColor: r,
  18818. inputBorderHoverColor: r,
  18819. controlOutline: a
  18820. }))),
  18821. [`${n}-prefix`]: {
  18822. color: r
  18823. }
  18824. },
  18825. [`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]: {
  18826. borderColor: i,
  18827. "&:hover": {
  18828. borderColor: l
  18829. },
  18830. "&:focus, &-focused": I({}, N1(Bt(t, {
  18831. inputBorderActiveColor: i,
  18832. inputBorderHoverColor: i,
  18833. controlOutline: o
  18834. }))),
  18835. [`${n}-prefix`]: {
  18836. color: i
  18837. }
  18838. }
  18839. };
  18840. }, mx = (t) => I(I({
  18841. position: "relative",
  18842. display: "inline-block",
  18843. width: "100%",
  18844. minWidth: 0,
  18845. padding: `${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,
  18846. color: t.colorText,
  18847. fontSize: t.fontSize,
  18848. lineHeight: t.lineHeight,
  18849. backgroundColor: t.colorBgContainer,
  18850. backgroundImage: "none",
  18851. borderWidth: t.lineWidth,
  18852. borderStyle: t.lineType,
  18853. borderColor: t.colorBorder,
  18854. borderRadius: t.borderRadius,
  18855. transition: `all ${t.motionDurationMid}`
  18856. }, rX(t.colorTextPlaceholder)), {
  18857. "&:hover": I({}, b0(t)),
  18858. "&:focus, &-focused": I({}, N1(t)),
  18859. "&-disabled, &[disabled]": I({}, iX(t)),
  18860. "&-borderless": {
  18861. "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
  18862. backgroundColor: "transparent",
  18863. border: "none",
  18864. boxShadow: "none"
  18865. }
  18866. },
  18867. // Reset height for `textarea`s
  18868. "textarea&": {
  18869. maxWidth: "100%",
  18870. height: "auto",
  18871. minHeight: t.controlHeight,
  18872. lineHeight: t.lineHeight,
  18873. verticalAlign: "bottom",
  18874. transition: `all ${t.motionDurationSlow}, height 0s`,
  18875. resize: "vertical"
  18876. },
  18877. // Size
  18878. "&-lg": I({}, aX(t)),
  18879. "&-sm": I({}, oX(t)),
  18880. // RTL
  18881. "&-rtl": {
  18882. direction: "rtl"
  18883. },
  18884. "&-textarea-rtl": {
  18885. direction: "rtl"
  18886. }
  18887. }), sX = (t) => {
  18888. const {
  18889. componentCls: e,
  18890. antCls: n
  18891. } = t;
  18892. return {
  18893. position: "relative",
  18894. display: "table",
  18895. width: "100%",
  18896. borderCollapse: "separate",
  18897. borderSpacing: 0,
  18898. // Undo padding and float of grid classes
  18899. "&[class*='col-']": {
  18900. paddingInlineEnd: t.paddingXS,
  18901. "&:last-child": {
  18902. paddingInlineEnd: 0
  18903. }
  18904. },
  18905. // Sizing options
  18906. [`&-lg ${e}, &-lg > ${e}-group-addon`]: I({}, aX(t)),
  18907. [`&-sm ${e}, &-sm > ${e}-group-addon`]: I({}, oX(t)),
  18908. [`> ${e}`]: {
  18909. display: "table-cell",
  18910. "&:not(:first-child):not(:last-child)": {
  18911. borderRadius: 0
  18912. }
  18913. },
  18914. [`${e}-group`]: {
  18915. "&-addon, &-wrap": {
  18916. display: "table-cell",
  18917. width: 1,
  18918. whiteSpace: "nowrap",
  18919. verticalAlign: "middle",
  18920. "&:not(:first-child):not(:last-child)": {
  18921. borderRadius: 0
  18922. }
  18923. },
  18924. "&-wrap > *": {
  18925. display: "block !important"
  18926. },
  18927. "&-addon": {
  18928. position: "relative",
  18929. padding: `0 ${t.inputPaddingHorizontal}px`,
  18930. color: t.colorText,
  18931. fontWeight: "normal",
  18932. fontSize: t.fontSize,
  18933. textAlign: "center",
  18934. backgroundColor: t.colorFillAlter,
  18935. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  18936. borderRadius: t.borderRadius,
  18937. transition: `all ${t.motionDurationSlow}`,
  18938. lineHeight: 1,
  18939. // Reset Select's style in addon
  18940. [`${n}-select`]: {
  18941. margin: `-${t.inputPaddingVertical + 1}px -${t.inputPaddingHorizontal}px`,
  18942. [`&${n}-select-single:not(${n}-select-customize-input)`]: {
  18943. [`${n}-select-selector`]: {
  18944. backgroundColor: "inherit",
  18945. border: `${t.lineWidth}px ${t.lineType} transparent`,
  18946. boxShadow: "none"
  18947. }
  18948. },
  18949. "&-open, &-focused": {
  18950. [`${n}-select-selector`]: {
  18951. color: t.colorPrimary
  18952. }
  18953. }
  18954. },
  18955. // https://github.com/ant-design/ant-design/issues/31333
  18956. [`${n}-cascader-picker`]: {
  18957. margin: `-9px -${t.inputPaddingHorizontal}px`,
  18958. backgroundColor: "transparent",
  18959. [`${n}-cascader-input`]: {
  18960. textAlign: "start",
  18961. border: 0,
  18962. boxShadow: "none"
  18963. }
  18964. }
  18965. },
  18966. "&-addon:first-child": {
  18967. borderInlineEnd: 0
  18968. },
  18969. "&-addon:last-child": {
  18970. borderInlineStart: 0
  18971. }
  18972. },
  18973. [`${e}`]: {
  18974. float: "inline-start",
  18975. width: "100%",
  18976. marginBottom: 0,
  18977. textAlign: "inherit",
  18978. "&:focus": {
  18979. zIndex: 1,
  18980. borderInlineEndWidth: 1
  18981. },
  18982. "&:hover": {
  18983. zIndex: 1,
  18984. borderInlineEndWidth: 1,
  18985. [`${e}-search-with-button &`]: {
  18986. zIndex: 0
  18987. }
  18988. }
  18989. },
  18990. // Reset rounded corners
  18991. [`> ${e}:first-child, ${e}-group-addon:first-child`]: {
  18992. borderStartEndRadius: 0,
  18993. borderEndEndRadius: 0,
  18994. // Reset Select's style in addon
  18995. [`${n}-select ${n}-select-selector`]: {
  18996. borderStartEndRadius: 0,
  18997. borderEndEndRadius: 0
  18998. }
  18999. },
  19000. [`> ${e}-affix-wrapper`]: {
  19001. [`&:not(:first-child) ${e}`]: {
  19002. borderStartStartRadius: 0,
  19003. borderEndStartRadius: 0
  19004. },
  19005. [`&:not(:last-child) ${e}`]: {
  19006. borderStartEndRadius: 0,
  19007. borderEndEndRadius: 0
  19008. }
  19009. },
  19010. [`> ${e}:last-child, ${e}-group-addon:last-child`]: {
  19011. borderStartStartRadius: 0,
  19012. borderEndStartRadius: 0,
  19013. // Reset Select's style in addon
  19014. [`${n}-select ${n}-select-selector`]: {
  19015. borderStartStartRadius: 0,
  19016. borderEndStartRadius: 0
  19017. }
  19018. },
  19019. [`${e}-affix-wrapper`]: {
  19020. "&:not(:last-child)": {
  19021. borderStartEndRadius: 0,
  19022. borderEndEndRadius: 0,
  19023. [`${e}-search &`]: {
  19024. borderStartStartRadius: t.borderRadius,
  19025. borderEndStartRadius: t.borderRadius
  19026. }
  19027. },
  19028. [`&:not(:first-child), ${e}-search &:not(:first-child)`]: {
  19029. borderStartStartRadius: 0,
  19030. borderEndStartRadius: 0
  19031. }
  19032. },
  19033. [`&${e}-group-compact`]: I(I({
  19034. display: "block"
  19035. }, _1()), {
  19036. [`${e}-group-addon, ${e}-group-wrap, > ${e}`]: {
  19037. "&:not(:first-child):not(:last-child)": {
  19038. borderInlineEndWidth: t.lineWidth,
  19039. "&:hover": {
  19040. zIndex: 1
  19041. },
  19042. "&:focus": {
  19043. zIndex: 1
  19044. }
  19045. }
  19046. },
  19047. "& > *": {
  19048. display: "inline-block",
  19049. float: "none",
  19050. verticalAlign: "top",
  19051. borderRadius: 0
  19052. },
  19053. [`& > ${e}-affix-wrapper`]: {
  19054. display: "inline-flex"
  19055. },
  19056. [`& > ${n}-picker-range`]: {
  19057. display: "inline-flex"
  19058. },
  19059. "& > *:not(:last-child)": {
  19060. marginInlineEnd: -t.lineWidth,
  19061. borderInlineEndWidth: t.lineWidth
  19062. },
  19063. // Undo float for .ant-input-group .ant-input
  19064. [`${e}`]: {
  19065. float: "none"
  19066. },
  19067. // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
  19068. [`& > ${n}-select > ${n}-select-selector,
  19069. & > ${n}-select-auto-complete ${e},
  19070. & > ${n}-cascader-picker ${e},
  19071. & > ${e}-group-wrapper ${e}`]: {
  19072. borderInlineEndWidth: t.lineWidth,
  19073. borderRadius: 0,
  19074. "&:hover": {
  19075. zIndex: 1
  19076. },
  19077. "&:focus": {
  19078. zIndex: 1
  19079. }
  19080. },
  19081. [`& > ${n}-select-focused`]: {
  19082. zIndex: 1
  19083. },
  19084. // update z-index for arrow icon
  19085. [`& > ${n}-select > ${n}-select-arrow`]: {
  19086. zIndex: 1
  19087. // https://github.com/ant-design/ant-design/issues/20371
  19088. },
  19089. [`& > *:first-child,
  19090. & > ${n}-select:first-child > ${n}-select-selector,
  19091. & > ${n}-select-auto-complete:first-child ${e},
  19092. & > ${n}-cascader-picker:first-child ${e}`]: {
  19093. borderStartStartRadius: t.borderRadius,
  19094. borderEndStartRadius: t.borderRadius
  19095. },
  19096. [`& > *:last-child,
  19097. & > ${n}-select:last-child > ${n}-select-selector,
  19098. & > ${n}-cascader-picker:last-child ${e},
  19099. & > ${n}-cascader-picker-focused:last-child ${e}`]: {
  19100. borderInlineEndWidth: t.lineWidth,
  19101. borderStartEndRadius: t.borderRadius,
  19102. borderEndEndRadius: t.borderRadius
  19103. },
  19104. // https://github.com/ant-design/ant-design/issues/12493
  19105. [`& > ${n}-select-auto-complete ${e}`]: {
  19106. verticalAlign: "top"
  19107. },
  19108. [`${e}-group-wrapper + ${e}-group-wrapper`]: {
  19109. marginInlineStart: -t.lineWidth,
  19110. [`${e}-affix-wrapper`]: {
  19111. borderRadius: 0
  19112. }
  19113. },
  19114. [`${e}-group-wrapper:not(:last-child)`]: {
  19115. [`&${e}-search > ${e}-group`]: {
  19116. [`& > ${e}-group-addon > ${e}-search-button`]: {
  19117. borderRadius: 0
  19118. },
  19119. [`& > ${e}`]: {
  19120. borderStartStartRadius: t.borderRadius,
  19121. borderStartEndRadius: 0,
  19122. borderEndEndRadius: 0,
  19123. borderEndStartRadius: t.borderRadius
  19124. }
  19125. }
  19126. }
  19127. }),
  19128. [`&&-sm ${n}-btn`]: {
  19129. fontSize: t.fontSizeSM,
  19130. height: t.controlHeightSM,
  19131. lineHeight: "normal"
  19132. },
  19133. [`&&-lg ${n}-btn`]: {
  19134. fontSize: t.fontSizeLG,
  19135. height: t.controlHeightLG,
  19136. lineHeight: "normal"
  19137. },
  19138. // Fix https://github.com/ant-design/ant-design/issues/5754
  19139. [`&&-lg ${n}-select-single ${n}-select-selector`]: {
  19140. height: `${t.controlHeightLG}px`,
  19141. [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
  19142. // -2 is for the border size & override default
  19143. lineHeight: `${t.controlHeightLG - 2}px`
  19144. },
  19145. [`${n}-select-selection-search-input`]: {
  19146. height: `${t.controlHeightLG}px`
  19147. }
  19148. },
  19149. [`&&-sm ${n}-select-single ${n}-select-selector`]: {
  19150. height: `${t.controlHeightSM}px`,
  19151. [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
  19152. // -2 is for the border size & override default
  19153. lineHeight: `${t.controlHeightSM - 2}px`
  19154. },
  19155. [`${n}-select-selection-search-input`]: {
  19156. height: `${t.controlHeightSM}px`
  19157. }
  19158. }
  19159. };
  19160. }, AOe = (t) => {
  19161. const {
  19162. componentCls: e,
  19163. controlHeightSM: n,
  19164. lineWidth: r
  19165. } = t, a = (n - r * 2 - 16) / 2;
  19166. return {
  19167. [e]: I(I(I(I({}, nn(t)), mx(t)), gx(t, e)), {
  19168. '&[type="color"]': {
  19169. height: t.controlHeight,
  19170. [`&${e}-lg`]: {
  19171. height: t.controlHeightLG
  19172. },
  19173. [`&${e}-sm`]: {
  19174. height: n,
  19175. paddingTop: a,
  19176. paddingBottom: a
  19177. }
  19178. }
  19179. })
  19180. };
  19181. }, EOe = (t) => {
  19182. const {
  19183. componentCls: e
  19184. } = t;
  19185. return {
  19186. // ========================= Input =========================
  19187. [`${e}-clear-icon`]: {
  19188. margin: 0,
  19189. color: t.colorTextQuaternary,
  19190. fontSize: t.fontSizeIcon,
  19191. verticalAlign: -1,
  19192. // https://github.com/ant-design/ant-design/pull/18151
  19193. // https://codesandbox.io/s/wizardly-sun-u10br
  19194. cursor: "pointer",
  19195. transition: `color ${t.motionDurationSlow}`,
  19196. "&:hover": {
  19197. color: t.colorTextTertiary
  19198. },
  19199. "&:active": {
  19200. color: t.colorText
  19201. },
  19202. "&-hidden": {
  19203. visibility: "hidden"
  19204. },
  19205. "&-has-suffix": {
  19206. margin: `0 ${t.inputAffixPadding}px`
  19207. }
  19208. },
  19209. // ======================= TextArea ========================
  19210. "&-textarea-with-clear-btn": {
  19211. padding: "0 !important",
  19212. border: "0 !important",
  19213. [`${e}-clear-icon`]: {
  19214. position: "absolute",
  19215. insetBlockStart: t.paddingXS,
  19216. insetInlineEnd: t.paddingXS,
  19217. zIndex: 1
  19218. }
  19219. }
  19220. };
  19221. }, MOe = (t) => {
  19222. const {
  19223. componentCls: e,
  19224. inputAffixPadding: n,
  19225. colorTextDescription: r,
  19226. motionDurationSlow: i,
  19227. colorIcon: a,
  19228. colorIconHover: o,
  19229. iconCls: s
  19230. } = t;
  19231. return {
  19232. [`${e}-affix-wrapper`]: I(I(I(I(I({}, mx(t)), {
  19233. display: "inline-flex",
  19234. [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, b0(t)), {
  19235. zIndex: 1,
  19236. [`${e}-search-with-button &`]: {
  19237. zIndex: 0
  19238. }
  19239. }),
  19240. "&-focused, &:focus": {
  19241. zIndex: 1
  19242. },
  19243. "&-disabled": {
  19244. [`${e}[disabled]`]: {
  19245. background: "transparent"
  19246. }
  19247. },
  19248. [`> input${e}`]: {
  19249. padding: 0,
  19250. fontSize: "inherit",
  19251. border: "none",
  19252. borderRadius: 0,
  19253. outline: "none",
  19254. "&:focus": {
  19255. boxShadow: "none !important"
  19256. }
  19257. },
  19258. "&::before": {
  19259. width: 0,
  19260. visibility: "hidden",
  19261. content: '"\\a0"'
  19262. },
  19263. [`${e}`]: {
  19264. "&-prefix, &-suffix": {
  19265. display: "flex",
  19266. flex: "none",
  19267. alignItems: "center",
  19268. "> *:not(:last-child)": {
  19269. marginInlineEnd: t.paddingXS
  19270. }
  19271. },
  19272. "&-show-count-suffix": {
  19273. color: r
  19274. },
  19275. "&-show-count-has-suffix": {
  19276. marginInlineEnd: t.paddingXXS
  19277. },
  19278. "&-prefix": {
  19279. marginInlineEnd: n
  19280. },
  19281. "&-suffix": {
  19282. marginInlineStart: n
  19283. }
  19284. }
  19285. }), EOe(t)), {
  19286. // password
  19287. [`${s}${e}-password-icon`]: {
  19288. color: a,
  19289. cursor: "pointer",
  19290. transition: `all ${i}`,
  19291. "&:hover": {
  19292. color: o
  19293. }
  19294. }
  19295. }), gx(t, `${e}-affix-wrapper`))
  19296. };
  19297. }, IOe = (t) => {
  19298. const {
  19299. componentCls: e,
  19300. colorError: n,
  19301. colorSuccess: r,
  19302. borderRadiusLG: i,
  19303. borderRadiusSM: a
  19304. } = t;
  19305. return {
  19306. [`${e}-group`]: I(I(I({}, nn(t)), sX(t)), {
  19307. "&-rtl": {
  19308. direction: "rtl"
  19309. },
  19310. "&-wrapper": {
  19311. display: "inline-block",
  19312. width: "100%",
  19313. textAlign: "start",
  19314. verticalAlign: "top",
  19315. "&-rtl": {
  19316. direction: "rtl"
  19317. },
  19318. // Size
  19319. "&-lg": {
  19320. [`${e}-group-addon`]: {
  19321. borderRadius: i
  19322. }
  19323. },
  19324. "&-sm": {
  19325. [`${e}-group-addon`]: {
  19326. borderRadius: a
  19327. }
  19328. },
  19329. // Status
  19330. "&-status-error": {
  19331. [`${e}-group-addon`]: {
  19332. color: n,
  19333. borderColor: n
  19334. }
  19335. },
  19336. "&-status-warning": {
  19337. [`${e}-group-addon:last-child`]: {
  19338. color: r,
  19339. borderColor: r
  19340. }
  19341. }
  19342. }
  19343. })
  19344. };
  19345. }, DOe = (t) => {
  19346. const {
  19347. componentCls: e,
  19348. antCls: n
  19349. } = t, r = `${e}-search`;
  19350. return {
  19351. [r]: {
  19352. [`${e}`]: {
  19353. "&:hover, &:focus": {
  19354. borderColor: t.colorPrimaryHover,
  19355. [`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]: {
  19356. borderInlineStartColor: t.colorPrimaryHover
  19357. }
  19358. }
  19359. },
  19360. [`${e}-affix-wrapper`]: {
  19361. borderRadius: 0
  19362. },
  19363. // fix slight height diff in Firefox:
  19364. // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
  19365. [`${e}-lg`]: {
  19366. lineHeight: t.lineHeightLG - 2e-4
  19367. },
  19368. [`> ${e}-group`]: {
  19369. [`> ${e}-group-addon:last-child`]: {
  19370. insetInlineStart: -1,
  19371. padding: 0,
  19372. border: 0,
  19373. [`${r}-button`]: {
  19374. paddingTop: 0,
  19375. paddingBottom: 0,
  19376. borderStartStartRadius: 0,
  19377. borderStartEndRadius: t.borderRadius,
  19378. borderEndEndRadius: t.borderRadius,
  19379. borderEndStartRadius: 0
  19380. },
  19381. [`${r}-button:not(${n}-btn-primary)`]: {
  19382. color: t.colorTextDescription,
  19383. "&:hover": {
  19384. color: t.colorPrimaryHover
  19385. },
  19386. "&:active": {
  19387. color: t.colorPrimaryActive
  19388. },
  19389. [`&${n}-btn-loading::before`]: {
  19390. insetInlineStart: 0,
  19391. insetInlineEnd: 0,
  19392. insetBlockStart: 0,
  19393. insetBlockEnd: 0
  19394. }
  19395. }
  19396. }
  19397. },
  19398. [`${r}-button`]: {
  19399. height: t.controlHeight,
  19400. "&:hover, &:focus": {
  19401. zIndex: 1
  19402. }
  19403. },
  19404. [`&-large ${r}-button`]: {
  19405. height: t.controlHeightLG
  19406. },
  19407. [`&-small ${r}-button`]: {
  19408. height: t.controlHeightSM
  19409. },
  19410. "&-rtl": {
  19411. direction: "rtl"
  19412. },
  19413. // ===================== Compact Item Customized Styles =====================
  19414. [`&${e}-compact-item`]: {
  19415. [`&:not(${e}-compact-last-item)`]: {
  19416. [`${e}-group-addon`]: {
  19417. [`${e}-search-button`]: {
  19418. marginInlineEnd: -t.lineWidth,
  19419. borderRadius: 0
  19420. }
  19421. }
  19422. },
  19423. [`&:not(${e}-compact-first-item)`]: {
  19424. [`${e},${e}-affix-wrapper`]: {
  19425. borderRadius: 0
  19426. }
  19427. },
  19428. [`> ${e}-group-addon ${e}-search-button,
  19429. > ${e},
  19430. ${e}-affix-wrapper`]: {
  19431. "&:hover,&:focus,&:active": {
  19432. zIndex: 2
  19433. }
  19434. },
  19435. [`> ${e}-affix-wrapper-focused`]: {
  19436. zIndex: 2
  19437. }
  19438. }
  19439. }
  19440. };
  19441. };
  19442. function lX(t) {
  19443. return Bt(t, {
  19444. inputAffixPadding: t.paddingXXS,
  19445. inputPaddingVertical: Math.max(Math.round((t.controlHeight - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 3),
  19446. inputPaddingVerticalLG: Math.ceil((t.controlHeightLG - t.fontSizeLG * t.lineHeightLG) / 2 * 10) / 10 - t.lineWidth,
  19447. inputPaddingVerticalSM: Math.max(Math.round((t.controlHeightSM - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 0),
  19448. inputPaddingHorizontal: t.paddingSM - t.lineWidth,
  19449. inputPaddingHorizontalSM: t.paddingXS - t.lineWidth,
  19450. inputPaddingHorizontalLG: t.controlPaddingHorizontal - t.lineWidth,
  19451. inputBorderHoverColor: t.colorPrimaryHover,
  19452. inputBorderActiveColor: t.colorPrimaryHover
  19453. });
  19454. }
  19455. const ROe = (t) => {
  19456. const {
  19457. componentCls: e,
  19458. inputPaddingHorizontal: n,
  19459. paddingLG: r
  19460. } = t, i = `${e}-textarea`;
  19461. return {
  19462. [i]: {
  19463. position: "relative",
  19464. [`${i}-suffix`]: {
  19465. position: "absolute",
  19466. top: 0,
  19467. insetInlineEnd: n,
  19468. bottom: 0,
  19469. zIndex: 1,
  19470. display: "inline-flex",
  19471. alignItems: "center",
  19472. margin: "auto"
  19473. },
  19474. "&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating": {
  19475. [`&${i}-has-feedback`]: {
  19476. [`${e}`]: {
  19477. paddingInlineEnd: r
  19478. }
  19479. }
  19480. },
  19481. "&-show-count": {
  19482. // https://github.com/ant-design/ant-design/issues/33049
  19483. [`> ${e}`]: {
  19484. height: "100%"
  19485. },
  19486. "&::after": {
  19487. color: t.colorTextDescription,
  19488. whiteSpace: "nowrap",
  19489. content: "attr(data-count)",
  19490. pointerEvents: "none",
  19491. float: "right"
  19492. }
  19493. },
  19494. "&-rtl": {
  19495. "&::after": {
  19496. float: "left"
  19497. }
  19498. }
  19499. }
  19500. };
  19501. }, lD = Sn("Input", (t) => {
  19502. const e = lX(t);
  19503. return [
  19504. AOe(e),
  19505. ROe(e),
  19506. MOe(e),
  19507. IOe(e),
  19508. DOe(e),
  19509. // =====================================================
  19510. // == Space Compact ==
  19511. // =====================================================
  19512. cx(e)
  19513. ];
  19514. });
  19515. function kOe(t) {
  19516. const e = ae(), n = ae(!1);
  19517. function r() {
  19518. for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
  19519. a[o] = arguments[o];
  19520. n.value || (xt.cancel(e.value), e.value = xt(() => {
  19521. t(...a);
  19522. }));
  19523. }
  19524. return yt(() => {
  19525. n.value = !0, xt.cancel(e.value);
  19526. }), r;
  19527. }
  19528. function LOe(t) {
  19529. const e = ae([]), n = ae(typeof t == "function" ? t() : t), r = kOe(() => {
  19530. let a = n.value;
  19531. e.value.forEach((o) => {
  19532. a = o(a);
  19533. }), e.value = [], n.value = a;
  19534. });
  19535. function i(a) {
  19536. e.value.push(a), r();
  19537. }
  19538. return [n, i];
  19539. }
  19540. const NOe = te({
  19541. compatConfig: {
  19542. MODE: 3
  19543. },
  19544. name: "TabNode",
  19545. props: {
  19546. id: {
  19547. type: String
  19548. },
  19549. prefixCls: {
  19550. type: String
  19551. },
  19552. tab: {
  19553. type: Object
  19554. },
  19555. active: {
  19556. type: Boolean
  19557. },
  19558. closable: {
  19559. type: Boolean
  19560. },
  19561. editable: {
  19562. type: Object
  19563. },
  19564. onClick: {
  19565. type: Function
  19566. },
  19567. onResize: {
  19568. type: Function
  19569. },
  19570. renderWrapper: {
  19571. type: Function
  19572. },
  19573. removeAriaLabel: {
  19574. type: String
  19575. },
  19576. // onRemove: { type: Function as PropType<() => void> },
  19577. onFocus: {
  19578. type: Function
  19579. }
  19580. },
  19581. emits: ["click", "resize", "remove", "focus"],
  19582. setup(t, e) {
  19583. let {
  19584. expose: n,
  19585. attrs: r
  19586. } = e;
  19587. const i = U();
  19588. function a(l) {
  19589. var u;
  19590. !((u = t.tab) === null || u === void 0) && u.disabled || t.onClick(l);
  19591. }
  19592. n({
  19593. domRef: i
  19594. });
  19595. function o(l) {
  19596. var u;
  19597. l.preventDefault(), l.stopPropagation(), t.editable.onEdit("remove", {
  19598. key: (u = t.tab) === null || u === void 0 ? void 0 : u.key,
  19599. event: l
  19600. });
  19601. }
  19602. const s = L(() => {
  19603. var l;
  19604. return t.editable && t.closable !== !1 && !(!((l = t.tab) === null || l === void 0) && l.disabled);
  19605. });
  19606. return () => {
  19607. var l;
  19608. const {
  19609. prefixCls: u,
  19610. id: c,
  19611. active: f,
  19612. tab: {
  19613. key: d,
  19614. tab: h,
  19615. disabled: p,
  19616. closeIcon: v
  19617. },
  19618. renderWrapper: g,
  19619. removeAriaLabel: m,
  19620. editable: y,
  19621. onFocus: b
  19622. } = t, _ = `${u}-tab`, O = M("div", {
  19623. key: d,
  19624. ref: i,
  19625. class: ye(_, {
  19626. [`${_}-with-remove`]: s.value,
  19627. [`${_}-active`]: f,
  19628. [`${_}-disabled`]: p
  19629. }),
  19630. style: r.style,
  19631. onClick: a
  19632. }, [M("div", {
  19633. role: "tab",
  19634. "aria-selected": f,
  19635. id: c && `${c}-tab-${d}`,
  19636. class: `${_}-btn`,
  19637. "aria-controls": c && `${c}-panel-${d}`,
  19638. "aria-disabled": p,
  19639. tabindex: p ? null : 0,
  19640. onClick: (S) => {
  19641. S.stopPropagation(), a(S);
  19642. },
  19643. onKeydown: (S) => {
  19644. [ge.SPACE, ge.ENTER].includes(S.which) && (S.preventDefault(), a(S));
  19645. },
  19646. onFocus: b
  19647. }, [typeof h == "function" ? h() : h]), s.value && M("button", {
  19648. type: "button",
  19649. "aria-label": m || "remove",
  19650. tabindex: 0,
  19651. class: `${_}-remove`,
  19652. onClick: (S) => {
  19653. S.stopPropagation(), o(S);
  19654. }
  19655. }, [(v == null ? void 0 : v()) || ((l = y.removeIcon) === null || l === void 0 ? void 0 : l.call(y)) || "×"])]);
  19656. return g ? g(O) : O;
  19657. };
  19658. }
  19659. }), x5 = {
  19660. width: 0,
  19661. height: 0,
  19662. left: 0,
  19663. top: 0
  19664. };
  19665. function BOe(t, e) {
  19666. const n = U(/* @__PURE__ */ new Map());
  19667. return ht(() => {
  19668. var r, i;
  19669. const a = /* @__PURE__ */ new Map(), o = t.value, s = e.value.get((r = o[0]) === null || r === void 0 ? void 0 : r.key) || x5, l = s.left + s.width;
  19670. for (let u = 0; u < o.length; u += 1) {
  19671. const {
  19672. key: c
  19673. } = o[u];
  19674. let f = e.value.get(c);
  19675. f || (f = e.value.get((i = o[u - 1]) === null || i === void 0 ? void 0 : i.key) || x5);
  19676. const d = a.get(c) || I({}, f);
  19677. d.right = l - d.left - d.width, a.set(c, d);
  19678. }
  19679. n.value = new Map(a);
  19680. }), n;
  19681. }
  19682. const uX = te({
  19683. compatConfig: {
  19684. MODE: 3
  19685. },
  19686. name: "AddButton",
  19687. inheritAttrs: !1,
  19688. props: {
  19689. prefixCls: String,
  19690. editable: {
  19691. type: Object
  19692. },
  19693. locale: {
  19694. type: Object,
  19695. default: void 0
  19696. }
  19697. },
  19698. setup(t, e) {
  19699. let {
  19700. expose: n,
  19701. attrs: r
  19702. } = e;
  19703. const i = U();
  19704. return n({
  19705. domRef: i
  19706. }), () => {
  19707. const {
  19708. prefixCls: a,
  19709. editable: o,
  19710. locale: s
  19711. } = t;
  19712. return !o || o.showAdd === !1 ? null : M("button", {
  19713. ref: i,
  19714. type: "button",
  19715. class: `${a}-nav-add`,
  19716. style: r.style,
  19717. "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab",
  19718. onClick: (l) => {
  19719. o.onEdit("add", {
  19720. event: l
  19721. });
  19722. }
  19723. }, [o.addIcon ? o.addIcon() : "+"]);
  19724. };
  19725. }
  19726. }), zOe = {
  19727. prefixCls: {
  19728. type: String
  19729. },
  19730. id: {
  19731. type: String
  19732. },
  19733. tabs: {
  19734. type: Object
  19735. },
  19736. rtl: {
  19737. type: Boolean
  19738. },
  19739. tabBarGutter: {
  19740. type: Number
  19741. },
  19742. activeKey: {
  19743. type: [String, Number]
  19744. },
  19745. mobile: {
  19746. type: Boolean
  19747. },
  19748. moreIcon: Y.any,
  19749. moreTransitionName: {
  19750. type: String
  19751. },
  19752. editable: {
  19753. type: Object
  19754. },
  19755. locale: {
  19756. type: Object,
  19757. default: void 0
  19758. },
  19759. removeAriaLabel: String,
  19760. onTabClick: {
  19761. type: Function
  19762. },
  19763. popupClassName: String,
  19764. getPopupContainer: tt()
  19765. }, VOe = te({
  19766. compatConfig: {
  19767. MODE: 3
  19768. },
  19769. name: "OperationNode",
  19770. inheritAttrs: !1,
  19771. props: zOe,
  19772. emits: ["tabClick"],
  19773. slots: Object,
  19774. setup(t, e) {
  19775. let {
  19776. attrs: n,
  19777. slots: r
  19778. } = e;
  19779. const [i, a] = fn(!1), [o, s] = fn(null), l = (h) => {
  19780. const p = t.tabs.filter((m) => !m.disabled);
  19781. let v = p.findIndex((m) => m.key === o.value) || 0;
  19782. const g = p.length;
  19783. for (let m = 0; m < g; m += 1) {
  19784. v = (v + h + g) % g;
  19785. const y = p[v];
  19786. if (!y.disabled) {
  19787. s(y.key);
  19788. return;
  19789. }
  19790. }
  19791. }, u = (h) => {
  19792. const {
  19793. which: p
  19794. } = h;
  19795. if (!i.value) {
  19796. [ge.DOWN, ge.SPACE, ge.ENTER].includes(p) && (a(!0), h.preventDefault());
  19797. return;
  19798. }
  19799. switch (p) {
  19800. case ge.UP:
  19801. l(-1), h.preventDefault();
  19802. break;
  19803. case ge.DOWN:
  19804. l(1), h.preventDefault();
  19805. break;
  19806. case ge.ESC:
  19807. a(!1);
  19808. break;
  19809. case ge.SPACE:
  19810. case ge.ENTER:
  19811. o.value !== null && t.onTabClick(o.value, h);
  19812. break;
  19813. }
  19814. }, c = L(() => `${t.id}-more-popup`), f = L(() => o.value !== null ? `${c.value}-${o.value}` : null), d = (h, p) => {
  19815. h.preventDefault(), h.stopPropagation(), t.editable.onEdit("remove", {
  19816. key: p,
  19817. event: h
  19818. });
  19819. };
  19820. return it(() => {
  19821. se(o, () => {
  19822. const h = document.getElementById(f.value);
  19823. h && h.scrollIntoView && h.scrollIntoView(!1);
  19824. }, {
  19825. flush: "post",
  19826. immediate: !0
  19827. });
  19828. }), se(i, () => {
  19829. i.value || s(null);
  19830. }), j1e({}), () => {
  19831. var h;
  19832. const {
  19833. prefixCls: p,
  19834. id: v,
  19835. tabs: g,
  19836. locale: m,
  19837. mobile: y,
  19838. moreIcon: b = ((h = r.moreIcon) === null || h === void 0 ? void 0 : h.call(r)) || M(hx, null, null),
  19839. moreTransitionName: _,
  19840. editable: O,
  19841. tabBarGutter: S,
  19842. rtl: x,
  19843. onTabClick: C,
  19844. popupClassName: T
  19845. } = t;
  19846. if (!g.length) return null;
  19847. const w = `${p}-dropdown`, P = m == null ? void 0 : m.dropdownAriaLabel, $ = {
  19848. [x ? "marginRight" : "marginLeft"]: S
  19849. };
  19850. g.length || ($.visibility = "hidden", $.order = 1);
  19851. const A = ye({
  19852. [`${w}-rtl`]: x,
  19853. [`${T}`]: !0
  19854. }), D = y ? null : M(d1e, {
  19855. prefixCls: w,
  19856. trigger: ["hover"],
  19857. visible: i.value,
  19858. transitionName: _,
  19859. onVisibleChange: a,
  19860. overlayClassName: A,
  19861. mouseEnterDelay: 0.1,
  19862. mouseLeaveDelay: 0.1,
  19863. getPopupContainer: t.getPopupContainer
  19864. }, {
  19865. overlay: () => M(jl, {
  19866. onClick: (E) => {
  19867. let {
  19868. key: R,
  19869. domEvent: N
  19870. } = E;
  19871. C(R, N), a(!1);
  19872. },
  19873. id: c.value,
  19874. tabindex: -1,
  19875. role: "listbox",
  19876. "aria-activedescendant": f.value,
  19877. selectedKeys: [o.value],
  19878. "aria-label": P !== void 0 ? P : "expanded dropdown"
  19879. }, {
  19880. default: () => [g.map((E) => {
  19881. var R, N;
  19882. const V = O && E.closable !== !1 && !E.disabled;
  19883. return M(Th, {
  19884. key: E.key,
  19885. id: `${c.value}-${E.key}`,
  19886. role: "option",
  19887. "aria-controls": v && `${v}-panel-${E.key}`,
  19888. disabled: E.disabled
  19889. }, {
  19890. default: () => [M("span", null, [typeof E.tab == "function" ? E.tab() : E.tab]), V && M("button", {
  19891. type: "button",
  19892. "aria-label": t.removeAriaLabel || "remove",
  19893. tabindex: 0,
  19894. class: `${w}-menu-item-remove`,
  19895. onClick: (z) => {
  19896. z.stopPropagation(), d(z, E.key);
  19897. }
  19898. }, [((R = E.closeIcon) === null || R === void 0 ? void 0 : R.call(E)) || ((N = O.removeIcon) === null || N === void 0 ? void 0 : N.call(O)) || "×"])]
  19899. });
  19900. })]
  19901. }),
  19902. default: () => M("button", {
  19903. type: "button",
  19904. class: `${p}-nav-more`,
  19905. style: $,
  19906. tabindex: -1,
  19907. "aria-hidden": "true",
  19908. "aria-haspopup": "listbox",
  19909. "aria-controls": c.value,
  19910. id: `${v}-more`,
  19911. "aria-expanded": i.value,
  19912. onKeydown: u
  19913. }, [b])
  19914. });
  19915. return M("div", {
  19916. class: ye(`${p}-nav-operations`, n.class),
  19917. style: n.style
  19918. }, [D, M(uX, {
  19919. prefixCls: p,
  19920. locale: m,
  19921. editable: O
  19922. }, null)]);
  19923. };
  19924. }
  19925. }), cX = Symbol("tabsContextKey"), fX = (t) => {
  19926. pt(cX, t);
  19927. }, dX = () => Ge(cX, {
  19928. tabs: U([]),
  19929. prefixCls: U()
  19930. });
  19931. te({
  19932. compatConfig: {
  19933. MODE: 3
  19934. },
  19935. name: "TabsContextProvider",
  19936. inheritAttrs: !1,
  19937. props: {
  19938. tabs: {
  19939. type: Object,
  19940. default: void 0
  19941. },
  19942. prefixCls: {
  19943. type: String,
  19944. default: void 0
  19945. }
  19946. },
  19947. setup(t, e) {
  19948. let {
  19949. slots: n
  19950. } = e;
  19951. return fX($S(t)), () => {
  19952. var r;
  19953. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  19954. };
  19955. }
  19956. });
  19957. const FOe = 0.1, w5 = 0.01, T_ = 20, C5 = Math.pow(0.995, T_);
  19958. function WOe(t, e) {
  19959. const [n, r] = fn(), [i, a] = fn(0), [o, s] = fn(0), [l, u] = fn(), c = U();
  19960. function f(O) {
  19961. const {
  19962. screenX: S,
  19963. screenY: x
  19964. } = O.touches[0];
  19965. r({
  19966. x: S,
  19967. y: x
  19968. }), clearInterval(c.value);
  19969. }
  19970. function d(O) {
  19971. if (!n.value) return;
  19972. O.preventDefault();
  19973. const {
  19974. screenX: S,
  19975. screenY: x
  19976. } = O.touches[0], C = S - n.value.x, T = x - n.value.y;
  19977. e(C, T), r({
  19978. x: S,
  19979. y: x
  19980. });
  19981. const w = Date.now();
  19982. s(w - i.value), a(w), u({
  19983. x: C,
  19984. y: T
  19985. });
  19986. }
  19987. function h() {
  19988. if (!n.value) return;
  19989. const O = l.value;
  19990. if (r(null), u(null), O) {
  19991. const S = O.x / o.value, x = O.y / o.value, C = Math.abs(S), T = Math.abs(x);
  19992. if (Math.max(C, T) < FOe) return;
  19993. let w = S, P = x;
  19994. c.value = setInterval(() => {
  19995. if (Math.abs(w) < w5 && Math.abs(P) < w5) {
  19996. clearInterval(c.value);
  19997. return;
  19998. }
  19999. w *= C5, P *= C5, e(w * T_, P * T_);
  20000. }, T_);
  20001. }
  20002. }
  20003. const p = U();
  20004. function v(O) {
  20005. const {
  20006. deltaX: S,
  20007. deltaY: x
  20008. } = O;
  20009. let C = 0;
  20010. const T = Math.abs(S), w = Math.abs(x);
  20011. 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();
  20012. }
  20013. const g = U({
  20014. onTouchStart: f,
  20015. onTouchMove: d,
  20016. onTouchEnd: h,
  20017. onWheel: v
  20018. });
  20019. function m(O) {
  20020. g.value.onTouchStart(O);
  20021. }
  20022. function y(O) {
  20023. g.value.onTouchMove(O);
  20024. }
  20025. function b(O) {
  20026. g.value.onTouchEnd(O);
  20027. }
  20028. function _(O) {
  20029. g.value.onWheel(O);
  20030. }
  20031. it(() => {
  20032. var O, S;
  20033. document.addEventListener("touchmove", y, {
  20034. passive: !1
  20035. }), document.addEventListener("touchend", b, {
  20036. passive: !1
  20037. }), (O = t.value) === null || O === void 0 || O.addEventListener("touchstart", m, {
  20038. passive: !1
  20039. }), (S = t.value) === null || S === void 0 || S.addEventListener("wheel", _, {
  20040. passive: !1
  20041. });
  20042. }), yt(() => {
  20043. document.removeEventListener("touchmove", y), document.removeEventListener("touchend", b);
  20044. });
  20045. }
  20046. function T5(t, e) {
  20047. const n = U(t);
  20048. function r(i) {
  20049. const a = typeof i == "function" ? i(n.value) : i;
  20050. a !== n.value && e(a, n.value), n.value = a;
  20051. }
  20052. return [n, r];
  20053. }
  20054. const QOe = () => {
  20055. const t = U(/* @__PURE__ */ new Map()), e = (n) => (r) => {
  20056. t.value.set(n, r);
  20057. };
  20058. return G9(() => {
  20059. t.value = /* @__PURE__ */ new Map();
  20060. }), [e, t];
  20061. }, P5 = {
  20062. width: 0,
  20063. height: 0,
  20064. left: 0,
  20065. top: 0,
  20066. right: 0
  20067. }, HOe = () => ({
  20068. id: {
  20069. type: String
  20070. },
  20071. tabPosition: {
  20072. type: String
  20073. },
  20074. activeKey: {
  20075. type: [String, Number]
  20076. },
  20077. rtl: {
  20078. type: Boolean
  20079. },
  20080. animated: $t(),
  20081. editable: $t(),
  20082. moreIcon: Y.any,
  20083. moreTransitionName: {
  20084. type: String
  20085. },
  20086. mobile: {
  20087. type: Boolean
  20088. },
  20089. tabBarGutter: {
  20090. type: Number
  20091. },
  20092. renderTabBar: {
  20093. type: Function
  20094. },
  20095. locale: $t(),
  20096. popupClassName: String,
  20097. getPopupContainer: tt(),
  20098. onTabClick: {
  20099. type: Function
  20100. },
  20101. onTabScroll: {
  20102. type: Function
  20103. }
  20104. }), GOe = (t, e) => {
  20105. const {
  20106. offsetWidth: n,
  20107. offsetHeight: r,
  20108. offsetTop: i,
  20109. offsetLeft: a
  20110. } = t, {
  20111. width: o,
  20112. height: s,
  20113. x: l,
  20114. y: u
  20115. } = t.getBoundingClientRect();
  20116. return Math.abs(o - n) < 1 ? [o, s, l - e.x, u - e.y] : [n, r, a, i];
  20117. }, $5 = te({
  20118. compatConfig: {
  20119. MODE: 3
  20120. },
  20121. name: "TabNavList",
  20122. inheritAttrs: !1,
  20123. props: HOe(),
  20124. slots: Object,
  20125. emits: ["tabClick", "tabScroll"],
  20126. setup(t, e) {
  20127. let {
  20128. attrs: n,
  20129. slots: r
  20130. } = e;
  20131. const {
  20132. tabs: i,
  20133. prefixCls: a
  20134. } = dX(), o = ae(), s = ae(), l = ae(), u = ae(), [c, f] = QOe(), d = L(() => t.tabPosition === "top" || t.tabPosition === "bottom"), [h, p] = T5(0, (be, he) => {
  20135. d.value && t.onTabScroll && t.onTabScroll({
  20136. direction: be > he ? "left" : "right"
  20137. });
  20138. }), [v, g] = T5(0, (be, he) => {
  20139. !d.value && t.onTabScroll && t.onTabScroll({
  20140. direction: be > he ? "top" : "bottom"
  20141. });
  20142. }), [m, y] = fn(0), [b, _] = fn(0), [O, S] = fn(null), [x, C] = fn(null), [T, w] = fn(0), [P, $] = fn(0), [A, D] = LOe(/* @__PURE__ */ new Map()), E = BOe(i, A), R = L(() => `${a.value}-nav-operations-hidden`), N = ae(0), V = ae(0);
  20143. ht(() => {
  20144. 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);
  20145. });
  20146. const z = (be) => be < N.value ? N.value : be > V.value ? V.value : be, W = ae(), [F, Q] = fn(), Z = () => {
  20147. Q(Date.now());
  20148. }, ne = () => {
  20149. clearTimeout(W.value);
  20150. }, ee = (be, he) => {
  20151. be((Te) => z(Te + he));
  20152. };
  20153. WOe(o, (be, he) => {
  20154. if (d.value) {
  20155. if (O.value >= m.value)
  20156. return !1;
  20157. ee(p, be);
  20158. } else {
  20159. if (x.value >= b.value)
  20160. return !1;
  20161. ee(g, he);
  20162. }
  20163. return ne(), Z(), !0;
  20164. }), se(F, () => {
  20165. ne(), F.value && (W.value = setTimeout(() => {
  20166. Q(0);
  20167. }, 100));
  20168. });
  20169. const oe = function() {
  20170. let be = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.activeKey;
  20171. const he = E.value.get(be) || {
  20172. width: 0,
  20173. height: 0,
  20174. left: 0,
  20175. right: 0,
  20176. top: 0
  20177. };
  20178. if (d.value) {
  20179. let Te = h.value;
  20180. 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(z(Te));
  20181. } else {
  20182. let Te = v.value;
  20183. 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(z(Te));
  20184. }
  20185. }, K = ae(0), ie = ae(0);
  20186. ht(() => {
  20187. let be, he, Te, ze, ut, ct;
  20188. const Dt = E.value;
  20189. ["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);
  20190. let ve = ze;
  20191. ut + ct > ze && ut < ze && (ve = ze - ct);
  20192. const Xe = i.value;
  20193. if (!Xe.length)
  20194. return [K.value, ie.value] = [0, 0];
  20195. const Rt = Xe.length;
  20196. let An = Rt;
  20197. for (let $r = 0; $r < Rt; $r += 1) {
  20198. const Va = Dt.get(Xe[$r].key) || P5;
  20199. if (Va[he] + Va[be] > Te + ve) {
  20200. An = $r - 1;
  20201. break;
  20202. }
  20203. }
  20204. let sn = 0;
  20205. for (let $r = Rt - 1; $r >= 0; $r -= 1)
  20206. if ((Dt.get(Xe[$r].key) || P5)[he] < Te) {
  20207. sn = $r + 1;
  20208. break;
  20209. }
  20210. return [K.value, ie.value] = [sn, An];
  20211. });
  20212. const X = () => {
  20213. D(() => {
  20214. var be;
  20215. const he = /* @__PURE__ */ new Map(), Te = (be = s.value) === null || be === void 0 ? void 0 : be.getBoundingClientRect();
  20216. return i.value.forEach((ze) => {
  20217. let {
  20218. key: ut
  20219. } = ze;
  20220. const ct = f.value.get(ut), Dt = (ct == null ? void 0 : ct.$el) || ct;
  20221. if (Dt) {
  20222. const [ve, Xe, Rt, An] = GOe(Dt, Te);
  20223. he.set(ut, {
  20224. width: ve,
  20225. height: Xe,
  20226. left: Rt,
  20227. top: An
  20228. });
  20229. }
  20230. }), he;
  20231. });
  20232. };
  20233. se(() => i.value.map((be) => be.key).join("%%"), () => {
  20234. X();
  20235. }, {
  20236. flush: "post"
  20237. });
  20238. const H = () => {
  20239. var be, he, Te, ze, ut;
  20240. 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;
  20241. S(ct), C(Dt), w(Xe), $(Rt);
  20242. 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;
  20243. y(An), _(sn), X();
  20244. }, 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 = () => {
  20245. xt.cancel(Ee.value);
  20246. };
  20247. se([de, d, () => t.rtl], () => {
  20248. const be = {};
  20249. de.value && (d.value ? (t.rtl ? be.right = Wp(de.value.right) : be.left = Wp(de.value.left), be.width = Wp(de.value.width)) : (be.top = Wp(de.value.top), be.height = Wp(de.value.height))), $e(), Ee.value = xt(() => {
  20250. fe(be);
  20251. });
  20252. }), se([() => t.activeKey, de, E, d], () => {
  20253. oe();
  20254. }, {
  20255. flush: "post"
  20256. }), se([() => t.rtl, () => t.tabBarGutter, () => t.activeKey, () => i.value], () => {
  20257. H();
  20258. }, {
  20259. flush: "post"
  20260. });
  20261. const Se = (be) => {
  20262. let {
  20263. position: he,
  20264. prefixCls: Te,
  20265. extra: ze
  20266. } = be;
  20267. if (!ze) return null;
  20268. const ut = ze == null ? void 0 : ze({
  20269. position: he
  20270. });
  20271. return ut ? M("div", {
  20272. class: `${Te}-extra-content`
  20273. }, [ut]) : null;
  20274. };
  20275. return yt(() => {
  20276. ne(), $e();
  20277. }), () => {
  20278. const {
  20279. id: be,
  20280. animated: he,
  20281. activeKey: Te,
  20282. rtl: ze,
  20283. editable: ut,
  20284. locale: ct,
  20285. tabPosition: Dt,
  20286. tabBarGutter: ve,
  20287. onTabClick: Xe
  20288. } = t, {
  20289. class: Rt,
  20290. style: An
  20291. } = n, sn = a.value, $r = !!G.value.length, Va = `${sn}-nav-wrap`;
  20292. let Bp, zp, py, Hw;
  20293. d.value ? ze ? (zp = h.value > 0, Bp = h.value + O.value < m.value) : (Bp = h.value < 0, zp = -h.value + O.value < m.value) : (py = v.value < 0, Hw = -v.value + x.value < b.value);
  20294. const Gf = {};
  20295. Dt === "top" || Dt === "bottom" ? Gf[ze ? "marginRight" : "marginLeft"] = typeof ve == "number" ? `${ve}px` : ve : Gf.marginTop = typeof ve == "number" ? `${ve}px` : ve;
  20296. const Gw = i.value.map((Vp, jw) => {
  20297. const {
  20298. key: jf
  20299. } = Vp;
  20300. return M(NOe, {
  20301. id: be,
  20302. prefixCls: sn,
  20303. key: jf,
  20304. tab: Vp,
  20305. style: jw === 0 ? void 0 : Gf,
  20306. closable: Vp.closable,
  20307. editable: ut,
  20308. active: jf === Te,
  20309. removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
  20310. ref: c(jf),
  20311. onClick: (F4) => {
  20312. Xe(jf, F4);
  20313. },
  20314. onFocus: () => {
  20315. oe(jf), Z(), o.value && (ze || (o.value.scrollLeft = 0), o.value.scrollTop = 0);
  20316. }
  20317. }, r);
  20318. });
  20319. return M("div", {
  20320. role: "tablist",
  20321. class: ye(`${sn}-nav`, Rt),
  20322. style: An,
  20323. onKeydown: () => {
  20324. Z();
  20325. }
  20326. }, [M(Se, {
  20327. position: "left",
  20328. prefixCls: sn,
  20329. extra: r.leftExtra
  20330. }, null), M(ph, {
  20331. onResize: H
  20332. }, {
  20333. default: () => [M("div", {
  20334. class: ye(Va, {
  20335. [`${Va}-ping-left`]: Bp,
  20336. [`${Va}-ping-right`]: zp,
  20337. [`${Va}-ping-top`]: py,
  20338. [`${Va}-ping-bottom`]: Hw
  20339. }),
  20340. ref: o
  20341. }, [M(ph, {
  20342. onResize: H
  20343. }, {
  20344. default: () => [M("div", {
  20345. ref: s,
  20346. class: `${sn}-nav-list`,
  20347. style: {
  20348. transform: `translate(${h.value}px, ${v.value}px)`,
  20349. transition: F.value ? "none" : void 0
  20350. }
  20351. }, [Gw, M(uX, {
  20352. ref: u,
  20353. prefixCls: sn,
  20354. locale: ct,
  20355. editable: ut,
  20356. style: I(I({}, Gw.length === 0 ? void 0 : Gf), {
  20357. visibility: $r ? "hidden" : null
  20358. })
  20359. }, null), M("div", {
  20360. class: ye(`${sn}-ink-bar`, {
  20361. [`${sn}-ink-bar-animated`]: he.inkBar
  20362. }),
  20363. style: re.value
  20364. }, null)])]
  20365. })])]
  20366. }), M(VOe, j(j({}, t), {}, {
  20367. removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
  20368. ref: l,
  20369. prefixCls: sn,
  20370. tabs: G.value,
  20371. class: !$r && R.value
  20372. }), am(r, ["moreIcon"])), M(Se, {
  20373. position: "right",
  20374. prefixCls: sn,
  20375. extra: r.rightExtra
  20376. }, null), M(Se, {
  20377. position: "right",
  20378. prefixCls: sn,
  20379. extra: r.tabBarExtraContent
  20380. }, null)]);
  20381. };
  20382. }
  20383. }), jOe = te({
  20384. compatConfig: {
  20385. MODE: 3
  20386. },
  20387. name: "TabPanelList",
  20388. inheritAttrs: !1,
  20389. props: {
  20390. activeKey: {
  20391. type: [String, Number]
  20392. },
  20393. id: {
  20394. type: String
  20395. },
  20396. rtl: {
  20397. type: Boolean
  20398. },
  20399. animated: {
  20400. type: Object,
  20401. default: void 0
  20402. },
  20403. tabPosition: {
  20404. type: String
  20405. },
  20406. destroyInactiveTabPane: {
  20407. type: Boolean
  20408. }
  20409. },
  20410. setup(t) {
  20411. const {
  20412. tabs: e,
  20413. prefixCls: n
  20414. } = dX();
  20415. return () => {
  20416. const {
  20417. id: r,
  20418. activeKey: i,
  20419. animated: a,
  20420. tabPosition: o,
  20421. rtl: s,
  20422. destroyInactiveTabPane: l
  20423. } = t, u = a.tabPane, c = n.value, f = e.value.findIndex((d) => d.key === i);
  20424. return M("div", {
  20425. class: `${c}-content-holder`
  20426. }, [M("div", {
  20427. class: [`${c}-content`, `${c}-content-${o}`, {
  20428. [`${c}-content-animated`]: u
  20429. }],
  20430. style: f && u ? {
  20431. [s ? "marginRight" : "marginLeft"]: `-${f}00%`
  20432. } : null
  20433. }, [e.value.map((d) => Pn(d.node, {
  20434. key: d.key,
  20435. prefixCls: c,
  20436. tabKey: d.key,
  20437. id: r,
  20438. animated: u,
  20439. active: d.key === i,
  20440. destroyInactiveTabPane: l
  20441. }))])]);
  20442. };
  20443. }
  20444. });
  20445. var ZOe = { 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" };
  20446. function A5(t) {
  20447. for (var e = 1; e < arguments.length; e++) {
  20448. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  20449. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  20450. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  20451. }))), r.forEach(function(i) {
  20452. UOe(t, i, n[i]);
  20453. });
  20454. }
  20455. return t;
  20456. }
  20457. function UOe(t, e, n) {
  20458. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  20459. }
  20460. var yx = function(e, n) {
  20461. var r = A5({}, e, n.attrs);
  20462. return M(lt, A5({}, r, {
  20463. icon: ZOe
  20464. }), null);
  20465. };
  20466. yx.displayName = "PlusOutlined";
  20467. yx.inheritAttrs = !1;
  20468. const XOe = (t) => {
  20469. const {
  20470. componentCls: e,
  20471. motionDurationSlow: n
  20472. } = t;
  20473. return [
  20474. {
  20475. [e]: {
  20476. [`${e}-switch`]: {
  20477. "&-appear, &-enter": {
  20478. transition: "none",
  20479. "&-start": {
  20480. opacity: 0
  20481. },
  20482. "&-active": {
  20483. opacity: 1,
  20484. transition: `opacity ${n}`
  20485. }
  20486. },
  20487. "&-leave": {
  20488. position: "absolute",
  20489. transition: "none",
  20490. inset: 0,
  20491. "&-start": {
  20492. opacity: 1
  20493. },
  20494. "&-active": {
  20495. opacity: 0,
  20496. transition: `opacity ${n}`
  20497. }
  20498. }
  20499. }
  20500. }
  20501. },
  20502. // Follow code may reuse in other components
  20503. [Ch(t, "slide-up"), Ch(t, "slide-down")]
  20504. ];
  20505. }, YOe = (t) => {
  20506. const {
  20507. componentCls: e,
  20508. tabsCardHorizontalPadding: n,
  20509. tabsCardHeadBackground: r,
  20510. tabsCardGutter: i,
  20511. colorSplit: a
  20512. } = t;
  20513. return {
  20514. [`${e}-card`]: {
  20515. [`> ${e}-nav, > div > ${e}-nav`]: {
  20516. [`${e}-tab`]: {
  20517. margin: 0,
  20518. padding: n,
  20519. background: r,
  20520. border: `${t.lineWidth}px ${t.lineType} ${a}`,
  20521. transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
  20522. },
  20523. [`${e}-tab-active`]: {
  20524. color: t.colorPrimary,
  20525. background: t.colorBgContainer
  20526. },
  20527. [`${e}-ink-bar`]: {
  20528. visibility: "hidden"
  20529. }
  20530. },
  20531. // ========================== Top & Bottom ==========================
  20532. [`&${e}-top, &${e}-bottom`]: {
  20533. [`> ${e}-nav, > div > ${e}-nav`]: {
  20534. [`${e}-tab + ${e}-tab`]: {
  20535. marginLeft: {
  20536. _skip_check_: !0,
  20537. value: `${i}px`
  20538. }
  20539. }
  20540. }
  20541. },
  20542. [`&${e}-top`]: {
  20543. [`> ${e}-nav, > div > ${e}-nav`]: {
  20544. [`${e}-tab`]: {
  20545. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`
  20546. },
  20547. [`${e}-tab-active`]: {
  20548. borderBottomColor: t.colorBgContainer
  20549. }
  20550. }
  20551. },
  20552. [`&${e}-bottom`]: {
  20553. [`> ${e}-nav, > div > ${e}-nav`]: {
  20554. [`${e}-tab`]: {
  20555. borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`
  20556. },
  20557. [`${e}-tab-active`]: {
  20558. borderTopColor: t.colorBgContainer
  20559. }
  20560. }
  20561. },
  20562. // ========================== Left & Right ==========================
  20563. [`&${e}-left, &${e}-right`]: {
  20564. [`> ${e}-nav, > div > ${e}-nav`]: {
  20565. [`${e}-tab + ${e}-tab`]: {
  20566. marginTop: `${i}px`
  20567. }
  20568. }
  20569. },
  20570. [`&${e}-left`]: {
  20571. [`> ${e}-nav, > div > ${e}-nav`]: {
  20572. [`${e}-tab`]: {
  20573. borderRadius: {
  20574. _skip_check_: !0,
  20575. value: `${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`
  20576. }
  20577. },
  20578. [`${e}-tab-active`]: {
  20579. borderRightColor: {
  20580. _skip_check_: !0,
  20581. value: t.colorBgContainer
  20582. }
  20583. }
  20584. }
  20585. },
  20586. [`&${e}-right`]: {
  20587. [`> ${e}-nav, > div > ${e}-nav`]: {
  20588. [`${e}-tab`]: {
  20589. borderRadius: {
  20590. _skip_check_: !0,
  20591. value: `0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`
  20592. }
  20593. },
  20594. [`${e}-tab-active`]: {
  20595. borderLeftColor: {
  20596. _skip_check_: !0,
  20597. value: t.colorBgContainer
  20598. }
  20599. }
  20600. }
  20601. }
  20602. }
  20603. };
  20604. }, qOe = (t) => {
  20605. const {
  20606. componentCls: e,
  20607. tabsHoverColor: n,
  20608. dropdownEdgeChildVerticalPadding: r
  20609. } = t;
  20610. return {
  20611. [`${e}-dropdown`]: I(I({}, nn(t)), {
  20612. position: "absolute",
  20613. top: -9999,
  20614. left: {
  20615. _skip_check_: !0,
  20616. value: -9999
  20617. },
  20618. zIndex: t.zIndexPopup,
  20619. display: "block",
  20620. "&-hidden": {
  20621. display: "none"
  20622. },
  20623. [`${e}-dropdown-menu`]: {
  20624. maxHeight: t.tabsDropdownHeight,
  20625. margin: 0,
  20626. padding: `${r}px 0`,
  20627. overflowX: "hidden",
  20628. overflowY: "auto",
  20629. textAlign: {
  20630. _skip_check_: !0,
  20631. value: "left"
  20632. },
  20633. listStyleType: "none",
  20634. backgroundColor: t.colorBgContainer,
  20635. backgroundClip: "padding-box",
  20636. borderRadius: t.borderRadiusLG,
  20637. outline: "none",
  20638. boxShadow: t.boxShadowSecondary,
  20639. "&-item": I(I({}, mh), {
  20640. display: "flex",
  20641. alignItems: "center",
  20642. minWidth: t.tabsDropdownWidth,
  20643. margin: 0,
  20644. padding: `${t.paddingXXS}px ${t.paddingSM}px`,
  20645. color: t.colorText,
  20646. fontWeight: "normal",
  20647. fontSize: t.fontSize,
  20648. lineHeight: t.lineHeight,
  20649. cursor: "pointer",
  20650. transition: `all ${t.motionDurationSlow}`,
  20651. "> span": {
  20652. flex: 1,
  20653. whiteSpace: "nowrap"
  20654. },
  20655. "&-remove": {
  20656. flex: "none",
  20657. marginLeft: {
  20658. _skip_check_: !0,
  20659. value: t.marginSM
  20660. },
  20661. color: t.colorTextDescription,
  20662. fontSize: t.fontSizeSM,
  20663. background: "transparent",
  20664. border: 0,
  20665. cursor: "pointer",
  20666. "&:hover": {
  20667. color: n
  20668. }
  20669. },
  20670. "&:hover": {
  20671. background: t.controlItemBgHover
  20672. },
  20673. "&-disabled": {
  20674. "&, &:hover": {
  20675. color: t.colorTextDisabled,
  20676. background: "transparent",
  20677. cursor: "not-allowed"
  20678. }
  20679. }
  20680. })
  20681. }
  20682. })
  20683. };
  20684. }, KOe = (t) => {
  20685. const {
  20686. componentCls: e,
  20687. margin: n,
  20688. colorSplit: r
  20689. } = t;
  20690. return {
  20691. // ========================== Top & Bottom ==========================
  20692. [`${e}-top, ${e}-bottom`]: {
  20693. flexDirection: "column",
  20694. [`> ${e}-nav, > div > ${e}-nav`]: {
  20695. margin: `0 0 ${n}px 0`,
  20696. "&::before": {
  20697. position: "absolute",
  20698. right: {
  20699. _skip_check_: !0,
  20700. value: 0
  20701. },
  20702. left: {
  20703. _skip_check_: !0,
  20704. value: 0
  20705. },
  20706. borderBottom: `${t.lineWidth}px ${t.lineType} ${r}`,
  20707. content: "''"
  20708. },
  20709. [`${e}-ink-bar`]: {
  20710. height: t.lineWidthBold,
  20711. "&-animated": {
  20712. transition: `width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
  20713. right ${t.motionDurationSlow}`
  20714. }
  20715. },
  20716. [`${e}-nav-wrap`]: {
  20717. "&::before, &::after": {
  20718. top: 0,
  20719. bottom: 0,
  20720. width: t.controlHeight
  20721. },
  20722. "&::before": {
  20723. left: {
  20724. _skip_check_: !0,
  20725. value: 0
  20726. },
  20727. boxShadow: t.boxShadowTabsOverflowLeft
  20728. },
  20729. "&::after": {
  20730. right: {
  20731. _skip_check_: !0,
  20732. value: 0
  20733. },
  20734. boxShadow: t.boxShadowTabsOverflowRight
  20735. },
  20736. [`&${e}-nav-wrap-ping-left::before`]: {
  20737. opacity: 1
  20738. },
  20739. [`&${e}-nav-wrap-ping-right::after`]: {
  20740. opacity: 1
  20741. }
  20742. }
  20743. }
  20744. },
  20745. [`${e}-top`]: {
  20746. [`> ${e}-nav,
  20747. > div > ${e}-nav`]: {
  20748. "&::before": {
  20749. bottom: 0
  20750. },
  20751. [`${e}-ink-bar`]: {
  20752. bottom: 0
  20753. }
  20754. }
  20755. },
  20756. [`${e}-bottom`]: {
  20757. [`> ${e}-nav, > div > ${e}-nav`]: {
  20758. order: 1,
  20759. marginTop: `${n}px`,
  20760. marginBottom: 0,
  20761. "&::before": {
  20762. top: 0
  20763. },
  20764. [`${e}-ink-bar`]: {
  20765. top: 0
  20766. }
  20767. },
  20768. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20769. order: 0
  20770. }
  20771. },
  20772. // ========================== Left & Right ==========================
  20773. [`${e}-left, ${e}-right`]: {
  20774. [`> ${e}-nav, > div > ${e}-nav`]: {
  20775. flexDirection: "column",
  20776. minWidth: t.controlHeight * 1.25,
  20777. // >>>>>>>>>>> Tab
  20778. [`${e}-tab`]: {
  20779. padding: `${t.paddingXS}px ${t.paddingLG}px`,
  20780. textAlign: "center"
  20781. },
  20782. [`${e}-tab + ${e}-tab`]: {
  20783. margin: `${t.margin}px 0 0 0`
  20784. },
  20785. // >>>>>>>>>>> Nav
  20786. [`${e}-nav-wrap`]: {
  20787. flexDirection: "column",
  20788. "&::before, &::after": {
  20789. right: {
  20790. _skip_check_: !0,
  20791. value: 0
  20792. },
  20793. left: {
  20794. _skip_check_: !0,
  20795. value: 0
  20796. },
  20797. height: t.controlHeight
  20798. },
  20799. "&::before": {
  20800. top: 0,
  20801. boxShadow: t.boxShadowTabsOverflowTop
  20802. },
  20803. "&::after": {
  20804. bottom: 0,
  20805. boxShadow: t.boxShadowTabsOverflowBottom
  20806. },
  20807. [`&${e}-nav-wrap-ping-top::before`]: {
  20808. opacity: 1
  20809. },
  20810. [`&${e}-nav-wrap-ping-bottom::after`]: {
  20811. opacity: 1
  20812. }
  20813. },
  20814. // >>>>>>>>>>> Ink Bar
  20815. [`${e}-ink-bar`]: {
  20816. width: t.lineWidthBold,
  20817. "&-animated": {
  20818. transition: `height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`
  20819. }
  20820. },
  20821. [`${e}-nav-list, ${e}-nav-operations`]: {
  20822. flex: "1 0 auto",
  20823. flexDirection: "column"
  20824. }
  20825. }
  20826. },
  20827. [`${e}-left`]: {
  20828. [`> ${e}-nav, > div > ${e}-nav`]: {
  20829. [`${e}-ink-bar`]: {
  20830. right: {
  20831. _skip_check_: !0,
  20832. value: 0
  20833. }
  20834. }
  20835. },
  20836. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20837. marginLeft: {
  20838. _skip_check_: !0,
  20839. value: `-${t.lineWidth}px`
  20840. },
  20841. borderLeft: {
  20842. _skip_check_: !0,
  20843. value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  20844. },
  20845. [`> ${e}-content > ${e}-tabpane`]: {
  20846. paddingLeft: {
  20847. _skip_check_: !0,
  20848. value: t.paddingLG
  20849. }
  20850. }
  20851. }
  20852. },
  20853. [`${e}-right`]: {
  20854. [`> ${e}-nav, > div > ${e}-nav`]: {
  20855. order: 1,
  20856. [`${e}-ink-bar`]: {
  20857. left: {
  20858. _skip_check_: !0,
  20859. value: 0
  20860. }
  20861. }
  20862. },
  20863. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20864. order: 0,
  20865. marginRight: {
  20866. _skip_check_: !0,
  20867. value: -t.lineWidth
  20868. },
  20869. borderRight: {
  20870. _skip_check_: !0,
  20871. value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  20872. },
  20873. [`> ${e}-content > ${e}-tabpane`]: {
  20874. paddingRight: {
  20875. _skip_check_: !0,
  20876. value: t.paddingLG
  20877. }
  20878. }
  20879. }
  20880. }
  20881. };
  20882. }, JOe = (t) => {
  20883. const {
  20884. componentCls: e,
  20885. padding: n
  20886. } = t;
  20887. return {
  20888. [e]: {
  20889. "&-small": {
  20890. [`> ${e}-nav`]: {
  20891. [`${e}-tab`]: {
  20892. padding: `${t.paddingXS}px 0`,
  20893. fontSize: t.fontSize
  20894. }
  20895. }
  20896. },
  20897. "&-large": {
  20898. [`> ${e}-nav`]: {
  20899. [`${e}-tab`]: {
  20900. padding: `${n}px 0`,
  20901. fontSize: t.fontSizeLG
  20902. }
  20903. }
  20904. }
  20905. },
  20906. [`${e}-card`]: {
  20907. [`&${e}-small`]: {
  20908. [`> ${e}-nav`]: {
  20909. [`${e}-tab`]: {
  20910. padding: `${t.paddingXXS * 1.5}px ${n}px`
  20911. }
  20912. },
  20913. [`&${e}-bottom`]: {
  20914. [`> ${e}-nav ${e}-tab`]: {
  20915. borderRadius: `0 0 ${t.borderRadius}px ${t.borderRadius}px`
  20916. }
  20917. },
  20918. [`&${e}-top`]: {
  20919. [`> ${e}-nav ${e}-tab`]: {
  20920. borderRadius: `${t.borderRadius}px ${t.borderRadius}px 0 0`
  20921. }
  20922. },
  20923. [`&${e}-right`]: {
  20924. [`> ${e}-nav ${e}-tab`]: {
  20925. borderRadius: {
  20926. _skip_check_: !0,
  20927. value: `0 ${t.borderRadius}px ${t.borderRadius}px 0`
  20928. }
  20929. }
  20930. },
  20931. [`&${e}-left`]: {
  20932. [`> ${e}-nav ${e}-tab`]: {
  20933. borderRadius: {
  20934. _skip_check_: !0,
  20935. value: `${t.borderRadius}px 0 0 ${t.borderRadius}px`
  20936. }
  20937. }
  20938. }
  20939. },
  20940. [`&${e}-large`]: {
  20941. [`> ${e}-nav`]: {
  20942. [`${e}-tab`]: {
  20943. padding: `${t.paddingXS}px ${n}px ${t.paddingXXS * 1.5}px`
  20944. }
  20945. }
  20946. }
  20947. }
  20948. };
  20949. }, eSe = (t) => {
  20950. const {
  20951. componentCls: e,
  20952. tabsActiveColor: n,
  20953. tabsHoverColor: r,
  20954. iconCls: i,
  20955. tabsHorizontalGutter: a
  20956. } = t, o = `${e}-tab`;
  20957. return {
  20958. [o]: {
  20959. position: "relative",
  20960. display: "inline-flex",
  20961. alignItems: "center",
  20962. padding: `${t.paddingSM}px 0`,
  20963. fontSize: `${t.fontSize}px`,
  20964. background: "transparent",
  20965. border: 0,
  20966. outline: "none",
  20967. cursor: "pointer",
  20968. "&-btn, &-remove": I({
  20969. "&:focus:not(:focus-visible), &:active": {
  20970. color: n
  20971. }
  20972. }, VS(t)),
  20973. "&-btn": {
  20974. outline: "none",
  20975. transition: "all 0.3s"
  20976. },
  20977. "&-remove": {
  20978. flex: "none",
  20979. marginRight: {
  20980. _skip_check_: !0,
  20981. value: -t.marginXXS
  20982. },
  20983. marginLeft: {
  20984. _skip_check_: !0,
  20985. value: t.marginXS
  20986. },
  20987. color: t.colorTextDescription,
  20988. fontSize: t.fontSizeSM,
  20989. background: "transparent",
  20990. border: "none",
  20991. outline: "none",
  20992. cursor: "pointer",
  20993. transition: `all ${t.motionDurationSlow}`,
  20994. "&:hover": {
  20995. color: t.colorTextHeading
  20996. }
  20997. },
  20998. "&:hover": {
  20999. color: r
  21000. },
  21001. [`&${o}-active ${o}-btn`]: {
  21002. color: t.colorPrimary,
  21003. textShadow: t.tabsActiveTextShadow
  21004. },
  21005. [`&${o}-disabled`]: {
  21006. color: t.colorTextDisabled,
  21007. cursor: "not-allowed"
  21008. },
  21009. [`&${o}-disabled ${o}-btn, &${o}-disabled ${e}-remove`]: {
  21010. "&:focus, &:active": {
  21011. color: t.colorTextDisabled
  21012. }
  21013. },
  21014. [`& ${o}-remove ${i}`]: {
  21015. margin: 0
  21016. },
  21017. [i]: {
  21018. marginRight: {
  21019. _skip_check_: !0,
  21020. value: t.marginSM
  21021. }
  21022. }
  21023. },
  21024. [`${o} + ${o}`]: {
  21025. margin: {
  21026. _skip_check_: !0,
  21027. value: `0 0 0 ${a}px`
  21028. }
  21029. }
  21030. };
  21031. }, tSe = (t) => {
  21032. const {
  21033. componentCls: e,
  21034. tabsHorizontalGutter: n,
  21035. iconCls: r,
  21036. tabsCardGutter: i
  21037. } = t;
  21038. return {
  21039. [`${e}-rtl`]: {
  21040. direction: "rtl",
  21041. [`${e}-nav`]: {
  21042. [`${e}-tab`]: {
  21043. margin: {
  21044. _skip_check_: !0,
  21045. value: `0 0 0 ${n}px`
  21046. },
  21047. [`${e}-tab:last-of-type`]: {
  21048. marginLeft: {
  21049. _skip_check_: !0,
  21050. value: 0
  21051. }
  21052. },
  21053. [r]: {
  21054. marginRight: {
  21055. _skip_check_: !0,
  21056. value: 0
  21057. },
  21058. marginLeft: {
  21059. _skip_check_: !0,
  21060. value: `${t.marginSM}px`
  21061. }
  21062. },
  21063. [`${e}-tab-remove`]: {
  21064. marginRight: {
  21065. _skip_check_: !0,
  21066. value: `${t.marginXS}px`
  21067. },
  21068. marginLeft: {
  21069. _skip_check_: !0,
  21070. value: `-${t.marginXXS}px`
  21071. },
  21072. [r]: {
  21073. margin: 0
  21074. }
  21075. }
  21076. }
  21077. },
  21078. [`&${e}-left`]: {
  21079. [`> ${e}-nav`]: {
  21080. order: 1
  21081. },
  21082. [`> ${e}-content-holder`]: {
  21083. order: 0
  21084. }
  21085. },
  21086. [`&${e}-right`]: {
  21087. [`> ${e}-nav`]: {
  21088. order: 0
  21089. },
  21090. [`> ${e}-content-holder`]: {
  21091. order: 1
  21092. }
  21093. },
  21094. // ====================== Card ======================
  21095. [`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
  21096. [`> ${e}-nav, > div > ${e}-nav`]: {
  21097. [`${e}-tab + ${e}-tab`]: {
  21098. marginRight: {
  21099. _skip_check_: !0,
  21100. value: `${i}px`
  21101. },
  21102. marginLeft: {
  21103. _skip_check_: !0,
  21104. value: 0
  21105. }
  21106. }
  21107. }
  21108. }
  21109. },
  21110. [`${e}-dropdown-rtl`]: {
  21111. direction: "rtl"
  21112. },
  21113. [`${e}-menu-item`]: {
  21114. [`${e}-dropdown-rtl`]: {
  21115. textAlign: {
  21116. _skip_check_: !0,
  21117. value: "right"
  21118. }
  21119. }
  21120. }
  21121. };
  21122. }, nSe = (t) => {
  21123. const {
  21124. componentCls: e,
  21125. tabsCardHorizontalPadding: n,
  21126. tabsCardHeight: r,
  21127. tabsCardGutter: i,
  21128. tabsHoverColor: a,
  21129. tabsActiveColor: o,
  21130. colorSplit: s
  21131. } = t;
  21132. return {
  21133. [e]: I(I(I(I({}, nn(t)), {
  21134. display: "flex",
  21135. // ========================== Navigation ==========================
  21136. [`> ${e}-nav, > div > ${e}-nav`]: {
  21137. position: "relative",
  21138. display: "flex",
  21139. flex: "none",
  21140. alignItems: "center",
  21141. [`${e}-nav-wrap`]: {
  21142. position: "relative",
  21143. display: "flex",
  21144. flex: "auto",
  21145. alignSelf: "stretch",
  21146. overflow: "hidden",
  21147. whiteSpace: "nowrap",
  21148. transform: "translate(0)",
  21149. // >>>>> Ping shadow
  21150. "&::before, &::after": {
  21151. position: "absolute",
  21152. zIndex: 1,
  21153. opacity: 0,
  21154. transition: `opacity ${t.motionDurationSlow}`,
  21155. content: "''",
  21156. pointerEvents: "none"
  21157. }
  21158. },
  21159. [`${e}-nav-list`]: {
  21160. position: "relative",
  21161. display: "flex",
  21162. transition: `opacity ${t.motionDurationSlow}`
  21163. },
  21164. // >>>>>>>> Operations
  21165. [`${e}-nav-operations`]: {
  21166. display: "flex",
  21167. alignSelf: "stretch"
  21168. },
  21169. [`${e}-nav-operations-hidden`]: {
  21170. position: "absolute",
  21171. visibility: "hidden",
  21172. pointerEvents: "none"
  21173. },
  21174. [`${e}-nav-more`]: {
  21175. position: "relative",
  21176. padding: n,
  21177. background: "transparent",
  21178. border: 0,
  21179. "&::after": {
  21180. position: "absolute",
  21181. right: {
  21182. _skip_check_: !0,
  21183. value: 0
  21184. },
  21185. bottom: 0,
  21186. left: {
  21187. _skip_check_: !0,
  21188. value: 0
  21189. },
  21190. height: t.controlHeightLG / 8,
  21191. transform: "translateY(100%)",
  21192. content: "''"
  21193. }
  21194. },
  21195. [`${e}-nav-add`]: I({
  21196. minWidth: `${r}px`,
  21197. marginLeft: {
  21198. _skip_check_: !0,
  21199. value: `${i}px`
  21200. },
  21201. padding: `0 ${t.paddingXS}px`,
  21202. background: "transparent",
  21203. border: `${t.lineWidth}px ${t.lineType} ${s}`,
  21204. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
  21205. outline: "none",
  21206. cursor: "pointer",
  21207. color: t.colorText,
  21208. transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
  21209. "&:hover": {
  21210. color: a
  21211. },
  21212. "&:active, &:focus:not(:focus-visible)": {
  21213. color: o
  21214. }
  21215. }, VS(t))
  21216. },
  21217. [`${e}-extra-content`]: {
  21218. flex: "none"
  21219. },
  21220. // ============================ InkBar ============================
  21221. [`${e}-ink-bar`]: {
  21222. position: "absolute",
  21223. background: t.colorPrimary,
  21224. pointerEvents: "none"
  21225. }
  21226. }), eSe(t)), {
  21227. // =========================== TabPanes ===========================
  21228. [`${e}-content`]: {
  21229. position: "relative",
  21230. display: "flex",
  21231. width: "100%",
  21232. "&-animated": {
  21233. transition: "margin 0.3s"
  21234. }
  21235. },
  21236. [`${e}-content-holder`]: {
  21237. flex: "auto",
  21238. minWidth: 0,
  21239. minHeight: 0
  21240. },
  21241. [`${e}-tabpane`]: {
  21242. outline: "none",
  21243. flex: "none",
  21244. width: "100%"
  21245. }
  21246. }),
  21247. [`${e}-centered`]: {
  21248. [`> ${e}-nav, > div > ${e}-nav`]: {
  21249. [`${e}-nav-wrap`]: {
  21250. [`&:not([class*='${e}-nav-wrap-ping'])`]: {
  21251. justifyContent: "center"
  21252. }
  21253. }
  21254. }
  21255. }
  21256. };
  21257. }, rSe = Sn("Tabs", (t) => {
  21258. const e = t.controlHeightLG, n = Bt(t, {
  21259. tabsHoverColor: t.colorPrimaryHover,
  21260. tabsActiveColor: t.colorPrimaryActive,
  21261. tabsCardHorizontalPadding: `${(e - Math.round(t.fontSize * t.lineHeight)) / 2 - t.lineWidth}px ${t.padding}px`,
  21262. tabsCardHeight: e,
  21263. tabsCardGutter: t.marginXXS / 2,
  21264. tabsHorizontalGutter: 32,
  21265. tabsCardHeadBackground: t.colorFillAlter,
  21266. dropdownEdgeChildVerticalPadding: t.paddingXXS,
  21267. tabsActiveTextShadow: "0 0 0.25px currentcolor",
  21268. tabsDropdownHeight: 200,
  21269. tabsDropdownWidth: 120
  21270. });
  21271. return [JOe(n), tSe(n), KOe(n), qOe(n), YOe(n), nSe(n), XOe(n)];
  21272. }, (t) => ({
  21273. zIndexPopup: t.zIndexPopupBase + 50
  21274. }));
  21275. let E5 = 0;
  21276. const hX = () => ({
  21277. prefixCls: {
  21278. type: String
  21279. },
  21280. id: {
  21281. type: String
  21282. },
  21283. popupClassName: String,
  21284. getPopupContainer: tt(),
  21285. activeKey: {
  21286. type: [String, Number]
  21287. },
  21288. defaultActiveKey: {
  21289. type: [String, Number]
  21290. },
  21291. direction: hn(),
  21292. animated: gn([Boolean, Object]),
  21293. renderTabBar: tt(),
  21294. tabBarGutter: {
  21295. type: Number
  21296. },
  21297. tabBarStyle: $t(),
  21298. tabPosition: hn(),
  21299. destroyInactiveTabPane: nt(),
  21300. hideAdd: Boolean,
  21301. type: hn(),
  21302. size: hn(),
  21303. centered: Boolean,
  21304. onEdit: tt(),
  21305. onChange: tt(),
  21306. onTabClick: tt(),
  21307. onTabScroll: tt(),
  21308. "onUpdate:activeKey": tt(),
  21309. // Accessibility
  21310. locale: $t(),
  21311. onPrevClick: tt(),
  21312. onNextClick: tt(),
  21313. tabBarExtraContent: Y.any
  21314. });
  21315. function iSe(t) {
  21316. return t.map((e) => {
  21317. if (Ui(e)) {
  21318. const n = I({}, e.props || {});
  21319. for (const [d, h] of Object.entries(n))
  21320. delete n[d], n[tI(d)] = h;
  21321. const r = e.children || {}, i = e.key !== void 0 ? e.key : void 0, {
  21322. tab: a = r.tab,
  21323. disabled: o,
  21324. forceRender: s,
  21325. closable: l,
  21326. animated: u,
  21327. active: c,
  21328. destroyInactiveTabPane: f
  21329. } = n;
  21330. return I(I({
  21331. key: i
  21332. }, n), {
  21333. node: e,
  21334. closeIcon: r.closeIcon,
  21335. tab: a,
  21336. disabled: o === "" || o,
  21337. forceRender: s === "" || s,
  21338. closable: l === "" || l,
  21339. animated: u === "" || u,
  21340. active: c === "" || c,
  21341. destroyInactiveTabPane: f === "" || f
  21342. });
  21343. }
  21344. return null;
  21345. }).filter((e) => e);
  21346. }
  21347. const aSe = te({
  21348. compatConfig: {
  21349. MODE: 3
  21350. },
  21351. name: "InternalTabs",
  21352. inheritAttrs: !1,
  21353. props: I(I({}, sr(hX(), {
  21354. tabPosition: "top",
  21355. animated: {
  21356. inkBar: !0,
  21357. tabPane: !1
  21358. }
  21359. })), {
  21360. tabs: uf()
  21361. }),
  21362. slots: Object,
  21363. // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  21364. setup(t, e) {
  21365. let {
  21366. attrs: n,
  21367. slots: r
  21368. } = e;
  21369. Qi(t.onPrevClick === void 0 && t.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), Qi(t.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), Qi(r.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
  21370. const {
  21371. prefixCls: i,
  21372. direction: a,
  21373. size: o,
  21374. rootPrefixCls: s,
  21375. getPopupContainer: l
  21376. } = It("tabs", t), [u, c] = rSe(i), f = L(() => a.value === "rtl"), d = L(() => {
  21377. const {
  21378. animated: x,
  21379. tabPosition: C
  21380. } = t;
  21381. return x === !1 || ["left", "right"].includes(C) ? {
  21382. inkBar: !1,
  21383. tabPane: !1
  21384. } : x === !0 ? {
  21385. inkBar: !0,
  21386. tabPane: !0
  21387. } : I({
  21388. inkBar: !0,
  21389. tabPane: !1
  21390. }, typeof x == "object" ? x : {});
  21391. }), [h, p] = fn(!1);
  21392. it(() => {
  21393. p(AI());
  21394. });
  21395. const [v, g] = wh(() => {
  21396. var x;
  21397. return (x = t.tabs[0]) === null || x === void 0 ? void 0 : x.key;
  21398. }, {
  21399. value: L(() => t.activeKey),
  21400. defaultValue: t.defaultActiveKey
  21401. }), [m, y] = fn(() => t.tabs.findIndex((x) => x.key === v.value));
  21402. ht(() => {
  21403. var x;
  21404. let C = t.tabs.findIndex((T) => T.key === v.value);
  21405. 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);
  21406. });
  21407. const [b, _] = wh(null, {
  21408. value: L(() => t.id)
  21409. }), O = L(() => h.value && !["left", "right"].includes(t.tabPosition) ? "top" : t.tabPosition);
  21410. it(() => {
  21411. t.id || (_(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : E5}`), E5 += 1);
  21412. });
  21413. const S = (x, C) => {
  21414. var T, w;
  21415. (T = t.onTabClick) === null || T === void 0 || T.call(t, x, C);
  21416. const P = x !== v.value;
  21417. g(x), P && ((w = t.onChange) === null || w === void 0 || w.call(t, x));
  21418. };
  21419. return fX({
  21420. tabs: L(() => t.tabs),
  21421. prefixCls: i
  21422. }), () => {
  21423. const {
  21424. id: x,
  21425. type: C,
  21426. tabBarGutter: T,
  21427. tabBarStyle: w,
  21428. locale: P,
  21429. destroyInactiveTabPane: $,
  21430. renderTabBar: A = r.renderTabBar,
  21431. onTabScroll: D,
  21432. hideAdd: E,
  21433. centered: R
  21434. } = t, N = {
  21435. id: b.value,
  21436. activeKey: v.value,
  21437. animated: d.value,
  21438. tabPosition: O.value,
  21439. rtl: f.value,
  21440. mobile: h.value
  21441. };
  21442. let V;
  21443. C === "editable-card" && (V = {
  21444. onEdit: (Q, Z) => {
  21445. let {
  21446. key: ne,
  21447. event: ee
  21448. } = Z;
  21449. var oe;
  21450. (oe = t.onEdit) === null || oe === void 0 || oe.call(t, Q === "add" ? ee : ne, Q);
  21451. },
  21452. removeIcon: () => M(al, null, null),
  21453. addIcon: r.addIcon ? r.addIcon : () => M(yx, null, null),
  21454. showAdd: E !== !0
  21455. });
  21456. let z;
  21457. const W = I(I({}, N), {
  21458. moreTransitionName: `${s.value}-slide-up`,
  21459. editable: V,
  21460. locale: P,
  21461. tabBarGutter: T,
  21462. onTabClick: S,
  21463. onTabScroll: D,
  21464. style: w,
  21465. getPopupContainer: l.value,
  21466. popupClassName: ye(t.popupClassName, c.value)
  21467. });
  21468. A ? z = A(I(I({}, W), {
  21469. DefaultTabBar: $5
  21470. })) : z = M($5, W, am(r, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
  21471. const F = i.value;
  21472. return u(M("div", j(j({}, n), {}, {
  21473. id: x,
  21474. class: ye(F, `${F}-${O.value}`, {
  21475. [c.value]: !0,
  21476. [`${F}-${o.value}`]: o.value,
  21477. [`${F}-card`]: ["card", "editable-card"].includes(C),
  21478. [`${F}-editable-card`]: C === "editable-card",
  21479. [`${F}-centered`]: R,
  21480. [`${F}-mobile`]: h.value,
  21481. [`${F}-editable`]: C === "editable-card",
  21482. [`${F}-rtl`]: f.value
  21483. }, n.class)
  21484. }), [z, M(jOe, j(j({
  21485. destroyInactiveTabPane: $
  21486. }, N), {}, {
  21487. animated: d.value
  21488. }), null)]));
  21489. };
  21490. }
  21491. }), Uc = te({
  21492. compatConfig: {
  21493. MODE: 3
  21494. },
  21495. name: "ATabs",
  21496. inheritAttrs: !1,
  21497. props: sr(hX(), {
  21498. tabPosition: "top",
  21499. animated: {
  21500. inkBar: !0,
  21501. tabPane: !1
  21502. }
  21503. }),
  21504. slots: Object,
  21505. // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  21506. setup(t, e) {
  21507. let {
  21508. attrs: n,
  21509. slots: r,
  21510. emit: i
  21511. } = e;
  21512. const a = (o) => {
  21513. i("update:activeKey", o), i("change", o);
  21514. };
  21515. return () => {
  21516. var o;
  21517. const s = iSe(Yn((o = r.default) === null || o === void 0 ? void 0 : o.call(r)));
  21518. return M(aSe, j(j(j({}, or(t, ["onUpdate:activeKey"])), n), {}, {
  21519. onChange: a,
  21520. tabs: s
  21521. }), r);
  21522. };
  21523. }
  21524. }), oSe = () => ({
  21525. tab: Y.any,
  21526. disabled: {
  21527. type: Boolean
  21528. },
  21529. forceRender: {
  21530. type: Boolean
  21531. },
  21532. closable: {
  21533. type: Boolean
  21534. },
  21535. animated: {
  21536. type: Boolean
  21537. },
  21538. active: {
  21539. type: Boolean
  21540. },
  21541. destroyInactiveTabPane: {
  21542. type: Boolean
  21543. },
  21544. // Pass by TabPaneList
  21545. prefixCls: {
  21546. type: String
  21547. },
  21548. tabKey: {
  21549. type: [String, Number]
  21550. },
  21551. id: {
  21552. type: String
  21553. }
  21554. // closeIcon: PropTypes.any,
  21555. }), Fs = te({
  21556. compatConfig: {
  21557. MODE: 3
  21558. },
  21559. name: "ATabPane",
  21560. inheritAttrs: !1,
  21561. __ANT_TAB_PANE: !0,
  21562. props: oSe(),
  21563. slots: Object,
  21564. setup(t, e) {
  21565. let {
  21566. attrs: n,
  21567. slots: r
  21568. } = e;
  21569. const i = U(t.forceRender);
  21570. se([() => t.active, () => t.destroyInactiveTabPane], () => {
  21571. t.active ? i.value = !0 : t.destroyInactiveTabPane && (i.value = !1);
  21572. }, {
  21573. immediate: !0
  21574. });
  21575. const a = L(() => t.active ? {} : t.animated ? {
  21576. visibility: "hidden",
  21577. height: 0,
  21578. overflowY: "hidden"
  21579. } : {
  21580. display: "none"
  21581. });
  21582. return () => {
  21583. var o;
  21584. const {
  21585. prefixCls: s,
  21586. forceRender: l,
  21587. id: u,
  21588. active: c,
  21589. tabKey: f
  21590. } = t;
  21591. return M("div", {
  21592. id: u && `${u}-panel-${f}`,
  21593. role: "tabpanel",
  21594. tabindex: c ? 0 : -1,
  21595. "aria-labelledby": u && `${u}-tab-${f}`,
  21596. "aria-hidden": !c,
  21597. style: [a.value, n.style],
  21598. class: [`${s}-tabpane`, c && `${s}-tabpane-active`, n.class]
  21599. }, [(c || i.value || l) && ((o = r.default) === null || o === void 0 ? void 0 : o.call(r))]);
  21600. };
  21601. }
  21602. });
  21603. Uc.TabPane = Fs;
  21604. Uc.install = function(t) {
  21605. return t.component(Uc.name, Uc), t.component(Fs.name, Fs), t;
  21606. };
  21607. const sSe = () => ({
  21608. prefixCls: String,
  21609. activeKey: gn([Array, Number, String]),
  21610. defaultActiveKey: gn([Array, Number, String]),
  21611. accordion: nt(),
  21612. destroyInactivePanel: nt(),
  21613. bordered: nt(),
  21614. expandIcon: tt(),
  21615. openAnimation: Y.object,
  21616. expandIconPosition: hn(),
  21617. collapsible: hn(),
  21618. ghost: nt(),
  21619. onChange: tt(),
  21620. "onUpdate:activeKey": tt()
  21621. }), pX = () => ({
  21622. openAnimation: Y.object,
  21623. prefixCls: String,
  21624. header: Y.any,
  21625. headerClass: String,
  21626. showArrow: nt(),
  21627. isActive: nt(),
  21628. destroyInactivePanel: nt(),
  21629. /** @deprecated Use `collapsible="disabled"` instead */
  21630. disabled: nt(),
  21631. accordion: nt(),
  21632. forceRender: nt(),
  21633. expandIcon: tt(),
  21634. extra: Y.any,
  21635. panelKey: gn(),
  21636. collapsible: hn(),
  21637. role: String,
  21638. onItemClick: tt()
  21639. }), lSe = (t) => {
  21640. const {
  21641. componentCls: e,
  21642. collapseContentBg: n,
  21643. padding: r,
  21644. collapseContentPaddingHorizontal: i,
  21645. collapseHeaderBg: a,
  21646. collapseHeaderPadding: o,
  21647. collapsePanelBorderRadius: s,
  21648. lineWidth: l,
  21649. lineType: u,
  21650. colorBorder: c,
  21651. colorText: f,
  21652. colorTextHeading: d,
  21653. colorTextDisabled: h,
  21654. fontSize: p,
  21655. lineHeight: v,
  21656. marginSM: g,
  21657. paddingSM: m,
  21658. motionDurationSlow: y,
  21659. fontSizeIcon: b
  21660. } = t, _ = `${l}px ${u} ${c}`;
  21661. return {
  21662. [e]: I(I({}, nn(t)), {
  21663. backgroundColor: a,
  21664. border: _,
  21665. borderBottom: 0,
  21666. borderRadius: `${s}px`,
  21667. "&-rtl": {
  21668. direction: "rtl"
  21669. },
  21670. [`& > ${e}-item`]: {
  21671. borderBottom: _,
  21672. "&:last-child": {
  21673. [`
  21674. &,
  21675. & > ${e}-header`]: {
  21676. borderRadius: `0 0 ${s}px ${s}px`
  21677. }
  21678. },
  21679. [`> ${e}-header`]: {
  21680. position: "relative",
  21681. display: "flex",
  21682. flexWrap: "nowrap",
  21683. alignItems: "flex-start",
  21684. padding: o,
  21685. color: d,
  21686. lineHeight: v,
  21687. cursor: "pointer",
  21688. transition: `all ${y}, visibility 0s`,
  21689. [`> ${e}-header-text`]: {
  21690. flex: "auto"
  21691. },
  21692. "&:focus": {
  21693. outline: "none"
  21694. },
  21695. // >>>>> Arrow
  21696. [`${e}-expand-icon`]: {
  21697. height: p * v,
  21698. display: "flex",
  21699. alignItems: "center",
  21700. paddingInlineEnd: g
  21701. },
  21702. [`${e}-arrow`]: I(I({}, ip()), {
  21703. fontSize: b,
  21704. svg: {
  21705. transition: `transform ${y}`
  21706. }
  21707. }),
  21708. // >>>>> Text
  21709. [`${e}-header-text`]: {
  21710. marginInlineEnd: "auto"
  21711. }
  21712. },
  21713. [`${e}-header-collapsible-only`]: {
  21714. cursor: "default",
  21715. [`${e}-header-text`]: {
  21716. flex: "none",
  21717. cursor: "pointer"
  21718. },
  21719. [`${e}-expand-icon`]: {
  21720. cursor: "pointer"
  21721. }
  21722. },
  21723. [`${e}-icon-collapsible-only`]: {
  21724. cursor: "default",
  21725. [`${e}-expand-icon`]: {
  21726. cursor: "pointer"
  21727. }
  21728. },
  21729. [`&${e}-no-arrow`]: {
  21730. [`> ${e}-header`]: {
  21731. paddingInlineStart: m
  21732. }
  21733. }
  21734. },
  21735. [`${e}-content`]: {
  21736. color: f,
  21737. backgroundColor: n,
  21738. borderTop: _,
  21739. [`& > ${e}-content-box`]: {
  21740. padding: `${r}px ${i}px`
  21741. },
  21742. "&-hidden": {
  21743. display: "none"
  21744. }
  21745. },
  21746. [`${e}-item:last-child`]: {
  21747. [`> ${e}-content`]: {
  21748. borderRadius: `0 0 ${s}px ${s}px`
  21749. }
  21750. },
  21751. [`& ${e}-item-disabled > ${e}-header`]: {
  21752. "\n &,\n & > .arrow\n ": {
  21753. color: h,
  21754. cursor: "not-allowed"
  21755. }
  21756. },
  21757. // ========================== Icon Position ==========================
  21758. [`&${e}-icon-position-end`]: {
  21759. [`& > ${e}-item`]: {
  21760. [`> ${e}-header`]: {
  21761. [`${e}-expand-icon`]: {
  21762. order: 1,
  21763. paddingInlineEnd: 0,
  21764. paddingInlineStart: g
  21765. }
  21766. }
  21767. }
  21768. }
  21769. })
  21770. };
  21771. }, uSe = (t) => {
  21772. const {
  21773. componentCls: e
  21774. } = t, n = `> ${e}-item > ${e}-header ${e}-arrow svg`;
  21775. return {
  21776. [`${e}-rtl`]: {
  21777. [n]: {
  21778. transform: "rotate(180deg)"
  21779. }
  21780. }
  21781. };
  21782. }, cSe = (t) => {
  21783. const {
  21784. componentCls: e,
  21785. collapseHeaderBg: n,
  21786. paddingXXS: r,
  21787. colorBorder: i
  21788. } = t;
  21789. return {
  21790. [`${e}-borderless`]: {
  21791. backgroundColor: n,
  21792. border: 0,
  21793. [`> ${e}-item`]: {
  21794. borderBottom: `1px solid ${i}`
  21795. },
  21796. [`
  21797. > ${e}-item:last-child,
  21798. > ${e}-item:last-child ${e}-header
  21799. `]: {
  21800. borderRadius: 0
  21801. },
  21802. [`> ${e}-item:last-child`]: {
  21803. borderBottom: 0
  21804. },
  21805. [`> ${e}-item > ${e}-content`]: {
  21806. backgroundColor: "transparent",
  21807. borderTop: 0
  21808. },
  21809. [`> ${e}-item > ${e}-content > ${e}-content-box`]: {
  21810. paddingTop: r
  21811. }
  21812. }
  21813. };
  21814. }, fSe = (t) => {
  21815. const {
  21816. componentCls: e,
  21817. paddingSM: n
  21818. } = t;
  21819. return {
  21820. [`${e}-ghost`]: {
  21821. backgroundColor: "transparent",
  21822. border: 0,
  21823. [`> ${e}-item`]: {
  21824. borderBottom: 0,
  21825. [`> ${e}-content`]: {
  21826. backgroundColor: "transparent",
  21827. border: 0,
  21828. [`> ${e}-content-box`]: {
  21829. paddingBlock: n
  21830. }
  21831. }
  21832. }
  21833. }
  21834. };
  21835. }, dSe = Sn("Collapse", (t) => {
  21836. const e = Bt(t, {
  21837. collapseContentBg: t.colorBgContainer,
  21838. collapseHeaderBg: t.colorFillAlter,
  21839. collapseHeaderPadding: `${t.paddingSM}px ${t.padding}px`,
  21840. collapsePanelBorderRadius: t.borderRadiusLG,
  21841. collapseContentPaddingHorizontal: 16
  21842. // Fixed value
  21843. });
  21844. return [lSe(e), cSe(e), fSe(e), uSe(e), KI(e)];
  21845. });
  21846. function M5(t) {
  21847. let e = t;
  21848. if (!Array.isArray(e)) {
  21849. const n = typeof e;
  21850. e = n === "number" || n === "string" ? [e] : [];
  21851. }
  21852. return e.map((n) => String(n));
  21853. }
  21854. const cg = te({
  21855. compatConfig: {
  21856. MODE: 3
  21857. },
  21858. name: "ACollapse",
  21859. inheritAttrs: !1,
  21860. props: sr(sSe(), {
  21861. accordion: !1,
  21862. destroyInactivePanel: !1,
  21863. bordered: !0,
  21864. expandIconPosition: "start"
  21865. }),
  21866. slots: Object,
  21867. setup(t, e) {
  21868. let {
  21869. attrs: n,
  21870. slots: r,
  21871. emit: i
  21872. } = e;
  21873. const a = U(M5(DU([t.activeKey, t.defaultActiveKey])));
  21874. se(() => t.activeKey, () => {
  21875. a.value = M5(t.activeKey);
  21876. }, {
  21877. deep: !0
  21878. });
  21879. const {
  21880. prefixCls: o,
  21881. direction: s,
  21882. rootPrefixCls: l
  21883. } = It("collapse", t), [u, c] = dSe(o), f = L(() => {
  21884. const {
  21885. expandIconPosition: m
  21886. } = t;
  21887. return m !== void 0 ? m : s.value === "rtl" ? "end" : "start";
  21888. }), d = (m) => {
  21889. const {
  21890. expandIcon: y = r.expandIcon
  21891. } = t, b = y ? y(m) : M(px, {
  21892. rotate: m.isActive ? 90 : void 0
  21893. }, null);
  21894. return M("div", {
  21895. class: [`${o.value}-expand-icon`, c.value],
  21896. onClick: () => ["header", "icon"].includes(t.collapsible) && p(m.panelKey)
  21897. }, [Ui(Array.isArray(y) ? b[0] : b) ? Pn(b, {
  21898. class: `${o.value}-arrow`
  21899. }, !1) : b]);
  21900. }, h = (m) => {
  21901. t.activeKey === void 0 && (a.value = m);
  21902. const y = t.accordion ? m[0] : m;
  21903. i("update:activeKey", y), i("change", y);
  21904. }, p = (m) => {
  21905. let y = a.value;
  21906. if (t.accordion)
  21907. y = y[0] === m ? [] : [m];
  21908. else {
  21909. y = [...y];
  21910. const b = y.indexOf(m);
  21911. b > -1 ? y.splice(b, 1) : y.push(m);
  21912. }
  21913. h(y);
  21914. }, v = (m, y) => {
  21915. var b, _, O;
  21916. if (nI(m)) return;
  21917. const S = a.value, {
  21918. accordion: x,
  21919. destroyInactivePanel: C,
  21920. collapsible: T,
  21921. openAnimation: w
  21922. } = t, P = w || sD(`${l.value}-motion-collapse`), $ = String((b = m.key) !== null && b !== void 0 ? b : y), {
  21923. header: A = (O = (_ = m.children) === null || _ === void 0 ? void 0 : _.header) === null || O === void 0 ? void 0 : O.call(_),
  21924. headerClass: D,
  21925. collapsible: E,
  21926. disabled: R
  21927. } = m.props || {};
  21928. let N = !1;
  21929. x ? N = S[0] === $ : N = S.indexOf($) > -1;
  21930. let V = E ?? T;
  21931. (R || R === "") && (V = "disabled");
  21932. const z = {
  21933. key: $,
  21934. panelKey: $,
  21935. header: A,
  21936. headerClass: D,
  21937. isActive: N,
  21938. prefixCls: o.value,
  21939. destroyInactivePanel: C,
  21940. openAnimation: P,
  21941. accordion: x,
  21942. onItemClick: V === "disabled" ? null : p,
  21943. expandIcon: d,
  21944. collapsible: V
  21945. };
  21946. return Pn(m, z);
  21947. }, g = () => {
  21948. var m;
  21949. return Yn((m = r.default) === null || m === void 0 ? void 0 : m.call(r)).map(v);
  21950. };
  21951. return () => {
  21952. const {
  21953. accordion: m,
  21954. bordered: y,
  21955. ghost: b
  21956. } = t, _ = ye(o.value, {
  21957. [`${o.value}-borderless`]: !y,
  21958. [`${o.value}-icon-position-${f.value}`]: !0,
  21959. [`${o.value}-rtl`]: s.value === "rtl",
  21960. [`${o.value}-ghost`]: !!b,
  21961. [n.class]: !!n.class
  21962. }, c.value);
  21963. return u(M("div", j(j({
  21964. class: _
  21965. }, lue(n)), {}, {
  21966. style: n.style,
  21967. role: m ? "tablist" : null
  21968. }), [g()]));
  21969. };
  21970. }
  21971. }), hSe = te({
  21972. compatConfig: {
  21973. MODE: 3
  21974. },
  21975. name: "PanelContent",
  21976. props: pX(),
  21977. setup(t, e) {
  21978. let {
  21979. slots: n
  21980. } = e;
  21981. const r = ae(!1);
  21982. return ht(() => {
  21983. (t.isActive || t.forceRender) && (r.value = !0);
  21984. }), () => {
  21985. var i;
  21986. if (!r.value) return null;
  21987. const {
  21988. prefixCls: a,
  21989. isActive: o,
  21990. role: s
  21991. } = t;
  21992. return M("div", {
  21993. class: ye(`${a}-content`, {
  21994. [`${a}-content-active`]: o,
  21995. [`${a}-content-inactive`]: !o
  21996. }),
  21997. role: s
  21998. }, [M("div", {
  21999. class: `${a}-content-box`
  22000. }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
  22001. };
  22002. }
  22003. }), B1 = te({
  22004. compatConfig: {
  22005. MODE: 3
  22006. },
  22007. name: "ACollapsePanel",
  22008. inheritAttrs: !1,
  22009. props: sr(pX(), {
  22010. showArrow: !0,
  22011. isActive: !1,
  22012. onItemClick() {
  22013. },
  22014. headerClass: "",
  22015. forceRender: !1
  22016. }),
  22017. slots: Object,
  22018. // emits: ['itemClick'],
  22019. setup(t, e) {
  22020. let {
  22021. slots: n,
  22022. emit: r,
  22023. attrs: i
  22024. } = e;
  22025. Qi(t.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
  22026. const {
  22027. prefixCls: a
  22028. } = It("collapse", t), o = () => {
  22029. r("itemClick", t.panelKey);
  22030. }, s = (l) => {
  22031. (l.key === "Enter" || l.keyCode === 13 || l.which === 13) && o();
  22032. };
  22033. return () => {
  22034. var l, u;
  22035. const {
  22036. header: c = (l = n.header) === null || l === void 0 ? void 0 : l.call(n),
  22037. headerClass: f,
  22038. isActive: d,
  22039. showArrow: h,
  22040. destroyInactivePanel: p,
  22041. accordion: v,
  22042. forceRender: g,
  22043. openAnimation: m,
  22044. expandIcon: y = n.expandIcon,
  22045. extra: b = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
  22046. collapsible: _
  22047. } = t, O = _ === "disabled", S = a.value, x = ye(`${S}-header`, {
  22048. [f]: f,
  22049. [`${S}-header-collapsible-only`]: _ === "header",
  22050. [`${S}-icon-collapsible-only`]: _ === "icon"
  22051. }), C = ye({
  22052. [`${S}-item`]: !0,
  22053. [`${S}-item-active`]: d,
  22054. [`${S}-item-disabled`]: O,
  22055. [`${S}-no-arrow`]: !h,
  22056. [`${i.class}`]: !!i.class
  22057. });
  22058. let T = M("i", {
  22059. class: "arrow"
  22060. }, null);
  22061. h && typeof y == "function" && (T = y(t));
  22062. const w = bi(M(hSe, {
  22063. prefixCls: S,
  22064. isActive: d,
  22065. forceRender: g,
  22066. role: v ? "tabpanel" : null
  22067. }, {
  22068. default: n.default
  22069. }), [[Bs, d]]), P = I({
  22070. appear: !1,
  22071. css: !1
  22072. }, m);
  22073. return M("div", j(j({}, i), {}, {
  22074. class: C
  22075. }), [M("div", {
  22076. class: x,
  22077. onClick: () => !["header", "icon"].includes(_) && o(),
  22078. role: v ? "tab" : "button",
  22079. tabindex: O ? -1 : 0,
  22080. "aria-expanded": d,
  22081. onKeypress: s
  22082. }, [h && T, M("span", {
  22083. onClick: () => _ === "header" && o(),
  22084. class: `${S}-header-text`
  22085. }, [c]), b && M("div", {
  22086. class: `${S}-extra`
  22087. }, [b])]), M(co, P, {
  22088. default: () => [!p || d ? w : null]
  22089. })]);
  22090. };
  22091. }
  22092. });
  22093. cg.Panel = B1;
  22094. cg.install = function(t) {
  22095. return t.component(cg.name, cg), t.component(B1.name, B1), t;
  22096. };
  22097. var pSe = { 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" };
  22098. function I5(t) {
  22099. for (var e = 1; e < arguments.length; e++) {
  22100. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  22101. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  22102. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  22103. }))), r.forEach(function(i) {
  22104. vSe(t, i, n[i]);
  22105. });
  22106. }
  22107. return t;
  22108. }
  22109. function vSe(t, e, n) {
  22110. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  22111. }
  22112. var uD = function(e, n) {
  22113. var r = I5({}, e, n.attrs);
  22114. return M(lt, I5({}, r, {
  22115. icon: pSe
  22116. }), null);
  22117. };
  22118. uD.displayName = "LeftOutlined";
  22119. uD.inheritAttrs = !1;
  22120. const vX = () => wa() && window.document.documentElement;
  22121. let Dy;
  22122. const gSe = () => {
  22123. if (!vX())
  22124. return !1;
  22125. if (Dy !== void 0)
  22126. return Dy;
  22127. const t = document.createElement("div");
  22128. 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), Dy = t.scrollHeight === 1, document.body.removeChild(t), Dy;
  22129. }, mSe = () => {
  22130. const t = ae(!1);
  22131. return it(() => {
  22132. t.value = gSe();
  22133. }), t;
  22134. }, gX = Symbol("rowContextKey"), ySe = (t) => {
  22135. pt(gX, t);
  22136. }, bSe = () => Ge(gX, {
  22137. gutter: L(() => {
  22138. }),
  22139. wrap: L(() => {
  22140. }),
  22141. supportFlexGap: L(() => {
  22142. })
  22143. }), _Se = (t) => {
  22144. const {
  22145. componentCls: e
  22146. } = t;
  22147. return {
  22148. // Grid system
  22149. [e]: {
  22150. display: "flex",
  22151. flexFlow: "row wrap",
  22152. minWidth: 0,
  22153. "&::before, &::after": {
  22154. display: "flex"
  22155. },
  22156. "&-no-wrap": {
  22157. flexWrap: "nowrap"
  22158. },
  22159. // The origin of the X-axis
  22160. "&-start": {
  22161. justifyContent: "flex-start"
  22162. },
  22163. // The center of the X-axis
  22164. "&-center": {
  22165. justifyContent: "center"
  22166. },
  22167. // The opposite of the X-axis
  22168. "&-end": {
  22169. justifyContent: "flex-end"
  22170. },
  22171. "&-space-between": {
  22172. justifyContent: "space-between"
  22173. },
  22174. "&-space-around ": {
  22175. justifyContent: "space-around"
  22176. },
  22177. "&-space-evenly ": {
  22178. justifyContent: "space-evenly"
  22179. },
  22180. // Align at the top
  22181. "&-top": {
  22182. alignItems: "flex-start"
  22183. },
  22184. // Align at the center
  22185. "&-middle": {
  22186. alignItems: "center"
  22187. },
  22188. "&-bottom": {
  22189. alignItems: "flex-end"
  22190. }
  22191. }
  22192. };
  22193. }, OSe = (t) => {
  22194. const {
  22195. componentCls: e
  22196. } = t;
  22197. return {
  22198. // Grid system
  22199. [e]: {
  22200. position: "relative",
  22201. maxWidth: "100%",
  22202. // Prevent columns from collapsing when empty
  22203. minHeight: 1
  22204. }
  22205. };
  22206. }, SSe = (t, e) => {
  22207. const {
  22208. componentCls: n,
  22209. gridColumns: r
  22210. } = t, i = {};
  22211. for (let a = r; a >= 0; a--)
  22212. a === 0 ? (i[`${n}${e}-${a}`] = {
  22213. display: "none"
  22214. }, i[`${n}-push-${a}`] = {
  22215. insetInlineStart: "auto"
  22216. }, i[`${n}-pull-${a}`] = {
  22217. insetInlineEnd: "auto"
  22218. }, i[`${n}${e}-push-${a}`] = {
  22219. insetInlineStart: "auto"
  22220. }, i[`${n}${e}-pull-${a}`] = {
  22221. insetInlineEnd: "auto"
  22222. }, i[`${n}${e}-offset-${a}`] = {
  22223. marginInlineEnd: 0
  22224. }, i[`${n}${e}-order-${a}`] = {
  22225. order: 0
  22226. }) : (i[`${n}${e}-${a}`] = {
  22227. display: "block",
  22228. flex: `0 0 ${a / r * 100}%`,
  22229. maxWidth: `${a / r * 100}%`
  22230. }, i[`${n}${e}-push-${a}`] = {
  22231. insetInlineStart: `${a / r * 100}%`
  22232. }, i[`${n}${e}-pull-${a}`] = {
  22233. insetInlineEnd: `${a / r * 100}%`
  22234. }, i[`${n}${e}-offset-${a}`] = {
  22235. marginInlineStart: `${a / r * 100}%`
  22236. }, i[`${n}${e}-order-${a}`] = {
  22237. order: a
  22238. });
  22239. return i;
  22240. }, B2 = (t, e) => SSe(t, e), xSe = (t, e, n) => ({
  22241. [`@media (min-width: ${e}px)`]: I({}, B2(t, n))
  22242. }), wSe = Sn("Grid", (t) => [_Se(t)]), CSe = Sn("Grid", (t) => {
  22243. const e = Bt(t, {
  22244. gridColumns: 24
  22245. // Row is divided into 24 parts in Grid
  22246. }), n = {
  22247. "-sm": e.screenSMMin,
  22248. "-md": e.screenMDMin,
  22249. "-lg": e.screenLGMin,
  22250. "-xl": e.screenXLMin,
  22251. "-xxl": e.screenXXLMin
  22252. };
  22253. return [OSe(e), B2(e, ""), B2(e, "-xs"), Object.keys(n).map((r) => xSe(e, n[r], r)).reduce((r, i) => I(I({}, r), i), {})];
  22254. }), TSe = () => ({
  22255. align: gn([String, Object]),
  22256. justify: gn([String, Object]),
  22257. prefixCls: String,
  22258. gutter: gn([Number, Array, Object], 0),
  22259. wrap: {
  22260. type: Boolean,
  22261. default: void 0
  22262. }
  22263. }), PSe = te({
  22264. compatConfig: {
  22265. MODE: 3
  22266. },
  22267. name: "ARow",
  22268. inheritAttrs: !1,
  22269. props: TSe(),
  22270. setup(t, e) {
  22271. let {
  22272. slots: n,
  22273. attrs: r
  22274. } = e;
  22275. const {
  22276. prefixCls: i,
  22277. direction: a
  22278. } = It("row", t), [o, s] = wSe(i);
  22279. let l;
  22280. const u = j_e(), c = U({
  22281. xs: !0,
  22282. sm: !0,
  22283. md: !0,
  22284. lg: !0,
  22285. xl: !0,
  22286. xxl: !0
  22287. }), f = U({
  22288. xs: !1,
  22289. sm: !1,
  22290. md: !1,
  22291. lg: !1,
  22292. xl: !1,
  22293. xxl: !1
  22294. }), d = (b) => L(() => {
  22295. if (typeof t[b] == "string")
  22296. return t[b];
  22297. if (typeof t[b] != "object")
  22298. return "";
  22299. for (let _ = 0; _ < $y.length; _++) {
  22300. const O = $y[_];
  22301. if (!f.value[O]) continue;
  22302. const S = t[b][O];
  22303. if (S !== void 0)
  22304. return S;
  22305. }
  22306. return "";
  22307. }), h = d("align"), p = d("justify"), v = mSe();
  22308. it(() => {
  22309. l = u.value.subscribe((b) => {
  22310. f.value = b;
  22311. const _ = t.gutter || 0;
  22312. (!Array.isArray(_) && typeof _ == "object" || Array.isArray(_) && (typeof _[0] == "object" || typeof _[1] == "object")) && (c.value = b);
  22313. });
  22314. }), yt(() => {
  22315. u.value.unsubscribe(l);
  22316. });
  22317. const g = L(() => {
  22318. const b = [void 0, void 0], {
  22319. gutter: _ = 0
  22320. } = t;
  22321. return (Array.isArray(_) ? _ : [_, void 0]).forEach((S, x) => {
  22322. if (typeof S == "object")
  22323. for (let C = 0; C < $y.length; C++) {
  22324. const T = $y[C];
  22325. if (c.value[T] && S[T] !== void 0) {
  22326. b[x] = S[T];
  22327. break;
  22328. }
  22329. }
  22330. else
  22331. b[x] = S;
  22332. }), b;
  22333. });
  22334. ySe({
  22335. gutter: g,
  22336. supportFlexGap: v,
  22337. wrap: L(() => t.wrap)
  22338. });
  22339. const m = L(() => ye(i.value, {
  22340. [`${i.value}-no-wrap`]: t.wrap === !1,
  22341. [`${i.value}-${p.value}`]: p.value,
  22342. [`${i.value}-${h.value}`]: h.value,
  22343. [`${i.value}-rtl`]: a.value === "rtl"
  22344. }, r.class, s.value)), y = L(() => {
  22345. 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;
  22346. return O && (_.marginLeft = O, _.marginRight = O), v.value ? _.rowGap = `${b[1]}px` : S && (_.marginTop = S, _.marginBottom = S), _;
  22347. });
  22348. return () => {
  22349. var b;
  22350. return o(M("div", j(j({}, r), {}, {
  22351. class: m.value,
  22352. style: I(I({}, y.value), r.style)
  22353. }), [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)]));
  22354. };
  22355. }
  22356. });
  22357. function Ic() {
  22358. return Ic = Object.assign ? Object.assign.bind() : function(t) {
  22359. for (var e = 1; e < arguments.length; e++) {
  22360. var n = arguments[e];
  22361. for (var r in n)
  22362. Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
  22363. }
  22364. return t;
  22365. }, Ic.apply(this, arguments);
  22366. }
  22367. function $Se(t, e) {
  22368. t.prototype = Object.create(e.prototype), t.prototype.constructor = t, om(t, e);
  22369. }
  22370. function z2(t) {
  22371. return z2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
  22372. return n.__proto__ || Object.getPrototypeOf(n);
  22373. }, z2(t);
  22374. }
  22375. function om(t, e) {
  22376. return om = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
  22377. return r.__proto__ = i, r;
  22378. }, om(t, e);
  22379. }
  22380. function ASe() {
  22381. if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  22382. if (typeof Proxy == "function") return !0;
  22383. try {
  22384. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  22385. })), !0;
  22386. } catch {
  22387. return !1;
  22388. }
  22389. }
  22390. function P_(t, e, n) {
  22391. return ASe() ? P_ = Reflect.construct.bind() : P_ = function(i, a, o) {
  22392. var s = [null];
  22393. s.push.apply(s, a);
  22394. var l = Function.bind.apply(i, s), u = new l();
  22395. return o && om(u, o.prototype), u;
  22396. }, P_.apply(null, arguments);
  22397. }
  22398. function ESe(t) {
  22399. return Function.toString.call(t).indexOf("[native code]") !== -1;
  22400. }
  22401. function V2(t) {
  22402. var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  22403. return V2 = function(r) {
  22404. if (r === null || !ESe(r)) return r;
  22405. if (typeof r != "function")
  22406. throw new TypeError("Super expression must either be null or a function");
  22407. if (typeof e < "u") {
  22408. if (e.has(r)) return e.get(r);
  22409. e.set(r, i);
  22410. }
  22411. function i() {
  22412. return P_(r, arguments, z2(this).constructor);
  22413. }
  22414. return i.prototype = Object.create(r.prototype, {
  22415. constructor: {
  22416. value: i,
  22417. enumerable: !1,
  22418. writable: !0,
  22419. configurable: !0
  22420. }
  22421. }), om(i, r);
  22422. }, V2(t);
  22423. }
  22424. var MSe = /%[sdj%]/g, mX = function() {
  22425. };
  22426. typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (mX = function(e, n) {
  22427. typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
  22428. return typeof r == "string";
  22429. }) && console.warn(e, n);
  22430. });
  22431. function F2(t) {
  22432. if (!t || !t.length) return null;
  22433. var e = {};
  22434. return t.forEach(function(n) {
  22435. var r = n.field;
  22436. e[r] = e[r] || [], e[r].push(n);
  22437. }), e;
  22438. }
  22439. function zi(t) {
  22440. for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
  22441. n[r - 1] = arguments[r];
  22442. var i = 0, a = n.length;
  22443. if (typeof t == "function")
  22444. return t.apply(null, n);
  22445. if (typeof t == "string") {
  22446. var o = t.replace(MSe, function(s) {
  22447. if (s === "%%")
  22448. return "%";
  22449. if (i >= a)
  22450. return s;
  22451. switch (s) {
  22452. case "%s":
  22453. return String(n[i++]);
  22454. case "%d":
  22455. return Number(n[i++]);
  22456. case "%j":
  22457. try {
  22458. return JSON.stringify(n[i++]);
  22459. } catch {
  22460. return "[Circular]";
  22461. }
  22462. break;
  22463. default:
  22464. return s;
  22465. }
  22466. });
  22467. return o;
  22468. }
  22469. return t;
  22470. }
  22471. function ISe(t) {
  22472. return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
  22473. }
  22474. function Kn(t, e) {
  22475. return !!(t == null || e === "array" && Array.isArray(t) && !t.length || ISe(e) && typeof t == "string" && !t);
  22476. }
  22477. function DSe(t, e, n) {
  22478. var r = [], i = 0, a = t.length;
  22479. function o(s) {
  22480. r.push.apply(r, s || []), i++, i === a && n(r);
  22481. }
  22482. t.forEach(function(s) {
  22483. e(s, o);
  22484. });
  22485. }
  22486. function D5(t, e, n) {
  22487. var r = 0, i = t.length;
  22488. function a(o) {
  22489. if (o && o.length) {
  22490. n(o);
  22491. return;
  22492. }
  22493. var s = r;
  22494. r = r + 1, s < i ? e(t[s], a) : n([]);
  22495. }
  22496. a([]);
  22497. }
  22498. function RSe(t) {
  22499. var e = [];
  22500. return Object.keys(t).forEach(function(n) {
  22501. e.push.apply(e, t[n] || []);
  22502. }), e;
  22503. }
  22504. var R5 = /* @__PURE__ */ function(t) {
  22505. $Se(e, t);
  22506. function e(n, r) {
  22507. var i;
  22508. return i = t.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
  22509. }
  22510. return e;
  22511. }(/* @__PURE__ */ V2(Error));
  22512. function kSe(t, e, n, r, i) {
  22513. if (e.first) {
  22514. var a = new Promise(function(d, h) {
  22515. var p = function(m) {
  22516. return r(m), m.length ? h(new R5(m, F2(m))) : d(i);
  22517. }, v = RSe(t);
  22518. D5(v, n, p);
  22519. });
  22520. return a.catch(function(d) {
  22521. return d;
  22522. }), a;
  22523. }
  22524. 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) {
  22525. var p = function(g) {
  22526. if (c.push.apply(c, g), u++, u === l)
  22527. return r(c), c.length ? h(new R5(c, F2(c))) : d(i);
  22528. };
  22529. s.length || (r(c), d(i)), s.forEach(function(v) {
  22530. var g = t[v];
  22531. o.indexOf(v) !== -1 ? D5(g, n, p) : DSe(g, n, p);
  22532. });
  22533. });
  22534. return f.catch(function(d) {
  22535. return d;
  22536. }), f;
  22537. }
  22538. function LSe(t) {
  22539. return !!(t && t.message !== void 0);
  22540. }
  22541. function NSe(t, e) {
  22542. for (var n = t, r = 0; r < e.length; r++) {
  22543. if (n == null)
  22544. return n;
  22545. n = n[e[r]];
  22546. }
  22547. return n;
  22548. }
  22549. function k5(t, e) {
  22550. return function(n) {
  22551. var r;
  22552. return t.fullFields ? r = NSe(e, t.fullFields) : r = e[n.field || t.fullField], LSe(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
  22553. message: typeof n == "function" ? n() : n,
  22554. fieldValue: r,
  22555. field: n.field || t.fullField
  22556. };
  22557. };
  22558. }
  22559. function L5(t, e) {
  22560. if (e) {
  22561. for (var n in e)
  22562. if (e.hasOwnProperty(n)) {
  22563. var r = e[n];
  22564. typeof r == "object" && typeof t[n] == "object" ? t[n] = Ic({}, t[n], r) : t[n] = r;
  22565. }
  22566. }
  22567. return t;
  22568. }
  22569. var yX = function(e, n, r, i, a, o) {
  22570. e.required && (!r.hasOwnProperty(e.field) || Kn(n, o || e.type)) && i.push(zi(a.messages.required, e.fullField));
  22571. }, BSe = function(e, n, r, i, a) {
  22572. (/^\s+$/.test(n) || n === "") && i.push(zi(a.messages.whitespace, e.fullField));
  22573. }, Ry, zSe = function() {
  22574. if (Ry)
  22575. return Ry;
  22576. var t = "[a-fA-F\\d:]", e = function(_) {
  22577. return _ && _.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
  22578. }, 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 = (`
  22579. (?:
  22580. (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
  22581. (?:` + 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
  22582. (?:` + 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
  22583. (?:` + 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
  22584. (?:` + 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
  22585. (?:` + 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
  22586. (?:` + 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
  22587. (?::(?:(?::` + 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
  22588. )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
  22589. `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), o = new RegExp("^" + n + "$"), s = new RegExp("^" + i + "$"), l = function(_) {
  22590. return _ && _.exact ? a : new RegExp("(?:" + e(_) + n + e(_) + ")|(?:" + e(_) + i + e(_) + ")", "g");
  22591. };
  22592. l.v4 = function(b) {
  22593. return b && b.exact ? o : new RegExp("" + e(b) + n + e(b), "g");
  22594. }, l.v6 = function(b) {
  22595. return b && b.exact ? s : new RegExp("" + e(b) + i + e(b), "g");
  22596. };
  22597. 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;
  22598. return Ry = new RegExp("(?:^" + y + "$)", "i"), Ry;
  22599. }, N5 = {
  22600. // http://emailregex.com/
  22601. 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,}))$/,
  22602. // url: new RegExp(
  22603. // '^(?!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]*)?$',
  22604. // 'i',
  22605. // ),
  22606. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  22607. }, Bv = {
  22608. integer: function(e) {
  22609. return Bv.number(e) && parseInt(e, 10) === e;
  22610. },
  22611. float: function(e) {
  22612. return Bv.number(e) && !Bv.integer(e);
  22613. },
  22614. array: function(e) {
  22615. return Array.isArray(e);
  22616. },
  22617. regexp: function(e) {
  22618. if (e instanceof RegExp)
  22619. return !0;
  22620. try {
  22621. return !!new RegExp(e);
  22622. } catch {
  22623. return !1;
  22624. }
  22625. },
  22626. date: function(e) {
  22627. return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
  22628. },
  22629. number: function(e) {
  22630. return isNaN(e) ? !1 : typeof e == "number";
  22631. },
  22632. object: function(e) {
  22633. return typeof e == "object" && !Bv.array(e);
  22634. },
  22635. method: function(e) {
  22636. return typeof e == "function";
  22637. },
  22638. email: function(e) {
  22639. return typeof e == "string" && e.length <= 320 && !!e.match(N5.email);
  22640. },
  22641. url: function(e) {
  22642. return typeof e == "string" && e.length <= 2048 && !!e.match(zSe());
  22643. },
  22644. hex: function(e) {
  22645. return typeof e == "string" && !!e.match(N5.hex);
  22646. }
  22647. }, VSe = function(e, n, r, i, a) {
  22648. if (e.required && n === void 0) {
  22649. yX(e, n, r, i, a);
  22650. return;
  22651. }
  22652. var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
  22653. o.indexOf(s) > -1 ? Bv[s](n) || i.push(zi(a.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && i.push(zi(a.messages.types[s], e.fullField, e.type));
  22654. }, FSe = function(e, n, r, i, a) {
  22655. 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);
  22656. if (d ? f = "number" : h ? f = "string" : p && (f = "array"), !f)
  22657. return !1;
  22658. p && (c = n.length), h && (c = n.replace(u, "_").length), o ? c !== e.len && i.push(zi(a.messages[f].len, e.fullField, e.len)) : s && !l && c < e.min ? i.push(zi(a.messages[f].min, e.fullField, e.min)) : l && !s && c > e.max ? i.push(zi(a.messages[f].max, e.fullField, e.max)) : s && l && (c < e.min || c > e.max) && i.push(zi(a.messages[f].range, e.fullField, e.min, e.max));
  22659. }, qf = "enum", WSe = function(e, n, r, i, a) {
  22660. e[qf] = Array.isArray(e[qf]) ? e[qf] : [], e[qf].indexOf(n) === -1 && i.push(zi(a.messages[qf], e.fullField, e[qf].join(", ")));
  22661. }, QSe = function(e, n, r, i, a) {
  22662. if (e.pattern) {
  22663. if (e.pattern instanceof RegExp)
  22664. e.pattern.lastIndex = 0, e.pattern.test(n) || i.push(zi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
  22665. else if (typeof e.pattern == "string") {
  22666. var o = new RegExp(e.pattern);
  22667. o.test(n) || i.push(zi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
  22668. }
  22669. }
  22670. }, Mt = {
  22671. required: yX,
  22672. whitespace: BSe,
  22673. type: VSe,
  22674. range: FSe,
  22675. enum: WSe,
  22676. pattern: QSe
  22677. }, HSe = function(e, n, r, i, a) {
  22678. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22679. if (s) {
  22680. if (Kn(n, "string") && !e.required)
  22681. return r();
  22682. 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));
  22683. }
  22684. r(o);
  22685. }, GSe = function(e, n, r, i, a) {
  22686. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22687. if (s) {
  22688. if (Kn(n) && !e.required)
  22689. return r();
  22690. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22691. }
  22692. r(o);
  22693. }, jSe = function(e, n, r, i, a) {
  22694. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22695. if (s) {
  22696. if (n === "" && (n = void 0), Kn(n) && !e.required)
  22697. return r();
  22698. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22699. }
  22700. r(o);
  22701. }, ZSe = function(e, n, r, i, a) {
  22702. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22703. if (s) {
  22704. if (Kn(n) && !e.required)
  22705. return r();
  22706. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22707. }
  22708. r(o);
  22709. }, USe = function(e, n, r, i, a) {
  22710. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22711. if (s) {
  22712. if (Kn(n) && !e.required)
  22713. return r();
  22714. Mt.required(e, n, i, o, a), Kn(n) || Mt.type(e, n, i, o, a);
  22715. }
  22716. r(o);
  22717. }, XSe = function(e, n, r, i, a) {
  22718. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22719. if (s) {
  22720. if (Kn(n) && !e.required)
  22721. return r();
  22722. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22723. }
  22724. r(o);
  22725. }, YSe = function(e, n, r, i, a) {
  22726. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22727. if (s) {
  22728. if (Kn(n) && !e.required)
  22729. return r();
  22730. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22731. }
  22732. r(o);
  22733. }, qSe = function(e, n, r, i, a) {
  22734. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22735. if (s) {
  22736. if (n == null && !e.required)
  22737. return r();
  22738. Mt.required(e, n, i, o, a, "array"), n != null && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22739. }
  22740. r(o);
  22741. }, KSe = function(e, n, r, i, a) {
  22742. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22743. if (s) {
  22744. if (Kn(n) && !e.required)
  22745. return r();
  22746. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22747. }
  22748. r(o);
  22749. }, JSe = "enum", exe = function(e, n, r, i, a) {
  22750. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22751. if (s) {
  22752. if (Kn(n) && !e.required)
  22753. return r();
  22754. Mt.required(e, n, i, o, a), n !== void 0 && Mt[JSe](e, n, i, o, a);
  22755. }
  22756. r(o);
  22757. }, txe = function(e, n, r, i, a) {
  22758. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22759. if (s) {
  22760. if (Kn(n, "string") && !e.required)
  22761. return r();
  22762. Mt.required(e, n, i, o, a), Kn(n, "string") || Mt.pattern(e, n, i, o, a);
  22763. }
  22764. r(o);
  22765. }, nxe = function(e, n, r, i, a) {
  22766. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22767. if (s) {
  22768. if (Kn(n, "date") && !e.required)
  22769. return r();
  22770. if (Mt.required(e, n, i, o, a), !Kn(n, "date")) {
  22771. var l;
  22772. 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);
  22773. }
  22774. }
  22775. r(o);
  22776. }, rxe = function(e, n, r, i, a) {
  22777. var o = [], s = Array.isArray(n) ? "array" : typeof n;
  22778. Mt.required(e, n, i, o, a, s), r(o);
  22779. }, wC = function(e, n, r, i, a) {
  22780. var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
  22781. if (l) {
  22782. if (Kn(n, o) && !e.required)
  22783. return r();
  22784. Mt.required(e, n, i, s, a, o), Kn(n, o) || Mt.type(e, n, i, s, a);
  22785. }
  22786. r(s);
  22787. }, ixe = function(e, n, r, i, a) {
  22788. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22789. if (s) {
  22790. if (Kn(n) && !e.required)
  22791. return r();
  22792. Mt.required(e, n, i, o, a);
  22793. }
  22794. r(o);
  22795. }, fg = {
  22796. string: HSe,
  22797. method: GSe,
  22798. number: jSe,
  22799. boolean: ZSe,
  22800. regexp: USe,
  22801. integer: XSe,
  22802. float: YSe,
  22803. array: qSe,
  22804. object: KSe,
  22805. enum: exe,
  22806. pattern: txe,
  22807. date: nxe,
  22808. url: wC,
  22809. hex: wC,
  22810. email: wC,
  22811. required: rxe,
  22812. any: ixe
  22813. };
  22814. function W2() {
  22815. return {
  22816. default: "Validation error on field %s",
  22817. required: "%s is required",
  22818. enum: "%s must be one of %s",
  22819. whitespace: "%s cannot be empty",
  22820. date: {
  22821. format: "%s date %s is invalid for format %s",
  22822. parse: "%s date could not be parsed, %s is invalid ",
  22823. invalid: "%s date %s is invalid"
  22824. },
  22825. types: {
  22826. string: "%s is not a %s",
  22827. method: "%s is not a %s (function)",
  22828. array: "%s is not an %s",
  22829. object: "%s is not an %s",
  22830. number: "%s is not a %s",
  22831. date: "%s is not a %s",
  22832. boolean: "%s is not a %s",
  22833. integer: "%s is not an %s",
  22834. float: "%s is not a %s",
  22835. regexp: "%s is not a valid %s",
  22836. email: "%s is not a valid %s",
  22837. url: "%s is not a valid %s",
  22838. hex: "%s is not a valid %s"
  22839. },
  22840. string: {
  22841. len: "%s must be exactly %s characters",
  22842. min: "%s must be at least %s characters",
  22843. max: "%s cannot be longer than %s characters",
  22844. range: "%s must be between %s and %s characters"
  22845. },
  22846. number: {
  22847. len: "%s must equal %s",
  22848. min: "%s cannot be less than %s",
  22849. max: "%s cannot be greater than %s",
  22850. range: "%s must be between %s and %s"
  22851. },
  22852. array: {
  22853. len: "%s must be exactly %s in length",
  22854. min: "%s cannot be less than %s in length",
  22855. max: "%s cannot be greater than %s in length",
  22856. range: "%s must be between %s and %s in length"
  22857. },
  22858. pattern: {
  22859. mismatch: "%s value %s does not match pattern %s"
  22860. },
  22861. clone: function() {
  22862. var e = JSON.parse(JSON.stringify(this));
  22863. return e.clone = this.clone, e;
  22864. }
  22865. };
  22866. }
  22867. var Q2 = W2(), _0 = /* @__PURE__ */ function() {
  22868. function t(n) {
  22869. this.rules = null, this._messages = Q2, this.define(n);
  22870. }
  22871. var e = t.prototype;
  22872. return e.define = function(r) {
  22873. var i = this;
  22874. if (!r)
  22875. throw new Error("Cannot configure a schema with no rules");
  22876. if (typeof r != "object" || Array.isArray(r))
  22877. throw new Error("Rules must be an object");
  22878. this.rules = {}, Object.keys(r).forEach(function(a) {
  22879. var o = r[a];
  22880. i.rules[a] = Array.isArray(o) ? o : [o];
  22881. });
  22882. }, e.messages = function(r) {
  22883. return r && (this._messages = L5(W2(), r)), this._messages;
  22884. }, e.validate = function(r, i, a) {
  22885. var o = this;
  22886. i === void 0 && (i = {}), a === void 0 && (a = function() {
  22887. });
  22888. var s = r, l = i, u = a;
  22889. if (typeof l == "function" && (u = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
  22890. return u && u(null, s), Promise.resolve(s);
  22891. function c(v) {
  22892. var g = [], m = {};
  22893. function y(_) {
  22894. if (Array.isArray(_)) {
  22895. var O;
  22896. g = (O = g).concat.apply(O, _);
  22897. } else
  22898. g.push(_);
  22899. }
  22900. for (var b = 0; b < v.length; b++)
  22901. y(v[b]);
  22902. g.length ? (m = F2(g), u(g, m)) : u(null, s);
  22903. }
  22904. if (l.messages) {
  22905. var f = this.messages();
  22906. f === Q2 && (f = W2()), L5(f, l.messages), l.messages = f;
  22907. } else
  22908. l.messages = this.messages();
  22909. var d = {}, h = l.keys || Object.keys(this.rules);
  22910. h.forEach(function(v) {
  22911. var g = o.rules[v], m = s[v];
  22912. g.forEach(function(y) {
  22913. var b = y;
  22914. typeof b.transform == "function" && (s === r && (s = Ic({}, s)), m = s[v] = b.transform(m)), typeof b == "function" ? b = {
  22915. validator: b
  22916. } : 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({
  22917. rule: b,
  22918. value: m,
  22919. source: s,
  22920. field: v
  22921. }));
  22922. });
  22923. });
  22924. var p = {};
  22925. return kSe(d, l, function(v, g) {
  22926. var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
  22927. y = y && (m.required || !m.required && v.value), m.field = v.field;
  22928. function b(S, x) {
  22929. return Ic({}, x, {
  22930. fullField: m.fullField + "." + S,
  22931. fullFields: m.fullFields ? [].concat(m.fullFields, [S]) : [S]
  22932. });
  22933. }
  22934. function _(S) {
  22935. S === void 0 && (S = []);
  22936. var x = Array.isArray(S) ? S : [S];
  22937. !l.suppressWarning && x.length && t.warning("async-validator:", x), x.length && m.message !== void 0 && (x = [].concat(m.message));
  22938. var C = x.map(k5(m, s));
  22939. if (l.first && C.length)
  22940. return p[m.field] = 1, g(C);
  22941. if (!y)
  22942. g(C);
  22943. else {
  22944. if (m.required && !v.value)
  22945. return m.message !== void 0 ? C = [].concat(m.message).map(k5(m, s)) : l.error && (C = [l.error(m, zi(l.messages.required, m.field))]), g(C);
  22946. var T = {};
  22947. m.defaultField && Object.keys(v.value).map(function($) {
  22948. T[$] = m.defaultField;
  22949. }), T = Ic({}, T, v.rule.fields);
  22950. var w = {};
  22951. Object.keys(T).forEach(function($) {
  22952. var A = T[$], D = Array.isArray(A) ? A : [A];
  22953. w[$] = D.map(b.bind(null, $));
  22954. });
  22955. var P = new t(w);
  22956. 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($) {
  22957. var A = [];
  22958. C && C.length && A.push.apply(A, C), $ && $.length && A.push.apply(A, $), g(A.length ? A : null);
  22959. });
  22960. }
  22961. }
  22962. var O;
  22963. if (m.asyncValidator)
  22964. O = m.asyncValidator(m, v.value, _, v.source, l);
  22965. else if (m.validator) {
  22966. try {
  22967. O = m.validator(m, v.value, _, v.source, l);
  22968. } catch (S) {
  22969. console.error == null || console.error(S), l.suppressValidatorError || setTimeout(function() {
  22970. throw S;
  22971. }, 0), _(S.message);
  22972. }
  22973. 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);
  22974. }
  22975. O && O.then && O.then(function() {
  22976. return _();
  22977. }, function(S) {
  22978. return _(S);
  22979. });
  22980. }, function(v) {
  22981. c(v);
  22982. }, s);
  22983. }, e.getType = function(r) {
  22984. if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !fg.hasOwnProperty(r.type))
  22985. throw new Error(zi("Unknown rule type %s", r.type));
  22986. return r.type || "string";
  22987. }, e.getValidationMethod = function(r) {
  22988. if (typeof r.validator == "function")
  22989. return r.validator;
  22990. var i = Object.keys(r), a = i.indexOf("message");
  22991. return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? fg.required : fg[this.getType(r)] || void 0;
  22992. }, t;
  22993. }();
  22994. _0.register = function(e, n) {
  22995. if (typeof n != "function")
  22996. throw new Error("Cannot register a validator by type, validator is not a function");
  22997. fg[e] = n;
  22998. };
  22999. _0.warning = mX;
  23000. _0.messages = Q2;
  23001. _0.validators = fg;
  23002. function Zl(t) {
  23003. return t == null ? [] : Array.isArray(t) ? t : [t];
  23004. }
  23005. function bX(t, e) {
  23006. let n = t;
  23007. for (let r = 0; r < e.length; r += 1) {
  23008. if (n == null)
  23009. return;
  23010. n = n[e[r]];
  23011. }
  23012. return n;
  23013. }
  23014. function _X(t, e, n, r) {
  23015. if (!e.length)
  23016. return n;
  23017. const [i, ...a] = e;
  23018. let o;
  23019. 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] = _X(o[i], a, n, r), o;
  23020. }
  23021. function axe(t, e, n) {
  23022. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  23023. return e.length && r && n === void 0 && !bX(t, e.slice(0, -1)) ? t : _X(t, e, n, r);
  23024. }
  23025. function H2(t) {
  23026. return Zl(t);
  23027. }
  23028. function oxe(t, e) {
  23029. return bX(t, e);
  23030. }
  23031. function sxe(t, e, n) {
  23032. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  23033. return axe(t, e, n, r);
  23034. }
  23035. function lxe(t, e) {
  23036. return t && t.some((n) => cxe(n, e));
  23037. }
  23038. function B5(t) {
  23039. return typeof t == "object" && t !== null && Object.getPrototypeOf(t) === Object.prototype;
  23040. }
  23041. function OX(t, e) {
  23042. const n = Array.isArray(t) ? [...t] : I({}, t);
  23043. return e && Object.keys(e).forEach((r) => {
  23044. const i = n[r], a = e[r], o = B5(i) && B5(a);
  23045. n[r] = o ? OX(i, a || {}) : a;
  23046. }), n;
  23047. }
  23048. function uxe(t) {
  23049. for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
  23050. n[r - 1] = arguments[r];
  23051. return n.reduce((i, a) => OX(i, a), t);
  23052. }
  23053. function z5(t, e) {
  23054. let n = {};
  23055. return e.forEach((r) => {
  23056. const i = oxe(t, r);
  23057. n = sxe(n, r, i);
  23058. }), n;
  23059. }
  23060. function cxe(t, e) {
  23061. return !t || !e || t.length !== e.length ? !1 : t.every((n, r) => e[r] === n);
  23062. }
  23063. const Pi = "'${name}' is not a valid ${type}", bx = {
  23064. default: "Validation error on field '${name}'",
  23065. required: "'${name}' is required",
  23066. enum: "'${name}' must be one of [${enum}]",
  23067. whitespace: "'${name}' cannot be empty",
  23068. date: {
  23069. format: "'${name}' is invalid for format date",
  23070. parse: "'${name}' could not be parsed as date",
  23071. invalid: "'${name}' is invalid date"
  23072. },
  23073. types: {
  23074. string: Pi,
  23075. method: Pi,
  23076. array: Pi,
  23077. object: Pi,
  23078. number: Pi,
  23079. date: Pi,
  23080. boolean: Pi,
  23081. integer: Pi,
  23082. float: Pi,
  23083. regexp: Pi,
  23084. email: Pi,
  23085. url: Pi,
  23086. hex: Pi
  23087. },
  23088. string: {
  23089. len: "'${name}' must be exactly ${len} characters",
  23090. min: "'${name}' must be at least ${min} characters",
  23091. max: "'${name}' cannot be longer than ${max} characters",
  23092. range: "'${name}' must be between ${min} and ${max} characters"
  23093. },
  23094. number: {
  23095. len: "'${name}' must equal ${len}",
  23096. min: "'${name}' cannot be less than ${min}",
  23097. max: "'${name}' cannot be greater than ${max}",
  23098. range: "'${name}' must be between ${min} and ${max}"
  23099. },
  23100. array: {
  23101. len: "'${name}' must be exactly ${len} in length",
  23102. min: "'${name}' cannot be less than ${min} in length",
  23103. max: "'${name}' cannot be greater than ${max} in length",
  23104. range: "'${name}' must be between ${min} and ${max} in length"
  23105. },
  23106. pattern: {
  23107. mismatch: "'${name}' does not match pattern ${pattern}"
  23108. }
  23109. };
  23110. var _x = function(t, e, n, r) {
  23111. function i(a) {
  23112. return a instanceof n ? a : new n(function(o) {
  23113. o(a);
  23114. });
  23115. }
  23116. return new (n || (n = Promise))(function(a, o) {
  23117. function s(c) {
  23118. try {
  23119. u(r.next(c));
  23120. } catch (f) {
  23121. o(f);
  23122. }
  23123. }
  23124. function l(c) {
  23125. try {
  23126. u(r.throw(c));
  23127. } catch (f) {
  23128. o(f);
  23129. }
  23130. }
  23131. function u(c) {
  23132. c.done ? a(c.value) : i(c.value).then(s, l);
  23133. }
  23134. u((r = r.apply(t, e || [])).next());
  23135. });
  23136. };
  23137. const fxe = _0;
  23138. function dxe(t, e) {
  23139. return t.replace(/\$\{\w+\}/g, (n) => {
  23140. const r = n.slice(2, -1);
  23141. return e[r];
  23142. });
  23143. }
  23144. function G2(t, e, n, r, i) {
  23145. return _x(this, void 0, void 0, function* () {
  23146. const a = I({}, n);
  23147. delete a.ruleIndex, delete a.trigger;
  23148. let o = null;
  23149. a && a.type === "array" && a.defaultField && (o = a.defaultField, delete a.defaultField);
  23150. const s = new fxe({
  23151. [t]: [a]
  23152. }), l = uxe({}, bx, r.validateMessages);
  23153. s.messages(l);
  23154. let u = [];
  23155. try {
  23156. yield Promise.resolve(s.validate({
  23157. [t]: e
  23158. }, I({}, r)));
  23159. } catch (d) {
  23160. d.errors ? u = d.errors.map((h, p) => {
  23161. let {
  23162. message: v
  23163. } = h;
  23164. return (
  23165. // Wrap VueNode with `key`
  23166. Ui(v) ? Ns(v, {
  23167. key: `error_${p}`
  23168. }) : v
  23169. );
  23170. }) : (console.error(d), u = [l.default()]);
  23171. }
  23172. if (!u.length && o)
  23173. return (yield Promise.all(e.map((h, p) => G2(`${t}.${p}`, h, o, r, i)))).reduce((h, p) => [...h, ...p], []);
  23174. const c = I(I(I({}, n), {
  23175. name: t,
  23176. enum: (n.enum || []).join(", ")
  23177. }), i);
  23178. return u.map((d) => typeof d == "string" ? dxe(d, c) : d);
  23179. });
  23180. }
  23181. function SX(t, e, n, r, i, a) {
  23182. const o = t.join("."), s = n.map((u, c) => {
  23183. const f = u.validator, d = I(I({}, u), {
  23184. ruleIndex: c
  23185. });
  23186. return f && (d.validator = (h, p, v) => {
  23187. let g = !1;
  23188. const y = f(h, p, function() {
  23189. for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
  23190. _[O] = arguments[O];
  23191. Promise.resolve().then(() => {
  23192. cf(!g, "Your validator function has already return a promise. `callback` will be ignored."), g || v(..._);
  23193. });
  23194. });
  23195. g = y && typeof y.then == "function" && typeof y.catch == "function", cf(g, "`callback` is deprecated. Please return a promise instead."), g && y.then(() => {
  23196. v();
  23197. }).catch((b) => {
  23198. v(b || " ");
  23199. });
  23200. }), d;
  23201. }).sort((u, c) => {
  23202. let {
  23203. warningOnly: f,
  23204. ruleIndex: d
  23205. } = u, {
  23206. warningOnly: h,
  23207. ruleIndex: p
  23208. } = c;
  23209. return !!f == !!h ? d - p : f ? 1 : -1;
  23210. });
  23211. let l;
  23212. if (i === !0)
  23213. l = new Promise((u, c) => _x(this, void 0, void 0, function* () {
  23214. for (let f = 0; f < s.length; f += 1) {
  23215. const d = s[f], h = yield G2(o, e, d, r, a);
  23216. if (h.length) {
  23217. c([{
  23218. errors: h,
  23219. rule: d
  23220. }]);
  23221. return;
  23222. }
  23223. }
  23224. u([]);
  23225. }));
  23226. else {
  23227. const u = s.map((c) => G2(o, e, c, r, a).then((f) => ({
  23228. errors: f,
  23229. rule: c
  23230. })));
  23231. l = (i ? pxe(u) : hxe(u)).then((c) => Promise.reject(c));
  23232. }
  23233. return l.catch((u) => u), l;
  23234. }
  23235. function hxe(t) {
  23236. return _x(this, void 0, void 0, function* () {
  23237. return Promise.all(t).then((e) => [].concat(...e));
  23238. });
  23239. }
  23240. function pxe(t) {
  23241. return _x(this, void 0, void 0, function* () {
  23242. let e = 0;
  23243. return new Promise((n) => {
  23244. t.forEach((r) => {
  23245. r.then((i) => {
  23246. i.errors.length && n([i]), e += 1, e === t.length && n([]);
  23247. });
  23248. });
  23249. });
  23250. });
  23251. }
  23252. const xX = Symbol("formContextKey"), wX = (t) => {
  23253. pt(xX, t);
  23254. }, cD = () => Ge(xX, {
  23255. name: L(() => {
  23256. }),
  23257. labelAlign: L(() => "right"),
  23258. vertical: L(() => !1),
  23259. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  23260. addField: (t, e) => {
  23261. },
  23262. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  23263. removeField: (t) => {
  23264. },
  23265. model: L(() => {
  23266. }),
  23267. rules: L(() => {
  23268. }),
  23269. colon: L(() => {
  23270. }),
  23271. labelWrap: L(() => {
  23272. }),
  23273. labelCol: L(() => {
  23274. }),
  23275. requiredMark: L(() => !1),
  23276. validateTrigger: L(() => {
  23277. }),
  23278. onValidate: () => {
  23279. },
  23280. validateMessages: L(() => bx)
  23281. }), CX = Symbol("formItemPrefixContextKey"), vxe = (t) => {
  23282. pt(CX, t);
  23283. }, gxe = () => Ge(CX, {
  23284. prefixCls: L(() => "")
  23285. });
  23286. function mxe(t) {
  23287. return typeof t == "number" ? `${t} ${t} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(t) ? `0 0 ${t}` : t;
  23288. }
  23289. const yxe = () => ({
  23290. span: [String, Number],
  23291. order: [String, Number],
  23292. offset: [String, Number],
  23293. push: [String, Number],
  23294. pull: [String, Number],
  23295. xs: {
  23296. type: [String, Number, Object],
  23297. default: void 0
  23298. },
  23299. sm: {
  23300. type: [String, Number, Object],
  23301. default: void 0
  23302. },
  23303. md: {
  23304. type: [String, Number, Object],
  23305. default: void 0
  23306. },
  23307. lg: {
  23308. type: [String, Number, Object],
  23309. default: void 0
  23310. },
  23311. xl: {
  23312. type: [String, Number, Object],
  23313. default: void 0
  23314. },
  23315. xxl: {
  23316. type: [String, Number, Object],
  23317. default: void 0
  23318. },
  23319. prefixCls: String,
  23320. flex: [String, Number]
  23321. }), bxe = ["xs", "sm", "md", "lg", "xl", "xxl"], TX = te({
  23322. compatConfig: {
  23323. MODE: 3
  23324. },
  23325. name: "ACol",
  23326. inheritAttrs: !1,
  23327. props: yxe(),
  23328. setup(t, e) {
  23329. let {
  23330. slots: n,
  23331. attrs: r
  23332. } = e;
  23333. const {
  23334. gutter: i,
  23335. supportFlexGap: a,
  23336. wrap: o
  23337. } = bSe(), {
  23338. prefixCls: s,
  23339. direction: l
  23340. } = It("col", t), [u, c] = CSe(s), f = L(() => {
  23341. const {
  23342. span: h,
  23343. order: p,
  23344. offset: v,
  23345. push: g,
  23346. pull: m
  23347. } = t, y = s.value;
  23348. let b = {};
  23349. return bxe.forEach((_) => {
  23350. let O = {};
  23351. const S = t[_];
  23352. typeof S == "number" ? O.span = S : typeof S == "object" && (O = S || {}), b = I(I({}, b), {
  23353. [`${y}-${_}-${O.span}`]: O.span !== void 0,
  23354. [`${y}-${_}-order-${O.order}`]: O.order || O.order === 0,
  23355. [`${y}-${_}-offset-${O.offset}`]: O.offset || O.offset === 0,
  23356. [`${y}-${_}-push-${O.push}`]: O.push || O.push === 0,
  23357. [`${y}-${_}-pull-${O.pull}`]: O.pull || O.pull === 0,
  23358. [`${y}-rtl`]: l.value === "rtl"
  23359. });
  23360. }), ye(y, {
  23361. [`${y}-${h}`]: h !== void 0,
  23362. [`${y}-order-${p}`]: p,
  23363. [`${y}-offset-${v}`]: v,
  23364. [`${y}-push-${g}`]: g,
  23365. [`${y}-pull-${m}`]: m
  23366. }, b, r.class, c.value);
  23367. }), d = L(() => {
  23368. const {
  23369. flex: h
  23370. } = t, p = i.value, v = {};
  23371. if (p && p[0] > 0) {
  23372. const g = `${p[0] / 2}px`;
  23373. v.paddingLeft = g, v.paddingRight = g;
  23374. }
  23375. if (p && p[1] > 0 && !a.value) {
  23376. const g = `${p[1] / 2}px`;
  23377. v.paddingTop = g, v.paddingBottom = g;
  23378. }
  23379. return h && (v.flex = mxe(h), o.value === !1 && !v.minWidth && (v.minWidth = 0)), v;
  23380. });
  23381. return () => {
  23382. var h;
  23383. return u(M("div", j(j({}, r), {}, {
  23384. class: f.value,
  23385. style: [d.value, r.style]
  23386. }), [(h = n.default) === null || h === void 0 ? void 0 : h.call(n)]));
  23387. };
  23388. }
  23389. });
  23390. var _xe = { 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" };
  23391. function V5(t) {
  23392. for (var e = 1; e < arguments.length; e++) {
  23393. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  23394. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  23395. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  23396. }))), r.forEach(function(i) {
  23397. Oxe(t, i, n[i]);
  23398. });
  23399. }
  23400. return t;
  23401. }
  23402. function Oxe(t, e, n) {
  23403. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  23404. }
  23405. var fD = function(e, n) {
  23406. var r = V5({}, e, n.attrs);
  23407. return M(lt, V5({}, r, {
  23408. icon: _xe
  23409. }), null);
  23410. };
  23411. fD.displayName = "QuestionCircleOutlined";
  23412. fD.inheritAttrs = !1;
  23413. const dD = (t, e) => {
  23414. let {
  23415. slots: n,
  23416. emit: r,
  23417. attrs: i
  23418. } = e;
  23419. var a, o, s, l, u;
  23420. const {
  23421. prefixCls: c,
  23422. htmlFor: f,
  23423. labelCol: d,
  23424. labelAlign: h,
  23425. colon: p,
  23426. required: v,
  23427. requiredMark: g
  23428. } = I(I({}, t), i), [m] = RS("Form"), y = (a = t.label) !== null && a !== void 0 ? a : (o = n.label) === null || o === void 0 ? void 0 : o.call(n);
  23429. if (!y) return null;
  23430. const {
  23431. vertical: b,
  23432. labelAlign: _,
  23433. labelCol: O,
  23434. labelWrap: S,
  23435. colon: x
  23436. } = cD(), 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, {
  23437. [`${w}-wrap`]: !!S.value
  23438. });
  23439. let $ = y;
  23440. const A = p === !0 || (x == null ? void 0 : x.value) !== !1 && p !== !1;
  23441. if (A && !b.value && typeof y == "string" && y.trim() !== "" && ($ = y.replace(/[:|:]\s*$/, "")), t.tooltip || n.tooltip) {
  23442. const R = M("span", {
  23443. class: `${c}-item-tooltip`
  23444. }, [M(dx, {
  23445. title: t.tooltip
  23446. }, {
  23447. default: () => [M(fD, null, null)]
  23448. })]);
  23449. $ = M(wt, null, [$, n.tooltip ? (s = n.tooltip) === null || s === void 0 ? void 0 : s.call(n, {
  23450. class: `${c}-item-tooltip`
  23451. }) : R]);
  23452. }
  23453. g === "optional" && !v && ($ = M(wt, null, [$, M("span", {
  23454. class: `${c}-item-optional`
  23455. }, [((l = m.value) === null || l === void 0 ? void 0 : l.optional) || ((u = zs.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  23456. const E = ye({
  23457. [`${c}-item-required`]: v,
  23458. [`${c}-item-required-mark-optional`]: g === "optional",
  23459. [`${c}-item-no-colon`]: !A
  23460. });
  23461. return M(TX, j(j({}, C), {}, {
  23462. class: P
  23463. }), {
  23464. default: () => [M("label", {
  23465. for: f,
  23466. class: E,
  23467. title: typeof y == "string" ? y : "",
  23468. onClick: (R) => r("click", R)
  23469. }, [$])]
  23470. });
  23471. };
  23472. dD.displayName = "FormItemLabel";
  23473. dD.inheritAttrs = !1;
  23474. const Sxe = (t) => {
  23475. const {
  23476. componentCls: e
  23477. } = t, n = `${e}-show-help`, r = `${e}-show-help-item`;
  23478. return {
  23479. [n]: {
  23480. // Explain holder
  23481. transition: `opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,
  23482. "&-appear, &-enter": {
  23483. opacity: 0,
  23484. "&-active": {
  23485. opacity: 1
  23486. }
  23487. },
  23488. "&-leave": {
  23489. opacity: 1,
  23490. "&-active": {
  23491. opacity: 0
  23492. }
  23493. },
  23494. // Explain
  23495. [r]: {
  23496. overflow: "hidden",
  23497. transition: `height ${t.motionDurationSlow} ${t.motionEaseInOut},
  23498. opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
  23499. transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,
  23500. [`&${r}-appear, &${r}-enter`]: {
  23501. transform: "translateY(-5px)",
  23502. opacity: 0,
  23503. "&-active": {
  23504. transform: "translateY(0)",
  23505. opacity: 1
  23506. }
  23507. },
  23508. [`&${r}-leave-active`]: {
  23509. transform: "translateY(-5px)"
  23510. }
  23511. }
  23512. }
  23513. };
  23514. }, xxe = (t) => ({
  23515. legend: {
  23516. display: "block",
  23517. width: "100%",
  23518. marginBottom: t.marginLG,
  23519. padding: 0,
  23520. color: t.colorTextDescription,
  23521. fontSize: t.fontSizeLG,
  23522. lineHeight: "inherit",
  23523. border: 0,
  23524. borderBottom: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  23525. },
  23526. label: {
  23527. fontSize: t.fontSize
  23528. },
  23529. 'input[type="search"]': {
  23530. boxSizing: "border-box"
  23531. },
  23532. // Position radios and checkboxes better
  23533. 'input[type="radio"], input[type="checkbox"]': {
  23534. lineHeight: "normal"
  23535. },
  23536. 'input[type="file"]': {
  23537. display: "block"
  23538. },
  23539. // Make range inputs behave like textual form controls
  23540. 'input[type="range"]': {
  23541. display: "block",
  23542. width: "100%"
  23543. },
  23544. // Make multiple select elements height not fixed
  23545. "select[multiple], select[size]": {
  23546. height: "auto"
  23547. },
  23548. // Focus for file, radio, and checkbox
  23549. "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
  23550. outline: 0,
  23551. boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`
  23552. },
  23553. // Adjust output element
  23554. output: {
  23555. display: "block",
  23556. paddingTop: 15,
  23557. color: t.colorText,
  23558. fontSize: t.fontSize,
  23559. lineHeight: t.lineHeight
  23560. }
  23561. }), F5 = (t, e) => {
  23562. const {
  23563. formItemCls: n
  23564. } = t;
  23565. return {
  23566. [n]: {
  23567. [`${n}-label > label`]: {
  23568. height: e
  23569. },
  23570. [`${n}-control-input`]: {
  23571. minHeight: e
  23572. }
  23573. }
  23574. };
  23575. }, wxe = (t) => {
  23576. const {
  23577. componentCls: e
  23578. } = t;
  23579. return {
  23580. [t.componentCls]: I(I(I({}, nn(t)), xxe(t)), {
  23581. [`${e}-text`]: {
  23582. display: "inline-block",
  23583. paddingInlineEnd: t.paddingSM
  23584. },
  23585. // ================================================================
  23586. // = Size =
  23587. // ================================================================
  23588. "&-small": I({}, F5(t, t.controlHeightSM)),
  23589. "&-large": I({}, F5(t, t.controlHeightLG))
  23590. })
  23591. };
  23592. }, Cxe = (t) => {
  23593. const {
  23594. formItemCls: e,
  23595. iconCls: n,
  23596. componentCls: r,
  23597. rootPrefixCls: i
  23598. } = t;
  23599. return {
  23600. [e]: I(I({}, nn(t)), {
  23601. marginBottom: t.marginLG,
  23602. verticalAlign: "top",
  23603. "&-with-help": {
  23604. transition: "none"
  23605. },
  23606. [`&-hidden,
  23607. &-hidden.${i}-row`]: {
  23608. // https://github.com/ant-design/ant-design/issues/26141
  23609. display: "none"
  23610. },
  23611. "&-has-warning": {
  23612. [`${e}-split`]: {
  23613. color: t.colorError
  23614. }
  23615. },
  23616. "&-has-error": {
  23617. [`${e}-split`]: {
  23618. color: t.colorWarning
  23619. }
  23620. },
  23621. // ==============================================================
  23622. // = Label =
  23623. // ==============================================================
  23624. [`${e}-label`]: {
  23625. display: "inline-block",
  23626. flexGrow: 0,
  23627. overflow: "hidden",
  23628. whiteSpace: "nowrap",
  23629. textAlign: "end",
  23630. verticalAlign: "middle",
  23631. "&-left": {
  23632. textAlign: "start"
  23633. },
  23634. "&-wrap": {
  23635. overflow: "unset",
  23636. lineHeight: `${t.lineHeight} - 0.25em`,
  23637. whiteSpace: "unset"
  23638. },
  23639. "> label": {
  23640. position: "relative",
  23641. display: "inline-flex",
  23642. alignItems: "center",
  23643. maxWidth: "100%",
  23644. height: t.controlHeight,
  23645. color: t.colorTextHeading,
  23646. fontSize: t.fontSize,
  23647. [`> ${n}`]: {
  23648. fontSize: t.fontSize,
  23649. verticalAlign: "top"
  23650. },
  23651. // Required mark
  23652. [`&${e}-required:not(${e}-required-mark-optional)::before`]: {
  23653. display: "inline-block",
  23654. marginInlineEnd: t.marginXXS,
  23655. color: t.colorError,
  23656. fontSize: t.fontSize,
  23657. fontFamily: "SimSun, sans-serif",
  23658. lineHeight: 1,
  23659. content: '"*"',
  23660. [`${r}-hide-required-mark &`]: {
  23661. display: "none"
  23662. }
  23663. },
  23664. // Optional mark
  23665. [`${e}-optional`]: {
  23666. display: "inline-block",
  23667. marginInlineStart: t.marginXXS,
  23668. color: t.colorTextDescription,
  23669. [`${r}-hide-required-mark &`]: {
  23670. display: "none"
  23671. }
  23672. },
  23673. // Optional mark
  23674. [`${e}-tooltip`]: {
  23675. color: t.colorTextDescription,
  23676. cursor: "help",
  23677. writingMode: "horizontal-tb",
  23678. marginInlineStart: t.marginXXS
  23679. },
  23680. "&::after": {
  23681. content: '":"',
  23682. position: "relative",
  23683. marginBlock: 0,
  23684. marginInlineStart: t.marginXXS / 2,
  23685. marginInlineEnd: t.marginXS
  23686. },
  23687. [`&${e}-no-colon::after`]: {
  23688. content: '" "'
  23689. }
  23690. }
  23691. },
  23692. // ==============================================================
  23693. // = Input =
  23694. // ==============================================================
  23695. [`${e}-control`]: {
  23696. display: "flex",
  23697. flexDirection: "column",
  23698. flexGrow: 1,
  23699. [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
  23700. width: "100%"
  23701. },
  23702. "&-input": {
  23703. position: "relative",
  23704. display: "flex",
  23705. alignItems: "center",
  23706. minHeight: t.controlHeight,
  23707. "&-content": {
  23708. flex: "auto",
  23709. maxWidth: "100%"
  23710. }
  23711. }
  23712. },
  23713. // ==============================================================
  23714. // = Explain =
  23715. // ==============================================================
  23716. [e]: {
  23717. "&-explain, &-extra": {
  23718. clear: "both",
  23719. color: t.colorTextDescription,
  23720. fontSize: t.fontSize,
  23721. lineHeight: t.lineHeight
  23722. },
  23723. "&-explain-connected": {
  23724. width: "100%"
  23725. },
  23726. "&-extra": {
  23727. minHeight: t.controlHeightSM,
  23728. transition: `color ${t.motionDurationMid} ${t.motionEaseOut}`
  23729. // sync input color transition
  23730. },
  23731. "&-explain": {
  23732. "&-error": {
  23733. color: t.colorError
  23734. },
  23735. "&-warning": {
  23736. color: t.colorWarning
  23737. }
  23738. }
  23739. },
  23740. [`&-with-help ${e}-explain`]: {
  23741. height: "auto",
  23742. opacity: 1
  23743. },
  23744. // ==============================================================
  23745. // = Feedback Icon =
  23746. // ==============================================================
  23747. [`${e}-feedback-icon`]: {
  23748. fontSize: t.fontSize,
  23749. textAlign: "center",
  23750. visibility: "visible",
  23751. animationName: qI,
  23752. animationDuration: t.motionDurationMid,
  23753. animationTimingFunction: t.motionEaseOutBack,
  23754. pointerEvents: "none",
  23755. "&-success": {
  23756. color: t.colorSuccess
  23757. },
  23758. "&-error": {
  23759. color: t.colorError
  23760. },
  23761. "&-warning": {
  23762. color: t.colorWarning
  23763. },
  23764. "&-validating": {
  23765. color: t.colorPrimary
  23766. }
  23767. }
  23768. })
  23769. };
  23770. }, Txe = (t) => {
  23771. const {
  23772. componentCls: e,
  23773. formItemCls: n,
  23774. rootPrefixCls: r
  23775. } = t;
  23776. return {
  23777. [`${e}-horizontal`]: {
  23778. [`${n}-label`]: {
  23779. flexGrow: 0
  23780. },
  23781. [`${n}-control`]: {
  23782. flex: "1 1 0",
  23783. // https://github.com/ant-design/ant-design/issues/32777
  23784. // https://github.com/ant-design/ant-design/issues/33773
  23785. minWidth: 0
  23786. },
  23787. // https://github.com/ant-design/ant-design/issues/32980
  23788. [`${n}-label.${r}-col-24 + ${n}-control`]: {
  23789. minWidth: "unset"
  23790. }
  23791. }
  23792. };
  23793. }, Pxe = (t) => {
  23794. const {
  23795. componentCls: e,
  23796. formItemCls: n
  23797. } = t;
  23798. return {
  23799. [`${e}-inline`]: {
  23800. display: "flex",
  23801. flexWrap: "wrap",
  23802. [n]: {
  23803. flex: "none",
  23804. flexWrap: "nowrap",
  23805. marginInlineEnd: t.margin,
  23806. marginBottom: 0,
  23807. "&-with-help": {
  23808. marginBottom: t.marginLG
  23809. },
  23810. [`> ${n}-label,
  23811. > ${n}-control`]: {
  23812. display: "inline-block",
  23813. verticalAlign: "top"
  23814. },
  23815. [`> ${n}-label`]: {
  23816. flex: "none"
  23817. },
  23818. [`${e}-text`]: {
  23819. display: "inline-block"
  23820. },
  23821. [`${n}-has-feedback`]: {
  23822. display: "inline-block"
  23823. }
  23824. }
  23825. }
  23826. };
  23827. }, Td = (t) => ({
  23828. margin: 0,
  23829. padding: `0 0 ${t.paddingXS}px`,
  23830. whiteSpace: "initial",
  23831. textAlign: "start",
  23832. "> label": {
  23833. margin: 0,
  23834. "&::after": {
  23835. display: "none"
  23836. }
  23837. }
  23838. }), $xe = (t) => {
  23839. const {
  23840. componentCls: e,
  23841. formItemCls: n
  23842. } = t;
  23843. return {
  23844. [`${n} ${n}-label`]: Td(t),
  23845. [e]: {
  23846. [n]: {
  23847. flexWrap: "wrap",
  23848. [`${n}-label,
  23849. ${n}-control`]: {
  23850. flex: "0 0 100%",
  23851. maxWidth: "100%"
  23852. }
  23853. }
  23854. }
  23855. };
  23856. }, Axe = (t) => {
  23857. const {
  23858. componentCls: e,
  23859. formItemCls: n,
  23860. rootPrefixCls: r
  23861. } = t;
  23862. return {
  23863. [`${e}-vertical`]: {
  23864. [n]: {
  23865. "&-row": {
  23866. flexDirection: "column"
  23867. },
  23868. "&-label > label": {
  23869. height: "auto"
  23870. },
  23871. [`${e}-item-control`]: {
  23872. width: "100%"
  23873. }
  23874. }
  23875. },
  23876. [`${e}-vertical ${n}-label,
  23877. .${r}-col-24${n}-label,
  23878. .${r}-col-xl-24${n}-label`]: Td(t),
  23879. [`@media (max-width: ${t.screenXSMax}px)`]: [$xe(t), {
  23880. [e]: {
  23881. [`.${r}-col-xs-24${n}-label`]: Td(t)
  23882. }
  23883. }],
  23884. [`@media (max-width: ${t.screenSMMax}px)`]: {
  23885. [e]: {
  23886. [`.${r}-col-sm-24${n}-label`]: Td(t)
  23887. }
  23888. },
  23889. [`@media (max-width: ${t.screenMDMax}px)`]: {
  23890. [e]: {
  23891. [`.${r}-col-md-24${n}-label`]: Td(t)
  23892. }
  23893. },
  23894. [`@media (max-width: ${t.screenLGMax}px)`]: {
  23895. [e]: {
  23896. [`.${r}-col-lg-24${n}-label`]: Td(t)
  23897. }
  23898. }
  23899. };
  23900. }, hD = Sn("Form", (t, e) => {
  23901. let {
  23902. rootPrefixCls: n
  23903. } = e;
  23904. const r = Bt(t, {
  23905. formItemCls: `${t.componentCls}-item`,
  23906. rootPrefixCls: n
  23907. });
  23908. return [wxe(r), Cxe(r), Sxe(r), Txe(r), Pxe(r), Axe(r), KI(r), qI];
  23909. }), Exe = te({
  23910. compatConfig: {
  23911. MODE: 3
  23912. },
  23913. name: "ErrorList",
  23914. inheritAttrs: !1,
  23915. props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  23916. setup(t, e) {
  23917. let {
  23918. attrs: n
  23919. } = e;
  23920. const {
  23921. prefixCls: r,
  23922. status: i
  23923. } = gxe(), a = L(() => `${r.value}-item-explain`), o = L(() => !!(t.errors && t.errors.length)), s = U(i.value), [, l] = hD(r);
  23924. return se([o, i], () => {
  23925. o.value && (s.value = i.value);
  23926. }), () => {
  23927. var u, c;
  23928. const f = sD(`${r.value}-show-help-item`), d = wI(`${r.value}-show-help-item`, f);
  23929. return d.role = "alert", d.class = [l.value, a.value, n.class, `${r.value}-show-help`], M(co, j(j({}, g0(`${r.value}-show-help`)), {}, {
  23930. onAfterEnter: () => t.onErrorVisibleChanged(!0),
  23931. onAfterLeave: () => t.onErrorVisibleChanged(!1)
  23932. }), {
  23933. default: () => [bi(M(JM, j(j({}, d), {}, {
  23934. tag: "div"
  23935. }), {
  23936. default: () => [(c = t.errors) === null || c === void 0 ? void 0 : c.map((h, p) => M("div", {
  23937. key: p,
  23938. class: s.value ? `${a.value}-${s.value}` : ""
  23939. }, [h]))]
  23940. }), [[Bs, !!(!((u = t.errors) === null || u === void 0) && u.length)]])]
  23941. });
  23942. };
  23943. }
  23944. }), Mxe = te({
  23945. compatConfig: {
  23946. MODE: 3
  23947. },
  23948. slots: Object,
  23949. inheritAttrs: !1,
  23950. props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  23951. setup(t, e) {
  23952. let {
  23953. slots: n
  23954. } = e;
  23955. const r = cD(), {
  23956. wrapperCol: i
  23957. } = r, a = I({}, r);
  23958. return delete a.labelCol, delete a.wrapperCol, wX(a), vxe({
  23959. prefixCls: L(() => t.prefixCls),
  23960. status: L(() => t.status)
  23961. }), () => {
  23962. var o, s, l;
  23963. const {
  23964. prefixCls: u,
  23965. wrapperCol: c,
  23966. marginBottom: f,
  23967. onErrorVisibleChanged: d,
  23968. help: h = (o = n.help) === null || o === void 0 ? void 0 : o.call(n),
  23969. errors: p = os((s = n.errors) === null || s === void 0 ? void 0 : s.call(n)),
  23970. // hasFeedback,
  23971. // status,
  23972. extra: v = (l = n.extra) === null || l === void 0 ? void 0 : l.call(n)
  23973. } = t, g = `${u}-item`, m = c || (i == null ? void 0 : i.value) || {}, y = ye(`${g}-control`, m.class);
  23974. return M(TX, j(j({}, m), {}, {
  23975. class: y
  23976. }), {
  23977. default: () => {
  23978. var b;
  23979. return M(wt, null, [M("div", {
  23980. class: `${g}-control-input`
  23981. }, [M("div", {
  23982. class: `${g}-control-input-content`
  23983. }, [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)])]), f !== null || p.length ? M("div", {
  23984. style: {
  23985. display: "flex",
  23986. flexWrap: "nowrap"
  23987. }
  23988. }, [M(Exe, {
  23989. errors: p,
  23990. help: h,
  23991. class: `${g}-explain-connected`,
  23992. onErrorVisibleChanged: d
  23993. }, null), !!f && M("div", {
  23994. style: {
  23995. width: 0,
  23996. height: `${f}px`
  23997. }
  23998. }, null)]) : null, v ? M("div", {
  23999. class: `${g}-extra`
  24000. }, [v]) : null]);
  24001. }
  24002. });
  24003. };
  24004. }
  24005. });
  24006. function Ixe(t) {
  24007. const e = ae(t.value.slice());
  24008. let n = null;
  24009. return ht(() => {
  24010. clearTimeout(n), n = setTimeout(() => {
  24011. e.value = t.value;
  24012. }, t.value.length ? 0 : 10);
  24013. }), e;
  24014. }
  24015. ru("success", "warning", "error", "validating", "");
  24016. const Dxe = {
  24017. success: Ou,
  24018. warning: Su,
  24019. error: Da,
  24020. validating: ts
  24021. };
  24022. function CC(t, e, n) {
  24023. let r = t;
  24024. const i = e;
  24025. let a = 0;
  24026. try {
  24027. for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
  24028. const s = i[a];
  24029. if (s in r)
  24030. r = r[s];
  24031. else {
  24032. if (n)
  24033. throw Error("please transfer a valid name path to form item!");
  24034. break;
  24035. }
  24036. }
  24037. if (n && !r)
  24038. throw Error("please transfer a valid name path to form item!");
  24039. } catch {
  24040. console.error("please transfer a valid name path to form item!");
  24041. }
  24042. return {
  24043. o: r,
  24044. k: i[a],
  24045. v: r ? r[i[a]] : void 0
  24046. };
  24047. }
  24048. const Rxe = () => ({
  24049. htmlFor: String,
  24050. prefixCls: String,
  24051. label: Y.any,
  24052. help: Y.any,
  24053. extra: Y.any,
  24054. labelCol: {
  24055. type: Object
  24056. },
  24057. wrapperCol: {
  24058. type: Object
  24059. },
  24060. hasFeedback: {
  24061. type: Boolean,
  24062. default: !1
  24063. },
  24064. colon: {
  24065. type: Boolean,
  24066. default: void 0
  24067. },
  24068. labelAlign: String,
  24069. prop: {
  24070. type: [String, Number, Array]
  24071. },
  24072. name: {
  24073. type: [String, Number, Array]
  24074. },
  24075. rules: [Array, Object],
  24076. autoLink: {
  24077. type: Boolean,
  24078. default: !0
  24079. },
  24080. required: {
  24081. type: Boolean,
  24082. default: void 0
  24083. },
  24084. validateFirst: {
  24085. type: Boolean,
  24086. default: void 0
  24087. },
  24088. validateStatus: Y.oneOf(ru("", "success", "warning", "error", "validating")),
  24089. validateTrigger: {
  24090. type: [String, Array]
  24091. },
  24092. messageVariables: {
  24093. type: Object
  24094. },
  24095. hidden: Boolean,
  24096. noStyle: Boolean,
  24097. tooltip: String
  24098. });
  24099. let kxe = 0;
  24100. const Lxe = "form_item", PX = te({
  24101. compatConfig: {
  24102. MODE: 3
  24103. },
  24104. name: "AFormItem",
  24105. inheritAttrs: !1,
  24106. __ANT_NEW_FORM_ITEM: !0,
  24107. props: Rxe(),
  24108. slots: Object,
  24109. setup(t, e) {
  24110. let {
  24111. slots: n,
  24112. attrs: r,
  24113. expose: i
  24114. } = e;
  24115. cf(t.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
  24116. const a = `form-item-${++kxe}`, {
  24117. prefixCls: o
  24118. } = It("form", t), [s, l] = hD(o), u = ae(), c = cD(), f = L(() => t.name || t.prop), d = ae([]), h = ae(!1), p = ae(), v = L(() => {
  24119. const ee = f.value;
  24120. return H2(ee);
  24121. }), g = L(() => {
  24122. if (v.value.length) {
  24123. const ee = c.name.value, oe = v.value.join("_");
  24124. return ee ? `${ee}_${oe}` : `${Lxe}_${oe}`;
  24125. } else
  24126. return;
  24127. }), m = () => {
  24128. const ee = c.model.value;
  24129. if (!(!ee || !f.value))
  24130. return CC(ee, v.value, !0).v;
  24131. }, y = L(() => m()), b = ae(Zc(y.value)), _ = L(() => {
  24132. let ee = t.validateTrigger !== void 0 ? t.validateTrigger : c.validateTrigger.value;
  24133. return ee = ee === void 0 ? "change" : ee, Zl(ee);
  24134. }), O = L(() => {
  24135. let ee = c.rules.value;
  24136. const oe = t.rules, K = t.required !== void 0 ? {
  24137. required: !!t.required,
  24138. trigger: _.value
  24139. } : [], ie = CC(ee, v.value);
  24140. ee = ee ? ie.o[ie.k] || ie.v : [];
  24141. const X = [].concat(oe || ee || []);
  24142. return mbe(X, (H) => H.required) ? X : X.concat(K);
  24143. }), S = L(() => {
  24144. const ee = O.value;
  24145. let oe = !1;
  24146. return ee && ee.length && ee.every((K) => K.required ? (oe = !0, !1) : !0), oe || t.required;
  24147. }), x = ae();
  24148. ht(() => {
  24149. x.value = t.validateStatus;
  24150. });
  24151. const C = L(() => {
  24152. let ee = {};
  24153. 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;
  24154. }), T = (ee) => {
  24155. if (v.value.length === 0)
  24156. return;
  24157. const {
  24158. validateFirst: oe = !1
  24159. } = t, {
  24160. triggerName: K
  24161. } = ee || {};
  24162. let ie = O.value;
  24163. if (K && (ie = ie.filter((H) => {
  24164. const {
  24165. trigger: G
  24166. } = H;
  24167. return !G && !_.value.length ? !0 : Zl(G || _.value).includes(K);
  24168. })), !ie.length)
  24169. return Promise.resolve();
  24170. const X = SX(v.value, y.value, ie, I({
  24171. validateMessages: c.validateMessages.value
  24172. }, ee), oe, C.value);
  24173. return x.value = "validating", d.value = [], X.catch((H) => H).then(function() {
  24174. let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  24175. if (x.value === "validating") {
  24176. const G = H.filter((re) => re && re.errors.length);
  24177. x.value = G.length ? "error" : "success", d.value = G.map((re) => re.errors), c.onValidate(f.value, !d.value.length, d.value.length ? qo(d.value[0]) : null);
  24178. }
  24179. }), X;
  24180. }, w = () => {
  24181. T({
  24182. triggerName: "blur"
  24183. });
  24184. }, P = () => {
  24185. if (h.value) {
  24186. h.value = !1;
  24187. return;
  24188. }
  24189. T({
  24190. triggerName: "change"
  24191. });
  24192. }, $ = () => {
  24193. x.value = t.validateStatus, h.value = !1, d.value = [];
  24194. }, A = () => {
  24195. var ee;
  24196. x.value = t.validateStatus, h.value = !0, d.value = [];
  24197. const oe = c.model.value || {}, K = y.value, ie = CC(oe, v.value, !0);
  24198. Array.isArray(K) ? ie.o[ie.k] = [].concat((ee = b.value) !== null && ee !== void 0 ? ee : []) : ie.o[ie.k] = b.value, Tt(() => {
  24199. h.value = !1;
  24200. });
  24201. }, D = L(() => t.htmlFor === void 0 ? g.value : t.htmlFor), E = () => {
  24202. const ee = D.value;
  24203. if (!ee || !p.value)
  24204. return;
  24205. const oe = p.value.$el.querySelector(`[id="${ee}"]`);
  24206. oe && oe.focus && oe.focus();
  24207. };
  24208. i({
  24209. onFieldBlur: w,
  24210. onFieldChange: P,
  24211. clearValidate: $,
  24212. resetField: A
  24213. }), Mme({
  24214. id: g,
  24215. onFieldBlur: () => {
  24216. t.autoLink && w();
  24217. },
  24218. onFieldChange: () => {
  24219. t.autoLink && P();
  24220. },
  24221. clearValidate: $
  24222. }, L(() => !!(t.autoLink && c.model.value && f.value)));
  24223. let R = !1;
  24224. se(f, (ee) => {
  24225. ee ? R || (R = !0, c.addField(a, {
  24226. fieldValue: y,
  24227. fieldId: g,
  24228. fieldName: f,
  24229. resetField: A,
  24230. clearValidate: $,
  24231. namePath: v,
  24232. validateRules: T,
  24233. rules: O
  24234. })) : (R = !1, c.removeField(a));
  24235. }, {
  24236. immediate: !0
  24237. }), yt(() => {
  24238. c.removeField(a);
  24239. });
  24240. const N = Ixe(d), V = L(() => t.validateStatus !== void 0 ? t.validateStatus : N.value.length ? "error" : x.value), z = L(() => ({
  24241. [`${o.value}-item`]: !0,
  24242. [l.value]: !0,
  24243. // Status
  24244. [`${o.value}-item-has-feedback`]: V.value && t.hasFeedback,
  24245. [`${o.value}-item-has-success`]: V.value === "success",
  24246. [`${o.value}-item-has-warning`]: V.value === "warning",
  24247. [`${o.value}-item-has-error`]: V.value === "error",
  24248. [`${o.value}-item-is-validating`]: V.value === "validating",
  24249. [`${o.value}-item-hidden`]: t.hidden
  24250. })), W = tn({});
  24251. ro.useProvide(W), ht(() => {
  24252. let ee;
  24253. if (t.hasFeedback) {
  24254. const oe = V.value && Dxe[V.value];
  24255. ee = oe ? M("span", {
  24256. class: ye(`${o.value}-item-feedback-icon`, `${o.value}-item-feedback-icon-${V.value}`)
  24257. }, [M(oe, null, null)]) : null;
  24258. }
  24259. I(W, {
  24260. status: V.value,
  24261. hasFeedback: t.hasFeedback,
  24262. feedbackIcon: ee,
  24263. isFormItemInput: !0
  24264. });
  24265. });
  24266. const F = ae(null), Q = ae(!1), Z = () => {
  24267. if (u.value) {
  24268. const ee = getComputedStyle(u.value);
  24269. F.value = parseInt(ee.marginBottom, 10);
  24270. }
  24271. };
  24272. it(() => {
  24273. se(Q, () => {
  24274. Q.value && Z();
  24275. }, {
  24276. flush: "post",
  24277. immediate: !0
  24278. });
  24279. });
  24280. const ne = (ee) => {
  24281. ee || (F.value = null);
  24282. };
  24283. return () => {
  24284. var ee, oe;
  24285. if (t.noStyle) return (ee = n.default) === null || ee === void 0 ? void 0 : ee.call(n);
  24286. const K = (oe = t.help) !== null && oe !== void 0 ? oe : n.help ? os(n.help()) : null, ie = !!(K != null && Array.isArray(K) && K.length || N.value.length);
  24287. return Q.value = ie, s(M("div", {
  24288. class: [z.value, ie ? `${o.value}-item-with-help` : "", r.class],
  24289. ref: u
  24290. }, [M(PSe, j(j({}, r), {}, {
  24291. class: `${o.value}-item-row`,
  24292. key: "row"
  24293. }), {
  24294. default: () => {
  24295. var X, H;
  24296. return M(wt, null, [M(dD, j(j({}, t), {}, {
  24297. htmlFor: D.value,
  24298. required: S.value,
  24299. requiredMark: c.requiredMark.value,
  24300. prefixCls: o.value,
  24301. onClick: E,
  24302. label: t.label
  24303. }), {
  24304. label: n.label,
  24305. tooltip: n.tooltip
  24306. }), M(Mxe, j(j({}, t), {}, {
  24307. errors: K != null ? Zl(K) : N.value,
  24308. marginBottom: F.value,
  24309. prefixCls: o.value,
  24310. status: V.value,
  24311. ref: p,
  24312. help: K,
  24313. extra: (X = t.extra) !== null && X !== void 0 ? X : (H = n.extra) === null || H === void 0 ? void 0 : H.call(n),
  24314. onErrorVisibleChanged: ne
  24315. }), {
  24316. default: n.default
  24317. })]);
  24318. }
  24319. }), !!F.value && M("div", {
  24320. class: `${o.value}-margin-offset`,
  24321. style: {
  24322. marginBottom: `-${F.value}px`
  24323. }
  24324. }, null)]));
  24325. };
  24326. }
  24327. });
  24328. function $X(t) {
  24329. let e = !1, n = t.length;
  24330. const r = [];
  24331. return t.length ? new Promise((i, a) => {
  24332. t.forEach((o, s) => {
  24333. o.catch((l) => (e = !0, l)).then((l) => {
  24334. n -= 1, r[s] = l, !(n > 0) && (e && a(r), i(r));
  24335. });
  24336. });
  24337. }) : Promise.resolve([]);
  24338. }
  24339. function W5(t) {
  24340. let e = !1;
  24341. return t && t.length && t.every((n) => n.required ? (e = !0, !1) : !0), e;
  24342. }
  24343. function Q5(t) {
  24344. return t == null ? [] : Array.isArray(t) ? t : [t];
  24345. }
  24346. function TC(t, e, n) {
  24347. let r = t;
  24348. e = e.replace(/\[(\w+)\]/g, ".$1"), e = e.replace(/^\./, "");
  24349. const i = e.split(".");
  24350. let a = 0;
  24351. for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
  24352. const s = i[a];
  24353. if (s in r)
  24354. r = r[s];
  24355. else {
  24356. if (n)
  24357. throw new Error("please transfer a valid name path to validate!");
  24358. break;
  24359. }
  24360. }
  24361. return {
  24362. o: r,
  24363. k: i[a],
  24364. v: r ? r[i[a]] : null,
  24365. isValid: r && i[a] in r
  24366. };
  24367. }
  24368. function Nxe(t) {
  24369. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : U({}), n = arguments.length > 2 ? arguments[2] : void 0;
  24370. const r = Zc(B(t)), i = tn({}), a = ae([]), o = (b) => {
  24371. I(B(t), I(I({}, Zc(r)), b)), Tt(() => {
  24372. Object.keys(i).forEach((_) => {
  24373. i[_] = {
  24374. autoLink: !1,
  24375. required: W5(B(e)[_])
  24376. };
  24377. });
  24378. });
  24379. }, s = function() {
  24380. let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], _ = arguments.length > 1 ? arguments[1] : void 0;
  24381. return _.length ? b.filter((O) => {
  24382. const S = Q5(O.trigger || "change");
  24383. return Obe(S, _).length;
  24384. }) : b;
  24385. };
  24386. let l = null;
  24387. const u = function(b) {
  24388. let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = arguments.length > 2 ? arguments[2] : void 0;
  24389. const S = [], x = {};
  24390. for (let w = 0; w < b.length; w++) {
  24391. const P = b[w], $ = TC(B(t), P, O);
  24392. if (!$.isValid) continue;
  24393. x[P] = $.v;
  24394. const A = s(B(e)[P], Q5(_ && _.trigger));
  24395. A.length && S.push(c(P, $.v, A, _ || {}).then(() => ({
  24396. name: P,
  24397. errors: [],
  24398. warnings: []
  24399. })).catch((D) => {
  24400. const E = [], R = [];
  24401. return D.forEach((N) => {
  24402. let {
  24403. rule: {
  24404. warningOnly: V
  24405. },
  24406. errors: z
  24407. } = N;
  24408. V ? R.push(...z) : E.push(...z);
  24409. }), E.length ? Promise.reject({
  24410. name: P,
  24411. errors: E,
  24412. warnings: R
  24413. }) : {
  24414. name: P,
  24415. errors: E,
  24416. warnings: R
  24417. };
  24418. }));
  24419. }
  24420. const C = $X(S);
  24421. l = C;
  24422. const T = C.then(() => l === C ? Promise.resolve(x) : Promise.reject([])).catch((w) => {
  24423. const P = w.filter(($) => $ && $.errors.length);
  24424. return P.length ? Promise.reject({
  24425. values: x,
  24426. errorFields: P,
  24427. outOfDate: l !== C
  24428. }) : Promise.resolve(x);
  24429. });
  24430. return T.catch((w) => w), T;
  24431. }, c = function(b, _, O) {
  24432. let S = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
  24433. const x = SX([b], _, O, I({
  24434. validateMessages: bx
  24435. }, S), !!S.validateFirst);
  24436. return i[b] ? (i[b].validateStatus = "validating", x.catch((C) => C).then(function() {
  24437. let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  24438. var T;
  24439. if (i[b].validateStatus === "validating") {
  24440. const w = C.filter((P) => P && P.errors.length);
  24441. 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 ? qo(i[b].help[0]) : null);
  24442. }
  24443. }), x) : x.catch((C) => C);
  24444. }, f = (b, _) => {
  24445. let O = [], S = !0;
  24446. b ? Array.isArray(b) ? O = b : O = [b] : (S = !1, O = a.value);
  24447. const x = u(O, _ || {}, S);
  24448. return x.catch((C) => C), x;
  24449. }, d = (b) => {
  24450. let _ = [];
  24451. b ? Array.isArray(b) ? _ = b : _ = [b] : _ = a.value, _.forEach((O) => {
  24452. i[O] && I(i[O], {
  24453. validateStatus: "",
  24454. help: null
  24455. });
  24456. });
  24457. }, h = (b) => {
  24458. const _ = {
  24459. autoLink: !1
  24460. }, O = [], S = Array.isArray(b) ? b : [b];
  24461. for (let x = 0; x < S.length; x++) {
  24462. const C = S[x];
  24463. (C == null ? void 0 : C.validateStatus) === "error" && (_.validateStatus = "error", C.help && O.push(C.help)), _.required = _.required || (C == null ? void 0 : C.required);
  24464. }
  24465. return _.help = O, _;
  24466. };
  24467. let p = r, v = !0;
  24468. const g = (b) => {
  24469. const _ = [];
  24470. a.value.forEach((O) => {
  24471. const S = TC(b, O, !1), x = TC(p, O, !1);
  24472. (v && (n == null ? void 0 : n.immediate) && S.isValid || !YS(S.v, x.v)) && _.push(O);
  24473. }), f(_, {
  24474. trigger: "change"
  24475. }), v = !1, p = Zc(qo(b));
  24476. }, m = n == null ? void 0 : n.debounce;
  24477. let y = !0;
  24478. return se(e, () => {
  24479. a.value = e ? Object.keys(B(e)) : [], !y && n && n.validateOnRuleChange && f(), y = !1;
  24480. }, {
  24481. deep: !0,
  24482. immediate: !0
  24483. }), se(a, () => {
  24484. const b = {};
  24485. a.value.forEach((_) => {
  24486. b[_] = I({}, i[_], {
  24487. autoLink: !1,
  24488. required: W5(B(e)[_])
  24489. }), delete i[_];
  24490. });
  24491. for (const _ in i)
  24492. Object.prototype.hasOwnProperty.call(i, _) && delete i[_];
  24493. I(i, b);
  24494. }, {
  24495. immediate: !0
  24496. }), se(t, m && m.wait ? UI(g, m.wait, wU(m, ["wait"])) : g, {
  24497. immediate: n && !!n.immediate,
  24498. deep: !0
  24499. }), {
  24500. modelRef: t,
  24501. rulesRef: e,
  24502. initialModel: r,
  24503. validateInfos: i,
  24504. resetFields: o,
  24505. validate: f,
  24506. validateField: c,
  24507. mergeValidateInfo: h,
  24508. clearValidate: d
  24509. };
  24510. }
  24511. const Bxe = () => ({
  24512. layout: Y.oneOf(ru("horizontal", "inline", "vertical")),
  24513. labelCol: $t(),
  24514. wrapperCol: $t(),
  24515. colon: nt(),
  24516. labelAlign: hn(),
  24517. labelWrap: nt(),
  24518. prefixCls: String,
  24519. requiredMark: gn([String, Boolean]),
  24520. /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  24521. hideRequiredMark: nt(),
  24522. model: Y.object,
  24523. rules: $t(),
  24524. validateMessages: $t(),
  24525. validateOnRuleChange: nt(),
  24526. // 提交失败自动滚动到第一个错误字段
  24527. scrollToFirstError: fa(),
  24528. onSubmit: tt(),
  24529. name: String,
  24530. validateTrigger: gn([String, Array]),
  24531. size: hn(),
  24532. disabled: nt(),
  24533. onValuesChange: tt(),
  24534. onFieldsChange: tt(),
  24535. onFinish: tt(),
  24536. onFinishFailed: tt(),
  24537. onValidate: tt()
  24538. });
  24539. function zxe(t, e) {
  24540. return YS(Zl(t), Zl(e));
  24541. }
  24542. const dr = te({
  24543. compatConfig: {
  24544. MODE: 3
  24545. },
  24546. name: "AForm",
  24547. inheritAttrs: !1,
  24548. props: sr(Bxe(), {
  24549. layout: "horizontal",
  24550. hideRequiredMark: !1,
  24551. colon: !0
  24552. }),
  24553. Item: PX,
  24554. useForm: Nxe,
  24555. // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  24556. setup(t, e) {
  24557. let {
  24558. emit: n,
  24559. slots: r,
  24560. expose: i,
  24561. attrs: a
  24562. } = e;
  24563. const {
  24564. prefixCls: o,
  24565. direction: s,
  24566. form: l,
  24567. size: u,
  24568. disabled: c
  24569. } = It("form", t), f = L(() => t.requiredMark === "" || t.requiredMark), d = L(() => {
  24570. var N;
  24571. 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;
  24572. });
  24573. Uj(u), cj(c);
  24574. const h = L(() => {
  24575. var N, V;
  24576. return (N = t.colon) !== null && N !== void 0 ? N : (V = l.value) === null || V === void 0 ? void 0 : V.colon;
  24577. }), {
  24578. validateMessages: p
  24579. } = Rue(), v = L(() => I(I(I({}, bx), p.value), t.validateMessages)), [g, m] = hD(o), y = L(() => ye(o.value, {
  24580. [`${o.value}-${t.layout}`]: !0,
  24581. [`${o.value}-hide-required-mark`]: d.value === !1,
  24582. [`${o.value}-rtl`]: s.value === "rtl",
  24583. [`${o.value}-${u.value}`]: u.value
  24584. }, m.value)), b = U(), _ = {}, O = (N, V) => {
  24585. _[N] = V;
  24586. }, S = (N) => {
  24587. delete _[N];
  24588. }, x = (N) => {
  24589. const V = !!N, z = V ? Zl(N).map(H2) : [];
  24590. return V ? Object.values(_).filter((W) => z.findIndex((F) => zxe(F, W.fieldName.value)) > -1) : Object.values(_);
  24591. }, C = (N) => {
  24592. if (!t.model) {
  24593. Xr(!1, "Form", "model is required for resetFields to work.");
  24594. return;
  24595. }
  24596. x(N).forEach((V) => {
  24597. V.resetField();
  24598. });
  24599. }, T = (N) => {
  24600. x(N).forEach((V) => {
  24601. V.clearValidate();
  24602. });
  24603. }, w = (N) => {
  24604. const {
  24605. scrollToFirstError: V
  24606. } = t;
  24607. if (n("finishFailed", N), V && N.errorFields.length) {
  24608. let z = {};
  24609. typeof V == "object" && (z = V), $(N.errorFields[0].name, z);
  24610. }
  24611. }, P = function() {
  24612. return E(...arguments);
  24613. }, $ = function(N) {
  24614. let V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  24615. const z = x(N ? [N] : void 0);
  24616. if (z.length) {
  24617. const W = z[0].fieldId.value, F = W ? document.getElementById(W) : null;
  24618. F && Efe(F, I({
  24619. scrollMode: "if-needed",
  24620. block: "nearest"
  24621. }, V));
  24622. }
  24623. }, A = function() {
  24624. let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
  24625. if (N === !0) {
  24626. const V = [];
  24627. return Object.values(_).forEach((z) => {
  24628. let {
  24629. namePath: W
  24630. } = z;
  24631. V.push(W.value);
  24632. }), z5(t.model, V);
  24633. } else
  24634. return z5(t.model, N);
  24635. }, D = (N, V) => {
  24636. if (Xr(!(N instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !t.model)
  24637. return Xr(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
  24638. const z = !!N, W = z ? Zl(N).map(H2) : [], F = [];
  24639. Object.values(_).forEach((ne) => {
  24640. var ee;
  24641. if (z || W.push(ne.namePath.value), !(!((ee = ne.rules) === null || ee === void 0) && ee.value.length))
  24642. return;
  24643. const oe = ne.namePath.value;
  24644. if (!z || lxe(W, oe)) {
  24645. const K = ne.validateRules(I({
  24646. validateMessages: v.value
  24647. }, V));
  24648. F.push(K.then(() => ({
  24649. name: oe,
  24650. errors: [],
  24651. warnings: []
  24652. })).catch((ie) => {
  24653. const X = [], H = [];
  24654. return ie.forEach((G) => {
  24655. let {
  24656. rule: {
  24657. warningOnly: re
  24658. },
  24659. errors: fe
  24660. } = G;
  24661. re ? H.push(...fe) : X.push(...fe);
  24662. }), X.length ? Promise.reject({
  24663. name: oe,
  24664. errors: X,
  24665. warnings: H
  24666. }) : {
  24667. name: oe,
  24668. errors: X,
  24669. warnings: H
  24670. };
  24671. }));
  24672. }
  24673. });
  24674. const Q = $X(F);
  24675. b.value = Q;
  24676. const Z = Q.then(() => b.value === Q ? Promise.resolve(A(W)) : Promise.reject([])).catch((ne) => {
  24677. const ee = ne.filter((oe) => oe && oe.errors.length);
  24678. return Promise.reject({
  24679. values: A(W),
  24680. errorFields: ee,
  24681. outOfDate: b.value !== Q
  24682. });
  24683. });
  24684. return Z.catch((ne) => ne), Z;
  24685. }, E = function() {
  24686. return D(...arguments);
  24687. }, R = (N) => {
  24688. N.preventDefault(), N.stopPropagation(), n("submit", N), t.model && D().then((z) => {
  24689. n("finish", z);
  24690. }).catch((z) => {
  24691. w(z);
  24692. });
  24693. };
  24694. return i({
  24695. resetFields: C,
  24696. clearValidate: T,
  24697. validateFields: D,
  24698. getFieldsValue: A,
  24699. validate: P,
  24700. scrollToField: $
  24701. }), wX({
  24702. model: L(() => t.model),
  24703. name: L(() => t.name),
  24704. labelAlign: L(() => t.labelAlign),
  24705. labelCol: L(() => t.labelCol),
  24706. labelWrap: L(() => t.labelWrap),
  24707. wrapperCol: L(() => t.wrapperCol),
  24708. vertical: L(() => t.layout === "vertical"),
  24709. colon: h,
  24710. requiredMark: d,
  24711. validateTrigger: L(() => t.validateTrigger),
  24712. rules: L(() => t.rules),
  24713. addField: O,
  24714. removeField: S,
  24715. onValidate: (N, V, z) => {
  24716. n("validate", N, V, z);
  24717. },
  24718. validateMessages: v
  24719. }), se(() => t.rules, () => {
  24720. t.validateOnRuleChange && D();
  24721. }), () => {
  24722. var N;
  24723. return g(M("form", j(j({}, a), {}, {
  24724. onSubmit: R,
  24725. class: [y.value, a.class]
  24726. }), [(N = r.default) === null || N === void 0 ? void 0 : N.call(r)]));
  24727. };
  24728. }
  24729. });
  24730. dr.useInjectFormItemContext = ss;
  24731. dr.ItemRest = im;
  24732. dr.install = function(t) {
  24733. return t.component(dr.name, dr), t.component(dr.Item.name, dr.Item), t.component(im.name, im), t;
  24734. };
  24735. const Vxe = new Ot("antCheckboxEffect", {
  24736. "0%": {
  24737. transform: "scale(1)",
  24738. opacity: 0.5
  24739. },
  24740. "100%": {
  24741. transform: "scale(1.6)",
  24742. opacity: 0
  24743. }
  24744. }), Fxe = (t) => {
  24745. const {
  24746. checkboxCls: e
  24747. } = t, n = `${e}-wrapper`;
  24748. return [
  24749. // ===================== Basic =====================
  24750. {
  24751. // Group
  24752. [`${e}-group`]: I(I({}, nn(t)), {
  24753. display: "inline-flex",
  24754. flexWrap: "wrap",
  24755. columnGap: t.marginXS,
  24756. // Group > Grid
  24757. [`> ${t.antCls}-row`]: {
  24758. flex: 1
  24759. }
  24760. }),
  24761. // Wrapper
  24762. [n]: I(I({}, nn(t)), {
  24763. display: "inline-flex",
  24764. alignItems: "baseline",
  24765. cursor: "pointer",
  24766. // Fix checkbox & radio in flex align #30260
  24767. "&:after": {
  24768. display: "inline-block",
  24769. width: 0,
  24770. overflow: "hidden",
  24771. content: "'\\a0'"
  24772. },
  24773. // Checkbox near checkbox
  24774. [`& + ${n}`]: {
  24775. marginInlineStart: 0
  24776. },
  24777. [`&${n}-in-form-item`]: {
  24778. 'input[type="checkbox"]': {
  24779. width: 14,
  24780. height: 14
  24781. // FIXME: magic
  24782. }
  24783. }
  24784. }),
  24785. // Wrapper > Checkbox
  24786. [e]: I(I({}, nn(t)), {
  24787. position: "relative",
  24788. whiteSpace: "nowrap",
  24789. lineHeight: 1,
  24790. cursor: "pointer",
  24791. // To make alignment right when `controlHeight` is changed
  24792. // Ref: https://github.com/ant-design/ant-design/issues/41564
  24793. alignSelf: "center",
  24794. // Wrapper > Checkbox > input
  24795. [`${e}-input`]: {
  24796. position: "absolute",
  24797. // Since baseline align will get additional space offset,
  24798. // we need to move input to top to make it align with text.
  24799. // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
  24800. inset: 0,
  24801. zIndex: 1,
  24802. cursor: "pointer",
  24803. opacity: 0,
  24804. margin: 0,
  24805. [`&:focus-visible + ${e}-inner`]: I({}, d0(t))
  24806. },
  24807. // Wrapper > Checkbox > inner
  24808. [`${e}-inner`]: {
  24809. boxSizing: "border-box",
  24810. position: "relative",
  24811. top: 0,
  24812. insetInlineStart: 0,
  24813. display: "block",
  24814. width: t.checkboxSize,
  24815. height: t.checkboxSize,
  24816. direction: "ltr",
  24817. backgroundColor: t.colorBgContainer,
  24818. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  24819. borderRadius: t.borderRadiusSM,
  24820. borderCollapse: "separate",
  24821. transition: `all ${t.motionDurationSlow}`,
  24822. "&:after": {
  24823. boxSizing: "border-box",
  24824. position: "absolute",
  24825. top: "50%",
  24826. insetInlineStart: "21.5%",
  24827. display: "table",
  24828. width: t.checkboxSize / 14 * 5,
  24829. height: t.checkboxSize / 14 * 8,
  24830. border: `${t.lineWidthBold}px solid ${t.colorWhite}`,
  24831. borderTop: 0,
  24832. borderInlineStart: 0,
  24833. transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
  24834. opacity: 0,
  24835. content: '""',
  24836. transition: `all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`
  24837. }
  24838. },
  24839. // Wrapper > Checkbox + Text
  24840. "& + span": {
  24841. paddingInlineStart: t.paddingXS,
  24842. paddingInlineEnd: t.paddingXS
  24843. }
  24844. })
  24845. },
  24846. // ================= Indeterminate =================
  24847. {
  24848. [e]: {
  24849. "&-indeterminate": {
  24850. // Wrapper > Checkbox > inner
  24851. [`${e}-inner`]: {
  24852. "&:after": {
  24853. top: "50%",
  24854. insetInlineStart: "50%",
  24855. width: t.fontSizeLG / 2,
  24856. height: t.fontSizeLG / 2,
  24857. backgroundColor: t.colorPrimary,
  24858. border: 0,
  24859. transform: "translate(-50%, -50%) scale(1)",
  24860. opacity: 1,
  24861. content: '""'
  24862. }
  24863. }
  24864. }
  24865. }
  24866. },
  24867. // ===================== Hover =====================
  24868. {
  24869. // Wrapper
  24870. [`${n}:hover ${e}:after`]: {
  24871. visibility: "visible"
  24872. },
  24873. // Wrapper & Wrapper > Checkbox
  24874. [`
  24875. ${n}:not(${n}-disabled),
  24876. ${e}:not(${e}-disabled)
  24877. `]: {
  24878. [`&:hover ${e}-inner`]: {
  24879. borderColor: t.colorPrimary
  24880. }
  24881. },
  24882. [`${n}:not(${n}-disabled)`]: {
  24883. [`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]: {
  24884. backgroundColor: t.colorPrimaryHover,
  24885. borderColor: "transparent"
  24886. },
  24887. [`&:hover ${e}-checked:not(${e}-disabled):after`]: {
  24888. borderColor: t.colorPrimaryHover
  24889. }
  24890. }
  24891. },
  24892. // ==================== Checked ====================
  24893. {
  24894. // Wrapper > Checkbox
  24895. [`${e}-checked`]: {
  24896. [`${e}-inner`]: {
  24897. backgroundColor: t.colorPrimary,
  24898. borderColor: t.colorPrimary,
  24899. "&:after": {
  24900. opacity: 1,
  24901. transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
  24902. transition: `all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`
  24903. }
  24904. },
  24905. // Checked Effect
  24906. "&:after": {
  24907. position: "absolute",
  24908. top: 0,
  24909. insetInlineStart: 0,
  24910. width: "100%",
  24911. height: "100%",
  24912. borderRadius: t.borderRadiusSM,
  24913. visibility: "hidden",
  24914. border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
  24915. animationName: Vxe,
  24916. animationDuration: t.motionDurationSlow,
  24917. animationTimingFunction: "ease-in-out",
  24918. animationFillMode: "backwards",
  24919. content: '""',
  24920. transition: `all ${t.motionDurationSlow}`
  24921. }
  24922. },
  24923. [`
  24924. ${n}-checked:not(${n}-disabled),
  24925. ${e}-checked:not(${e}-disabled)
  24926. `]: {
  24927. [`&:hover ${e}-inner`]: {
  24928. backgroundColor: t.colorPrimaryHover,
  24929. borderColor: "transparent"
  24930. },
  24931. [`&:hover ${e}:after`]: {
  24932. borderColor: t.colorPrimaryHover
  24933. }
  24934. }
  24935. },
  24936. // ==================== Disable ====================
  24937. {
  24938. // Wrapper
  24939. [`${n}-disabled`]: {
  24940. cursor: "not-allowed"
  24941. },
  24942. // Wrapper > Checkbox
  24943. [`${e}-disabled`]: {
  24944. // Wrapper > Checkbox > input
  24945. [`&, ${e}-input`]: {
  24946. cursor: "not-allowed",
  24947. // Disabled for native input to enable Tooltip event handler
  24948. // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
  24949. pointerEvents: "none"
  24950. },
  24951. // Wrapper > Checkbox > inner
  24952. [`${e}-inner`]: {
  24953. background: t.colorBgContainerDisabled,
  24954. borderColor: t.colorBorder,
  24955. "&:after": {
  24956. borderColor: t.colorTextDisabled
  24957. }
  24958. },
  24959. "&:after": {
  24960. display: "none"
  24961. },
  24962. "& + span": {
  24963. color: t.colorTextDisabled
  24964. },
  24965. [`&${e}-indeterminate ${e}-inner::after`]: {
  24966. background: t.colorTextDisabled
  24967. }
  24968. }
  24969. }
  24970. ];
  24971. };
  24972. function Wxe(t, e) {
  24973. const n = Bt(e, {
  24974. checkboxCls: `.${t}`,
  24975. checkboxSize: e.controlInteractiveSize
  24976. });
  24977. return [Fxe(n)];
  24978. }
  24979. const AX = Sn("Checkbox", (t, e) => {
  24980. let {
  24981. prefixCls: n
  24982. } = e;
  24983. return [Wxe(n, t)];
  24984. }), Qxe = () => ({
  24985. name: String,
  24986. prefixCls: String,
  24987. options: uf([]),
  24988. disabled: Boolean,
  24989. id: String
  24990. }), Hxe = () => I(I({}, Qxe()), {
  24991. defaultValue: uf(),
  24992. value: uf(),
  24993. onChange: tt(),
  24994. "onUpdate:value": tt()
  24995. }), Gxe = () => ({
  24996. prefixCls: String,
  24997. defaultChecked: nt(),
  24998. checked: nt(),
  24999. disabled: nt(),
  25000. isGroup: nt(),
  25001. value: Y.any,
  25002. name: String,
  25003. id: String,
  25004. indeterminate: nt(),
  25005. type: hn("checkbox"),
  25006. autofocus: nt(),
  25007. onChange: tt(),
  25008. "onUpdate:checked": tt(),
  25009. onClick: tt(),
  25010. skipGroup: nt(!1)
  25011. }), jxe = () => I(I({}, Gxe()), {
  25012. indeterminate: nt(!1)
  25013. }), EX = Symbol("CheckboxGroupContext");
  25014. var H5 = function(t, e) {
  25015. var n = {};
  25016. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25017. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25018. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25019. return n;
  25020. };
  25021. const dg = te({
  25022. compatConfig: {
  25023. MODE: 3
  25024. },
  25025. name: "ACheckbox",
  25026. inheritAttrs: !1,
  25027. __ANT_CHECKBOX: !0,
  25028. props: jxe(),
  25029. // emits: ['change', 'update:checked'],
  25030. setup(t, e) {
  25031. let {
  25032. emit: n,
  25033. attrs: r,
  25034. slots: i,
  25035. expose: a
  25036. } = e;
  25037. const o = ss(), s = ro.useInject(), {
  25038. prefixCls: l,
  25039. direction: u,
  25040. disabled: c
  25041. } = It("checkbox", t), f = Ko(), [d, h] = AX(l), p = Ge(EX, void 0), v = Symbol("checkboxUniId"), g = L(() => (p == null ? void 0 : p.disabled.value) || c.value);
  25042. ht(() => {
  25043. !t.skipGroup && p && p.registerValue(v, t.value);
  25044. }), yt(() => {
  25045. p && p.cancelValue(v);
  25046. }), it(() => {
  25047. Xr(!!(t.checked !== void 0 || p || t.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
  25048. });
  25049. const m = (O) => {
  25050. const S = O.target.checked;
  25051. n("update:checked", S), n("change", O), o.onFieldChange();
  25052. }, y = U();
  25053. return a({
  25054. focus: () => {
  25055. var O;
  25056. (O = y.value) === null || O === void 0 || O.focus();
  25057. },
  25058. blur: () => {
  25059. var O;
  25060. (O = y.value) === null || O === void 0 || O.blur();
  25061. }
  25062. }), () => {
  25063. var O;
  25064. const S = Yn((O = i.default) === null || O === void 0 ? void 0 : O.call(i)), {
  25065. indeterminate: x,
  25066. skipGroup: C,
  25067. id: T = o.id.value
  25068. } = t, w = H5(t, ["indeterminate", "skipGroup", "id"]), {
  25069. onMouseenter: P,
  25070. onMouseleave: $,
  25071. onInput: A,
  25072. class: D,
  25073. style: E
  25074. } = r, R = H5(r, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), N = I(I(I(I({}, w), {
  25075. id: T,
  25076. prefixCls: l.value
  25077. }), R), {
  25078. disabled: g.value
  25079. });
  25080. p && !C ? (N.onChange = function() {
  25081. for (var F = arguments.length, Q = new Array(F), Z = 0; Z < F; Z++)
  25082. Q[Z] = arguments[Z];
  25083. n("change", ...Q), p.toggleOption({
  25084. label: S,
  25085. value: t.value
  25086. });
  25087. }, 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;
  25088. const V = ye({
  25089. [`${l.value}-wrapper`]: !0,
  25090. [`${l.value}-rtl`]: u.value === "rtl",
  25091. [`${l.value}-wrapper-checked`]: N.checked,
  25092. [`${l.value}-wrapper-disabled`]: N.disabled,
  25093. [`${l.value}-wrapper-in-form-item`]: s.isFormItemInput
  25094. }, D, h.value), z = ye({
  25095. [`${l.value}-indeterminate`]: x
  25096. }, h.value);
  25097. return d(M("label", {
  25098. class: V,
  25099. style: E,
  25100. onMouseenter: P,
  25101. onMouseleave: $
  25102. }, [M(KU, j(j({
  25103. "aria-checked": x ? "mixed" : void 0
  25104. }, N), {}, {
  25105. class: z,
  25106. ref: y
  25107. }), null), S.length ? M("span", null, [S]) : null]));
  25108. };
  25109. }
  25110. }), z1 = te({
  25111. compatConfig: {
  25112. MODE: 3
  25113. },
  25114. name: "ACheckboxGroup",
  25115. inheritAttrs: !1,
  25116. props: Hxe(),
  25117. // emits: ['change', 'update:value'],
  25118. setup(t, e) {
  25119. let {
  25120. slots: n,
  25121. attrs: r,
  25122. emit: i,
  25123. expose: a
  25124. } = e;
  25125. const o = ss(), {
  25126. prefixCls: s,
  25127. direction: l
  25128. } = It("checkbox", t), u = L(() => `${s.value}-group`), [c, f] = AX(u), d = U((t.value === void 0 ? t.defaultValue : t.value) || []);
  25129. se(() => t.value, () => {
  25130. d.value = t.value || [];
  25131. });
  25132. const h = L(() => t.options.map((_) => typeof _ == "string" || typeof _ == "number" ? {
  25133. label: _,
  25134. value: _
  25135. } : _)), p = U(Symbol()), v = U(/* @__PURE__ */ new Map()), g = (_) => {
  25136. v.value.delete(_), p.value = Symbol();
  25137. }, m = (_, O) => {
  25138. v.value.set(_, O), p.value = Symbol();
  25139. }, y = U(/* @__PURE__ */ new Map());
  25140. return se(p, () => {
  25141. const _ = /* @__PURE__ */ new Map();
  25142. for (const O of v.value.values())
  25143. _.set(O, !0);
  25144. y.value = _;
  25145. }), pt(EX, {
  25146. cancelValue: g,
  25147. registerValue: m,
  25148. toggleOption: (_) => {
  25149. const O = d.value.indexOf(_.value), S = [...d.value];
  25150. O === -1 ? S.push(_.value) : S.splice(O, 1), t.value === void 0 && (d.value = S);
  25151. const x = S.filter((C) => y.value.has(C)).sort((C, T) => {
  25152. const w = h.value.findIndex(($) => $.value === C), P = h.value.findIndex(($) => $.value === T);
  25153. return w - P;
  25154. });
  25155. i("update:value", x), i("change", x), o.onFieldChange();
  25156. },
  25157. mergedValue: d,
  25158. name: L(() => t.name),
  25159. disabled: L(() => t.disabled)
  25160. }), a({
  25161. mergedValue: d
  25162. }), () => {
  25163. var _;
  25164. const {
  25165. id: O = o.id.value
  25166. } = t;
  25167. let S = null;
  25168. return h.value && h.value.length > 0 && (S = h.value.map((x) => {
  25169. var C;
  25170. return M(dg, {
  25171. prefixCls: s.value,
  25172. key: x.value.toString(),
  25173. disabled: "disabled" in x ? x.disabled : t.disabled,
  25174. indeterminate: x.indeterminate,
  25175. value: x.value,
  25176. checked: d.value.indexOf(x.value) !== -1,
  25177. onChange: x.onChange,
  25178. class: `${u.value}-item`
  25179. }, {
  25180. default: () => [n.label !== void 0 ? (C = n.label) === null || C === void 0 ? void 0 : C.call(n, x) : x.label]
  25181. });
  25182. })), c(M("div", j(j({}, r), {}, {
  25183. class: [u.value, {
  25184. [`${u.value}-rtl`]: l.value === "rtl"
  25185. }, r.class, f.value],
  25186. id: O
  25187. }), [S || ((_ = n.default) === null || _ === void 0 ? void 0 : _.call(n))]));
  25188. };
  25189. }
  25190. });
  25191. dg.Group = z1;
  25192. dg.install = function(t) {
  25193. return t.component(dg.name, dg), t.component(z1.name, z1), t;
  25194. };
  25195. let $_ = I({}, zs.Modal);
  25196. function Zxe(t) {
  25197. t ? $_ = I(I({}, $_), t) : $_ = I({}, zs.Modal);
  25198. }
  25199. function Uxe() {
  25200. return $_;
  25201. }
  25202. const j2 = "internalMark", A_ = te({
  25203. compatConfig: {
  25204. MODE: 3
  25205. },
  25206. name: "ALocaleProvider",
  25207. props: {
  25208. locale: {
  25209. type: Object
  25210. },
  25211. ANT_MARK__: String
  25212. },
  25213. setup(t, e) {
  25214. let {
  25215. slots: n
  25216. } = e;
  25217. Xr(t.ANT_MARK__ === j2, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
  25218. const r = tn({
  25219. antLocale: I(I({}, t.locale), {
  25220. exist: !0
  25221. }),
  25222. ANT_MARK__: j2
  25223. });
  25224. return pt("localeData", r), se(() => t.locale, (i) => {
  25225. Zxe(i && i.Modal), r.antLocale = I(I({}, i), {
  25226. exist: !0
  25227. });
  25228. }, {
  25229. immediate: !0
  25230. }), () => {
  25231. var i;
  25232. return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
  25233. };
  25234. }
  25235. });
  25236. A_.install = function(t) {
  25237. return t.component(A_.name, A_), t;
  25238. };
  25239. const Xxe = np(A_), Ox = te({
  25240. name: "Notice",
  25241. inheritAttrs: !1,
  25242. props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  25243. setup(t, e) {
  25244. let {
  25245. attrs: n,
  25246. slots: r
  25247. } = e, i, a = !1;
  25248. const o = L(() => t.duration === void 0 ? 4.5 : t.duration), s = () => {
  25249. o.value && !a && (i = setTimeout(() => {
  25250. u();
  25251. }, o.value * 1e3));
  25252. }, l = () => {
  25253. i && (clearTimeout(i), i = null);
  25254. }, u = (f) => {
  25255. f && f.stopPropagation(), l();
  25256. const {
  25257. onClose: d,
  25258. noticeKey: h
  25259. } = t;
  25260. d && d(h);
  25261. }, c = () => {
  25262. l(), s();
  25263. };
  25264. return it(() => {
  25265. s();
  25266. }), nl(() => {
  25267. a = !0, l();
  25268. }), se([o, () => t.updateMark, () => t.visible], (f, d) => {
  25269. let [h, p, v] = f, [g, m, y] = d;
  25270. (h !== g || p !== m || v !== y && y) && c();
  25271. }, {
  25272. flush: "post"
  25273. }), () => {
  25274. var f, d;
  25275. const {
  25276. prefixCls: h,
  25277. closable: p,
  25278. closeIcon: v = (f = r.closeIcon) === null || f === void 0 ? void 0 : f.call(r),
  25279. onClick: g,
  25280. holder: m
  25281. } = t, {
  25282. class: y,
  25283. style: b
  25284. } = 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({
  25285. class: ye(_, y, {
  25286. [`${_}-closable`]: p
  25287. }),
  25288. style: b,
  25289. onMouseenter: l,
  25290. onMouseleave: s,
  25291. onClick: g
  25292. }, O), [M("div", {
  25293. class: `${_}-content`
  25294. }, [(d = r.default) === null || d === void 0 ? void 0 : d.call(r)]), p ? M("a", {
  25295. tabindex: 0,
  25296. onClick: u,
  25297. class: `${_}-close`
  25298. }, [v || M("span", {
  25299. class: `${_}-close-x`
  25300. }, null)]) : null]);
  25301. return m ? M(PS, {
  25302. to: m
  25303. }, {
  25304. default: () => S
  25305. }) : S;
  25306. };
  25307. }
  25308. });
  25309. var Yxe = function(t, e) {
  25310. var n = {};
  25311. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25312. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25313. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25314. return n;
  25315. };
  25316. let G5 = 0;
  25317. const qxe = Date.now();
  25318. function j5() {
  25319. const t = G5;
  25320. return G5 += 1, `rcNotification_${qxe}_${t}`;
  25321. }
  25322. const V1 = te({
  25323. name: "Notification",
  25324. inheritAttrs: !1,
  25325. props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  25326. setup(t, e) {
  25327. let {
  25328. attrs: n,
  25329. expose: r,
  25330. slots: i
  25331. } = e;
  25332. const a = /* @__PURE__ */ new Map(), o = U([]), s = L(() => {
  25333. const {
  25334. prefixCls: c,
  25335. animation: f = "fade"
  25336. } = t;
  25337. let d = t.transitionName;
  25338. return !d && f && (d = `${c}-${f}`), wI(d);
  25339. }), l = (c, f) => {
  25340. const d = c.key || j5(), h = I(I({}, c), {
  25341. key: d
  25342. }), {
  25343. maxCount: p
  25344. } = t, v = o.value.map((m) => m.notice.key).indexOf(d), g = o.value.concat();
  25345. v !== -1 ? g.splice(v, 1, {
  25346. notice: h,
  25347. holderCallback: f
  25348. }) : (p && o.value.length >= p && (h.key = g[0].notice.key, h.updateMark = j5(), h.userPassKey = d, g.shift()), g.push({
  25349. notice: h,
  25350. holderCallback: f
  25351. })), o.value = g;
  25352. }, u = (c) => {
  25353. o.value = o.value.filter((f) => {
  25354. let {
  25355. notice: {
  25356. key: d,
  25357. userPassKey: h
  25358. }
  25359. } = f;
  25360. return (h || d) !== c;
  25361. });
  25362. };
  25363. return r({
  25364. add: l,
  25365. remove: u,
  25366. notices: o
  25367. }), () => {
  25368. var c;
  25369. const {
  25370. prefixCls: f,
  25371. closeIcon: d = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
  25372. prefixCls: f
  25373. })
  25374. } = t, h = o.value.map((v, g) => {
  25375. let {
  25376. notice: m,
  25377. holderCallback: y
  25378. } = v;
  25379. const b = g === o.value.length - 1 ? m.updateMark : void 0, {
  25380. key: _,
  25381. userPassKey: O
  25382. } = m, {
  25383. content: S
  25384. } = m, x = I(I(I({
  25385. prefixCls: f,
  25386. closeIcon: typeof d == "function" ? d({
  25387. prefixCls: f
  25388. }) : d
  25389. }, m), m.props), {
  25390. key: _,
  25391. noticeKey: O || _,
  25392. updateMark: b,
  25393. onClose: (C) => {
  25394. var T;
  25395. u(C), (T = m.onClose) === null || T === void 0 || T.call(m);
  25396. },
  25397. onClick: m.onClick
  25398. });
  25399. return y ? M("div", {
  25400. key: _,
  25401. class: `${f}-hook-holder`,
  25402. ref: (C) => {
  25403. typeof _ > "u" || (C ? (a.set(_, C), y(C, x)) : a.delete(_));
  25404. }
  25405. }, null) : M(Ox, j(j({}, x), {}, {
  25406. class: ye(x.class, t.hashId)
  25407. }), {
  25408. default: () => [typeof S == "function" ? S({
  25409. prefixCls: f
  25410. }) : S]
  25411. });
  25412. }), p = {
  25413. [f]: 1,
  25414. [n.class]: !!n.class,
  25415. [t.hashId]: !0
  25416. };
  25417. return M("div", {
  25418. class: p,
  25419. style: n.style || {
  25420. top: "65px",
  25421. left: "50%"
  25422. }
  25423. }, [M(JM, j({
  25424. tag: "div"
  25425. }, s.value), {
  25426. default: () => [h]
  25427. })]);
  25428. };
  25429. }
  25430. });
  25431. V1.newInstance = function(e, n) {
  25432. const r = e || {}, {
  25433. name: i = "notification",
  25434. getContainer: a,
  25435. appContext: o,
  25436. prefixCls: s,
  25437. rootPrefixCls: l,
  25438. transitionName: u,
  25439. hasTransitionName: c,
  25440. useStyle: f
  25441. } = r, d = Yxe(r, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), h = document.createElement("div");
  25442. a ? a().appendChild(h) : document.body.appendChild(h);
  25443. const p = te({
  25444. compatConfig: {
  25445. MODE: 3
  25446. },
  25447. name: "NotificationWrapper",
  25448. setup(g, m) {
  25449. let {
  25450. attrs: y
  25451. } = m;
  25452. const b = ae(), _ = L(() => hr.getPrefixCls(i, s)), [, O] = f(_);
  25453. return it(() => {
  25454. n({
  25455. notice(S) {
  25456. var x;
  25457. (x = b.value) === null || x === void 0 || x.add(S);
  25458. },
  25459. removeNotice(S) {
  25460. var x;
  25461. (x = b.value) === null || x === void 0 || x.remove(S);
  25462. },
  25463. destroy() {
  25464. sf(null, h), h.parentNode && h.parentNode.removeChild(h);
  25465. },
  25466. component: b
  25467. });
  25468. }), () => {
  25469. const S = hr, x = S.getRootPrefixCls(l, _.value), C = c ? u : `${_.value}-${u}`;
  25470. return M(Xd, j(j({}, S), {}, {
  25471. prefixCls: x
  25472. }), {
  25473. default: () => [M(V1, j(j({
  25474. ref: b
  25475. }, y), {}, {
  25476. prefixCls: _.value,
  25477. transitionName: C,
  25478. hashId: O.value
  25479. }), null)]
  25480. });
  25481. };
  25482. }
  25483. }), v = M(p, d);
  25484. v.appContext = o || v.appContext, sf(v, h);
  25485. };
  25486. let Z5 = 0;
  25487. const Kxe = Date.now();
  25488. function U5() {
  25489. const t = Z5;
  25490. return Z5 += 1, `rcNotification_${Kxe}_${t}`;
  25491. }
  25492. const Jxe = te({
  25493. name: "HookNotification",
  25494. inheritAttrs: !1,
  25495. props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  25496. setup(t, e) {
  25497. let {
  25498. attrs: n,
  25499. slots: r
  25500. } = e;
  25501. const i = /* @__PURE__ */ new Map(), a = L(() => t.notices), o = L(() => {
  25502. let c = t.transitionName;
  25503. if (!c && t.animation)
  25504. switch (typeof t.animation) {
  25505. case "string":
  25506. c = t.animation;
  25507. break;
  25508. case "function":
  25509. c = t.animation().name;
  25510. break;
  25511. case "object":
  25512. c = t.animation.name;
  25513. break;
  25514. default:
  25515. c = `${t.prefixCls}-fade`;
  25516. break;
  25517. }
  25518. return wI(c);
  25519. }), s = (c) => t.remove(c), l = U({});
  25520. se(a, () => {
  25521. const c = {};
  25522. Object.keys(l.value).forEach((f) => {
  25523. c[f] = [];
  25524. }), t.notices.forEach((f) => {
  25525. const {
  25526. placement: d = "topRight"
  25527. } = f.notice;
  25528. d && (c[d] = c[d] || [], c[d].push(f));
  25529. }), l.value = c;
  25530. });
  25531. const u = L(() => Object.keys(l.value));
  25532. return () => {
  25533. var c;
  25534. const {
  25535. prefixCls: f,
  25536. closeIcon: d = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
  25537. prefixCls: f
  25538. })
  25539. } = t, h = u.value.map((p) => {
  25540. var v, g;
  25541. 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) => {
  25542. let {
  25543. notice: T,
  25544. holderCallback: w
  25545. } = x;
  25546. const P = C === a.value.length - 1 ? T.updateMark : void 0, {
  25547. key: $,
  25548. userPassKey: A
  25549. } = T, {
  25550. content: D
  25551. } = T, E = I(I(I({
  25552. prefixCls: f,
  25553. closeIcon: typeof d == "function" ? d({
  25554. prefixCls: f
  25555. }) : d
  25556. }, T), T.props), {
  25557. key: $,
  25558. noticeKey: A || $,
  25559. updateMark: P,
  25560. onClose: (R) => {
  25561. var N;
  25562. s(R), (N = T.onClose) === null || N === void 0 || N.call(T);
  25563. },
  25564. onClick: T.onClick
  25565. });
  25566. return w ? M("div", {
  25567. key: $,
  25568. class: `${f}-hook-holder`,
  25569. ref: (R) => {
  25570. typeof $ > "u" || (R ? (i.set($, R), w(R, E)) : i.delete($));
  25571. }
  25572. }, null) : M(Ox, j(j({}, E), {}, {
  25573. class: ye(E.class, t.hashId)
  25574. }), {
  25575. default: () => [typeof D == "function" ? D({
  25576. prefixCls: f
  25577. }) : D]
  25578. });
  25579. }), O = {
  25580. [f]: 1,
  25581. [`${f}-${p}`]: 1,
  25582. [n.class]: !!n.class,
  25583. [t.hashId]: !0,
  25584. [y]: !!y
  25585. };
  25586. function S() {
  25587. var x;
  25588. m.length > 0 || (Reflect.deleteProperty(l.value, p), (x = t.onAllRemoved) === null || x === void 0 || x.call(t));
  25589. }
  25590. return M("div", {
  25591. key: p,
  25592. class: O,
  25593. style: n.style || b || {
  25594. top: "65px",
  25595. left: "50%"
  25596. }
  25597. }, [M(JM, j(j({
  25598. tag: "div"
  25599. }, o.value), {}, {
  25600. onAfterLeave: S
  25601. }), {
  25602. default: () => [_]
  25603. })]);
  25604. });
  25605. return M(AZ, {
  25606. getContainer: t.getContainer
  25607. }, {
  25608. default: () => [h]
  25609. });
  25610. };
  25611. }
  25612. }), ewe = Jxe;
  25613. var twe = function(t, e) {
  25614. var n = {};
  25615. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25616. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25617. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25618. return n;
  25619. };
  25620. const nwe = () => document.body;
  25621. let X5 = 0;
  25622. function rwe() {
  25623. const t = {};
  25624. for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
  25625. n[r] = arguments[r];
  25626. return n.forEach((i) => {
  25627. i && Object.keys(i).forEach((a) => {
  25628. const o = i[a];
  25629. o !== void 0 && (t[a] = o);
  25630. });
  25631. }), t;
  25632. }
  25633. function MX() {
  25634. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  25635. const {
  25636. getContainer: e = nwe,
  25637. motion: n,
  25638. prefixCls: r,
  25639. maxCount: i,
  25640. getClassName: a,
  25641. getStyles: o,
  25642. onAllRemoved: s
  25643. } = t, l = twe(t, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = ae([]), c = ae(), f = (m, y) => {
  25644. const b = m.key || U5(), _ = I(I({}, m), {
  25645. key: b
  25646. }), O = u.value.map((x) => x.notice.key).indexOf(b), S = u.value.concat();
  25647. O !== -1 ? S.splice(O, 1, {
  25648. notice: _,
  25649. holderCallback: y
  25650. }) : (i && u.value.length >= i && (_.key = S[0].notice.key, _.updateMark = U5(), _.userPassKey = b, S.shift()), S.push({
  25651. notice: _,
  25652. holderCallback: y
  25653. })), u.value = S;
  25654. }, d = (m) => {
  25655. u.value = u.value.filter((y) => {
  25656. let {
  25657. notice: {
  25658. key: b,
  25659. userPassKey: _
  25660. }
  25661. } = y;
  25662. return (_ || b) !== m;
  25663. });
  25664. }, h = () => {
  25665. u.value = [];
  25666. }, p = () => M(ewe, {
  25667. ref: c,
  25668. prefixCls: r,
  25669. maxCount: i,
  25670. notices: u.value,
  25671. remove: d,
  25672. getClassName: a,
  25673. getStyles: o,
  25674. animation: n,
  25675. hashId: t.hashId,
  25676. onAllRemoved: s,
  25677. getContainer: e
  25678. }, null), v = ae([]), g = {
  25679. open: (m) => {
  25680. const y = rwe(l, m);
  25681. (y.key === null || y.key === void 0) && (y.key = `vc-notification-${X5}`, X5 += 1), v.value = [...v.value, {
  25682. type: "open",
  25683. config: y
  25684. }];
  25685. },
  25686. close: (m) => {
  25687. v.value = [...v.value, {
  25688. type: "close",
  25689. key: m
  25690. }];
  25691. },
  25692. destroy: () => {
  25693. v.value = [...v.value, {
  25694. type: "destroy"
  25695. }];
  25696. }
  25697. };
  25698. return se(v, () => {
  25699. v.value.length && (v.value.forEach((m) => {
  25700. switch (m.type) {
  25701. case "open":
  25702. f(m.config);
  25703. break;
  25704. case "close":
  25705. d(m.key);
  25706. break;
  25707. case "destroy":
  25708. h();
  25709. break;
  25710. }
  25711. }), v.value = []);
  25712. }), [g, p];
  25713. }
  25714. const iwe = (t) => {
  25715. const {
  25716. componentCls: e,
  25717. iconCls: n,
  25718. boxShadowSecondary: r,
  25719. colorBgElevated: i,
  25720. colorSuccess: a,
  25721. colorError: o,
  25722. colorWarning: s,
  25723. colorInfo: l,
  25724. fontSizeLG: u,
  25725. motionEaseInOutCirc: c,
  25726. motionDurationSlow: f,
  25727. marginXS: d,
  25728. paddingXS: h,
  25729. borderRadiusLG: p,
  25730. zIndexPopup: v,
  25731. // Custom token
  25732. messageNoticeContentPadding: g
  25733. } = t, m = new Ot("MessageMoveIn", {
  25734. "0%": {
  25735. padding: 0,
  25736. transform: "translateY(-100%)",
  25737. opacity: 0
  25738. },
  25739. "100%": {
  25740. padding: h,
  25741. transform: "translateY(0)",
  25742. opacity: 1
  25743. }
  25744. }), y = new Ot("MessageMoveOut", {
  25745. "0%": {
  25746. maxHeight: t.height,
  25747. padding: h,
  25748. opacity: 1
  25749. },
  25750. "100%": {
  25751. maxHeight: 0,
  25752. padding: 0,
  25753. opacity: 0
  25754. }
  25755. });
  25756. return [
  25757. // ============================ Holder ============================
  25758. {
  25759. [e]: I(I({}, nn(t)), {
  25760. position: "fixed",
  25761. top: d,
  25762. left: "50%",
  25763. transform: "translateX(-50%)",
  25764. width: "100%",
  25765. pointerEvents: "none",
  25766. zIndex: v,
  25767. [`${e}-move-up`]: {
  25768. animationFillMode: "forwards"
  25769. },
  25770. [`
  25771. ${e}-move-up-appear,
  25772. ${e}-move-up-enter
  25773. `]: {
  25774. animationName: m,
  25775. animationDuration: f,
  25776. animationPlayState: "paused",
  25777. animationTimingFunction: c
  25778. },
  25779. [`
  25780. ${e}-move-up-appear${e}-move-up-appear-active,
  25781. ${e}-move-up-enter${e}-move-up-enter-active
  25782. `]: {
  25783. animationPlayState: "running"
  25784. },
  25785. [`${e}-move-up-leave`]: {
  25786. animationName: y,
  25787. animationDuration: f,
  25788. animationPlayState: "paused",
  25789. animationTimingFunction: c
  25790. },
  25791. [`${e}-move-up-leave${e}-move-up-leave-active`]: {
  25792. animationPlayState: "running"
  25793. },
  25794. "&-rtl": {
  25795. direction: "rtl",
  25796. span: {
  25797. direction: "rtl"
  25798. }
  25799. }
  25800. })
  25801. },
  25802. // ============================ Notice ============================
  25803. {
  25804. [`${e}-notice`]: {
  25805. padding: h,
  25806. textAlign: "center",
  25807. [n]: {
  25808. verticalAlign: "text-bottom",
  25809. marginInlineEnd: d,
  25810. fontSize: u
  25811. },
  25812. [`${e}-notice-content`]: {
  25813. display: "inline-block",
  25814. padding: g,
  25815. background: i,
  25816. borderRadius: p,
  25817. boxShadow: r,
  25818. pointerEvents: "all"
  25819. },
  25820. [`${e}-success ${n}`]: {
  25821. color: a
  25822. },
  25823. [`${e}-error ${n}`]: {
  25824. color: o
  25825. },
  25826. [`${e}-warning ${n}`]: {
  25827. color: s
  25828. },
  25829. [`
  25830. ${e}-info ${n},
  25831. ${e}-loading ${n}`]: {
  25832. color: l
  25833. }
  25834. }
  25835. },
  25836. // ============================= Pure =============================
  25837. {
  25838. [`${e}-notice-pure-panel`]: {
  25839. padding: 0,
  25840. textAlign: "start"
  25841. }
  25842. }
  25843. ];
  25844. }, pD = Sn("Message", (t) => {
  25845. const e = Bt(t, {
  25846. messageNoticeContentPadding: `${(t.controlHeightLG - t.fontSize * t.lineHeight) / 2}px ${t.paddingSM}px`
  25847. });
  25848. return [iwe(e)];
  25849. }, (t) => ({
  25850. height: 150,
  25851. zIndexPopup: t.zIndexPopupBase + 10
  25852. })), awe = {
  25853. info: M(If, null, null),
  25854. success: M(Ou, null, null),
  25855. error: M(Da, null, null),
  25856. warning: M(Su, null, null),
  25857. loading: M(ts, null, null)
  25858. }, IX = te({
  25859. name: "PureContent",
  25860. inheritAttrs: !1,
  25861. props: ["prefixCls", "type", "icon"],
  25862. setup(t, e) {
  25863. let {
  25864. slots: n
  25865. } = e;
  25866. return () => {
  25867. var r;
  25868. return M("div", {
  25869. class: ye(`${t.prefixCls}-custom-content`, `${t.prefixCls}-${t.type}`)
  25870. }, [t.icon || awe[t.type], M("span", null, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
  25871. };
  25872. }
  25873. });
  25874. te({
  25875. name: "PurePanel",
  25876. inheritAttrs: !1,
  25877. props: ["prefixCls", "class", "type", "icon", "content"],
  25878. setup(t, e) {
  25879. let {
  25880. slots: n,
  25881. attrs: r
  25882. } = e;
  25883. var i;
  25884. const {
  25885. getPrefixCls: a
  25886. } = DS(), o = L(() => t.prefixCls || a("message")), [, s] = pD(o);
  25887. return M(Ox, j(j({}, r), {}, {
  25888. prefixCls: o.value,
  25889. class: ye(s.value, `${o.value}-notice-pure-panel`),
  25890. noticeKey: "pure",
  25891. duration: null
  25892. }), {
  25893. default: () => [M(IX, {
  25894. prefixCls: o.value,
  25895. type: t.type,
  25896. icon: t.icon
  25897. }, {
  25898. default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
  25899. })]
  25900. });
  25901. }
  25902. });
  25903. var owe = function(t, e) {
  25904. var n = {};
  25905. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25906. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25907. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25908. return n;
  25909. };
  25910. const swe = 8, lwe = 3, uwe = te({
  25911. name: "Holder",
  25912. inheritAttrs: !1,
  25913. props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
  25914. setup(t, e) {
  25915. let {
  25916. expose: n
  25917. } = e;
  25918. var r, i;
  25919. const {
  25920. getPrefixCls: a,
  25921. getPopupContainer: o
  25922. } = It("message", t), s = L(() => a("message", t.prefixCls)), [, l] = pD(s), u = () => {
  25923. var v;
  25924. const g = (v = t.top) !== null && v !== void 0 ? v : swe;
  25925. return {
  25926. left: "50%",
  25927. transform: "translateX(-50%)",
  25928. top: typeof g == "number" ? `${g}px` : g
  25929. };
  25930. }, c = () => ye(l.value, t.rtl ? `${s.value}-rtl` : ""), f = () => {
  25931. var v;
  25932. return hI({
  25933. prefixCls: s.value,
  25934. animation: (v = t.animation) !== null && v !== void 0 ? v : "move-up",
  25935. transitionName: t.transitionName
  25936. });
  25937. }, d = M("span", {
  25938. class: `${s.value}-close-x`
  25939. }, [M(al, {
  25940. class: `${s.value}-close-icon`
  25941. }, null)]), [h, p] = MX({
  25942. //@ts-ignore
  25943. getStyles: u,
  25944. prefixCls: s.value,
  25945. getClassName: c,
  25946. motion: f,
  25947. closable: !1,
  25948. closeIcon: d,
  25949. duration: (r = t.duration) !== null && r !== void 0 ? r : lwe,
  25950. getContainer: (i = t.staticGetContainer) !== null && i !== void 0 ? i : o.value,
  25951. maxCount: t.maxCount,
  25952. onAllRemoved: t.onAllRemoved
  25953. });
  25954. return n(I(I({}, h), {
  25955. prefixCls: s,
  25956. hashId: l
  25957. })), p;
  25958. }
  25959. });
  25960. let Y5 = 0;
  25961. function cwe(t) {
  25962. const e = ae(null), n = Symbol("messageHolderKey"), r = (l) => {
  25963. var u;
  25964. (u = e.value) === null || u === void 0 || u.close(l);
  25965. }, i = (l) => {
  25966. if (!e.value) {
  25967. const O = () => {
  25968. };
  25969. return O.then = () => {
  25970. }, O;
  25971. }
  25972. const {
  25973. open: u,
  25974. prefixCls: c,
  25975. hashId: f
  25976. } = e.value, d = `${c}-notice`, {
  25977. content: h,
  25978. icon: p,
  25979. type: v,
  25980. key: g,
  25981. class: m,
  25982. onClose: y
  25983. } = l, b = owe(l, ["content", "icon", "type", "key", "class", "onClose"]);
  25984. let _ = g;
  25985. return _ == null && (Y5 += 1, _ = `antd-message-${Y5}`), uue((O) => (u(I(I({}, b), {
  25986. key: _,
  25987. content: () => M(IX, {
  25988. prefixCls: c,
  25989. type: v,
  25990. icon: typeof p == "function" ? p() : p
  25991. }, {
  25992. default: () => [typeof h == "function" ? h() : h]
  25993. }),
  25994. placement: "top",
  25995. // @ts-ignore
  25996. class: ye(v && `${d}-${v}`, f, m),
  25997. onClose: () => {
  25998. y == null || y(), O();
  25999. }
  26000. })), () => {
  26001. r(_);
  26002. }));
  26003. }, o = {
  26004. open: i,
  26005. destroy: (l) => {
  26006. var u;
  26007. l !== void 0 ? r(l) : (u = e.value) === null || u === void 0 || u.destroy();
  26008. }
  26009. };
  26010. return ["info", "success", "warning", "error", "loading"].forEach((l) => {
  26011. const u = (c, f, d) => {
  26012. let h;
  26013. c && typeof c == "object" && "content" in c ? h = c : h = {
  26014. content: c
  26015. };
  26016. let p, v;
  26017. typeof f == "function" ? v = f : (p = f, v = d);
  26018. const g = I(I({
  26019. onClose: v,
  26020. duration: p
  26021. }, h), {
  26022. type: l
  26023. });
  26024. return i(g);
  26025. };
  26026. o[l] = u;
  26027. }), [o, () => M(uwe, j(j({
  26028. key: n
  26029. }, t), {}, {
  26030. ref: e
  26031. }), null)];
  26032. }
  26033. function fwe(t) {
  26034. return cwe(t);
  26035. }
  26036. let DX = 3, RX, Zr, dwe = 1, kX = "", LX = "move-up", NX = !1, BX = () => document.body, zX, VX = !1;
  26037. function hwe() {
  26038. return dwe++;
  26039. }
  26040. function pwe(t) {
  26041. t.top !== void 0 && (RX = t.top, Zr = null), t.duration !== void 0 && (DX = t.duration), t.prefixCls !== void 0 && (kX = t.prefixCls), t.getContainer !== void 0 && (BX = t.getContainer, Zr = null), t.transitionName !== void 0 && (LX = t.transitionName, Zr = null, NX = !0), t.maxCount !== void 0 && (zX = t.maxCount, Zr = null), t.rtl !== void 0 && (VX = t.rtl);
  26042. }
  26043. function vwe(t, e) {
  26044. if (Zr) {
  26045. e(Zr);
  26046. return;
  26047. }
  26048. V1.newInstance({
  26049. appContext: t.appContext,
  26050. prefixCls: t.prefixCls || kX,
  26051. rootPrefixCls: t.rootPrefixCls,
  26052. transitionName: LX,
  26053. hasTransitionName: NX,
  26054. style: {
  26055. top: RX
  26056. },
  26057. getContainer: BX || t.getPopupContainer,
  26058. maxCount: zX,
  26059. name: "message",
  26060. useStyle: pD
  26061. }, (n) => {
  26062. if (Zr) {
  26063. e(Zr);
  26064. return;
  26065. }
  26066. Zr = n, e(n);
  26067. });
  26068. }
  26069. const FX = {
  26070. info: If,
  26071. success: Ou,
  26072. error: Da,
  26073. warning: Su,
  26074. loading: ts
  26075. }, gwe = Object.keys(FX);
  26076. function mwe(t) {
  26077. const e = t.duration !== void 0 ? t.duration : DX, n = t.key || hwe(), r = new Promise((a) => {
  26078. const o = () => (typeof t.onClose == "function" && t.onClose(), a(!0));
  26079. vwe(t, (s) => {
  26080. s.notice({
  26081. key: n,
  26082. duration: e,
  26083. style: t.style || {},
  26084. class: t.class,
  26085. content: (l) => {
  26086. let {
  26087. prefixCls: u
  26088. } = l;
  26089. const c = FX[t.type], f = c ? M(c, null, null) : "", d = ye(`${u}-custom-content`, {
  26090. [`${u}-${t.type}`]: t.type,
  26091. [`${u}-rtl`]: VX === !0
  26092. });
  26093. return M("div", {
  26094. class: d
  26095. }, [typeof t.icon == "function" ? t.icon() : t.icon || f, M("span", null, [typeof t.content == "function" ? t.content() : t.content])]);
  26096. },
  26097. onClose: o,
  26098. onClick: t.onClick
  26099. });
  26100. });
  26101. }), i = () => {
  26102. Zr && Zr.removeNotice(n);
  26103. };
  26104. return i.then = (a, o) => r.then(a, o), i.promise = r, i;
  26105. }
  26106. function ywe(t) {
  26107. return Object.prototype.toString.call(t) === "[object Object]" && !!t.content;
  26108. }
  26109. const $h = {
  26110. open: mwe,
  26111. config: pwe,
  26112. destroy(t) {
  26113. if (Zr)
  26114. if (t) {
  26115. const {
  26116. removeNotice: e
  26117. } = Zr;
  26118. e(t);
  26119. } else {
  26120. const {
  26121. destroy: e
  26122. } = Zr;
  26123. e(), Zr = null;
  26124. }
  26125. }
  26126. };
  26127. function bwe(t, e) {
  26128. t[e] = (n, r, i) => ywe(n) ? t.open(I(I({}, n), {
  26129. type: e
  26130. })) : (typeof r == "function" && (i = r, r = void 0), t.open({
  26131. content: n,
  26132. duration: r,
  26133. type: e,
  26134. onClose: i
  26135. }));
  26136. }
  26137. gwe.forEach((t) => bwe($h, t));
  26138. $h.warn = $h.warning;
  26139. $h.useMessage = fwe;
  26140. const _we = (t) => {
  26141. const {
  26142. componentCls: e,
  26143. width: n,
  26144. notificationMarginEdge: r
  26145. } = t, i = new Ot("antNotificationTopFadeIn", {
  26146. "0%": {
  26147. marginTop: "-100%",
  26148. opacity: 0
  26149. },
  26150. "100%": {
  26151. marginTop: 0,
  26152. opacity: 1
  26153. }
  26154. }), a = new Ot("antNotificationBottomFadeIn", {
  26155. "0%": {
  26156. marginBottom: "-100%",
  26157. opacity: 0
  26158. },
  26159. "100%": {
  26160. marginBottom: 0,
  26161. opacity: 1
  26162. }
  26163. }), o = new Ot("antNotificationLeftFadeIn", {
  26164. "0%": {
  26165. right: {
  26166. _skip_check_: !0,
  26167. value: n
  26168. },
  26169. opacity: 0
  26170. },
  26171. "100%": {
  26172. right: {
  26173. _skip_check_: !0,
  26174. value: 0
  26175. },
  26176. opacity: 1
  26177. }
  26178. });
  26179. return {
  26180. [`&${e}-top, &${e}-bottom`]: {
  26181. marginInline: 0
  26182. },
  26183. [`&${e}-top`]: {
  26184. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26185. animationName: i
  26186. }
  26187. },
  26188. [`&${e}-bottom`]: {
  26189. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26190. animationName: a
  26191. }
  26192. },
  26193. [`&${e}-topLeft, &${e}-bottomLeft`]: {
  26194. marginInlineEnd: 0,
  26195. marginInlineStart: r,
  26196. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26197. animationName: o
  26198. }
  26199. }
  26200. };
  26201. }, Owe = (t) => {
  26202. const {
  26203. iconCls: e,
  26204. componentCls: n,
  26205. // .ant-notification
  26206. boxShadowSecondary: r,
  26207. fontSizeLG: i,
  26208. notificationMarginBottom: a,
  26209. borderRadiusLG: o,
  26210. colorSuccess: s,
  26211. colorInfo: l,
  26212. colorWarning: u,
  26213. colorError: c,
  26214. colorTextHeading: f,
  26215. notificationBg: d,
  26216. notificationPadding: h,
  26217. notificationMarginEdge: p,
  26218. motionDurationMid: v,
  26219. motionEaseInOut: g,
  26220. fontSize: m,
  26221. lineHeight: y,
  26222. width: b,
  26223. notificationIconSize: _
  26224. } = t, O = `${n}-notice`, S = new Ot("antNotificationFadeIn", {
  26225. "0%": {
  26226. left: {
  26227. _skip_check_: !0,
  26228. value: b
  26229. },
  26230. opacity: 0
  26231. },
  26232. "100%": {
  26233. left: {
  26234. _skip_check_: !0,
  26235. value: 0
  26236. },
  26237. opacity: 1
  26238. }
  26239. }), x = new Ot("antNotificationFadeOut", {
  26240. "0%": {
  26241. maxHeight: t.animationMaxHeight,
  26242. marginBottom: a,
  26243. opacity: 1
  26244. },
  26245. "100%": {
  26246. maxHeight: 0,
  26247. marginBottom: 0,
  26248. paddingTop: 0,
  26249. paddingBottom: 0,
  26250. opacity: 0
  26251. }
  26252. });
  26253. return [
  26254. // ============================ Holder ============================
  26255. {
  26256. [n]: I(I(I(I({}, nn(t)), {
  26257. position: "fixed",
  26258. zIndex: t.zIndexPopup,
  26259. marginInlineEnd: p,
  26260. [`${n}-hook-holder`]: {
  26261. position: "relative"
  26262. },
  26263. [`&${n}-top, &${n}-bottom`]: {
  26264. [`${n}-notice`]: {
  26265. marginInline: "auto auto"
  26266. }
  26267. },
  26268. [`&${n}-topLeft, &${n}-bottomLeft`]: {
  26269. [`${n}-notice`]: {
  26270. marginInlineEnd: "auto",
  26271. marginInlineStart: 0
  26272. }
  26273. },
  26274. // animation
  26275. [`${n}-fade-enter, ${n}-fade-appear`]: {
  26276. animationDuration: t.motionDurationMid,
  26277. animationTimingFunction: g,
  26278. animationFillMode: "both",
  26279. opacity: 0,
  26280. animationPlayState: "paused"
  26281. },
  26282. [`${n}-fade-leave`]: {
  26283. animationTimingFunction: g,
  26284. animationFillMode: "both",
  26285. animationDuration: v,
  26286. animationPlayState: "paused"
  26287. },
  26288. [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
  26289. animationName: S,
  26290. animationPlayState: "running"
  26291. },
  26292. [`${n}-fade-leave${n}-fade-leave-active`]: {
  26293. animationName: x,
  26294. animationPlayState: "running"
  26295. }
  26296. }), _we(t)), {
  26297. // RTL
  26298. "&-rtl": {
  26299. direction: "rtl",
  26300. [`${n}-notice-btn`]: {
  26301. float: "left"
  26302. }
  26303. }
  26304. })
  26305. },
  26306. // ============================ Notice ============================
  26307. {
  26308. [O]: {
  26309. position: "relative",
  26310. width: b,
  26311. maxWidth: `calc(100vw - ${p * 2}px)`,
  26312. marginBottom: a,
  26313. marginInlineStart: "auto",
  26314. padding: h,
  26315. overflow: "hidden",
  26316. lineHeight: y,
  26317. wordWrap: "break-word",
  26318. background: d,
  26319. borderRadius: o,
  26320. boxShadow: r,
  26321. [`${n}-close-icon`]: {
  26322. fontSize: m,
  26323. cursor: "pointer"
  26324. },
  26325. [`${O}-message`]: {
  26326. marginBottom: t.marginXS,
  26327. color: f,
  26328. fontSize: i,
  26329. lineHeight: t.lineHeightLG
  26330. },
  26331. [`${O}-description`]: {
  26332. fontSize: m
  26333. },
  26334. [`&${O}-closable ${O}-message`]: {
  26335. paddingInlineEnd: t.paddingLG
  26336. },
  26337. [`${O}-with-icon ${O}-message`]: {
  26338. marginBottom: t.marginXS,
  26339. marginInlineStart: t.marginSM + _,
  26340. fontSize: i
  26341. },
  26342. [`${O}-with-icon ${O}-description`]: {
  26343. marginInlineStart: t.marginSM + _,
  26344. fontSize: m
  26345. },
  26346. // Icon & color style in different selector level
  26347. // https://github.com/ant-design/ant-design/issues/16503
  26348. // https://github.com/ant-design/ant-design/issues/15512
  26349. [`${O}-icon`]: {
  26350. position: "absolute",
  26351. fontSize: _,
  26352. lineHeight: 0,
  26353. // icon-font
  26354. [`&-success${e}`]: {
  26355. color: s
  26356. },
  26357. [`&-info${e}`]: {
  26358. color: l
  26359. },
  26360. [`&-warning${e}`]: {
  26361. color: u
  26362. },
  26363. [`&-error${e}`]: {
  26364. color: c
  26365. }
  26366. },
  26367. [`${O}-close`]: {
  26368. position: "absolute",
  26369. top: t.notificationPaddingVertical,
  26370. insetInlineEnd: t.notificationPaddingHorizontal,
  26371. color: t.colorIcon,
  26372. outline: "none",
  26373. width: t.notificationCloseButtonSize,
  26374. height: t.notificationCloseButtonSize,
  26375. borderRadius: t.borderRadiusSM,
  26376. transition: `background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,
  26377. display: "flex",
  26378. alignItems: "center",
  26379. justifyContent: "center",
  26380. "&:hover": {
  26381. color: t.colorIconHover,
  26382. backgroundColor: t.wireframe ? "transparent" : t.colorFillContent
  26383. }
  26384. },
  26385. [`${O}-btn`]: {
  26386. float: "right",
  26387. marginTop: t.marginSM
  26388. }
  26389. }
  26390. },
  26391. // ============================= Pure =============================
  26392. {
  26393. [`${O}-pure-panel`]: {
  26394. margin: 0
  26395. }
  26396. }
  26397. ];
  26398. }, vD = Sn("Notification", (t) => {
  26399. const e = t.paddingMD, n = t.paddingLG, r = Bt(t, {
  26400. // default.less variables
  26401. notificationBg: t.colorBgElevated,
  26402. notificationPaddingVertical: e,
  26403. notificationPaddingHorizontal: n,
  26404. // index.less variables
  26405. notificationPadding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,
  26406. notificationMarginBottom: t.margin,
  26407. notificationMarginEdge: t.marginLG,
  26408. animationMaxHeight: 150,
  26409. notificationIconSize: t.fontSizeLG * t.lineHeightLG,
  26410. notificationCloseButtonSize: t.controlHeightLG * 0.55
  26411. });
  26412. return [Owe(r)];
  26413. }, (t) => ({
  26414. zIndexPopup: t.zIndexPopupBase + 50,
  26415. width: 384
  26416. }));
  26417. function WX(t, e) {
  26418. return e || M("span", {
  26419. class: `${t}-close-x`
  26420. }, [M(al, {
  26421. class: `${t}-close-icon`
  26422. }, null)]);
  26423. }
  26424. M(If, null, null), M(Ou, null, null), M(Da, null, null), M(Su, null, null), M(ts, null, null);
  26425. const Swe = {
  26426. success: Ou,
  26427. info: If,
  26428. error: Da,
  26429. warning: Su
  26430. };
  26431. function QX(t) {
  26432. let {
  26433. prefixCls: e,
  26434. icon: n,
  26435. type: r,
  26436. message: i,
  26437. description: a,
  26438. btn: o
  26439. } = t, s = null;
  26440. if (n)
  26441. s = M("span", {
  26442. class: `${e}-icon`
  26443. }, [Ld(n)]);
  26444. else if (r) {
  26445. const l = Swe[r];
  26446. s = M(l, {
  26447. class: `${e}-icon ${e}-icon-${r}`
  26448. }, null);
  26449. }
  26450. return M("div", {
  26451. class: ye({
  26452. [`${e}-with-icon`]: s
  26453. }),
  26454. role: "alert"
  26455. }, [s, M("div", {
  26456. class: `${e}-message`
  26457. }, [i]), M("div", {
  26458. class: `${e}-description`
  26459. }, [a]), o && M("div", {
  26460. class: `${e}-btn`
  26461. }, [o])]);
  26462. }
  26463. te({
  26464. name: "PurePanel",
  26465. inheritAttrs: !1,
  26466. props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  26467. setup(t) {
  26468. const {
  26469. getPrefixCls: e
  26470. } = It("notification", t), n = L(() => t.prefixCls || e("notification")), r = L(() => `${n.value}-notice`), [, i] = vD(n);
  26471. return () => M(Ox, j(j({}, t), {}, {
  26472. prefixCls: n.value,
  26473. class: ye(i.value, `${r.value}-pure-panel`),
  26474. noticeKey: "pure",
  26475. duration: null,
  26476. closable: t.closable,
  26477. closeIcon: WX(n.value, t.closeIcon)
  26478. }), {
  26479. default: () => [M(QX, {
  26480. prefixCls: r.value,
  26481. icon: t.icon,
  26482. type: t.type,
  26483. message: t.message,
  26484. description: t.description,
  26485. btn: t.btn
  26486. }, null)]
  26487. });
  26488. }
  26489. });
  26490. function HX(t, e, n) {
  26491. let r;
  26492. switch (e = typeof e == "number" ? `${e}px` : e, n = typeof n == "number" ? `${n}px` : n, t) {
  26493. case "top":
  26494. r = {
  26495. left: "50%",
  26496. transform: "translateX(-50%)",
  26497. right: "auto",
  26498. top: e,
  26499. bottom: "auto"
  26500. };
  26501. break;
  26502. case "topLeft":
  26503. r = {
  26504. left: 0,
  26505. top: e,
  26506. bottom: "auto"
  26507. };
  26508. break;
  26509. case "topRight":
  26510. r = {
  26511. right: 0,
  26512. top: e,
  26513. bottom: "auto"
  26514. };
  26515. break;
  26516. case "bottom":
  26517. r = {
  26518. left: "50%",
  26519. transform: "translateX(-50%)",
  26520. right: "auto",
  26521. top: "auto",
  26522. bottom: n
  26523. };
  26524. break;
  26525. case "bottomLeft":
  26526. r = {
  26527. left: 0,
  26528. top: "auto",
  26529. bottom: n
  26530. };
  26531. break;
  26532. default:
  26533. r = {
  26534. right: 0,
  26535. top: "auto",
  26536. bottom: n
  26537. };
  26538. break;
  26539. }
  26540. return r;
  26541. }
  26542. function xwe(t) {
  26543. return {
  26544. name: `${t}-fade`
  26545. };
  26546. }
  26547. var wwe = function(t, e) {
  26548. var n = {};
  26549. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  26550. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  26551. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  26552. return n;
  26553. };
  26554. const q5 = 24, Cwe = 4.5, Twe = te({
  26555. name: "Holder",
  26556. inheritAttrs: !1,
  26557. props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  26558. setup(t, e) {
  26559. let {
  26560. expose: n
  26561. } = e;
  26562. const {
  26563. getPrefixCls: r,
  26564. getPopupContainer: i
  26565. } = It("notification", t), a = L(() => t.prefixCls || r("notification")), o = (d) => {
  26566. var h, p;
  26567. return HX(d, (h = t.top) !== null && h !== void 0 ? h : q5, (p = t.bottom) !== null && p !== void 0 ? p : q5);
  26568. }, [, s] = vD(a), l = () => ye(s.value, {
  26569. [`${a.value}-rtl`]: t.rtl
  26570. }), u = () => xwe(a.value), [c, f] = MX({
  26571. prefixCls: a.value,
  26572. getStyles: o,
  26573. getClassName: l,
  26574. motion: u,
  26575. closable: !0,
  26576. closeIcon: WX(a.value),
  26577. duration: Cwe,
  26578. getContainer: () => {
  26579. var d, h;
  26580. 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;
  26581. },
  26582. maxCount: t.maxCount,
  26583. hashId: s.value,
  26584. onAllRemoved: t.onAllRemoved
  26585. });
  26586. return n(I(I({}, c), {
  26587. prefixCls: a.value,
  26588. hashId: s
  26589. })), f;
  26590. }
  26591. });
  26592. function Pwe(t) {
  26593. const e = ae(null), n = Symbol("notificationHolderKey"), r = (s) => {
  26594. if (!e.value)
  26595. return;
  26596. const {
  26597. open: l,
  26598. prefixCls: u,
  26599. hashId: c
  26600. } = e.value, f = `${u}-notice`, {
  26601. message: d,
  26602. description: h,
  26603. icon: p,
  26604. type: v,
  26605. btn: g,
  26606. class: m
  26607. } = s, y = wwe(s, ["message", "description", "icon", "type", "btn", "class"]);
  26608. return l(I(I({
  26609. placement: "topRight"
  26610. }, y), {
  26611. content: () => M(QX, {
  26612. prefixCls: f,
  26613. icon: typeof p == "function" ? p() : p,
  26614. type: v,
  26615. message: typeof d == "function" ? d() : d,
  26616. description: typeof h == "function" ? h() : h,
  26617. btn: typeof g == "function" ? g() : g
  26618. }, null),
  26619. // @ts-ignore
  26620. class: ye(v && `${f}-${v}`, c, m)
  26621. }));
  26622. }, a = {
  26623. open: r,
  26624. destroy: (s) => {
  26625. var l, u;
  26626. s !== void 0 ? (l = e.value) === null || l === void 0 || l.close(s) : (u = e.value) === null || u === void 0 || u.destroy();
  26627. }
  26628. };
  26629. return ["success", "info", "warning", "error"].forEach((s) => {
  26630. a[s] = (l) => r(I(I({}, l), {
  26631. type: s
  26632. }));
  26633. }), [a, () => M(Twe, j(j({
  26634. key: n
  26635. }, t), {}, {
  26636. ref: e
  26637. }), null)];
  26638. }
  26639. function $we(t) {
  26640. return Pwe(t);
  26641. }
  26642. const _c = {};
  26643. let GX = 4.5, jX = "24px", ZX = "24px", Z2 = "", UX = "topRight", XX = () => document.body, YX = null, U2 = !1, qX;
  26644. function Awe(t) {
  26645. const {
  26646. duration: e,
  26647. placement: n,
  26648. bottom: r,
  26649. top: i,
  26650. getContainer: a,
  26651. closeIcon: o,
  26652. prefixCls: s
  26653. } = t;
  26654. s !== void 0 && (Z2 = s), e !== void 0 && (GX = e), n !== void 0 && (UX = n), r !== void 0 && (ZX = typeof r == "number" ? `${r}px` : r), i !== void 0 && (jX = typeof i == "number" ? `${i}px` : i), a !== void 0 && (XX = a), o !== void 0 && (YX = o), t.rtl !== void 0 && (U2 = t.rtl), t.maxCount !== void 0 && (qX = t.maxCount);
  26655. }
  26656. function Ewe(t, e) {
  26657. let {
  26658. prefixCls: n,
  26659. placement: r = UX,
  26660. getContainer: i = XX,
  26661. top: a,
  26662. bottom: o,
  26663. closeIcon: s = YX,
  26664. appContext: l
  26665. } = t;
  26666. const {
  26667. getPrefixCls: u
  26668. } = Wwe(), c = u("notification", n || Z2), f = `${c}-${r}-${U2}`, d = _c[f];
  26669. if (d) {
  26670. Promise.resolve(d).then((p) => {
  26671. e(p);
  26672. });
  26673. return;
  26674. }
  26675. const h = ye(`${c}-${r}`, {
  26676. [`${c}-rtl`]: U2 === !0
  26677. });
  26678. V1.newInstance({
  26679. name: "notification",
  26680. prefixCls: n || Z2,
  26681. useStyle: vD,
  26682. class: h,
  26683. style: HX(r, a ?? jX, o ?? ZX),
  26684. appContext: l,
  26685. getContainer: i,
  26686. closeIcon: (p) => {
  26687. let {
  26688. prefixCls: v
  26689. } = p;
  26690. return M("span", {
  26691. class: `${v}-close-x`
  26692. }, [Ld(s, {}, M(al, {
  26693. class: `${v}-close-icon`
  26694. }, null))]);
  26695. },
  26696. maxCount: qX,
  26697. hasTransitionName: !0
  26698. }, (p) => {
  26699. _c[f] = p, e(p);
  26700. });
  26701. }
  26702. const Mwe = {
  26703. success: JI,
  26704. info: fx,
  26705. error: tD,
  26706. warning: eD
  26707. };
  26708. function Iwe(t) {
  26709. const {
  26710. icon: e,
  26711. type: n,
  26712. description: r,
  26713. message: i,
  26714. btn: a
  26715. } = t, o = t.duration === void 0 ? GX : t.duration;
  26716. Ewe(t, (s) => {
  26717. s.notice({
  26718. content: (l) => {
  26719. let {
  26720. prefixCls: u
  26721. } = l;
  26722. const c = `${u}-notice`;
  26723. let f = null;
  26724. if (e)
  26725. f = () => M("span", {
  26726. class: `${c}-icon`
  26727. }, [Ld(e)]);
  26728. else if (n) {
  26729. const d = Mwe[n];
  26730. f = () => M(d, {
  26731. class: `${c}-icon ${c}-icon-${n}`
  26732. }, null);
  26733. }
  26734. return M("div", {
  26735. class: f ? `${c}-with-icon` : ""
  26736. }, [f && f(), M("div", {
  26737. class: `${c}-message`
  26738. }, [!r && f ? M("span", {
  26739. class: `${c}-message-single-line-auto-margin`
  26740. }, null) : null, Ld(i)]), M("div", {
  26741. class: `${c}-description`
  26742. }, [Ld(r)]), a ? M("span", {
  26743. class: `${c}-btn`
  26744. }, [Ld(a)]) : null]);
  26745. },
  26746. duration: o,
  26747. closable: !0,
  26748. onClose: t.onClose,
  26749. onClick: t.onClick,
  26750. key: t.key,
  26751. style: t.style || {},
  26752. class: t.class
  26753. });
  26754. });
  26755. }
  26756. const Ah = {
  26757. open: Iwe,
  26758. close(t) {
  26759. Object.keys(_c).forEach((e) => Promise.resolve(_c[e]).then((n) => {
  26760. n.removeNotice(t);
  26761. }));
  26762. },
  26763. config: Awe,
  26764. destroy() {
  26765. Object.keys(_c).forEach((t) => {
  26766. Promise.resolve(_c[t]).then((e) => {
  26767. e.destroy();
  26768. }), delete _c[t];
  26769. });
  26770. }
  26771. }, Dwe = ["success", "info", "warning", "error"];
  26772. Dwe.forEach((t) => {
  26773. Ah[t] = (e) => Ah.open(I(I({}, e), {
  26774. type: t
  26775. }));
  26776. });
  26777. Ah.warn = Ah.warning;
  26778. Ah.useNotification = $we;
  26779. const Rwe = `-ant-${Date.now()}-${Math.random()}`;
  26780. function kwe(t, e) {
  26781. const n = {}, r = (o, s) => {
  26782. let l = o.clone();
  26783. return l = (s == null ? void 0 : s(l)) || l, l.toRgbString();
  26784. }, i = (o, s) => {
  26785. const l = new en(o), u = ff(l.toRgbString());
  26786. 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];
  26787. };
  26788. if (e.primaryColor) {
  26789. i(e.primaryColor, "primary");
  26790. const o = new en(e.primaryColor), s = ff(o.toRgbString());
  26791. s.forEach((u, c) => {
  26792. n[`primary-${c + 1}`] = u;
  26793. }), 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));
  26794. const l = new en(s[0]);
  26795. 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));
  26796. }
  26797. 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"), `
  26798. :root {
  26799. ${Object.keys(n).map((o) => `--${t}-${o}: ${n[o]};`).join(`
  26800. `)}
  26801. }
  26802. `.trim();
  26803. }
  26804. function Lwe(t, e) {
  26805. const n = kwe(t, e);
  26806. wa() ? Yg(n, `${Rwe}-dynamic-theme`) : Xr(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
  26807. }
  26808. const Nwe = (t) => {
  26809. const [e, n] = ap();
  26810. return d2(L(() => ({
  26811. theme: e.value,
  26812. token: n.value,
  26813. hashId: "",
  26814. path: ["ant-design-icons", t.value]
  26815. })), () => [{
  26816. [`.${t.value}`]: I(I({}, ip()), {
  26817. [`.${t.value} .${t.value}-icon`]: {
  26818. display: "block"
  26819. }
  26820. })
  26821. }]);
  26822. };
  26823. function Bwe(t, e) {
  26824. const n = L(() => (t == null ? void 0 : t.value) || {}), r = L(() => n.value.inherit === !1 || !(e != null && e.value) ? Vj : e.value);
  26825. return L(() => {
  26826. if (!(t != null && t.value))
  26827. return e == null ? void 0 : e.value;
  26828. const a = I({}, r.value.components);
  26829. return Object.keys(t.value.components || {}).forEach((o) => {
  26830. a[o] = I(I({}, a[o]), t.value.components[o]);
  26831. }), I(I(I({}, r.value), n.value), {
  26832. token: I(I({}, r.value.token), n.value.token),
  26833. components: a
  26834. });
  26835. });
  26836. }
  26837. var zwe = function(t, e) {
  26838. var n = {};
  26839. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  26840. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  26841. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  26842. return n;
  26843. };
  26844. const Vwe = "ant";
  26845. function Ud() {
  26846. return hr.prefixCls || Vwe;
  26847. }
  26848. function KX() {
  26849. return hr.iconPrefixCls || iI;
  26850. }
  26851. const gD = tn({}), hr = tn({});
  26852. ht(() => {
  26853. I(hr, gD), hr.prefixCls = Ud(), hr.iconPrefixCls = KX(), hr.getPrefixCls = (t, e) => e || (t ? `${hr.prefixCls}-${t}` : hr.prefixCls), hr.getRootPrefixCls = () => hr.prefixCls ? hr.prefixCls : Ud();
  26854. });
  26855. let PC;
  26856. const Fwe = (t) => {
  26857. PC && PC(), PC = ht(() => {
  26858. I(gD, tn(t)), I(hr, tn(t));
  26859. }), t.theme && Lwe(Ud(), t.theme);
  26860. }, Wwe = () => ({
  26861. getPrefixCls: (t, e) => e || (t ? `${Ud()}-${t}` : Ud()),
  26862. getIconPrefixCls: KX,
  26863. getRootPrefixCls: () => hr.prefixCls ? hr.prefixCls : Ud()
  26864. }), Xd = te({
  26865. compatConfig: {
  26866. MODE: 3
  26867. },
  26868. name: "AConfigProvider",
  26869. inheritAttrs: !1,
  26870. props: kue(),
  26871. setup(t, e) {
  26872. let {
  26873. slots: n
  26874. } = e;
  26875. const r = DS(), i = (E, R) => {
  26876. const {
  26877. prefixCls: N = "ant"
  26878. } = t;
  26879. if (R) return R;
  26880. const V = N || r.getPrefixCls("");
  26881. return E ? `${V}-${E}` : V;
  26882. }, a = L(() => t.iconPrefixCls || r.iconPrefixCls.value || iI), o = L(() => a.value !== r.iconPrefixCls.value), s = L(() => {
  26883. var E;
  26884. return t.csp || ((E = r.csp) === null || E === void 0 ? void 0 : E.value);
  26885. }), l = Nwe(a), u = Bwe(L(() => t.theme), L(() => {
  26886. var E;
  26887. return (E = r.theme) === null || E === void 0 ? void 0 : E.value;
  26888. })), c = (E) => (t.renderEmpty || n.renderEmpty || r.renderEmpty || Pfe)(E), f = L(() => {
  26889. var E, R;
  26890. return (E = t.autoInsertSpaceInButton) !== null && E !== void 0 ? E : (R = r.autoInsertSpaceInButton) === null || R === void 0 ? void 0 : R.value;
  26891. }), d = L(() => {
  26892. var E;
  26893. return t.locale || ((E = r.locale) === null || E === void 0 ? void 0 : E.value);
  26894. });
  26895. se(d, () => {
  26896. gD.locale = d.value;
  26897. }, {
  26898. immediate: !0
  26899. });
  26900. const h = L(() => {
  26901. var E;
  26902. return t.direction || ((E = r.direction) === null || E === void 0 ? void 0 : E.value);
  26903. }), p = L(() => {
  26904. var E, R;
  26905. return (E = t.space) !== null && E !== void 0 ? E : (R = r.space) === null || R === void 0 ? void 0 : R.value;
  26906. }), v = L(() => {
  26907. var E, R;
  26908. return (E = t.virtual) !== null && E !== void 0 ? E : (R = r.virtual) === null || R === void 0 ? void 0 : R.value;
  26909. }), g = L(() => {
  26910. var E, R;
  26911. return (E = t.dropdownMatchSelectWidth) !== null && E !== void 0 ? E : (R = r.dropdownMatchSelectWidth) === null || R === void 0 ? void 0 : R.value;
  26912. }), m = L(() => {
  26913. var E;
  26914. return t.getTargetContainer !== void 0 ? t.getTargetContainer : (E = r.getTargetContainer) === null || E === void 0 ? void 0 : E.value;
  26915. }), y = L(() => {
  26916. var E;
  26917. return t.getPopupContainer !== void 0 ? t.getPopupContainer : (E = r.getPopupContainer) === null || E === void 0 ? void 0 : E.value;
  26918. }), b = L(() => {
  26919. var E;
  26920. return t.pageHeader !== void 0 ? t.pageHeader : (E = r.pageHeader) === null || E === void 0 ? void 0 : E.value;
  26921. }), _ = L(() => {
  26922. var E;
  26923. return t.input !== void 0 ? t.input : (E = r.input) === null || E === void 0 ? void 0 : E.value;
  26924. }), O = L(() => {
  26925. var E;
  26926. return t.pagination !== void 0 ? t.pagination : (E = r.pagination) === null || E === void 0 ? void 0 : E.value;
  26927. }), S = L(() => {
  26928. var E;
  26929. return t.form !== void 0 ? t.form : (E = r.form) === null || E === void 0 ? void 0 : E.value;
  26930. }), x = L(() => {
  26931. var E;
  26932. return t.select !== void 0 ? t.select : (E = r.select) === null || E === void 0 ? void 0 : E.value;
  26933. }), C = L(() => t.componentSize), T = L(() => t.componentDisabled), w = L(() => {
  26934. var E, R;
  26935. return (E = t.wave) !== null && E !== void 0 ? E : (R = r.wave) === null || R === void 0 ? void 0 : R.value;
  26936. }), P = {
  26937. csp: s,
  26938. autoInsertSpaceInButton: f,
  26939. locale: d,
  26940. direction: h,
  26941. space: p,
  26942. virtual: v,
  26943. dropdownMatchSelectWidth: g,
  26944. getPrefixCls: i,
  26945. iconPrefixCls: a,
  26946. theme: L(() => {
  26947. var E, R;
  26948. return (E = u.value) !== null && E !== void 0 ? E : (R = r.theme) === null || R === void 0 ? void 0 : R.value;
  26949. }),
  26950. renderEmpty: c,
  26951. getTargetContainer: m,
  26952. getPopupContainer: y,
  26953. pageHeader: b,
  26954. input: _,
  26955. pagination: O,
  26956. form: S,
  26957. select: x,
  26958. componentSize: C,
  26959. componentDisabled: T,
  26960. transformCellText: L(() => t.transformCellText),
  26961. wave: w
  26962. }, $ = L(() => {
  26963. const E = u.value || {}, {
  26964. algorithm: R,
  26965. token: N
  26966. } = E, V = zwe(E, ["algorithm", "token"]), z = R && (!Array.isArray(R) || R.length > 0) ? xj(R) : void 0;
  26967. return I(I({}, V), {
  26968. theme: z,
  26969. token: I(I({}, zS), N)
  26970. });
  26971. }), A = L(() => {
  26972. var E, R;
  26973. let N = {};
  26974. return d.value && (N = ((E = d.value.Form) === null || E === void 0 ? void 0 : E.defaultValidateMessages) || ((R = zs.Form) === null || R === void 0 ? void 0 : R.defaultValidateMessages) || {}), t.form && t.form.validateMessages && (N = I(I({}, N), t.form.validateMessages)), N;
  26975. });
  26976. Lue(P), Due({
  26977. validateMessages: A
  26978. }), Uj(C), cj(T);
  26979. const D = (E) => {
  26980. var R, N;
  26981. 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);
  26982. if (t.theme) {
  26983. const z = /* @__PURE__ */ function() {
  26984. return V;
  26985. }();
  26986. V = M(Sfe, {
  26987. value: $.value
  26988. }, {
  26989. default: () => [z]
  26990. });
  26991. }
  26992. return M(Xxe, {
  26993. locale: d.value || E,
  26994. ANT_MARK__: j2
  26995. }, {
  26996. default: () => [V]
  26997. });
  26998. };
  26999. return ht(() => {
  27000. h.value && ($h.config({
  27001. rtl: h.value === "rtl"
  27002. }), Ah.config({
  27003. rtl: h.value === "rtl"
  27004. }));
  27005. }), () => M(dj, {
  27006. children: (E, R, N) => D(N)
  27007. }, null);
  27008. }
  27009. });
  27010. Xd.config = Fwe;
  27011. Xd.install = function(t) {
  27012. t.component(Xd.name, Xd);
  27013. };
  27014. const Qwe = (t) => {
  27015. const {
  27016. componentCls: e,
  27017. sizePaddingEdgeHorizontal: n,
  27018. colorSplit: r,
  27019. lineWidth: i
  27020. } = t;
  27021. return {
  27022. [e]: I(I({}, nn(t)), {
  27023. borderBlockStart: `${i}px solid ${r}`,
  27024. // vertical
  27025. "&-vertical": {
  27026. position: "relative",
  27027. top: "-0.06em",
  27028. display: "inline-block",
  27029. height: "0.9em",
  27030. margin: `0 ${t.dividerVerticalGutterMargin}px`,
  27031. verticalAlign: "middle",
  27032. borderTop: 0,
  27033. borderInlineStart: `${i}px solid ${r}`
  27034. },
  27035. "&-horizontal": {
  27036. display: "flex",
  27037. clear: "both",
  27038. width: "100%",
  27039. minWidth: "100%",
  27040. margin: `${t.dividerHorizontalGutterMargin}px 0`
  27041. },
  27042. [`&-horizontal${e}-with-text`]: {
  27043. display: "flex",
  27044. alignItems: "center",
  27045. margin: `${t.dividerHorizontalWithTextGutterMargin}px 0`,
  27046. color: t.colorTextHeading,
  27047. fontWeight: 500,
  27048. fontSize: t.fontSizeLG,
  27049. whiteSpace: "nowrap",
  27050. textAlign: "center",
  27051. borderBlockStart: `0 ${r}`,
  27052. "&::before, &::after": {
  27053. position: "relative",
  27054. width: "50%",
  27055. borderBlockStart: `${i}px solid transparent`,
  27056. // Chrome not accept `inherit` in `border-top`
  27057. borderBlockStartColor: "inherit",
  27058. borderBlockEnd: 0,
  27059. transform: "translateY(50%)",
  27060. content: "''"
  27061. }
  27062. },
  27063. [`&-horizontal${e}-with-text-left`]: {
  27064. "&::before": {
  27065. width: "5%"
  27066. },
  27067. "&::after": {
  27068. width: "95%"
  27069. }
  27070. },
  27071. [`&-horizontal${e}-with-text-right`]: {
  27072. "&::before": {
  27073. width: "95%"
  27074. },
  27075. "&::after": {
  27076. width: "5%"
  27077. }
  27078. },
  27079. [`${e}-inner-text`]: {
  27080. display: "inline-block",
  27081. padding: "0 1em"
  27082. },
  27083. "&-dashed": {
  27084. background: "none",
  27085. borderColor: r,
  27086. borderStyle: "dashed",
  27087. borderWidth: `${i}px 0 0`
  27088. },
  27089. [`&-horizontal${e}-with-text${e}-dashed`]: {
  27090. "&::before, &::after": {
  27091. borderStyle: "dashed none none"
  27092. }
  27093. },
  27094. [`&-vertical${e}-dashed`]: {
  27095. borderInlineStartWidth: i,
  27096. borderInlineEnd: 0,
  27097. borderBlockStart: 0,
  27098. borderBlockEnd: 0
  27099. },
  27100. [`&-plain${e}-with-text`]: {
  27101. color: t.colorText,
  27102. fontWeight: "normal",
  27103. fontSize: t.fontSize
  27104. },
  27105. [`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]: {
  27106. "&::before": {
  27107. width: 0
  27108. },
  27109. "&::after": {
  27110. width: "100%"
  27111. },
  27112. [`${e}-inner-text`]: {
  27113. paddingInlineStart: n
  27114. }
  27115. },
  27116. [`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]: {
  27117. "&::before": {
  27118. width: "100%"
  27119. },
  27120. "&::after": {
  27121. width: 0
  27122. },
  27123. [`${e}-inner-text`]: {
  27124. paddingInlineEnd: n
  27125. }
  27126. }
  27127. })
  27128. };
  27129. }, Hwe = Sn("Divider", (t) => {
  27130. const e = Bt(t, {
  27131. dividerVerticalGutterMargin: t.marginXS,
  27132. dividerHorizontalWithTextGutterMargin: t.margin,
  27133. dividerHorizontalGutterMargin: t.marginLG
  27134. });
  27135. return [Qwe(e)];
  27136. }, {
  27137. sizePaddingEdgeHorizontal: 0
  27138. }), Gwe = () => ({
  27139. prefixCls: String,
  27140. type: {
  27141. type: String,
  27142. default: "horizontal"
  27143. },
  27144. dashed: {
  27145. type: Boolean,
  27146. default: !1
  27147. },
  27148. orientation: {
  27149. type: String,
  27150. default: "center"
  27151. },
  27152. plain: {
  27153. type: Boolean,
  27154. default: !1
  27155. },
  27156. orientationMargin: [String, Number]
  27157. }), jwe = te({
  27158. name: "ADivider",
  27159. inheritAttrs: !1,
  27160. compatConfig: {
  27161. MODE: 3
  27162. },
  27163. props: Gwe(),
  27164. setup(t, e) {
  27165. let {
  27166. slots: n,
  27167. attrs: r
  27168. } = e;
  27169. const {
  27170. prefixCls: i,
  27171. direction: a
  27172. } = It("divider", t), [o, s] = Hwe(i), l = L(() => t.orientation === "left" && t.orientationMargin != null), u = L(() => t.orientation === "right" && t.orientationMargin != null), c = L(() => {
  27173. const {
  27174. type: h,
  27175. dashed: p,
  27176. plain: v
  27177. } = t, g = i.value;
  27178. return {
  27179. [g]: !0,
  27180. [s.value]: !!s.value,
  27181. [`${g}-${h}`]: !0,
  27182. [`${g}-dashed`]: !!p,
  27183. [`${g}-plain`]: !!v,
  27184. [`${g}-rtl`]: a.value === "rtl",
  27185. [`${g}-no-default-orientation-margin-left`]: l.value,
  27186. [`${g}-no-default-orientation-margin-right`]: u.value
  27187. };
  27188. }), f = L(() => {
  27189. const h = typeof t.orientationMargin == "number" ? `${t.orientationMargin}px` : t.orientationMargin;
  27190. return I(I({}, l.value && {
  27191. marginLeft: h
  27192. }), u.value && {
  27193. marginRight: h
  27194. });
  27195. }), d = L(() => t.orientation.length > 0 ? "-" + t.orientation : t.orientation);
  27196. return () => {
  27197. var h;
  27198. const p = Yn((h = n.default) === null || h === void 0 ? void 0 : h.call(n));
  27199. return o(M("div", j(j({}, r), {}, {
  27200. class: [c.value, p.length ? `${i.value}-with-text ${i.value}-with-text${d.value}` : "", r.class],
  27201. role: "separator"
  27202. }), [p.length ? M("span", {
  27203. class: `${i.value}-inner-text`,
  27204. style: f.value
  27205. }, [p]) : null]));
  27206. };
  27207. }
  27208. }), Zwe = np(jwe), hg = (t) => t != null && (Array.isArray(t) ? os(t).length : !0);
  27209. function mD(t) {
  27210. return hg(t.prefix) || hg(t.suffix) || hg(t.allowClear);
  27211. }
  27212. function E_(t) {
  27213. return hg(t.addonBefore) || hg(t.addonAfter);
  27214. }
  27215. function X2(t) {
  27216. return typeof t > "u" || t === null ? "" : String(t);
  27217. }
  27218. function pg(t, e, n, r) {
  27219. if (!n)
  27220. return;
  27221. const i = e;
  27222. if (e.type === "click") {
  27223. Object.defineProperty(i, "target", {
  27224. writable: !0
  27225. }), Object.defineProperty(i, "currentTarget", {
  27226. writable: !0
  27227. });
  27228. const a = t.cloneNode(!0);
  27229. i.target = a, i.currentTarget = a, a.value = "", n(i);
  27230. return;
  27231. }
  27232. if (r !== void 0) {
  27233. Object.defineProperty(i, "target", {
  27234. writable: !0
  27235. }), Object.defineProperty(i, "currentTarget", {
  27236. writable: !0
  27237. }), i.target = t, i.currentTarget = t, t.value = r, n(i);
  27238. return;
  27239. }
  27240. n(i);
  27241. }
  27242. function JX(t, e) {
  27243. if (!t) return;
  27244. t.focus(e);
  27245. const {
  27246. cursor: n
  27247. } = e || {};
  27248. if (n) {
  27249. const r = t.value.length;
  27250. switch (n) {
  27251. case "start":
  27252. t.setSelectionRange(0, 0);
  27253. break;
  27254. case "end":
  27255. t.setSelectionRange(r, r);
  27256. break;
  27257. default:
  27258. t.setSelectionRange(0, r);
  27259. }
  27260. }
  27261. }
  27262. const Uwe = () => ({
  27263. addonBefore: Y.any,
  27264. addonAfter: Y.any,
  27265. prefix: Y.any,
  27266. suffix: Y.any,
  27267. clearIcon: Y.any,
  27268. affixWrapperClassName: String,
  27269. groupClassName: String,
  27270. wrapperClassName: String,
  27271. inputClassName: String,
  27272. allowClear: {
  27273. type: Boolean,
  27274. default: void 0
  27275. }
  27276. }), eY = () => I(I({}, Uwe()), {
  27277. value: {
  27278. type: [String, Number, Symbol],
  27279. default: void 0
  27280. },
  27281. defaultValue: {
  27282. type: [String, Number, Symbol],
  27283. default: void 0
  27284. },
  27285. inputElement: Y.any,
  27286. prefixCls: String,
  27287. disabled: {
  27288. type: Boolean,
  27289. default: void 0
  27290. },
  27291. focused: {
  27292. type: Boolean,
  27293. default: void 0
  27294. },
  27295. triggerFocus: Function,
  27296. readonly: {
  27297. type: Boolean,
  27298. default: void 0
  27299. },
  27300. handleReset: Function,
  27301. hidden: {
  27302. type: Boolean,
  27303. default: void 0
  27304. }
  27305. }), tY = () => I(I({}, eY()), {
  27306. id: String,
  27307. placeholder: {
  27308. type: [String, Number]
  27309. },
  27310. autocomplete: String,
  27311. type: hn("text"),
  27312. name: String,
  27313. size: {
  27314. type: String
  27315. },
  27316. autofocus: {
  27317. type: Boolean,
  27318. default: void 0
  27319. },
  27320. lazy: {
  27321. type: Boolean,
  27322. default: !0
  27323. },
  27324. maxlength: Number,
  27325. loading: {
  27326. type: Boolean,
  27327. default: void 0
  27328. },
  27329. bordered: {
  27330. type: Boolean,
  27331. default: void 0
  27332. },
  27333. showCount: {
  27334. type: [Boolean, Object]
  27335. },
  27336. htmlSize: Number,
  27337. onPressEnter: Function,
  27338. onKeydown: Function,
  27339. onKeyup: Function,
  27340. onFocus: Function,
  27341. onBlur: Function,
  27342. onChange: Function,
  27343. onInput: Function,
  27344. "onUpdate:value": Function,
  27345. onCompositionstart: Function,
  27346. onCompositionend: Function,
  27347. valueModifiers: Object,
  27348. hidden: {
  27349. type: Boolean,
  27350. default: void 0
  27351. },
  27352. status: String
  27353. }), Xwe = te({
  27354. name: "BaseInput",
  27355. inheritAttrs: !1,
  27356. props: eY(),
  27357. setup(t, e) {
  27358. let {
  27359. slots: n,
  27360. attrs: r
  27361. } = e;
  27362. const i = U(), a = (s) => {
  27363. var l;
  27364. if (!((l = i.value) === null || l === void 0) && l.contains(s.target)) {
  27365. const {
  27366. triggerFocus: u
  27367. } = t;
  27368. u == null || u();
  27369. }
  27370. }, o = () => {
  27371. var s;
  27372. const {
  27373. allowClear: l,
  27374. value: u,
  27375. disabled: c,
  27376. readonly: f,
  27377. handleReset: d,
  27378. suffix: h = n.suffix,
  27379. prefixCls: p
  27380. } = t;
  27381. if (!l)
  27382. return null;
  27383. const v = !c && !f && u, g = `${p}-clear-icon`, m = ((s = n.clearIcon) === null || s === void 0 ? void 0 : s.call(n)) || "*";
  27384. return M("span", {
  27385. onClick: d,
  27386. onMousedown: (y) => y.preventDefault(),
  27387. class: ye({
  27388. [`${g}-hidden`]: !v,
  27389. [`${g}-has-suffix`]: !!h
  27390. }, g),
  27391. role: "button",
  27392. tabindex: -1
  27393. }, [m]);
  27394. };
  27395. return () => {
  27396. var s, l;
  27397. const {
  27398. focused: u,
  27399. value: c,
  27400. disabled: f,
  27401. allowClear: d,
  27402. readonly: h,
  27403. hidden: p,
  27404. prefixCls: v,
  27405. prefix: g = (s = n.prefix) === null || s === void 0 ? void 0 : s.call(n),
  27406. suffix: m = (l = n.suffix) === null || l === void 0 ? void 0 : l.call(n),
  27407. addonAfter: y = n.addonAfter,
  27408. addonBefore: b = n.addonBefore,
  27409. inputElement: _,
  27410. affixWrapperClassName: O,
  27411. wrapperClassName: S,
  27412. groupClassName: x
  27413. } = t;
  27414. let C = Pn(_, {
  27415. value: c,
  27416. hidden: p
  27417. });
  27418. if (mD({
  27419. prefix: g,
  27420. suffix: m,
  27421. allowClear: d
  27422. })) {
  27423. const T = `${v}-affix-wrapper`, w = ye(T, {
  27424. [`${T}-disabled`]: f,
  27425. [`${T}-focused`]: u,
  27426. [`${T}-readonly`]: h,
  27427. [`${T}-input-with-clear-btn`]: m && d && c
  27428. }, !E_({
  27429. addonAfter: y,
  27430. addonBefore: b
  27431. }) && r.class, O), P = (m || d) && M("span", {
  27432. class: `${v}-suffix`
  27433. }, [o(), m]);
  27434. C = M("span", {
  27435. class: w,
  27436. style: r.style,
  27437. hidden: !E_({
  27438. addonAfter: y,
  27439. addonBefore: b
  27440. }) && p,
  27441. onMousedown: a,
  27442. ref: i
  27443. }, [g && M("span", {
  27444. class: `${v}-prefix`
  27445. }, [g]), Pn(_, {
  27446. style: null,
  27447. value: c,
  27448. hidden: null
  27449. }), P]);
  27450. }
  27451. if (E_({
  27452. addonAfter: y,
  27453. addonBefore: b
  27454. })) {
  27455. const T = `${v}-group`, w = `${T}-addon`, P = ye(`${v}-wrapper`, T, S), $ = ye(`${v}-group-wrapper`, r.class, x);
  27456. return M("span", {
  27457. class: $,
  27458. style: r.style,
  27459. hidden: p
  27460. }, [M("span", {
  27461. class: P
  27462. }, [b && M("span", {
  27463. class: w
  27464. }, [b]), Pn(C, {
  27465. style: null,
  27466. hidden: null
  27467. }), y && M("span", {
  27468. class: w
  27469. }, [y])])]);
  27470. }
  27471. return C;
  27472. };
  27473. }
  27474. });
  27475. var Ywe = function(t, e) {
  27476. var n = {};
  27477. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27478. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27479. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27480. return n;
  27481. };
  27482. const qwe = te({
  27483. name: "VCInput",
  27484. inheritAttrs: !1,
  27485. props: tY(),
  27486. setup(t, e) {
  27487. let {
  27488. slots: n,
  27489. attrs: r,
  27490. expose: i,
  27491. emit: a
  27492. } = e;
  27493. const o = ae(t.value === void 0 ? t.defaultValue : t.value), s = ae(!1), l = ae(), u = ae();
  27494. se(() => t.value, () => {
  27495. o.value = t.value;
  27496. }), se(() => t.disabled, () => {
  27497. t.disabled && (s.value = !1);
  27498. });
  27499. const c = (x) => {
  27500. l.value && JX(l.value.input, x);
  27501. }, f = () => {
  27502. var x;
  27503. (x = l.value.input) === null || x === void 0 || x.blur();
  27504. }, d = (x, C, T) => {
  27505. var w;
  27506. (w = l.value.input) === null || w === void 0 || w.setSelectionRange(x, C, T);
  27507. }, h = () => {
  27508. var x;
  27509. (x = l.value.input) === null || x === void 0 || x.select();
  27510. };
  27511. i({
  27512. focus: c,
  27513. blur: f,
  27514. input: L(() => {
  27515. var x;
  27516. return (x = l.value.input) === null || x === void 0 ? void 0 : x.input;
  27517. }),
  27518. stateValue: o,
  27519. setSelectionRange: d,
  27520. select: h
  27521. });
  27522. const p = (x) => {
  27523. a("change", x);
  27524. }, v = (x, C) => {
  27525. o.value !== x && (t.value === void 0 ? o.value = x : Tt(() => {
  27526. var T;
  27527. l.value.input.value !== o.value && ((T = u.value) === null || T === void 0 || T.$forceUpdate());
  27528. }), Tt(() => {
  27529. C && C();
  27530. }));
  27531. }, g = (x) => {
  27532. const {
  27533. value: C
  27534. } = x.target;
  27535. if (o.value === C) return;
  27536. const T = x.target.value;
  27537. pg(l.value.input, x, p), v(T);
  27538. }, m = (x) => {
  27539. x.keyCode === 13 && a("pressEnter", x), a("keydown", x);
  27540. }, y = (x) => {
  27541. s.value = !0, a("focus", x);
  27542. }, b = (x) => {
  27543. s.value = !1, a("blur", x);
  27544. }, _ = (x) => {
  27545. pg(l.value.input, x, p), v("", () => {
  27546. c();
  27547. });
  27548. }, O = () => {
  27549. var x, C;
  27550. const {
  27551. addonBefore: T = n.addonBefore,
  27552. addonAfter: w = n.addonAfter,
  27553. disabled: P,
  27554. valueModifiers: $ = {},
  27555. htmlSize: A,
  27556. autocomplete: D,
  27557. prefixCls: E,
  27558. inputClassName: R,
  27559. prefix: N = (x = n.prefix) === null || x === void 0 ? void 0 : x.call(n),
  27560. suffix: V = (C = n.suffix) === null || C === void 0 ? void 0 : C.call(n),
  27561. allowClear: z,
  27562. type: W = "text"
  27563. } = t, F = or(t, [
  27564. "prefixCls",
  27565. "onPressEnter",
  27566. "addonBefore",
  27567. "addonAfter",
  27568. "prefix",
  27569. "suffix",
  27570. "allowClear",
  27571. // Input elements must be either controlled or uncontrolled,
  27572. // specify either the value prop, or the defaultValue prop, but not both.
  27573. "defaultValue",
  27574. "size",
  27575. "bordered",
  27576. "htmlSize",
  27577. "lazy",
  27578. "showCount",
  27579. "valueModifiers",
  27580. "showCount",
  27581. "affixWrapperClassName",
  27582. "groupClassName",
  27583. "inputClassName",
  27584. "wrapperClassName"
  27585. ]), Q = I(I(I({}, F), r), {
  27586. autocomplete: D,
  27587. onChange: g,
  27588. onInput: g,
  27589. onFocus: y,
  27590. onBlur: b,
  27591. onKeydown: m,
  27592. class: ye(E, {
  27593. [`${E}-disabled`]: P
  27594. }, R, !E_({
  27595. addonAfter: w,
  27596. addonBefore: T
  27597. }) && !mD({
  27598. prefix: N,
  27599. suffix: V,
  27600. allowClear: z
  27601. }) && r.class),
  27602. ref: l,
  27603. key: "ant-input",
  27604. size: A,
  27605. type: W,
  27606. lazy: t.lazy
  27607. });
  27608. return $.lazy && delete Q.onInput, Q.autofocus || delete Q.autofocus, M(TI, or(Q, ["size"]), null);
  27609. }, S = () => {
  27610. var x;
  27611. const {
  27612. maxlength: C,
  27613. suffix: T = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n),
  27614. showCount: w,
  27615. prefixCls: P
  27616. } = t, $ = Number(C) > 0;
  27617. if (T || w) {
  27618. const A = [...X2(o.value)].length, D = typeof w == "object" ? w.formatter({
  27619. count: A,
  27620. maxlength: C
  27621. }) : `${A}${$ ? ` / ${C}` : ""}`;
  27622. return M(wt, null, [!!w && M("span", {
  27623. class: ye(`${P}-show-count-suffix`, {
  27624. [`${P}-show-count-has-suffix`]: !!T
  27625. })
  27626. }, [D]), T]);
  27627. }
  27628. return null;
  27629. };
  27630. return it(() => {
  27631. process.env.NODE_ENV === "test" && t.autofocus && c();
  27632. }), () => {
  27633. const {
  27634. prefixCls: x,
  27635. disabled: C
  27636. } = t, T = Ywe(t, ["prefixCls", "disabled"]);
  27637. return M(Xwe, j(j(j({}, T), r), {}, {
  27638. ref: u,
  27639. prefixCls: x,
  27640. inputElement: O(),
  27641. handleReset: _,
  27642. value: X2(o.value),
  27643. focused: s.value,
  27644. triggerFocus: c,
  27645. suffix: S(),
  27646. disabled: C
  27647. }), n);
  27648. };
  27649. }
  27650. }), Sx = () => or(tY(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), nY = () => I(I({}, or(Sx(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  27651. rows: Number,
  27652. autosize: {
  27653. type: [Boolean, Object],
  27654. default: void 0
  27655. },
  27656. autoSize: {
  27657. type: [Boolean, Object],
  27658. default: void 0
  27659. },
  27660. onResize: {
  27661. type: Function
  27662. },
  27663. onCompositionstart: g1(),
  27664. onCompositionend: g1(),
  27665. valueModifiers: Object
  27666. });
  27667. var Kwe = function(t, e) {
  27668. var n = {};
  27669. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27670. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27671. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27672. return n;
  27673. };
  27674. const Hn = te({
  27675. compatConfig: {
  27676. MODE: 3
  27677. },
  27678. name: "AInput",
  27679. inheritAttrs: !1,
  27680. props: Sx(),
  27681. setup(t, e) {
  27682. let {
  27683. slots: n,
  27684. attrs: r,
  27685. expose: i,
  27686. emit: a
  27687. } = e;
  27688. const o = U(), s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), {
  27689. direction: c,
  27690. prefixCls: f,
  27691. size: d,
  27692. autocomplete: h
  27693. } = It("input", t), {
  27694. compactSize: p,
  27695. compactItemClassnames: v
  27696. } = sx(f, c), g = L(() => p.value || d.value), [m, y] = lD(f), b = Ko();
  27697. i({
  27698. focus: (A) => {
  27699. var D;
  27700. (D = o.value) === null || D === void 0 || D.focus(A);
  27701. },
  27702. blur: () => {
  27703. var A;
  27704. (A = o.value) === null || A === void 0 || A.blur();
  27705. },
  27706. input: o,
  27707. setSelectionRange: (A, D, E) => {
  27708. var R;
  27709. (R = o.value) === null || R === void 0 || R.setSelectionRange(A, D, E);
  27710. },
  27711. select: () => {
  27712. var A;
  27713. (A = o.value) === null || A === void 0 || A.select();
  27714. }
  27715. });
  27716. const C = U([]), T = () => {
  27717. C.value.push(setTimeout(() => {
  27718. var A, D, E, R;
  27719. !((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"));
  27720. }));
  27721. };
  27722. it(() => {
  27723. T();
  27724. }), G9(() => {
  27725. C.value.forEach((A) => clearTimeout(A));
  27726. }), yt(() => {
  27727. C.value.forEach((A) => clearTimeout(A));
  27728. });
  27729. const w = (A) => {
  27730. T(), a("blur", A), s.onFieldBlur();
  27731. }, P = (A) => {
  27732. T(), a("focus", A);
  27733. }, $ = (A) => {
  27734. a("update:value", A.target.value), a("change", A), a("input", A), s.onFieldChange();
  27735. };
  27736. return () => {
  27737. var A, D, E, R, N, V;
  27738. const {
  27739. hasFeedback: z,
  27740. feedbackIcon: W
  27741. } = l, {
  27742. allowClear: F,
  27743. bordered: Q = !0,
  27744. prefix: Z = (A = n.prefix) === null || A === void 0 ? void 0 : A.call(n),
  27745. suffix: ne = (D = n.suffix) === null || D === void 0 ? void 0 : D.call(n),
  27746. addonAfter: ee = (E = n.addonAfter) === null || E === void 0 ? void 0 : E.call(n),
  27747. addonBefore: oe = (R = n.addonBefore) === null || R === void 0 ? void 0 : R.call(n),
  27748. id: K = (N = s.id) === null || N === void 0 ? void 0 : N.value
  27749. } = t, ie = Kwe(t, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), X = (z || ne) && M(wt, null, [ne, z && W]), H = f.value, G = mD({
  27750. prefix: Z,
  27751. suffix: ne
  27752. }) || !!z, re = n.clearIcon || (() => M(Da, null, null));
  27753. return m(M(qwe, j(j(j({}, r), or(ie, ["onUpdate:value", "onChange", "onInput"])), {}, {
  27754. onChange: $,
  27755. id: K,
  27756. disabled: (V = t.disabled) !== null && V !== void 0 ? V : b.value,
  27757. ref: o,
  27758. prefixCls: H,
  27759. autocomplete: h.value,
  27760. onBlur: w,
  27761. onFocus: P,
  27762. prefix: Z,
  27763. suffix: X,
  27764. allowClear: F,
  27765. addonAfter: ee && M(E1, null, {
  27766. default: () => [M(P1, null, {
  27767. default: () => [ee]
  27768. })]
  27769. }),
  27770. addonBefore: oe && M(E1, null, {
  27771. default: () => [M(P1, null, {
  27772. default: () => [oe]
  27773. })]
  27774. }),
  27775. class: [r.class, v.value],
  27776. inputClassName: ye({
  27777. [`${H}-sm`]: g.value === "small",
  27778. [`${H}-lg`]: g.value === "large",
  27779. [`${H}-rtl`]: c.value === "rtl",
  27780. [`${H}-borderless`]: !Q
  27781. }, !G && Is(H, u.value), y.value),
  27782. affixWrapperClassName: ye({
  27783. [`${H}-affix-wrapper-sm`]: g.value === "small",
  27784. [`${H}-affix-wrapper-lg`]: g.value === "large",
  27785. [`${H}-affix-wrapper-rtl`]: c.value === "rtl",
  27786. [`${H}-affix-wrapper-borderless`]: !Q
  27787. }, Is(`${H}-affix-wrapper`, u.value, z), y.value),
  27788. wrapperClassName: ye({
  27789. [`${H}-group-rtl`]: c.value === "rtl"
  27790. }, y.value),
  27791. groupClassName: ye({
  27792. [`${H}-group-wrapper-sm`]: g.value === "small",
  27793. [`${H}-group-wrapper-lg`]: g.value === "large",
  27794. [`${H}-group-wrapper-rtl`]: c.value === "rtl"
  27795. }, Is(`${H}-group-wrapper`, u.value, z), y.value)
  27796. }), I(I({}, n), {
  27797. clearIcon: re
  27798. })));
  27799. };
  27800. }
  27801. }), Jwe = te({
  27802. compatConfig: {
  27803. MODE: 3
  27804. },
  27805. name: "AInputGroup",
  27806. inheritAttrs: !1,
  27807. props: {
  27808. prefixCls: String,
  27809. size: {
  27810. type: String
  27811. },
  27812. compact: {
  27813. type: Boolean,
  27814. default: void 0
  27815. }
  27816. },
  27817. setup(t, e) {
  27818. let {
  27819. slots: n,
  27820. attrs: r
  27821. } = e;
  27822. const {
  27823. prefixCls: i,
  27824. direction: a,
  27825. getPrefixCls: o
  27826. } = It("input-group", t), s = ro.useInject();
  27827. ro.useProvide(s, {
  27828. isFormItemInput: !1
  27829. });
  27830. const l = L(() => o("input")), [u, c] = lD(l), f = L(() => {
  27831. const d = i.value;
  27832. return {
  27833. [`${d}`]: !0,
  27834. [c.value]: !0,
  27835. [`${d}-lg`]: t.size === "large",
  27836. [`${d}-sm`]: t.size === "small",
  27837. [`${d}-compact`]: t.compact,
  27838. [`${d}-rtl`]: a.value === "rtl"
  27839. };
  27840. });
  27841. return () => {
  27842. var d;
  27843. return u(M("span", j(j({}, r), {}, {
  27844. class: ye(f.value, r.class)
  27845. }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
  27846. };
  27847. }
  27848. });
  27849. var eCe = function(t, e) {
  27850. var n = {};
  27851. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27852. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27853. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27854. return n;
  27855. };
  27856. const tCe = te({
  27857. compatConfig: {
  27858. MODE: 3
  27859. },
  27860. name: "AInputSearch",
  27861. inheritAttrs: !1,
  27862. props: I(I({}, Sx()), {
  27863. inputPrefixCls: String,
  27864. // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
  27865. enterButton: Y.any,
  27866. onSearch: {
  27867. type: Function
  27868. }
  27869. }),
  27870. setup(t, e) {
  27871. let {
  27872. slots: n,
  27873. attrs: r,
  27874. expose: i,
  27875. emit: a
  27876. } = e;
  27877. const o = ae(), s = ae(!1);
  27878. i({
  27879. focus: () => {
  27880. var O;
  27881. (O = o.value) === null || O === void 0 || O.focus();
  27882. },
  27883. blur: () => {
  27884. var O;
  27885. (O = o.value) === null || O === void 0 || O.blur();
  27886. }
  27887. });
  27888. const c = (O) => {
  27889. a("update:value", O.target.value), O && O.target && O.type === "click" && a("search", O.target.value, O), a("change", O);
  27890. }, f = (O) => {
  27891. var S;
  27892. document.activeElement === ((S = o.value) === null || S === void 0 ? void 0 : S.input) && O.preventDefault();
  27893. }, d = (O) => {
  27894. var S, x;
  27895. a("search", (x = (S = o.value) === null || S === void 0 ? void 0 : S.input) === null || x === void 0 ? void 0 : x.stateValue, O);
  27896. }, h = (O) => {
  27897. s.value || t.loading || d(O);
  27898. }, p = (O) => {
  27899. s.value = !0, a("compositionstart", O);
  27900. }, v = (O) => {
  27901. s.value = !1, a("compositionend", O);
  27902. }, {
  27903. prefixCls: g,
  27904. getPrefixCls: m,
  27905. direction: y,
  27906. size: b
  27907. } = It("input-search", t), _ = L(() => m("input", t.inputPrefixCls));
  27908. return () => {
  27909. var O, S, x, C;
  27910. const {
  27911. disabled: T,
  27912. loading: w,
  27913. addonAfter: P = (O = n.addonAfter) === null || O === void 0 ? void 0 : O.call(n),
  27914. suffix: $ = (S = n.suffix) === null || S === void 0 ? void 0 : S.call(n)
  27915. } = t, A = eCe(t, ["disabled", "loading", "addonAfter", "suffix"]);
  27916. let {
  27917. enterButton: D = (C = (x = n.enterButton) === null || x === void 0 ? void 0 : x.call(n)) !== null && C !== void 0 ? C : !1
  27918. } = t;
  27919. D = D || D === "";
  27920. const E = typeof D == "boolean" ? M(nx, null, null) : null, R = `${g.value}-button`, N = Array.isArray(D) ? D[0] : D;
  27921. let V;
  27922. const z = N.type && jI(N.type) && N.type.__ANT_BUTTON;
  27923. if (z || N.tagName === "button")
  27924. V = Pn(N, I({
  27925. onMousedown: f,
  27926. onClick: d,
  27927. key: "enterButton"
  27928. }, z ? {
  27929. class: R,
  27930. size: b.value
  27931. } : {}), !1);
  27932. else {
  27933. const F = E && !D;
  27934. V = M(Ur, {
  27935. class: R,
  27936. type: D ? "primary" : void 0,
  27937. size: b.value,
  27938. disabled: T,
  27939. key: "enterButton",
  27940. onMousedown: f,
  27941. onClick: d,
  27942. loading: w,
  27943. icon: F ? E : null
  27944. }, {
  27945. default: () => [F ? null : E || D]
  27946. });
  27947. }
  27948. P && (V = [V, P]);
  27949. const W = ye(g.value, {
  27950. [`${g.value}-rtl`]: y.value === "rtl",
  27951. [`${g.value}-${b.value}`]: !!b.value,
  27952. [`${g.value}-with-button`]: !!D
  27953. }, r.class);
  27954. return M(Hn, j(j(j({
  27955. ref: o
  27956. }, or(A, ["onUpdate:value", "onSearch", "enterButton"])), r), {}, {
  27957. onPressEnter: h,
  27958. onCompositionstart: p,
  27959. onCompositionend: v,
  27960. size: b.value,
  27961. prefixCls: _.value,
  27962. addonAfter: V,
  27963. suffix: $,
  27964. onChange: c,
  27965. class: W,
  27966. disabled: T
  27967. }), n);
  27968. };
  27969. }
  27970. }), K5 = (t) => t != null && (Array.isArray(t) ? os(t).length : !0);
  27971. function nCe(t) {
  27972. return K5(t.addonBefore) || K5(t.addonAfter);
  27973. }
  27974. const rCe = ["text", "input"], iCe = te({
  27975. compatConfig: {
  27976. MODE: 3
  27977. },
  27978. name: "ClearableLabeledInput",
  27979. inheritAttrs: !1,
  27980. props: {
  27981. prefixCls: String,
  27982. inputType: Y.oneOf(ru("text", "input")),
  27983. value: fa(),
  27984. defaultValue: fa(),
  27985. allowClear: {
  27986. type: Boolean,
  27987. default: void 0
  27988. },
  27989. element: fa(),
  27990. handleReset: Function,
  27991. disabled: {
  27992. type: Boolean,
  27993. default: void 0
  27994. },
  27995. direction: {
  27996. type: String
  27997. },
  27998. size: {
  27999. type: String
  28000. },
  28001. suffix: fa(),
  28002. prefix: fa(),
  28003. addonBefore: fa(),
  28004. addonAfter: fa(),
  28005. readonly: {
  28006. type: Boolean,
  28007. default: void 0
  28008. },
  28009. focused: {
  28010. type: Boolean,
  28011. default: void 0
  28012. },
  28013. bordered: {
  28014. type: Boolean,
  28015. default: !0
  28016. },
  28017. triggerFocus: {
  28018. type: Function
  28019. },
  28020. hidden: Boolean,
  28021. status: String,
  28022. hashId: String
  28023. },
  28024. setup(t, e) {
  28025. let {
  28026. slots: n,
  28027. attrs: r
  28028. } = e;
  28029. const i = ro.useInject(), a = (s) => {
  28030. const {
  28031. value: l,
  28032. disabled: u,
  28033. readonly: c,
  28034. handleReset: f,
  28035. suffix: d = n.suffix
  28036. } = t, h = !u && !c && l, p = `${s}-clear-icon`;
  28037. return M(Da, {
  28038. onClick: f,
  28039. onMousedown: (v) => v.preventDefault(),
  28040. class: ye({
  28041. [`${p}-hidden`]: !h,
  28042. [`${p}-has-suffix`]: !!d
  28043. }, p),
  28044. role: "button"
  28045. }, null);
  28046. }, o = (s, l) => {
  28047. const {
  28048. value: u,
  28049. allowClear: c,
  28050. direction: f,
  28051. bordered: d,
  28052. hidden: h,
  28053. status: p,
  28054. addonAfter: v = n.addonAfter,
  28055. addonBefore: g = n.addonBefore,
  28056. hashId: m
  28057. } = t, {
  28058. status: y,
  28059. hasFeedback: b
  28060. } = i;
  28061. if (!c)
  28062. return Pn(l, {
  28063. value: u,
  28064. disabled: t.disabled
  28065. });
  28066. const _ = ye(`${s}-affix-wrapper`, `${s}-affix-wrapper-textarea-with-clear-btn`, Is(`${s}-affix-wrapper`, m0(y, p), b), {
  28067. [`${s}-affix-wrapper-rtl`]: f === "rtl",
  28068. [`${s}-affix-wrapper-borderless`]: !d,
  28069. // className will go to addon wrapper
  28070. [`${r.class}`]: !nCe({
  28071. addonAfter: v,
  28072. addonBefore: g
  28073. }) && r.class
  28074. }, m);
  28075. return M("span", {
  28076. class: _,
  28077. style: r.style,
  28078. hidden: h
  28079. }, [Pn(l, {
  28080. style: null,
  28081. value: u,
  28082. disabled: t.disabled
  28083. }), a(s)]);
  28084. };
  28085. return () => {
  28086. var s;
  28087. const {
  28088. prefixCls: l,
  28089. inputType: u,
  28090. element: c = (s = n.element) === null || s === void 0 ? void 0 : s.call(n)
  28091. } = t;
  28092. return u === rCe[0] ? o(l, c) : null;
  28093. };
  28094. }
  28095. }), aCe = `
  28096. min-height:0 !important;
  28097. max-height:none !important;
  28098. height:0 !important;
  28099. visibility:hidden !important;
  28100. overflow:hidden !important;
  28101. position:absolute !important;
  28102. z-index:-1000 !important;
  28103. top:0 !important;
  28104. right:0 !important;
  28105. pointer-events: none !important;
  28106. `, oCe = ["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"], $C = {};
  28107. let Ji;
  28108. function sCe(t) {
  28109. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  28110. const n = t.getAttribute("id") || t.getAttribute("data-reactid") || t.getAttribute("name");
  28111. if (e && $C[n])
  28112. return $C[n];
  28113. 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 = {
  28114. sizingStyle: oCe.map((u) => `${u}:${r.getPropertyValue(u)}`).join(";"),
  28115. paddingSize: a,
  28116. borderSize: o,
  28117. boxSizing: i
  28118. };
  28119. return e && n && ($C[n] = l), l;
  28120. }
  28121. function lCe(t) {
  28122. 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;
  28123. Ji || (Ji = document.createElement("textarea"), Ji.setAttribute("tab-index", "-1"), Ji.setAttribute("aria-hidden", "true"), document.body.appendChild(Ji)), t.getAttribute("wrap") ? Ji.setAttribute("wrap", t.getAttribute("wrap")) : Ji.removeAttribute("wrap");
  28124. const {
  28125. paddingSize: i,
  28126. borderSize: a,
  28127. boxSizing: o,
  28128. sizingStyle: s
  28129. } = sCe(t, e);
  28130. Ji.setAttribute("style", `${s};${aCe}`), Ji.value = t.value || t.placeholder || "";
  28131. let l, u, c, f = Ji.scrollHeight;
  28132. if (o === "border-box" ? f += a : o === "content-box" && (f -= i), n !== null || r !== null) {
  28133. Ji.value = " ";
  28134. const h = Ji.scrollHeight - i;
  28135. 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));
  28136. }
  28137. const d = {
  28138. height: `${f}px`,
  28139. overflowY: c,
  28140. resize: "none"
  28141. };
  28142. return l && (d.minHeight = `${l}px`), u && (d.maxHeight = `${u}px`), d;
  28143. }
  28144. const AC = 0, EC = 1, MC = 2, uCe = te({
  28145. compatConfig: {
  28146. MODE: 3
  28147. },
  28148. name: "ResizableTextArea",
  28149. inheritAttrs: !1,
  28150. props: nY(),
  28151. setup(t, e) {
  28152. let {
  28153. attrs: n,
  28154. emit: r,
  28155. expose: i
  28156. } = e, a, o;
  28157. const s = U(), l = U({}), u = U(MC);
  28158. yt(() => {
  28159. xt.cancel(a), xt.cancel(o);
  28160. });
  28161. const c = () => {
  28162. try {
  28163. if (s.value && document.activeElement === s.value.input) {
  28164. const S = s.value.getSelectionStart(), x = s.value.getSelectionEnd(), C = s.value.getScrollTop();
  28165. s.value.setSelectionRange(S, x), s.value.setScrollTop(C);
  28166. }
  28167. } catch {
  28168. }
  28169. }, f = U(), d = U();
  28170. ht(() => {
  28171. const S = t.autoSize || t.autosize;
  28172. S ? (f.value = S.minRows, d.value = S.maxRows) : (f.value = void 0, d.value = void 0);
  28173. });
  28174. const h = L(() => !!(t.autoSize || t.autosize)), p = () => {
  28175. u.value = AC;
  28176. };
  28177. se([() => t.value, f, d, h], () => {
  28178. h.value && p();
  28179. }, {
  28180. immediate: !0
  28181. });
  28182. const v = U();
  28183. se([u, s], () => {
  28184. if (s.value)
  28185. if (u.value === AC)
  28186. u.value = EC;
  28187. else if (u.value === EC) {
  28188. const S = lCe(s.value.input, !1, f.value, d.value);
  28189. u.value = MC, v.value = S;
  28190. } else
  28191. c();
  28192. }, {
  28193. immediate: !0,
  28194. flush: "post"
  28195. });
  28196. const g = vn(), m = U(), y = () => {
  28197. xt.cancel(m.value);
  28198. }, b = (S) => {
  28199. u.value === MC && (r("resize", S), h.value && (y(), m.value = xt(() => {
  28200. p();
  28201. })));
  28202. };
  28203. yt(() => {
  28204. y();
  28205. }), i({
  28206. resizeTextarea: () => {
  28207. p();
  28208. },
  28209. textArea: L(() => {
  28210. var S;
  28211. return (S = s.value) === null || S === void 0 ? void 0 : S.input;
  28212. }),
  28213. instance: g
  28214. }), Xr(t.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
  28215. const O = () => {
  28216. const {
  28217. prefixCls: S,
  28218. disabled: x
  28219. } = t, C = or(t, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), T = ye(S, n.class, {
  28220. [`${S}-disabled`]: x
  28221. }), w = h.value ? v.value : null, P = [n.style, l.value, w], $ = I(I(I({}, C), n), {
  28222. style: P,
  28223. class: T
  28224. });
  28225. return (u.value === AC || u.value === EC) && P.push({
  28226. overflowX: "hidden",
  28227. overflowY: "hidden"
  28228. }), $.autofocus || delete $.autofocus, $.rows === 0 && delete $.rows, M(ph, {
  28229. onResize: b,
  28230. disabled: !h.value
  28231. }, {
  28232. default: () => [M(TI, j(j({}, $), {}, {
  28233. ref: s,
  28234. tag: "textarea"
  28235. }), null)]
  28236. });
  28237. };
  28238. return () => O();
  28239. }
  28240. });
  28241. function rY(t, e) {
  28242. return [...t || ""].slice(0, e).join("");
  28243. }
  28244. function J5(t, e, n, r) {
  28245. let i = n;
  28246. return t ? i = rY(n, r) : [...e || ""].length < n.length && [...n || ""].length > r && (i = e), i;
  28247. }
  28248. const cCe = te({
  28249. compatConfig: {
  28250. MODE: 3
  28251. },
  28252. name: "ATextarea",
  28253. inheritAttrs: !1,
  28254. props: nY(),
  28255. setup(t, e) {
  28256. let {
  28257. attrs: n,
  28258. expose: r,
  28259. emit: i
  28260. } = e;
  28261. var a;
  28262. const o = ss(), s = ro.useInject(), l = L(() => m0(s.status, t.status)), u = ae((a = t.value) !== null && a !== void 0 ? a : t.defaultValue), c = ae(), f = ae(""), {
  28263. prefixCls: d,
  28264. size: h,
  28265. direction: p
  28266. } = It("input", t), [v, g] = lD(d), m = Ko(), y = L(() => t.showCount === "" || t.showCount || !1), b = L(() => Number(t.maxlength) > 0), _ = ae(!1), O = ae(), S = ae(0), x = (z) => {
  28267. _.value = !0, O.value = f.value, S.value = z.currentTarget.selectionStart, i("compositionstart", z);
  28268. }, C = (z) => {
  28269. var W;
  28270. _.value = !1;
  28271. let F = z.currentTarget.value;
  28272. if (b.value) {
  28273. const Q = S.value >= t.maxlength + 1 || S.value === ((W = O.value) === null || W === void 0 ? void 0 : W.length);
  28274. F = J5(Q, O.value, F, t.maxlength);
  28275. }
  28276. F !== f.value && ($(F), pg(z.currentTarget, z, E, F)), i("compositionend", z);
  28277. }, T = vn();
  28278. se(() => t.value, () => {
  28279. var z;
  28280. "value" in T.vnode.props, u.value = (z = t.value) !== null && z !== void 0 ? z : "";
  28281. });
  28282. const w = (z) => {
  28283. var W;
  28284. JX((W = c.value) === null || W === void 0 ? void 0 : W.textArea, z);
  28285. }, P = () => {
  28286. var z, W;
  28287. (W = (z = c.value) === null || z === void 0 ? void 0 : z.textArea) === null || W === void 0 || W.blur();
  28288. }, $ = (z, W) => {
  28289. u.value !== z && (t.value === void 0 ? u.value = z : Tt(() => {
  28290. var F, Q, Z;
  28291. 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));
  28292. }), Tt(() => {
  28293. W && W();
  28294. }));
  28295. }, A = (z) => {
  28296. z.keyCode === 13 && i("pressEnter", z), i("keydown", z);
  28297. }, D = (z) => {
  28298. const {
  28299. onBlur: W
  28300. } = t;
  28301. W == null || W(z), o.onFieldBlur();
  28302. }, E = (z) => {
  28303. i("update:value", z.target.value), i("change", z), i("input", z), o.onFieldChange();
  28304. }, R = (z) => {
  28305. pg(c.value.textArea, z, E), $("", () => {
  28306. w();
  28307. });
  28308. }, N = (z) => {
  28309. let W = z.target.value;
  28310. if (u.value !== W) {
  28311. if (b.value) {
  28312. const F = z.target, Q = F.selectionStart >= t.maxlength + 1 || F.selectionStart === W.length || !F.selectionStart;
  28313. W = J5(Q, f.value, W, t.maxlength);
  28314. }
  28315. pg(z.currentTarget, z, E, W), $(W);
  28316. }
  28317. }, V = () => {
  28318. var z, W;
  28319. const {
  28320. class: F
  28321. } = n, {
  28322. bordered: Q = !0
  28323. } = t, Z = I(I(I({}, or(t, ["allowClear"])), n), {
  28324. class: [{
  28325. [`${d.value}-borderless`]: !Q,
  28326. [`${F}`]: F && !y.value,
  28327. [`${d.value}-sm`]: h.value === "small",
  28328. [`${d.value}-lg`]: h.value === "large"
  28329. }, Is(d.value, l.value), g.value],
  28330. disabled: m.value,
  28331. showCount: null,
  28332. prefixCls: d.value,
  28333. onInput: N,
  28334. onChange: N,
  28335. onBlur: D,
  28336. onKeydown: A,
  28337. onCompositionstart: x,
  28338. onCompositionend: C
  28339. });
  28340. return !((z = t.valueModifiers) === null || z === void 0) && z.lazy && delete Z.onInput, M(uCe, j(j({}, Z), {}, {
  28341. id: (W = Z == null ? void 0 : Z.id) !== null && W !== void 0 ? W : o.id.value,
  28342. ref: c,
  28343. maxlength: t.maxlength,
  28344. lazy: t.lazy
  28345. }), null);
  28346. };
  28347. return r({
  28348. focus: w,
  28349. blur: P,
  28350. resizableTextArea: c
  28351. }), ht(() => {
  28352. let z = X2(u.value);
  28353. !_.value && b.value && (t.value === null || t.value === void 0) && (z = rY(z, t.maxlength)), f.value = z;
  28354. }), () => {
  28355. var z;
  28356. const {
  28357. maxlength: W,
  28358. bordered: F = !0,
  28359. hidden: Q
  28360. } = t, {
  28361. style: Z,
  28362. class: ne
  28363. } = n, ee = I(I(I({}, t), n), {
  28364. prefixCls: d.value,
  28365. inputType: "text",
  28366. handleReset: R,
  28367. direction: p.value,
  28368. bordered: F,
  28369. style: y.value ? void 0 : Z,
  28370. hashId: g.value,
  28371. disabled: (z = t.disabled) !== null && z !== void 0 ? z : m.value
  28372. });
  28373. let oe = M(iCe, j(j({}, ee), {}, {
  28374. value: f.value,
  28375. status: t.status
  28376. }), {
  28377. element: V
  28378. });
  28379. if (y.value || s.hasFeedback) {
  28380. const K = [...f.value].length;
  28381. let ie = "";
  28382. typeof y.value == "object" ? ie = y.value.formatter({
  28383. value: f.value,
  28384. count: K,
  28385. maxlength: W
  28386. }) : ie = `${K}${b.value ? ` / ${W}` : ""}`, oe = M("div", {
  28387. hidden: Q,
  28388. class: ye(`${d.value}-textarea`, {
  28389. [`${d.value}-textarea-rtl`]: p.value === "rtl",
  28390. [`${d.value}-textarea-show-count`]: y.value,
  28391. [`${d.value}-textarea-in-form-item`]: s.isFormItemInput
  28392. }, `${d.value}-textarea-show-count`, ne, g.value),
  28393. style: Z,
  28394. "data-count": typeof ie != "object" ? ie : void 0
  28395. }, [oe, s.hasFeedback && M("span", {
  28396. class: `${d.value}-textarea-suffix`
  28397. }, [s.feedbackIcon])]);
  28398. }
  28399. return v(oe);
  28400. };
  28401. }
  28402. });
  28403. var fCe = { 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" };
  28404. function e3(t) {
  28405. for (var e = 1; e < arguments.length; e++) {
  28406. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  28407. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  28408. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  28409. }))), r.forEach(function(i) {
  28410. dCe(t, i, n[i]);
  28411. });
  28412. }
  28413. return t;
  28414. }
  28415. function dCe(t, e, n) {
  28416. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  28417. }
  28418. var xx = function(e, n) {
  28419. var r = e3({}, e, n.attrs);
  28420. return M(lt, e3({}, r, {
  28421. icon: fCe
  28422. }), null);
  28423. };
  28424. xx.displayName = "EyeOutlined";
  28425. xx.inheritAttrs = !1;
  28426. var hCe = { 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" };
  28427. function t3(t) {
  28428. for (var e = 1; e < arguments.length; e++) {
  28429. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  28430. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  28431. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  28432. }))), r.forEach(function(i) {
  28433. pCe(t, i, n[i]);
  28434. });
  28435. }
  28436. return t;
  28437. }
  28438. function pCe(t, e, n) {
  28439. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  28440. }
  28441. var yD = function(e, n) {
  28442. var r = t3({}, e, n.attrs);
  28443. return M(lt, t3({}, r, {
  28444. icon: hCe
  28445. }), null);
  28446. };
  28447. yD.displayName = "EyeInvisibleOutlined";
  28448. yD.inheritAttrs = !1;
  28449. var vCe = function(t, e) {
  28450. var n = {};
  28451. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  28452. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  28453. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  28454. return n;
  28455. };
  28456. const gCe = {
  28457. click: "onClick",
  28458. hover: "onMouseover"
  28459. }, mCe = (t) => t ? M(xx, null, null) : M(yD, null, null), yCe = te({
  28460. compatConfig: {
  28461. MODE: 3
  28462. },
  28463. name: "AInputPassword",
  28464. inheritAttrs: !1,
  28465. props: I(I({}, Sx()), {
  28466. prefixCls: String,
  28467. inputPrefixCls: String,
  28468. action: {
  28469. type: String,
  28470. default: "click"
  28471. },
  28472. visibilityToggle: {
  28473. type: Boolean,
  28474. default: !0
  28475. },
  28476. visible: {
  28477. type: Boolean,
  28478. default: void 0
  28479. },
  28480. "onUpdate:visible": Function,
  28481. iconRender: Function
  28482. }),
  28483. setup(t, e) {
  28484. let {
  28485. slots: n,
  28486. attrs: r,
  28487. expose: i,
  28488. emit: a
  28489. } = e;
  28490. const o = ae(!1), s = () => {
  28491. const {
  28492. disabled: g
  28493. } = t;
  28494. g || (o.value = !o.value, a("update:visible", o.value));
  28495. };
  28496. ht(() => {
  28497. t.visible !== void 0 && (o.value = !!t.visible);
  28498. });
  28499. const l = ae();
  28500. i({
  28501. focus: () => {
  28502. var g;
  28503. (g = l.value) === null || g === void 0 || g.focus();
  28504. },
  28505. blur: () => {
  28506. var g;
  28507. (g = l.value) === null || g === void 0 || g.blur();
  28508. }
  28509. });
  28510. const f = (g) => {
  28511. const {
  28512. action: m,
  28513. iconRender: y = n.iconRender || mCe
  28514. } = t, b = gCe[m] || "", _ = y(o.value), O = {
  28515. [b]: s,
  28516. class: `${g}-icon`,
  28517. key: "passwordIcon",
  28518. onMousedown: (S) => {
  28519. S.preventDefault();
  28520. },
  28521. onMouseup: (S) => {
  28522. S.preventDefault();
  28523. }
  28524. };
  28525. return Pn(Ui(_) ? _ : M("span", null, [_]), O);
  28526. }, {
  28527. prefixCls: d,
  28528. getPrefixCls: h
  28529. } = It("input-password", t), p = L(() => h("input", t.inputPrefixCls)), v = () => {
  28530. const {
  28531. size: g,
  28532. visibilityToggle: m
  28533. } = t, y = vCe(t, ["size", "visibilityToggle"]), b = m && f(d.value), _ = ye(d.value, r.class, {
  28534. [`${d.value}-${g}`]: !!g
  28535. }), O = I(I(I({}, or(y, ["suffix", "iconRender", "action"])), r), {
  28536. type: o.value ? "text" : "password",
  28537. class: _,
  28538. prefixCls: p.value,
  28539. suffix: b
  28540. });
  28541. return g && (O.size = g), M(Hn, j({
  28542. ref: l
  28543. }, O), n);
  28544. };
  28545. return () => v();
  28546. }
  28547. });
  28548. Hn.Group = Jwe;
  28549. Hn.Search = tCe;
  28550. Hn.TextArea = cCe;
  28551. Hn.Password = yCe;
  28552. Hn.install = function(t) {
  28553. 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;
  28554. };
  28555. function Cx() {
  28556. return {
  28557. keyboard: {
  28558. type: Boolean,
  28559. default: void 0
  28560. },
  28561. mask: {
  28562. type: Boolean,
  28563. default: void 0
  28564. },
  28565. afterClose: Function,
  28566. closable: {
  28567. type: Boolean,
  28568. default: void 0
  28569. },
  28570. maskClosable: {
  28571. type: Boolean,
  28572. default: void 0
  28573. },
  28574. visible: {
  28575. type: Boolean,
  28576. default: void 0
  28577. },
  28578. destroyOnClose: {
  28579. type: Boolean,
  28580. default: void 0
  28581. },
  28582. mousePosition: Y.shape({
  28583. x: Number,
  28584. y: Number
  28585. }).loose,
  28586. title: Y.any,
  28587. footer: Y.any,
  28588. transitionName: String,
  28589. maskTransitionName: String,
  28590. animation: Y.any,
  28591. maskAnimation: Y.any,
  28592. wrapStyle: {
  28593. type: Object,
  28594. default: void 0
  28595. },
  28596. bodyStyle: {
  28597. type: Object,
  28598. default: void 0
  28599. },
  28600. maskStyle: {
  28601. type: Object,
  28602. default: void 0
  28603. },
  28604. prefixCls: String,
  28605. wrapClassName: String,
  28606. rootClassName: String,
  28607. width: [String, Number],
  28608. height: [String, Number],
  28609. zIndex: Number,
  28610. bodyProps: Y.any,
  28611. maskProps: Y.any,
  28612. wrapProps: Y.any,
  28613. getContainer: Y.any,
  28614. dialogStyle: {
  28615. type: Object,
  28616. default: void 0
  28617. },
  28618. dialogClass: String,
  28619. closeIcon: Y.any,
  28620. forceRender: {
  28621. type: Boolean,
  28622. default: void 0
  28623. },
  28624. getOpenCount: Function,
  28625. // https://github.com/ant-design/ant-design/issues/19771
  28626. // https://github.com/react-component/dialog/issues/95
  28627. focusTriggerAfterClose: {
  28628. type: Boolean,
  28629. default: void 0
  28630. },
  28631. onClose: Function,
  28632. modalRender: Function
  28633. };
  28634. }
  28635. function n3(t, e, n) {
  28636. let r = e;
  28637. return !r && n && (r = `${t}-${n}`), r;
  28638. }
  28639. let r3 = -1;
  28640. function bCe() {
  28641. return r3 += 1, r3;
  28642. }
  28643. function i3(t, e) {
  28644. let n = t[`page${e ? "Y" : "X"}Offset`];
  28645. const r = `scroll${e ? "Top" : "Left"}`;
  28646. if (typeof n != "number") {
  28647. const i = t.document;
  28648. n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  28649. }
  28650. return n;
  28651. }
  28652. function _Ce(t) {
  28653. const e = t.getBoundingClientRect(), n = {
  28654. left: e.left,
  28655. top: e.top
  28656. }, r = t.ownerDocument, i = r.defaultView || r.parentWindow;
  28657. return n.left += i3(i), n.top += i3(i, !0), n;
  28658. }
  28659. const a3 = {
  28660. width: 0,
  28661. height: 0,
  28662. overflow: "hidden",
  28663. outline: "none"
  28664. }, OCe = te({
  28665. compatConfig: {
  28666. MODE: 3
  28667. },
  28668. name: "DialogContent",
  28669. inheritAttrs: !1,
  28670. props: I(I({}, Cx()), {
  28671. motionName: String,
  28672. ariaId: String,
  28673. onVisibleChanged: Function,
  28674. onMousedown: Function,
  28675. onMouseup: Function
  28676. }),
  28677. setup(t, e) {
  28678. let {
  28679. expose: n,
  28680. slots: r,
  28681. attrs: i
  28682. } = e;
  28683. const a = U(), o = U(), s = U();
  28684. n({
  28685. focus: () => {
  28686. var d;
  28687. (d = a.value) === null || d === void 0 || d.focus();
  28688. },
  28689. changeActive: (d) => {
  28690. const {
  28691. activeElement: h
  28692. } = document;
  28693. d && h === o.value ? a.value.focus() : !d && h === a.value && o.value.focus();
  28694. }
  28695. });
  28696. const l = U(), u = L(() => {
  28697. const {
  28698. width: d,
  28699. height: h
  28700. } = t, p = {};
  28701. 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;
  28702. }), c = () => {
  28703. Tt(() => {
  28704. if (s.value) {
  28705. const d = _Ce(s.value);
  28706. l.value = t.mousePosition ? `${t.mousePosition.x - d.left}px ${t.mousePosition.y - d.top}px` : "";
  28707. }
  28708. });
  28709. }, f = (d) => {
  28710. t.onVisibleChanged(d);
  28711. };
  28712. return () => {
  28713. var d, h, p, v;
  28714. const {
  28715. prefixCls: g,
  28716. footer: m = (d = r.footer) === null || d === void 0 ? void 0 : d.call(r),
  28717. title: y = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
  28718. ariaId: b,
  28719. closable: _,
  28720. closeIcon: O = (p = r.closeIcon) === null || p === void 0 ? void 0 : p.call(r),
  28721. onClose: S,
  28722. bodyStyle: x,
  28723. bodyProps: C,
  28724. onMousedown: T,
  28725. onMouseup: w,
  28726. visible: P,
  28727. modalRender: $ = r.modalRender,
  28728. destroyOnClose: A,
  28729. motionName: D
  28730. } = t;
  28731. let E;
  28732. m && (E = M("div", {
  28733. class: `${g}-footer`
  28734. }, [m]));
  28735. let R;
  28736. y && (R = M("div", {
  28737. class: `${g}-header`
  28738. }, [M("div", {
  28739. class: `${g}-title`,
  28740. id: b
  28741. }, [y])]));
  28742. let N;
  28743. _ && (N = M("button", {
  28744. type: "button",
  28745. onClick: S,
  28746. "aria-label": "Close",
  28747. class: `${g}-close`
  28748. }, [O || M("span", {
  28749. class: `${g}-close-x`
  28750. }, null)]));
  28751. const V = M("div", {
  28752. class: `${g}-content`
  28753. }, [N, R, M("div", j({
  28754. class: `${g}-body`,
  28755. style: x
  28756. }, C), [(v = r.default) === null || v === void 0 ? void 0 : v.call(r)]), E]), z = g0(D);
  28757. return M(co, j(j({}, z), {}, {
  28758. onBeforeEnter: c,
  28759. onAfterEnter: () => f(!0),
  28760. onAfterLeave: () => f(!1)
  28761. }), {
  28762. default: () => [P || !A ? bi(M("div", j(j({}, i), {}, {
  28763. ref: s,
  28764. key: "dialog-element",
  28765. role: "document",
  28766. style: [u.value, i.style],
  28767. class: [g, i.class],
  28768. onMousedown: T,
  28769. onMouseup: w
  28770. }), [M("div", {
  28771. tabindex: 0,
  28772. ref: a,
  28773. style: a3,
  28774. "aria-hidden": "true"
  28775. }, null), $ ? $({
  28776. originVNode: V
  28777. }) : V, M("div", {
  28778. tabindex: 0,
  28779. ref: o,
  28780. style: a3,
  28781. "aria-hidden": "true"
  28782. }, null)]), [[Bs, P]]) : null]
  28783. });
  28784. };
  28785. }
  28786. }), SCe = te({
  28787. compatConfig: {
  28788. MODE: 3
  28789. },
  28790. name: "DialogMask",
  28791. props: {
  28792. prefixCls: String,
  28793. visible: Boolean,
  28794. motionName: String,
  28795. maskProps: Object
  28796. },
  28797. setup(t, e) {
  28798. return () => {
  28799. const {
  28800. prefixCls: n,
  28801. visible: r,
  28802. maskProps: i,
  28803. motionName: a
  28804. } = t, o = g0(a);
  28805. return M(co, o, {
  28806. default: () => [bi(M("div", j({
  28807. class: `${n}-mask`
  28808. }, i), null), [[Bs, r]])]
  28809. });
  28810. };
  28811. }
  28812. }), o3 = te({
  28813. compatConfig: {
  28814. MODE: 3
  28815. },
  28816. name: "VcDialog",
  28817. inheritAttrs: !1,
  28818. props: sr(I(I({}, Cx()), {
  28819. getOpenCount: Function,
  28820. scrollLocker: Object
  28821. }), {
  28822. mask: !0,
  28823. visible: !1,
  28824. keyboard: !0,
  28825. closable: !0,
  28826. maskClosable: !0,
  28827. destroyOnClose: !1,
  28828. prefixCls: "rc-dialog",
  28829. getOpenCount: () => null,
  28830. focusTriggerAfterClose: !0
  28831. }),
  28832. setup(t, e) {
  28833. let {
  28834. attrs: n,
  28835. slots: r
  28836. } = e;
  28837. const i = ae(), a = ae(), o = ae(), s = ae(t.visible), l = ae(`vcDialogTitle${bCe()}`), u = (m) => {
  28838. var y, b;
  28839. if (m)
  28840. $l(a.value, document.activeElement) || (i.value = document.activeElement, (y = o.value) === null || y === void 0 || y.focus());
  28841. else {
  28842. const _ = s.value;
  28843. if (s.value = !1, t.mask && i.value && t.focusTriggerAfterClose) {
  28844. try {
  28845. i.value.focus({
  28846. preventScroll: !0
  28847. });
  28848. } catch {
  28849. }
  28850. i.value = null;
  28851. }
  28852. _ && ((b = t.afterClose) === null || b === void 0 || b.call(t));
  28853. }
  28854. }, c = (m) => {
  28855. var y;
  28856. (y = t.onClose) === null || y === void 0 || y.call(t, m);
  28857. }, f = ae(!1), d = ae(), h = () => {
  28858. clearTimeout(d.value), f.value = !0;
  28859. }, p = () => {
  28860. d.value = setTimeout(() => {
  28861. f.value = !1;
  28862. });
  28863. }, v = (m) => {
  28864. if (!t.maskClosable) return null;
  28865. f.value ? f.value = !1 : a.value === m.target && c(m);
  28866. }, g = (m) => {
  28867. if (t.keyboard && m.keyCode === ge.ESC) {
  28868. m.stopPropagation(), c(m);
  28869. return;
  28870. }
  28871. t.visible && m.keyCode === ge.TAB && o.value.changeActive(!m.shiftKey);
  28872. };
  28873. return se(() => t.visible, () => {
  28874. t.visible && (s.value = !0);
  28875. }, {
  28876. flush: "post"
  28877. }), yt(() => {
  28878. var m;
  28879. clearTimeout(d.value), (m = t.scrollLocker) === null || m === void 0 || m.unLock();
  28880. }), ht(() => {
  28881. var m, y;
  28882. (m = t.scrollLocker) === null || m === void 0 || m.unLock(), s.value && ((y = t.scrollLocker) === null || y === void 0 || y.lock());
  28883. }), () => {
  28884. const {
  28885. prefixCls: m,
  28886. mask: y,
  28887. visible: b,
  28888. maskTransitionName: _,
  28889. maskAnimation: O,
  28890. zIndex: S,
  28891. wrapClassName: x,
  28892. rootClassName: C,
  28893. wrapStyle: T,
  28894. closable: w,
  28895. maskProps: P,
  28896. maskStyle: $,
  28897. transitionName: A,
  28898. animation: D,
  28899. wrapProps: E,
  28900. title: R = r.title
  28901. } = t, {
  28902. style: N,
  28903. class: V
  28904. } = n;
  28905. return M("div", j({
  28906. class: [`${m}-root`, C]
  28907. }, JS(t, {
  28908. data: !0
  28909. })), [M(SCe, {
  28910. prefixCls: m,
  28911. visible: y && b,
  28912. motionName: n3(m, _, O),
  28913. style: I({
  28914. zIndex: S
  28915. }, $),
  28916. maskProps: P
  28917. }, null), M("div", j({
  28918. tabIndex: -1,
  28919. onKeydown: g,
  28920. class: ye(`${m}-wrap`, x),
  28921. ref: a,
  28922. onClick: v,
  28923. role: "dialog",
  28924. "aria-labelledby": R ? l.value : null,
  28925. style: I(I({
  28926. zIndex: S
  28927. }, T), {
  28928. display: s.value ? null : "none"
  28929. })
  28930. }, E), [M(OCe, j(j({}, or(t, ["scrollLocker"])), {}, {
  28931. style: N,
  28932. class: V,
  28933. onMousedown: h,
  28934. onMouseup: p,
  28935. ref: o,
  28936. closable: w,
  28937. ariaId: l.value,
  28938. prefixCls: m,
  28939. visible: b,
  28940. onClose: c,
  28941. onVisibleChanged: u,
  28942. motionName: n3(m, A, D)
  28943. }), r)])]);
  28944. };
  28945. }
  28946. }), xCe = Cx(), iY = te({
  28947. compatConfig: {
  28948. MODE: 3
  28949. },
  28950. name: "DialogWrap",
  28951. inheritAttrs: !1,
  28952. props: sr(xCe, {
  28953. visible: !1
  28954. }),
  28955. setup(t, e) {
  28956. let {
  28957. attrs: n,
  28958. slots: r
  28959. } = e;
  28960. const i = U(t.visible);
  28961. return CI({}, {
  28962. inTriggerContext: !1
  28963. }), se(() => t.visible, () => {
  28964. t.visible && (i.value = !0);
  28965. }, {
  28966. flush: "post"
  28967. }), () => {
  28968. const {
  28969. visible: a,
  28970. getContainer: o,
  28971. forceRender: s,
  28972. destroyOnClose: l = !1,
  28973. afterClose: u
  28974. } = t;
  28975. let c = I(I(I({}, t), n), {
  28976. ref: "_component",
  28977. key: "dialog"
  28978. });
  28979. return o === !1 ? M(o3, j(j({}, c), {}, {
  28980. getOpenCount: () => 2
  28981. }), r) : !s && l && !i.value ? null : M(EZ, {
  28982. autoLock: !0,
  28983. visible: a,
  28984. forceRender: s,
  28985. getContainer: o
  28986. }, {
  28987. default: (f) => (c = I(I(I({}, c), f), {
  28988. afterClose: () => {
  28989. u == null || u(), i.value = !1;
  28990. }
  28991. }), M(o3, c, r))
  28992. });
  28993. };
  28994. }
  28995. });
  28996. function wCe(t) {
  28997. const e = U(null), n = tn(I({}, t)), r = U([]), i = (a) => {
  28998. e.value === null && (r.value = [], e.value = xt(() => {
  28999. let o;
  29000. r.value.forEach((s) => {
  29001. o = I(I({}, o), s);
  29002. }), I(n, o), e.value = null;
  29003. })), r.value.push(a);
  29004. };
  29005. return it(() => {
  29006. e.value && xt.cancel(e.value);
  29007. }), [n, i];
  29008. }
  29009. function s3(t, e, n, r) {
  29010. const i = e + n, a = (n - r) / 2;
  29011. if (n > r) {
  29012. if (e > 0)
  29013. return {
  29014. [t]: a
  29015. };
  29016. if (e < 0 && i < r)
  29017. return {
  29018. [t]: -a
  29019. };
  29020. } else if (e < 0 || i > r)
  29021. return {
  29022. [t]: e < 0 ? a : -a
  29023. };
  29024. return {};
  29025. }
  29026. function CCe(t, e, n, r) {
  29027. const {
  29028. width: i,
  29029. height: a
  29030. } = Eve();
  29031. let o = null;
  29032. return t <= i && e <= a ? o = {
  29033. x: 0,
  29034. y: 0
  29035. } : (t > i || e > a) && (o = I(I({}, s3("x", n, t, i)), s3("y", r, e, a))), o;
  29036. }
  29037. var TCe = function(t, e) {
  29038. var n = {};
  29039. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  29040. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  29041. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  29042. return n;
  29043. };
  29044. const l3 = Symbol("previewGroupContext"), bD = {
  29045. provide: (t) => {
  29046. pt(l3, t);
  29047. },
  29048. inject: () => Ge(l3, {
  29049. isPreviewGroup: ae(!1),
  29050. previewUrls: L(() => /* @__PURE__ */ new Map()),
  29051. setPreviewUrls: () => {
  29052. },
  29053. current: U(null),
  29054. setCurrent: () => {
  29055. },
  29056. setShowPreview: () => {
  29057. },
  29058. setMousePosition: () => {
  29059. },
  29060. registerImage: null,
  29061. rootClassName: ""
  29062. })
  29063. }, PCe = () => ({
  29064. previewPrefixCls: String,
  29065. preview: {
  29066. type: [Boolean, Object],
  29067. default: !0
  29068. },
  29069. icons: {
  29070. type: Object,
  29071. default: () => ({})
  29072. }
  29073. }), $Ce = te({
  29074. compatConfig: {
  29075. MODE: 3
  29076. },
  29077. name: "PreviewGroup",
  29078. inheritAttrs: !1,
  29079. props: PCe(),
  29080. setup(t, e) {
  29081. let {
  29082. slots: n
  29083. } = e;
  29084. const r = L(() => {
  29085. const O = {
  29086. visible: void 0,
  29087. onVisibleChange: () => {
  29088. },
  29089. getContainer: void 0,
  29090. current: 0
  29091. };
  29092. return typeof t.preview == "object" ? lY(t.preview, O) : O;
  29093. }), i = tn(/* @__PURE__ */ new Map()), a = U(), o = L(() => r.value.visible), s = L(() => r.value.getContainer), l = (O, S) => {
  29094. var x, C;
  29095. (C = (x = r.value).onVisibleChange) === null || C === void 0 || C.call(x, O, S);
  29096. }, [u, c] = wh(!!o.value, {
  29097. value: o,
  29098. onChange: l
  29099. }), 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) => {
  29100. let [, {
  29101. canPreview: S
  29102. }] = O;
  29103. return !!S;
  29104. }).map((O) => {
  29105. let [S, {
  29106. url: x
  29107. }] = O;
  29108. return [S, x];
  29109. }))), g = function(O, S) {
  29110. let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  29111. i.set(O, {
  29112. url: S,
  29113. canPreview: x
  29114. });
  29115. }, m = (O) => {
  29116. a.value = O;
  29117. }, y = (O) => {
  29118. f.value = O;
  29119. }, b = function(O, S) {
  29120. let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  29121. const C = () => {
  29122. i.delete(O);
  29123. };
  29124. return i.set(O, {
  29125. url: S,
  29126. canPreview: x
  29127. }), C;
  29128. }, _ = (O) => {
  29129. O == null || O.stopPropagation(), c(!1), y(null);
  29130. };
  29131. return se(p, (O) => {
  29132. m(O);
  29133. }, {
  29134. immediate: !0,
  29135. flush: "post"
  29136. }), ht(() => {
  29137. u.value && d.value && m(p.value);
  29138. }, {
  29139. flush: "post"
  29140. }), bD.provide({
  29141. isPreviewGroup: ae(!0),
  29142. previewUrls: v,
  29143. setPreviewUrls: g,
  29144. current: a,
  29145. setCurrent: m,
  29146. setShowPreview: c,
  29147. setMousePosition: y,
  29148. registerImage: b
  29149. }), () => {
  29150. const O = TCe(r.value, []);
  29151. return M(wt, null, [n.default && n.default(), M(oY, j(j({}, O), {}, {
  29152. "ria-hidden": !u.value,
  29153. visible: u.value,
  29154. prefixCls: t.previewPrefixCls,
  29155. onClose: _,
  29156. mousePosition: f.value,
  29157. src: v.value.get(a.value),
  29158. icons: t.icons,
  29159. getContainer: s.value
  29160. }), null)]);
  29161. };
  29162. }
  29163. }), aY = $Ce, ku = {
  29164. x: 0,
  29165. y: 0
  29166. }, ACe = I(I({}, Cx()), {
  29167. src: String,
  29168. alt: String,
  29169. rootClassName: String,
  29170. icons: {
  29171. type: Object,
  29172. default: () => ({})
  29173. }
  29174. }), oY = te({
  29175. compatConfig: {
  29176. MODE: 3
  29177. },
  29178. name: "Preview",
  29179. inheritAttrs: !1,
  29180. props: ACe,
  29181. emits: ["close", "afterClose"],
  29182. setup(t, e) {
  29183. let {
  29184. emit: n,
  29185. attrs: r
  29186. } = e;
  29187. const {
  29188. rotateLeft: i,
  29189. rotateRight: a,
  29190. zoomIn: o,
  29191. zoomOut: s,
  29192. close: l,
  29193. left: u,
  29194. right: c,
  29195. flipX: f,
  29196. flipY: d
  29197. } = tn(t.icons), h = ae(1), p = ae(0), v = tn({
  29198. x: 1,
  29199. y: 1
  29200. }), [g, m] = wCe(ku), y = () => n("close"), b = ae(), _ = tn({
  29201. originX: 0,
  29202. originY: 0,
  29203. deltaX: 0,
  29204. deltaY: 0
  29205. }), O = ae(!1), S = bD.inject(), {
  29206. previewUrls: x,
  29207. current: C,
  29208. isPreviewGroup: T,
  29209. setCurrent: w
  29210. } = 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({
  29211. wheelDirection: 0
  29212. }), N = () => {
  29213. h.value = 1, p.value = 0, v.x = 1, v.y = 1, m(ku), n("afterClose");
  29214. }, V = (Se) => {
  29215. Se ? h.value += 0.5 : h.value++, m(ku);
  29216. }, z = (Se) => {
  29217. h.value > 1 && (Se ? h.value -= 0.5 : h.value--), m(ku);
  29218. }, W = () => {
  29219. p.value += 90;
  29220. }, F = () => {
  29221. p.value -= 90;
  29222. }, Q = () => {
  29223. v.x = -v.x;
  29224. }, Z = () => {
  29225. v.y = -v.y;
  29226. }, ne = (Se) => {
  29227. Se.preventDefault(), Se.stopPropagation(), A.value > 0 && w($.value[A.value - 1]);
  29228. }, ee = (Se) => {
  29229. Se.preventDefault(), Se.stopPropagation(), A.value < P.value - 1 && w($.value[A.value + 1]);
  29230. }, oe = ye({
  29231. [`${t.prefixCls}-moving`]: O.value
  29232. }), K = `${t.prefixCls}-operations-operation`, ie = `${t.prefixCls}-operations-icon`, X = [{
  29233. icon: l,
  29234. onClick: y,
  29235. type: "close"
  29236. }, {
  29237. icon: o,
  29238. onClick: () => V(),
  29239. type: "zoomIn"
  29240. }, {
  29241. icon: s,
  29242. onClick: () => z(),
  29243. type: "zoomOut",
  29244. disabled: L(() => h.value === 1)
  29245. }, {
  29246. icon: a,
  29247. onClick: W,
  29248. type: "rotateRight"
  29249. }, {
  29250. icon: i,
  29251. onClick: F,
  29252. type: "rotateLeft"
  29253. }, {
  29254. icon: f,
  29255. onClick: Q,
  29256. type: "flipX"
  29257. }, {
  29258. icon: d,
  29259. onClick: Z,
  29260. type: "flipY"
  29261. }], H = () => {
  29262. if (t.visible && O.value) {
  29263. const Se = b.value.offsetWidth * h.value, be = b.value.offsetHeight * h.value, {
  29264. left: he,
  29265. top: Te
  29266. } = MZ(b.value), ze = p.value % 180 !== 0;
  29267. O.value = !1;
  29268. const ut = CCe(ze ? be : Se, ze ? Se : be, he, Te);
  29269. ut && m(I({}, ut));
  29270. }
  29271. }, G = (Se) => {
  29272. 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);
  29273. }, re = (Se) => {
  29274. t.visible && O.value && m({
  29275. x: Se.pageX - _.deltaX,
  29276. y: Se.pageY - _.deltaY
  29277. });
  29278. }, fe = (Se) => {
  29279. if (!t.visible) return;
  29280. Se.preventDefault();
  29281. const be = Se.deltaY;
  29282. R.value = {
  29283. wheelDirection: be
  29284. };
  29285. }, de = (Se) => {
  29286. !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]));
  29287. }, Ee = () => {
  29288. t.visible && (h.value !== 1 && (h.value = 1), (g.x !== ku.x || g.y !== ku.y) && m(ku));
  29289. };
  29290. let $e = () => {
  29291. };
  29292. return it(() => {
  29293. se([() => t.visible, O], () => {
  29294. $e();
  29295. let Se, be;
  29296. const he = vr(window, "mouseup", H, !1), Te = vr(window, "mousemove", re, !1), ze = vr(window, "wheel", fe, {
  29297. passive: !1
  29298. }), ut = vr(window, "keydown", de, !1);
  29299. try {
  29300. window.top !== window.self && (Se = vr(window.top, "mouseup", H, !1), be = vr(window.top, "mousemove", re, !1));
  29301. } catch (ct) {
  29302. cf(!1, `[vc-image] ${ct}`);
  29303. }
  29304. $e = () => {
  29305. he.remove(), Te.remove(), ze.remove(), ut.remove(), Se && Se.remove(), be && be.remove();
  29306. };
  29307. }, {
  29308. flush: "post",
  29309. immediate: !0
  29310. }), se([R], () => {
  29311. const {
  29312. wheelDirection: Se
  29313. } = R.value;
  29314. Se > 0 ? z(!0) : Se < 0 && V(!0);
  29315. });
  29316. }), nl(() => {
  29317. $e();
  29318. }), () => {
  29319. const {
  29320. visible: Se,
  29321. prefixCls: be,
  29322. rootClassName: he
  29323. } = t;
  29324. return M(iY, j(j({}, r), {}, {
  29325. transitionName: t.transitionName,
  29326. maskTransitionName: t.maskTransitionName,
  29327. closable: !1,
  29328. keyboard: !0,
  29329. prefixCls: be,
  29330. onClose: y,
  29331. afterClose: N,
  29332. visible: Se,
  29333. wrapClassName: oe,
  29334. rootClassName: he,
  29335. getContainer: t.getContainer
  29336. }), {
  29337. default: () => [M("div", {
  29338. class: [`${t.prefixCls}-operations-wrapper`, he]
  29339. }, [M("ul", {
  29340. class: `${t.prefixCls}-operations`
  29341. }, [X.map((Te) => {
  29342. let {
  29343. icon: ze,
  29344. onClick: ut,
  29345. type: ct,
  29346. disabled: Dt
  29347. } = Te;
  29348. return M("li", {
  29349. class: ye(K, {
  29350. [`${t.prefixCls}-operations-operation-disabled`]: Dt && (Dt == null ? void 0 : Dt.value)
  29351. }),
  29352. onClick: ut,
  29353. key: ct
  29354. }, [Ns(ze, {
  29355. class: ie
  29356. })]);
  29357. })])]), M("div", {
  29358. class: `${t.prefixCls}-img-wrapper`,
  29359. style: {
  29360. transform: `translate3d(${g.x}px, ${g.y}px, 0)`
  29361. }
  29362. }, [M("img", {
  29363. onMousedown: G,
  29364. onDblclick: Ee,
  29365. ref: b,
  29366. class: `${t.prefixCls}-img`,
  29367. src: D.value,
  29368. alt: t.alt,
  29369. style: {
  29370. transform: `scale3d(${v.x * h.value}, ${v.y * h.value}, 1) rotate(${p.value}deg)`
  29371. }
  29372. }, null)]), E.value && M("div", {
  29373. class: ye(`${t.prefixCls}-switch-left`, {
  29374. [`${t.prefixCls}-switch-left-disabled`]: A.value <= 0
  29375. }),
  29376. onClick: ne
  29377. }, [u]), E.value && M("div", {
  29378. class: ye(`${t.prefixCls}-switch-right`, {
  29379. [`${t.prefixCls}-switch-right-disabled`]: A.value >= P.value - 1
  29380. }),
  29381. onClick: ee
  29382. }, [c])]
  29383. });
  29384. };
  29385. }
  29386. });
  29387. var ECe = function(t, e) {
  29388. var n = {};
  29389. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  29390. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  29391. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  29392. return n;
  29393. };
  29394. const sY = () => ({
  29395. src: String,
  29396. wrapperClassName: String,
  29397. wrapperStyle: {
  29398. type: Object,
  29399. default: void 0
  29400. },
  29401. rootClassName: String,
  29402. prefixCls: String,
  29403. previewPrefixCls: String,
  29404. previewMask: {
  29405. type: [Boolean, Function],
  29406. default: void 0
  29407. },
  29408. placeholder: Y.any,
  29409. fallback: String,
  29410. preview: {
  29411. type: [Boolean, Object],
  29412. default: !0
  29413. },
  29414. onClick: {
  29415. type: Function
  29416. },
  29417. onError: {
  29418. type: Function
  29419. }
  29420. }), lY = (t, e) => {
  29421. const n = I({}, t);
  29422. return Object.keys(e).forEach((r) => {
  29423. t[r] === void 0 && (n[r] = e[r]);
  29424. }), n;
  29425. };
  29426. let MCe = 0;
  29427. const uY = te({
  29428. compatConfig: {
  29429. MODE: 3
  29430. },
  29431. name: "VcImage",
  29432. inheritAttrs: !1,
  29433. props: sY(),
  29434. emits: ["click", "error"],
  29435. setup(t, e) {
  29436. let {
  29437. attrs: n,
  29438. slots: r,
  29439. emit: i
  29440. } = e;
  29441. const a = L(() => t.prefixCls), o = L(() => `${a.value}-preview`), s = L(() => {
  29442. const V = {
  29443. visible: void 0,
  29444. onVisibleChange: () => {
  29445. },
  29446. getContainer: void 0
  29447. };
  29448. return typeof t.preview == "object" ? lY(t.preview, V) : V;
  29449. }), l = L(() => {
  29450. var V;
  29451. return (V = s.value.src) !== null && V !== void 0 ? V : t.src;
  29452. }), 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, z) => {
  29453. var W, F;
  29454. (F = (W = s.value).onVisibleChange) === null || F === void 0 || F.call(W, V, z);
  29455. }, [p, v] = wh(!!c.value, {
  29456. value: c,
  29457. onChange: h
  29458. }), g = U(u.value ? "loading" : "normal");
  29459. se(() => t.src, () => {
  29460. g.value = u.value ? "loading" : "normal";
  29461. });
  29462. const m = U(null), y = L(() => g.value === "error"), b = bD.inject(), {
  29463. isPreviewGroup: _,
  29464. setCurrent: O,
  29465. setShowPreview: S,
  29466. setMousePosition: x,
  29467. registerImage: C
  29468. } = b, T = U(MCe++), w = L(() => t.preview && !y.value), P = () => {
  29469. g.value = "normal";
  29470. }, $ = (V) => {
  29471. g.value = "error", i("error", V);
  29472. }, A = (V) => {
  29473. if (!d.value) {
  29474. const {
  29475. left: z,
  29476. top: W
  29477. } = MZ(V.target);
  29478. _.value ? (O(T.value), x({
  29479. x: z,
  29480. y: W
  29481. })) : m.value = {
  29482. x: z,
  29483. y: W
  29484. };
  29485. }
  29486. _.value ? S(!0) : v(!0), i("click", V);
  29487. }, D = () => {
  29488. v(!1), d.value || (m.value = null);
  29489. }, E = U(null);
  29490. se(() => E, () => {
  29491. g.value === "loading" && E.value.complete && (E.value.naturalWidth || E.value.naturalHeight) && P();
  29492. });
  29493. let R = () => {
  29494. };
  29495. it(() => {
  29496. se([l, w], () => {
  29497. if (R(), !_.value)
  29498. return () => {
  29499. };
  29500. R = C(T.value, l.value, w.value), w.value || R();
  29501. }, {
  29502. flush: "post",
  29503. immediate: !0
  29504. });
  29505. }), nl(() => {
  29506. R();
  29507. });
  29508. const N = (V) => $be(V) ? V + "px" : V;
  29509. return () => {
  29510. const {
  29511. prefixCls: V,
  29512. wrapperClassName: z,
  29513. fallback: W,
  29514. src: F,
  29515. placeholder: Q,
  29516. wrapperStyle: Z,
  29517. rootClassName: ne
  29518. } = t, {
  29519. width: ee,
  29520. height: oe,
  29521. crossorigin: K,
  29522. decoding: ie,
  29523. alt: X,
  29524. sizes: H,
  29525. srcset: G,
  29526. usemap: re,
  29527. class: fe,
  29528. style: de
  29529. } = n, Ee = s.value, {
  29530. icons: $e,
  29531. maskClassName: Se
  29532. } = Ee, be = ECe(Ee, ["icons", "maskClassName"]), he = ye(V, z, ne, {
  29533. [`${V}-error`]: y.value
  29534. }), Te = y.value && W ? W : l.value, ze = {
  29535. crossorigin: K,
  29536. decoding: ie,
  29537. alt: X,
  29538. sizes: H,
  29539. srcset: G,
  29540. usemap: re,
  29541. width: ee,
  29542. height: oe,
  29543. class: ye(`${V}-img`, {
  29544. [`${V}-img-placeholder`]: Q === !0
  29545. }, fe),
  29546. style: I({
  29547. height: N(oe)
  29548. }, de)
  29549. };
  29550. return M(wt, null, [M("div", {
  29551. class: he,
  29552. onClick: w.value ? A : (ut) => {
  29553. i("click", ut);
  29554. },
  29555. style: I({
  29556. width: N(ee),
  29557. height: N(oe)
  29558. }, Z)
  29559. }, [M("img", j(j(j({}, ze), y.value && W ? {
  29560. src: W
  29561. } : {
  29562. onLoad: P,
  29563. onError: $,
  29564. src: F
  29565. }), {}, {
  29566. ref: E
  29567. }), null), g.value === "loading" && M("div", {
  29568. "aria-hidden": "true",
  29569. class: `${V}-placeholder`
  29570. }, [Q || r.placeholder && r.placeholder()]), r.previewMask && w.value && M("div", {
  29571. class: [`${V}-mask`, Se]
  29572. }, [r.previewMask()])]), !_.value && w.value && M(oY, j(j({}, be), {}, {
  29573. "aria-hidden": !p.value,
  29574. visible: p.value,
  29575. prefixCls: o.value,
  29576. onClose: D,
  29577. mousePosition: m.value,
  29578. src: Te,
  29579. alt: X,
  29580. getContainer: f.value,
  29581. icons: $e,
  29582. rootClassName: ne
  29583. }), null)]);
  29584. };
  29585. }
  29586. });
  29587. uY.PreviewGroup = aY;
  29588. const ICe = uY;
  29589. var DCe = { 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" };
  29590. function u3(t) {
  29591. for (var e = 1; e < arguments.length; e++) {
  29592. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29593. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29594. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29595. }))), r.forEach(function(i) {
  29596. RCe(t, i, n[i]);
  29597. });
  29598. }
  29599. return t;
  29600. }
  29601. function RCe(t, e, n) {
  29602. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29603. }
  29604. var _D = function(e, n) {
  29605. var r = u3({}, e, n.attrs);
  29606. return M(lt, u3({}, r, {
  29607. icon: DCe
  29608. }), null);
  29609. };
  29610. _D.displayName = "RotateLeftOutlined";
  29611. _D.inheritAttrs = !1;
  29612. var kCe = { 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" };
  29613. function c3(t) {
  29614. for (var e = 1; e < arguments.length; e++) {
  29615. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29616. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29617. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29618. }))), r.forEach(function(i) {
  29619. LCe(t, i, n[i]);
  29620. });
  29621. }
  29622. return t;
  29623. }
  29624. function LCe(t, e, n) {
  29625. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29626. }
  29627. var OD = function(e, n) {
  29628. var r = c3({}, e, n.attrs);
  29629. return M(lt, c3({}, r, {
  29630. icon: kCe
  29631. }), null);
  29632. };
  29633. OD.displayName = "RotateRightOutlined";
  29634. OD.inheritAttrs = !1;
  29635. var NCe = { 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" };
  29636. function f3(t) {
  29637. for (var e = 1; e < arguments.length; e++) {
  29638. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29639. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29640. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29641. }))), r.forEach(function(i) {
  29642. BCe(t, i, n[i]);
  29643. });
  29644. }
  29645. return t;
  29646. }
  29647. function BCe(t, e, n) {
  29648. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29649. }
  29650. var SD = function(e, n) {
  29651. var r = f3({}, e, n.attrs);
  29652. return M(lt, f3({}, r, {
  29653. icon: NCe
  29654. }), null);
  29655. };
  29656. SD.displayName = "ZoomInOutlined";
  29657. SD.inheritAttrs = !1;
  29658. var zCe = { 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" };
  29659. function d3(t) {
  29660. for (var e = 1; e < arguments.length; e++) {
  29661. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29662. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29663. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29664. }))), r.forEach(function(i) {
  29665. VCe(t, i, n[i]);
  29666. });
  29667. }
  29668. return t;
  29669. }
  29670. function VCe(t, e, n) {
  29671. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29672. }
  29673. var xD = function(e, n) {
  29674. var r = d3({}, e, n.attrs);
  29675. return M(lt, d3({}, r, {
  29676. icon: zCe
  29677. }), null);
  29678. };
  29679. xD.displayName = "ZoomOutOutlined";
  29680. xD.inheritAttrs = !1;
  29681. var FCe = { 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" };
  29682. function h3(t) {
  29683. for (var e = 1; e < arguments.length; e++) {
  29684. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29685. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29686. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29687. }))), r.forEach(function(i) {
  29688. WCe(t, i, n[i]);
  29689. });
  29690. }
  29691. return t;
  29692. }
  29693. function WCe(t, e, n) {
  29694. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29695. }
  29696. var F1 = function(e, n) {
  29697. var r = h3({}, e, n.attrs);
  29698. return M(lt, h3({}, r, {
  29699. icon: FCe
  29700. }), null);
  29701. };
  29702. F1.displayName = "SwapOutlined";
  29703. F1.inheritAttrs = !1;
  29704. function p3(t) {
  29705. return {
  29706. position: t,
  29707. top: 0,
  29708. insetInlineEnd: 0,
  29709. bottom: 0,
  29710. insetInlineStart: 0
  29711. };
  29712. }
  29713. const cY = (t) => {
  29714. const {
  29715. componentCls: e
  29716. } = t;
  29717. return [{
  29718. [`${e}-root`]: {
  29719. [`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]: {
  29720. // reset scale avoid mousePosition bug
  29721. transform: "none",
  29722. opacity: 0,
  29723. animationDuration: t.motionDurationSlow,
  29724. // https://github.com/ant-design/ant-design/issues/11777
  29725. userSelect: "none"
  29726. },
  29727. [`${e}${t.antCls}-zoom-leave ${e}-content`]: {
  29728. pointerEvents: "none"
  29729. },
  29730. [`${e}-mask`]: I(I({}, p3("fixed")), {
  29731. zIndex: t.zIndexPopupBase,
  29732. height: "100%",
  29733. backgroundColor: t.colorBgMask,
  29734. [`${e}-hidden`]: {
  29735. display: "none"
  29736. }
  29737. }),
  29738. [`${e}-wrap`]: I(I({}, p3("fixed")), {
  29739. overflow: "auto",
  29740. outline: 0,
  29741. WebkitOverflowScrolling: "touch"
  29742. })
  29743. }
  29744. }, {
  29745. [`${e}-root`]: TU(t)
  29746. }];
  29747. }, QCe = (t) => {
  29748. const {
  29749. componentCls: e
  29750. } = t;
  29751. return [
  29752. // ======================== Root =========================
  29753. {
  29754. [`${e}-root`]: {
  29755. [`${e}-wrap`]: {
  29756. zIndex: t.zIndexPopupBase,
  29757. position: "fixed",
  29758. inset: 0,
  29759. overflow: "auto",
  29760. outline: 0,
  29761. WebkitOverflowScrolling: "touch"
  29762. },
  29763. [`${e}-wrap-rtl`]: {
  29764. direction: "rtl"
  29765. },
  29766. [`${e}-centered`]: {
  29767. textAlign: "center",
  29768. "&::before": {
  29769. display: "inline-block",
  29770. width: 0,
  29771. height: "100%",
  29772. verticalAlign: "middle",
  29773. content: '""'
  29774. },
  29775. [e]: {
  29776. top: 0,
  29777. display: "inline-block",
  29778. paddingBottom: 0,
  29779. textAlign: "start",
  29780. verticalAlign: "middle"
  29781. }
  29782. },
  29783. [`@media (max-width: ${t.screenSMMax})`]: {
  29784. [e]: {
  29785. maxWidth: "calc(100vw - 16px)",
  29786. margin: `${t.marginXS} auto`
  29787. },
  29788. [`${e}-centered`]: {
  29789. [e]: {
  29790. flex: 1
  29791. }
  29792. }
  29793. }
  29794. }
  29795. },
  29796. // ======================== Modal ========================
  29797. {
  29798. [e]: I(I({}, nn(t)), {
  29799. pointerEvents: "none",
  29800. position: "relative",
  29801. top: 100,
  29802. width: "auto",
  29803. maxWidth: `calc(100vw - ${t.margin * 2}px)`,
  29804. margin: "0 auto",
  29805. paddingBottom: t.paddingLG,
  29806. [`${e}-title`]: {
  29807. margin: 0,
  29808. color: t.modalHeadingColor,
  29809. fontWeight: t.fontWeightStrong,
  29810. fontSize: t.modalHeaderTitleFontSize,
  29811. lineHeight: t.modalHeaderTitleLineHeight,
  29812. wordWrap: "break-word"
  29813. },
  29814. [`${e}-content`]: {
  29815. position: "relative",
  29816. backgroundColor: t.modalContentBg,
  29817. backgroundClip: "padding-box",
  29818. border: 0,
  29819. borderRadius: t.borderRadiusLG,
  29820. boxShadow: t.boxShadowSecondary,
  29821. pointerEvents: "auto",
  29822. padding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`
  29823. },
  29824. [`${e}-close`]: I({
  29825. position: "absolute",
  29826. top: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
  29827. insetInlineEnd: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
  29828. zIndex: t.zIndexPopupBase + 10,
  29829. padding: 0,
  29830. color: t.modalCloseColor,
  29831. fontWeight: t.fontWeightStrong,
  29832. lineHeight: 1,
  29833. textDecoration: "none",
  29834. background: "transparent",
  29835. borderRadius: t.borderRadiusSM,
  29836. width: t.modalConfirmIconSize,
  29837. height: t.modalConfirmIconSize,
  29838. border: 0,
  29839. outline: 0,
  29840. cursor: "pointer",
  29841. transition: `color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,
  29842. "&-x": {
  29843. display: "block",
  29844. fontSize: t.fontSizeLG,
  29845. fontStyle: "normal",
  29846. lineHeight: `${t.modalCloseBtnSize}px`,
  29847. textAlign: "center",
  29848. textTransform: "none",
  29849. textRendering: "auto"
  29850. },
  29851. "&:hover": {
  29852. color: t.modalIconHoverColor,
  29853. backgroundColor: t.wireframe ? "transparent" : t.colorFillContent,
  29854. textDecoration: "none"
  29855. },
  29856. "&:active": {
  29857. backgroundColor: t.wireframe ? "transparent" : t.colorFillContentHover
  29858. }
  29859. }, VS(t)),
  29860. [`${e}-header`]: {
  29861. color: t.colorText,
  29862. background: t.modalHeaderBg,
  29863. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
  29864. marginBottom: t.marginXS
  29865. },
  29866. [`${e}-body`]: {
  29867. fontSize: t.fontSize,
  29868. lineHeight: t.lineHeight,
  29869. wordWrap: "break-word"
  29870. },
  29871. [`${e}-footer`]: {
  29872. textAlign: "end",
  29873. background: t.modalFooterBg,
  29874. marginTop: t.marginSM,
  29875. [`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]: {
  29876. marginBottom: 0,
  29877. marginInlineStart: t.marginXS
  29878. }
  29879. },
  29880. [`${e}-open`]: {
  29881. overflow: "hidden"
  29882. }
  29883. })
  29884. },
  29885. // ======================== Pure =========================
  29886. {
  29887. [`${e}-pure-panel`]: {
  29888. top: "auto",
  29889. padding: 0,
  29890. display: "flex",
  29891. flexDirection: "column",
  29892. [`${e}-content,
  29893. ${e}-body,
  29894. ${e}-confirm-body-wrapper`]: {
  29895. display: "flex",
  29896. flexDirection: "column",
  29897. flex: "auto"
  29898. },
  29899. [`${e}-confirm-body`]: {
  29900. marginBottom: "auto"
  29901. }
  29902. }
  29903. }
  29904. ];
  29905. }, HCe = (t) => {
  29906. const {
  29907. componentCls: e
  29908. } = t, n = `${e}-confirm`;
  29909. return {
  29910. [n]: {
  29911. "&-rtl": {
  29912. direction: "rtl"
  29913. },
  29914. [`${t.antCls}-modal-header`]: {
  29915. display: "none"
  29916. },
  29917. [`${n}-body-wrapper`]: I({}, _1()),
  29918. [`${n}-body`]: {
  29919. display: "flex",
  29920. flexWrap: "wrap",
  29921. alignItems: "center",
  29922. [`${n}-title`]: {
  29923. flex: "0 0 100%",
  29924. display: "block",
  29925. // create BFC to avoid
  29926. // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
  29927. overflow: "hidden",
  29928. color: t.colorTextHeading,
  29929. fontWeight: t.fontWeightStrong,
  29930. fontSize: t.modalHeaderTitleFontSize,
  29931. lineHeight: t.modalHeaderTitleLineHeight,
  29932. [`+ ${n}-content`]: {
  29933. marginBlockStart: t.marginXS,
  29934. flexBasis: "100%",
  29935. maxWidth: `calc(100% - ${t.modalConfirmIconSize + t.marginSM}px)`
  29936. }
  29937. },
  29938. [`${n}-content`]: {
  29939. color: t.colorText,
  29940. fontSize: t.fontSize
  29941. },
  29942. [`> ${t.iconCls}`]: {
  29943. flex: "none",
  29944. marginInlineEnd: t.marginSM,
  29945. fontSize: t.modalConfirmIconSize,
  29946. [`+ ${n}-title`]: {
  29947. flex: 1
  29948. },
  29949. // `content` after `icon` should set marginLeft
  29950. [`+ ${n}-title + ${n}-content`]: {
  29951. marginInlineStart: t.modalConfirmIconSize + t.marginSM
  29952. }
  29953. }
  29954. },
  29955. [`${n}-btns`]: {
  29956. textAlign: "end",
  29957. marginTop: t.marginSM,
  29958. [`${t.antCls}-btn + ${t.antCls}-btn`]: {
  29959. marginBottom: 0,
  29960. marginInlineStart: t.marginXS
  29961. }
  29962. }
  29963. },
  29964. [`${n}-error ${n}-body > ${t.iconCls}`]: {
  29965. color: t.colorError
  29966. },
  29967. [`${n}-warning ${n}-body > ${t.iconCls},
  29968. ${n}-confirm ${n}-body > ${t.iconCls}`]: {
  29969. color: t.colorWarning
  29970. },
  29971. [`${n}-info ${n}-body > ${t.iconCls}`]: {
  29972. color: t.colorInfo
  29973. },
  29974. [`${n}-success ${n}-body > ${t.iconCls}`]: {
  29975. color: t.colorSuccess
  29976. },
  29977. // https://github.com/ant-design/ant-design/issues/37329
  29978. [`${e}-zoom-leave ${e}-btns`]: {
  29979. pointerEvents: "none"
  29980. }
  29981. };
  29982. }, GCe = (t) => {
  29983. const {
  29984. componentCls: e
  29985. } = t;
  29986. return {
  29987. [`${e}-root`]: {
  29988. [`${e}-wrap-rtl`]: {
  29989. direction: "rtl",
  29990. [`${e}-confirm-body`]: {
  29991. direction: "rtl"
  29992. }
  29993. }
  29994. }
  29995. };
  29996. }, jCe = (t) => {
  29997. const {
  29998. componentCls: e,
  29999. antCls: n
  30000. } = t, r = `${e}-confirm`;
  30001. return {
  30002. [e]: {
  30003. [`${e}-content`]: {
  30004. padding: 0
  30005. },
  30006. [`${e}-header`]: {
  30007. padding: t.modalHeaderPadding,
  30008. borderBottom: `${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,
  30009. marginBottom: 0
  30010. },
  30011. [`${e}-body`]: {
  30012. padding: t.modalBodyPadding
  30013. },
  30014. [`${e}-footer`]: {
  30015. padding: `${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,
  30016. borderTop: `${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,
  30017. borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,
  30018. marginTop: 0
  30019. }
  30020. },
  30021. [r]: {
  30022. [`${n}-modal-body`]: {
  30023. padding: `${t.padding * 2}px ${t.padding * 2}px ${t.paddingLG}px`
  30024. },
  30025. [`${r}-body`]: {
  30026. [`> ${t.iconCls}`]: {
  30027. marginInlineEnd: t.margin,
  30028. // `content` after `icon` should set marginLeft
  30029. [`+ ${r}-title + ${r}-content`]: {
  30030. marginInlineStart: t.modalConfirmIconSize + t.margin
  30031. }
  30032. }
  30033. },
  30034. [`${r}-btns`]: {
  30035. marginTop: t.marginLG
  30036. }
  30037. }
  30038. };
  30039. }, ZCe = Sn("Modal", (t) => {
  30040. const e = t.padding, n = t.fontSizeHeading5, r = t.lineHeightHeading5, i = Bt(t, {
  30041. modalBodyPadding: t.paddingLG,
  30042. modalHeaderBg: t.colorBgElevated,
  30043. modalHeaderPadding: `${e}px ${t.paddingLG}px`,
  30044. modalHeaderBorderWidth: t.lineWidth,
  30045. modalHeaderBorderStyle: t.lineType,
  30046. modalHeaderTitleLineHeight: r,
  30047. modalHeaderTitleFontSize: n,
  30048. modalHeaderBorderColorSplit: t.colorSplit,
  30049. modalHeaderCloseSize: r * n + e * 2,
  30050. modalContentBg: t.colorBgElevated,
  30051. modalHeadingColor: t.colorTextHeading,
  30052. modalCloseColor: t.colorTextDescription,
  30053. modalFooterBg: "transparent",
  30054. modalFooterBorderColorSplit: t.colorSplit,
  30055. modalFooterBorderStyle: t.lineType,
  30056. modalFooterPaddingVertical: t.paddingXS,
  30057. modalFooterPaddingHorizontal: t.padding,
  30058. modalFooterBorderWidth: t.lineWidth,
  30059. modalConfirmTitleFontSize: t.fontSizeLG,
  30060. modalIconHoverColor: t.colorIconHover,
  30061. modalConfirmIconSize: t.fontSize * t.lineHeight,
  30062. modalCloseBtnSize: t.controlHeightLG * 0.55
  30063. });
  30064. return [QCe(i), HCe(i), GCe(i), cY(i), t.wireframe && jCe(i), ux(i, "zoom")];
  30065. }), Y2 = (t) => ({
  30066. position: t || "absolute",
  30067. inset: 0
  30068. }), UCe = (t) => {
  30069. const {
  30070. iconCls: e,
  30071. motionDurationSlow: n,
  30072. paddingXXS: r,
  30073. marginXXS: i,
  30074. prefixCls: a
  30075. } = t;
  30076. return {
  30077. position: "absolute",
  30078. inset: 0,
  30079. display: "flex",
  30080. alignItems: "center",
  30081. justifyContent: "center",
  30082. color: "#fff",
  30083. background: new en("#000").setAlpha(0.5).toRgbString(),
  30084. cursor: "pointer",
  30085. opacity: 0,
  30086. transition: `opacity ${n}`,
  30087. [`.${a}-mask-info`]: I(I({}, mh), {
  30088. padding: `0 ${r}px`,
  30089. [e]: {
  30090. marginInlineEnd: i,
  30091. svg: {
  30092. verticalAlign: "baseline"
  30093. }
  30094. }
  30095. })
  30096. };
  30097. }, XCe = (t) => {
  30098. const {
  30099. previewCls: e,
  30100. modalMaskBg: n,
  30101. paddingSM: r,
  30102. previewOperationColorDisabled: i,
  30103. motionDurationSlow: a
  30104. } = t, o = new en(n).setAlpha(0.1), s = o.clone().setAlpha(0.2);
  30105. return {
  30106. [`${e}-operations`]: I(I({}, nn(t)), {
  30107. display: "flex",
  30108. flexDirection: "row-reverse",
  30109. alignItems: "center",
  30110. color: t.previewOperationColor,
  30111. listStyle: "none",
  30112. background: o.toRgbString(),
  30113. pointerEvents: "auto",
  30114. "&-operation": {
  30115. marginInlineStart: r,
  30116. padding: r,
  30117. cursor: "pointer",
  30118. transition: `all ${a}`,
  30119. userSelect: "none",
  30120. "&:hover": {
  30121. background: s.toRgbString()
  30122. },
  30123. "&-disabled": {
  30124. color: i,
  30125. pointerEvents: "none"
  30126. },
  30127. "&:last-of-type": {
  30128. marginInlineStart: 0
  30129. }
  30130. },
  30131. "&-progress": {
  30132. position: "absolute",
  30133. left: {
  30134. _skip_check_: !0,
  30135. value: "50%"
  30136. },
  30137. transform: "translateX(-50%)"
  30138. },
  30139. "&-icon": {
  30140. fontSize: t.previewOperationSize
  30141. }
  30142. })
  30143. };
  30144. }, YCe = (t) => {
  30145. const {
  30146. modalMaskBg: e,
  30147. iconCls: n,
  30148. previewOperationColorDisabled: r,
  30149. previewCls: i,
  30150. zIndexPopup: a,
  30151. motionDurationSlow: o
  30152. } = t, s = new en(e).setAlpha(0.1), l = s.clone().setAlpha(0.2);
  30153. return {
  30154. [`${i}-switch-left, ${i}-switch-right`]: {
  30155. position: "fixed",
  30156. insetBlockStart: "50%",
  30157. zIndex: a + 1,
  30158. display: "flex",
  30159. alignItems: "center",
  30160. justifyContent: "center",
  30161. width: t.imagePreviewSwitchSize,
  30162. height: t.imagePreviewSwitchSize,
  30163. marginTop: -t.imagePreviewSwitchSize / 2,
  30164. color: t.previewOperationColor,
  30165. background: s.toRgbString(),
  30166. borderRadius: "50%",
  30167. transform: "translateY(-50%)",
  30168. cursor: "pointer",
  30169. transition: `all ${o}`,
  30170. pointerEvents: "auto",
  30171. userSelect: "none",
  30172. "&:hover": {
  30173. background: l.toRgbString()
  30174. },
  30175. "&-disabled": {
  30176. "&, &:hover": {
  30177. color: r,
  30178. background: "transparent",
  30179. cursor: "not-allowed",
  30180. [`> ${n}`]: {
  30181. cursor: "not-allowed"
  30182. }
  30183. }
  30184. },
  30185. [`> ${n}`]: {
  30186. fontSize: t.previewOperationSize
  30187. }
  30188. },
  30189. [`${i}-switch-left`]: {
  30190. insetInlineStart: t.marginSM
  30191. },
  30192. [`${i}-switch-right`]: {
  30193. insetInlineEnd: t.marginSM
  30194. }
  30195. };
  30196. }, qCe = (t) => {
  30197. const {
  30198. motionEaseOut: e,
  30199. previewCls: n,
  30200. motionDurationSlow: r,
  30201. componentCls: i
  30202. } = t;
  30203. return [
  30204. {
  30205. [`${i}-preview-root`]: {
  30206. [n]: {
  30207. height: "100%",
  30208. textAlign: "center",
  30209. pointerEvents: "none"
  30210. },
  30211. [`${n}-body`]: I(I({}, Y2()), {
  30212. overflow: "hidden"
  30213. }),
  30214. [`${n}-img`]: {
  30215. maxWidth: "100%",
  30216. maxHeight: "100%",
  30217. verticalAlign: "middle",
  30218. transform: "scale3d(1, 1, 1)",
  30219. cursor: "grab",
  30220. transition: `transform ${r} ${e} 0s`,
  30221. userSelect: "none",
  30222. pointerEvents: "auto",
  30223. "&-wrapper": I(I({}, Y2()), {
  30224. transition: `transform ${r} ${e} 0s`,
  30225. // https://github.com/ant-design/ant-design/issues/39913
  30226. // TailwindCSS will reset img default style.
  30227. // Let's set back.
  30228. display: "flex",
  30229. justifyContent: "center",
  30230. alignItems: "center",
  30231. "&::before": {
  30232. display: "inline-block",
  30233. width: 1,
  30234. height: "50%",
  30235. marginInlineEnd: -1,
  30236. content: '""'
  30237. }
  30238. })
  30239. },
  30240. [`${n}-moving`]: {
  30241. [`${n}-preview-img`]: {
  30242. cursor: "grabbing",
  30243. "&-wrapper": {
  30244. transitionDuration: "0s"
  30245. }
  30246. }
  30247. }
  30248. }
  30249. },
  30250. // Override
  30251. {
  30252. [`${i}-preview-root`]: {
  30253. [`${n}-wrap`]: {
  30254. zIndex: t.zIndexPopup
  30255. }
  30256. }
  30257. },
  30258. // Preview operations & switch
  30259. {
  30260. [`${i}-preview-operations-wrapper`]: {
  30261. position: "fixed",
  30262. insetBlockStart: 0,
  30263. insetInlineEnd: 0,
  30264. zIndex: t.zIndexPopup + 1,
  30265. width: "100%"
  30266. },
  30267. "&": [XCe(t), YCe(t)]
  30268. }
  30269. ];
  30270. }, KCe = (t) => {
  30271. const {
  30272. componentCls: e
  30273. } = t;
  30274. return {
  30275. // ============================== image ==============================
  30276. [e]: {
  30277. position: "relative",
  30278. display: "inline-block",
  30279. [`${e}-img`]: {
  30280. width: "100%",
  30281. height: "auto",
  30282. verticalAlign: "middle"
  30283. },
  30284. [`${e}-img-placeholder`]: {
  30285. backgroundColor: t.colorBgContainerDisabled,
  30286. backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
  30287. backgroundRepeat: "no-repeat",
  30288. backgroundPosition: "center center",
  30289. backgroundSize: "30%"
  30290. },
  30291. [`${e}-mask`]: I({}, UCe(t)),
  30292. [`${e}-mask:hover`]: {
  30293. opacity: 1
  30294. },
  30295. [`${e}-placeholder`]: I({}, Y2())
  30296. }
  30297. };
  30298. }, JCe = (t) => {
  30299. const {
  30300. previewCls: e
  30301. } = t;
  30302. return {
  30303. [`${e}-root`]: ux(t, "zoom"),
  30304. "&": TU(t, !0)
  30305. };
  30306. }, fY = Sn("Image", (t) => {
  30307. const e = `${t.componentCls}-preview`, n = Bt(t, {
  30308. previewCls: e,
  30309. modalMaskBg: new en("#000").setAlpha(0.45).toRgbString(),
  30310. imagePreviewSwitchSize: t.controlHeightLG
  30311. });
  30312. return [KCe(n), qCe(n), cY(Bt(n, {
  30313. componentCls: e
  30314. })), JCe(n)];
  30315. }, (t) => ({
  30316. zIndexPopup: t.zIndexPopupBase + 80,
  30317. previewOperationColor: new en(t.colorTextLightSolid).toRgbString(),
  30318. previewOperationColorDisabled: new en(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
  30319. previewOperationSize: t.fontSizeIcon * 1.5
  30320. // FIXME: fontSizeIconLG
  30321. })), dY = {
  30322. rotateLeft: M(_D, null, null),
  30323. rotateRight: M(OD, null, null),
  30324. zoomIn: M(SD, null, null),
  30325. zoomOut: M(xD, null, null),
  30326. close: M(al, null, null),
  30327. left: M(uD, null, null),
  30328. right: M(px, null, null),
  30329. flipX: M(F1, null, null),
  30330. flipY: M(F1, {
  30331. rotate: 90
  30332. }, null)
  30333. }, eTe = () => ({
  30334. previewPrefixCls: String,
  30335. preview: fa()
  30336. }), tTe = te({
  30337. compatConfig: {
  30338. MODE: 3
  30339. },
  30340. name: "AImagePreviewGroup",
  30341. inheritAttrs: !1,
  30342. props: eTe(),
  30343. setup(t, e) {
  30344. let {
  30345. attrs: n,
  30346. slots: r
  30347. } = e;
  30348. const {
  30349. prefixCls: i,
  30350. rootPrefixCls: a
  30351. } = It("image", t), o = L(() => `${i.value}-preview`), [s, l] = fY(i), u = L(() => {
  30352. const {
  30353. preview: c
  30354. } = t;
  30355. if (c === !1)
  30356. return c;
  30357. const f = typeof c == "object" ? c : {};
  30358. return I(I({}, f), {
  30359. rootClassName: l.value,
  30360. transitionName: es(a.value, "zoom", f.transitionName),
  30361. maskTransitionName: es(a.value, "fade", f.maskTransitionName)
  30362. });
  30363. });
  30364. return () => s(M(aY, j(j({}, I(I({}, n), t)), {}, {
  30365. preview: u.value,
  30366. icons: dY,
  30367. previewPrefixCls: o.value
  30368. }), r));
  30369. }
  30370. }), nTe = tTe, Al = te({
  30371. name: "AImage",
  30372. inheritAttrs: !1,
  30373. props: sY(),
  30374. setup(t, e) {
  30375. let {
  30376. slots: n,
  30377. attrs: r
  30378. } = e;
  30379. const {
  30380. prefixCls: i,
  30381. rootPrefixCls: a,
  30382. configProvider: o
  30383. } = It("image", t), [s, l] = fY(i), u = L(() => {
  30384. const {
  30385. preview: c
  30386. } = t;
  30387. if (c === !1)
  30388. return c;
  30389. const f = typeof c == "object" ? c : {};
  30390. return I(I({
  30391. icons: dY
  30392. }, f), {
  30393. transitionName: es(a.value, "zoom", f.transitionName),
  30394. maskTransitionName: es(a.value, "fade", f.maskTransitionName)
  30395. });
  30396. });
  30397. return () => {
  30398. var c, f;
  30399. const d = ((f = (c = o.locale) === null || c === void 0 ? void 0 : c.value) === null || f === void 0 ? void 0 : f.Image) || zs.Image, h = () => M("div", {
  30400. class: `${i.value}-mask-info`
  30401. }, [M(xx, null, null), d == null ? void 0 : d.preview]), {
  30402. previewMask: p = n.previewMask || h
  30403. } = t;
  30404. return s(M(ICe, j(j({}, I(I(I({}, r), t), {
  30405. prefixCls: i.value
  30406. })), {}, {
  30407. preview: u.value,
  30408. rootClassName: ye(t.rootClassName, l.value)
  30409. }), I(I({}, n), {
  30410. previewMask: typeof p == "function" ? p : null
  30411. })));
  30412. };
  30413. }
  30414. });
  30415. Al.PreviewGroup = nTe;
  30416. Al.install = function(t) {
  30417. return t.component(Al.name, Al), t.component(Al.PreviewGroup.name, Al.PreviewGroup), t;
  30418. };
  30419. var rTe = { 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" };
  30420. function v3(t) {
  30421. for (var e = 1; e < arguments.length; e++) {
  30422. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  30423. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  30424. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  30425. }))), r.forEach(function(i) {
  30426. iTe(t, i, n[i]);
  30427. });
  30428. }
  30429. return t;
  30430. }
  30431. function iTe(t, e, n) {
  30432. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  30433. }
  30434. var wD = function(e, n) {
  30435. var r = v3({}, e, n.attrs);
  30436. return M(lt, v3({}, r, {
  30437. icon: rTe
  30438. }), null);
  30439. };
  30440. wD.displayName = "UpOutlined";
  30441. wD.inheritAttrs = !1;
  30442. function q2() {
  30443. return typeof BigInt == "function";
  30444. }
  30445. function vg(t) {
  30446. let e = t.trim(), n = e.startsWith("-");
  30447. n && (e = e.slice(1)), e = e.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), e.startsWith(".") && (e = `0${e}`);
  30448. const r = e || "0", i = r.split("."), a = i[0] || "0", o = i[1] || "0";
  30449. a === "0" && o === "0" && (n = !1);
  30450. const s = n ? "-" : "";
  30451. return {
  30452. negative: n,
  30453. negativeStr: s,
  30454. trimStr: r,
  30455. integerStr: a,
  30456. decimalStr: o,
  30457. fullStr: `${s}${r}`
  30458. };
  30459. }
  30460. function CD(t) {
  30461. const e = String(t);
  30462. return !Number.isNaN(Number(e)) && e.includes("e");
  30463. }
  30464. function sm(t) {
  30465. const e = String(t);
  30466. if (CD(t)) {
  30467. let n = Number(e.slice(e.indexOf("e-") + 2));
  30468. const r = e.match(/\.(\d+)/);
  30469. return r != null && r[1] && (n += r[1].length), n;
  30470. }
  30471. return e.includes(".") && PD(e) ? e.length - e.indexOf(".") - 1 : 0;
  30472. }
  30473. function TD(t) {
  30474. let e = String(t);
  30475. if (CD(t)) {
  30476. if (t > Number.MAX_SAFE_INTEGER)
  30477. return String(q2() ? BigInt(t).toString() : Number.MAX_SAFE_INTEGER);
  30478. if (t < Number.MIN_SAFE_INTEGER)
  30479. return String(q2() ? BigInt(t).toString() : Number.MIN_SAFE_INTEGER);
  30480. e = t.toFixed(sm(e));
  30481. }
  30482. return vg(e).fullStr;
  30483. }
  30484. function PD(t) {
  30485. return typeof t == "number" ? !Number.isNaN(t) : t ? (
  30486. // Normal type: 11.28
  30487. /^\s*-?\d+(\.\d+)?\s*$/.test(t) || // Pre-number: 1.
  30488. /^\s*-?\d+\.\s*$/.test(t) || // Post-number: .1
  30489. /^\s*-?\.\d+\s*$/.test(t)
  30490. ) : !1;
  30491. }
  30492. function hY(t) {
  30493. return !t && t !== 0 && !Number.isNaN(t) || !String(t).trim();
  30494. }
  30495. class Oc {
  30496. constructor(e) {
  30497. if (this.origin = "", hY(e)) {
  30498. this.empty = !0;
  30499. return;
  30500. }
  30501. this.origin = String(e), this.number = Number(e);
  30502. }
  30503. negate() {
  30504. return new Oc(-this.toNumber());
  30505. }
  30506. add(e) {
  30507. if (this.isInvalidate())
  30508. return new Oc(e);
  30509. const n = Number(e);
  30510. if (Number.isNaN(n))
  30511. return this;
  30512. const r = this.number + n;
  30513. if (r > Number.MAX_SAFE_INTEGER)
  30514. return new Oc(Number.MAX_SAFE_INTEGER);
  30515. if (r < Number.MIN_SAFE_INTEGER)
  30516. return new Oc(Number.MIN_SAFE_INTEGER);
  30517. const i = Math.max(sm(this.number), sm(n));
  30518. return new Oc(r.toFixed(i));
  30519. }
  30520. isEmpty() {
  30521. return this.empty;
  30522. }
  30523. isNaN() {
  30524. return Number.isNaN(this.number);
  30525. }
  30526. isInvalidate() {
  30527. return this.isEmpty() || this.isNaN();
  30528. }
  30529. equals(e) {
  30530. return this.toNumber() === (e == null ? void 0 : e.toNumber());
  30531. }
  30532. lessEquals(e) {
  30533. return this.add(e.negate().toString()).toNumber() <= 0;
  30534. }
  30535. toNumber() {
  30536. return this.number;
  30537. }
  30538. toString() {
  30539. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : TD(this.number) : this.origin;
  30540. }
  30541. }
  30542. class Bd {
  30543. constructor(e) {
  30544. if (this.origin = "", hY(e)) {
  30545. this.empty = !0;
  30546. return;
  30547. }
  30548. if (this.origin = String(e), e === "-" || Number.isNaN(e)) {
  30549. this.nan = !0;
  30550. return;
  30551. }
  30552. let n = e;
  30553. if (CD(n) && (n = Number(n)), n = typeof n == "string" ? n : TD(n), PD(n)) {
  30554. const r = vg(n);
  30555. this.negative = r.negative;
  30556. const i = r.trimStr.split(".");
  30557. this.integer = BigInt(i[0]);
  30558. const a = i[1] || "0";
  30559. this.decimal = BigInt(a), this.decimalLen = a.length;
  30560. } else
  30561. this.nan = !0;
  30562. }
  30563. getMark() {
  30564. return this.negative ? "-" : "";
  30565. }
  30566. getIntegerStr() {
  30567. return this.integer.toString();
  30568. }
  30569. getDecimalStr() {
  30570. return this.decimal.toString().padStart(this.decimalLen, "0");
  30571. }
  30572. /**
  30573. * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
  30574. * This is used for add function only.
  30575. */
  30576. alignDecimal(e) {
  30577. const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e, "0")}`;
  30578. return BigInt(n);
  30579. }
  30580. negate() {
  30581. const e = new Bd(this.toString());
  30582. return e.negative = !e.negative, e;
  30583. }
  30584. add(e) {
  30585. if (this.isInvalidate())
  30586. return new Bd(e);
  30587. const n = new Bd(e);
  30588. if (n.isInvalidate())
  30589. return this;
  30590. const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(r), a = n.alignDecimal(r), o = (i + a).toString(), {
  30591. negativeStr: s,
  30592. trimStr: l
  30593. } = vg(o), u = `${s}${l.padStart(r + 1, "0")}`;
  30594. return new Bd(`${u.slice(0, -r)}.${u.slice(-r)}`);
  30595. }
  30596. isEmpty() {
  30597. return this.empty;
  30598. }
  30599. isNaN() {
  30600. return this.nan;
  30601. }
  30602. isInvalidate() {
  30603. return this.isEmpty() || this.isNaN();
  30604. }
  30605. equals(e) {
  30606. return this.toString() === (e == null ? void 0 : e.toString());
  30607. }
  30608. lessEquals(e) {
  30609. return this.add(e.negate().toString()).toNumber() <= 0;
  30610. }
  30611. toNumber() {
  30612. return this.isNaN() ? NaN : Number(this.toString());
  30613. }
  30614. toString() {
  30615. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : vg(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  30616. }
  30617. }
  30618. function Mo(t) {
  30619. return q2() ? new Bd(t) : new Oc(t);
  30620. }
  30621. function K2(t, e, n) {
  30622. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  30623. if (t === "")
  30624. return "";
  30625. const {
  30626. negativeStr: i,
  30627. integerStr: a,
  30628. decimalStr: o
  30629. } = vg(t), s = `${e}${o}`, l = `${i}${a}`;
  30630. if (n >= 0) {
  30631. const u = Number(o[n]);
  30632. if (u >= 5 && !r) {
  30633. const c = Mo(t).add(`${i}0.${"0".repeat(n)}${10 - u}`);
  30634. return K2(c.toString(), e, n, r);
  30635. }
  30636. return n === 0 ? l : `${l}${e}${o.padEnd(n, "0").slice(0, n)}`;
  30637. }
  30638. return s === ".0" ? l : `${l}${s}`;
  30639. }
  30640. const aTe = 200, oTe = 600, sTe = te({
  30641. compatConfig: {
  30642. MODE: 3
  30643. },
  30644. name: "StepHandler",
  30645. inheritAttrs: !1,
  30646. props: {
  30647. prefixCls: String,
  30648. upDisabled: Boolean,
  30649. downDisabled: Boolean,
  30650. onStep: tt()
  30651. },
  30652. slots: Object,
  30653. setup(t, e) {
  30654. let {
  30655. slots: n,
  30656. emit: r
  30657. } = e;
  30658. const i = U(), a = (s, l) => {
  30659. s.preventDefault(), r("step", l);
  30660. function u() {
  30661. r("step", l), i.value = setTimeout(u, aTe);
  30662. }
  30663. i.value = setTimeout(u, oTe);
  30664. }, o = () => {
  30665. clearTimeout(i.value);
  30666. };
  30667. return yt(() => {
  30668. o();
  30669. }), () => {
  30670. if (AI())
  30671. return null;
  30672. const {
  30673. prefixCls: s,
  30674. upDisabled: l,
  30675. downDisabled: u
  30676. } = t, c = `${s}-handler`, f = ye(c, `${c}-up`, {
  30677. [`${c}-up-disabled`]: l
  30678. }), d = ye(c, `${c}-down`, {
  30679. [`${c}-down-disabled`]: u
  30680. }), h = {
  30681. unselectable: "on",
  30682. role: "button",
  30683. onMouseup: o,
  30684. onMouseleave: o
  30685. }, {
  30686. upNode: p,
  30687. downNode: v
  30688. } = n;
  30689. return M("div", {
  30690. class: `${c}-wrap`
  30691. }, [M("span", j(j({}, h), {}, {
  30692. onMousedown: (g) => {
  30693. a(g, !0);
  30694. },
  30695. "aria-label": "Increase Value",
  30696. "aria-disabled": l,
  30697. class: f
  30698. }), [(p == null ? void 0 : p()) || M("span", {
  30699. unselectable: "on",
  30700. class: `${s}-handler-up-inner`
  30701. }, null)]), M("span", j(j({}, h), {}, {
  30702. onMousedown: (g) => {
  30703. a(g, !1);
  30704. },
  30705. "aria-label": "Decrease Value",
  30706. "aria-disabled": u,
  30707. class: d
  30708. }), [(v == null ? void 0 : v()) || M("span", {
  30709. unselectable: "on",
  30710. class: `${s}-handler-down-inner`
  30711. }, null)])]);
  30712. };
  30713. }
  30714. });
  30715. function lTe(t, e) {
  30716. const n = U(null);
  30717. function r() {
  30718. try {
  30719. const {
  30720. selectionStart: a,
  30721. selectionEnd: o,
  30722. value: s
  30723. } = t.value, l = s.substring(0, a), u = s.substring(o);
  30724. n.value = {
  30725. start: a,
  30726. end: o,
  30727. value: s,
  30728. beforeTxt: l,
  30729. afterTxt: u
  30730. };
  30731. } catch {
  30732. }
  30733. }
  30734. function i() {
  30735. if (t.value && n.value && e.value)
  30736. try {
  30737. const {
  30738. value: a
  30739. } = t.value, {
  30740. beforeTxt: o,
  30741. afterTxt: s,
  30742. start: l
  30743. } = n.value;
  30744. let u = a.length;
  30745. if (a.endsWith(s))
  30746. u = a.length - n.value.afterTxt.length;
  30747. else if (a.startsWith(o))
  30748. u = o.length;
  30749. else {
  30750. const c = o[l - 1], f = a.indexOf(c, l - 1);
  30751. f !== -1 && (u = f + 1);
  30752. }
  30753. t.value.setSelectionRange(u, u);
  30754. } catch (a) {
  30755. cf(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
  30756. }
  30757. }
  30758. return [r, i];
  30759. }
  30760. const uTe = () => {
  30761. const t = ae(0), e = () => {
  30762. xt.cancel(t.value);
  30763. };
  30764. return yt(() => {
  30765. e();
  30766. }), (n) => {
  30767. e(), t.value = xt(() => {
  30768. n();
  30769. });
  30770. };
  30771. };
  30772. var cTe = function(t, e) {
  30773. var n = {};
  30774. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  30775. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  30776. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  30777. return n;
  30778. };
  30779. const g3 = (t, e) => t || e.isEmpty() ? e.toString() : e.toNumber(), m3 = (t) => {
  30780. const e = Mo(t);
  30781. return e.isInvalidate() ? null : e;
  30782. }, pY = () => ({
  30783. /** value will show as string */
  30784. stringMode: nt(),
  30785. defaultValue: gn([String, Number]),
  30786. value: gn([String, Number]),
  30787. prefixCls: hn(),
  30788. min: gn([String, Number]),
  30789. max: gn([String, Number]),
  30790. step: gn([String, Number], 1),
  30791. tabindex: Number,
  30792. controls: nt(!0),
  30793. readonly: nt(),
  30794. disabled: nt(),
  30795. autofocus: nt(),
  30796. keyboard: nt(!0),
  30797. /** Parse display value to validate number */
  30798. parser: tt(),
  30799. /** Transform `value` to display value show in input */
  30800. formatter: tt(),
  30801. /** Syntactic sugar of `formatter`. Config precision of display. */
  30802. precision: Number,
  30803. /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  30804. decimalSeparator: String,
  30805. onInput: tt(),
  30806. onChange: tt(),
  30807. onPressEnter: tt(),
  30808. onStep: tt(),
  30809. onBlur: tt(),
  30810. onFocus: tt()
  30811. }), fTe = te({
  30812. compatConfig: {
  30813. MODE: 3
  30814. },
  30815. name: "InnerInputNumber",
  30816. inheritAttrs: !1,
  30817. props: I(I({}, pY()), {
  30818. lazy: Boolean
  30819. }),
  30820. slots: Object,
  30821. setup(t, e) {
  30822. let {
  30823. attrs: n,
  30824. slots: r,
  30825. emit: i,
  30826. expose: a
  30827. } = e;
  30828. const o = ae(), s = ae(!1), l = ae(!1), u = ae(!1), c = ae(Mo(t.value));
  30829. function f(F) {
  30830. t.value === void 0 && (c.value = F);
  30831. }
  30832. const d = (F, Q) => {
  30833. if (!Q)
  30834. return t.precision >= 0 ? t.precision : Math.max(sm(F), sm(t.step));
  30835. }, h = (F) => {
  30836. const Q = String(F);
  30837. if (t.parser)
  30838. return t.parser(Q);
  30839. let Z = Q;
  30840. return t.decimalSeparator && (Z = Z.replace(t.decimalSeparator, ".")), Z.replace(/[^\w.-]+/g, "");
  30841. }, p = ae(""), v = (F, Q) => {
  30842. if (t.formatter)
  30843. return t.formatter(F, {
  30844. userTyping: Q,
  30845. input: String(p.value)
  30846. });
  30847. let Z = typeof F == "number" ? TD(F) : F;
  30848. if (!Q) {
  30849. const ne = d(Z, Q);
  30850. if (PD(Z) && (t.decimalSeparator || ne >= 0)) {
  30851. const ee = t.decimalSeparator || ".";
  30852. Z = K2(Z, ee, ne);
  30853. }
  30854. }
  30855. return Z;
  30856. }, g = (() => {
  30857. const F = t.value;
  30858. return c.value.isInvalidate() && ["string", "number"].includes(typeof F) ? Number.isNaN(F) ? "" : F : v(c.value.toString(), !1);
  30859. })();
  30860. p.value = g;
  30861. function m(F, Q) {
  30862. p.value = v(
  30863. // Invalidate number is sometime passed by external control, we should let it go
  30864. // Otherwise is controlled by internal interactive logic which check by userTyping
  30865. // You can ref 'show limited value when input is not focused' test for more info.
  30866. F.isInvalidate() ? F.toString(!1) : F.toString(!Q),
  30867. Q
  30868. );
  30869. }
  30870. const y = L(() => m3(t.max)), b = L(() => m3(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] = lTe(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) => {
  30871. var Z;
  30872. let ne = F, ee = T(ne) || ne.isEmpty();
  30873. if (!ne.isEmpty() && !Q && (ne = C(ne) || ne, ee = !0), !t.readonly && !t.disabled && ee) {
  30874. const oe = ne.toString(), K = d(oe, Q);
  30875. return K >= 0 && (ne = Mo(K2(oe, ".", K))), ne.equals(c.value) || (f(ne), (Z = t.onChange) === null || Z === void 0 || Z.call(t, ne.isEmpty() ? null : g3(t.stringMode, ne)), t.value === void 0 && m(ne, Q)), ne;
  30876. }
  30877. return c.value;
  30878. }, P = uTe(), $ = (F) => {
  30879. var Q;
  30880. if (S(), p.value = F, !u.value) {
  30881. const Z = h(F), ne = Mo(Z);
  30882. ne.isNaN() || w(ne, !0);
  30883. }
  30884. (Q = t.onInput) === null || Q === void 0 || Q.call(t, F), P(() => {
  30885. let Z = F;
  30886. t.parser || (Z = F.replace(/。/g, ".")), Z !== F && $(Z);
  30887. });
  30888. }, A = () => {
  30889. u.value = !0;
  30890. }, D = () => {
  30891. u.value = !1, $(o.value.value);
  30892. }, E = (F) => {
  30893. $(F.target.value);
  30894. }, R = (F) => {
  30895. var Q, Z;
  30896. if (F && _.value || !F && O.value)
  30897. return;
  30898. l.value = !1;
  30899. let ne = Mo(t.step);
  30900. F || (ne = ne.negate());
  30901. const ee = (c.value || Mo(0)).add(ne.toString()), oe = w(ee, !1);
  30902. (Q = t.onStep) === null || Q === void 0 || Q.call(t, g3(t.stringMode, oe), {
  30903. offset: t.step,
  30904. type: F ? "up" : "down"
  30905. }), (Z = o.value) === null || Z === void 0 || Z.focus();
  30906. }, N = (F) => {
  30907. const Q = Mo(h(p.value));
  30908. let Z = Q;
  30909. Q.isNaN() ? Z = c.value : Z = w(Q, F), t.value !== void 0 ? m(c.value, !1) : Z.isNaN() || m(Z, !1);
  30910. }, V = (F) => {
  30911. var Q;
  30912. const {
  30913. which: Z
  30914. } = F;
  30915. 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());
  30916. }, z = () => {
  30917. l.value = !1;
  30918. }, W = (F) => {
  30919. N(!1), s.value = !1, l.value = !1, i("blur", F);
  30920. };
  30921. return se(() => t.precision, () => {
  30922. c.value.isInvalidate() || m(c.value, !1);
  30923. }, {
  30924. flush: "post"
  30925. }), se(() => t.value, () => {
  30926. const F = Mo(t.value);
  30927. c.value = F;
  30928. const Q = Mo(h(p.value));
  30929. (!F.equals(Q) || !l.value || t.formatter) && m(F, l.value);
  30930. }, {
  30931. flush: "post"
  30932. }), se(p, () => {
  30933. t.formatter && x();
  30934. }, {
  30935. flush: "post"
  30936. }), se(() => t.disabled, (F) => {
  30937. F && (s.value = !1);
  30938. }), a({
  30939. focus: () => {
  30940. var F;
  30941. (F = o.value) === null || F === void 0 || F.focus();
  30942. },
  30943. blur: () => {
  30944. var F;
  30945. (F = o.value) === null || F === void 0 || F.blur();
  30946. }
  30947. }), () => {
  30948. const F = I(I({}, n), t), {
  30949. prefixCls: Q = "rc-input-number",
  30950. min: Z,
  30951. max: ne,
  30952. step: ee = 1,
  30953. defaultValue: oe,
  30954. value: K,
  30955. disabled: ie,
  30956. readonly: X,
  30957. keyboard: H,
  30958. controls: G = !0,
  30959. autofocus: re,
  30960. stringMode: fe,
  30961. parser: de,
  30962. formatter: Ee,
  30963. precision: $e,
  30964. decimalSeparator: Se,
  30965. onChange: be,
  30966. onInput: he,
  30967. onPressEnter: Te,
  30968. onStep: ze,
  30969. lazy: ut,
  30970. class: ct,
  30971. style: Dt
  30972. } = F, ve = cTe(F, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
  30973. upHandler: Xe,
  30974. downHandler: Rt
  30975. } = r, An = `${Q}-input`, sn = {};
  30976. return ut ? sn.onChange = E : sn.onInput = E, M("div", {
  30977. class: ye(Q, ct, {
  30978. [`${Q}-focused`]: s.value,
  30979. [`${Q}-disabled`]: ie,
  30980. [`${Q}-readonly`]: X,
  30981. [`${Q}-not-a-number`]: c.value.isNaN(),
  30982. [`${Q}-out-of-range`]: !c.value.isInvalidate() && !T(c.value)
  30983. }),
  30984. style: Dt,
  30985. onKeydown: V,
  30986. onKeyup: z
  30987. }, [G && M(sTe, {
  30988. prefixCls: Q,
  30989. upDisabled: _.value,
  30990. downDisabled: O.value,
  30991. onStep: R
  30992. }, {
  30993. upNode: Xe,
  30994. downNode: Rt
  30995. }), M("div", {
  30996. class: `${An}-wrap`
  30997. }, [M("input", j(j(j({
  30998. autofocus: re,
  30999. autocomplete: "off",
  31000. role: "spinbutton",
  31001. "aria-valuemin": Z,
  31002. "aria-valuemax": ne,
  31003. "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
  31004. step: ee
  31005. }, ve), {}, {
  31006. ref: o,
  31007. class: An,
  31008. value: p.value,
  31009. disabled: ie,
  31010. readonly: X,
  31011. onFocus: ($r) => {
  31012. s.value = !0, i("focus", $r);
  31013. }
  31014. }, sn), {}, {
  31015. onBlur: W,
  31016. onCompositionstart: A,
  31017. onCompositionend: D
  31018. }), null)])]);
  31019. };
  31020. }
  31021. });
  31022. function IC(t) {
  31023. return t != null;
  31024. }
  31025. const dTe = (t) => {
  31026. const {
  31027. componentCls: e,
  31028. lineWidth: n,
  31029. lineType: r,
  31030. colorBorder: i,
  31031. borderRadius: a,
  31032. fontSizeLG: o,
  31033. controlHeightLG: s,
  31034. controlHeightSM: l,
  31035. colorError: u,
  31036. inputPaddingHorizontalSM: c,
  31037. colorTextDescription: f,
  31038. motionDurationMid: d,
  31039. colorPrimary: h,
  31040. controlHeight: p,
  31041. inputPaddingHorizontal: v,
  31042. colorBgContainer: g,
  31043. colorTextDisabled: m,
  31044. borderRadiusSM: y,
  31045. borderRadiusLG: b,
  31046. controlWidth: _,
  31047. handleVisible: O
  31048. } = t;
  31049. return [
  31050. {
  31051. [e]: I(I(I(I({}, nn(t)), mx(t)), gx(t, e)), {
  31052. display: "inline-block",
  31053. width: _,
  31054. margin: 0,
  31055. padding: 0,
  31056. border: `${n}px ${r} ${i}`,
  31057. borderRadius: a,
  31058. "&-rtl": {
  31059. direction: "rtl",
  31060. [`${e}-input`]: {
  31061. direction: "rtl"
  31062. }
  31063. },
  31064. "&-lg": {
  31065. padding: 0,
  31066. fontSize: o,
  31067. borderRadius: b,
  31068. [`input${e}-input`]: {
  31069. height: s - 2 * n
  31070. }
  31071. },
  31072. "&-sm": {
  31073. padding: 0,
  31074. borderRadius: y,
  31075. [`input${e}-input`]: {
  31076. height: l - 2 * n,
  31077. padding: `0 ${c}px`
  31078. }
  31079. },
  31080. "&:hover": I({}, b0(t)),
  31081. "&-focused": I({}, N1(t)),
  31082. "&-disabled": I(I({}, iX(t)), {
  31083. [`${e}-input`]: {
  31084. cursor: "not-allowed"
  31085. }
  31086. }),
  31087. // ===================== Out Of Range =====================
  31088. "&-out-of-range": {
  31089. input: {
  31090. color: u
  31091. }
  31092. },
  31093. // Style for input-group: input with label, with button or dropdown...
  31094. "&-group": I(I(I({}, nn(t)), sX(t)), {
  31095. "&-wrapper": {
  31096. display: "inline-block",
  31097. textAlign: "start",
  31098. verticalAlign: "top",
  31099. [`${e}-affix-wrapper`]: {
  31100. width: "100%"
  31101. },
  31102. // Size
  31103. "&-lg": {
  31104. [`${e}-group-addon`]: {
  31105. borderRadius: b
  31106. }
  31107. },
  31108. "&-sm": {
  31109. [`${e}-group-addon`]: {
  31110. borderRadius: y
  31111. }
  31112. }
  31113. }
  31114. }),
  31115. [e]: {
  31116. "&-input": I(I({
  31117. width: "100%",
  31118. height: p - 2 * n,
  31119. padding: `0 ${v}px`,
  31120. textAlign: "start",
  31121. backgroundColor: "transparent",
  31122. border: 0,
  31123. borderRadius: a,
  31124. outline: 0,
  31125. transition: `all ${d} linear`,
  31126. appearance: "textfield",
  31127. color: t.colorText,
  31128. fontSize: "inherit",
  31129. verticalAlign: "top"
  31130. }, rX(t.colorTextPlaceholder)), {
  31131. '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
  31132. margin: 0,
  31133. /* stylelint-disable-next-line property-no-vendor-prefix */
  31134. webkitAppearance: "none",
  31135. appearance: "none"
  31136. }
  31137. })
  31138. }
  31139. })
  31140. },
  31141. // Handler
  31142. {
  31143. [e]: {
  31144. [`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]: {
  31145. opacity: 1
  31146. },
  31147. [`${e}-handler-wrap`]: {
  31148. position: "absolute",
  31149. insetBlockStart: 0,
  31150. insetInlineEnd: 0,
  31151. width: t.handleWidth,
  31152. height: "100%",
  31153. background: g,
  31154. borderStartStartRadius: 0,
  31155. borderStartEndRadius: a,
  31156. borderEndEndRadius: a,
  31157. borderEndStartRadius: 0,
  31158. opacity: O === !0 ? 1 : 0,
  31159. display: "flex",
  31160. flexDirection: "column",
  31161. alignItems: "stretch",
  31162. transition: `opacity ${d} linear ${d}`,
  31163. // Fix input number inside Menu makes icon too large
  31164. // We arise the selector priority by nest selector here
  31165. // https://github.com/ant-design/ant-design/issues/14367
  31166. [`${e}-handler`]: {
  31167. display: "flex",
  31168. alignItems: "center",
  31169. justifyContent: "center",
  31170. flex: "auto",
  31171. height: "40%",
  31172. [`
  31173. ${e}-handler-up-inner,
  31174. ${e}-handler-down-inner
  31175. `]: {
  31176. marginInlineEnd: 0,
  31177. fontSize: t.handleFontSize
  31178. }
  31179. }
  31180. },
  31181. [`${e}-handler`]: {
  31182. height: "50%",
  31183. overflow: "hidden",
  31184. color: f,
  31185. fontWeight: "bold",
  31186. lineHeight: 0,
  31187. textAlign: "center",
  31188. cursor: "pointer",
  31189. borderInlineStart: `${n}px ${r} ${i}`,
  31190. transition: `all ${d} linear`,
  31191. "&:active": {
  31192. background: t.colorFillAlter
  31193. },
  31194. // Hover
  31195. "&:hover": {
  31196. height: "60%",
  31197. [`
  31198. ${e}-handler-up-inner,
  31199. ${e}-handler-down-inner
  31200. `]: {
  31201. color: h
  31202. }
  31203. },
  31204. "&-up-inner, &-down-inner": I(I({}, ip()), {
  31205. color: f,
  31206. transition: `all ${d} linear`,
  31207. userSelect: "none"
  31208. })
  31209. },
  31210. [`${e}-handler-up`]: {
  31211. borderStartEndRadius: a
  31212. },
  31213. [`${e}-handler-down`]: {
  31214. borderBlockStart: `${n}px ${r} ${i}`,
  31215. borderEndEndRadius: a
  31216. },
  31217. // Disabled
  31218. "&-disabled, &-readonly": {
  31219. [`${e}-handler-wrap`]: {
  31220. display: "none"
  31221. }
  31222. },
  31223. [`
  31224. ${e}-handler-up-disabled,
  31225. ${e}-handler-down-disabled
  31226. `]: {
  31227. cursor: "not-allowed"
  31228. },
  31229. [`
  31230. ${e}-handler-up-disabled:hover &-handler-up-inner,
  31231. ${e}-handler-down-disabled:hover &-handler-down-inner
  31232. `]: {
  31233. color: m
  31234. }
  31235. }
  31236. },
  31237. // Border-less
  31238. {
  31239. [`${e}-borderless`]: {
  31240. borderColor: "transparent",
  31241. boxShadow: "none",
  31242. [`${e}-handler-down`]: {
  31243. borderBlockStartWidth: 0
  31244. }
  31245. }
  31246. }
  31247. ];
  31248. }, hTe = (t) => {
  31249. const {
  31250. componentCls: e,
  31251. inputPaddingHorizontal: n,
  31252. inputAffixPadding: r,
  31253. controlWidth: i,
  31254. borderRadiusLG: a,
  31255. borderRadiusSM: o
  31256. } = t;
  31257. return {
  31258. [`${e}-affix-wrapper`]: I(I(I({}, mx(t)), gx(t, `${e}-affix-wrapper`)), {
  31259. // or number handler will cover form status
  31260. position: "relative",
  31261. display: "inline-flex",
  31262. width: i,
  31263. padding: 0,
  31264. paddingInlineStart: n,
  31265. "&-lg": {
  31266. borderRadius: a
  31267. },
  31268. "&-sm": {
  31269. borderRadius: o
  31270. },
  31271. [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, b0(t)), {
  31272. zIndex: 1
  31273. }),
  31274. "&-focused, &:focus": {
  31275. zIndex: 1
  31276. },
  31277. "&-disabled": {
  31278. [`${e}[disabled]`]: {
  31279. background: "transparent"
  31280. }
  31281. },
  31282. [`> div${e}`]: {
  31283. width: "100%",
  31284. border: "none",
  31285. outline: "none",
  31286. [`&${e}-focused`]: {
  31287. boxShadow: "none !important"
  31288. }
  31289. },
  31290. [`input${e}-input`]: {
  31291. padding: 0
  31292. },
  31293. "&::before": {
  31294. width: 0,
  31295. visibility: "hidden",
  31296. content: '"\\a0"'
  31297. },
  31298. [`${e}-handler-wrap`]: {
  31299. zIndex: 2
  31300. },
  31301. [e]: {
  31302. "&-prefix, &-suffix": {
  31303. display: "flex",
  31304. flex: "none",
  31305. alignItems: "center",
  31306. pointerEvents: "none"
  31307. },
  31308. "&-prefix": {
  31309. marginInlineEnd: r
  31310. },
  31311. "&-suffix": {
  31312. position: "absolute",
  31313. insetBlockStart: 0,
  31314. insetInlineEnd: 0,
  31315. zIndex: 1,
  31316. height: "100%",
  31317. marginInlineEnd: n,
  31318. marginInlineStart: r
  31319. }
  31320. }
  31321. })
  31322. };
  31323. }, pTe = Sn("InputNumber", (t) => {
  31324. const e = lX(t);
  31325. return [
  31326. dTe(e),
  31327. hTe(e),
  31328. // =====================================================
  31329. // == Space Compact ==
  31330. // =====================================================
  31331. cx(e)
  31332. ];
  31333. }, (t) => ({
  31334. controlWidth: 90,
  31335. handleWidth: t.controlHeightSM - t.lineWidth * 2,
  31336. handleFontSize: t.fontSize / 2,
  31337. handleVisible: "auto"
  31338. }));
  31339. var vTe = function(t, e) {
  31340. var n = {};
  31341. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31342. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31343. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31344. return n;
  31345. };
  31346. const y3 = pY(), gTe = () => I(I({}, y3), {
  31347. size: hn(),
  31348. bordered: nt(!0),
  31349. placeholder: String,
  31350. name: String,
  31351. id: String,
  31352. type: String,
  31353. addonBefore: Y.any,
  31354. addonAfter: Y.any,
  31355. prefix: Y.any,
  31356. "onUpdate:value": y3.onChange,
  31357. valueModifiers: Object,
  31358. status: hn()
  31359. }), DC = te({
  31360. compatConfig: {
  31361. MODE: 3
  31362. },
  31363. name: "AInputNumber",
  31364. inheritAttrs: !1,
  31365. props: gTe(),
  31366. // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  31367. slots: Object,
  31368. setup(t, e) {
  31369. let {
  31370. emit: n,
  31371. expose: r,
  31372. attrs: i,
  31373. slots: a
  31374. } = e;
  31375. var o;
  31376. const s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), {
  31377. prefixCls: c,
  31378. size: f,
  31379. direction: d,
  31380. disabled: h
  31381. } = It("input-number", t), {
  31382. compactSize: p,
  31383. compactItemClassnames: v
  31384. } = sx(c, d), g = Ko(), m = L(() => {
  31385. var A;
  31386. return (A = h.value) !== null && A !== void 0 ? A : g.value;
  31387. }), [y, b] = pTe(c), _ = L(() => p.value || f.value), O = ae((o = t.value) !== null && o !== void 0 ? o : t.defaultValue), S = ae(!1);
  31388. se(() => t.value, () => {
  31389. O.value = t.value;
  31390. });
  31391. const x = ae(null), C = () => {
  31392. var A;
  31393. (A = x.value) === null || A === void 0 || A.focus();
  31394. };
  31395. r({
  31396. focus: C,
  31397. blur: () => {
  31398. var A;
  31399. (A = x.value) === null || A === void 0 || A.blur();
  31400. }
  31401. });
  31402. const w = (A) => {
  31403. t.value === void 0 && (O.value = A), n("update:value", A), n("change", A), s.onFieldChange();
  31404. }, P = (A) => {
  31405. S.value = !1, n("blur", A), s.onFieldBlur();
  31406. }, $ = (A) => {
  31407. S.value = !0, n("focus", A);
  31408. };
  31409. return () => {
  31410. var A, D, E, R;
  31411. const {
  31412. hasFeedback: N,
  31413. isFormItemInput: V,
  31414. feedbackIcon: z
  31415. } = l, W = (A = t.id) !== null && A !== void 0 ? A : s.id.value, F = I(I(I({}, i), t), {
  31416. id: W,
  31417. disabled: m.value
  31418. }), {
  31419. class: Q,
  31420. bordered: Z,
  31421. readonly: ne,
  31422. style: ee,
  31423. addonBefore: oe = (D = a.addonBefore) === null || D === void 0 ? void 0 : D.call(a),
  31424. addonAfter: K = (E = a.addonAfter) === null || E === void 0 ? void 0 : E.call(a),
  31425. prefix: ie = (R = a.prefix) === null || R === void 0 ? void 0 : R.call(a),
  31426. valueModifiers: X = {}
  31427. } = F, H = vTe(F, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), G = c.value, re = ye({
  31428. [`${G}-lg`]: _.value === "large",
  31429. [`${G}-sm`]: _.value === "small",
  31430. [`${G}-rtl`]: d.value === "rtl",
  31431. [`${G}-readonly`]: ne,
  31432. [`${G}-borderless`]: !Z,
  31433. [`${G}-in-form-item`]: V
  31434. }, Is(G, u.value), Q, v.value, b.value);
  31435. let fe = M(fTe, j(j({}, or(H, ["size", "defaultValue"])), {}, {
  31436. ref: x,
  31437. lazy: !!X.lazy,
  31438. value: O.value,
  31439. class: re,
  31440. prefixCls: G,
  31441. readonly: ne,
  31442. onChange: w,
  31443. onBlur: P,
  31444. onFocus: $
  31445. }), {
  31446. upHandler: a.upIcon ? () => M("span", {
  31447. class: `${G}-handler-up-inner`
  31448. }, [a.upIcon()]) : () => M(wD, {
  31449. class: `${G}-handler-up-inner`
  31450. }, null),
  31451. downHandler: a.downIcon ? () => M("span", {
  31452. class: `${G}-handler-down-inner`
  31453. }, [a.downIcon()]) : () => M(tx, {
  31454. class: `${G}-handler-down-inner`
  31455. }, null)
  31456. });
  31457. const de = IC(oe) || IC(K), Ee = IC(ie);
  31458. if (Ee || N) {
  31459. const $e = ye(`${G}-affix-wrapper`, Is(`${G}-affix-wrapper`, u.value, N), {
  31460. [`${G}-affix-wrapper-focused`]: S.value,
  31461. [`${G}-affix-wrapper-disabled`]: m.value,
  31462. [`${G}-affix-wrapper-sm`]: _.value === "small",
  31463. [`${G}-affix-wrapper-lg`]: _.value === "large",
  31464. [`${G}-affix-wrapper-rtl`]: d.value === "rtl",
  31465. [`${G}-affix-wrapper-readonly`]: ne,
  31466. [`${G}-affix-wrapper-borderless`]: !Z,
  31467. // className will go to addon wrapper
  31468. [`${Q}`]: !de && Q
  31469. }, b.value);
  31470. fe = M("div", {
  31471. class: $e,
  31472. style: ee,
  31473. onClick: C
  31474. }, [Ee && M("span", {
  31475. class: `${G}-prefix`
  31476. }, [ie]), fe, N && M("span", {
  31477. class: `${G}-suffix`
  31478. }, [z])]);
  31479. }
  31480. if (de) {
  31481. const $e = `${G}-group`, Se = `${$e}-addon`, be = oe ? M("div", {
  31482. class: Se
  31483. }, [oe]) : null, he = K ? M("div", {
  31484. class: Se
  31485. }, [K]) : null, Te = ye(`${G}-wrapper`, $e, {
  31486. [`${$e}-rtl`]: d.value === "rtl"
  31487. }, b.value), ze = ye(`${G}-group-wrapper`, {
  31488. [`${G}-group-wrapper-sm`]: _.value === "small",
  31489. [`${G}-group-wrapper-lg`]: _.value === "large",
  31490. [`${G}-group-wrapper-rtl`]: d.value === "rtl"
  31491. }, Is(`${c}-group-wrapper`, u.value, N), Q, b.value);
  31492. fe = M("div", {
  31493. class: ze,
  31494. style: ee
  31495. }, [M("div", {
  31496. class: Te
  31497. }, [be && M(E1, null, {
  31498. default: () => [M(P1, null, {
  31499. default: () => [be]
  31500. })]
  31501. }), fe, he && M(E1, null, {
  31502. default: () => [M(P1, null, {
  31503. default: () => [he]
  31504. })]
  31505. })])]);
  31506. }
  31507. return y(Pn(fe, {
  31508. style: ee
  31509. }));
  31510. };
  31511. }
  31512. }), O0 = I(DC, {
  31513. install: (t) => (t.component(DC.name, DC), t)
  31514. });
  31515. function mTe(t, e, n) {
  31516. 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;
  31517. function h() {
  31518. c && clearTimeout(c);
  31519. }
  31520. function p(g) {
  31521. var m = g || {}, y = m.upcomingOnly, b = y === void 0 ? !1 : y;
  31522. h(), f = !b;
  31523. }
  31524. function v() {
  31525. for (var g = arguments.length, m = new Array(g), y = 0; y < g; y++)
  31526. m[y] = arguments[y];
  31527. var b = this, _ = Date.now() - d;
  31528. if (f)
  31529. return;
  31530. function O() {
  31531. d = Date.now(), e.apply(b, m);
  31532. }
  31533. function S() {
  31534. c = void 0;
  31535. }
  31536. !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));
  31537. }
  31538. return v.cancel = p, v;
  31539. }
  31540. function yTe(t, e, n) {
  31541. var r = {}, i = r.atBegin, a = i === void 0 ? !1 : i;
  31542. return mTe(t, e, {
  31543. debounceMode: a !== !1
  31544. });
  31545. }
  31546. const bTe = new Ot("antSpinMove", {
  31547. to: {
  31548. opacity: 1
  31549. }
  31550. }), _Te = new Ot("antRotate", {
  31551. to: {
  31552. transform: "rotate(405deg)"
  31553. }
  31554. }), OTe = (t) => ({
  31555. [`${t.componentCls}`]: I(I({}, nn(t)), {
  31556. position: "absolute",
  31557. display: "none",
  31558. color: t.colorPrimary,
  31559. textAlign: "center",
  31560. verticalAlign: "middle",
  31561. opacity: 0,
  31562. transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,
  31563. "&-spinning": {
  31564. position: "static",
  31565. display: "inline-block",
  31566. opacity: 1
  31567. },
  31568. "&-nested-loading": {
  31569. position: "relative",
  31570. [`> div > ${t.componentCls}`]: {
  31571. position: "absolute",
  31572. top: 0,
  31573. insetInlineStart: 0,
  31574. zIndex: 4,
  31575. display: "block",
  31576. width: "100%",
  31577. height: "100%",
  31578. maxHeight: t.contentHeight,
  31579. [`${t.componentCls}-dot`]: {
  31580. position: "absolute",
  31581. top: "50%",
  31582. insetInlineStart: "50%",
  31583. margin: -t.spinDotSize / 2
  31584. },
  31585. [`${t.componentCls}-text`]: {
  31586. position: "absolute",
  31587. top: "50%",
  31588. width: "100%",
  31589. paddingTop: (t.spinDotSize - t.fontSize) / 2 + 2,
  31590. textShadow: `0 1px 2px ${t.colorBgContainer}`
  31591. // FIXME: shadow
  31592. },
  31593. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31594. marginTop: -(t.spinDotSize / 2) - 10
  31595. },
  31596. "&-sm": {
  31597. [`${t.componentCls}-dot`]: {
  31598. margin: -t.spinDotSizeSM / 2
  31599. },
  31600. [`${t.componentCls}-text`]: {
  31601. paddingTop: (t.spinDotSizeSM - t.fontSize) / 2 + 2
  31602. },
  31603. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31604. marginTop: -(t.spinDotSizeSM / 2) - 10
  31605. }
  31606. },
  31607. "&-lg": {
  31608. [`${t.componentCls}-dot`]: {
  31609. margin: -(t.spinDotSizeLG / 2)
  31610. },
  31611. [`${t.componentCls}-text`]: {
  31612. paddingTop: (t.spinDotSizeLG - t.fontSize) / 2 + 2
  31613. },
  31614. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31615. marginTop: -(t.spinDotSizeLG / 2) - 10
  31616. }
  31617. }
  31618. },
  31619. [`${t.componentCls}-container`]: {
  31620. position: "relative",
  31621. transition: `opacity ${t.motionDurationSlow}`,
  31622. "&::after": {
  31623. position: "absolute",
  31624. top: 0,
  31625. insetInlineEnd: 0,
  31626. bottom: 0,
  31627. insetInlineStart: 0,
  31628. zIndex: 10,
  31629. width: "100%",
  31630. height: "100%",
  31631. background: t.colorBgContainer,
  31632. opacity: 0,
  31633. transition: `all ${t.motionDurationSlow}`,
  31634. content: '""',
  31635. pointerEvents: "none"
  31636. }
  31637. },
  31638. [`${t.componentCls}-blur`]: {
  31639. clear: "both",
  31640. opacity: 0.5,
  31641. userSelect: "none",
  31642. pointerEvents: "none",
  31643. "&::after": {
  31644. opacity: 0.4,
  31645. pointerEvents: "auto"
  31646. }
  31647. }
  31648. },
  31649. // tip
  31650. // ------------------------------
  31651. "&-tip": {
  31652. color: t.spinDotDefault
  31653. },
  31654. // dots
  31655. // ------------------------------
  31656. [`${t.componentCls}-dot`]: {
  31657. position: "relative",
  31658. display: "inline-block",
  31659. fontSize: t.spinDotSize,
  31660. width: "1em",
  31661. height: "1em",
  31662. "&-item": {
  31663. position: "absolute",
  31664. display: "block",
  31665. width: (t.spinDotSize - t.marginXXS / 2) / 2,
  31666. height: (t.spinDotSize - t.marginXXS / 2) / 2,
  31667. backgroundColor: t.colorPrimary,
  31668. borderRadius: "100%",
  31669. transform: "scale(0.75)",
  31670. transformOrigin: "50% 50%",
  31671. opacity: 0.3,
  31672. animationName: bTe,
  31673. animationDuration: "1s",
  31674. animationIterationCount: "infinite",
  31675. animationTimingFunction: "linear",
  31676. animationDirection: "alternate",
  31677. "&:nth-child(1)": {
  31678. top: 0,
  31679. insetInlineStart: 0
  31680. },
  31681. "&:nth-child(2)": {
  31682. top: 0,
  31683. insetInlineEnd: 0,
  31684. animationDelay: "0.4s"
  31685. },
  31686. "&:nth-child(3)": {
  31687. insetInlineEnd: 0,
  31688. bottom: 0,
  31689. animationDelay: "0.8s"
  31690. },
  31691. "&:nth-child(4)": {
  31692. bottom: 0,
  31693. insetInlineStart: 0,
  31694. animationDelay: "1.2s"
  31695. }
  31696. },
  31697. "&-spin": {
  31698. transform: "rotate(45deg)",
  31699. animationName: _Te,
  31700. animationDuration: "1.2s",
  31701. animationIterationCount: "infinite",
  31702. animationTimingFunction: "linear"
  31703. }
  31704. },
  31705. // Sizes
  31706. // ------------------------------
  31707. // small
  31708. [`&-sm ${t.componentCls}-dot`]: {
  31709. fontSize: t.spinDotSizeSM,
  31710. i: {
  31711. width: (t.spinDotSizeSM - t.marginXXS / 2) / 2,
  31712. height: (t.spinDotSizeSM - t.marginXXS / 2) / 2
  31713. }
  31714. },
  31715. // large
  31716. [`&-lg ${t.componentCls}-dot`]: {
  31717. fontSize: t.spinDotSizeLG,
  31718. i: {
  31719. width: (t.spinDotSizeLG - t.marginXXS) / 2,
  31720. height: (t.spinDotSizeLG - t.marginXXS) / 2
  31721. }
  31722. },
  31723. [`&${t.componentCls}-show-text ${t.componentCls}-text`]: {
  31724. display: "block"
  31725. }
  31726. })
  31727. }), STe = Sn("Spin", (t) => {
  31728. const e = Bt(t, {
  31729. spinDotDefault: t.colorTextDescription,
  31730. spinDotSize: t.controlHeightLG / 2,
  31731. spinDotSizeSM: t.controlHeightLG * 0.35,
  31732. spinDotSizeLG: t.controlHeight
  31733. });
  31734. return [OTe(e)];
  31735. }, {
  31736. contentHeight: 400
  31737. });
  31738. var xTe = function(t, e) {
  31739. var n = {};
  31740. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31741. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31742. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31743. return n;
  31744. };
  31745. const wTe = () => ({
  31746. prefixCls: String,
  31747. spinning: {
  31748. type: Boolean,
  31749. default: void 0
  31750. },
  31751. size: String,
  31752. wrapperClassName: String,
  31753. tip: Y.any,
  31754. delay: Number,
  31755. indicator: Y.any
  31756. });
  31757. let M_ = null;
  31758. function CTe(t, e) {
  31759. return !!t && !!e && !isNaN(Number(e));
  31760. }
  31761. function TTe(t) {
  31762. const e = t.indicator;
  31763. M_ = typeof e == "function" ? e : () => M(e, null, null);
  31764. }
  31765. const gg = te({
  31766. compatConfig: {
  31767. MODE: 3
  31768. },
  31769. name: "ASpin",
  31770. inheritAttrs: !1,
  31771. props: sr(wTe(), {
  31772. size: "default",
  31773. spinning: !0,
  31774. wrapperClassName: ""
  31775. }),
  31776. setup(t, e) {
  31777. let {
  31778. attrs: n,
  31779. slots: r
  31780. } = e;
  31781. const {
  31782. prefixCls: i,
  31783. size: a,
  31784. direction: o
  31785. } = It("spin", t), [s, l] = STe(i), u = ae(t.spinning && !CTe(t.spinning, t.delay));
  31786. let c;
  31787. return se([() => t.spinning, () => t.delay], () => {
  31788. c == null || c.cancel(), c = yTe(t.delay, () => {
  31789. u.value = t.spinning;
  31790. }), c == null || c();
  31791. }, {
  31792. immediate: !0,
  31793. flush: "post"
  31794. }), yt(() => {
  31795. c == null || c.cancel();
  31796. }), () => {
  31797. var f, d;
  31798. const {
  31799. class: h
  31800. } = n, p = xTe(n, ["class"]), {
  31801. tip: v = (f = r.tip) === null || f === void 0 ? void 0 : f.call(r)
  31802. } = t, g = (d = r.default) === null || d === void 0 ? void 0 : d.call(r), m = {
  31803. [l.value]: !0,
  31804. [i.value]: !0,
  31805. [`${i.value}-sm`]: a.value === "small",
  31806. [`${i.value}-lg`]: a.value === "large",
  31807. [`${i.value}-spinning`]: u.value,
  31808. [`${i.value}-show-text`]: !!v,
  31809. [`${i.value}-rtl`]: o.value === "rtl",
  31810. [h]: !!h
  31811. };
  31812. function y(_) {
  31813. const O = `${_}-dot`;
  31814. let S = IS(r, t, "indicator");
  31815. return S === null ? null : (Array.isArray(S) && (S = S.length === 1 ? S[0] : S), nu(S) ? Ns(S, {
  31816. class: O
  31817. }) : M_ && nu(M_()) ? Ns(M_(), {
  31818. class: O
  31819. }) : M("span", {
  31820. class: `${O} ${_}-dot-spin`
  31821. }, [M("i", {
  31822. class: `${_}-dot-item`
  31823. }, null), M("i", {
  31824. class: `${_}-dot-item`
  31825. }, null), M("i", {
  31826. class: `${_}-dot-item`
  31827. }, null), M("i", {
  31828. class: `${_}-dot-item`
  31829. }, null)]));
  31830. }
  31831. const b = M("div", j(j({}, p), {}, {
  31832. class: m,
  31833. "aria-live": "polite",
  31834. "aria-busy": u.value
  31835. }), [y(i.value), v ? M("div", {
  31836. class: `${i.value}-text`
  31837. }, [v]) : null]);
  31838. if (g && os(g).length) {
  31839. const _ = {
  31840. [`${i.value}-container`]: !0,
  31841. [`${i.value}-blur`]: u.value
  31842. };
  31843. return s(M("div", {
  31844. class: [`${i.value}-nested-loading`, t.wrapperClassName, l.value]
  31845. }, [u.value && M("div", {
  31846. key: "loading"
  31847. }, [b]), M("div", {
  31848. class: _,
  31849. key: "container"
  31850. }, [g])]));
  31851. }
  31852. return s(b);
  31853. };
  31854. }
  31855. });
  31856. gg.setDefaultIndicator = TTe;
  31857. gg.install = function(t) {
  31858. return t.component(gg.name, gg), t;
  31859. };
  31860. var PTe = function(t, e) {
  31861. var n = {};
  31862. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31863. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31864. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31865. return n;
  31866. };
  31867. let J2;
  31868. const $Te = (t) => {
  31869. J2 = {
  31870. x: t.pageX,
  31871. y: t.pageY
  31872. }, setTimeout(() => J2 = null, 100);
  31873. };
  31874. vX() && vr(document.documentElement, "click", $Te, !0);
  31875. const ATe = () => ({
  31876. prefixCls: String,
  31877. /** @deprecated Please use `open` instead. */
  31878. visible: {
  31879. type: Boolean,
  31880. default: void 0
  31881. },
  31882. open: {
  31883. type: Boolean,
  31884. default: void 0
  31885. },
  31886. confirmLoading: {
  31887. type: Boolean,
  31888. default: void 0
  31889. },
  31890. title: Y.any,
  31891. closable: {
  31892. type: Boolean,
  31893. default: void 0
  31894. },
  31895. closeIcon: Y.any,
  31896. onOk: Function,
  31897. onCancel: Function,
  31898. "onUpdate:visible": Function,
  31899. "onUpdate:open": Function,
  31900. onChange: Function,
  31901. afterClose: Function,
  31902. centered: {
  31903. type: Boolean,
  31904. default: void 0
  31905. },
  31906. width: [String, Number],
  31907. footer: Y.any,
  31908. okText: Y.any,
  31909. okType: String,
  31910. cancelText: Y.any,
  31911. icon: Y.any,
  31912. maskClosable: {
  31913. type: Boolean,
  31914. default: void 0
  31915. },
  31916. forceRender: {
  31917. type: Boolean,
  31918. default: void 0
  31919. },
  31920. okButtonProps: $t(),
  31921. cancelButtonProps: $t(),
  31922. destroyOnClose: {
  31923. type: Boolean,
  31924. default: void 0
  31925. },
  31926. wrapClassName: String,
  31927. maskTransitionName: String,
  31928. transitionName: String,
  31929. getContainer: {
  31930. type: [String, Function, Boolean, Object],
  31931. default: void 0
  31932. },
  31933. zIndex: Number,
  31934. bodyStyle: $t(),
  31935. maskStyle: $t(),
  31936. mask: {
  31937. type: Boolean,
  31938. default: void 0
  31939. },
  31940. keyboard: {
  31941. type: Boolean,
  31942. default: void 0
  31943. },
  31944. wrapProps: Object,
  31945. focusTriggerAfterClose: {
  31946. type: Boolean,
  31947. default: void 0
  31948. },
  31949. modalRender: Function,
  31950. mousePosition: $t()
  31951. }), Hi = te({
  31952. compatConfig: {
  31953. MODE: 3
  31954. },
  31955. name: "AModal",
  31956. inheritAttrs: !1,
  31957. props: sr(ATe(), {
  31958. width: 520,
  31959. confirmLoading: !1,
  31960. okType: "primary"
  31961. }),
  31962. setup(t, e) {
  31963. let {
  31964. emit: n,
  31965. slots: r,
  31966. attrs: i
  31967. } = e;
  31968. const [a] = RS("Modal"), {
  31969. prefixCls: o,
  31970. rootPrefixCls: s,
  31971. direction: l,
  31972. getPopupContainer: u
  31973. } = It("modal", t), [c, f] = ZCe(o);
  31974. Xr(t.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
  31975. const d = (v) => {
  31976. n("update:visible", !1), n("update:open", !1), n("cancel", v), n("change", !1);
  31977. }, h = (v) => {
  31978. n("ok", v);
  31979. }, p = () => {
  31980. var v, g;
  31981. const {
  31982. okText: m = (v = r.okText) === null || v === void 0 ? void 0 : v.call(r),
  31983. okType: y,
  31984. cancelText: b = (g = r.cancelText) === null || g === void 0 ? void 0 : g.call(r),
  31985. confirmLoading: _
  31986. } = t;
  31987. return M(wt, null, [M(Ur, j({
  31988. onClick: d
  31989. }, t.cancelButtonProps), {
  31990. default: () => [b || a.value.cancelText]
  31991. }), M(Ur, j(j({}, LU(y)), {}, {
  31992. loading: _,
  31993. onClick: h
  31994. }, t.okButtonProps), {
  31995. default: () => [m || a.value.okText]
  31996. })]);
  31997. };
  31998. return () => {
  31999. var v, g;
  32000. const {
  32001. prefixCls: m,
  32002. visible: y,
  32003. open: b,
  32004. wrapClassName: _,
  32005. centered: O,
  32006. getContainer: S,
  32007. closeIcon: x = (v = r.closeIcon) === null || v === void 0 ? void 0 : v.call(r),
  32008. focusTriggerAfterClose: C = !0
  32009. } = t, T = PTe(t, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), w = ye(_, {
  32010. [`${o.value}-centered`]: !!O,
  32011. [`${o.value}-wrap-rtl`]: l.value === "rtl"
  32012. });
  32013. return c(M(iY, j(j(j({}, T), i), {}, {
  32014. rootClassName: f.value,
  32015. class: ye(f.value, i.class),
  32016. getContainer: S || (u == null ? void 0 : u.value),
  32017. prefixCls: o.value,
  32018. wrapClassName: w,
  32019. visible: b ?? y,
  32020. onClose: d,
  32021. focusTriggerAfterClose: C,
  32022. transitionName: es(s.value, "zoom", t.transitionName),
  32023. maskTransitionName: es(s.value, "fade", t.maskTransitionName),
  32024. mousePosition: (g = T.mousePosition) !== null && g !== void 0 ? g : J2
  32025. }), I(I({}, r), {
  32026. footer: r.footer || p,
  32027. closeIcon: () => M("span", {
  32028. class: `${o.value}-close-x`
  32029. }, [x || M(al, {
  32030. class: `${o.value}-close-icon`
  32031. }, null)])
  32032. })));
  32033. };
  32034. }
  32035. }), ETe = () => {
  32036. const t = ae(!1);
  32037. return yt(() => {
  32038. t.value = !0;
  32039. }), t;
  32040. }, MTe = {
  32041. type: {
  32042. type: String
  32043. },
  32044. actionFn: Function,
  32045. close: Function,
  32046. autofocus: Boolean,
  32047. prefixCls: String,
  32048. buttonProps: $t(),
  32049. emitEvent: Boolean,
  32050. quitOnNullishReturnValue: Boolean
  32051. };
  32052. function b3(t) {
  32053. return !!(t && t.then);
  32054. }
  32055. const _3 = te({
  32056. compatConfig: {
  32057. MODE: 3
  32058. },
  32059. name: "ActionButton",
  32060. props: MTe,
  32061. setup(t, e) {
  32062. let {
  32063. slots: n
  32064. } = e;
  32065. const r = ae(!1), i = ae(), a = ae(!1);
  32066. let o;
  32067. const s = ETe();
  32068. it(() => {
  32069. t.autofocus && (o = setTimeout(() => {
  32070. var f, d;
  32071. return (d = (f = Cs(i.value)) === null || f === void 0 ? void 0 : f.focus) === null || d === void 0 ? void 0 : d.call(f);
  32072. }));
  32073. }), yt(() => {
  32074. clearTimeout(o);
  32075. });
  32076. const l = function() {
  32077. for (var f, d = arguments.length, h = new Array(d), p = 0; p < d; p++)
  32078. h[p] = arguments[p];
  32079. (f = t.close) === null || f === void 0 || f.call(t, ...h);
  32080. }, u = (f) => {
  32081. b3(f) && (a.value = !0, f.then(function() {
  32082. s.value || (a.value = !1), l(...arguments), r.value = !1;
  32083. }, (d) => (s.value || (a.value = !1), r.value = !1, Promise.reject(d))));
  32084. }, c = (f) => {
  32085. const {
  32086. actionFn: d
  32087. } = t;
  32088. if (r.value)
  32089. return;
  32090. if (r.value = !0, !d) {
  32091. l();
  32092. return;
  32093. }
  32094. let h;
  32095. if (t.emitEvent) {
  32096. if (h = d(f), t.quitOnNullishReturnValue && !b3(h)) {
  32097. r.value = !1, l(f);
  32098. return;
  32099. }
  32100. } else if (d.length)
  32101. h = d(t.close), r.value = !1;
  32102. else if (h = d(), !h) {
  32103. l();
  32104. return;
  32105. }
  32106. u(h);
  32107. };
  32108. return () => {
  32109. const {
  32110. type: f,
  32111. prefixCls: d,
  32112. buttonProps: h
  32113. } = t;
  32114. return M(Ur, j(j(j({}, LU(f)), {}, {
  32115. onClick: c,
  32116. loading: a.value,
  32117. prefixCls: d
  32118. }, h), {}, {
  32119. ref: i
  32120. }), n);
  32121. };
  32122. }
  32123. });
  32124. function Kf(t) {
  32125. return typeof t == "function" ? t() : t;
  32126. }
  32127. const vY = te({
  32128. name: "ConfirmDialog",
  32129. inheritAttrs: !1,
  32130. 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"],
  32131. setup(t, e) {
  32132. let {
  32133. attrs: n
  32134. } = e;
  32135. const [r] = RS("Modal");
  32136. return process.env.NODE_ENV !== "production" && Xr(t.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
  32137. const {
  32138. icon: i,
  32139. onCancel: a,
  32140. onOk: o,
  32141. close: s,
  32142. okText: l,
  32143. closable: u = !1,
  32144. zIndex: c,
  32145. afterClose: f,
  32146. keyboard: d,
  32147. centered: h,
  32148. getContainer: p,
  32149. maskStyle: v,
  32150. okButtonProps: g,
  32151. cancelButtonProps: m,
  32152. okCancel: y,
  32153. width: b = 416,
  32154. mask: _ = !0,
  32155. maskClosable: O = !1,
  32156. type: S,
  32157. open: x,
  32158. title: C,
  32159. content: T,
  32160. direction: w,
  32161. closeIcon: P,
  32162. modalRender: $,
  32163. focusTriggerAfterClose: A,
  32164. rootPrefixCls: D,
  32165. bodyStyle: E,
  32166. wrapClassName: R,
  32167. footer: N
  32168. } = t;
  32169. let V = i;
  32170. if (!i && i !== null)
  32171. switch (S) {
  32172. case "info":
  32173. V = M(If, null, null);
  32174. break;
  32175. case "success":
  32176. V = M(Ou, null, null);
  32177. break;
  32178. case "error":
  32179. V = M(Da, null, null);
  32180. break;
  32181. default:
  32182. V = M(Su, null, null);
  32183. }
  32184. const z = 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}`, {
  32185. [`${ee}-rtl`]: w === "rtl"
  32186. }, n.class), K = r.value, ie = Z && M(_3, {
  32187. actionFn: a,
  32188. close: s,
  32189. autofocus: ne === "cancel",
  32190. buttonProps: m,
  32191. prefixCls: `${D}-btn`
  32192. }, {
  32193. default: () => [Kf(t.cancelText) || K.cancelText]
  32194. });
  32195. return M(Hi, {
  32196. prefixCls: W,
  32197. class: oe,
  32198. wrapClassName: ye({
  32199. [`${ee}-centered`]: !!h
  32200. }, R),
  32201. onCancel: (X) => s == null ? void 0 : s({
  32202. triggerCancel: !0
  32203. }, X),
  32204. open: x,
  32205. title: "",
  32206. footer: "",
  32207. transitionName: es(D, "zoom", t.transitionName),
  32208. maskTransitionName: es(D, "fade", t.maskTransitionName),
  32209. mask: _,
  32210. maskClosable: O,
  32211. maskStyle: v,
  32212. style: Q,
  32213. bodyStyle: E,
  32214. width: b,
  32215. zIndex: c,
  32216. afterClose: f,
  32217. keyboard: d,
  32218. centered: h,
  32219. getContainer: p,
  32220. closable: u,
  32221. closeIcon: P,
  32222. modalRender: $,
  32223. focusTriggerAfterClose: A
  32224. }, {
  32225. default: () => [M("div", {
  32226. class: `${F}-body-wrapper`
  32227. }, [M("div", {
  32228. class: `${F}-body`
  32229. }, [Kf(V), C === void 0 ? null : M("span", {
  32230. class: `${F}-title`
  32231. }, [Kf(C)]), M("div", {
  32232. class: `${F}-content`
  32233. }, [Kf(T)])]), N !== void 0 ? Kf(N) : M("div", {
  32234. class: `${F}-btns`
  32235. }, [ie, M(_3, {
  32236. type: z,
  32237. actionFn: o,
  32238. close: s,
  32239. autofocus: ne === "ok",
  32240. buttonProps: g,
  32241. prefixCls: `${D}-btn`
  32242. }, {
  32243. default: () => [Kf(l) || (Z ? K.okText : K.justOkText)]
  32244. })])])]
  32245. });
  32246. };
  32247. }
  32248. }), Dc = [], S0 = (t) => {
  32249. const e = document.createDocumentFragment();
  32250. let n = I(I({}, or(t, ["parentContext", "appContext"])), {
  32251. close: a,
  32252. open: !0
  32253. }), r = null;
  32254. function i() {
  32255. r && (sf(null, e), r = null);
  32256. for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
  32257. c[f] = arguments[f];
  32258. const d = c.some((h) => h && h.triggerCancel);
  32259. t.onCancel && d && t.onCancel(() => {
  32260. }, ...c.slice(1));
  32261. for (let h = 0; h < Dc.length; h++)
  32262. if (Dc[h] === a) {
  32263. Dc.splice(h, 1);
  32264. break;
  32265. }
  32266. }
  32267. function a() {
  32268. for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
  32269. c[f] = arguments[f];
  32270. n = I(I({}, n), {
  32271. open: !1,
  32272. afterClose: () => {
  32273. typeof t.afterClose == "function" && t.afterClose(), i.apply(this, c);
  32274. }
  32275. }), n.visible && delete n.visible, o(n);
  32276. }
  32277. function o(u) {
  32278. typeof u == "function" ? n = u(n) : n = I(I({}, n), u), r && Lde(r, n, e);
  32279. }
  32280. const s = (u) => {
  32281. const c = hr, f = c.prefixCls, d = u.prefixCls || `${f}-modal`, h = c.iconPrefixCls, p = Uxe();
  32282. return M(Xd, j(j({}, c), {}, {
  32283. prefixCls: f
  32284. }), {
  32285. default: () => [M(vY, j(j({}, u), {}, {
  32286. rootPrefixCls: f,
  32287. prefixCls: d,
  32288. iconPrefixCls: h,
  32289. locale: p,
  32290. cancelText: u.cancelText || p.cancelText
  32291. }), null)]
  32292. });
  32293. };
  32294. function l(u) {
  32295. const c = M(s, I({}, u));
  32296. return c.appContext = t.parentContext || t.appContext || c.appContext, sf(c, e), c;
  32297. }
  32298. return r = l(n), Dc.push(a), {
  32299. destroy: a,
  32300. update: o
  32301. };
  32302. };
  32303. function gY(t) {
  32304. return I(I({}, t), {
  32305. type: "warning"
  32306. });
  32307. }
  32308. function mY(t) {
  32309. return I(I({}, t), {
  32310. type: "info"
  32311. });
  32312. }
  32313. function yY(t) {
  32314. return I(I({}, t), {
  32315. type: "success"
  32316. });
  32317. }
  32318. function bY(t) {
  32319. return I(I({}, t), {
  32320. type: "error"
  32321. });
  32322. }
  32323. function _Y(t) {
  32324. return I(I({}, t), {
  32325. type: "confirm"
  32326. });
  32327. }
  32328. const ITe = () => ({
  32329. config: Object,
  32330. afterClose: Function,
  32331. destroyAction: Function,
  32332. open: Boolean
  32333. }), DTe = te({
  32334. name: "HookModal",
  32335. inheritAttrs: !1,
  32336. props: sr(ITe(), {
  32337. config: {
  32338. width: 520,
  32339. okType: "primary"
  32340. }
  32341. }),
  32342. setup(t, e) {
  32343. let {
  32344. expose: n
  32345. } = e;
  32346. var r;
  32347. const i = L(() => t.open), a = L(() => t.config), {
  32348. direction: o,
  32349. getPrefixCls: s
  32350. } = DS(), l = s("modal"), u = s(), c = () => {
  32351. var p, v;
  32352. t == null || t.afterClose(), (v = (p = a.value).afterClose) === null || v === void 0 || v.call(p);
  32353. }, f = function() {
  32354. t.destroyAction(...arguments);
  32355. };
  32356. n({
  32357. destroy: f
  32358. });
  32359. const d = (r = a.value.okCancel) !== null && r !== void 0 ? r : a.value.type === "confirm", [h] = RS("Modal", zs.Modal);
  32360. return () => M(vY, j(j({
  32361. prefixCls: l,
  32362. rootPrefixCls: u
  32363. }, a.value), {}, {
  32364. close: f,
  32365. open: i.value,
  32366. afterClose: c,
  32367. okText: a.value.okText || (d ? h == null ? void 0 : h.value.okText : h == null ? void 0 : h.value.justOkText),
  32368. direction: a.value.direction || o.value,
  32369. cancelText: a.value.cancelText || (h == null ? void 0 : h.value.cancelText)
  32370. }), null);
  32371. }
  32372. });
  32373. let O3 = 0;
  32374. const RTe = te({
  32375. name: "ElementsHolder",
  32376. inheritAttrs: !1,
  32377. setup(t, e) {
  32378. let {
  32379. expose: n
  32380. } = e;
  32381. const r = ae([]);
  32382. return n({
  32383. addModal: (a) => (r.value.push(a), r.value = r.value.slice(), () => {
  32384. r.value = r.value.filter((o) => o !== a);
  32385. })
  32386. }), () => r.value.map((a) => a());
  32387. }
  32388. });
  32389. function kTe() {
  32390. const t = ae(null), e = ae([]);
  32391. se(e, () => {
  32392. e.value.length && ([...e.value].forEach((o) => {
  32393. o();
  32394. }), e.value = []);
  32395. }, {
  32396. immediate: !0
  32397. });
  32398. const n = (a) => function(s) {
  32399. var l;
  32400. O3 += 1;
  32401. const u = ae(!0), c = ae(null), f = ae(B(s)), d = ae({});
  32402. se(() => s, (b) => {
  32403. g(I(I({}, tp(b) ? b.value : b), d.value));
  32404. });
  32405. const h = function() {
  32406. u.value = !1;
  32407. for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
  32408. _[O] = arguments[O];
  32409. const S = _.some((x) => x && x.triggerCancel);
  32410. f.value.onCancel && S && f.value.onCancel(() => {
  32411. }, ..._.slice(1));
  32412. };
  32413. let p;
  32414. const v = () => M(DTe, {
  32415. key: `modal-${O3}`,
  32416. config: a(f.value),
  32417. ref: c,
  32418. open: u.value,
  32419. destroyAction: h,
  32420. afterClose: () => {
  32421. p == null || p();
  32422. }
  32423. }, null);
  32424. p = (l = t.value) === null || l === void 0 ? void 0 : l.addModal(v), p && Dc.push(p);
  32425. const g = (b) => {
  32426. f.value = I(I({}, f.value), b);
  32427. };
  32428. return {
  32429. destroy: () => {
  32430. c.value ? h() : e.value = [...e.value, h];
  32431. },
  32432. update: (b) => {
  32433. d.value = b, c.value ? g(b) : e.value = [...e.value, () => g(b)];
  32434. }
  32435. };
  32436. }, r = L(() => ({
  32437. info: n(mY),
  32438. success: n(yY),
  32439. error: n(bY),
  32440. warning: n(gY),
  32441. confirm: n(_Y)
  32442. })), i = Symbol("modalHolderKey");
  32443. return [r.value, () => M(RTe, {
  32444. key: i,
  32445. ref: t
  32446. }, null)];
  32447. }
  32448. function OY(t) {
  32449. return S0(gY(t));
  32450. }
  32451. Hi.useModal = kTe;
  32452. Hi.info = function(e) {
  32453. return S0(mY(e));
  32454. };
  32455. Hi.success = function(e) {
  32456. return S0(yY(e));
  32457. };
  32458. Hi.error = function(e) {
  32459. return S0(bY(e));
  32460. };
  32461. Hi.warning = OY;
  32462. Hi.warn = OY;
  32463. Hi.confirm = function(e) {
  32464. return S0(_Y(e));
  32465. };
  32466. Hi.destroyAll = function() {
  32467. for (; Dc.length; ) {
  32468. const e = Dc.pop();
  32469. e && e();
  32470. }
  32471. };
  32472. Hi.install = function(t) {
  32473. return t.component(Hi.name, Hi), t;
  32474. };
  32475. const $D = (t, e) => {
  32476. let {
  32477. attrs: n
  32478. } = e;
  32479. const {
  32480. included: r,
  32481. vertical: i,
  32482. style: a,
  32483. class: o
  32484. } = n;
  32485. let {
  32486. length: s,
  32487. offset: l,
  32488. reverse: u
  32489. } = n;
  32490. s < 0 && (u = !u, s = Math.abs(s), l = 100 - l);
  32491. const c = i ? {
  32492. [u ? "top" : "bottom"]: `${l}%`,
  32493. [u ? "bottom" : "top"]: "auto",
  32494. height: `${s}%`
  32495. } : {
  32496. [u ? "right" : "left"]: `${l}%`,
  32497. [u ? "left" : "right"]: "auto",
  32498. width: `${s}%`
  32499. }, f = I(I({}, a), c);
  32500. return r ? M("div", {
  32501. class: o,
  32502. style: f
  32503. }, null) : null;
  32504. };
  32505. $D.inheritAttrs = !1;
  32506. const LTe = (t, e, n, r, i, a) => {
  32507. Xr(n ? r > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  32508. const o = Object.keys(e).map(parseFloat).sort((s, l) => s - l);
  32509. if (n && r)
  32510. for (let s = i; s <= a; s += r)
  32511. o.indexOf(s) === -1 && o.push(s);
  32512. return o;
  32513. }, SY = (t, e) => {
  32514. let {
  32515. attrs: n
  32516. } = e;
  32517. const {
  32518. prefixCls: r,
  32519. vertical: i,
  32520. reverse: a,
  32521. marks: o,
  32522. dots: s,
  32523. step: l,
  32524. included: u,
  32525. lowerBound: c,
  32526. upperBound: f,
  32527. max: d,
  32528. min: h,
  32529. dotStyle: p,
  32530. activeDotStyle: v
  32531. } = n, g = d - h, m = LTe(i, o, s, l, h, d).map((y) => {
  32532. const b = `${Math.abs(y - h) / g * 100}%`, _ = !u && y === f || u && y <= f && y >= c;
  32533. let O = i ? I(I({}, p), {
  32534. [a ? "top" : "bottom"]: b
  32535. }) : I(I({}, p), {
  32536. [a ? "right" : "left"]: b
  32537. });
  32538. _ && (O = I(I({}, O), v));
  32539. const S = ye({
  32540. [`${r}-dot`]: !0,
  32541. [`${r}-dot-active`]: _,
  32542. [`${r}-dot-reverse`]: a
  32543. });
  32544. return M("span", {
  32545. class: S,
  32546. style: O,
  32547. key: y
  32548. }, null);
  32549. });
  32550. return M("div", {
  32551. class: `${r}-step`
  32552. }, [m]);
  32553. };
  32554. SY.inheritAttrs = !1;
  32555. const xY = (t, e) => {
  32556. let {
  32557. attrs: n,
  32558. slots: r
  32559. } = e;
  32560. const {
  32561. class: i,
  32562. vertical: a,
  32563. reverse: o,
  32564. marks: s,
  32565. included: l,
  32566. upperBound: u,
  32567. lowerBound: c,
  32568. max: f,
  32569. min: d,
  32570. onClickLabel: h
  32571. } = n, p = Object.keys(s), v = r.mark, g = f - d, m = p.map(parseFloat).sort((y, b) => y - b).map((y) => {
  32572. const b = typeof s[y] == "function" ? s[y]() : s[y], _ = typeof b == "object" && !Ui(b);
  32573. let O = _ ? b.label : b;
  32574. if (!O && O !== 0)
  32575. return null;
  32576. v && (O = v({
  32577. point: y,
  32578. label: O
  32579. }));
  32580. const S = !l && y === u || l && y <= u && y >= c, x = ye({
  32581. [`${i}-text`]: !0,
  32582. [`${i}-text-active`]: S
  32583. }), C = {
  32584. marginBottom: "-50%",
  32585. [o ? "top" : "bottom"]: `${(y - d) / g * 100}%`
  32586. }, T = {
  32587. transform: `translateX(${o ? "50%" : "-50%"})`,
  32588. msTransform: `translateX(${o ? "50%" : "-50%"})`,
  32589. [o ? "right" : "left"]: `${(y - d) / g * 100}%`
  32590. }, w = a ? C : T, P = _ ? I(I({}, w), b.style) : w, $ = {
  32591. [pr ? "onTouchstartPassive" : "onTouchstart"]: (A) => h(A, y)
  32592. };
  32593. return M("span", j({
  32594. class: x,
  32595. style: P,
  32596. key: y,
  32597. onMousedown: (A) => h(A, y)
  32598. }, $), [O]);
  32599. });
  32600. return M("div", {
  32601. class: i
  32602. }, [m]);
  32603. };
  32604. xY.inheritAttrs = !1;
  32605. const wY = te({
  32606. compatConfig: {
  32607. MODE: 3
  32608. },
  32609. name: "Handle",
  32610. inheritAttrs: !1,
  32611. props: {
  32612. prefixCls: String,
  32613. vertical: {
  32614. type: Boolean,
  32615. default: void 0
  32616. },
  32617. offset: Number,
  32618. disabled: {
  32619. type: Boolean,
  32620. default: void 0
  32621. },
  32622. min: Number,
  32623. max: Number,
  32624. value: Number,
  32625. tabindex: Y.oneOfType([Y.number, Y.string]),
  32626. reverse: {
  32627. type: Boolean,
  32628. default: void 0
  32629. },
  32630. ariaLabel: String,
  32631. ariaLabelledBy: String,
  32632. ariaValueTextFormatter: Function,
  32633. onMouseenter: {
  32634. type: Function
  32635. },
  32636. onMouseleave: {
  32637. type: Function
  32638. },
  32639. onMousedown: {
  32640. type: Function
  32641. }
  32642. },
  32643. setup(t, e) {
  32644. let {
  32645. attrs: n,
  32646. emit: r,
  32647. expose: i
  32648. } = e;
  32649. const a = ae(!1), o = ae(), s = () => {
  32650. document.activeElement === o.value && (a.value = !0);
  32651. }, l = (g) => {
  32652. a.value = !1, r("blur", g);
  32653. }, u = () => {
  32654. a.value = !1;
  32655. }, c = () => {
  32656. var g;
  32657. (g = o.value) === null || g === void 0 || g.focus();
  32658. }, f = () => {
  32659. var g;
  32660. (g = o.value) === null || g === void 0 || g.blur();
  32661. }, d = () => {
  32662. a.value = !0, c();
  32663. }, h = (g) => {
  32664. g.preventDefault(), c(), r("mousedown", g);
  32665. };
  32666. i({
  32667. focus: c,
  32668. blur: f,
  32669. clickFocus: d,
  32670. ref: o
  32671. });
  32672. let p = null;
  32673. it(() => {
  32674. p = vr(document, "mouseup", s);
  32675. }), yt(() => {
  32676. p == null || p.remove();
  32677. });
  32678. const v = L(() => {
  32679. const {
  32680. vertical: g,
  32681. offset: m,
  32682. reverse: y
  32683. } = t;
  32684. return g ? {
  32685. [y ? "top" : "bottom"]: `${m}%`,
  32686. [y ? "bottom" : "top"]: "auto",
  32687. transform: y ? null : "translateY(+50%)"
  32688. } : {
  32689. [y ? "right" : "left"]: `${m}%`,
  32690. [y ? "left" : "right"]: "auto",
  32691. transform: `translateX(${y ? "+" : "-"}50%)`
  32692. };
  32693. });
  32694. return () => {
  32695. const {
  32696. prefixCls: g,
  32697. disabled: m,
  32698. min: y,
  32699. max: b,
  32700. value: _,
  32701. tabindex: O,
  32702. ariaLabel: S,
  32703. ariaLabelledBy: x,
  32704. ariaValueTextFormatter: C,
  32705. onMouseenter: T,
  32706. onMouseleave: w
  32707. } = t, P = ye(n.class, {
  32708. [`${g}-handle-click-focused`]: a.value
  32709. }), $ = {
  32710. "aria-valuemin": y,
  32711. "aria-valuemax": b,
  32712. "aria-valuenow": _,
  32713. "aria-disabled": !!m
  32714. }, A = [n.style, v.value];
  32715. let D = O || 0;
  32716. (m || O === null) && (D = null);
  32717. let E;
  32718. C && (E = C(_));
  32719. const R = I(I(I(I({}, n), {
  32720. role: "slider",
  32721. tabindex: D
  32722. }), $), {
  32723. class: P,
  32724. onBlur: l,
  32725. onKeydown: u,
  32726. onMousedown: h,
  32727. onMouseenter: T,
  32728. onMouseleave: w,
  32729. ref: o,
  32730. style: A
  32731. });
  32732. return M("div", j(j({}, R), {}, {
  32733. "aria-label": S,
  32734. "aria-labelledby": x,
  32735. "aria-valuetext": E
  32736. }), null);
  32737. };
  32738. }
  32739. });
  32740. function RC(t, e) {
  32741. try {
  32742. return Object.keys(e).some((n) => t.target === e[n].ref);
  32743. } catch {
  32744. return !1;
  32745. }
  32746. }
  32747. function CY(t, e) {
  32748. let {
  32749. min: n,
  32750. max: r
  32751. } = e;
  32752. return t < n || t > r;
  32753. }
  32754. function S3(t) {
  32755. return t.touches.length > 1 || t.type.toLowerCase() === "touchend" && t.touches.length > 0;
  32756. }
  32757. function x3(t, e) {
  32758. let {
  32759. marks: n,
  32760. step: r,
  32761. min: i,
  32762. max: a
  32763. } = e;
  32764. const o = Object.keys(n).map(parseFloat);
  32765. if (r !== null) {
  32766. const l = Math.pow(10, TY(r)), u = Math.floor((a * l - i * l) / (r * l)), c = Math.min((t - i) / r, u), f = Math.round(c) * r + i;
  32767. o.push(f);
  32768. }
  32769. const s = o.map((l) => Math.abs(t - l));
  32770. return o[s.indexOf(Math.min(...s))];
  32771. }
  32772. function TY(t) {
  32773. const e = t.toString();
  32774. let n = 0;
  32775. return e.indexOf(".") >= 0 && (n = e.length - e.indexOf(".") - 1), n;
  32776. }
  32777. function w3(t, e) {
  32778. let n = 1;
  32779. return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.clientY : e.pageX) / n;
  32780. }
  32781. function C3(t, e) {
  32782. let n = 1;
  32783. return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.touches[0].clientY : e.touches[0].pageX) / n;
  32784. }
  32785. function T3(t, e) {
  32786. const n = e.getBoundingClientRect();
  32787. return t ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
  32788. }
  32789. function AD(t, e) {
  32790. let {
  32791. max: n,
  32792. min: r
  32793. } = e;
  32794. return t <= r ? r : t >= n ? n : t;
  32795. }
  32796. function PY(t, e) {
  32797. const {
  32798. step: n
  32799. } = e, r = isFinite(x3(t, e)) ? x3(t, e) : 0;
  32800. return n === null ? r : parseFloat(r.toFixed(TY(n)));
  32801. }
  32802. function Eh(t) {
  32803. t.stopPropagation(), t.preventDefault();
  32804. }
  32805. function NTe(t, e, n) {
  32806. const r = {
  32807. increase: (o, s) => o + s,
  32808. decrease: (o, s) => o - s
  32809. }, i = r[t](Object.keys(n.marks).indexOf(JSON.stringify(e)), 1), a = Object.keys(n.marks)[i];
  32810. return n.step ? r[t](e, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : e;
  32811. }
  32812. function $Y(t, e, n) {
  32813. const r = "increase", i = "decrease";
  32814. let a = r;
  32815. switch (t.keyCode) {
  32816. case ge.UP:
  32817. a = e && n ? i : r;
  32818. break;
  32819. case ge.RIGHT:
  32820. a = !e && n ? i : r;
  32821. break;
  32822. case ge.DOWN:
  32823. a = e && n ? r : i;
  32824. break;
  32825. case ge.LEFT:
  32826. a = !e && n ? r : i;
  32827. break;
  32828. case ge.END:
  32829. return (o, s) => s.max;
  32830. case ge.HOME:
  32831. return (o, s) => s.min;
  32832. case ge.PAGE_UP:
  32833. return (o, s) => o + s.step * 2;
  32834. case ge.PAGE_DOWN:
  32835. return (o, s) => o - s.step * 2;
  32836. default:
  32837. return;
  32838. }
  32839. return (o, s) => NTe(a, o, s);
  32840. }
  32841. var BTe = function(t, e) {
  32842. var n = {};
  32843. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  32844. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  32845. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  32846. return n;
  32847. };
  32848. function Lu() {
  32849. }
  32850. function AY(t) {
  32851. const e = {
  32852. id: String,
  32853. min: Number,
  32854. max: Number,
  32855. step: Number,
  32856. marks: Y.object,
  32857. included: {
  32858. type: Boolean,
  32859. default: void 0
  32860. },
  32861. prefixCls: String,
  32862. disabled: {
  32863. type: Boolean,
  32864. default: void 0
  32865. },
  32866. handle: Function,
  32867. dots: {
  32868. type: Boolean,
  32869. default: void 0
  32870. },
  32871. vertical: {
  32872. type: Boolean,
  32873. default: void 0
  32874. },
  32875. reverse: {
  32876. type: Boolean,
  32877. default: void 0
  32878. },
  32879. minimumTrackStyle: Y.object,
  32880. maximumTrackStyle: Y.object,
  32881. handleStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
  32882. trackStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
  32883. railStyle: Y.object,
  32884. dotStyle: Y.object,
  32885. activeDotStyle: Y.object,
  32886. autofocus: {
  32887. type: Boolean,
  32888. default: void 0
  32889. },
  32890. draggableTrack: {
  32891. type: Boolean,
  32892. default: void 0
  32893. }
  32894. };
  32895. return te({
  32896. compatConfig: {
  32897. MODE: 3
  32898. },
  32899. name: "CreateSlider",
  32900. mixins: [qS, t],
  32901. inheritAttrs: !1,
  32902. props: sr(e, {
  32903. prefixCls: "rc-slider",
  32904. min: 0,
  32905. max: 100,
  32906. step: 1,
  32907. marks: {},
  32908. included: !0,
  32909. disabled: !1,
  32910. dots: !1,
  32911. vertical: !1,
  32912. reverse: !1,
  32913. trackStyle: [{}],
  32914. handleStyle: [{}],
  32915. railStyle: {},
  32916. dotStyle: {},
  32917. activeDotStyle: {}
  32918. }),
  32919. emits: ["change", "blur", "focus"],
  32920. data() {
  32921. const {
  32922. step: n,
  32923. max: r,
  32924. min: i
  32925. } = this, a = isFinite(r - i) ? (r - i) % n === 0 : !0;
  32926. return Xr(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${r - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
  32927. },
  32928. mounted() {
  32929. this.$nextTick(() => {
  32930. this.document = this.sliderRef && this.sliderRef.ownerDocument;
  32931. const {
  32932. autofocus: n,
  32933. disabled: r
  32934. } = this;
  32935. n && !r && this.focus();
  32936. });
  32937. },
  32938. beforeUnmount() {
  32939. this.$nextTick(() => {
  32940. this.removeDocumentEvents();
  32941. });
  32942. },
  32943. methods: {
  32944. defaultHandle(n) {
  32945. var {
  32946. index: r,
  32947. directives: i,
  32948. className: a,
  32949. style: o
  32950. } = n, s = BTe(n, ["index", "directives", "className", "style"]);
  32951. if (delete s.dragging, s.value === null)
  32952. return null;
  32953. const l = I(I({}, s), {
  32954. class: a,
  32955. style: o,
  32956. key: r
  32957. });
  32958. return M(wY, l, null);
  32959. },
  32960. onDown(n, r) {
  32961. let i = r;
  32962. const {
  32963. draggableTrack: a,
  32964. vertical: o
  32965. } = this.$props, {
  32966. bounds: s
  32967. } = this.$data, l = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = RC(n, this.handlesRefs);
  32968. if (this.dragTrack = a && s.length >= 2 && !u && !l.map((c, f) => {
  32969. const d = f ? !0 : c >= s[f];
  32970. return f === l.length - 1 ? c <= s[f] : d;
  32971. }).some((c) => !c), this.dragTrack)
  32972. this.dragOffset = i, this.startBounds = [...s];
  32973. else {
  32974. if (!u)
  32975. this.dragOffset = 0;
  32976. else {
  32977. const c = T3(o, n.target);
  32978. this.dragOffset = i - c, i = c;
  32979. }
  32980. this.onStart(i);
  32981. }
  32982. },
  32983. onMouseDown(n) {
  32984. if (n.button !== 0)
  32985. return;
  32986. this.removeDocumentEvents();
  32987. const r = this.$props.vertical, i = w3(r, n);
  32988. this.onDown(n, i), this.addDocumentMouseEvents();
  32989. },
  32990. onTouchStart(n) {
  32991. if (S3(n)) return;
  32992. const r = this.vertical, i = C3(r, n);
  32993. this.onDown(n, i), this.addDocumentTouchEvents(), Eh(n);
  32994. },
  32995. onFocus(n) {
  32996. const {
  32997. vertical: r
  32998. } = this;
  32999. if (RC(n, this.handlesRefs) && !this.dragTrack) {
  33000. const i = T3(r, n.target);
  33001. this.dragOffset = 0, this.onStart(i), Eh(n), this.$emit("focus", n);
  33002. }
  33003. },
  33004. onBlur(n) {
  33005. this.dragTrack || this.onEnd(), this.$emit("blur", n);
  33006. },
  33007. onMouseUp() {
  33008. this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
  33009. },
  33010. onMouseMove(n) {
  33011. if (!this.sliderRef) {
  33012. this.onEnd();
  33013. return;
  33014. }
  33015. const r = w3(this.vertical, n);
  33016. this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
  33017. },
  33018. onTouchMove(n) {
  33019. if (S3(n) || !this.sliderRef) {
  33020. this.onEnd();
  33021. return;
  33022. }
  33023. const r = C3(this.vertical, n);
  33024. this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
  33025. },
  33026. onKeyDown(n) {
  33027. this.sliderRef && RC(n, this.handlesRefs) && this.onKeyboard(n);
  33028. },
  33029. onClickMarkLabel(n, r) {
  33030. n.stopPropagation(), this.onChange({
  33031. sValue: r
  33032. }), this.setState({
  33033. sValue: r
  33034. }, () => this.onEnd(!0));
  33035. },
  33036. getSliderStart() {
  33037. const n = this.sliderRef, {
  33038. vertical: r,
  33039. reverse: i
  33040. } = this, a = n.getBoundingClientRect();
  33041. return r ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
  33042. },
  33043. getSliderLength() {
  33044. const n = this.sliderRef;
  33045. if (!n)
  33046. return 0;
  33047. const r = n.getBoundingClientRect();
  33048. return this.vertical ? r.height : r.width;
  33049. },
  33050. addDocumentTouchEvents() {
  33051. this.onTouchMoveListener = vr(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = vr(this.document, "touchend", this.onEnd);
  33052. },
  33053. addDocumentMouseEvents() {
  33054. this.onMouseMoveListener = vr(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = vr(this.document, "mouseup", this.onEnd);
  33055. },
  33056. removeDocumentEvents() {
  33057. this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
  33058. },
  33059. focus() {
  33060. var n;
  33061. this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
  33062. },
  33063. blur() {
  33064. this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
  33065. var r, i;
  33066. (i = (r = this.handlesRefs[n]) === null || r === void 0 ? void 0 : r.blur) === null || i === void 0 || i.call(r);
  33067. });
  33068. },
  33069. calcValue(n) {
  33070. const {
  33071. vertical: r,
  33072. min: i,
  33073. max: a
  33074. } = this, o = Math.abs(Math.max(n, 0) / this.getSliderLength());
  33075. return r ? (1 - o) * (a - i) + i : o * (a - i) + i;
  33076. },
  33077. calcValueByPos(n) {
  33078. const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
  33079. return this.trimAlignValue(this.calcValue(i));
  33080. },
  33081. calcOffset(n) {
  33082. const {
  33083. min: r,
  33084. max: i
  33085. } = this, a = (n - r) / (i - r);
  33086. return Math.max(0, a * 100);
  33087. },
  33088. saveSlider(n) {
  33089. this.sliderRef = n;
  33090. },
  33091. saveHandle(n, r) {
  33092. this.handlesRefs[n] = r;
  33093. }
  33094. },
  33095. render() {
  33096. const {
  33097. prefixCls: n,
  33098. marks: r,
  33099. dots: i,
  33100. step: a,
  33101. included: o,
  33102. disabled: s,
  33103. vertical: l,
  33104. reverse: u,
  33105. min: c,
  33106. max: f,
  33107. maximumTrackStyle: d,
  33108. railStyle: h,
  33109. dotStyle: p,
  33110. activeDotStyle: v,
  33111. id: g
  33112. } = this, {
  33113. class: m,
  33114. style: y
  33115. } = this.$attrs, {
  33116. tracks: b,
  33117. handles: _
  33118. } = this.renderSlider(), O = ye(n, m, {
  33119. [`${n}-with-marks`]: Object.keys(r).length,
  33120. [`${n}-disabled`]: s,
  33121. [`${n}-vertical`]: l,
  33122. [`${n}-horizontal`]: !l
  33123. }), S = {
  33124. vertical: l,
  33125. marks: r,
  33126. included: o,
  33127. lowerBound: this.getLowerBound(),
  33128. upperBound: this.getUpperBound(),
  33129. max: f,
  33130. min: c,
  33131. reverse: u,
  33132. class: `${n}-mark`,
  33133. onClickLabel: s ? Lu : this.onClickMarkLabel
  33134. }, x = {
  33135. [pr ? "onTouchstartPassive" : "onTouchstart"]: s ? Lu : this.onTouchStart
  33136. };
  33137. return M("div", j(j({
  33138. id: g,
  33139. ref: this.saveSlider,
  33140. tabindex: "-1",
  33141. class: O
  33142. }, x), {}, {
  33143. onMousedown: s ? Lu : this.onMouseDown,
  33144. onMouseup: s ? Lu : this.onMouseUp,
  33145. onKeydown: s ? Lu : this.onKeyDown,
  33146. onFocus: s ? Lu : this.onFocus,
  33147. onBlur: s ? Lu : this.onBlur,
  33148. style: y
  33149. }), [M("div", {
  33150. class: `${n}-rail`,
  33151. style: I(I({}, d), h)
  33152. }, null), b, M(SY, {
  33153. prefixCls: n,
  33154. vertical: l,
  33155. reverse: u,
  33156. marks: r,
  33157. dots: i,
  33158. step: a,
  33159. included: o,
  33160. lowerBound: this.getLowerBound(),
  33161. upperBound: this.getUpperBound(),
  33162. max: f,
  33163. min: c,
  33164. dotStyle: p,
  33165. activeDotStyle: v
  33166. }, null), _, M(xY, S, {
  33167. mark: this.$slots.mark
  33168. }), rj(this)]);
  33169. }
  33170. });
  33171. }
  33172. const zTe = te({
  33173. compatConfig: {
  33174. MODE: 3
  33175. },
  33176. name: "Slider",
  33177. mixins: [qS],
  33178. inheritAttrs: !1,
  33179. props: {
  33180. defaultValue: Number,
  33181. value: Number,
  33182. disabled: {
  33183. type: Boolean,
  33184. default: void 0
  33185. },
  33186. autofocus: {
  33187. type: Boolean,
  33188. default: void 0
  33189. },
  33190. tabindex: Y.oneOfType([Y.number, Y.string]),
  33191. reverse: {
  33192. type: Boolean,
  33193. default: void 0
  33194. },
  33195. min: Number,
  33196. max: Number,
  33197. ariaLabelForHandle: String,
  33198. ariaLabelledByForHandle: String,
  33199. ariaValueTextFormatterForHandle: String,
  33200. startPoint: Number
  33201. },
  33202. emits: ["beforeChange", "afterChange", "change"],
  33203. data() {
  33204. const t = this.defaultValue !== void 0 ? this.defaultValue : this.min, e = this.value !== void 0 ? this.value : t;
  33205. return {
  33206. sValue: this.trimAlignValue(e),
  33207. dragging: !1
  33208. };
  33209. },
  33210. watch: {
  33211. value: {
  33212. handler(t) {
  33213. this.setChangeValue(t);
  33214. },
  33215. deep: !0
  33216. },
  33217. min() {
  33218. const {
  33219. sValue: t
  33220. } = this;
  33221. this.setChangeValue(t);
  33222. },
  33223. max() {
  33224. const {
  33225. sValue: t
  33226. } = this;
  33227. this.setChangeValue(t);
  33228. }
  33229. },
  33230. methods: {
  33231. setChangeValue(t) {
  33232. const e = t !== void 0 ? t : this.sValue, n = this.trimAlignValue(e, this.$props);
  33233. n !== this.sValue && (this.setState({
  33234. sValue: n
  33235. }), CY(e, this.$props) && this.$emit("change", n));
  33236. },
  33237. onChange(t) {
  33238. const e = !v1(this, "value"), n = t.sValue > this.max ? I(I({}, t), {
  33239. sValue: this.max
  33240. }) : t;
  33241. e && this.setState(n);
  33242. const r = n.sValue;
  33243. this.$emit("change", r);
  33244. },
  33245. onStart(t) {
  33246. this.setState({
  33247. dragging: !0
  33248. });
  33249. const {
  33250. sValue: e
  33251. } = this;
  33252. this.$emit("beforeChange", e);
  33253. const n = this.calcValueByPos(t);
  33254. this.startValue = n, this.startPosition = t, n !== e && (this.prevMovedHandleIndex = 0, this.onChange({
  33255. sValue: n
  33256. }));
  33257. },
  33258. onEnd(t) {
  33259. const {
  33260. dragging: e
  33261. } = this;
  33262. this.removeDocumentEvents(), (e || t) && this.$emit("afterChange", this.sValue), this.setState({
  33263. dragging: !1
  33264. });
  33265. },
  33266. onMove(t, e) {
  33267. Eh(t);
  33268. const {
  33269. sValue: n
  33270. } = this, r = this.calcValueByPos(e);
  33271. r !== n && this.onChange({
  33272. sValue: r
  33273. });
  33274. },
  33275. onKeyboard(t) {
  33276. const {
  33277. reverse: e,
  33278. vertical: n
  33279. } = this.$props, r = $Y(t, n, e);
  33280. if (r) {
  33281. Eh(t);
  33282. const {
  33283. sValue: i
  33284. } = this, a = r(i, this.$props), o = this.trimAlignValue(a);
  33285. if (o === i) return;
  33286. this.onChange({
  33287. sValue: o
  33288. }), this.$emit("afterChange", o), this.onEnd();
  33289. }
  33290. },
  33291. getLowerBound() {
  33292. const t = this.$props.startPoint || this.$props.min;
  33293. return this.$data.sValue > t ? t : this.$data.sValue;
  33294. },
  33295. getUpperBound() {
  33296. return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
  33297. },
  33298. trimAlignValue(t) {
  33299. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  33300. if (t === null)
  33301. return null;
  33302. const n = I(I({}, this.$props), e), r = AD(t, n);
  33303. return PY(r, n);
  33304. },
  33305. getTrack(t) {
  33306. let {
  33307. prefixCls: e,
  33308. reverse: n,
  33309. vertical: r,
  33310. included: i,
  33311. minimumTrackStyle: a,
  33312. mergedTrackStyle: o,
  33313. length: s,
  33314. offset: l
  33315. } = t;
  33316. return M($D, {
  33317. class: `${e}-track`,
  33318. vertical: r,
  33319. included: i,
  33320. offset: l,
  33321. reverse: n,
  33322. length: s,
  33323. style: I(I({}, a), o)
  33324. }, null);
  33325. },
  33326. renderSlider() {
  33327. const {
  33328. prefixCls: t,
  33329. vertical: e,
  33330. included: n,
  33331. disabled: r,
  33332. minimumTrackStyle: i,
  33333. trackStyle: a,
  33334. handleStyle: o,
  33335. tabindex: s,
  33336. ariaLabelForHandle: l,
  33337. ariaLabelledByForHandle: u,
  33338. ariaValueTextFormatterForHandle: c,
  33339. min: f,
  33340. max: d,
  33341. startPoint: h,
  33342. reverse: p,
  33343. handle: v,
  33344. defaultHandle: g
  33345. } = this, m = v || g, {
  33346. sValue: y,
  33347. dragging: b
  33348. } = this, _ = this.calcOffset(y), O = m({
  33349. class: `${t}-handle`,
  33350. prefixCls: t,
  33351. vertical: e,
  33352. offset: _,
  33353. value: y,
  33354. dragging: b,
  33355. disabled: r,
  33356. min: f,
  33357. max: d,
  33358. reverse: p,
  33359. index: 0,
  33360. tabindex: s,
  33361. ariaLabel: l,
  33362. ariaLabelledBy: u,
  33363. ariaValueTextFormatter: c,
  33364. style: o[0] || o,
  33365. ref: (C) => this.saveHandle(0, C),
  33366. onFocus: this.onFocus,
  33367. onBlur: this.onBlur
  33368. }), S = h !== void 0 ? this.calcOffset(h) : 0, x = a[0] || a;
  33369. return {
  33370. tracks: this.getTrack({
  33371. prefixCls: t,
  33372. reverse: p,
  33373. vertical: e,
  33374. included: n,
  33375. offset: S,
  33376. minimumTrackStyle: i,
  33377. mergedTrackStyle: x,
  33378. length: _ - S
  33379. }),
  33380. handles: O
  33381. };
  33382. }
  33383. }
  33384. }), VTe = AY(zTe), Up = (t) => {
  33385. let {
  33386. value: e,
  33387. handle: n,
  33388. bounds: r,
  33389. props: i
  33390. } = t;
  33391. const {
  33392. allowCross: a,
  33393. pushable: o
  33394. } = i, s = Number(o), l = AD(e, i);
  33395. let u = l;
  33396. 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)), PY(u, i);
  33397. }, FTe = {
  33398. defaultValue: Y.arrayOf(Y.number),
  33399. value: Y.arrayOf(Y.number),
  33400. count: Number,
  33401. pushable: qfe(Y.oneOfType([Y.looseBool, Y.number])),
  33402. allowCross: {
  33403. type: Boolean,
  33404. default: void 0
  33405. },
  33406. disabled: {
  33407. type: Boolean,
  33408. default: void 0
  33409. },
  33410. reverse: {
  33411. type: Boolean,
  33412. default: void 0
  33413. },
  33414. tabindex: Y.arrayOf(Y.number),
  33415. prefixCls: String,
  33416. min: Number,
  33417. max: Number,
  33418. autofocus: {
  33419. type: Boolean,
  33420. default: void 0
  33421. },
  33422. ariaLabelGroupForHandles: Array,
  33423. ariaLabelledByGroupForHandles: Array,
  33424. ariaValueTextFormatterGroupForHandles: Array,
  33425. draggableTrack: {
  33426. type: Boolean,
  33427. default: void 0
  33428. }
  33429. }, WTe = te({
  33430. compatConfig: {
  33431. MODE: 3
  33432. },
  33433. name: "Range",
  33434. mixins: [qS],
  33435. inheritAttrs: !1,
  33436. props: sr(FTe, {
  33437. count: 1,
  33438. allowCross: !0,
  33439. pushable: !1,
  33440. tabindex: [],
  33441. draggableTrack: !1,
  33442. ariaLabelGroupForHandles: [],
  33443. ariaLabelledByGroupForHandles: [],
  33444. ariaValueTextFormatterGroupForHandles: []
  33445. }),
  33446. emits: ["beforeChange", "afterChange", "change"],
  33447. displayName: "Range",
  33448. data() {
  33449. const {
  33450. count: t,
  33451. min: e,
  33452. max: n
  33453. } = this, r = Array(...Array(t + 1)).map(() => e), i = v1(this, "defaultValue") ? this.defaultValue : r;
  33454. let {
  33455. value: a
  33456. } = this;
  33457. a === void 0 && (a = i);
  33458. const o = a.map((l, u) => Up({
  33459. value: l,
  33460. handle: u,
  33461. props: this.$props
  33462. }));
  33463. return {
  33464. sHandle: null,
  33465. recent: o[0] === n ? 0 : o.length - 1,
  33466. bounds: o
  33467. };
  33468. },
  33469. watch: {
  33470. value: {
  33471. handler(t) {
  33472. const {
  33473. bounds: e
  33474. } = this;
  33475. this.setChangeValue(t || e);
  33476. },
  33477. deep: !0
  33478. },
  33479. min() {
  33480. const {
  33481. value: t
  33482. } = this;
  33483. this.setChangeValue(t || this.bounds);
  33484. },
  33485. max() {
  33486. const {
  33487. value: t
  33488. } = this;
  33489. this.setChangeValue(t || this.bounds);
  33490. }
  33491. },
  33492. methods: {
  33493. setChangeValue(t) {
  33494. const {
  33495. bounds: e
  33496. } = this;
  33497. let n = t.map((r, i) => Up({
  33498. value: r,
  33499. handle: i,
  33500. bounds: e,
  33501. props: this.$props
  33502. }));
  33503. if (e.length === n.length) {
  33504. if (n.every((r, i) => r === e[i]))
  33505. return null;
  33506. } else
  33507. n = t.map((r, i) => Up({
  33508. value: r,
  33509. handle: i,
  33510. props: this.$props
  33511. }));
  33512. if (this.setState({
  33513. bounds: n
  33514. }), t.some((r) => CY(r, this.$props))) {
  33515. const r = t.map((i) => AD(i, this.$props));
  33516. this.$emit("change", r);
  33517. }
  33518. },
  33519. onChange(t) {
  33520. if (!v1(this, "value"))
  33521. this.setState(t);
  33522. else {
  33523. const i = {};
  33524. ["sHandle", "recent"].forEach((a) => {
  33525. t[a] !== void 0 && (i[a] = t[a]);
  33526. }), Object.keys(i).length && this.setState(i);
  33527. }
  33528. const r = I(I({}, this.$data), t).bounds;
  33529. this.$emit("change", r);
  33530. },
  33531. positionGetValue(t) {
  33532. const e = this.getValue(), n = this.calcValueByPos(t), r = this.getClosestBound(n), i = this.getBoundNeedMoving(n, r), a = e[i];
  33533. if (n === a) return null;
  33534. const o = [...e];
  33535. return o[i] = n, o;
  33536. },
  33537. onStart(t) {
  33538. const {
  33539. bounds: e
  33540. } = this;
  33541. this.$emit("beforeChange", e);
  33542. const n = this.calcValueByPos(t);
  33543. this.startValue = n, this.startPosition = t;
  33544. const r = this.getClosestBound(n);
  33545. this.prevMovedHandleIndex = this.getBoundNeedMoving(n, r), this.setState({
  33546. sHandle: this.prevMovedHandleIndex,
  33547. recent: this.prevMovedHandleIndex
  33548. });
  33549. const i = e[this.prevMovedHandleIndex];
  33550. if (n === i) return;
  33551. const a = [...e];
  33552. a[this.prevMovedHandleIndex] = n, this.onChange({
  33553. bounds: a
  33554. });
  33555. },
  33556. onEnd(t) {
  33557. const {
  33558. sHandle: e
  33559. } = this;
  33560. this.removeDocumentEvents(), e || (this.dragTrack = !1), (e !== null || t) && this.$emit("afterChange", this.bounds), this.setState({
  33561. sHandle: null
  33562. });
  33563. },
  33564. onMove(t, e, n, r) {
  33565. Eh(t);
  33566. const {
  33567. $data: i,
  33568. $props: a
  33569. } = this, o = a.max || 100, s = a.min || 0;
  33570. if (n) {
  33571. let d = a.vertical ? -e : e;
  33572. d = a.reverse ? -d : d;
  33573. 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)));
  33574. i.bounds.map((m, y) => m === g[y]).some((m) => !m) && this.onChange({
  33575. bounds: g
  33576. });
  33577. return;
  33578. }
  33579. const {
  33580. bounds: l,
  33581. sHandle: u
  33582. } = this, c = this.calcValueByPos(e), f = l[u];
  33583. c !== f && this.moveTo(c);
  33584. },
  33585. onKeyboard(t) {
  33586. const {
  33587. reverse: e,
  33588. vertical: n
  33589. } = this.$props, r = $Y(t, n, e);
  33590. if (r) {
  33591. Eh(t);
  33592. const {
  33593. bounds: i,
  33594. sHandle: a
  33595. } = this, o = i[a === null ? this.recent : a], s = r(o, this.$props), l = Up({
  33596. value: s,
  33597. handle: a,
  33598. bounds: i,
  33599. props: this.$props
  33600. });
  33601. if (l === o) return;
  33602. this.moveTo(l, !0);
  33603. }
  33604. },
  33605. getClosestBound(t) {
  33606. const {
  33607. bounds: e
  33608. } = this;
  33609. let n = 0;
  33610. for (let r = 1; r < e.length - 1; r += 1)
  33611. t >= e[r] && (n = r);
  33612. return Math.abs(e[n + 1] - t) < Math.abs(e[n] - t) && (n += 1), n;
  33613. },
  33614. getBoundNeedMoving(t, e) {
  33615. const {
  33616. bounds: n,
  33617. recent: r
  33618. } = this;
  33619. let i = e;
  33620. const a = n[e + 1] === n[e];
  33621. return a && n[r] === n[e] && (i = r), a && t !== n[e + 1] && (i = t < n[e + 1] ? e : e + 1), i;
  33622. },
  33623. getLowerBound() {
  33624. return this.bounds[0];
  33625. },
  33626. getUpperBound() {
  33627. const {
  33628. bounds: t
  33629. } = this;
  33630. return t[t.length - 1];
  33631. },
  33632. /**
  33633. * Returns an array of possible slider points, taking into account both
  33634. * `marks` and `step`. The result is cached.
  33635. */
  33636. getPoints() {
  33637. const {
  33638. marks: t,
  33639. step: e,
  33640. min: n,
  33641. max: r
  33642. } = this, i = this.internalPointsCache;
  33643. if (!i || i.marks !== t || i.step !== e) {
  33644. const a = I({}, t);
  33645. if (e !== null)
  33646. for (let s = n; s <= r; s += e)
  33647. a[s] = s;
  33648. const o = Object.keys(a).map(parseFloat);
  33649. o.sort((s, l) => s - l), this.internalPointsCache = {
  33650. marks: t,
  33651. step: e,
  33652. points: o
  33653. };
  33654. }
  33655. return this.internalPointsCache.points;
  33656. },
  33657. moveTo(t, e) {
  33658. const n = [...this.bounds], {
  33659. sHandle: r,
  33660. recent: i
  33661. } = this, a = r === null ? i : r;
  33662. n[a] = t;
  33663. let o = a;
  33664. this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, o) : this.$props.allowCross && (n.sort((s, l) => s - l), o = n.indexOf(t)), this.onChange({
  33665. recent: o,
  33666. sHandle: o,
  33667. bounds: n
  33668. }), e && (this.$emit("afterChange", n), this.setState({}, () => {
  33669. this.handlesRefs[o].focus();
  33670. }), this.onEnd());
  33671. },
  33672. pushSurroundingHandles(t, e) {
  33673. const n = t[e], {
  33674. pushable: r
  33675. } = this, i = Number(r);
  33676. let a = 0;
  33677. if (t[e + 1] - n < i && (a = 1), n - t[e - 1] < i && (a = -1), a === 0)
  33678. return;
  33679. const o = e + a, s = a * (t[o] - n);
  33680. this.pushHandle(t, o, a, i - s) || (t[e] = t[o] - a * i);
  33681. },
  33682. pushHandle(t, e, n, r) {
  33683. const i = t[e];
  33684. let a = t[e];
  33685. for (; n * (a - i) < r; ) {
  33686. if (!this.pushHandleOnePoint(t, e, n))
  33687. return t[e] = i, !1;
  33688. a = t[e];
  33689. }
  33690. return !0;
  33691. },
  33692. pushHandleOnePoint(t, e, n) {
  33693. const r = this.getPoints(), a = r.indexOf(t[e]) + n;
  33694. if (a >= r.length || a < 0)
  33695. return !1;
  33696. const o = e + n, s = r[a], {
  33697. pushable: l
  33698. } = this, u = Number(l), c = n * (t[o] - s);
  33699. return this.pushHandle(t, o, n, u - c) ? (t[e] = s, !0) : !1;
  33700. },
  33701. trimAlignValue(t) {
  33702. const {
  33703. sHandle: e,
  33704. bounds: n
  33705. } = this;
  33706. return Up({
  33707. value: t,
  33708. handle: e,
  33709. bounds: n,
  33710. props: this.$props
  33711. });
  33712. },
  33713. ensureValueNotConflict(t, e, n) {
  33714. let {
  33715. allowCross: r,
  33716. pushable: i
  33717. } = n;
  33718. const a = this.$data || {}, {
  33719. bounds: o
  33720. } = a;
  33721. if (t = t === void 0 ? a.sHandle : t, i = Number(i), !r && t != null && o !== void 0) {
  33722. if (t > 0 && e <= o[t - 1] + i)
  33723. return o[t - 1] + i;
  33724. if (t < o.length - 1 && e >= o[t + 1] - i)
  33725. return o[t + 1] - i;
  33726. }
  33727. return e;
  33728. },
  33729. getTrack(t) {
  33730. let {
  33731. bounds: e,
  33732. prefixCls: n,
  33733. reverse: r,
  33734. vertical: i,
  33735. included: a,
  33736. offsets: o,
  33737. trackStyle: s
  33738. } = t;
  33739. return e.slice(0, -1).map((l, u) => {
  33740. const c = u + 1, f = ye({
  33741. [`${n}-track`]: !0,
  33742. [`${n}-track-${c}`]: !0
  33743. });
  33744. return M($D, {
  33745. class: f,
  33746. vertical: i,
  33747. reverse: r,
  33748. included: a,
  33749. offset: o[c - 1],
  33750. length: o[c] - o[c - 1],
  33751. style: s[u],
  33752. key: c
  33753. }, null);
  33754. });
  33755. },
  33756. renderSlider() {
  33757. const {
  33758. sHandle: t,
  33759. bounds: e,
  33760. prefixCls: n,
  33761. vertical: r,
  33762. included: i,
  33763. disabled: a,
  33764. min: o,
  33765. max: s,
  33766. reverse: l,
  33767. handle: u,
  33768. defaultHandle: c,
  33769. trackStyle: f,
  33770. handleStyle: d,
  33771. tabindex: h,
  33772. ariaLabelGroupForHandles: p,
  33773. ariaLabelledByGroupForHandles: v,
  33774. ariaValueTextFormatterGroupForHandles: g
  33775. } = this, m = u || c, y = e.map((O) => this.calcOffset(O)), b = `${n}-handle`, _ = e.map((O, S) => {
  33776. let x = h[S] || 0;
  33777. (a || h[S] === null) && (x = null);
  33778. const C = t === S;
  33779. return m({
  33780. class: ye({
  33781. [b]: !0,
  33782. [`${b}-${S + 1}`]: !0,
  33783. [`${b}-dragging`]: C
  33784. }),
  33785. prefixCls: n,
  33786. vertical: r,
  33787. dragging: C,
  33788. offset: y[S],
  33789. value: O,
  33790. index: S,
  33791. tabindex: x,
  33792. min: o,
  33793. max: s,
  33794. reverse: l,
  33795. disabled: a,
  33796. style: d[S],
  33797. ref: (T) => this.saveHandle(S, T),
  33798. onFocus: this.onFocus,
  33799. onBlur: this.onBlur,
  33800. ariaLabel: p[S],
  33801. ariaLabelledBy: v[S],
  33802. ariaValueTextFormatter: g[S]
  33803. });
  33804. });
  33805. return {
  33806. tracks: this.getTrack({
  33807. bounds: e,
  33808. prefixCls: n,
  33809. reverse: l,
  33810. vertical: r,
  33811. included: i,
  33812. offsets: y,
  33813. trackStyle: f
  33814. }),
  33815. handles: _
  33816. };
  33817. }
  33818. }
  33819. }), QTe = AY(WTe), HTe = te({
  33820. compatConfig: {
  33821. MODE: 3
  33822. },
  33823. name: "SliderTooltip",
  33824. inheritAttrs: !1,
  33825. props: kU(),
  33826. setup(t, e) {
  33827. let {
  33828. attrs: n,
  33829. slots: r
  33830. } = e;
  33831. const i = U(null), a = U(null);
  33832. function o() {
  33833. xt.cancel(a.value), a.value = null;
  33834. }
  33835. function s() {
  33836. a.value = xt(() => {
  33837. var u;
  33838. (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
  33839. });
  33840. }
  33841. const l = () => {
  33842. o(), t.open && s();
  33843. };
  33844. return se([() => t.open, () => t.title], () => {
  33845. l();
  33846. }, {
  33847. flush: "post",
  33848. immediate: !0
  33849. }), Fle(() => {
  33850. l();
  33851. }), yt(() => {
  33852. o();
  33853. }), () => M(dx, j(j({
  33854. ref: i
  33855. }, t), n), r);
  33856. }
  33857. }), GTe = (t) => {
  33858. const {
  33859. componentCls: e,
  33860. controlSize: n,
  33861. dotSize: r,
  33862. marginFull: i,
  33863. marginPart: a,
  33864. colorFillContentHover: o
  33865. } = t;
  33866. return {
  33867. [e]: I(I({}, nn(t)), {
  33868. position: "relative",
  33869. height: n,
  33870. margin: `${a}px ${i}px`,
  33871. padding: 0,
  33872. cursor: "pointer",
  33873. touchAction: "none",
  33874. "&-vertical": {
  33875. margin: `${i}px ${a}px`
  33876. },
  33877. [`${e}-rail`]: {
  33878. position: "absolute",
  33879. backgroundColor: t.colorFillTertiary,
  33880. borderRadius: t.borderRadiusXS,
  33881. transition: `background-color ${t.motionDurationMid}`
  33882. },
  33883. [`${e}-track`]: {
  33884. position: "absolute",
  33885. backgroundColor: t.colorPrimaryBorder,
  33886. borderRadius: t.borderRadiusXS,
  33887. transition: `background-color ${t.motionDurationMid}`
  33888. },
  33889. "&:hover": {
  33890. [`${e}-rail`]: {
  33891. backgroundColor: t.colorFillSecondary
  33892. },
  33893. [`${e}-track`]: {
  33894. backgroundColor: t.colorPrimaryBorderHover
  33895. },
  33896. [`${e}-dot`]: {
  33897. borderColor: o
  33898. },
  33899. [`${e}-handle::after`]: {
  33900. boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`
  33901. },
  33902. [`${e}-dot-active`]: {
  33903. borderColor: t.colorPrimary
  33904. }
  33905. },
  33906. [`${e}-handle`]: {
  33907. position: "absolute",
  33908. width: t.handleSize,
  33909. height: t.handleSize,
  33910. outline: "none",
  33911. [`${e}-dragging`]: {
  33912. zIndex: 1
  33913. },
  33914. // 扩大选区
  33915. "&::before": {
  33916. content: '""',
  33917. position: "absolute",
  33918. insetInlineStart: -t.handleLineWidth,
  33919. insetBlockStart: -t.handleLineWidth,
  33920. width: t.handleSize + t.handleLineWidth * 2,
  33921. height: t.handleSize + t.handleLineWidth * 2,
  33922. backgroundColor: "transparent"
  33923. },
  33924. "&::after": {
  33925. content: '""',
  33926. position: "absolute",
  33927. insetBlockStart: 0,
  33928. insetInlineStart: 0,
  33929. width: t.handleSize,
  33930. height: t.handleSize,
  33931. backgroundColor: t.colorBgElevated,
  33932. boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,
  33933. borderRadius: "50%",
  33934. cursor: "pointer",
  33935. transition: `
  33936. inset-inline-start ${t.motionDurationMid},
  33937. inset-block-start ${t.motionDurationMid},
  33938. width ${t.motionDurationMid},
  33939. height ${t.motionDurationMid},
  33940. box-shadow ${t.motionDurationMid}
  33941. `
  33942. },
  33943. "&:hover, &:active, &:focus": {
  33944. "&::before": {
  33945. insetInlineStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
  33946. insetBlockStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
  33947. width: t.handleSizeHover + t.handleLineWidthHover * 2,
  33948. height: t.handleSizeHover + t.handleLineWidthHover * 2
  33949. },
  33950. "&::after": {
  33951. boxShadow: `0 0 0 ${t.handleLineWidthHover}px ${t.colorPrimary}`,
  33952. width: t.handleSizeHover,
  33953. height: t.handleSizeHover,
  33954. insetInlineStart: (t.handleSize - t.handleSizeHover) / 2,
  33955. insetBlockStart: (t.handleSize - t.handleSizeHover) / 2
  33956. }
  33957. }
  33958. },
  33959. [`${e}-mark`]: {
  33960. position: "absolute",
  33961. fontSize: t.fontSize
  33962. },
  33963. [`${e}-mark-text`]: {
  33964. position: "absolute",
  33965. display: "inline-block",
  33966. color: t.colorTextDescription,
  33967. textAlign: "center",
  33968. wordBreak: "keep-all",
  33969. cursor: "pointer",
  33970. userSelect: "none",
  33971. "&-active": {
  33972. color: t.colorText
  33973. }
  33974. },
  33975. [`${e}-step`]: {
  33976. position: "absolute",
  33977. background: "transparent",
  33978. pointerEvents: "none"
  33979. },
  33980. [`${e}-dot`]: {
  33981. position: "absolute",
  33982. width: r,
  33983. height: r,
  33984. backgroundColor: t.colorBgElevated,
  33985. border: `${t.handleLineWidth}px solid ${t.colorBorderSecondary}`,
  33986. borderRadius: "50%",
  33987. cursor: "pointer",
  33988. transition: `border-color ${t.motionDurationSlow}`,
  33989. "&-active": {
  33990. borderColor: t.colorPrimaryBorder
  33991. }
  33992. },
  33993. [`&${e}-disabled`]: {
  33994. cursor: "not-allowed",
  33995. [`${e}-rail`]: {
  33996. backgroundColor: `${t.colorFillSecondary} !important`
  33997. },
  33998. [`${e}-track`]: {
  33999. backgroundColor: `${t.colorTextDisabled} !important`
  34000. },
  34001. [`
  34002. ${e}-dot
  34003. `]: {
  34004. backgroundColor: t.colorBgElevated,
  34005. borderColor: t.colorTextDisabled,
  34006. boxShadow: "none",
  34007. cursor: "not-allowed"
  34008. },
  34009. [`${e}-handle::after`]: {
  34010. backgroundColor: t.colorBgElevated,
  34011. cursor: "not-allowed",
  34012. width: t.handleSize,
  34013. height: t.handleSize,
  34014. boxShadow: `0 0 0 ${t.handleLineWidth}px ${new en(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,
  34015. insetInlineStart: 0,
  34016. insetBlockStart: 0
  34017. },
  34018. [`
  34019. ${e}-mark-text,
  34020. ${e}-dot
  34021. `]: {
  34022. cursor: "not-allowed !important"
  34023. }
  34024. }
  34025. })
  34026. };
  34027. }, EY = (t, e) => {
  34028. const {
  34029. componentCls: n,
  34030. railSize: r,
  34031. handleSize: i,
  34032. dotSize: a
  34033. } = t, o = e ? "paddingBlock" : "paddingInline", s = e ? "width" : "height", l = e ? "height" : "width", u = e ? "insetBlockStart" : "insetInlineStart", c = e ? "top" : "insetInlineStart";
  34034. return {
  34035. [o]: r,
  34036. [l]: r * 3,
  34037. [`${n}-rail`]: {
  34038. [s]: "100%",
  34039. [l]: r
  34040. },
  34041. [`${n}-track`]: {
  34042. [l]: r
  34043. },
  34044. [`${n}-handle`]: {
  34045. [u]: (r * 3 - i) / 2
  34046. },
  34047. [`${n}-mark`]: {
  34048. // Reset all
  34049. insetInlineStart: 0,
  34050. top: 0,
  34051. [c]: i,
  34052. [s]: "100%"
  34053. },
  34054. [`${n}-step`]: {
  34055. // Reset all
  34056. insetInlineStart: 0,
  34057. top: 0,
  34058. [c]: r,
  34059. [s]: "100%",
  34060. [l]: r
  34061. },
  34062. [`${n}-dot`]: {
  34063. position: "absolute",
  34064. [u]: (r - a) / 2
  34065. }
  34066. };
  34067. }, jTe = (t) => {
  34068. const {
  34069. componentCls: e,
  34070. marginPartWithMark: n
  34071. } = t;
  34072. return {
  34073. [`${e}-horizontal`]: I(I({}, EY(t, !0)), {
  34074. [`&${e}-with-marks`]: {
  34075. marginBottom: n
  34076. }
  34077. })
  34078. };
  34079. }, ZTe = (t) => {
  34080. const {
  34081. componentCls: e
  34082. } = t;
  34083. return {
  34084. [`${e}-vertical`]: I(I({}, EY(t, !1)), {
  34085. height: "100%"
  34086. })
  34087. };
  34088. }, UTe = Sn("Slider", (t) => {
  34089. const e = Bt(t, {
  34090. marginPart: (t.controlHeight - t.controlSize) / 2,
  34091. marginFull: t.controlSize / 2,
  34092. marginPartWithMark: t.controlHeightLG - t.controlSize
  34093. });
  34094. return [GTe(e), jTe(e), ZTe(e)];
  34095. }, (t) => {
  34096. const n = t.controlHeightLG / 4, r = t.controlHeightSM / 2, i = t.lineWidth + 1, a = t.lineWidth + 1 * 3;
  34097. return {
  34098. controlSize: n,
  34099. railSize: 4,
  34100. handleSize: n,
  34101. handleSizeHover: r,
  34102. dotSize: 8,
  34103. handleLineWidth: i,
  34104. handleLineWidthHover: a
  34105. };
  34106. });
  34107. var P3 = function(t, e) {
  34108. var n = {};
  34109. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  34110. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  34111. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  34112. return n;
  34113. };
  34114. const XTe = (t) => typeof t == "number" ? t.toString() : "", YTe = () => ({
  34115. id: String,
  34116. prefixCls: String,
  34117. tooltipPrefixCls: String,
  34118. range: gn([Boolean, Object]),
  34119. reverse: nt(),
  34120. min: Number,
  34121. max: Number,
  34122. step: gn([Object, Number]),
  34123. marks: $t(),
  34124. dots: nt(),
  34125. value: gn([Array, Number]),
  34126. defaultValue: gn([Array, Number]),
  34127. included: nt(),
  34128. disabled: nt(),
  34129. vertical: nt(),
  34130. tipFormatter: gn([Function, Object], () => XTe),
  34131. tooltipOpen: nt(),
  34132. /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  34133. tooltipVisible: nt(),
  34134. tooltipPlacement: hn(),
  34135. getTooltipPopupContainer: tt(),
  34136. autofocus: nt(),
  34137. handleStyle: gn([Array, Object]),
  34138. trackStyle: gn([Array, Object]),
  34139. onChange: tt(),
  34140. onAfterChange: tt(),
  34141. onFocus: tt(),
  34142. onBlur: tt(),
  34143. "onUpdate:value": tt()
  34144. }), qTe = te({
  34145. compatConfig: {
  34146. MODE: 3
  34147. },
  34148. name: "ASlider",
  34149. inheritAttrs: !1,
  34150. props: YTe(),
  34151. // emits: ['update:value', 'change', 'afterChange', 'blur'],
  34152. slots: Object,
  34153. setup(t, e) {
  34154. let {
  34155. attrs: n,
  34156. slots: r,
  34157. emit: i,
  34158. expose: a
  34159. } = e;
  34160. process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((x) => {
  34161. let [C, T] = x;
  34162. Qi(t.tooltipVisible === void 0, "Slider", `\`${C}\` is deprecated, please use \`${T}\` instead.`);
  34163. });
  34164. const {
  34165. prefixCls: o,
  34166. rootPrefixCls: s,
  34167. direction: l,
  34168. getPopupContainer: u,
  34169. configProvider: c
  34170. } = It("slider", t), [f, d] = UTe(o), h = ss(), p = U(), v = U({}), g = (x, C) => {
  34171. v.value[x] = C;
  34172. }, m = L(() => t.tooltipPlacement ? t.tooltipPlacement : t.vertical ? l.value === "rtl" ? "left" : "right" : "top"), y = () => {
  34173. var x;
  34174. (x = p.value) === null || x === void 0 || x.focus();
  34175. }, b = () => {
  34176. var x;
  34177. (x = p.value) === null || x === void 0 || x.blur();
  34178. }, _ = (x) => {
  34179. i("update:value", x), i("change", x), h.onFieldChange();
  34180. }, O = (x) => {
  34181. i("blur", x);
  34182. };
  34183. a({
  34184. focus: y,
  34185. blur: b
  34186. });
  34187. const S = (x) => {
  34188. var {
  34189. tooltipPrefixCls: C
  34190. } = x, T = x.info, {
  34191. value: w,
  34192. dragging: P,
  34193. index: $
  34194. } = T, A = P3(T, ["value", "dragging", "index"]);
  34195. const {
  34196. tipFormatter: D,
  34197. tooltipOpen: E = t.tooltipVisible,
  34198. getTooltipPopupContainer: R
  34199. } = t, N = D ? v.value[$] || P : !1, V = E || E === void 0 && N;
  34200. return M(HTe, {
  34201. prefixCls: C,
  34202. title: D ? D(w) : "",
  34203. open: V,
  34204. placement: m.value,
  34205. transitionName: `${s.value}-zoom-down`,
  34206. key: $,
  34207. overlayClassName: `${o.value}-tooltip`,
  34208. getPopupContainer: R || (u == null ? void 0 : u.value)
  34209. }, {
  34210. default: () => [M(wY, j(j({}, A), {}, {
  34211. value: w,
  34212. onMouseenter: () => g($, !0),
  34213. onMouseleave: () => g($, !1)
  34214. }), null)]
  34215. });
  34216. };
  34217. return () => {
  34218. const {
  34219. tooltipPrefixCls: x,
  34220. range: C,
  34221. id: T = h.id.value
  34222. } = t, w = P3(t, ["tooltipPrefixCls", "range", "id"]), P = c.getPrefixCls("tooltip", x), $ = ye(n.class, {
  34223. [`${o.value}-rtl`]: l.value === "rtl"
  34224. }, d.value);
  34225. l.value === "rtl" && !w.vertical && (w.reverse = !w.reverse);
  34226. let A;
  34227. return typeof C == "object" && (A = C.draggableTrack), f(C ? M(QTe, j(j(j({}, n), w), {}, {
  34228. step: w.step,
  34229. draggableTrack: A,
  34230. class: $,
  34231. ref: p,
  34232. handle: (D) => S({
  34233. tooltipPrefixCls: P,
  34234. prefixCls: o.value,
  34235. info: D
  34236. }),
  34237. prefixCls: o.value,
  34238. onChange: _,
  34239. onBlur: O
  34240. }), {
  34241. mark: r.mark
  34242. }) : M(VTe, j(j(j({}, n), w), {}, {
  34243. id: T,
  34244. step: w.step,
  34245. class: $,
  34246. ref: p,
  34247. handle: (D) => S({
  34248. tooltipPrefixCls: P,
  34249. prefixCls: o.value,
  34250. info: D
  34251. }),
  34252. prefixCls: o.value,
  34253. onChange: _,
  34254. onBlur: O
  34255. }), {
  34256. mark: r.mark
  34257. }));
  34258. };
  34259. }
  34260. }), KTe = np(qTe);
  34261. var JTe = { 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" };
  34262. function $3(t) {
  34263. for (var e = 1; e < arguments.length; e++) {
  34264. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34265. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34266. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34267. }))), r.forEach(function(i) {
  34268. ePe(t, i, n[i]);
  34269. });
  34270. }
  34271. return t;
  34272. }
  34273. function ePe(t, e, n) {
  34274. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34275. }
  34276. var ED = function(e, n) {
  34277. var r = $3({}, e, n.attrs);
  34278. return M(lt, $3({}, r, {
  34279. icon: JTe
  34280. }), null);
  34281. };
  34282. ED.displayName = "AlignCenterOutlined";
  34283. ED.inheritAttrs = !1;
  34284. var tPe = { 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" };
  34285. function A3(t) {
  34286. for (var e = 1; e < arguments.length; e++) {
  34287. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34288. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34289. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34290. }))), r.forEach(function(i) {
  34291. nPe(t, i, n[i]);
  34292. });
  34293. }
  34294. return t;
  34295. }
  34296. function nPe(t, e, n) {
  34297. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34298. }
  34299. var MD = function(e, n) {
  34300. var r = A3({}, e, n.attrs);
  34301. return M(lt, A3({}, r, {
  34302. icon: tPe
  34303. }), null);
  34304. };
  34305. MD.displayName = "AlignLeftOutlined";
  34306. MD.inheritAttrs = !1;
  34307. var rPe = { 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" };
  34308. function E3(t) {
  34309. for (var e = 1; e < arguments.length; e++) {
  34310. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34311. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34312. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34313. }))), r.forEach(function(i) {
  34314. iPe(t, i, n[i]);
  34315. });
  34316. }
  34317. return t;
  34318. }
  34319. function iPe(t, e, n) {
  34320. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34321. }
  34322. var ID = function(e, n) {
  34323. var r = E3({}, e, n.attrs);
  34324. return M(lt, E3({}, r, {
  34325. icon: rPe
  34326. }), null);
  34327. };
  34328. ID.displayName = "AlignRightOutlined";
  34329. ID.inheritAttrs = !1;
  34330. var aPe = { 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" };
  34331. function M3(t) {
  34332. for (var e = 1; e < arguments.length; e++) {
  34333. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34334. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34335. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34336. }))), r.forEach(function(i) {
  34337. oPe(t, i, n[i]);
  34338. });
  34339. }
  34340. return t;
  34341. }
  34342. function oPe(t, e, n) {
  34343. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34344. }
  34345. var DD = function(e, n) {
  34346. var r = M3({}, e, n.attrs);
  34347. return M(lt, M3({}, r, {
  34348. icon: aPe
  34349. }), null);
  34350. };
  34351. DD.displayName = "BoldOutlined";
  34352. DD.inheritAttrs = !1;
  34353. var sPe = { 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" };
  34354. function I3(t) {
  34355. for (var e = 1; e < arguments.length; e++) {
  34356. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34357. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34358. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34359. }))), r.forEach(function(i) {
  34360. lPe(t, i, n[i]);
  34361. });
  34362. }
  34363. return t;
  34364. }
  34365. function lPe(t, e, n) {
  34366. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34367. }
  34368. var RD = function(e, n) {
  34369. var r = I3({}, e, n.attrs);
  34370. return M(lt, I3({}, r, {
  34371. icon: sPe
  34372. }), null);
  34373. };
  34374. RD.displayName = "BorderBottomOutlined";
  34375. RD.inheritAttrs = !1;
  34376. var uPe = { 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" };
  34377. function D3(t) {
  34378. for (var e = 1; e < arguments.length; e++) {
  34379. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34380. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34381. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34382. }))), r.forEach(function(i) {
  34383. cPe(t, i, n[i]);
  34384. });
  34385. }
  34386. return t;
  34387. }
  34388. function cPe(t, e, n) {
  34389. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34390. }
  34391. var kD = function(e, n) {
  34392. var r = D3({}, e, n.attrs);
  34393. return M(lt, D3({}, r, {
  34394. icon: uPe
  34395. }), null);
  34396. };
  34397. kD.displayName = "BorderLeftOutlined";
  34398. kD.inheritAttrs = !1;
  34399. var fPe = { 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" };
  34400. function R3(t) {
  34401. for (var e = 1; e < arguments.length; e++) {
  34402. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34403. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34404. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34405. }))), r.forEach(function(i) {
  34406. dPe(t, i, n[i]);
  34407. });
  34408. }
  34409. return t;
  34410. }
  34411. function dPe(t, e, n) {
  34412. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34413. }
  34414. var LD = function(e, n) {
  34415. var r = R3({}, e, n.attrs);
  34416. return M(lt, R3({}, r, {
  34417. icon: fPe
  34418. }), null);
  34419. };
  34420. LD.displayName = "BorderRightOutlined";
  34421. LD.inheritAttrs = !1;
  34422. var hPe = { 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" };
  34423. function k3(t) {
  34424. for (var e = 1; e < arguments.length; e++) {
  34425. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34426. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34427. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34428. }))), r.forEach(function(i) {
  34429. pPe(t, i, n[i]);
  34430. });
  34431. }
  34432. return t;
  34433. }
  34434. function pPe(t, e, n) {
  34435. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34436. }
  34437. var ND = function(e, n) {
  34438. var r = k3({}, e, n.attrs);
  34439. return M(lt, k3({}, r, {
  34440. icon: hPe
  34441. }), null);
  34442. };
  34443. ND.displayName = "BorderTopOutlined";
  34444. ND.inheritAttrs = !1;
  34445. var vPe = { 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" };
  34446. function L3(t) {
  34447. for (var e = 1; e < arguments.length; e++) {
  34448. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34449. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34450. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34451. }))), r.forEach(function(i) {
  34452. gPe(t, i, n[i]);
  34453. });
  34454. }
  34455. return t;
  34456. }
  34457. function gPe(t, e, n) {
  34458. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34459. }
  34460. var x0 = function(e, n) {
  34461. var r = L3({}, e, n.attrs);
  34462. return M(lt, L3({}, r, {
  34463. icon: vPe
  34464. }), null);
  34465. };
  34466. x0.displayName = "DatabaseOutlined";
  34467. x0.inheritAttrs = !1;
  34468. var mPe = { 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" };
  34469. function N3(t) {
  34470. for (var e = 1; e < arguments.length; e++) {
  34471. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34472. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34473. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34474. }))), r.forEach(function(i) {
  34475. yPe(t, i, n[i]);
  34476. });
  34477. }
  34478. return t;
  34479. }
  34480. function yPe(t, e, n) {
  34481. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34482. }
  34483. var BD = function(e, n) {
  34484. var r = N3({}, e, n.attrs);
  34485. return M(lt, N3({}, r, {
  34486. icon: mPe
  34487. }), null);
  34488. };
  34489. BD.displayName = "FontColorsOutlined";
  34490. BD.inheritAttrs = !1;
  34491. var bPe = { 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" };
  34492. function B3(t) {
  34493. for (var e = 1; e < arguments.length; e++) {
  34494. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34495. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34496. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34497. }))), r.forEach(function(i) {
  34498. _Pe(t, i, n[i]);
  34499. });
  34500. }
  34501. return t;
  34502. }
  34503. function _Pe(t, e, n) {
  34504. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34505. }
  34506. var zD = function(e, n) {
  34507. var r = B3({}, e, n.attrs);
  34508. return M(lt, B3({}, r, {
  34509. icon: bPe
  34510. }), null);
  34511. };
  34512. zD.displayName = "ItalicOutlined";
  34513. zD.inheritAttrs = !1;
  34514. var OPe = { 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" };
  34515. function z3(t) {
  34516. for (var e = 1; e < arguments.length; e++) {
  34517. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34518. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34519. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34520. }))), r.forEach(function(i) {
  34521. SPe(t, i, n[i]);
  34522. });
  34523. }
  34524. return t;
  34525. }
  34526. function SPe(t, e, n) {
  34527. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34528. }
  34529. var VD = function(e, n) {
  34530. var r = z3({}, e, n.attrs);
  34531. return M(lt, z3({}, r, {
  34532. icon: OPe
  34533. }), null);
  34534. };
  34535. VD.displayName = "RadiusBottomleftOutlined";
  34536. VD.inheritAttrs = !1;
  34537. var xPe = { 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" };
  34538. function V3(t) {
  34539. for (var e = 1; e < arguments.length; e++) {
  34540. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34541. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34542. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34543. }))), r.forEach(function(i) {
  34544. wPe(t, i, n[i]);
  34545. });
  34546. }
  34547. return t;
  34548. }
  34549. function wPe(t, e, n) {
  34550. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34551. }
  34552. var FD = function(e, n) {
  34553. var r = V3({}, e, n.attrs);
  34554. return M(lt, V3({}, r, {
  34555. icon: xPe
  34556. }), null);
  34557. };
  34558. FD.displayName = "RadiusBottomrightOutlined";
  34559. FD.inheritAttrs = !1;
  34560. var CPe = { 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" };
  34561. function F3(t) {
  34562. for (var e = 1; e < arguments.length; e++) {
  34563. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34564. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34565. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34566. }))), r.forEach(function(i) {
  34567. TPe(t, i, n[i]);
  34568. });
  34569. }
  34570. return t;
  34571. }
  34572. function TPe(t, e, n) {
  34573. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34574. }
  34575. var WD = function(e, n) {
  34576. var r = F3({}, e, n.attrs);
  34577. return M(lt, F3({}, r, {
  34578. icon: CPe
  34579. }), null);
  34580. };
  34581. WD.displayName = "RadiusUpleftOutlined";
  34582. WD.inheritAttrs = !1;
  34583. var PPe = { 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" };
  34584. function W3(t) {
  34585. for (var e = 1; e < arguments.length; e++) {
  34586. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34587. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34588. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34589. }))), r.forEach(function(i) {
  34590. $Pe(t, i, n[i]);
  34591. });
  34592. }
  34593. return t;
  34594. }
  34595. function $Pe(t, e, n) {
  34596. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34597. }
  34598. var QD = function(e, n) {
  34599. var r = W3({}, e, n.attrs);
  34600. return M(lt, W3({}, r, {
  34601. icon: PPe
  34602. }), null);
  34603. };
  34604. QD.displayName = "RadiusUprightOutlined";
  34605. QD.inheritAttrs = !1;
  34606. var APe = { 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" };
  34607. function Q3(t) {
  34608. for (var e = 1; e < arguments.length; e++) {
  34609. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34610. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34611. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34612. }))), r.forEach(function(i) {
  34613. EPe(t, i, n[i]);
  34614. });
  34615. }
  34616. return t;
  34617. }
  34618. function EPe(t, e, n) {
  34619. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34620. }
  34621. var w0 = function(e, n) {
  34622. var r = Q3({}, e, n.attrs);
  34623. return M(lt, Q3({}, r, {
  34624. icon: APe
  34625. }), null);
  34626. };
  34627. w0.displayName = "SkinOutlined";
  34628. w0.inheritAttrs = !1;
  34629. const bs = (t, e, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
  34630. const a = t == null ? void 0 : t(i);
  34631. if (n === !1 || !a)
  34632. return e == null ? void 0 : e(i);
  34633. };
  34634. var H3;
  34635. const Yr = typeof window < "u", MPe = (t) => typeof t == "string", MY = () => {
  34636. }, IPe = Yr && ((H3 = window == null ? void 0 : window.navigator) == null ? void 0 : H3.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
  34637. function IY(t) {
  34638. return typeof t == "function" ? t() : B(t);
  34639. }
  34640. function DPe(t) {
  34641. return t;
  34642. }
  34643. function HD(t) {
  34644. return j9() ? (f0(t), !0) : !1;
  34645. }
  34646. function RPe(t, e = !0) {
  34647. vn() ? it(t) : e ? t() : Tt(t);
  34648. }
  34649. function Rl(t) {
  34650. var e;
  34651. const n = IY(t);
  34652. return (e = n == null ? void 0 : n.$el) != null ? e : n;
  34653. }
  34654. const GD = Yr ? window : void 0;
  34655. function I_(...t) {
  34656. let e, n, r, i;
  34657. if (MPe(t[0]) || Array.isArray(t[0]) ? ([n, r, i] = t, e = GD) : [e, n, r, i] = t, !e)
  34658. return MY;
  34659. Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  34660. const a = [], o = () => {
  34661. a.forEach((c) => c()), a.length = 0;
  34662. }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(() => [Rl(e), IY(i)], ([c, f]) => {
  34663. o(), c && a.push(...n.flatMap((d) => r.map((h) => s(c, d, h, f))));
  34664. }, { immediate: !0, flush: "post" }), u = () => {
  34665. l(), o();
  34666. };
  34667. return HD(u), u;
  34668. }
  34669. let G3 = !1;
  34670. function kPe(t, e, n = {}) {
  34671. const { window: r = GD, ignore: i = [], capture: a = !0, detectIframe: o = !1 } = n;
  34672. if (!r)
  34673. return;
  34674. IPe && !G3 && (G3 = !0, Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", MY)));
  34675. let s = !0;
  34676. const l = (d) => i.some((h) => {
  34677. if (typeof h == "string")
  34678. return Array.from(r.document.querySelectorAll(h)).some((p) => p === d.target || d.composedPath().includes(p));
  34679. {
  34680. const p = Rl(h);
  34681. return p && (d.target === p || d.composedPath().includes(p));
  34682. }
  34683. }), c = [
  34684. I_(r, "click", (d) => {
  34685. const h = Rl(t);
  34686. if (!(!h || h === d.target || d.composedPath().includes(h))) {
  34687. if (d.detail === 0 && (s = !l(d)), !s) {
  34688. s = !0;
  34689. return;
  34690. }
  34691. e(d);
  34692. }
  34693. }, { passive: !0, capture: a }),
  34694. I_(r, "pointerdown", (d) => {
  34695. const h = Rl(t);
  34696. h && (s = !d.composedPath().includes(h) && !l(d));
  34697. }, { passive: !0 }),
  34698. o && I_(r, "blur", (d) => {
  34699. var h;
  34700. const p = Rl(t);
  34701. ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && e(d);
  34702. })
  34703. ].filter(Boolean);
  34704. return () => c.forEach((d) => d());
  34705. }
  34706. function LPe(t, e = !1) {
  34707. const n = U(), r = () => n.value = !!t();
  34708. return r(), RPe(r, e), n;
  34709. }
  34710. const j3 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Z3 = "__vueuse_ssr_handlers__";
  34711. j3[Z3] = j3[Z3] || {};
  34712. var U3 = Object.getOwnPropertySymbols, NPe = Object.prototype.hasOwnProperty, BPe = Object.prototype.propertyIsEnumerable, zPe = (t, e) => {
  34713. var n = {};
  34714. for (var r in t)
  34715. NPe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  34716. if (t != null && U3)
  34717. for (var r of U3(t))
  34718. e.indexOf(r) < 0 && BPe.call(t, r) && (n[r] = t[r]);
  34719. return n;
  34720. };
  34721. function VPe(t, e, n = {}) {
  34722. const r = n, { window: i = GD } = r, a = zPe(r, ["window"]);
  34723. let o;
  34724. const s = LPe(() => i && "ResizeObserver" in i), l = () => {
  34725. o && (o.disconnect(), o = void 0);
  34726. }, u = se(() => Rl(t), (f) => {
  34727. l(), s.value && i && f && (o = new ResizeObserver(e), o.observe(f, a));
  34728. }, { immediate: !0, flush: "post" }), c = () => {
  34729. l(), u();
  34730. };
  34731. return HD(c), {
  34732. isSupported: s,
  34733. stop: c
  34734. };
  34735. }
  34736. var X3;
  34737. (function(t) {
  34738. t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
  34739. })(X3 || (X3 = {}));
  34740. var FPe = Object.defineProperty, Y3 = Object.getOwnPropertySymbols, WPe = Object.prototype.hasOwnProperty, QPe = Object.prototype.propertyIsEnumerable, q3 = (t, e, n) => e in t ? FPe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, HPe = (t, e) => {
  34741. for (var n in e || (e = {}))
  34742. WPe.call(e, n) && q3(t, n, e[n]);
  34743. if (Y3)
  34744. for (var n of Y3(e))
  34745. QPe.call(e, n) && q3(t, n, e[n]);
  34746. return t;
  34747. };
  34748. const GPe = {
  34749. easeInSine: [0.12, 0, 0.39, 0],
  34750. easeOutSine: [0.61, 1, 0.88, 1],
  34751. easeInOutSine: [0.37, 0, 0.63, 1],
  34752. easeInQuad: [0.11, 0, 0.5, 0],
  34753. easeOutQuad: [0.5, 1, 0.89, 1],
  34754. easeInOutQuad: [0.45, 0, 0.55, 1],
  34755. easeInCubic: [0.32, 0, 0.67, 0],
  34756. easeOutCubic: [0.33, 1, 0.68, 1],
  34757. easeInOutCubic: [0.65, 0, 0.35, 1],
  34758. easeInQuart: [0.5, 0, 0.75, 0],
  34759. easeOutQuart: [0.25, 1, 0.5, 1],
  34760. easeInOutQuart: [0.76, 0, 0.24, 1],
  34761. easeInQuint: [0.64, 0, 0.78, 0],
  34762. easeOutQuint: [0.22, 1, 0.36, 1],
  34763. easeInOutQuint: [0.83, 0, 0.17, 1],
  34764. easeInExpo: [0.7, 0, 0.84, 0],
  34765. easeOutExpo: [0.16, 1, 0.3, 1],
  34766. easeInOutExpo: [0.87, 0, 0.13, 1],
  34767. easeInCirc: [0.55, 0, 1, 0.45],
  34768. easeOutCirc: [0, 0.55, 0.45, 1],
  34769. easeInOutCirc: [0.85, 0, 0.15, 1],
  34770. easeInBack: [0.36, 0, 0.66, -0.56],
  34771. easeOutBack: [0.34, 1.56, 0.64, 1],
  34772. easeInOutBack: [0.68, -0.6, 0.32, 1.6]
  34773. };
  34774. HPe({
  34775. linear: DPe
  34776. }, GPe);
  34777. const jPe = () => Yr && /firefox/i.test(window.navigator.userAgent), jD = (t) => {
  34778. let e, n;
  34779. 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), {
  34780. clientX: e,
  34781. clientY: n
  34782. };
  34783. };
  34784. /**
  34785. * @vue/shared v3.4.31
  34786. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  34787. * @license MIT
  34788. **/
  34789. process.env.NODE_ENV !== "production" && Object.freeze({});
  34790. process.env.NODE_ENV !== "production" && Object.freeze([]);
  34791. const lm = () => {
  34792. }, ZPe = Object.prototype.hasOwnProperty, W1 = (t, e) => ZPe.call(t, e), UPe = Array.isArray, zv = (t) => typeof t == "function", ba = (t) => typeof t == "string", um = (t) => t !== null && typeof t == "object", XPe = (t) => t === void 0, Q1 = (t) => typeof t == "boolean", Ws = (t) => typeof t == "number", cm = (t) => typeof Element > "u" ? !1 : t instanceof Element, K3 = (t) => Gl(t), YPe = (t) => ba(t) ? !Number.isNaN(Number(t)) : !1;
  34793. class qPe extends Error {
  34794. constructor(e) {
  34795. super(e), this.name = "ElementPlusError";
  34796. }
  34797. }
  34798. function Gi(t, e) {
  34799. if (process.env.NODE_ENV !== "production") {
  34800. const n = ba(t) ? new qPe(`[${t}] ${e}`) : t;
  34801. console.warn(n);
  34802. }
  34803. }
  34804. const KPe = "utils/dom/style";
  34805. function eA(t, e = "px") {
  34806. if (!t)
  34807. return "";
  34808. if (Ws(t) || YPe(t))
  34809. return `${t}${e}`;
  34810. if (ba(t))
  34811. return t;
  34812. Gi(KPe, "binding value must be a string or number");
  34813. }
  34814. /*! Element Plus Icons Vue v2.3.1 */
  34815. var JPe = /* @__PURE__ */ te({
  34816. name: "ArrowDown",
  34817. __name: "arrow-down",
  34818. setup(t) {
  34819. return (e, n) => (pe(), Qe("svg", {
  34820. xmlns: "http://www.w3.org/2000/svg",
  34821. viewBox: "0 0 1024 1024"
  34822. }, [
  34823. He("path", {
  34824. fill: "currentColor",
  34825. 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"
  34826. })
  34827. ]));
  34828. }
  34829. }), e$e = JPe, t$e = /* @__PURE__ */ te({
  34830. name: "CircleCheck",
  34831. __name: "circle-check",
  34832. setup(t) {
  34833. return (e, n) => (pe(), Qe("svg", {
  34834. xmlns: "http://www.w3.org/2000/svg",
  34835. viewBox: "0 0 1024 1024"
  34836. }, [
  34837. He("path", {
  34838. fill: "currentColor",
  34839. 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"
  34840. }),
  34841. He("path", {
  34842. fill: "currentColor",
  34843. 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"
  34844. })
  34845. ]));
  34846. }
  34847. }), n$e = t$e, r$e = /* @__PURE__ */ te({
  34848. name: "CircleClose",
  34849. __name: "circle-close",
  34850. setup(t) {
  34851. return (e, n) => (pe(), Qe("svg", {
  34852. xmlns: "http://www.w3.org/2000/svg",
  34853. viewBox: "0 0 1024 1024"
  34854. }, [
  34855. He("path", {
  34856. fill: "currentColor",
  34857. 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"
  34858. }),
  34859. He("path", {
  34860. fill: "currentColor",
  34861. 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"
  34862. })
  34863. ]));
  34864. }
  34865. }), DY = r$e, i$e = /* @__PURE__ */ te({
  34866. name: "Close",
  34867. __name: "close",
  34868. setup(t) {
  34869. return (e, n) => (pe(), Qe("svg", {
  34870. xmlns: "http://www.w3.org/2000/svg",
  34871. viewBox: "0 0 1024 1024"
  34872. }, [
  34873. He("path", {
  34874. fill: "currentColor",
  34875. 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"
  34876. })
  34877. ]));
  34878. }
  34879. }), a$e = i$e, o$e = /* @__PURE__ */ te({
  34880. name: "Hide",
  34881. __name: "hide",
  34882. setup(t) {
  34883. return (e, n) => (pe(), Qe("svg", {
  34884. xmlns: "http://www.w3.org/2000/svg",
  34885. viewBox: "0 0 1024 1024"
  34886. }, [
  34887. He("path", {
  34888. fill: "currentColor",
  34889. 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"
  34890. }),
  34891. He("path", {
  34892. fill: "currentColor",
  34893. 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"
  34894. })
  34895. ]));
  34896. }
  34897. }), s$e = o$e, l$e = /* @__PURE__ */ te({
  34898. name: "Loading",
  34899. __name: "loading",
  34900. setup(t) {
  34901. return (e, n) => (pe(), Qe("svg", {
  34902. xmlns: "http://www.w3.org/2000/svg",
  34903. viewBox: "0 0 1024 1024"
  34904. }, [
  34905. He("path", {
  34906. fill: "currentColor",
  34907. 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"
  34908. })
  34909. ]));
  34910. }
  34911. }), RY = l$e, u$e = /* @__PURE__ */ te({
  34912. name: "View",
  34913. __name: "view",
  34914. setup(t) {
  34915. return (e, n) => (pe(), Qe("svg", {
  34916. xmlns: "http://www.w3.org/2000/svg",
  34917. viewBox: "0 0 1024 1024"
  34918. }, [
  34919. He("path", {
  34920. fill: "currentColor",
  34921. 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"
  34922. })
  34923. ]));
  34924. }
  34925. }), c$e = u$e;
  34926. const kY = "__epPropKey", jt = (t) => t, f$e = (t) => um(t) && !!t[kY], Tx = (t, e) => {
  34927. if (!um(t) || f$e(t))
  34928. return t;
  34929. const { values: n, required: r, default: i, type: a, validator: o } = t, l = {
  34930. type: a,
  34931. required: !!r,
  34932. validator: n || o ? (u) => {
  34933. let c = !1, f = [];
  34934. if (n && (f = Array.from(n), W1(t, "default") && f.push(i), c || (c = f.includes(u))), o && (c || (c = o(u))), !c && f.length > 0) {
  34935. const d = [...new Set(f)].map((h) => JSON.stringify(h)).join(", ");
  34936. Wle(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
  34937. }
  34938. return c;
  34939. } : void 0,
  34940. [kY]: !0
  34941. };
  34942. return W1(t, "default") && (l.default = i), l;
  34943. }, rr = (t) => A1(Object.entries(t).map(([e, n]) => [
  34944. e,
  34945. Tx(n, e)
  34946. ])), H1 = jt([
  34947. String,
  34948. Object,
  34949. Function
  34950. ]), d$e = {
  34951. validating: RY,
  34952. success: n$e,
  34953. error: DY
  34954. }, Df = (t, e) => {
  34955. if (t.install = (n) => {
  34956. for (const r of [t, ...Object.values(e ?? {})])
  34957. n.component(r.name, r);
  34958. }, e)
  34959. for (const [n, r] of Object.entries(e))
  34960. t[n] = r;
  34961. return t;
  34962. }, ZD = (t) => (t.install = lm, t), Xc = {
  34963. tab: "Tab",
  34964. enter: "Enter",
  34965. space: "Space",
  34966. left: "ArrowLeft",
  34967. up: "ArrowUp",
  34968. right: "ArrowRight",
  34969. down: "ArrowDown",
  34970. esc: "Escape",
  34971. delete: "Delete",
  34972. backspace: "Backspace",
  34973. numpadEnter: "NumpadEnter",
  34974. pageUp: "PageUp",
  34975. pageDown: "PageDown",
  34976. home: "Home",
  34977. end: "End"
  34978. }, Qs = "update:modelValue", LY = "change", h$e = ["", "default", "small", "large"], p$e = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t), v$e = (t) => t, g$e = ["class", "style"], m$e = /^on[A-Z]/, y$e = (t = {}) => {
  34979. const { excludeListeners: e = !1, excludeKeys: n } = t, r = L(() => ((n == null ? void 0 : n.value) || []).concat(g$e)), i = vn();
  34980. return i ? L(() => {
  34981. var a;
  34982. return A1(Object.entries((a = i.proxy) == null ? void 0 : a.$attrs).filter(([o]) => !r.value.includes(o) && !(e && m$e.test(o))));
  34983. }) : (Gi("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), L(() => ({})));
  34984. }, C0 = ({ from: t, replacement: e, scope: n, version: r, ref: i, type: a = "API" }, o) => {
  34985. se(() => B(o), (s) => {
  34986. s && Gi(n, `[${a}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
  34987. For more detail, please visit: ${i}
  34988. `);
  34989. }, {
  34990. immediate: !0
  34991. });
  34992. };
  34993. var b$e = {
  34994. name: "en",
  34995. el: {
  34996. breadcrumb: {
  34997. label: "Breadcrumb"
  34998. },
  34999. colorpicker: {
  35000. confirm: "OK",
  35001. clear: "Clear",
  35002. defaultLabel: "color picker",
  35003. description: "current color is {color}. press enter to select a new color."
  35004. },
  35005. datepicker: {
  35006. now: "Now",
  35007. today: "Today",
  35008. cancel: "Cancel",
  35009. clear: "Clear",
  35010. confirm: "OK",
  35011. dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
  35012. monthTablePrompt: "Use the arrow keys and enter to select the month",
  35013. yearTablePrompt: "Use the arrow keys and enter to select the year",
  35014. selectedDate: "Selected date",
  35015. selectDate: "Select date",
  35016. selectTime: "Select time",
  35017. startDate: "Start Date",
  35018. startTime: "Start Time",
  35019. endDate: "End Date",
  35020. endTime: "End Time",
  35021. prevYear: "Previous Year",
  35022. nextYear: "Next Year",
  35023. prevMonth: "Previous Month",
  35024. nextMonth: "Next Month",
  35025. year: "",
  35026. month1: "January",
  35027. month2: "February",
  35028. month3: "March",
  35029. month4: "April",
  35030. month5: "May",
  35031. month6: "June",
  35032. month7: "July",
  35033. month8: "August",
  35034. month9: "September",
  35035. month10: "October",
  35036. month11: "November",
  35037. month12: "December",
  35038. week: "week",
  35039. weeks: {
  35040. sun: "Sun",
  35041. mon: "Mon",
  35042. tue: "Tue",
  35043. wed: "Wed",
  35044. thu: "Thu",
  35045. fri: "Fri",
  35046. sat: "Sat"
  35047. },
  35048. weeksFull: {
  35049. sun: "Sunday",
  35050. mon: "Monday",
  35051. tue: "Tuesday",
  35052. wed: "Wednesday",
  35053. thu: "Thursday",
  35054. fri: "Friday",
  35055. sat: "Saturday"
  35056. },
  35057. months: {
  35058. jan: "Jan",
  35059. feb: "Feb",
  35060. mar: "Mar",
  35061. apr: "Apr",
  35062. may: "May",
  35063. jun: "Jun",
  35064. jul: "Jul",
  35065. aug: "Aug",
  35066. sep: "Sep",
  35067. oct: "Oct",
  35068. nov: "Nov",
  35069. dec: "Dec"
  35070. }
  35071. },
  35072. inputNumber: {
  35073. decrease: "decrease number",
  35074. increase: "increase number"
  35075. },
  35076. select: {
  35077. loading: "Loading",
  35078. noMatch: "No matching data",
  35079. noData: "No data",
  35080. placeholder: "Select"
  35081. },
  35082. dropdown: {
  35083. toggleDropdown: "Toggle Dropdown"
  35084. },
  35085. cascader: {
  35086. noMatch: "No matching data",
  35087. loading: "Loading",
  35088. placeholder: "Select",
  35089. noData: "No data"
  35090. },
  35091. pagination: {
  35092. goto: "Go to",
  35093. pagesize: "/page",
  35094. total: "Total {total}",
  35095. pageClassifier: "",
  35096. page: "Page",
  35097. prev: "Go to previous page",
  35098. next: "Go to next page",
  35099. currentPage: "page {pager}",
  35100. prevPages: "Previous {pager} pages",
  35101. nextPages: "Next {pager} pages",
  35102. deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
  35103. },
  35104. dialog: {
  35105. close: "Close this dialog"
  35106. },
  35107. drawer: {
  35108. close: "Close this dialog"
  35109. },
  35110. messagebox: {
  35111. title: "Message",
  35112. confirm: "OK",
  35113. cancel: "Cancel",
  35114. error: "Illegal input",
  35115. close: "Close this dialog"
  35116. },
  35117. upload: {
  35118. deleteTip: "press delete to remove",
  35119. delete: "Delete",
  35120. preview: "Preview",
  35121. continue: "Continue"
  35122. },
  35123. slider: {
  35124. defaultLabel: "slider between {min} and {max}",
  35125. defaultRangeStartLabel: "pick start value",
  35126. defaultRangeEndLabel: "pick end value"
  35127. },
  35128. table: {
  35129. emptyText: "No Data",
  35130. confirmFilter: "Confirm",
  35131. resetFilter: "Reset",
  35132. clearFilter: "All",
  35133. sumText: "Sum"
  35134. },
  35135. tour: {
  35136. next: "Next",
  35137. previous: "Previous",
  35138. finish: "Finish"
  35139. },
  35140. tree: {
  35141. emptyText: "No Data"
  35142. },
  35143. transfer: {
  35144. noMatch: "No matching data",
  35145. noData: "No data",
  35146. titles: ["List 1", "List 2"],
  35147. filterPlaceholder: "Enter keyword",
  35148. noCheckedFormat: "{total} items",
  35149. hasCheckedFormat: "{checked}/{total} checked"
  35150. },
  35151. image: {
  35152. error: "FAILED"
  35153. },
  35154. pageHeader: {
  35155. title: "Back"
  35156. },
  35157. popconfirm: {
  35158. confirmButtonText: "Yes",
  35159. cancelButtonText: "No"
  35160. },
  35161. carousel: {
  35162. leftArrow: "Carousel arrow left",
  35163. rightArrow: "Carousel arrow right",
  35164. indicator: "Carousel switch to index {index}"
  35165. }
  35166. }
  35167. };
  35168. const _$e = (t) => (e, n) => O$e(e, n, B(t)), O$e = (t, e, n) => kt(n, t, t).replace(/\{(\w+)\}/g, (r, i) => {
  35169. var a;
  35170. return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`;
  35171. }), S$e = (t) => {
  35172. const e = L(() => B(t).name), n = tp(t) ? t : U(t);
  35173. return {
  35174. lang: e,
  35175. locale: n,
  35176. t: _$e(t)
  35177. };
  35178. }, x$e = Symbol("localeContextKey"), w$e = (t) => {
  35179. const e = Ge(x$e, U());
  35180. return S$e(L(() => e.value || b$e));
  35181. }, kC = "el", C$e = "is-", Nu = (t, e, n, r, i) => {
  35182. let a = `${t}-${e}`;
  35183. return n && (a += `-${n}`), r && (a += `__${r}`), i && (a += `--${i}`), a;
  35184. }, T$e = Symbol("namespaceContextKey"), UD = (t) => {
  35185. const e = vn() ? Ge(T$e, U(kC)) : U(kC);
  35186. return L(() => B(e) || kC);
  35187. }, Jn = (t, e) => {
  35188. const n = UD();
  35189. return {
  35190. namespace: n,
  35191. b: (v = "") => Nu(n.value, t, v, "", ""),
  35192. e: (v) => v ? Nu(n.value, t, "", v, "") : "",
  35193. m: (v) => v ? Nu(n.value, t, "", "", v) : "",
  35194. be: (v, g) => v && g ? Nu(n.value, t, v, g, "") : "",
  35195. em: (v, g) => v && g ? Nu(n.value, t, "", v, g) : "",
  35196. bm: (v, g) => v && g ? Nu(n.value, t, v, "", g) : "",
  35197. bem: (v, g, m) => v && g && m ? Nu(n.value, t, v, g, m) : "",
  35198. is: (v, ...g) => {
  35199. const m = g.length >= 1 ? g[0] : !0;
  35200. return v && m ? `${C$e}${v}` : "";
  35201. },
  35202. cssVar: (v) => {
  35203. const g = {};
  35204. for (const m in v)
  35205. v[m] && (g[`--${n.value}-${m}`] = v[m]);
  35206. return g;
  35207. },
  35208. cssVarName: (v) => `--${n.value}-${v}`,
  35209. cssVarBlock: (v) => {
  35210. const g = {};
  35211. for (const m in v)
  35212. v[m] && (g[`--${n.value}-${t}-${m}`] = v[m]);
  35213. return g;
  35214. },
  35215. cssVarBlockName: (v) => `--${n.value}-${t}-${v}`
  35216. };
  35217. }, P$e = Tx({
  35218. type: jt(Boolean),
  35219. default: null
  35220. }), $$e = Tx({
  35221. type: jt(Function)
  35222. }), NY = (t) => {
  35223. const e = `update:${t}`, n = `onUpdate:${t}`, r = [e], i = {
  35224. [t]: P$e,
  35225. [n]: $$e
  35226. };
  35227. return {
  35228. useModelToggle: ({
  35229. indicator: o,
  35230. toggleReason: s,
  35231. shouldHideWhenRouteChanges: l,
  35232. shouldProceed: u,
  35233. onShow: c,
  35234. onHide: f
  35235. }) => {
  35236. const d = vn(), { emit: h } = d, p = d.props, v = L(() => zv(p[n])), g = L(() => p[t] === null), m = (x) => {
  35237. o.value !== !0 && (o.value = !0, s && (s.value = x), zv(c) && c(x));
  35238. }, y = (x) => {
  35239. o.value !== !1 && (o.value = !1, s && (s.value = x), zv(f) && f(x));
  35240. }, b = (x) => {
  35241. if (p.disabled === !0 || zv(u) && !u())
  35242. return;
  35243. const C = v.value && Yr;
  35244. C && h(e, !0), (g.value || !C) && m(x);
  35245. }, _ = (x) => {
  35246. if (p.disabled === !0 || !Yr)
  35247. return;
  35248. const C = v.value && Yr;
  35249. C && h(e, !1), (g.value || !C) && y(x);
  35250. }, O = (x) => {
  35251. Q1(x) && (p.disabled && x ? v.value && h(e, !1) : o.value !== x && (x ? m() : y()));
  35252. }, S = () => {
  35253. o.value ? _() : b();
  35254. };
  35255. return se(() => p[t], O), l && d.appContext.config.globalProperties.$route !== void 0 && se(() => ({
  35256. ...d.proxy.$route
  35257. }), () => {
  35258. l.value && o.value && _();
  35259. }), it(() => {
  35260. O(p[t]);
  35261. }), {
  35262. hide: _,
  35263. show: b,
  35264. toggle: S,
  35265. hasUpdateHandler: v
  35266. };
  35267. },
  35268. useModelToggleProps: i,
  35269. useModelToggleEmits: r
  35270. };
  35271. };
  35272. NY("modelValue");
  35273. const BY = (t) => {
  35274. const e = vn();
  35275. return L(() => {
  35276. var n, r;
  35277. return (r = (n = e == null ? void 0 : e.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[t];
  35278. });
  35279. };
  35280. var _i = "top", Pa = "bottom", $a = "right", Oi = "left", XD = "auto", T0 = [_i, Pa, $a, Oi], Mh = "start", fm = "end", A$e = "clippingParents", zY = "viewport", Xp = "popper", E$e = "reference", J3 = T0.reduce(function(t, e) {
  35281. return t.concat([e + "-" + Mh, e + "-" + fm]);
  35282. }, []), YD = [].concat(T0, [XD]).reduce(function(t, e) {
  35283. return t.concat([e, e + "-" + Mh, e + "-" + fm]);
  35284. }, []), M$e = "beforeRead", I$e = "read", D$e = "afterRead", R$e = "beforeMain", k$e = "main", L$e = "afterMain", N$e = "beforeWrite", B$e = "write", z$e = "afterWrite", V$e = [M$e, I$e, D$e, R$e, k$e, L$e, N$e, B$e, z$e];
  35285. function ns(t) {
  35286. return t ? (t.nodeName || "").toLowerCase() : null;
  35287. }
  35288. function ho(t) {
  35289. if (t == null) return window;
  35290. if (t.toString() !== "[object Window]") {
  35291. var e = t.ownerDocument;
  35292. return e && e.defaultView || window;
  35293. }
  35294. return t;
  35295. }
  35296. function Ih(t) {
  35297. var e = ho(t).Element;
  35298. return t instanceof e || t instanceof Element;
  35299. }
  35300. function _a(t) {
  35301. var e = ho(t).HTMLElement;
  35302. return t instanceof e || t instanceof HTMLElement;
  35303. }
  35304. function qD(t) {
  35305. if (typeof ShadowRoot > "u") return !1;
  35306. var e = ho(t).ShadowRoot;
  35307. return t instanceof e || t instanceof ShadowRoot;
  35308. }
  35309. function F$e(t) {
  35310. var e = t.state;
  35311. Object.keys(e.elements).forEach(function(n) {
  35312. var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
  35313. !_a(a) || !ns(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(o) {
  35314. var s = i[o];
  35315. s === !1 ? a.removeAttribute(o) : a.setAttribute(o, s === !0 ? "" : s);
  35316. }));
  35317. });
  35318. }
  35319. function W$e(t) {
  35320. var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  35321. return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
  35322. Object.keys(e.elements).forEach(function(r) {
  35323. 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) {
  35324. return l[u] = "", l;
  35325. }, {});
  35326. !_a(i) || !ns(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
  35327. i.removeAttribute(l);
  35328. }));
  35329. });
  35330. };
  35331. }
  35332. var VY = { name: "applyStyles", enabled: !0, phase: "write", fn: F$e, effect: W$e, requires: ["computeStyles"] };
  35333. function jo(t) {
  35334. return t.split("-")[0];
  35335. }
  35336. var Yc = Math.max, G1 = Math.min, Dh = Math.round;
  35337. function Rh(t, e) {
  35338. e === void 0 && (e = !1);
  35339. var n = t.getBoundingClientRect(), r = 1, i = 1;
  35340. if (_a(t) && e) {
  35341. var a = t.offsetHeight, o = t.offsetWidth;
  35342. o > 0 && (r = Dh(n.width) / o || 1), a > 0 && (i = Dh(n.height) / a || 1);
  35343. }
  35344. 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 };
  35345. }
  35346. function KD(t) {
  35347. var e = Rh(t), n = t.offsetWidth, r = t.offsetHeight;
  35348. 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 };
  35349. }
  35350. function FY(t, e) {
  35351. var n = e.getRootNode && e.getRootNode();
  35352. if (t.contains(e)) return !0;
  35353. if (n && qD(n)) {
  35354. var r = e;
  35355. do {
  35356. if (r && t.isSameNode(r)) return !0;
  35357. r = r.parentNode || r.host;
  35358. } while (r);
  35359. }
  35360. return !1;
  35361. }
  35362. function Hs(t) {
  35363. return ho(t).getComputedStyle(t);
  35364. }
  35365. function Q$e(t) {
  35366. return ["table", "td", "th"].indexOf(ns(t)) >= 0;
  35367. }
  35368. function xu(t) {
  35369. return ((Ih(t) ? t.ownerDocument : t.document) || window.document).documentElement;
  35370. }
  35371. function Px(t) {
  35372. return ns(t) === "html" ? t : t.assignedSlot || t.parentNode || (qD(t) ? t.host : null) || xu(t);
  35373. }
  35374. function e6(t) {
  35375. return !_a(t) || Hs(t).position === "fixed" ? null : t.offsetParent;
  35376. }
  35377. function H$e(t) {
  35378. var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  35379. if (n && _a(t)) {
  35380. var r = Hs(t);
  35381. if (r.position === "fixed") return null;
  35382. }
  35383. var i = Px(t);
  35384. for (qD(i) && (i = i.host); _a(i) && ["html", "body"].indexOf(ns(i)) < 0; ) {
  35385. var a = Hs(i);
  35386. 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;
  35387. i = i.parentNode;
  35388. }
  35389. return null;
  35390. }
  35391. function P0(t) {
  35392. for (var e = ho(t), n = e6(t); n && Q$e(n) && Hs(n).position === "static"; ) n = e6(n);
  35393. return n && (ns(n) === "html" || ns(n) === "body" && Hs(n).position === "static") ? e : n || H$e(t) || e;
  35394. }
  35395. function JD(t) {
  35396. return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
  35397. }
  35398. function mg(t, e, n) {
  35399. return Yc(t, G1(e, n));
  35400. }
  35401. function G$e(t, e, n) {
  35402. var r = mg(t, e, n);
  35403. return r > n ? n : r;
  35404. }
  35405. function WY() {
  35406. return { top: 0, right: 0, bottom: 0, left: 0 };
  35407. }
  35408. function QY(t) {
  35409. return Object.assign({}, WY(), t);
  35410. }
  35411. function HY(t, e) {
  35412. return e.reduce(function(n, r) {
  35413. return n[r] = t, n;
  35414. }, {});
  35415. }
  35416. var j$e = function(t, e) {
  35417. return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, QY(typeof t != "number" ? t : HY(t, T0));
  35418. };
  35419. function Z$e(t) {
  35420. var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = jo(n.placement), l = JD(s), u = [Oi, $a].indexOf(s) >= 0, c = u ? "height" : "width";
  35421. if (!(!a || !o)) {
  35422. var f = j$e(i.padding, n), d = KD(a), h = l === "y" ? _i : Oi, p = l === "y" ? Pa : $a, v = n.rects.reference[c] + n.rects.reference[l] - o[l] - n.rects.popper[c], g = o[l] - n.rects.reference[l], m = P0(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 = mg(_, S, O), C = l;
  35423. n.modifiersData[r] = (e = {}, e[C] = x, e.centerOffset = x - S, e);
  35424. }
  35425. }
  35426. function U$e(t) {
  35427. var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
  35428. i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || !FY(e.elements.popper, i) || (e.elements.arrow = i));
  35429. }
  35430. var X$e = { name: "arrow", enabled: !0, phase: "main", fn: Z$e, effect: U$e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
  35431. function kh(t) {
  35432. return t.split("-")[1];
  35433. }
  35434. var Y$e = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
  35435. function q$e(t) {
  35436. var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
  35437. return { x: Dh(e * i) / i || 0, y: Dh(n * i) / i || 0 };
  35438. }
  35439. function t6(t) {
  35440. 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 };
  35441. h = g.x, v = g.y;
  35442. var m = o.hasOwnProperty("x"), y = o.hasOwnProperty("y"), b = Oi, _ = _i, O = window;
  35443. if (u) {
  35444. var S = P0(n), x = "clientHeight", C = "clientWidth";
  35445. if (S === ho(n) && (S = xu(n), Hs(S).position !== "static" && s === "absolute" && (x = "scrollHeight", C = "scrollWidth")), S = S, i === _i || (i === Oi || i === $a) && a === fm) {
  35446. _ = Pa;
  35447. var T = f && S === O && O.visualViewport ? O.visualViewport.height : S[x];
  35448. v -= T - r.height, v *= l ? 1 : -1;
  35449. }
  35450. if (i === Oi || (i === _i || i === Pa) && a === fm) {
  35451. b = $a;
  35452. var w = f && S === O && O.visualViewport ? O.visualViewport.width : S[C];
  35453. h -= w - r.width, h *= l ? 1 : -1;
  35454. }
  35455. }
  35456. var P = Object.assign({ position: s }, u && Y$e), $ = c === !0 ? q$e({ x: h, y: v }) : { x: h, y: v };
  35457. if (h = $.x, v = $.y, l) {
  35458. var A;
  35459. 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));
  35460. }
  35461. return Object.assign({}, P, (e = {}, e[_] = y ? v + "px" : "", e[b] = m ? h + "px" : "", e.transform = "", e));
  35462. }
  35463. function K$e(t) {
  35464. 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: jo(e.placement), variation: kh(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" };
  35465. e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, t6(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, t6(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 });
  35466. }
  35467. var GY = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: K$e, data: {} }, ky = { passive: !0 };
  35468. function J$e(t) {
  35469. 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 = ho(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
  35470. return a && u.forEach(function(c) {
  35471. c.addEventListener("scroll", n.update, ky);
  35472. }), s && l.addEventListener("resize", n.update, ky), function() {
  35473. a && u.forEach(function(c) {
  35474. c.removeEventListener("scroll", n.update, ky);
  35475. }), s && l.removeEventListener("resize", n.update, ky);
  35476. };
  35477. }
  35478. var jY = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
  35479. }, effect: J$e, data: {} }, e2e = { left: "right", right: "left", bottom: "top", top: "bottom" };
  35480. function D_(t) {
  35481. return t.replace(/left|right|bottom|top/g, function(e) {
  35482. return e2e[e];
  35483. });
  35484. }
  35485. var t2e = { start: "end", end: "start" };
  35486. function n6(t) {
  35487. return t.replace(/start|end/g, function(e) {
  35488. return t2e[e];
  35489. });
  35490. }
  35491. function eR(t) {
  35492. var e = ho(t), n = e.pageXOffset, r = e.pageYOffset;
  35493. return { scrollLeft: n, scrollTop: r };
  35494. }
  35495. function tR(t) {
  35496. return Rh(xu(t)).left + eR(t).scrollLeft;
  35497. }
  35498. function n2e(t) {
  35499. var e = ho(t), n = xu(t), r = e.visualViewport, i = n.clientWidth, a = n.clientHeight, o = 0, s = 0;
  35500. 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 + tR(t), y: s };
  35501. }
  35502. function r2e(t) {
  35503. var e, n = xu(t), r = eR(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 + tR(t), l = -r.scrollTop;
  35504. return Hs(i || n).direction === "rtl" && (s += Yc(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: o, x: s, y: l };
  35505. }
  35506. function nR(t) {
  35507. var e = Hs(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
  35508. return /auto|scroll|overlay|hidden/.test(n + i + r);
  35509. }
  35510. function ZY(t) {
  35511. return ["html", "body", "#document"].indexOf(ns(t)) >= 0 ? t.ownerDocument.body : _a(t) && nR(t) ? t : ZY(Px(t));
  35512. }
  35513. function yg(t, e) {
  35514. var n;
  35515. e === void 0 && (e = []);
  35516. var r = ZY(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = ho(r), o = i ? [a].concat(a.visualViewport || [], nR(r) ? r : []) : r, s = e.concat(o);
  35517. return i ? s : s.concat(yg(Px(o)));
  35518. }
  35519. function tA(t) {
  35520. return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
  35521. }
  35522. function i2e(t) {
  35523. var e = Rh(t);
  35524. 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;
  35525. }
  35526. function r6(t, e) {
  35527. return e === zY ? tA(n2e(t)) : Ih(e) ? i2e(e) : tA(r2e(xu(t)));
  35528. }
  35529. function a2e(t) {
  35530. var e = yg(Px(t)), n = ["absolute", "fixed"].indexOf(Hs(t).position) >= 0, r = n && _a(t) ? P0(t) : t;
  35531. return Ih(r) ? e.filter(function(i) {
  35532. return Ih(i) && FY(i, r) && ns(i) !== "body";
  35533. }) : [];
  35534. }
  35535. function o2e(t, e, n) {
  35536. var r = e === "clippingParents" ? a2e(t) : [].concat(e), i = [].concat(r, [n]), a = i[0], o = i.reduce(function(s, l) {
  35537. var u = r6(t, l);
  35538. return s.top = Yc(u.top, s.top), s.right = G1(u.right, s.right), s.bottom = G1(u.bottom, s.bottom), s.left = Yc(u.left, s.left), s;
  35539. }, r6(t, a));
  35540. return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
  35541. }
  35542. function UY(t) {
  35543. var e = t.reference, n = t.element, r = t.placement, i = r ? jo(r) : null, a = r ? kh(r) : null, o = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, l;
  35544. switch (i) {
  35545. case _i:
  35546. l = { x: o, y: e.y - n.height };
  35547. break;
  35548. case Pa:
  35549. l = { x: o, y: e.y + e.height };
  35550. break;
  35551. case $a:
  35552. l = { x: e.x + e.width, y: s };
  35553. break;
  35554. case Oi:
  35555. l = { x: e.x - n.width, y: s };
  35556. break;
  35557. default:
  35558. l = { x: e.x, y: e.y };
  35559. }
  35560. var u = i ? JD(i) : null;
  35561. if (u != null) {
  35562. var c = u === "y" ? "height" : "width";
  35563. switch (a) {
  35564. case Mh:
  35565. l[u] = l[u] - (e[c] / 2 - n[c] / 2);
  35566. break;
  35567. case fm:
  35568. l[u] = l[u] + (e[c] / 2 - n[c] / 2);
  35569. break;
  35570. }
  35571. }
  35572. return l;
  35573. }
  35574. function dm(t, e) {
  35575. e === void 0 && (e = {});
  35576. var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.boundary, o = a === void 0 ? A$e : a, s = n.rootBoundary, l = s === void 0 ? zY : s, u = n.elementContext, c = u === void 0 ? Xp : u, f = n.altBoundary, d = f === void 0 ? !1 : f, h = n.padding, p = h === void 0 ? 0 : h, v = QY(typeof p != "number" ? p : HY(p, T0)), g = c === Xp ? E$e : Xp, m = t.rects.popper, y = t.elements[d ? g : c], b = o2e(Ih(y) ? y : y.contextElement || xu(t.elements.popper), o, l), _ = Rh(t.elements.reference), O = UY({ reference: _, element: m, strategy: "absolute", placement: i }), S = tA(Object.assign({}, m, O)), x = c === Xp ? 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;
  35577. if (c === Xp && T) {
  35578. var w = T[i];
  35579. Object.keys(C).forEach(function(P) {
  35580. var $ = [$a, Pa].indexOf(P) >= 0 ? 1 : -1, A = [_i, Pa].indexOf(P) >= 0 ? "y" : "x";
  35581. C[P] += w[A] * $;
  35582. });
  35583. }
  35584. return C;
  35585. }
  35586. function s2e(t, e) {
  35587. e === void 0 && (e = {});
  35588. 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 ? YD : l, c = kh(r), f = c ? s ? J3 : J3.filter(function(p) {
  35589. return kh(p) === c;
  35590. }) : T0, d = f.filter(function(p) {
  35591. return u.indexOf(p) >= 0;
  35592. });
  35593. d.length === 0 && (d = f);
  35594. var h = d.reduce(function(p, v) {
  35595. return p[v] = dm(t, { placement: v, boundary: i, rootBoundary: a, padding: o })[jo(v)], p;
  35596. }, {});
  35597. return Object.keys(h).sort(function(p, v) {
  35598. return h[p] - h[v];
  35599. });
  35600. }
  35601. function l2e(t) {
  35602. if (jo(t) === XD) return [];
  35603. var e = D_(t);
  35604. return [n6(t), e, n6(e)];
  35605. }
  35606. function u2e(t) {
  35607. var e = t.state, n = t.options, r = t.name;
  35608. if (!e.modifiersData[r]._skip) {
  35609. 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 = jo(g), y = m === g, b = l || (y || !p ? [D_(g)] : l2e(g)), _ = [g].concat(b).reduce(function(ne, ee) {
  35610. return ne.concat(jo(ee) === XD ? s2e(e, { placement: ee, boundary: c, rootBoundary: f, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ee);
  35611. }, []), O = e.rects.reference, S = e.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, T = _[0], w = 0; w < _.length; w++) {
  35612. var P = _[w], $ = jo(P), A = kh(P) === Mh, D = [_i, Pa].indexOf($) >= 0, E = D ? "width" : "height", R = dm(e, { placement: P, boundary: c, rootBoundary: f, altBoundary: d, padding: u }), N = D ? A ? $a : Oi : A ? Pa : _i;
  35613. O[E] > S[E] && (N = D_(N));
  35614. var V = D_(N), z = [];
  35615. if (a && z.push(R[$] <= 0), s && z.push(R[N] <= 0, R[V] <= 0), z.every(function(ne) {
  35616. return ne;
  35617. })) {
  35618. T = P, C = !1;
  35619. break;
  35620. }
  35621. x.set(P, z);
  35622. }
  35623. if (C) for (var W = p ? 3 : 1, F = function(ne) {
  35624. var ee = _.find(function(oe) {
  35625. var K = x.get(oe);
  35626. if (K) return K.slice(0, ne).every(function(ie) {
  35627. return ie;
  35628. });
  35629. });
  35630. if (ee) return T = ee, "break";
  35631. }, Q = W; Q > 0; Q--) {
  35632. var Z = F(Q);
  35633. if (Z === "break") break;
  35634. }
  35635. e.placement !== T && (e.modifiersData[r]._skip = !0, e.placement = T, e.reset = !0);
  35636. }
  35637. }
  35638. var c2e = { name: "flip", enabled: !0, phase: "main", fn: u2e, requiresIfExists: ["offset"], data: { _skip: !1 } };
  35639. function i6(t, e, n) {
  35640. 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 };
  35641. }
  35642. function a6(t) {
  35643. return [_i, $a, Pa, Oi].some(function(e) {
  35644. return t[e] >= 0;
  35645. });
  35646. }
  35647. function f2e(t) {
  35648. var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, o = dm(e, { elementContext: "reference" }), s = dm(e, { altBoundary: !0 }), l = i6(o, r), u = i6(s, i, a), c = a6(l), f = a6(u);
  35649. 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 });
  35650. }
  35651. var d2e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: f2e };
  35652. function h2e(t, e, n) {
  35653. var r = jo(t), i = [Oi, _i].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, o = a[0], s = a[1];
  35654. return o = o || 0, s = (s || 0) * i, [Oi, $a].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s };
  35655. }
  35656. function p2e(t) {
  35657. var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = YD.reduce(function(c, f) {
  35658. return c[f] = h2e(f, e.rects, a), c;
  35659. }, {}), s = o[e.placement], l = s.x, u = s.y;
  35660. e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = o;
  35661. }
  35662. var v2e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: p2e };
  35663. function g2e(t) {
  35664. var e = t.state, n = t.name;
  35665. e.modifiersData[n] = UY({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
  35666. }
  35667. var XY = { name: "popperOffsets", enabled: !0, phase: "read", fn: g2e, data: {} };
  35668. function m2e(t) {
  35669. return t === "x" ? "y" : "x";
  35670. }
  35671. function y2e(t) {
  35672. 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 = dm(e, { boundary: l, rootBoundary: u, padding: f, altBoundary: c }), m = jo(e.placement), y = kh(e.placement), b = !y, _ = JD(m), O = m2e(_), 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 };
  35673. if (S) {
  35674. if (a) {
  35675. var A, D = _ === "y" ? _i : Oi, E = _ === "y" ? Pa : $a, R = _ === "y" ? "height" : "width", N = S[_], V = N + g[D], z = N - g[E], W = h ? -C[R] / 2 : 0, F = y === Mh ? x[R] : C[R], Q = y === Mh ? -C[R] : -x[R], Z = e.elements.arrow, ne = h && Z ? KD(Z) : { width: 0, height: 0 }, ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : WY(), oe = ee[D], K = ee[E], ie = mg(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 && P0(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 = mg(h ? G1(V, de) : V, N, h ? Yc(z, Ee) : z);
  35676. S[_] = $e, $[_] = $e - N;
  35677. }
  35678. if (s) {
  35679. var Se, be = _ === "x" ? _i : Oi, he = _ === "x" ? Pa : $a, Te = S[O], ze = O === "y" ? "height" : "width", ut = Te + g[be], ct = Te - g[he], Dt = [_i, Oi].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 ? G$e(Xe, Te, Rt) : mg(h ? Xe : ut, Te, h ? Rt : ct);
  35680. S[O] = An, $[O] = An - Te;
  35681. }
  35682. e.modifiersData[r] = $;
  35683. }
  35684. }
  35685. var b2e = { name: "preventOverflow", enabled: !0, phase: "main", fn: y2e, requiresIfExists: ["offset"] };
  35686. function _2e(t) {
  35687. return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
  35688. }
  35689. function O2e(t) {
  35690. return t === ho(t) || !_a(t) ? eR(t) : _2e(t);
  35691. }
  35692. function S2e(t) {
  35693. var e = t.getBoundingClientRect(), n = Dh(e.width) / t.offsetWidth || 1, r = Dh(e.height) / t.offsetHeight || 1;
  35694. return n !== 1 || r !== 1;
  35695. }
  35696. function x2e(t, e, n) {
  35697. n === void 0 && (n = !1);
  35698. var r = _a(e), i = _a(e) && S2e(e), a = xu(e), o = Rh(t, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
  35699. return (r || !r && !n) && ((ns(e) !== "body" || nR(a)) && (s = O2e(e)), _a(e) ? (l = Rh(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = tR(a))), { x: o.left + s.scrollLeft - l.x, y: o.top + s.scrollTop - l.y, width: o.width, height: o.height };
  35700. }
  35701. function w2e(t) {
  35702. var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  35703. t.forEach(function(a) {
  35704. e.set(a.name, a);
  35705. });
  35706. function i(a) {
  35707. n.add(a.name);
  35708. var o = [].concat(a.requires || [], a.requiresIfExists || []);
  35709. o.forEach(function(s) {
  35710. if (!n.has(s)) {
  35711. var l = e.get(s);
  35712. l && i(l);
  35713. }
  35714. }), r.push(a);
  35715. }
  35716. return t.forEach(function(a) {
  35717. n.has(a.name) || i(a);
  35718. }), r;
  35719. }
  35720. function C2e(t) {
  35721. var e = w2e(t);
  35722. return V$e.reduce(function(n, r) {
  35723. return n.concat(e.filter(function(i) {
  35724. return i.phase === r;
  35725. }));
  35726. }, []);
  35727. }
  35728. function T2e(t) {
  35729. var e;
  35730. return function() {
  35731. return e || (e = new Promise(function(n) {
  35732. Promise.resolve().then(function() {
  35733. e = void 0, n(t());
  35734. });
  35735. })), e;
  35736. };
  35737. }
  35738. function P2e(t) {
  35739. var e = t.reduce(function(n, r) {
  35740. var i = n[r.name];
  35741. 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;
  35742. }, {});
  35743. return Object.keys(e).map(function(n) {
  35744. return e[n];
  35745. });
  35746. }
  35747. var o6 = { placement: "bottom", modifiers: [], strategy: "absolute" };
  35748. function s6() {
  35749. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  35750. return !e.some(function(r) {
  35751. return !(r && typeof r.getBoundingClientRect == "function");
  35752. });
  35753. }
  35754. function rR(t) {
  35755. t === void 0 && (t = {});
  35756. var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? o6 : i;
  35757. return function(o, s, l) {
  35758. l === void 0 && (l = a);
  35759. var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, o6, a), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, c = [], f = !1, d = { state: u, setOptions: function(v) {
  35760. var g = typeof v == "function" ? v(u.options) : v;
  35761. p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: Ih(o) ? yg(o) : o.contextElement ? yg(o.contextElement) : [], popper: yg(s) };
  35762. var m = C2e(P2e([].concat(r, u.options.modifiers)));
  35763. return u.orderedModifiers = m.filter(function(y) {
  35764. return y.enabled;
  35765. }), h(), d.update();
  35766. }, forceUpdate: function() {
  35767. if (!f) {
  35768. var v = u.elements, g = v.reference, m = v.popper;
  35769. if (s6(g, m)) {
  35770. u.rects = { reference: x2e(g, P0(m), u.options.strategy === "fixed"), popper: KD(m) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(C) {
  35771. return u.modifiersData[C.name] = Object.assign({}, C.data);
  35772. });
  35773. for (var y = 0; y < u.orderedModifiers.length; y++) {
  35774. if (u.reset === !0) {
  35775. u.reset = !1, y = -1;
  35776. continue;
  35777. }
  35778. var b = u.orderedModifiers[y], _ = b.fn, O = b.options, S = O === void 0 ? {} : O, x = b.name;
  35779. typeof _ == "function" && (u = _({ state: u, options: S, name: x, instance: d }) || u);
  35780. }
  35781. }
  35782. }
  35783. }, update: T2e(function() {
  35784. return new Promise(function(v) {
  35785. d.forceUpdate(), v(u);
  35786. });
  35787. }), destroy: function() {
  35788. p(), f = !0;
  35789. } };
  35790. if (!s6(o, s)) return d;
  35791. d.setOptions(l).then(function(v) {
  35792. !f && l.onFirstUpdate && l.onFirstUpdate(v);
  35793. });
  35794. function h() {
  35795. u.orderedModifiers.forEach(function(v) {
  35796. var g = v.name, m = v.options, y = m === void 0 ? {} : m, b = v.effect;
  35797. if (typeof b == "function") {
  35798. var _ = b({ state: u, name: g, instance: d, options: y }), O = function() {
  35799. };
  35800. c.push(_ || O);
  35801. }
  35802. });
  35803. }
  35804. function p() {
  35805. c.forEach(function(v) {
  35806. return v();
  35807. }), c = [];
  35808. }
  35809. return d;
  35810. };
  35811. }
  35812. rR();
  35813. var $2e = [jY, XY, GY, VY];
  35814. rR({ defaultModifiers: $2e });
  35815. var A2e = [jY, XY, GY, VY, v2e, c2e, b2e, X$e, d2e], E2e = rR({ defaultModifiers: A2e });
  35816. const M2e = (t, e, n = {}) => {
  35817. const r = {
  35818. name: "updateState",
  35819. enabled: !0,
  35820. phase: "write",
  35821. fn: ({ state: l }) => {
  35822. const u = I2e(l);
  35823. Object.assign(o.value, u);
  35824. },
  35825. requires: ["computeStyles"]
  35826. }, i = L(() => {
  35827. const { onFirstUpdate: l, placement: u, strategy: c, modifiers: f } = B(n);
  35828. return {
  35829. onFirstUpdate: l,
  35830. placement: u || "bottom",
  35831. strategy: c || "absolute",
  35832. modifiers: [
  35833. ...f || [],
  35834. r,
  35835. { name: "applyStyles", enabled: !1 }
  35836. ]
  35837. };
  35838. }), a = ae(), o = U({
  35839. styles: {
  35840. popper: {
  35841. position: B(i).strategy,
  35842. left: "0",
  35843. top: "0"
  35844. },
  35845. arrow: {
  35846. position: "absolute"
  35847. }
  35848. },
  35849. attributes: {}
  35850. }), s = () => {
  35851. a.value && (a.value.destroy(), a.value = void 0);
  35852. };
  35853. return se(i, (l) => {
  35854. const u = B(a);
  35855. u && u.setOptions(l);
  35856. }, {
  35857. deep: !0
  35858. }), se([t, e], ([l, u]) => {
  35859. s(), !(!l || !u) && (a.value = E2e(l, u, B(i)));
  35860. }), yt(() => {
  35861. s();
  35862. }), {
  35863. state: L(() => {
  35864. var l;
  35865. return { ...((l = B(a)) == null ? void 0 : l.state) || {} };
  35866. }),
  35867. styles: L(() => B(o).styles),
  35868. attributes: L(() => B(o).attributes),
  35869. update: () => {
  35870. var l;
  35871. return (l = B(a)) == null ? void 0 : l.update();
  35872. },
  35873. forceUpdate: () => {
  35874. var l;
  35875. return (l = B(a)) == null ? void 0 : l.forceUpdate();
  35876. },
  35877. instanceRef: L(() => B(a))
  35878. };
  35879. };
  35880. function I2e(t) {
  35881. const e = Object.keys(t.elements), n = A1(e.map((i) => [i, t.styles[i] || {}])), r = A1(e.map((i) => [i, t.attributes[i]]));
  35882. return {
  35883. styles: n,
  35884. attributes: r
  35885. };
  35886. }
  35887. function l6() {
  35888. let t;
  35889. const e = (r, i) => {
  35890. n(), t = window.setTimeout(r, i);
  35891. }, n = () => window.clearTimeout(t);
  35892. return HD(() => n()), {
  35893. registerTimeout: e,
  35894. cancelTimeout: n
  35895. };
  35896. }
  35897. const nA = {
  35898. prefix: Math.floor(Math.random() * 1e4),
  35899. current: 0
  35900. }, D2e = Symbol("elIdInjection"), YY = () => vn() ? Ge(D2e, nA) : nA, iR = (t) => {
  35901. const e = YY();
  35902. !Yr && e === nA && Gi("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
  35903. usage: app.provide(ID_INJECTION_KEY, {
  35904. prefix: number,
  35905. current: number,
  35906. })`);
  35907. const n = UD();
  35908. return L(() => B(t) || `${n.value}-id-${e.prefix}-${e.current++}`);
  35909. };
  35910. let Pd = [];
  35911. const u6 = (t) => {
  35912. const e = t;
  35913. e.key === Xc.esc && Pd.forEach((n) => n(e));
  35914. }, R2e = (t) => {
  35915. it(() => {
  35916. Pd.length === 0 && document.addEventListener("keydown", u6), Yr && Pd.push(t);
  35917. }), yt(() => {
  35918. Pd = Pd.filter((e) => e !== t), Pd.length === 0 && Yr && document.removeEventListener("keydown", u6);
  35919. });
  35920. };
  35921. let c6;
  35922. const qY = () => {
  35923. const t = UD(), e = YY(), n = L(() => `${t.value}-popper-container-${e.prefix}`), r = L(() => `#${n.value}`);
  35924. return {
  35925. id: n,
  35926. selector: r
  35927. };
  35928. }, k2e = (t) => {
  35929. const e = document.createElement("div");
  35930. return e.id = t, document.body.appendChild(e), e;
  35931. }, L2e = () => {
  35932. const { id: t, selector: e } = qY();
  35933. return H9(() => {
  35934. Yr && (process.env.NODE_ENV === "test" || !c6 && !document.body.querySelector(e.value)) && (c6 = k2e(t.value));
  35935. }), {
  35936. id: t,
  35937. selector: e
  35938. };
  35939. }, N2e = rr({
  35940. showAfter: {
  35941. type: Number,
  35942. default: 0
  35943. },
  35944. hideAfter: {
  35945. type: Number,
  35946. default: 200
  35947. },
  35948. autoClose: {
  35949. type: Number,
  35950. default: 0
  35951. }
  35952. }), B2e = ({
  35953. showAfter: t,
  35954. hideAfter: e,
  35955. autoClose: n,
  35956. open: r,
  35957. close: i
  35958. }) => {
  35959. const { registerTimeout: a } = l6(), {
  35960. registerTimeout: o,
  35961. cancelTimeout: s
  35962. } = l6();
  35963. return {
  35964. onOpen: (c) => {
  35965. a(() => {
  35966. r(c);
  35967. const f = B(n);
  35968. Ws(f) && f > 0 && o(() => {
  35969. i(c);
  35970. }, f);
  35971. }, B(t));
  35972. },
  35973. onClose: (c) => {
  35974. s(), a(() => {
  35975. i(c);
  35976. }, B(e));
  35977. }
  35978. };
  35979. }, KY = Symbol("elForwardRef"), z2e = (t) => {
  35980. pt(KY, {
  35981. setForwardRef: (n) => {
  35982. t.value = n;
  35983. }
  35984. });
  35985. }, V2e = (t) => ({
  35986. mounted(e) {
  35987. t(e);
  35988. },
  35989. updated(e) {
  35990. t(e);
  35991. },
  35992. unmounted() {
  35993. t(null);
  35994. }
  35995. }), f6 = {
  35996. current: 0
  35997. }, d6 = U(0), F2e = 2e3, h6 = Symbol("elZIndexContextKey"), W2e = Symbol("zIndexContextKey"), Q2e = (t) => {
  35998. const e = vn() ? Ge(h6, f6) : f6, n = vn() ? Ge(W2e, void 0) : void 0, r = L(() => {
  35999. const o = B(n);
  36000. return Ws(o) ? o : F2e;
  36001. }), i = L(() => r.value + d6.value), a = () => (e.current++, d6.value = e.current, i.value);
  36002. return !Yr && !Ge(h6) && Gi("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
  36003. usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
  36004. initialZIndex: r,
  36005. currentZIndex: i,
  36006. nextZIndex: a
  36007. };
  36008. };
  36009. function H2e(t) {
  36010. const e = U();
  36011. function n() {
  36012. if (t.value == null)
  36013. return;
  36014. const { selectionStart: i, selectionEnd: a, value: o } = t.value;
  36015. if (i == null || a == null)
  36016. return;
  36017. const s = o.slice(0, Math.max(0, i)), l = o.slice(Math.max(0, a));
  36018. e.value = {
  36019. selectionStart: i,
  36020. selectionEnd: a,
  36021. value: o,
  36022. beforeTxt: s,
  36023. afterTxt: l
  36024. };
  36025. }
  36026. function r() {
  36027. if (t.value == null || e.value == null)
  36028. return;
  36029. const { value: i } = t.value, { beforeTxt: a, afterTxt: o, selectionStart: s } = e.value;
  36030. if (a == null || o == null || s == null)
  36031. return;
  36032. let l = i.length;
  36033. if (i.endsWith(o))
  36034. l = i.length - o.length;
  36035. else if (i.startsWith(a))
  36036. l = a.length;
  36037. else {
  36038. const u = a[s - 1], c = i.indexOf(u, s - 1);
  36039. c !== -1 && (l = c + 1);
  36040. }
  36041. t.value.setSelectionRange(l, l);
  36042. }
  36043. return [n, r];
  36044. }
  36045. const $0 = Tx({
  36046. type: String,
  36047. values: h$e,
  36048. required: !1
  36049. }), G2e = Symbol("size"), j2e = () => {
  36050. const t = Ge(G2e, {});
  36051. return L(() => B(t.size) || "");
  36052. };
  36053. function JY(t, { afterFocus: e, beforeBlur: n, afterBlur: r } = {}) {
  36054. const i = vn(), { emit: a } = i, o = ae(), s = U(!1), l = (f) => {
  36055. s.value || (s.value = !0, a("focus", f), e == null || e());
  36056. }, u = (f) => {
  36057. var d;
  36058. zv(n) && n(f) || f.relatedTarget && ((d = o.value) != null && d.contains(f.relatedTarget)) || (s.value = !1, a("blur", f), r == null || r());
  36059. }, c = () => {
  36060. var f;
  36061. (f = t.value) == null || f.focus();
  36062. };
  36063. return se(o, (f) => {
  36064. f && f.setAttribute("tabindex", "-1");
  36065. }), I_(o, "click", c), {
  36066. wrapperRef: o,
  36067. isFocused: s,
  36068. handleFocus: l,
  36069. handleBlur: u
  36070. };
  36071. }
  36072. const Z2e = rr({
  36073. ariaLabel: String,
  36074. ariaOrientation: {
  36075. type: String,
  36076. values: ["horizontal", "vertical", "undefined"]
  36077. },
  36078. ariaControls: String
  36079. }), A0 = (t) => am(Z2e, t), U2e = Symbol(), p6 = U();
  36080. function X2e(t, e = void 0) {
  36081. const n = vn() ? Ge(U2e, p6) : p6;
  36082. return L(() => {
  36083. var r, i;
  36084. return (i = (r = n.value) == null ? void 0 : r[t]) != null ? i : e;
  36085. });
  36086. }
  36087. var Qn = (t, e) => {
  36088. const n = t.__vccOpts || t;
  36089. for (const [r, i] of e)
  36090. n[r] = i;
  36091. return n;
  36092. };
  36093. const Y2e = rr({
  36094. size: {
  36095. type: jt([Number, String])
  36096. },
  36097. color: {
  36098. type: String
  36099. }
  36100. }), q2e = te({
  36101. name: "ElIcon",
  36102. inheritAttrs: !1
  36103. }), K2e = /* @__PURE__ */ te({
  36104. ...q2e,
  36105. props: Y2e,
  36106. setup(t) {
  36107. const e = t, n = Jn("icon"), r = L(() => {
  36108. const { size: i, color: a } = e;
  36109. return !i && !a ? {} : {
  36110. fontSize: XPe(i) ? void 0 : eA(i),
  36111. "--color": a
  36112. };
  36113. });
  36114. return (i, a) => (pe(), Qe("i", _n({
  36115. class: B(n).b(),
  36116. style: B(r)
  36117. }, i.$attrs), [
  36118. zn(i.$slots, "default")
  36119. ], 16));
  36120. }
  36121. });
  36122. var J2e = /* @__PURE__ */ Qn(K2e, [["__file", "icon.vue"]]);
  36123. const ws = Df(J2e), aR = Symbol("formContextKey"), j1 = Symbol("formItemContextKey"), $x = (t, e = {}) => {
  36124. const n = U(void 0), r = e.prop ? n : BY("size"), i = e.global ? n : j2e(), a = e.form ? { size: void 0 } : Ge(aR, void 0), o = e.formItem ? { size: void 0 } : Ge(j1, void 0);
  36125. return L(() => r.value || B(t) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || "");
  36126. }, E0 = (t) => {
  36127. const e = BY("disabled"), n = Ge(aR, void 0);
  36128. return L(() => e.value || B(t) || (n == null ? void 0 : n.disabled) || !1);
  36129. }, Ax = () => {
  36130. const t = Ge(aR, void 0), e = Ge(j1, void 0);
  36131. return {
  36132. form: t,
  36133. formItem: e
  36134. };
  36135. }, oR = (t, {
  36136. formItemContext: e,
  36137. disableIdGeneration: n,
  36138. disableIdManagement: r
  36139. }) => {
  36140. n || (n = U(!1)), r || (r = U(!1));
  36141. const i = U();
  36142. let a;
  36143. const o = L(() => {
  36144. var s;
  36145. return !!(!(t.label || t.ariaLabel) && e && e.inputIds && ((s = e.inputIds) == null ? void 0 : s.length) <= 1);
  36146. });
  36147. return it(() => {
  36148. a = se([Nn(t, "id"), n], ([s, l]) => {
  36149. const u = s ?? (l ? void 0 : iR().value);
  36150. 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);
  36151. }, { immediate: !0 });
  36152. }), nl(() => {
  36153. a && a(), e != null && e.removeInputId && i.value && e.removeInputId(i.value);
  36154. }), {
  36155. isLabeledByFormItem: o,
  36156. inputId: i
  36157. };
  36158. };
  36159. let Fa;
  36160. const eAe = `
  36161. height:0 !important;
  36162. visibility:hidden !important;
  36163. ${jPe() ? "" : "overflow:hidden !important;"}
  36164. position:absolute !important;
  36165. z-index:-1000 !important;
  36166. top:0 !important;
  36167. right:0 !important;
  36168. `, tAe = [
  36169. "letter-spacing",
  36170. "line-height",
  36171. "padding-top",
  36172. "padding-bottom",
  36173. "font-family",
  36174. "font-weight",
  36175. "font-size",
  36176. "text-rendering",
  36177. "text-transform",
  36178. "width",
  36179. "text-indent",
  36180. "padding-left",
  36181. "padding-right",
  36182. "border-width",
  36183. "box-sizing"
  36184. ];
  36185. function nAe(t) {
  36186. 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"));
  36187. return { contextStyle: tAe.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: i, boxSizing: n };
  36188. }
  36189. function v6(t, e = 1, n) {
  36190. var r;
  36191. Fa || (Fa = document.createElement("textarea"), document.body.appendChild(Fa));
  36192. const { paddingSize: i, borderSize: a, boxSizing: o, contextStyle: s } = nAe(t);
  36193. Fa.setAttribute("style", `${s};${eAe}`), Fa.value = t.value || t.placeholder || "";
  36194. let l = Fa.scrollHeight;
  36195. const u = {};
  36196. o === "border-box" ? l = l + a : o === "content-box" && (l = l - i), Fa.value = "";
  36197. const c = Fa.scrollHeight - i;
  36198. if (Ws(e)) {
  36199. let f = c * e;
  36200. o === "border-box" && (f = f + i + a), l = Math.max(f, l), u.minHeight = `${f}px`;
  36201. }
  36202. if (Ws(n)) {
  36203. let f = c * n;
  36204. o === "border-box" && (f = f + i + a), l = Math.min(f, l);
  36205. }
  36206. return u.height = `${l}px`, (r = Fa.parentNode) == null || r.removeChild(Fa), Fa = void 0, u;
  36207. }
  36208. const rAe = rr({
  36209. id: {
  36210. type: String,
  36211. default: void 0
  36212. },
  36213. size: $0,
  36214. disabled: Boolean,
  36215. modelValue: {
  36216. type: jt([
  36217. String,
  36218. Number,
  36219. Object
  36220. ]),
  36221. default: ""
  36222. },
  36223. maxlength: {
  36224. type: [String, Number]
  36225. },
  36226. minlength: {
  36227. type: [String, Number]
  36228. },
  36229. type: {
  36230. type: String,
  36231. default: "text"
  36232. },
  36233. resize: {
  36234. type: String,
  36235. values: ["none", "both", "horizontal", "vertical"]
  36236. },
  36237. autosize: {
  36238. type: jt([Boolean, Object]),
  36239. default: !1
  36240. },
  36241. autocomplete: {
  36242. type: String,
  36243. default: "off"
  36244. },
  36245. formatter: {
  36246. type: Function
  36247. },
  36248. parser: {
  36249. type: Function
  36250. },
  36251. placeholder: {
  36252. type: String
  36253. },
  36254. form: {
  36255. type: String
  36256. },
  36257. readonly: {
  36258. type: Boolean,
  36259. default: !1
  36260. },
  36261. clearable: {
  36262. type: Boolean,
  36263. default: !1
  36264. },
  36265. showPassword: {
  36266. type: Boolean,
  36267. default: !1
  36268. },
  36269. showWordLimit: {
  36270. type: Boolean,
  36271. default: !1
  36272. },
  36273. suffixIcon: {
  36274. type: H1
  36275. },
  36276. prefixIcon: {
  36277. type: H1
  36278. },
  36279. containerRole: {
  36280. type: String,
  36281. default: void 0
  36282. },
  36283. label: {
  36284. type: String,
  36285. default: void 0
  36286. },
  36287. tabindex: {
  36288. type: [String, Number],
  36289. default: 0
  36290. },
  36291. validateEvent: {
  36292. type: Boolean,
  36293. default: !0
  36294. },
  36295. inputStyle: {
  36296. type: jt([Object, Array, String]),
  36297. default: () => v$e({})
  36298. },
  36299. autofocus: {
  36300. type: Boolean,
  36301. default: !1
  36302. },
  36303. ...A0(["ariaLabel"])
  36304. }), iAe = {
  36305. [Qs]: (t) => ba(t),
  36306. input: (t) => ba(t),
  36307. change: (t) => ba(t),
  36308. focus: (t) => t instanceof FocusEvent,
  36309. blur: (t) => t instanceof FocusEvent,
  36310. clear: () => !0,
  36311. mouseleave: (t) => t instanceof MouseEvent,
  36312. mouseenter: (t) => t instanceof MouseEvent,
  36313. keydown: (t) => t instanceof Event,
  36314. compositionstart: (t) => t instanceof CompositionEvent,
  36315. compositionupdate: (t) => t instanceof CompositionEvent,
  36316. compositionend: (t) => t instanceof CompositionEvent
  36317. }, aAe = ["role"], oAe = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], sAe = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], lAe = te({
  36318. name: "ElInput",
  36319. inheritAttrs: !1
  36320. }), uAe = /* @__PURE__ */ te({
  36321. ...lAe,
  36322. props: rAe,
  36323. emits: iAe,
  36324. setup(t, { expose: e, emit: n }) {
  36325. const r = t, i = Qle(), a = Z9(), o = L(() => {
  36326. const ve = {};
  36327. return r.containerRole === "combobox" && (ve["aria-haspopup"] = i["aria-haspopup"], ve["aria-owns"] = i["aria-owns"], ve["aria-expanded"] = i["aria-expanded"]), ve;
  36328. }), s = L(() => [
  36329. r.type === "textarea" ? g.b() : v.b(),
  36330. v.m(h.value),
  36331. v.is("disabled", p.value),
  36332. v.is("exceed", ne.value),
  36333. {
  36334. [v.b("group")]: a.prepend || a.append,
  36335. [v.m("prefix")]: a.prefix || r.prefixIcon,
  36336. [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
  36337. [v.bm("suffix", "password-clear")]: W.value && F.value,
  36338. [v.b("hidden")]: r.type === "hidden"
  36339. },
  36340. i.class
  36341. ]), l = L(() => [
  36342. v.e("wrapper"),
  36343. v.is("focus", w.value)
  36344. ]), u = y$e({
  36345. excludeKeys: L(() => Object.keys(o.value))
  36346. }), { form: c, formItem: f } = Ax(), { inputId: d } = oR(r, {
  36347. formItemContext: f
  36348. }), h = $x(), p = E0(), 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: $ } = JY(C, {
  36349. afterBlur() {
  36350. var ve;
  36351. r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "blur").catch((Xe) => Gi(Xe)));
  36352. }
  36353. }), A = L(() => {
  36354. var ve;
  36355. return (ve = c == null ? void 0 : c.statusIcon) != null ? ve : !1;
  36356. }), D = L(() => (f == null ? void 0 : f.validateState) || ""), E = L(() => D.value && d$e[D.value]), R = L(() => O.value ? c$e : s$e), N = L(() => [
  36357. i.style
  36358. ]), V = L(() => [
  36359. r.inputStyle,
  36360. x.value,
  36361. { resize: r.resize }
  36362. ]), z = L(() => Gl(r.modelValue) ? "" : String(r.modelValue)), W = L(() => r.clearable && !p.value && !r.readonly && !!z.value && (w.value || b.value)), F = L(() => r.showPassword && !p.value && !r.readonly && !!z.value && (!!z.value || w.value)), Q = L(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), Z = L(() => z.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] = H2e(m);
  36363. VPe(y, (ve) => {
  36364. if (H(), !Q.value || r.resize !== "both")
  36365. return;
  36366. const Xe = ve[0], { width: Rt } = Xe.contentRect;
  36367. S.value = {
  36368. right: `calc(100% - ${Rt + 15 + 6}px)`
  36369. };
  36370. });
  36371. const ie = () => {
  36372. const { type: ve, autosize: Xe } = r;
  36373. if (!(!Yr || ve !== "textarea" || !y.value))
  36374. if (Xe) {
  36375. const Rt = um(Xe) ? Xe.minRows : void 0, An = um(Xe) ? Xe.maxRows : void 0, sn = v6(y.value, Rt, An);
  36376. x.value = {
  36377. overflowY: "hidden",
  36378. ...sn
  36379. }, Tt(() => {
  36380. y.value.offsetHeight, x.value = sn;
  36381. });
  36382. } else
  36383. x.value = {
  36384. minHeight: v6(y.value).minHeight
  36385. };
  36386. }, H = ((ve) => {
  36387. let Xe = !1;
  36388. return () => {
  36389. var Rt;
  36390. if (Xe || !r.autosize)
  36391. return;
  36392. ((Rt = y.value) == null ? void 0 : Rt.offsetParent) === null || (ve(), Xe = !0);
  36393. };
  36394. })(ie), G = () => {
  36395. const ve = C.value, Xe = r.formatter ? r.formatter(z.value) : z.value;
  36396. !ve || ve.value === Xe || (ve.value = Xe);
  36397. }, re = async (ve) => {
  36398. oe();
  36399. let { value: Xe } = ve.target;
  36400. if (r.formatter && (Xe = r.parser ? r.parser(Xe) : Xe), !_.value) {
  36401. if (Xe === z.value) {
  36402. G();
  36403. return;
  36404. }
  36405. n(Qs, Xe), n("input", Xe), await Tt(), G(), K();
  36406. }
  36407. }, fe = (ve) => {
  36408. n("change", ve.target.value);
  36409. }, de = (ve) => {
  36410. n("compositionstart", ve), _.value = !0;
  36411. }, Ee = (ve) => {
  36412. var Xe;
  36413. n("compositionupdate", ve);
  36414. const Rt = (Xe = ve.target) == null ? void 0 : Xe.value, An = Rt[Rt.length - 1] || "";
  36415. _.value = !p$e(An);
  36416. }, $e = (ve) => {
  36417. n("compositionend", ve), _.value && (_.value = !1, re(ve));
  36418. }, Se = () => {
  36419. O.value = !O.value, be();
  36420. }, be = async () => {
  36421. var ve;
  36422. await Tt(), (ve = C.value) == null || ve.focus();
  36423. }, he = () => {
  36424. var ve;
  36425. return (ve = C.value) == null ? void 0 : ve.blur();
  36426. }, Te = (ve) => {
  36427. b.value = !1, n("mouseleave", ve);
  36428. }, ze = (ve) => {
  36429. b.value = !0, n("mouseenter", ve);
  36430. }, ut = (ve) => {
  36431. n("keydown", ve);
  36432. }, ct = () => {
  36433. var ve;
  36434. (ve = C.value) == null || ve.select();
  36435. }, Dt = () => {
  36436. n(Qs, ""), n("change", ""), n("clear"), n("input", "");
  36437. };
  36438. return se(() => r.modelValue, () => {
  36439. var ve;
  36440. Tt(() => ie()), r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "change").catch((Xe) => Gi(Xe)));
  36441. }), se(z, () => G()), se(() => r.type, async () => {
  36442. await Tt(), G(), ie();
  36443. }), it(() => {
  36444. !r.formatter && r.parser && Gi("ElInput", "If you set the parser, you also need to set the formatter."), G(), Tt(ie);
  36445. }), C0({
  36446. from: "label",
  36447. replacement: "aria-label",
  36448. version: "2.8.0",
  36449. scope: "el-input",
  36450. ref: "https://element-plus.org/en-US/component/input.html"
  36451. }, L(() => !!r.label)), e({
  36452. input: m,
  36453. textarea: y,
  36454. ref: C,
  36455. textareaStyle: V,
  36456. autosize: Nn(r, "autosize"),
  36457. focus: be,
  36458. blur: he,
  36459. select: ct,
  36460. clear: Dt,
  36461. resizeTextarea: ie
  36462. }), (ve, Xe) => (pe(), Qe("div", _n(B(o), {
  36463. class: [
  36464. B(s),
  36465. {
  36466. [B(v).bm("group", "append")]: ve.$slots.append,
  36467. [B(v).bm("group", "prepend")]: ve.$slots.prepend
  36468. }
  36469. ],
  36470. style: B(N),
  36471. role: ve.containerRole,
  36472. onMouseenter: ze,
  36473. onMouseleave: Te
  36474. }), [
  36475. _t(" input "),
  36476. ve.type !== "textarea" ? (pe(), Qe(wt, { key: 0 }, [
  36477. _t(" prepend slot "),
  36478. ve.$slots.prepend ? (pe(), Qe("div", {
  36479. key: 0,
  36480. class: Ye(B(v).be("group", "prepend"))
  36481. }, [
  36482. zn(ve.$slots, "prepend")
  36483. ], 2)) : _t("v-if", !0),
  36484. He("div", {
  36485. ref_key: "wrapperRef",
  36486. ref: T,
  36487. class: Ye(B(l))
  36488. }, [
  36489. _t(" prefix slot "),
  36490. ve.$slots.prefix || ve.prefixIcon ? (pe(), Qe("span", {
  36491. key: 0,
  36492. class: Ye(B(v).e("prefix"))
  36493. }, [
  36494. He("span", {
  36495. class: Ye(B(v).e("prefix-inner"))
  36496. }, [
  36497. zn(ve.$slots, "prefix"),
  36498. ve.prefixIcon ? (pe(), je(B(ws), {
  36499. key: 0,
  36500. class: Ye(B(v).e("icon"))
  36501. }, {
  36502. default: we(() => [
  36503. (pe(), je(Ec(ve.prefixIcon)))
  36504. ]),
  36505. _: 1
  36506. }, 8, ["class"])) : _t("v-if", !0)
  36507. ], 2)
  36508. ], 2)) : _t("v-if", !0),
  36509. He("input", _n({
  36510. id: B(d),
  36511. ref_key: "input",
  36512. ref: m,
  36513. class: B(v).e("inner")
  36514. }, B(u), {
  36515. minlength: ve.minlength,
  36516. maxlength: ve.maxlength,
  36517. type: ve.showPassword ? O.value ? "text" : "password" : ve.type,
  36518. disabled: B(p),
  36519. readonly: ve.readonly,
  36520. autocomplete: ve.autocomplete,
  36521. tabindex: ve.tabindex,
  36522. "aria-label": ve.label || ve.ariaLabel,
  36523. placeholder: ve.placeholder,
  36524. style: ve.inputStyle,
  36525. form: ve.form,
  36526. autofocus: ve.autofocus,
  36527. onCompositionstart: de,
  36528. onCompositionupdate: Ee,
  36529. onCompositionend: $e,
  36530. onInput: re,
  36531. onFocus: Xe[0] || (Xe[0] = (...Rt) => B(P) && B(P)(...Rt)),
  36532. onBlur: Xe[1] || (Xe[1] = (...Rt) => B($) && B($)(...Rt)),
  36533. onChange: fe,
  36534. onKeydown: ut
  36535. }), null, 16, oAe),
  36536. _t(" suffix slot "),
  36537. B(ee) ? (pe(), Qe("span", {
  36538. key: 1,
  36539. class: Ye(B(v).e("suffix"))
  36540. }, [
  36541. He("span", {
  36542. class: Ye(B(v).e("suffix-inner"))
  36543. }, [
  36544. !B(W) || !B(F) || !B(Q) ? (pe(), Qe(wt, { key: 0 }, [
  36545. zn(ve.$slots, "suffix"),
  36546. ve.suffixIcon ? (pe(), je(B(ws), {
  36547. key: 0,
  36548. class: Ye(B(v).e("icon"))
  36549. }, {
  36550. default: we(() => [
  36551. (pe(), je(Ec(ve.suffixIcon)))
  36552. ]),
  36553. _: 1
  36554. }, 8, ["class"])) : _t("v-if", !0)
  36555. ], 64)) : _t("v-if", !0),
  36556. B(W) ? (pe(), je(B(ws), {
  36557. key: 1,
  36558. class: Ye([B(v).e("icon"), B(v).e("clear")]),
  36559. onMousedown: lf(B(lm), ["prevent"]),
  36560. onClick: Dt
  36561. }, {
  36562. default: we(() => [
  36563. M(B(DY))
  36564. ]),
  36565. _: 1
  36566. }, 8, ["class", "onMousedown"])) : _t("v-if", !0),
  36567. B(F) ? (pe(), je(B(ws), {
  36568. key: 2,
  36569. class: Ye([B(v).e("icon"), B(v).e("password")]),
  36570. onClick: Se
  36571. }, {
  36572. default: we(() => [
  36573. (pe(), je(Ec(B(R))))
  36574. ]),
  36575. _: 1
  36576. }, 8, ["class"])) : _t("v-if", !0),
  36577. B(Q) ? (pe(), Qe("span", {
  36578. key: 3,
  36579. class: Ye(B(v).e("count"))
  36580. }, [
  36581. He("span", {
  36582. class: Ye(B(v).e("count-inner"))
  36583. }, Bi(B(Z)) + " / " + Bi(ve.maxlength), 3)
  36584. ], 2)) : _t("v-if", !0),
  36585. B(D) && B(E) && B(A) ? (pe(), je(B(ws), {
  36586. key: 4,
  36587. class: Ye([
  36588. B(v).e("icon"),
  36589. B(v).e("validateIcon"),
  36590. B(v).is("loading", B(D) === "validating")
  36591. ])
  36592. }, {
  36593. default: we(() => [
  36594. (pe(), je(Ec(B(E))))
  36595. ]),
  36596. _: 1
  36597. }, 8, ["class"])) : _t("v-if", !0)
  36598. ], 2)
  36599. ], 2)) : _t("v-if", !0)
  36600. ], 2),
  36601. _t(" append slot "),
  36602. ve.$slots.append ? (pe(), Qe("div", {
  36603. key: 1,
  36604. class: Ye(B(v).be("group", "append"))
  36605. }, [
  36606. zn(ve.$slots, "append")
  36607. ], 2)) : _t("v-if", !0)
  36608. ], 64)) : (pe(), Qe(wt, { key: 1 }, [
  36609. _t(" textarea "),
  36610. He("textarea", _n({
  36611. id: B(d),
  36612. ref_key: "textarea",
  36613. ref: y,
  36614. class: [B(g).e("inner"), B(v).is("focus", B(w))]
  36615. }, B(u), {
  36616. minlength: ve.minlength,
  36617. maxlength: ve.maxlength,
  36618. tabindex: ve.tabindex,
  36619. disabled: B(p),
  36620. readonly: ve.readonly,
  36621. autocomplete: ve.autocomplete,
  36622. style: B(V),
  36623. "aria-label": ve.label || ve.ariaLabel,
  36624. placeholder: ve.placeholder,
  36625. form: ve.form,
  36626. autofocus: ve.autofocus,
  36627. onCompositionstart: de,
  36628. onCompositionupdate: Ee,
  36629. onCompositionend: $e,
  36630. onInput: re,
  36631. onFocus: Xe[2] || (Xe[2] = (...Rt) => B(P) && B(P)(...Rt)),
  36632. onBlur: Xe[3] || (Xe[3] = (...Rt) => B($) && B($)(...Rt)),
  36633. onChange: fe,
  36634. onKeydown: ut
  36635. }), null, 16, sAe),
  36636. B(Q) ? (pe(), Qe("span", {
  36637. key: 0,
  36638. style: Sr(S.value),
  36639. class: Ye(B(v).e("count"))
  36640. }, Bi(B(Z)) + " / " + Bi(ve.maxlength), 7)) : _t("v-if", !0)
  36641. ], 64))
  36642. ], 16, aAe));
  36643. }
  36644. });
  36645. var cAe = /* @__PURE__ */ Qn(uAe, [["__file", "input.vue"]]);
  36646. const sR = Df(cAe), lR = Symbol("popper"), eq = Symbol("popperContent"), fAe = [
  36647. "dialog",
  36648. "grid",
  36649. "group",
  36650. "listbox",
  36651. "menu",
  36652. "navigation",
  36653. "tooltip",
  36654. "tree"
  36655. ], tq = rr({
  36656. role: {
  36657. type: String,
  36658. values: fAe,
  36659. default: "tooltip"
  36660. }
  36661. }), dAe = te({
  36662. name: "ElPopper",
  36663. inheritAttrs: !1
  36664. }), hAe = /* @__PURE__ */ te({
  36665. ...dAe,
  36666. props: tq,
  36667. setup(t, { expose: e }) {
  36668. const n = t, r = U(), i = U(), a = U(), o = U(), s = L(() => n.role), l = {
  36669. triggerRef: r,
  36670. popperInstanceRef: i,
  36671. contentRef: a,
  36672. referenceRef: o,
  36673. role: s
  36674. };
  36675. return e(l), pt(lR, l), (u, c) => zn(u.$slots, "default");
  36676. }
  36677. });
  36678. var pAe = /* @__PURE__ */ Qn(hAe, [["__file", "popper.vue"]]);
  36679. const nq = rr({
  36680. arrowOffset: {
  36681. type: Number,
  36682. default: 5
  36683. }
  36684. }), vAe = te({
  36685. name: "ElPopperArrow",
  36686. inheritAttrs: !1
  36687. }), gAe = /* @__PURE__ */ te({
  36688. ...vAe,
  36689. props: nq,
  36690. setup(t, { expose: e }) {
  36691. const n = t, r = Jn("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: o } = Ge(eq, void 0);
  36692. return se(() => n.arrowOffset, (s) => {
  36693. i.value = s;
  36694. }), yt(() => {
  36695. a.value = void 0;
  36696. }), e({
  36697. arrowRef: a
  36698. }), (s, l) => (pe(), Qe("span", {
  36699. ref_key: "arrowRef",
  36700. ref: a,
  36701. class: Ye(B(r).e("arrow")),
  36702. style: Sr(B(o)),
  36703. "data-popper-arrow": ""
  36704. }, null, 6));
  36705. }
  36706. });
  36707. var mAe = /* @__PURE__ */ Qn(gAe, [["__file", "arrow.vue"]]);
  36708. const LC = "ElOnlyChild", yAe = te({
  36709. name: LC,
  36710. setup(t, {
  36711. slots: e,
  36712. attrs: n
  36713. }) {
  36714. var r;
  36715. const i = Ge(KY), a = V2e((r = i == null ? void 0 : i.setForwardRef) != null ? r : lm);
  36716. return () => {
  36717. var o;
  36718. const s = (o = e.default) == null ? void 0 : o.call(e, n);
  36719. if (!s)
  36720. return null;
  36721. if (s.length > 1)
  36722. return Gi(LC, "requires exact only one valid child."), null;
  36723. const l = rq(s);
  36724. return l ? bi(Ns(l, n), [[a]]) : (Gi(LC, "no valid child node found"), null);
  36725. };
  36726. }
  36727. });
  36728. function rq(t) {
  36729. if (!t)
  36730. return null;
  36731. const e = t;
  36732. for (const n of e) {
  36733. if (um(n))
  36734. switch (n.type) {
  36735. case Q9:
  36736. continue;
  36737. case TS:
  36738. case "svg":
  36739. return g6(n);
  36740. case wt:
  36741. return rq(n.children);
  36742. default:
  36743. return n;
  36744. }
  36745. return g6(n);
  36746. }
  36747. return null;
  36748. }
  36749. function g6(t) {
  36750. const e = Jn("only-child");
  36751. return M("span", {
  36752. class: e.e("content")
  36753. }, [t]);
  36754. }
  36755. const iq = rr({
  36756. virtualRef: {
  36757. type: jt(Object)
  36758. },
  36759. virtualTriggering: Boolean,
  36760. onMouseenter: {
  36761. type: jt(Function)
  36762. },
  36763. onMouseleave: {
  36764. type: jt(Function)
  36765. },
  36766. onClick: {
  36767. type: jt(Function)
  36768. },
  36769. onKeydown: {
  36770. type: jt(Function)
  36771. },
  36772. onFocus: {
  36773. type: jt(Function)
  36774. },
  36775. onBlur: {
  36776. type: jt(Function)
  36777. },
  36778. onContextmenu: {
  36779. type: jt(Function)
  36780. },
  36781. id: String,
  36782. open: Boolean
  36783. }), bAe = te({
  36784. name: "ElPopperTrigger",
  36785. inheritAttrs: !1
  36786. }), _Ae = /* @__PURE__ */ te({
  36787. ...bAe,
  36788. props: iq,
  36789. setup(t, { expose: e }) {
  36790. const n = t, { role: r, triggerRef: i } = Ge(lR, void 0);
  36791. z2e(i);
  36792. const a = L(() => s.value ? n.id : void 0), o = L(() => {
  36793. if (r && r.value === "tooltip")
  36794. return n.open && n.id ? n.id : void 0;
  36795. }), s = L(() => {
  36796. if (r && r.value !== "tooltip")
  36797. return r.value;
  36798. }), l = L(() => s.value ? `${n.open}` : void 0);
  36799. let u;
  36800. return it(() => {
  36801. se(() => n.virtualRef, (c) => {
  36802. c && (i.value = Rl(c));
  36803. }, {
  36804. immediate: !0
  36805. }), se(i, (c, f) => {
  36806. u == null || u(), u = void 0, cm(c) && ([
  36807. "onMouseenter",
  36808. "onMouseleave",
  36809. "onClick",
  36810. "onKeydown",
  36811. "onFocus",
  36812. "onBlur",
  36813. "onContextmenu"
  36814. ].forEach((d) => {
  36815. var h;
  36816. const p = n[d];
  36817. p && (c.addEventListener(d.slice(2).toLowerCase(), p), (h = f == null ? void 0 : f.removeEventListener) == null || h.call(f, d.slice(2).toLowerCase(), p));
  36818. }), u = se([a, o, s, l], (d) => {
  36819. [
  36820. "aria-controls",
  36821. "aria-describedby",
  36822. "aria-haspopup",
  36823. "aria-expanded"
  36824. ].forEach((h, p) => {
  36825. Gl(d[p]) ? c.removeAttribute(h) : c.setAttribute(h, d[p]);
  36826. });
  36827. }, { immediate: !0 })), cm(f) && [
  36828. "aria-controls",
  36829. "aria-describedby",
  36830. "aria-haspopup",
  36831. "aria-expanded"
  36832. ].forEach((d) => f.removeAttribute(d));
  36833. }, {
  36834. immediate: !0
  36835. });
  36836. }), yt(() => {
  36837. u == null || u(), u = void 0;
  36838. }), e({
  36839. triggerRef: i
  36840. }), (c, f) => c.virtualTriggering ? _t("v-if", !0) : (pe(), je(B(yAe), _n({ key: 0 }, c.$attrs, {
  36841. "aria-controls": B(a),
  36842. "aria-describedby": B(o),
  36843. "aria-expanded": B(l),
  36844. "aria-haspopup": B(s)
  36845. }), {
  36846. default: we(() => [
  36847. zn(c.$slots, "default")
  36848. ]),
  36849. _: 3
  36850. }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
  36851. }
  36852. });
  36853. var OAe = /* @__PURE__ */ Qn(_Ae, [["__file", "trigger.vue"]]);
  36854. const NC = "focus-trap.focus-after-trapped", BC = "focus-trap.focus-after-released", SAe = "focus-trap.focusout-prevented", m6 = {
  36855. cancelable: !0,
  36856. bubbles: !1
  36857. }, xAe = {
  36858. cancelable: !0,
  36859. bubbles: !1
  36860. }, y6 = "focusAfterTrapped", b6 = "focusAfterReleased", wAe = Symbol("elFocusTrap"), uR = U(), Ex = U(0), cR = U(0);
  36861. let Ly = 0;
  36862. const aq = (t) => {
  36863. const e = [], n = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
  36864. acceptNode: (r) => {
  36865. const i = r.tagName === "INPUT" && r.type === "hidden";
  36866. return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
  36867. }
  36868. });
  36869. for (; n.nextNode(); )
  36870. e.push(n.currentNode);
  36871. return e;
  36872. }, _6 = (t, e) => {
  36873. for (const n of t)
  36874. if (!CAe(n, e))
  36875. return n;
  36876. }, CAe = (t, e) => {
  36877. if (process.env.NODE_ENV === "test")
  36878. return !1;
  36879. if (getComputedStyle(t).visibility === "hidden")
  36880. return !0;
  36881. for (; t; ) {
  36882. if (e && t === e)
  36883. return !1;
  36884. if (getComputedStyle(t).display === "none")
  36885. return !0;
  36886. t = t.parentElement;
  36887. }
  36888. return !1;
  36889. }, TAe = (t) => {
  36890. const e = aq(t), n = _6(e, t), r = _6(e.reverse(), t);
  36891. return [n, r];
  36892. }, PAe = (t) => t instanceof HTMLInputElement && "select" in t, _l = (t, e) => {
  36893. if (t && t.focus) {
  36894. const n = document.activeElement;
  36895. t.focus({ preventScroll: !0 }), cR.value = window.performance.now(), t !== n && PAe(t) && e && t.select();
  36896. }
  36897. };
  36898. function O6(t, e) {
  36899. const n = [...t], r = t.indexOf(e);
  36900. return r !== -1 && n.splice(r, 1), n;
  36901. }
  36902. const $Ae = () => {
  36903. let t = [];
  36904. return {
  36905. push: (r) => {
  36906. const i = t[0];
  36907. i && r !== i && i.pause(), t = O6(t, r), t.unshift(r);
  36908. },
  36909. remove: (r) => {
  36910. var i, a;
  36911. t = O6(t, r), (a = (i = t[0]) == null ? void 0 : i.resume) == null || a.call(i);
  36912. }
  36913. };
  36914. }, AAe = (t, e = !1) => {
  36915. const n = document.activeElement;
  36916. for (const r of t)
  36917. if (_l(r, e), document.activeElement !== n)
  36918. return;
  36919. }, S6 = $Ae(), EAe = () => Ex.value > cR.value, Ny = () => {
  36920. uR.value = "pointer", Ex.value = window.performance.now();
  36921. }, x6 = () => {
  36922. uR.value = "keyboard", Ex.value = window.performance.now();
  36923. }, MAe = () => (it(() => {
  36924. Ly === 0 && (document.addEventListener("mousedown", Ny), document.addEventListener("touchstart", Ny), document.addEventListener("keydown", x6)), Ly++;
  36925. }), yt(() => {
  36926. Ly--, Ly <= 0 && (document.removeEventListener("mousedown", Ny), document.removeEventListener("touchstart", Ny), document.removeEventListener("keydown", x6));
  36927. }), {
  36928. focusReason: uR,
  36929. lastUserFocusTimestamp: Ex,
  36930. lastAutomatedFocusTimestamp: cR
  36931. }), By = (t) => new CustomEvent(SAe, {
  36932. ...xAe,
  36933. detail: t
  36934. }), IAe = te({
  36935. name: "ElFocusTrap",
  36936. inheritAttrs: !1,
  36937. props: {
  36938. loop: Boolean,
  36939. trapped: Boolean,
  36940. focusTrapEl: Object,
  36941. focusStartEl: {
  36942. type: [Object, String],
  36943. default: "first"
  36944. }
  36945. },
  36946. emits: [
  36947. y6,
  36948. b6,
  36949. "focusin",
  36950. "focusout",
  36951. "focusout-prevented",
  36952. "release-requested"
  36953. ],
  36954. setup(t, { emit: e }) {
  36955. const n = U();
  36956. let r, i;
  36957. const { focusReason: a } = MAe();
  36958. R2e((p) => {
  36959. t.trapped && !o.paused && e("release-requested", p);
  36960. });
  36961. const o = {
  36962. paused: !1,
  36963. pause() {
  36964. this.paused = !0;
  36965. },
  36966. resume() {
  36967. this.paused = !1;
  36968. }
  36969. }, s = (p) => {
  36970. if (!t.loop && !t.trapped || o.paused)
  36971. return;
  36972. 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;
  36973. if (S && x) {
  36974. const C = b, [T, w] = TAe(C);
  36975. if (T && w) {
  36976. if (!_ && x === w) {
  36977. const $ = By({
  36978. focusReason: a.value
  36979. });
  36980. e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(T, !0));
  36981. } else if (_ && [T, C].includes(x)) {
  36982. const $ = By({
  36983. focusReason: a.value
  36984. });
  36985. e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(w, !0));
  36986. }
  36987. } else if (x === C) {
  36988. const $ = By({
  36989. focusReason: a.value
  36990. });
  36991. e("focusout-prevented", $), $.defaultPrevented || p.preventDefault();
  36992. }
  36993. }
  36994. };
  36995. pt(wAe, {
  36996. focusTrapRef: n,
  36997. onKeydown: s
  36998. }), se(() => t.focusTrapEl, (p) => {
  36999. p && (n.value = p);
  37000. }, { immediate: !0 }), se([n], ([p], [v]) => {
  37001. 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));
  37002. });
  37003. const l = (p) => {
  37004. e(y6, p);
  37005. }, u = (p) => e(b6, p), c = (p) => {
  37006. const v = B(n);
  37007. if (!v)
  37008. return;
  37009. const g = p.target, m = p.relatedTarget, y = g && v.contains(g);
  37010. t.trapped || m && v.contains(m) || (r = m), y && e("focusin", p), !o.paused && t.trapped && (y ? i = g : _l(i, !0));
  37011. }, f = (p) => {
  37012. const v = B(n);
  37013. if (!(o.paused || !v))
  37014. if (t.trapped) {
  37015. const g = p.relatedTarget;
  37016. !Gl(g) && !v.contains(g) && setTimeout(() => {
  37017. if (!o.paused && t.trapped) {
  37018. const m = By({
  37019. focusReason: a.value
  37020. });
  37021. e("focusout-prevented", m), m.defaultPrevented || _l(i, !0);
  37022. }
  37023. }, 0);
  37024. } else {
  37025. const g = p.target;
  37026. g && v.contains(g) || e("focusout", p);
  37027. }
  37028. };
  37029. async function d() {
  37030. await Tt();
  37031. const p = B(n);
  37032. if (p) {
  37033. S6.push(o);
  37034. const v = p.contains(document.activeElement) ? r : document.activeElement;
  37035. if (r = v, !p.contains(v)) {
  37036. const m = new Event(NC, m6);
  37037. p.addEventListener(NC, l), p.dispatchEvent(m), m.defaultPrevented || Tt(() => {
  37038. let y = t.focusStartEl;
  37039. ba(y) || (_l(y), document.activeElement !== y && (y = "first")), y === "first" && AAe(aq(p), !0), (document.activeElement === v || y === "container") && _l(p);
  37040. });
  37041. }
  37042. }
  37043. }
  37044. function h() {
  37045. const p = B(n);
  37046. if (p) {
  37047. p.removeEventListener(NC, l);
  37048. const v = new CustomEvent(BC, {
  37049. ...m6,
  37050. detail: {
  37051. focusReason: a.value
  37052. }
  37053. });
  37054. p.addEventListener(BC, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !EAe() || p.contains(document.activeElement)) && _l(r ?? document.body), p.removeEventListener(BC, u), S6.remove(o);
  37055. }
  37056. }
  37057. return it(() => {
  37058. t.trapped && d(), se(() => t.trapped, (p) => {
  37059. p ? d() : h();
  37060. });
  37061. }), yt(() => {
  37062. t.trapped && h();
  37063. }), {
  37064. onKeydown: s
  37065. };
  37066. }
  37067. });
  37068. function DAe(t, e, n, r, i, a) {
  37069. return zn(t.$slots, "default", { handleKeydown: t.onKeydown });
  37070. }
  37071. var RAe = /* @__PURE__ */ Qn(IAe, [["render", DAe], ["__file", "focus-trap.vue"]]);
  37072. const kAe = ["fixed", "absolute"], LAe = rr({
  37073. boundariesPadding: {
  37074. type: Number,
  37075. default: 0
  37076. },
  37077. fallbackPlacements: {
  37078. type: jt(Array),
  37079. default: void 0
  37080. },
  37081. gpuAcceleration: {
  37082. type: Boolean,
  37083. default: !0
  37084. },
  37085. offset: {
  37086. type: Number,
  37087. default: 12
  37088. },
  37089. placement: {
  37090. type: String,
  37091. values: YD,
  37092. default: "bottom"
  37093. },
  37094. popperOptions: {
  37095. type: jt(Object),
  37096. default: () => ({})
  37097. },
  37098. strategy: {
  37099. type: String,
  37100. values: kAe,
  37101. default: "absolute"
  37102. }
  37103. }), oq = rr({
  37104. ...LAe,
  37105. id: String,
  37106. style: {
  37107. type: jt([String, Array, Object])
  37108. },
  37109. className: {
  37110. type: jt([String, Array, Object])
  37111. },
  37112. effect: {
  37113. type: String,
  37114. default: "dark"
  37115. },
  37116. visible: Boolean,
  37117. enterable: {
  37118. type: Boolean,
  37119. default: !0
  37120. },
  37121. pure: Boolean,
  37122. focusOnShow: {
  37123. type: Boolean,
  37124. default: !1
  37125. },
  37126. trapping: {
  37127. type: Boolean,
  37128. default: !1
  37129. },
  37130. popperClass: {
  37131. type: jt([String, Array, Object])
  37132. },
  37133. popperStyle: {
  37134. type: jt([String, Array, Object])
  37135. },
  37136. referenceEl: {
  37137. type: jt(Object)
  37138. },
  37139. triggerTargetEl: {
  37140. type: jt(Object)
  37141. },
  37142. stopPopperMouseEvent: {
  37143. type: Boolean,
  37144. default: !0
  37145. },
  37146. virtualTriggering: Boolean,
  37147. zIndex: Number,
  37148. ...A0(["ariaLabel"])
  37149. }), NAe = {
  37150. mouseenter: (t) => t instanceof MouseEvent,
  37151. mouseleave: (t) => t instanceof MouseEvent,
  37152. focus: () => !0,
  37153. blur: () => !0,
  37154. close: () => !0
  37155. }, BAe = (t, e = []) => {
  37156. const { placement: n, strategy: r, popperOptions: i } = t, a = {
  37157. placement: n,
  37158. strategy: r,
  37159. ...i,
  37160. modifiers: [...VAe(t), ...e]
  37161. };
  37162. return FAe(a, i == null ? void 0 : i.modifiers), a;
  37163. }, zAe = (t) => {
  37164. if (Yr)
  37165. return Rl(t);
  37166. };
  37167. function VAe(t) {
  37168. const { offset: e, gpuAcceleration: n, fallbackPlacements: r } = t;
  37169. return [
  37170. {
  37171. name: "offset",
  37172. options: {
  37173. offset: [0, e ?? 12]
  37174. }
  37175. },
  37176. {
  37177. name: "preventOverflow",
  37178. options: {
  37179. padding: {
  37180. top: 2,
  37181. bottom: 2,
  37182. left: 5,
  37183. right: 5
  37184. }
  37185. }
  37186. },
  37187. {
  37188. name: "flip",
  37189. options: {
  37190. padding: 5,
  37191. fallbackPlacements: r
  37192. }
  37193. },
  37194. {
  37195. name: "computeStyles",
  37196. options: {
  37197. gpuAcceleration: n
  37198. }
  37199. }
  37200. ];
  37201. }
  37202. function FAe(t, e) {
  37203. e && (t.modifiers = [...t.modifiers, ...e ?? []]);
  37204. }
  37205. const WAe = 0, QAe = (t) => {
  37206. const { popperInstanceRef: e, contentRef: n, triggerRef: r, role: i } = Ge(lR, void 0), a = U(), o = U(), s = L(() => ({
  37207. name: "eventListeners",
  37208. enabled: !!t.visible
  37209. })), l = L(() => {
  37210. var m;
  37211. const y = B(a), b = (m = B(o)) != null ? m : WAe;
  37212. return {
  37213. name: "arrow",
  37214. enabled: !Abe(y),
  37215. options: {
  37216. element: y,
  37217. padding: b
  37218. }
  37219. };
  37220. }), u = L(() => ({
  37221. onFirstUpdate: () => {
  37222. p();
  37223. },
  37224. ...BAe(t, [
  37225. B(l),
  37226. B(s)
  37227. ])
  37228. })), c = L(() => zAe(t.referenceEl) || B(r)), { attributes: f, state: d, styles: h, update: p, forceUpdate: v, instanceRef: g } = M2e(c, n, u);
  37229. return se(g, (m) => e.value = m), it(() => {
  37230. se(() => {
  37231. var m;
  37232. return (m = B(c)) == null ? void 0 : m.getBoundingClientRect();
  37233. }, () => {
  37234. p();
  37235. });
  37236. }), {
  37237. attributes: f,
  37238. arrowRef: a,
  37239. contentRef: n,
  37240. instanceRef: g,
  37241. state: d,
  37242. styles: h,
  37243. role: i,
  37244. forceUpdate: v,
  37245. update: p
  37246. };
  37247. }, HAe = (t, {
  37248. attributes: e,
  37249. styles: n,
  37250. role: r
  37251. }) => {
  37252. const { nextZIndex: i } = Q2e(), a = Jn("popper"), o = L(() => B(e).popper), s = U(Ws(t.zIndex) ? t.zIndex : i()), l = L(() => [
  37253. a.b(),
  37254. a.is("pure", t.pure),
  37255. a.is(t.effect),
  37256. t.popperClass
  37257. ]), u = L(() => [
  37258. { zIndex: B(s) },
  37259. B(n).popper,
  37260. t.popperStyle || {}
  37261. ]), c = L(() => r.value === "dialog" ? "false" : void 0), f = L(() => B(n).arrow || {});
  37262. return {
  37263. ariaModal: c,
  37264. arrowStyle: f,
  37265. contentAttrs: o,
  37266. contentClass: l,
  37267. contentStyle: u,
  37268. contentZIndex: s,
  37269. updateZIndex: () => {
  37270. s.value = Ws(t.zIndex) ? t.zIndex : i();
  37271. }
  37272. };
  37273. }, GAe = (t, e) => {
  37274. const n = U(!1), r = U();
  37275. return {
  37276. focusStartRef: r,
  37277. trapped: n,
  37278. onFocusAfterReleased: (u) => {
  37279. var c;
  37280. ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", e("blur"));
  37281. },
  37282. onFocusAfterTrapped: () => {
  37283. e("focus");
  37284. },
  37285. onFocusInTrap: (u) => {
  37286. t.visible && !n.value && (u.target && (r.value = u.target), n.value = !0);
  37287. },
  37288. onFocusoutPrevented: (u) => {
  37289. t.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
  37290. },
  37291. onReleaseRequested: () => {
  37292. n.value = !1, e("close");
  37293. }
  37294. };
  37295. }, jAe = te({
  37296. name: "ElPopperContent"
  37297. }), ZAe = /* @__PURE__ */ te({
  37298. ...jAe,
  37299. props: oq,
  37300. emits: NAe,
  37301. setup(t, { expose: e, emit: n }) {
  37302. const r = t, {
  37303. focusStartRef: i,
  37304. trapped: a,
  37305. onFocusAfterReleased: o,
  37306. onFocusAfterTrapped: s,
  37307. onFocusInTrap: l,
  37308. onFocusoutPrevented: u,
  37309. onReleaseRequested: c
  37310. } = GAe(r, n), { attributes: f, arrowRef: d, contentRef: h, styles: p, instanceRef: v, role: g, update: m } = QAe(r), {
  37311. ariaModal: y,
  37312. arrowStyle: b,
  37313. contentAttrs: _,
  37314. contentClass: O,
  37315. contentStyle: S,
  37316. updateZIndex: x
  37317. } = HAe(r, {
  37318. styles: p,
  37319. attributes: f,
  37320. role: g
  37321. }), C = Ge(j1, void 0), T = U();
  37322. pt(eq, {
  37323. arrowStyle: b,
  37324. arrowRef: d,
  37325. arrowOffset: T
  37326. }), C && pt(j1, {
  37327. ...C,
  37328. addInputId: lm,
  37329. removeInputId: lm
  37330. });
  37331. let w;
  37332. const P = (A = !0) => {
  37333. m(), A && x();
  37334. }, $ = () => {
  37335. P(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
  37336. };
  37337. return it(() => {
  37338. se(() => r.triggerTargetEl, (A, D) => {
  37339. w == null || w(), w = void 0;
  37340. const E = B(A || h.value), R = B(D || h.value);
  37341. cm(E) && (w = se([g, () => r.ariaLabel, y, () => r.id], (N) => {
  37342. ["role", "aria-label", "aria-modal", "id"].forEach((V, z) => {
  37343. Gl(N[z]) ? E.removeAttribute(V) : E.setAttribute(V, N[z]);
  37344. });
  37345. }, { immediate: !0 })), R !== E && cm(R) && ["role", "aria-label", "aria-modal", "id"].forEach((N) => {
  37346. R.removeAttribute(N);
  37347. });
  37348. }, { immediate: !0 }), se(() => r.visible, $, { immediate: !0 });
  37349. }), yt(() => {
  37350. w == null || w(), w = void 0;
  37351. }), e({
  37352. popperContentRef: h,
  37353. popperInstanceRef: v,
  37354. updatePopper: P,
  37355. contentStyle: S
  37356. }), (A, D) => (pe(), Qe("div", _n({
  37357. ref_key: "contentRef",
  37358. ref: h
  37359. }, B(_), {
  37360. style: B(S),
  37361. class: B(O),
  37362. tabindex: "-1",
  37363. onMouseenter: D[0] || (D[0] = (E) => A.$emit("mouseenter", E)),
  37364. onMouseleave: D[1] || (D[1] = (E) => A.$emit("mouseleave", E))
  37365. }), [
  37366. M(B(RAe), {
  37367. trapped: B(a),
  37368. "trap-on-focus-in": !0,
  37369. "focus-trap-el": B(h),
  37370. "focus-start-el": B(i),
  37371. onFocusAfterTrapped: B(s),
  37372. onFocusAfterReleased: B(o),
  37373. onFocusin: B(l),
  37374. onFocusoutPrevented: B(u),
  37375. onReleaseRequested: B(c)
  37376. }, {
  37377. default: we(() => [
  37378. zn(A.$slots, "default")
  37379. ]),
  37380. _: 3
  37381. }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
  37382. ], 16));
  37383. }
  37384. });
  37385. var UAe = /* @__PURE__ */ Qn(ZAe, [["__file", "content.vue"]]);
  37386. const XAe = Df(pAe), fR = Symbol("elTooltip"), dR = rr({
  37387. ...N2e,
  37388. ...oq,
  37389. appendTo: {
  37390. type: jt([String, Object])
  37391. },
  37392. content: {
  37393. type: String,
  37394. default: ""
  37395. },
  37396. rawContent: {
  37397. type: Boolean,
  37398. default: !1
  37399. },
  37400. persistent: Boolean,
  37401. visible: {
  37402. type: jt(Boolean),
  37403. default: null
  37404. },
  37405. transition: String,
  37406. teleported: {
  37407. type: Boolean,
  37408. default: !0
  37409. },
  37410. disabled: Boolean,
  37411. ...A0(["ariaLabel"])
  37412. }), sq = rr({
  37413. ...iq,
  37414. disabled: Boolean,
  37415. trigger: {
  37416. type: jt([String, Array]),
  37417. default: "hover"
  37418. },
  37419. triggerKeys: {
  37420. type: jt(Array),
  37421. default: () => [Xc.enter, Xc.space]
  37422. }
  37423. }), {
  37424. useModelToggleProps: YAe,
  37425. useModelToggleEmits: qAe,
  37426. useModelToggle: KAe
  37427. } = NY("visible"), JAe = rr({
  37428. ...tq,
  37429. ...YAe,
  37430. ...dR,
  37431. ...sq,
  37432. ...nq,
  37433. showArrow: {
  37434. type: Boolean,
  37435. default: !0
  37436. }
  37437. }), eEe = [
  37438. ...qAe,
  37439. "before-show",
  37440. "before-hide",
  37441. "show",
  37442. "hide",
  37443. "open",
  37444. "close"
  37445. ], tEe = (t, e) => UPe(t) ? t.includes(e) : t === e, Jf = (t, e, n) => (r) => {
  37446. tEe(B(t), e) && n(r);
  37447. }, nEe = te({
  37448. name: "ElTooltipTrigger"
  37449. }), rEe = /* @__PURE__ */ te({
  37450. ...nEe,
  37451. props: sq,
  37452. setup(t, { expose: e }) {
  37453. const n = t, r = Jn("tooltip"), { controlled: i, id: a, open: o, onOpen: s, onClose: l, onToggle: u } = Ge(fR, void 0), c = U(null), f = () => {
  37454. if (B(i) || n.disabled)
  37455. return !0;
  37456. }, d = Nn(n, "trigger"), h = bs(f, Jf(d, "hover", s)), p = bs(f, Jf(d, "hover", l)), v = bs(f, Jf(d, "click", (_) => {
  37457. _.button === 0 && u(_);
  37458. })), g = bs(f, Jf(d, "focus", s)), m = bs(f, Jf(d, "focus", l)), y = bs(f, Jf(d, "contextmenu", (_) => {
  37459. _.preventDefault(), u(_);
  37460. })), b = bs(f, (_) => {
  37461. const { code: O } = _;
  37462. n.triggerKeys.includes(O) && (_.preventDefault(), u(_));
  37463. });
  37464. return e({
  37465. triggerRef: c
  37466. }), (_, O) => (pe(), je(B(OAe), {
  37467. id: B(a),
  37468. "virtual-ref": _.virtualRef,
  37469. open: B(o),
  37470. "virtual-triggering": _.virtualTriggering,
  37471. class: Ye(B(r).e("trigger")),
  37472. onBlur: B(m),
  37473. onClick: B(v),
  37474. onContextmenu: B(y),
  37475. onFocus: B(g),
  37476. onMouseenter: B(h),
  37477. onMouseleave: B(p),
  37478. onKeydown: B(b)
  37479. }, {
  37480. default: we(() => [
  37481. zn(_.$slots, "default")
  37482. ]),
  37483. _: 3
  37484. }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
  37485. }
  37486. });
  37487. var iEe = /* @__PURE__ */ Qn(rEe, [["__file", "trigger.vue"]]);
  37488. const aEe = te({
  37489. name: "ElTooltipContent",
  37490. inheritAttrs: !1
  37491. }), oEe = /* @__PURE__ */ te({
  37492. ...aEe,
  37493. props: dR,
  37494. setup(t, { expose: e }) {
  37495. const n = t, { selector: r } = qY(), i = Jn("tooltip"), a = U(null), o = U(!1), {
  37496. controlled: s,
  37497. id: l,
  37498. open: u,
  37499. trigger: c,
  37500. onClose: f,
  37501. onOpen: d,
  37502. onShow: h,
  37503. onHide: p,
  37504. onBeforeShow: v,
  37505. onBeforeHide: g
  37506. } = Ge(fR, void 0), m = L(() => n.transition || `${i.namespace.value}-fade-in-linear`), y = L(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
  37507. yt(() => {
  37508. o.value = !0;
  37509. });
  37510. const b = L(() => B(y) ? !0 : B(u)), _ = L(() => n.disabled ? !1 : B(u)), O = L(() => n.appendTo || r.value), S = L(() => {
  37511. var N;
  37512. return (N = n.style) != null ? N : {};
  37513. }), x = L(() => !B(u)), C = () => {
  37514. p();
  37515. }, T = () => {
  37516. if (B(s))
  37517. return !0;
  37518. }, w = bs(T, () => {
  37519. n.enterable && B(c) === "hover" && d();
  37520. }), P = bs(T, () => {
  37521. B(c) === "hover" && f();
  37522. }), $ = () => {
  37523. var N, V;
  37524. (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N), v == null || v();
  37525. }, A = () => {
  37526. g == null || g();
  37527. }, D = () => {
  37528. h(), R = kPe(L(() => {
  37529. var N;
  37530. return (N = a.value) == null ? void 0 : N.popperContentRef;
  37531. }), () => {
  37532. if (B(s))
  37533. return;
  37534. B(c) !== "hover" && f();
  37535. });
  37536. }, E = () => {
  37537. n.virtualTriggering || f();
  37538. };
  37539. let R;
  37540. return se(() => B(u), (N) => {
  37541. N || R == null || R();
  37542. }, {
  37543. flush: "post"
  37544. }), se(() => n.content, () => {
  37545. var N, V;
  37546. (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N);
  37547. }), e({
  37548. contentRef: a
  37549. }), (N, V) => (pe(), je(PS, {
  37550. disabled: !N.teleported,
  37551. to: B(O)
  37552. }, [
  37553. M(co, {
  37554. name: B(m),
  37555. onAfterLeave: C,
  37556. onBeforeEnter: $,
  37557. onAfterEnter: D,
  37558. onBeforeLeave: A
  37559. }, {
  37560. default: we(() => [
  37561. B(b) ? bi((pe(), je(B(UAe), _n({
  37562. key: 0,
  37563. id: B(l),
  37564. ref_key: "contentRef",
  37565. ref: a
  37566. }, N.$attrs, {
  37567. "aria-label": N.ariaLabel,
  37568. "aria-hidden": B(x),
  37569. "boundaries-padding": N.boundariesPadding,
  37570. "fallback-placements": N.fallbackPlacements,
  37571. "gpu-acceleration": N.gpuAcceleration,
  37572. offset: N.offset,
  37573. placement: N.placement,
  37574. "popper-options": N.popperOptions,
  37575. strategy: N.strategy,
  37576. effect: N.effect,
  37577. enterable: N.enterable,
  37578. pure: N.pure,
  37579. "popper-class": N.popperClass,
  37580. "popper-style": [N.popperStyle, B(S)],
  37581. "reference-el": N.referenceEl,
  37582. "trigger-target-el": N.triggerTargetEl,
  37583. visible: B(_),
  37584. "z-index": N.zIndex,
  37585. onMouseenter: B(w),
  37586. onMouseleave: B(P),
  37587. onBlur: E,
  37588. onClose: B(f)
  37589. }), {
  37590. default: we(() => [
  37591. o.value ? _t("v-if", !0) : zn(N.$slots, "default", { key: 0 })
  37592. ]),
  37593. _: 3
  37594. }, 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"])), [
  37595. [Bs, B(_)]
  37596. ]) : _t("v-if", !0)
  37597. ]),
  37598. _: 3
  37599. }, 8, ["name"])
  37600. ], 8, ["disabled", "to"]));
  37601. }
  37602. });
  37603. var sEe = /* @__PURE__ */ Qn(oEe, [["__file", "content.vue"]]);
  37604. const lEe = ["innerHTML"], uEe = { key: 1 }, cEe = te({
  37605. name: "ElTooltip"
  37606. }), fEe = /* @__PURE__ */ te({
  37607. ...cEe,
  37608. props: JAe,
  37609. emits: eEe,
  37610. setup(t, { expose: e, emit: n }) {
  37611. const r = t;
  37612. L2e();
  37613. const i = iR(), a = U(), o = U(), s = () => {
  37614. var m;
  37615. const y = B(a);
  37616. y && ((m = y.popperInstanceRef) == null || m.update());
  37617. }, l = U(!1), u = U(), { show: c, hide: f, hasUpdateHandler: d } = KAe({
  37618. indicator: l,
  37619. toggleReason: u
  37620. }), { onOpen: h, onClose: p } = B2e({
  37621. showAfter: Nn(r, "showAfter"),
  37622. hideAfter: Nn(r, "hideAfter"),
  37623. autoClose: Nn(r, "autoClose"),
  37624. open: c,
  37625. close: f
  37626. }), v = L(() => Q1(r.visible) && !d.value);
  37627. pt(fR, {
  37628. controlled: v,
  37629. id: i,
  37630. open: Hle(l),
  37631. trigger: Nn(r, "trigger"),
  37632. onOpen: (m) => {
  37633. h(m);
  37634. },
  37635. onClose: (m) => {
  37636. p(m);
  37637. },
  37638. onToggle: (m) => {
  37639. B(l) ? p(m) : h(m);
  37640. },
  37641. onShow: () => {
  37642. n("show", u.value);
  37643. },
  37644. onHide: () => {
  37645. n("hide", u.value);
  37646. },
  37647. onBeforeShow: () => {
  37648. n("before-show", u.value);
  37649. },
  37650. onBeforeHide: () => {
  37651. n("before-hide", u.value);
  37652. },
  37653. updatePopper: s
  37654. }), se(() => r.disabled, (m) => {
  37655. m && l.value && (l.value = !1);
  37656. });
  37657. const g = (m) => {
  37658. var y, b;
  37659. const _ = (b = (y = o.value) == null ? void 0 : y.contentRef) == null ? void 0 : b.popperContentRef, O = (m == null ? void 0 : m.relatedTarget) || document.activeElement;
  37660. return _ && _.contains(O);
  37661. };
  37662. return Gle(() => l.value && f()), e({
  37663. popperRef: a,
  37664. contentRef: o,
  37665. isFocusInsideContent: g,
  37666. updatePopper: s,
  37667. onOpen: h,
  37668. onClose: p,
  37669. hide: f
  37670. }), (m, y) => (pe(), je(B(XAe), {
  37671. ref_key: "popperRef",
  37672. ref: a,
  37673. role: m.role
  37674. }, {
  37675. default: we(() => [
  37676. M(iEe, {
  37677. disabled: m.disabled,
  37678. trigger: m.trigger,
  37679. "trigger-keys": m.triggerKeys,
  37680. "virtual-ref": m.virtualRef,
  37681. "virtual-triggering": m.virtualTriggering
  37682. }, {
  37683. default: we(() => [
  37684. m.$slots.default ? zn(m.$slots, "default", { key: 0 }) : _t("v-if", !0)
  37685. ]),
  37686. _: 3
  37687. }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
  37688. M(sEe, {
  37689. ref_key: "contentRef",
  37690. ref: o,
  37691. "aria-label": m.ariaLabel,
  37692. "boundaries-padding": m.boundariesPadding,
  37693. content: m.content,
  37694. disabled: m.disabled,
  37695. effect: m.effect,
  37696. enterable: m.enterable,
  37697. "fallback-placements": m.fallbackPlacements,
  37698. "hide-after": m.hideAfter,
  37699. "gpu-acceleration": m.gpuAcceleration,
  37700. offset: m.offset,
  37701. persistent: m.persistent,
  37702. "popper-class": m.popperClass,
  37703. "popper-style": m.popperStyle,
  37704. placement: m.placement,
  37705. "popper-options": m.popperOptions,
  37706. pure: m.pure,
  37707. "raw-content": m.rawContent,
  37708. "reference-el": m.referenceEl,
  37709. "trigger-target-el": m.triggerTargetEl,
  37710. "show-after": m.showAfter,
  37711. strategy: m.strategy,
  37712. teleported: m.teleported,
  37713. transition: m.transition,
  37714. "virtual-triggering": m.virtualTriggering,
  37715. "z-index": m.zIndex,
  37716. "append-to": m.appendTo
  37717. }, {
  37718. default: we(() => [
  37719. zn(m.$slots, "content", {}, () => [
  37720. m.rawContent ? (pe(), Qe("span", {
  37721. key: 0,
  37722. innerHTML: m.content
  37723. }, null, 8, lEe)) : (pe(), Qe("span", uEe, Bi(m.content), 1))
  37724. ]),
  37725. m.showArrow ? (pe(), je(B(mAe), {
  37726. key: 0,
  37727. "arrow-offset": m.arrowOffset
  37728. }, null, 8, ["arrow-offset"])) : _t("v-if", !0)
  37729. ]),
  37730. _: 3
  37731. }, 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"])
  37732. ]),
  37733. _: 3
  37734. }, 8, ["role"]));
  37735. }
  37736. });
  37737. var dEe = /* @__PURE__ */ Qn(fEe, [["__file", "tooltip.vue"]]);
  37738. const hEe = Df(dEe), lq = Symbol("buttonGroupContextKey"), pEe = (t, e) => {
  37739. C0({
  37740. from: "type.text",
  37741. replacement: "link",
  37742. version: "3.0.0",
  37743. scope: "props",
  37744. ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  37745. }, L(() => t.type === "text"));
  37746. const n = Ge(lq, void 0), r = X2e("button"), { form: i } = Ax(), a = $x(L(() => n == null ? void 0 : n.size)), o = E0(), s = U(), l = Z9(), u = L(() => t.type || (n == null ? void 0 : n.type) || ""), c = L(() => {
  37747. var p, v, g;
  37748. return (g = (v = t.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
  37749. }), f = L(() => t.tag === "button" ? {
  37750. ariaDisabled: o.value || t.loading,
  37751. disabled: o.value || t.loading,
  37752. autofocus: t.autofocus,
  37753. type: t.nativeType
  37754. } : {}), d = L(() => {
  37755. var p;
  37756. const v = (p = l.default) == null ? void 0 : p.call(l);
  37757. if (c.value && (v == null ? void 0 : v.length) === 1) {
  37758. const g = v[0];
  37759. if ((g == null ? void 0 : g.type) === TS) {
  37760. const m = g.children;
  37761. return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
  37762. }
  37763. }
  37764. return !1;
  37765. });
  37766. return {
  37767. _disabled: o,
  37768. _size: a,
  37769. _type: u,
  37770. _ref: s,
  37771. _props: f,
  37772. shouldAddSpace: d,
  37773. handleClick: (p) => {
  37774. t.nativeType === "reset" && (i == null || i.resetFields()), e("click", p);
  37775. }
  37776. };
  37777. }, vEe = [
  37778. "default",
  37779. "primary",
  37780. "success",
  37781. "warning",
  37782. "info",
  37783. "danger",
  37784. "text",
  37785. ""
  37786. ], gEe = ["button", "submit", "reset"], rA = rr({
  37787. size: $0,
  37788. disabled: Boolean,
  37789. type: {
  37790. type: String,
  37791. values: vEe,
  37792. default: ""
  37793. },
  37794. icon: {
  37795. type: H1
  37796. },
  37797. nativeType: {
  37798. type: String,
  37799. values: gEe,
  37800. default: "button"
  37801. },
  37802. loading: Boolean,
  37803. loadingIcon: {
  37804. type: H1,
  37805. default: () => RY
  37806. },
  37807. plain: Boolean,
  37808. text: Boolean,
  37809. link: Boolean,
  37810. bg: Boolean,
  37811. autofocus: Boolean,
  37812. round: Boolean,
  37813. circle: Boolean,
  37814. color: String,
  37815. dark: Boolean,
  37816. autoInsertSpace: {
  37817. type: Boolean,
  37818. default: void 0
  37819. },
  37820. tag: {
  37821. type: jt([String, Object]),
  37822. default: "button"
  37823. }
  37824. }), mEe = {
  37825. click: (t) => t instanceof MouseEvent
  37826. };
  37827. function fl(t, e = 20) {
  37828. return t.mix("#141414", e).toString();
  37829. }
  37830. function yEe(t) {
  37831. const e = E0(), n = Jn("button");
  37832. return L(() => {
  37833. let r = {}, i = t.color;
  37834. if (i) {
  37835. const a = i.match(/var\((.*?)\)/);
  37836. a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
  37837. const o = new en(i), s = t.dark ? o.tint(20).toString() : fl(o, 20);
  37838. if (t.plain)
  37839. r = n.cssVarBlock({
  37840. "bg-color": t.dark ? fl(o, 90) : o.tint(90).toString(),
  37841. "text-color": i,
  37842. "border-color": t.dark ? fl(o, 50) : o.tint(50).toString(),
  37843. "hover-text-color": `var(${n.cssVarName("color-white")})`,
  37844. "hover-bg-color": i,
  37845. "hover-border-color": i,
  37846. "active-bg-color": s,
  37847. "active-text-color": `var(${n.cssVarName("color-white")})`,
  37848. "active-border-color": s
  37849. }), 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());
  37850. else {
  37851. const l = t.dark ? fl(o, 30) : o.tint(30).toString(), u = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
  37852. if (r = n.cssVarBlock({
  37853. "bg-color": i,
  37854. "text-color": u,
  37855. "border-color": i,
  37856. "hover-bg-color": l,
  37857. "hover-text-color": u,
  37858. "hover-border-color": l,
  37859. "active-bg-color": s,
  37860. "active-border-color": s
  37861. }), e.value) {
  37862. const c = t.dark ? fl(o, 50) : o.tint(50).toString();
  37863. 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;
  37864. }
  37865. }
  37866. }
  37867. return r;
  37868. });
  37869. }
  37870. const bEe = te({
  37871. name: "ElButton"
  37872. }), _Ee = /* @__PURE__ */ te({
  37873. ...bEe,
  37874. props: rA,
  37875. emits: mEe,
  37876. setup(t, { expose: e, emit: n }) {
  37877. const r = t, i = yEe(r), a = Jn("button"), { _ref: o, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: f, handleClick: d } = pEe(r, n), h = L(() => [
  37878. a.b(),
  37879. a.m(l.value),
  37880. a.m(s.value),
  37881. a.is("disabled", u.value),
  37882. a.is("loading", r.loading),
  37883. a.is("plain", r.plain),
  37884. a.is("round", r.round),
  37885. a.is("circle", r.circle),
  37886. a.is("text", r.text),
  37887. a.is("link", r.link),
  37888. a.is("has-bg", r.bg)
  37889. ]);
  37890. return e({
  37891. ref: o,
  37892. size: s,
  37893. type: l,
  37894. disabled: u,
  37895. shouldAddSpace: f
  37896. }), (p, v) => (pe(), je(Ec(p.tag), _n({
  37897. ref_key: "_ref",
  37898. ref: o
  37899. }, B(c), {
  37900. class: B(h),
  37901. style: B(i),
  37902. onClick: B(d)
  37903. }), {
  37904. default: we(() => [
  37905. p.loading ? (pe(), Qe(wt, { key: 0 }, [
  37906. p.$slots.loading ? zn(p.$slots, "loading", { key: 0 }) : (pe(), je(B(ws), {
  37907. key: 1,
  37908. class: Ye(B(a).is("loading"))
  37909. }, {
  37910. default: we(() => [
  37911. (pe(), je(Ec(p.loadingIcon)))
  37912. ]),
  37913. _: 1
  37914. }, 8, ["class"]))
  37915. ], 64)) : p.icon || p.$slots.icon ? (pe(), je(B(ws), { key: 1 }, {
  37916. default: we(() => [
  37917. p.icon ? (pe(), je(Ec(p.icon), { key: 0 })) : zn(p.$slots, "icon", { key: 1 })
  37918. ]),
  37919. _: 3
  37920. })) : _t("v-if", !0),
  37921. p.$slots.default ? (pe(), Qe("span", {
  37922. key: 2,
  37923. class: Ye({ [B(a).em("text", "expand")]: B(f) })
  37924. }, [
  37925. zn(p.$slots, "default")
  37926. ], 2)) : _t("v-if", !0)
  37927. ]),
  37928. _: 3
  37929. }, 16, ["class", "style", "onClick"]));
  37930. }
  37931. });
  37932. var OEe = /* @__PURE__ */ Qn(_Ee, [["__file", "button.vue"]]);
  37933. const SEe = {
  37934. size: rA.size,
  37935. type: rA.type
  37936. }, xEe = te({
  37937. name: "ElButtonGroup"
  37938. }), wEe = /* @__PURE__ */ te({
  37939. ...xEe,
  37940. props: SEe,
  37941. setup(t) {
  37942. const e = t;
  37943. pt(lq, tn({
  37944. size: Nn(e, "size"),
  37945. type: Nn(e, "type")
  37946. }));
  37947. const n = Jn("button");
  37948. return (r, i) => (pe(), Qe("div", {
  37949. class: Ye(`${B(n).b("group")}`)
  37950. }, [
  37951. zn(r.$slots, "default")
  37952. ], 2));
  37953. }
  37954. });
  37955. var uq = /* @__PURE__ */ Qn(wEe, [["__file", "button-group.vue"]]);
  37956. const w6 = Df(OEe, {
  37957. ButtonGroup: uq
  37958. });
  37959. ZD(uq);
  37960. const Ol = /* @__PURE__ */ new Map();
  37961. let C6;
  37962. Yr && (document.addEventListener("mousedown", (t) => C6 = t), document.addEventListener("mouseup", (t) => {
  37963. for (const e of Ol.values())
  37964. for (const { documentHandler: n } of e)
  37965. n(t, C6);
  37966. }));
  37967. function T6(t, e) {
  37968. let n = [];
  37969. return Array.isArray(e.arg) ? n = e.arg : cm(e.arg) && n.push(e.arg), function(r, i) {
  37970. 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));
  37971. l || u || c || f || d || h || e.value(r, i);
  37972. };
  37973. }
  37974. const CEe = {
  37975. beforeMount(t, e) {
  37976. Ol.has(t) || Ol.set(t, []), Ol.get(t).push({
  37977. documentHandler: T6(t, e),
  37978. bindingFn: e.value
  37979. });
  37980. },
  37981. updated(t, e) {
  37982. Ol.has(t) || Ol.set(t, []);
  37983. const n = Ol.get(t), r = n.findIndex((a) => a.bindingFn === e.oldValue), i = {
  37984. documentHandler: T6(t, e),
  37985. bindingFn: e.value
  37986. };
  37987. r >= 0 ? n.splice(r, 1, i) : n.push(i);
  37988. },
  37989. unmounted(t) {
  37990. Ol.delete(t);
  37991. }
  37992. }, cq = rr({
  37993. modelValue: {
  37994. type: [String, Number, Boolean],
  37995. default: void 0
  37996. },
  37997. size: $0,
  37998. disabled: Boolean,
  37999. label: {
  38000. type: [String, Number, Boolean],
  38001. default: void 0
  38002. },
  38003. value: {
  38004. type: [String, Number, Boolean],
  38005. default: void 0
  38006. },
  38007. name: {
  38008. type: String,
  38009. default: void 0
  38010. }
  38011. }), TEe = rr({
  38012. ...cq,
  38013. border: Boolean
  38014. }), fq = {
  38015. [Qs]: (t) => ba(t) || Ws(t) || Q1(t),
  38016. [LY]: (t) => ba(t) || Ws(t) || Q1(t)
  38017. }, dq = Symbol("radioGroupKey"), hq = (t, e) => {
  38018. const n = U(), r = Ge(dq, void 0), i = L(() => !!r), a = L(() => K3(t.value) ? t.label : t.value), o = L({
  38019. get() {
  38020. return i.value ? r.modelValue : t.modelValue;
  38021. },
  38022. set(f) {
  38023. i.value ? r.changeEvent(f) : e && e(Qs, f), n.value.checked = t.modelValue === a.value;
  38024. }
  38025. }), s = $x(L(() => r == null ? void 0 : r.size)), l = E0(L(() => r == null ? void 0 : r.disabled)), u = U(!1), c = L(() => l.value || i.value && o.value !== a.value ? -1 : 0);
  38026. return C0({
  38027. from: "label act as value",
  38028. replacement: "value",
  38029. version: "3.0.0",
  38030. scope: "el-radio",
  38031. ref: "https://element-plus.org/en-US/component/radio.html"
  38032. }, L(() => i.value && K3(t.value))), {
  38033. radioRef: n,
  38034. isGroup: i,
  38035. radioGroup: r,
  38036. focus: u,
  38037. size: s,
  38038. disabled: l,
  38039. tabIndex: c,
  38040. modelValue: o,
  38041. actualValue: a
  38042. };
  38043. }, PEe = ["value", "name", "disabled"], $Ee = te({
  38044. name: "ElRadio"
  38045. }), AEe = /* @__PURE__ */ te({
  38046. ...$Ee,
  38047. props: TEe,
  38048. emits: fq,
  38049. setup(t, { emit: e }) {
  38050. const n = t, r = Jn("radio"), { radioRef: i, radioGroup: a, focus: o, size: s, disabled: l, modelValue: u, actualValue: c } = hq(n, e);
  38051. function f() {
  38052. Tt(() => e("change", u.value));
  38053. }
  38054. return (d, h) => {
  38055. var p;
  38056. return pe(), Qe("label", {
  38057. class: Ye([
  38058. B(r).b(),
  38059. B(r).is("disabled", B(l)),
  38060. B(r).is("focus", B(o)),
  38061. B(r).is("bordered", d.border),
  38062. B(r).is("checked", B(u) === B(c)),
  38063. B(r).m(B(s))
  38064. ])
  38065. }, [
  38066. He("span", {
  38067. class: Ye([
  38068. B(r).e("input"),
  38069. B(r).is("disabled", B(l)),
  38070. B(r).is("checked", B(u) === B(c))
  38071. ])
  38072. }, [
  38073. bi(He("input", {
  38074. ref_key: "radioRef",
  38075. ref: i,
  38076. "onUpdate:modelValue": h[0] || (h[0] = (v) => tp(u) ? u.value = v : null),
  38077. class: Ye(B(r).e("original")),
  38078. value: B(c),
  38079. name: d.name || ((p = B(a)) == null ? void 0 : p.name),
  38080. disabled: B(l),
  38081. type: "radio",
  38082. onFocus: h[1] || (h[1] = (v) => o.value = !0),
  38083. onBlur: h[2] || (h[2] = (v) => o.value = !1),
  38084. onChange: f,
  38085. onClick: h[3] || (h[3] = lf(() => {
  38086. }, ["stop"]))
  38087. }, null, 42, PEe), [
  38088. [U9, B(u)]
  38089. ]),
  38090. He("span", {
  38091. class: Ye(B(r).e("inner"))
  38092. }, null, 2)
  38093. ], 2),
  38094. He("span", {
  38095. class: Ye(B(r).e("label")),
  38096. onKeydown: h[4] || (h[4] = lf(() => {
  38097. }, ["stop"]))
  38098. }, [
  38099. zn(d.$slots, "default", {}, () => [
  38100. Kt(Bi(d.label), 1)
  38101. ])
  38102. ], 34)
  38103. ], 2);
  38104. };
  38105. }
  38106. });
  38107. var EEe = /* @__PURE__ */ Qn(AEe, [["__file", "radio.vue"]]);
  38108. const MEe = rr({
  38109. ...cq
  38110. }), IEe = ["value", "name", "disabled"], DEe = te({
  38111. name: "ElRadioButton"
  38112. }), REe = /* @__PURE__ */ te({
  38113. ...DEe,
  38114. props: MEe,
  38115. setup(t) {
  38116. const e = t, n = Jn("radio"), { radioRef: r, focus: i, size: a, disabled: o, modelValue: s, radioGroup: l, actualValue: u } = hq(e), c = L(() => ({
  38117. backgroundColor: (l == null ? void 0 : l.fill) || "",
  38118. borderColor: (l == null ? void 0 : l.fill) || "",
  38119. boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
  38120. color: (l == null ? void 0 : l.textColor) || ""
  38121. }));
  38122. return (f, d) => {
  38123. var h;
  38124. return pe(), Qe("label", {
  38125. class: Ye([
  38126. B(n).b("button"),
  38127. B(n).is("active", B(s) === B(u)),
  38128. B(n).is("disabled", B(o)),
  38129. B(n).is("focus", B(i)),
  38130. B(n).bm("button", B(a))
  38131. ])
  38132. }, [
  38133. bi(He("input", {
  38134. ref_key: "radioRef",
  38135. ref: r,
  38136. "onUpdate:modelValue": d[0] || (d[0] = (p) => tp(s) ? s.value = p : null),
  38137. class: Ye(B(n).be("button", "original-radio")),
  38138. value: B(u),
  38139. type: "radio",
  38140. name: f.name || ((h = B(l)) == null ? void 0 : h.name),
  38141. disabled: B(o),
  38142. onFocus: d[1] || (d[1] = (p) => i.value = !0),
  38143. onBlur: d[2] || (d[2] = (p) => i.value = !1),
  38144. onClick: d[3] || (d[3] = lf(() => {
  38145. }, ["stop"]))
  38146. }, null, 42, IEe), [
  38147. [U9, B(s)]
  38148. ]),
  38149. He("span", {
  38150. class: Ye(B(n).be("button", "inner")),
  38151. style: Sr(B(s) === B(u) ? B(c) : {}),
  38152. onKeydown: d[4] || (d[4] = lf(() => {
  38153. }, ["stop"]))
  38154. }, [
  38155. zn(f.$slots, "default", {}, () => [
  38156. Kt(Bi(f.label), 1)
  38157. ])
  38158. ], 38)
  38159. ], 2);
  38160. };
  38161. }
  38162. });
  38163. var pq = /* @__PURE__ */ Qn(REe, [["__file", "radio-button.vue"]]);
  38164. const kEe = rr({
  38165. id: {
  38166. type: String,
  38167. default: void 0
  38168. },
  38169. size: $0,
  38170. disabled: Boolean,
  38171. modelValue: {
  38172. type: [String, Number, Boolean],
  38173. default: void 0
  38174. },
  38175. fill: {
  38176. type: String,
  38177. default: ""
  38178. },
  38179. label: {
  38180. type: String,
  38181. default: void 0
  38182. },
  38183. textColor: {
  38184. type: String,
  38185. default: ""
  38186. },
  38187. name: {
  38188. type: String,
  38189. default: void 0
  38190. },
  38191. validateEvent: {
  38192. type: Boolean,
  38193. default: !0
  38194. },
  38195. ...A0(["ariaLabel"])
  38196. }), LEe = fq, NEe = ["id", "aria-label", "aria-labelledby"], BEe = te({
  38197. name: "ElRadioGroup"
  38198. }), zEe = /* @__PURE__ */ te({
  38199. ...BEe,
  38200. props: kEe,
  38201. emits: LEe,
  38202. setup(t, { emit: e }) {
  38203. const n = t, r = Jn("radio"), i = iR(), a = U(), { formItem: o } = Ax(), { inputId: s, isLabeledByFormItem: l } = oR(n, {
  38204. formItemContext: o
  38205. }), u = (f) => {
  38206. e(Qs, f), Tt(() => e("change", f));
  38207. };
  38208. it(() => {
  38209. const f = a.value.querySelectorAll("[type=radio]"), d = f[0];
  38210. !Array.from(f).some((h) => h.checked) && d && (d.tabIndex = 0);
  38211. });
  38212. const c = L(() => n.name || i.value);
  38213. return pt(dq, tn({
  38214. ...$S(n),
  38215. changeEvent: u,
  38216. name: c
  38217. })), se(() => n.modelValue, () => {
  38218. n.validateEvent && (o == null || o.validate("change").catch((f) => Gi(f)));
  38219. }), C0({
  38220. from: "label",
  38221. replacement: "aria-label",
  38222. version: "2.8.0",
  38223. scope: "el-radio-group",
  38224. ref: "https://element-plus.org/en-US/component/radio.html"
  38225. }, L(() => !!n.label)), (f, d) => (pe(), Qe("div", {
  38226. id: B(s),
  38227. ref_key: "radioGroupRef",
  38228. ref: a,
  38229. class: Ye(B(r).b("group")),
  38230. role: "radiogroup",
  38231. "aria-label": B(l) ? void 0 : f.label || f.ariaLabel || "radio-group",
  38232. "aria-labelledby": B(l) ? B(o).labelId : void 0
  38233. }, [
  38234. zn(f.$slots, "default")
  38235. ], 10, NEe));
  38236. }
  38237. });
  38238. var vq = /* @__PURE__ */ Qn(zEe, [["__file", "radio-group.vue"]]);
  38239. Df(EEe, {
  38240. RadioButton: pq,
  38241. RadioGroup: vq
  38242. });
  38243. const gq = ZD(vq), bg = ZD(pq), VEe = rr({
  38244. color: {
  38245. type: jt(Object),
  38246. required: !0
  38247. },
  38248. vertical: {
  38249. type: Boolean,
  38250. default: !1
  38251. }
  38252. });
  38253. let zC = !1;
  38254. function hm(t, e) {
  38255. if (!Yr)
  38256. return;
  38257. const n = function(a) {
  38258. var o;
  38259. (o = e.drag) == null || o.call(e, a);
  38260. }, r = function(a) {
  38261. var o;
  38262. document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, zC = !1, (o = e.end) == null || o.call(e, a);
  38263. }, i = function(a) {
  38264. var o;
  38265. zC || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), zC = !0, (o = e.start) == null || o.call(e, a));
  38266. };
  38267. t.addEventListener("mousedown", i), t.addEventListener("touchstart", i);
  38268. }
  38269. const FEe = (t) => {
  38270. const e = vn(), n = ae(), r = ae();
  38271. function i(o) {
  38272. o.target !== n.value && a(o);
  38273. }
  38274. function a(o) {
  38275. if (!r.value || !n.value)
  38276. return;
  38277. const l = e.vnode.el.getBoundingClientRect(), { clientX: u, clientY: c } = jD(o);
  38278. if (t.vertical) {
  38279. let f = c - l.top;
  38280. 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));
  38281. } else {
  38282. let f = u - l.left;
  38283. 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));
  38284. }
  38285. }
  38286. return {
  38287. thumb: n,
  38288. bar: r,
  38289. handleDrag: a,
  38290. handleClick: i
  38291. };
  38292. }, WEe = (t, {
  38293. bar: e,
  38294. thumb: n,
  38295. handleDrag: r
  38296. }) => {
  38297. const i = vn(), a = Jn("color-alpha-slider"), o = U(0), s = U(0), l = U();
  38298. function u() {
  38299. if (!n.value || t.vertical)
  38300. return 0;
  38301. const y = i.vnode.el, b = t.color.get("alpha");
  38302. return y ? Math.round(b * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
  38303. }
  38304. function c() {
  38305. if (!n.value)
  38306. return 0;
  38307. const y = i.vnode.el;
  38308. if (!t.vertical)
  38309. return 0;
  38310. const b = t.color.get("alpha");
  38311. return y ? Math.round(b * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
  38312. }
  38313. function f() {
  38314. if (t.color && t.color.value) {
  38315. const { r: y, g: b, b: _ } = t.color.toRgb();
  38316. return `linear-gradient(to right, rgba(${y}, ${b}, ${_}, 0) 0%, rgba(${y}, ${b}, ${_}, 1) 100%)`;
  38317. }
  38318. return "";
  38319. }
  38320. function d() {
  38321. o.value = u(), s.value = c(), l.value = f();
  38322. }
  38323. it(() => {
  38324. if (!e.value || !n.value)
  38325. return;
  38326. const y = {
  38327. drag: (b) => {
  38328. r(b);
  38329. },
  38330. end: (b) => {
  38331. r(b);
  38332. }
  38333. };
  38334. hm(e.value, y), hm(n.value, y), d();
  38335. }), se(() => t.color.get("alpha"), () => d()), se(() => t.color.value, () => d());
  38336. 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(() => ({
  38337. left: eA(o.value),
  38338. top: eA(s.value)
  38339. }));
  38340. return { rootKls: h, barKls: p, barStyle: g, thumbKls: v, thumbStyle: m, update: d };
  38341. }, QEe = "ElColorAlphaSlider", HEe = te({
  38342. name: QEe
  38343. }), GEe = /* @__PURE__ */ te({
  38344. ...HEe,
  38345. props: VEe,
  38346. setup(t, { expose: e }) {
  38347. const n = t, { bar: r, thumb: i, handleDrag: a, handleClick: o } = FEe(n), { rootKls: s, barKls: l, barStyle: u, thumbKls: c, thumbStyle: f, update: d } = WEe(n, {
  38348. bar: r,
  38349. thumb: i,
  38350. handleDrag: a
  38351. });
  38352. return e({
  38353. update: d,
  38354. bar: r,
  38355. thumb: i
  38356. }), (h, p) => (pe(), Qe("div", {
  38357. class: Ye(B(s))
  38358. }, [
  38359. He("div", {
  38360. ref_key: "bar",
  38361. ref: r,
  38362. class: Ye(B(l)),
  38363. style: Sr(B(u)),
  38364. onClick: p[0] || (p[0] = (...v) => B(o) && B(o)(...v))
  38365. }, null, 6),
  38366. He("div", {
  38367. ref_key: "thumb",
  38368. ref: i,
  38369. class: Ye(B(c)),
  38370. style: Sr(B(f))
  38371. }, null, 6)
  38372. ], 2));
  38373. }
  38374. });
  38375. var jEe = /* @__PURE__ */ Qn(GEe, [["__file", "alpha-slider.vue"]]);
  38376. const ZEe = te({
  38377. name: "ElColorHueSlider",
  38378. props: {
  38379. color: {
  38380. type: Object,
  38381. required: !0
  38382. },
  38383. vertical: Boolean
  38384. },
  38385. setup(t) {
  38386. const e = Jn("color-hue-slider"), n = vn(), r = U(), i = U(), a = U(0), o = U(0), s = L(() => t.color.get("hue"));
  38387. se(() => s.value, () => {
  38388. d();
  38389. });
  38390. function l(h) {
  38391. h.target !== r.value && u(h);
  38392. }
  38393. function u(h) {
  38394. if (!i.value || !r.value)
  38395. return;
  38396. const v = n.vnode.el.getBoundingClientRect(), { clientX: g, clientY: m } = jD(h);
  38397. let y;
  38398. if (t.vertical) {
  38399. let b = m - v.top;
  38400. 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);
  38401. } else {
  38402. let b = g - v.left;
  38403. 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);
  38404. }
  38405. t.color.set("hue", y);
  38406. }
  38407. function c() {
  38408. if (!r.value)
  38409. return 0;
  38410. const h = n.vnode.el;
  38411. if (t.vertical)
  38412. return 0;
  38413. const p = t.color.get("hue");
  38414. return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0;
  38415. }
  38416. function f() {
  38417. if (!r.value)
  38418. return 0;
  38419. const h = n.vnode.el;
  38420. if (!t.vertical)
  38421. return 0;
  38422. const p = t.color.get("hue");
  38423. return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0;
  38424. }
  38425. function d() {
  38426. a.value = c(), o.value = f();
  38427. }
  38428. return it(() => {
  38429. if (!i.value || !r.value)
  38430. return;
  38431. const h = {
  38432. drag: (p) => {
  38433. u(p);
  38434. },
  38435. end: (p) => {
  38436. u(p);
  38437. }
  38438. };
  38439. hm(i.value, h), hm(r.value, h), d();
  38440. }), {
  38441. bar: i,
  38442. thumb: r,
  38443. thumbLeft: a,
  38444. thumbTop: o,
  38445. hueValue: s,
  38446. handleClick: l,
  38447. update: d,
  38448. ns: e
  38449. };
  38450. }
  38451. });
  38452. function UEe(t, e, n, r, i, a) {
  38453. return pe(), Qe("div", {
  38454. class: Ye([t.ns.b(), t.ns.is("vertical", t.vertical)])
  38455. }, [
  38456. He("div", {
  38457. ref: "bar",
  38458. class: Ye(t.ns.e("bar")),
  38459. onClick: e[0] || (e[0] = (...o) => t.handleClick && t.handleClick(...o))
  38460. }, null, 2),
  38461. He("div", {
  38462. ref: "thumb",
  38463. class: Ye(t.ns.e("thumb")),
  38464. style: Sr({
  38465. left: t.thumbLeft + "px",
  38466. top: t.thumbTop + "px"
  38467. })
  38468. }, null, 6)
  38469. ], 2);
  38470. }
  38471. var XEe = /* @__PURE__ */ Qn(ZEe, [["render", UEe], ["__file", "hue-slider.vue"]]);
  38472. const YEe = rr({
  38473. modelValue: String,
  38474. id: String,
  38475. showAlpha: Boolean,
  38476. colorFormat: String,
  38477. disabled: Boolean,
  38478. size: $0,
  38479. popperClass: {
  38480. type: String,
  38481. default: ""
  38482. },
  38483. label: {
  38484. type: String,
  38485. default: void 0
  38486. },
  38487. tabindex: {
  38488. type: [String, Number],
  38489. default: 0
  38490. },
  38491. teleported: dR.teleported,
  38492. predefine: {
  38493. type: jt(Array)
  38494. },
  38495. validateEvent: {
  38496. type: Boolean,
  38497. default: !0
  38498. },
  38499. ...A0(["ariaLabel"])
  38500. }), qEe = {
  38501. [Qs]: (t) => ba(t) || Gl(t),
  38502. [LY]: (t) => ba(t) || Gl(t),
  38503. activeChange: (t) => ba(t) || Gl(t),
  38504. focus: (t) => t instanceof FocusEvent,
  38505. blur: (t) => t instanceof FocusEvent
  38506. }, mq = Symbol("colorPickerContextKey"), P6 = function(t, e, n) {
  38507. return [
  38508. t,
  38509. e * n / ((t = (2 - e) * n) < 1 ? t : 2 - t) || 0,
  38510. t / 2
  38511. ];
  38512. }, KEe = function(t) {
  38513. return typeof t == "string" && t.includes(".") && Number.parseFloat(t) === 1;
  38514. }, JEe = function(t) {
  38515. return typeof t == "string" && t.includes("%");
  38516. }, Yd = function(t, e) {
  38517. KEe(t) && (t = "100%");
  38518. const n = JEe(t);
  38519. 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);
  38520. }, $6 = {
  38521. 10: "A",
  38522. 11: "B",
  38523. 12: "C",
  38524. 13: "D",
  38525. 14: "E",
  38526. 15: "F"
  38527. }, R_ = (t) => {
  38528. t = Math.min(Math.round(t), 255);
  38529. const e = Math.floor(t / 16), n = t % 16;
  38530. return `${$6[e] || e}${$6[n] || n}`;
  38531. }, A6 = function({ r: t, g: e, b: n }) {
  38532. return Number.isNaN(+t) || Number.isNaN(+e) || Number.isNaN(+n) ? "" : `#${R_(t)}${R_(e)}${R_(n)}`;
  38533. }, VC = {
  38534. A: 10,
  38535. B: 11,
  38536. C: 12,
  38537. D: 13,
  38538. E: 14,
  38539. F: 15
  38540. }, Bu = function(t) {
  38541. return t.length === 2 ? (VC[t[0].toUpperCase()] || +t[0]) * 16 + (VC[t[1].toUpperCase()] || +t[1]) : VC[t[1].toUpperCase()] || +t[1];
  38542. }, eMe = function(t, e, n) {
  38543. e = e / 100, n = n / 100;
  38544. let r = e;
  38545. const i = Math.max(n, 0.01);
  38546. n *= 2, e *= n <= 1 ? n : 2 - n, r *= i <= 1 ? i : 2 - i;
  38547. const a = (n + e) / 2, o = n === 0 ? 2 * r / (i + r) : 2 * e / (n + e);
  38548. return {
  38549. h: t,
  38550. s: o * 100,
  38551. v: a * 100
  38552. };
  38553. }, E6 = (t, e, n) => {
  38554. t = Yd(t, 255), e = Yd(e, 255), n = Yd(n, 255);
  38555. const r = Math.max(t, e, n), i = Math.min(t, e, n);
  38556. let a;
  38557. const o = r, s = r - i, l = r === 0 ? 0 : s / r;
  38558. if (r === i)
  38559. a = 0;
  38560. else {
  38561. switch (r) {
  38562. case t: {
  38563. a = (e - n) / s + (e < n ? 6 : 0);
  38564. break;
  38565. }
  38566. case e: {
  38567. a = (n - t) / s + 2;
  38568. break;
  38569. }
  38570. case n: {
  38571. a = (t - e) / s + 4;
  38572. break;
  38573. }
  38574. }
  38575. a /= 6;
  38576. }
  38577. return { h: a * 360, s: l * 100, v: o * 100 };
  38578. }, Yp = function(t, e, n) {
  38579. t = Yd(t, 360) * 6, e = Yd(e, 100), n = Yd(n, 100);
  38580. 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];
  38581. return {
  38582. r: Math.round(u * 255),
  38583. g: Math.round(c * 255),
  38584. b: Math.round(f * 255)
  38585. };
  38586. };
  38587. class _g {
  38588. constructor(e = {}) {
  38589. this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
  38590. for (const n in e)
  38591. W1(e, n) && (this[n] = e[n]);
  38592. e.value ? this.fromString(e.value) : this.doOnChange();
  38593. }
  38594. set(e, n) {
  38595. if (arguments.length === 1 && typeof e == "object") {
  38596. for (const r in e)
  38597. W1(e, r) && this.set(r, e[r]);
  38598. return;
  38599. }
  38600. this[`_${e}`] = n, this.doOnChange();
  38601. }
  38602. get(e) {
  38603. return e === "alpha" ? Math.floor(this[`_${e}`]) : this[`_${e}`];
  38604. }
  38605. toRgb() {
  38606. return Yp(this._hue, this._saturation, this._value);
  38607. }
  38608. fromString(e) {
  38609. if (!e) {
  38610. this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
  38611. return;
  38612. }
  38613. const n = (r, i, a) => {
  38614. 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();
  38615. };
  38616. if (e.includes("hsl")) {
  38617. 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));
  38618. if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
  38619. const { h: i, s: a, v: o } = eMe(r[0], r[1], r[2]);
  38620. n(i, a, o);
  38621. }
  38622. } else if (e.includes("hsv")) {
  38623. 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));
  38624. 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]);
  38625. } else if (e.includes("rgb")) {
  38626. 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));
  38627. if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
  38628. const { h: i, s: a, v: o } = E6(r[0], r[1], r[2]);
  38629. n(i, a, o);
  38630. }
  38631. } else if (e.includes("#")) {
  38632. const r = e.replace("#", "").trim();
  38633. if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
  38634. return;
  38635. let i, a, o;
  38636. 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);
  38637. const { h: s, s: l, v: u } = E6(i, a, o);
  38638. n(s, l, u);
  38639. }
  38640. }
  38641. compare(e) {
  38642. 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;
  38643. }
  38644. doOnChange() {
  38645. const { _hue: e, _saturation: n, _value: r, _alpha: i, format: a } = this;
  38646. if (this.enableAlpha)
  38647. switch (a) {
  38648. case "hsl": {
  38649. const o = P6(e, n / 100, r / 100);
  38650. this.value = `hsla(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%, ${this.get("alpha") / 100})`;
  38651. break;
  38652. }
  38653. case "hsv": {
  38654. this.value = `hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`;
  38655. break;
  38656. }
  38657. case "hex": {
  38658. this.value = `${A6(Yp(e, n, r))}${R_(i * 255 / 100)}`;
  38659. break;
  38660. }
  38661. default: {
  38662. const { r: o, g: s, b: l } = Yp(e, n, r);
  38663. this.value = `rgba(${o}, ${s}, ${l}, ${this.get("alpha") / 100})`;
  38664. }
  38665. }
  38666. else
  38667. switch (a) {
  38668. case "hsl": {
  38669. const o = P6(e, n / 100, r / 100);
  38670. this.value = `hsl(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%)`;
  38671. break;
  38672. }
  38673. case "hsv": {
  38674. this.value = `hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;
  38675. break;
  38676. }
  38677. case "rgb": {
  38678. const { r: o, g: s, b: l } = Yp(e, n, r);
  38679. this.value = `rgb(${o}, ${s}, ${l})`;
  38680. break;
  38681. }
  38682. default:
  38683. this.value = A6(Yp(e, n, r));
  38684. }
  38685. }
  38686. }
  38687. const tMe = te({
  38688. props: {
  38689. colors: {
  38690. type: Array,
  38691. required: !0
  38692. },
  38693. color: {
  38694. type: Object,
  38695. required: !0
  38696. },
  38697. enableAlpha: {
  38698. type: Boolean,
  38699. required: !0
  38700. }
  38701. },
  38702. setup(t) {
  38703. const e = Jn("color-predefine"), { currentColor: n } = Ge(mq), r = U(a(t.colors, t.color));
  38704. se(() => n.value, (o) => {
  38705. const s = new _g();
  38706. s.fromString(o), r.value.forEach((l) => {
  38707. l.selected = s.compare(l);
  38708. });
  38709. }), ht(() => {
  38710. r.value = a(t.colors, t.color);
  38711. });
  38712. function i(o) {
  38713. t.color.fromString(t.colors[o]);
  38714. }
  38715. function a(o, s) {
  38716. return o.map((l) => {
  38717. const u = new _g();
  38718. return u.enableAlpha = t.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u;
  38719. });
  38720. }
  38721. return {
  38722. rgbaColors: r,
  38723. handleSelect: i,
  38724. ns: e
  38725. };
  38726. }
  38727. }), nMe = ["onClick"];
  38728. function rMe(t, e, n, r, i, a) {
  38729. return pe(), Qe("div", {
  38730. class: Ye(t.ns.b())
  38731. }, [
  38732. He("div", {
  38733. class: Ye(t.ns.e("colors"))
  38734. }, [
  38735. (pe(!0), Qe(wt, null, ag(t.rgbaColors, (o, s) => (pe(), Qe("div", {
  38736. key: t.colors[s],
  38737. class: Ye([
  38738. t.ns.e("color-selector"),
  38739. t.ns.is("alpha", o._alpha < 100),
  38740. { selected: o.selected }
  38741. ]),
  38742. onClick: (l) => t.handleSelect(s)
  38743. }, [
  38744. He("div", {
  38745. style: Sr({ backgroundColor: o.value })
  38746. }, null, 4)
  38747. ], 10, nMe))), 128))
  38748. ], 2)
  38749. ], 2);
  38750. }
  38751. var iMe = /* @__PURE__ */ Qn(tMe, [["render", rMe], ["__file", "predefine.vue"]]);
  38752. const aMe = te({
  38753. name: "ElSlPanel",
  38754. props: {
  38755. color: {
  38756. type: Object,
  38757. required: !0
  38758. }
  38759. },
  38760. setup(t) {
  38761. const e = Jn("color-svpanel"), n = vn(), r = U(0), i = U(0), a = U("hsl(0, 100%, 50%)"), o = L(() => {
  38762. const u = t.color.get("hue"), c = t.color.get("value");
  38763. return { hue: u, value: c };
  38764. });
  38765. function s() {
  38766. const u = t.color.get("saturation"), c = t.color.get("value"), f = n.vnode.el, { clientWidth: d, clientHeight: h } = f;
  38767. i.value = u * d / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${t.color.get("hue")}, 100%, 50%)`;
  38768. }
  38769. function l(u) {
  38770. const f = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: h } = jD(u);
  38771. let p = d - f.left, v = h - f.top;
  38772. 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({
  38773. saturation: p / f.width * 100,
  38774. value: 100 - v / f.height * 100
  38775. });
  38776. }
  38777. return se(() => o.value, () => {
  38778. s();
  38779. }), it(() => {
  38780. hm(n.vnode.el, {
  38781. drag: (u) => {
  38782. l(u);
  38783. },
  38784. end: (u) => {
  38785. l(u);
  38786. }
  38787. }), s();
  38788. }), {
  38789. cursorTop: r,
  38790. cursorLeft: i,
  38791. background: a,
  38792. colorValue: o,
  38793. handleDrag: l,
  38794. update: s,
  38795. ns: e
  38796. };
  38797. }
  38798. }), oMe = /* @__PURE__ */ He("div", null, null, -1), sMe = [
  38799. oMe
  38800. ];
  38801. function lMe(t, e, n, r, i, a) {
  38802. return pe(), Qe("div", {
  38803. class: Ye(t.ns.b()),
  38804. style: Sr({
  38805. backgroundColor: t.background
  38806. })
  38807. }, [
  38808. He("div", {
  38809. class: Ye(t.ns.e("white"))
  38810. }, null, 2),
  38811. He("div", {
  38812. class: Ye(t.ns.e("black"))
  38813. }, null, 2),
  38814. He("div", {
  38815. class: Ye(t.ns.e("cursor")),
  38816. style: Sr({
  38817. top: t.cursorTop + "px",
  38818. left: t.cursorLeft + "px"
  38819. })
  38820. }, sMe, 6)
  38821. ], 6);
  38822. }
  38823. var uMe = /* @__PURE__ */ Qn(aMe, [["render", lMe], ["__file", "sv-panel.vue"]]);
  38824. const cMe = ["onKeydown"], fMe = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], dMe = te({
  38825. name: "ElColorPicker"
  38826. }), hMe = /* @__PURE__ */ te({
  38827. ...dMe,
  38828. props: YEe,
  38829. emits: qEe,
  38830. setup(t, { expose: e, emit: n }) {
  38831. const r = t, { t: i } = w$e(), a = Jn("color"), { formItem: o } = Ax(), s = $x(), l = E0(), { inputId: u, isLabeledByFormItem: c } = oR(r, {
  38832. formItemContext: o
  38833. }), f = U(), d = U(), h = U(), p = U(), v = U(), g = U(), {
  38834. isFocused: m,
  38835. handleFocus: y,
  38836. handleBlur: b
  38837. } = JY(v, {
  38838. beforeBlur(H) {
  38839. var G;
  38840. return (G = p.value) == null ? void 0 : G.isFocusInsideContent(H);
  38841. },
  38842. afterBlur() {
  38843. R(!1), W();
  38844. }
  38845. }), _ = (H) => {
  38846. if (l.value)
  38847. return X();
  38848. y(H);
  38849. };
  38850. let O = !0;
  38851. const S = tn(new _g({
  38852. enableAlpha: r.showAlpha,
  38853. format: r.colorFormat || "",
  38854. value: r.modelValue
  38855. })), 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"));
  38856. C0({
  38857. from: "label",
  38858. replacement: "aria-label",
  38859. version: "2.8.0",
  38860. scope: "el-color-picker",
  38861. ref: "https://element-plus.org/en-US/component/color-picker.html"
  38862. }, L(() => !!r.label));
  38863. const A = L(() => c.value ? o == null ? void 0 : o.labelId : void 0), D = L(() => [
  38864. a.b("picker"),
  38865. a.is("disabled", l.value),
  38866. a.bm("picker", s.value),
  38867. a.is("focused", m.value)
  38868. ]);
  38869. function E(H, G) {
  38870. if (!(H instanceof _g))
  38871. throw new TypeError("color should be instance of _color Class");
  38872. const { r: re, g: fe, b: de } = H.toRgb();
  38873. return G ? `rgba(${re}, ${fe}, ${de}, ${H.get("alpha") / 100})` : `rgb(${re}, ${fe}, ${de})`;
  38874. }
  38875. function R(H) {
  38876. x.value = H;
  38877. }
  38878. const N = UI(R, 100, { leading: !0 });
  38879. function V() {
  38880. l.value || R(!0);
  38881. }
  38882. function z() {
  38883. N(!1), W();
  38884. }
  38885. function W() {
  38886. Tt(() => {
  38887. r.modelValue ? S.fromString(r.modelValue) : (S.value = "", Tt(() => {
  38888. C.value = !1;
  38889. }));
  38890. });
  38891. }
  38892. function F() {
  38893. l.value || N(!x.value);
  38894. }
  38895. function Q() {
  38896. S.fromString(T.value);
  38897. }
  38898. function Z() {
  38899. const H = S.value;
  38900. n(Qs, H), n("change", H), r.validateEvent && (o == null || o.validate("change").catch((G) => Gi(G))), N(!1), Tt(() => {
  38901. const G = new _g({
  38902. enableAlpha: r.showAlpha,
  38903. format: r.colorFormat || "",
  38904. value: r.modelValue
  38905. });
  38906. S.compare(G) || W();
  38907. });
  38908. }
  38909. function ne() {
  38910. N(!1), n(Qs, null), n("change", null), r.modelValue !== null && r.validateEvent && (o == null || o.validate("change").catch((H) => Gi(H))), W();
  38911. }
  38912. function ee(H) {
  38913. if (x.value && (z(), m.value)) {
  38914. const G = new FocusEvent("focus", H);
  38915. b(G);
  38916. }
  38917. }
  38918. function oe(H) {
  38919. H.preventDefault(), H.stopPropagation(), R(!1), W();
  38920. }
  38921. function K(H) {
  38922. switch (H.code) {
  38923. case Xc.enter:
  38924. case Xc.space:
  38925. H.preventDefault(), H.stopPropagation(), V(), g.value.focus();
  38926. break;
  38927. case Xc.esc:
  38928. oe(H);
  38929. break;
  38930. }
  38931. }
  38932. function ie() {
  38933. v.value.focus();
  38934. }
  38935. function X() {
  38936. v.value.blur();
  38937. }
  38938. return it(() => {
  38939. r.modelValue && (T.value = P.value);
  38940. }), se(() => r.modelValue, (H) => {
  38941. H ? H && H !== S.value && (O = !1, S.fromString(H)) : C.value = !1;
  38942. }), se(() => P.value, (H) => {
  38943. T.value = H, O && n("activeChange", H), O = !0;
  38944. }), se(() => S.value, () => {
  38945. !r.modelValue && !C.value && (C.value = !0);
  38946. }), se(() => x.value, () => {
  38947. Tt(() => {
  38948. var H, G, re;
  38949. (H = f.value) == null || H.update(), (G = d.value) == null || G.update(), (re = h.value) == null || re.update();
  38950. });
  38951. }), pt(mq, {
  38952. currentColor: P
  38953. }), e({
  38954. color: S,
  38955. show: V,
  38956. hide: z,
  38957. focus: ie,
  38958. blur: X
  38959. }), (H, G) => (pe(), je(B(hEe), {
  38960. ref_key: "popper",
  38961. ref: p,
  38962. visible: x.value,
  38963. "show-arrow": !1,
  38964. "fallback-placements": ["bottom", "top", "right", "left"],
  38965. offset: 0,
  38966. "gpu-acceleration": !1,
  38967. "popper-class": [B(a).be("picker", "panel"), B(a).b("dropdown"), H.popperClass],
  38968. "stop-popper-mouse-event": !1,
  38969. effect: "light",
  38970. trigger: "click",
  38971. teleported: H.teleported,
  38972. transition: `${B(a).namespace.value}-zoom-in-top`,
  38973. persistent: "",
  38974. onHide: G[2] || (G[2] = (re) => R(!1))
  38975. }, {
  38976. content: we(() => [
  38977. bi((pe(), Qe("div", {
  38978. onKeydown: Y4(oe, ["esc"])
  38979. }, [
  38980. He("div", {
  38981. class: Ye(B(a).be("dropdown", "main-wrapper"))
  38982. }, [
  38983. M(XEe, {
  38984. ref_key: "hue",
  38985. ref: f,
  38986. class: "hue-slider",
  38987. color: B(S),
  38988. vertical: ""
  38989. }, null, 8, ["color"]),
  38990. M(uMe, {
  38991. ref_key: "sv",
  38992. ref: d,
  38993. color: B(S)
  38994. }, null, 8, ["color"])
  38995. ], 2),
  38996. H.showAlpha ? (pe(), je(jEe, {
  38997. key: 0,
  38998. ref_key: "alpha",
  38999. ref: h,
  39000. color: B(S)
  39001. }, null, 8, ["color"])) : _t("v-if", !0),
  39002. H.predefine ? (pe(), je(iMe, {
  39003. key: 1,
  39004. ref: "predefine",
  39005. "enable-alpha": H.showAlpha,
  39006. color: B(S),
  39007. colors: H.predefine
  39008. }, null, 8, ["enable-alpha", "color", "colors"])) : _t("v-if", !0),
  39009. He("div", {
  39010. class: Ye(B(a).be("dropdown", "btns"))
  39011. }, [
  39012. He("span", {
  39013. class: Ye(B(a).be("dropdown", "value"))
  39014. }, [
  39015. M(B(sR), {
  39016. ref_key: "inputRef",
  39017. ref: g,
  39018. modelValue: T.value,
  39019. "onUpdate:modelValue": G[0] || (G[0] = (re) => T.value = re),
  39020. "validate-event": !1,
  39021. size: "small",
  39022. onKeyup: Y4(Q, ["enter"]),
  39023. onBlur: Q
  39024. }, null, 8, ["modelValue", "onKeyup"])
  39025. ], 2),
  39026. M(B(w6), {
  39027. class: Ye(B(a).be("dropdown", "link-btn")),
  39028. text: "",
  39029. size: "small",
  39030. onClick: ne
  39031. }, {
  39032. default: we(() => [
  39033. Kt(Bi(B(i)("el.colorpicker.clear")), 1)
  39034. ]),
  39035. _: 1
  39036. }, 8, ["class"]),
  39037. M(B(w6), {
  39038. plain: "",
  39039. size: "small",
  39040. class: Ye(B(a).be("dropdown", "btn")),
  39041. onClick: Z
  39042. }, {
  39043. default: we(() => [
  39044. Kt(Bi(B(i)("el.colorpicker.confirm")), 1)
  39045. ]),
  39046. _: 1
  39047. }, 8, ["class"])
  39048. ], 2)
  39049. ], 40, cMe)), [
  39050. [B(CEe), ee]
  39051. ])
  39052. ]),
  39053. default: we(() => [
  39054. He("div", _n({
  39055. id: B(u),
  39056. ref_key: "triggerRef",
  39057. ref: v
  39058. }, H.$attrs, {
  39059. class: B(D),
  39060. role: "button",
  39061. "aria-label": B($),
  39062. "aria-labelledby": B(A),
  39063. "aria-description": B(i)("el.colorpicker.description", { color: H.modelValue || "" }),
  39064. "aria-disabled": B(l),
  39065. tabindex: B(l) ? -1 : H.tabindex,
  39066. onKeydown: K,
  39067. onFocus: _,
  39068. onBlur: G[1] || (G[1] = (...re) => B(b) && B(b)(...re))
  39069. }), [
  39070. B(l) ? (pe(), Qe("div", {
  39071. key: 0,
  39072. class: Ye(B(a).be("picker", "mask"))
  39073. }, null, 2)) : _t("v-if", !0),
  39074. He("div", {
  39075. class: Ye(B(a).be("picker", "trigger")),
  39076. onClick: F
  39077. }, [
  39078. He("span", {
  39079. class: Ye([B(a).be("picker", "color"), B(a).is("alpha", H.showAlpha)])
  39080. }, [
  39081. He("span", {
  39082. class: Ye(B(a).be("picker", "color-inner")),
  39083. style: Sr({
  39084. backgroundColor: B(w)
  39085. })
  39086. }, [
  39087. bi(M(B(ws), {
  39088. class: Ye([B(a).be("picker", "icon"), B(a).is("icon-arrow-down")])
  39089. }, {
  39090. default: we(() => [
  39091. M(B(e$e))
  39092. ]),
  39093. _: 1
  39094. }, 8, ["class"]), [
  39095. [Bs, H.modelValue || C.value]
  39096. ]),
  39097. bi(M(B(ws), {
  39098. class: Ye([B(a).be("picker", "empty"), B(a).is("icon-close")])
  39099. }, {
  39100. default: we(() => [
  39101. M(B(a$e))
  39102. ]),
  39103. _: 1
  39104. }, 8, ["class"]), [
  39105. [Bs, !H.modelValue && !C.value]
  39106. ])
  39107. ], 6)
  39108. ], 2)
  39109. ], 2)
  39110. ], 16, fMe)
  39111. ]),
  39112. _: 1
  39113. }, 8, ["visible", "popper-class", "teleported", "transition"]));
  39114. }
  39115. });
  39116. var pMe = /* @__PURE__ */ Qn(hMe, [["__file", "color-picker.vue"]]);
  39117. const qd = Df(pMe), yq = (t) => (AS("data-v-70598cf2"), t = t(), ES(), t), vMe = {
  39118. key: 0,
  39119. class: "color-box"
  39120. }, gMe = { class: "img-preview" }, mMe = /* @__PURE__ */ yq(() => /* @__PURE__ */ He("div", { class: "img-empty" }, "未选择", -1)), yMe = /* @__PURE__ */ yq(() => /* @__PURE__ */ He("div", { class: "img-tip" }, "选择素材", -1)), bMe = /* @__PURE__ */ te({
  39121. __name: "BackgroundSelect",
  39122. props: {
  39123. value: { default: () => ({
  39124. type: "none",
  39125. color: "",
  39126. image: "",
  39127. fillType: ""
  39128. }) },
  39129. filterOptions: {}
  39130. },
  39131. emits: ["update:value"],
  39132. setup(t, { emit: e }) {
  39133. const n = t, r = e, i = U(n.value), a = [
  39134. { label: "无", value: "none" },
  39135. { label: "颜色", value: "color" },
  39136. { label: "图片", value: "image" }
  39137. ], o = L(() => n.filterOptions ? a.filter((l) => {
  39138. var u;
  39139. return !((u = n.filterOptions) != null && u.includes(l.value));
  39140. }) : a);
  39141. se(
  39142. () => i.value,
  39143. () => {
  39144. r("update:value", i.value);
  39145. },
  39146. {
  39147. deep: !0
  39148. }
  39149. );
  39150. const s = (l) => {
  39151. l === "color" && !i.value.color && (i.value.color = "#0B074BFF");
  39152. };
  39153. return (l, u) => (pe(), Qe(wt, null, [
  39154. M(B(ci), {
  39155. value: i.value.type,
  39156. "onUpdate:value": u[0] || (u[0] = (c) => i.value.type = c),
  39157. style: { width: "100%" },
  39158. options: o.value,
  39159. onChange: s
  39160. }, null, 8, ["value", "options"]),
  39161. i.value.type === "color" ? (pe(), Qe("div", vMe, [
  39162. M(B(qd), {
  39163. modelValue: i.value.color,
  39164. "onUpdate:modelValue": u[1] || (u[1] = (c) => i.value.color = c),
  39165. "color-format": "hex",
  39166. "show-alpha": "",
  39167. size: "small"
  39168. }, null, 8, ["modelValue"]),
  39169. M(B(sR), {
  39170. modelValue: i.value.color,
  39171. "onUpdate:modelValue": u[2] || (u[2] = (c) => i.value.color = c),
  39172. size: "small"
  39173. }, null, 8, ["modelValue"])
  39174. ])) : i.value.type === "image" ? (pe(), Qe(wt, { key: 1 }, [
  39175. He("div", gMe, [
  39176. mMe,
  39177. M(B(Al), {
  39178. src: i.value.image
  39179. }, null, 8, ["src"]),
  39180. yMe
  39181. ]),
  39182. M(B(gq), {
  39183. modelValue: i.value.fillType,
  39184. "onUpdate:modelValue": u[3] || (u[3] = (c) => i.value.fillType = c)
  39185. }, {
  39186. default: we(() => [
  39187. M(B(bg), { value: "cover" }, {
  39188. default: we(() => [
  39189. Kt("填充")
  39190. ]),
  39191. _: 1
  39192. }),
  39193. M(B(bg), { value: "contain" }, {
  39194. default: we(() => [
  39195. Kt("适应")
  39196. ]),
  39197. _: 1
  39198. }),
  39199. M(B(bg), { value: "stretch" }, {
  39200. default: we(() => [
  39201. Kt("拉伸")
  39202. ]),
  39203. _: 1
  39204. })
  39205. ]),
  39206. _: 1
  39207. }, 8, ["modelValue"])
  39208. ], 64)) : _t("", !0)
  39209. ], 64));
  39210. }
  39211. }), po = (t, e) => {
  39212. const n = t.__vccOpts || t;
  39213. for (const [r, i] of e)
  39214. n[r] = i;
  39215. return n;
  39216. }, _Me = /* @__PURE__ */ po(bMe, [["__scopeId", "data-v-70598cf2"]]), OMe = /* @__PURE__ */ te({
  39217. __name: "ColorSelect",
  39218. props: {
  39219. value: {},
  39220. gradient: { type: Boolean, default: !0 }
  39221. },
  39222. emits: ["update:value"],
  39223. setup(t, { emit: e }) {
  39224. var s, l;
  39225. 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"]);
  39226. return se(
  39227. () => [i.value, a.value, o.value],
  39228. () => {
  39229. 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);
  39230. },
  39231. {
  39232. deep: !0
  39233. }
  39234. ), se(
  39235. () => r.gradient,
  39236. (u) => {
  39237. u || (i.value = "pure", a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value);
  39238. }
  39239. ), (u, c) => (pe(), Qe(wt, null, [
  39240. u.gradient ? (pe(), je(B(gq), {
  39241. key: 0,
  39242. modelValue: i.value,
  39243. "onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
  39244. size: "small",
  39245. style: { width: "100%" }
  39246. }, {
  39247. default: we(() => [
  39248. M(B(bg), { value: "pure" }, {
  39249. default: we(() => [
  39250. Kt("单色")
  39251. ]),
  39252. _: 1
  39253. }),
  39254. M(B(bg), { value: "gradient" }, {
  39255. default: we(() => [
  39256. Kt("渐变色")
  39257. ]),
  39258. _: 1
  39259. })
  39260. ]),
  39261. _: 1
  39262. }, 8, ["modelValue"])) : _t("", !0),
  39263. i.value === "pure" ? (pe(), Qe("div", {
  39264. key: 1,
  39265. class: "color-box",
  39266. style: Sr({ marginTop: u.gradient ? "12px" : "0" })
  39267. }, [
  39268. M(B(qd), {
  39269. modelValue: a.value,
  39270. "onUpdate:modelValue": c[1] || (c[1] = (f) => a.value = f),
  39271. "color-format": "hex",
  39272. "show-alpha": "",
  39273. size: "small"
  39274. }, null, 8, ["modelValue"]),
  39275. M(B(sR), {
  39276. modelValue: a.value,
  39277. "onUpdate:modelValue": c[2] || (c[2] = (f) => a.value = f),
  39278. size: "small"
  39279. }, null, 8, ["modelValue"])
  39280. ], 4)) : i.value === "gradient" ? (pe(), Qe("div", {
  39281. key: 2,
  39282. class: "gradient-box",
  39283. style: Sr({ background: a.value })
  39284. }, [
  39285. M(B(qd), {
  39286. modelValue: o.value[0],
  39287. "onUpdate:modelValue": c[3] || (c[3] = (f) => o.value[0] = f),
  39288. "color-format": "hex",
  39289. "show-alpha": "",
  39290. size: "small"
  39291. }, null, 8, ["modelValue"]),
  39292. M(B(qd), {
  39293. modelValue: o.value[1],
  39294. "onUpdate:modelValue": c[4] || (c[4] = (f) => o.value[1] = f),
  39295. "color-format": "hex",
  39296. "show-alpha": "",
  39297. size: "small"
  39298. }, null, 8, ["modelValue"])
  39299. ], 4)) : _t("", !0)
  39300. ], 64));
  39301. }
  39302. }), SMe = /* @__PURE__ */ po(OMe, [["__scopeId", "data-v-d5768739"]]), Z1 = [
  39303. {
  39304. name: "清新",
  39305. color: ["#00a8e1", "#99cc00", "#e30039", "#fcd300", "#800080"]
  39306. },
  39307. {
  39308. name: "复古",
  39309. color: ["#FFA69E", "#FAE3D9", "#B8F2E6", "#56E39F", "#3A837D"]
  39310. },
  39311. {
  39312. name: "商务",
  39313. color: ["#194f97", "#555555", "#bd6b08", "#00686b", "#c82d31"]
  39314. },
  39315. {
  39316. name: "经典",
  39317. color: ["#002c53", "#ffa510", "#0c84c6", "#ffffff", "#f74d4d"]
  39318. },
  39319. {
  39320. name: "怀旧",
  39321. color: ["#3b6291", "#943c39", "#779043", "#624c7c", "#388498"]
  39322. }
  39323. ], xMe = {
  39324. // 调色盘-预设颜色
  39325. color: Z1[0].color,
  39326. // 标题
  39327. title: {
  39328. show: !0,
  39329. left: "center",
  39330. top: 8,
  39331. textStyle: {
  39332. color: "#FFFFFFFF",
  39333. fontSize: 16,
  39334. fontWeight: "normal"
  39335. }
  39336. },
  39337. // 图例
  39338. legend: {
  39339. show: !0,
  39340. textStyle: {
  39341. color: "#FFFFFFFF"
  39342. },
  39343. top: 32,
  39344. bottom: "auto",
  39345. left: "center",
  39346. right: "auto"
  39347. },
  39348. // 布局
  39349. grid: {
  39350. bottom: 34,
  39351. right: 20,
  39352. left: 20,
  39353. top: 60
  39354. },
  39355. // x轴
  39356. xAxis: {
  39357. type: "category",
  39358. name: "",
  39359. nameLocation: "middle",
  39360. nameTruncate: {
  39361. ellipsis: "...",
  39362. maxWidth: 80
  39363. },
  39364. nameTextStyle: {
  39365. color: "#FFFFFFFF",
  39366. fontSize: 12,
  39367. fontWeight: "normal",
  39368. fontStyle: "normal"
  39369. },
  39370. axisLabel: {
  39371. show: !0,
  39372. color: "#9fadbf",
  39373. fontSize: 12,
  39374. fontWeight: "normal",
  39375. fontStyle: "normal"
  39376. },
  39377. axisLine: {
  39378. show: !0,
  39379. lineStyle: {
  39380. width: 1
  39381. }
  39382. },
  39383. axisTick: {
  39384. show: !0,
  39385. lineStyle: {
  39386. width: 1,
  39387. color: "#ccc"
  39388. }
  39389. }
  39390. },
  39391. // y轴
  39392. yAxis: {
  39393. splitLine: {
  39394. show: !0,
  39395. lineStyle: {
  39396. type: "dashed",
  39397. color: "#36485f"
  39398. }
  39399. },
  39400. type: "value",
  39401. name: "",
  39402. nameLocation: "middle",
  39403. nameTruncate: {
  39404. ellipsis: "...",
  39405. maxWidth: 80
  39406. },
  39407. nameTextStyle: {
  39408. color: "#FFFFFFFF",
  39409. fontSize: 12,
  39410. fontWeight: "normal",
  39411. fontStyle: "normal"
  39412. },
  39413. axisLabel: {
  39414. show: !0,
  39415. color: "#9fadbf",
  39416. fontSize: 12,
  39417. fontWeight: "normal",
  39418. fontStyle: "normal",
  39419. rotate: 0
  39420. },
  39421. axisLine: {
  39422. show: !1,
  39423. lineStyle: {
  39424. width: 1,
  39425. color: "#ccc"
  39426. }
  39427. },
  39428. axisTick: {
  39429. show: !1,
  39430. lineStyle: {
  39431. width: 1,
  39432. color: "#ccc"
  39433. }
  39434. }
  39435. },
  39436. // 提示
  39437. tooltip: {
  39438. show: !0,
  39439. trigger: "axis",
  39440. formatter: "{b} {c}",
  39441. // valueFormatter: "(value, dataIndex) => value",
  39442. axisPointer: {
  39443. type: "line"
  39444. },
  39445. textStyle: {
  39446. color: "#000000FF",
  39447. fontSize: 12,
  39448. fontWeight: "normal",
  39449. fontStyle: "normal"
  39450. },
  39451. padding: 10,
  39452. borderWidth: 1,
  39453. borderColor: "#ccc",
  39454. borderRadius: 4,
  39455. backgroundColor: "#FFFFFFFF",
  39456. extraCssText: ""
  39457. }
  39458. }, wMe = { class: "color-list" }, CMe = { class: "del-btn" }, TMe = /* @__PURE__ */ te({
  39459. __name: "ColorScheme",
  39460. props: {
  39461. value: {
  39462. type: Array,
  39463. default: () => []
  39464. }
  39465. },
  39466. emits: ["update:value"],
  39467. setup(t, { emit: e }) {
  39468. const n = t, r = Z1.map((d) => d.color.join(",")), i = e, a = U(r.includes(n.value.join(",")) ? n.value.join(",") : "custom"), o = U(n.value), s = U();
  39469. function l(d) {
  39470. d === "custom" || (o.value = d.split(","), i("update:value", d.split(",")));
  39471. }
  39472. const u = () => {
  39473. var d;
  39474. (d = s.value) == null || d.show();
  39475. };
  39476. function c(d) {
  39477. o.value.push(d), a.value = "custom", i("update:value", o.value);
  39478. }
  39479. const f = (d) => {
  39480. o.value.splice(d, 1), a.value = "custom", i("update:value", o.value);
  39481. };
  39482. return (d, h) => (pe(), Qe("div", null, [
  39483. M(B(ci), {
  39484. value: a.value,
  39485. "onUpdate:value": h[0] || (h[0] = (p) => a.value = p),
  39486. size: "small",
  39487. style: { width: "100%" },
  39488. onChange: l
  39489. }, {
  39490. default: we(() => [
  39491. (pe(!0), Qe(wt, null, ag(B(Z1), (p) => (pe(), je(B(M1), {
  39492. key: p.name,
  39493. value: p.color.join(",")
  39494. }, {
  39495. default: we(() => [
  39496. (pe(!0), Qe(wt, null, ag(p.color.slice(0, 5), (v) => (pe(), Qe("span", {
  39497. class: "color-block",
  39498. key: v,
  39499. style: Sr({ background: v })
  39500. }, null, 4))), 128)),
  39501. Kt(" " + Bi(p.name), 1)
  39502. ]),
  39503. _: 2
  39504. }, 1032, ["value"]))), 128)),
  39505. M(B(M1), { value: "custom" }, {
  39506. default: we(() => [
  39507. Kt("自定义组合")
  39508. ]),
  39509. _: 1
  39510. })
  39511. ]),
  39512. _: 1
  39513. }, 8, ["value"]),
  39514. He("div", wMe, [
  39515. (pe(!0), Qe(wt, null, ag(o.value, (p, v) => (pe(), Qe("span", {
  39516. class: "color-block",
  39517. key: v,
  39518. style: Sr({ background: p })
  39519. }, [
  39520. He("span", CMe, [
  39521. M(B(Da), {
  39522. onClick: (g) => f(v)
  39523. }, null, 8, ["onClick"])
  39524. ])
  39525. ], 4))), 128)),
  39526. He("span", {
  39527. class: "color-block cus-btn",
  39528. onClick: u
  39529. }, [
  39530. M(B(yx))
  39531. ]),
  39532. M(B(qd), {
  39533. ref_key: "colorPickerRef",
  39534. ref: s,
  39535. style: { width: "0", height: "0", opacity: "0" },
  39536. onChange: c
  39537. }, null, 512)
  39538. ])
  39539. ]));
  39540. }
  39541. }), PMe = /* @__PURE__ */ po(TMe, [["__scopeId", "data-v-b29b1b78"]]), $Me = { class: "position" }, AMe = /* @__PURE__ */ te({
  39542. __name: "Position",
  39543. props: {
  39544. value: {},
  39545. type: { default: "line" }
  39546. },
  39547. emits: ["update:value"],
  39548. setup(t) {
  39549. return (e, n) => (pe(), Qe("div", $Me, [
  39550. e.type === "line" ? (pe(), je(B(vf), {
  39551. key: 0,
  39552. value: e.value,
  39553. onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r.target.value))
  39554. }, {
  39555. default: we(() => [
  39556. M(B(Io), { value: "left" }, {
  39557. default: we(() => [
  39558. M(B(MD))
  39559. ]),
  39560. _: 1
  39561. }),
  39562. M(B(Io), { value: "center" }, {
  39563. default: we(() => [
  39564. M(B(ED))
  39565. ]),
  39566. _: 1
  39567. }),
  39568. M(B(Io), { value: "right" }, {
  39569. default: we(() => [
  39570. M(B(ID))
  39571. ]),
  39572. _: 1
  39573. })
  39574. ]),
  39575. _: 1
  39576. }, 8, ["value"])) : e.type === "round" ? (pe(), je(B(vf), {
  39577. key: 1,
  39578. value: e.value,
  39579. onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r.target.value))
  39580. }, {
  39581. default: we(() => [
  39582. M(B(Io), { value: "top" }, {
  39583. default: we(() => [
  39584. M(B(ND))
  39585. ]),
  39586. _: 1
  39587. }),
  39588. M(B(Io), { value: "bottom" }, {
  39589. default: we(() => [
  39590. M(B(RD))
  39591. ]),
  39592. _: 1
  39593. }),
  39594. M(B(Io), { value: "left" }, {
  39595. default: we(() => [
  39596. M(B(kD))
  39597. ]),
  39598. _: 1
  39599. }),
  39600. M(B(Io), { value: "right" }, {
  39601. default: we(() => [
  39602. M(B(LD))
  39603. ]),
  39604. _: 1
  39605. })
  39606. ]),
  39607. _: 1
  39608. }, 8, ["value"])) : _t("", !0)
  39609. ]));
  39610. }
  39611. }), EMe = /* @__PURE__ */ po(AMe, [["__scopeId", "data-v-a4b8591a"]]), MMe = { class: "font-style" }, IMe = { class: "cus-btn" }, DMe = /* @__PURE__ */ te({
  39612. __name: "FontStyle",
  39613. props: {
  39614. value: {}
  39615. },
  39616. emits: ["update:value"],
  39617. setup(t, { emit: e }) {
  39618. var v, g, m, y;
  39619. 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 = () => {
  39620. r("update:value", {
  39621. size: o.value,
  39622. bold: i.value,
  39623. italic: a.value,
  39624. color: s.value
  39625. });
  39626. }, c = () => {
  39627. i.value = !i.value, u();
  39628. }, f = () => {
  39629. a.value = !a.value, u();
  39630. };
  39631. function d(b) {
  39632. s.value = b, u();
  39633. }
  39634. function h(b) {
  39635. o.value = b, u();
  39636. }
  39637. const p = () => {
  39638. var b;
  39639. (b = l.value) == null || b.show();
  39640. };
  39641. return (b, _) => (pe(), Qe("div", MMe, [
  39642. M(B(Ur), {
  39643. size: "small",
  39644. onClick: p
  39645. }, {
  39646. default: we(() => [
  39647. He("span", IMe, [
  39648. M(B(BD)),
  39649. He("div", {
  39650. class: "color-block",
  39651. style: Sr({ background: s.value })
  39652. }, null, 4),
  39653. M(B(qd), {
  39654. ref_key: "colorPickerRef",
  39655. ref: l,
  39656. style: { width: "0", height: "0", opacity: "0" },
  39657. value: s.value,
  39658. "onUpdate:value": _[0] || (_[0] = (O) => s.value = O),
  39659. onChange: d
  39660. }, null, 8, ["value"])
  39661. ])
  39662. ]),
  39663. _: 1
  39664. }),
  39665. M(B(Ur), {
  39666. size: "small",
  39667. onClick: c
  39668. }, {
  39669. default: we(() => [
  39670. He("span", {
  39671. class: Ye(["cus-btn", { "active-btn": i.value }])
  39672. }, [
  39673. M(B(DD))
  39674. ], 2)
  39675. ]),
  39676. _: 1
  39677. }),
  39678. M(B(Ur), {
  39679. size: "small",
  39680. onClick: f
  39681. }, {
  39682. default: we(() => [
  39683. He("span", {
  39684. class: Ye(["cus-btn", { "active-btn": a.value }])
  39685. }, [
  39686. M(B(zD))
  39687. ], 2)
  39688. ]),
  39689. _: 1
  39690. }),
  39691. M(B(O0), {
  39692. size: "small",
  39693. value: o.value,
  39694. min: 12,
  39695. step: 1,
  39696. precision: 0,
  39697. style: { width: "80px" },
  39698. onChange: h
  39699. }, {
  39700. addonAfter: we(() => [
  39701. Kt("px")
  39702. ]),
  39703. _: 1
  39704. }, 8, ["value"])
  39705. ]));
  39706. }
  39707. }), RMe = /* @__PURE__ */ po(DMe, [["__scopeId", "data-v-12e62bfe"]]), kMe = { class: "cus-slider" }, LMe = /* @__PURE__ */ te({
  39708. __name: "CusSlider",
  39709. props: {
  39710. value: {}
  39711. },
  39712. emits: ["update:value"],
  39713. setup(t) {
  39714. return (e, n) => (pe(), Qe("div", kMe, [
  39715. M(B(KTe), {
  39716. value: e.value,
  39717. onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r)),
  39718. "tip-formatter": (r) => `${r}%`
  39719. }, null, 8, ["value", "tip-formatter"]),
  39720. M(B(O0), {
  39721. value: e.value,
  39722. onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r)),
  39723. "addon-after": "%"
  39724. }, null, 8, ["value"])
  39725. ]));
  39726. }
  39727. }), NMe = /* @__PURE__ */ po(LMe, [["__scopeId", "data-v-2fe8fa98"]]), BMe = te({
  39728. name: "FmBorderRadius",
  39729. components: {
  39730. RadioGroup: vf,
  39731. RadioButton: Io,
  39732. InputNumber: O0,
  39733. Select: ci,
  39734. RadiusUpleftOutlined: WD,
  39735. RadiusUprightOutlined: QD,
  39736. RadiusBottomleftOutlined: VD,
  39737. RadiusBottomrightOutlined: FD
  39738. },
  39739. props: {
  39740. value: {
  39741. type: Object,
  39742. default: () => ({})
  39743. }
  39744. },
  39745. emits: ["update:value"],
  39746. setup(t, { emit: e }) {
  39747. var r, i, a, o;
  39748. const n = tn({
  39749. type: t.value.type || "all",
  39750. value: t.value.type === "all" ? t.value.value : 0,
  39751. unit: t.value.unit || "px",
  39752. topLeft: typeof t.value.value == "object" ? (r = t.value.value) == null ? void 0 : r.topLeft : 0,
  39753. topRight: typeof t.value.value == "object" ? (i = t.value.value) == null ? void 0 : i.topRight : 0,
  39754. bottomLeft: typeof t.value.value == "object" ? (a = t.value.value) == null ? void 0 : a.bottomLeft : 0,
  39755. bottomRight: typeof t.value.value == "object" ? (o = t.value.value) == null ? void 0 : o.bottomRight : 0
  39756. });
  39757. return se(
  39758. () => n,
  39759. (s) => {
  39760. e("update:value", {
  39761. type: s.type,
  39762. value: s.type === "all" ? s.value : {
  39763. topLeft: s.topLeft,
  39764. topRight: s.topRight,
  39765. bottomLeft: s.bottomLeft,
  39766. bottomRight: s.bottomRight
  39767. },
  39768. unit: s.unit
  39769. });
  39770. },
  39771. {
  39772. deep: !0
  39773. }
  39774. ), {
  39775. radius: n,
  39776. unitOptions: [
  39777. { label: "px", value: "px" },
  39778. { label: "%", value: "%" }
  39779. ]
  39780. };
  39781. }
  39782. }), zMe = {
  39783. key: 0,
  39784. class: "all"
  39785. }, VMe = {
  39786. key: 1,
  39787. class: "custom"
  39788. };
  39789. function FMe(t, e, n, r, i, a) {
  39790. const o = cl("RadioButton"), s = cl("RadioGroup"), l = cl("InputNumber"), u = cl("Select"), c = cl("RadiusUpleftOutlined"), f = cl("RadiusUprightOutlined"), d = cl("RadiusBottomleftOutlined"), h = cl("RadiusBottomrightOutlined");
  39791. return pe(), Qe("div", null, [
  39792. M(s, {
  39793. value: t.radius.type,
  39794. "onUpdate:value": e[0] || (e[0] = (p) => t.radius.type = p)
  39795. }, {
  39796. default: we(() => [
  39797. M(o, { value: "all" }, {
  39798. default: we(() => [
  39799. Kt("整体")
  39800. ]),
  39801. _: 1
  39802. }),
  39803. M(o, { value: "custom" }, {
  39804. default: we(() => [
  39805. Kt("单个")
  39806. ]),
  39807. _: 1
  39808. })
  39809. ]),
  39810. _: 1
  39811. }, 8, ["value"]),
  39812. t.radius.type === "all" ? (pe(), Qe("div", zMe, [
  39813. M(l, {
  39814. value: t.radius.value,
  39815. "onUpdate:value": e[1] || (e[1] = (p) => t.radius.value = p)
  39816. }, null, 8, ["value"]),
  39817. M(u, {
  39818. value: t.radius.unit,
  39819. "onUpdate:value": e[2] || (e[2] = (p) => t.radius.unit = p),
  39820. options: t.unitOptions
  39821. }, null, 8, ["value", "options"])
  39822. ])) : (pe(), Qe("div", VMe, [
  39823. M(l, {
  39824. value: t.radius.topLeft,
  39825. "onUpdate:value": e[3] || (e[3] = (p) => t.radius.topLeft = p)
  39826. }, {
  39827. addonBefore: we(() => [
  39828. M(c)
  39829. ]),
  39830. _: 1
  39831. }, 8, ["value"]),
  39832. M(l, {
  39833. value: t.radius.topRight,
  39834. "onUpdate:value": e[4] || (e[4] = (p) => t.radius.topRight = p)
  39835. }, {
  39836. addonBefore: we(() => [
  39837. M(f)
  39838. ]),
  39839. _: 1
  39840. }, 8, ["value"]),
  39841. M(l, {
  39842. value: t.radius.bottomLeft,
  39843. "onUpdate:value": e[5] || (e[5] = (p) => t.radius.bottomLeft = p)
  39844. }, {
  39845. addonBefore: we(() => [
  39846. M(d)
  39847. ]),
  39848. _: 1
  39849. }, 8, ["value"]),
  39850. M(l, {
  39851. value: t.radius.bottomRight,
  39852. "onUpdate:value": e[6] || (e[6] = (p) => t.radius.bottomRight = p)
  39853. }, {
  39854. addonBefore: we(() => [
  39855. M(h)
  39856. ]),
  39857. _: 1
  39858. }, 8, ["value"]),
  39859. M(u, {
  39860. value: t.radius.unit,
  39861. "onUpdate:value": e[7] || (e[7] = (p) => t.radius.unit = p),
  39862. options: t.unitOptions
  39863. }, null, 8, ["value", "options"])
  39864. ]))
  39865. ]);
  39866. }
  39867. const WMe = /* @__PURE__ */ po(BMe, [["render", FMe], ["__scopeId", "data-v-da2b5cf6"]]), QMe = /* @__PURE__ */ te({
  39868. __name: "CusFormItem",
  39869. props: {
  39870. item: {},
  39871. modelValue: {}
  39872. },
  39873. emits: ["update:modelValue"],
  39874. setup(t, { emit: e }) {
  39875. const n = t, r = e, i = U(n.modelValue);
  39876. return se(
  39877. () => i.value,
  39878. () => {
  39879. r("update:modelValue", i.value);
  39880. },
  39881. { deep: !0 }
  39882. ), se(
  39883. () => n.modelValue,
  39884. (a) => {
  39885. YS(a, i.value) || (i.value = a);
  39886. }
  39887. ), (a, o) => (pe(), je(B(PX), {
  39888. label: a.item.type !== "divider" ? a.item.label : "",
  39889. name: a.item.prop,
  39890. rules: a.item.rules
  39891. }, {
  39892. default: we(() => {
  39893. var s, l, u, c, f, d, h, p, v, g, m;
  39894. return [
  39895. a.item.type === "divider" ? (pe(), je(B(Zwe), {
  39896. key: 0,
  39897. style: { margin: "0" }
  39898. }, {
  39899. default: we(() => [
  39900. Kt(Bi(a.item.label), 1)
  39901. ]),
  39902. _: 1
  39903. })) : a.item.type === "input" ? (pe(), je(B(Hn), _n({
  39904. key: 1,
  39905. value: i.value,
  39906. "onUpdate:value": o[0] || (o[0] = (y) => i.value = y)
  39907. }, (s = a.item) == null ? void 0 : s.fieldProps), null, 16, ["value"])) : a.item.type === "select" ? (pe(), je(B(ci), _n({
  39908. key: 2,
  39909. value: i.value,
  39910. "onUpdate:value": o[1] || (o[1] = (y) => i.value = y)
  39911. }, (l = a.item) == null ? void 0 : l.fieldProps), null, 16, ["value"])) : a.item.type === "inputNumber" ? (pe(), je(B(O0), _n({
  39912. key: 3,
  39913. value: i.value,
  39914. "onUpdate:value": o[2] || (o[2] = (y) => i.value = y)
  39915. }, (u = a.item) == null ? void 0 : u.fieldProps, { style: { width: "100%" } }), null, 16, ["value"])) : a.item.type === "image" ? (pe(), je(B(Al), _n({
  39916. key: 4,
  39917. value: i.value,
  39918. "onUpdate:value": o[3] || (o[3] = (y) => i.value = y)
  39919. }, (c = a.item) == null ? void 0 : c.fieldProps), null, 16, ["value"])) : a.item.type === "checkboxGroup" ? (pe(), je(B(z1), _n({
  39920. key: 5,
  39921. value: i.value,
  39922. "onUpdate:value": o[4] || (o[4] = (y) => i.value = y)
  39923. }, (f = a.item) == null ? void 0 : f.fieldProps), null, 16, ["value"])) : a.item.type === "backgroundSelect" ? (pe(), je(_Me, _n({
  39924. key: 6,
  39925. value: i.value,
  39926. "onUpdate:value": o[5] || (o[5] = (y) => i.value = y)
  39927. }, (d = a.item) == null ? void 0 : d.fieldProps), null, 16, ["value"])) : a.item.type === "colorSelect" ? (pe(), je(SMe, _n({
  39928. key: 7,
  39929. value: i.value,
  39930. "onUpdate:value": o[6] || (o[6] = (y) => i.value = y)
  39931. }, (h = a.item) == null ? void 0 : h.fieldProps), null, 16, ["value"])) : a.item.type === "colorScheme" ? (pe(), je(PMe, _n({
  39932. key: 8,
  39933. value: i.value,
  39934. "onUpdate:value": o[7] || (o[7] = (y) => i.value = y)
  39935. }, (p = a.item) == null ? void 0 : p.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroup" ? (pe(), je(B(vf), _n({
  39936. key: 9,
  39937. value: i.value,
  39938. "onUpdate:value": o[8] || (o[8] = (y) => i.value = y),
  39939. size: "small"
  39940. }, (v = a.item) == null ? void 0 : v.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroupButton" ? (pe(), je(B(vf), {
  39941. key: 10,
  39942. value: i.value,
  39943. "onUpdate:value": o[9] || (o[9] = (y) => i.value = y),
  39944. size: "small"
  39945. }, {
  39946. default: we(() => [
  39947. (pe(!0), Qe(wt, null, ag(a.item.fieldProps.options, (y) => (pe(), je(B(Io), {
  39948. key: y.value,
  39949. value: y.value
  39950. }, {
  39951. default: we(() => [
  39952. Kt(Bi(y.label), 1)
  39953. ]),
  39954. _: 2
  39955. }, 1032, ["value"]))), 128))
  39956. ]),
  39957. _: 1
  39958. }, 8, ["value"])) : a.item.type === "position" ? (pe(), je(EMe, _n({
  39959. key: 11,
  39960. value: i.value,
  39961. "onUpdate:value": o[10] || (o[10] = (y) => i.value = y)
  39962. }, (g = a.item) == null ? void 0 : g.fieldProps), null, 16, ["value"])) : a.item.type === "fontStyle" ? (pe(), je(RMe, _n({
  39963. key: 12,
  39964. value: i.value,
  39965. "onUpdate:value": o[11] || (o[11] = (y) => i.value = y)
  39966. }, (m = a.item) == null ? void 0 : m.fieldProps), null, 16, ["value"])) : a.item.type === "slider" ? (pe(), je(B(im), { key: 13 }, {
  39967. default: we(() => {
  39968. var y;
  39969. return [
  39970. M(NMe, _n({
  39971. value: i.value,
  39972. "onUpdate:value": o[12] || (o[12] = (b) => i.value = b)
  39973. }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
  39974. ];
  39975. }),
  39976. _: 1
  39977. })) : a.item.type === "boderRadiusSelect" ? (pe(), je(B(im), { key: 14 }, {
  39978. default: we(() => {
  39979. var y;
  39980. return [
  39981. M(WMe, _n({
  39982. value: i.value,
  39983. "onUpdate:value": o[13] || (o[13] = (b) => i.value = b)
  39984. }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
  39985. ];
  39986. }),
  39987. _: 1
  39988. })) : _t("", !0),
  39989. a.item.tip ? (pe(), je(B(dx), {
  39990. key: 15,
  39991. title: a.item.tip
  39992. }, {
  39993. default: we(() => [
  39994. M(B(fx), { style: { color: "#666" } })
  39995. ]),
  39996. _: 1
  39997. }, 8, ["title"])) : _t("", !0)
  39998. ];
  39999. }),
  40000. _: 1
  40001. }, 8, ["label", "name", "rules"]));
  40002. }
  40003. }), HMe = /* @__PURE__ */ po(QMe, [["__scopeId", "data-v-04c55003"]]), Mx = te({
  40004. props: {
  40005. columns: {
  40006. type: Array,
  40007. default: () => []
  40008. },
  40009. formModel: {
  40010. type: Object,
  40011. default: () => ({})
  40012. }
  40013. },
  40014. emits: ["change"],
  40015. setup(t, { emit: e }) {
  40016. const n = U({}), r = U(), i = U({}), a = L(() => t.columns.map((f) => ({
  40017. ...f,
  40018. rules: (f == null ? void 0 : f.rules) || []
  40019. }))), o = (f) => {
  40020. f == null || f.forEach((d) => {
  40021. var h;
  40022. if (d.type === "group")
  40023. o(d.children);
  40024. else if (d.type === "dependency") {
  40025. const p = (h = d.children) == null ? void 0 : h.call(
  40026. d,
  40027. am(n.value, d.name || []),
  40028. n
  40029. );
  40030. o(p);
  40031. } else {
  40032. if (d.type === "divider") return;
  40033. const p = kt(t.formModel, d.prop);
  40034. 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;
  40035. }
  40036. });
  40037. }, s = (f, d) => {
  40038. n.value[d.prop] = f, d.format ? d.format(i, f) : i.value[d.prop] = f, e("change", i.value);
  40039. }, l = (f) => {
  40040. var d;
  40041. switch (f.type) {
  40042. case "dependency": {
  40043. const h = (d = f.children) == null ? void 0 : d.call(
  40044. f,
  40045. am(n.value, f.name || []),
  40046. n
  40047. );
  40048. return o(h), c(h);
  40049. }
  40050. case "group":
  40051. return u(f);
  40052. default:
  40053. return /* @__PURE__ */ React.createElement(
  40054. HMe,
  40055. {
  40056. key: f.prop,
  40057. item: f,
  40058. modelValue: n.value[f.prop],
  40059. "onUpdate:modelValue": (h) => {
  40060. s(h, f);
  40061. }
  40062. }
  40063. );
  40064. }
  40065. }, u = (f) => {
  40066. var d;
  40067. return /* @__PURE__ */ React.createElement(cg, { style: { borderRadius: 0 } }, /* @__PURE__ */ React.createElement(B1, { style: { borderRadius: 0 }, key: f.prop, header: f.label }, (d = f.children) == null ? void 0 : d.map((h) => l(h))));
  40068. }, c = (f) => f.map((d) => {
  40069. switch (d.type) {
  40070. case "group":
  40071. return u(d);
  40072. default:
  40073. return l(d);
  40074. }
  40075. });
  40076. return se(
  40077. () => a.value,
  40078. (f) => {
  40079. f && o(f);
  40080. },
  40081. { immediate: !0 }
  40082. ), () => /* @__PURE__ */ React.createElement(
  40083. dr,
  40084. {
  40085. model: n,
  40086. colon: !1,
  40087. "label-col": { span: 8 },
  40088. ref: r,
  40089. layout: "horizontal",
  40090. size: "small"
  40091. },
  40092. c(a.value)
  40093. );
  40094. }
  40095. }), bq = /* @__PURE__ */ te({
  40096. __name: "Config",
  40097. props: eI,
  40098. emits: ["change"],
  40099. setup(t, { emit: e }) {
  40100. const n = t, r = e, i = L(() => [
  40101. {
  40102. label: "内容",
  40103. prop: "text",
  40104. type: "input",
  40105. defaultValue: n.text
  40106. },
  40107. {
  40108. label: "字体",
  40109. prop: "fontSize",
  40110. type: "inputNumber",
  40111. defaultValue: n.fontSize
  40112. },
  40113. {
  40114. label: "颜色",
  40115. prop: "color",
  40116. type: "colorSelect",
  40117. defaultValue: n.color
  40118. },
  40119. {
  40120. label: "对齐",
  40121. prop: "textAlign",
  40122. type: "radioGroup",
  40123. defaultValue: n.textAlign,
  40124. fieldProps: {
  40125. options: [
  40126. { label: "左对齐", value: "left" },
  40127. { label: "居中", value: "center" },
  40128. { label: "右对齐", value: "right" }
  40129. ]
  40130. }
  40131. }
  40132. ]), a = (o) => {
  40133. r("change", o);
  40134. };
  40135. return (o, s) => (pe(), je(B(Mx), _n({ columns: i.value }, o.$attrs, { onChange: a }), null, 16, ["columns"]));
  40136. }
  40137. });
  40138. Zg.Config = bq;
  40139. Zg.install = (t) => (t.component("FmDashboardTitle", Zg), t);
  40140. const GMe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40141. __proto__: null,
  40142. Config: bq,
  40143. default: Zg,
  40144. defaultPropsValue: jle,
  40145. titleProps: eI
  40146. }, Symbol.toStringTag, { value: "Module" }));
  40147. /*! *****************************************************************************
  40148. Copyright (c) Microsoft Corporation.
  40149. Permission to use, copy, modify, and/or distribute this software for any
  40150. purpose with or without fee is hereby granted.
  40151. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  40152. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  40153. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  40154. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  40155. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  40156. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  40157. PERFORMANCE OF THIS SOFTWARE.
  40158. ***************************************************************************** */
  40159. var iA = function(t, e) {
  40160. return iA = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
  40161. n.__proto__ = r;
  40162. } || function(n, r) {
  40163. for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
  40164. }, iA(t, e);
  40165. };
  40166. function q(t, e) {
  40167. if (typeof e != "function" && e !== null)
  40168. throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  40169. iA(t, e);
  40170. function n() {
  40171. this.constructor = t;
  40172. }
  40173. t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
  40174. }
  40175. var jMe = /* @__PURE__ */ function() {
  40176. function t() {
  40177. this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
  40178. }
  40179. return t;
  40180. }(), ZMe = /* @__PURE__ */ function() {
  40181. function t() {
  40182. this.browser = new jMe(), 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";
  40183. }
  40184. return t;
  40185. }(), fc = new ZMe();
  40186. 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) : UMe(navigator.userAgent, fc);
  40187. function UMe(t, e) {
  40188. 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);
  40189. 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";
  40190. var s = document.documentElement.style;
  40191. 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;
  40192. }
  40193. const vt = fc;
  40194. var hR = 12, _q = "sans-serif", iu = hR + "px " + _q, XMe = 20, YMe = 100, qMe = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
  40195. function KMe(t) {
  40196. var e = {};
  40197. if (typeof JSON > "u")
  40198. return e;
  40199. for (var n = 0; n < t.length; n++) {
  40200. var r = String.fromCharCode(n + 32), i = (t.charCodeAt(n) - XMe) / YMe;
  40201. e[r] = i;
  40202. }
  40203. return e;
  40204. }
  40205. var JMe = KMe(qMe), io = {
  40206. createCanvas: function() {
  40207. return typeof document < "u" && document.createElement("canvas");
  40208. },
  40209. measureText: /* @__PURE__ */ function() {
  40210. var t, e;
  40211. return function(n, r) {
  40212. if (!t) {
  40213. var i = io.createCanvas();
  40214. t = i && i.getContext("2d");
  40215. }
  40216. if (t)
  40217. return e !== r && (e = t.font = r || iu), t.measureText(n);
  40218. n = n || "", r = r || iu;
  40219. var a = /((?:\d+)?\.?\d*)px/.exec(r), o = a && +a[1] || hR, s = 0;
  40220. if (r.indexOf("mono") >= 0)
  40221. s = o * n.length;
  40222. else
  40223. for (var l = 0; l < n.length; l++) {
  40224. var u = JMe[n[l]];
  40225. s += u == null ? o : u * o;
  40226. }
  40227. return { width: s };
  40228. };
  40229. }(),
  40230. loadImage: function(t, e, n) {
  40231. var r = new Image();
  40232. return r.onload = e, r.onerror = n, r.src = t, r;
  40233. }
  40234. };
  40235. function Oq(t) {
  40236. for (var e in io)
  40237. t[e] && (io[e] = t[e]);
  40238. }
  40239. var Sq = Aa([
  40240. "Function",
  40241. "RegExp",
  40242. "Date",
  40243. "Error",
  40244. "CanvasGradient",
  40245. "CanvasPattern",
  40246. "Image",
  40247. "Canvas"
  40248. ], function(t, e) {
  40249. return t["[object " + e + "]"] = !0, t;
  40250. }, {}), xq = Aa([
  40251. "Int8",
  40252. "Uint8",
  40253. "Uint8Clamped",
  40254. "Int16",
  40255. "Uint16",
  40256. "Int32",
  40257. "Uint32",
  40258. "Float32",
  40259. "Float64"
  40260. ], function(t, e) {
  40261. return t["[object " + e + "Array]"] = !0, t;
  40262. }, {}), cp = Object.prototype.toString, Ix = Array.prototype, eIe = Ix.forEach, tIe = Ix.filter, pR = Ix.slice, nIe = Ix.map, M6 = (function() {
  40263. }).constructor, zy = M6 ? M6.prototype : null, vR = "__proto__", rIe = 2311;
  40264. function gR() {
  40265. return rIe++;
  40266. }
  40267. function Oa() {
  40268. for (var t = [], e = 0; e < arguments.length; e++)
  40269. t[e] = arguments[e];
  40270. typeof console < "u" && console.error.apply(console, t);
  40271. }
  40272. function Le(t) {
  40273. if (t == null || typeof t != "object")
  40274. return t;
  40275. var e = t, n = cp.call(t);
  40276. if (n === "[object Array]") {
  40277. if (!Kd(t)) {
  40278. e = [];
  40279. for (var r = 0, i = t.length; r < i; r++)
  40280. e[r] = Le(t[r]);
  40281. }
  40282. } else if (xq[n]) {
  40283. if (!Kd(t)) {
  40284. var a = t.constructor;
  40285. if (a.from)
  40286. e = a.from(t);
  40287. else {
  40288. e = new a(t.length);
  40289. for (var r = 0, i = t.length; r < i; r++)
  40290. e[r] = t[r];
  40291. }
  40292. }
  40293. } else if (!Sq[n] && !Kd(t) && !au(t)) {
  40294. e = {};
  40295. for (var o in t)
  40296. t.hasOwnProperty(o) && o !== vR && (e[o] = Le(t[o]));
  40297. }
  40298. return e;
  40299. }
  40300. function qe(t, e, n) {
  40301. if (!Ie(e) || !Ie(t))
  40302. return n ? Le(e) : t;
  40303. for (var r in e)
  40304. if (e.hasOwnProperty(r) && r !== vR) {
  40305. var i = t[r], a = e[r];
  40306. Ie(a) && Ie(i) && !ue(a) && !ue(i) && !au(a) && !au(i) && !aA(a) && !aA(i) && !Kd(a) && !Kd(i) ? qe(i, a, n) : (n || !(r in t)) && (t[r] = Le(e[r]));
  40307. }
  40308. return t;
  40309. }
  40310. function Dx(t, e) {
  40311. for (var n = t[0], r = 1, i = t.length; r < i; r++)
  40312. n = qe(n, t[r], e);
  40313. return n;
  40314. }
  40315. function le(t, e) {
  40316. if (Object.assign)
  40317. Object.assign(t, e);
  40318. else
  40319. for (var n in e)
  40320. e.hasOwnProperty(n) && n !== vR && (t[n] = e[n]);
  40321. return t;
  40322. }
  40323. function Re(t, e, n) {
  40324. for (var r = st(e), i = 0; i < r.length; i++) {
  40325. var a = r[i];
  40326. (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  40327. }
  40328. return t;
  40329. }
  40330. var iIe = io.createCanvas;
  40331. function et(t, e) {
  40332. if (t) {
  40333. if (t.indexOf)
  40334. return t.indexOf(e);
  40335. for (var n = 0, r = t.length; n < r; n++)
  40336. if (t[n] === e)
  40337. return n;
  40338. }
  40339. return -1;
  40340. }
  40341. function mR(t, e) {
  40342. var n = t.prototype;
  40343. function r() {
  40344. }
  40345. r.prototype = e.prototype, t.prototype = new r();
  40346. for (var i in n)
  40347. n.hasOwnProperty(i) && (t.prototype[i] = n[i]);
  40348. t.prototype.constructor = t, t.superClass = e;
  40349. }
  40350. function xn(t, e, n) {
  40351. if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
  40352. for (var r = Object.getOwnPropertyNames(e), i = 0; i < r.length; i++) {
  40353. var a = r[i];
  40354. a !== "constructor" && (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  40355. }
  40356. else
  40357. Re(t, e, n);
  40358. }
  40359. function wr(t) {
  40360. return !t || typeof t == "string" ? !1 : typeof t.length == "number";
  40361. }
  40362. function k(t, e, n) {
  40363. if (t && e)
  40364. if (t.forEach && t.forEach === eIe)
  40365. t.forEach(e, n);
  40366. else if (t.length === +t.length)
  40367. for (var r = 0, i = t.length; r < i; r++)
  40368. e.call(n, t[r], r, t);
  40369. else
  40370. for (var a in t)
  40371. t.hasOwnProperty(a) && e.call(n, t[a], a, t);
  40372. }
  40373. function ce(t, e, n) {
  40374. if (!t)
  40375. return [];
  40376. if (!e)
  40377. return Rx(t);
  40378. if (t.map && t.map === nIe)
  40379. return t.map(e, n);
  40380. for (var r = [], i = 0, a = t.length; i < a; i++)
  40381. r.push(e.call(n, t[i], i, t));
  40382. return r;
  40383. }
  40384. function Aa(t, e, n, r) {
  40385. if (t && e) {
  40386. for (var i = 0, a = t.length; i < a; i++)
  40387. n = e.call(r, n, t[i], i, t);
  40388. return n;
  40389. }
  40390. }
  40391. function Nt(t, e, n) {
  40392. if (!t)
  40393. return [];
  40394. if (!e)
  40395. return Rx(t);
  40396. if (t.filter && t.filter === tIe)
  40397. return t.filter(e, n);
  40398. for (var r = [], i = 0, a = t.length; i < a; i++)
  40399. e.call(n, t[i], i, t) && r.push(t[i]);
  40400. return r;
  40401. }
  40402. function wq(t, e, n) {
  40403. if (t && e) {
  40404. for (var r = 0, i = t.length; r < i; r++)
  40405. if (e.call(n, t[r], r, t))
  40406. return t[r];
  40407. }
  40408. }
  40409. function st(t) {
  40410. if (!t)
  40411. return [];
  40412. if (Object.keys)
  40413. return Object.keys(t);
  40414. var e = [];
  40415. for (var n in t)
  40416. t.hasOwnProperty(n) && e.push(n);
  40417. return e;
  40418. }
  40419. function aIe(t, e) {
  40420. for (var n = [], r = 2; r < arguments.length; r++)
  40421. n[r - 2] = arguments[r];
  40422. return function() {
  40423. return t.apply(e, n.concat(pR.call(arguments)));
  40424. };
  40425. }
  40426. var xe = zy && Me(zy.bind) ? zy.call.bind(zy.bind) : aIe;
  40427. function Ue(t) {
  40428. for (var e = [], n = 1; n < arguments.length; n++)
  40429. e[n - 1] = arguments[n];
  40430. return function() {
  40431. return t.apply(this, e.concat(pR.call(arguments)));
  40432. };
  40433. }
  40434. function ue(t) {
  40435. return Array.isArray ? Array.isArray(t) : cp.call(t) === "[object Array]";
  40436. }
  40437. function Me(t) {
  40438. return typeof t == "function";
  40439. }
  40440. function Oe(t) {
  40441. return typeof t == "string";
  40442. }
  40443. function pm(t) {
  40444. return cp.call(t) === "[object String]";
  40445. }
  40446. function St(t) {
  40447. return typeof t == "number";
  40448. }
  40449. function Ie(t) {
  40450. var e = typeof t;
  40451. return e === "function" || !!t && e === "object";
  40452. }
  40453. function aA(t) {
  40454. return !!Sq[cp.call(t)];
  40455. }
  40456. function Nr(t) {
  40457. return !!xq[cp.call(t)];
  40458. }
  40459. function au(t) {
  40460. return typeof t == "object" && typeof t.nodeType == "number" && typeof t.ownerDocument == "object";
  40461. }
  40462. function M0(t) {
  40463. return t.colorStops != null;
  40464. }
  40465. function Cq(t) {
  40466. return t.image != null;
  40467. }
  40468. function yR(t) {
  40469. return cp.call(t) === "[object RegExp]";
  40470. }
  40471. function ou(t) {
  40472. return t !== t;
  40473. }
  40474. function Tn() {
  40475. for (var t = [], e = 0; e < arguments.length; e++)
  40476. t[e] = arguments[e];
  40477. for (var n = 0, r = t.length; n < r; n++)
  40478. if (t[n] != null)
  40479. return t[n];
  40480. }
  40481. function We(t, e) {
  40482. return t ?? e;
  40483. }
  40484. function ji(t, e, n) {
  40485. return t ?? e ?? n;
  40486. }
  40487. function Rx(t) {
  40488. for (var e = [], n = 1; n < arguments.length; n++)
  40489. e[n - 1] = arguments[n];
  40490. return pR.apply(t, e);
  40491. }
  40492. function kx(t) {
  40493. if (typeof t == "number")
  40494. return [t, t, t, t];
  40495. var e = t.length;
  40496. return e === 2 ? [t[0], t[1], t[0], t[1]] : e === 3 ? [t[0], t[1], t[2], t[1]] : t;
  40497. }
  40498. function ke(t, e) {
  40499. if (!t)
  40500. throw new Error(e);
  40501. }
  40502. function ma(t) {
  40503. return t == null ? null : typeof t.trim == "function" ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  40504. }
  40505. var Tq = "__ec_primitive__";
  40506. function vm(t) {
  40507. t[Tq] = !0;
  40508. }
  40509. function Kd(t) {
  40510. return t[Tq];
  40511. }
  40512. var oIe = function() {
  40513. function t() {
  40514. this.data = {};
  40515. }
  40516. return t.prototype.delete = function(e) {
  40517. var n = this.has(e);
  40518. return n && delete this.data[e], n;
  40519. }, t.prototype.has = function(e) {
  40520. return this.data.hasOwnProperty(e);
  40521. }, t.prototype.get = function(e) {
  40522. return this.data[e];
  40523. }, t.prototype.set = function(e, n) {
  40524. return this.data[e] = n, this;
  40525. }, t.prototype.keys = function() {
  40526. return st(this.data);
  40527. }, t.prototype.forEach = function(e) {
  40528. var n = this.data;
  40529. for (var r in n)
  40530. n.hasOwnProperty(r) && e(n[r], r);
  40531. }, t;
  40532. }(), Pq = typeof Map == "function";
  40533. function sIe() {
  40534. return Pq ? /* @__PURE__ */ new Map() : new oIe();
  40535. }
  40536. var $q = function() {
  40537. function t(e) {
  40538. var n = ue(e);
  40539. this.data = sIe();
  40540. var r = this;
  40541. e instanceof t ? e.each(i) : e && k(e, i);
  40542. function i(a, o) {
  40543. n ? r.set(a, o) : r.set(o, a);
  40544. }
  40545. }
  40546. return t.prototype.hasKey = function(e) {
  40547. return this.data.has(e);
  40548. }, t.prototype.get = function(e) {
  40549. return this.data.get(e);
  40550. }, t.prototype.set = function(e, n) {
  40551. return this.data.set(e, n), n;
  40552. }, t.prototype.each = function(e, n) {
  40553. this.data.forEach(function(r, i) {
  40554. e.call(n, r, i);
  40555. });
  40556. }, t.prototype.keys = function() {
  40557. var e = this.data.keys();
  40558. return Pq ? Array.from(e) : e;
  40559. }, t.prototype.removeKey = function(e) {
  40560. this.data.delete(e);
  40561. }, t;
  40562. }();
  40563. function Pe(t) {
  40564. return new $q(t);
  40565. }
  40566. function gm(t, e) {
  40567. for (var n = new t.constructor(t.length + e.length), r = 0; r < t.length; r++)
  40568. n[r] = t[r];
  40569. for (var i = t.length, r = 0; r < e.length; r++)
  40570. n[r + i] = e[r];
  40571. return n;
  40572. }
  40573. function I0(t, e) {
  40574. var n;
  40575. if (Object.create)
  40576. n = Object.create(t);
  40577. else {
  40578. var r = function() {
  40579. };
  40580. r.prototype = t, n = new r();
  40581. }
  40582. return e && le(n, e), n;
  40583. }
  40584. function bR(t) {
  40585. var e = t.style;
  40586. e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
  40587. }
  40588. function Ce(t, e) {
  40589. return t.hasOwnProperty(e);
  40590. }
  40591. function On() {
  40592. }
  40593. var Og = 180 / Math.PI;
  40594. const lIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40595. __proto__: null,
  40596. HashMap: $q,
  40597. RADIAN_TO_DEGREE: Og,
  40598. assert: ke,
  40599. bind: xe,
  40600. clone: Le,
  40601. concatArray: gm,
  40602. createCanvas: iIe,
  40603. createHashMap: Pe,
  40604. createObject: I0,
  40605. curry: Ue,
  40606. defaults: Re,
  40607. disableUserSelect: bR,
  40608. each: k,
  40609. eqNaN: ou,
  40610. extend: le,
  40611. filter: Nt,
  40612. find: wq,
  40613. guid: gR,
  40614. hasOwn: Ce,
  40615. indexOf: et,
  40616. inherits: mR,
  40617. isArray: ue,
  40618. isArrayLike: wr,
  40619. isBuiltInObject: aA,
  40620. isDom: au,
  40621. isFunction: Me,
  40622. isGradientObject: M0,
  40623. isImagePatternObject: Cq,
  40624. isNumber: St,
  40625. isObject: Ie,
  40626. isPrimitive: Kd,
  40627. isRegExp: yR,
  40628. isString: Oe,
  40629. isStringSafe: pm,
  40630. isTypedArray: Nr,
  40631. keys: st,
  40632. logError: Oa,
  40633. map: ce,
  40634. merge: qe,
  40635. mergeAll: Dx,
  40636. mixin: xn,
  40637. noop: On,
  40638. normalizeCssArray: kx,
  40639. reduce: Aa,
  40640. retrieve: Tn,
  40641. retrieve2: We,
  40642. retrieve3: ji,
  40643. setAsPrimitive: vm,
  40644. slice: Rx,
  40645. trim: ma
  40646. }, Symbol.toStringTag, { value: "Module" }));
  40647. function wu(t, e) {
  40648. return t == null && (t = 0), e == null && (e = 0), [t, e];
  40649. }
  40650. function Mr(t, e) {
  40651. return t[0] = e[0], t[1] = e[1], t;
  40652. }
  40653. function Zo(t) {
  40654. return [t[0], t[1]];
  40655. }
  40656. function Aq(t, e, n) {
  40657. return t[0] = e, t[1] = n, t;
  40658. }
  40659. function oA(t, e, n) {
  40660. return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t;
  40661. }
  40662. function U1(t, e, n, r) {
  40663. return t[0] = e[0] + n[0] * r, t[1] = e[1] + n[1] * r, t;
  40664. }
  40665. function kl(t, e, n) {
  40666. return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t;
  40667. }
  40668. function mm(t) {
  40669. return Math.sqrt(_R(t));
  40670. }
  40671. var uIe = mm;
  40672. function _R(t) {
  40673. return t[0] * t[0] + t[1] * t[1];
  40674. }
  40675. var cIe = _R;
  40676. function fIe(t, e, n) {
  40677. return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t;
  40678. }
  40679. function dIe(t, e, n) {
  40680. return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t;
  40681. }
  40682. function hIe(t, e) {
  40683. return t[0] * e[0] + t[1] * e[1];
  40684. }
  40685. function Sg(t, e, n) {
  40686. return t[0] = e[0] * n, t[1] = e[1] * n, t;
  40687. }
  40688. function Rf(t, e) {
  40689. var n = mm(e);
  40690. return n === 0 ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t;
  40691. }
  40692. function X1(t, e) {
  40693. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
  40694. }
  40695. var Ts = X1;
  40696. function Eq(t, e) {
  40697. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
  40698. }
  40699. var Ul = Eq;
  40700. function pIe(t, e) {
  40701. return t[0] = -e[0], t[1] = -e[1], t;
  40702. }
  40703. function xg(t, e, n, r) {
  40704. return t[0] = e[0] + r * (n[0] - e[0]), t[1] = e[1] + r * (n[1] - e[1]), t;
  40705. }
  40706. function ar(t, e, n) {
  40707. var r = e[0], i = e[1];
  40708. return t[0] = n[0] * r + n[2] * i + n[4], t[1] = n[1] * r + n[3] * i + n[5], t;
  40709. }
  40710. function Ps(t, e, n) {
  40711. return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t;
  40712. }
  40713. function $s(t, e, n) {
  40714. return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t;
  40715. }
  40716. const vIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40717. __proto__: null,
  40718. add: oA,
  40719. applyTransform: ar,
  40720. clone: Zo,
  40721. copy: Mr,
  40722. create: wu,
  40723. dist: Ts,
  40724. distSquare: Ul,
  40725. distance: X1,
  40726. distanceSquare: Eq,
  40727. div: dIe,
  40728. dot: hIe,
  40729. len: mm,
  40730. lenSquare: _R,
  40731. length: uIe,
  40732. lengthSquare: cIe,
  40733. lerp: xg,
  40734. max: $s,
  40735. min: Ps,
  40736. mul: fIe,
  40737. negate: pIe,
  40738. normalize: Rf,
  40739. scale: Sg,
  40740. scaleAndAdd: U1,
  40741. set: Aq,
  40742. sub: kl
  40743. }, Symbol.toStringTag, { value: "Module" }));
  40744. var ed = /* @__PURE__ */ function() {
  40745. function t(e, n) {
  40746. this.target = e, this.topTarget = n && n.topTarget;
  40747. }
  40748. return t;
  40749. }(), gIe = function() {
  40750. function t(e) {
  40751. this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
  40752. }
  40753. return t.prototype._dragStart = function(e) {
  40754. for (var n = e.target; n && !n.draggable; )
  40755. n = n.parent || n.__hostTarget;
  40756. n && (this._draggingTarget = n, n.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new ed(n, e), "dragstart", e.event));
  40757. }, t.prototype._drag = function(e) {
  40758. var n = this._draggingTarget;
  40759. if (n) {
  40760. var r = e.offsetX, i = e.offsetY, a = r - this._x, o = i - this._y;
  40761. this._x = r, this._y = i, n.drift(a, o, e), this.handler.dispatchToElement(new ed(n, e), "drag", e.event);
  40762. var s = this.handler.findHover(r, i, n).target, l = this._dropTarget;
  40763. this._dropTarget = s, n !== s && (l && s !== l && this.handler.dispatchToElement(new ed(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new ed(s, e), "dragenter", e.event));
  40764. }
  40765. }, t.prototype._dragEnd = function(e) {
  40766. var n = this._draggingTarget;
  40767. n && (n.dragging = !1), this.handler.dispatchToElement(new ed(n, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new ed(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
  40768. }, t;
  40769. }(), Ra = function() {
  40770. function t(e) {
  40771. e && (this._$eventProcessor = e);
  40772. }
  40773. return t.prototype.on = function(e, n, r, i) {
  40774. this._$handlers || (this._$handlers = {});
  40775. var a = this._$handlers;
  40776. if (typeof n == "function" && (i = r, r = n, n = null), !r || !e)
  40777. return this;
  40778. var o = this._$eventProcessor;
  40779. n != null && o && o.normalizeQuery && (n = o.normalizeQuery(n)), a[e] || (a[e] = []);
  40780. for (var s = 0; s < a[e].length; s++)
  40781. if (a[e][s].h === r)
  40782. return this;
  40783. var l = {
  40784. h: r,
  40785. query: n,
  40786. ctx: i || this,
  40787. callAtLast: r.zrEventfulCallAtLast
  40788. }, u = a[e].length - 1, c = a[e][u];
  40789. return c && c.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
  40790. }, t.prototype.isSilent = function(e) {
  40791. var n = this._$handlers;
  40792. return !n || !n[e] || !n[e].length;
  40793. }, t.prototype.off = function(e, n) {
  40794. var r = this._$handlers;
  40795. if (!r)
  40796. return this;
  40797. if (!e)
  40798. return this._$handlers = {}, this;
  40799. if (n) {
  40800. if (r[e]) {
  40801. for (var i = [], a = 0, o = r[e].length; a < o; a++)
  40802. r[e][a].h !== n && i.push(r[e][a]);
  40803. r[e] = i;
  40804. }
  40805. r[e] && r[e].length === 0 && delete r[e];
  40806. } else
  40807. delete r[e];
  40808. return this;
  40809. }, t.prototype.trigger = function(e) {
  40810. for (var n = [], r = 1; r < arguments.length; r++)
  40811. n[r - 1] = arguments[r];
  40812. if (!this._$handlers)
  40813. return this;
  40814. var i = this._$handlers[e], a = this._$eventProcessor;
  40815. if (i)
  40816. for (var o = n.length, s = i.length, l = 0; l < s; l++) {
  40817. var u = i[l];
  40818. if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
  40819. switch (o) {
  40820. case 0:
  40821. u.h.call(u.ctx);
  40822. break;
  40823. case 1:
  40824. u.h.call(u.ctx, n[0]);
  40825. break;
  40826. case 2:
  40827. u.h.call(u.ctx, n[0], n[1]);
  40828. break;
  40829. default:
  40830. u.h.apply(u.ctx, n);
  40831. break;
  40832. }
  40833. }
  40834. return a && a.afterTrigger && a.afterTrigger(e), this;
  40835. }, t.prototype.triggerWithContext = function(e) {
  40836. for (var n = [], r = 1; r < arguments.length; r++)
  40837. n[r - 1] = arguments[r];
  40838. if (!this._$handlers)
  40839. return this;
  40840. var i = this._$handlers[e], a = this._$eventProcessor;
  40841. if (i)
  40842. for (var o = n.length, s = n[o - 1], l = i.length, u = 0; u < l; u++) {
  40843. var c = i[u];
  40844. if (!(a && a.filter && c.query != null && !a.filter(e, c.query)))
  40845. switch (o) {
  40846. case 0:
  40847. c.h.call(s);
  40848. break;
  40849. case 1:
  40850. c.h.call(s, n[0]);
  40851. break;
  40852. case 2:
  40853. c.h.call(s, n[0], n[1]);
  40854. break;
  40855. default:
  40856. c.h.apply(s, n.slice(1, o - 1));
  40857. break;
  40858. }
  40859. }
  40860. return a && a.afterTrigger && a.afterTrigger(e), this;
  40861. }, t;
  40862. }(), mIe = Math.log(2);
  40863. function sA(t, e, n, r, i, a) {
  40864. var o = r + "-" + i, s = t.length;
  40865. if (a.hasOwnProperty(o))
  40866. return a[o];
  40867. if (e === 1) {
  40868. var l = Math.round(Math.log((1 << s) - 1 & ~i) / mIe);
  40869. return t[n][l];
  40870. }
  40871. for (var u = r | 1 << n, c = n + 1; r & 1 << c; )
  40872. c++;
  40873. for (var f = 0, d = 0, h = 0; d < s; d++) {
  40874. var p = 1 << d;
  40875. p & i || (f += (h % 2 ? -1 : 1) * t[n][d] * sA(t, e - 1, c, u, i | p, a), h++);
  40876. }
  40877. return a[o] = f, f;
  40878. }
  40879. function I6(t, e) {
  40880. var n = [
  40881. [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
  40882. [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
  40883. [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
  40884. [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
  40885. [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
  40886. [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
  40887. [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
  40888. [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  40889. ], r = {}, i = sA(n, 8, 0, 0, 0, r);
  40890. if (i !== 0) {
  40891. for (var a = [], o = 0; o < 8; o++)
  40892. for (var s = 0; s < 8; s++)
  40893. a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * sA(n, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, r) / i * e[o];
  40894. return function(l, u, c) {
  40895. var f = u * a[6] + c * a[7] + 1;
  40896. l[0] = (u * a[0] + c * a[1] + a[2]) / f, l[1] = (u * a[3] + c * a[4] + a[5]) / f;
  40897. };
  40898. }
  40899. }
  40900. var D6 = "___zrEVENTSAVED", FC = [];
  40901. function yIe(t, e, n, r, i) {
  40902. return lA(FC, e, r, i, !0) && lA(t, n, FC[0], FC[1]);
  40903. }
  40904. function lA(t, e, n, r, i) {
  40905. if (e.getBoundingClientRect && vt.domSupported && !Mq(e)) {
  40906. var a = e[D6] || (e[D6] = {}), o = bIe(e, a), s = _Ie(o, a, i);
  40907. if (s)
  40908. return s(t, n, r), !0;
  40909. }
  40910. return !1;
  40911. }
  40912. function bIe(t, e) {
  40913. var n = e.markers;
  40914. if (n)
  40915. return n;
  40916. n = e.markers = [];
  40917. for (var r = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
  40918. var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
  40919. s.cssText = [
  40920. "position: absolute",
  40921. "visibility: hidden",
  40922. "padding: 0",
  40923. "margin: 0",
  40924. "border-width: 0",
  40925. "user-select: none",
  40926. "width:0",
  40927. "height:0",
  40928. r[l] + ":0",
  40929. i[u] + ":0",
  40930. r[1 - l] + ":auto",
  40931. i[1 - u] + ":auto",
  40932. ""
  40933. ].join("!important;"), t.appendChild(o), n.push(o);
  40934. }
  40935. return n;
  40936. }
  40937. function _Ie(t, e, n) {
  40938. for (var r = n ? "invTrans" : "trans", i = e[r], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
  40939. var c = t[u].getBoundingClientRect(), f = 2 * u, d = c.left, h = c.top;
  40940. o.push(d, h), l = l && a && d === a[f] && h === a[f + 1], s.push(t[u].offsetLeft, t[u].offsetTop);
  40941. }
  40942. return l && i ? i : (e.srcCoords = o, e[r] = n ? I6(s, o) : I6(o, s));
  40943. }
  40944. function Mq(t) {
  40945. return t.nodeName.toUpperCase() === "CANVAS";
  40946. }
  40947. var OIe = /([&<>"'])/g, SIe = {
  40948. "&": "&amp;",
  40949. "<": "&lt;",
  40950. ">": "&gt;",
  40951. '"': "&quot;",
  40952. "'": "&#39;"
  40953. };
  40954. function Gr(t) {
  40955. return t == null ? "" : (t + "").replace(OIe, function(e, n) {
  40956. return SIe[n];
  40957. });
  40958. }
  40959. var xIe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, WC = [], wIe = vt.browser.firefox && +vt.browser.version.split(".")[0] < 39;
  40960. function uA(t, e, n, r) {
  40961. return n = n || {}, r ? R6(t, e, n) : wIe && 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) : R6(t, e, n), n;
  40962. }
  40963. function R6(t, e, n) {
  40964. if (vt.domSupported && t.getBoundingClientRect) {
  40965. var r = e.clientX, i = e.clientY;
  40966. if (Mq(t)) {
  40967. var a = t.getBoundingClientRect();
  40968. n.zrX = r - a.left, n.zrY = i - a.top;
  40969. return;
  40970. } else if (lA(WC, t, r, i)) {
  40971. n.zrX = WC[0], n.zrY = WC[1];
  40972. return;
  40973. }
  40974. }
  40975. n.zrX = n.zrY = 0;
  40976. }
  40977. function OR(t) {
  40978. return t || window.event;
  40979. }
  40980. function sa(t, e, n) {
  40981. if (e = OR(e), e.zrX != null)
  40982. return e;
  40983. var r = e.type, i = r && r.indexOf("touch") >= 0;
  40984. if (i) {
  40985. var o = r !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
  40986. o && uA(t, o, e, n);
  40987. } else {
  40988. uA(t, e, e, n);
  40989. var a = CIe(e);
  40990. e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
  40991. }
  40992. var s = e.button;
  40993. return e.which == null && s !== void 0 && xIe.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
  40994. }
  40995. function CIe(t) {
  40996. var e = t.wheelDelta;
  40997. if (e)
  40998. return e;
  40999. var n = t.deltaX, r = t.deltaY;
  41000. if (n == null || r == null)
  41001. return e;
  41002. var i = Math.abs(r !== 0 ? r : n), a = r > 0 ? -1 : r < 0 ? 1 : n > 0 ? -1 : 1;
  41003. return 3 * i * a;
  41004. }
  41005. function cA(t, e, n, r) {
  41006. t.addEventListener(e, n, r);
  41007. }
  41008. function TIe(t, e, n, r) {
  41009. t.removeEventListener(e, n, r);
  41010. }
  41011. var Gs = function(t) {
  41012. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
  41013. };
  41014. function k6(t) {
  41015. return t.which === 2 || t.which === 3;
  41016. }
  41017. var PIe = function() {
  41018. function t() {
  41019. this._track = [];
  41020. }
  41021. return t.prototype.recognize = function(e, n, r) {
  41022. return this._doTrack(e, n, r), this._recognize(e);
  41023. }, t.prototype.clear = function() {
  41024. return this._track.length = 0, this;
  41025. }, t.prototype._doTrack = function(e, n, r) {
  41026. var i = e.touches;
  41027. if (i) {
  41028. for (var a = {
  41029. points: [],
  41030. touches: [],
  41031. target: n,
  41032. event: e
  41033. }, o = 0, s = i.length; o < s; o++) {
  41034. var l = i[o], u = uA(r, l, {});
  41035. a.points.push([u.zrX, u.zrY]), a.touches.push(l);
  41036. }
  41037. this._track.push(a);
  41038. }
  41039. }, t.prototype._recognize = function(e) {
  41040. for (var n in QC)
  41041. if (QC.hasOwnProperty(n)) {
  41042. var r = QC[n](this._track, e);
  41043. if (r)
  41044. return r;
  41045. }
  41046. }, t;
  41047. }();
  41048. function L6(t) {
  41049. var e = t[1][0] - t[0][0], n = t[1][1] - t[0][1];
  41050. return Math.sqrt(e * e + n * n);
  41051. }
  41052. function $Ie(t) {
  41053. return [
  41054. (t[0][0] + t[1][0]) / 2,
  41055. (t[0][1] + t[1][1]) / 2
  41056. ];
  41057. }
  41058. var QC = {
  41059. pinch: function(t, e) {
  41060. var n = t.length;
  41061. if (n) {
  41062. var r = (t[n - 1] || {}).points, i = (t[n - 2] || {}).points || r;
  41063. if (i && i.length > 1 && r && r.length > 1) {
  41064. var a = L6(r) / L6(i);
  41065. !isFinite(a) && (a = 1), e.pinchScale = a;
  41066. var o = $Ie(r);
  41067. return e.pinchX = o[0], e.pinchY = o[1], {
  41068. type: "pinch",
  41069. target: t[0].target,
  41070. event: e
  41071. };
  41072. }
  41073. }
  41074. }
  41075. };
  41076. function Si() {
  41077. return [1, 0, 0, 1, 0, 0];
  41078. }
  41079. function D0(t) {
  41080. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
  41081. }
  41082. function Lx(t, e) {
  41083. 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;
  41084. }
  41085. function Uo(t, e, n) {
  41086. 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];
  41087. return t[0] = r, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
  41088. }
  41089. function ao(t, e, n) {
  41090. 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;
  41091. }
  41092. function Cu(t, e, n, r) {
  41093. r === void 0 && (r = [0, 0]);
  41094. 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);
  41095. 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;
  41096. }
  41097. function Nx(t, e, n) {
  41098. var r = n[0], i = n[1];
  41099. 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;
  41100. }
  41101. function kf(t, e) {
  41102. var n = e[0], r = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = n * o - a * r;
  41103. 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;
  41104. }
  41105. function Iq(t) {
  41106. var e = Si();
  41107. return Lx(e, t), e;
  41108. }
  41109. const AIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41110. __proto__: null,
  41111. clone: Iq,
  41112. copy: Lx,
  41113. create: Si,
  41114. identity: D0,
  41115. invert: kf,
  41116. mul: Uo,
  41117. rotate: Cu,
  41118. scale: Nx,
  41119. translate: ao
  41120. }, Symbol.toStringTag, { value: "Module" }));
  41121. var Ke = function() {
  41122. function t(e, n) {
  41123. this.x = e || 0, this.y = n || 0;
  41124. }
  41125. return t.prototype.copy = function(e) {
  41126. return this.x = e.x, this.y = e.y, this;
  41127. }, t.prototype.clone = function() {
  41128. return new t(this.x, this.y);
  41129. }, t.prototype.set = function(e, n) {
  41130. return this.x = e, this.y = n, this;
  41131. }, t.prototype.equal = function(e) {
  41132. return e.x === this.x && e.y === this.y;
  41133. }, t.prototype.add = function(e) {
  41134. return this.x += e.x, this.y += e.y, this;
  41135. }, t.prototype.scale = function(e) {
  41136. this.x *= e, this.y *= e;
  41137. }, t.prototype.scaleAndAdd = function(e, n) {
  41138. this.x += e.x * n, this.y += e.y * n;
  41139. }, t.prototype.sub = function(e) {
  41140. return this.x -= e.x, this.y -= e.y, this;
  41141. }, t.prototype.dot = function(e) {
  41142. return this.x * e.x + this.y * e.y;
  41143. }, t.prototype.len = function() {
  41144. return Math.sqrt(this.x * this.x + this.y * this.y);
  41145. }, t.prototype.lenSquare = function() {
  41146. return this.x * this.x + this.y * this.y;
  41147. }, t.prototype.normalize = function() {
  41148. var e = this.len();
  41149. return this.x /= e, this.y /= e, this;
  41150. }, t.prototype.distance = function(e) {
  41151. var n = this.x - e.x, r = this.y - e.y;
  41152. return Math.sqrt(n * n + r * r);
  41153. }, t.prototype.distanceSquare = function(e) {
  41154. var n = this.x - e.x, r = this.y - e.y;
  41155. return n * n + r * r;
  41156. }, t.prototype.negate = function() {
  41157. return this.x = -this.x, this.y = -this.y, this;
  41158. }, t.prototype.transform = function(e) {
  41159. if (e) {
  41160. var n = this.x, r = this.y;
  41161. return this.x = e[0] * n + e[2] * r + e[4], this.y = e[1] * n + e[3] * r + e[5], this;
  41162. }
  41163. }, t.prototype.toArray = function(e) {
  41164. return e[0] = this.x, e[1] = this.y, e;
  41165. }, t.prototype.fromArray = function(e) {
  41166. this.x = e[0], this.y = e[1];
  41167. }, t.set = function(e, n, r) {
  41168. e.x = n, e.y = r;
  41169. }, t.copy = function(e, n) {
  41170. e.x = n.x, e.y = n.y;
  41171. }, t.len = function(e) {
  41172. return Math.sqrt(e.x * e.x + e.y * e.y);
  41173. }, t.lenSquare = function(e) {
  41174. return e.x * e.x + e.y * e.y;
  41175. }, t.dot = function(e, n) {
  41176. return e.x * n.x + e.y * n.y;
  41177. }, t.add = function(e, n, r) {
  41178. e.x = n.x + r.x, e.y = n.y + r.y;
  41179. }, t.sub = function(e, n, r) {
  41180. e.x = n.x - r.x, e.y = n.y - r.y;
  41181. }, t.scale = function(e, n, r) {
  41182. e.x = n.x * r, e.y = n.y * r;
  41183. }, t.scaleAndAdd = function(e, n, r, i) {
  41184. e.x = n.x + r.x * i, e.y = n.y + r.y * i;
  41185. }, t.lerp = function(e, n, r, i) {
  41186. var a = 1 - i;
  41187. e.x = a * n.x + i * r.x, e.y = a * n.y + i * r.y;
  41188. }, t;
  41189. }(), Vy = Math.min, Fy = Math.max, zu = new Ke(), Vu = new Ke(), Fu = new Ke(), Wu = new Ke(), qp = new Ke(), Kp = new Ke(), EIe = function() {
  41190. function t(e, n, r, i) {
  41191. 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;
  41192. }
  41193. return t.prototype.union = function(e) {
  41194. var n = Vy(e.x, this.x), r = Vy(e.y, this.y);
  41195. isFinite(this.x) && isFinite(this.width) ? this.width = Fy(e.x + e.width, this.x + this.width) - n : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = Fy(e.y + e.height, this.y + this.height) - r : this.height = e.height, this.x = n, this.y = r;
  41196. }, t.prototype.applyTransform = function(e) {
  41197. t.applyTransform(this, this, e);
  41198. }, t.prototype.calculateTransform = function(e) {
  41199. var n = this, r = e.width / n.width, i = e.height / n.height, a = Si();
  41200. return ao(a, a, [-n.x, -n.y]), Nx(a, a, [r, i]), ao(a, a, [e.x, e.y]), a;
  41201. }, t.prototype.intersect = function(e, n) {
  41202. if (!e)
  41203. return !1;
  41204. e instanceof t || (e = t.create(e));
  41205. 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);
  41206. if (n) {
  41207. 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);
  41208. a < l || u < i ? b > p && (p = b, v < g ? Ke.set(Kp, -v, 0) : Ke.set(Kp, g, 0)) : b < h && (h = b, v < g ? Ke.set(qp, v, 0) : Ke.set(qp, -g, 0)), s < c || f < o ? _ > p && (p = _, m < y ? Ke.set(Kp, 0, -m) : Ke.set(Kp, 0, y)) : b < h && (h = b, m < y ? Ke.set(qp, 0, m) : Ke.set(qp, 0, -y));
  41209. }
  41210. return n && Ke.copy(n, d ? qp : Kp), d;
  41211. }, t.prototype.contain = function(e, n) {
  41212. var r = this;
  41213. return e >= r.x && e <= r.x + r.width && n >= r.y && n <= r.y + r.height;
  41214. }, t.prototype.clone = function() {
  41215. return new t(this.x, this.y, this.width, this.height);
  41216. }, t.prototype.copy = function(e) {
  41217. t.copy(this, e);
  41218. }, t.prototype.plain = function() {
  41219. return {
  41220. x: this.x,
  41221. y: this.y,
  41222. width: this.width,
  41223. height: this.height
  41224. };
  41225. }, t.prototype.isFinite = function() {
  41226. return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
  41227. }, t.prototype.isZero = function() {
  41228. return this.width === 0 || this.height === 0;
  41229. }, t.create = function(e) {
  41230. return new t(e.x, e.y, e.width, e.height);
  41231. }, t.copy = function(e, n) {
  41232. e.x = n.x, e.y = n.y, e.width = n.width, e.height = n.height;
  41233. }, t.applyTransform = function(e, n, r) {
  41234. if (!r) {
  41235. e !== n && t.copy(e, n);
  41236. return;
  41237. }
  41238. if (r[1] < 1e-5 && r[1] > -1e-5 && r[2] < 1e-5 && r[2] > -1e-5) {
  41239. var i = r[0], a = r[3], o = r[4], s = r[5];
  41240. 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);
  41241. return;
  41242. }
  41243. 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 = Vy(zu.x, Vu.x, Fu.x, Wu.x), e.y = Vy(zu.y, Vu.y, Fu.y, Wu.y);
  41244. var l = Fy(zu.x, Vu.x, Fu.x, Wu.x), u = Fy(zu.y, Vu.y, Fu.y, Wu.y);
  41245. e.width = l - e.x, e.height = u - e.y;
  41246. }, t;
  41247. }();
  41248. const Je = EIe;
  41249. var Dq = "silent";
  41250. function MIe(t, e, n) {
  41251. return {
  41252. type: t,
  41253. event: n,
  41254. target: e.target,
  41255. topTarget: e.topTarget,
  41256. cancelBubble: !1,
  41257. offsetX: n.zrX,
  41258. offsetY: n.zrY,
  41259. gestureEvent: n.gestureEvent,
  41260. pinchX: n.pinchX,
  41261. pinchY: n.pinchY,
  41262. pinchScale: n.pinchScale,
  41263. wheelDelta: n.zrDelta,
  41264. zrByTouch: n.zrByTouch,
  41265. which: n.which,
  41266. stop: IIe
  41267. };
  41268. }
  41269. function IIe() {
  41270. Gs(this.event);
  41271. }
  41272. var DIe = function(t) {
  41273. q(e, t);
  41274. function e() {
  41275. var n = t !== null && t.apply(this, arguments) || this;
  41276. return n.handler = null, n;
  41277. }
  41278. return e.prototype.dispose = function() {
  41279. }, e.prototype.setCursor = function() {
  41280. }, e;
  41281. }(Ra), Jp = /* @__PURE__ */ function() {
  41282. function t(e, n) {
  41283. this.x = e, this.y = n;
  41284. }
  41285. return t;
  41286. }(), RIe = [
  41287. "click",
  41288. "dblclick",
  41289. "mousewheel",
  41290. "mouseout",
  41291. "mouseup",
  41292. "mousedown",
  41293. "mousemove",
  41294. "contextmenu"
  41295. ], HC = new Je(0, 0, 0, 0), Rq = function(t) {
  41296. q(e, t);
  41297. function e(n, r, i, a, o) {
  41298. var s = t.call(this) || this;
  41299. return s._hovered = new Jp(0, 0), s.storage = n, s.painter = r, s.painterRoot = a, s._pointerSize = o, i = i || new DIe(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new gIe(s), s;
  41300. }
  41301. return e.prototype.setHandlerProxy = function(n) {
  41302. this.proxy && this.proxy.dispose(), n && (k(RIe, function(r) {
  41303. n.on && n.on(r, this[r], this);
  41304. }, this), n.handler = this), this.proxy = n;
  41305. }, e.prototype.mousemove = function(n) {
  41306. var r = n.zrX, i = n.zrY, a = kq(this, r, i), o = this._hovered, s = o.target;
  41307. s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
  41308. var l = this._hovered = a ? new Jp(r, i) : this.findHover(r, i), u = l.target, c = this.proxy;
  41309. 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);
  41310. }, e.prototype.mouseout = function(n) {
  41311. var r = n.zrEventControl;
  41312. r !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", n), r !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: n });
  41313. }, e.prototype.resize = function() {
  41314. this._hovered = new Jp(0, 0);
  41315. }, e.prototype.dispatch = function(n, r) {
  41316. var i = this[n];
  41317. i && i.call(this, r);
  41318. }, e.prototype.dispose = function() {
  41319. this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
  41320. }, e.prototype.setCursorStyle = function(n) {
  41321. var r = this.proxy;
  41322. r.setCursor && r.setCursor(n);
  41323. }, e.prototype.dispatchToElement = function(n, r, i) {
  41324. n = n || {};
  41325. var a = n.target;
  41326. if (!(a && a.silent)) {
  41327. for (var o = "on" + r, s = MIe(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); )
  41328. ;
  41329. s.cancelBubble || (this.trigger(r, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
  41330. typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(r, s);
  41331. }));
  41332. }
  41333. }, e.prototype.findHover = function(n, r, i) {
  41334. var a = this.storage.getDisplayList(), o = new Jp(n, r);
  41335. if (N6(a, o, n, r, i), this._pointerSize && !o.target) {
  41336. 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--) {
  41337. var d = a[f];
  41338. d !== i && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (HC.copy(d.getBoundingRect()), d.transform && HC.applyTransform(d.transform), HC.intersect(c) && s.push(d));
  41339. }
  41340. if (s.length)
  41341. for (var h = 4, p = Math.PI / 12, v = Math.PI * 2, g = 0; g < u; g += h)
  41342. for (var m = 0; m < v; m += p) {
  41343. var y = n + g * Math.cos(m), b = r + g * Math.sin(m);
  41344. if (N6(s, o, y, b, i), o.target)
  41345. return o;
  41346. }
  41347. }
  41348. return o;
  41349. }, e.prototype.processGesture = function(n, r) {
  41350. this._gestureMgr || (this._gestureMgr = new PIe());
  41351. var i = this._gestureMgr;
  41352. r === "start" && i.clear();
  41353. var a = i.recognize(n, this.findHover(n.zrX, n.zrY, null).target, this.proxy.dom);
  41354. if (r === "end" && i.clear(), a) {
  41355. var o = a.type;
  41356. n.gestureEvent = o;
  41357. var s = new Jp();
  41358. s.target = a.target, this.dispatchToElement(s, o, a.event);
  41359. }
  41360. }, e;
  41361. }(Ra);
  41362. k(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  41363. Rq.prototype[t] = function(e) {
  41364. var n = e.zrX, r = e.zrY, i = kq(this, n, r), a, o;
  41365. if ((t !== "mouseup" || !i) && (a = this.findHover(n, r), o = a.target), t === "mousedown")
  41366. this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
  41367. else if (t === "mouseup")
  41368. this._upEl = o;
  41369. else if (t === "click") {
  41370. if (this._downEl !== this._upEl || !this._downPoint || Ts(this._downPoint, [e.zrX, e.zrY]) > 4)
  41371. return;
  41372. this._downPoint = null;
  41373. }
  41374. this.dispatchToElement(a, t, e);
  41375. };
  41376. });
  41377. function kIe(t, e, n) {
  41378. if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
  41379. for (var r = t, i = void 0, a = !1; r; ) {
  41380. if (r.ignoreClip && (a = !0), !a) {
  41381. var o = r.getClipPath();
  41382. if (o && !o.contain(e, n))
  41383. return !1;
  41384. }
  41385. r.silent && (i = !0);
  41386. var s = r.__hostTarget;
  41387. r = s || r.parent;
  41388. }
  41389. return i ? Dq : !0;
  41390. }
  41391. return !1;
  41392. }
  41393. function N6(t, e, n, r, i) {
  41394. for (var a = t.length - 1; a >= 0; a--) {
  41395. var o = t[a], s = void 0;
  41396. if (o !== i && !o.ignore && (s = kIe(o, n, r)) && (!e.topTarget && (e.topTarget = o), s !== Dq)) {
  41397. e.target = o;
  41398. break;
  41399. }
  41400. }
  41401. }
  41402. function kq(t, e, n) {
  41403. var r = t.painter;
  41404. return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
  41405. }
  41406. var Lq = 32, ev = 7;
  41407. function LIe(t) {
  41408. for (var e = 0; t >= Lq; )
  41409. e |= t & 1, t >>= 1;
  41410. return t + e;
  41411. }
  41412. function B6(t, e, n, r) {
  41413. var i = e + 1;
  41414. if (i === n)
  41415. return 1;
  41416. if (r(t[i++], t[e]) < 0) {
  41417. for (; i < n && r(t[i], t[i - 1]) < 0; )
  41418. i++;
  41419. NIe(t, e, i);
  41420. } else
  41421. for (; i < n && r(t[i], t[i - 1]) >= 0; )
  41422. i++;
  41423. return i - e;
  41424. }
  41425. function NIe(t, e, n) {
  41426. for (n--; e < n; ) {
  41427. var r = t[e];
  41428. t[e++] = t[n], t[n--] = r;
  41429. }
  41430. }
  41431. function z6(t, e, n, r, i) {
  41432. for (r === e && r++; r < n; r++) {
  41433. for (var a = t[r], o = e, s = r, l; o < s; )
  41434. l = o + s >>> 1, i(a, t[l]) < 0 ? s = l : o = l + 1;
  41435. var u = r - o;
  41436. switch (u) {
  41437. case 3:
  41438. t[o + 3] = t[o + 2];
  41439. case 2:
  41440. t[o + 2] = t[o + 1];
  41441. case 1:
  41442. t[o + 1] = t[o];
  41443. break;
  41444. default:
  41445. for (; u > 0; )
  41446. t[o + u] = t[o + u - 1], u--;
  41447. }
  41448. t[o] = a;
  41449. }
  41450. }
  41451. function GC(t, e, n, r, i, a) {
  41452. var o = 0, s = 0, l = 1;
  41453. if (a(t, e[n + i]) > 0) {
  41454. for (s = r - i; l < s && a(t, e[n + i + l]) > 0; )
  41455. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41456. l > s && (l = s), o += i, l += i;
  41457. } else {
  41458. for (s = i + 1; l < s && a(t, e[n + i - l]) <= 0; )
  41459. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41460. l > s && (l = s);
  41461. var u = o;
  41462. o = i - l, l = i - u;
  41463. }
  41464. for (o++; o < l; ) {
  41465. var c = o + (l - o >>> 1);
  41466. a(t, e[n + c]) > 0 ? o = c + 1 : l = c;
  41467. }
  41468. return l;
  41469. }
  41470. function jC(t, e, n, r, i, a) {
  41471. var o = 0, s = 0, l = 1;
  41472. if (a(t, e[n + i]) < 0) {
  41473. for (s = i + 1; l < s && a(t, e[n + i - l]) < 0; )
  41474. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41475. l > s && (l = s);
  41476. var u = o;
  41477. o = i - l, l = i - u;
  41478. } else {
  41479. for (s = r - i; l < s && a(t, e[n + i + l]) >= 0; )
  41480. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41481. l > s && (l = s), o += i, l += i;
  41482. }
  41483. for (o++; o < l; ) {
  41484. var c = o + (l - o >>> 1);
  41485. a(t, e[n + c]) < 0 ? l = c : o = c + 1;
  41486. }
  41487. return l;
  41488. }
  41489. function BIe(t, e) {
  41490. var n = ev, r, i, a = 0, o = [];
  41491. r = [], i = [];
  41492. function s(h, p) {
  41493. r[a] = h, i[a] = p, a += 1;
  41494. }
  41495. function l() {
  41496. for (; a > 1; ) {
  41497. var h = a - 2;
  41498. if (h >= 1 && i[h - 1] <= i[h] + i[h + 1] || h >= 2 && i[h - 2] <= i[h] + i[h - 1])
  41499. i[h - 1] < i[h + 1] && h--;
  41500. else if (i[h] > i[h + 1])
  41501. break;
  41502. c(h);
  41503. }
  41504. }
  41505. function u() {
  41506. for (; a > 1; ) {
  41507. var h = a - 2;
  41508. h > 0 && i[h - 1] < i[h + 1] && h--, c(h);
  41509. }
  41510. }
  41511. function c(h) {
  41512. var p = r[h], v = i[h], g = r[h + 1], m = i[h + 1];
  41513. i[h] = v + m, h === a - 3 && (r[h + 1] = r[h + 2], i[h + 1] = i[h + 2]), a--;
  41514. var y = jC(t[g], t, p, v, 0, e);
  41515. p += y, v -= y, v !== 0 && (m = GC(t[p + v - 1], t, g, m, m - 1, e), m !== 0 && (v <= m ? f(p, v, g, m) : d(p, v, g, m)));
  41516. }
  41517. function f(h, p, v, g) {
  41518. var m = 0;
  41519. for (m = 0; m < p; m++)
  41520. o[m] = t[h + m];
  41521. var y = 0, b = v, _ = h;
  41522. if (t[_++] = t[b++], --g === 0) {
  41523. for (m = 0; m < p; m++)
  41524. t[_ + m] = o[y + m];
  41525. return;
  41526. }
  41527. if (p === 1) {
  41528. for (m = 0; m < g; m++)
  41529. t[_ + m] = t[b + m];
  41530. t[_ + g] = o[y];
  41531. return;
  41532. }
  41533. for (var O = n, S, x, C; ; ) {
  41534. S = 0, x = 0, C = !1;
  41535. do
  41536. if (e(t[b], o[y]) < 0) {
  41537. if (t[_++] = t[b++], x++, S = 0, --g === 0) {
  41538. C = !0;
  41539. break;
  41540. }
  41541. } else if (t[_++] = o[y++], S++, x = 0, --p === 1) {
  41542. C = !0;
  41543. break;
  41544. }
  41545. while ((S | x) < O);
  41546. if (C)
  41547. break;
  41548. do {
  41549. if (S = jC(t[b], o, y, p, 0, e), S !== 0) {
  41550. for (m = 0; m < S; m++)
  41551. t[_ + m] = o[y + m];
  41552. if (_ += S, y += S, p -= S, p <= 1) {
  41553. C = !0;
  41554. break;
  41555. }
  41556. }
  41557. if (t[_++] = t[b++], --g === 0) {
  41558. C = !0;
  41559. break;
  41560. }
  41561. if (x = GC(o[y], t, b, g, 0, e), x !== 0) {
  41562. for (m = 0; m < x; m++)
  41563. t[_ + m] = t[b + m];
  41564. if (_ += x, b += x, g -= x, g === 0) {
  41565. C = !0;
  41566. break;
  41567. }
  41568. }
  41569. if (t[_++] = o[y++], --p === 1) {
  41570. C = !0;
  41571. break;
  41572. }
  41573. O--;
  41574. } while (S >= ev || x >= ev);
  41575. if (C)
  41576. break;
  41577. O < 0 && (O = 0), O += 2;
  41578. }
  41579. if (n = O, n < 1 && (n = 1), p === 1) {
  41580. for (m = 0; m < g; m++)
  41581. t[_ + m] = t[b + m];
  41582. t[_ + g] = o[y];
  41583. } else {
  41584. if (p === 0)
  41585. throw new Error();
  41586. for (m = 0; m < p; m++)
  41587. t[_ + m] = o[y + m];
  41588. }
  41589. }
  41590. function d(h, p, v, g) {
  41591. var m = 0;
  41592. for (m = 0; m < g; m++)
  41593. o[m] = t[v + m];
  41594. var y = h + p - 1, b = g - 1, _ = v + g - 1, O = 0, S = 0;
  41595. if (t[_--] = t[y--], --p === 0) {
  41596. for (O = _ - (g - 1), m = 0; m < g; m++)
  41597. t[O + m] = o[m];
  41598. return;
  41599. }
  41600. if (g === 1) {
  41601. for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
  41602. t[S + m] = t[O + m];
  41603. t[_] = o[b];
  41604. return;
  41605. }
  41606. for (var x = n; ; ) {
  41607. var C = 0, T = 0, w = !1;
  41608. do
  41609. if (e(o[b], t[y]) < 0) {
  41610. if (t[_--] = t[y--], C++, T = 0, --p === 0) {
  41611. w = !0;
  41612. break;
  41613. }
  41614. } else if (t[_--] = o[b--], T++, C = 0, --g === 1) {
  41615. w = !0;
  41616. break;
  41617. }
  41618. while ((C | T) < x);
  41619. if (w)
  41620. break;
  41621. do {
  41622. if (C = p - jC(o[b], t, h, p, p - 1, e), C !== 0) {
  41623. for (_ -= C, y -= C, p -= C, S = _ + 1, O = y + 1, m = C - 1; m >= 0; m--)
  41624. t[S + m] = t[O + m];
  41625. if (p === 0) {
  41626. w = !0;
  41627. break;
  41628. }
  41629. }
  41630. if (t[_--] = o[b--], --g === 1) {
  41631. w = !0;
  41632. break;
  41633. }
  41634. if (T = g - GC(t[y], o, 0, g, g - 1, e), T !== 0) {
  41635. for (_ -= T, b -= T, g -= T, S = _ + 1, O = b + 1, m = 0; m < T; m++)
  41636. t[S + m] = o[O + m];
  41637. if (g <= 1) {
  41638. w = !0;
  41639. break;
  41640. }
  41641. }
  41642. if (t[_--] = t[y--], --p === 0) {
  41643. w = !0;
  41644. break;
  41645. }
  41646. x--;
  41647. } while (C >= ev || T >= ev);
  41648. if (w)
  41649. break;
  41650. x < 0 && (x = 0), x += 2;
  41651. }
  41652. if (n = x, n < 1 && (n = 1), g === 1) {
  41653. for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
  41654. t[S + m] = t[O + m];
  41655. t[_] = o[b];
  41656. } else {
  41657. if (g === 0)
  41658. throw new Error();
  41659. for (O = _ - (g - 1), m = 0; m < g; m++)
  41660. t[O + m] = o[m];
  41661. }
  41662. }
  41663. return {
  41664. mergeRuns: l,
  41665. forceMergeRuns: u,
  41666. pushRun: s
  41667. };
  41668. }
  41669. function k_(t, e, n, r) {
  41670. n || (n = 0), r || (r = t.length);
  41671. var i = r - n;
  41672. if (!(i < 2)) {
  41673. var a = 0;
  41674. if (i < Lq) {
  41675. a = B6(t, n, r, e), z6(t, n, r, n + a, e);
  41676. return;
  41677. }
  41678. var o = BIe(t, e), s = LIe(i);
  41679. do {
  41680. if (a = B6(t, n, r, e), a < s) {
  41681. var l = i;
  41682. l > s && (l = s), z6(t, n, n + l, n + a, e), a = l;
  41683. }
  41684. o.pushRun(n, a), o.mergeRuns(), i -= a, n += a;
  41685. } while (i !== 0);
  41686. o.forceMergeRuns();
  41687. }
  41688. }
  41689. var ki = 1, Vv = 2, $d = 4, V6 = !1;
  41690. function ZC() {
  41691. V6 || (V6 = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
  41692. }
  41693. function F6(t, e) {
  41694. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
  41695. }
  41696. var zIe = function() {
  41697. function t() {
  41698. this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = F6;
  41699. }
  41700. return t.prototype.traverse = function(e, n) {
  41701. for (var r = 0; r < this._roots.length; r++)
  41702. this._roots[r].traverse(e, n);
  41703. }, t.prototype.getDisplayList = function(e, n) {
  41704. n = n || !1;
  41705. var r = this._displayList;
  41706. return (e || !r.length) && this.updateDisplayList(n), r;
  41707. }, t.prototype.updateDisplayList = function(e) {
  41708. this._displayListLen = 0;
  41709. for (var n = this._roots, r = this._displayList, i = 0, a = n.length; i < a; i++)
  41710. this._updateAndAddDisplayable(n[i], null, e);
  41711. r.length = this._displayListLen, k_(r, F6);
  41712. }, t.prototype._updateAndAddDisplayable = function(e, n, r) {
  41713. if (!(e.ignore && !r)) {
  41714. e.beforeUpdate(), e.update(), e.afterUpdate();
  41715. var i = e.getClipPath();
  41716. if (e.ignoreClip)
  41717. n = null;
  41718. else if (i) {
  41719. n ? n = n.slice() : n = [];
  41720. for (var a = i, o = e; a; )
  41721. a.parent = o, a.updateTransform(), n.push(a), o = a, a = a.getClipPath();
  41722. }
  41723. if (e.childrenRef) {
  41724. for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
  41725. var u = s[l];
  41726. e.__dirty && (u.__dirty |= ki), this._updateAndAddDisplayable(u, n, r);
  41727. }
  41728. e.__dirty = 0;
  41729. } else {
  41730. var c = e;
  41731. n && n.length ? c.__clipPaths = n : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (ZC(), c.z = 0), isNaN(c.z2) && (ZC(), c.z2 = 0), isNaN(c.zlevel) && (ZC(), c.zlevel = 0), this._displayList[this._displayListLen++] = c;
  41732. }
  41733. var f = e.getDecalElement && e.getDecalElement();
  41734. f && this._updateAndAddDisplayable(f, n, r);
  41735. var d = e.getTextGuideLine();
  41736. d && this._updateAndAddDisplayable(d, n, r);
  41737. var h = e.getTextContent();
  41738. h && this._updateAndAddDisplayable(h, n, r);
  41739. }
  41740. }, t.prototype.addRoot = function(e) {
  41741. e.__zr && e.__zr.storage === this || this._roots.push(e);
  41742. }, t.prototype.delRoot = function(e) {
  41743. if (e instanceof Array) {
  41744. for (var n = 0, r = e.length; n < r; n++)
  41745. this.delRoot(e[n]);
  41746. return;
  41747. }
  41748. var i = et(this._roots, e);
  41749. i >= 0 && this._roots.splice(i, 1);
  41750. }, t.prototype.delAllRoots = function() {
  41751. this._roots = [], this._displayList = [], this._displayListLen = 0;
  41752. }, t.prototype.getRoots = function() {
  41753. return this._roots;
  41754. }, t.prototype.dispose = function() {
  41755. this._displayList = null, this._roots = null;
  41756. }, t;
  41757. }(), Y1;
  41758. Y1 = vt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  41759. return setTimeout(t, 16);
  41760. };
  41761. var wg = {
  41762. linear: function(t) {
  41763. return t;
  41764. },
  41765. quadraticIn: function(t) {
  41766. return t * t;
  41767. },
  41768. quadraticOut: function(t) {
  41769. return t * (2 - t);
  41770. },
  41771. quadraticInOut: function(t) {
  41772. return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
  41773. },
  41774. cubicIn: function(t) {
  41775. return t * t * t;
  41776. },
  41777. cubicOut: function(t) {
  41778. return --t * t * t + 1;
  41779. },
  41780. cubicInOut: function(t) {
  41781. return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
  41782. },
  41783. quarticIn: function(t) {
  41784. return t * t * t * t;
  41785. },
  41786. quarticOut: function(t) {
  41787. return 1 - --t * t * t * t;
  41788. },
  41789. quarticInOut: function(t) {
  41790. return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
  41791. },
  41792. quinticIn: function(t) {
  41793. return t * t * t * t * t;
  41794. },
  41795. quinticOut: function(t) {
  41796. return --t * t * t * t * t + 1;
  41797. },
  41798. quinticInOut: function(t) {
  41799. return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
  41800. },
  41801. sinusoidalIn: function(t) {
  41802. return 1 - Math.cos(t * Math.PI / 2);
  41803. },
  41804. sinusoidalOut: function(t) {
  41805. return Math.sin(t * Math.PI / 2);
  41806. },
  41807. sinusoidalInOut: function(t) {
  41808. return 0.5 * (1 - Math.cos(Math.PI * t));
  41809. },
  41810. exponentialIn: function(t) {
  41811. return t === 0 ? 0 : Math.pow(1024, t - 1);
  41812. },
  41813. exponentialOut: function(t) {
  41814. return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
  41815. },
  41816. exponentialInOut: function(t) {
  41817. 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);
  41818. },
  41819. circularIn: function(t) {
  41820. return 1 - Math.sqrt(1 - t * t);
  41821. },
  41822. circularOut: function(t) {
  41823. return Math.sqrt(1 - --t * t);
  41824. },
  41825. circularInOut: function(t) {
  41826. return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  41827. },
  41828. elasticIn: function(t) {
  41829. var e, n = 0.1, r = 0.4;
  41830. 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)));
  41831. },
  41832. elasticOut: function(t) {
  41833. var e, n = 0.1, r = 0.4;
  41834. 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);
  41835. },
  41836. elasticInOut: 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), (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);
  41839. },
  41840. backIn: function(t) {
  41841. var e = 1.70158;
  41842. return t * t * ((e + 1) * t - e);
  41843. },
  41844. backOut: function(t) {
  41845. var e = 1.70158;
  41846. return --t * t * ((e + 1) * t + e) + 1;
  41847. },
  41848. backInOut: function(t) {
  41849. var e = 2.5949095;
  41850. return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
  41851. },
  41852. bounceIn: function(t) {
  41853. return 1 - wg.bounceOut(1 - t);
  41854. },
  41855. bounceOut: function(t) {
  41856. 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;
  41857. },
  41858. bounceInOut: function(t) {
  41859. return t < 0.5 ? wg.bounceIn(t * 2) * 0.5 : wg.bounceOut(t * 2 - 1) * 0.5 + 0.5;
  41860. }
  41861. }, Wy = Math.pow, Xl = Math.sqrt, q1 = 1e-8, Nq = 1e-4, W6 = Xl(3), Qy = 1 / 3, ko = wu(), ha = wu(), Jd = wu();
  41862. function Ll(t) {
  41863. return t > -q1 && t < q1;
  41864. }
  41865. function Bq(t) {
  41866. return t > q1 || t < -q1;
  41867. }
  41868. function Gn(t, e, n, r, i) {
  41869. var a = 1 - i;
  41870. return a * a * (a * t + 3 * i * e) + i * i * (i * r + 3 * a * n);
  41871. }
  41872. function Q6(t, e, n, r, i) {
  41873. var a = 1 - i;
  41874. return 3 * (((e - t) * a + 2 * (n - e) * i) * a + (r - n) * i * i);
  41875. }
  41876. function K1(t, e, n, r, i, a) {
  41877. 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;
  41878. if (Ll(c) && Ll(f))
  41879. if (Ll(s))
  41880. a[0] = 0;
  41881. else {
  41882. var p = -l / s;
  41883. p >= 0 && p <= 1 && (a[h++] = p);
  41884. }
  41885. else {
  41886. var v = f * f - 4 * c * d;
  41887. if (Ll(v)) {
  41888. var g = f / c, p = -s / o + g, m = -g / 2;
  41889. p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m);
  41890. } else if (v > 0) {
  41891. var y = Xl(v), b = c * s + 1.5 * o * (-f + y), _ = c * s + 1.5 * o * (-f - y);
  41892. b < 0 ? b = -Wy(-b, Qy) : b = Wy(b, Qy), _ < 0 ? _ = -Wy(-_, Qy) : _ = Wy(_, Qy);
  41893. var p = (-s - (b + _)) / (3 * o);
  41894. p >= 0 && p <= 1 && (a[h++] = p);
  41895. } else {
  41896. 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 + W6 * Math.sin(S))) / (3 * o), T = (-s + x * (C - W6 * Math.sin(S))) / (3 * o);
  41897. p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m), T >= 0 && T <= 1 && (a[h++] = T);
  41898. }
  41899. }
  41900. return h;
  41901. }
  41902. function zq(t, e, n, r, i) {
  41903. var a = 6 * n - 12 * e + 6 * t, o = 9 * e + 3 * r - 3 * t - 9 * n, s = 3 * e - 3 * t, l = 0;
  41904. if (Ll(o)) {
  41905. if (Bq(a)) {
  41906. var u = -s / a;
  41907. u >= 0 && u <= 1 && (i[l++] = u);
  41908. }
  41909. } else {
  41910. var c = a * a - 4 * o * s;
  41911. if (Ll(c))
  41912. i[0] = -a / (2 * o);
  41913. else if (c > 0) {
  41914. var f = Xl(c), u = (-a + f) / (2 * o), d = (-a - f) / (2 * o);
  41915. u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
  41916. }
  41917. }
  41918. return l;
  41919. }
  41920. function su(t, e, n, r, i, a) {
  41921. 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;
  41922. a[0] = t, a[1] = o, a[2] = u, a[3] = f, a[4] = f, a[5] = c, a[6] = l, a[7] = r;
  41923. }
  41924. function Vq(t, e, n, r, i, a, o, s, l, u, c) {
  41925. var f, d = 5e-3, h = 1 / 0, p, v, g, m;
  41926. ko[0] = l, ko[1] = u;
  41927. for (var y = 0; y < 1; y += 0.05)
  41928. ha[0] = Gn(t, n, i, o, y), ha[1] = Gn(e, r, a, s, y), g = Ul(ko, ha), g < h && (f = y, h = g);
  41929. h = 1 / 0;
  41930. for (var b = 0; b < 32 && !(d < Nq); b++)
  41931. p = f - d, v = f + d, ha[0] = Gn(t, n, i, o, p), ha[1] = Gn(e, r, a, s, p), g = Ul(ha, ko), p >= 0 && g < h ? (f = p, h = g) : (Jd[0] = Gn(t, n, i, o, v), Jd[1] = Gn(e, r, a, s, v), m = Ul(Jd, ko), v <= 1 && m < h ? (f = v, h = m) : d *= 0.5);
  41932. return c && (c[0] = Gn(t, n, i, o, f), c[1] = Gn(e, r, a, s, f)), Xl(h);
  41933. }
  41934. function VIe(t, e, n, r, i, a, o, s, l) {
  41935. for (var u = t, c = e, f = 0, d = 1 / l, h = 1; h <= l; h++) {
  41936. var p = h * d, v = Gn(t, n, i, o, p), g = Gn(e, r, a, s, p), m = v - u, y = g - c;
  41937. f += Math.sqrt(m * m + y * y), u = v, c = g;
  41938. }
  41939. return f;
  41940. }
  41941. function ir(t, e, n, r) {
  41942. var i = 1 - r;
  41943. return i * (i * t + 2 * r * e) + r * r * n;
  41944. }
  41945. function fA(t, e, n, r) {
  41946. return 2 * ((1 - r) * (e - t) + r * (n - e));
  41947. }
  41948. function FIe(t, e, n, r, i) {
  41949. var a = t - 2 * e + n, o = 2 * (e - t), s = t - r, l = 0;
  41950. if (Ll(a)) {
  41951. if (Bq(o)) {
  41952. var u = -s / o;
  41953. u >= 0 && u <= 1 && (i[l++] = u);
  41954. }
  41955. } else {
  41956. var c = o * o - 4 * a * s;
  41957. if (Ll(c)) {
  41958. var u = -o / (2 * a);
  41959. u >= 0 && u <= 1 && (i[l++] = u);
  41960. } else if (c > 0) {
  41961. var f = Xl(c), u = (-o + f) / (2 * a), d = (-o - f) / (2 * a);
  41962. u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
  41963. }
  41964. }
  41965. return l;
  41966. }
  41967. function Fq(t, e, n) {
  41968. var r = t + n - 2 * e;
  41969. return r === 0 ? 0.5 : (t - e) / r;
  41970. }
  41971. function ym(t, e, n, r, i) {
  41972. var a = (e - t) * r + t, o = (n - e) * r + e, s = (o - a) * r + a;
  41973. i[0] = t, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = n;
  41974. }
  41975. function Wq(t, e, n, r, i, a, o, s, l) {
  41976. var u, c = 5e-3, f = 1 / 0;
  41977. ko[0] = o, ko[1] = s;
  41978. for (var d = 0; d < 1; d += 0.05) {
  41979. ha[0] = ir(t, n, i, d), ha[1] = ir(e, r, a, d);
  41980. var h = Ul(ko, ha);
  41981. h < f && (u = d, f = h);
  41982. }
  41983. f = 1 / 0;
  41984. for (var p = 0; p < 32 && !(c < Nq); p++) {
  41985. var v = u - c, g = u + c;
  41986. ha[0] = ir(t, n, i, v), ha[1] = ir(e, r, a, v);
  41987. var h = Ul(ha, ko);
  41988. if (v >= 0 && h < f)
  41989. u = v, f = h;
  41990. else {
  41991. Jd[0] = ir(t, n, i, g), Jd[1] = ir(e, r, a, g);
  41992. var m = Ul(Jd, ko);
  41993. g <= 1 && m < f ? (u = g, f = m) : c *= 0.5;
  41994. }
  41995. }
  41996. return l && (l[0] = ir(t, n, i, u), l[1] = ir(e, r, a, u)), Xl(f);
  41997. }
  41998. function WIe(t, e, n, r, i, a, o) {
  41999. for (var s = t, l = e, u = 0, c = 1 / o, f = 1; f <= o; f++) {
  42000. var d = f * c, h = ir(t, n, i, d), p = ir(e, r, a, d), v = h - s, g = p - l;
  42001. u += Math.sqrt(v * v + g * g), s = h, l = p;
  42002. }
  42003. return u;
  42004. }
  42005. var QIe = /cubic-bezier\(([0-9,\.e ]+)\)/;
  42006. function SR(t) {
  42007. var e = t && QIe.exec(t);
  42008. if (e) {
  42009. var n = e[1].split(","), r = +ma(n[0]), i = +ma(n[1]), a = +ma(n[2]), o = +ma(n[3]);
  42010. if (isNaN(r + i + a + o))
  42011. return;
  42012. var s = [];
  42013. return function(l) {
  42014. return l <= 0 ? 0 : l >= 1 ? 1 : K1(0, r, a, 1, l, s) && Gn(0, i, o, 1, s[0]);
  42015. };
  42016. }
  42017. }
  42018. var HIe = function() {
  42019. function t(e) {
  42020. 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);
  42021. }
  42022. return t.prototype.step = function(e, n) {
  42023. if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
  42024. this._pausedTime += n;
  42025. return;
  42026. }
  42027. var r = this._life, i = e - this._startTime - this._pausedTime, a = i / r;
  42028. a < 0 && (a = 0), a = Math.min(a, 1);
  42029. var o = this.easingFunc, s = o ? o(a) : a;
  42030. if (this.onframe(s), a === 1)
  42031. if (this.loop) {
  42032. var l = i % r;
  42033. this._startTime = e - l, this._pausedTime = 0, this.onrestart();
  42034. } else
  42035. return !0;
  42036. return !1;
  42037. }, t.prototype.pause = function() {
  42038. this._paused = !0;
  42039. }, t.prototype.resume = function() {
  42040. this._paused = !1;
  42041. }, t.prototype.setEasing = function(e) {
  42042. this.easing = e, this.easingFunc = Me(e) ? e : wg[e] || SR(e);
  42043. }, t;
  42044. }(), Qq = /* @__PURE__ */ function() {
  42045. function t(e) {
  42046. this.value = e;
  42047. }
  42048. return t;
  42049. }(), GIe = function() {
  42050. function t() {
  42051. this._len = 0;
  42052. }
  42053. return t.prototype.insert = function(e) {
  42054. var n = new Qq(e);
  42055. return this.insertEntry(n), n;
  42056. }, t.prototype.insertEntry = function(e) {
  42057. this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
  42058. }, t.prototype.remove = function(e) {
  42059. var n = e.prev, r = e.next;
  42060. n ? n.next = r : this.head = r, r ? r.prev = n : this.tail = n, e.next = e.prev = null, this._len--;
  42061. }, t.prototype.len = function() {
  42062. return this._len;
  42063. }, t.prototype.clear = function() {
  42064. this.head = this.tail = null, this._len = 0;
  42065. }, t;
  42066. }(), R0 = function() {
  42067. function t(e) {
  42068. this._list = new GIe(), this._maxSize = 10, this._map = {}, this._maxSize = e;
  42069. }
  42070. return t.prototype.put = function(e, n) {
  42071. var r = this._list, i = this._map, a = null;
  42072. if (i[e] == null) {
  42073. var o = r.len(), s = this._lastRemovedEntry;
  42074. if (o >= this._maxSize && o > 0) {
  42075. var l = r.head;
  42076. r.remove(l), delete i[l.key], a = l.value, this._lastRemovedEntry = l;
  42077. }
  42078. s ? s.value = n : s = new Qq(n), s.key = e, r.insertEntry(s), i[e] = s;
  42079. }
  42080. return a;
  42081. }, t.prototype.get = function(e) {
  42082. var n = this._map[e], r = this._list;
  42083. if (n != null)
  42084. return n !== r.tail && (r.remove(n), r.insertEntry(n)), n.value;
  42085. }, t.prototype.clear = function() {
  42086. this._list.clear(), this._map = {};
  42087. }, t.prototype.len = function() {
  42088. return this._list.len();
  42089. }, t;
  42090. }(), H6 = {
  42091. transparent: [0, 0, 0, 0],
  42092. aliceblue: [240, 248, 255, 1],
  42093. antiquewhite: [250, 235, 215, 1],
  42094. aqua: [0, 255, 255, 1],
  42095. aquamarine: [127, 255, 212, 1],
  42096. azure: [240, 255, 255, 1],
  42097. beige: [245, 245, 220, 1],
  42098. bisque: [255, 228, 196, 1],
  42099. black: [0, 0, 0, 1],
  42100. blanchedalmond: [255, 235, 205, 1],
  42101. blue: [0, 0, 255, 1],
  42102. blueviolet: [138, 43, 226, 1],
  42103. brown: [165, 42, 42, 1],
  42104. burlywood: [222, 184, 135, 1],
  42105. cadetblue: [95, 158, 160, 1],
  42106. chartreuse: [127, 255, 0, 1],
  42107. chocolate: [210, 105, 30, 1],
  42108. coral: [255, 127, 80, 1],
  42109. cornflowerblue: [100, 149, 237, 1],
  42110. cornsilk: [255, 248, 220, 1],
  42111. crimson: [220, 20, 60, 1],
  42112. cyan: [0, 255, 255, 1],
  42113. darkblue: [0, 0, 139, 1],
  42114. darkcyan: [0, 139, 139, 1],
  42115. darkgoldenrod: [184, 134, 11, 1],
  42116. darkgray: [169, 169, 169, 1],
  42117. darkgreen: [0, 100, 0, 1],
  42118. darkgrey: [169, 169, 169, 1],
  42119. darkkhaki: [189, 183, 107, 1],
  42120. darkmagenta: [139, 0, 139, 1],
  42121. darkolivegreen: [85, 107, 47, 1],
  42122. darkorange: [255, 140, 0, 1],
  42123. darkorchid: [153, 50, 204, 1],
  42124. darkred: [139, 0, 0, 1],
  42125. darksalmon: [233, 150, 122, 1],
  42126. darkseagreen: [143, 188, 143, 1],
  42127. darkslateblue: [72, 61, 139, 1],
  42128. darkslategray: [47, 79, 79, 1],
  42129. darkslategrey: [47, 79, 79, 1],
  42130. darkturquoise: [0, 206, 209, 1],
  42131. darkviolet: [148, 0, 211, 1],
  42132. deeppink: [255, 20, 147, 1],
  42133. deepskyblue: [0, 191, 255, 1],
  42134. dimgray: [105, 105, 105, 1],
  42135. dimgrey: [105, 105, 105, 1],
  42136. dodgerblue: [30, 144, 255, 1],
  42137. firebrick: [178, 34, 34, 1],
  42138. floralwhite: [255, 250, 240, 1],
  42139. forestgreen: [34, 139, 34, 1],
  42140. fuchsia: [255, 0, 255, 1],
  42141. gainsboro: [220, 220, 220, 1],
  42142. ghostwhite: [248, 248, 255, 1],
  42143. gold: [255, 215, 0, 1],
  42144. goldenrod: [218, 165, 32, 1],
  42145. gray: [128, 128, 128, 1],
  42146. green: [0, 128, 0, 1],
  42147. greenyellow: [173, 255, 47, 1],
  42148. grey: [128, 128, 128, 1],
  42149. honeydew: [240, 255, 240, 1],
  42150. hotpink: [255, 105, 180, 1],
  42151. indianred: [205, 92, 92, 1],
  42152. indigo: [75, 0, 130, 1],
  42153. ivory: [255, 255, 240, 1],
  42154. khaki: [240, 230, 140, 1],
  42155. lavender: [230, 230, 250, 1],
  42156. lavenderblush: [255, 240, 245, 1],
  42157. lawngreen: [124, 252, 0, 1],
  42158. lemonchiffon: [255, 250, 205, 1],
  42159. lightblue: [173, 216, 230, 1],
  42160. lightcoral: [240, 128, 128, 1],
  42161. lightcyan: [224, 255, 255, 1],
  42162. lightgoldenrodyellow: [250, 250, 210, 1],
  42163. lightgray: [211, 211, 211, 1],
  42164. lightgreen: [144, 238, 144, 1],
  42165. lightgrey: [211, 211, 211, 1],
  42166. lightpink: [255, 182, 193, 1],
  42167. lightsalmon: [255, 160, 122, 1],
  42168. lightseagreen: [32, 178, 170, 1],
  42169. lightskyblue: [135, 206, 250, 1],
  42170. lightslategray: [119, 136, 153, 1],
  42171. lightslategrey: [119, 136, 153, 1],
  42172. lightsteelblue: [176, 196, 222, 1],
  42173. lightyellow: [255, 255, 224, 1],
  42174. lime: [0, 255, 0, 1],
  42175. limegreen: [50, 205, 50, 1],
  42176. linen: [250, 240, 230, 1],
  42177. magenta: [255, 0, 255, 1],
  42178. maroon: [128, 0, 0, 1],
  42179. mediumaquamarine: [102, 205, 170, 1],
  42180. mediumblue: [0, 0, 205, 1],
  42181. mediumorchid: [186, 85, 211, 1],
  42182. mediumpurple: [147, 112, 219, 1],
  42183. mediumseagreen: [60, 179, 113, 1],
  42184. mediumslateblue: [123, 104, 238, 1],
  42185. mediumspringgreen: [0, 250, 154, 1],
  42186. mediumturquoise: [72, 209, 204, 1],
  42187. mediumvioletred: [199, 21, 133, 1],
  42188. midnightblue: [25, 25, 112, 1],
  42189. mintcream: [245, 255, 250, 1],
  42190. mistyrose: [255, 228, 225, 1],
  42191. moccasin: [255, 228, 181, 1],
  42192. navajowhite: [255, 222, 173, 1],
  42193. navy: [0, 0, 128, 1],
  42194. oldlace: [253, 245, 230, 1],
  42195. olive: [128, 128, 0, 1],
  42196. olivedrab: [107, 142, 35, 1],
  42197. orange: [255, 165, 0, 1],
  42198. orangered: [255, 69, 0, 1],
  42199. orchid: [218, 112, 214, 1],
  42200. palegoldenrod: [238, 232, 170, 1],
  42201. palegreen: [152, 251, 152, 1],
  42202. paleturquoise: [175, 238, 238, 1],
  42203. palevioletred: [219, 112, 147, 1],
  42204. papayawhip: [255, 239, 213, 1],
  42205. peachpuff: [255, 218, 185, 1],
  42206. peru: [205, 133, 63, 1],
  42207. pink: [255, 192, 203, 1],
  42208. plum: [221, 160, 221, 1],
  42209. powderblue: [176, 224, 230, 1],
  42210. purple: [128, 0, 128, 1],
  42211. red: [255, 0, 0, 1],
  42212. rosybrown: [188, 143, 143, 1],
  42213. royalblue: [65, 105, 225, 1],
  42214. saddlebrown: [139, 69, 19, 1],
  42215. salmon: [250, 128, 114, 1],
  42216. sandybrown: [244, 164, 96, 1],
  42217. seagreen: [46, 139, 87, 1],
  42218. seashell: [255, 245, 238, 1],
  42219. sienna: [160, 82, 45, 1],
  42220. silver: [192, 192, 192, 1],
  42221. skyblue: [135, 206, 235, 1],
  42222. slateblue: [106, 90, 205, 1],
  42223. slategray: [112, 128, 144, 1],
  42224. slategrey: [112, 128, 144, 1],
  42225. snow: [255, 250, 250, 1],
  42226. springgreen: [0, 255, 127, 1],
  42227. steelblue: [70, 130, 180, 1],
  42228. tan: [210, 180, 140, 1],
  42229. teal: [0, 128, 128, 1],
  42230. thistle: [216, 191, 216, 1],
  42231. tomato: [255, 99, 71, 1],
  42232. turquoise: [64, 224, 208, 1],
  42233. violet: [238, 130, 238, 1],
  42234. wheat: [245, 222, 179, 1],
  42235. white: [255, 255, 255, 1],
  42236. whitesmoke: [245, 245, 245, 1],
  42237. yellow: [255, 255, 0, 1],
  42238. yellowgreen: [154, 205, 50, 1]
  42239. };
  42240. function Ja(t) {
  42241. return t = Math.round(t), t < 0 ? 0 : t > 255 ? 255 : t;
  42242. }
  42243. function jIe(t) {
  42244. return t = Math.round(t), t < 0 ? 0 : t > 360 ? 360 : t;
  42245. }
  42246. function bm(t) {
  42247. return t < 0 ? 0 : t > 1 ? 1 : t;
  42248. }
  42249. function UC(t) {
  42250. var e = t;
  42251. return e.length && e.charAt(e.length - 1) === "%" ? Ja(parseFloat(e) / 100 * 255) : Ja(parseInt(e, 10));
  42252. }
  42253. function qc(t) {
  42254. var e = t;
  42255. return e.length && e.charAt(e.length - 1) === "%" ? bm(parseFloat(e) / 100) : bm(parseFloat(e));
  42256. }
  42257. function XC(t, e, n) {
  42258. 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;
  42259. }
  42260. function Nl(t, e, n) {
  42261. return t + (e - t) * n;
  42262. }
  42263. function aa(t, e, n, r, i) {
  42264. return t[0] = e, t[1] = n, t[2] = r, t[3] = i, t;
  42265. }
  42266. function dA(t, e) {
  42267. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
  42268. }
  42269. var Hq = new R0(20), Hy = null;
  42270. function td(t, e) {
  42271. Hy && dA(Hy, e), Hy = Hq.put(t, Hy || e.slice());
  42272. }
  42273. function qr(t, e) {
  42274. if (t) {
  42275. e = e || [];
  42276. var n = Hq.get(t);
  42277. if (n)
  42278. return dA(e, n);
  42279. t = t + "";
  42280. var r = t.replace(/ /g, "").toLowerCase();
  42281. if (r in H6)
  42282. return dA(e, H6[r]), td(t, e), e;
  42283. var i = r.length;
  42284. if (r.charAt(0) === "#") {
  42285. if (i === 4 || i === 5) {
  42286. var a = parseInt(r.slice(1, 4), 16);
  42287. if (!(a >= 0 && a <= 4095)) {
  42288. aa(e, 0, 0, 0, 1);
  42289. return;
  42290. }
  42291. return aa(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), td(t, e), e;
  42292. } else if (i === 7 || i === 9) {
  42293. var a = parseInt(r.slice(1, 7), 16);
  42294. if (!(a >= 0 && a <= 16777215)) {
  42295. aa(e, 0, 0, 0, 1);
  42296. return;
  42297. }
  42298. return aa(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(r.slice(7), 16) / 255 : 1), td(t, e), e;
  42299. }
  42300. return;
  42301. }
  42302. var o = r.indexOf("("), s = r.indexOf(")");
  42303. if (o !== -1 && s + 1 === i) {
  42304. var l = r.substr(0, o), u = r.substr(o + 1, s - (o + 1)).split(","), c = 1;
  42305. switch (l) {
  42306. case "rgba":
  42307. if (u.length !== 4)
  42308. return u.length === 3 ? aa(e, +u[0], +u[1], +u[2], 1) : aa(e, 0, 0, 0, 1);
  42309. c = qc(u.pop());
  42310. case "rgb":
  42311. if (u.length >= 3)
  42312. return aa(e, UC(u[0]), UC(u[1]), UC(u[2]), u.length === 3 ? c : qc(u[3])), td(t, e), e;
  42313. aa(e, 0, 0, 0, 1);
  42314. return;
  42315. case "hsla":
  42316. if (u.length !== 4) {
  42317. aa(e, 0, 0, 0, 1);
  42318. return;
  42319. }
  42320. return u[3] = qc(u[3]), hA(u, e), td(t, e), e;
  42321. case "hsl":
  42322. if (u.length !== 3) {
  42323. aa(e, 0, 0, 0, 1);
  42324. return;
  42325. }
  42326. return hA(u, e), td(t, e), e;
  42327. default:
  42328. return;
  42329. }
  42330. }
  42331. aa(e, 0, 0, 0, 1);
  42332. }
  42333. }
  42334. function hA(t, e) {
  42335. var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360, r = qc(t[1]), i = qc(t[2]), a = i <= 0.5 ? i * (r + 1) : i + r - i * r, o = i * 2 - a;
  42336. return e = e || [], aa(e, Ja(XC(o, a, n + 1 / 3) * 255), Ja(XC(o, a, n) * 255), Ja(XC(o, a, n - 1 / 3) * 255), 1), t.length === 4 && (e[3] = t[3]), e;
  42337. }
  42338. function ZIe(t) {
  42339. if (t) {
  42340. 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;
  42341. if (o === 0)
  42342. l = 0, u = 0;
  42343. else {
  42344. s < 0.5 ? u = o / (a + i) : u = o / (2 - a - i);
  42345. var c = ((a - e) / 6 + o / 2) / o, f = ((a - n) / 6 + o / 2) / o, d = ((a - r) / 6 + o / 2) / o;
  42346. 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);
  42347. }
  42348. var h = [l * 360, u, s];
  42349. return t[3] != null && h.push(t[3]), h;
  42350. }
  42351. }
  42352. function J1(t, e) {
  42353. var n = qr(t);
  42354. if (n) {
  42355. for (var r = 0; r < 3; r++)
  42356. 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);
  42357. return eo(n, n.length === 4 ? "rgba" : "rgb");
  42358. }
  42359. }
  42360. function UIe(t) {
  42361. var e = qr(t);
  42362. if (e)
  42363. return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1);
  42364. }
  42365. function Cg(t, e, n) {
  42366. if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
  42367. n = n || [];
  42368. var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = e[i], s = e[a], l = r - i;
  42369. return n[0] = Ja(Nl(o[0], s[0], l)), n[1] = Ja(Nl(o[1], s[1], l)), n[2] = Ja(Nl(o[2], s[2], l)), n[3] = bm(Nl(o[3], s[3], l)), n;
  42370. }
  42371. }
  42372. var XIe = Cg;
  42373. function xR(t, e, n) {
  42374. if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
  42375. var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = qr(e[i]), s = qr(e[a]), l = r - i, u = eo([
  42376. Ja(Nl(o[0], s[0], l)),
  42377. Ja(Nl(o[1], s[1], l)),
  42378. Ja(Nl(o[2], s[2], l)),
  42379. bm(Nl(o[3], s[3], l))
  42380. ], "rgba");
  42381. return n ? {
  42382. color: u,
  42383. leftIndex: i,
  42384. rightIndex: a,
  42385. value: r
  42386. } : u;
  42387. }
  42388. }
  42389. var YIe = xR;
  42390. function eh(t, e, n, r) {
  42391. var i = qr(t);
  42392. if (t)
  42393. return i = ZIe(i), e != null && (i[0] = jIe(e)), n != null && (i[1] = qc(n)), r != null && (i[2] = qc(r)), eo(hA(i), "rgba");
  42394. }
  42395. function _m(t, e) {
  42396. var n = qr(t);
  42397. if (n && e != null)
  42398. return n[3] = bm(e), eo(n, "rgba");
  42399. }
  42400. function eo(t, e) {
  42401. if (!(!t || !t.length)) {
  42402. var n = t[0] + "," + t[1] + "," + t[2];
  42403. return (e === "rgba" || e === "hsva" || e === "hsla") && (n += "," + t[3]), e + "(" + n + ")";
  42404. }
  42405. }
  42406. function Om(t, e) {
  42407. var n = qr(t);
  42408. return n ? (0.299 * n[0] + 0.587 * n[1] + 0.114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0;
  42409. }
  42410. function qIe() {
  42411. return eo([
  42412. Math.round(Math.random() * 255),
  42413. Math.round(Math.random() * 255),
  42414. Math.round(Math.random() * 255)
  42415. ], "rgb");
  42416. }
  42417. var G6 = new R0(100);
  42418. function eO(t) {
  42419. if (Oe(t)) {
  42420. var e = G6.get(t);
  42421. return e || (e = J1(t, -0.1), G6.put(t, e)), e;
  42422. } else if (M0(t)) {
  42423. var n = le({}, t);
  42424. return n.colorStops = ce(t.colorStops, function(r) {
  42425. return {
  42426. offset: r.offset,
  42427. color: J1(r.color, -0.1)
  42428. };
  42429. }), n;
  42430. }
  42431. return t;
  42432. }
  42433. const KIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42434. __proto__: null,
  42435. fastLerp: Cg,
  42436. fastMapToColor: XIe,
  42437. lerp: xR,
  42438. lift: J1,
  42439. liftColor: eO,
  42440. lum: Om,
  42441. mapToColor: YIe,
  42442. modifyAlpha: _m,
  42443. modifyHSL: eh,
  42444. parse: qr,
  42445. random: qIe,
  42446. stringify: eo,
  42447. toHex: UIe
  42448. }, Symbol.toStringTag, { value: "Module" }));
  42449. var tO = Math.round;
  42450. function Sm(t) {
  42451. var e;
  42452. if (!t || t === "transparent")
  42453. t = "none";
  42454. else if (typeof t == "string" && t.indexOf("rgba") > -1) {
  42455. var n = qr(t);
  42456. n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3]);
  42457. }
  42458. return {
  42459. color: t,
  42460. opacity: e ?? 1
  42461. };
  42462. }
  42463. var j6 = 1e-4;
  42464. function Bl(t) {
  42465. return t < j6 && t > -j6;
  42466. }
  42467. function Gy(t) {
  42468. return tO(t * 1e3) / 1e3;
  42469. }
  42470. function pA(t) {
  42471. return tO(t * 1e4) / 1e4;
  42472. }
  42473. function JIe(t) {
  42474. return "matrix(" + Gy(t[0]) + "," + Gy(t[1]) + "," + Gy(t[2]) + "," + Gy(t[3]) + "," + pA(t[4]) + "," + pA(t[5]) + ")";
  42475. }
  42476. var eDe = {
  42477. left: "start",
  42478. right: "end",
  42479. center: "middle",
  42480. middle: "middle"
  42481. };
  42482. function tDe(t, e, n) {
  42483. return n === "top" ? t += e / 2 : n === "bottom" && (t -= e / 2), t;
  42484. }
  42485. function nDe(t) {
  42486. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY);
  42487. }
  42488. function rDe(t) {
  42489. var e = t.style, n = t.getGlobalScale();
  42490. return [
  42491. e.shadowColor,
  42492. (e.shadowBlur || 0).toFixed(2),
  42493. (e.shadowOffsetX || 0).toFixed(2),
  42494. (e.shadowOffsetY || 0).toFixed(2),
  42495. n[0],
  42496. n[1]
  42497. ].join(",");
  42498. }
  42499. function Gq(t) {
  42500. return t && !!t.image;
  42501. }
  42502. function iDe(t) {
  42503. return t && !!t.svgElement;
  42504. }
  42505. function wR(t) {
  42506. return Gq(t) || iDe(t);
  42507. }
  42508. function jq(t) {
  42509. return t.type === "linear";
  42510. }
  42511. function Zq(t) {
  42512. return t.type === "radial";
  42513. }
  42514. function Uq(t) {
  42515. return t && (t.type === "linear" || t.type === "radial");
  42516. }
  42517. function Bx(t) {
  42518. return "url(#" + t + ")";
  42519. }
  42520. function Xq(t) {
  42521. var e = t.getGlobalScale(), n = Math.max(e[0], e[1]);
  42522. return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1);
  42523. }
  42524. function Yq(t) {
  42525. var e = t.x || 0, n = t.y || 0, r = (t.rotation || 0) * Og, i = We(t.scaleX, 1), a = We(t.scaleY, 1), o = t.skewX || 0, s = t.skewY || 0, l = [];
  42526. 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(" + tO(o * Og) + "deg, " + tO(s * Og) + "deg)"), l.join(" ");
  42527. }
  42528. var aDe = function() {
  42529. return vt.hasGlobalWindow && Me(window.btoa) ? function(t) {
  42530. return window.btoa(unescape(encodeURIComponent(t)));
  42531. } : typeof Buffer < "u" ? function(t) {
  42532. return Buffer.from(t).toString("base64");
  42533. } : function(t) {
  42534. return process.env.NODE_ENV !== "production" && Oa("Base64 isn't natively supported in the current environment."), null;
  42535. };
  42536. }(), vA = Array.prototype.slice;
  42537. function _s(t, e, n) {
  42538. return (e - t) * n + t;
  42539. }
  42540. function YC(t, e, n, r) {
  42541. for (var i = e.length, a = 0; a < i; a++)
  42542. t[a] = _s(e[a], n[a], r);
  42543. return t;
  42544. }
  42545. function oDe(t, e, n, r) {
  42546. for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
  42547. t[o] || (t[o] = []);
  42548. for (var s = 0; s < a; s++)
  42549. t[o][s] = _s(e[o][s], n[o][s], r);
  42550. }
  42551. return t;
  42552. }
  42553. function jy(t, e, n, r) {
  42554. for (var i = e.length, a = 0; a < i; a++)
  42555. t[a] = e[a] + n[a] * r;
  42556. return t;
  42557. }
  42558. function Z6(t, e, n, r) {
  42559. for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
  42560. t[o] || (t[o] = []);
  42561. for (var s = 0; s < a; s++)
  42562. t[o][s] = e[o][s] + n[o][s] * r;
  42563. }
  42564. return t;
  42565. }
  42566. function sDe(t, e) {
  42567. 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++)
  42568. i.push({
  42569. offset: o.offset,
  42570. color: o.color.slice()
  42571. });
  42572. }
  42573. function lDe(t, e, n) {
  42574. var r = t, i = e;
  42575. if (!(!r.push || !i.push)) {
  42576. var a = r.length, o = i.length;
  42577. if (a !== o) {
  42578. var s = a > o;
  42579. if (s)
  42580. r.length = o;
  42581. else
  42582. for (var l = a; l < o; l++)
  42583. r.push(n === 1 ? i[l] : vA.call(i[l]));
  42584. }
  42585. for (var u = r[0] && r[0].length, l = 0; l < r.length; l++)
  42586. if (n === 1)
  42587. isNaN(r[l]) && (r[l] = i[l]);
  42588. else
  42589. for (var c = 0; c < u; c++)
  42590. isNaN(r[l][c]) && (r[l][c] = i[l][c]);
  42591. }
  42592. }
  42593. function Tg(t) {
  42594. if (wr(t)) {
  42595. var e = t.length;
  42596. if (wr(t[0])) {
  42597. for (var n = [], r = 0; r < e; r++)
  42598. n.push(vA.call(t[r]));
  42599. return n;
  42600. }
  42601. return vA.call(t);
  42602. }
  42603. return t;
  42604. }
  42605. function L_(t) {
  42606. 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(",") + ")";
  42607. }
  42608. function uDe(t) {
  42609. return wr(t && t[0]) ? 2 : 1;
  42610. }
  42611. var Zy = 0, N_ = 1, qq = 2, Fv = 3, gA = 4, mA = 5, U6 = 6;
  42612. function X6(t) {
  42613. return t === gA || t === mA;
  42614. }
  42615. function Uy(t) {
  42616. return t === N_ || t === qq;
  42617. }
  42618. var tv = [0, 0, 0, 0], cDe = function() {
  42619. function t(e) {
  42620. this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
  42621. }
  42622. return t.prototype.isFinished = function() {
  42623. return this._finished;
  42624. }, t.prototype.setFinished = function() {
  42625. this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
  42626. }, t.prototype.needsAnimate = function() {
  42627. return this.keyframes.length >= 1;
  42628. }, t.prototype.getAdditiveTrack = function() {
  42629. return this._additiveTrack;
  42630. }, t.prototype.addKeyframe = function(e, n, r) {
  42631. this._needsSort = !0;
  42632. var i = this.keyframes, a = i.length, o = !1, s = U6, l = n;
  42633. if (wr(n)) {
  42634. var u = uDe(n);
  42635. s = u, (u === 1 && !St(n[0]) || u === 2 && !St(n[0][0])) && (o = !0);
  42636. } else if (St(n) && !ou(n))
  42637. s = Zy;
  42638. else if (Oe(n))
  42639. if (!isNaN(+n))
  42640. s = Zy;
  42641. else {
  42642. var c = qr(n);
  42643. c && (l = c, s = Fv);
  42644. }
  42645. else if (M0(n)) {
  42646. var f = le({}, l);
  42647. f.colorStops = ce(n.colorStops, function(h) {
  42648. return {
  42649. offset: h.offset,
  42650. color: qr(h.color)
  42651. };
  42652. }), jq(n) ? s = gA : Zq(n) && (s = mA), l = f;
  42653. }
  42654. a === 0 ? this.valType = s : (s !== this.valType || s === U6) && (o = !0), this.discrete = this.discrete || o;
  42655. var d = {
  42656. time: e,
  42657. value: l,
  42658. rawValue: n,
  42659. percent: 0
  42660. };
  42661. return r && (d.easing = r, d.easingFunc = Me(r) ? r : wg[r] || SR(r)), i.push(d), d;
  42662. }, t.prototype.prepare = function(e, n) {
  42663. var r = this.keyframes;
  42664. this._needsSort && r.sort(function(v, g) {
  42665. return v.time - g.time;
  42666. });
  42667. for (var i = this.valType, a = r.length, o = r[a - 1], s = this.discrete, l = Uy(i), u = X6(i), c = 0; c < a; c++) {
  42668. var f = r[c], d = f.value, h = o.value;
  42669. f.percent = f.time / e, s || (l && c !== a - 1 ? lDe(d, h, i) : u && sDe(d.colorStops, h.colorStops));
  42670. }
  42671. if (!s && i !== mA && n && this.needsAnimate() && n.needsAnimate() && i === n.valType && !n._finished) {
  42672. this._additiveTrack = n;
  42673. for (var p = r[0].value, c = 0; c < a; c++)
  42674. i === Zy ? r[c].additiveValue = r[c].value - p : i === Fv ? r[c].additiveValue = jy([], r[c].value, p, -1) : Uy(i) && (r[c].additiveValue = i === N_ ? jy([], r[c].value, p, -1) : Z6([], r[c].value, p, -1));
  42675. }
  42676. }, t.prototype.step = function(e, n) {
  42677. if (!this._finished) {
  42678. this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
  42679. var r = this._additiveTrack != null, i = r ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = a === Fv, c, f = this._lastFr, d = Math.min, h, p;
  42680. if (s === 1)
  42681. h = p = o[0];
  42682. else {
  42683. if (n < 0)
  42684. c = 0;
  42685. else if (n < this._lastFrP) {
  42686. var v = d(f + 1, s - 1);
  42687. for (c = v; c >= 0 && !(o[c].percent <= n); c--)
  42688. ;
  42689. c = d(c, s - 2);
  42690. } else {
  42691. for (c = f; c < s && !(o[c].percent > n); c++)
  42692. ;
  42693. c = d(c - 1, s - 2);
  42694. }
  42695. p = o[c + 1], h = o[c];
  42696. }
  42697. if (h && p) {
  42698. this._lastFr = c, this._lastFrP = n;
  42699. var g = p.percent - h.percent, m = g === 0 ? 1 : d((n - h.percent) / g, 1);
  42700. p.easingFunc && (m = p.easingFunc(m));
  42701. var y = r ? this._additiveValue : u ? tv : e[l];
  42702. if ((Uy(a) || u) && !y && (y = this._additiveValue = []), this.discrete)
  42703. e[l] = m < 1 ? h.rawValue : p.rawValue;
  42704. else if (Uy(a))
  42705. a === N_ ? YC(y, h[i], p[i], m) : oDe(y, h[i], p[i], m);
  42706. else if (X6(a)) {
  42707. var b = h[i], _ = p[i], O = a === gA;
  42708. e[l] = {
  42709. type: O ? "linear" : "radial",
  42710. x: _s(b.x, _.x, m),
  42711. y: _s(b.y, _.y, m),
  42712. colorStops: ce(b.colorStops, function(x, C) {
  42713. var T = _.colorStops[C];
  42714. return {
  42715. offset: _s(x.offset, T.offset, m),
  42716. color: L_(YC([], x.color, T.color, m))
  42717. };
  42718. }),
  42719. global: _.global
  42720. }, O ? (e[l].x2 = _s(b.x2, _.x2, m), e[l].y2 = _s(b.y2, _.y2, m)) : e[l].r = _s(b.r, _.r, m);
  42721. } else if (u)
  42722. YC(y, h[i], p[i], m), r || (e[l] = L_(y));
  42723. else {
  42724. var S = _s(h[i], p[i], m);
  42725. r ? this._additiveValue = S : e[l] = S;
  42726. }
  42727. r && this._addToTarget(e);
  42728. }
  42729. }
  42730. }, t.prototype._addToTarget = function(e) {
  42731. var n = this.valType, r = this.propName, i = this._additiveValue;
  42732. n === Zy ? e[r] = e[r] + i : n === Fv ? (qr(e[r], tv), jy(tv, tv, i, 1), e[r] = L_(tv)) : n === N_ ? jy(e[r], e[r], i, 1) : n === qq && Z6(e[r], e[r], i, 1);
  42733. }, t;
  42734. }(), CR = function() {
  42735. function t(e, n, r, i) {
  42736. if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = n, n && i) {
  42737. Oa("Can' use additive animation on looped animation.");
  42738. return;
  42739. }
  42740. this._additiveAnimators = i, this._allowDiscrete = r;
  42741. }
  42742. return t.prototype.getMaxTime = function() {
  42743. return this._maxTime;
  42744. }, t.prototype.getDelay = function() {
  42745. return this._delay;
  42746. }, t.prototype.getLoop = function() {
  42747. return this._loop;
  42748. }, t.prototype.getTarget = function() {
  42749. return this._target;
  42750. }, t.prototype.changeTarget = function(e) {
  42751. this._target = e;
  42752. }, t.prototype.when = function(e, n, r) {
  42753. return this.whenWithKeys(e, n, st(n), r);
  42754. }, t.prototype.whenWithKeys = function(e, n, r, i) {
  42755. for (var a = this._tracks, o = 0; o < r.length; o++) {
  42756. var s = r[o], l = a[s];
  42757. if (!l) {
  42758. l = a[s] = new cDe(s);
  42759. var u = void 0, c = this._getAdditiveTrack(s);
  42760. if (c) {
  42761. var f = c.keyframes, d = f[f.length - 1];
  42762. u = d && d.value, c.valType === Fv && u && (u = L_(u));
  42763. } else
  42764. u = this._target[s];
  42765. if (u == null)
  42766. continue;
  42767. e > 0 && l.addKeyframe(0, Tg(u), i), this._trackKeys.push(s);
  42768. }
  42769. l.addKeyframe(e, Tg(n[s]), i);
  42770. }
  42771. return this._maxTime = Math.max(this._maxTime, e), this;
  42772. }, t.prototype.pause = function() {
  42773. this._clip.pause(), this._paused = !0;
  42774. }, t.prototype.resume = function() {
  42775. this._clip.resume(), this._paused = !1;
  42776. }, t.prototype.isPaused = function() {
  42777. return !!this._paused;
  42778. }, t.prototype.duration = function(e) {
  42779. return this._maxTime = e, this._force = !0, this;
  42780. }, t.prototype._doneCallback = function() {
  42781. this._setTracksFinished(), this._clip = null;
  42782. var e = this._doneCbs;
  42783. if (e)
  42784. for (var n = e.length, r = 0; r < n; r++)
  42785. e[r].call(this);
  42786. }, t.prototype._abortedCallback = function() {
  42787. this._setTracksFinished();
  42788. var e = this.animation, n = this._abortedCbs;
  42789. if (e && e.removeClip(this._clip), this._clip = null, n)
  42790. for (var r = 0; r < n.length; r++)
  42791. n[r].call(this);
  42792. }, t.prototype._setTracksFinished = function() {
  42793. for (var e = this._tracks, n = this._trackKeys, r = 0; r < n.length; r++)
  42794. e[n[r]].setFinished();
  42795. }, t.prototype._getAdditiveTrack = function(e) {
  42796. var n, r = this._additiveAnimators;
  42797. if (r)
  42798. for (var i = 0; i < r.length; i++) {
  42799. var a = r[i].getTrack(e);
  42800. a && (n = a);
  42801. }
  42802. return n;
  42803. }, t.prototype.start = function(e) {
  42804. if (!(this._started > 0)) {
  42805. this._started = 1;
  42806. for (var n = this, r = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) {
  42807. var o = this._trackKeys[a], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, c = u.length;
  42808. if (s.prepare(i, l), s.needsAnimate())
  42809. if (!this._allowDiscrete && s.discrete) {
  42810. var f = u[c - 1];
  42811. f && (n._target[s.propName] = f.rawValue), s.setFinished();
  42812. } else
  42813. r.push(s);
  42814. }
  42815. if (r.length || this._force) {
  42816. var d = new HIe({
  42817. life: i,
  42818. loop: this._loop,
  42819. delay: this._delay || 0,
  42820. onframe: function(h) {
  42821. n._started = 2;
  42822. var p = n._additiveAnimators;
  42823. if (p) {
  42824. for (var v = !1, g = 0; g < p.length; g++)
  42825. if (p[g]._clip) {
  42826. v = !0;
  42827. break;
  42828. }
  42829. v || (n._additiveAnimators = null);
  42830. }
  42831. for (var g = 0; g < r.length; g++)
  42832. r[g].step(n._target, h);
  42833. var m = n._onframeCbs;
  42834. if (m)
  42835. for (var g = 0; g < m.length; g++)
  42836. m[g](n._target, h);
  42837. },
  42838. ondestroy: function() {
  42839. n._doneCallback();
  42840. }
  42841. });
  42842. this._clip = d, this.animation && this.animation.addClip(d), e && d.setEasing(e);
  42843. } else
  42844. this._doneCallback();
  42845. return this;
  42846. }
  42847. }, t.prototype.stop = function(e) {
  42848. if (this._clip) {
  42849. var n = this._clip;
  42850. e && n.onframe(1), this._abortedCallback();
  42851. }
  42852. }, t.prototype.delay = function(e) {
  42853. return this._delay = e, this;
  42854. }, t.prototype.during = function(e) {
  42855. return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
  42856. }, t.prototype.done = function(e) {
  42857. return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
  42858. }, t.prototype.aborted = function(e) {
  42859. return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
  42860. }, t.prototype.getClip = function() {
  42861. return this._clip;
  42862. }, t.prototype.getTrack = function(e) {
  42863. return this._tracks[e];
  42864. }, t.prototype.getTracks = function() {
  42865. var e = this;
  42866. return ce(this._trackKeys, function(n) {
  42867. return e._tracks[n];
  42868. });
  42869. }, t.prototype.stopTracks = function(e, n) {
  42870. if (!e.length || !this._clip)
  42871. return !0;
  42872. for (var r = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) {
  42873. var o = r[e[a]];
  42874. o && !o.isFinished() && (n ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
  42875. }
  42876. for (var s = !0, a = 0; a < i.length; a++)
  42877. if (!r[i[a]].isFinished()) {
  42878. s = !1;
  42879. break;
  42880. }
  42881. return s && this._abortedCallback(), s;
  42882. }, t.prototype.saveTo = function(e, n, r) {
  42883. if (e) {
  42884. n = n || this._trackKeys;
  42885. for (var i = 0; i < n.length; i++) {
  42886. var a = n[i], o = this._tracks[a];
  42887. if (!(!o || o.isFinished())) {
  42888. var s = o.keyframes, l = s[r ? 0 : s.length - 1];
  42889. l && (e[a] = Tg(l.rawValue));
  42890. }
  42891. }
  42892. }
  42893. }, t.prototype.__changeFinalValue = function(e, n) {
  42894. n = n || st(e);
  42895. for (var r = 0; r < n.length; r++) {
  42896. var i = n[r], a = this._tracks[i];
  42897. if (a) {
  42898. var o = a.keyframes;
  42899. if (o.length > 1) {
  42900. var s = o.pop();
  42901. a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack());
  42902. }
  42903. }
  42904. }
  42905. }, t;
  42906. }();
  42907. function zd() {
  42908. return (/* @__PURE__ */ new Date()).getTime();
  42909. }
  42910. var fDe = function(t) {
  42911. q(e, t);
  42912. function e(n) {
  42913. var r = t.call(this) || this;
  42914. return r._running = !1, r._time = 0, r._pausedTime = 0, r._pauseStart = 0, r._paused = !1, n = n || {}, r.stage = n.stage || {}, r;
  42915. }
  42916. return e.prototype.addClip = function(n) {
  42917. 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;
  42918. }, e.prototype.addAnimator = function(n) {
  42919. n.animation = this;
  42920. var r = n.getClip();
  42921. r && this.addClip(r);
  42922. }, e.prototype.removeClip = function(n) {
  42923. if (n.animation) {
  42924. var r = n.prev, i = n.next;
  42925. r ? r.next = i : this._head = i, i ? i.prev = r : this._tail = r, n.next = n.prev = n.animation = null;
  42926. }
  42927. }, e.prototype.removeAnimator = function(n) {
  42928. var r = n.getClip();
  42929. r && this.removeClip(r), n.animation = null;
  42930. }, e.prototype.update = function(n) {
  42931. for (var r = zd() - this._pausedTime, i = r - this._time, a = this._head; a; ) {
  42932. var o = a.next, s = a.step(r, i);
  42933. s && (a.ondestroy(), this.removeClip(a)), a = o;
  42934. }
  42935. this._time = r, n || (this.trigger("frame", i), this.stage.update && this.stage.update());
  42936. }, e.prototype._startLoop = function() {
  42937. var n = this;
  42938. this._running = !0;
  42939. function r() {
  42940. n._running && (Y1(r), !n._paused && n.update());
  42941. }
  42942. Y1(r);
  42943. }, e.prototype.start = function() {
  42944. this._running || (this._time = zd(), this._pausedTime = 0, this._startLoop());
  42945. }, e.prototype.stop = function() {
  42946. this._running = !1;
  42947. }, e.prototype.pause = function() {
  42948. this._paused || (this._pauseStart = zd(), this._paused = !0);
  42949. }, e.prototype.resume = function() {
  42950. this._paused && (this._pausedTime += zd() - this._pauseStart, this._paused = !1);
  42951. }, e.prototype.clear = function() {
  42952. for (var n = this._head; n; ) {
  42953. var r = n.next;
  42954. n.prev = n.next = n.animation = null, n = r;
  42955. }
  42956. this._head = this._tail = null;
  42957. }, e.prototype.isFinished = function() {
  42958. return this._head == null;
  42959. }, e.prototype.animate = function(n, r) {
  42960. r = r || {}, this.start();
  42961. var i = new CR(n, r.loop);
  42962. return this.addAnimator(i), i;
  42963. }, e;
  42964. }(Ra), dDe = 300, qC = vt.domSupported, KC = function() {
  42965. var t = [
  42966. "click",
  42967. "dblclick",
  42968. "mousewheel",
  42969. "wheel",
  42970. "mouseout",
  42971. "mouseup",
  42972. "mousedown",
  42973. "mousemove",
  42974. "contextmenu"
  42975. ], e = [
  42976. "touchstart",
  42977. "touchend",
  42978. "touchmove"
  42979. ], n = {
  42980. pointerdown: 1,
  42981. pointerup: 1,
  42982. pointermove: 1,
  42983. pointerout: 1
  42984. }, r = ce(t, function(i) {
  42985. var a = i.replace("mouse", "pointer");
  42986. return n.hasOwnProperty(a) ? a : i;
  42987. });
  42988. return {
  42989. mouse: t,
  42990. touch: e,
  42991. pointer: r
  42992. };
  42993. }(), Y6 = {
  42994. mouse: ["mousemove", "mouseup"],
  42995. pointer: ["pointermove", "pointerup"]
  42996. }, q6 = !1;
  42997. function yA(t) {
  42998. var e = t.pointerType;
  42999. return e === "pen" || e === "touch";
  43000. }
  43001. function hDe(t) {
  43002. t.touching = !0, t.touchTimer != null && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function() {
  43003. t.touching = !1, t.touchTimer = null;
  43004. }, 700);
  43005. }
  43006. function JC(t) {
  43007. t && (t.zrByTouch = !0);
  43008. }
  43009. function pDe(t, e) {
  43010. return sa(t.dom, new vDe(t, e), !0);
  43011. }
  43012. function Kq(t, e) {
  43013. for (var n = e, r = !1; n && n.nodeType !== 9 && !(r = n.domBelongToZr || n !== e && n === t.painterRoot); )
  43014. n = n.parentNode;
  43015. return r;
  43016. }
  43017. var vDe = /* @__PURE__ */ function() {
  43018. function t(e, n) {
  43019. 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;
  43020. }
  43021. return t;
  43022. }(), Ga = {
  43023. mousedown: function(t) {
  43024. t = sa(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t);
  43025. },
  43026. mousemove: function(t) {
  43027. t = sa(this.dom, t);
  43028. var e = this.__mayPointerCapture;
  43029. e && (t.zrX !== e[0] || t.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", t);
  43030. },
  43031. mouseup: function(t) {
  43032. t = sa(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t);
  43033. },
  43034. mouseout: function(t) {
  43035. t = sa(this.dom, t);
  43036. var e = t.toElement || t.relatedTarget;
  43037. Kq(this, e) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t));
  43038. },
  43039. wheel: function(t) {
  43040. q6 = !0, t = sa(this.dom, t), this.trigger("mousewheel", t);
  43041. },
  43042. mousewheel: function(t) {
  43043. q6 || (t = sa(this.dom, t), this.trigger("mousewheel", t));
  43044. },
  43045. touchstart: function(t) {
  43046. t = sa(this.dom, t), JC(t), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(t, "start"), Ga.mousemove.call(this, t), Ga.mousedown.call(this, t);
  43047. },
  43048. touchmove: function(t) {
  43049. t = sa(this.dom, t), JC(t), this.handler.processGesture(t, "change"), Ga.mousemove.call(this, t);
  43050. },
  43051. touchend: function(t) {
  43052. t = sa(this.dom, t), JC(t), this.handler.processGesture(t, "end"), Ga.mouseup.call(this, t), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < dDe && Ga.click.call(this, t);
  43053. },
  43054. pointerdown: function(t) {
  43055. Ga.mousedown.call(this, t);
  43056. },
  43057. pointermove: function(t) {
  43058. yA(t) || Ga.mousemove.call(this, t);
  43059. },
  43060. pointerup: function(t) {
  43061. Ga.mouseup.call(this, t);
  43062. },
  43063. pointerout: function(t) {
  43064. yA(t) || Ga.mouseout.call(this, t);
  43065. }
  43066. };
  43067. k(["click", "dblclick", "contextmenu"], function(t) {
  43068. Ga[t] = function(e) {
  43069. e = sa(this.dom, e), this.trigger(t, e);
  43070. };
  43071. });
  43072. var bA = {
  43073. pointermove: function(t) {
  43074. yA(t) || bA.mousemove.call(this, t);
  43075. },
  43076. pointerup: function(t) {
  43077. bA.mouseup.call(this, t);
  43078. },
  43079. mousemove: function(t) {
  43080. this.trigger("mousemove", t);
  43081. },
  43082. mouseup: function(t) {
  43083. var e = this.__pointerCapturing;
  43084. this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t));
  43085. }
  43086. };
  43087. function gDe(t, e) {
  43088. var n = e.domHandlers;
  43089. vt.pointerEventsSupported ? k(KC.pointer, function(r) {
  43090. B_(e, r, function(i) {
  43091. n[r].call(t, i);
  43092. });
  43093. }) : (vt.touchEventsSupported && k(KC.touch, function(r) {
  43094. B_(e, r, function(i) {
  43095. n[r].call(t, i), hDe(e);
  43096. });
  43097. }), k(KC.mouse, function(r) {
  43098. B_(e, r, function(i) {
  43099. i = OR(i), e.touching || n[r].call(t, i);
  43100. });
  43101. }));
  43102. }
  43103. function mDe(t, e) {
  43104. vt.pointerEventsSupported ? k(Y6.pointer, n) : vt.touchEventsSupported || k(Y6.mouse, n);
  43105. function n(r) {
  43106. function i(a) {
  43107. a = OR(a), Kq(t, a.target) || (a = pDe(t, a), e.domHandlers[r].call(t, a));
  43108. }
  43109. B_(e, r, i, { capture: !0 });
  43110. }
  43111. }
  43112. function B_(t, e, n, r) {
  43113. t.mounted[e] = n, t.listenerOpts[e] = r, cA(t.domTarget, e, n, r);
  43114. }
  43115. function eT(t) {
  43116. var e = t.mounted;
  43117. for (var n in e)
  43118. e.hasOwnProperty(n) && TIe(t.domTarget, n, e[n], t.listenerOpts[n]);
  43119. t.mounted = {};
  43120. }
  43121. var K6 = /* @__PURE__ */ function() {
  43122. function t(e, n) {
  43123. this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = n;
  43124. }
  43125. return t;
  43126. }(), yDe = function(t) {
  43127. q(e, t);
  43128. function e(n, r) {
  43129. var i = t.call(this) || this;
  43130. return i.__pointerCapturing = !1, i.dom = n, i.painterRoot = r, i._localHandlerScope = new K6(n, Ga), qC && (i._globalHandlerScope = new K6(document, bA)), gDe(i, i._localHandlerScope), i;
  43131. }
  43132. return e.prototype.dispose = function() {
  43133. eT(this._localHandlerScope), qC && eT(this._globalHandlerScope);
  43134. }, e.prototype.setCursor = function(n) {
  43135. this.dom.style && (this.dom.style.cursor = n || "default");
  43136. }, e.prototype.__togglePointerCapture = function(n) {
  43137. if (this.__mayPointerCapture = null, qC && +this.__pointerCapturing ^ +n) {
  43138. this.__pointerCapturing = n;
  43139. var r = this._globalHandlerScope;
  43140. n ? mDe(this, r) : eT(r);
  43141. }
  43142. }, e;
  43143. }(Ra), Jq = 1;
  43144. vt.hasGlobalWindow && (Jq = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
  43145. var nO = Jq, _A = 0.4, OA = "#333", SA = "#ccc", bDe = "#eee", J6 = D0, eB = 5e-5;
  43146. function Qu(t) {
  43147. return t > eB || t < -eB;
  43148. }
  43149. var Hu = [], nd = [], tT = Si(), nT = Math.abs, _De = function() {
  43150. function t() {
  43151. }
  43152. return t.prototype.getLocalTransform = function(e) {
  43153. return t.getLocalTransform(this, e);
  43154. }, t.prototype.setPosition = function(e) {
  43155. this.x = e[0], this.y = e[1];
  43156. }, t.prototype.setScale = function(e) {
  43157. this.scaleX = e[0], this.scaleY = e[1];
  43158. }, t.prototype.setSkew = function(e) {
  43159. this.skewX = e[0], this.skewY = e[1];
  43160. }, t.prototype.setOrigin = function(e) {
  43161. this.originX = e[0], this.originY = e[1];
  43162. }, t.prototype.needLocalTransform = function() {
  43163. return Qu(this.rotation) || Qu(this.x) || Qu(this.y) || Qu(this.scaleX - 1) || Qu(this.scaleY - 1) || Qu(this.skewX) || Qu(this.skewY);
  43164. }, t.prototype.updateTransform = function() {
  43165. var e = this.parent && this.parent.transform, n = this.needLocalTransform(), r = this.transform;
  43166. if (!(n || e)) {
  43167. r && (J6(r), this.invTransform = null);
  43168. return;
  43169. }
  43170. r = r || Si(), n ? this.getLocalTransform(r) : J6(r), e && (n ? Uo(r, e, r) : Lx(r, e)), this.transform = r, this._resolveGlobalScaleRatio(r);
  43171. }, t.prototype._resolveGlobalScaleRatio = function(e) {
  43172. var n = this.globalScaleRatio;
  43173. if (n != null && n !== 1) {
  43174. this.getGlobalScale(Hu);
  43175. 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;
  43176. e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o;
  43177. }
  43178. this.invTransform = this.invTransform || Si(), kf(this.invTransform, e);
  43179. }, t.prototype.getComputedTransform = function() {
  43180. for (var e = this, n = []; e; )
  43181. n.push(e), e = e.parent;
  43182. for (; e = n.pop(); )
  43183. e.updateTransform();
  43184. return this.transform;
  43185. }, t.prototype.setLocalTransform = function(e) {
  43186. if (e) {
  43187. 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]);
  43188. 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;
  43189. }
  43190. }, t.prototype.decomposeTransform = function() {
  43191. if (this.transform) {
  43192. var e = this.parent, n = this.transform;
  43193. e && e.transform && (e.invTransform = e.invTransform || Si(), Uo(nd, e.invTransform, n), n = nd);
  43194. var r = this.originX, i = this.originY;
  43195. (r || i) && (tT[4] = r, tT[5] = i, Uo(nd, n, tT), nd[4] -= r, nd[5] -= i, n = nd), this.setLocalTransform(n);
  43196. }
  43197. }, t.prototype.getGlobalScale = function(e) {
  43198. var n = this.transform;
  43199. 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);
  43200. }, t.prototype.transformCoordToLocal = function(e, n) {
  43201. var r = [e, n], i = this.invTransform;
  43202. return i && ar(r, r, i), r;
  43203. }, t.prototype.transformCoordToGlobal = function(e, n) {
  43204. var r = [e, n], i = this.transform;
  43205. return i && ar(r, r, i), r;
  43206. }, t.prototype.getLineScale = function() {
  43207. var e = this.transform;
  43208. return e && nT(e[0] - 1) > 1e-10 && nT(e[3] - 1) > 1e-10 ? Math.sqrt(nT(e[0] * e[3] - e[2] * e[1])) : 1;
  43209. }, t.prototype.copyTransform = function(e) {
  43210. eK(this, e);
  43211. }, t.getLocalTransform = function(e, n) {
  43212. n = n || [];
  43213. 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;
  43214. if (r || i || s || l) {
  43215. var p = r + s, v = i + l;
  43216. n[4] = -p * a - d * v * o, n[5] = -v * o - h * p * a;
  43217. } else
  43218. n[4] = n[5] = 0;
  43219. 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;
  43220. }, t.initDefaultProps = function() {
  43221. var e = t.prototype;
  43222. 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;
  43223. }(), t;
  43224. }(), rs = [
  43225. "x",
  43226. "y",
  43227. "originX",
  43228. "originY",
  43229. "anchorX",
  43230. "anchorY",
  43231. "rotation",
  43232. "scaleX",
  43233. "scaleY",
  43234. "skewX",
  43235. "skewY"
  43236. ];
  43237. function eK(t, e) {
  43238. for (var n = 0; n < rs.length; n++) {
  43239. var r = rs[n];
  43240. t[r] = e[r];
  43241. }
  43242. }
  43243. const As = _De;
  43244. var tB = {};
  43245. function Zi(t, e) {
  43246. e = e || iu;
  43247. var n = tB[e];
  43248. n || (n = tB[e] = new R0(500));
  43249. var r = n.get(t);
  43250. return r == null && (r = io.measureText(t, e).width, n.put(t, r)), r;
  43251. }
  43252. function nB(t, e, n, r) {
  43253. var i = Zi(t, e), a = zx(e), o = Wv(0, i, n), s = Ad(0, a, r), l = new Je(o, s, i, a);
  43254. return l;
  43255. }
  43256. function k0(t, e, n, r) {
  43257. var i = ((t || "") + "").split(`
  43258. `), a = i.length;
  43259. if (a === 1)
  43260. return nB(i[0], e, n, r);
  43261. for (var o = new Je(0, 0, 0, 0), s = 0; s < i.length; s++) {
  43262. var l = nB(i[s], e, n, r);
  43263. s === 0 ? o.copy(l) : o.union(l);
  43264. }
  43265. return o;
  43266. }
  43267. function Wv(t, e, n) {
  43268. return n === "right" ? t -= e : n === "center" && (t -= e / 2), t;
  43269. }
  43270. function Ad(t, e, n) {
  43271. return n === "middle" ? t -= e / 2 : n === "bottom" && (t -= e), t;
  43272. }
  43273. function zx(t) {
  43274. return Zi("国", t);
  43275. }
  43276. function oo(t, e) {
  43277. return typeof t == "string" ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
  43278. }
  43279. function rO(t, e, n) {
  43280. 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";
  43281. if (r instanceof Array)
  43282. l += oo(r[0], n.width), u += oo(r[1], n.height), c = null, f = null;
  43283. else
  43284. switch (r) {
  43285. case "left":
  43286. l -= i, u += s, c = "right", f = "middle";
  43287. break;
  43288. case "right":
  43289. l += i + o, u += s, f = "middle";
  43290. break;
  43291. case "top":
  43292. l += o / 2, u -= i, c = "center", f = "bottom";
  43293. break;
  43294. case "bottom":
  43295. l += o / 2, u += a + i, c = "center";
  43296. break;
  43297. case "inside":
  43298. l += o / 2, u += s, c = "center", f = "middle";
  43299. break;
  43300. case "insideLeft":
  43301. l += i, u += s, f = "middle";
  43302. break;
  43303. case "insideRight":
  43304. l += o - i, u += s, c = "right", f = "middle";
  43305. break;
  43306. case "insideTop":
  43307. l += o / 2, u += i, c = "center";
  43308. break;
  43309. case "insideBottom":
  43310. l += o / 2, u += a - i, c = "center", f = "bottom";
  43311. break;
  43312. case "insideTopLeft":
  43313. l += i, u += i;
  43314. break;
  43315. case "insideTopRight":
  43316. l += o - i, u += i, c = "right";
  43317. break;
  43318. case "insideBottomLeft":
  43319. l += i, u += a - i, f = "bottom";
  43320. break;
  43321. case "insideBottomRight":
  43322. l += o - i, u += a - i, c = "right", f = "bottom";
  43323. break;
  43324. }
  43325. return t = t || {}, t.x = l, t.y = u, t.align = c, t.verticalAlign = f, t;
  43326. }
  43327. var rT = "__zr_normal__", iT = rs.concat(["ignore"]), ODe = Aa(rs, function(t, e) {
  43328. return t[e] = !0, t;
  43329. }, { ignore: !1 }), rd = {}, SDe = new Je(0, 0, 0, 0), Vx = function() {
  43330. function t(e) {
  43331. this.id = gR(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
  43332. }
  43333. return t.prototype._init = function(e) {
  43334. this.attr(e);
  43335. }, t.prototype.drift = function(e, n, r) {
  43336. switch (this.draggable) {
  43337. case "horizontal":
  43338. n = 0;
  43339. break;
  43340. case "vertical":
  43341. e = 0;
  43342. break;
  43343. }
  43344. var i = this.transform;
  43345. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += n, this.decomposeTransform(), this.markRedraw();
  43346. }, t.prototype.beforeUpdate = function() {
  43347. }, t.prototype.afterUpdate = function() {
  43348. }, t.prototype.update = function() {
  43349. this.updateTransform(), this.__dirty && this.updateInnerText();
  43350. }, t.prototype.updateInnerText = function(e) {
  43351. var n = this._textContent;
  43352. if (n && (!n.ignore || e)) {
  43353. this.textConfig || (this.textConfig = {});
  43354. var r = this.textConfig, i = r.local, a = n.innerTransformable, o = void 0, s = void 0, l = !1;
  43355. a.parent = i ? this : null;
  43356. var u = !1;
  43357. if (a.copyTransform(n), r.position != null) {
  43358. var c = SDe;
  43359. r.layoutRect ? c.copy(r.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(rd, r, c) : rO(rd, r, c), a.x = rd.x, a.y = rd.y, o = rd.align, s = rd.verticalAlign;
  43360. var f = r.origin;
  43361. if (f && r.rotation != null) {
  43362. var d = void 0, h = void 0;
  43363. f === "center" ? (d = c.width * 0.5, h = c.height * 0.5) : (d = oo(f[0], c.width), h = oo(f[1], c.height)), u = !0, a.originX = -a.x + d + (i ? 0 : c.x), a.originY = -a.y + h + (i ? 0 : c.y);
  43364. }
  43365. }
  43366. r.rotation != null && (a.rotation = r.rotation);
  43367. var p = r.offset;
  43368. p && (a.x += p[0], a.y += p[1], u || (a.originX = -p[0], a.originY = -p[1]));
  43369. 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;
  43370. 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 |= ki, l && n.dirtyStyle(!0);
  43371. }
  43372. }, t.prototype.canBeInsideText = function() {
  43373. return !0;
  43374. }, t.prototype.getInsideTextFill = function() {
  43375. return "#fff";
  43376. }, t.prototype.getInsideTextStroke = function(e) {
  43377. return "#000";
  43378. }, t.prototype.getOutsideFill = function() {
  43379. return this.__zr && this.__zr.isDarkMode() ? SA : OA;
  43380. }, t.prototype.getOutsideStroke = function(e) {
  43381. var n = this.__zr && this.__zr.getBackgroundColor(), r = typeof n == "string" && qr(n);
  43382. r || (r = [255, 255, 255, 1]);
  43383. for (var i = r[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++)
  43384. r[o] = r[o] * i + (a ? 0 : 255) * (1 - i);
  43385. return r[3] = 1, eo(r, "rgba");
  43386. }, t.prototype.traverse = function(e, n) {
  43387. }, t.prototype.attrKV = function(e, n) {
  43388. 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;
  43389. }, t.prototype.hide = function() {
  43390. this.ignore = !0, this.markRedraw();
  43391. }, t.prototype.show = function() {
  43392. this.ignore = !1, this.markRedraw();
  43393. }, t.prototype.attr = function(e, n) {
  43394. if (typeof e == "string")
  43395. this.attrKV(e, n);
  43396. else if (Ie(e))
  43397. for (var r = e, i = st(r), a = 0; a < i.length; a++) {
  43398. var o = i[a];
  43399. this.attrKV(o, e[o]);
  43400. }
  43401. return this.markRedraw(), this;
  43402. }, t.prototype.saveCurrentToNormalState = function(e) {
  43403. this._innerSaveToNormal(e);
  43404. for (var n = this._normalState, r = 0; r < this.animators.length; r++) {
  43405. var i = this.animators[r], a = i.__fromStateTransition;
  43406. if (!(i.getLoop() || a && a !== rT)) {
  43407. var o = i.targetName, s = o ? n[o] : n;
  43408. i.saveTo(s);
  43409. }
  43410. }
  43411. }, t.prototype._innerSaveToNormal = function(e) {
  43412. var n = this._normalState;
  43413. n || (n = this._normalState = {}), e.textConfig && !n.textConfig && (n.textConfig = this.textConfig), this._savePrimaryToNormal(e, n, iT);
  43414. }, t.prototype._savePrimaryToNormal = function(e, n, r) {
  43415. for (var i = 0; i < r.length; i++) {
  43416. var a = r[i];
  43417. e[a] != null && !(a in n) && (n[a] = this[a]);
  43418. }
  43419. }, t.prototype.hasState = function() {
  43420. return this.currentStates.length > 0;
  43421. }, t.prototype.getState = function(e) {
  43422. return this.states[e];
  43423. }, t.prototype.ensureState = function(e) {
  43424. var n = this.states;
  43425. return n[e] || (n[e] = {}), n[e];
  43426. }, t.prototype.clearStates = function(e) {
  43427. this.useState(rT, !1, e);
  43428. }, t.prototype.useState = function(e, n, r, i) {
  43429. var a = e === rT, o = this.hasState();
  43430. if (!(!o && a)) {
  43431. var s = this.currentStates, l = this.stateTransition;
  43432. if (!(et(s, e) >= 0 && (n || s.length === 1))) {
  43433. var u;
  43434. if (this.stateProxy && !a && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !a) {
  43435. Oa("State " + e + " not exists.");
  43436. return;
  43437. }
  43438. a || this.saveCurrentToNormalState(u);
  43439. var c = !!(u && u.hoverLayer || i);
  43440. c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, n, !r && !this.__inHover && l && l.duration > 0, l);
  43441. var f = this._textContent, d = this._textGuide;
  43442. 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 &= ~ki), u;
  43443. }
  43444. }
  43445. }, t.prototype.useStates = function(e, n, r) {
  43446. if (!e.length)
  43447. this.clearStates();
  43448. else {
  43449. var i = [], a = this.currentStates, o = e.length, s = o === a.length;
  43450. if (s) {
  43451. for (var l = 0; l < o; l++)
  43452. if (e[l] !== a[l]) {
  43453. s = !1;
  43454. break;
  43455. }
  43456. }
  43457. if (s)
  43458. return;
  43459. for (var l = 0; l < o; l++) {
  43460. var u = e[l], c = void 0;
  43461. this.stateProxy && (c = this.stateProxy(u, e)), c || (c = this.states[u]), c && i.push(c);
  43462. }
  43463. var f = i[o - 1], d = !!(f && f.hoverLayer || r);
  43464. d && this._toggleHoverLayerFlag(!0);
  43465. var h = this._mergeStates(i), p = this.stateTransition;
  43466. this.saveCurrentToNormalState(h), this._applyStateObj(e.join(","), h, this._normalState, !1, !n && !this.__inHover && p && p.duration > 0, p);
  43467. var v = this._textContent, g = this._textGuide;
  43468. 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 &= ~ki);
  43469. }
  43470. }, t.prototype.isSilent = function() {
  43471. for (var e = this.silent, n = this.parent; !e && n; ) {
  43472. if (n.silent) {
  43473. e = !0;
  43474. break;
  43475. }
  43476. n = n.parent;
  43477. }
  43478. return e;
  43479. }, t.prototype._updateAnimationTargets = function() {
  43480. for (var e = 0; e < this.animators.length; e++) {
  43481. var n = this.animators[e];
  43482. n.targetName && n.changeTarget(this[n.targetName]);
  43483. }
  43484. }, t.prototype.removeState = function(e) {
  43485. var n = et(this.currentStates, e);
  43486. if (n >= 0) {
  43487. var r = this.currentStates.slice();
  43488. r.splice(n, 1), this.useStates(r);
  43489. }
  43490. }, t.prototype.replaceState = function(e, n, r) {
  43491. var i = this.currentStates.slice(), a = et(i, e), o = et(i, n) >= 0;
  43492. a >= 0 ? o ? i.splice(a, 1) : i[a] = n : r && !o && i.push(n), this.useStates(i);
  43493. }, t.prototype.toggleState = function(e, n) {
  43494. n ? this.useState(e, !0) : this.removeState(e);
  43495. }, t.prototype._mergeStates = function(e) {
  43496. for (var n = {}, r, i = 0; i < e.length; i++) {
  43497. var a = e[i];
  43498. le(n, a), a.textConfig && (r = r || {}, le(r, a.textConfig));
  43499. }
  43500. return r && (n.textConfig = r), n;
  43501. }, t.prototype._applyStateObj = function(e, n, r, i, a, o) {
  43502. var s = !(n && i);
  43503. n && n.textConfig ? (this.textConfig = le({}, i ? this.textConfig : r.textConfig), le(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
  43504. for (var l = {}, u = !1, c = 0; c < iT.length; c++) {
  43505. var f = iT[c], d = a && ODe[f];
  43506. 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]);
  43507. }
  43508. if (!a)
  43509. for (var c = 0; c < this.animators.length; c++) {
  43510. var h = this.animators[c], p = h.targetName;
  43511. h.getLoop() || h.__changeFinalValue(p ? (n || r)[p] : n || r);
  43512. }
  43513. u && this._transitionState(e, l, o);
  43514. }, t.prototype._attachComponent = function(e) {
  43515. if (e.__zr && !e.__hostTarget) {
  43516. if (process.env.NODE_ENV !== "production")
  43517. throw new Error("Text element has been added to zrender.");
  43518. return;
  43519. }
  43520. if (e === this) {
  43521. if (process.env.NODE_ENV !== "production")
  43522. throw new Error("Recursive component attachment.");
  43523. return;
  43524. }
  43525. var n = this.__zr;
  43526. n && e.addSelfToZr(n), e.__zr = n, e.__hostTarget = this;
  43527. }, t.prototype._detachComponent = function(e) {
  43528. e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
  43529. }, t.prototype.getClipPath = function() {
  43530. return this._clipPath;
  43531. }, t.prototype.setClipPath = function(e) {
  43532. this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
  43533. }, t.prototype.removeClipPath = function() {
  43534. var e = this._clipPath;
  43535. e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
  43536. }, t.prototype.getTextContent = function() {
  43537. return this._textContent;
  43538. }, t.prototype.setTextContent = function(e) {
  43539. var n = this._textContent;
  43540. if (n !== e) {
  43541. if (n && n !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
  43542. throw new Error("Text element has been added to zrender.");
  43543. e.innerTransformable = new As(), this._attachComponent(e), this._textContent = e, this.markRedraw();
  43544. }
  43545. }, t.prototype.setTextConfig = function(e) {
  43546. this.textConfig || (this.textConfig = {}), le(this.textConfig, e), this.markRedraw();
  43547. }, t.prototype.removeTextConfig = function() {
  43548. this.textConfig = null, this.markRedraw();
  43549. }, t.prototype.removeTextContent = function() {
  43550. var e = this._textContent;
  43551. e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
  43552. }, t.prototype.getTextGuideLine = function() {
  43553. return this._textGuide;
  43554. }, t.prototype.setTextGuideLine = function(e) {
  43555. this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
  43556. }, t.prototype.removeTextGuideLine = function() {
  43557. var e = this._textGuide;
  43558. e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
  43559. }, t.prototype.markRedraw = function() {
  43560. this.__dirty |= ki;
  43561. var e = this.__zr;
  43562. e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
  43563. }, t.prototype.dirty = function() {
  43564. this.markRedraw();
  43565. }, t.prototype._toggleHoverLayerFlag = function(e) {
  43566. this.__inHover = e;
  43567. var n = this._textContent, r = this._textGuide;
  43568. n && (n.__inHover = e), r && (r.__inHover = e);
  43569. }, t.prototype.addSelfToZr = function(e) {
  43570. if (this.__zr !== e) {
  43571. this.__zr = e;
  43572. var n = this.animators;
  43573. if (n)
  43574. for (var r = 0; r < n.length; r++)
  43575. e.animation.addAnimator(n[r]);
  43576. this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
  43577. }
  43578. }, t.prototype.removeSelfFromZr = function(e) {
  43579. if (this.__zr) {
  43580. this.__zr = null;
  43581. var n = this.animators;
  43582. if (n)
  43583. for (var r = 0; r < n.length; r++)
  43584. e.animation.removeAnimator(n[r]);
  43585. this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
  43586. }
  43587. }, t.prototype.animate = function(e, n, r) {
  43588. var i = e ? this[e] : this;
  43589. if (process.env.NODE_ENV !== "production" && !i) {
  43590. Oa('Property "' + e + '" is not existed in element ' + this.id);
  43591. return;
  43592. }
  43593. var a = new CR(i, n, r);
  43594. return e && (a.targetName = e), this.addAnimator(a, e), a;
  43595. }, t.prototype.addAnimator = function(e, n) {
  43596. var r = this.__zr, i = this;
  43597. e.during(function() {
  43598. i.updateDuringAnimation(n);
  43599. }).done(function() {
  43600. var a = i.animators, o = et(a, e);
  43601. o >= 0 && a.splice(o, 1);
  43602. }), this.animators.push(e), r && r.animation.addAnimator(e), r && r.wakeUp();
  43603. }, t.prototype.updateDuringAnimation = function(e) {
  43604. this.markRedraw();
  43605. }, t.prototype.stopAnimation = function(e, n) {
  43606. for (var r = this.animators, i = r.length, a = [], o = 0; o < i; o++) {
  43607. var s = r[o];
  43608. !e || e === s.scope ? s.stop(n) : a.push(s);
  43609. }
  43610. return this.animators = a, this;
  43611. }, t.prototype.animateTo = function(e, n, r) {
  43612. aT(this, e, n, r);
  43613. }, t.prototype.animateFrom = function(e, n, r) {
  43614. aT(this, e, n, r, !0);
  43615. }, t.prototype._transitionState = function(e, n, r, i) {
  43616. for (var a = aT(this, n, r, i), o = 0; o < a.length; o++)
  43617. a[o].__fromStateTransition = e;
  43618. }, t.prototype.getBoundingRect = function() {
  43619. return null;
  43620. }, t.prototype.getPaintRect = function() {
  43621. return null;
  43622. }, t.initDefaultProps = function() {
  43623. var e = t.prototype;
  43624. e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = ki;
  43625. var n = {};
  43626. function r(a, o, s) {
  43627. n[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), n[a + o + s] = !0);
  43628. }
  43629. function i(a, o, s, l) {
  43630. Object.defineProperty(e, a, {
  43631. get: function() {
  43632. if (process.env.NODE_ENV !== "production" && r(a, s, l), !this[o]) {
  43633. var c = this[o] = [];
  43634. u(this, c);
  43635. }
  43636. return this[o];
  43637. },
  43638. set: function(c) {
  43639. process.env.NODE_ENV !== "production" && r(a, s, l), this[s] = c[0], this[l] = c[1], this[o] = c, u(this, c);
  43640. }
  43641. });
  43642. function u(c, f) {
  43643. Object.defineProperty(f, 0, {
  43644. get: function() {
  43645. return c[s];
  43646. },
  43647. set: function(d) {
  43648. c[s] = d;
  43649. }
  43650. }), Object.defineProperty(f, 1, {
  43651. get: function() {
  43652. return c[l];
  43653. },
  43654. set: function(d) {
  43655. c[l] = d;
  43656. }
  43657. });
  43658. }
  43659. }
  43660. Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
  43661. }(), t;
  43662. }();
  43663. xn(Vx, Ra);
  43664. xn(Vx, As);
  43665. function aT(t, e, n, r, i) {
  43666. n = n || {};
  43667. var a = [];
  43668. tK(t, "", t, e, n, r, a, i);
  43669. var o = a.length, s = !1, l = n.done, u = n.aborted, c = function() {
  43670. s = !0, o--, o <= 0 && (s ? l && l() : u && u());
  43671. }, f = function() {
  43672. o--, o <= 0 && (s ? l && l() : u && u());
  43673. };
  43674. o || l && l(), a.length > 0 && n.during && a[0].during(function(p, v) {
  43675. n.during(v);
  43676. });
  43677. for (var d = 0; d < a.length; d++) {
  43678. var h = a[d];
  43679. c && h.done(c), f && h.aborted(f), n.force && h.duration(n.duration), h.start(n.easing);
  43680. }
  43681. return a;
  43682. }
  43683. function oT(t, e, n) {
  43684. for (var r = 0; r < n; r++)
  43685. t[r] = e[r];
  43686. }
  43687. function xDe(t) {
  43688. return wr(t[0]);
  43689. }
  43690. function wDe(t, e, n) {
  43691. if (wr(e[n]))
  43692. if (wr(t[n]) || (t[n] = []), Nr(e[n])) {
  43693. var r = e[n].length;
  43694. t[n].length !== r && (t[n] = new e[n].constructor(r), oT(t[n], e[n], r));
  43695. } else {
  43696. var i = e[n], a = t[n], o = i.length;
  43697. if (xDe(i))
  43698. for (var s = i[0].length, l = 0; l < o; l++)
  43699. a[l] ? oT(a[l], i[l], s) : a[l] = Array.prototype.slice.call(i[l]);
  43700. else
  43701. oT(a, i, o);
  43702. a.length = i.length;
  43703. }
  43704. else
  43705. t[n] = e[n];
  43706. }
  43707. function CDe(t, e) {
  43708. return t === e || wr(t) && wr(e) && TDe(t, e);
  43709. }
  43710. function TDe(t, e) {
  43711. var n = t.length;
  43712. if (n !== e.length)
  43713. return !1;
  43714. for (var r = 0; r < n; r++)
  43715. if (t[r] !== e[r])
  43716. return !1;
  43717. return !0;
  43718. }
  43719. function tK(t, e, n, r, i, a, o, s) {
  43720. 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++) {
  43721. var m = l[g], y = r[m];
  43722. if (y != null && n[m] != null && (h || a[m]))
  43723. if (Ie(y) && !wr(y) && !M0(y)) {
  43724. if (e) {
  43725. s || (n[m] = y, t.updateDuringAnimation(e));
  43726. continue;
  43727. }
  43728. tK(t, m, n[m], y, i, a && a[m], o, s);
  43729. } else
  43730. v.push(m);
  43731. else s || (n[m] = y, t.updateDuringAnimation(e), v.push(m));
  43732. }
  43733. var b = v.length;
  43734. if (!f && b)
  43735. for (var _ = 0; _ < p.length; _++) {
  43736. var O = p[_];
  43737. if (O.targetName === e) {
  43738. var S = O.stopTracks(v);
  43739. if (S) {
  43740. var x = et(p, O);
  43741. p.splice(x, 1);
  43742. }
  43743. }
  43744. }
  43745. if (i.force || (v = Nt(v, function(P) {
  43746. return !CDe(r[P], n[P]);
  43747. }), b = v.length), b > 0 || i.force && !o.length) {
  43748. var C = void 0, T = void 0, w = void 0;
  43749. if (s) {
  43750. T = {}, d && (C = {});
  43751. for (var _ = 0; _ < b; _++) {
  43752. var m = v[_];
  43753. T[m] = n[m], d ? C[m] = r[m] : n[m] = r[m];
  43754. }
  43755. } else if (d) {
  43756. w = {};
  43757. for (var _ = 0; _ < b; _++) {
  43758. var m = v[_];
  43759. w[m] = Tg(n[m]), wDe(n, r, m);
  43760. }
  43761. }
  43762. var O = new CR(n, !1, !1, f ? Nt(p, function($) {
  43763. return $.targetName === e;
  43764. }) : null);
  43765. 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);
  43766. }
  43767. }
  43768. var nK = function(t) {
  43769. q(e, t);
  43770. function e(n) {
  43771. var r = t.call(this) || this;
  43772. return r.isGroup = !0, r._children = [], r.attr(n), r;
  43773. }
  43774. return e.prototype.childrenRef = function() {
  43775. return this._children;
  43776. }, e.prototype.children = function() {
  43777. return this._children.slice();
  43778. }, e.prototype.childAt = function(n) {
  43779. return this._children[n];
  43780. }, e.prototype.childOfName = function(n) {
  43781. for (var r = this._children, i = 0; i < r.length; i++)
  43782. if (r[i].name === n)
  43783. return r[i];
  43784. }, e.prototype.childCount = function() {
  43785. return this._children.length;
  43786. }, e.prototype.add = function(n) {
  43787. if (n && (n !== this && n.parent !== this && (this._children.push(n), this._doAdd(n)), process.env.NODE_ENV !== "production" && n.__hostTarget))
  43788. throw "This elemenet has been used as an attachment";
  43789. return this;
  43790. }, e.prototype.addBefore = function(n, r) {
  43791. if (n && n !== this && n.parent !== this && r && r.parent === this) {
  43792. var i = this._children, a = i.indexOf(r);
  43793. a >= 0 && (i.splice(a, 0, n), this._doAdd(n));
  43794. }
  43795. return this;
  43796. }, e.prototype.replace = function(n, r) {
  43797. var i = et(this._children, n);
  43798. return i >= 0 && this.replaceAt(r, i), this;
  43799. }, e.prototype.replaceAt = function(n, r) {
  43800. var i = this._children, a = i[r];
  43801. if (n && n !== this && n.parent !== this && n !== a) {
  43802. i[r] = n, a.parent = null;
  43803. var o = this.__zr;
  43804. o && a.removeSelfFromZr(o), this._doAdd(n);
  43805. }
  43806. return this;
  43807. }, e.prototype._doAdd = function(n) {
  43808. n.parent && n.parent.remove(n), n.parent = this;
  43809. var r = this.__zr;
  43810. r && r !== n.__zr && n.addSelfToZr(r), r && r.refresh();
  43811. }, e.prototype.remove = function(n) {
  43812. var r = this.__zr, i = this._children, a = et(i, n);
  43813. return a < 0 ? this : (i.splice(a, 1), n.parent = null, r && n.removeSelfFromZr(r), r && r.refresh(), this);
  43814. }, e.prototype.removeAll = function() {
  43815. for (var n = this._children, r = this.__zr, i = 0; i < n.length; i++) {
  43816. var a = n[i];
  43817. r && a.removeSelfFromZr(r), a.parent = null;
  43818. }
  43819. return n.length = 0, this;
  43820. }, e.prototype.eachChild = function(n, r) {
  43821. for (var i = this._children, a = 0; a < i.length; a++) {
  43822. var o = i[a];
  43823. n.call(r, o, a);
  43824. }
  43825. return this;
  43826. }, e.prototype.traverse = function(n, r) {
  43827. for (var i = 0; i < this._children.length; i++) {
  43828. var a = this._children[i], o = n.call(r, a);
  43829. a.isGroup && !o && a.traverse(n, r);
  43830. }
  43831. return this;
  43832. }, e.prototype.addSelfToZr = function(n) {
  43833. t.prototype.addSelfToZr.call(this, n);
  43834. for (var r = 0; r < this._children.length; r++) {
  43835. var i = this._children[r];
  43836. i.addSelfToZr(n);
  43837. }
  43838. }, e.prototype.removeSelfFromZr = function(n) {
  43839. t.prototype.removeSelfFromZr.call(this, n);
  43840. for (var r = 0; r < this._children.length; r++) {
  43841. var i = this._children[r];
  43842. i.removeSelfFromZr(n);
  43843. }
  43844. }, e.prototype.getBoundingRect = function(n) {
  43845. for (var r = new Je(0, 0, 0, 0), i = n || this._children, a = [], o = null, s = 0; s < i.length; s++) {
  43846. var l = i[s];
  43847. if (!(l.ignore || l.invisible)) {
  43848. var u = l.getBoundingRect(), c = l.getLocalTransform(a);
  43849. c ? (Je.applyTransform(r, u, c), o = o || r.clone(), o.union(r)) : (o = o || u.clone(), o.union(u));
  43850. }
  43851. }
  43852. return o || r;
  43853. }, e;
  43854. }(Vx);
  43855. nK.prototype.type = "group";
  43856. const Ve = nK;
  43857. /*!
  43858. * ZRender, a high performance 2d drawing library.
  43859. *
  43860. * Copyright (c) 2013, Baidu Inc.
  43861. * All rights reserved.
  43862. *
  43863. * LICENSE
  43864. * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
  43865. */
  43866. var Qv = {}, Rc = {};
  43867. function PDe(t) {
  43868. delete Rc[t];
  43869. }
  43870. function $De(t) {
  43871. if (!t)
  43872. return !1;
  43873. if (typeof t == "string")
  43874. return Om(t, 1) < _A;
  43875. if (t.colorStops) {
  43876. for (var e = t.colorStops, n = 0, r = e.length, i = 0; i < r; i++)
  43877. n += Om(e[i].color, 1);
  43878. return n /= r, n < _A;
  43879. }
  43880. return !1;
  43881. }
  43882. var ADe = function() {
  43883. function t(e, n, r) {
  43884. var i = this;
  43885. this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, r = r || {}, this.dom = n, this.id = e;
  43886. var a = new zIe(), o = r.renderer || "canvas";
  43887. if (Qv[o] || (o = st(Qv)[0]), process.env.NODE_ENV !== "production" && !Qv[o])
  43888. throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
  43889. r.useDirtyRect = r.useDirtyRect == null ? !1 : r.useDirtyRect;
  43890. var s = new Qv[o](n, a, r, e), l = r.ssr || s.ssrOnly;
  43891. this.storage = a, this.painter = s;
  43892. var u = !vt.node && !vt.worker && !l ? new yDe(s.getViewportRoot(), s.root) : null, c = r.useCoarsePointer, f = c == null || c === "auto" ? vt.touchEventsSupported : !!c, d = 44, h;
  43893. f && (h = We(r.pointerSize, d)), this.handler = new Rq(a, s, u, s.root, h), this.animation = new fDe({
  43894. stage: {
  43895. update: l ? null : function() {
  43896. return i._flush(!0);
  43897. }
  43898. }
  43899. }), l || this.animation.start();
  43900. }
  43901. return t.prototype.add = function(e) {
  43902. this._disposed || !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
  43903. }, t.prototype.remove = function(e) {
  43904. this._disposed || !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
  43905. }, t.prototype.configLayer = function(e, n) {
  43906. this._disposed || (this.painter.configLayer && this.painter.configLayer(e, n), this.refresh());
  43907. }, t.prototype.setBackgroundColor = function(e) {
  43908. this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = $De(e));
  43909. }, t.prototype.getBackgroundColor = function() {
  43910. return this._backgroundColor;
  43911. }, t.prototype.setDarkMode = function(e) {
  43912. this._darkMode = e;
  43913. }, t.prototype.isDarkMode = function() {
  43914. return this._darkMode;
  43915. }, t.prototype.refreshImmediately = function(e) {
  43916. this._disposed || (e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1);
  43917. }, t.prototype.refresh = function() {
  43918. this._disposed || (this._needsRefresh = !0, this.animation.start());
  43919. }, t.prototype.flush = function() {
  43920. this._disposed || this._flush(!1);
  43921. }, t.prototype._flush = function(e) {
  43922. var n, r = zd();
  43923. this._needsRefresh && (n = !0, this.refreshImmediately(e)), this._needsRefreshHover && (n = !0, this.refreshHoverImmediately());
  43924. var i = zd();
  43925. n ? (this._stillFrameAccum = 0, this.trigger("rendered", {
  43926. elapsedTime: i - r
  43927. })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
  43928. }, t.prototype.setSleepAfterStill = function(e) {
  43929. this._sleepAfterStill = e;
  43930. }, t.prototype.wakeUp = function() {
  43931. this._disposed || (this.animation.start(), this._stillFrameAccum = 0);
  43932. }, t.prototype.refreshHover = function() {
  43933. this._needsRefreshHover = !0;
  43934. }, t.prototype.refreshHoverImmediately = function() {
  43935. this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover());
  43936. }, t.prototype.resize = function(e) {
  43937. this._disposed || (e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize());
  43938. }, t.prototype.clearAnimation = function() {
  43939. this._disposed || this.animation.clear();
  43940. }, t.prototype.getWidth = function() {
  43941. if (!this._disposed)
  43942. return this.painter.getWidth();
  43943. }, t.prototype.getHeight = function() {
  43944. if (!this._disposed)
  43945. return this.painter.getHeight();
  43946. }, t.prototype.setCursorStyle = function(e) {
  43947. this._disposed || this.handler.setCursorStyle(e);
  43948. }, t.prototype.findHover = function(e, n) {
  43949. if (!this._disposed)
  43950. return this.handler.findHover(e, n);
  43951. }, t.prototype.on = function(e, n, r) {
  43952. return this._disposed || this.handler.on(e, n, r), this;
  43953. }, t.prototype.off = function(e, n) {
  43954. this._disposed || this.handler.off(e, n);
  43955. }, t.prototype.trigger = function(e, n) {
  43956. this._disposed || this.handler.trigger(e, n);
  43957. }, t.prototype.clear = function() {
  43958. if (!this._disposed) {
  43959. for (var e = this.storage.getRoots(), n = 0; n < e.length; n++)
  43960. e[n] instanceof Ve && e[n].removeSelfFromZr(this);
  43961. this.storage.delAllRoots(), this.painter.clear();
  43962. }
  43963. }, t.prototype.dispose = function() {
  43964. 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, PDe(this.id));
  43965. }, t;
  43966. }();
  43967. function xA(t, e) {
  43968. var n = new ADe(gR(), t, e);
  43969. return Rc[n.id] = n, n;
  43970. }
  43971. function EDe(t) {
  43972. t.dispose();
  43973. }
  43974. function MDe() {
  43975. for (var t in Rc)
  43976. Rc.hasOwnProperty(t) && Rc[t].dispose();
  43977. Rc = {};
  43978. }
  43979. function IDe(t) {
  43980. return Rc[t];
  43981. }
  43982. function rK(t, e) {
  43983. Qv[t] = e;
  43984. }
  43985. var wA;
  43986. function iK(t) {
  43987. if (typeof wA == "function")
  43988. return wA(t);
  43989. }
  43990. function aK(t) {
  43991. wA = t;
  43992. }
  43993. var DDe = "5.6.0";
  43994. const RDe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43995. __proto__: null,
  43996. dispose: EDe,
  43997. disposeAll: MDe,
  43998. getElementSSRData: iK,
  43999. getInstance: IDe,
  44000. init: xA,
  44001. registerPainter: rK,
  44002. registerSSRDataGetter: aK,
  44003. version: DDe
  44004. }, Symbol.toStringTag, { value: "Module" }));
  44005. var rB = 1e-4, oK = 20;
  44006. function kDe(t) {
  44007. return t.replace(/^\s+|\s+$/g, "");
  44008. }
  44009. function Lt(t, e, n, r) {
  44010. var i = e[0], a = e[1], o = n[0], s = n[1], l = a - i, u = s - o;
  44011. if (l === 0)
  44012. return u === 0 ? o : (o + s) / 2;
  44013. if (r)
  44014. if (l > 0) {
  44015. if (t <= i)
  44016. return o;
  44017. if (t >= a)
  44018. return s;
  44019. } else {
  44020. if (t >= i)
  44021. return o;
  44022. if (t <= a)
  44023. return s;
  44024. }
  44025. else {
  44026. if (t === i)
  44027. return o;
  44028. if (t === a)
  44029. return s;
  44030. }
  44031. return (t - i) / l * u + o;
  44032. }
  44033. function _e(t, e) {
  44034. switch (t) {
  44035. case "center":
  44036. case "middle":
  44037. t = "50%";
  44038. break;
  44039. case "left":
  44040. case "top":
  44041. t = "0%";
  44042. break;
  44043. case "right":
  44044. case "bottom":
  44045. t = "100%";
  44046. break;
  44047. }
  44048. return Oe(t) ? kDe(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : t == null ? NaN : +t;
  44049. }
  44050. function mn(t, e, n) {
  44051. return e == null && (e = 10), e = Math.min(Math.max(0, e), oK), t = (+t).toFixed(e), n ? t : +t;
  44052. }
  44053. function Vi(t) {
  44054. return t.sort(function(e, n) {
  44055. return e - n;
  44056. }), t;
  44057. }
  44058. function Ua(t) {
  44059. if (t = +t, isNaN(t))
  44060. return 0;
  44061. if (t > 1e-14) {
  44062. for (var e = 1, n = 0; n < 15; n++, e *= 10)
  44063. if (Math.round(t * e) / e === t)
  44064. return n;
  44065. }
  44066. return iO(t);
  44067. }
  44068. function iO(t) {
  44069. 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;
  44070. return Math.max(0, o - r);
  44071. }
  44072. function TR(t, e) {
  44073. 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);
  44074. return isFinite(o) ? o : 20;
  44075. }
  44076. function LDe(t, e, n) {
  44077. if (!t[e])
  44078. return 0;
  44079. var r = sK(t, n);
  44080. return r[e] || 0;
  44081. }
  44082. function sK(t, e) {
  44083. var n = Aa(t, function(h, p) {
  44084. return h + (isNaN(p) ? 0 : p);
  44085. }, 0);
  44086. if (n === 0)
  44087. return [];
  44088. for (var r = Math.pow(10, e), i = ce(t, function(h) {
  44089. return (isNaN(h) ? 0 : h) / n * r * 100;
  44090. }), a = r * 100, o = ce(i, function(h) {
  44091. return Math.floor(h);
  44092. }), s = Aa(o, function(h, p) {
  44093. return h + p;
  44094. }, 0), l = ce(i, function(h, p) {
  44095. return h - o[p];
  44096. }); s < a; ) {
  44097. for (var u = Number.NEGATIVE_INFINITY, c = null, f = 0, d = l.length; f < d; ++f)
  44098. l[f] > u && (u = l[f], c = f);
  44099. ++o[c], l[c] = 0, ++s;
  44100. }
  44101. return ce(o, function(h) {
  44102. return h / r;
  44103. });
  44104. }
  44105. function NDe(t, e) {
  44106. var n = Math.max(Ua(t), Ua(e)), r = t + e;
  44107. return n > oK ? r : mn(r, n);
  44108. }
  44109. var CA = 9007199254740991;
  44110. function PR(t) {
  44111. var e = Math.PI * 2;
  44112. return (t % e + e) % e;
  44113. }
  44114. function Lh(t) {
  44115. return t > -rB && t < rB;
  44116. }
  44117. var BDe = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
  44118. function Yi(t) {
  44119. if (t instanceof Date)
  44120. return t;
  44121. if (Oe(t)) {
  44122. var e = BDe.exec(t);
  44123. if (!e)
  44124. return /* @__PURE__ */ new Date(NaN);
  44125. if (e[8]) {
  44126. var n = +e[4] || 0;
  44127. 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));
  44128. } else
  44129. 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);
  44130. } else if (t == null)
  44131. return /* @__PURE__ */ new Date(NaN);
  44132. return new Date(Math.round(t));
  44133. }
  44134. function lK(t) {
  44135. return Math.pow(10, L0(t));
  44136. }
  44137. function L0(t) {
  44138. if (t === 0)
  44139. return 0;
  44140. var e = Math.floor(Math.log(t) / Math.LN10);
  44141. return t / Math.pow(10, e) >= 10 && e++, e;
  44142. }
  44143. function $R(t, e) {
  44144. var n = L0(t), r = Math.pow(10, n), i = t / r, a;
  44145. 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;
  44146. }
  44147. function z_(t, e) {
  44148. var n = (t.length - 1) * e + 1, r = Math.floor(n), i = +t[r - 1], a = n - r;
  44149. return a ? i + a * (t[r] - i) : i;
  44150. }
  44151. function TA(t) {
  44152. t.sort(function(l, u) {
  44153. return s(l, u, 0) ? -1 : 1;
  44154. });
  44155. for (var e = -1 / 0, n = 1, r = 0; r < t.length; ) {
  44156. for (var i = t[r].interval, a = t[r].close, o = 0; o < 2; o++)
  44157. i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - n), e = i[o], n = a[o];
  44158. i[0] === i[1] && a[0] * a[1] !== 1 ? t.splice(r, 1) : r++;
  44159. }
  44160. return t;
  44161. function s(l, u, c) {
  44162. 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));
  44163. }
  44164. }
  44165. function is(t) {
  44166. var e = parseFloat(t);
  44167. return e == t && (e !== 0 || !Oe(t) || t.indexOf("x") <= 0) ? e : NaN;
  44168. }
  44169. function Fx(t) {
  44170. return !isNaN(is(t));
  44171. }
  44172. function uK() {
  44173. return Math.round(Math.random() * 9);
  44174. }
  44175. function cK(t, e) {
  44176. return e === 0 ? t : cK(e, t % e);
  44177. }
  44178. function iB(t, e) {
  44179. return t == null ? e : e == null ? t : t * e / cK(t, e);
  44180. }
  44181. var zDe = "[ECharts] ", aB = {}, VDe = typeof console < "u" && console.warn && console.log;
  44182. function Wx(t, e, n) {
  44183. if (VDe) {
  44184. if (n) {
  44185. if (aB[e])
  44186. return;
  44187. aB[e] = !0;
  44188. }
  44189. console[t](zDe + e);
  44190. }
  44191. }
  44192. function FDe(t, e) {
  44193. Wx("log", t, e);
  44194. }
  44195. function dn(t, e) {
  44196. Wx("warn", t, e);
  44197. }
  44198. function Cr(t, e) {
  44199. Wx("error", t, e);
  44200. }
  44201. function Ea(t) {
  44202. process.env.NODE_ENV !== "production" && Wx("warn", "DEPRECATED: " + t, !0);
  44203. }
  44204. function Cn(t, e, n) {
  44205. process.env.NODE_ENV !== "production" && Ea((n ? "[" + n + "]" : "") + (t + " is deprecated, use " + e + " instead."));
  44206. }
  44207. function ti() {
  44208. for (var t = [], e = 0; e < arguments.length; e++)
  44209. t[e] = arguments[e];
  44210. var n = "";
  44211. if (process.env.NODE_ENV !== "production") {
  44212. var r = function(i) {
  44213. 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 () { ... }" : yR(i) ? i + "" : null;
  44214. };
  44215. n = ce(t, function(i) {
  44216. if (Oe(i))
  44217. return i;
  44218. var a = r(i);
  44219. if (a != null)
  44220. return a;
  44221. if (typeof JSON < "u" && JSON.stringify)
  44222. try {
  44223. return JSON.stringify(i, function(o, s) {
  44224. var l = r(s);
  44225. return l ?? s;
  44226. });
  44227. } catch {
  44228. return "?";
  44229. }
  44230. else
  44231. return "?";
  44232. }).join(" ");
  44233. }
  44234. return n;
  44235. }
  44236. function Et(t) {
  44237. throw new Error(t);
  44238. }
  44239. function oB(t, e, n) {
  44240. return (e - t) * n + t;
  44241. }
  44242. var fK = "series\0", dK = "\0_ec_\0";
  44243. function Qt(t) {
  44244. return t instanceof Array ? t : t == null ? [] : [t];
  44245. }
  44246. function gf(t, e, n) {
  44247. if (t) {
  44248. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  44249. for (var r = 0, i = n.length; r < i; r++) {
  44250. var a = n[r];
  44251. !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
  44252. }
  44253. }
  44254. }
  44255. var sB = ["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"];
  44256. function fp(t) {
  44257. return Ie(t) && !ue(t) && !(t instanceof Date) ? t.value : t;
  44258. }
  44259. function WDe(t) {
  44260. return Ie(t) && !(t instanceof Array);
  44261. }
  44262. function hK(t, e, n) {
  44263. var r = n === "normalMerge", i = n === "replaceMerge", a = n === "replaceAll";
  44264. t = t || [], e = (e || []).slice();
  44265. var o = Pe();
  44266. k(e, function(l, u) {
  44267. if (!Ie(l)) {
  44268. e[u] = null;
  44269. return;
  44270. }
  44271. process.env.NODE_ENV !== "production" && (l.id != null && !uB(l.id) && lB(l.id), l.name != null && !uB(l.name) && lB(l.name));
  44272. });
  44273. var s = QDe(t, o, n);
  44274. return (r || i) && HDe(s, t, o, e), r && GDe(s, e), r || i ? jDe(s, e, i) : a && ZDe(s, e), UDe(s), s;
  44275. }
  44276. function QDe(t, e, n) {
  44277. var r = [];
  44278. if (n === "replaceAll")
  44279. return r;
  44280. for (var i = 0; i < t.length; i++) {
  44281. var a = t[i];
  44282. a && a.id != null && e.set(a.id, i), r.push({
  44283. existing: n === "replaceMerge" || Nh(a) ? null : a,
  44284. newOption: null,
  44285. keyInfo: null,
  44286. brandNew: null
  44287. });
  44288. }
  44289. return r;
  44290. }
  44291. function HDe(t, e, n, r) {
  44292. k(r, function(i, a) {
  44293. if (!(!i || i.id == null)) {
  44294. var o = Pg(i.id), s = n.get(o);
  44295. if (s != null) {
  44296. var l = t[s];
  44297. ke(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = i, l.existing = e[s], r[a] = null;
  44298. }
  44299. }
  44300. });
  44301. }
  44302. function GDe(t, e) {
  44303. k(e, function(n, r) {
  44304. if (!(!n || n.name == null))
  44305. for (var i = 0; i < t.length; i++) {
  44306. var a = t[i].existing;
  44307. if (!t[i].newOption && a && (a.id == null || n.id == null) && !Nh(n) && !Nh(a) && pK("name", a, n)) {
  44308. t[i].newOption = n, e[r] = null;
  44309. return;
  44310. }
  44311. }
  44312. });
  44313. }
  44314. function jDe(t, e, n) {
  44315. k(e, function(r) {
  44316. if (r) {
  44317. for (
  44318. var i, a = 0;
  44319. // Be `!resultItem` only when `nextIdx >= result.length`.
  44320. (i = t[a]) && (i.newOption || Nh(i.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
  44321. i.existing && r.id != null && !pK("id", r, i.existing));
  44322. )
  44323. a++;
  44324. i ? (i.newOption = r, i.brandNew = n) : t.push({
  44325. newOption: r,
  44326. brandNew: n,
  44327. existing: null,
  44328. keyInfo: null
  44329. }), a++;
  44330. }
  44331. });
  44332. }
  44333. function ZDe(t, e) {
  44334. k(e, function(n) {
  44335. t.push({
  44336. newOption: n,
  44337. brandNew: !0,
  44338. existing: null,
  44339. keyInfo: null
  44340. });
  44341. });
  44342. }
  44343. function UDe(t) {
  44344. var e = Pe();
  44345. k(t, function(n) {
  44346. var r = n.existing;
  44347. r && e.set(r.id, n);
  44348. }), k(t, function(n) {
  44349. var r = n.newOption;
  44350. 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 = {});
  44351. }), k(t, function(n, r) {
  44352. var i = n.existing, a = n.newOption, o = n.keyInfo;
  44353. if (Ie(a)) {
  44354. if (o.name = a.name != null ? Pg(a.name) : i ? i.name : fK + r, i)
  44355. o.id = Pg(i.id);
  44356. else if (a.id != null)
  44357. o.id = Pg(a.id);
  44358. else {
  44359. var s = 0;
  44360. do
  44361. o.id = "\0" + o.name + "\0" + s++;
  44362. while (e.get(o.id));
  44363. }
  44364. e.set(o.id, n);
  44365. }
  44366. });
  44367. }
  44368. function pK(t, e, n) {
  44369. var r = Vn(e[t], null), i = Vn(n[t], null);
  44370. return r != null && i != null && r === i;
  44371. }
  44372. function Pg(t) {
  44373. if (process.env.NODE_ENV !== "production" && t == null)
  44374. throw new Error();
  44375. return Vn(t, "");
  44376. }
  44377. function Vn(t, e) {
  44378. return t == null ? e : Oe(t) ? t : St(t) || pm(t) ? t + "" : e;
  44379. }
  44380. function lB(t) {
  44381. process.env.NODE_ENV !== "production" && dn("`" + t + "` is invalid id or name. Must be a string or number.");
  44382. }
  44383. function uB(t) {
  44384. return pm(t) || Fx(t);
  44385. }
  44386. function AR(t) {
  44387. var e = t.name;
  44388. return !!(e && e.indexOf(fK));
  44389. }
  44390. function Nh(t) {
  44391. return t && t.id != null && Pg(t.id).indexOf(dK) === 0;
  44392. }
  44393. function XDe(t) {
  44394. return dK + t;
  44395. }
  44396. function YDe(t, e, n) {
  44397. k(t, function(r) {
  44398. var i = r.newOption;
  44399. Ie(i) && (r.keyInfo.mainType = e, r.keyInfo.subType = qDe(e, i, r.existing, n));
  44400. });
  44401. }
  44402. function qDe(t, e, n, r) {
  44403. var i = e.type ? e.type : n ? n.subType : r.determineSubType(t, e);
  44404. return i;
  44405. }
  44406. function KDe(t, e) {
  44407. var n = {}, r = {};
  44408. return i(t || [], n), i(e || [], r, n), [a(n), a(r)];
  44409. function i(o, s, l) {
  44410. for (var u = 0, c = o.length; u < c; u++) {
  44411. var f = Vn(o[u].seriesId, null);
  44412. if (f == null)
  44413. return;
  44414. for (var d = Qt(o[u].dataIndex), h = l && l[f], p = 0, v = d.length; p < v; p++) {
  44415. var g = d[p];
  44416. h && h[g] ? h[g] = null : (s[f] || (s[f] = {}))[g] = 1;
  44417. }
  44418. }
  44419. }
  44420. function a(o, s) {
  44421. var l = [];
  44422. for (var u in o)
  44423. if (o.hasOwnProperty(u) && o[u] != null)
  44424. if (s)
  44425. l.push(+u);
  44426. else {
  44427. var c = a(o[u], !0);
  44428. c.length && l.push({
  44429. seriesId: u,
  44430. dataIndex: c
  44431. });
  44432. }
  44433. return l;
  44434. }
  44435. }
  44436. function mf(t, e) {
  44437. if (e.dataIndexInside != null)
  44438. return e.dataIndexInside;
  44439. if (e.dataIndex != null)
  44440. return ue(e.dataIndex) ? ce(e.dataIndex, function(n) {
  44441. return t.indexOfRawIndex(n);
  44442. }) : t.indexOfRawIndex(e.dataIndex);
  44443. if (e.name != null)
  44444. return ue(e.name) ? ce(e.name, function(n) {
  44445. return t.indexOfName(n);
  44446. }) : t.indexOfName(e.name);
  44447. }
  44448. function bt() {
  44449. var t = "__ec_inner_" + JDe++;
  44450. return function(e) {
  44451. return e[t] || (e[t] = {});
  44452. };
  44453. }
  44454. var JDe = uK();
  44455. function $g(t, e, n) {
  44456. var r = ER(e, n), i = r.mainTypeSpecified, a = r.queryOptionMap, o = r.others, s = o, l = n ? n.defaultMainType : null;
  44457. return !i && l && a.set(l, {}), a.each(function(u, c) {
  44458. var f = N0(t, c, u, {
  44459. useDefault: l === c,
  44460. enableAll: n && n.enableAll != null ? n.enableAll : !0,
  44461. enableNone: n && n.enableNone != null ? n.enableNone : !0
  44462. });
  44463. s[c + "Models"] = f.models, s[c + "Model"] = f.models[0];
  44464. }), s;
  44465. }
  44466. function ER(t, e) {
  44467. var n;
  44468. if (Oe(t)) {
  44469. var r = {};
  44470. r[t + "Index"] = 0, n = r;
  44471. } else
  44472. n = t;
  44473. var i = Pe(), a = {}, o = !1;
  44474. return k(n, function(s, l) {
  44475. if (l === "dataIndex" || l === "dataIndexInside") {
  44476. a[l] = s;
  44477. return;
  44478. }
  44479. var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], c = u[1], f = (u[2] || "").toLowerCase();
  44480. if (!(!c || !f || e && e.includeMainTypes && et(e.includeMainTypes, c) < 0)) {
  44481. o = o || !!c;
  44482. var d = i.get(c) || i.set(c, {});
  44483. d[f] = s;
  44484. }
  44485. }), {
  44486. mainTypeSpecified: o,
  44487. queryOptionMap: i,
  44488. others: a
  44489. };
  44490. }
  44491. var Dn = {
  44492. useDefault: !0,
  44493. enableAll: !1,
  44494. enableNone: !1
  44495. }, eRe = {
  44496. useDefault: !1,
  44497. enableAll: !0,
  44498. enableNone: !0
  44499. };
  44500. function N0(t, e, n, r) {
  44501. r = r || Dn;
  44502. var i = n.index, a = n.id, o = n.name, s = {
  44503. models: null,
  44504. specified: i != null || a != null || o != null
  44505. };
  44506. if (!s.specified) {
  44507. var l = void 0;
  44508. return s.models = r.useDefault && (l = t.getComponent(e)) ? [l] : [], s;
  44509. }
  44510. 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({
  44511. mainType: e,
  44512. index: i,
  44513. id: a,
  44514. name: o
  44515. }), s);
  44516. }
  44517. function vK(t, e, n) {
  44518. t.setAttribute ? t.setAttribute(e, n) : t[e] = n;
  44519. }
  44520. function tRe(t, e) {
  44521. return t.getAttribute ? t.getAttribute(e) : t[e];
  44522. }
  44523. function nRe(t) {
  44524. return t === "auto" ? vt.domSupported ? "html" : "richText" : t || "html";
  44525. }
  44526. function PA(t, e) {
  44527. var n = Pe(), r = [];
  44528. return k(t, function(i) {
  44529. var a = e(i);
  44530. (n.get(a) || (r.push(a), n.set(a, []))).push(i);
  44531. }), {
  44532. keys: r,
  44533. buckets: n
  44534. };
  44535. }
  44536. function gK(t, e, n, r, i) {
  44537. var a = e == null || e === "auto";
  44538. if (r == null)
  44539. return r;
  44540. if (St(r)) {
  44541. var o = oB(n || 0, r, i);
  44542. return mn(o, a ? Math.max(Ua(n || 0), Ua(r)) : e);
  44543. } else {
  44544. if (Oe(r))
  44545. return i < 1 ? n : r;
  44546. for (var s = [], l = n, u = r, c = Math.max(l ? l.length : 0, u.length), f = 0; f < c; ++f) {
  44547. var d = t.getDimensionInfo(f);
  44548. if (d && d.type === "ordinal")
  44549. s[f] = (i < 1 && l ? l : u)[f];
  44550. else {
  44551. var h = l && l[f] ? l[f] : 0, p = u[f], o = oB(h, p, i);
  44552. s[f] = mn(o, a ? Math.max(Ua(h), Ua(p)) : e);
  44553. }
  44554. }
  44555. return s;
  44556. }
  44557. }
  44558. var rRe = ".", Gu = "___EC__COMPONENT__CONTAINER___", mK = "___EC__EXTENDED_CLASS___";
  44559. function Vo(t) {
  44560. var e = {
  44561. main: "",
  44562. sub: ""
  44563. };
  44564. if (t) {
  44565. var n = t.split(rRe);
  44566. e.main = n[0] || "", e.sub = n[1] || "";
  44567. }
  44568. return e;
  44569. }
  44570. function iRe(t) {
  44571. ke(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
  44572. }
  44573. function aRe(t) {
  44574. return !!(t && t[mK]);
  44575. }
  44576. function MR(t, e) {
  44577. t.$constructor = t, t.extend = function(n) {
  44578. process.env.NODE_ENV !== "production" && k(e, function(a) {
  44579. n[a] || console.warn("Method `" + a + "` should be implemented" + (n.type ? " in " + n.type : "") + ".");
  44580. });
  44581. var r = this, i;
  44582. return oRe(r) ? i = /** @class */
  44583. function(a) {
  44584. q(o, a);
  44585. function o() {
  44586. return a.apply(this, arguments) || this;
  44587. }
  44588. return o;
  44589. }(r) : (i = function() {
  44590. (n.$constructor || r).apply(this, arguments);
  44591. }, mR(i, this)), le(i.prototype, n), i[mK] = !0, i.extend = this.extend, i.superCall = uRe, i.superApply = cRe, i.superClass = r, i;
  44592. };
  44593. }
  44594. function oRe(t) {
  44595. return Me(t) && /^class\s/.test(Function.prototype.toString.call(t));
  44596. }
  44597. function yK(t, e) {
  44598. t.extend = e.extend;
  44599. }
  44600. var sRe = Math.round(Math.random() * 10);
  44601. function lRe(t) {
  44602. var e = ["__\0is_clz", sRe++].join("_");
  44603. t.prototype[e] = !0, process.env.NODE_ENV !== "production" && ke(!t.isInstance, 'The method "is" can not be defined.'), t.isInstance = function(n) {
  44604. return !!(n && n[e]);
  44605. };
  44606. }
  44607. function uRe(t, e) {
  44608. for (var n = [], r = 2; r < arguments.length; r++)
  44609. n[r - 2] = arguments[r];
  44610. return this.superClass.prototype[e].apply(t, n);
  44611. }
  44612. function cRe(t, e, n) {
  44613. return this.superClass.prototype[e].apply(t, n);
  44614. }
  44615. function Qx(t) {
  44616. var e = {};
  44617. t.registerClass = function(r) {
  44618. var i = r.type || r.prototype.type;
  44619. if (i) {
  44620. iRe(i), r.prototype.type = i;
  44621. var a = Vo(i);
  44622. if (!a.sub)
  44623. process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = r;
  44624. else if (a.sub !== Gu) {
  44625. var o = n(a);
  44626. o[a.sub] = r;
  44627. }
  44628. }
  44629. return r;
  44630. }, t.getClass = function(r, i, a) {
  44631. var o = e[r];
  44632. if (o && o[Gu] && (o = i ? o[i] : null), a && !o)
  44633. throw new Error(i ? "Component " + r + "." + (i || "") + " is used but not imported." : r + ".type should be specified.");
  44634. return o;
  44635. }, t.getClassesByMainType = function(r) {
  44636. var i = Vo(r), a = [], o = e[i.main];
  44637. return o && o[Gu] ? k(o, function(s, l) {
  44638. l !== Gu && a.push(s);
  44639. }) : a.push(o), a;
  44640. }, t.hasClass = function(r) {
  44641. var i = Vo(r);
  44642. return !!e[i.main];
  44643. }, t.getAllClassMainTypes = function() {
  44644. var r = [];
  44645. return k(e, function(i, a) {
  44646. r.push(a);
  44647. }), r;
  44648. }, t.hasSubTypes = function(r) {
  44649. var i = Vo(r), a = e[i.main];
  44650. return a && a[Gu];
  44651. };
  44652. function n(r) {
  44653. var i = e[r.main];
  44654. return (!i || !i[Gu]) && (i = e[r.main] = {}, i[Gu] = !0), i;
  44655. }
  44656. }
  44657. function yf(t, e) {
  44658. for (var n = 0; n < t.length; n++)
  44659. t[n][1] || (t[n][1] = t[n][0]);
  44660. return e = e || !1, function(r, i, a) {
  44661. for (var o = {}, s = 0; s < t.length; s++) {
  44662. var l = t[s][1];
  44663. if (!(i && et(i, l) >= 0 || a && et(a, l) < 0)) {
  44664. var u = r.getShallow(l, e);
  44665. u != null && (o[t[s][0]] = u);
  44666. }
  44667. }
  44668. return o;
  44669. };
  44670. }
  44671. var fRe = [
  44672. ["fill", "color"],
  44673. ["shadowBlur"],
  44674. ["shadowOffsetX"],
  44675. ["shadowOffsetY"],
  44676. ["opacity"],
  44677. ["shadowColor"]
  44678. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  44679. // So do not transfer decal directly.
  44680. ], dRe = yf(fRe), hRe = (
  44681. /** @class */
  44682. function() {
  44683. function t() {
  44684. }
  44685. return t.prototype.getAreaStyle = function(e, n) {
  44686. return dRe(this, e, n);
  44687. }, t;
  44688. }()
  44689. ), $A = new R0(50);
  44690. function pRe(t) {
  44691. if (typeof t == "string") {
  44692. var e = $A.get(t);
  44693. return e && e.image;
  44694. } else
  44695. return t;
  44696. }
  44697. function IR(t, e, n, r, i) {
  44698. if (t)
  44699. if (typeof t == "string") {
  44700. if (e && e.__zrImageSrc === t || !n)
  44701. return e;
  44702. var a = $A.get(t), o = { hostEl: n, cb: r, cbPayload: i };
  44703. return a ? (e = a.image, !Hx(e) && a.pending.push(o)) : (e = io.loadImage(t, cB, cB), e.__zrImageSrc = t, $A.put(t, e.__cachedImgObj = {
  44704. image: e,
  44705. pending: [o]
  44706. })), e;
  44707. } else
  44708. return t;
  44709. else return e;
  44710. }
  44711. function cB() {
  44712. var t = this.__cachedImgObj;
  44713. this.onload = this.onerror = this.__cachedImgObj = null;
  44714. for (var e = 0; e < t.pending.length; e++) {
  44715. var n = t.pending[e], r = n.cb;
  44716. r && r(this, n.cbPayload), n.hostEl.dirty();
  44717. }
  44718. t.pending.length = 0;
  44719. }
  44720. function Hx(t) {
  44721. return t && t.width && t.height;
  44722. }
  44723. var sT = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
  44724. function bK(t, e, n, r, i) {
  44725. if (!e)
  44726. return "";
  44727. var a = (t + "").split(`
  44728. `);
  44729. i = _K(e, n, r, i);
  44730. for (var o = 0, s = a.length; o < s; o++)
  44731. a[o] = OK(a[o], i);
  44732. return a.join(`
  44733. `);
  44734. }
  44735. function _K(t, e, n, r) {
  44736. r = r || {};
  44737. var i = le({}, r);
  44738. i.font = e, n = We(n, "..."), i.maxIterations = We(r.maxIterations, 2);
  44739. var a = i.minChar = We(r.minChar, 0);
  44740. i.cnCharWidth = Zi("国", e);
  44741. var o = i.ascCharWidth = Zi("a", e);
  44742. i.placeholder = We(r.placeholder, "");
  44743. for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= o; l++)
  44744. s -= o;
  44745. var u = Zi(n, e);
  44746. return u > s && (n = "", u = 0), s = t - u, i.ellipsis = n, i.ellipsisWidth = u, i.contentWidth = s, i.containerWidth = t, i;
  44747. }
  44748. function OK(t, e) {
  44749. var n = e.containerWidth, r = e.font, i = e.contentWidth;
  44750. if (!n)
  44751. return "";
  44752. var a = Zi(t, r);
  44753. if (a <= n)
  44754. return t;
  44755. for (var o = 0; ; o++) {
  44756. if (a <= i || o >= e.maxIterations) {
  44757. t += e.ellipsis;
  44758. break;
  44759. }
  44760. var s = o === 0 ? vRe(t, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * i / a) : 0;
  44761. t = t.substr(0, s), a = Zi(t, r);
  44762. }
  44763. return t === "" && (t = e.placeholder), t;
  44764. }
  44765. function vRe(t, e, n, r) {
  44766. for (var i = 0, a = 0, o = t.length; a < o && i < e; a++) {
  44767. var s = t.charCodeAt(a);
  44768. i += 0 <= s && s <= 127 ? n : r;
  44769. }
  44770. return a;
  44771. }
  44772. function gRe(t, e) {
  44773. t != null && (t += "");
  44774. var n = e.overflow, r = e.padding, i = e.font, a = n === "truncate", o = zx(i), s = We(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", c = e.width, f;
  44775. c != null && (n === "break" || n === "breakAll") ? f = t ? SK(t, e.font, c, n === "breakAll", 0).lines : [] : f = t ? t.split(`
  44776. `) : [];
  44777. var d = f.length * s, h = We(e.height, d);
  44778. if (d > h && u) {
  44779. var p = Math.floor(h / s);
  44780. f = f.slice(0, p);
  44781. }
  44782. if (t && a && c != null)
  44783. for (var v = _K(c, i, e.ellipsis, {
  44784. minChar: e.truncateMinChar,
  44785. placeholder: e.placeholder
  44786. }), g = 0; g < f.length; g++)
  44787. f[g] = OK(f[g], v);
  44788. for (var m = h, y = 0, g = 0; g < f.length; g++)
  44789. y = Math.max(Zi(f[g], i), y);
  44790. c == null && (c = y);
  44791. var b = y;
  44792. return r && (m += r[0] + r[2], b += r[1] + r[3], c += r[1] + r[3]), l && (b = c), {
  44793. lines: f,
  44794. height: h,
  44795. outerWidth: b,
  44796. outerHeight: m,
  44797. lineHeight: s,
  44798. calculatedLineHeight: o,
  44799. contentWidth: y,
  44800. contentHeight: d,
  44801. width: c
  44802. };
  44803. }
  44804. var mRe = /* @__PURE__ */ function() {
  44805. function t() {
  44806. }
  44807. return t;
  44808. }(), fB = /* @__PURE__ */ function() {
  44809. function t(e) {
  44810. this.tokens = [], e && (this.tokens = e);
  44811. }
  44812. return t;
  44813. }(), yRe = /* @__PURE__ */ function() {
  44814. function t() {
  44815. this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
  44816. }
  44817. return t;
  44818. }();
  44819. function bRe(t, e) {
  44820. var n = new yRe();
  44821. if (t != null && (t += ""), !t)
  44822. return n;
  44823. 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 = sT.lastIndex = 0, l; (l = sT.exec(t)) != null; ) {
  44824. var u = l.index;
  44825. u > s && lT(n, t.substring(s, u), e, o), lT(n, l[2], e, o, l[1]), s = sT.lastIndex;
  44826. }
  44827. s < t.length && lT(n, t.substring(s, t.length), e, o);
  44828. var c = [], f = 0, d = 0, h = e.padding, p = a === "truncate", v = e.lineOverflow === "truncate";
  44829. function g(V, z, W) {
  44830. V.width = z, V.lineHeight = W, f += W, d = Math.max(d, z);
  44831. }
  44832. e: for (var m = 0; m < n.lines.length; m++) {
  44833. for (var y = n.lines[m], b = 0, _ = 0, O = 0; O < y.tokens.length; O++) {
  44834. 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;
  44835. S.contentHeight = zx(w);
  44836. var P = We(x.height, S.contentHeight);
  44837. if (S.innerHeight = P, C && (P += C[0] + C[2]), S.height = P, S.lineHeight = ji(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) {
  44838. 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);
  44839. break e;
  44840. }
  44841. var $ = x.width, A = $ == null || $ === "auto";
  44842. if (typeof $ == "string" && $.charAt($.length - 1) === "%")
  44843. S.percentWidth = $, c.push(S), S.contentWidth = Zi(S.text, w);
  44844. else {
  44845. if (A) {
  44846. var D = x.backgroundColor, E = D && D.image;
  44847. E && (E = pRe(E), Hx(E) && (S.width = Math.max(S.width, E.width * P / E.height)));
  44848. }
  44849. var R = p && r != null ? r - _ : null;
  44850. R != null && R < S.width ? !A || R < T ? (S.text = "", S.width = S.contentWidth = 0) : (S.text = bK(S.text, R - T, w, e.ellipsis, { minChar: e.truncateMinChar }), S.width = S.contentWidth = Zi(S.text, w)) : S.contentWidth = Zi(S.text, w);
  44851. }
  44852. S.width += T, _ += S.width, x && (b = Math.max(b, S.lineHeight));
  44853. }
  44854. g(y, _, b);
  44855. }
  44856. 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]);
  44857. for (var m = 0; m < c.length; m++) {
  44858. var S = c[m], N = S.percentWidth;
  44859. S.width = parseInt(N, 10) / 100 * n.width;
  44860. }
  44861. return n;
  44862. }
  44863. function lT(t, e, n, r, i) {
  44864. var a = e === "", o = i && n.rich[i] || {}, s = t.lines, l = o.font || n.font, u = !1, c, f;
  44865. if (r) {
  44866. var d = o.padding, h = d ? d[1] + d[3] : 0;
  44867. if (o.width != null && o.width !== "auto") {
  44868. var p = oo(o.width, r.width) + h;
  44869. s.length > 0 && p + r.accumWidth > r.width && (c = e.split(`
  44870. `), u = !0), r.accumWidth = p;
  44871. } else {
  44872. var v = SK(e, l, r.width, r.breakAll, r.accumWidth);
  44873. r.accumWidth = v.accumWidth + h, f = v.linesWidths, c = v.lines;
  44874. }
  44875. } else
  44876. c = e.split(`
  44877. `);
  44878. for (var g = 0; g < c.length; g++) {
  44879. var m = c[g], y = new mRe();
  44880. if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : Zi(m, l), !g && !u) {
  44881. var b = (s[s.length - 1] || (s[0] = new fB())).tokens, _ = b.length;
  44882. _ === 1 && b[0].isLineHolder ? b[0] = y : (m || !_ || a) && b.push(y);
  44883. } else
  44884. s.push(new fB([y]));
  44885. }
  44886. }
  44887. function _Re(t) {
  44888. var e = t.charCodeAt(0);
  44889. return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
  44890. }
  44891. var ORe = Aa(",&?/;] ".split(""), function(t, e) {
  44892. return t[e] = !0, t;
  44893. }, {});
  44894. function SRe(t) {
  44895. return _Re(t) ? !!ORe[t] : !0;
  44896. }
  44897. function SK(t, e, n, r, i) {
  44898. for (var a = [], o = [], s = "", l = "", u = 0, c = 0, f = 0; f < t.length; f++) {
  44899. var d = t.charAt(f);
  44900. if (d === `
  44901. `) {
  44902. l && (s += l, c += u), a.push(s), o.push(c), s = "", l = "", u = 0, c = 0;
  44903. continue;
  44904. }
  44905. var h = Zi(d, e), p = r ? !1 : !SRe(d);
  44906. if (a.length ? c + h > n : i + c + h > n) {
  44907. 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));
  44908. continue;
  44909. }
  44910. c += h, p ? (l += d, u += h) : (l && (s += l, l = "", u = 0), s += d);
  44911. }
  44912. return !a.length && !s && (s = t, l = "", u = 0), l && (s += l), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), {
  44913. accumWidth: c,
  44914. lines: a,
  44915. linesWidths: o
  44916. };
  44917. }
  44918. var AA = "__zr_style_" + Math.round(Math.random() * 10), Kc = {
  44919. shadowBlur: 0,
  44920. shadowOffsetX: 0,
  44921. shadowOffsetY: 0,
  44922. shadowColor: "#000",
  44923. opacity: 1,
  44924. blend: "source-over"
  44925. }, Gx = {
  44926. style: {
  44927. shadowBlur: !0,
  44928. shadowOffsetX: !0,
  44929. shadowOffsetY: !0,
  44930. shadowColor: !0,
  44931. opacity: !0
  44932. }
  44933. };
  44934. Kc[AA] = !0;
  44935. var dB = ["z", "z2", "invisible"], xRe = ["invisible"], wRe = function(t) {
  44936. q(e, t);
  44937. function e(n) {
  44938. return t.call(this, n) || this;
  44939. }
  44940. return e.prototype._init = function(n) {
  44941. for (var r = st(n), i = 0; i < r.length; i++) {
  44942. var a = r[i];
  44943. a === "style" ? this.useStyle(n[a]) : t.prototype.attrKV.call(this, a, n[a]);
  44944. }
  44945. this.style || this.useStyle({});
  44946. }, e.prototype.beforeBrush = function() {
  44947. }, e.prototype.afterBrush = function() {
  44948. }, e.prototype.innerBeforeBrush = function() {
  44949. }, e.prototype.innerAfterBrush = function() {
  44950. }, e.prototype.shouldBePainted = function(n, r, i, a) {
  44951. var o = this.transform;
  44952. if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && CRe(this, n, r) || o && !o[0] && !o[3])
  44953. return !1;
  44954. if (i && this.__clipPaths) {
  44955. for (var s = 0; s < this.__clipPaths.length; ++s)
  44956. if (this.__clipPaths[s].isZeroArea())
  44957. return !1;
  44958. }
  44959. if (a && this.parent)
  44960. for (var l = this.parent; l; ) {
  44961. if (l.ignore)
  44962. return !1;
  44963. l = l.parent;
  44964. }
  44965. return !0;
  44966. }, e.prototype.contain = function(n, r) {
  44967. return this.rectContain(n, r);
  44968. }, e.prototype.traverse = function(n, r) {
  44969. n.call(r, this);
  44970. }, e.prototype.rectContain = function(n, r) {
  44971. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  44972. return a.contain(i[0], i[1]);
  44973. }, e.prototype.getPaintRect = function() {
  44974. var n = this._paintRect;
  44975. if (!this._paintRect || this.__dirty) {
  44976. var r = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, l = a.shadowOffsetY || 0;
  44977. 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));
  44978. var u = this.dirtyRectTolerance;
  44979. 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));
  44980. }
  44981. return n;
  44982. }, e.prototype.setPrevPaintRect = function(n) {
  44983. n ? (this._prevPaintRect = this._prevPaintRect || new Je(0, 0, 0, 0), this._prevPaintRect.copy(n)) : this._prevPaintRect = null;
  44984. }, e.prototype.getPrevPaintRect = function() {
  44985. return this._prevPaintRect;
  44986. }, e.prototype.animateStyle = function(n) {
  44987. return this.animate("style", n);
  44988. }, e.prototype.updateDuringAnimation = function(n) {
  44989. n === "style" ? this.dirtyStyle() : this.markRedraw();
  44990. }, e.prototype.attrKV = function(n, r) {
  44991. n !== "style" ? t.prototype.attrKV.call(this, n, r) : this.style ? this.setStyle(r) : this.useStyle(r);
  44992. }, e.prototype.setStyle = function(n, r) {
  44993. return typeof n == "string" ? this.style[n] = r : le(this.style, n), this.dirtyStyle(), this;
  44994. }, e.prototype.dirtyStyle = function(n) {
  44995. n || this.markRedraw(), this.__dirty |= Vv, this._rect && (this._rect = null);
  44996. }, e.prototype.dirty = function() {
  44997. this.dirtyStyle();
  44998. }, e.prototype.styleChanged = function() {
  44999. return !!(this.__dirty & Vv);
  45000. }, e.prototype.styleUpdated = function() {
  45001. this.__dirty &= ~Vv;
  45002. }, e.prototype.createStyle = function(n) {
  45003. return I0(Kc, n);
  45004. }, e.prototype.useStyle = function(n) {
  45005. n[AA] || (n = this.createStyle(n)), this.__inHover ? this.__hoverStyle = n : this.style = n, this.dirtyStyle();
  45006. }, e.prototype.isStyleObject = function(n) {
  45007. return n[AA];
  45008. }, e.prototype._innerSaveToNormal = function(n) {
  45009. t.prototype._innerSaveToNormal.call(this, n);
  45010. var r = this._normalState;
  45011. n.style && !r.style && (r.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(n, r, dB);
  45012. }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
  45013. t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
  45014. var l = !(r && a), u;
  45015. 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)
  45016. if (o) {
  45017. var c = this.style;
  45018. if (this.style = this.createStyle(l ? {} : c), l)
  45019. for (var f = st(c), d = 0; d < f.length; d++) {
  45020. var h = f[d];
  45021. h in u && (u[h] = u[h], this.style[h] = c[h]);
  45022. }
  45023. for (var p = st(u), d = 0; d < p.length; d++) {
  45024. var h = p[d];
  45025. this.style[h] = this.style[h];
  45026. }
  45027. this._transitionState(n, {
  45028. style: u
  45029. }, s, this.getAnimationStyleProps());
  45030. } else
  45031. this.useStyle(u);
  45032. for (var v = this.__inHover ? xRe : dB, d = 0; d < v.length; d++) {
  45033. var h = v[d];
  45034. r && r[h] != null ? this[h] = r[h] : l && i[h] != null && (this[h] = i[h]);
  45035. }
  45036. }, e.prototype._mergeStates = function(n) {
  45037. for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
  45038. var o = n[a];
  45039. o.style && (i = i || {}, this._mergeStyle(i, o.style));
  45040. }
  45041. return i && (r.style = i), r;
  45042. }, e.prototype._mergeStyle = function(n, r) {
  45043. return le(n, r), n;
  45044. }, e.prototype.getAnimationStyleProps = function() {
  45045. return Gx;
  45046. }, e.initDefaultProps = function() {
  45047. var n = e.prototype;
  45048. 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 = ki | Vv;
  45049. }(), e;
  45050. }(Vx), uT = new Je(0, 0, 0, 0), cT = new Je(0, 0, 0, 0);
  45051. function CRe(t, e, n) {
  45052. return uT.copy(t.getBoundingRect()), t.transform && uT.applyTransform(t.transform), cT.width = e, cT.height = n, !uT.intersect(cT);
  45053. }
  45054. const Ma = wRe;
  45055. var di = Math.min, hi = Math.max, fT = Math.sin, dT = Math.cos, ju = Math.PI * 2, Xy = wu(), Yy = wu(), qy = wu();
  45056. function jx(t, e, n) {
  45057. if (t.length !== 0) {
  45058. for (var r = t[0], i = r[0], a = r[0], o = r[1], s = r[1], l = 1; l < t.length; l++)
  45059. r = t[l], i = di(i, r[0]), a = hi(a, r[0]), o = di(o, r[1]), s = hi(s, r[1]);
  45060. e[0] = i, e[1] = o, n[0] = a, n[1] = s;
  45061. }
  45062. }
  45063. function hB(t, e, n, r, i, a) {
  45064. i[0] = di(t, n), i[1] = di(e, r), a[0] = hi(t, n), a[1] = hi(e, r);
  45065. }
  45066. var pB = [], vB = [];
  45067. function TRe(t, e, n, r, i, a, o, s, l, u) {
  45068. var c = zq, f = Gn, d = c(t, n, i, o, pB);
  45069. l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  45070. for (var h = 0; h < d; h++) {
  45071. var p = f(t, n, i, o, pB[h]);
  45072. l[0] = di(p, l[0]), u[0] = hi(p, u[0]);
  45073. }
  45074. d = c(e, r, a, s, vB);
  45075. for (var h = 0; h < d; h++) {
  45076. var v = f(e, r, a, s, vB[h]);
  45077. l[1] = di(v, l[1]), u[1] = hi(v, u[1]);
  45078. }
  45079. l[0] = di(t, l[0]), u[0] = hi(t, u[0]), l[0] = di(o, l[0]), u[0] = hi(o, u[0]), l[1] = di(e, l[1]), u[1] = hi(e, u[1]), l[1] = di(s, l[1]), u[1] = hi(s, u[1]);
  45080. }
  45081. function PRe(t, e, n, r, i, a, o, s) {
  45082. var l = Fq, u = ir, c = hi(di(l(t, n, i), 1), 0), f = hi(di(l(e, r, a), 1), 0), d = u(t, n, i, c), h = u(e, r, a, f);
  45083. o[0] = di(t, i, d), o[1] = di(e, a, h), s[0] = hi(t, i, d), s[1] = hi(e, a, h);
  45084. }
  45085. function $Re(t, e, n, r, i, a, o, s, l) {
  45086. var u = Ps, c = $s, f = Math.abs(i - a);
  45087. if (f % ju < 1e-4 && f > 1e-4) {
  45088. s[0] = t - n, s[1] = e - r, l[0] = t + n, l[1] = e + r;
  45089. return;
  45090. }
  45091. if (Xy[0] = dT(i) * n + t, Xy[1] = fT(i) * r + e, Yy[0] = dT(a) * n + t, Yy[1] = fT(a) * r + e, u(s, Xy, Yy), c(l, Xy, Yy), 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) {
  45092. var d = a;
  45093. a = i, i = d;
  45094. }
  45095. for (var h = 0; h < a; h += Math.PI / 2)
  45096. h > i && (qy[0] = dT(h) * n + t, qy[1] = fT(h) * r + e, u(s, qy, s), c(l, qy, l));
  45097. }
  45098. var Gt = {
  45099. M: 1,
  45100. L: 2,
  45101. C: 3,
  45102. Q: 4,
  45103. A: 5,
  45104. Z: 6,
  45105. R: 7
  45106. }, Zu = [], Uu = [], bo = [], dl = [], _o = [], Oo = [], hT = Math.min, pT = Math.max, Xu = Math.cos, Yu = Math.sin, gs = Math.abs, EA = Math.PI, Sl = EA * 2, vT = typeof Float32Array < "u", nv = [];
  45107. function gT(t) {
  45108. var e = Math.round(t / EA * 1e8) / 1e8;
  45109. return e % 2 * EA;
  45110. }
  45111. function DR(t, e) {
  45112. var n = gT(t[0]);
  45113. n < 0 && (n += Sl);
  45114. var r = n - t[0], i = t[1];
  45115. i += r, !e && i - n >= Sl ? i = n + Sl : e && n - i >= Sl ? i = n - Sl : !e && n > i ? i = n + (Sl - gT(n - i)) : e && n < i && (i = n - (Sl - gT(i - n))), t[0] = n, t[1] = i;
  45116. }
  45117. var as = function() {
  45118. function t(e) {
  45119. 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 = []);
  45120. }
  45121. return t.prototype.increaseVersion = function() {
  45122. this._version++;
  45123. }, t.prototype.getVersion = function() {
  45124. return this._version;
  45125. }, t.prototype.setScale = function(e, n, r) {
  45126. r = r || 0, r > 0 && (this._ux = gs(r / nO / e) || 0, this._uy = gs(r / nO / n) || 0);
  45127. }, t.prototype.setDPR = function(e) {
  45128. this.dpr = e;
  45129. }, t.prototype.setContext = function(e) {
  45130. this._ctx = e;
  45131. }, t.prototype.getContext = function() {
  45132. return this._ctx;
  45133. }, t.prototype.beginPath = function() {
  45134. return this._ctx && this._ctx.beginPath(), this.reset(), this;
  45135. }, t.prototype.reset = function() {
  45136. this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
  45137. }, t.prototype.moveTo = function(e, n) {
  45138. 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;
  45139. }, t.prototype.lineTo = function(e, n) {
  45140. var r = gs(e - this._xi), i = gs(n - this._yi), a = r > this._ux || i > this._uy;
  45141. if (this.addData(Gt.L, e, n), this._ctx && a && this._ctx.lineTo(e, n), a)
  45142. this._xi = e, this._yi = n, this._pendingPtDist = 0;
  45143. else {
  45144. var o = r * r + i * i;
  45145. o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = n, this._pendingPtDist = o);
  45146. }
  45147. return this;
  45148. }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
  45149. 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;
  45150. }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
  45151. 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;
  45152. }, t.prototype.arc = function(e, n, r, i, a, o) {
  45153. this._drawPendingPt(), nv[0] = i, nv[1] = a, DR(nv, o), i = nv[0], a = nv[1];
  45154. var s = a - i;
  45155. 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;
  45156. }, t.prototype.arcTo = function(e, n, r, i, a) {
  45157. return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, n, r, i, a), this;
  45158. }, t.prototype.rect = function(e, n, r, i) {
  45159. return this._drawPendingPt(), this._ctx && this._ctx.rect(e, n, r, i), this.addData(Gt.R, e, n, r, i), this;
  45160. }, t.prototype.closePath = function() {
  45161. this._drawPendingPt(), this.addData(Gt.Z);
  45162. var e = this._ctx, n = this._x0, r = this._y0;
  45163. return e && e.closePath(), this._xi = n, this._yi = r, this;
  45164. }, t.prototype.fill = function(e) {
  45165. e && e.fill(), this.toStatic();
  45166. }, t.prototype.stroke = function(e) {
  45167. e && e.stroke(), this.toStatic();
  45168. }, t.prototype.len = function() {
  45169. return this._len;
  45170. }, t.prototype.setData = function(e) {
  45171. var n = e.length;
  45172. !(this.data && this.data.length === n) && vT && (this.data = new Float32Array(n));
  45173. for (var r = 0; r < n; r++)
  45174. this.data[r] = e[r];
  45175. this._len = n;
  45176. }, t.prototype.appendPath = function(e) {
  45177. e instanceof Array || (e = [e]);
  45178. for (var n = e.length, r = 0, i = this._len, a = 0; a < n; a++)
  45179. r += e[a].len();
  45180. vT && this.data instanceof Float32Array && (this.data = new Float32Array(i + r));
  45181. for (var a = 0; a < n; a++)
  45182. for (var o = e[a].data, s = 0; s < o.length; s++)
  45183. this.data[i++] = o[s];
  45184. this._len = i;
  45185. }, t.prototype.addData = function(e, n, r, i, a, o, s, l, u) {
  45186. if (this._saveData) {
  45187. var c = this.data;
  45188. this._len + arguments.length > c.length && (this._expandData(), c = this.data);
  45189. for (var f = 0; f < arguments.length; f++)
  45190. c[this._len++] = arguments[f];
  45191. }
  45192. }, t.prototype._drawPendingPt = function() {
  45193. this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
  45194. }, t.prototype._expandData = function() {
  45195. if (!(this.data instanceof Array)) {
  45196. for (var e = [], n = 0; n < this._len; n++)
  45197. e[n] = this.data[n];
  45198. this.data = e;
  45199. }
  45200. }, t.prototype.toStatic = function() {
  45201. if (this._saveData) {
  45202. this._drawPendingPt();
  45203. var e = this.data;
  45204. e instanceof Array && (e.length = this._len, vT && this._len > 11 && (this.data = new Float32Array(e)));
  45205. }
  45206. }, t.prototype.getBoundingRect = function() {
  45207. bo[0] = bo[1] = _o[0] = _o[1] = Number.MAX_VALUE, dl[0] = dl[1] = Oo[0] = Oo[1] = -Number.MAX_VALUE;
  45208. var e = this.data, n = 0, r = 0, i = 0, a = 0, o;
  45209. for (o = 0; o < this._len; ) {
  45210. var s = e[o++], l = o === 1;
  45211. switch (l && (n = e[o], r = e[o + 1], i = n, a = r), s) {
  45212. case Gt.M:
  45213. n = i = e[o++], r = a = e[o++], _o[0] = i, _o[1] = a, Oo[0] = i, Oo[1] = a;
  45214. break;
  45215. case Gt.L:
  45216. hB(n, r, e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
  45217. break;
  45218. case Gt.C:
  45219. TRe(n, r, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
  45220. break;
  45221. case Gt.Q:
  45222. PRe(n, r, e[o++], e[o++], e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
  45223. break;
  45224. case Gt.A:
  45225. var u = e[o++], c = e[o++], f = e[o++], d = e[o++], h = e[o++], p = e[o++] + h;
  45226. o += 1;
  45227. var v = !e[o++];
  45228. l && (i = Xu(h) * f + u, a = Yu(h) * d + c), $Re(u, c, f, d, h, p, v, _o, Oo), n = Xu(p) * f + u, r = Yu(p) * d + c;
  45229. break;
  45230. case Gt.R:
  45231. i = n = e[o++], a = r = e[o++];
  45232. var g = e[o++], m = e[o++];
  45233. hB(i, a, i + g, a + m, _o, Oo);
  45234. break;
  45235. case Gt.Z:
  45236. n = i, r = a;
  45237. break;
  45238. }
  45239. Ps(bo, bo, _o), $s(dl, dl, Oo);
  45240. }
  45241. return o === 0 && (bo[0] = bo[1] = dl[0] = dl[1] = 0), new Je(bo[0], bo[1], dl[0] - bo[0], dl[1] - bo[1]);
  45242. }, t.prototype._calculateLength = function() {
  45243. var e = this.data, n = this._len, r = this._ux, i = this._uy, a = 0, o = 0, s = 0, l = 0;
  45244. this._pathSegLen || (this._pathSegLen = []);
  45245. for (var u = this._pathSegLen, c = 0, f = 0, d = 0; d < n; ) {
  45246. var h = e[d++], p = d === 1;
  45247. p && (a = e[d], o = e[d + 1], s = a, l = o);
  45248. var v = -1;
  45249. switch (h) {
  45250. case Gt.M:
  45251. a = s = e[d++], o = l = e[d++];
  45252. break;
  45253. case Gt.L: {
  45254. var g = e[d++], m = e[d++], y = g - a, b = m - o;
  45255. (gs(y) > r || gs(b) > i || d === n - 1) && (v = Math.sqrt(y * y + b * b), a = g, o = m);
  45256. break;
  45257. }
  45258. case Gt.C: {
  45259. var _ = e[d++], O = e[d++], g = e[d++], m = e[d++], S = e[d++], x = e[d++];
  45260. v = VIe(a, o, _, O, g, m, S, x, 10), a = S, o = x;
  45261. break;
  45262. }
  45263. case Gt.Q: {
  45264. var _ = e[d++], O = e[d++], g = e[d++], m = e[d++];
  45265. v = WIe(a, o, _, O, g, m, 10), a = g, o = m;
  45266. break;
  45267. }
  45268. case Gt.A:
  45269. var C = e[d++], T = e[d++], w = e[d++], P = e[d++], $ = e[d++], A = e[d++], D = A + $;
  45270. d += 1, p && (s = Xu($) * w + C, l = Yu($) * P + T), v = pT(w, P) * hT(Sl, Math.abs(A)), a = Xu(D) * w + C, o = Yu(D) * P + T;
  45271. break;
  45272. case Gt.R: {
  45273. s = a = e[d++], l = o = e[d++];
  45274. var E = e[d++], R = e[d++];
  45275. v = E * 2 + R * 2;
  45276. break;
  45277. }
  45278. case Gt.Z: {
  45279. var y = s - a, b = l - o;
  45280. v = Math.sqrt(y * y + b * b), a = s, o = l;
  45281. break;
  45282. }
  45283. }
  45284. v >= 0 && (u[f++] = v, c += v);
  45285. }
  45286. return this._pathLen = c, c;
  45287. }, t.prototype.rebuildPath = function(e, n) {
  45288. 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;
  45289. if (!(h && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, v = this._pathLen, y = n * v, !y)))
  45290. e: for (var S = 0; S < o; ) {
  45291. var x = r[S++], C = S === 1;
  45292. switch (C && (u = r[S], c = r[S + 1], s = u, l = c), x !== Gt.L && b > 0 && (e.lineTo(_, O), b = 0), x) {
  45293. case Gt.M:
  45294. s = u = r[S++], l = c = r[S++], e.moveTo(u, c);
  45295. break;
  45296. case Gt.L: {
  45297. f = r[S++], d = r[S++];
  45298. var T = gs(f - u), w = gs(d - c);
  45299. if (T > i || w > a) {
  45300. if (h) {
  45301. var P = p[m++];
  45302. if (g + P > y) {
  45303. var $ = (y - g) / P;
  45304. e.lineTo(u * (1 - $) + f * $, c * (1 - $) + d * $);
  45305. break e;
  45306. }
  45307. g += P;
  45308. }
  45309. e.lineTo(f, d), u = f, c = d, b = 0;
  45310. } else {
  45311. var A = T * T + w * w;
  45312. A > b && (_ = f, O = d, b = A);
  45313. }
  45314. break;
  45315. }
  45316. case Gt.C: {
  45317. var D = r[S++], E = r[S++], R = r[S++], N = r[S++], V = r[S++], z = r[S++];
  45318. if (h) {
  45319. var P = p[m++];
  45320. if (g + P > y) {
  45321. var $ = (y - g) / P;
  45322. su(u, D, R, V, $, Zu), su(c, E, N, z, $, Uu), e.bezierCurveTo(Zu[1], Uu[1], Zu[2], Uu[2], Zu[3], Uu[3]);
  45323. break e;
  45324. }
  45325. g += P;
  45326. }
  45327. e.bezierCurveTo(D, E, R, N, V, z), u = V, c = z;
  45328. break;
  45329. }
  45330. case Gt.Q: {
  45331. var D = r[S++], E = r[S++], R = r[S++], N = r[S++];
  45332. if (h) {
  45333. var P = p[m++];
  45334. if (g + P > y) {
  45335. var $ = (y - g) / P;
  45336. ym(u, D, R, $, Zu), ym(c, E, N, $, Uu), e.quadraticCurveTo(Zu[1], Uu[1], Zu[2], Uu[2]);
  45337. break e;
  45338. }
  45339. g += P;
  45340. }
  45341. e.quadraticCurveTo(D, E, R, N), u = R, c = N;
  45342. break;
  45343. }
  45344. case Gt.A:
  45345. 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 = gs(Q - Z) > 1e-3, H = ne + ee, G = !1;
  45346. if (h) {
  45347. var P = p[m++];
  45348. g + P > y && (H = ne + ee * (y - g) / P, G = !0), g += P;
  45349. }
  45350. if (X && e.ellipse ? e.ellipse(W, F, Q, Z, oe, ne, H, K) : e.arc(W, F, ie, ne, H, K), G)
  45351. break e;
  45352. C && (s = Xu(ne) * Q + W, l = Yu(ne) * Z + F), u = Xu(H) * Q + W, c = Yu(H) * Z + F;
  45353. break;
  45354. case Gt.R:
  45355. s = u = r[S], l = c = r[S + 1], f = r[S++], d = r[S++];
  45356. var re = r[S++], fe = r[S++];
  45357. if (h) {
  45358. var P = p[m++];
  45359. if (g + P > y) {
  45360. var de = y - g;
  45361. e.moveTo(f, d), e.lineTo(f + hT(de, re), d), de -= re, de > 0 && e.lineTo(f + re, d + hT(de, fe)), de -= fe, de > 0 && e.lineTo(f + pT(re - de, 0), d + fe), de -= re, de > 0 && e.lineTo(f, d + pT(fe - de, 0));
  45362. break e;
  45363. }
  45364. g += P;
  45365. }
  45366. e.rect(f, d, re, fe);
  45367. break;
  45368. case Gt.Z:
  45369. if (h) {
  45370. var P = p[m++];
  45371. if (g + P > y) {
  45372. var $ = (y - g) / P;
  45373. e.lineTo(u * (1 - $) + s * $, c * (1 - $) + l * $);
  45374. break e;
  45375. }
  45376. g += P;
  45377. }
  45378. e.closePath(), u = s, c = l;
  45379. }
  45380. }
  45381. }, t.prototype.clone = function() {
  45382. var e = new t(), n = this.data;
  45383. return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e;
  45384. }, t.CMD = Gt, t.initDefaultProps = function() {
  45385. var e = t.prototype;
  45386. e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
  45387. }(), t;
  45388. }();
  45389. function wl(t, e, n, r, i, a, o) {
  45390. if (i === 0)
  45391. return !1;
  45392. var s = i, l = 0, u = t;
  45393. 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)
  45394. return !1;
  45395. if (t !== n)
  45396. l = (e - r) / (t - n), u = (t * r - n * e) / (t - n);
  45397. else
  45398. return Math.abs(a - t) <= s / 2;
  45399. var c = l * a - o + u, f = c * c / (l * l + 1);
  45400. return f <= s / 2 * s / 2;
  45401. }
  45402. function ARe(t, e, n, r, i, a, o, s, l, u, c) {
  45403. if (l === 0)
  45404. return !1;
  45405. var f = l;
  45406. 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)
  45407. return !1;
  45408. var d = Vq(t, e, n, r, i, a, o, s, u, c, null);
  45409. return d <= f / 2;
  45410. }
  45411. function xK(t, e, n, r, i, a, o, s, l) {
  45412. if (o === 0)
  45413. return !1;
  45414. var u = o;
  45415. 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)
  45416. return !1;
  45417. var c = Wq(t, e, n, r, i, a, s, l, null);
  45418. return c <= u / 2;
  45419. }
  45420. var gB = Math.PI * 2;
  45421. function Fi(t) {
  45422. return t %= gB, t < 0 && (t += gB), t;
  45423. }
  45424. var rv = Math.PI * 2;
  45425. function ERe(t, e, n, r, i, a, o, s, l) {
  45426. if (o === 0)
  45427. return !1;
  45428. var u = o;
  45429. s -= t, l -= e;
  45430. var c = Math.sqrt(s * s + l * l);
  45431. if (c - u > n || c + u < n)
  45432. return !1;
  45433. if (Math.abs(r - i) % rv < 1e-4)
  45434. return !0;
  45435. if (a) {
  45436. var f = r;
  45437. r = Fi(i), i = Fi(f);
  45438. } else
  45439. r = Fi(r), i = Fi(i);
  45440. r > i && (i += rv);
  45441. var d = Math.atan2(l, s);
  45442. return d < 0 && (d += rv), d >= r && d <= i || d + rv >= r && d + rv <= i;
  45443. }
  45444. function Os(t, e, n, r, i, a) {
  45445. if (a > e && a > r || a < e && a < r || r === e)
  45446. return 0;
  45447. var o = (a - e) / (r - e), s = r < e ? 1 : -1;
  45448. (o === 1 || o === 0) && (s = r < e ? 0.5 : -0.5);
  45449. var l = o * (n - t) + t;
  45450. return l === i ? 1 / 0 : l > i ? s : 0;
  45451. }
  45452. var hl = as.CMD, qu = Math.PI * 2, MRe = 1e-4;
  45453. function IRe(t, e) {
  45454. return Math.abs(t - e) < MRe;
  45455. }
  45456. var Wr = [-1, -1, -1], ua = [-1, -1];
  45457. function DRe() {
  45458. var t = ua[0];
  45459. ua[0] = ua[1], ua[1] = t;
  45460. }
  45461. function RRe(t, e, n, r, i, a, o, s, l, u) {
  45462. if (u > e && u > r && u > a && u > s || u < e && u < r && u < a && u < s)
  45463. return 0;
  45464. var c = K1(e, r, a, s, u, Wr);
  45465. if (c === 0)
  45466. return 0;
  45467. for (var f = 0, d = -1, h = void 0, p = void 0, v = 0; v < c; v++) {
  45468. var g = Wr[v], m = g === 0 || g === 1 ? 0.5 : 1, y = Gn(t, n, i, o, g);
  45469. y < l || (d < 0 && (d = zq(e, r, a, s, ua), ua[1] < ua[0] && d > 1 && DRe(), h = Gn(e, r, a, s, ua[0]), d > 1 && (p = Gn(e, r, a, s, ua[1]))), d === 2 ? g < ua[0] ? f += h < e ? m : -m : g < ua[1] ? f += p < h ? m : -m : f += s < p ? m : -m : g < ua[0] ? f += h < e ? m : -m : f += s < h ? m : -m);
  45470. }
  45471. return f;
  45472. }
  45473. function kRe(t, e, n, r, i, a, o, s) {
  45474. if (s > e && s > r && s > a || s < e && s < r && s < a)
  45475. return 0;
  45476. var l = FIe(e, r, a, s, Wr);
  45477. if (l === 0)
  45478. return 0;
  45479. var u = Fq(e, r, a);
  45480. if (u >= 0 && u <= 1) {
  45481. for (var c = 0, f = ir(e, r, a, u), d = 0; d < l; d++) {
  45482. var h = Wr[d] === 0 || Wr[d] === 1 ? 0.5 : 1, p = ir(t, n, i, Wr[d]);
  45483. p < o || (Wr[d] < u ? c += f < e ? h : -h : c += a < f ? h : -h);
  45484. }
  45485. return c;
  45486. } else {
  45487. var h = Wr[0] === 0 || Wr[0] === 1 ? 0.5 : 1, p = ir(t, n, i, Wr[0]);
  45488. return p < o ? 0 : a < e ? h : -h;
  45489. }
  45490. }
  45491. function LRe(t, e, n, r, i, a, o, s) {
  45492. if (s -= e, s > n || s < -n)
  45493. return 0;
  45494. var l = Math.sqrt(n * n - s * s);
  45495. Wr[0] = -l, Wr[1] = l;
  45496. var u = Math.abs(r - i);
  45497. if (u < 1e-4)
  45498. return 0;
  45499. if (u >= qu - 1e-4) {
  45500. r = 0, i = qu;
  45501. var c = a ? 1 : -1;
  45502. return o >= Wr[0] + t && o <= Wr[1] + t ? c : 0;
  45503. }
  45504. if (r > i) {
  45505. var f = r;
  45506. r = i, i = f;
  45507. }
  45508. r < 0 && (r += qu, i += qu);
  45509. for (var d = 0, h = 0; h < 2; h++) {
  45510. var p = Wr[h];
  45511. if (p + t > o) {
  45512. var v = Math.atan2(s, p), c = a ? 1 : -1;
  45513. 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);
  45514. }
  45515. }
  45516. return d;
  45517. }
  45518. function wK(t, e, n, r, i) {
  45519. for (var a = t.data, o = t.len(), s = 0, l = 0, u = 0, c = 0, f = 0, d, h, p = 0; p < o; ) {
  45520. var v = a[p++], g = p === 1;
  45521. switch (v === hl.M && p > 1 && (n || (s += Os(l, u, c, f, r, i))), g && (l = a[p], u = a[p + 1], c = l, f = u), v) {
  45522. case hl.M:
  45523. c = a[p++], f = a[p++], l = c, u = f;
  45524. break;
  45525. case hl.L:
  45526. if (n) {
  45527. if (wl(l, u, a[p], a[p + 1], e, r, i))
  45528. return !0;
  45529. } else
  45530. s += Os(l, u, a[p], a[p + 1], r, i) || 0;
  45531. l = a[p++], u = a[p++];
  45532. break;
  45533. case hl.C:
  45534. if (n) {
  45535. if (ARe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], e, r, i))
  45536. return !0;
  45537. } else
  45538. s += RRe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
  45539. l = a[p++], u = a[p++];
  45540. break;
  45541. case hl.Q:
  45542. if (n) {
  45543. if (xK(l, u, a[p++], a[p++], a[p], a[p + 1], e, r, i))
  45544. return !0;
  45545. } else
  45546. s += kRe(l, u, a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
  45547. l = a[p++], u = a[p++];
  45548. break;
  45549. case hl.A:
  45550. var m = a[p++], y = a[p++], b = a[p++], _ = a[p++], O = a[p++], S = a[p++];
  45551. p += 1;
  45552. var x = !!(1 - a[p++]);
  45553. d = Math.cos(O) * b + m, h = Math.sin(O) * _ + y, g ? (c = d, f = h) : s += Os(l, u, d, h, r, i);
  45554. var C = (r - m) * _ / b + m;
  45555. if (n) {
  45556. if (ERe(m, y, _, O, O + S, x, e, C, i))
  45557. return !0;
  45558. } else
  45559. s += LRe(m, y, _, O, O + S, x, C, i);
  45560. l = Math.cos(O + S) * b + m, u = Math.sin(O + S) * _ + y;
  45561. break;
  45562. case hl.R:
  45563. c = l = a[p++], f = u = a[p++];
  45564. var T = a[p++], w = a[p++];
  45565. if (d = c + T, h = f + w, n) {
  45566. 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))
  45567. return !0;
  45568. } else
  45569. s += Os(d, f, d, h, r, i), s += Os(c, h, c, f, r, i);
  45570. break;
  45571. case hl.Z:
  45572. if (n) {
  45573. if (wl(l, u, c, f, e, r, i))
  45574. return !0;
  45575. } else
  45576. s += Os(l, u, c, f, r, i);
  45577. l = c, u = f;
  45578. break;
  45579. }
  45580. }
  45581. return !n && !IRe(u, f) && (s += Os(l, u, c, f, r, i) || 0), s !== 0;
  45582. }
  45583. function NRe(t, e, n) {
  45584. return wK(t, 0, !1, e, n);
  45585. }
  45586. function BRe(t, e, n, r) {
  45587. return wK(t, e, !0, n, r);
  45588. }
  45589. var aO = Re({
  45590. fill: "#000",
  45591. stroke: null,
  45592. strokePercent: 1,
  45593. fillOpacity: 1,
  45594. strokeOpacity: 1,
  45595. lineDashOffset: 0,
  45596. lineWidth: 1,
  45597. lineCap: "butt",
  45598. miterLimit: 10,
  45599. strokeNoScale: !1,
  45600. strokeFirst: !1
  45601. }, Kc), zRe = {
  45602. style: Re({
  45603. fill: !0,
  45604. stroke: !0,
  45605. strokePercent: !0,
  45606. fillOpacity: !0,
  45607. strokeOpacity: !0,
  45608. lineDashOffset: !0,
  45609. lineWidth: !0,
  45610. miterLimit: !0
  45611. }, Gx.style)
  45612. }, mT = rs.concat([
  45613. "invisible",
  45614. "culling",
  45615. "z",
  45616. "z2",
  45617. "zlevel",
  45618. "parent"
  45619. ]), ot = function(t) {
  45620. q(e, t);
  45621. function e(n) {
  45622. return t.call(this, n) || this;
  45623. }
  45624. return e.prototype.update = function() {
  45625. var n = this;
  45626. t.prototype.update.call(this);
  45627. var r = this.style;
  45628. if (r.decal) {
  45629. var i = this._decalEl = this._decalEl || new e();
  45630. i.buildPath === e.prototype.buildPath && (i.buildPath = function(l) {
  45631. n.buildPath(l, n.shape);
  45632. }), i.silent = !0;
  45633. var a = i.style;
  45634. for (var o in r)
  45635. a[o] !== r[o] && (a[o] = r[o]);
  45636. a.fill = r.fill ? r.decal : null, a.decal = null, a.shadowColor = null, r.strokeFirst && (a.stroke = null);
  45637. for (var s = 0; s < mT.length; ++s)
  45638. i[mT[s]] = this[mT[s]];
  45639. i.__dirty |= ki;
  45640. } else this._decalEl && (this._decalEl = null);
  45641. }, e.prototype.getDecalElement = function() {
  45642. return this._decalEl;
  45643. }, e.prototype._init = function(n) {
  45644. var r = st(n);
  45645. this.shape = this.getDefaultShape();
  45646. var i = this.getDefaultStyle();
  45647. i && this.useStyle(i);
  45648. for (var a = 0; a < r.length; a++) {
  45649. var o = r[a], s = n[o];
  45650. o === "style" ? this.style ? le(this.style, s) : this.useStyle(s) : o === "shape" ? le(this.shape, s) : t.prototype.attrKV.call(this, o, s);
  45651. }
  45652. this.style || this.useStyle({});
  45653. }, e.prototype.getDefaultStyle = function() {
  45654. return null;
  45655. }, e.prototype.getDefaultShape = function() {
  45656. return {};
  45657. }, e.prototype.canBeInsideText = function() {
  45658. return this.hasFill();
  45659. }, e.prototype.getInsideTextFill = function() {
  45660. var n = this.style.fill;
  45661. if (n !== "none") {
  45662. if (Oe(n)) {
  45663. var r = Om(n, 0);
  45664. return r > 0.5 ? OA : r > 0.2 ? bDe : SA;
  45665. } else if (n)
  45666. return SA;
  45667. }
  45668. return OA;
  45669. }, e.prototype.getInsideTextStroke = function(n) {
  45670. var r = this.style.fill;
  45671. if (Oe(r)) {
  45672. var i = this.__zr, a = !!(i && i.isDarkMode()), o = Om(n, 0) < _A;
  45673. if (a === o)
  45674. return r;
  45675. }
  45676. }, e.prototype.buildPath = function(n, r, i) {
  45677. }, e.prototype.pathUpdated = function() {
  45678. this.__dirty &= ~$d;
  45679. }, e.prototype.getUpdatedPathProxy = function(n) {
  45680. return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, n), this.path;
  45681. }, e.prototype.createPathProxy = function() {
  45682. this.path = new as(!1);
  45683. }, e.prototype.hasStroke = function() {
  45684. var n = this.style, r = n.stroke;
  45685. return !(r == null || r === "none" || !(n.lineWidth > 0));
  45686. }, e.prototype.hasFill = function() {
  45687. var n = this.style, r = n.fill;
  45688. return r != null && r !== "none";
  45689. }, e.prototype.getBoundingRect = function() {
  45690. var n = this._rect, r = this.style, i = !n;
  45691. if (i) {
  45692. var a = !1;
  45693. this.path || (a = !0, this.createPathProxy());
  45694. var o = this.path;
  45695. (a || this.__dirty & $d) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), n = o.getBoundingRect();
  45696. }
  45697. if (this._rect = n, this.hasStroke() && this.path && this.path.len() > 0) {
  45698. var s = this._rectStroke || (this._rectStroke = n.clone());
  45699. if (this.__dirty || i) {
  45700. s.copy(n);
  45701. var l = r.strokeNoScale ? this.getLineScale() : 1, u = r.lineWidth;
  45702. if (!this.hasFill()) {
  45703. var c = this.strokeContainThreshold;
  45704. u = Math.max(u, c ?? 4);
  45705. }
  45706. l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
  45707. }
  45708. return s;
  45709. }
  45710. return n;
  45711. }, e.prototype.contain = function(n, r) {
  45712. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect(), o = this.style;
  45713. if (n = i[0], r = i[1], a.contain(n, r)) {
  45714. var s = this.path;
  45715. if (this.hasStroke()) {
  45716. var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
  45717. if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), BRe(s, l / u, n, r)))
  45718. return !0;
  45719. }
  45720. if (this.hasFill())
  45721. return NRe(s, n, r);
  45722. }
  45723. return !1;
  45724. }, e.prototype.dirtyShape = function() {
  45725. this.__dirty |= $d, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
  45726. }, e.prototype.dirty = function() {
  45727. this.dirtyStyle(), this.dirtyShape();
  45728. }, e.prototype.animateShape = function(n) {
  45729. return this.animate("shape", n);
  45730. }, e.prototype.updateDuringAnimation = function(n) {
  45731. n === "style" ? this.dirtyStyle() : n === "shape" ? this.dirtyShape() : this.markRedraw();
  45732. }, e.prototype.attrKV = function(n, r) {
  45733. n === "shape" ? this.setShape(r) : t.prototype.attrKV.call(this, n, r);
  45734. }, e.prototype.setShape = function(n, r) {
  45735. var i = this.shape;
  45736. return i || (i = this.shape = {}), typeof n == "string" ? i[n] = r : le(i, n), this.dirtyShape(), this;
  45737. }, e.prototype.shapeChanged = function() {
  45738. return !!(this.__dirty & $d);
  45739. }, e.prototype.createStyle = function(n) {
  45740. return I0(aO, n);
  45741. }, e.prototype._innerSaveToNormal = function(n) {
  45742. t.prototype._innerSaveToNormal.call(this, n);
  45743. var r = this._normalState;
  45744. n.shape && !r.shape && (r.shape = le({}, this.shape));
  45745. }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
  45746. t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
  45747. var l = !(r && a), u;
  45748. 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)
  45749. if (o) {
  45750. this.shape = le({}, this.shape);
  45751. for (var c = {}, f = st(u), d = 0; d < f.length; d++) {
  45752. var h = f[d];
  45753. typeof u[h] == "object" ? this.shape[h] = u[h] : c[h] = u[h];
  45754. }
  45755. this._transitionState(n, {
  45756. shape: c
  45757. }, s);
  45758. } else
  45759. this.shape = u, this.dirtyShape();
  45760. }, e.prototype._mergeStates = function(n) {
  45761. for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
  45762. var o = n[a];
  45763. o.shape && (i = i || {}, this._mergeStyle(i, o.shape));
  45764. }
  45765. return i && (r.shape = i), r;
  45766. }, e.prototype.getAnimationStyleProps = function() {
  45767. return zRe;
  45768. }, e.prototype.isZeroArea = function() {
  45769. return !1;
  45770. }, e.extend = function(n) {
  45771. var r = function(a) {
  45772. q(o, a);
  45773. function o(s) {
  45774. var l = a.call(this, s) || this;
  45775. return n.init && n.init.call(l, s), l;
  45776. }
  45777. return o.prototype.getDefaultStyle = function() {
  45778. return Le(n.style);
  45779. }, o.prototype.getDefaultShape = function() {
  45780. return Le(n.shape);
  45781. }, o;
  45782. }(e);
  45783. for (var i in n)
  45784. typeof n[i] == "function" && (r.prototype[i] = n[i]);
  45785. return r;
  45786. }, e.initDefaultProps = function() {
  45787. var n = e.prototype;
  45788. n.type = "path", n.strokeContainThreshold = 5, n.segmentIgnoreThreshold = 0, n.subPixelOptimize = !1, n.autoBatch = !1, n.__dirty = ki | Vv | $d;
  45789. }(), e;
  45790. }(Ma), VRe = Re({
  45791. strokeFirst: !0,
  45792. font: iu,
  45793. x: 0,
  45794. y: 0,
  45795. textAlign: "left",
  45796. textBaseline: "top",
  45797. miterLimit: 2
  45798. }, aO), Bh = function(t) {
  45799. q(e, t);
  45800. function e() {
  45801. return t !== null && t.apply(this, arguments) || this;
  45802. }
  45803. return e.prototype.hasStroke = function() {
  45804. var n = this.style, r = n.stroke;
  45805. return r != null && r !== "none" && n.lineWidth > 0;
  45806. }, e.prototype.hasFill = function() {
  45807. var n = this.style, r = n.fill;
  45808. return r != null && r !== "none";
  45809. }, e.prototype.createStyle = function(n) {
  45810. return I0(VRe, n);
  45811. }, e.prototype.setBoundingRect = function(n) {
  45812. this._rect = n;
  45813. }, e.prototype.getBoundingRect = function() {
  45814. var n = this.style;
  45815. if (!this._rect) {
  45816. var r = n.text;
  45817. r != null ? r += "" : r = "";
  45818. var i = k0(r, n.font, n.textAlign, n.textBaseline);
  45819. if (i.x += n.x || 0, i.y += n.y || 0, this.hasStroke()) {
  45820. var a = n.lineWidth;
  45821. i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a;
  45822. }
  45823. this._rect = i;
  45824. }
  45825. return this._rect;
  45826. }, e.initDefaultProps = function() {
  45827. var n = e.prototype;
  45828. n.dirtyRectTolerance = 10;
  45829. }(), e;
  45830. }(Ma);
  45831. Bh.prototype.type = "tspan";
  45832. var FRe = Re({
  45833. x: 0,
  45834. y: 0
  45835. }, Kc), WRe = {
  45836. style: Re({
  45837. x: !0,
  45838. y: !0,
  45839. width: !0,
  45840. height: !0,
  45841. sx: !0,
  45842. sy: !0,
  45843. sWidth: !0,
  45844. sHeight: !0
  45845. }, Gx.style)
  45846. };
  45847. function QRe(t) {
  45848. return !!(t && typeof t != "string" && t.width && t.height);
  45849. }
  45850. var CK = function(t) {
  45851. q(e, t);
  45852. function e() {
  45853. return t !== null && t.apply(this, arguments) || this;
  45854. }
  45855. return e.prototype.createStyle = function(n) {
  45856. return I0(FRe, n);
  45857. }, e.prototype._getSize = function(n) {
  45858. var r = this.style, i = r[n];
  45859. if (i != null)
  45860. return i;
  45861. var a = QRe(r.image) ? r.image : this.__image;
  45862. if (!a)
  45863. return 0;
  45864. var o = n === "width" ? "height" : "width", s = r[o];
  45865. return s == null ? a[n] : a[n] / a[o] * s;
  45866. }, e.prototype.getWidth = function() {
  45867. return this._getSize("width");
  45868. }, e.prototype.getHeight = function() {
  45869. return this._getSize("height");
  45870. }, e.prototype.getAnimationStyleProps = function() {
  45871. return WRe;
  45872. }, e.prototype.getBoundingRect = function() {
  45873. var n = this.style;
  45874. return this._rect || (this._rect = new Je(n.x || 0, n.y || 0, this.getWidth(), this.getHeight())), this._rect;
  45875. }, e;
  45876. }(Ma);
  45877. CK.prototype.type = "image";
  45878. const lr = CK;
  45879. function HRe(t, e) {
  45880. var n = e.x, r = e.y, i = e.width, a = e.height, o = e.r, s, l, u, c;
  45881. 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;
  45882. var f;
  45883. 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);
  45884. }
  45885. var Vd = Math.round;
  45886. function TK(t, e, n) {
  45887. if (e) {
  45888. var r = e.x1, i = e.x2, a = e.y1, o = e.y2;
  45889. t.x1 = r, t.x2 = i, t.y1 = a, t.y2 = o;
  45890. var s = n && n.lineWidth;
  45891. return s && (Vd(r * 2) === Vd(i * 2) && (t.x1 = t.x2 = kc(r, s, !0)), Vd(a * 2) === Vd(o * 2) && (t.y1 = t.y2 = kc(a, s, !0))), t;
  45892. }
  45893. }
  45894. function PK(t, e, n) {
  45895. if (e) {
  45896. var r = e.x, i = e.y, a = e.width, o = e.height;
  45897. t.x = r, t.y = i, t.width = a, t.height = o;
  45898. var s = n && n.lineWidth;
  45899. 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;
  45900. }
  45901. }
  45902. function kc(t, e, n) {
  45903. if (!e)
  45904. return t;
  45905. var r = Vd(t * 2);
  45906. return (r + Vd(e)) % 2 === 0 ? r / 2 : (r + (n ? 1 : -1)) / 2;
  45907. }
  45908. var GRe = /* @__PURE__ */ function() {
  45909. function t() {
  45910. this.x = 0, this.y = 0, this.width = 0, this.height = 0;
  45911. }
  45912. return t;
  45913. }(), jRe = {}, $K = function(t) {
  45914. q(e, t);
  45915. function e(n) {
  45916. return t.call(this, n) || this;
  45917. }
  45918. return e.prototype.getDefaultShape = function() {
  45919. return new GRe();
  45920. }, e.prototype.buildPath = function(n, r) {
  45921. var i, a, o, s;
  45922. if (this.subPixelOptimize) {
  45923. var l = PK(jRe, r, this.style);
  45924. i = l.x, a = l.y, o = l.width, s = l.height, l.r = r.r, r = l;
  45925. } else
  45926. i = r.x, a = r.y, o = r.width, s = r.height;
  45927. r.r ? HRe(n, r) : n.rect(i, a, o, s);
  45928. }, e.prototype.isZeroArea = function() {
  45929. return !this.shape.width || !this.shape.height;
  45930. }, e;
  45931. }(ot);
  45932. $K.prototype.type = "rect";
  45933. const mt = $K;
  45934. var mB = {
  45935. fill: "#000"
  45936. }, yB = 2, ZRe = {
  45937. style: Re({
  45938. fill: !0,
  45939. stroke: !0,
  45940. fillOpacity: !0,
  45941. strokeOpacity: !0,
  45942. lineWidth: !0,
  45943. fontSize: !0,
  45944. lineHeight: !0,
  45945. width: !0,
  45946. height: !0,
  45947. textShadowColor: !0,
  45948. textShadowBlur: !0,
  45949. textShadowOffsetX: !0,
  45950. textShadowOffsetY: !0,
  45951. backgroundColor: !0,
  45952. padding: !0,
  45953. borderColor: !0,
  45954. borderWidth: !0,
  45955. borderRadius: !0
  45956. }, Gx.style)
  45957. }, AK = function(t) {
  45958. q(e, t);
  45959. function e(n) {
  45960. var r = t.call(this) || this;
  45961. return r.type = "text", r._children = [], r._defaultStyle = mB, r.attr(n), r;
  45962. }
  45963. return e.prototype.childrenRef = function() {
  45964. return this._children;
  45965. }, e.prototype.update = function() {
  45966. t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
  45967. for (var n = 0; n < this._children.length; n++) {
  45968. var r = this._children[n];
  45969. r.zlevel = this.zlevel, r.z = this.z, r.z2 = this.z2, r.culling = this.culling, r.cursor = this.cursor, r.invisible = this.invisible;
  45970. }
  45971. }, e.prototype.updateTransform = function() {
  45972. var n = this.innerTransformable;
  45973. n ? (n.updateTransform(), n.transform && (this.transform = n.transform)) : t.prototype.updateTransform.call(this);
  45974. }, e.prototype.getLocalTransform = function(n) {
  45975. var r = this.innerTransformable;
  45976. return r ? r.getLocalTransform(n) : t.prototype.getLocalTransform.call(this, n);
  45977. }, e.prototype.getComputedTransform = function() {
  45978. return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this);
  45979. }, e.prototype._updateSubTexts = function() {
  45980. this._childCursor = 0, YRe(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
  45981. }, e.prototype.addSelfToZr = function(n) {
  45982. t.prototype.addSelfToZr.call(this, n);
  45983. for (var r = 0; r < this._children.length; r++)
  45984. this._children[r].__zr = n;
  45985. }, e.prototype.removeSelfFromZr = function(n) {
  45986. t.prototype.removeSelfFromZr.call(this, n);
  45987. for (var r = 0; r < this._children.length; r++)
  45988. this._children[r].__zr = null;
  45989. }, e.prototype.getBoundingRect = function() {
  45990. if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
  45991. for (var n = new Je(0, 0, 0, 0), r = this._children, i = [], a = null, o = 0; o < r.length; o++) {
  45992. var s = r[o], l = s.getBoundingRect(), u = s.getLocalTransform(i);
  45993. u ? (n.copy(l), n.applyTransform(u), a = a || n.clone(), a.union(n)) : (a = a || l.clone(), a.union(l));
  45994. }
  45995. this._rect = a || n;
  45996. }
  45997. return this._rect;
  45998. }, e.prototype.setDefaultTextStyle = function(n) {
  45999. this._defaultStyle = n || mB;
  46000. }, e.prototype.setTextContent = function(n) {
  46001. if (process.env.NODE_ENV !== "production")
  46002. throw new Error("Can't attach text on another text");
  46003. }, e.prototype._mergeStyle = function(n, r) {
  46004. if (!r)
  46005. return n;
  46006. var i = r.rich, a = n.rich || i && {};
  46007. return le(n, r), i && a ? (this._mergeRich(a, i), n.rich = a) : a && (n.rich = a), n;
  46008. }, e.prototype._mergeRich = function(n, r) {
  46009. for (var i = st(r), a = 0; a < i.length; a++) {
  46010. var o = i[a];
  46011. n[o] = n[o] || {}, le(n[o], r[o]);
  46012. }
  46013. }, e.prototype.getAnimationStyleProps = function() {
  46014. return ZRe;
  46015. }, e.prototype._getOrCreateChild = function(n) {
  46016. var r = this._children[this._childCursor];
  46017. return (!r || !(r instanceof n)) && (r = new n()), this._children[this._childCursor++] = r, r.__zr = this.__zr, r.parent = this, r;
  46018. }, e.prototype._updatePlainTexts = function() {
  46019. var n = this.style, r = n.font || iu, i = n.padding, a = CB(n), o = gRe(a, n), s = yT(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, _ = Ad(g, o.contentHeight, y);
  46020. if (s || i) {
  46021. var O = Wv(v, c, m), S = Ad(g, u, y);
  46022. s && this._renderBackground(n, n, O, S, c, u);
  46023. }
  46024. _ += h / 2, i && (b = wB(v, m, i), y === "top" ? _ += i[0] : y === "bottom" && (_ -= i[2]));
  46025. for (var x = 0, C = !1, T = xB("fill" in n ? n.fill : (C = !0, p.fill)), w = SB("stroke" in n ? n.stroke : !l && (!p.autoStroke || C) ? (x = yB, 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++) {
  46026. var E = this._getOrCreateChild(Bh), R = E.createStyle();
  46027. 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, _B(R, n), _ += h, $ && E.setBoundingRect(new Je(Wv(R.x, n.width, R.textAlign), Ad(R.y, A, R.textBaseline), f, A));
  46028. }
  46029. }, e.prototype._updateRichTexts = function() {
  46030. var n = this.style, r = CB(n), i = bRe(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 = Wv(u, o, d), v = Ad(c, s, h), g = p, m = v;
  46031. l && (g += l[3], m += l[0]);
  46032. var y = g + a;
  46033. yT(n) && this._renderBackground(n, n, p, v, o, s);
  46034. for (var b = !!n.backgroundColor, _ = 0; _ < i.lines.length; _++) {
  46035. 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"); )
  46036. this._placeToken(D, n, C, m, P, "left", b), T -= D.width, P += D.width, w++;
  46037. for (; A >= 0 && (D = S[A], D.align === "right"); )
  46038. this._placeToken(D, n, C, m, $, "right", b), T -= D.width, $ -= D.width, A--;
  46039. for (P += (a - (P - g) - (y - $) - T) / 2; w <= A; )
  46040. D = S[w], this._placeToken(D, n, C, m, P + D.width / 2, "center", b), P += D.width, w++;
  46041. m += C;
  46042. }
  46043. }, e.prototype._placeToken = function(n, r, i, a, o, s, l) {
  46044. var u = r.rich[n.styleName] || {};
  46045. u.text = n.text;
  46046. var c = n.verticalAlign, f = a + i / 2;
  46047. c === "top" ? f = a + n.height / 2 : c === "bottom" && (f = a + i - n.height / 2);
  46048. var d = !n.isLineHolder && yT(u);
  46049. 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);
  46050. var h = !!u.backgroundColor, p = n.textPadding;
  46051. p && (o = wB(o, s, p), f -= n.height / 2 - p[0] - n.innerHeight / 2);
  46052. var v = this._getOrCreateChild(Bh), g = v.createStyle();
  46053. v.useStyle(g);
  46054. var m = this._defaultStyle, y = !1, b = 0, _ = xB("fill" in u ? u.fill : "fill" in r ? r.fill : (y = !0, m.fill)), O = SB("stroke" in u ? u.stroke : "stroke" in r ? r.stroke : !h && !l && (!m.autoStroke || y) ? (b = yB, m.stroke) : null), S = u.textShadowBlur > 0 || r.textShadowBlur > 0;
  46055. 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 = ji(u.opacity, r.opacity, 1), _B(g, u), O && (g.lineWidth = ji(u.lineWidth, r.lineWidth, b), g.lineDash = We(u.lineDash, r.lineDash), g.lineDashOffset = r.lineDashOffset || 0, g.stroke = O), _ && (g.fill = _);
  46056. var x = n.contentWidth, C = n.contentHeight;
  46057. v.setBoundingRect(new Je(Wv(g.x, x, g.textAlign), Ad(g.y, C, g.textBaseline), x, C));
  46058. }, e.prototype._renderBackground = function(n, r, i, a, o, s) {
  46059. var l = n.backgroundColor, u = n.borderWidth, c = n.borderColor, f = l && l.image, d = l && !f, h = n.borderRadius, p = this, v, g;
  46060. if (d || n.lineHeight || u && c) {
  46061. v = this._getOrCreateChild(mt), v.useStyle(v.createStyle()), v.style.fill = null;
  46062. var m = v.shape;
  46063. m.x = i, m.y = a, m.width = o, m.height = s, m.r = h, v.dirtyShape();
  46064. }
  46065. if (d) {
  46066. var y = v.style;
  46067. y.fill = l || null, y.fillOpacity = We(n.fillOpacity, 1);
  46068. } else if (f) {
  46069. g = this._getOrCreateChild(lr), g.onload = function() {
  46070. p.dirtyStyle();
  46071. };
  46072. var b = g.style;
  46073. b.image = l.image, b.x = i, b.y = a, b.width = o, b.height = s;
  46074. }
  46075. if (u && c) {
  46076. var y = v.style;
  46077. 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);
  46078. }
  46079. var _ = (v || g).style;
  46080. _.shadowBlur = n.shadowBlur || 0, _.shadowColor = n.shadowColor || "transparent", _.shadowOffsetX = n.shadowOffsetX || 0, _.shadowOffsetY = n.shadowOffsetY || 0, _.opacity = ji(n.opacity, r.opacity, 1);
  46081. }, e.makeFont = function(n) {
  46082. var r = "";
  46083. return MK(n) && (r = [
  46084. n.fontStyle,
  46085. n.fontWeight,
  46086. EK(n.fontSize),
  46087. n.fontFamily || "sans-serif"
  46088. ].join(" ")), r && ma(r) || n.textFont || n.font;
  46089. }, e;
  46090. }(Ma), URe = { left: !0, right: 1, center: 1 }, XRe = { top: 1, bottom: 1, middle: 1 }, bB = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
  46091. function EK(t) {
  46092. return typeof t == "string" && (t.indexOf("px") !== -1 || t.indexOf("rem") !== -1 || t.indexOf("em") !== -1) ? t : isNaN(+t) ? hR + "px" : t + "px";
  46093. }
  46094. function _B(t, e) {
  46095. for (var n = 0; n < bB.length; n++) {
  46096. var r = bB[n], i = e[r];
  46097. i != null && (t[r] = i);
  46098. }
  46099. }
  46100. function MK(t) {
  46101. return t.fontSize != null || t.fontFamily || t.fontWeight;
  46102. }
  46103. function YRe(t) {
  46104. return OB(t), k(t.rich, OB), t;
  46105. }
  46106. function OB(t) {
  46107. if (t) {
  46108. t.font = AK.makeFont(t);
  46109. var e = t.align;
  46110. e === "middle" && (e = "center"), t.align = e == null || URe[e] ? e : "left";
  46111. var n = t.verticalAlign;
  46112. n === "center" && (n = "middle"), t.verticalAlign = n == null || XRe[n] ? n : "top";
  46113. var r = t.padding;
  46114. r && (t.padding = kx(t.padding));
  46115. }
  46116. }
  46117. function SB(t, e) {
  46118. return t == null || e <= 0 || t === "transparent" || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
  46119. }
  46120. function xB(t) {
  46121. return t == null || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
  46122. }
  46123. function wB(t, e, n) {
  46124. return e === "right" ? t - n[1] : e === "center" ? t + n[3] / 2 - n[1] / 2 : t + n[3];
  46125. }
  46126. function CB(t) {
  46127. var e = t.text;
  46128. return e != null && (e += ""), e;
  46129. }
  46130. function yT(t) {
  46131. return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor);
  46132. }
  46133. const gt = AK;
  46134. var Fe = bt(), MA = function(t, e, n, r) {
  46135. if (r) {
  46136. var i = Fe(r);
  46137. i.dataIndex = n, i.dataType = e, i.seriesIndex = t, i.ssrType = "chart", r.type === "group" && r.traverse(function(a) {
  46138. var o = Fe(a);
  46139. o.seriesIndex = t, o.dataIndex = n, o.dataType = e, o.ssrType = "chart";
  46140. });
  46141. }
  46142. }, TB = 1, PB = {}, IK = bt(), RR = bt(), kR = 0, B0 = 1, Zx = 2, ni = ["emphasis", "blur", "select"], xm = ["normal", "emphasis", "blur", "select"], dp = 10, qRe = 9, Jc = "highlight", V_ = "downplay", Ag = "select", F_ = "unselect", Eg = "toggleSelect";
  46143. function id(t) {
  46144. return t != null && t !== "none";
  46145. }
  46146. function Ux(t, e, n) {
  46147. t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n;
  46148. }
  46149. function DK(t) {
  46150. Ux(t, "emphasis", Zx);
  46151. }
  46152. function RK(t) {
  46153. t.hoverState === Zx && Ux(t, "normal", kR);
  46154. }
  46155. function LR(t) {
  46156. Ux(t, "blur", B0);
  46157. }
  46158. function kK(t) {
  46159. t.hoverState === B0 && Ux(t, "normal", kR);
  46160. }
  46161. function KRe(t) {
  46162. t.selected = !0;
  46163. }
  46164. function JRe(t) {
  46165. t.selected = !1;
  46166. }
  46167. function $B(t, e, n) {
  46168. e(t, n);
  46169. }
  46170. function sl(t, e, n) {
  46171. $B(t, e, n), t.isGroup && t.traverse(function(r) {
  46172. $B(r, e, n);
  46173. });
  46174. }
  46175. function oO(t, e) {
  46176. switch (e) {
  46177. case "emphasis":
  46178. t.hoverState = Zx;
  46179. break;
  46180. case "normal":
  46181. t.hoverState = kR;
  46182. break;
  46183. case "blur":
  46184. t.hoverState = B0;
  46185. break;
  46186. case "select":
  46187. t.selected = !0;
  46188. }
  46189. }
  46190. function eke(t, e, n, r) {
  46191. for (var i = t.style, a = {}, o = 0; o < e.length; o++) {
  46192. var s = e[o], l = i[s];
  46193. a[s] = l ?? (r && r[s]);
  46194. }
  46195. for (var o = 0; o < t.animators.length; o++) {
  46196. var u = t.animators[o];
  46197. u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && u.targetName === "style" && u.saveTo(a, e);
  46198. }
  46199. return a;
  46200. }
  46201. function tke(t, e, n, r) {
  46202. var i = n && et(n, "select") >= 0, a = !1;
  46203. if (t instanceof ot) {
  46204. var o = IK(t), s = i && o.selectFill || o.normalFill, l = i && o.selectStroke || o.normalStroke;
  46205. if (id(s) || id(l)) {
  46206. r = r || {};
  46207. var u = r.style || {};
  46208. u.fill === "inherit" ? (a = !0, r = le({}, r), u = le({}, u), u.fill = s) : !id(u.fill) && id(s) ? (a = !0, r = le({}, r), u = le({}, u), u.fill = eO(s)) : !id(u.stroke) && id(l) && (a || (r = le({}, r), u = le({}, u)), u.stroke = eO(l)), r.style = u;
  46209. }
  46210. }
  46211. if (r && r.z2 == null) {
  46212. a || (r = le({}, r));
  46213. var c = t.z2EmphasisLift;
  46214. r.z2 = t.z2 + (c ?? dp);
  46215. }
  46216. return r;
  46217. }
  46218. function nke(t, e, n) {
  46219. if (n && n.z2 == null) {
  46220. n = le({}, n);
  46221. var r = t.z2SelectLift;
  46222. n.z2 = t.z2 + (r ?? qRe);
  46223. }
  46224. return n;
  46225. }
  46226. function rke(t, e, n) {
  46227. var r = et(t.currentStates, e) >= 0, i = t.style.opacity, a = r ? null : eke(t, ["opacity"], e, {
  46228. opacity: 1
  46229. });
  46230. n = n || {};
  46231. var o = n.style || {};
  46232. return o.opacity == null && (n = le({}, n), o = le({
  46233. // Already being applied 'emphasis'. DON'T mul opacity multiple times.
  46234. opacity: r ? i : a.opacity * 0.1
  46235. }, o), n.style = o), n;
  46236. }
  46237. function bT(t, e) {
  46238. var n = this.states[t];
  46239. if (this.style) {
  46240. if (t === "emphasis")
  46241. return tke(this, t, e, n);
  46242. if (t === "blur")
  46243. return rke(this, t, n);
  46244. if (t === "select")
  46245. return nke(this, t, n);
  46246. }
  46247. return n;
  46248. }
  46249. function bf(t) {
  46250. t.stateProxy = bT;
  46251. var e = t.getTextContent(), n = t.getTextGuideLine();
  46252. e && (e.stateProxy = bT), n && (n.stateProxy = bT);
  46253. }
  46254. function AB(t, e) {
  46255. !zK(t, e) && !t.__highByOuter && sl(t, DK);
  46256. }
  46257. function EB(t, e) {
  46258. !zK(t, e) && !t.__highByOuter && sl(t, RK);
  46259. }
  46260. function js(t, e) {
  46261. t.__highByOuter |= 1 << (e || 0), sl(t, DK);
  46262. }
  46263. function Zs(t, e) {
  46264. !(t.__highByOuter &= ~(1 << (e || 0))) && sl(t, RK);
  46265. }
  46266. function LK(t) {
  46267. sl(t, LR);
  46268. }
  46269. function NR(t) {
  46270. sl(t, kK);
  46271. }
  46272. function NK(t) {
  46273. sl(t, KRe);
  46274. }
  46275. function BK(t) {
  46276. sl(t, JRe);
  46277. }
  46278. function zK(t, e) {
  46279. return t.__highDownSilentOnTouch && e.zrByTouch;
  46280. }
  46281. function VK(t) {
  46282. var e = t.getModel(), n = [], r = [];
  46283. e.eachComponent(function(i, a) {
  46284. var o = RR(a), s = i === "series", l = s ? t.getViewOfSeriesModel(a) : t.getViewOfComponentModel(a);
  46285. !s && r.push(l), o.isBlured && (l.group.traverse(function(u) {
  46286. kK(u);
  46287. }), s && n.push(a)), o.isBlured = !1;
  46288. }), k(r, function(i) {
  46289. i && i.toggleBlurSeries && i.toggleBlurSeries(n, !1, e);
  46290. });
  46291. }
  46292. function IA(t, e, n, r) {
  46293. var i = r.getModel();
  46294. n = n || "coordinateSystem";
  46295. function a(u, c) {
  46296. for (var f = 0; f < c.length; f++) {
  46297. var d = u.getItemGraphicEl(c[f]);
  46298. d && NR(d);
  46299. }
  46300. }
  46301. if (t != null && !(!e || e === "none")) {
  46302. var o = i.getSeriesByIndex(t), s = o.coordinateSystem;
  46303. s && s.master && (s = s.master);
  46304. var l = [];
  46305. i.eachSeries(function(u) {
  46306. var c = o === u, f = u.coordinateSystem;
  46307. f && f.master && (f = f.master);
  46308. var d = f && s ? f === s : c;
  46309. if (!// Not blur other series if blurScope series
  46310. (n === "series" && !c || n === "coordinateSystem" && !d || e === "series" && c)) {
  46311. var h = r.getViewOfSeriesModel(u);
  46312. if (h.group.traverse(function(g) {
  46313. g.__highByOuter && c && e === "self" || LR(g);
  46314. }), wr(e))
  46315. a(u.getData(), e);
  46316. else if (Ie(e))
  46317. for (var p = st(e), v = 0; v < p.length; v++)
  46318. a(u.getData(p[v]), e[p[v]]);
  46319. l.push(u), RR(u).isBlured = !0;
  46320. }
  46321. }), i.eachComponent(function(u, c) {
  46322. if (u !== "series") {
  46323. var f = r.getViewOfComponentModel(c);
  46324. f && f.toggleBlurSeries && f.toggleBlurSeries(l, !0, i);
  46325. }
  46326. });
  46327. }
  46328. }
  46329. function DA(t, e, n) {
  46330. if (!(t == null || e == null)) {
  46331. var r = n.getModel().getComponent(t, e);
  46332. if (r) {
  46333. RR(r).isBlured = !0;
  46334. var i = n.getViewOfComponentModel(r);
  46335. !i || !i.focusBlurEnabled || i.group.traverse(function(a) {
  46336. LR(a);
  46337. });
  46338. }
  46339. }
  46340. }
  46341. function ike(t, e, n) {
  46342. var r = t.seriesIndex, i = t.getData(e.dataType);
  46343. if (!i) {
  46344. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + e.dataType);
  46345. return;
  46346. }
  46347. var a = mf(i, e);
  46348. a = (ue(a) ? a[0] : a) || 0;
  46349. var o = i.getItemGraphicEl(a);
  46350. if (!o)
  46351. for (var s = i.count(), l = 0; !o && l < s; )
  46352. o = i.getItemGraphicEl(l++);
  46353. if (o) {
  46354. var u = Fe(o);
  46355. IA(r, u.focus, u.blurScope, n);
  46356. } else {
  46357. var c = t.get(["emphasis", "focus"]), f = t.get(["emphasis", "blurScope"]);
  46358. c != null && IA(r, c, f, n);
  46359. }
  46360. }
  46361. function BR(t, e, n, r) {
  46362. var i = {
  46363. focusSelf: !1,
  46364. dispatchers: null
  46365. };
  46366. if (t == null || t === "series" || e == null || n == null)
  46367. return i;
  46368. var a = r.getModel().getComponent(t, e);
  46369. if (!a)
  46370. return i;
  46371. var o = r.getViewOfComponentModel(a);
  46372. if (!o || !o.findHighDownDispatchers)
  46373. return i;
  46374. for (var s = o.findHighDownDispatchers(n), l, u = 0; u < s.length; u++)
  46375. if (process.env.NODE_ENV !== "production" && !lu(s[u]) && Cr("param should be highDownDispatcher"), Fe(s[u]).focus === "self") {
  46376. l = !0;
  46377. break;
  46378. }
  46379. return {
  46380. focusSelf: l,
  46381. dispatchers: s
  46382. };
  46383. }
  46384. function ake(t, e, n) {
  46385. process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher");
  46386. var r = Fe(t), i = BR(r.componentMainType, r.componentIndex, r.componentHighDownName, n), a = i.dispatchers, o = i.focusSelf;
  46387. a ? (o && DA(r.componentMainType, r.componentIndex, n), k(a, function(s) {
  46388. return AB(s, e);
  46389. })) : (IA(r.seriesIndex, r.focus, r.blurScope, n), r.focus === "self" && DA(r.componentMainType, r.componentIndex, n), AB(t, e));
  46390. }
  46391. function oke(t, e, n) {
  46392. process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher"), VK(n);
  46393. var r = Fe(t), i = BR(r.componentMainType, r.componentIndex, r.componentHighDownName, n).dispatchers;
  46394. i ? k(i, function(a) {
  46395. return EB(a, e);
  46396. }) : EB(t, e);
  46397. }
  46398. function ske(t, e, n) {
  46399. if (kA(e)) {
  46400. var r = e.dataType, i = t.getData(r), a = mf(i, e);
  46401. ue(a) || (a = [a]), t[e.type === Eg ? "toggleSelect" : e.type === Ag ? "select" : "unselect"](a, r);
  46402. }
  46403. }
  46404. function MB(t) {
  46405. var e = t.getAllData();
  46406. k(e, function(n) {
  46407. var r = n.data, i = n.type;
  46408. r.eachItemGraphicEl(function(a, o) {
  46409. t.isSelected(o, i) ? NK(a) : BK(a);
  46410. });
  46411. });
  46412. }
  46413. function lke(t) {
  46414. var e = [];
  46415. return t.eachSeries(function(n) {
  46416. var r = n.getAllData();
  46417. k(r, function(i) {
  46418. i.data;
  46419. var a = i.type, o = n.getSelectedDataIndices();
  46420. if (o.length > 0) {
  46421. var s = {
  46422. dataIndex: o,
  46423. seriesIndex: n.seriesIndex
  46424. };
  46425. a != null && (s.dataType = a), e.push(s);
  46426. }
  46427. });
  46428. }), e;
  46429. }
  46430. function Yl(t, e, n) {
  46431. Lc(t, !0), sl(t, bf), RA(t, e, n);
  46432. }
  46433. function uke(t) {
  46434. Lc(t, !1);
  46435. }
  46436. function bn(t, e, n, r) {
  46437. r ? uke(t) : Yl(t, e, n);
  46438. }
  46439. function RA(t, e, n) {
  46440. var r = Fe(t);
  46441. e != null ? (r.focus = e, r.blurScope = n) : r.focus && (r.focus = null);
  46442. }
  46443. var IB = ["emphasis", "blur", "select"], cke = {
  46444. itemStyle: "getItemStyle",
  46445. lineStyle: "getLineStyle",
  46446. areaStyle: "getAreaStyle"
  46447. };
  46448. function Tr(t, e, n, r) {
  46449. n = n || "itemStyle";
  46450. for (var i = 0; i < IB.length; i++) {
  46451. var a = IB[i], o = e.getModel([a, n]), s = t.ensureState(a);
  46452. s.style = r ? r(o) : o[cke[n]]();
  46453. }
  46454. }
  46455. function Lc(t, e) {
  46456. var n = e === !1, r = t;
  46457. t.highDownSilentOnTouch && (r.__highDownSilentOnTouch = t.highDownSilentOnTouch), (!n || r.__highDownDispatcher) && (r.__highByOuter = r.__highByOuter || 0, r.__highDownDispatcher = !n);
  46458. }
  46459. function lu(t) {
  46460. return !!(t && t.__highDownDispatcher);
  46461. }
  46462. function fke(t, e, n) {
  46463. var r = Fe(t);
  46464. r.componentMainType = e.mainType, r.componentIndex = e.componentIndex, r.componentHighDownName = n;
  46465. }
  46466. function dke(t) {
  46467. var e = PB[t];
  46468. return e == null && TB <= 32 && (e = PB[t] = TB++), e;
  46469. }
  46470. function kA(t) {
  46471. var e = t.type;
  46472. return e === Ag || e === F_ || e === Eg;
  46473. }
  46474. function DB(t) {
  46475. var e = t.type;
  46476. return e === Jc || e === V_;
  46477. }
  46478. function hke(t) {
  46479. var e = IK(t);
  46480. e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  46481. var n = t.states.select || {};
  46482. e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null;
  46483. }
  46484. var ad = as.CMD, pke = [[], [], []], RB = Math.sqrt, vke = Math.atan2;
  46485. function FK(t, e) {
  46486. if (e) {
  46487. var n = t.data, r = t.len(), i, a, o, s, l, u, c = ad.M, f = ad.C, d = ad.L, h = ad.R, p = ad.A, v = ad.Q;
  46488. for (o = 0, s = 0; o < r; ) {
  46489. switch (i = n[o++], s = o, a = 0, i) {
  46490. case c:
  46491. a = 1;
  46492. break;
  46493. case d:
  46494. a = 1;
  46495. break;
  46496. case f:
  46497. a = 3;
  46498. break;
  46499. case v:
  46500. a = 2;
  46501. break;
  46502. case p:
  46503. var g = e[4], m = e[5], y = RB(e[0] * e[0] + e[1] * e[1]), b = RB(e[2] * e[2] + e[3] * e[3]), _ = vke(-e[1] / b, e[0] / y);
  46504. 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;
  46505. break;
  46506. case h:
  46507. 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];
  46508. }
  46509. for (l = 0; l < a; l++) {
  46510. var O = pke[l];
  46511. O[0] = n[o++], O[1] = n[o++], ar(O, O, e), n[s++] = O[0], n[s++] = O[1];
  46512. }
  46513. }
  46514. t.increaseVersion();
  46515. }
  46516. }
  46517. var _T = Math.sqrt, Ky = Math.sin, Jy = Math.cos, iv = Math.PI;
  46518. function kB(t) {
  46519. return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
  46520. }
  46521. function LA(t, e) {
  46522. return (t[0] * e[0] + t[1] * e[1]) / (kB(t) * kB(e));
  46523. }
  46524. function LB(t, e) {
  46525. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(LA(t, e));
  46526. }
  46527. function NB(t, e, n, r, i, a, o, s, l, u, c) {
  46528. var f = l * (iv / 180), d = Jy(f) * (t - n) / 2 + Ky(f) * (e - r) / 2, h = -1 * Ky(f) * (t - n) / 2 + Jy(f) * (e - r) / 2, p = d * d / (o * o) + h * h / (s * s);
  46529. p > 1 && (o *= _T(p), s *= _T(p));
  46530. var v = (i === a ? -1 : 1) * _T((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 + Jy(f) * g - Ky(f) * m, b = (e + r) / 2 + Ky(f) * g + Jy(f) * m, _ = LB([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 = LB(O, S);
  46531. if (LA(O, S) <= -1 && (x = iv), LA(O, S) >= 1 && (x = 0), x < 0) {
  46532. var C = Math.round(x / iv * 1e6) / 1e6;
  46533. x = iv * 2 + C % 2 * iv;
  46534. }
  46535. c.addData(u, y, b, o, s, _, x, f, a);
  46536. }
  46537. var gke = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, mke = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  46538. function yke(t) {
  46539. var e = new as();
  46540. if (!t)
  46541. return e;
  46542. var n = 0, r = 0, i = n, a = r, o, s = as.CMD, l = t.match(gke);
  46543. if (!l)
  46544. return e;
  46545. for (var u = 0; u < l.length; u++) {
  46546. for (var c = l[u], f = c.charAt(0), d = void 0, h = c.match(mke) || [], p = h.length, v = 0; v < p; v++)
  46547. h[v] = parseFloat(h[v]);
  46548. for (var g = 0; g < p; ) {
  46549. 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;
  46550. switch (f) {
  46551. case "l":
  46552. n += h[g++], r += h[g++], d = s.L, e.addData(d, n, r);
  46553. break;
  46554. case "L":
  46555. n = h[g++], r = h[g++], d = s.L, e.addData(d, n, r);
  46556. break;
  46557. case "m":
  46558. n += h[g++], r += h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "l";
  46559. break;
  46560. case "M":
  46561. n = h[g++], r = h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "L";
  46562. break;
  46563. case "h":
  46564. n += h[g++], d = s.L, e.addData(d, n, r);
  46565. break;
  46566. case "H":
  46567. n = h[g++], d = s.L, e.addData(d, n, r);
  46568. break;
  46569. case "v":
  46570. r += h[g++], d = s.L, e.addData(d, n, r);
  46571. break;
  46572. case "V":
  46573. r = h[g++], d = s.L, e.addData(d, n, r);
  46574. break;
  46575. case "C":
  46576. 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];
  46577. break;
  46578. case "c":
  46579. 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];
  46580. break;
  46581. case "S":
  46582. 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);
  46583. break;
  46584. case "s":
  46585. 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);
  46586. break;
  46587. case "Q":
  46588. C = h[g++], T = h[g++], n = h[g++], r = h[g++], d = s.Q, e.addData(d, C, T, n, r);
  46589. break;
  46590. case "q":
  46591. C = h[g++] + n, T = h[g++] + r, n += h[g++], r += h[g++], d = s.Q, e.addData(d, C, T, n, r);
  46592. break;
  46593. case "T":
  46594. 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);
  46595. break;
  46596. case "t":
  46597. 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);
  46598. break;
  46599. case "A":
  46600. 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, NB(C, T, n, r, S, x, b, _, O, d, e);
  46601. break;
  46602. case "a":
  46603. 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, NB(C, T, n, r, S, x, b, _, O, d, e);
  46604. break;
  46605. }
  46606. }
  46607. (f === "z" || f === "Z") && (d = s.Z, e.addData(d), n = i, r = a), o = d;
  46608. }
  46609. return e.toStatic(), e;
  46610. }
  46611. var WK = function(t) {
  46612. q(e, t);
  46613. function e() {
  46614. return t !== null && t.apply(this, arguments) || this;
  46615. }
  46616. return e.prototype.applyTransform = function(n) {
  46617. }, e;
  46618. }(ot);
  46619. function QK(t) {
  46620. return t.setData != null;
  46621. }
  46622. function HK(t, e) {
  46623. var n = yke(t), r = le({}, e);
  46624. return r.buildPath = function(i) {
  46625. if (QK(i)) {
  46626. i.setData(n.data);
  46627. var a = i.getContext();
  46628. a && i.rebuildPath(a, 1);
  46629. } else {
  46630. var a = i;
  46631. n.rebuildPath(a, 1);
  46632. }
  46633. }, r.applyTransform = function(i) {
  46634. FK(n, i), this.dirtyShape();
  46635. }, r;
  46636. }
  46637. function GK(t, e) {
  46638. return new WK(HK(t, e));
  46639. }
  46640. function bke(t, e) {
  46641. var n = HK(t, e), r = function(i) {
  46642. q(a, i);
  46643. function a(o) {
  46644. var s = i.call(this, o) || this;
  46645. return s.applyTransform = n.applyTransform, s.buildPath = n.buildPath, s;
  46646. }
  46647. return a;
  46648. }(WK);
  46649. return r;
  46650. }
  46651. function _ke(t, e) {
  46652. for (var n = [], r = t.length, i = 0; i < r; i++) {
  46653. var a = t[i];
  46654. n.push(a.getUpdatedPathProxy(!0));
  46655. }
  46656. var o = new ot(e);
  46657. return o.createPathProxy(), o.buildPath = function(s) {
  46658. if (QK(s)) {
  46659. s.appendPath(n);
  46660. var l = s.getContext();
  46661. l && s.rebuildPath(l, 1);
  46662. }
  46663. }, o;
  46664. }
  46665. function zR(t, e) {
  46666. e = e || {};
  46667. var n = new ot();
  46668. return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? FK(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;
  46669. }
  46670. var Oke = /* @__PURE__ */ function() {
  46671. function t() {
  46672. this.cx = 0, this.cy = 0, this.r = 0;
  46673. }
  46674. return t;
  46675. }(), jK = function(t) {
  46676. q(e, t);
  46677. function e(n) {
  46678. return t.call(this, n) || this;
  46679. }
  46680. return e.prototype.getDefaultShape = function() {
  46681. return new Oke();
  46682. }, e.prototype.buildPath = function(n, r) {
  46683. n.moveTo(r.cx + r.r, r.cy), n.arc(r.cx, r.cy, r.r, 0, Math.PI * 2);
  46684. }, e;
  46685. }(ot);
  46686. jK.prototype.type = "circle";
  46687. const ll = jK;
  46688. var Ske = /* @__PURE__ */ function() {
  46689. function t() {
  46690. this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
  46691. }
  46692. return t;
  46693. }(), ZK = function(t) {
  46694. q(e, t);
  46695. function e(n) {
  46696. return t.call(this, n) || this;
  46697. }
  46698. return e.prototype.getDefaultShape = function() {
  46699. return new Ske();
  46700. }, e.prototype.buildPath = function(n, r) {
  46701. var i = 0.5522848, a = r.cx, o = r.cy, s = r.rx, l = r.ry, u = s * i, c = l * i;
  46702. 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();
  46703. }, e;
  46704. }(ot);
  46705. ZK.prototype.type = "ellipse";
  46706. const Xx = ZK;
  46707. var UK = Math.PI, OT = UK * 2, Ku = Math.sin, od = Math.cos, xke = Math.acos, Ar = Math.atan2, BB = Math.abs, Mg = Math.sqrt, Hv = Math.max, So = Math.min, Ha = 1e-4;
  46708. function wke(t, e, n, r, i, a, o, s) {
  46709. var l = n - t, u = r - e, c = o - i, f = s - a, d = f * l - c * u;
  46710. if (!(d * d < Ha))
  46711. return d = (c * (e - a) - f * (t - i)) / d, [t + d * l, e + d * u];
  46712. }
  46713. function eb(t, e, n, r, i, a, o) {
  46714. var s = t - n, l = e - r, u = (o ? a : -a) / Mg(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) * Mg(Hv(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;
  46715. return $ * $ + A * A > D * D + E * E && (C = w, T = P), {
  46716. cx: C,
  46717. cy: T,
  46718. x0: -c,
  46719. y0: -f,
  46720. x1: C * (i / O - 1),
  46721. y1: T * (i / O - 1)
  46722. };
  46723. }
  46724. function Cke(t) {
  46725. var e;
  46726. if (ue(t)) {
  46727. var n = t.length;
  46728. if (!n)
  46729. return t;
  46730. 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;
  46731. } else
  46732. e = [t, t, t, t];
  46733. return e;
  46734. }
  46735. function Tke(t, e) {
  46736. var n, r = Hv(e.r, 0), i = Hv(e.r0 || 0, 0), a = r > 0, o = i > 0;
  46737. if (!(!a && !o)) {
  46738. if (a || (r = i, i = 0), i > r) {
  46739. var s = r;
  46740. r = i, i = s;
  46741. }
  46742. var l = e.startAngle, u = e.endAngle;
  46743. if (!(isNaN(l) || isNaN(u))) {
  46744. var c = e.cx, f = e.cy, d = !!e.clockwise, h = BB(u - l), p = h > OT && h % OT;
  46745. if (p > Ha && (h = p), !(r > Ha))
  46746. t.moveTo(c, f);
  46747. else if (h > OT - Ha)
  46748. t.moveTo(c + r * od(l), f + r * Ku(l)), t.arc(c, f, r, l, u, !d), i > Ha && (t.moveTo(c + i * od(u), f + i * Ku(u)), t.arc(c, f, i, u, l, d));
  46749. else {
  46750. 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 * od(l), R = r * Ku(l), N = i * od(u), V = i * Ku(u), z = h > Ha;
  46751. if (z) {
  46752. var W = e.cornerRadius;
  46753. W && (n = Cke(W), v = n[0], g = n[1], m = n[2], y = n[3]);
  46754. var F = BB(r - i) / 2;
  46755. if (b = So(F, m), _ = So(F, y), O = So(F, v), S = So(F, g), T = x = Hv(b, _), w = C = Hv(O, S), (x > Ha || C > Ha) && (P = r * od(u), $ = r * Ku(u), A = i * od(l), D = i * Ku(l), h < UK)) {
  46756. var Q = wke(E, R, A, D, P, $, N, V);
  46757. if (Q) {
  46758. var Z = E - Q[0], ne = R - Q[1], ee = P - Q[0], oe = $ - Q[1], K = 1 / Ku(xke((Z * ee + ne * oe) / (Mg(Z * Z + ne * ne) * Mg(ee * ee + oe * oe))) / 2), ie = Mg(Q[0] * Q[0] + Q[1] * Q[1]);
  46759. T = So(x, (r - ie) / (K + 1)), w = So(C, (i - ie) / (K - 1));
  46760. }
  46761. }
  46762. }
  46763. if (!z)
  46764. t.moveTo(c + E, f + R);
  46765. else if (T > Ha) {
  46766. var X = So(m, T), H = So(y, T), G = eb(A, D, E, R, r, X, d), re = eb(P, $, N, V, r, H, d);
  46767. 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, Ar(G.y0, G.x0), Ar(re.y0, re.x0), !d) : (X > 0 && t.arc(c + G.cx, f + G.cy, X, Ar(G.y0, G.x0), Ar(G.y1, G.x1), !d), t.arc(c, f, r, Ar(G.cy + G.y1, G.cx + G.x1), Ar(re.cy + re.y1, re.cx + re.x1), !d), H > 0 && t.arc(c + re.cx, f + re.cy, H, Ar(re.y1, re.x1), Ar(re.y0, re.x0), !d));
  46768. } else
  46769. t.moveTo(c + E, f + R), t.arc(c, f, r, l, u, !d);
  46770. if (!(i > Ha) || !z)
  46771. t.lineTo(c + N, f + V);
  46772. else if (w > Ha) {
  46773. var X = So(v, w), H = So(g, w), G = eb(N, V, P, $, i, -H, d), re = eb(E, R, A, D, i, -X, d);
  46774. 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, Ar(G.y0, G.x0), Ar(re.y0, re.x0), !d) : (H > 0 && t.arc(c + G.cx, f + G.cy, H, Ar(G.y0, G.x0), Ar(G.y1, G.x1), !d), t.arc(c, f, i, Ar(G.cy + G.y1, G.cx + G.x1), Ar(re.cy + re.y1, re.cx + re.x1), d), X > 0 && t.arc(c + re.cx, f + re.cy, X, Ar(re.y1, re.x1), Ar(re.y0, re.x0), !d));
  46775. } else
  46776. t.lineTo(c + N, f + V), t.arc(c, f, i, u, l, d);
  46777. }
  46778. t.closePath();
  46779. }
  46780. }
  46781. }
  46782. var Pke = /* @__PURE__ */ function() {
  46783. function t() {
  46784. 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;
  46785. }
  46786. return t;
  46787. }(), XK = function(t) {
  46788. q(e, t);
  46789. function e(n) {
  46790. return t.call(this, n) || this;
  46791. }
  46792. return e.prototype.getDefaultShape = function() {
  46793. return new Pke();
  46794. }, e.prototype.buildPath = function(n, r) {
  46795. Tke(n, r);
  46796. }, e.prototype.isZeroArea = function() {
  46797. return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
  46798. }, e;
  46799. }(ot);
  46800. XK.prototype.type = "sector";
  46801. const ri = XK;
  46802. var $ke = /* @__PURE__ */ function() {
  46803. function t() {
  46804. this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
  46805. }
  46806. return t;
  46807. }(), YK = function(t) {
  46808. q(e, t);
  46809. function e(n) {
  46810. return t.call(this, n) || this;
  46811. }
  46812. return e.prototype.getDefaultShape = function() {
  46813. return new $ke();
  46814. }, e.prototype.buildPath = function(n, r) {
  46815. var i = r.cx, a = r.cy, o = Math.PI * 2;
  46816. 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);
  46817. }, e;
  46818. }(ot);
  46819. YK.prototype.type = "ring";
  46820. const z0 = YK;
  46821. function Ake(t, e, n, r) {
  46822. var i = [], a = [], o = [], s = [], l, u, c, f;
  46823. if (r) {
  46824. c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0];
  46825. for (var d = 0, h = t.length; d < h; d++)
  46826. Ps(c, c, t[d]), $s(f, f, t[d]);
  46827. Ps(c, c, r[0]), $s(f, f, r[1]);
  46828. }
  46829. for (var d = 0, h = t.length; d < h; d++) {
  46830. var p = t[d];
  46831. if (n)
  46832. l = t[d ? d - 1 : h - 1], u = t[(d + 1) % h];
  46833. else if (d === 0 || d === h - 1) {
  46834. i.push(Zo(t[d]));
  46835. continue;
  46836. } else
  46837. l = t[d - 1], u = t[d + 1];
  46838. kl(a, u, l), Sg(a, a, e);
  46839. var v = X1(p, l), g = X1(p, u), m = v + g;
  46840. m !== 0 && (v /= m, g /= m), Sg(o, a, -v), Sg(s, a, g);
  46841. var y = oA([], p, o), b = oA([], p, s);
  46842. r && ($s(y, y, c), Ps(y, y, f), $s(b, b, c), Ps(b, b, f)), i.push(y), i.push(b);
  46843. }
  46844. return n && i.push(i.shift()), i;
  46845. }
  46846. function qK(t, e, n) {
  46847. var r = e.smooth, i = e.points;
  46848. if (i && i.length >= 2) {
  46849. if (r) {
  46850. var a = Ake(i, r, n, e.smoothConstraint);
  46851. t.moveTo(i[0][0], i[0][1]);
  46852. for (var o = i.length, s = 0; s < (n ? o : o - 1); s++) {
  46853. var l = a[s * 2], u = a[s * 2 + 1], c = i[(s + 1) % o];
  46854. t.bezierCurveTo(l[0], l[1], u[0], u[1], c[0], c[1]);
  46855. }
  46856. } else {
  46857. t.moveTo(i[0][0], i[0][1]);
  46858. for (var s = 1, f = i.length; s < f; s++)
  46859. t.lineTo(i[s][0], i[s][1]);
  46860. }
  46861. n && t.closePath();
  46862. }
  46863. }
  46864. var Eke = /* @__PURE__ */ function() {
  46865. function t() {
  46866. this.points = null, this.smooth = 0, this.smoothConstraint = null;
  46867. }
  46868. return t;
  46869. }(), KK = function(t) {
  46870. q(e, t);
  46871. function e(n) {
  46872. return t.call(this, n) || this;
  46873. }
  46874. return e.prototype.getDefaultShape = function() {
  46875. return new Eke();
  46876. }, e.prototype.buildPath = function(n, r) {
  46877. qK(n, r, !0);
  46878. }, e;
  46879. }(ot);
  46880. KK.prototype.type = "polygon";
  46881. const ii = KK;
  46882. var Mke = /* @__PURE__ */ function() {
  46883. function t() {
  46884. this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
  46885. }
  46886. return t;
  46887. }(), JK = function(t) {
  46888. q(e, t);
  46889. function e(n) {
  46890. return t.call(this, n) || this;
  46891. }
  46892. return e.prototype.getDefaultStyle = function() {
  46893. return {
  46894. stroke: "#000",
  46895. fill: null
  46896. };
  46897. }, e.prototype.getDefaultShape = function() {
  46898. return new Mke();
  46899. }, e.prototype.buildPath = function(n, r) {
  46900. qK(n, r, !1);
  46901. }, e;
  46902. }(ot);
  46903. JK.prototype.type = "polyline";
  46904. const ai = JK;
  46905. var Ike = {}, Dke = /* @__PURE__ */ function() {
  46906. function t() {
  46907. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  46908. }
  46909. return t;
  46910. }(), eJ = function(t) {
  46911. q(e, t);
  46912. function e(n) {
  46913. return t.call(this, n) || this;
  46914. }
  46915. return e.prototype.getDefaultStyle = function() {
  46916. return {
  46917. stroke: "#000",
  46918. fill: null
  46919. };
  46920. }, e.prototype.getDefaultShape = function() {
  46921. return new Dke();
  46922. }, e.prototype.buildPath = function(n, r) {
  46923. var i, a, o, s;
  46924. if (this.subPixelOptimize) {
  46925. var l = TK(Ike, r, this.style);
  46926. i = l.x1, a = l.y1, o = l.x2, s = l.y2;
  46927. } else
  46928. i = r.x1, a = r.y1, o = r.x2, s = r.y2;
  46929. var u = r.percent;
  46930. u !== 0 && (n.moveTo(i, a), u < 1 && (o = i * (1 - u) + o * u, s = a * (1 - u) + s * u), n.lineTo(o, s));
  46931. }, e.prototype.pointAt = function(n) {
  46932. var r = this.shape;
  46933. return [
  46934. r.x1 * (1 - n) + r.x2 * n,
  46935. r.y1 * (1 - n) + r.y2 * n
  46936. ];
  46937. }, e;
  46938. }(ot);
  46939. eJ.prototype.type = "line";
  46940. const Un = eJ;
  46941. var oi = [], Rke = /* @__PURE__ */ function() {
  46942. function t() {
  46943. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
  46944. }
  46945. return t;
  46946. }();
  46947. function zB(t, e, n) {
  46948. var r = t.cpx2, i = t.cpy2;
  46949. return r != null || i != null ? [
  46950. (n ? Q6 : Gn)(t.x1, t.cpx1, t.cpx2, t.x2, e),
  46951. (n ? Q6 : Gn)(t.y1, t.cpy1, t.cpy2, t.y2, e)
  46952. ] : [
  46953. (n ? fA : ir)(t.x1, t.cpx1, t.x2, e),
  46954. (n ? fA : ir)(t.y1, t.cpy1, t.y2, e)
  46955. ];
  46956. }
  46957. var tJ = function(t) {
  46958. q(e, t);
  46959. function e(n) {
  46960. return t.call(this, n) || this;
  46961. }
  46962. return e.prototype.getDefaultStyle = function() {
  46963. return {
  46964. stroke: "#000",
  46965. fill: null
  46966. };
  46967. }, e.prototype.getDefaultShape = function() {
  46968. return new Rke();
  46969. }, e.prototype.buildPath = function(n, r) {
  46970. 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;
  46971. d !== 0 && (n.moveTo(i, a), c == null || f == null ? (d < 1 && (ym(i, l, o, d, oi), l = oi[1], o = oi[2], ym(a, u, s, d, oi), u = oi[1], s = oi[2]), n.quadraticCurveTo(l, u, o, s)) : (d < 1 && (su(i, l, c, o, d, oi), l = oi[1], c = oi[2], o = oi[3], su(a, u, f, s, d, oi), u = oi[1], f = oi[2], s = oi[3]), n.bezierCurveTo(l, u, c, f, o, s)));
  46972. }, e.prototype.pointAt = function(n) {
  46973. return zB(this.shape, n, !1);
  46974. }, e.prototype.tangentAt = function(n) {
  46975. var r = zB(this.shape, n, !0);
  46976. return Rf(r, r);
  46977. }, e;
  46978. }(ot);
  46979. tJ.prototype.type = "bezier-curve";
  46980. const V0 = tJ;
  46981. var kke = /* @__PURE__ */ function() {
  46982. function t() {
  46983. this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  46984. }
  46985. return t;
  46986. }(), nJ = function(t) {
  46987. q(e, t);
  46988. function e(n) {
  46989. return t.call(this, n) || this;
  46990. }
  46991. return e.prototype.getDefaultStyle = function() {
  46992. return {
  46993. stroke: "#000",
  46994. fill: null
  46995. };
  46996. }, e.prototype.getDefaultShape = function() {
  46997. return new kke();
  46998. }, e.prototype.buildPath = function(n, r) {
  46999. 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);
  47000. n.moveTo(c * o + i, f * o + a), n.arc(i, a, o, s, l, !u);
  47001. }, e;
  47002. }(ot);
  47003. nJ.prototype.type = "arc";
  47004. const Yx = nJ;
  47005. var Lke = function(t) {
  47006. q(e, t);
  47007. function e() {
  47008. var n = t !== null && t.apply(this, arguments) || this;
  47009. return n.type = "compound", n;
  47010. }
  47011. return e.prototype._updatePathDirty = function() {
  47012. for (var n = this.shape.paths, r = this.shapeChanged(), i = 0; i < n.length; i++)
  47013. r = r || n[i].shapeChanged();
  47014. r && this.dirtyShape();
  47015. }, e.prototype.beforeBrush = function() {
  47016. this._updatePathDirty();
  47017. for (var n = this.shape.paths || [], r = this.getGlobalScale(), i = 0; i < n.length; i++)
  47018. n[i].path || n[i].createPathProxy(), n[i].path.setScale(r[0], r[1], n[i].segmentIgnoreThreshold);
  47019. }, e.prototype.buildPath = function(n, r) {
  47020. for (var i = r.paths || [], a = 0; a < i.length; a++)
  47021. i[a].buildPath(n, i[a].shape, !0);
  47022. }, e.prototype.afterBrush = function() {
  47023. for (var n = this.shape.paths || [], r = 0; r < n.length; r++)
  47024. n[r].pathUpdated();
  47025. }, e.prototype.getBoundingRect = function() {
  47026. return this._updatePathDirty.call(this), ot.prototype.getBoundingRect.call(this);
  47027. }, e;
  47028. }(ot);
  47029. const qx = Lke;
  47030. var rJ = function() {
  47031. function t(e) {
  47032. this.colorStops = e || [];
  47033. }
  47034. return t.prototype.addColorStop = function(e, n) {
  47035. this.colorStops.push({
  47036. offset: e,
  47037. color: n
  47038. });
  47039. }, t;
  47040. }(), Nke = function(t) {
  47041. q(e, t);
  47042. function e(n, r, i, a, o, s) {
  47043. var l = t.call(this, o) || this;
  47044. 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;
  47045. }
  47046. return e;
  47047. }(rJ);
  47048. const hp = Nke;
  47049. var Bke = function(t) {
  47050. q(e, t);
  47051. function e(n, r, i, a, o) {
  47052. var s = t.call(this, a) || this;
  47053. return s.x = n ?? 0.5, s.y = r ?? 0.5, s.r = i ?? 0.5, s.type = "radial", s.global = o || !1, s;
  47054. }
  47055. return e;
  47056. }(rJ);
  47057. const VR = Bke;
  47058. var Ju = [0, 0], ec = [0, 0], tb = new Ke(), nb = new Ke(), zke = function() {
  47059. function t(e, n) {
  47060. this._corners = [], this._axes = [], this._origin = [0, 0];
  47061. for (var r = 0; r < 4; r++)
  47062. this._corners[r] = new Ke();
  47063. for (var r = 0; r < 2; r++)
  47064. this._axes[r] = new Ke();
  47065. e && this.fromBoundingRect(e, n);
  47066. }
  47067. return t.prototype.fromBoundingRect = function(e, n) {
  47068. var r = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, l = o + e.height;
  47069. if (r[0].set(a, o), r[1].set(s, o), r[2].set(s, l), r[3].set(a, l), n)
  47070. for (var u = 0; u < 4; u++)
  47071. r[u].transform(n);
  47072. Ke.sub(i[0], r[1], r[0]), Ke.sub(i[1], r[3], r[0]), i[0].normalize(), i[1].normalize();
  47073. for (var u = 0; u < 2; u++)
  47074. this._origin[u] = i[u].dot(r[0]);
  47075. }, t.prototype.intersect = function(e, n) {
  47076. var r = !0, i = !n;
  47077. return tb.set(1 / 0, 1 / 0), nb.set(0, 0), !this._intersectCheckOneSide(this, e, tb, nb, i, 1) && (r = !1, i) || !this._intersectCheckOneSide(e, this, tb, nb, i, -1) && (r = !1, i) || i || Ke.copy(n, r ? tb : nb), r;
  47078. }, t.prototype._intersectCheckOneSide = function(e, n, r, i, a, o) {
  47079. for (var s = !0, l = 0; l < 2; l++) {
  47080. var u = this._axes[l];
  47081. if (this._getProjMinMaxOnAxis(l, e._corners, Ju), this._getProjMinMaxOnAxis(l, n._corners, ec), Ju[1] < ec[0] || Ju[0] > ec[1]) {
  47082. if (s = !1, a)
  47083. return s;
  47084. var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
  47085. Math.min(c, f) > i.len() && (c < f ? Ke.scale(i, u, -c * o) : Ke.scale(i, u, f * o));
  47086. } else if (r) {
  47087. var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
  47088. Math.min(c, f) < r.len() && (c < f ? Ke.scale(r, u, c * o) : Ke.scale(r, u, -f * o));
  47089. }
  47090. }
  47091. return s;
  47092. }, t.prototype._getProjMinMaxOnAxis = function(e, n, r) {
  47093. 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++) {
  47094. var c = n[u].dot(i) + a[e];
  47095. s = Math.min(c, s), l = Math.max(c, l);
  47096. }
  47097. r[0] = s, r[1] = l;
  47098. }, t;
  47099. }();
  47100. const sO = zke;
  47101. var Vke = [], Fke = function(t) {
  47102. q(e, t);
  47103. function e() {
  47104. var n = t !== null && t.apply(this, arguments) || this;
  47105. return n.notClear = !0, n.incremental = !0, n._displayables = [], n._temporaryDisplayables = [], n._cursor = 0, n;
  47106. }
  47107. return e.prototype.traverse = function(n, r) {
  47108. n.call(r, this);
  47109. }, e.prototype.useStyle = function() {
  47110. this.style = {};
  47111. }, e.prototype.getCursor = function() {
  47112. return this._cursor;
  47113. }, e.prototype.innerAfterBrush = function() {
  47114. this._cursor = this._displayables.length;
  47115. }, e.prototype.clearDisplaybles = function() {
  47116. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
  47117. }, e.prototype.clearTemporalDisplayables = function() {
  47118. this._temporaryDisplayables = [];
  47119. }, e.prototype.addDisplayable = function(n, r) {
  47120. r ? this._temporaryDisplayables.push(n) : this._displayables.push(n), this.markRedraw();
  47121. }, e.prototype.addDisplayables = function(n, r) {
  47122. r = r || !1;
  47123. for (var i = 0; i < n.length; i++)
  47124. this.addDisplayable(n[i], r);
  47125. }, e.prototype.getDisplayables = function() {
  47126. return this._displayables;
  47127. }, e.prototype.getTemporalDisplayables = function() {
  47128. return this._temporaryDisplayables;
  47129. }, e.prototype.eachPendingDisplayable = function(n) {
  47130. for (var r = this._cursor; r < this._displayables.length; r++)
  47131. n && n(this._displayables[r]);
  47132. for (var r = 0; r < this._temporaryDisplayables.length; r++)
  47133. n && n(this._temporaryDisplayables[r]);
  47134. }, e.prototype.update = function() {
  47135. this.updateTransform();
  47136. for (var n = this._cursor; n < this._displayables.length; n++) {
  47137. var r = this._displayables[n];
  47138. r.parent = this, r.update(), r.parent = null;
  47139. }
  47140. for (var n = 0; n < this._temporaryDisplayables.length; n++) {
  47141. var r = this._temporaryDisplayables[n];
  47142. r.parent = this, r.update(), r.parent = null;
  47143. }
  47144. }, e.prototype.getBoundingRect = function() {
  47145. if (!this._rect) {
  47146. for (var n = new Je(1 / 0, 1 / 0, -1 / 0, -1 / 0), r = 0; r < this._displayables.length; r++) {
  47147. var i = this._displayables[r], a = i.getBoundingRect().clone();
  47148. i.needLocalTransform() && a.applyTransform(i.getLocalTransform(Vke)), n.union(a);
  47149. }
  47150. this._rect = n;
  47151. }
  47152. return this._rect;
  47153. }, e.prototype.contain = function(n, r) {
  47154. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  47155. if (a.contain(i[0], i[1]))
  47156. for (var o = 0; o < this._displayables.length; o++) {
  47157. var s = this._displayables[o];
  47158. if (s.contain(n, r))
  47159. return !0;
  47160. }
  47161. return !1;
  47162. }, e;
  47163. }(Ma);
  47164. const iJ = Fke;
  47165. var aJ = bt();
  47166. function pp(t, e, n, r, i) {
  47167. var a;
  47168. if (e && e.ecModel) {
  47169. var o = e.ecModel.getUpdatePayload();
  47170. a = o && o.animation;
  47171. }
  47172. var s = e && e.isAnimationEnabled(), l = t === "update";
  47173. if (s) {
  47174. var u = void 0, c = void 0, f = void 0;
  47175. 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));
  47176. var d = {
  47177. duration: u || 0,
  47178. delay: f,
  47179. easing: c
  47180. };
  47181. return d;
  47182. } else
  47183. return null;
  47184. }
  47185. function FR(t, e, n, r, i, a, o) {
  47186. var s = !1, l;
  47187. 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);
  47188. var u = t === "leave";
  47189. u || e.stopAnimation("leave");
  47190. var c = pp(t, r, i, u ? l || {} : null, r && r.getAnimationDelayParams ? r.getAnimationDelayParams(e, i) : null);
  47191. if (c && c.duration > 0) {
  47192. var f = c.duration, d = c.delay, h = c.easing, p = {
  47193. duration: f,
  47194. delay: d || 0,
  47195. easing: h,
  47196. done: a,
  47197. force: !!a || !!o,
  47198. // Set to final state in update/init animation.
  47199. // So the post processing based on the path shape can be done correctly.
  47200. setToFinal: !u,
  47201. scope: t,
  47202. during: o
  47203. };
  47204. s ? e.animateFrom(n, p) : e.animateTo(n, p);
  47205. } else
  47206. e.stopAnimation(), !s && e.attr(n), o && o(1), a && a();
  47207. }
  47208. function Ct(t, e, n, r, i, a) {
  47209. FR("update", t, e, n, r, i, a);
  47210. }
  47211. function Yt(t, e, n, r, i, a) {
  47212. FR("enter", t, e, n, r, i, a);
  47213. }
  47214. function th(t) {
  47215. if (!t.__zr)
  47216. return !0;
  47217. for (var e = 0; e < t.animators.length; e++) {
  47218. var n = t.animators[e];
  47219. if (n.scope === "leave")
  47220. return !0;
  47221. }
  47222. return !1;
  47223. }
  47224. function uu(t, e, n, r, i, a) {
  47225. th(t) || FR("leave", t, e, n, r, i, a);
  47226. }
  47227. function VB(t, e, n, r) {
  47228. t.removeTextContent(), t.removeTextGuideLine(), uu(t, {
  47229. style: {
  47230. opacity: 0
  47231. }
  47232. }, e, n, r);
  47233. }
  47234. function wm(t, e, n) {
  47235. function r() {
  47236. t.parent && t.parent.remove(t);
  47237. }
  47238. t.isGroup ? t.traverse(function(i) {
  47239. i.isGroup || VB(i, e, n, r);
  47240. }) : VB(t, e, n, r);
  47241. }
  47242. function so(t) {
  47243. aJ(t).oldStyle = t.style;
  47244. }
  47245. function Wke(t) {
  47246. return aJ(t).oldStyle;
  47247. }
  47248. var lO = Math.max, uO = Math.min, NA = {};
  47249. function oJ(t) {
  47250. return ot.extend(t);
  47251. }
  47252. var Qke = bke;
  47253. function sJ(t, e) {
  47254. return Qke(t, e);
  47255. }
  47256. function ka(t, e) {
  47257. NA[t] = e;
  47258. }
  47259. function Kx(t) {
  47260. if (NA.hasOwnProperty(t))
  47261. return NA[t];
  47262. }
  47263. function F0(t, e, n, r) {
  47264. var i = GK(t, e);
  47265. return n && (r === "center" && (n = lJ(n, i.getBoundingRect())), QR(i, n)), i;
  47266. }
  47267. function WR(t, e, n) {
  47268. var r = new lr({
  47269. style: {
  47270. image: t,
  47271. x: e.x,
  47272. y: e.y,
  47273. width: e.width,
  47274. height: e.height
  47275. },
  47276. onload: function(i) {
  47277. if (n === "center") {
  47278. var a = {
  47279. width: i.width,
  47280. height: i.height
  47281. };
  47282. r.setStyle(lJ(e, a));
  47283. }
  47284. }
  47285. });
  47286. return r;
  47287. }
  47288. function lJ(t, e) {
  47289. var n = e.width / e.height, r = t.height * n, i;
  47290. r <= t.width ? i = t.height : (r = t.width, i = r / n);
  47291. var a = t.x + t.width / 2, o = t.y + t.height / 2;
  47292. return {
  47293. x: a - r / 2,
  47294. y: o - i / 2,
  47295. width: r,
  47296. height: i
  47297. };
  47298. }
  47299. var Li = _ke;
  47300. function QR(t, e) {
  47301. if (t.applyTransform) {
  47302. var n = t.getBoundingRect(), r = n.calculateTransform(e);
  47303. t.applyTransform(r);
  47304. }
  47305. }
  47306. function zh(t, e) {
  47307. return TK(t, t, {
  47308. lineWidth: e
  47309. }), t;
  47310. }
  47311. function Hke(t) {
  47312. return PK(t.shape, t.shape, t.style), t;
  47313. }
  47314. var W_ = kc;
  47315. function ql(t, e) {
  47316. for (var n = D0([]); t && t !== e; )
  47317. Uo(n, t.getLocalTransform(), n), t = t.parent;
  47318. return n;
  47319. }
  47320. function to(t, e, n) {
  47321. return e && !wr(e) && (e = As.getLocalTransform(e)), n && (e = kf([], e)), ar([], t, e);
  47322. }
  47323. function Jx(t, e, n) {
  47324. 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];
  47325. return a = to(a, e, n), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
  47326. }
  47327. function FB(t) {
  47328. return !t.isGroup;
  47329. }
  47330. function Gke(t) {
  47331. return t.shape != null;
  47332. }
  47333. function W0(t, e, n) {
  47334. if (!t || !e)
  47335. return;
  47336. function r(o) {
  47337. var s = {};
  47338. return o.traverse(function(l) {
  47339. FB(l) && l.anid && (s[l.anid] = l);
  47340. }), s;
  47341. }
  47342. function i(o) {
  47343. var s = {
  47344. x: o.x,
  47345. y: o.y,
  47346. rotation: o.rotation
  47347. };
  47348. return Gke(o) && (s.shape = le({}, o.shape)), s;
  47349. }
  47350. var a = r(t);
  47351. e.traverse(function(o) {
  47352. if (FB(o) && o.anid) {
  47353. var s = a[o.anid];
  47354. if (s) {
  47355. var l = i(o);
  47356. o.attr(i(s)), Ct(o, l, n, Fe(o).dataIndex);
  47357. }
  47358. }
  47359. });
  47360. }
  47361. function HR(t, e) {
  47362. return ce(t, function(n) {
  47363. var r = n[0];
  47364. r = lO(r, e.x), r = uO(r, e.x + e.width);
  47365. var i = n[1];
  47366. return i = lO(i, e.y), i = uO(i, e.y + e.height), [r, i];
  47367. });
  47368. }
  47369. function uJ(t, e) {
  47370. var n = lO(t.x, e.x), r = uO(t.x + t.width, e.x + e.width), i = lO(t.y, e.y), a = uO(t.y + t.height, e.y + e.height);
  47371. if (r >= n && a >= i)
  47372. return {
  47373. x: n,
  47374. y: i,
  47375. width: r - n,
  47376. height: a - i
  47377. };
  47378. }
  47379. function vp(t, e, n) {
  47380. var r = le({
  47381. rectHover: !0
  47382. }, e), i = r.style = {
  47383. strokeNoScale: !0
  47384. };
  47385. if (n = n || {
  47386. x: -1,
  47387. y: -1,
  47388. width: 2,
  47389. height: 2
  47390. }, t)
  47391. return t.indexOf("image://") === 0 ? (i.image = t.slice(8), Re(i, n), new lr(r)) : F0(t.replace("path://", ""), r, n, "center");
  47392. }
  47393. function Gv(t, e, n, r, i) {
  47394. for (var a = 0, o = i[i.length - 1]; a < i.length; a++) {
  47395. var s = i[a];
  47396. if (cJ(t, e, n, r, s[0], s[1], o[0], o[1]))
  47397. return !0;
  47398. o = s;
  47399. }
  47400. }
  47401. function cJ(t, e, n, r, i, a, o, s) {
  47402. var l = n - t, u = r - e, c = o - i, f = s - a, d = ST(c, f, l, u);
  47403. if (jke(d))
  47404. return !1;
  47405. var h = t - i, p = e - a, v = ST(h, p, l, u) / d;
  47406. if (v < 0 || v > 1)
  47407. return !1;
  47408. var g = ST(h, p, c, f) / d;
  47409. return !(g < 0 || g > 1);
  47410. }
  47411. function ST(t, e, n, r) {
  47412. return t * r - n * e;
  47413. }
  47414. function jke(t) {
  47415. return t <= 1e-6 && t >= -1e-6;
  47416. }
  47417. function gp(t) {
  47418. var e = t.itemTooltipOption, n = t.componentModel, r = t.itemName, i = Oe(e) ? {
  47419. formatter: e
  47420. } : e, a = n.mainType, o = n.componentIndex, s = {
  47421. componentType: a,
  47422. name: r,
  47423. $vars: ["name"]
  47424. };
  47425. s[a + "Index"] = o;
  47426. var l = t.formatterParamsExtra;
  47427. l && k(st(l), function(c) {
  47428. Ce(s, c) || (s[c] = l[c], s.$vars.push(c));
  47429. });
  47430. var u = Fe(t.el);
  47431. u.componentMainType = a, u.componentIndex = o, u.tooltipConfig = {
  47432. name: r,
  47433. option: Re({
  47434. content: r,
  47435. encodeHTMLContent: !0,
  47436. formatterParams: s
  47437. }, i)
  47438. };
  47439. }
  47440. function WB(t, e) {
  47441. var n;
  47442. t.isGroup && (n = e(t)), n || t.traverse(e);
  47443. }
  47444. function Tu(t, e) {
  47445. if (t)
  47446. if (ue(t))
  47447. for (var n = 0; n < t.length; n++)
  47448. WB(t[n], e);
  47449. else
  47450. WB(t, e);
  47451. }
  47452. ka("circle", ll);
  47453. ka("ellipse", Xx);
  47454. ka("sector", ri);
  47455. ka("ring", z0);
  47456. ka("polygon", ii);
  47457. ka("polyline", ai);
  47458. ka("rect", mt);
  47459. ka("line", Un);
  47460. ka("bezierCurve", V0);
  47461. ka("arc", Yx);
  47462. const Lf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  47463. __proto__: null,
  47464. Arc: Yx,
  47465. BezierCurve: V0,
  47466. BoundingRect: Je,
  47467. Circle: ll,
  47468. CompoundPath: qx,
  47469. Ellipse: Xx,
  47470. Group: Ve,
  47471. Image: lr,
  47472. IncrementalDisplayable: iJ,
  47473. Line: Un,
  47474. LinearGradient: hp,
  47475. OrientedBoundingRect: sO,
  47476. Path: ot,
  47477. Point: Ke,
  47478. Polygon: ii,
  47479. Polyline: ai,
  47480. RadialGradient: VR,
  47481. Rect: mt,
  47482. Ring: z0,
  47483. Sector: ri,
  47484. Text: gt,
  47485. applyTransform: to,
  47486. clipPointsByRect: HR,
  47487. clipRectByRect: uJ,
  47488. createIcon: vp,
  47489. extendPath: sJ,
  47490. extendShape: oJ,
  47491. getShapeClass: Kx,
  47492. getTransform: ql,
  47493. groupTransition: W0,
  47494. initProps: Yt,
  47495. isElementRemoved: th,
  47496. lineLineIntersect: cJ,
  47497. linePolygonIntersect: Gv,
  47498. makeImage: WR,
  47499. makePath: F0,
  47500. mergePath: Li,
  47501. registerShape: ka,
  47502. removeElement: uu,
  47503. removeElementWithFadeOut: wm,
  47504. resizePath: QR,
  47505. setTooltipConfig: gp,
  47506. subPixelOptimize: W_,
  47507. subPixelOptimizeLine: zh,
  47508. subPixelOptimizeRect: Hke,
  47509. transformDirection: Jx,
  47510. traverseElements: Tu,
  47511. updateProps: Ct
  47512. }, Symbol.toStringTag, { value: "Module" }));
  47513. var ew = {};
  47514. function fJ(t, e) {
  47515. for (var n = 0; n < ni.length; n++) {
  47516. var r = ni[n], i = e[r], a = t.ensureState(r);
  47517. a.style = a.style || {}, a.style.text = i;
  47518. }
  47519. var o = t.currentStates.slice();
  47520. t.clearStates(!0), t.setStyle({
  47521. text: e.normal
  47522. }), t.useStates(o, !0);
  47523. }
  47524. function BA(t, e, n) {
  47525. var r = t.labelFetcher, i = t.labelDataIndex, a = t.labelDimIndex, o = e.normal, s;
  47526. r && (s = r.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), n != null ? {
  47527. interpolatedValue: n
  47528. } : null)), s == null && (s = Me(t.defaultText) ? t.defaultText(i, t, n) : t.defaultText);
  47529. for (var l = {
  47530. normal: s
  47531. }, u = 0; u < ni.length; u++) {
  47532. var c = ni[u], f = e[c];
  47533. l[c] = We(r ? r.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s);
  47534. }
  47535. return l;
  47536. }
  47537. function Pr(t, e, n, r) {
  47538. n = n || ew;
  47539. for (var i = t instanceof gt, a = !1, o = 0; o < xm.length; o++) {
  47540. var s = e[xm[o]];
  47541. if (s && s.getShallow("show")) {
  47542. a = !0;
  47543. break;
  47544. }
  47545. }
  47546. var l = i ? t : t.getTextContent();
  47547. if (a) {
  47548. i || (l || (l = new gt(), t.setTextContent(l)), t.stateProxy && (l.stateProxy = t.stateProxy));
  47549. var u = BA(n, e), c = e.normal, f = !!c.getShallow("show"), d = Zt(c, r && r.normal, n, !1, !i);
  47550. d.text = u.normal, i || t.setTextConfig(cO(c, n, !1));
  47551. for (var o = 0; o < ni.length; o++) {
  47552. var h = ni[o], s = e[h];
  47553. if (s) {
  47554. var p = l.ensureState(h), v = !!We(s.getShallow("show"), f);
  47555. if (v !== f && (p.ignore = !v), p.style = Zt(s, r && r[h], n, !0, !i), p.style.text = u[h], !i) {
  47556. var g = t.ensureState(h);
  47557. g.textConfig = cO(s, n, !0);
  47558. }
  47559. }
  47560. }
  47561. 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 && (mp(l).setLabelText = function(m) {
  47562. var y = BA(n, e, m);
  47563. fJ(l, y);
  47564. });
  47565. } else l && (l.ignore = !0);
  47566. t.dirty();
  47567. }
  47568. function er(t, e) {
  47569. e = e || "label";
  47570. for (var n = {
  47571. normal: t.getModel(e)
  47572. }, r = 0; r < ni.length; r++) {
  47573. var i = ni[r];
  47574. n[i] = t.getModel([i, e]);
  47575. }
  47576. return n;
  47577. }
  47578. function Zt(t, e, n, r, i) {
  47579. var a = {};
  47580. return Zke(a, t, n, r, i), e && le(a, e), a;
  47581. }
  47582. function cO(t, e, n) {
  47583. e = e || {};
  47584. var r = {}, i, a = t.getShallow("rotate"), o = We(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
  47585. 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;
  47586. }
  47587. function Zke(t, e, n, r, i) {
  47588. n = n || ew;
  47589. var a = e.ecModel, o = a && a.option.textStyle, s = Uke(e), l;
  47590. if (s) {
  47591. l = {};
  47592. for (var u in s)
  47593. if (s.hasOwnProperty(u)) {
  47594. var c = e.getModel(["rich", u]);
  47595. jB(l[u] = {}, c, o, n, r, i, !1, !0);
  47596. }
  47597. }
  47598. l && (t.rich = l);
  47599. var f = e.get("overflow");
  47600. f && (t.overflow = f);
  47601. var d = e.get("minMargin");
  47602. d != null && (t.margin = d), jB(t, e, o, n, r, i, !0, !1);
  47603. }
  47604. function Uke(t) {
  47605. for (var e; t && t !== t.ecModel; ) {
  47606. var n = (t.option || ew).rich;
  47607. if (n) {
  47608. e = e || {};
  47609. for (var r = st(n), i = 0; i < r.length; i++) {
  47610. var a = r[i];
  47611. e[a] = 1;
  47612. }
  47613. }
  47614. t = t.parentModel;
  47615. }
  47616. return e;
  47617. }
  47618. var QB = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], HB = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"], GB = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  47619. function jB(t, e, n, r, i, a, o, s) {
  47620. n = !i && n || ew;
  47621. var l = r && r.inheritColor, u = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = We(e.getShallow("opacity"), n.opacity);
  47622. (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);
  47623. var d = We(e.getShallow("textBorderWidth"), n.textBorderWidth);
  47624. d != null && (t.lineWidth = d);
  47625. var h = We(e.getShallow("textBorderType"), n.textBorderType);
  47626. h != null && (t.lineDash = h);
  47627. var p = We(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  47628. 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);
  47629. for (var v = 0; v < QB.length; v++) {
  47630. var g = QB[v], m = We(e.getShallow(g), n[g]);
  47631. m != null && (t[g] = m);
  47632. }
  47633. for (var v = 0; v < HB.length; v++) {
  47634. var g = HB[v], m = e.getShallow(g);
  47635. m != null && (t[g] = m);
  47636. }
  47637. if (t.verticalAlign == null) {
  47638. var y = e.getShallow("baseline");
  47639. y != null && (t.verticalAlign = y);
  47640. }
  47641. if (!o || !r.disableBox) {
  47642. for (var v = 0; v < GB.length; v++) {
  47643. var g = GB[v], m = e.getShallow(g);
  47644. m != null && (t[g] = m);
  47645. }
  47646. var b = e.getShallow("borderType");
  47647. 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);
  47648. }
  47649. }
  47650. function GR(t, e) {
  47651. var n = e && e.getModel("textStyle");
  47652. return ma([
  47653. // FIXME in node-canvas fontWeight is before fontStyle
  47654. t.fontStyle || n && n.getShallow("fontStyle") || "",
  47655. t.fontWeight || n && n.getShallow("fontWeight") || "",
  47656. (t.fontSize || n && n.getShallow("fontSize") || 12) + "px",
  47657. t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"
  47658. ].join(" "));
  47659. }
  47660. var mp = bt();
  47661. function dJ(t, e, n, r) {
  47662. if (t) {
  47663. var i = mp(t);
  47664. i.prevValue = i.value, i.value = n;
  47665. var a = e.normal;
  47666. i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = r, i.statesModels = e);
  47667. }
  47668. }
  47669. function hJ(t, e, n, r, i) {
  47670. var a = mp(t);
  47671. if (!a.valueAnimation || a.prevValue === a.value)
  47672. return;
  47673. var o = a.defaultInterpolatedText, s = We(a.interpolatedValue, a.prevValue), l = a.value;
  47674. function u(c) {
  47675. var f = gK(n, a.precision, s, l, c);
  47676. a.interpolatedValue = c === 1 ? null : f;
  47677. var d = BA({
  47678. labelDataIndex: e,
  47679. labelFetcher: i,
  47680. defaultText: o ? o(f) : f + ""
  47681. }, a.statesModels, f);
  47682. fJ(t, d);
  47683. }
  47684. t.percent = 0, (a.prevValue == null ? Yt : Ct)(t, {
  47685. // percent is used to prevent animation from being aborted #15916
  47686. percent: 1
  47687. }, r, e, null, u);
  47688. }
  47689. var Xke = ["textStyle", "color"], xT = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], wT = new gt(), Yke = (
  47690. /** @class */
  47691. function() {
  47692. function t() {
  47693. }
  47694. return t.prototype.getTextColor = function(e) {
  47695. var n = this.ecModel;
  47696. return this.getShallow("color") || (!e && n ? n.get(Xke) : null);
  47697. }, t.prototype.getFont = function() {
  47698. return GR({
  47699. fontStyle: this.getShallow("fontStyle"),
  47700. fontWeight: this.getShallow("fontWeight"),
  47701. fontSize: this.getShallow("fontSize"),
  47702. fontFamily: this.getShallow("fontFamily")
  47703. }, this.ecModel);
  47704. }, t.prototype.getTextRect = function(e) {
  47705. for (var n = {
  47706. text: e,
  47707. verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
  47708. }, r = 0; r < xT.length; r++)
  47709. n[xT[r]] = this.getShallow(xT[r]);
  47710. return wT.useStyle(n), wT.update(), wT.getBoundingRect();
  47711. }, t;
  47712. }()
  47713. ), pJ = [
  47714. ["lineWidth", "width"],
  47715. ["stroke", "color"],
  47716. ["opacity"],
  47717. ["shadowBlur"],
  47718. ["shadowOffsetX"],
  47719. ["shadowOffsetY"],
  47720. ["shadowColor"],
  47721. ["lineDash", "type"],
  47722. ["lineDashOffset", "dashOffset"],
  47723. ["lineCap", "cap"],
  47724. ["lineJoin", "join"],
  47725. ["miterLimit"]
  47726. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  47727. // So do not transfer decal directly.
  47728. ], qke = yf(pJ), Kke = (
  47729. /** @class */
  47730. function() {
  47731. function t() {
  47732. }
  47733. return t.prototype.getLineStyle = function(e) {
  47734. return qke(this, e);
  47735. }, t;
  47736. }()
  47737. ), vJ = [
  47738. ["fill", "color"],
  47739. ["stroke", "borderColor"],
  47740. ["lineWidth", "borderWidth"],
  47741. ["opacity"],
  47742. ["shadowBlur"],
  47743. ["shadowOffsetX"],
  47744. ["shadowOffsetY"],
  47745. ["shadowColor"],
  47746. ["lineDash", "borderType"],
  47747. ["lineDashOffset", "borderDashOffset"],
  47748. ["lineCap", "borderCap"],
  47749. ["lineJoin", "borderJoin"],
  47750. ["miterLimit", "borderMiterLimit"]
  47751. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  47752. // So do not transfer decal directly.
  47753. ], Jke = yf(vJ), eLe = (
  47754. /** @class */
  47755. function() {
  47756. function t() {
  47757. }
  47758. return t.prototype.getItemStyle = function(e, n) {
  47759. return Jke(this, e, n);
  47760. }, t;
  47761. }()
  47762. ), Nf = (
  47763. /** @class */
  47764. function() {
  47765. function t(e, n, r) {
  47766. this.parentModel = n, this.ecModel = r, this.option = e;
  47767. }
  47768. return t.prototype.init = function(e, n, r) {
  47769. }, t.prototype.mergeOption = function(e, n) {
  47770. qe(this.option, e, !0);
  47771. }, t.prototype.get = function(e, n) {
  47772. return e == null ? this.option : this._doGet(this.parsePath(e), !n && this.parentModel);
  47773. }, t.prototype.getShallow = function(e, n) {
  47774. var r = this.option, i = r == null ? r : r[e];
  47775. if (i == null && !n) {
  47776. var a = this.parentModel;
  47777. a && (i = a.getShallow(e));
  47778. }
  47779. return i;
  47780. }, t.prototype.getModel = function(e, n) {
  47781. var r = e != null, i = r ? this.parsePath(e) : null, a = r ? this._doGet(i) : this.option;
  47782. return n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new t(a, n, this.ecModel);
  47783. }, t.prototype.isEmpty = function() {
  47784. return this.option == null;
  47785. }, t.prototype.restoreData = function() {
  47786. }, t.prototype.clone = function() {
  47787. var e = this.constructor;
  47788. return new e(Le(this.option));
  47789. }, t.prototype.parsePath = function(e) {
  47790. return typeof e == "string" ? e.split(".") : e;
  47791. }, t.prototype.resolveParentPath = function(e) {
  47792. return e;
  47793. }, t.prototype.isAnimationEnabled = function() {
  47794. if (!vt.node && this.option) {
  47795. if (this.option.animation != null)
  47796. return !!this.option.animation;
  47797. if (this.parentModel)
  47798. return this.parentModel.isAnimationEnabled();
  47799. }
  47800. }, t.prototype._doGet = function(e, n) {
  47801. var r = this.option;
  47802. if (!e)
  47803. return r;
  47804. for (var i = 0; i < e.length && !(e[i] && (r = r && typeof r == "object" ? r[e[i]] : null, r == null)); i++)
  47805. ;
  47806. return r == null && n && (r = n._doGet(this.resolveParentPath(e), n.parentModel)), r;
  47807. }, t;
  47808. }()
  47809. );
  47810. MR(Nf);
  47811. lRe(Nf);
  47812. xn(Nf, Kke);
  47813. xn(Nf, eLe);
  47814. xn(Nf, hRe);
  47815. xn(Nf, Yke);
  47816. const Wt = Nf;
  47817. var tLe = Math.round(Math.random() * 10);
  47818. function yp(t) {
  47819. return [t || "", tLe++].join("_");
  47820. }
  47821. function nLe(t) {
  47822. var e = {};
  47823. t.registerSubTypeDefaulter = function(n, r) {
  47824. var i = Vo(n);
  47825. e[i.main] = r;
  47826. }, t.determineSubType = function(n, r) {
  47827. var i = r.type;
  47828. if (!i) {
  47829. var a = Vo(n).main;
  47830. t.hasSubTypes(n) && e[a] && (i = e[a](r));
  47831. }
  47832. return i;
  47833. };
  47834. }
  47835. function rLe(t, e) {
  47836. t.topologicalTravel = function(a, o, s, l) {
  47837. if (!a.length)
  47838. return;
  47839. var u = n(o), c = u.graph, f = u.noEntryList, d = {};
  47840. for (k(a, function(y) {
  47841. d[y] = !0;
  47842. }); f.length; ) {
  47843. var h = f.pop(), p = c[h], v = !!d[h];
  47844. v && (s.call(l, h, p.originalDeps.slice()), delete d[h]), k(p.successor, v ? m : g);
  47845. }
  47846. k(d, function() {
  47847. var y = "";
  47848. throw process.env.NODE_ENV !== "production" && (y = ti("Circular dependency may exists: ", d, a, o)), new Error(y);
  47849. });
  47850. function g(y) {
  47851. c[y].entryCount--, c[y].entryCount === 0 && f.push(y);
  47852. }
  47853. function m(y) {
  47854. d[y] = !0, g(y);
  47855. }
  47856. };
  47857. function n(a) {
  47858. var o = {}, s = [];
  47859. return k(a, function(l) {
  47860. var u = r(o, l), c = u.originalDeps = e(l), f = i(c, a);
  47861. u.entryCount = f.length, u.entryCount === 0 && s.push(l), k(f, function(d) {
  47862. et(u.predecessor, d) < 0 && u.predecessor.push(d);
  47863. var h = r(o, d);
  47864. et(h.successor, d) < 0 && h.successor.push(l);
  47865. });
  47866. }), {
  47867. graph: o,
  47868. noEntryList: s
  47869. };
  47870. }
  47871. function r(a, o) {
  47872. return a[o] || (a[o] = {
  47873. predecessor: [],
  47874. successor: []
  47875. }), a[o];
  47876. }
  47877. function i(a, o) {
  47878. var s = [];
  47879. return k(a, function(l) {
  47880. et(o, l) >= 0 && s.push(l);
  47881. }), s;
  47882. }
  47883. }
  47884. function Pu(t, e) {
  47885. return qe(qe({}, t, !0), e, !0);
  47886. }
  47887. const iLe = {
  47888. time: {
  47889. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  47890. monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  47891. dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  47892. dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  47893. },
  47894. legend: {
  47895. selector: {
  47896. all: "All",
  47897. inverse: "Inv"
  47898. }
  47899. },
  47900. toolbox: {
  47901. brush: {
  47902. title: {
  47903. rect: "Box Select",
  47904. polygon: "Lasso Select",
  47905. lineX: "Horizontally Select",
  47906. lineY: "Vertically Select",
  47907. keep: "Keep Selections",
  47908. clear: "Clear Selections"
  47909. }
  47910. },
  47911. dataView: {
  47912. title: "Data View",
  47913. lang: ["Data View", "Close", "Refresh"]
  47914. },
  47915. dataZoom: {
  47916. title: {
  47917. zoom: "Zoom",
  47918. back: "Zoom Reset"
  47919. }
  47920. },
  47921. magicType: {
  47922. title: {
  47923. line: "Switch to Line Chart",
  47924. bar: "Switch to Bar Chart",
  47925. stack: "Stack",
  47926. tiled: "Tile"
  47927. }
  47928. },
  47929. restore: {
  47930. title: "Restore"
  47931. },
  47932. saveAsImage: {
  47933. title: "Save as Image",
  47934. lang: ["Right Click to Save Image"]
  47935. }
  47936. },
  47937. series: {
  47938. typeNames: {
  47939. pie: "Pie chart",
  47940. bar: "Bar chart",
  47941. line: "Line chart",
  47942. scatter: "Scatter plot",
  47943. effectScatter: "Ripple scatter plot",
  47944. radar: "Radar chart",
  47945. tree: "Tree",
  47946. treemap: "Treemap",
  47947. boxplot: "Boxplot",
  47948. candlestick: "Candlestick",
  47949. k: "K line chart",
  47950. heatmap: "Heat map",
  47951. map: "Map",
  47952. parallel: "Parallel coordinate map",
  47953. lines: "Line graph",
  47954. graph: "Relationship graph",
  47955. sankey: "Sankey diagram",
  47956. funnel: "Funnel chart",
  47957. gauge: "Gauge",
  47958. pictorialBar: "Pictorial bar",
  47959. themeRiver: "Theme River Map",
  47960. sunburst: "Sunburst",
  47961. custom: "Custom chart",
  47962. chart: "Chart"
  47963. }
  47964. },
  47965. aria: {
  47966. general: {
  47967. withTitle: 'This is a chart about "{title}"',
  47968. withoutTitle: "This is a chart"
  47969. },
  47970. series: {
  47971. single: {
  47972. prefix: "",
  47973. withName: " with type {seriesType} named {seriesName}.",
  47974. withoutName: " with type {seriesType}."
  47975. },
  47976. multiple: {
  47977. prefix: ". It consists of {seriesCount} series count.",
  47978. withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
  47979. withoutName: " The {seriesId} series is a {seriesType}.",
  47980. separator: {
  47981. middle: "",
  47982. end: ""
  47983. }
  47984. }
  47985. },
  47986. data: {
  47987. allData: "The data is as follows: ",
  47988. partialData: "The first {displayCnt} items are: ",
  47989. withName: "the data for {name} is {value}",
  47990. withoutName: "{value}",
  47991. separator: {
  47992. middle: ", ",
  47993. end: ". "
  47994. }
  47995. }
  47996. }
  47997. }, aLe = {
  47998. time: {
  47999. month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  48000. monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  48001. dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  48002. dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  48003. },
  48004. legend: {
  48005. selector: {
  48006. all: "全选",
  48007. inverse: "反选"
  48008. }
  48009. },
  48010. toolbox: {
  48011. brush: {
  48012. title: {
  48013. rect: "矩形选择",
  48014. polygon: "圈选",
  48015. lineX: "横向选择",
  48016. lineY: "纵向选择",
  48017. keep: "保持选择",
  48018. clear: "清除选择"
  48019. }
  48020. },
  48021. dataView: {
  48022. title: "数据视图",
  48023. lang: ["数据视图", "关闭", "刷新"]
  48024. },
  48025. dataZoom: {
  48026. title: {
  48027. zoom: "区域缩放",
  48028. back: "区域缩放还原"
  48029. }
  48030. },
  48031. magicType: {
  48032. title: {
  48033. line: "切换为折线图",
  48034. bar: "切换为柱状图",
  48035. stack: "切换为堆叠",
  48036. tiled: "切换为平铺"
  48037. }
  48038. },
  48039. restore: {
  48040. title: "还原"
  48041. },
  48042. saveAsImage: {
  48043. title: "保存为图片",
  48044. lang: ["右键另存为图片"]
  48045. }
  48046. },
  48047. series: {
  48048. typeNames: {
  48049. pie: "饼图",
  48050. bar: "柱状图",
  48051. line: "折线图",
  48052. scatter: "散点图",
  48053. effectScatter: "涟漪散点图",
  48054. radar: "雷达图",
  48055. tree: "树图",
  48056. treemap: "矩形树图",
  48057. boxplot: "箱型图",
  48058. candlestick: "K线图",
  48059. k: "K线图",
  48060. heatmap: "热力图",
  48061. map: "地图",
  48062. parallel: "平行坐标图",
  48063. lines: "线图",
  48064. graph: "关系图",
  48065. sankey: "桑基图",
  48066. funnel: "漏斗图",
  48067. gauge: "仪表盘图",
  48068. pictorialBar: "象形柱图",
  48069. themeRiver: "主题河流图",
  48070. sunburst: "旭日图",
  48071. custom: "自定义图表",
  48072. chart: "图表"
  48073. }
  48074. },
  48075. aria: {
  48076. general: {
  48077. withTitle: "这是一个关于“{title}”的图表。",
  48078. withoutTitle: "这是一个图表,"
  48079. },
  48080. series: {
  48081. single: {
  48082. prefix: "",
  48083. withName: "图表类型是{seriesType},表示{seriesName}。",
  48084. withoutName: "图表类型是{seriesType}。"
  48085. },
  48086. multiple: {
  48087. prefix: "它由{seriesCount}个图表系列组成。",
  48088. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  48089. withoutName: "第{seriesId}个系列是一个{seriesType},",
  48090. separator: {
  48091. middle: ";",
  48092. end: "。"
  48093. }
  48094. }
  48095. },
  48096. data: {
  48097. allData: "其数据是——",
  48098. partialData: "其中,前{displayCnt}项是——",
  48099. withName: "{name}的数据是{value}",
  48100. withoutName: "{value}",
  48101. separator: {
  48102. middle: ",",
  48103. end: ""
  48104. }
  48105. }
  48106. }
  48107. };
  48108. var fO = "ZH", jR = "EN", nh = jR, Q_ = {}, ZR = {}, gJ = vt.domSupported ? function() {
  48109. var t = (
  48110. /* eslint-disable-next-line */
  48111. (document.documentElement.lang || navigator.language || navigator.browserLanguage || nh).toUpperCase()
  48112. );
  48113. return t.indexOf(fO) > -1 ? fO : nh;
  48114. }() : nh;
  48115. function UR(t, e) {
  48116. t = t.toUpperCase(), ZR[t] = new Wt(e), Q_[t] = e;
  48117. }
  48118. function oLe(t) {
  48119. if (Oe(t)) {
  48120. var e = Q_[t.toUpperCase()] || {};
  48121. return t === fO || t === jR ? Le(e) : qe(Le(e), Le(Q_[nh]), !1);
  48122. } else
  48123. return qe(Le(t), Le(Q_[nh]), !1);
  48124. }
  48125. function zA(t) {
  48126. return ZR[t];
  48127. }
  48128. function sLe() {
  48129. return ZR[nh];
  48130. }
  48131. UR(jR, iLe);
  48132. UR(fO, aLe);
  48133. var XR = 1e3, YR = XR * 60, Ig = YR * 60, va = Ig * 24, ZB = va * 365, jv = {
  48134. year: "{yyyy}",
  48135. month: "{MMM}",
  48136. day: "{d}",
  48137. hour: "{HH}:{mm}",
  48138. minute: "{HH}:{mm}",
  48139. second: "{HH}:{mm}:{ss}",
  48140. millisecond: "{HH}:{mm}:{ss} {SSS}",
  48141. none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
  48142. }, rb = "{yyyy}-{MM}-{dd}", UB = {
  48143. year: "{yyyy}",
  48144. month: "{yyyy}-{MM}",
  48145. day: rb,
  48146. hour: rb + " " + jv.hour,
  48147. minute: rb + " " + jv.minute,
  48148. second: rb + " " + jv.second,
  48149. millisecond: jv.none
  48150. }, CT = ["year", "month", "day", "hour", "minute", "second", "millisecond"], mJ = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
  48151. function Qr(t, e) {
  48152. return t += "", "0000".substr(0, e - t.length) + t;
  48153. }
  48154. function rh(t) {
  48155. switch (t) {
  48156. case "half-year":
  48157. case "quarter":
  48158. return "month";
  48159. case "week":
  48160. case "half-week":
  48161. return "day";
  48162. case "half-day":
  48163. case "quarter-day":
  48164. return "hour";
  48165. default:
  48166. return t;
  48167. }
  48168. }
  48169. function lLe(t) {
  48170. return t === rh(t);
  48171. }
  48172. function uLe(t) {
  48173. switch (t) {
  48174. case "year":
  48175. case "month":
  48176. return "day";
  48177. case "millisecond":
  48178. return "millisecond";
  48179. default:
  48180. return "second";
  48181. }
  48182. }
  48183. function Q0(t, e, n, r) {
  48184. var i = Yi(t), a = i[qR(n)](), o = i[ih(n)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = i[tw(n)](), u = i["get" + (n ? "UTC" : "") + "Day"](), c = i[Cm(n)](), f = (c - 1) % 12 + 1, d = i[nw(n)](), h = i[rw(n)](), p = i[iw(n)](), v = c >= 12 ? "pm" : "am", g = v.toUpperCase(), m = r instanceof Wt ? r : zA(r || gJ) || sLe(), y = m.getModel("time"), b = y.get("month"), _ = y.get("monthAbbr"), O = y.get("dayOfWeek"), S = y.get("dayOfWeekAbbr");
  48185. return (e || "").replace(/{a}/g, v + "").replace(/{A}/g, g + "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, Qr(a % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, b[o - 1]).replace(/{MMM}/g, _[o - 1]).replace(/{MM}/g, Qr(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Qr(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, O[u]).replace(/{ee}/g, S[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Qr(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, Qr(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, Qr(d, 2)).replace(/{m}/g, d + "").replace(/{ss}/g, Qr(h, 2)).replace(/{s}/g, h + "").replace(/{SSS}/g, Qr(p, 3)).replace(/{S}/g, p + "");
  48186. }
  48187. function cLe(t, e, n, r, i) {
  48188. var a = null;
  48189. if (Oe(n))
  48190. a = n;
  48191. else if (Me(n))
  48192. a = n(t.value, e, {
  48193. level: t.level
  48194. });
  48195. else {
  48196. var o = le({}, jv);
  48197. if (t.level > 0)
  48198. for (var s = 0; s < CT.length; ++s)
  48199. o[CT[s]] = "{primary|" + o[CT[s]] + "}";
  48200. var l = n ? n.inherit === !1 ? n : Re(n, o) : o, u = yJ(t.value, i);
  48201. if (l[u])
  48202. a = l[u];
  48203. else if (l.inherit) {
  48204. for (var c = mJ.indexOf(u), s = c - 1; s >= 0; --s)
  48205. if (l[u]) {
  48206. a = l[u];
  48207. break;
  48208. }
  48209. a = a || o.none;
  48210. }
  48211. if (ue(a)) {
  48212. var f = t.level == null ? 0 : t.level >= 0 ? t.level : a.length + t.level;
  48213. f = Math.min(f, a.length - 1), a = a[f];
  48214. }
  48215. }
  48216. return Q0(new Date(t.value), a, i, r);
  48217. }
  48218. function yJ(t, e) {
  48219. var n = Yi(t), r = n[ih(e)]() + 1, i = n[tw(e)](), a = n[Cm(e)](), o = n[nw(e)](), s = n[rw(e)](), l = n[iw(e)](), u = l === 0, c = u && s === 0, f = c && o === 0, d = f && a === 0, h = d && i === 1, p = h && r === 1;
  48220. return p ? "year" : h ? "month" : d ? "day" : f ? "hour" : c ? "minute" : u ? "second" : "millisecond";
  48221. }
  48222. function XB(t, e, n) {
  48223. var r = St(t) ? Yi(t) : t;
  48224. switch (e = e || yJ(t, n), e) {
  48225. case "year":
  48226. return r[qR(n)]();
  48227. case "half-year":
  48228. return r[ih(n)]() >= 6 ? 1 : 0;
  48229. case "quarter":
  48230. return Math.floor((r[ih(n)]() + 1) / 4);
  48231. case "month":
  48232. return r[ih(n)]();
  48233. case "day":
  48234. return r[tw(n)]();
  48235. case "half-day":
  48236. return r[Cm(n)]() / 24;
  48237. case "hour":
  48238. return r[Cm(n)]();
  48239. case "minute":
  48240. return r[nw(n)]();
  48241. case "second":
  48242. return r[rw(n)]();
  48243. case "millisecond":
  48244. return r[iw(n)]();
  48245. }
  48246. }
  48247. function qR(t) {
  48248. return t ? "getUTCFullYear" : "getFullYear";
  48249. }
  48250. function ih(t) {
  48251. return t ? "getUTCMonth" : "getMonth";
  48252. }
  48253. function tw(t) {
  48254. return t ? "getUTCDate" : "getDate";
  48255. }
  48256. function Cm(t) {
  48257. return t ? "getUTCHours" : "getHours";
  48258. }
  48259. function nw(t) {
  48260. return t ? "getUTCMinutes" : "getMinutes";
  48261. }
  48262. function rw(t) {
  48263. return t ? "getUTCSeconds" : "getSeconds";
  48264. }
  48265. function iw(t) {
  48266. return t ? "getUTCMilliseconds" : "getMilliseconds";
  48267. }
  48268. function fLe(t) {
  48269. return t ? "setUTCFullYear" : "setFullYear";
  48270. }
  48271. function bJ(t) {
  48272. return t ? "setUTCMonth" : "setMonth";
  48273. }
  48274. function _J(t) {
  48275. return t ? "setUTCDate" : "setDate";
  48276. }
  48277. function OJ(t) {
  48278. return t ? "setUTCHours" : "setHours";
  48279. }
  48280. function SJ(t) {
  48281. return t ? "setUTCMinutes" : "setMinutes";
  48282. }
  48283. function xJ(t) {
  48284. return t ? "setUTCSeconds" : "setSeconds";
  48285. }
  48286. function wJ(t) {
  48287. return t ? "setUTCMilliseconds" : "setMilliseconds";
  48288. }
  48289. function dLe(t, e, n, r, i, a, o, s) {
  48290. var l = new gt({
  48291. style: {
  48292. text: t,
  48293. font: e,
  48294. align: n,
  48295. verticalAlign: r,
  48296. padding: i,
  48297. rich: a,
  48298. overflow: o ? "truncate" : null,
  48299. lineHeight: s
  48300. }
  48301. });
  48302. return l.getBoundingRect();
  48303. }
  48304. function KR(t) {
  48305. if (!Fx(t))
  48306. return Oe(t) ? t : "-";
  48307. var e = (t + "").split(".");
  48308. return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
  48309. }
  48310. function JR(t, e) {
  48311. return t = (t || "").toLowerCase().replace(/-(.)/g, function(n, r) {
  48312. return r.toUpperCase();
  48313. }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
  48314. }
  48315. var Bf = kx;
  48316. function VA(t, e, n) {
  48317. var r = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
  48318. function i(c) {
  48319. return c && ma(c) ? c : "-";
  48320. }
  48321. function a(c) {
  48322. return !!(c != null && !isNaN(c) && isFinite(c));
  48323. }
  48324. var o = e === "time", s = t instanceof Date;
  48325. if (o || s) {
  48326. var l = o ? Yi(t) : t;
  48327. if (isNaN(+l)) {
  48328. if (s)
  48329. return "-";
  48330. } else return Q0(l, r, n);
  48331. }
  48332. if (e === "ordinal")
  48333. return pm(t) ? i(t) : St(t) && a(t) ? t + "" : "-";
  48334. var u = is(t);
  48335. return a(u) ? KR(u) : pm(t) ? i(t) : typeof t == "boolean" ? t + "" : "-";
  48336. }
  48337. var YB = ["a", "b", "c", "d", "e", "f", "g"], TT = function(t, e) {
  48338. return "{" + t + (e ?? "") + "}";
  48339. };
  48340. function ek(t, e, n) {
  48341. ue(e) || (e = [e]);
  48342. var r = e.length;
  48343. if (!r)
  48344. return "";
  48345. for (var i = e[0].$vars || [], a = 0; a < i.length; a++) {
  48346. var o = YB[a];
  48347. t = t.replace(TT(o), TT(o, 0));
  48348. }
  48349. for (var s = 0; s < r; s++)
  48350. for (var l = 0; l < i.length; l++) {
  48351. var u = e[s][i[l]];
  48352. t = t.replace(TT(YB[l], s), n ? Gr(u) : u);
  48353. }
  48354. return t;
  48355. }
  48356. function hLe(t, e, n) {
  48357. return k(e, function(r, i) {
  48358. t = t.replace("{" + i + "}", r);
  48359. }), t;
  48360. }
  48361. function CJ(t, e) {
  48362. var n = Oe(t) ? {
  48363. color: t,
  48364. extraCssText: e
  48365. } : t || {}, r = n.color, i = n.type;
  48366. e = n.extraCssText;
  48367. var a = n.renderMode || "html";
  48368. if (!r)
  48369. return "";
  48370. if (a === "html")
  48371. 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:' + Gr(r) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + Gr(r) + ";" + (e || "") + '"></span>';
  48372. var o = n.markerId || "markerX";
  48373. return {
  48374. renderMode: a,
  48375. content: "{" + o + "|} ",
  48376. style: i === "subItem" ? {
  48377. width: 4,
  48378. height: 4,
  48379. borderRadius: 2,
  48380. backgroundColor: r
  48381. } : {
  48382. width: 10,
  48383. height: 10,
  48384. borderRadius: 5,
  48385. backgroundColor: r
  48386. }
  48387. };
  48388. }
  48389. function pLe(t, e, n) {
  48390. 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
  48391. yyyy`);
  48392. var r = Yi(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"]();
  48393. return t = t.replace("MM", Qr(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", Qr(a % 100 + "", 2)).replace("dd", Qr(s, 2)).replace("d", s).replace("hh", Qr(l, 2)).replace("h", l).replace("mm", Qr(u, 2)).replace("m", u).replace("ss", Qr(c, 2)).replace("s", c).replace("SSS", Qr(f, 3)), t;
  48394. }
  48395. function vLe(t) {
  48396. return t && t.charAt(0).toUpperCase() + t.substr(1);
  48397. }
  48398. function _f(t, e) {
  48399. return e = e || "transparent", Oe(t) ? t : Ie(t) && t.colorStops && (t.colorStops[0] || {}).color || e;
  48400. }
  48401. function dO(t, e) {
  48402. if (e === "_blank" || e === "blank") {
  48403. var n = window.open();
  48404. n.opener = null, n.location.href = t;
  48405. } else
  48406. window.open(t, e);
  48407. }
  48408. var H_ = k, TJ = ["left", "right", "top", "bottom", "width", "height"], Nc = [["width", "left", "right"], ["height", "top", "bottom"]];
  48409. function tk(t, e, n, r, i) {
  48410. var a = 0, o = 0;
  48411. r == null && (r = 1 / 0), i == null && (i = 1 / 0);
  48412. var s = 0;
  48413. e.eachChild(function(l, u) {
  48414. var c = l.getBoundingRect(), f = e.childAt(u + 1), d = f && f.getBoundingRect(), h, p;
  48415. if (t === "horizontal") {
  48416. var v = c.width + (d ? -d.x + c.x : 0);
  48417. h = a + v, h > r || l.newline ? (a = 0, h = v, o += s + n, s = c.height) : s = Math.max(s, c.height);
  48418. } else {
  48419. var g = c.height + (d ? -d.y + c.y : 0);
  48420. p = o + g, p > i || l.newline ? (a += s + n, o = 0, p = g, s = c.width) : s = Math.max(s, c.width);
  48421. }
  48422. l.newline || (l.x = a, l.y = o, l.markRedraw(), t === "horizontal" ? a = h + n : o = p + n);
  48423. });
  48424. }
  48425. var ef = tk;
  48426. Ue(tk, "vertical");
  48427. Ue(tk, "horizontal");
  48428. function gLe(t, e, n) {
  48429. 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);
  48430. 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 = Bf(n || 0), {
  48431. width: Math.max(s - a - n[1] - n[3], 0),
  48432. height: Math.max(l - o - n[0] - n[2], 0)
  48433. };
  48434. }
  48435. function Rn(t, e, n) {
  48436. n = Bf(n || 0);
  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), u = _e(t.width, r), c = _e(t.height, i), f = n[2] + n[0], d = n[1] + n[3], h = t.aspect;
  48438. 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) {
  48439. case "center":
  48440. a = r / 2 - u / 2 - n[3];
  48441. break;
  48442. case "right":
  48443. a = r - u - d;
  48444. break;
  48445. }
  48446. switch (t.top || t.bottom) {
  48447. case "middle":
  48448. case "center":
  48449. o = i / 2 - c / 2 - n[0];
  48450. break;
  48451. case "bottom":
  48452. o = i - c - f;
  48453. break;
  48454. }
  48455. a = a || 0, o = o || 0, isNaN(u) && (u = r - d - a - (s || 0)), isNaN(c) && (c = i - f - o - (l || 0));
  48456. var p = new Je(a + n[3], o + n[0], u, c);
  48457. return p.margin = n, p;
  48458. }
  48459. function aw(t, e, n, r, i, a) {
  48460. var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], l = i && i.boundingMode || "all";
  48461. if (a = a || t, a.x = t.x, a.y = t.y, !o && !s)
  48462. return !1;
  48463. var u;
  48464. if (l === "raw")
  48465. u = t.type === "group" ? new Je(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  48466. else if (u = t.getBoundingRect(), t.needLocalTransform()) {
  48467. var c = t.getLocalTransform();
  48468. u = u.clone(), u.applyTransform(c);
  48469. }
  48470. var f = Rn(Re({
  48471. width: u.width,
  48472. height: u.height
  48473. }, e), n, r), d = o ? f.x - u.x : 0, h = s ? f.y - u.y : 0;
  48474. return l === "raw" ? (a.x = d, a.y = h) : (a.x += d, a.y += h), a === t && t.markRedraw(), !0;
  48475. }
  48476. function mLe(t, e) {
  48477. return t[Nc[e][0]] != null || t[Nc[e][1]] != null && t[Nc[e][2]] != null;
  48478. }
  48479. function Tm(t) {
  48480. var e = t.layoutMode || t.constructor.layoutMode;
  48481. return Ie(e) ? e : e ? {
  48482. type: e
  48483. } : null;
  48484. }
  48485. function cu(t, e, n) {
  48486. var r = n && n.ignoreSize;
  48487. !ue(r) && (r = [r, r]);
  48488. var i = o(Nc[0], 0), a = o(Nc[1], 1);
  48489. u(Nc[0], t, i), u(Nc[1], t, a);
  48490. function o(c, f) {
  48491. var d = {}, h = 0, p = {}, v = 0, g = 2;
  48492. if (H_(c, function(b) {
  48493. p[b] = t[b];
  48494. }), H_(c, function(b) {
  48495. s(e, b) && (d[b] = p[b] = e[b]), l(d, b) && h++, l(p, b) && v++;
  48496. }), r[f])
  48497. return l(e, c[1]) ? p[c[2]] = null : l(e, c[2]) && (p[c[1]] = null), p;
  48498. if (v === g || !h)
  48499. return p;
  48500. if (h >= g)
  48501. return d;
  48502. for (var m = 0; m < c.length; m++) {
  48503. var y = c[m];
  48504. if (!s(d, y) && s(t, y)) {
  48505. d[y] = t[y];
  48506. break;
  48507. }
  48508. }
  48509. return d;
  48510. }
  48511. function s(c, f) {
  48512. return c.hasOwnProperty(f);
  48513. }
  48514. function l(c, f) {
  48515. return c[f] != null && c[f] !== "auto";
  48516. }
  48517. function u(c, f, d) {
  48518. H_(c, function(h) {
  48519. f[h] = d[h];
  48520. });
  48521. }
  48522. }
  48523. function bp(t) {
  48524. return PJ({}, t);
  48525. }
  48526. function PJ(t, e) {
  48527. return e && t && H_(TJ, function(n) {
  48528. e.hasOwnProperty(n) && (t[n] = e[n]);
  48529. }), t;
  48530. }
  48531. var yLe = bt(), rt = (
  48532. /** @class */
  48533. function(t) {
  48534. q(e, t);
  48535. function e(n, r, i) {
  48536. var a = t.call(this, n, r, i) || this;
  48537. return a.uid = yp("ec_cpt_model"), a;
  48538. }
  48539. return e.prototype.init = function(n, r, i) {
  48540. this.mergeDefaultAndTheme(n, i);
  48541. }, e.prototype.mergeDefaultAndTheme = function(n, r) {
  48542. var i = Tm(this), a = i ? bp(n) : {}, o = r.getTheme();
  48543. qe(n, o.get(this.mainType)), qe(n, this.getDefaultOption()), i && cu(n, a, i);
  48544. }, e.prototype.mergeOption = function(n, r) {
  48545. qe(this.option, n, !0);
  48546. var i = Tm(this);
  48547. i && cu(this.option, n, i);
  48548. }, e.prototype.optionUpdated = function(n, r) {
  48549. }, e.prototype.getDefaultOption = function() {
  48550. var n = this.constructor;
  48551. if (!aRe(n))
  48552. return n.defaultOption;
  48553. var r = yLe(this);
  48554. if (!r.defaultOption) {
  48555. for (var i = [], a = n; a; ) {
  48556. var o = a.prototype.defaultOption;
  48557. o && i.push(o), a = a.superClass;
  48558. }
  48559. for (var s = {}, l = i.length - 1; l >= 0; l--)
  48560. s = qe(s, i[l], !0);
  48561. r.defaultOption = s;
  48562. }
  48563. return r.defaultOption;
  48564. }, e.prototype.getReferringComponents = function(n, r) {
  48565. var i = n + "Index", a = n + "Id";
  48566. return N0(this.ecModel, n, {
  48567. index: this.get(i, !0),
  48568. id: this.get(a, !0)
  48569. }, r);
  48570. }, e.prototype.getBoxLayoutParams = function() {
  48571. var n = this;
  48572. return {
  48573. left: n.get("left"),
  48574. top: n.get("top"),
  48575. right: n.get("right"),
  48576. bottom: n.get("bottom"),
  48577. width: n.get("width"),
  48578. height: n.get("height")
  48579. };
  48580. }, e.prototype.getZLevelKey = function() {
  48581. return "";
  48582. }, e.prototype.setZLevel = function(n) {
  48583. this.option.zlevel = n;
  48584. }, e.protoInitialize = function() {
  48585. var n = e.prototype;
  48586. n.type = "component", n.id = "", n.name = "", n.mainType = "", n.subType = "", n.componentIndex = 0;
  48587. }(), e;
  48588. }(Wt)
  48589. );
  48590. yK(rt, Wt);
  48591. Qx(rt);
  48592. nLe(rt);
  48593. rLe(rt, bLe);
  48594. function bLe(t) {
  48595. var e = [];
  48596. return k(rt.getClassesByMainType(t), function(n) {
  48597. e = e.concat(n.dependencies || n.prototype.dependencies || []);
  48598. }), e = ce(e, function(n) {
  48599. return Vo(n).main;
  48600. }), t !== "dataset" && et(e, "dataset") <= 0 && e.unshift("dataset"), e;
  48601. }
  48602. var $J = "";
  48603. typeof navigator < "u" && ($J = navigator.platform || "");
  48604. var sd = "rgba(0, 0, 0, 0.2)";
  48605. const _Le = {
  48606. darkMode: "auto",
  48607. // backgroundColor: 'rgba(0,0,0,0)',
  48608. colorBy: "series",
  48609. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  48610. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  48611. aria: {
  48612. decal: {
  48613. decals: [{
  48614. color: sd,
  48615. dashArrayX: [1, 0],
  48616. dashArrayY: [2, 5],
  48617. symbolSize: 1,
  48618. rotation: Math.PI / 6
  48619. }, {
  48620. color: sd,
  48621. symbol: "circle",
  48622. dashArrayX: [[8, 8], [0, 8, 8, 0]],
  48623. dashArrayY: [6, 0],
  48624. symbolSize: 0.8
  48625. }, {
  48626. color: sd,
  48627. dashArrayX: [1, 0],
  48628. dashArrayY: [4, 3],
  48629. rotation: -Math.PI / 4
  48630. }, {
  48631. color: sd,
  48632. dashArrayX: [[6, 6], [0, 6, 6, 0]],
  48633. dashArrayY: [6, 0]
  48634. }, {
  48635. color: sd,
  48636. dashArrayX: [[1, 0], [1, 6]],
  48637. dashArrayY: [1, 0, 6, 0],
  48638. rotation: Math.PI / 4
  48639. }, {
  48640. color: sd,
  48641. symbol: "triangle",
  48642. dashArrayX: [[9, 9], [0, 9, 9, 0]],
  48643. dashArrayY: [7, 2],
  48644. symbolSize: 0.75
  48645. }]
  48646. }
  48647. },
  48648. // If xAxis and yAxis declared, grid is created by default.
  48649. // grid: {},
  48650. textStyle: {
  48651. // color: '#000',
  48652. // decoration: 'none',
  48653. // PENDING
  48654. fontFamily: $J.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  48655. // fontFamily: 'Arial, Verdana, sans-serif',
  48656. fontSize: 12,
  48657. fontStyle: "normal",
  48658. fontWeight: "normal"
  48659. },
  48660. // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
  48661. // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
  48662. // Default is source-over
  48663. blendMode: null,
  48664. stateAnimation: {
  48665. duration: 300,
  48666. easing: "cubicOut"
  48667. },
  48668. animation: "auto",
  48669. animationDuration: 1e3,
  48670. animationDurationUpdate: 500,
  48671. animationEasing: "cubicInOut",
  48672. animationEasingUpdate: "cubicInOut",
  48673. animationThreshold: 2e3,
  48674. // Configuration for progressive/incremental rendering
  48675. progressiveThreshold: 3e3,
  48676. progressive: 400,
  48677. // Threshold of if use single hover layer to optimize.
  48678. // It is recommended that `hoverLayerThreshold` is equivalent to or less than
  48679. // `progressiveThreshold`, otherwise hover will cause restart of progressive,
  48680. // which is unexpected.
  48681. // see example <echarts/test/heatmap-large.html>.
  48682. hoverLayerThreshold: 3e3,
  48683. // See: module:echarts/scale/Time
  48684. useUTC: !1
  48685. };
  48686. var FA = Pe(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]), La = "original", Br = "arrayRows", Na = "objectRows", ls = "keyedColumns", Ds = "typedArray", AJ = "unknown", Xo = "column", _p = "row", cr = {
  48687. Must: 1,
  48688. Might: 2,
  48689. Not: 3
  48690. // Other cases
  48691. }, EJ = bt();
  48692. function OLe(t) {
  48693. EJ(t).datasetMap = Pe();
  48694. }
  48695. function MJ(t, e, n) {
  48696. var r = {}, i = rk(e);
  48697. if (!i || !t)
  48698. return r;
  48699. var a = [], o = [], s = e.ecModel, l = EJ(s).datasetMap, u = i.uid + "_" + n.seriesLayoutBy, c, f;
  48700. t = t.slice(), k(t, function(v, g) {
  48701. var m = Ie(v) ? v : t[g] = {
  48702. name: v
  48703. };
  48704. m.type === "ordinal" && c == null && (c = g, f = p(m)), r[m.name] = [];
  48705. });
  48706. var d = l.get(u) || l.set(u, {
  48707. categoryWayDim: f,
  48708. valueWayDim: 0
  48709. });
  48710. k(t, function(v, g) {
  48711. var m = v.name, y = p(v);
  48712. if (c == null) {
  48713. var b = d.valueWayDim;
  48714. h(r[m], b, y), h(o, b, y), d.valueWayDim += y;
  48715. } else if (c === g)
  48716. h(r[m], 0, y), h(a, 0, y);
  48717. else {
  48718. var b = d.categoryWayDim;
  48719. h(r[m], b, y), h(o, b, y), d.categoryWayDim += y;
  48720. }
  48721. });
  48722. function h(v, g, m) {
  48723. for (var y = 0; y < m; y++)
  48724. v.push(g + y);
  48725. }
  48726. function p(v) {
  48727. var g = v.dimsDef;
  48728. return g ? g.length : 1;
  48729. }
  48730. return a.length && (r.itemName = a), o.length && (r.seriesName = o), r;
  48731. }
  48732. function nk(t, e, n) {
  48733. var r = {}, i = rk(t);
  48734. if (!i)
  48735. return r;
  48736. var a = e.sourceFormat, o = e.dimensionsDefine, s;
  48737. (a === Na || a === ls) && k(o, function(c, f) {
  48738. (Ie(c) ? c.name : c) === "name" && (s = f);
  48739. });
  48740. var l = function() {
  48741. for (var c = {}, f = {}, d = [], h = 0, p = Math.min(5, n); h < p; h++) {
  48742. var v = DJ(e.data, a, e.seriesLayoutBy, o, e.startIndex, h);
  48743. d.push(v);
  48744. var g = v === cr.Not;
  48745. 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)
  48746. return c;
  48747. g || (v === cr.Might && f.v == null && h !== s && (f.v = h), (f.n == null || f.n === f.v) && (f.n = h));
  48748. }
  48749. function m(y) {
  48750. return y.v != null && y.n != null;
  48751. }
  48752. return m(c) ? c : m(f) ? f : null;
  48753. }();
  48754. if (l) {
  48755. r.value = [l.v];
  48756. var u = s ?? l.n;
  48757. r.itemName = [u], r.seriesName = [u];
  48758. }
  48759. return r;
  48760. }
  48761. function rk(t) {
  48762. var e = t.get("data", !0);
  48763. if (!e)
  48764. return N0(t.ecModel, "dataset", {
  48765. index: t.get("datasetIndex", !0),
  48766. id: t.get("datasetId", !0)
  48767. }, Dn).models[0];
  48768. }
  48769. function SLe(t) {
  48770. return !t.get("transform", !0) && !t.get("fromTransformResult", !0) ? [] : N0(t.ecModel, "dataset", {
  48771. index: t.get("fromDatasetIndex", !0),
  48772. id: t.get("fromDatasetId", !0)
  48773. }, Dn).models;
  48774. }
  48775. function IJ(t, e) {
  48776. return DJ(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
  48777. }
  48778. function DJ(t, e, n, r, i, a) {
  48779. var o, s = 5;
  48780. if (Nr(t))
  48781. return cr.Not;
  48782. var l, u;
  48783. if (r) {
  48784. var c = r[a];
  48785. Ie(c) ? (l = c.name, u = c.type) : Oe(c) && (l = c);
  48786. }
  48787. if (u != null)
  48788. return u === "ordinal" ? cr.Must : cr.Not;
  48789. if (e === Br) {
  48790. var f = t;
  48791. if (n === _p) {
  48792. for (var d = f[a], h = 0; h < (d || []).length && h < s; h++)
  48793. if ((o = _(d[i + h])) != null)
  48794. return o;
  48795. } else
  48796. for (var h = 0; h < f.length && h < s; h++) {
  48797. var p = f[i + h];
  48798. if (p && (o = _(p[a])) != null)
  48799. return o;
  48800. }
  48801. } else if (e === Na) {
  48802. var v = t;
  48803. if (!l)
  48804. return cr.Not;
  48805. for (var h = 0; h < v.length && h < s; h++) {
  48806. var g = v[h];
  48807. if (g && (o = _(g[l])) != null)
  48808. return o;
  48809. }
  48810. } else if (e === ls) {
  48811. var m = t;
  48812. if (!l)
  48813. return cr.Not;
  48814. var d = m[l];
  48815. if (!d || Nr(d))
  48816. return cr.Not;
  48817. for (var h = 0; h < d.length && h < s; h++)
  48818. if ((o = _(d[h])) != null)
  48819. return o;
  48820. } else if (e === La)
  48821. for (var y = t, h = 0; h < y.length && h < s; h++) {
  48822. var g = y[h], b = fp(g);
  48823. if (!ue(b))
  48824. return cr.Not;
  48825. if ((o = _(b[a])) != null)
  48826. return o;
  48827. }
  48828. function _(O) {
  48829. var S = Oe(O);
  48830. if (O != null && Number.isFinite(Number(O)) && O !== "")
  48831. return S ? cr.Might : cr.Not;
  48832. if (S && O !== "-")
  48833. return cr.Must;
  48834. }
  48835. return cr.Not;
  48836. }
  48837. var WA = Pe();
  48838. function xLe(t, e) {
  48839. ke(WA.get(t) == null && e), WA.set(t, e);
  48840. }
  48841. function wLe(t, e, n) {
  48842. var r = WA.get(e);
  48843. if (!r)
  48844. return n;
  48845. var i = r(t);
  48846. if (!i)
  48847. return n;
  48848. if (process.env.NODE_ENV !== "production")
  48849. for (var a = 0; a < i.length; a++)
  48850. ke(Nh(i[a]));
  48851. return n.concat(i);
  48852. }
  48853. var qB = bt(), CLe = bt(), ik = (
  48854. /** @class */
  48855. function() {
  48856. function t() {
  48857. }
  48858. return t.prototype.getColorFromPalette = function(e, n, r) {
  48859. var i = Qt(this.get("color", !0)), a = this.get("colorLayer", !0);
  48860. return RJ(this, qB, i, a, e, n, r);
  48861. }, t.prototype.clearColorPalette = function() {
  48862. PLe(this, qB);
  48863. }, t;
  48864. }()
  48865. );
  48866. function QA(t, e, n, r) {
  48867. var i = Qt(t.get(["aria", "decal", "decals"]));
  48868. return RJ(t, CLe, i, null, e, n, r);
  48869. }
  48870. function TLe(t, e) {
  48871. for (var n = t.length, r = 0; r < n; r++)
  48872. if (t[r].length > e)
  48873. return t[r];
  48874. return t[n - 1];
  48875. }
  48876. function RJ(t, e, n, r, i, a, o) {
  48877. a = a || t;
  48878. var s = e(a), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
  48879. if (u.hasOwnProperty(i))
  48880. return u[i];
  48881. var c = o == null || !r ? n : TLe(r, o);
  48882. if (c = c || n, !(!c || !c.length)) {
  48883. var f = c[l];
  48884. return i && (u[i] = f), s.paletteIdx = (l + 1) % c.length, f;
  48885. }
  48886. }
  48887. function PLe(t, e) {
  48888. e(t).paletteIdx = 0, e(t).paletteNameMap = {};
  48889. }
  48890. var ib, av, KB, PT = "\0_ec_inner", JB = 1, $Le = {
  48891. grid: "GridComponent",
  48892. polar: "PolarComponent",
  48893. geo: "GeoComponent",
  48894. singleAxis: "SingleAxisComponent",
  48895. parallel: "ParallelComponent",
  48896. calendar: "CalendarComponent",
  48897. graphic: "GraphicComponent",
  48898. toolbox: "ToolboxComponent",
  48899. tooltip: "TooltipComponent",
  48900. axisPointer: "AxisPointerComponent",
  48901. brush: "BrushComponent",
  48902. title: "TitleComponent",
  48903. timeline: "TimelineComponent",
  48904. markPoint: "MarkPointComponent",
  48905. markLine: "MarkLineComponent",
  48906. markArea: "MarkAreaComponent",
  48907. legend: "LegendComponent",
  48908. dataZoom: "DataZoomComponent",
  48909. visualMap: "VisualMapComponent",
  48910. // aria: 'AriaComponent',
  48911. // dataset: 'DatasetComponent',
  48912. // Dependencies
  48913. xAxis: "GridComponent",
  48914. yAxis: "GridComponent",
  48915. angleAxis: "PolarComponent",
  48916. radiusAxis: "PolarComponent"
  48917. }, ALe = {
  48918. line: "LineChart",
  48919. bar: "BarChart",
  48920. pie: "PieChart",
  48921. scatter: "ScatterChart",
  48922. radar: "RadarChart",
  48923. map: "MapChart",
  48924. tree: "TreeChart",
  48925. treemap: "TreemapChart",
  48926. graph: "GraphChart",
  48927. gauge: "GaugeChart",
  48928. funnel: "FunnelChart",
  48929. parallel: "ParallelChart",
  48930. sankey: "SankeyChart",
  48931. boxplot: "BoxplotChart",
  48932. candlestick: "CandlestickChart",
  48933. effectScatter: "EffectScatterChart",
  48934. lines: "LinesChart",
  48935. heatmap: "HeatmapChart",
  48936. pictorialBar: "PictorialBarChart",
  48937. themeRiver: "ThemeRiverChart",
  48938. sunburst: "SunburstChart",
  48939. custom: "CustomChart"
  48940. }, hO = {};
  48941. function ELe(t) {
  48942. k(t, function(e, n) {
  48943. if (!rt.hasClass(n)) {
  48944. var r = $Le[n];
  48945. r && !hO[r] && (Cr("Component " + n + ` is used but not imported.
  48946. import { ` + r + ` } from 'echarts/components';
  48947. echarts.use([` + r + "]);"), hO[r] = !0);
  48948. }
  48949. });
  48950. }
  48951. var ak = (
  48952. /** @class */
  48953. function(t) {
  48954. q(e, t);
  48955. function e() {
  48956. return t !== null && t.apply(this, arguments) || this;
  48957. }
  48958. return e.prototype.init = function(n, r, i, a, o, s) {
  48959. a = a || {}, this.option = null, this._theme = new Wt(a), this._locale = new Wt(o), this._optionManager = s;
  48960. }, e.prototype.setOption = function(n, r, i) {
  48961. process.env.NODE_ENV !== "production" && (ke(n != null, "option is null/undefined"), ke(n[PT] !== JB, "please use chart.getOption()"));
  48962. var a = nz(r);
  48963. this._optionManager.setOption(n, i, a), this._resetOption(null, a);
  48964. }, e.prototype.resetOption = function(n, r) {
  48965. return this._resetOption(n, nz(r));
  48966. }, e.prototype._resetOption = function(n, r) {
  48967. var i = !1, a = this._optionManager;
  48968. if (!n || n === "recreate") {
  48969. var o = a.mountOption(n === "recreate");
  48970. process.env.NODE_ENV !== "production" && ELe(o), !this.option || n === "recreate" ? KB(this, o) : (this.restoreData(), this._mergeOption(o, r)), i = !0;
  48971. }
  48972. if ((n === "timeline" || n === "media") && this.restoreData(), !n || n === "recreate" || n === "timeline") {
  48973. var s = a.getTimelineOption(this);
  48974. s && (i = !0, this._mergeOption(s, r));
  48975. }
  48976. if (!n || n === "recreate" || n === "media") {
  48977. var l = a.getMediaOption(this);
  48978. l.length && k(l, function(u) {
  48979. i = !0, this._mergeOption(u, r);
  48980. }, this);
  48981. }
  48982. return i;
  48983. }, e.prototype.mergeOption = function(n) {
  48984. this._mergeOption(n, null);
  48985. }, e.prototype._mergeOption = function(n, r) {
  48986. var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], l = Pe(), u = r && r.replaceMergeMainTypeMap;
  48987. OLe(this), k(n, function(f, d) {
  48988. 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));
  48989. }), u && u.each(function(f, d) {
  48990. rt.hasClass(d) && !l.get(d) && (s.push(d), l.set(d, !0));
  48991. }), rt.topologicalTravel(s, rt.getAllClassMainTypes(), c, this);
  48992. function c(f) {
  48993. var d = wLe(this, f, Qt(n[f])), h = a.get(f), p = (
  48994. // `!oldCmptList` means init. See the comment in `mappingToExists`
  48995. h ? u && u.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll"
  48996. ), v = hK(h, d, p);
  48997. YDe(v, f, rt), i[f] = null, a.set(f, null), o.set(f, 0);
  48998. var g = [], m = [], y = 0, b, _;
  48999. k(v, function(O, S) {
  49000. var x = O.existing, C = O.newOption;
  49001. if (!C)
  49002. x && (x.mergeOption({}, this), x.optionUpdated({}, !1));
  49003. else {
  49004. var T = f === "series", w = rt.getClass(
  49005. f,
  49006. O.keyInfo.subType,
  49007. !T
  49008. // Give a more detailed warn later if series don't exists
  49009. );
  49010. if (!w) {
  49011. if (process.env.NODE_ENV !== "production") {
  49012. var P = O.keyInfo.subType, $ = ALe[P];
  49013. hO[P] || (hO[P] = !0, Cr($ ? "Series " + P + ` is used but not imported.
  49014. import { ` + $ + ` } from 'echarts/charts';
  49015. echarts.use([` + $ + "]);" : "Unknown series " + P));
  49016. }
  49017. return;
  49018. }
  49019. if (f === "tooltip") {
  49020. if (b) {
  49021. process.env.NODE_ENV !== "production" && (_ || (dn("Currently only one tooltip component is allowed."), _ = !0));
  49022. return;
  49023. }
  49024. b = !0;
  49025. }
  49026. if (x && x.constructor === w)
  49027. x.name = O.keyInfo.name, x.mergeOption(C, this), x.optionUpdated(C, !1);
  49028. else {
  49029. var A = le({
  49030. componentIndex: S
  49031. }, O.keyInfo);
  49032. x = new w(C, this, this, A), le(x, A), O.brandNew && (x.__requireNewView = !0), x.init(C, this, this), x.optionUpdated(null, !0);
  49033. }
  49034. }
  49035. x ? (g.push(x.option), m.push(x), y++) : (g.push(void 0), m.push(void 0));
  49036. }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && ib(this);
  49037. }
  49038. this._seriesIndices || ib(this);
  49039. }, e.prototype.getOption = function() {
  49040. var n = Le(this.option);
  49041. return k(n, function(r, i) {
  49042. if (rt.hasClass(i)) {
  49043. for (var a = Qt(r), o = a.length, s = !1, l = o - 1; l >= 0; l--)
  49044. a[l] && !Nh(a[l]) ? s = !0 : (a[l] = null, !s && o--);
  49045. a.length = o, n[i] = a;
  49046. }
  49047. }), delete n[PT], n;
  49048. }, e.prototype.getTheme = function() {
  49049. return this._theme;
  49050. }, e.prototype.getLocaleModel = function() {
  49051. return this._locale;
  49052. }, e.prototype.setUpdatePayload = function(n) {
  49053. this._payload = n;
  49054. }, e.prototype.getUpdatePayload = function() {
  49055. return this._payload;
  49056. }, e.prototype.getComponent = function(n, r) {
  49057. var i = this._componentsMap.get(n);
  49058. if (i) {
  49059. var a = i[r || 0];
  49060. if (a)
  49061. return a;
  49062. if (r == null) {
  49063. for (var o = 0; o < i.length; o++)
  49064. if (i[o])
  49065. return i[o];
  49066. }
  49067. }
  49068. }, e.prototype.queryComponents = function(n) {
  49069. var r = n.mainType;
  49070. if (!r)
  49071. return [];
  49072. var i = n.index, a = n.id, o = n.name, s = this._componentsMap.get(r);
  49073. if (!s || !s.length)
  49074. return [];
  49075. var l;
  49076. return i != null ? (l = [], k(Qt(i), function(u) {
  49077. s[u] && l.push(s[u]);
  49078. })) : a != null ? l = ez("id", a, s) : o != null ? l = ez("name", o, s) : l = Nt(s, function(u) {
  49079. return !!u;
  49080. }), tz(l, n);
  49081. }, e.prototype.findComponents = function(n) {
  49082. var r = n.query, i = n.mainType, a = s(r), o = a ? this.queryComponents(a) : Nt(this._componentsMap.get(i), function(u) {
  49083. return !!u;
  49084. });
  49085. return l(tz(o, n));
  49086. function s(u) {
  49087. var c = i + "Index", f = i + "Id", d = i + "Name";
  49088. return u && (u[c] != null || u[f] != null || u[d] != null) ? {
  49089. mainType: i,
  49090. // subType will be filtered finally.
  49091. index: u[c],
  49092. id: u[f],
  49093. name: u[d]
  49094. } : null;
  49095. }
  49096. function l(u) {
  49097. return n.filter ? Nt(u, n.filter) : u;
  49098. }
  49099. }, e.prototype.eachComponent = function(n, r, i) {
  49100. var a = this._componentsMap;
  49101. if (Me(n)) {
  49102. var o = r, s = n;
  49103. a.each(function(f, d) {
  49104. for (var h = 0; f && h < f.length; h++) {
  49105. var p = f[h];
  49106. p && s.call(o, d, p, p.componentIndex);
  49107. }
  49108. });
  49109. } else
  49110. for (var l = Oe(n) ? a.get(n) : Ie(n) ? this.findComponents(n) : null, u = 0; l && u < l.length; u++) {
  49111. var c = l[u];
  49112. c && r.call(i, c, c.componentIndex);
  49113. }
  49114. }, e.prototype.getSeriesByName = function(n) {
  49115. var r = Vn(n, null);
  49116. return Nt(this._componentsMap.get("series"), function(i) {
  49117. return !!i && r != null && i.name === r;
  49118. });
  49119. }, e.prototype.getSeriesByIndex = function(n) {
  49120. return this._componentsMap.get("series")[n];
  49121. }, e.prototype.getSeriesByType = function(n) {
  49122. return Nt(this._componentsMap.get("series"), function(r) {
  49123. return !!r && r.subType === n;
  49124. });
  49125. }, e.prototype.getSeries = function() {
  49126. return Nt(this._componentsMap.get("series"), function(n) {
  49127. return !!n;
  49128. });
  49129. }, e.prototype.getSeriesCount = function() {
  49130. return this._componentsCount.get("series");
  49131. }, e.prototype.eachSeries = function(n, r) {
  49132. av(this), k(this._seriesIndices, function(i) {
  49133. var a = this._componentsMap.get("series")[i];
  49134. n.call(r, a, i);
  49135. }, this);
  49136. }, e.prototype.eachRawSeries = function(n, r) {
  49137. k(this._componentsMap.get("series"), function(i) {
  49138. i && n.call(r, i, i.componentIndex);
  49139. });
  49140. }, e.prototype.eachSeriesByType = function(n, r, i) {
  49141. av(this), k(this._seriesIndices, function(a) {
  49142. var o = this._componentsMap.get("series")[a];
  49143. o.subType === n && r.call(i, o, a);
  49144. }, this);
  49145. }, e.prototype.eachRawSeriesByType = function(n, r, i) {
  49146. return k(this.getSeriesByType(n), r, i);
  49147. }, e.prototype.isSeriesFiltered = function(n) {
  49148. return av(this), this._seriesIndicesMap.get(n.componentIndex) == null;
  49149. }, e.prototype.getCurrentSeriesIndices = function() {
  49150. return (this._seriesIndices || []).slice();
  49151. }, e.prototype.filterSeries = function(n, r) {
  49152. av(this);
  49153. var i = [];
  49154. k(this._seriesIndices, function(a) {
  49155. var o = this._componentsMap.get("series")[a];
  49156. n.call(r, o, a) && i.push(a);
  49157. }, this), this._seriesIndices = i, this._seriesIndicesMap = Pe(i);
  49158. }, e.prototype.restoreData = function(n) {
  49159. ib(this);
  49160. var r = this._componentsMap, i = [];
  49161. r.each(function(a, o) {
  49162. rt.hasClass(o) && i.push(o);
  49163. }), rt.topologicalTravel(i, rt.getAllClassMainTypes(), function(a) {
  49164. k(r.get(a), function(o) {
  49165. o && (a !== "series" || !MLe(o, n)) && o.restoreData();
  49166. });
  49167. });
  49168. }, e.internalField = function() {
  49169. ib = function(n) {
  49170. var r = n._seriesIndices = [];
  49171. k(n._componentsMap.get("series"), function(i) {
  49172. i && r.push(i.componentIndex);
  49173. }), n._seriesIndicesMap = Pe(r);
  49174. }, av = function(n) {
  49175. if (process.env.NODE_ENV !== "production" && !n._seriesIndices)
  49176. throw new Error("Option should contains series.");
  49177. }, KB = function(n, r) {
  49178. n.option = {}, n.option[PT] = JB, n._componentsMap = Pe({
  49179. series: []
  49180. }), n._componentsCount = Pe();
  49181. var i = r.aria;
  49182. Ie(i) && i.enabled == null && (i.enabled = !0), ILe(r, n._theme.option), qe(r, _Le, !1), n._mergeOption(r, null);
  49183. };
  49184. }(), e;
  49185. }(Wt)
  49186. );
  49187. function MLe(t, e) {
  49188. if (e) {
  49189. var n = e.seriesIndex, r = e.seriesId, i = e.seriesName;
  49190. return n != null && t.componentIndex !== n || r != null && t.id !== r || i != null && t.name !== i;
  49191. }
  49192. }
  49193. function ILe(t, e) {
  49194. var n = t.color && !t.colorLayer;
  49195. k(e, function(r, i) {
  49196. 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));
  49197. });
  49198. }
  49199. function ez(t, e, n) {
  49200. if (ue(e)) {
  49201. var r = Pe();
  49202. return k(e, function(a) {
  49203. if (a != null) {
  49204. var o = Vn(a, null);
  49205. o != null && r.set(a, !0);
  49206. }
  49207. }), Nt(n, function(a) {
  49208. return a && r.get(a[t]);
  49209. });
  49210. } else {
  49211. var i = Vn(e, null);
  49212. return Nt(n, function(a) {
  49213. return a && i != null && a[t] === i;
  49214. });
  49215. }
  49216. }
  49217. function tz(t, e) {
  49218. return e.hasOwnProperty("subType") ? Nt(t, function(n) {
  49219. return n && n.subType === e.subType;
  49220. }) : t;
  49221. }
  49222. function nz(t) {
  49223. var e = Pe();
  49224. return t && k(Qt(t.replaceMerge), function(n) {
  49225. process.env.NODE_ENV !== "production" && ke(rt.hasClass(n), '"' + n + '" is not valid component main type in "replaceMerge"'), e.set(n, !0);
  49226. }), {
  49227. replaceMergeMainTypeMap: e
  49228. };
  49229. }
  49230. xn(ak, ik);
  49231. var DLe = [
  49232. "getDom",
  49233. "getZr",
  49234. "getWidth",
  49235. "getHeight",
  49236. "getDevicePixelRatio",
  49237. "dispatchAction",
  49238. "isSSR",
  49239. "isDisposed",
  49240. "on",
  49241. "off",
  49242. "getDataURL",
  49243. "getConnectedDataURL",
  49244. // 'getModel',
  49245. "getOption",
  49246. // 'getViewOfComponentModel',
  49247. // 'getViewOfSeriesModel',
  49248. "getId",
  49249. "updateLabelLayout"
  49250. ], kJ = (
  49251. /** @class */
  49252. /* @__PURE__ */ function() {
  49253. function t(e) {
  49254. k(DLe, function(n) {
  49255. this[n] = xe(e[n], e);
  49256. }, this);
  49257. }
  49258. return t;
  49259. }()
  49260. ), $T = {}, zf = (
  49261. /** @class */
  49262. function() {
  49263. function t() {
  49264. this._coordinateSystems = [];
  49265. }
  49266. return t.prototype.create = function(e, n) {
  49267. var r = [];
  49268. k($T, function(i, a) {
  49269. var o = i.create(e, n);
  49270. r = r.concat(o || []);
  49271. }), this._coordinateSystems = r;
  49272. }, t.prototype.update = function(e, n) {
  49273. k(this._coordinateSystems, function(r) {
  49274. r.update && r.update(e, n);
  49275. });
  49276. }, t.prototype.getCoordinateSystems = function() {
  49277. return this._coordinateSystems.slice();
  49278. }, t.register = function(e, n) {
  49279. $T[e] = n;
  49280. }, t.get = function(e) {
  49281. return $T[e];
  49282. }, t;
  49283. }()
  49284. ), RLe = /^(min|max)?(.+)$/, kLe = (
  49285. /** @class */
  49286. function() {
  49287. function t(e) {
  49288. this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
  49289. }
  49290. return t.prototype.setOption = function(e, n, r) {
  49291. e && (k(Qt(e.series), function(o) {
  49292. o && o.data && Nr(o.data) && vm(o.data);
  49293. }), k(Qt(e.dataset), function(o) {
  49294. o && o.source && Nr(o.source) && vm(o.source);
  49295. })), e = Le(e);
  49296. var i = this._optionBackup, a = LLe(e, n, !i);
  49297. 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;
  49298. }, t.prototype.mountOption = function(e) {
  49299. var n = this._optionBackup;
  49300. return this._timelineOptions = n.timelineOptions, this._mediaList = n.mediaList, this._mediaDefault = n.mediaDefault, this._currentMediaIndices = [], Le(e ? n.baseOption : this._newBaseOption);
  49301. }, t.prototype.getTimelineOption = function(e) {
  49302. var n, r = this._timelineOptions;
  49303. if (r.length) {
  49304. var i = e.getComponent("timeline");
  49305. i && (n = Le(
  49306. // FIXME:TS as TimelineModel or quivlant interface
  49307. r[i.getCurrentIndex()]
  49308. ));
  49309. }
  49310. return n;
  49311. }, t.prototype.getMediaOption = function(e) {
  49312. var n = this._api.getWidth(), r = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = [];
  49313. if (!i.length && !a)
  49314. return s;
  49315. for (var l = 0, u = i.length; l < u; l++)
  49316. NLe(i[l].query, n, r) && o.push(l);
  49317. return !o.length && a && (o = [-1]), o.length && !zLe(o, this._currentMediaIndices) && (s = ce(o, function(c) {
  49318. return Le(c === -1 ? a.option : i[c].option);
  49319. })), this._currentMediaIndices = o, s;
  49320. }, t;
  49321. }()
  49322. );
  49323. function LLe(t, e, n) {
  49324. 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);
  49325. o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (t.options = t.media = null), a = t), c && (ue(u) ? k(u, function(h) {
  49326. 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));
  49327. }) : process.env.NODE_ENV !== "production" && Cr("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), d(a), k(l, function(h) {
  49328. return d(h);
  49329. }), k(r, function(h) {
  49330. return d(h.option);
  49331. });
  49332. function d(h) {
  49333. k(e, function(p) {
  49334. p(h, n);
  49335. });
  49336. }
  49337. return {
  49338. baseOption: a,
  49339. timelineOptions: l || [],
  49340. mediaDefault: i,
  49341. mediaList: r
  49342. };
  49343. }
  49344. function NLe(t, e, n) {
  49345. var r = {
  49346. width: e,
  49347. height: n,
  49348. aspectratio: e / n
  49349. // lower case for convenience.
  49350. }, i = !0;
  49351. return k(t, function(a, o) {
  49352. var s = o.match(RLe);
  49353. if (!(!s || !s[1] || !s[2])) {
  49354. var l = s[1], u = s[2].toLowerCase();
  49355. BLe(r[u], a, l) || (i = !1);
  49356. }
  49357. }), i;
  49358. }
  49359. function BLe(t, e, n) {
  49360. return n === "min" ? t >= e : n === "max" ? t <= e : t === e;
  49361. }
  49362. function zLe(t, e) {
  49363. return t.join(",") === e.join(",");
  49364. }
  49365. var ea = k, Pm = Ie, rz = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
  49366. function AT(t) {
  49367. var e = t && t.itemStyle;
  49368. if (e)
  49369. for (var n = 0, r = rz.length; n < r; n++) {
  49370. var i = rz[n], a = e.normal, o = e.emphasis;
  49371. 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);
  49372. }
  49373. }
  49374. function Ir(t, e, n) {
  49375. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  49376. var r = t[e].normal, i = t[e].emphasis;
  49377. r && (process.env.NODE_ENV !== "production" && Ea("'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" && Ea(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));
  49378. }
  49379. }
  49380. function Zv(t) {
  49381. Ir(t, "itemStyle"), Ir(t, "lineStyle"), Ir(t, "areaStyle"), Ir(t, "label"), Ir(t, "labelLine"), Ir(t, "upperLabel"), Ir(t, "edgeLabel");
  49382. }
  49383. function En(t, e) {
  49384. var n = Pm(t) && t[e], r = Pm(n) && n.textStyle;
  49385. if (r) {
  49386. process.env.NODE_ENV !== "production" && Ea("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
  49387. for (var i = 0, a = sB.length; i < a; i++) {
  49388. var o = sB[i];
  49389. r.hasOwnProperty(o) && (n[o] = r[o]);
  49390. }
  49391. }
  49392. }
  49393. function la(t) {
  49394. t && (Zv(t), En(t, "label"), t.emphasis && En(t.emphasis, "label"));
  49395. }
  49396. function VLe(t) {
  49397. if (Pm(t)) {
  49398. AT(t), Zv(t), En(t, "label"), En(t, "upperLabel"), En(t, "edgeLabel"), t.emphasis && (En(t.emphasis, "label"), En(t.emphasis, "upperLabel"), En(t.emphasis, "edgeLabel"));
  49399. var e = t.markPoint;
  49400. e && (AT(e), la(e));
  49401. var n = t.markLine;
  49402. n && (AT(n), la(n));
  49403. var r = t.markArea;
  49404. r && la(r);
  49405. var i = t.data;
  49406. if (t.type === "graph") {
  49407. i = i || t.nodes;
  49408. var a = t.links || t.edges;
  49409. if (a && !Nr(a))
  49410. for (var o = 0; o < a.length; o++)
  49411. la(a[o]);
  49412. k(t.categories, function(u) {
  49413. Zv(u);
  49414. });
  49415. }
  49416. if (i && !Nr(i))
  49417. for (var o = 0; o < i.length; o++)
  49418. la(i[o]);
  49419. if (e = t.markPoint, e && e.data)
  49420. for (var s = e.data, o = 0; o < s.length; o++)
  49421. la(s[o]);
  49422. if (n = t.markLine, n && n.data)
  49423. for (var l = n.data, o = 0; o < l.length; o++)
  49424. ue(l[o]) ? (la(l[o][0]), la(l[o][1])) : la(l[o]);
  49425. t.type === "gauge" ? (En(t, "axisLabel"), En(t, "title"), En(t, "detail")) : t.type === "treemap" ? (Ir(t.breadcrumb, "itemStyle"), k(t.levels, function(u) {
  49426. Zv(u);
  49427. })) : t.type === "tree" && Zv(t.leaves);
  49428. }
  49429. }
  49430. function ms(t) {
  49431. return ue(t) ? t : t ? [t] : [];
  49432. }
  49433. function iz(t) {
  49434. return (ue(t) ? t[0] : t) || {};
  49435. }
  49436. function FLe(t, e) {
  49437. ea(ms(t.series), function(r) {
  49438. Pm(r) && VLe(r);
  49439. });
  49440. var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  49441. e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), ea(n, function(r) {
  49442. ea(ms(t[r]), function(i) {
  49443. i && (En(i, "axisLabel"), En(i.axisPointer, "label"));
  49444. });
  49445. }), ea(ms(t.parallel), function(r) {
  49446. var i = r && r.parallelAxisDefault;
  49447. En(i, "axisLabel"), En(i && i.axisPointer, "label");
  49448. }), ea(ms(t.calendar), function(r) {
  49449. Ir(r, "itemStyle"), En(r, "dayLabel"), En(r, "monthLabel"), En(r, "yearLabel");
  49450. }), ea(ms(t.radar), function(r) {
  49451. En(r, "name"), r.name && r.axisName == null && (r.axisName = r.name, delete r.name, process.env.NODE_ENV !== "production" && Ea("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" && Ea("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && ea(r.indicator, function(i) {
  49452. i.text && Cn("text", "name", "radar.indicator");
  49453. });
  49454. }), ea(ms(t.geo), function(r) {
  49455. Pm(r) && (la(r), ea(ms(r.regions), function(i) {
  49456. la(i);
  49457. }));
  49458. }), ea(ms(t.timeline), function(r) {
  49459. la(r), Ir(r, "label"), Ir(r, "itemStyle"), Ir(r, "controlStyle", !0);
  49460. var i = r.data;
  49461. ue(i) && k(i, function(a) {
  49462. Ie(a) && (Ir(a, "label"), Ir(a, "itemStyle"));
  49463. });
  49464. }), ea(ms(t.toolbox), function(r) {
  49465. Ir(r, "iconStyle"), ea(r.feature, function(i) {
  49466. Ir(i, "iconStyle");
  49467. });
  49468. }), En(iz(t.axisPointer), "label"), En(iz(t.tooltip).axisPointer, "label");
  49469. }
  49470. function WLe(t, e) {
  49471. for (var n = e.split(","), r = t, i = 0; i < n.length && (r = r && r[n[i]], r != null); i++)
  49472. ;
  49473. return r;
  49474. }
  49475. function QLe(t, e, n, r) {
  49476. for (var i = e.split(","), a = t, o, s = 0; s < i.length - 1; s++)
  49477. o = i[s], a[o] == null && (a[o] = {}), a = a[o];
  49478. a[i[s]] == null && (a[i[s]] = n);
  49479. }
  49480. function az(t) {
  49481. t && k(HLe, function(e) {
  49482. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
  49483. });
  49484. }
  49485. var HLe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], GLe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], ET = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
  49486. function ov(t) {
  49487. var e = t && t.itemStyle;
  49488. if (e)
  49489. for (var n = 0; n < ET.length; n++) {
  49490. var r = ET[n][1], i = ET[n][0];
  49491. e[r] != null && (e[i] = e[r], process.env.NODE_ENV !== "production" && Cn(r, i));
  49492. }
  49493. }
  49494. function oz(t) {
  49495. 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);
  49496. }
  49497. function sz(t) {
  49498. t && t.downplay && !t.blur && (t.blur = t.downplay, process.env.NODE_ENV !== "production" && Cn("downplay", "blur", "sunburst"));
  49499. }
  49500. function jLe(t) {
  49501. 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"));
  49502. }
  49503. function LJ(t, e) {
  49504. if (t)
  49505. for (var n = 0; n < t.length; n++)
  49506. e(t[n]), t[n] && LJ(t[n].children, e);
  49507. }
  49508. function NJ(t, e) {
  49509. FLe(t, e), t.series = Qt(t.series), k(t.series, function(n) {
  49510. if (Ie(n)) {
  49511. var r = n.type;
  49512. if (r === "line")
  49513. n.clipOverflow != null && (n.clip = n.clipOverflow, process.env.NODE_ENV !== "production" && Cn("clipOverflow", "clip", "line"));
  49514. else if (r === "pie" || r === "gauge") {
  49515. n.clockWise != null && (n.clockwise = n.clockWise, process.env.NODE_ENV !== "production" && Cn("clockWise", "clockwise")), oz(n.label);
  49516. var i = n.data;
  49517. if (i && !Nr(i))
  49518. for (var a = 0; a < i.length; a++)
  49519. oz(i[a]);
  49520. 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));
  49521. } else if (r === "gauge") {
  49522. var o = WLe(n, "pointer.color");
  49523. o != null && QLe(n, "itemStyle.color", o);
  49524. } else if (r === "bar") {
  49525. ov(n), ov(n.backgroundStyle), ov(n.emphasis);
  49526. var i = n.data;
  49527. if (i && !Nr(i))
  49528. for (var a = 0; a < i.length; a++)
  49529. typeof i[a] == "object" && (ov(i[a]), ov(i[a] && i[a].emphasis));
  49530. } else if (r === "sunburst") {
  49531. var s = n.highlightPolicy;
  49532. s && (n.emphasis = n.emphasis || {}, n.emphasis.focus || (n.emphasis.focus = s, process.env.NODE_ENV !== "production" && Cn("highlightPolicy", "emphasis.focus", "sunburst"))), sz(n), LJ(n.data, sz);
  49533. } else r === "graph" || r === "sankey" ? jLe(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" && Ea("`mapLocation` is not used anymore."), Re(n, n.mapLocation)));
  49534. 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)), az(n);
  49535. }
  49536. }), t.dataRange && (t.visualMap = t.dataRange), k(GLe, function(n) {
  49537. var r = t[n];
  49538. r && (ue(r) || (r = [r]), k(r, function(i) {
  49539. az(i);
  49540. }));
  49541. });
  49542. }
  49543. function ZLe(t) {
  49544. var e = Pe();
  49545. t.eachSeries(function(n) {
  49546. var r = n.get("stack");
  49547. if (r) {
  49548. var i = e.get(r) || e.set(r, []), a = n.getData(), o = {
  49549. // Used for calculate axis extent automatically.
  49550. // TODO: Type getCalculationInfo return more specific type?
  49551. stackResultDimension: a.getCalculationInfo("stackResultDimension"),
  49552. stackedOverDimension: a.getCalculationInfo("stackedOverDimension"),
  49553. stackedDimension: a.getCalculationInfo("stackedDimension"),
  49554. stackedByDimension: a.getCalculationInfo("stackedByDimension"),
  49555. isStackedByIndex: a.getCalculationInfo("isStackedByIndex"),
  49556. data: a,
  49557. seriesModel: n
  49558. };
  49559. if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
  49560. return;
  49561. i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o);
  49562. }
  49563. }), e.each(ULe);
  49564. }
  49565. function ULe(t) {
  49566. k(t, function(e, n) {
  49567. var r = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
  49568. o.modify(a, function(u, c, f) {
  49569. var d = o.get(e.stackedDimension, f);
  49570. if (isNaN(d))
  49571. return i;
  49572. var h, p;
  49573. s ? p = o.getRawIndex(f) : h = o.get(e.stackedByDimension, f);
  49574. for (var v = NaN, g = n - 1; g >= 0; g--) {
  49575. var m = t[g];
  49576. if (s || (p = m.data.rawIndexOf(m.stackedByDimension, h)), p >= 0) {
  49577. var y = m.data.getByRawIndex(m.stackResultDimension, p);
  49578. if (l === "all" || l === "positive" && y > 0 || l === "negative" && y < 0 || l === "samesign" && d >= 0 && y > 0 || l === "samesign" && d <= 0 && y < 0) {
  49579. d = NDe(d, y), v = y;
  49580. break;
  49581. }
  49582. }
  49583. }
  49584. return r[0] = d, r[1] = v, r;
  49585. });
  49586. });
  49587. }
  49588. var ow = (
  49589. /** @class */
  49590. /* @__PURE__ */ function() {
  49591. function t(e) {
  49592. this.data = e.data || (e.sourceFormat === ls ? {} : []), this.sourceFormat = e.sourceFormat || AJ, this.seriesLayoutBy = e.seriesLayoutBy || Xo, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
  49593. var n = this.dimensionsDefine = e.dimensionsDefine;
  49594. if (n)
  49595. for (var r = 0; r < n.length; r++) {
  49596. var i = n[r];
  49597. i.type == null && IJ(this, r) === cr.Must && (i.type = "ordinal");
  49598. }
  49599. }
  49600. return t;
  49601. }()
  49602. );
  49603. function ok(t) {
  49604. return t instanceof ow;
  49605. }
  49606. function HA(t, e, n) {
  49607. n = n || BJ(t);
  49608. var r = e.seriesLayoutBy, i = YLe(t, n, r, e.sourceHeader, e.dimensions), a = new ow({
  49609. data: t,
  49610. sourceFormat: n,
  49611. seriesLayoutBy: r,
  49612. dimensionsDefine: i.dimensionsDefine,
  49613. startIndex: i.startIndex,
  49614. dimensionsDetectedCount: i.dimensionsDetectedCount,
  49615. metaRawOption: Le(e)
  49616. });
  49617. return a;
  49618. }
  49619. function sk(t) {
  49620. return new ow({
  49621. data: t,
  49622. sourceFormat: Nr(t) ? Ds : La
  49623. });
  49624. }
  49625. function XLe(t) {
  49626. return new ow({
  49627. data: t.data,
  49628. sourceFormat: t.sourceFormat,
  49629. seriesLayoutBy: t.seriesLayoutBy,
  49630. dimensionsDefine: Le(t.dimensionsDefine),
  49631. startIndex: t.startIndex,
  49632. dimensionsDetectedCount: t.dimensionsDetectedCount
  49633. });
  49634. }
  49635. function BJ(t) {
  49636. var e = AJ;
  49637. if (Nr(t))
  49638. e = Ds;
  49639. else if (ue(t)) {
  49640. t.length === 0 && (e = Br);
  49641. for (var n = 0, r = t.length; n < r; n++) {
  49642. var i = t[n];
  49643. if (i != null) {
  49644. if (ue(i) || Nr(i)) {
  49645. e = Br;
  49646. break;
  49647. } else if (Ie(i)) {
  49648. e = Na;
  49649. break;
  49650. }
  49651. }
  49652. }
  49653. } else if (Ie(t)) {
  49654. for (var a in t)
  49655. if (Ce(t, a) && wr(t[a])) {
  49656. e = ls;
  49657. break;
  49658. }
  49659. }
  49660. return e;
  49661. }
  49662. function YLe(t, e, n, r, i) {
  49663. var a, o;
  49664. if (!t)
  49665. return {
  49666. dimensionsDefine: lz(i),
  49667. startIndex: o,
  49668. dimensionsDetectedCount: a
  49669. };
  49670. if (e === Br) {
  49671. var s = t;
  49672. r === "auto" || r == null ? uz(function(u) {
  49673. u != null && u !== "-" && (Oe(u) ? o == null && (o = 1) : o = 0);
  49674. }, n, s, 10) : o = St(r) ? r : r ? 1 : 0, !i && o === 1 && (i = [], uz(function(u, c) {
  49675. i[c] = u != null ? u + "" : "";
  49676. }, n, s, 1 / 0)), a = i ? i.length : n === _p ? s.length : s[0] ? s[0].length : null;
  49677. } else if (e === Na)
  49678. i || (i = qLe(t));
  49679. else if (e === ls)
  49680. i || (i = [], k(t, function(u, c) {
  49681. i.push(c);
  49682. }));
  49683. else if (e === La) {
  49684. var l = fp(t[0]);
  49685. a = ue(l) && l.length || 1;
  49686. } else e === Ds && process.env.NODE_ENV !== "production" && ke(!!i, "dimensions must be given if data is TypedArray.");
  49687. return {
  49688. startIndex: o,
  49689. dimensionsDefine: lz(i),
  49690. dimensionsDetectedCount: a
  49691. };
  49692. }
  49693. function qLe(t) {
  49694. for (var e = 0, n; e < t.length && !(n = t[e++]); )
  49695. ;
  49696. if (n)
  49697. return st(n);
  49698. }
  49699. function lz(t) {
  49700. if (t) {
  49701. var e = Pe();
  49702. return ce(t, function(n, r) {
  49703. n = Ie(n) ? n : {
  49704. name: n
  49705. };
  49706. var i = {
  49707. name: n.name,
  49708. displayName: n.displayName,
  49709. type: n.type
  49710. };
  49711. if (i.name == null)
  49712. return i;
  49713. i.name += "", i.displayName == null && (i.displayName = i.name);
  49714. var a = e.get(i.name);
  49715. return a ? i.name += "-" + a.count++ : e.set(i.name, {
  49716. count: 1
  49717. }), i;
  49718. });
  49719. }
  49720. }
  49721. function uz(t, e, n, r) {
  49722. if (e === _p)
  49723. for (var i = 0; i < n.length && i < r; i++)
  49724. t(n[i] ? n[i][0] : null, i);
  49725. else
  49726. for (var a = n[0] || [], i = 0; i < a.length && i < r; i++)
  49727. t(a[i], i);
  49728. }
  49729. function zJ(t) {
  49730. var e = t.sourceFormat;
  49731. return e === Na || e === ls;
  49732. }
  49733. var tc, nc, rc, cz, fz, VJ = (
  49734. /** @class */
  49735. function() {
  49736. function t(e, n) {
  49737. var r = ok(e) ? e : sk(e);
  49738. this._source = r;
  49739. var i = this._data = r.data;
  49740. if (r.sourceFormat === Ds) {
  49741. if (process.env.NODE_ENV !== "production" && n == null)
  49742. throw new Error("Typed array data must specify dimension size");
  49743. this._offset = 0, this._dimSize = n, this._data = i;
  49744. }
  49745. fz(this, i, r);
  49746. }
  49747. return t.prototype.getSource = function() {
  49748. return this._source;
  49749. }, t.prototype.count = function() {
  49750. return 0;
  49751. }, t.prototype.getItem = function(e, n) {
  49752. }, t.prototype.appendData = function(e) {
  49753. }, t.prototype.clean = function() {
  49754. }, t.protoInitialize = function() {
  49755. var e = t.prototype;
  49756. e.pure = !1, e.persistent = !0;
  49757. }(), t.internalField = function() {
  49758. var e;
  49759. fz = function(o, s, l) {
  49760. var u = l.sourceFormat, c = l.seriesLayoutBy, f = l.startIndex, d = l.dimensionsDefine, h = cz[lk(u, c)];
  49761. if (process.env.NODE_ENV !== "production" && ke(h, "Invalide sourceFormat: " + u), le(o, h), u === Ds)
  49762. o.getItem = n, o.count = i, o.fillStorage = r;
  49763. else {
  49764. var p = FJ(u, c);
  49765. o.getItem = xe(p, null, s, f, d);
  49766. var v = WJ(u, c);
  49767. o.count = xe(v, null, s, f, d);
  49768. }
  49769. };
  49770. var n = function(o, s) {
  49771. o = o - this._offset, s = s || [];
  49772. for (var l = this._data, u = this._dimSize, c = u * o, f = 0; f < u; f++)
  49773. s[f] = l[c + f];
  49774. return s;
  49775. }, r = function(o, s, l, u) {
  49776. for (var c = this._data, f = this._dimSize, d = 0; d < f; d++) {
  49777. 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++) {
  49778. var b = c[y * f + d];
  49779. m[o + y] = b, b < p && (p = b), b > v && (v = b);
  49780. }
  49781. h[0] = p, h[1] = v;
  49782. }
  49783. }, i = function() {
  49784. return this._data ? this._data.length / this._dimSize : 0;
  49785. };
  49786. cz = (e = {}, e[Br + "_" + Xo] = {
  49787. pure: !0,
  49788. appendData: a
  49789. }, e[Br + "_" + _p] = {
  49790. pure: !0,
  49791. appendData: function() {
  49792. throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
  49793. }
  49794. }, e[Na] = {
  49795. pure: !0,
  49796. appendData: a
  49797. }, e[ls] = {
  49798. pure: !0,
  49799. appendData: function(o) {
  49800. var s = this._data;
  49801. k(o, function(l, u) {
  49802. for (var c = s[u] || (s[u] = []), f = 0; f < (l || []).length; f++)
  49803. c.push(l[f]);
  49804. });
  49805. }
  49806. }, e[La] = {
  49807. appendData: a
  49808. }, e[Ds] = {
  49809. persistent: !1,
  49810. pure: !0,
  49811. appendData: function(o) {
  49812. process.env.NODE_ENV !== "production" && ke(Nr(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
  49813. },
  49814. // Clean self if data is already used.
  49815. clean: function() {
  49816. this._offset += this.count(), this._data = null;
  49817. }
  49818. }, e);
  49819. function a(o) {
  49820. for (var s = 0; s < o.length; s++)
  49821. this._data.push(o[s]);
  49822. }
  49823. }(), t;
  49824. }()
  49825. ), dz = function(t, e, n, r) {
  49826. return t[r];
  49827. }, KLe = (tc = {}, tc[Br + "_" + Xo] = function(t, e, n, r) {
  49828. return t[r + e];
  49829. }, tc[Br + "_" + _p] = function(t, e, n, r, i) {
  49830. r += e;
  49831. for (var a = i || [], o = t, s = 0; s < o.length; s++) {
  49832. var l = o[s];
  49833. a[s] = l ? l[r] : null;
  49834. }
  49835. return a;
  49836. }, tc[Na] = dz, tc[ls] = function(t, e, n, r, i) {
  49837. for (var a = i || [], o = 0; o < n.length; o++) {
  49838. var s = n[o].name;
  49839. if (process.env.NODE_ENV !== "production" && s == null)
  49840. throw new Error();
  49841. var l = t[s];
  49842. a[o] = l ? l[r] : null;
  49843. }
  49844. return a;
  49845. }, tc[La] = dz, tc);
  49846. function FJ(t, e) {
  49847. var n = KLe[lk(t, e)];
  49848. return process.env.NODE_ENV !== "production" && ke(n, 'Do not support get item on "' + t + '", "' + e + '".'), n;
  49849. }
  49850. var hz = function(t, e, n) {
  49851. return t.length;
  49852. }, JLe = (nc = {}, nc[Br + "_" + Xo] = function(t, e, n) {
  49853. return Math.max(0, t.length - e);
  49854. }, nc[Br + "_" + _p] = function(t, e, n) {
  49855. var r = t[0];
  49856. return r ? Math.max(0, r.length - e) : 0;
  49857. }, nc[Na] = hz, nc[ls] = function(t, e, n) {
  49858. var r = n[0].name;
  49859. if (process.env.NODE_ENV !== "production" && r == null)
  49860. throw new Error();
  49861. var i = t[r];
  49862. return i ? i.length : 0;
  49863. }, nc[La] = hz, nc);
  49864. function WJ(t, e) {
  49865. var n = JLe[lk(t, e)];
  49866. return process.env.NODE_ENV !== "production" && ke(n, 'Do not support count on "' + t + '", "' + e + '".'), n;
  49867. }
  49868. var MT = function(t, e, n) {
  49869. return t[e];
  49870. }, e4e = (rc = {}, rc[Br] = MT, rc[Na] = function(t, e, n) {
  49871. return t[n];
  49872. }, rc[ls] = MT, rc[La] = function(t, e, n) {
  49873. var r = fp(t);
  49874. return r instanceof Array ? r[e] : r;
  49875. }, rc[Ds] = MT, rc);
  49876. function QJ(t) {
  49877. var e = e4e[t];
  49878. return process.env.NODE_ENV !== "production" && ke(e, 'Do not support get value on "' + t + '".'), e;
  49879. }
  49880. function lk(t, e) {
  49881. return t === Br ? t + "_" + e : t;
  49882. }
  49883. function Vh(t, e, n) {
  49884. if (t) {
  49885. var r = t.getRawDataItem(e);
  49886. if (r != null) {
  49887. var i = t.getStore(), a = i.getSource().sourceFormat;
  49888. if (n != null) {
  49889. var o = t.getDimensionIndex(n), s = i.getDimensionProperty(o);
  49890. return QJ(a)(r, o, s);
  49891. } else {
  49892. var l = r;
  49893. return a === La && (l = fp(r)), l;
  49894. }
  49895. }
  49896. }
  49897. }
  49898. var t4e = /\{@(.+?)\}/g, sw = (
  49899. /** @class */
  49900. function() {
  49901. function t() {
  49902. }
  49903. return t.prototype.getDataParams = function(e, n) {
  49904. 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();
  49905. return {
  49906. componentType: f,
  49907. componentSubType: this.subType,
  49908. componentIndex: this.componentIndex,
  49909. seriesType: d ? this.subType : null,
  49910. seriesIndex: this.seriesIndex,
  49911. seriesId: d ? this.id : null,
  49912. seriesName: d ? this.name : null,
  49913. name: o,
  49914. dataIndex: a,
  49915. data: s,
  49916. dataType: n,
  49917. value: i,
  49918. color: u,
  49919. borderColor: c,
  49920. dimensionNames: h ? h.fullDimensions : null,
  49921. encode: h ? h.encode : null,
  49922. // Param name list for mapping `a`, `b`, `c`, `d`, `e`
  49923. $vars: ["seriesName", "name", "value"]
  49924. };
  49925. }, t.prototype.getFormattedLabel = function(e, n, r, i, a, o) {
  49926. n = n || "normal";
  49927. var s = this.getData(r), l = this.getDataParams(e, r);
  49928. if (o && (l.value = o.interpolatedValue), i != null && ue(l.value) && (l.value = l.value[i]), !a) {
  49929. var u = s.getItemModel(e);
  49930. a = u.get(n === "normal" ? ["label", "formatter"] : [n, "label", "formatter"]);
  49931. }
  49932. if (Me(a))
  49933. return l.status = n, l.dimensionIndex = i, a(l);
  49934. if (Oe(a)) {
  49935. var c = ek(a, l);
  49936. return c.replace(t4e, function(f, d) {
  49937. var h = d.length, p = d;
  49938. 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], ..."));
  49939. var v = Vh(s, e, p);
  49940. if (o && ue(o.interpolatedValue)) {
  49941. var g = s.getDimensionIndex(p);
  49942. g >= 0 && (v = o.interpolatedValue[g]);
  49943. }
  49944. return v != null ? v + "" : "";
  49945. });
  49946. }
  49947. }, t.prototype.getRawValue = function(e, n) {
  49948. return Vh(this.getData(n), e);
  49949. }, t.prototype.formatTooltip = function(e, n, r) {
  49950. }, t;
  49951. }()
  49952. );
  49953. function pz(t) {
  49954. var e, n;
  49955. return Ie(t) ? t.type ? n = t : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + ti(t)) : e = t, {
  49956. text: e,
  49957. // markers: markers || markersExisting,
  49958. frag: n
  49959. };
  49960. }
  49961. function Dg(t) {
  49962. return new n4e(t);
  49963. }
  49964. var n4e = (
  49965. /** @class */
  49966. function() {
  49967. function t(e) {
  49968. e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
  49969. }
  49970. return t.prototype.perform = function(e) {
  49971. var n = this._upstream, r = e && e.skip;
  49972. if (this._dirty && n) {
  49973. var i = this.context;
  49974. i.data = i.outputData = n.context.outputData;
  49975. }
  49976. this.__pipeline && (this.__pipeline.currentTask = this);
  49977. var a;
  49978. this._plan && !r && (a = this._plan(this.context));
  49979. var o = c(this._modBy), s = this._modDataCount || 0, l = c(e && e.modBy), u = e && e.modDataCount || 0;
  49980. (o !== l || s !== u) && (a = "reset");
  49981. function c(y) {
  49982. return !(y >= 1) && (y = 1), y;
  49983. }
  49984. var f;
  49985. (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(r)), this._modBy = l, this._modDataCount = u;
  49986. var d = e && e.step;
  49987. 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) {
  49988. var h = this._dueIndex, p = Math.min(d != null ? this._dueIndex + d : 1 / 0, this._dueEnd);
  49989. if (!r && (f || h < p)) {
  49990. var v = this._progress;
  49991. if (ue(v))
  49992. for (var g = 0; g < v.length; g++)
  49993. this._doProgress(v[g], h, p, l, u);
  49994. else
  49995. this._doProgress(v, h, p, l, u);
  49996. }
  49997. this._dueIndex = p;
  49998. var m = this._settedOutputEnd != null ? this._settedOutputEnd : p;
  49999. process.env.NODE_ENV !== "production" && ke(m >= this._outputDueEnd), this._outputDueEnd = m;
  50000. } else
  50001. this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
  50002. return this.unfinished();
  50003. }, t.prototype.dirty = function() {
  50004. this._dirty = !0, this._onDirty && this._onDirty(this.context);
  50005. }, t.prototype._doProgress = function(e, n, r, i, a) {
  50006. vz.reset(n, r, i, a), this._callingProgress = e, this._callingProgress({
  50007. start: n,
  50008. end: r,
  50009. count: r - n,
  50010. next: vz.next
  50011. }, this.context);
  50012. }, t.prototype._doReset = function(e) {
  50013. this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
  50014. var n, r;
  50015. !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;
  50016. var i = this._downstream;
  50017. return i && i.dirty(), r;
  50018. }, t.prototype.unfinished = function() {
  50019. return this._progress && this._dueIndex < this._dueEnd;
  50020. }, t.prototype.pipe = function(e) {
  50021. process.env.NODE_ENV !== "production" && ke(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
  50022. }, t.prototype.dispose = function() {
  50023. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
  50024. }, t.prototype.getUpstream = function() {
  50025. return this._upstream;
  50026. }, t.prototype.getDownstream = function() {
  50027. return this._downstream;
  50028. }, t.prototype.setOutputEnd = function(e) {
  50029. this._outputDueEnd = this._settedOutputEnd = e;
  50030. }, t;
  50031. }()
  50032. ), vz = /* @__PURE__ */ function() {
  50033. var t, e, n, r, i, a = {
  50034. reset: function(l, u, c, f) {
  50035. e = l, t = u, n = c, r = f, i = Math.ceil(r / n), a.next = n > 1 && r > 0 ? s : o;
  50036. }
  50037. };
  50038. return a;
  50039. function o() {
  50040. return e < t ? e++ : null;
  50041. }
  50042. function s() {
  50043. var l = e % i * n + Math.ceil(e / i), u = e >= t ? null : l < r ? l : e;
  50044. return e++, u;
  50045. }
  50046. }();
  50047. function Kl(t, e) {
  50048. var n = e && e.type;
  50049. return n === "ordinal" ? t : (n === "time" && !St(t) && t != null && t !== "-" && (t = +Yi(t)), t == null || t === "" ? NaN : Number(t));
  50050. }
  50051. var r4e = Pe({
  50052. number: function(t) {
  50053. return parseFloat(t);
  50054. },
  50055. time: function(t) {
  50056. return +Yi(t);
  50057. },
  50058. trim: function(t) {
  50059. return Oe(t) ? ma(t) : t;
  50060. }
  50061. });
  50062. function HJ(t) {
  50063. return r4e.get(t);
  50064. }
  50065. var GJ = {
  50066. lt: function(t, e) {
  50067. return t < e;
  50068. },
  50069. lte: function(t, e) {
  50070. return t <= e;
  50071. },
  50072. gt: function(t, e) {
  50073. return t > e;
  50074. },
  50075. gte: function(t, e) {
  50076. return t >= e;
  50077. }
  50078. }, i4e = (
  50079. /** @class */
  50080. function() {
  50081. function t(e, n) {
  50082. if (!St(n)) {
  50083. var r = "";
  50084. process.env.NODE_ENV !== "production" && (r = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), Et(r);
  50085. }
  50086. this._opFn = GJ[e], this._rvalFloat = is(n);
  50087. }
  50088. return t.prototype.evaluate = function(e) {
  50089. return St(e) ? this._opFn(e, this._rvalFloat) : this._opFn(is(e), this._rvalFloat);
  50090. }, t;
  50091. }()
  50092. ), jJ = (
  50093. /** @class */
  50094. function() {
  50095. function t(e, n) {
  50096. var r = e === "desc";
  50097. this._resultLT = r ? 1 : -1, n == null && (n = r ? "min" : "max"), this._incomparable = n === "min" ? -1 / 0 : 1 / 0;
  50098. }
  50099. return t.prototype.evaluate = function(e, n) {
  50100. var r = St(e) ? e : is(e), i = St(n) ? n : is(n), a = isNaN(r), o = isNaN(i);
  50101. if (a && (r = this._incomparable), o && (i = this._incomparable), a && o) {
  50102. var s = Oe(e), l = Oe(n);
  50103. s && (r = l ? e : 0), l && (i = s ? n : 0);
  50104. }
  50105. return r < i ? this._resultLT : r > i ? -this._resultLT : 0;
  50106. }, t;
  50107. }()
  50108. ), a4e = (
  50109. /** @class */
  50110. function() {
  50111. function t(e, n) {
  50112. this._rval = n, this._isEQ = e, this._rvalTypeof = typeof n, this._rvalFloat = is(n);
  50113. }
  50114. return t.prototype.evaluate = function(e) {
  50115. var n = e === this._rval;
  50116. if (!n) {
  50117. var r = typeof e;
  50118. r !== this._rvalTypeof && (r === "number" || this._rvalTypeof === "number") && (n = is(e) === this._rvalFloat);
  50119. }
  50120. return this._isEQ ? n : !n;
  50121. }, t;
  50122. }()
  50123. );
  50124. function o4e(t, e) {
  50125. return t === "eq" || t === "ne" ? new a4e(t === "eq", e) : Ce(GJ, t) ? new i4e(t, e) : null;
  50126. }
  50127. var s4e = (
  50128. /** @class */
  50129. function() {
  50130. function t() {
  50131. }
  50132. return t.prototype.getRawData = function() {
  50133. throw new Error("not supported");
  50134. }, t.prototype.getRawDataItem = function(e) {
  50135. throw new Error("not supported");
  50136. }, t.prototype.cloneRawData = function() {
  50137. }, t.prototype.getDimensionInfo = function(e) {
  50138. }, t.prototype.cloneAllDimensionInfo = function() {
  50139. }, t.prototype.count = function() {
  50140. }, t.prototype.retrieveValue = function(e, n) {
  50141. }, t.prototype.retrieveValueFromItem = function(e, n) {
  50142. }, t.prototype.convertValue = function(e, n) {
  50143. return Kl(e, n);
  50144. }, t;
  50145. }()
  50146. );
  50147. function l4e(t, e) {
  50148. var n = new s4e(), r = t.data, i = n.sourceFormat = t.sourceFormat, a = t.startIndex, o = "";
  50149. t.seriesLayoutBy !== Xo && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), Et(o));
  50150. var s = [], l = {}, u = t.dimensionsDefine;
  50151. if (u)
  50152. k(u, function(v, g) {
  50153. var m = v.name, y = {
  50154. index: g,
  50155. name: m,
  50156. displayName: v.displayName
  50157. };
  50158. if (s.push(y), m != null) {
  50159. var b = "";
  50160. Ce(l, m) && (process.env.NODE_ENV !== "production" && (b = 'dimension name "' + m + '" duplicated.'), Et(b)), l[m] = y;
  50161. }
  50162. });
  50163. else
  50164. for (var c = 0; c < t.dimensionsDetectedCount; c++)
  50165. s.push({
  50166. index: c
  50167. });
  50168. var f = FJ(i, Xo);
  50169. e.__isBuiltIn && (n.getRawDataItem = function(v) {
  50170. return f(r, a, s, v);
  50171. }, n.getRawData = xe(u4e, null, t)), n.cloneRawData = xe(c4e, null, t);
  50172. var d = WJ(i, Xo);
  50173. n.count = xe(d, null, r, a, s);
  50174. var h = QJ(i);
  50175. n.retrieveValue = function(v, g) {
  50176. var m = f(r, a, s, v);
  50177. return p(m, g);
  50178. };
  50179. var p = n.retrieveValueFromItem = function(v, g) {
  50180. if (v != null) {
  50181. var m = s[g];
  50182. if (m)
  50183. return h(v, g, m.name);
  50184. }
  50185. };
  50186. return n.getDimensionInfo = xe(f4e, null, s, l), n.cloneAllDimensionInfo = xe(d4e, null, s), n;
  50187. }
  50188. function u4e(t) {
  50189. var e = t.sourceFormat;
  50190. if (!uk(e)) {
  50191. var n = "";
  50192. process.env.NODE_ENV !== "production" && (n = "`getRawData` is not supported in source format " + e), Et(n);
  50193. }
  50194. return t.data;
  50195. }
  50196. function c4e(t) {
  50197. var e = t.sourceFormat, n = t.data;
  50198. if (!uk(e)) {
  50199. var r = "";
  50200. process.env.NODE_ENV !== "production" && (r = "`cloneRawData` is not supported in source format " + e), Et(r);
  50201. }
  50202. if (e === Br) {
  50203. for (var i = [], a = 0, o = n.length; a < o; a++)
  50204. i.push(n[a].slice());
  50205. return i;
  50206. } else if (e === Na) {
  50207. for (var i = [], a = 0, o = n.length; a < o; a++)
  50208. i.push(le({}, n[a]));
  50209. return i;
  50210. }
  50211. }
  50212. function f4e(t, e, n) {
  50213. if (n != null) {
  50214. if (St(n) || !isNaN(n) && !Ce(e, n))
  50215. return t[n];
  50216. if (Ce(e, n))
  50217. return e[n];
  50218. }
  50219. }
  50220. function d4e(t) {
  50221. return Le(t);
  50222. }
  50223. var ZJ = Pe();
  50224. function h4e(t) {
  50225. t = Le(t);
  50226. var e = t.type, n = "";
  50227. e || (process.env.NODE_ENV !== "production" && (n = "Must have a `type` when `registerTransform`."), Et(n));
  50228. var r = e.split(":");
  50229. r.length !== 2 && (process.env.NODE_ENV !== "production" && (n = 'Name must include namespace like "ns:regression".'), Et(n));
  50230. var i = !1;
  50231. r[0] === "echarts" && (e = r[1], i = !0), t.__isBuiltIn = i, ZJ.set(e, t);
  50232. }
  50233. function p4e(t, e, n) {
  50234. var r = Qt(t), i = r.length, a = "";
  50235. i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), Et(a));
  50236. for (var o = 0, s = i; o < s; o++) {
  50237. var l = r[o];
  50238. e = v4e(l, e, n, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
  50239. }
  50240. return e;
  50241. }
  50242. function v4e(t, e, n, r) {
  50243. var i = "";
  50244. 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));
  50245. var a = t.type, o = ZJ.get(a);
  50246. o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), Et(i));
  50247. var s = ce(e, function(c) {
  50248. return l4e(c, o);
  50249. }), l = Qt(o.transform({
  50250. upstream: s[0],
  50251. upstreamList: s,
  50252. config: Le(t.config)
  50253. }));
  50254. if (process.env.NODE_ENV !== "production" && t.print) {
  50255. var u = ce(l, function(c) {
  50256. var f = r != null ? " === pipe index: " + r : "";
  50257. return ["=== dataset index: " + n.datasetIndex + f + " ===", "- transform result data:", ti(c.data), "- transform result dimensions:", ti(c.dimensions)].join(`
  50258. `);
  50259. }).join(`
  50260. `);
  50261. FDe(u);
  50262. }
  50263. return ce(l, function(c, f) {
  50264. var d = "";
  50265. 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));
  50266. var h = BJ(c.data);
  50267. uk(h) || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be array rows or object rows."), Et(d));
  50268. var p, v = e[0];
  50269. if (v && f === 0 && !c.dimensions) {
  50270. var g = v.startIndex;
  50271. g && (c.data = v.data.slice(0, g).concat(c.data)), p = {
  50272. seriesLayoutBy: Xo,
  50273. sourceHeader: g,
  50274. dimensions: v.metaRawOption.dimensions
  50275. };
  50276. } else
  50277. p = {
  50278. seriesLayoutBy: Xo,
  50279. sourceHeader: 0,
  50280. dimensions: c.dimensions
  50281. };
  50282. return HA(c.data, p, null);
  50283. });
  50284. }
  50285. function uk(t) {
  50286. return t === Br || t === Na;
  50287. }
  50288. var lw = "undefined", g4e = typeof Uint32Array === lw ? Array : Uint32Array, m4e = typeof Uint16Array === lw ? Array : Uint16Array, UJ = typeof Int32Array === lw ? Array : Int32Array, gz = typeof Float64Array === lw ? Array : Float64Array, XJ = {
  50289. float: gz,
  50290. int: UJ,
  50291. // Ordinal data type can be string or int
  50292. ordinal: Array,
  50293. number: Array,
  50294. time: gz
  50295. }, IT;
  50296. function sv(t) {
  50297. return t > 65535 ? g4e : m4e;
  50298. }
  50299. function ld() {
  50300. return [1 / 0, -1 / 0];
  50301. }
  50302. function y4e(t) {
  50303. var e = t.constructor;
  50304. return e === Array ? t.slice() : new e(t);
  50305. }
  50306. function mz(t, e, n, r, i) {
  50307. var a = XJ[n || "float"];
  50308. if (i) {
  50309. var o = t[e], s = o && o.length;
  50310. if (s !== r) {
  50311. for (var l = new a(r), u = 0; u < s; u++)
  50312. l[u] = o[u];
  50313. t[e] = l;
  50314. }
  50315. } else
  50316. t[e] = new a(r);
  50317. }
  50318. var GA = (
  50319. /** @class */
  50320. function() {
  50321. function t() {
  50322. this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = Pe();
  50323. }
  50324. return t.prototype.initData = function(e, n, r) {
  50325. 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;
  50326. var i = e.getSource(), a = this.defaultDimValueGetter = IT[i.sourceFormat];
  50327. this._dimValueGetter = r || a, this._rawExtent = [];
  50328. var o = zJ(i);
  50329. this._dimensions = ce(n, function(s) {
  50330. return process.env.NODE_ENV !== "production" && o && ke(s.property != null), {
  50331. // Only pick these two props. Not leak other properties like orderMeta.
  50332. type: s.type,
  50333. property: s.property
  50334. };
  50335. }), this._initDataFromProvider(0, e.count());
  50336. }, t.prototype.getProvider = function() {
  50337. return this._provider;
  50338. }, t.prototype.getSource = function() {
  50339. return this._provider.getSource();
  50340. }, t.prototype.ensureCalculationDimension = function(e, n) {
  50341. var r = this._calcDimNameToIdx, i = this._dimensions, a = r.get(e);
  50342. if (a != null) {
  50343. if (i[a].type === n)
  50344. return a;
  50345. } else
  50346. a = i.length;
  50347. return i[a] = {
  50348. type: n
  50349. }, r.set(e, a), this._chunks[a] = new XJ[n || "float"](this._rawCount), this._rawExtent[a] = ld(), a;
  50350. }, t.prototype.collectOrdinalMeta = function(e, n) {
  50351. var r = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = r.length;
  50352. o === 0 && (a[e] = ld());
  50353. for (var l = a[e], u = o; u < s; u++) {
  50354. var c = r[u] = n.parseAndCollect(r[u]);
  50355. isNaN(c) || (l[0] = Math.min(c, l[0]), l[1] = Math.max(c, l[1]));
  50356. }
  50357. i.ordinalMeta = n, i.ordinalOffset = s, i.type = "ordinal";
  50358. }, t.prototype.getOrdinalMeta = function(e) {
  50359. var n = this._dimensions[e], r = n.ordinalMeta;
  50360. return r;
  50361. }, t.prototype.getDimensionProperty = function(e) {
  50362. var n = this._dimensions[e];
  50363. return n && n.property;
  50364. }, t.prototype.appendData = function(e) {
  50365. process.env.NODE_ENV !== "production" && ke(!this._indices, "appendData can only be called on raw data.");
  50366. var n = this._provider, r = this.count();
  50367. n.appendData(e);
  50368. var i = n.count();
  50369. return n.persistent || (i += r), r < i && this._initDataFromProvider(r, i, !0), [r, i];
  50370. }, t.prototype.appendValues = function(e, n) {
  50371. 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++) {
  50372. var c = i[u];
  50373. mz(r, u, c.type, l, !0);
  50374. }
  50375. for (var f = [], d = s; d < l; d++)
  50376. for (var h = d - s, p = 0; p < a; p++) {
  50377. var c = i[p], v = IT.arrayRows.call(this, e[h] || f, c.property, h, p);
  50378. r[p][d] = v;
  50379. var g = o[p];
  50380. v < g[0] && (g[0] = v), v > g[1] && (g[1] = v);
  50381. }
  50382. return this._rawCount = this._count = l, {
  50383. start: s,
  50384. end: l
  50385. };
  50386. }, t.prototype._initDataFromProvider = function(e, n, r) {
  50387. for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = ce(o, function(y) {
  50388. return y.property;
  50389. }), c = 0; c < s; c++) {
  50390. var f = o[c];
  50391. l[c] || (l[c] = ld()), mz(a, c, f.type, n, r);
  50392. }
  50393. if (i.fillStorage)
  50394. i.fillStorage(e, n, a, l);
  50395. else
  50396. for (var d = [], h = e; h < n; h++) {
  50397. d = i.getItem(h, d);
  50398. for (var p = 0; p < s; p++) {
  50399. var v = a[p], g = this._dimValueGetter(d, u[p], h, p);
  50400. v[h] = g;
  50401. var m = l[p];
  50402. g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
  50403. }
  50404. }
  50405. !i.persistent && i.clean && i.clean(), this._rawCount = this._count = n, this._extent = [];
  50406. }, t.prototype.count = function() {
  50407. return this._count;
  50408. }, t.prototype.get = function(e, n) {
  50409. if (!(n >= 0 && n < this._count))
  50410. return NaN;
  50411. var r = this._chunks[e];
  50412. return r ? r[this.getRawIndex(n)] : NaN;
  50413. }, t.prototype.getValues = function(e, n) {
  50414. var r = [], i = [];
  50415. if (n == null) {
  50416. n = e, e = [];
  50417. for (var a = 0; a < this._dimensions.length; a++)
  50418. i.push(a);
  50419. } else
  50420. i = e;
  50421. for (var a = 0, o = i.length; a < o; a++)
  50422. r.push(this.get(i[a], n));
  50423. return r;
  50424. }, t.prototype.getByRawIndex = function(e, n) {
  50425. if (!(n >= 0 && n < this._rawCount))
  50426. return NaN;
  50427. var r = this._chunks[e];
  50428. return r ? r[n] : NaN;
  50429. }, t.prototype.getSum = function(e) {
  50430. var n = this._chunks[e], r = 0;
  50431. if (n)
  50432. for (var i = 0, a = this.count(); i < a; i++) {
  50433. var o = this.get(e, i);
  50434. isNaN(o) || (r += o);
  50435. }
  50436. return r;
  50437. }, t.prototype.getMedian = function(e) {
  50438. var n = [];
  50439. this.each([e], function(a) {
  50440. isNaN(a) || n.push(a);
  50441. });
  50442. var r = n.sort(function(a, o) {
  50443. return a - o;
  50444. }), i = this.count();
  50445. return i === 0 ? 0 : i % 2 === 1 ? r[(i - 1) / 2] : (r[i / 2] + r[i / 2 - 1]) / 2;
  50446. }, t.prototype.indexOfRawIndex = function(e) {
  50447. if (e >= this._rawCount || e < 0)
  50448. return -1;
  50449. if (!this._indices)
  50450. return e;
  50451. var n = this._indices, r = n[e];
  50452. if (r != null && r < this._count && r === e)
  50453. return e;
  50454. for (var i = 0, a = this._count - 1; i <= a; ) {
  50455. var o = (i + a) / 2 | 0;
  50456. if (n[o] < e)
  50457. i = o + 1;
  50458. else if (n[o] > e)
  50459. a = o - 1;
  50460. else
  50461. return o;
  50462. }
  50463. return -1;
  50464. }, t.prototype.indicesOfNearest = function(e, n, r) {
  50465. var i = this._chunks, a = i[e], o = [];
  50466. if (!a)
  50467. return o;
  50468. r == null && (r = 1 / 0);
  50469. for (var s = 1 / 0, l = -1, u = 0, c = 0, f = this.count(); c < f; c++) {
  50470. var d = this.getRawIndex(c), h = n - a[d], p = Math.abs(h);
  50471. p <= r && ((p < s || p === s && h >= 0 && l < 0) && (s = p, l = h, u = 0), h === l && (o[u++] = c));
  50472. }
  50473. return o.length = u, o;
  50474. }, t.prototype.getIndices = function() {
  50475. var e, n = this._indices;
  50476. if (n) {
  50477. var r = n.constructor, i = this._count;
  50478. if (r === Array) {
  50479. e = new r(i);
  50480. for (var a = 0; a < i; a++)
  50481. e[a] = n[a];
  50482. } else
  50483. e = new r(n.buffer, 0, i);
  50484. } else {
  50485. var r = sv(this._rawCount);
  50486. e = new r(this.count());
  50487. for (var a = 0; a < e.length; a++)
  50488. e[a] = a;
  50489. }
  50490. return e;
  50491. }, t.prototype.filter = function(e, n) {
  50492. if (!this._count)
  50493. return this;
  50494. for (var r = this.clone(), i = r.count(), a = sv(r._rawCount), o = new a(i), s = [], l = e.length, u = 0, c = e[0], f = r._chunks, d = 0; d < i; d++) {
  50495. var h = void 0, p = r.getRawIndex(d);
  50496. if (l === 0)
  50497. h = n(d);
  50498. else if (l === 1) {
  50499. var v = f[c][p];
  50500. h = n(v, d);
  50501. } else {
  50502. for (var g = 0; g < l; g++)
  50503. s[g] = f[e[g]][p];
  50504. s[g] = d, h = n.apply(null, s);
  50505. }
  50506. h && (o[u++] = p);
  50507. }
  50508. return u < i && (r._indices = o), r._count = u, r._extent = [], r._updateGetRawIdx(), r;
  50509. }, t.prototype.selectRange = function(e) {
  50510. var n = this.clone(), r = n._count;
  50511. if (!r)
  50512. return this;
  50513. var i = st(e), a = i.length;
  50514. if (!a)
  50515. return this;
  50516. var o = n.count(), s = sv(n._rawCount), l = new s(o), u = 0, c = i[0], f = e[c][0], d = e[c][1], h = n._chunks, p = !1;
  50517. if (!n._indices) {
  50518. var v = 0;
  50519. if (a === 1) {
  50520. for (var g = h[i[0]], m = 0; m < r; m++) {
  50521. var y = g[m];
  50522. (y >= f && y <= d || isNaN(y)) && (l[u++] = v), v++;
  50523. }
  50524. p = !0;
  50525. } else if (a === 2) {
  50526. for (var g = h[i[0]], b = h[i[1]], _ = e[i[1]][0], O = e[i[1]][1], m = 0; m < r; m++) {
  50527. var y = g[m], S = b[m];
  50528. (y >= f && y <= d || isNaN(y)) && (S >= _ && S <= O || isNaN(S)) && (l[u++] = v), v++;
  50529. }
  50530. p = !0;
  50531. }
  50532. }
  50533. if (!p)
  50534. if (a === 1)
  50535. for (var m = 0; m < o; m++) {
  50536. var x = n.getRawIndex(m), y = h[i[0]][x];
  50537. (y >= f && y <= d || isNaN(y)) && (l[u++] = x);
  50538. }
  50539. else
  50540. for (var m = 0; m < o; m++) {
  50541. for (var C = !0, x = n.getRawIndex(m), T = 0; T < a; T++) {
  50542. var w = i[T], y = h[w][x];
  50543. (y < e[w][0] || y > e[w][1]) && (C = !1);
  50544. }
  50545. C && (l[u++] = n.getRawIndex(m));
  50546. }
  50547. return u < o && (n._indices = l), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
  50548. }, t.prototype.map = function(e, n) {
  50549. var r = this.clone(e);
  50550. return this._updateDims(r, e, n), r;
  50551. }, t.prototype.modify = function(e, n) {
  50552. this._updateDims(this, e, n);
  50553. }, t.prototype._updateDims = function(e, n, r) {
  50554. for (var i = e._chunks, a = [], o = n.length, s = e.count(), l = [], u = e._rawExtent, c = 0; c < n.length; c++)
  50555. u[n[c]] = ld();
  50556. for (var f = 0; f < s; f++) {
  50557. for (var d = e.getRawIndex(f), h = 0; h < o; h++)
  50558. l[h] = i[n[h]][d];
  50559. l[o] = f;
  50560. var p = r && r.apply(null, l);
  50561. if (p != null) {
  50562. typeof p != "object" && (a[0] = p, p = a);
  50563. for (var c = 0; c < p.length; c++) {
  50564. var v = n[c], g = p[c], m = u[v], y = i[v];
  50565. y && (y[d] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
  50566. }
  50567. }
  50568. }
  50569. }, t.prototype.lttbDownSample = function(e, n) {
  50570. 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 (sv(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
  50571. h[s++] = u;
  50572. for (var p = 1; p < o - 1; p += l) {
  50573. 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++) {
  50574. var _ = this.getRawIndex(b), O = a[_];
  50575. isNaN(O) || (y += O);
  50576. }
  50577. y /= g - v;
  50578. var S = p, x = Math.min(p + l, o), C = p - 1, T = a[u];
  50579. c = -1, d = S;
  50580. for (var w = -1, P = 0, b = S; b < x; b++) {
  50581. var _ = this.getRawIndex(b), O = a[_];
  50582. if (isNaN(O)) {
  50583. P++, w < 0 && (w = _);
  50584. continue;
  50585. }
  50586. f = Math.abs((C - m) * (O - T) - (C - b) * (y - T)), f > c && (c = f, d = _);
  50587. }
  50588. P > 0 && P < x - S && (h[s++] = Math.min(w, d), d = Math.max(w, d)), h[s++] = d, u = d;
  50589. }
  50590. return h[s++] = this.getRawIndex(o - 1), r._count = s, r._indices = h, r.getRawIndex = this._getRawIdx, r;
  50591. }, t.prototype.downSample = function(e, n, r, i) {
  50592. 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] = ld(), d = new (sv(this._rawCount))(Math.ceil(c / l)), h = 0, p = 0; p < c; p += l) {
  50593. l > c - p && (l = c - p, s.length = l);
  50594. for (var v = 0; v < l; v++) {
  50595. var g = this.getRawIndex(p + v);
  50596. s[v] = u[g];
  50597. }
  50598. var m = r(s), y = this.getRawIndex(Math.min(p + i(s, m) || 0, c - 1));
  50599. u[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), d[h++] = y;
  50600. }
  50601. return a._count = h, a._indices = d, a._updateGetRawIdx(), a;
  50602. }, t.prototype.each = function(e, n) {
  50603. if (this._count)
  50604. for (var r = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) {
  50605. var s = this.getRawIndex(a);
  50606. switch (r) {
  50607. case 0:
  50608. n(a);
  50609. break;
  50610. case 1:
  50611. n(i[e[0]][s], a);
  50612. break;
  50613. case 2:
  50614. n(i[e[0]][s], i[e[1]][s], a);
  50615. break;
  50616. default:
  50617. for (var l = 0, u = []; l < r; l++)
  50618. u[l] = i[e[l]][s];
  50619. u[l] = a, n.apply(null, u);
  50620. }
  50621. }
  50622. }, t.prototype.getDataExtent = function(e) {
  50623. var n = this._chunks[e], r = ld();
  50624. if (!n)
  50625. return r;
  50626. var i = this.count(), a = !this._indices, o;
  50627. if (a)
  50628. return this._rawExtent[e].slice();
  50629. if (o = this._extent[e], o)
  50630. return o.slice();
  50631. o = r;
  50632. for (var s = o[0], l = o[1], u = 0; u < i; u++) {
  50633. var c = this.getRawIndex(u), f = n[c];
  50634. f < s && (s = f), f > l && (l = f);
  50635. }
  50636. return o = [s, l], this._extent[e] = o, o;
  50637. }, t.prototype.getRawDataItem = function(e) {
  50638. var n = this.getRawIndex(e);
  50639. if (this._provider.persistent)
  50640. return this._provider.getItem(n);
  50641. for (var r = [], i = this._chunks, a = 0; a < i.length; a++)
  50642. r.push(i[a][n]);
  50643. return r;
  50644. }, t.prototype.clone = function(e, n) {
  50645. var r = new t(), i = this._chunks, a = e && Aa(e, function(s, l) {
  50646. return s[l] = !0, s;
  50647. }, {});
  50648. if (a)
  50649. for (var o = 0; o < i.length; o++)
  50650. r._chunks[o] = a[o] ? y4e(i[o]) : i[o];
  50651. else
  50652. r._chunks = i;
  50653. return this._copyCommonProps(r), n || (r._indices = this._cloneIndices()), r._updateGetRawIdx(), r;
  50654. }, t.prototype._copyCommonProps = function(e) {
  50655. 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);
  50656. }, t.prototype._cloneIndices = function() {
  50657. if (this._indices) {
  50658. var e = this._indices.constructor, n = void 0;
  50659. if (e === Array) {
  50660. var r = this._indices.length;
  50661. n = new e(r);
  50662. for (var i = 0; i < r; i++)
  50663. n[i] = this._indices[i];
  50664. } else
  50665. n = new e(this._indices);
  50666. return n;
  50667. }
  50668. return null;
  50669. }, t.prototype._getRawIdxIdentity = function(e) {
  50670. return e;
  50671. }, t.prototype._getRawIdx = function(e) {
  50672. return e < this._count && e >= 0 ? this._indices[e] : -1;
  50673. }, t.prototype._updateGetRawIdx = function() {
  50674. this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
  50675. }, t.internalField = function() {
  50676. function e(n, r, i, a) {
  50677. return Kl(n[a], this._dimensions[a]);
  50678. }
  50679. IT = {
  50680. arrayRows: e,
  50681. objectRows: function(n, r, i, a) {
  50682. return Kl(n[r], this._dimensions[a]);
  50683. },
  50684. keyedColumns: e,
  50685. original: function(n, r, i, a) {
  50686. var o = n && (n.value == null ? n : n.value);
  50687. return Kl(o instanceof Array ? o[a] : o, this._dimensions[a]);
  50688. },
  50689. typedArray: function(n, r, i, a) {
  50690. return n[a];
  50691. }
  50692. };
  50693. }(), t;
  50694. }()
  50695. ), YJ = (
  50696. /** @class */
  50697. function() {
  50698. function t(e) {
  50699. this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
  50700. }
  50701. return t.prototype.dirty = function() {
  50702. this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
  50703. }, t.prototype._setLocalSource = function(e, n) {
  50704. this._sourceList = e, this._upstreamSignList = n, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
  50705. }, t.prototype._getVersionSign = function() {
  50706. return this._sourceHost.uid + "_" + this._versionSignBase;
  50707. }, t.prototype.prepareSource = function() {
  50708. this._isDirty() && (this._createSource(), this._dirty = !1);
  50709. }, t.prototype._createSource = function() {
  50710. this._setLocalSource([], []);
  50711. var e = this._sourceHost, n = this._getUpstreamSourceManagers(), r = !!n.length, i, a;
  50712. if (lv(e)) {
  50713. var o = e, s = void 0, l = void 0, u = void 0;
  50714. if (r) {
  50715. var c = n[0];
  50716. c.prepareSource(), u = c.getSource(), s = u.data, l = u.sourceFormat, a = [c._getVersionSign()];
  50717. } else
  50718. s = o.get("data", !0), l = Nr(s) ? Ds : La, a = [];
  50719. 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;
  50720. i = g ? [HA(s, {
  50721. seriesLayoutBy: h,
  50722. sourceHeader: p,
  50723. dimensions: v
  50724. }, l)] : [];
  50725. } else {
  50726. var m = e;
  50727. if (r) {
  50728. var y = this._applyTransform(n);
  50729. i = y.sourceList, a = y.upstreamSignList;
  50730. } else {
  50731. var b = m.get("source", !0);
  50732. i = [HA(b, this._getSourceMetaRawOption(), null)], a = [];
  50733. }
  50734. }
  50735. process.env.NODE_ENV !== "production" && ke(i && a), this._setLocalSource(i, a);
  50736. }, t.prototype._applyTransform = function(e) {
  50737. var n = this._sourceHost, r = n.get("transform", !0), i = n.get("fromTransformResult", !0);
  50738. if (process.env.NODE_ENV !== "production" && ke(i != null || r != null), i != null) {
  50739. var a = "";
  50740. e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), bz(a));
  50741. }
  50742. var o, s = [], l = [];
  50743. return k(e, function(u) {
  50744. u.prepareSource();
  50745. var c = u.getSource(i || 0), f = "";
  50746. i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), bz(f)), s.push(c), l.push(u._getVersionSign());
  50747. }), r ? o = p4e(r, s, {
  50748. datasetIndex: n.componentIndex
  50749. }) : i != null && (o = [XLe(s[0])]), {
  50750. sourceList: o,
  50751. upstreamSignList: l
  50752. };
  50753. }, t.prototype._isDirty = function() {
  50754. if (this._dirty)
  50755. return !0;
  50756. for (var e = this._getUpstreamSourceManagers(), n = 0; n < e.length; n++) {
  50757. var r = e[n];
  50758. if (
  50759. // Consider the case that there is ancestor diry, call it recursively.
  50760. // The performance is probably not an issue because usually the chain is not long.
  50761. r._isDirty() || this._upstreamSignList[n] !== r._getVersionSign()
  50762. )
  50763. return !0;
  50764. }
  50765. }, t.prototype.getSource = function(e) {
  50766. e = e || 0;
  50767. var n = this._sourceList[e];
  50768. if (!n) {
  50769. var r = this._getUpstreamSourceManagers();
  50770. return r[0] && r[0].getSource(e);
  50771. }
  50772. return n;
  50773. }, t.prototype.getSharedDataStore = function(e) {
  50774. process.env.NODE_ENV !== "production" && ke(lv(this._sourceHost), "Can only call getDataStore on series source manager.");
  50775. var n = e.makeStoreSchema();
  50776. return this._innerGetDataStore(n.dimensions, e.source, n.hash);
  50777. }, t.prototype._innerGetDataStore = function(e, n, r) {
  50778. var i = 0, a = this._storeList, o = a[i];
  50779. o || (o = a[i] = {});
  50780. var s = o[r];
  50781. if (!s) {
  50782. var l = this._getUpstreamSourceManagers()[0];
  50783. lv(this._sourceHost) && l ? s = l._innerGetDataStore(e, n, r) : (s = new GA(), s.initData(new VJ(n, e.length), e)), o[r] = s;
  50784. }
  50785. return s;
  50786. }, t.prototype._getUpstreamSourceManagers = function() {
  50787. var e = this._sourceHost;
  50788. if (lv(e)) {
  50789. var n = rk(e);
  50790. return n ? [n.getSourceManager()] : [];
  50791. } else
  50792. return ce(SLe(e), function(r) {
  50793. return r.getSourceManager();
  50794. });
  50795. }, t.prototype._getSourceMetaRawOption = function() {
  50796. var e = this._sourceHost, n, r, i;
  50797. if (lv(e))
  50798. n = e.get("seriesLayoutBy", !0), r = e.get("sourceHeader", !0), i = e.get("dimensions", !0);
  50799. else if (!this._getUpstreamSourceManagers().length) {
  50800. var a = e;
  50801. n = a.get("seriesLayoutBy", !0), r = a.get("sourceHeader", !0), i = a.get("dimensions", !0);
  50802. }
  50803. return {
  50804. seriesLayoutBy: n,
  50805. sourceHeader: r,
  50806. dimensions: i
  50807. };
  50808. }, t;
  50809. }()
  50810. );
  50811. function yz(t) {
  50812. var e = t.option.transform;
  50813. e && vm(t.option.transform);
  50814. }
  50815. function lv(t) {
  50816. return t.mainType === "series";
  50817. }
  50818. function bz(t) {
  50819. throw new Error(t);
  50820. }
  50821. var qJ = "line-height:1";
  50822. function KJ(t, e) {
  50823. 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";
  50824. return e === "html" ? {
  50825. // eslint-disable-next-line max-len
  50826. nameStyle: "font-size:" + Gr(r + "") + "px;color:" + Gr(n) + ";font-weight:" + Gr(i + ""),
  50827. // eslint-disable-next-line max-len
  50828. valueStyle: "font-size:" + Gr(o + "") + "px;color:" + Gr(a) + ";font-weight:" + Gr(s + "")
  50829. } : {
  50830. nameStyle: {
  50831. fontSize: r,
  50832. fill: n,
  50833. fontWeight: i
  50834. },
  50835. valueStyle: {
  50836. fontSize: o,
  50837. fill: a,
  50838. fontWeight: s
  50839. }
  50840. };
  50841. }
  50842. var b4e = [0, 10, 20, 30], _4e = ["", `
  50843. `, `
  50844. `, `
  50845. `];
  50846. function tr(t, e) {
  50847. return e.type = t, e;
  50848. }
  50849. function jA(t) {
  50850. return t.type === "section";
  50851. }
  50852. function JJ(t) {
  50853. return jA(t) ? O4e : S4e;
  50854. }
  50855. function eee(t) {
  50856. if (jA(t)) {
  50857. var e = 0, n = t.blocks.length, r = n > 1 || n > 0 && !t.noHeader;
  50858. return k(t.blocks, function(i) {
  50859. var a = eee(i);
  50860. a >= e && (e = a + +(r && // 0 always can not be readable gap level.
  50861. (!a || jA(i) && !i.noHeader)));
  50862. }), e;
  50863. }
  50864. return 0;
  50865. }
  50866. function O4e(t, e, n, r) {
  50867. var i = e.noHeader, a = x4e(eee(e)), o = [], s = e.blocks || [];
  50868. ke(!s || ue(s)), s = s || [];
  50869. var l = t.orderMode;
  50870. if (e.sortBlocks && l) {
  50871. s = s.slice();
  50872. var u = {
  50873. valueAsc: "asc",
  50874. valueDesc: "desc"
  50875. };
  50876. if (Ce(u, l)) {
  50877. var c = new jJ(u[l], null);
  50878. s.sort(function(p, v) {
  50879. return c.evaluate(p.sortParam, v.sortParam);
  50880. });
  50881. } else l === "seriesDesc" && s.reverse();
  50882. }
  50883. k(s, function(p, v) {
  50884. var g = e.valueFormatter, m = JJ(p)(
  50885. // Inherit valueFormatter
  50886. g ? le(le({}, t), {
  50887. valueFormatter: g
  50888. }) : t,
  50889. p,
  50890. v > 0 ? a.html : 0,
  50891. r
  50892. );
  50893. m != null && o.push(m);
  50894. });
  50895. var f = t.renderMode === "richText" ? o.join(a.richText) : ZA(o.join(""), i ? n : a.html);
  50896. if (i)
  50897. return f;
  50898. var d = VA(e.header, "ordinal", t.useUTC), h = KJ(r, t.renderMode).nameStyle;
  50899. return t.renderMode === "richText" ? tee(t, d, h) + a.richText + f : ZA('<div style="' + h + ";" + qJ + ';">' + Gr(d) + "</div>" + f, n);
  50900. }
  50901. function S4e(t, e, n, r) {
  50902. 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(_) {
  50903. return _ = ue(_) ? _ : [_], ce(_, function(O, S) {
  50904. return VA(O, ue(h) ? h[S] : h, u);
  50905. });
  50906. };
  50907. if (!(a && o)) {
  50908. var f = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), d = a ? "" : VA(l, "ordinal", u), h = e.valueType, p = o ? [] : c(e.value, e.dataIndex), v = !s || !a, g = !s && a, m = KJ(r, i), y = m.nameStyle, b = m.valueStyle;
  50909. return i === "richText" ? (s ? "" : f) + (a ? "" : tee(t, d, y)) + (o ? "" : T4e(t, p, v, g, b)) : ZA((s ? "" : f) + (a ? "" : w4e(d, !s, y)) + (o ? "" : C4e(p, v, g, b)), n);
  50910. }
  50911. }
  50912. function _z(t, e, n, r, i, a) {
  50913. if (t) {
  50914. var o = JJ(t), s = {
  50915. useUTC: i,
  50916. renderMode: n,
  50917. orderMode: r,
  50918. markupStyleCreator: e,
  50919. valueFormatter: t.valueFormatter
  50920. };
  50921. return o(s, t, 0, a);
  50922. }
  50923. }
  50924. function x4e(t) {
  50925. return {
  50926. html: b4e[t],
  50927. richText: _4e[t]
  50928. };
  50929. }
  50930. function ZA(t, e) {
  50931. var n = '<div style="clear:both"></div>', r = "margin: " + e + "px 0 0";
  50932. return '<div style="' + r + ";" + qJ + ';">' + t + n + "</div>";
  50933. }
  50934. function w4e(t, e, n) {
  50935. var r = e ? "margin-left:2px" : "";
  50936. return '<span style="' + n + ";" + r + '">' + Gr(t) + "</span>";
  50937. }
  50938. function C4e(t, e, n, r) {
  50939. var i = n ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : "";
  50940. return t = ue(t) ? t : [t], '<span style="' + a + ";" + r + '">' + ce(t, function(o) {
  50941. return Gr(o);
  50942. }).join("&nbsp;&nbsp;") + "</span>";
  50943. }
  50944. function tee(t, e, n) {
  50945. return t.markupStyleCreator.wrapRichTextStyle(e, n);
  50946. }
  50947. function T4e(t, e, n, r, i) {
  50948. var a = [i], o = r ? 10 : 20;
  50949. return n && a.push({
  50950. padding: [0, 0, 0, o],
  50951. align: "right"
  50952. }), t.markupStyleCreator.wrapRichTextStyle(ue(e) ? e.join(" ") : e, a);
  50953. }
  50954. function nee(t, e) {
  50955. var n = t.getData().getItemVisual(e, "style"), r = n[t.visualDrawType];
  50956. return _f(r);
  50957. }
  50958. function ree(t, e) {
  50959. var n = t.get("padding");
  50960. return n ?? (e === "richText" ? [8, 10] : 10);
  50961. }
  50962. var DT = (
  50963. /** @class */
  50964. function() {
  50965. function t() {
  50966. this.richTextStyles = {}, this._nextStyleNameId = uK();
  50967. }
  50968. return t.prototype._generateStyleName = function() {
  50969. return "__EC_aUTo_" + this._nextStyleNameId++;
  50970. }, t.prototype.makeTooltipMarker = function(e, n, r) {
  50971. var i = r === "richText" ? this._generateStyleName() : null, a = CJ({
  50972. color: n,
  50973. type: e,
  50974. renderMode: r,
  50975. markerId: i
  50976. });
  50977. return Oe(a) ? a : (process.env.NODE_ENV !== "production" && ke(i), this.richTextStyles[i] = a.style, a.content);
  50978. }, t.prototype.wrapRichTextStyle = function(e, n) {
  50979. var r = {};
  50980. ue(n) ? k(n, function(a) {
  50981. return le(r, a);
  50982. }) : le(r, n);
  50983. var i = this._generateStyleName();
  50984. return this.richTextStyles[i] = r, "{" + i + "|" + e + "}";
  50985. }, t;
  50986. }()
  50987. );
  50988. function iee(t) {
  50989. 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 = nee(e, n), c, f, d, h;
  50990. if (o > 1 || l && !o) {
  50991. var p = P4e(s, e, n, a, u);
  50992. c = p.inlineValues, f = p.inlineValueTypes, d = p.blocks, h = p.inlineValues[0];
  50993. } else if (o) {
  50994. var v = i.getDimensionInfo(a[0]);
  50995. h = c = Vh(i, n, a[0]), f = v.type;
  50996. } else
  50997. h = c = l ? s[0] : s;
  50998. var g = AR(e), m = g && e.name || "", y = i.getName(n), b = r ? m : y;
  50999. return tr("section", {
  51000. header: m,
  51001. // When series name is not specified, do not show a header line with only '-'.
  51002. // This case always happens in tooltip.trigger: 'item'.
  51003. noHeader: r || !g,
  51004. sortParam: h,
  51005. blocks: [tr("nameValue", {
  51006. markerType: "item",
  51007. markerColor: u,
  51008. // Do not mix display seriesName and itemName in one tooltip,
  51009. // which might confuses users.
  51010. name: b,
  51011. // name dimension might be auto assigned, where the name might
  51012. // be not readable. So we check trim here.
  51013. noName: !ma(b),
  51014. value: c,
  51015. valueType: f,
  51016. dataIndex: n
  51017. })].concat(d || [])
  51018. });
  51019. }
  51020. function P4e(t, e, n, r, i) {
  51021. var a = e.getData(), o = Aa(t, function(f, d, h) {
  51022. var p = a.getDimensionInfo(h);
  51023. return f = f || p && p.tooltip !== !1 && p.displayName != null;
  51024. }, !1), s = [], l = [], u = [];
  51025. r.length ? k(r, function(f) {
  51026. c(Vh(a, n, f), f);
  51027. }) : k(t, c);
  51028. function c(f, d) {
  51029. var h = a.getDimensionInfo(d);
  51030. !h || h.otherDims.tooltip === !1 || (o ? u.push(tr("nameValue", {
  51031. markerType: "subItem",
  51032. markerColor: i,
  51033. name: h.displayName,
  51034. value: f,
  51035. valueType: h.type
  51036. })) : (s.push(f), l.push(h.type)));
  51037. }
  51038. return {
  51039. inlineValues: s,
  51040. inlineValueTypes: l,
  51041. blocks: u
  51042. };
  51043. }
  51044. var pl = bt();
  51045. function ab(t, e) {
  51046. return t.getName(e) || t.getId(e);
  51047. }
  51048. var G_ = "__universalTransitionEnabled", Ht = (
  51049. /** @class */
  51050. function(t) {
  51051. q(e, t);
  51052. function e() {
  51053. var n = t !== null && t.apply(this, arguments) || this;
  51054. return n._selectedDataIndicesMap = {}, n;
  51055. }
  51056. return e.prototype.init = function(n, r, i) {
  51057. this.seriesIndex = this.componentIndex, this.dataTask = Dg({
  51058. count: A4e,
  51059. reset: E4e
  51060. }), this.dataTask.context = {
  51061. model: this
  51062. }, this.mergeDefaultAndTheme(n, i);
  51063. var a = pl(this).sourceManager = new YJ(this);
  51064. a.prepareSource();
  51065. var o = this.getInitialData(n, i);
  51066. Sz(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && ke(o, "getInitialData returned invalid data."), pl(this).dataBeforeProcessed = o, Oz(this), this._initSelectedMapFromData(o);
  51067. }, e.prototype.mergeDefaultAndTheme = function(n, r) {
  51068. var i = Tm(this), a = i ? bp(n) : {}, o = this.subType;
  51069. rt.hasClass(o) && (o += "Series"), qe(n, r.getTheme().get(this.subType)), qe(n, this.getDefaultOption()), gf(n, "label", ["show"]), this.fillDataTextStyle(n.data), i && cu(n, a, i);
  51070. }, e.prototype.mergeOption = function(n, r) {
  51071. n = qe(this.option, n, !0), this.fillDataTextStyle(n.data);
  51072. var i = Tm(this);
  51073. i && cu(this.option, n, i);
  51074. var a = pl(this).sourceManager;
  51075. a.dirty(), a.prepareSource();
  51076. var o = this.getInitialData(n, r);
  51077. Sz(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, pl(this).dataBeforeProcessed = o, Oz(this), this._initSelectedMapFromData(o);
  51078. }, e.prototype.fillDataTextStyle = function(n) {
  51079. if (n && !Nr(n))
  51080. for (var r = ["show"], i = 0; i < n.length; i++)
  51081. n[i] && n[i].label && gf(n[i], "label", r);
  51082. }, e.prototype.getInitialData = function(n, r) {
  51083. }, e.prototype.appendData = function(n) {
  51084. var r = this.getRawData();
  51085. r.appendData(n.data);
  51086. }, e.prototype.getData = function(n) {
  51087. var r = UA(this);
  51088. if (r) {
  51089. var i = r.context.data;
  51090. return n == null || !i.getLinkedData ? i : i.getLinkedData(n);
  51091. } else
  51092. return pl(this).data;
  51093. }, e.prototype.getAllData = function() {
  51094. var n = this.getData();
  51095. return n && n.getLinkedDataAll ? n.getLinkedDataAll() : [{
  51096. data: n
  51097. }];
  51098. }, e.prototype.setData = function(n) {
  51099. var r = UA(this);
  51100. if (r) {
  51101. var i = r.context;
  51102. i.outputData = n, r !== this.dataTask && (i.data = n);
  51103. }
  51104. pl(this).data = n;
  51105. }, e.prototype.getEncode = function() {
  51106. var n = this.get("encode", !0);
  51107. if (n)
  51108. return Pe(n);
  51109. }, e.prototype.getSourceManager = function() {
  51110. return pl(this).sourceManager;
  51111. }, e.prototype.getSource = function() {
  51112. return this.getSourceManager().getSource();
  51113. }, e.prototype.getRawData = function() {
  51114. return pl(this).dataBeforeProcessed;
  51115. }, e.prototype.getColorBy = function() {
  51116. var n = this.get("colorBy");
  51117. return n || "series";
  51118. }, e.prototype.isColorBySeries = function() {
  51119. return this.getColorBy() === "series";
  51120. }, e.prototype.getBaseAxis = function() {
  51121. var n = this.coordinateSystem;
  51122. return n && n.getBaseAxis && n.getBaseAxis();
  51123. }, e.prototype.formatTooltip = function(n, r, i) {
  51124. return iee({
  51125. series: this,
  51126. dataIndex: n,
  51127. multipleSeries: r
  51128. });
  51129. }, e.prototype.isAnimationEnabled = function() {
  51130. var n = this.ecModel;
  51131. if (vt.node && !(n && n.ssr))
  51132. return !1;
  51133. var r = this.getShallow("animation");
  51134. return r && this.getData().count() > this.getShallow("animationThreshold") && (r = !1), !!r;
  51135. }, e.prototype.restoreData = function() {
  51136. this.dataTask.dirty();
  51137. }, e.prototype.getColorFromPalette = function(n, r, i) {
  51138. var a = this.ecModel, o = ik.prototype.getColorFromPalette.call(this, n, r, i);
  51139. return o || (o = a.getColorFromPalette(n, r, i)), o;
  51140. }, e.prototype.coordDimToDataDim = function(n) {
  51141. return this.getRawData().mapDimensionsAll(n);
  51142. }, e.prototype.getProgressive = function() {
  51143. return this.get("progressive");
  51144. }, e.prototype.getProgressiveThreshold = function() {
  51145. return this.get("progressiveThreshold");
  51146. }, e.prototype.select = function(n, r) {
  51147. this._innerSelect(this.getData(r), n);
  51148. }, e.prototype.unselect = function(n, r) {
  51149. var i = this.option.selectedMap;
  51150. if (i) {
  51151. var a = this.option.selectedMode, o = this.getData(r);
  51152. if (a === "series" || i === "all") {
  51153. this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
  51154. return;
  51155. }
  51156. for (var s = 0; s < n.length; s++) {
  51157. var l = n[s], u = ab(o, l);
  51158. i[u] = !1, this._selectedDataIndicesMap[u] = -1;
  51159. }
  51160. }
  51161. }, e.prototype.toggleSelect = function(n, r) {
  51162. for (var i = [], a = 0; a < n.length; a++)
  51163. i[0] = n[a], this.isSelected(n[a], r) ? this.unselect(i, r) : this.select(i, r);
  51164. }, e.prototype.getSelectedDataIndices = function() {
  51165. if (this.option.selectedMap === "all")
  51166. return [].slice.call(this.getData().getIndices());
  51167. for (var n = this._selectedDataIndicesMap, r = st(n), i = [], a = 0; a < r.length; a++) {
  51168. var o = n[r[a]];
  51169. o >= 0 && i.push(o);
  51170. }
  51171. return i;
  51172. }, e.prototype.isSelected = function(n, r) {
  51173. var i = this.option.selectedMap;
  51174. if (!i)
  51175. return !1;
  51176. var a = this.getData(r);
  51177. return (i === "all" || i[ab(a, n)]) && !a.getItemModel(n).get(["select", "disabled"]);
  51178. }, e.prototype.isUniversalTransitionEnabled = function() {
  51179. if (this[G_])
  51180. return !0;
  51181. var n = this.option.universalTransition;
  51182. return n ? n === !0 ? !0 : n && n.enabled : !1;
  51183. }, e.prototype._innerSelect = function(n, r) {
  51184. var i, a, o = this.option, s = o.selectedMode, l = r.length;
  51185. if (!(!s || !l)) {
  51186. if (s === "series")
  51187. o.selectedMap = "all";
  51188. else if (s === "multiple") {
  51189. Ie(o.selectedMap) || (o.selectedMap = {});
  51190. for (var u = o.selectedMap, c = 0; c < l; c++) {
  51191. var f = r[c], d = ab(n, f);
  51192. u[d] = !0, this._selectedDataIndicesMap[d] = n.getRawIndex(f);
  51193. }
  51194. } else if (s === "single" || s === !0) {
  51195. var h = r[l - 1], d = ab(n, h);
  51196. o.selectedMap = (i = {}, i[d] = !0, i), this._selectedDataIndicesMap = (a = {}, a[d] = n.getRawIndex(h), a);
  51197. }
  51198. }
  51199. }, e.prototype._initSelectedMapFromData = function(n) {
  51200. if (!this.option.selectedMap) {
  51201. var r = [];
  51202. n.hasItemOption && n.each(function(i) {
  51203. var a = n.getRawDataItem(i);
  51204. a && a.selected && r.push(i);
  51205. }), r.length > 0 && this._innerSelect(n, r);
  51206. }
  51207. }, e.registerClass = function(n) {
  51208. return rt.registerClass(n);
  51209. }, e.protoInitialize = function() {
  51210. var n = e.prototype;
  51211. n.type = "series.__base__", n.seriesIndex = 0, n.ignoreStyleOnData = !1, n.hasSymbolVisual = !1, n.defaultSymbol = "circle", n.visualStyleAccessPath = "itemStyle", n.visualDrawType = "fill";
  51212. }(), e;
  51213. }(rt)
  51214. );
  51215. xn(Ht, sw);
  51216. xn(Ht, ik);
  51217. yK(Ht, rt);
  51218. function Oz(t) {
  51219. var e = t.name;
  51220. AR(t) || (t.name = $4e(t) || e);
  51221. }
  51222. function $4e(t) {
  51223. var e = t.getRawData(), n = e.mapDimensionsAll("seriesName"), r = [];
  51224. return k(n, function(i) {
  51225. var a = e.getDimensionInfo(i);
  51226. a.displayName && r.push(a.displayName);
  51227. }), r.join(" ");
  51228. }
  51229. function A4e(t) {
  51230. return t.model.getRawData().count();
  51231. }
  51232. function E4e(t) {
  51233. var e = t.model;
  51234. return e.setData(e.getRawData().cloneShallow()), M4e;
  51235. }
  51236. function M4e(t, e) {
  51237. e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
  51238. }
  51239. function Sz(t, e) {
  51240. k(gm(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), function(n) {
  51241. t.wrapMethod(n, Ue(I4e, e));
  51242. });
  51243. }
  51244. function I4e(t, e) {
  51245. var n = UA(t);
  51246. return n && n.setOutputEnd((e || this).count()), e;
  51247. }
  51248. function UA(t) {
  51249. var e = (t.ecModel || {}).scheduler, n = e && e.getPipeline(t.uid);
  51250. if (n) {
  51251. var r = n.currentTask;
  51252. if (r) {
  51253. var i = r.agentStubMap;
  51254. i && (r = i.get(t.uid));
  51255. }
  51256. return r;
  51257. }
  51258. }
  51259. var Xt = (
  51260. /** @class */
  51261. function() {
  51262. function t() {
  51263. this.group = new Ve(), this.uid = yp("viewComponent");
  51264. }
  51265. return t.prototype.init = function(e, n) {
  51266. }, t.prototype.render = function(e, n, r, i) {
  51267. }, t.prototype.dispose = function(e, n) {
  51268. }, t.prototype.updateView = function(e, n, r, i) {
  51269. }, t.prototype.updateLayout = function(e, n, r, i) {
  51270. }, t.prototype.updateVisual = function(e, n, r, i) {
  51271. }, t.prototype.toggleBlurSeries = function(e, n, r) {
  51272. }, t.prototype.eachRendered = function(e) {
  51273. var n = this.group;
  51274. n && n.traverse(e);
  51275. }, t;
  51276. }()
  51277. );
  51278. MR(Xt);
  51279. Qx(Xt);
  51280. function Op() {
  51281. var t = bt();
  51282. return function(e) {
  51283. 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);
  51284. return (i !== o || a !== s) && "reset";
  51285. };
  51286. }
  51287. var aee = bt(), D4e = Op(), zt = (
  51288. /** @class */
  51289. function() {
  51290. function t() {
  51291. this.group = new Ve(), this.uid = yp("viewChart"), this.renderTask = Dg({
  51292. plan: R4e,
  51293. reset: k4e
  51294. }), this.renderTask.context = {
  51295. view: this
  51296. };
  51297. }
  51298. return t.prototype.init = function(e, n) {
  51299. }, t.prototype.render = function(e, n, r, i) {
  51300. if (process.env.NODE_ENV !== "production")
  51301. throw new Error("render method must been implemented");
  51302. }, t.prototype.highlight = function(e, n, r, i) {
  51303. var a = e.getData(i && i.dataType);
  51304. if (!a) {
  51305. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
  51306. return;
  51307. }
  51308. wz(a, i, "emphasis");
  51309. }, t.prototype.downplay = function(e, n, r, i) {
  51310. var a = e.getData(i && i.dataType);
  51311. if (!a) {
  51312. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
  51313. return;
  51314. }
  51315. wz(a, i, "normal");
  51316. }, t.prototype.remove = function(e, n) {
  51317. this.group.removeAll();
  51318. }, t.prototype.dispose = function(e, n) {
  51319. }, t.prototype.updateView = function(e, n, r, i) {
  51320. this.render(e, n, r, i);
  51321. }, t.prototype.updateLayout = function(e, n, r, i) {
  51322. this.render(e, n, r, i);
  51323. }, t.prototype.updateVisual = function(e, n, r, i) {
  51324. this.render(e, n, r, i);
  51325. }, t.prototype.eachRendered = function(e) {
  51326. Tu(this.group, e);
  51327. }, t.markUpdateMethod = function(e, n) {
  51328. aee(e).updateMethod = n;
  51329. }, t.protoInitialize = function() {
  51330. var e = t.prototype;
  51331. e.type = "chart";
  51332. }(), t;
  51333. }()
  51334. );
  51335. function xz(t, e, n) {
  51336. t && lu(t) && (e === "emphasis" ? js : Zs)(t, n);
  51337. }
  51338. function wz(t, e, n) {
  51339. var r = mf(t, e), i = e && e.highlightKey != null ? dke(e.highlightKey) : null;
  51340. r != null ? k(Qt(r), function(a) {
  51341. xz(t.getItemGraphicEl(a), n, i);
  51342. }) : t.eachItemGraphicEl(function(a) {
  51343. xz(a, n, i);
  51344. });
  51345. }
  51346. MR(zt, ["dispose"]);
  51347. Qx(zt);
  51348. function R4e(t) {
  51349. return D4e(t.model);
  51350. }
  51351. function k4e(t) {
  51352. var e = t.model, n = t.ecModel, r = t.api, i = t.payload, a = e.pipelineContext.progressiveRender, o = t.view, s = i && aee(i).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  51353. return l !== "render" && o[l](e, n, r, i), L4e[l];
  51354. }
  51355. var L4e = {
  51356. incrementalPrepareRender: {
  51357. progress: function(t, e) {
  51358. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
  51359. }
  51360. },
  51361. render: {
  51362. // Put view.render in `progress` to support appendData. But in this case
  51363. // view.render should not be called in reset, otherwise it will be called
  51364. // twise. Use `forceFirstProgress` to make sure that view.render is called
  51365. // in any cases.
  51366. forceFirstProgress: !0,
  51367. progress: function(t, e) {
  51368. e.view.render(e.model, e.ecModel, e.api, e.payload);
  51369. }
  51370. }
  51371. }, pO = "\0__throttleOriginMethod", Cz = "\0__throttleRate", Tz = "\0__throttleType";
  51372. function uw(t, e, n) {
  51373. var r, i = 0, a = 0, o = null, s, l, u, c;
  51374. e = e || 0;
  51375. function f() {
  51376. a = (/* @__PURE__ */ new Date()).getTime(), o = null, t.apply(l, u || []);
  51377. }
  51378. var d = function() {
  51379. for (var h = [], p = 0; p < arguments.length; p++)
  51380. h[p] = arguments[p];
  51381. r = (/* @__PURE__ */ new Date()).getTime(), l = this, u = h;
  51382. var v = c || e, g = c || n;
  51383. c = null, s = r - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = r;
  51384. };
  51385. return d.clear = function() {
  51386. o && (clearTimeout(o), o = null);
  51387. }, d.debounceNextCall = function(h) {
  51388. c = h;
  51389. }, d;
  51390. }
  51391. function Sp(t, e, n, r) {
  51392. var i = t[e];
  51393. if (i) {
  51394. var a = i[pO] || i, o = i[Tz], s = i[Cz];
  51395. if (s !== n || o !== r) {
  51396. if (n == null || !r)
  51397. return t[e] = a;
  51398. i = t[e] = uw(a, n, r === "debounce"), i[pO] = a, i[Tz] = r, i[Cz] = n;
  51399. }
  51400. return i;
  51401. }
  51402. }
  51403. function $m(t, e) {
  51404. var n = t[e];
  51405. n && n[pO] && (n.clear && n.clear(), t[e] = n[pO]);
  51406. }
  51407. var Pz = bt(), $z = {
  51408. itemStyle: yf(vJ, !0),
  51409. lineStyle: yf(pJ, !0)
  51410. }, N4e = {
  51411. lineStyle: "stroke",
  51412. itemStyle: "fill"
  51413. };
  51414. function oee(t, e) {
  51415. var n = t.visualStyleMapper || $z[e];
  51416. return n || (console.warn("Unknown style type '" + e + "'."), $z.itemStyle);
  51417. }
  51418. function see(t, e) {
  51419. var n = t.visualDrawType || N4e[e];
  51420. return n || (console.warn("Unknown style type '" + e + "'."), "fill");
  51421. }
  51422. var B4e = {
  51423. createOnAllSeries: !0,
  51424. performRawSeries: !0,
  51425. reset: function(t, e) {
  51426. var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = t.getModel(r), a = oee(t, r), o = a(i), s = i.getShallow("decal");
  51427. s && (n.setVisual("decal", s), s.dirty = !0);
  51428. var l = see(t, r), u = o[l], c = Me(u) ? u : null, f = o.fill === "auto" || o.stroke === "auto";
  51429. if (!o[l] || c || f) {
  51430. var d = t.getColorFromPalette(
  51431. // TODO series count changed.
  51432. t.name,
  51433. null,
  51434. e.getSeriesCount()
  51435. );
  51436. 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;
  51437. }
  51438. if (n.setVisual("style", o), n.setVisual("drawType", l), !e.isSeriesFiltered(t) && c)
  51439. return n.setVisual("colorFromPalette", !1), {
  51440. dataEach: function(h, p) {
  51441. var v = t.getDataParams(p), g = le({}, o);
  51442. g[l] = c(v), h.setItemVisual(p, "style", g);
  51443. }
  51444. };
  51445. }
  51446. }, uv = new Wt(), z4e = {
  51447. createOnAllSeries: !0,
  51448. performRawSeries: !0,
  51449. reset: function(t, e) {
  51450. if (!(t.ignoreStyleOnData || e.isSeriesFiltered(t))) {
  51451. var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = oee(t, r), a = n.getVisual("drawType");
  51452. return {
  51453. dataEach: n.hasItemOption ? function(o, s) {
  51454. var l = o.getRawDataItem(s);
  51455. if (l && l[r]) {
  51456. uv.option = l[r];
  51457. var u = i(uv), c = o.ensureUniqueItemVisual(s, "style");
  51458. le(c, u), uv.option.decal && (o.setItemVisual(s, "decal", uv.option.decal), uv.option.decal.dirty = !0), a in u && o.setItemVisual(s, "colorFromPalette", !1);
  51459. }
  51460. } : null
  51461. };
  51462. }
  51463. }
  51464. }, V4e = {
  51465. performRawSeries: !0,
  51466. overallReset: function(t) {
  51467. var e = Pe();
  51468. t.eachSeries(function(n) {
  51469. var r = n.getColorBy();
  51470. if (!n.isColorBySeries()) {
  51471. var i = n.type + "-" + r, a = e.get(i);
  51472. a || (a = {}, e.set(i, a)), Pz(n).scope = a;
  51473. }
  51474. }), t.eachSeries(function(n) {
  51475. if (!(n.isColorBySeries() || t.isSeriesFiltered(n))) {
  51476. var r = n.getRawData(), i = {}, a = n.getData(), o = Pz(n).scope, s = n.visualStyleAccessPath || "itemStyle", l = see(n, s);
  51477. a.each(function(u) {
  51478. var c = a.getRawIndex(u);
  51479. i[c] = u;
  51480. }), r.each(function(u) {
  51481. var c = i[u], f = a.getItemVisual(c, "colorFromPalette");
  51482. if (f) {
  51483. var d = a.ensureUniqueItemVisual(c, "style"), h = r.getName(u) || u + "", p = r.count();
  51484. d[l] = n.getColorFromPalette(h, o, p);
  51485. }
  51486. });
  51487. }
  51488. });
  51489. }
  51490. }, ob = Math.PI;
  51491. function F4e(t, e) {
  51492. e = e || {}, Re(e, {
  51493. text: "loading",
  51494. textColor: "#000",
  51495. fontSize: 12,
  51496. fontWeight: "normal",
  51497. fontStyle: "normal",
  51498. fontFamily: "sans-serif",
  51499. maskColor: "rgba(255, 255, 255, 0.8)",
  51500. showSpinner: !0,
  51501. color: "#5470c6",
  51502. spinnerRadius: 10,
  51503. lineWidth: 5,
  51504. zlevel: 0
  51505. });
  51506. var n = new Ve(), r = new mt({
  51507. style: {
  51508. fill: e.maskColor
  51509. },
  51510. zlevel: e.zlevel,
  51511. z: 1e4
  51512. });
  51513. n.add(r);
  51514. var i = new gt({
  51515. style: {
  51516. text: e.text,
  51517. fill: e.textColor,
  51518. fontSize: e.fontSize,
  51519. fontWeight: e.fontWeight,
  51520. fontStyle: e.fontStyle,
  51521. fontFamily: e.fontFamily
  51522. },
  51523. zlevel: e.zlevel,
  51524. z: 10001
  51525. }), a = new mt({
  51526. style: {
  51527. fill: "none"
  51528. },
  51529. textContent: i,
  51530. textConfig: {
  51531. position: "right",
  51532. distance: 10
  51533. },
  51534. zlevel: e.zlevel,
  51535. z: 10001
  51536. });
  51537. n.add(a);
  51538. var o;
  51539. return e.showSpinner && (o = new Yx({
  51540. shape: {
  51541. startAngle: -ob / 2,
  51542. endAngle: -ob / 2 + 0.1,
  51543. r: e.spinnerRadius
  51544. },
  51545. style: {
  51546. stroke: e.color,
  51547. lineCap: "round",
  51548. lineWidth: e.lineWidth
  51549. },
  51550. zlevel: e.zlevel,
  51551. z: 10001
  51552. }), o.animateShape(!0).when(1e3, {
  51553. endAngle: ob * 3 / 2
  51554. }).start("circularInOut"), o.animateShape(!0).when(1e3, {
  51555. startAngle: ob * 3 / 2
  51556. }).delay(300).start("circularInOut"), n.add(o)), n.resize = function() {
  51557. 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;
  51558. e.showSpinner && o.setShape({
  51559. cx: u,
  51560. cy: c
  51561. }), a.setShape({
  51562. x: u - l,
  51563. y: c - l,
  51564. width: l * 2,
  51565. height: l * 2
  51566. }), r.setShape({
  51567. x: 0,
  51568. y: 0,
  51569. width: t.getWidth(),
  51570. height: t.getHeight()
  51571. });
  51572. }, n.resize(), n;
  51573. }
  51574. var lee = (
  51575. /** @class */
  51576. function() {
  51577. function t(e, n, r, i) {
  51578. this._stageTaskMap = Pe(), this.ecInstance = e, this.api = n, r = this._dataProcessorHandlers = r.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = r.concat(i);
  51579. }
  51580. return t.prototype.restoreData = function(e, n) {
  51581. e.restoreData(n), this._stageTaskMap.each(function(r) {
  51582. var i = r.overallTask;
  51583. i && i.dirty();
  51584. });
  51585. }, t.prototype.getPerformArgs = function(e, n) {
  51586. if (e.__pipeline) {
  51587. 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;
  51588. return {
  51589. step: o,
  51590. modBy: l,
  51591. modDataCount: s
  51592. };
  51593. }
  51594. }, t.prototype.getPipeline = function(e) {
  51595. return this._pipelineMap.get(e);
  51596. }, t.prototype.updateStreamModes = function(e, n) {
  51597. 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;
  51598. e.pipelineContext = r.context = {
  51599. progressiveRender: o,
  51600. modDataCount: l,
  51601. large: s
  51602. };
  51603. }, t.prototype.restorePipelines = function(e) {
  51604. var n = this, r = n._pipelineMap = Pe();
  51605. e.eachSeries(function(i) {
  51606. var a = i.getProgressive(), o = i.uid;
  51607. r.set(o, {
  51608. id: o,
  51609. head: null,
  51610. tail: null,
  51611. threshold: i.getProgressiveThreshold(),
  51612. progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()),
  51613. blockIndex: -1,
  51614. step: Math.round(a || 700),
  51615. count: 0
  51616. }), n._pipe(i, i.dataTask);
  51617. });
  51618. }, t.prototype.prepareStageTasks = function() {
  51619. var e = this._stageTaskMap, n = this.api.getModel(), r = this.api;
  51620. k(this._allHandlers, function(i) {
  51621. var a = e.get(i.uid) || e.set(i.uid, {}), o = "";
  51622. 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);
  51623. }, this);
  51624. }, t.prototype.prepareView = function(e, n, r, i) {
  51625. var a = e.renderTask, o = a.context;
  51626. o.model = n, o.ecModel = r, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(n, a);
  51627. }, t.prototype.performDataProcessorTasks = function(e, n) {
  51628. this._performStageTasks(this._dataProcessorHandlers, e, n, {
  51629. block: !0
  51630. });
  51631. }, t.prototype.performVisualTasks = function(e, n, r) {
  51632. this._performStageTasks(this._visualHandlers, e, n, r);
  51633. }, t.prototype._performStageTasks = function(e, n, r, i) {
  51634. i = i || {};
  51635. var a = !1, o = this;
  51636. k(e, function(l, u) {
  51637. if (!(i.visualType && i.visualType !== l.visualType)) {
  51638. var c = o._stageTaskMap.get(l.uid), f = c.seriesTaskMap, d = c.overallTask;
  51639. if (d) {
  51640. var h, p = d.agentStubMap;
  51641. p.each(function(g) {
  51642. s(i, g) && (g.dirty(), h = !0);
  51643. }), h && d.dirty(), o.updatePayload(d, r);
  51644. var v = o.getPerformArgs(d, i.block);
  51645. p.each(function(g) {
  51646. g.perform(v);
  51647. }), d.perform(v) && (a = !0);
  51648. } else f && f.each(function(g, m) {
  51649. s(i, g) && g.dirty();
  51650. var y = o.getPerformArgs(g, i.block);
  51651. y.skip = !l.performRawSeries && n.isSeriesFiltered(g.context.model), o.updatePayload(g, r), g.perform(y) && (a = !0);
  51652. });
  51653. }
  51654. });
  51655. function s(l, u) {
  51656. return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
  51657. }
  51658. this.unfinished = a || this.unfinished;
  51659. }, t.prototype.performSeriesTasks = function(e) {
  51660. var n;
  51661. e.eachSeries(function(r) {
  51662. n = r.dataTask.perform() || n;
  51663. }), this.unfinished = n || this.unfinished;
  51664. }, t.prototype.plan = function() {
  51665. this._pipelineMap.each(function(e) {
  51666. var n = e.tail;
  51667. do {
  51668. if (n.__block) {
  51669. e.blockIndex = n.__idxInPipeline;
  51670. break;
  51671. }
  51672. n = n.getUpstream();
  51673. } while (n);
  51674. });
  51675. }, t.prototype.updatePayload = function(e, n) {
  51676. n !== "remain" && (e.context.payload = n);
  51677. }, t.prototype._createSeriesStageTask = function(e, n, r, i) {
  51678. var a = this, o = n.seriesTaskMap, s = n.seriesTaskMap = Pe(), l = e.seriesType, u = e.getTargetSeries;
  51679. e.createOnAllSeries ? r.eachRawSeries(c) : l ? r.eachRawSeriesByType(l, c) : u && u(r, i).each(c);
  51680. function c(f) {
  51681. var d = f.uid, h = s.set(d, o && o.get(d) || Dg({
  51682. plan: j4e,
  51683. reset: Z4e,
  51684. count: X4e
  51685. }));
  51686. h.context = {
  51687. model: f,
  51688. ecModel: r,
  51689. api: i,
  51690. // PENDING: `useClearVisual` not used?
  51691. useClearVisual: e.isVisual && !e.isLayout,
  51692. plan: e.plan,
  51693. reset: e.reset,
  51694. scheduler: a
  51695. }, a._pipe(f, h);
  51696. }
  51697. }, t.prototype._createOverallStageTask = function(e, n, r, i) {
  51698. var a = this, o = n.overallTask = n.overallTask || Dg({
  51699. reset: W4e
  51700. });
  51701. o.context = {
  51702. ecModel: r,
  51703. api: i,
  51704. overallReset: e.overallReset,
  51705. scheduler: a
  51706. };
  51707. var s = o.agentStubMap, l = o.agentStubMap = Pe(), u = e.seriesType, c = e.getTargetSeries, f = !0, d = !1, h = "";
  51708. 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));
  51709. function p(v) {
  51710. var g = v.uid, m = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
  51711. // should be set as dirty and re-performed.
  51712. (d = !0, Dg({
  51713. reset: Q4e,
  51714. onDirty: G4e
  51715. })));
  51716. m.context = {
  51717. model: v,
  51718. overallProgress: f
  51719. // FIXME:TS never used, so comment it
  51720. // modifyOutputEnd: modifyOutputEnd
  51721. }, m.agent = o, m.__block = f, a._pipe(v, m);
  51722. }
  51723. d && o.dirty();
  51724. }, t.prototype._pipe = function(e, n) {
  51725. var r = e.uid, i = this._pipelineMap.get(r);
  51726. !i.head && (i.head = n), i.tail && i.tail.pipe(n), i.tail = n, n.__idxInPipeline = i.count++, n.__pipeline = i;
  51727. }, t.wrapStageHandler = function(e, n) {
  51728. return Me(e) && (e = {
  51729. overallReset: e,
  51730. seriesType: Y4e(e)
  51731. }), e.uid = yp("stageHandler"), n && (e.visualType = n), e;
  51732. }, t;
  51733. }()
  51734. );
  51735. function W4e(t) {
  51736. t.overallReset(t.ecModel, t.api, t.payload);
  51737. }
  51738. function Q4e(t) {
  51739. return t.overallProgress && H4e;
  51740. }
  51741. function H4e() {
  51742. this.agent.dirty(), this.getDownstream().dirty();
  51743. }
  51744. function G4e() {
  51745. this.agent && this.agent.dirty();
  51746. }
  51747. function j4e(t) {
  51748. return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null;
  51749. }
  51750. function Z4e(t) {
  51751. t.useClearVisual && t.data.clearAllVisual();
  51752. var e = t.resetDefines = Qt(t.reset(t.model, t.ecModel, t.api, t.payload));
  51753. return e.length > 1 ? ce(e, function(n, r) {
  51754. return uee(r);
  51755. }) : U4e;
  51756. }
  51757. var U4e = uee(0);
  51758. function uee(t) {
  51759. return function(e, n) {
  51760. var r = n.data, i = n.resetDefines[t];
  51761. if (i && i.dataEach)
  51762. for (var a = e.start; a < e.end; a++)
  51763. i.dataEach(r, a);
  51764. else i && i.progress && i.progress(e, r);
  51765. };
  51766. }
  51767. function X4e(t) {
  51768. return t.data.count();
  51769. }
  51770. function Y4e(t) {
  51771. vO = null;
  51772. try {
  51773. t(Am, cee);
  51774. } catch {
  51775. }
  51776. return vO;
  51777. }
  51778. var Am = {}, cee = {}, vO;
  51779. fee(Am, ak);
  51780. fee(cee, kJ);
  51781. Am.eachSeriesByType = Am.eachRawSeriesByType = function(t) {
  51782. vO = t;
  51783. };
  51784. Am.eachComponent = function(t) {
  51785. t.mainType === "series" && t.subType && (vO = t.subType);
  51786. };
  51787. function fee(t, e) {
  51788. for (var n in e.prototype)
  51789. t[n] = On;
  51790. }
  51791. var Az = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
  51792. const q4e = {
  51793. color: Az,
  51794. colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], Az]
  51795. };
  51796. var Fr = "#B9B8CE", Ez = "#100C2A", sb = function() {
  51797. return {
  51798. axisLine: {
  51799. lineStyle: {
  51800. color: Fr
  51801. }
  51802. },
  51803. splitLine: {
  51804. lineStyle: {
  51805. color: "#484753"
  51806. }
  51807. },
  51808. splitArea: {
  51809. areaStyle: {
  51810. color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
  51811. }
  51812. },
  51813. minorSplitLine: {
  51814. lineStyle: {
  51815. color: "#20203B"
  51816. }
  51817. }
  51818. };
  51819. }, Mz = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], dee = {
  51820. darkMode: !0,
  51821. color: Mz,
  51822. backgroundColor: Ez,
  51823. axisPointer: {
  51824. lineStyle: {
  51825. color: "#817f91"
  51826. },
  51827. crossStyle: {
  51828. color: "#817f91"
  51829. },
  51830. label: {
  51831. // TODO Contrast of label backgorundColor
  51832. color: "#fff"
  51833. }
  51834. },
  51835. legend: {
  51836. textStyle: {
  51837. color: Fr
  51838. }
  51839. },
  51840. textStyle: {
  51841. color: Fr
  51842. },
  51843. title: {
  51844. textStyle: {
  51845. color: "#EEF1FA"
  51846. },
  51847. subtextStyle: {
  51848. color: "#B9B8CE"
  51849. }
  51850. },
  51851. toolbox: {
  51852. iconStyle: {
  51853. borderColor: Fr
  51854. }
  51855. },
  51856. dataZoom: {
  51857. borderColor: "#71708A",
  51858. textStyle: {
  51859. color: Fr
  51860. },
  51861. brushStyle: {
  51862. color: "rgba(135,163,206,0.3)"
  51863. },
  51864. handleStyle: {
  51865. color: "#353450",
  51866. borderColor: "#C5CBE3"
  51867. },
  51868. moveHandleStyle: {
  51869. color: "#B0B6C3",
  51870. opacity: 0.3
  51871. },
  51872. fillerColor: "rgba(135,163,206,0.2)",
  51873. emphasis: {
  51874. handleStyle: {
  51875. borderColor: "#91B7F2",
  51876. color: "#4D587D"
  51877. },
  51878. moveHandleStyle: {
  51879. color: "#636D9A",
  51880. opacity: 0.7
  51881. }
  51882. },
  51883. dataBackground: {
  51884. lineStyle: {
  51885. color: "#71708A",
  51886. width: 1
  51887. },
  51888. areaStyle: {
  51889. color: "#71708A"
  51890. }
  51891. },
  51892. selectedDataBackground: {
  51893. lineStyle: {
  51894. color: "#87A3CE"
  51895. },
  51896. areaStyle: {
  51897. color: "#87A3CE"
  51898. }
  51899. }
  51900. },
  51901. visualMap: {
  51902. textStyle: {
  51903. color: Fr
  51904. }
  51905. },
  51906. timeline: {
  51907. lineStyle: {
  51908. color: Fr
  51909. },
  51910. label: {
  51911. color: Fr
  51912. },
  51913. controlStyle: {
  51914. color: Fr,
  51915. borderColor: Fr
  51916. }
  51917. },
  51918. calendar: {
  51919. itemStyle: {
  51920. color: Ez
  51921. },
  51922. dayLabel: {
  51923. color: Fr
  51924. },
  51925. monthLabel: {
  51926. color: Fr
  51927. },
  51928. yearLabel: {
  51929. color: Fr
  51930. }
  51931. },
  51932. timeAxis: sb(),
  51933. logAxis: sb(),
  51934. valueAxis: sb(),
  51935. categoryAxis: sb(),
  51936. line: {
  51937. symbol: "circle"
  51938. },
  51939. graph: {
  51940. color: Mz
  51941. },
  51942. gauge: {
  51943. title: {
  51944. color: Fr
  51945. },
  51946. axisLine: {
  51947. lineStyle: {
  51948. color: [[1, "rgba(207,212,219,0.2)"]]
  51949. }
  51950. },
  51951. axisLabel: {
  51952. color: Fr
  51953. },
  51954. detail: {
  51955. color: "#EEF1FA"
  51956. }
  51957. },
  51958. candlestick: {
  51959. itemStyle: {
  51960. color: "#f64e56",
  51961. color0: "#54ea92",
  51962. borderColor: "#f64e56",
  51963. borderColor0: "#54ea92"
  51964. // borderColor: '#ca2824',
  51965. // borderColor0: '#09a443'
  51966. }
  51967. }
  51968. };
  51969. dee.categoryAxis.splitLine.show = !1;
  51970. var K4e = (
  51971. /** @class */
  51972. function() {
  51973. function t() {
  51974. }
  51975. return t.prototype.normalizeQuery = function(e) {
  51976. var n = {}, r = {}, i = {};
  51977. if (Oe(e)) {
  51978. var a = Vo(e);
  51979. n.mainType = a.main || null, n.subType = a.sub || null;
  51980. } else {
  51981. var o = ["Index", "Name", "Id"], s = {
  51982. name: 1,
  51983. dataIndex: 1,
  51984. dataType: 1
  51985. };
  51986. k(e, function(l, u) {
  51987. for (var c = !1, f = 0; f < o.length; f++) {
  51988. var d = o[f], h = u.lastIndexOf(d);
  51989. if (h > 0 && h === u.length - d.length) {
  51990. var p = u.slice(0, h);
  51991. p !== "data" && (n.mainType = p, n[d.toLowerCase()] = l, c = !0);
  51992. }
  51993. }
  51994. s.hasOwnProperty(u) && (r[u] = l, c = !0), c || (i[u] = l);
  51995. });
  51996. }
  51997. return {
  51998. cptQuery: n,
  51999. dataQuery: r,
  52000. otherQuery: i
  52001. };
  52002. }, t.prototype.filter = function(e, n) {
  52003. var r = this.eventInfo;
  52004. if (!r)
  52005. return !0;
  52006. var i = r.targetEl, a = r.packedEvent, o = r.model, s = r.view;
  52007. if (!o || !s)
  52008. return !0;
  52009. var l = n.cptQuery, u = n.dataQuery;
  52010. 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));
  52011. function c(f, d, h, p) {
  52012. return f[h] == null || d[p || h] === f[h];
  52013. }
  52014. }, t.prototype.afterTrigger = function() {
  52015. this.eventInfo = null;
  52016. }, t;
  52017. }()
  52018. ), XA = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], Iz = XA.concat(["symbolKeepAspect"]), J4e = {
  52019. createOnAllSeries: !0,
  52020. // For legend.
  52021. performRawSeries: !0,
  52022. reset: function(t, e) {
  52023. var n = t.getData();
  52024. if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), !t.hasSymbolVisual)
  52025. return;
  52026. for (var r = {}, i = {}, a = !1, o = 0; o < XA.length; o++) {
  52027. var s = XA[o], l = t.get(s);
  52028. Me(l) ? (a = !0, i[s] = l) : r[s] = l;
  52029. }
  52030. if (r.symbol = r.symbol || t.defaultSymbol, n.setVisual(le({
  52031. legendIcon: t.legendIcon || r.symbol,
  52032. symbolKeepAspect: t.get("symbolKeepAspect")
  52033. }, r)), e.isSeriesFiltered(t))
  52034. return;
  52035. var u = st(i);
  52036. function c(f, d) {
  52037. for (var h = t.getRawValue(d), p = t.getDataParams(d), v = 0; v < u.length; v++) {
  52038. var g = u[v];
  52039. f.setItemVisual(d, g, i[g](h, p));
  52040. }
  52041. }
  52042. return {
  52043. dataEach: a ? c : null
  52044. };
  52045. }
  52046. }, e8e = {
  52047. createOnAllSeries: !0,
  52048. // For legend.
  52049. performRawSeries: !0,
  52050. reset: function(t, e) {
  52051. if (!t.hasSymbolVisual || e.isSeriesFiltered(t))
  52052. return;
  52053. var n = t.getData();
  52054. function r(i, a) {
  52055. for (var o = i.getItemModel(a), s = 0; s < Iz.length; s++) {
  52056. var l = Iz[s], u = o.getShallow(l, !0);
  52057. u != null && i.setItemVisual(a, l, u);
  52058. }
  52059. }
  52060. return {
  52061. dataEach: n.hasItemOption ? r : null
  52062. };
  52063. }
  52064. };
  52065. function ck(t, e, n) {
  52066. switch (n) {
  52067. case "color":
  52068. var r = t.getItemVisual(e, "style");
  52069. return r[t.getVisual("drawType")];
  52070. case "opacity":
  52071. return t.getItemVisual(e, "style").opacity;
  52072. case "symbol":
  52073. case "symbolSize":
  52074. case "liftZ":
  52075. return t.getItemVisual(e, n);
  52076. default:
  52077. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  52078. }
  52079. }
  52080. function H0(t, e) {
  52081. switch (e) {
  52082. case "color":
  52083. var n = t.getVisual("style");
  52084. return n[t.getVisual("drawType")];
  52085. case "opacity":
  52086. return t.getVisual("style").opacity;
  52087. case "symbol":
  52088. case "symbolSize":
  52089. case "liftZ":
  52090. return t.getVisual(e);
  52091. default:
  52092. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
  52093. }
  52094. }
  52095. function hee(t, e, n, r) {
  52096. switch (n) {
  52097. case "color":
  52098. var i = t.ensureUniqueItemVisual(e, "style");
  52099. i[t.getVisual("drawType")] = r, t.setItemVisual(e, "colorFromPalette", !1);
  52100. break;
  52101. case "opacity":
  52102. t.ensureUniqueItemVisual(e, "style").opacity = r;
  52103. break;
  52104. case "symbol":
  52105. case "symbolSize":
  52106. case "liftZ":
  52107. t.setItemVisual(e, n, r);
  52108. break;
  52109. default:
  52110. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  52111. }
  52112. }
  52113. function pee(t, e) {
  52114. function n(r, i) {
  52115. var a = [];
  52116. return r.eachComponent({
  52117. mainType: "series",
  52118. subType: t,
  52119. query: i
  52120. }, function(o) {
  52121. a.push(o.seriesIndex);
  52122. }), a;
  52123. }
  52124. k([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], function(r) {
  52125. e(r[0], function(i, a, o) {
  52126. i = le({}, i), process.env.NODE_ENV !== "production" && Cn(i.type, r[1]), o.dispatchAction(le(i, {
  52127. type: r[1],
  52128. seriesIndex: n(a, i)
  52129. }));
  52130. });
  52131. });
  52132. }
  52133. function ud(t, e, n, r, i) {
  52134. var a = t + e;
  52135. n.isSilent(a) || (process.env.NODE_ENV !== "production" && Ea("event " + a + " is deprecated."), r.eachComponent({
  52136. mainType: "series",
  52137. subType: "pie"
  52138. }, function(o) {
  52139. for (var s = o.seriesIndex, l = o.option.selectedMap, u = i.selected, c = 0; c < u.length; c++)
  52140. if (u[c].seriesIndex === s) {
  52141. var f = o.getData(), d = mf(f, i.fromActionPayload);
  52142. n.trigger(a, {
  52143. type: a,
  52144. seriesId: o.id,
  52145. name: ue(d) ? f.getName(d[0]) : f.getName(d),
  52146. selected: Oe(l) ? l : le({}, l)
  52147. });
  52148. }
  52149. }));
  52150. }
  52151. function t8e(t, e, n) {
  52152. t.on("selectchanged", function(r) {
  52153. var i = n.getModel();
  52154. r.isFromClick ? (ud("map", "selectchanged", e, i, r), ud("pie", "selectchanged", e, i, r)) : r.fromAction === "select" ? (ud("map", "selected", e, i, r), ud("pie", "selected", e, i, r)) : r.fromAction === "unselect" && (ud("map", "unselected", e, i, r), ud("pie", "unselected", e, i, r));
  52155. });
  52156. }
  52157. function Bc(t, e, n) {
  52158. for (var r; t && !(e(t) && (r = t, n)); )
  52159. t = t.__hostTarget || t.parent;
  52160. return r;
  52161. }
  52162. var n8e = Math.round(Math.random() * 9), r8e = typeof Object.defineProperty == "function", i8e = function() {
  52163. function t() {
  52164. this._id = "__ec_inner_" + n8e++;
  52165. }
  52166. return t.prototype.get = function(e) {
  52167. return this._guard(e)[this._id];
  52168. }, t.prototype.set = function(e, n) {
  52169. var r = this._guard(e);
  52170. return r8e ? Object.defineProperty(r, this._id, {
  52171. value: n,
  52172. enumerable: !1,
  52173. configurable: !0
  52174. }) : r[this._id] = n, this;
  52175. }, t.prototype.delete = function(e) {
  52176. return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
  52177. }, t.prototype.has = function(e) {
  52178. return !!this._guard(e)[this._id];
  52179. }, t.prototype._guard = function(e) {
  52180. if (e !== Object(e))
  52181. throw TypeError("Value of WeakMap is not a non-null object.");
  52182. return e;
  52183. }, t;
  52184. }(), a8e = ot.extend({
  52185. type: "triangle",
  52186. shape: {
  52187. cx: 0,
  52188. cy: 0,
  52189. width: 0,
  52190. height: 0
  52191. },
  52192. buildPath: function(t, e) {
  52193. var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
  52194. t.moveTo(n, r - a), t.lineTo(n + i, r + a), t.lineTo(n - i, r + a), t.closePath();
  52195. }
  52196. }), o8e = ot.extend({
  52197. type: "diamond",
  52198. shape: {
  52199. cx: 0,
  52200. cy: 0,
  52201. width: 0,
  52202. height: 0
  52203. },
  52204. buildPath: function(t, e) {
  52205. var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
  52206. t.moveTo(n, r - a), t.lineTo(n + i, r), t.lineTo(n, r + a), t.lineTo(n - i, r), t.closePath();
  52207. }
  52208. }), s8e = ot.extend({
  52209. type: "pin",
  52210. shape: {
  52211. // x, y on the cusp
  52212. x: 0,
  52213. y: 0,
  52214. width: 0,
  52215. height: 0
  52216. },
  52217. buildPath: function(t, e) {
  52218. 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;
  52219. 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();
  52220. }
  52221. }), l8e = ot.extend({
  52222. type: "arrow",
  52223. shape: {
  52224. x: 0,
  52225. y: 0,
  52226. width: 0,
  52227. height: 0
  52228. },
  52229. buildPath: function(t, e) {
  52230. var n = e.height, r = e.width, i = e.x, a = e.y, o = r / 3 * 2;
  52231. 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();
  52232. }
  52233. }), u8e = {
  52234. line: Un,
  52235. rect: mt,
  52236. roundRect: mt,
  52237. square: mt,
  52238. circle: ll,
  52239. diamond: o8e,
  52240. pin: s8e,
  52241. arrow: l8e,
  52242. triangle: a8e
  52243. }, c8e = {
  52244. line: function(t, e, n, r, i) {
  52245. i.x1 = t, i.y1 = e + r / 2, i.x2 = t + n, i.y2 = e + r / 2;
  52246. },
  52247. rect: function(t, e, n, r, i) {
  52248. i.x = t, i.y = e, i.width = n, i.height = r;
  52249. },
  52250. roundRect: function(t, e, n, r, i) {
  52251. i.x = t, i.y = e, i.width = n, i.height = r, i.r = Math.min(n, r) / 4;
  52252. },
  52253. square: function(t, e, n, r, i) {
  52254. var a = Math.min(n, r);
  52255. i.x = t, i.y = e, i.width = a, i.height = a;
  52256. },
  52257. circle: function(t, e, n, r, i) {
  52258. i.cx = t + n / 2, i.cy = e + r / 2, i.r = Math.min(n, r) / 2;
  52259. },
  52260. diamond: function(t, e, n, r, i) {
  52261. i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  52262. },
  52263. pin: function(t, e, n, r, i) {
  52264. i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  52265. },
  52266. arrow: function(t, e, n, r, i) {
  52267. i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  52268. },
  52269. triangle: function(t, e, n, r, i) {
  52270. i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  52271. }
  52272. }, gO = {};
  52273. k(u8e, function(t, e) {
  52274. gO[e] = new t();
  52275. });
  52276. var f8e = ot.extend({
  52277. type: "symbol",
  52278. shape: {
  52279. symbolType: "",
  52280. x: 0,
  52281. y: 0,
  52282. width: 0,
  52283. height: 0
  52284. },
  52285. calculateTextPosition: function(t, e, n) {
  52286. var r = rO(t, e, n), i = this.shape;
  52287. return i && i.symbolType === "pin" && e.position === "inside" && (r.y = n.y + n.height * 0.4), r;
  52288. },
  52289. buildPath: function(t, e, n) {
  52290. var r = e.symbolType;
  52291. if (r !== "none") {
  52292. var i = gO[r];
  52293. i || (r = "rect", i = gO[r]), c8e[r](e.x, e.y, e.width, e.height, i.shape), i.buildPath(t, i.shape, n);
  52294. }
  52295. }
  52296. });
  52297. function d8e(t, e) {
  52298. if (this.type !== "image") {
  52299. var n = this.style;
  52300. this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : this.shape.symbolType === "line" ? n.stroke = t : n.fill = t, this.markRedraw();
  52301. }
  52302. }
  52303. function $n(t, e, n, r, i, a, o) {
  52304. var s = t.indexOf("empty") === 0;
  52305. s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  52306. var l;
  52307. return t.indexOf("image://") === 0 ? l = WR(t.slice(8), new Je(e, n, r, i), o ? "center" : "cover") : t.indexOf("path://") === 0 ? l = F0(t.slice(7), {}, new Je(e, n, r, i), o ? "center" : "cover") : l = new f8e({
  52308. shape: {
  52309. symbolType: t,
  52310. x: e,
  52311. y: n,
  52312. width: r,
  52313. height: i
  52314. }
  52315. }), l.__isEmptyBrush = s, l.setColor = d8e, a && l.setColor(a), l;
  52316. }
  52317. function xp(t) {
  52318. return ue(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0];
  52319. }
  52320. function Vf(t, e) {
  52321. if (t != null)
  52322. return ue(t) || (t = [t, t]), [_e(t[0], e[0]) || 0, _e(We(t[1], t[0]), e[1]) || 0];
  52323. }
  52324. function zc(t) {
  52325. return isFinite(t);
  52326. }
  52327. function h8e(t, e, n) {
  52328. 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;
  52329. 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;
  52330. var s = t.createLinearGradient(r, a, i, o);
  52331. return s;
  52332. }
  52333. function p8e(t, e, n) {
  52334. 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;
  52335. 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;
  52336. var u = t.createRadialGradient(o, s, 0, o, s, l);
  52337. return u;
  52338. }
  52339. function YA(t, e, n) {
  52340. for (var r = e.type === "radial" ? p8e(t, e, n) : h8e(t, e, n), i = e.colorStops, a = 0; a < i.length; a++)
  52341. r.addColorStop(i[a].offset, i[a].color);
  52342. return r;
  52343. }
  52344. function v8e(t, e) {
  52345. if (t === e || !t && !e)
  52346. return !1;
  52347. if (!t || !e || t.length !== e.length)
  52348. return !0;
  52349. for (var n = 0; n < t.length; n++)
  52350. if (t[n] !== e[n])
  52351. return !0;
  52352. return !1;
  52353. }
  52354. function lb(t) {
  52355. return parseInt(t, 10);
  52356. }
  52357. function Fd(t, e, n) {
  52358. var r = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
  52359. if (n[r] != null && n[r] !== "auto")
  52360. return parseFloat(n[r]);
  52361. var s = document.defaultView.getComputedStyle(t);
  52362. return (t[i] || lb(s[r]) || lb(t.style[r])) - (lb(s[a]) || 0) - (lb(s[o]) || 0) | 0;
  52363. }
  52364. function g8e(t, e) {
  52365. return !t || t === "solid" || !(e > 0) ? null : t === "dashed" ? [4 * e, 2 * e] : t === "dotted" ? [e] : St(t) ? [t] : ue(t) ? t : null;
  52366. }
  52367. function fk(t) {
  52368. var e = t.style, n = e.lineDash && e.lineWidth > 0 && g8e(e.lineDash, e.lineWidth), r = e.lineDashOffset;
  52369. if (n) {
  52370. var i = e.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
  52371. i && i !== 1 && (n = ce(n, function(a) {
  52372. return a / i;
  52373. }), r /= i);
  52374. }
  52375. return [n, r];
  52376. }
  52377. var m8e = new as(!0);
  52378. function mO(t) {
  52379. var e = t.stroke;
  52380. return !(e == null || e === "none" || !(t.lineWidth > 0));
  52381. }
  52382. function Dz(t) {
  52383. return typeof t == "string" && t !== "none";
  52384. }
  52385. function yO(t) {
  52386. var e = t.fill;
  52387. return e != null && e !== "none";
  52388. }
  52389. function Rz(t, e) {
  52390. if (e.fillOpacity != null && e.fillOpacity !== 1) {
  52391. var n = t.globalAlpha;
  52392. t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n;
  52393. } else
  52394. t.fill();
  52395. }
  52396. function kz(t, e) {
  52397. if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
  52398. var n = t.globalAlpha;
  52399. t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n;
  52400. } else
  52401. t.stroke();
  52402. }
  52403. function qA(t, e, n) {
  52404. var r = IR(e.image, e.__image, n);
  52405. if (Hx(r)) {
  52406. var i = t.createPattern(r, e.repeat || "repeat");
  52407. if (typeof DOMMatrix == "function" && i && i.setTransform) {
  52408. var a = new DOMMatrix();
  52409. a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * Og), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a);
  52410. }
  52411. return i;
  52412. }
  52413. }
  52414. function y8e(t, e, n, r) {
  52415. var i, a = mO(n), o = yO(n), s = n.strokePercent, l = s < 1, u = !e.path;
  52416. (!e.silent || l) && u && e.createPathProxy();
  52417. var c = e.path || m8e, f = e.__dirty;
  52418. if (!r) {
  52419. 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;
  52420. (p || v) && (S = e.getBoundingRect()), p && (y = f ? YA(t, d, S) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (b = f ? YA(t, h, S) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = b), g && (_ = f || !e.__canvasFillPattern ? qA(t, d, e) : e.__canvasFillPattern, e.__canvasFillPattern = _), m && (O = f || !e.__canvasStrokePattern ? qA(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);
  52421. }
  52422. var x = e.getGlobalScale();
  52423. c.setScale(x[0], x[1], e.segmentIgnoreThreshold);
  52424. var C, T;
  52425. t.setLineDash && n.lineDash && (i = fk(e), C = i[0], T = i[1]);
  52426. var w = !0;
  52427. (u || f & $d) && (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 && kz(t, n), o && Rz(t, n)) : (o && Rz(t, n), a && kz(t, n))), C && t.setLineDash([]);
  52428. }
  52429. function b8e(t, e, n) {
  52430. var r = e.__image = IR(n.image, e.__image, e, e.onload);
  52431. if (!(!r || !Hx(r))) {
  52432. var i = n.x || 0, a = n.y || 0, o = e.getWidth(), s = e.getHeight(), l = r.width / r.height;
  52433. 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) {
  52434. var u = n.sx || 0, c = n.sy || 0;
  52435. t.drawImage(r, u, c, n.sWidth, n.sHeight, i, a, o, s);
  52436. } else if (n.sx && n.sy) {
  52437. var u = n.sx, c = n.sy, f = o - u, d = s - c;
  52438. t.drawImage(r, u, c, f, d, i, a, o, s);
  52439. } else
  52440. t.drawImage(r, i, a, o, s);
  52441. }
  52442. }
  52443. function _8e(t, e, n) {
  52444. var r, i = n.text;
  52445. if (i != null && (i += ""), i) {
  52446. t.font = n.font || iu, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
  52447. var a = void 0, o = void 0;
  52448. t.setLineDash && n.lineDash && (r = fk(e), a = r[0], o = r[1]), a && (t.setLineDash(a), t.lineDashOffset = o), n.strokeFirst ? (mO(n) && t.strokeText(i, n.x, n.y), yO(n) && t.fillText(i, n.x, n.y)) : (yO(n) && t.fillText(i, n.x, n.y), mO(n) && t.strokeText(i, n.x, n.y)), a && t.setLineDash([]);
  52449. }
  52450. }
  52451. var Lz = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], Nz = [
  52452. ["lineCap", "butt"],
  52453. ["lineJoin", "miter"],
  52454. ["miterLimit", 10]
  52455. ];
  52456. function vee(t, e, n, r, i) {
  52457. var a = !1;
  52458. if (!r && (n = n || {}, e === n))
  52459. return !1;
  52460. if (r || e.opacity !== n.opacity) {
  52461. gi(t, i), a = !0;
  52462. var o = Math.max(Math.min(e.opacity, 1), 0);
  52463. t.globalAlpha = isNaN(o) ? Kc.opacity : o;
  52464. }
  52465. (r || e.blend !== n.blend) && (a || (gi(t, i), a = !0), t.globalCompositeOperation = e.blend || Kc.blend);
  52466. for (var s = 0; s < Lz.length; s++) {
  52467. var l = Lz[s];
  52468. (r || e[l] !== n[l]) && (a || (gi(t, i), a = !0), t[l] = t.dpr * (e[l] || 0));
  52469. }
  52470. return (r || e.shadowColor !== n.shadowColor) && (a || (gi(t, i), a = !0), t.shadowColor = e.shadowColor || Kc.shadowColor), a;
  52471. }
  52472. function Bz(t, e, n, r, i) {
  52473. var a = Em(e, i.inHover), o = r ? null : n && Em(n, i.inHover) || {};
  52474. if (a === o)
  52475. return !1;
  52476. var s = vee(t, a, o, r, i);
  52477. if ((r || a.fill !== o.fill) && (s || (gi(t, i), s = !0), Dz(a.fill) && (t.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s || (gi(t, i), s = !0), Dz(a.stroke) && (t.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s || (gi(t, i), s = !0), t.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) {
  52478. var l = a.lineWidth, u = l / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
  52479. t.lineWidth !== u && (s || (gi(t, i), s = !0), t.lineWidth = u);
  52480. }
  52481. for (var c = 0; c < Nz.length; c++) {
  52482. var f = Nz[c], d = f[0];
  52483. (r || a[d] !== o[d]) && (s || (gi(t, i), s = !0), t[d] = a[d] || f[1]);
  52484. }
  52485. return s;
  52486. }
  52487. function O8e(t, e, n, r, i) {
  52488. return vee(t, Em(e, i.inHover), n && Em(n, i.inHover), r, i);
  52489. }
  52490. function gee(t, e) {
  52491. var n = e.transform, r = t.dpr || 1;
  52492. 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);
  52493. }
  52494. function S8e(t, e, n) {
  52495. for (var r = !1, i = 0; i < t.length; i++) {
  52496. var a = t[i];
  52497. r = r || a.isZeroArea(), gee(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip();
  52498. }
  52499. n.allClipped = r;
  52500. }
  52501. function x8e(t, e) {
  52502. 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);
  52503. }
  52504. var zz = 1, Vz = 2, Fz = 3, Wz = 4;
  52505. function w8e(t) {
  52506. var e = yO(t), n = mO(t);
  52507. return !(t.lineDash || !(+e ^ +n) || e && typeof t.fill != "string" || n && typeof t.stroke != "string" || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1);
  52508. }
  52509. function gi(t, e) {
  52510. e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = "";
  52511. }
  52512. function Em(t, e) {
  52513. return e && t.__hoverStyle || t.style;
  52514. }
  52515. function dk(t, e) {
  52516. Vc(t, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
  52517. }
  52518. function Vc(t, e, n, r) {
  52519. var i = e.transform;
  52520. if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
  52521. e.__dirty &= ~ki, e.__isRendered = !1;
  52522. return;
  52523. }
  52524. var a = e.__clipPaths, o = n.prevElClipPaths, s = !1, l = !1;
  52525. if ((!o || v8e(a, o)) && (o && o.length && (gi(t, n), t.restore(), l = s = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), a && a.length && (gi(t, n), t.save(), S8e(a, t, n), s = !0), n.prevElClipPaths = a), n.allClipped) {
  52526. e.__isRendered = !1;
  52527. return;
  52528. }
  52529. e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  52530. var u = n.prevEl;
  52531. u || (l = s = !0);
  52532. var c = e instanceof ot && e.autoBatch && w8e(e.style);
  52533. s || x8e(i, u.transform) ? (gi(t, n), gee(t, e)) : c || gi(t, n);
  52534. var f = Em(e, n.inHover);
  52535. e instanceof ot ? (n.lastDrawType !== zz && (l = !0, n.lastDrawType = zz), Bz(t, e, u, l, n), (!c || !n.batchFill && !n.batchStroke) && t.beginPath(), y8e(t, e, f, c), c && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Bh ? (n.lastDrawType !== Fz && (l = !0, n.lastDrawType = Fz), Bz(t, e, u, l, n), _8e(t, e, f)) : e instanceof lr ? (n.lastDrawType !== Vz && (l = !0, n.lastDrawType = Vz), O8e(t, e, u, l, n), b8e(t, e, f)) : e.getTemporalDisplayables && (n.lastDrawType !== Wz && (l = !0, n.lastDrawType = Wz), C8e(t, e, n)), c && r && gi(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
  52536. }
  52537. function C8e(t, e, n) {
  52538. var r = e.getDisplayables(), i = e.getTemporalDisplayables();
  52539. t.save();
  52540. var a = {
  52541. prevElClipPaths: null,
  52542. prevEl: null,
  52543. allClipped: !1,
  52544. viewWidth: n.viewWidth,
  52545. viewHeight: n.viewHeight,
  52546. inHover: n.inHover
  52547. }, o, s;
  52548. for (o = e.getCursor(), s = r.length; o < s; o++) {
  52549. var l = r[o];
  52550. l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  52551. }
  52552. for (var u = 0, c = i.length; u < c; u++) {
  52553. var l = i[u];
  52554. l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, u === c - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  52555. }
  52556. e.clearTemporalDisplayables(), e.notClear = !0, t.restore();
  52557. }
  52558. var RT = new i8e(), Qz = new R0(100), Hz = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
  52559. function Fh(t, e) {
  52560. if (t === "none")
  52561. return null;
  52562. var n = e.getDevicePixelRatio(), r = e.getZr(), i = r.painter.type === "svg";
  52563. t.dirty && RT.delete(t);
  52564. var a = RT.get(t);
  52565. if (a)
  52566. return a;
  52567. var o = Re(t, {
  52568. symbol: "rect",
  52569. symbolSize: 1,
  52570. symbolKeepAspect: !0,
  52571. color: "rgba(0, 0, 0, 0.2)",
  52572. backgroundColor: null,
  52573. dashArrayX: 5,
  52574. dashArrayY: 5,
  52575. rotation: 0,
  52576. maxTileWidth: 512,
  52577. maxTileHeight: 512
  52578. });
  52579. o.backgroundColor === "none" && (o.backgroundColor = null);
  52580. var s = {
  52581. repeat: "repeat"
  52582. };
  52583. return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / n, RT.set(t, s), t.dirty = !1, s;
  52584. function l(u) {
  52585. for (var c = [n], f = !0, d = 0; d < Hz.length; ++d) {
  52586. var h = o[Hz[d]];
  52587. if (h != null && !ue(h) && !Oe(h) && !St(h) && typeof h != "boolean") {
  52588. f = !1;
  52589. break;
  52590. }
  52591. c.push(h);
  52592. }
  52593. var p;
  52594. if (f) {
  52595. p = c.join(",") + (i ? "-svg" : "");
  52596. var v = Qz.get(p);
  52597. v && (i ? u.svgElement = v : u.image = v);
  52598. }
  52599. var g = yee(o.dashArrayX), m = T8e(o.dashArrayY), y = mee(o.symbol), b = P8e(g), _ = bee(m), O = !i && io.createCanvas(), S = i && {
  52600. tag: "g",
  52601. attrs: {},
  52602. key: "dcl",
  52603. children: []
  52604. }, x = T(), C;
  52605. O && (O.width = x.width * n, O.height = x.height * n, C = O.getContext("2d")), w(), f && Qz.put(p, O || S), u.image = O, u.svgElement = S, u.svgWidth = x.width, u.svgHeight = x.height;
  52606. function T() {
  52607. for (var P = 1, $ = 0, A = b.length; $ < A; ++$)
  52608. P = iB(P, b[$]);
  52609. for (var D = 1, $ = 0, A = y.length; $ < A; ++$)
  52610. D = iB(D, y[$].length);
  52611. P *= D;
  52612. var E = _ * b.length * y.length;
  52613. if (process.env.NODE_ENV !== "production") {
  52614. var R = function(N) {
  52615. 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.");
  52616. };
  52617. P > o.maxTileWidth && R("maxTileWidth"), E > o.maxTileHeight && R("maxTileHeight");
  52618. }
  52619. return {
  52620. width: Math.max(1, Math.min(P, o.maxTileWidth)),
  52621. height: Math.max(1, Math.min(E, o.maxTileHeight))
  52622. };
  52623. }
  52624. function w() {
  52625. C && (C.clearRect(0, 0, O.width, O.height), o.backgroundColor && (C.fillStyle = o.backgroundColor, C.fillRect(0, 0, O.width, O.height)));
  52626. for (var P = 0, $ = 0; $ < m.length; ++$)
  52627. P += m[$];
  52628. if (P <= 0)
  52629. return;
  52630. for (var A = -_, D = 0, E = 0, R = 0; A < x.height; ) {
  52631. if (D % 2 === 0) {
  52632. for (var N = E / 2 % y.length, V = 0, z = 0, W = 0; V < x.width * 2; ) {
  52633. for (var F = 0, $ = 0; $ < g[R].length; ++$)
  52634. F += g[R][$];
  52635. if (F <= 0)
  52636. break;
  52637. if (z % 2 === 0) {
  52638. var Q = (1 - o.symbolSize) * 0.5, Z = V + g[R][z] * Q, ne = A + m[D] * Q, ee = g[R][z] * o.symbolSize, oe = m[D] * o.symbolSize, K = W / 2 % y[N].length;
  52639. ie(Z, ne, ee, oe, y[N][K]);
  52640. }
  52641. V += g[R][z], ++W, ++z, z === g[R].length && (z = 0);
  52642. }
  52643. ++R, R === g.length && (R = 0);
  52644. }
  52645. A += m[D], ++E, ++D, D === m.length && (D = 0);
  52646. }
  52647. function ie(X, H, G, re, fe) {
  52648. var de = i ? 1 : n, Ee = $n(fe, X * de, H * de, G * de, re * de, o.color, o.symbolKeepAspect);
  52649. if (i) {
  52650. var $e = r.painter.renderOneToVNode(Ee);
  52651. $e && S.children.push($e);
  52652. } else
  52653. dk(C, Ee);
  52654. }
  52655. }
  52656. }
  52657. }
  52658. function mee(t) {
  52659. if (!t || t.length === 0)
  52660. return [["rect"]];
  52661. if (Oe(t))
  52662. return [[t]];
  52663. for (var e = !0, n = 0; n < t.length; ++n)
  52664. if (!Oe(t[n])) {
  52665. e = !1;
  52666. break;
  52667. }
  52668. if (e)
  52669. return mee([t]);
  52670. for (var r = [], n = 0; n < t.length; ++n)
  52671. Oe(t[n]) ? r.push([t[n]]) : r.push(t[n]);
  52672. return r;
  52673. }
  52674. function yee(t) {
  52675. if (!t || t.length === 0)
  52676. return [[0, 0]];
  52677. if (St(t)) {
  52678. var e = Math.ceil(t);
  52679. return [[e, e]];
  52680. }
  52681. for (var n = !0, r = 0; r < t.length; ++r)
  52682. if (!St(t[r])) {
  52683. n = !1;
  52684. break;
  52685. }
  52686. if (n)
  52687. return yee([t]);
  52688. for (var i = [], r = 0; r < t.length; ++r)
  52689. if (St(t[r])) {
  52690. var e = Math.ceil(t[r]);
  52691. i.push([e, e]);
  52692. } else {
  52693. var e = ce(t[r], function(s) {
  52694. return Math.ceil(s);
  52695. });
  52696. e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e);
  52697. }
  52698. return i;
  52699. }
  52700. function T8e(t) {
  52701. if (!t || typeof t == "object" && t.length === 0)
  52702. return [0, 0];
  52703. if (St(t)) {
  52704. var e = Math.ceil(t);
  52705. return [e, e];
  52706. }
  52707. var n = ce(t, function(r) {
  52708. return Math.ceil(r);
  52709. });
  52710. return t.length % 2 ? n.concat(n) : n;
  52711. }
  52712. function P8e(t) {
  52713. return ce(t, function(e) {
  52714. return bee(e);
  52715. });
  52716. }
  52717. function bee(t) {
  52718. for (var e = 0, n = 0; n < t.length; ++n)
  52719. e += t[n];
  52720. return t.length % 2 === 1 ? e * 2 : e;
  52721. }
  52722. function $8e(t, e) {
  52723. t.eachRawSeries(function(n) {
  52724. if (!t.isSeriesFiltered(n)) {
  52725. var r = n.getData();
  52726. r.hasItemVisual() && r.each(function(o) {
  52727. var s = r.getItemVisual(o, "decal");
  52728. if (s) {
  52729. var l = r.ensureUniqueItemVisual(o, "style");
  52730. l.decal = Fh(s, e);
  52731. }
  52732. });
  52733. var i = r.getVisual("decal");
  52734. if (i) {
  52735. var a = r.getVisual("style");
  52736. a.decal = Fh(i, e);
  52737. }
  52738. }
  52739. });
  52740. }
  52741. var ja = new Ra(), bO = {};
  52742. function A8e(t, e) {
  52743. process.env.NODE_ENV !== "production" && bO[t] && Cr("Already has an implementation of " + t + "."), bO[t] = e;
  52744. }
  52745. function _ee(t) {
  52746. return process.env.NODE_ENV !== "production" && (bO[t] || Cr("Implementation of " + t + " doesn't exists.")), bO[t];
  52747. }
  52748. var E8e = "5.5.1", M8e = {
  52749. zrender: "5.6.0"
  52750. }, I8e = 1, D8e = 800, R8e = 900, k8e = 1e3, L8e = 2e3, N8e = 5e3, Oee = 1e3, B8e = 1100, hk = 2e3, See = 3e3, z8e = 4e3, cw = 4500, V8e = 4600, F8e = 5e3, W8e = 6e3, xee = 7e3, wee = {
  52751. PROCESSOR: {
  52752. FILTER: k8e,
  52753. SERIES_FILTER: D8e,
  52754. STATISTIC: N8e
  52755. },
  52756. VISUAL: {
  52757. LAYOUT: Oee,
  52758. PROGRESSIVE_LAYOUT: B8e,
  52759. GLOBAL: hk,
  52760. CHART: See,
  52761. POST_CHART_LAYOUT: V8e,
  52762. COMPONENT: z8e,
  52763. BRUSH: F8e,
  52764. CHART_ITEM: cw,
  52765. ARIA: W8e,
  52766. DECAL: xee
  52767. }
  52768. }, Er = "__flagInMainProcess", si = "__pendingUpdate", kT = "__needsUpdateStatus", Gz = /^[a-zA-Z0-9_]+$/, LT = "__connectUpdateStatus", jz = 0, Q8e = 1, H8e = 2;
  52769. function Cee(t) {
  52770. return function() {
  52771. for (var e = [], n = 0; n < arguments.length; n++)
  52772. e[n] = arguments[n];
  52773. if (this.isDisposed()) {
  52774. Ii(this.id);
  52775. return;
  52776. }
  52777. return Pee(this, t, e);
  52778. };
  52779. }
  52780. function Tee(t) {
  52781. return function() {
  52782. for (var e = [], n = 0; n < arguments.length; n++)
  52783. e[n] = arguments[n];
  52784. return Pee(this, t, e);
  52785. };
  52786. }
  52787. function Pee(t, e, n) {
  52788. return n[0] = n[0] && n[0].toLowerCase(), Ra.prototype[e].apply(t, n);
  52789. }
  52790. var $ee = (
  52791. /** @class */
  52792. function(t) {
  52793. q(e, t);
  52794. function e() {
  52795. return t !== null && t.apply(this, arguments) || this;
  52796. }
  52797. return e;
  52798. }(Ra)
  52799. ), Aee = $ee.prototype;
  52800. Aee.on = Tee("on");
  52801. Aee.off = Tee("off");
  52802. var cd, NT, ub, vl, BT, zT, VT, cv, fv, Zz, Uz, FT, Xz, cb, Yz, Eee, ta, qz, _O = (
  52803. /** @class */
  52804. function(t) {
  52805. q(e, t);
  52806. function e(n, r, i) {
  52807. var a = t.call(this, new K4e()) || this;
  52808. a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Oe(r) && (r = Mee[r]), a._dom = n;
  52809. var o = "canvas", s = "auto", l = !1;
  52810. if (process.env.NODE_ENV !== "production") {
  52811. var u = (
  52812. /* eslint-disable-next-line */
  52813. vt.hasGlobalWindow ? window : global
  52814. );
  52815. 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));
  52816. }
  52817. i.ssr && aK(function(h) {
  52818. var p = Fe(h), v = p.dataIndex;
  52819. if (v != null) {
  52820. var g = Pe();
  52821. return g.set("series_index", p.seriesIndex), g.set("data_index", v), p.ssrType && g.set("ssr_type", p.ssrType), g;
  52822. }
  52823. });
  52824. var c = a._zr = xA(n, {
  52825. renderer: i.renderer || o,
  52826. devicePixelRatio: i.devicePixelRatio,
  52827. width: i.width,
  52828. height: i.height,
  52829. ssr: i.ssr,
  52830. useDirtyRect: We(i.useDirtyRect, l),
  52831. useCoarsePointer: We(i.useCoarsePointer, s),
  52832. pointerSize: i.pointerSize
  52833. });
  52834. a._ssr = i.ssr, a._throttledZrFlush = uw(xe(c.flush, c), 17), r = Le(r), r && NJ(r, !0), a._theme = r, a._locale = oLe(i.locale || gJ), a._coordSysMgr = new zf();
  52835. var f = a._api = Yz(a);
  52836. function d(h, p) {
  52837. return h.__prio - p.__prio;
  52838. }
  52839. return k_(SO, d), k_(KA, d), a._scheduler = new lee(a, f, KA, SO), a._messageCenter = new $ee(), a._initEvents(), a.resize = xe(a.resize, a), c.animation.on("frame", a._onframe, a), Zz(c, a), Uz(c, a), vm(a), a;
  52840. }
  52841. return e.prototype._onframe = function() {
  52842. if (!this._disposed) {
  52843. qz(this);
  52844. var n = this._scheduler;
  52845. if (this[si]) {
  52846. var r = this[si].silent;
  52847. this[Er] = !0;
  52848. try {
  52849. cd(this), vl.update.call(this, null, this[si].updateParams);
  52850. } catch (l) {
  52851. throw this[Er] = !1, this[si] = null, l;
  52852. }
  52853. this._zr.flush(), this[Er] = !1, this[si] = null, cv.call(this, r), fv.call(this, r);
  52854. } else if (n.unfinished) {
  52855. var i = I8e, a = this._model, o = this._api;
  52856. n.unfinished = !1;
  52857. do {
  52858. var s = +/* @__PURE__ */ new Date();
  52859. n.performSeriesTasks(a), n.performDataProcessorTasks(a), zT(this, a), n.performVisualTasks(a), cb(this, this._model, o, "remain", {}), i -= +/* @__PURE__ */ new Date() - s;
  52860. } while (i > 0 && n.unfinished);
  52861. n.unfinished || this._zr.flush();
  52862. }
  52863. }
  52864. }, e.prototype.getDom = function() {
  52865. return this._dom;
  52866. }, e.prototype.getId = function() {
  52867. return this.id;
  52868. }, e.prototype.getZr = function() {
  52869. return this._zr;
  52870. }, e.prototype.isSSR = function() {
  52871. return this._ssr;
  52872. }, e.prototype.setOption = function(n, r, i) {
  52873. if (this[Er]) {
  52874. process.env.NODE_ENV !== "production" && Cr("`setOption` should not be called during main process.");
  52875. return;
  52876. }
  52877. if (this._disposed) {
  52878. Ii(this.id);
  52879. return;
  52880. }
  52881. var a, o, s;
  52882. if (Ie(r) && (i = r.lazyUpdate, a = r.silent, o = r.replaceMerge, s = r.transition, r = r.notMerge), this[Er] = !0, !this._model || r) {
  52883. var l = new kLe(this._api), u = this._theme, c = this._model = new ak();
  52884. c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, u, this._locale, l);
  52885. }
  52886. this._model.setOption(n, {
  52887. replaceMerge: o
  52888. }, JA);
  52889. var f = {
  52890. seriesTransition: s,
  52891. optionChanged: !0
  52892. };
  52893. if (i)
  52894. this[si] = {
  52895. silent: a,
  52896. updateParams: f
  52897. }, this[Er] = !1, this.getZr().wakeUp();
  52898. else {
  52899. try {
  52900. cd(this), vl.update.call(this, null, f);
  52901. } catch (d) {
  52902. throw this[si] = null, this[Er] = !1, d;
  52903. }
  52904. this._ssr || this._zr.flush(), this[si] = null, this[Er] = !1, cv.call(this, a), fv.call(this, a);
  52905. }
  52906. }, e.prototype.setTheme = function() {
  52907. Ea("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
  52908. }, e.prototype.getModel = function() {
  52909. return this._model;
  52910. }, e.prototype.getOption = function() {
  52911. return this._model && this._model.getOption();
  52912. }, e.prototype.getWidth = function() {
  52913. return this._zr.getWidth();
  52914. }, e.prototype.getHeight = function() {
  52915. return this._zr.getHeight();
  52916. }, e.prototype.getDevicePixelRatio = function() {
  52917. return this._zr.painter.dpr || vt.hasGlobalWindow && window.devicePixelRatio || 1;
  52918. }, e.prototype.getRenderedCanvas = function(n) {
  52919. return process.env.NODE_ENV !== "production" && Cn("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(n);
  52920. }, e.prototype.renderToCanvas = function(n) {
  52921. n = n || {};
  52922. var r = this._zr.painter;
  52923. if (process.env.NODE_ENV !== "production" && r.type !== "canvas")
  52924. throw new Error("renderToCanvas can only be used in the canvas renderer.");
  52925. return r.getRenderedCanvas({
  52926. backgroundColor: n.backgroundColor || this._model.get("backgroundColor"),
  52927. pixelRatio: n.pixelRatio || this.getDevicePixelRatio()
  52928. });
  52929. }, e.prototype.renderToSVGString = function(n) {
  52930. n = n || {};
  52931. var r = this._zr.painter;
  52932. if (process.env.NODE_ENV !== "production" && r.type !== "svg")
  52933. throw new Error("renderToSVGString can only be used in the svg renderer.");
  52934. return r.renderToString({
  52935. useViewBox: n.useViewBox
  52936. });
  52937. }, e.prototype.getSvgDataURL = function() {
  52938. if (vt.svgSupported) {
  52939. var n = this._zr, r = n.storage.getDisplayList();
  52940. return k(r, function(i) {
  52941. i.stopAnimation(null, !0);
  52942. }), n.painter.toDataURL();
  52943. }
  52944. }, e.prototype.getDataURL = function(n) {
  52945. if (this._disposed) {
  52946. Ii(this.id);
  52947. return;
  52948. }
  52949. n = n || {};
  52950. var r = n.excludeComponents, i = this._model, a = [], o = this;
  52951. k(r, function(l) {
  52952. i.eachComponent({
  52953. mainType: l
  52954. }, function(u) {
  52955. var c = o._componentsMap[u.__viewId];
  52956. c.group.ignore || (a.push(c), c.group.ignore = !0);
  52957. });
  52958. });
  52959. var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(n).toDataURL("image/" + (n && n.type || "png"));
  52960. return k(a, function(l) {
  52961. l.group.ignore = !1;
  52962. }), s;
  52963. }, e.prototype.getConnectedDataURL = function(n) {
  52964. if (this._disposed) {
  52965. Ii(this.id);
  52966. return;
  52967. }
  52968. var r = n.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0;
  52969. if (xO[i]) {
  52970. var l = s, u = s, c = -s, f = -s, d = [], h = n && n.pixelRatio || this.getDevicePixelRatio();
  52971. k(tf, function(b, _) {
  52972. if (b.group === i) {
  52973. var O = r ? b.getZr().painter.getSvgDom().innerHTML : b.renderToCanvas(Le(n)), S = b.getDom().getBoundingClientRect();
  52974. l = a(S.left, l), u = a(S.top, u), c = o(S.right, c), f = o(S.bottom, f), d.push({
  52975. dom: O,
  52976. left: S.left,
  52977. top: S.top
  52978. });
  52979. }
  52980. }), l *= h, u *= h, c *= h, f *= h;
  52981. var p = c - l, v = f - u, g = io.createCanvas(), m = xA(g, {
  52982. renderer: r ? "svg" : "canvas"
  52983. });
  52984. if (m.resize({
  52985. width: p,
  52986. height: v
  52987. }), r) {
  52988. var y = "";
  52989. return k(d, function(b) {
  52990. var _ = b.left - l, O = b.top - u;
  52991. y += '<g transform="translate(' + _ + "," + O + ')">' + b.dom + "</g>";
  52992. }), m.painter.getSvgRoot().innerHTML = y, n.connectedBackgroundColor && m.painter.setBackgroundColor(n.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL();
  52993. } else
  52994. return n.connectedBackgroundColor && m.add(new mt({
  52995. shape: {
  52996. x: 0,
  52997. y: 0,
  52998. width: p,
  52999. height: v
  53000. },
  53001. style: {
  53002. fill: n.connectedBackgroundColor
  53003. }
  53004. })), k(d, function(b) {
  53005. var _ = new lr({
  53006. style: {
  53007. x: b.left * h - l,
  53008. y: b.top * h - u,
  53009. image: b.dom
  53010. }
  53011. });
  53012. m.add(_);
  53013. }), m.refreshImmediately(), g.toDataURL("image/" + (n && n.type || "png"));
  53014. } else
  53015. return this.getDataURL(n);
  53016. }, e.prototype.convertToPixel = function(n, r) {
  53017. return BT(this, "convertToPixel", n, r);
  53018. }, e.prototype.convertFromPixel = function(n, r) {
  53019. return BT(this, "convertFromPixel", n, r);
  53020. }, e.prototype.containPixel = function(n, r) {
  53021. if (this._disposed) {
  53022. Ii(this.id);
  53023. return;
  53024. }
  53025. var i = this._model, a, o = $g(i, n);
  53026. return k(o, function(s, l) {
  53027. l.indexOf("Models") >= 0 && k(s, function(u) {
  53028. var c = u.coordinateSystem;
  53029. if (c && c.containPoint)
  53030. a = a || !!c.containPoint(r);
  53031. else if (l === "seriesModels") {
  53032. var f = this._chartsMap[u.__viewId];
  53033. 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."));
  53034. } else
  53035. process.env.NODE_ENV !== "production" && dn(l + ": containPoint is not supported");
  53036. }, this);
  53037. }, this), !!a;
  53038. }, e.prototype.getVisual = function(n, r) {
  53039. var i = this._model, a = $g(i, n, {
  53040. defaultMainType: "series"
  53041. }), o = a.seriesModel;
  53042. process.env.NODE_ENV !== "production" && (o || dn("There is no specified series model"));
  53043. var s = o.getData(), l = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null;
  53044. return l != null ? ck(s, l, r) : H0(s, r);
  53045. }, e.prototype.getViewOfComponentModel = function(n) {
  53046. return this._componentsMap[n.__viewId];
  53047. }, e.prototype.getViewOfSeriesModel = function(n) {
  53048. return this._chartsMap[n.__viewId];
  53049. }, e.prototype._initEvents = function() {
  53050. var n = this;
  53051. k(G8e, function(r) {
  53052. var i = function(a) {
  53053. var o = n.getModel(), s = a.target, l, u = r === "globalout";
  53054. if (u ? l = {} : s && Bc(s, function(p) {
  53055. var v = Fe(p);
  53056. if (v && v.dataIndex != null) {
  53057. var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex);
  53058. return l = g && g.getDataParams(v.dataIndex, v.dataType, s) || {}, !0;
  53059. } else if (v.eventData)
  53060. return l = le({}, v.eventData), !0;
  53061. }, !0), l) {
  53062. var c = l.componentType, f = l.componentIndex;
  53063. (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = l.seriesIndex);
  53064. var d = c && f != null && o.getComponent(c, f), h = d && n[d.mainType === "series" ? "_chartsMap" : "_componentsMap"][d.__viewId];
  53065. 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 = {
  53066. targetEl: s,
  53067. packedEvent: l,
  53068. model: d,
  53069. view: h
  53070. }, n.trigger(r, l);
  53071. }
  53072. };
  53073. i.zrEventfulCallAtLast = !0, n._zr.on(r, i, n);
  53074. }), k(Rg, function(r, i) {
  53075. n._messageCenter.on(i, function(a) {
  53076. this.trigger(i, a);
  53077. }, n);
  53078. }), k(["selectchanged"], function(r) {
  53079. n._messageCenter.on(r, function(i) {
  53080. this.trigger(r, i);
  53081. }, n);
  53082. }), t8e(this._messageCenter, this, this._api);
  53083. }, e.prototype.isDisposed = function() {
  53084. return this._disposed;
  53085. }, e.prototype.clear = function() {
  53086. if (this._disposed) {
  53087. Ii(this.id);
  53088. return;
  53089. }
  53090. this.setOption({
  53091. series: []
  53092. }, !0);
  53093. }, e.prototype.dispose = function() {
  53094. if (this._disposed) {
  53095. Ii(this.id);
  53096. return;
  53097. }
  53098. this._disposed = !0;
  53099. var n = this.getDom();
  53100. n && vK(this.getDom(), vk, "");
  53101. var r = this, i = r._api, a = r._model;
  53102. k(r._componentsViews, function(o) {
  53103. o.dispose(a, i);
  53104. }), k(r._chartsViews, function(o) {
  53105. o.dispose(a, i);
  53106. }), 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 tf[r.id];
  53107. }, e.prototype.resize = function(n) {
  53108. if (this[Er]) {
  53109. process.env.NODE_ENV !== "production" && Cr("`resize` should not be called during main process.");
  53110. return;
  53111. }
  53112. if (this._disposed) {
  53113. Ii(this.id);
  53114. return;
  53115. }
  53116. this._zr.resize(n);
  53117. var r = this._model;
  53118. if (this._loadingFX && this._loadingFX.resize(), !!r) {
  53119. var i = r.resetOption("media"), a = n && n.silent;
  53120. this[si] && (a == null && (a = this[si].silent), i = !0, this[si] = null), this[Er] = !0;
  53121. try {
  53122. i && cd(this), vl.update.call(this, {
  53123. type: "resize",
  53124. animation: le({
  53125. // Disable animation
  53126. duration: 0
  53127. }, n && n.animation)
  53128. });
  53129. } catch (o) {
  53130. throw this[Er] = !1, o;
  53131. }
  53132. this[Er] = !1, cv.call(this, a), fv.call(this, a);
  53133. }
  53134. }, e.prototype.showLoading = function(n, r) {
  53135. if (this._disposed) {
  53136. Ii(this.id);
  53137. return;
  53138. }
  53139. if (Ie(n) && (r = n, n = ""), n = n || "default", this.hideLoading(), !eE[n]) {
  53140. process.env.NODE_ENV !== "production" && dn("Loading effects " + n + " not exists.");
  53141. return;
  53142. }
  53143. var i = eE[n](this._api, r), a = this._zr;
  53144. this._loadingFX = i, a.add(i);
  53145. }, e.prototype.hideLoading = function() {
  53146. if (this._disposed) {
  53147. Ii(this.id);
  53148. return;
  53149. }
  53150. this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
  53151. }, e.prototype.makeActionFromEvent = function(n) {
  53152. var r = le({}, n);
  53153. return r.type = Rg[n.type], r;
  53154. }, e.prototype.dispatchAction = function(n, r) {
  53155. if (this._disposed) {
  53156. Ii(this.id);
  53157. return;
  53158. }
  53159. if (Ie(r) || (r = {
  53160. silent: !!r
  53161. }), !!OO[n.type] && this._model) {
  53162. if (this[Er]) {
  53163. this._pendingActions.push(n);
  53164. return;
  53165. }
  53166. var i = r.silent;
  53167. VT.call(this, n, i);
  53168. var a = r.flush;
  53169. a ? this._zr.flush() : a !== !1 && vt.browser.weChat && this._throttledZrFlush(), cv.call(this, i), fv.call(this, i);
  53170. }
  53171. }, e.prototype.updateLabelLayout = function() {
  53172. ja.trigger("series:layoutlabels", this._model, this._api, {
  53173. // Not adding series labels.
  53174. // TODO
  53175. updatedSeries: []
  53176. });
  53177. }, e.prototype.appendData = function(n) {
  53178. if (this._disposed) {
  53179. Ii(this.id);
  53180. return;
  53181. }
  53182. var r = n.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(r);
  53183. process.env.NODE_ENV !== "production" && ke(n.data && a), a.appendData(n), this._scheduler.unfinished = !0, this.getZr().wakeUp();
  53184. }, e.internalField = function() {
  53185. cd = function(f) {
  53186. var d = f._scheduler;
  53187. d.restorePipelines(f._model), d.prepareStageTasks(), NT(f, !0), NT(f, !1), d.plan();
  53188. }, NT = function(f, d) {
  53189. 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++)
  53190. v[b].__alive = !1;
  53191. d ? h.eachComponent(function(S, x) {
  53192. S !== "series" && _(x);
  53193. }) : h.eachSeries(_);
  53194. function _(S) {
  53195. var x = S.__requireNewView;
  53196. S.__requireNewView = !1;
  53197. var C = "_ec_" + S.id + "_" + S.type, T = !x && g[C];
  53198. if (!T) {
  53199. var w = Vo(S.type), P = d ? Xt.getClass(w.main, w.sub) : (
  53200. // FIXME:TS
  53201. // (ChartView as ChartViewConstructor).getClass('series', classType.sub)
  53202. // For backward compat, still support a chart type declared as only subType
  53203. // like "liquidfill", but recommend "series.liquidfill"
  53204. // But need a base class to make a type series.
  53205. zt.getClass(w.sub)
  53206. );
  53207. 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);
  53208. }
  53209. S.__viewId = T.__id = C, T.__alive = !0, T.__model = S, T.group.__ecComponentInfo = {
  53210. mainType: S.mainType,
  53211. index: S.componentIndex
  53212. }, !d && p.prepareView(T, S, h, y);
  53213. }
  53214. for (var b = 0; b < v.length; ) {
  53215. var O = v[b];
  53216. 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);
  53217. }
  53218. }, ub = function(f, d, h, p, v) {
  53219. var g = f._model;
  53220. if (g.setUpdatePayload(h), !p) {
  53221. k([].concat(f._componentsViews).concat(f._chartsViews), O);
  53222. return;
  53223. }
  53224. var m = {};
  53225. m[p + "Id"] = h[p + "Id"], m[p + "Index"] = h[p + "Index"], m[p + "Name"] = h[p + "Name"];
  53226. var y = {
  53227. mainType: p,
  53228. query: m
  53229. };
  53230. v && (y.subType = v);
  53231. var b = h.excludeSeriesId, _;
  53232. b != null && (_ = Pe(), k(Qt(b), function(S) {
  53233. var x = Vn(S, null);
  53234. x != null && _.set(x, !0);
  53235. })), g && g.eachComponent(y, function(S) {
  53236. var x = _ && _.get(S.id) != null;
  53237. if (!x)
  53238. if (DB(h))
  53239. if (S instanceof Ht)
  53240. h.type === Jc && !h.notBlur && !S.get(["emphasis", "disabled"]) && ike(S, h, f._api);
  53241. else {
  53242. var C = BR(S.mainType, S.componentIndex, h.name, f._api), T = C.focusSelf, w = C.dispatchers;
  53243. h.type === Jc && T && !h.notBlur && DA(S.mainType, S.componentIndex, f._api), w && k(w, function(P) {
  53244. h.type === Jc ? js(P) : Zs(P);
  53245. });
  53246. }
  53247. else kA(h) && S instanceof Ht && (ske(S, h, f._api), MB(S), ta(f));
  53248. }, f), g && g.eachComponent(y, function(S) {
  53249. var x = _ && _.get(S.id) != null;
  53250. x || O(f[p === "series" ? "_chartsMap" : "_componentsMap"][S.__viewId]);
  53251. }, f);
  53252. function O(S) {
  53253. S && S.__alive && S[d] && S[d](S.__model, g, f._api, h);
  53254. }
  53255. }, vl = {
  53256. prepareAndUpdate: function(f) {
  53257. cd(this), vl.update.call(this, f, {
  53258. // Needs to mark option changed if newOption is given.
  53259. // It's from MagicType.
  53260. // TODO If use a separate flag optionChanged in payload?
  53261. optionChanged: f.newOption != null
  53262. });
  53263. },
  53264. update: function(f, d) {
  53265. var h = this._model, p = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler;
  53266. if (h) {
  53267. h.setUpdatePayload(f), m.restoreData(h, f), m.performSeriesTasks(h), g.create(h, p), m.performDataProcessorTasks(h, f), zT(this, h), g.update(h, p), n(h), m.performVisualTasks(h, f), FT(this, h, p, f, d);
  53268. var y = h.get("backgroundColor") || "transparent", b = h.get("darkMode");
  53269. v.setBackgroundColor(y), b != null && b !== "auto" && v.setDarkMode(b), ja.trigger("afterupdate", h, p);
  53270. }
  53271. },
  53272. updateTransform: function(f) {
  53273. var d = this, h = this._model, p = this._api;
  53274. if (h) {
  53275. h.setUpdatePayload(f);
  53276. var v = [];
  53277. h.eachComponent(function(m, y) {
  53278. if (m !== "series") {
  53279. var b = d.getViewOfComponentModel(y);
  53280. if (b && b.__alive)
  53281. if (b.updateTransform) {
  53282. var _ = b.updateTransform(y, h, p, f);
  53283. _ && _.update && v.push(b);
  53284. } else
  53285. v.push(b);
  53286. }
  53287. });
  53288. var g = Pe();
  53289. h.eachSeries(function(m) {
  53290. var y = d._chartsMap[m.__viewId];
  53291. if (y.updateTransform) {
  53292. var b = y.updateTransform(m, h, p, f);
  53293. b && b.update && g.set(m.uid, 1);
  53294. } else
  53295. g.set(m.uid, 1);
  53296. }), n(h), this._scheduler.performVisualTasks(h, f, {
  53297. setDirty: !0,
  53298. dirtyMap: g
  53299. }), cb(this, h, p, f, {}, g), ja.trigger("afterupdate", h, p);
  53300. }
  53301. },
  53302. updateView: function(f) {
  53303. var d = this._model;
  53304. d && (d.setUpdatePayload(f), zt.markUpdateMethod(f, "updateView"), n(d), this._scheduler.performVisualTasks(d, f, {
  53305. setDirty: !0
  53306. }), FT(this, d, this._api, f, {}), ja.trigger("afterupdate", d, this._api));
  53307. },
  53308. updateVisual: function(f) {
  53309. var d = this, h = this._model;
  53310. h && (h.setUpdatePayload(f), h.eachSeries(function(p) {
  53311. p.getData().clearAllVisual();
  53312. }), zt.markUpdateMethod(f, "updateVisual"), n(h), this._scheduler.performVisualTasks(h, f, {
  53313. visualType: "visual",
  53314. setDirty: !0
  53315. }), h.eachComponent(function(p, v) {
  53316. if (p !== "series") {
  53317. var g = d.getViewOfComponentModel(v);
  53318. g && g.__alive && g.updateVisual(v, h, d._api, f);
  53319. }
  53320. }), h.eachSeries(function(p) {
  53321. var v = d._chartsMap[p.__viewId];
  53322. v.updateVisual(p, h, d._api, f);
  53323. }), ja.trigger("afterupdate", h, this._api));
  53324. },
  53325. updateLayout: function(f) {
  53326. vl.update.call(this, f);
  53327. }
  53328. }, BT = function(f, d, h, p) {
  53329. if (f._disposed) {
  53330. Ii(f.id);
  53331. return;
  53332. }
  53333. for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = $g(v, h), b = 0; b < g.length; b++) {
  53334. var _ = g[b];
  53335. if (_[d] && (m = _[d](v, y, p)) != null)
  53336. return m;
  53337. }
  53338. process.env.NODE_ENV !== "production" && dn("No coordinate system that supports " + d + " found by the given finder.");
  53339. }, zT = function(f, d) {
  53340. var h = f._chartsMap, p = f._scheduler;
  53341. d.eachSeries(function(v) {
  53342. p.updateStreamModes(v, h[v.__viewId]);
  53343. });
  53344. }, VT = function(f, d) {
  53345. var h = this, p = this.getModel(), v = f.type, g = f.escapeConnect, m = OO[v], y = m.actionInfo, b = (y.update || "update").split(":"), _ = b.pop(), O = b[0] != null && Vo(b[0]);
  53346. this[Er] = !0;
  53347. var S = [f], x = !1;
  53348. f.batch && (x = !0, S = ce(f.batch, function(D) {
  53349. return D = Re(le({}, D), f), D.batch = null, D;
  53350. }));
  53351. var C = [], T, w = kA(f), P = DB(f);
  53352. if (P && VK(this._api), k(S, function(D) {
  53353. if (T = m.action(D, h._model, h._api), T = T || le({}, D), T.type = y.event || T.type, C.push(T), P) {
  53354. var E = ER(f), R = E.queryOptionMap, N = E.mainTypeSpecified, V = N ? R.keys()[0] : "series";
  53355. ub(h, _, D, V), ta(h);
  53356. } else w ? (ub(h, _, D, "series"), ta(h)) : O && ub(h, _, D, O.main, O.sub);
  53357. }), _ !== "none" && !P && !w && !O)
  53358. try {
  53359. this[si] ? (cd(this), vl.update.call(this, f), this[si] = null) : vl[_].call(this, f);
  53360. } catch (D) {
  53361. throw this[Er] = !1, D;
  53362. }
  53363. if (x ? T = {
  53364. type: y.event || v,
  53365. escapeConnect: g,
  53366. batch: C
  53367. } : T = C[0], this[Er] = !1, !d) {
  53368. var $ = this._messageCenter;
  53369. if ($.trigger(T.type, T), w) {
  53370. var A = {
  53371. type: "selectchanged",
  53372. escapeConnect: g,
  53373. selected: lke(p),
  53374. isFromClick: f.isFromClick || !1,
  53375. fromAction: f.type,
  53376. fromActionPayload: f
  53377. };
  53378. $.trigger(A.type, A);
  53379. }
  53380. }
  53381. }, cv = function(f) {
  53382. for (var d = this._pendingActions; d.length; ) {
  53383. var h = d.shift();
  53384. VT.call(this, h, f);
  53385. }
  53386. }, fv = function(f) {
  53387. !f && this.trigger("updated");
  53388. }, Zz = function(f, d) {
  53389. f.on("rendered", function(h) {
  53390. d.trigger("rendered", h), // Although zr is dirty if initial animation is not finished
  53391. // and this checking is called on frame, we also check
  53392. // animation finished for robustness.
  53393. f.animation.isFinished() && !d[si] && !d._scheduler.unfinished && !d._pendingActions.length && d.trigger("finished");
  53394. });
  53395. }, Uz = function(f, d) {
  53396. f.on("mouseover", function(h) {
  53397. var p = h.target, v = Bc(p, lu);
  53398. v && (ake(v, h, d._api), ta(d));
  53399. }).on("mouseout", function(h) {
  53400. var p = h.target, v = Bc(p, lu);
  53401. v && (oke(v, h, d._api), ta(d));
  53402. }).on("click", function(h) {
  53403. var p = h.target, v = Bc(p, function(y) {
  53404. return Fe(y).dataIndex != null;
  53405. }, !0);
  53406. if (v) {
  53407. var g = v.selected ? "unselect" : "select", m = Fe(v);
  53408. d._api.dispatchAction({
  53409. type: g,
  53410. dataType: m.dataType,
  53411. dataIndexInside: m.dataIndex,
  53412. seriesIndex: m.seriesIndex,
  53413. isFromClick: !0
  53414. });
  53415. }
  53416. });
  53417. };
  53418. function n(f) {
  53419. f.clearColorPalette(), f.eachSeries(function(d) {
  53420. d.clearColorPalette();
  53421. });
  53422. }
  53423. function r(f) {
  53424. var d = [], h = [], p = !1;
  53425. if (f.eachComponent(function(y, b) {
  53426. var _ = b.get("zlevel") || 0, O = b.get("z") || 0, S = b.getZLevelKey();
  53427. p = p || !!S, (y === "series" ? h : d).push({
  53428. zlevel: _,
  53429. z: O,
  53430. idx: b.componentIndex,
  53431. type: y,
  53432. key: S
  53433. });
  53434. }), p) {
  53435. var v = d.concat(h), g, m;
  53436. k_(v, function(y, b) {
  53437. return y.zlevel === b.zlevel ? y.z - b.z : y.zlevel - b.zlevel;
  53438. }), k(v, function(y) {
  53439. var b = f.getComponent(y.type, y.idx), _ = y.zlevel, O = y.key;
  53440. g != null && (_ = Math.max(g, _)), O ? (_ === g && O !== m && _++, m = O) : m && (_ === g && _++, m = ""), g = _, b.setZLevel(_);
  53441. });
  53442. }
  53443. }
  53444. FT = function(f, d, h, p, v) {
  53445. r(d), Xz(f, d, h, p, v), k(f._chartsViews, function(g) {
  53446. g.__alive = !1;
  53447. }), cb(f, d, h, p, v), k(f._chartsViews, function(g) {
  53448. g.__alive || g.remove(d, h);
  53449. });
  53450. }, Xz = function(f, d, h, p, v, g) {
  53451. k(g || f._componentsViews, function(m) {
  53452. var y = m.__model;
  53453. u(y, m), m.render(y, d, h, p), s(y, m), c(y, m);
  53454. });
  53455. }, cb = function(f, d, h, p, v, g) {
  53456. var m = f._scheduler;
  53457. v = le(v || {}, {
  53458. updatedSeries: d.getSeries()
  53459. }), ja.trigger("series:beforeupdate", d, h, v);
  53460. var y = !1;
  53461. d.eachSeries(function(b) {
  53462. var _ = f._chartsMap[b.__viewId];
  53463. _.__alive = !0;
  53464. var O = _.renderTask;
  53465. 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, _), MB(b);
  53466. }), m.unfinished = y || m.unfinished, ja.trigger("series:layoutlabels", d, h, v), ja.trigger("series:transition", d, h, v), d.eachSeries(function(b) {
  53467. var _ = f._chartsMap[b.__viewId];
  53468. s(b, _), c(b, _);
  53469. }), a(f, d), ja.trigger("series:afterupdate", d, h, v);
  53470. }, ta = function(f) {
  53471. f[kT] = !0, f.getZr().wakeUp();
  53472. }, qz = function(f) {
  53473. f[kT] && (f.getZr().storage.traverse(function(d) {
  53474. th(d) || i(d);
  53475. }), f[kT] = !1);
  53476. };
  53477. function i(f) {
  53478. for (var d = [], h = f.currentStates, p = 0; p < h.length; p++) {
  53479. var v = h[p];
  53480. v === "emphasis" || v === "blur" || v === "select" || d.push(v);
  53481. }
  53482. f.selected && f.states.select && d.push("select"), f.hoverState === Zx && f.states.emphasis ? d.push("emphasis") : f.hoverState === B0 && f.states.blur && d.push("blur"), f.useStates(d);
  53483. }
  53484. function a(f, d) {
  53485. var h = f._zr, p = h.storage, v = 0;
  53486. p.traverse(function(g) {
  53487. g.isGroup || v++;
  53488. }), v > d.get("hoverLayerThreshold") && !vt.node && !vt.worker && d.eachSeries(function(g) {
  53489. if (!g.preventUsingHoverLayer) {
  53490. var m = f._chartsMap[g.__viewId];
  53491. m.__alive && m.eachRendered(function(y) {
  53492. y.states.emphasis && (y.states.emphasis.hoverLayer = !0);
  53493. });
  53494. }
  53495. });
  53496. }
  53497. function o(f, d) {
  53498. var h = f.get("blendMode") || null;
  53499. d.eachRendered(function(p) {
  53500. p.isGroup || (p.style.blend = h);
  53501. });
  53502. }
  53503. function s(f, d) {
  53504. if (!f.preventAutoZ) {
  53505. var h = f.get("z") || 0, p = f.get("zlevel") || 0;
  53506. d.eachRendered(function(v) {
  53507. return l(v, h, p, -1 / 0), !0;
  53508. });
  53509. }
  53510. }
  53511. function l(f, d, h, p) {
  53512. var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup;
  53513. if (m)
  53514. for (var y = f.childrenRef(), b = 0; b < y.length; b++)
  53515. p = Math.max(l(y[b], d, h, p), p);
  53516. else
  53517. f.z = d, f.zlevel = h, p = Math.max(f.z2, p);
  53518. if (v && (v.z = d, v.zlevel = h, isFinite(p) && (v.z2 = p + 2)), g) {
  53519. var _ = f.textGuideLineConfig;
  53520. g.z = d, g.zlevel = h, isFinite(p) && (g.z2 = p + (_ && _.showAbove ? 1 : -1));
  53521. }
  53522. return p;
  53523. }
  53524. function u(f, d) {
  53525. d.eachRendered(function(h) {
  53526. if (!th(h)) {
  53527. var p = h.getTextContent(), v = h.getTextGuideLine();
  53528. 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);
  53529. }
  53530. });
  53531. }
  53532. function c(f, d) {
  53533. var h = f.getModel("stateAnimation"), p = f.isAnimationEnabled(), v = h.get("duration"), g = v > 0 ? {
  53534. duration: v,
  53535. delay: h.get("delay"),
  53536. easing: h.get("easing")
  53537. // additive: stateAnimationModel.get('additive')
  53538. } : null;
  53539. d.eachRendered(function(m) {
  53540. if (m.states && m.states.emphasis) {
  53541. if (th(m))
  53542. return;
  53543. if (m instanceof ot && hke(m), m.__dirty) {
  53544. var y = m.prevStates;
  53545. y && m.useStates(y);
  53546. }
  53547. if (p) {
  53548. m.stateTransition = g;
  53549. var b = m.getTextContent(), _ = m.getTextGuideLine();
  53550. b && (b.stateTransition = g), _ && (_.stateTransition = g);
  53551. }
  53552. m.__dirty && i(m);
  53553. }
  53554. });
  53555. }
  53556. Yz = function(f) {
  53557. return new /** @class */
  53558. (function(d) {
  53559. q(h, d);
  53560. function h() {
  53561. return d !== null && d.apply(this, arguments) || this;
  53562. }
  53563. return h.prototype.getCoordinateSystems = function() {
  53564. return f._coordSysMgr.getCoordinateSystems();
  53565. }, h.prototype.getComponentByElement = function(p) {
  53566. for (; p; ) {
  53567. var v = p.__ecComponentInfo;
  53568. if (v != null)
  53569. return f._model.getComponent(v.mainType, v.index);
  53570. p = p.parent;
  53571. }
  53572. }, h.prototype.enterEmphasis = function(p, v) {
  53573. js(p, v), ta(f);
  53574. }, h.prototype.leaveEmphasis = function(p, v) {
  53575. Zs(p, v), ta(f);
  53576. }, h.prototype.enterBlur = function(p) {
  53577. LK(p), ta(f);
  53578. }, h.prototype.leaveBlur = function(p) {
  53579. NR(p), ta(f);
  53580. }, h.prototype.enterSelect = function(p) {
  53581. NK(p), ta(f);
  53582. }, h.prototype.leaveSelect = function(p) {
  53583. BK(p), ta(f);
  53584. }, h.prototype.getModel = function() {
  53585. return f.getModel();
  53586. }, h.prototype.getViewOfComponentModel = function(p) {
  53587. return f.getViewOfComponentModel(p);
  53588. }, h.prototype.getViewOfSeriesModel = function(p) {
  53589. return f.getViewOfSeriesModel(p);
  53590. }, h;
  53591. }(kJ))(f);
  53592. }, Eee = function(f) {
  53593. function d(h, p) {
  53594. for (var v = 0; v < h.length; v++) {
  53595. var g = h[v];
  53596. g[LT] = p;
  53597. }
  53598. }
  53599. k(Rg, function(h, p) {
  53600. f._messageCenter.on(p, function(v) {
  53601. if (xO[f.group] && f[LT] !== jz) {
  53602. if (v && v.escapeConnect)
  53603. return;
  53604. var g = f.makeActionFromEvent(v), m = [];
  53605. k(tf, function(y) {
  53606. y !== f && y.group === f.group && m.push(y);
  53607. }), d(m, jz), k(m, function(y) {
  53608. y[LT] !== Q8e && y.dispatchAction(g);
  53609. }), d(m, H8e);
  53610. }
  53611. });
  53612. });
  53613. };
  53614. }(), e;
  53615. }(Ra)
  53616. ), pk = _O.prototype;
  53617. pk.on = Cee("on");
  53618. pk.off = Cee("off");
  53619. pk.one = function(t, e, n) {
  53620. var r = this;
  53621. Ea("ECharts#one is deprecated.");
  53622. function i() {
  53623. for (var a = [], o = 0; o < arguments.length; o++)
  53624. a[o] = arguments[o];
  53625. e && e.apply && e.apply(this, a), r.off(t, i);
  53626. }
  53627. this.on.call(this, t, i, n);
  53628. };
  53629. var G8e = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  53630. function Ii(t) {
  53631. process.env.NODE_ENV !== "production" && dn("Instance " + t + " has been disposed");
  53632. }
  53633. var OO = {}, Rg = {}, KA = [], JA = [], SO = [], Mee = {}, eE = {}, tf = {}, xO = {}, j8e = +/* @__PURE__ */ new Date() - 0, Z8e = +/* @__PURE__ */ new Date() - 0, vk = "_echarts_instance_";
  53634. function Iee(t, e, n) {
  53635. var r = !(n && n.ssr);
  53636. if (r) {
  53637. if (process.env.NODE_ENV !== "production" && !t)
  53638. throw new Error("Initialize failed: invalid dom.");
  53639. var i = gk(t);
  53640. if (i)
  53641. return process.env.NODE_ENV !== "production" && dn("There is a chart instance already initialized on the dom."), i;
  53642. 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.");
  53643. }
  53644. var a = new _O(t, e, n);
  53645. return a.id = "ec_" + j8e++, tf[a.id] = a, r && vK(t, vk, a.id), Eee(a), ja.trigger("afterinit", a), a;
  53646. }
  53647. function U8e(t) {
  53648. if (ue(t)) {
  53649. var e = t;
  53650. t = null, k(e, function(n) {
  53651. n.group != null && (t = n.group);
  53652. }), t = t || "g_" + Z8e++, k(e, function(n) {
  53653. n.group = t;
  53654. });
  53655. }
  53656. return xO[t] = !0, t;
  53657. }
  53658. function Dee(t) {
  53659. xO[t] = !1;
  53660. }
  53661. var X8e = Dee;
  53662. function Y8e(t) {
  53663. Oe(t) ? t = tf[t] : t instanceof _O || (t = gk(t)), t instanceof _O && !t.isDisposed() && t.dispose();
  53664. }
  53665. function gk(t) {
  53666. return tf[tRe(t, vk)];
  53667. }
  53668. function q8e(t) {
  53669. return tf[t];
  53670. }
  53671. function mk(t, e) {
  53672. Mee[t] = e;
  53673. }
  53674. function yk(t) {
  53675. et(JA, t) < 0 && JA.push(t);
  53676. }
  53677. function bk(t, e) {
  53678. _k(KA, t, e, L8e);
  53679. }
  53680. function Ree(t) {
  53681. fw("afterinit", t);
  53682. }
  53683. function kee(t) {
  53684. fw("afterupdate", t);
  53685. }
  53686. function fw(t, e) {
  53687. ja.on(t, e);
  53688. }
  53689. function vo(t, e, n) {
  53690. Me(e) && (n = e, e = "");
  53691. var r = Ie(t) ? t.type : [t, t = {
  53692. event: e
  53693. }][0];
  53694. t.event = (t.event || r).toLowerCase(), e = t.event, !Rg[e] && (ke(Gz.test(r) && Gz.test(e)), OO[r] || (OO[r] = {
  53695. action: n,
  53696. actionInfo: t
  53697. }), Rg[e] = r);
  53698. }
  53699. function Lee(t, e) {
  53700. zf.register(t, e);
  53701. }
  53702. function K8e(t) {
  53703. var e = zf.get(t);
  53704. if (e)
  53705. return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice();
  53706. }
  53707. function Nee(t, e) {
  53708. _k(SO, t, e, Oee, "layout");
  53709. }
  53710. function $u(t, e) {
  53711. _k(SO, t, e, See, "visual");
  53712. }
  53713. var Kz = [];
  53714. function _k(t, e, n, r, i) {
  53715. if ((Me(e) || Ie(e)) && (n = e, e = r), process.env.NODE_ENV !== "production") {
  53716. if (isNaN(e) || e == null)
  53717. throw new Error("Illegal priority");
  53718. k(t, function(o) {
  53719. ke(o.__raw !== n);
  53720. });
  53721. }
  53722. if (!(et(Kz, n) >= 0)) {
  53723. Kz.push(n);
  53724. var a = lee.wrapStageHandler(n, i);
  53725. a.__prio = e, a.__raw = n, t.push(a);
  53726. }
  53727. }
  53728. function Ok(t, e) {
  53729. eE[t] = e;
  53730. }
  53731. function J8e(t) {
  53732. process.env.NODE_ENV !== "production" && Ea("setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead."), Oq({
  53733. createCanvas: t
  53734. });
  53735. }
  53736. function Bee(t, e, n) {
  53737. var r = _ee("registerMap");
  53738. r && r(t, e, n);
  53739. }
  53740. function eNe(t) {
  53741. var e = _ee("getMap");
  53742. return e && e(t);
  53743. }
  53744. var zee = h4e;
  53745. $u(hk, B4e);
  53746. $u(cw, z4e);
  53747. $u(cw, V4e);
  53748. $u(hk, J4e);
  53749. $u(cw, e8e);
  53750. $u(xee, $8e);
  53751. yk(NJ);
  53752. bk(R8e, ZLe);
  53753. Ok("default", F4e);
  53754. vo({
  53755. type: Jc,
  53756. event: Jc,
  53757. update: Jc
  53758. }, On);
  53759. vo({
  53760. type: V_,
  53761. event: V_,
  53762. update: V_
  53763. }, On);
  53764. vo({
  53765. type: Ag,
  53766. event: Ag,
  53767. update: Ag
  53768. }, On);
  53769. vo({
  53770. type: F_,
  53771. event: F_,
  53772. update: F_
  53773. }, On);
  53774. vo({
  53775. type: Eg,
  53776. event: Eg,
  53777. update: Eg
  53778. }, On);
  53779. mk("light", q4e);
  53780. mk("dark", dee);
  53781. var tNe = {}, Jz = [], nNe = {
  53782. registerPreprocessor: yk,
  53783. registerProcessor: bk,
  53784. registerPostInit: Ree,
  53785. registerPostUpdate: kee,
  53786. registerUpdateLifecycle: fw,
  53787. registerAction: vo,
  53788. registerCoordinateSystem: Lee,
  53789. registerLayout: Nee,
  53790. registerVisual: $u,
  53791. registerTransform: zee,
  53792. registerLoading: Ok,
  53793. registerMap: Bee,
  53794. registerImpl: A8e,
  53795. PRIORITY: wee,
  53796. ComponentModel: rt,
  53797. ComponentView: Xt,
  53798. SeriesModel: Ht,
  53799. ChartView: zt,
  53800. // TODO Use ComponentModel and SeriesModel instead of Constructor
  53801. registerComponentModel: function(t) {
  53802. rt.registerClass(t);
  53803. },
  53804. registerComponentView: function(t) {
  53805. Xt.registerClass(t);
  53806. },
  53807. registerSeriesModel: function(t) {
  53808. Ht.registerClass(t);
  53809. },
  53810. registerChartView: function(t) {
  53811. zt.registerClass(t);
  53812. },
  53813. registerSubTypeDefaulter: function(t, e) {
  53814. rt.registerSubTypeDefaulter(t, e);
  53815. },
  53816. registerPainter: function(t, e) {
  53817. rK(t, e);
  53818. }
  53819. };
  53820. function at(t) {
  53821. if (ue(t)) {
  53822. k(t, function(e) {
  53823. at(e);
  53824. });
  53825. return;
  53826. }
  53827. et(Jz, t) >= 0 || (Jz.push(t), Me(t) && (t = {
  53828. install: t
  53829. }), t.install(nNe));
  53830. }
  53831. function dv(t) {
  53832. return t == null ? 0 : t.length || 1;
  53833. }
  53834. function eV(t) {
  53835. return t;
  53836. }
  53837. var Us = (
  53838. /** @class */
  53839. function() {
  53840. function t(e, n, r, i, a, o) {
  53841. this._old = e, this._new = n, this._oldKeyGetter = r || eV, this._newKeyGetter = i || eV, this.context = a, this._diffModeMultiple = o === "multiple";
  53842. }
  53843. return t.prototype.add = function(e) {
  53844. return this._add = e, this;
  53845. }, t.prototype.update = function(e) {
  53846. return this._update = e, this;
  53847. }, t.prototype.updateManyToOne = function(e) {
  53848. return this._updateManyToOne = e, this;
  53849. }, t.prototype.updateOneToMany = function(e) {
  53850. return this._updateOneToMany = e, this;
  53851. }, t.prototype.updateManyToMany = function(e) {
  53852. return this._updateManyToMany = e, this;
  53853. }, t.prototype.remove = function(e) {
  53854. return this._remove = e, this;
  53855. }, t.prototype.execute = function() {
  53856. this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
  53857. }, t.prototype._executeOneToOne = function() {
  53858. var e = this._old, n = this._new, r = {}, i = new Array(e.length), a = new Array(n.length);
  53859. this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(n, r, a, "_newKeyGetter");
  53860. for (var o = 0; o < e.length; o++) {
  53861. var s = i[o], l = r[s], u = dv(l);
  53862. if (u > 1) {
  53863. var c = l.shift();
  53864. l.length === 1 && (r[s] = l[0]), this._update && this._update(c, o);
  53865. } else u === 1 ? (r[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
  53866. }
  53867. this._performRestAdd(a, r);
  53868. }, t.prototype._executeMultiple = function() {
  53869. var e = this._old, n = this._new, r = {}, i = {}, a = [], o = [];
  53870. this._initIndexMap(e, r, a, "_oldKeyGetter"), this._initIndexMap(n, i, o, "_newKeyGetter");
  53871. for (var s = 0; s < a.length; s++) {
  53872. var l = a[s], u = r[l], c = i[l], f = dv(u), d = dv(c);
  53873. if (f > 1 && d === 1)
  53874. this._updateManyToOne && this._updateManyToOne(c, u), i[l] = null;
  53875. else if (f === 1 && d > 1)
  53876. this._updateOneToMany && this._updateOneToMany(c, u), i[l] = null;
  53877. else if (f === 1 && d === 1)
  53878. this._update && this._update(c, u), i[l] = null;
  53879. else if (f > 1 && d > 1)
  53880. this._updateManyToMany && this._updateManyToMany(c, u), i[l] = null;
  53881. else if (f > 1)
  53882. for (var h = 0; h < f; h++)
  53883. this._remove && this._remove(u[h]);
  53884. else
  53885. this._remove && this._remove(u);
  53886. }
  53887. this._performRestAdd(o, i);
  53888. }, t.prototype._performRestAdd = function(e, n) {
  53889. for (var r = 0; r < e.length; r++) {
  53890. var i = e[r], a = n[i], o = dv(a);
  53891. if (o > 1)
  53892. for (var s = 0; s < o; s++)
  53893. this._add && this._add(a[s]);
  53894. else o === 1 && this._add && this._add(a);
  53895. n[i] = null;
  53896. }
  53897. }, t.prototype._initIndexMap = function(e, n, r, i) {
  53898. for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) {
  53899. var s = "_ec_" + this[i](e[o], o);
  53900. if (a || (r[o] = s), !!n) {
  53901. var l = n[s], u = dv(l);
  53902. u === 0 ? (n[s] = o, a && r.push(s)) : u === 1 ? n[s] = [l, o] : l.push(o);
  53903. }
  53904. }
  53905. }, t;
  53906. }()
  53907. ), rNe = (
  53908. /** @class */
  53909. function() {
  53910. function t(e, n) {
  53911. this._encode = e, this._schema = n;
  53912. }
  53913. return t.prototype.get = function() {
  53914. return {
  53915. // Do not generate full dimension name until fist used.
  53916. fullDimensions: this._getFullDimensionNames(),
  53917. encode: this._encode
  53918. };
  53919. }, t.prototype._getFullDimensionNames = function() {
  53920. return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
  53921. }, t;
  53922. }()
  53923. );
  53924. function iNe(t, e) {
  53925. var n = {}, r = n.encode = {}, i = Pe(), a = [], o = [], s = {};
  53926. k(t.dimensions, function(d) {
  53927. var h = t.getDimensionInfo(d), p = h.coordDim;
  53928. if (p) {
  53929. process.env.NODE_ENV !== "production" && ke(FA.get(p) == null);
  53930. var v = h.coordDimIndex;
  53931. WT(r, p)[v] = d, h.isExtraCoord || (i.set(p, 1), aNe(h.type) && (a[0] = d), WT(s, p)[v] = t.getDimensionIndex(h.name)), h.defaultTooltip && o.push(d);
  53932. }
  53933. FA.each(function(g, m) {
  53934. var y = WT(r, m), b = h.otherDims[m];
  53935. b != null && b !== !1 && (y[b] = h.name);
  53936. });
  53937. });
  53938. var l = [], u = {};
  53939. i.each(function(d, h) {
  53940. var p = r[h];
  53941. u[h] = p[0], l = l.concat(p);
  53942. }), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = ce(l, function(d) {
  53943. return t.getDimensionInfo(d).storeDimIndex;
  53944. }), n.encodeFirstDimNotExtra = u;
  53945. var c = r.label;
  53946. c && c.length && (a = c.slice());
  53947. var f = r.tooltip;
  53948. return f && f.length ? o = f.slice() : o.length || (o = a.slice()), r.defaultedLabel = a, r.defaultedTooltip = o, n.userOutput = new rNe(s, e), n;
  53949. }
  53950. function WT(t, e) {
  53951. return t.hasOwnProperty(e) || (t[e] = []), t[e];
  53952. }
  53953. function wO(t) {
  53954. return t === "category" ? "ordinal" : t === "time" ? "time" : "float";
  53955. }
  53956. function aNe(t) {
  53957. return !(t === "ordinal" || t === "time");
  53958. }
  53959. var j_ = (
  53960. /** @class */
  53961. /* @__PURE__ */ function() {
  53962. function t(e) {
  53963. this.otherDims = {}, e != null && le(this, e);
  53964. }
  53965. return t;
  53966. }()
  53967. ), oNe = bt(), sNe = {
  53968. float: "f",
  53969. int: "i",
  53970. ordinal: "o",
  53971. number: "n",
  53972. time: "t"
  53973. }, Vee = (
  53974. /** @class */
  53975. function() {
  53976. function t(e) {
  53977. this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
  53978. }
  53979. return t.prototype.isDimensionOmitted = function() {
  53980. return this._dimOmitted;
  53981. }, t.prototype._updateDimOmitted = function(e) {
  53982. this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = Qee(this.source)));
  53983. }, t.prototype.getSourceDimensionIndex = function(e) {
  53984. return We(this._dimNameMap.get(e), -1);
  53985. }, t.prototype.getSourceDimension = function(e) {
  53986. var n = this.source.dimensionsDefine;
  53987. if (n)
  53988. return n[e];
  53989. }, t.prototype.makeStoreSchema = function() {
  53990. for (var e = this._fullDimCount, n = zJ(this.source), r = !Hee(e), i = "", a = [], o = 0, s = 0; o < e; o++) {
  53991. var l = void 0, u = void 0, c = void 0, f = this.dimensions[s];
  53992. if (f && f.storeDimIndex === o)
  53993. l = n ? f.name : null, u = f.type, c = f.ordinalMeta, s++;
  53994. else {
  53995. var d = this.getSourceDimension(o);
  53996. d && (l = n ? d.name : null, u = d.type);
  53997. }
  53998. a.push({
  53999. property: l,
  54000. type: u,
  54001. ordinalMeta: c
  54002. }), n && l != null && (!f || !f.isCalculationCoord) && (i += r ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), i += "$", i += sNe[u] || "f", c && (i += c.uid), i += "$";
  54003. }
  54004. var h = this.source, p = [h.seriesLayoutBy, h.startIndex, i].join("$$");
  54005. return {
  54006. dimensions: a,
  54007. hash: p
  54008. };
  54009. }, t.prototype.makeOutputDimensionNames = function() {
  54010. for (var e = [], n = 0, r = 0; n < this._fullDimCount; n++) {
  54011. var i = void 0, a = this.dimensions[r];
  54012. if (a && a.storeDimIndex === n)
  54013. a.isCalculationCoord || (i = a.name), r++;
  54014. else {
  54015. var o = this.getSourceDimension(n);
  54016. o && (i = o.name);
  54017. }
  54018. e.push(i);
  54019. }
  54020. return e;
  54021. }, t.prototype.appendCalculationDimension = function(e) {
  54022. this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
  54023. }, t;
  54024. }()
  54025. );
  54026. function Fee(t) {
  54027. return t instanceof Vee;
  54028. }
  54029. function Wee(t) {
  54030. for (var e = Pe(), n = 0; n < (t || []).length; n++) {
  54031. var r = t[n], i = Ie(r) ? r.name : r;
  54032. i != null && e.get(i) == null && e.set(i, n);
  54033. }
  54034. return e;
  54035. }
  54036. function Qee(t) {
  54037. var e = oNe(t);
  54038. return e.dimNameMap || (e.dimNameMap = Wee(t.dimensionsDefine));
  54039. }
  54040. function Hee(t) {
  54041. return t > 30;
  54042. }
  54043. var hv = Ie, gl = ce, lNe = typeof Int32Array > "u" ? Array : Int32Array, uNe = "e\0\0", tV = -1, cNe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], fNe = ["_approximateExtent"], nV, fb, pv, fd, QT, db, HT, dNe = (
  54044. /** @class */
  54045. function() {
  54046. function t(e, n) {
  54047. 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"];
  54048. var r, i = !1;
  54049. Fee(e) ? (r = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, r = e), r = r || ["x", "y"];
  54050. for (var a = {}, o = [], s = {}, l = !1, u = {}, c = 0; c < r.length; c++) {
  54051. var f = r[c], d = Oe(f) ? new j_({
  54052. name: f
  54053. }) : f instanceof j_ ? f : new j_(f), h = d.name;
  54054. d.type = d.type || "float", d.coordDim || (d.coordDim = h, d.coordDimIndex = 0);
  54055. var p = d.otherDims = d.otherDims || {};
  54056. 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);
  54057. }
  54058. if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(l), this.hostModel = n, this._invertedIndicesMap = s, this._dimOmitted) {
  54059. var v = this._dimIdxToName = Pe();
  54060. k(o, function(g) {
  54061. v.set(a[g].storeDimIndex, g);
  54062. });
  54063. }
  54064. }
  54065. return t.prototype.getDimension = function(e) {
  54066. var n = this._recognizeDimIndex(e);
  54067. if (n == null)
  54068. return e;
  54069. if (n = e, !this._dimOmitted)
  54070. return this.dimensions[n];
  54071. var r = this._dimIdxToName.get(n);
  54072. if (r != null)
  54073. return r;
  54074. var i = this._schema.getSourceDimension(n);
  54075. if (i)
  54076. return i.name;
  54077. }, t.prototype.getDimensionIndex = function(e) {
  54078. var n = this._recognizeDimIndex(e);
  54079. if (n != null)
  54080. return n;
  54081. if (e == null)
  54082. return -1;
  54083. var r = this._getDimInfo(e);
  54084. return r ? r.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
  54085. }, t.prototype._recognizeDimIndex = function(e) {
  54086. if (St(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
  54087. return +e;
  54088. }, t.prototype._getStoreDimIndex = function(e) {
  54089. var n = this.getDimensionIndex(e);
  54090. if (process.env.NODE_ENV !== "production" && n == null)
  54091. throw new Error("Unknown dimension " + e);
  54092. return n;
  54093. }, t.prototype.getDimensionInfo = function(e) {
  54094. return this._getDimInfo(this.getDimension(e));
  54095. }, t.prototype._initGetDimensionInfo = function(e) {
  54096. var n = this._dimInfos;
  54097. this._getDimInfo = e ? function(r) {
  54098. return n.hasOwnProperty(r) ? n[r] : void 0;
  54099. } : function(r) {
  54100. return n[r];
  54101. };
  54102. }, t.prototype.getDimensionsOnCoord = function() {
  54103. return this._dimSummary.dataDimsOnCoord.slice();
  54104. }, t.prototype.mapDimension = function(e, n) {
  54105. var r = this._dimSummary;
  54106. if (n == null)
  54107. return r.encodeFirstDimNotExtra[e];
  54108. var i = r.encode[e];
  54109. return i ? i[n] : null;
  54110. }, t.prototype.mapDimensionsAll = function(e) {
  54111. var n = this._dimSummary, r = n.encode[e];
  54112. return (r || []).slice();
  54113. }, t.prototype.getStore = function() {
  54114. return this._store;
  54115. }, t.prototype.initData = function(e, n, r) {
  54116. var i = this, a;
  54117. if (e instanceof GA && (a = e), !a) {
  54118. var o = this.dimensions, s = ok(e) || wr(e) ? new VJ(e, o.length) : e;
  54119. a = new GA();
  54120. var l = gl(o, function(u) {
  54121. return {
  54122. type: i._dimInfos[u].type,
  54123. property: u
  54124. };
  54125. });
  54126. a.initData(s, l, r);
  54127. }
  54128. this._store = a, this._nameList = (n || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = iNe(this, this._schema), this.userOutput = this._dimSummary.userOutput;
  54129. }, t.prototype.appendData = function(e) {
  54130. var n = this._store.appendData(e);
  54131. this._doInit(n[0], n[1]);
  54132. }, t.prototype.appendValues = function(e, n) {
  54133. var r = this._store.appendValues(e, n.length), i = r.start, a = r.end, o = this._shouldMakeIdFromName();
  54134. if (this._updateOrdinalMeta(), n)
  54135. for (var s = i; s < a; s++) {
  54136. var l = s - i;
  54137. this._nameList[s] = n[l], o && HT(this, s);
  54138. }
  54139. }, t.prototype._updateOrdinalMeta = function() {
  54140. for (var e = this._store, n = this.dimensions, r = 0; r < n.length; r++) {
  54141. var i = this._dimInfos[n[r]];
  54142. i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta);
  54143. }
  54144. }, t.prototype._shouldMakeIdFromName = function() {
  54145. var e = this._store.getProvider();
  54146. return this._idDimIdx == null && e.getSource().sourceFormat !== Ds && !e.fillStorage;
  54147. }, t.prototype._doInit = function(e, n) {
  54148. if (!(e >= n)) {
  54149. var r = this._store, i = r.getProvider();
  54150. this._updateOrdinalMeta();
  54151. var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, l = s === La;
  54152. if (l && !i.pure)
  54153. for (var u = [], c = e; c < n; c++) {
  54154. var f = i.getItem(c, u);
  54155. if (!this.hasItemOption && WDe(f) && (this.hasItemOption = !0), f) {
  54156. var d = f.name;
  54157. a[c] == null && d != null && (a[c] = Vn(d, null));
  54158. var h = f.id;
  54159. o[c] == null && h != null && (o[c] = Vn(h, null));
  54160. }
  54161. }
  54162. if (this._shouldMakeIdFromName())
  54163. for (var c = e; c < n; c++)
  54164. HT(this, c);
  54165. nV(this);
  54166. }
  54167. }, t.prototype.getApproximateExtent = function(e) {
  54168. return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
  54169. }, t.prototype.setApproximateExtent = function(e, n) {
  54170. n = this.getDimension(n), this._approximateExtent[n] = e.slice();
  54171. }, t.prototype.getCalculationInfo = function(e) {
  54172. return this._calculationInfo[e];
  54173. }, t.prototype.setCalculationInfo = function(e, n) {
  54174. hv(e) ? le(this._calculationInfo, e) : this._calculationInfo[e] = n;
  54175. }, t.prototype.getName = function(e) {
  54176. var n = this.getRawIndex(e), r = this._nameList[n];
  54177. return r == null && this._nameDimIdx != null && (r = pv(this, this._nameDimIdx, n)), r == null && (r = ""), r;
  54178. }, t.prototype._getCategory = function(e, n) {
  54179. var r = this._store.get(e, n), i = this._store.getOrdinalMeta(e);
  54180. return i ? i.categories[r] : r;
  54181. }, t.prototype.getId = function(e) {
  54182. return fb(this, this.getRawIndex(e));
  54183. }, t.prototype.count = function() {
  54184. return this._store.count();
  54185. }, t.prototype.get = function(e, n) {
  54186. var r = this._store, i = this._dimInfos[e];
  54187. if (i)
  54188. return r.get(i.storeDimIndex, n);
  54189. }, t.prototype.getByRawIndex = function(e, n) {
  54190. var r = this._store, i = this._dimInfos[e];
  54191. if (i)
  54192. return r.getByRawIndex(i.storeDimIndex, n);
  54193. }, t.prototype.getIndices = function() {
  54194. return this._store.getIndices();
  54195. }, t.prototype.getDataExtent = function(e) {
  54196. return this._store.getDataExtent(this._getStoreDimIndex(e));
  54197. }, t.prototype.getSum = function(e) {
  54198. return this._store.getSum(this._getStoreDimIndex(e));
  54199. }, t.prototype.getMedian = function(e) {
  54200. return this._store.getMedian(this._getStoreDimIndex(e));
  54201. }, t.prototype.getValues = function(e, n) {
  54202. var r = this, i = this._store;
  54203. return ue(e) ? i.getValues(gl(e, function(a) {
  54204. return r._getStoreDimIndex(a);
  54205. }), n) : i.getValues(e);
  54206. }, t.prototype.hasValue = function(e) {
  54207. for (var n = this._dimSummary.dataDimIndicesOnCoord, r = 0, i = n.length; r < i; r++)
  54208. if (isNaN(this._store.get(n[r], e)))
  54209. return !1;
  54210. return !0;
  54211. }, t.prototype.indexOfName = function(e) {
  54212. for (var n = 0, r = this._store.count(); n < r; n++)
  54213. if (this.getName(n) === e)
  54214. return n;
  54215. return -1;
  54216. }, t.prototype.getRawIndex = function(e) {
  54217. return this._store.getRawIndex(e);
  54218. }, t.prototype.indexOfRawIndex = function(e) {
  54219. return this._store.indexOfRawIndex(e);
  54220. }, t.prototype.rawIndexOf = function(e, n) {
  54221. var r = e && this._invertedIndicesMap[e];
  54222. if (process.env.NODE_ENV !== "production" && !r)
  54223. throw new Error("Do not supported yet");
  54224. var i = r[n];
  54225. return i == null || isNaN(i) ? tV : i;
  54226. }, t.prototype.indicesOfNearest = function(e, n, r) {
  54227. return this._store.indicesOfNearest(this._getStoreDimIndex(e), n, r);
  54228. }, t.prototype.each = function(e, n, r) {
  54229. Me(e) && (r = n, n = e, e = []);
  54230. var i = r || this, a = gl(fd(e), this._getStoreDimIndex, this);
  54231. this._store.each(a, i ? xe(n, i) : n);
  54232. }, t.prototype.filterSelf = function(e, n, r) {
  54233. Me(e) && (r = n, n = e, e = []);
  54234. var i = r || this, a = gl(fd(e), this._getStoreDimIndex, this);
  54235. return this._store = this._store.filter(a, i ? xe(n, i) : n), this;
  54236. }, t.prototype.selectRange = function(e) {
  54237. var n = this, r = {}, i = st(e);
  54238. return k(i, function(a) {
  54239. var o = n._getStoreDimIndex(a);
  54240. r[o] = e[a];
  54241. }), this._store = this._store.selectRange(r), this;
  54242. }, t.prototype.mapArray = function(e, n, r) {
  54243. Me(e) && (r = n, n = e, e = []), r = r || this;
  54244. var i = [];
  54245. return this.each(e, function() {
  54246. i.push(n && n.apply(this, arguments));
  54247. }, r), i;
  54248. }, t.prototype.map = function(e, n, r, i) {
  54249. var a = r || i || this, o = gl(fd(e), this._getStoreDimIndex, this), s = db(this);
  54250. return s._store = this._store.map(o, a ? xe(n, a) : n), s;
  54251. }, t.prototype.modify = function(e, n, r, i) {
  54252. var a = this, o = r || i || this;
  54253. process.env.NODE_ENV !== "production" && k(fd(e), function(l) {
  54254. var u = a.getDimensionInfo(l);
  54255. u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
  54256. });
  54257. var s = gl(fd(e), this._getStoreDimIndex, this);
  54258. this._store.modify(s, o ? xe(n, o) : n);
  54259. }, t.prototype.downSample = function(e, n, r, i) {
  54260. var a = db(this);
  54261. return a._store = this._store.downSample(this._getStoreDimIndex(e), n, r, i), a;
  54262. }, t.prototype.lttbDownSample = function(e, n) {
  54263. var r = db(this);
  54264. return r._store = this._store.lttbDownSample(this._getStoreDimIndex(e), n), r;
  54265. }, t.prototype.getRawDataItem = function(e) {
  54266. return this._store.getRawDataItem(e);
  54267. }, t.prototype.getItemModel = function(e) {
  54268. var n = this.hostModel, r = this.getRawDataItem(e);
  54269. return new Wt(r, n, n && n.ecModel);
  54270. }, t.prototype.diff = function(e) {
  54271. var n = this;
  54272. return new Us(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(r) {
  54273. return fb(e, r);
  54274. }, function(r) {
  54275. return fb(n, r);
  54276. });
  54277. }, t.prototype.getVisual = function(e) {
  54278. var n = this._visual;
  54279. return n && n[e];
  54280. }, t.prototype.setVisual = function(e, n) {
  54281. this._visual = this._visual || {}, hv(e) ? le(this._visual, e) : this._visual[e] = n;
  54282. }, t.prototype.getItemVisual = function(e, n) {
  54283. var r = this._itemVisuals[e], i = r && r[n];
  54284. return i ?? this.getVisual(n);
  54285. }, t.prototype.hasItemVisual = function() {
  54286. return this._itemVisuals.length > 0;
  54287. }, t.prototype.ensureUniqueItemVisual = function(e, n) {
  54288. var r = this._itemVisuals, i = r[e];
  54289. i || (i = r[e] = {});
  54290. var a = i[n];
  54291. return a == null && (a = this.getVisual(n), ue(a) ? a = a.slice() : hv(a) && (a = le({}, a)), i[n] = a), a;
  54292. }, t.prototype.setItemVisual = function(e, n, r) {
  54293. var i = this._itemVisuals[e] || {};
  54294. this._itemVisuals[e] = i, hv(n) ? le(i, n) : i[n] = r;
  54295. }, t.prototype.clearAllVisual = function() {
  54296. this._visual = {}, this._itemVisuals = [];
  54297. }, t.prototype.setLayout = function(e, n) {
  54298. hv(e) ? le(this._layout, e) : this._layout[e] = n;
  54299. }, t.prototype.getLayout = function(e) {
  54300. return this._layout[e];
  54301. }, t.prototype.getItemLayout = function(e) {
  54302. return this._itemLayouts[e];
  54303. }, t.prototype.setItemLayout = function(e, n, r) {
  54304. this._itemLayouts[e] = r ? le(this._itemLayouts[e] || {}, n) : n;
  54305. }, t.prototype.clearItemLayouts = function() {
  54306. this._itemLayouts.length = 0;
  54307. }, t.prototype.setItemGraphicEl = function(e, n) {
  54308. var r = this.hostModel && this.hostModel.seriesIndex;
  54309. MA(r, this.dataType, e, n), this._graphicEls[e] = n;
  54310. }, t.prototype.getItemGraphicEl = function(e) {
  54311. return this._graphicEls[e];
  54312. }, t.prototype.eachItemGraphicEl = function(e, n) {
  54313. k(this._graphicEls, function(r, i) {
  54314. r && e && e.call(n, r, i);
  54315. });
  54316. }, t.prototype.cloneShallow = function(e) {
  54317. return e || (e = new t(this._schema ? this._schema : gl(this.dimensions, this._getDimInfo, this), this.hostModel)), QT(e, this), e._store = this._store, e;
  54318. }, t.prototype.wrapMethod = function(e, n) {
  54319. var r = this[e];
  54320. Me(r) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
  54321. var i = r.apply(this, arguments);
  54322. return n.apply(this, [i].concat(Rx(arguments)));
  54323. });
  54324. }, t.internalField = function() {
  54325. nV = function(e) {
  54326. var n = e._invertedIndicesMap;
  54327. k(n, function(r, i) {
  54328. var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store;
  54329. if (o) {
  54330. r = n[i] = new lNe(o.categories.length);
  54331. for (var l = 0; l < r.length; l++)
  54332. r[l] = tV;
  54333. for (var l = 0; l < s.count(); l++)
  54334. r[s.get(a.storeDimIndex, l)] = l;
  54335. }
  54336. });
  54337. }, pv = function(e, n, r) {
  54338. return Vn(e._getCategory(n, r), null);
  54339. }, fb = function(e, n) {
  54340. var r = e._idList[n];
  54341. return r == null && e._idDimIdx != null && (r = pv(e, e._idDimIdx, n)), r == null && (r = uNe + n), r;
  54342. }, fd = function(e) {
  54343. return ue(e) || (e = e != null ? [e] : []), e;
  54344. }, db = function(e) {
  54345. var n = new t(e._schema ? e._schema : gl(e.dimensions, e._getDimInfo, e), e.hostModel);
  54346. return QT(n, e), n;
  54347. }, QT = function(e, n) {
  54348. k(cNe.concat(n.__wrappedMethods || []), function(r) {
  54349. n.hasOwnProperty(r) && (e[r] = n[r]);
  54350. }), e.__wrappedMethods = n.__wrappedMethods, k(fNe, function(r) {
  54351. e[r] = Le(n[r]);
  54352. }), e._calculationInfo = le({}, n._calculationInfo);
  54353. }, HT = function(e, n) {
  54354. var r = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = r[n], l = i[n];
  54355. if (s == null && a != null && (r[n] = s = pv(e, a, n)), l == null && o != null && (i[n] = l = pv(e, o, n)), l == null && s != null) {
  54356. var u = e._nameRepeatCount, c = u[s] = (u[s] || 0) + 1;
  54357. l = s, c > 1 && (l += "__ec__" + c), i[n] = l;
  54358. }
  54359. };
  54360. }(), t;
  54361. }()
  54362. );
  54363. const Lr = dNe;
  54364. function hNe(t, e) {
  54365. return wp(t, e).dimensions;
  54366. }
  54367. function wp(t, e) {
  54368. ok(t) || (t = sk(t)), e = e || {};
  54369. var n = e.coordDimensions || [], r = e.dimensionsDefine || t.dimensionsDefine || [], i = Pe(), a = [], o = vNe(t, n, r, e.dimensionsCount), s = e.canOmitUnusedDimensions && Hee(o), l = r === t.dimensionsDefine, u = l ? Qee(t) : Wee(r), c = e.encodeDefine;
  54370. !c && e.encodeDefaulter && (c = e.encodeDefaulter(t, o));
  54371. for (var f = Pe(c), d = new UJ(o), h = 0; h < d.length; h++)
  54372. d[h] = -1;
  54373. function p(T) {
  54374. var w = d[T];
  54375. if (w < 0) {
  54376. var P = r[T], $ = Ie(P) ? P : {
  54377. name: P
  54378. }, A = new j_(), D = $.name;
  54379. D != null && u.get(D) != null && (A.name = A.displayName = D), $.type != null && (A.type = $.type), $.displayName != null && (A.displayName = $.displayName);
  54380. var E = a.length;
  54381. return d[T] = E, A.storeDimIndex = T, a.push(A), A;
  54382. }
  54383. return a[w];
  54384. }
  54385. if (!s)
  54386. for (var h = 0; h < o; h++)
  54387. p(h);
  54388. f.each(function(T, w) {
  54389. var P = Qt(T).slice();
  54390. if (P.length === 1 && !Oe(P[0]) && P[0] < 0) {
  54391. f.set(w, !1);
  54392. return;
  54393. }
  54394. var $ = f.set(w, []);
  54395. k(P, function(A, D) {
  54396. var E = Oe(A) ? u.get(A) : A;
  54397. E != null && E < o && ($[D] = E, g(p(E), w, D));
  54398. });
  54399. });
  54400. var v = 0;
  54401. k(n, function(T) {
  54402. var w, P, $, A;
  54403. if (Oe(T))
  54404. w = T, A = {};
  54405. else {
  54406. A = T, w = A.name;
  54407. var D = A.ordinalMeta;
  54408. 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;
  54409. }
  54410. var E = f.get(w);
  54411. if (E !== !1) {
  54412. if (E = Qt(E), !E.length)
  54413. for (var R = 0; R < (P && P.length || 1); R++) {
  54414. for (; v < o && p(v).coordDim != null; )
  54415. v++;
  54416. v < o && E.push(v++);
  54417. }
  54418. k(E, function(N, V) {
  54419. var z = p(N);
  54420. if (l && A.type != null && (z.type = A.type), g(Re(z, A), w, V), z.name == null && P) {
  54421. var W = P[V];
  54422. !Ie(W) && (W = {
  54423. name: W
  54424. }), z.name = z.displayName = W.name, z.defaultTooltip = W.defaultTooltip;
  54425. }
  54426. $ && Re(z.otherDims, $);
  54427. });
  54428. }
  54429. });
  54430. function g(T, w, P) {
  54431. FA.get(w) != null ? T.otherDims[w] = P : (T.coordDim = w, T.coordDimIndex = P, i.set(w, !0));
  54432. }
  54433. var m = e.generateCoord, y = e.generateCoordCount, b = y != null;
  54434. y = m ? y || 1 : 0;
  54435. var _ = m || "value";
  54436. function O(T) {
  54437. T.name == null && (T.name = T.coordDim);
  54438. }
  54439. if (s)
  54440. k(a, function(T) {
  54441. O(T);
  54442. }), a.sort(function(T, w) {
  54443. return T.storeDimIndex - w.storeDimIndex;
  54444. });
  54445. else
  54446. for (var S = 0; S < o; S++) {
  54447. var x = p(S), C = x.coordDim;
  54448. C == null && (x.coordDim = gNe(_, i, b), x.coordDimIndex = 0, (!m || y <= 0) && (x.isExtraCoord = !0), y--), O(x), x.type == null && (IJ(t, S) === cr.Must || x.isExtraCoord && (x.otherDims.itemName != null || x.otherDims.seriesName != null)) && (x.type = "ordinal");
  54449. }
  54450. return pNe(a), new Vee({
  54451. source: t,
  54452. dimensions: a,
  54453. fullDimensionCount: o,
  54454. dimensionOmitted: s
  54455. });
  54456. }
  54457. function pNe(t) {
  54458. for (var e = Pe(), n = 0; n < t.length; n++) {
  54459. var r = t[n], i = r.name, a = e.get(i) || 0;
  54460. a > 0 && (r.name = i + (a - 1)), a++, e.set(i, a);
  54461. }
  54462. }
  54463. function vNe(t, e, n, r) {
  54464. var i = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, r || 0);
  54465. return k(e, function(a) {
  54466. var o;
  54467. Ie(a) && (o = a.dimsDef) && (i = Math.max(i, o.length));
  54468. }), i;
  54469. }
  54470. function gNe(t, e, n) {
  54471. if (n || e.hasKey(t)) {
  54472. for (var r = 0; e.hasKey(t + r); )
  54473. r++;
  54474. t += r;
  54475. }
  54476. return e.set(t, !0), t;
  54477. }
  54478. var mNe = (
  54479. /** @class */
  54480. /* @__PURE__ */ function() {
  54481. function t(e) {
  54482. this.coordSysDims = [], this.axisMap = Pe(), this.categoryAxisMap = Pe(), this.coordSysName = e;
  54483. }
  54484. return t;
  54485. }()
  54486. );
  54487. function yNe(t) {
  54488. var e = t.get("coordinateSystem"), n = new mNe(e), r = bNe[e];
  54489. if (r)
  54490. return r(t, n, n.axisMap, n.categoryAxisMap), n;
  54491. }
  54492. var bNe = {
  54493. cartesian2d: function(t, e, n, r) {
  54494. var i = t.getReferringComponents("xAxis", Dn).models[0], a = t.getReferringComponents("yAxis", Dn).models[0];
  54495. if (process.env.NODE_ENV !== "production") {
  54496. if (!i)
  54497. throw new Error('xAxis "' + Tn(t.get("xAxisIndex"), t.get("xAxisId"), 0) + '" not found');
  54498. if (!a)
  54499. throw new Error('yAxis "' + Tn(t.get("xAxisIndex"), t.get("yAxisId"), 0) + '" not found');
  54500. }
  54501. e.coordSysDims = ["x", "y"], n.set("x", i), n.set("y", a), dd(i) && (r.set("x", i), e.firstCategoryDimIndex = 0), dd(a) && (r.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  54502. },
  54503. singleAxis: function(t, e, n, r) {
  54504. var i = t.getReferringComponents("singleAxis", Dn).models[0];
  54505. if (process.env.NODE_ENV !== "production" && !i)
  54506. throw new Error("singleAxis should be specified.");
  54507. e.coordSysDims = ["single"], n.set("single", i), dd(i) && (r.set("single", i), e.firstCategoryDimIndex = 0);
  54508. },
  54509. polar: function(t, e, n, r) {
  54510. var i = t.getReferringComponents("polar", Dn).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis");
  54511. if (process.env.NODE_ENV !== "production") {
  54512. if (!o)
  54513. throw new Error("angleAxis option not found");
  54514. if (!a)
  54515. throw new Error("radiusAxis option not found");
  54516. }
  54517. e.coordSysDims = ["radius", "angle"], n.set("radius", a), n.set("angle", o), dd(a) && (r.set("radius", a), e.firstCategoryDimIndex = 0), dd(o) && (r.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  54518. },
  54519. geo: function(t, e, n, r) {
  54520. e.coordSysDims = ["lng", "lat"];
  54521. },
  54522. parallel: function(t, e, n, r) {
  54523. var i = t.ecModel, a = i.getComponent("parallel", t.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice();
  54524. k(a.parallelAxisIndex, function(s, l) {
  54525. var u = i.getComponent("parallelAxis", s), c = o[l];
  54526. n.set(c, u), dd(u) && (r.set(c, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
  54527. });
  54528. }
  54529. };
  54530. function dd(t) {
  54531. return t.get("type") === "category";
  54532. }
  54533. function Gee(t, e, n) {
  54534. n = n || {};
  54535. var r = n.byIndex, i = n.stackedCoordDimension, a, o, s;
  54536. _Ne(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store);
  54537. var l = !!(t && t.get("stack")), u, c, f, d;
  54538. if (k(a, function(y, b) {
  54539. Oe(y) && (a[b] = y = {
  54540. name: y
  54541. }), l && !y.isExtraCoord && (!r && !u && y.ordinalMeta && (u = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y));
  54542. }), c && !r && !u && (r = !0), c) {
  54543. f = "__\0ecstackresult_" + t.id, d = "__\0ecstackedover_" + t.id, u && (u.createInvertedIndices = !0);
  54544. var h = c.coordDim, p = c.type, v = 0;
  54545. k(a, function(y) {
  54546. y.coordDim === h && v++;
  54547. });
  54548. var g = {
  54549. name: f,
  54550. coordDim: h,
  54551. coordDimIndex: v,
  54552. type: p,
  54553. isExtraCoord: !0,
  54554. isCalculationCoord: !0,
  54555. storeDimIndex: a.length
  54556. }, m = {
  54557. name: d,
  54558. // This dimension contains stack base (generally, 0), so do not set it as
  54559. // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
  54560. coordDim: d,
  54561. coordDimIndex: v + 1,
  54562. type: p,
  54563. isExtraCoord: !0,
  54564. isCalculationCoord: !0,
  54565. storeDimIndex: a.length + 1
  54566. };
  54567. 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));
  54568. }
  54569. return {
  54570. stackedDimension: c && c.name,
  54571. stackedByDimension: u && u.name,
  54572. isStackedByIndex: r,
  54573. stackedOverDimension: d,
  54574. stackResultDimension: f
  54575. };
  54576. }
  54577. function _Ne(t) {
  54578. return !Fee(t.schema);
  54579. }
  54580. function Xs(t, e) {
  54581. return !!e && e === t.getCalculationInfo("stackedDimension");
  54582. }
  54583. function Sk(t, e) {
  54584. return Xs(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
  54585. }
  54586. function ONe(t, e) {
  54587. var n = t.get("coordinateSystem"), r = zf.get(n), i;
  54588. return e && e.coordSysDims && (i = ce(e.coordSysDims, function(a) {
  54589. var o = {
  54590. name: a
  54591. }, s = e.axisMap.get(a);
  54592. if (s) {
  54593. var l = s.get("type");
  54594. o.type = wO(l);
  54595. }
  54596. return o;
  54597. })), i || (i = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), i;
  54598. }
  54599. function SNe(t, e, n) {
  54600. var r, i;
  54601. return n && k(t, function(a, o) {
  54602. var s = a.coordDim, l = n.categoryAxisMap.get(s);
  54603. l && (r == null && (r = o), a.ordinalMeta = l.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0);
  54604. }), !i && r != null && (t[r].otherDims.itemName = 0), r;
  54605. }
  54606. function us(t, e, n) {
  54607. n = n || {};
  54608. var r = e.getSourceManager(), i, a = !1;
  54609. t ? (a = !0, i = sk(t)) : (i = r.getSource(), a = i.sourceFormat === La);
  54610. var o = yNe(e), s = ONe(e, o), l = n.useEncodeDefaulter, u = Me(l) ? l : l ? Ue(MJ, s, e) : null, c = {
  54611. coordDimensions: s,
  54612. generateCoord: n.generateCoord,
  54613. encodeDefine: e.getEncode(),
  54614. encodeDefaulter: u,
  54615. canOmitUnusedDimensions: !a
  54616. }, f = wp(i, c), d = SNe(f.dimensions, n.createInvertedIndices, o), h = a ? null : r.getSharedDataStore(f), p = Gee(e, {
  54617. schema: f,
  54618. store: h
  54619. }), v = new Lr(f, e);
  54620. v.setCalculationInfo(p);
  54621. var g = d != null && xNe(i) ? function(m, y, b, _) {
  54622. return _ === d ? b : this.defaultDimValueGetter(m, y, b, _);
  54623. } : null;
  54624. return v.hasItemOption = !1, v.initData(
  54625. // Try to reuse the data store in sourceManager if using dataset.
  54626. a ? i : h,
  54627. null,
  54628. g
  54629. ), v;
  54630. }
  54631. function xNe(t) {
  54632. if (t.sourceFormat === La) {
  54633. var e = wNe(t.data || []);
  54634. return !ue(fp(e));
  54635. }
  54636. }
  54637. function wNe(t) {
  54638. for (var e = 0; e < t.length && t[e] == null; )
  54639. e++;
  54640. return t[e];
  54641. }
  54642. var cs = (
  54643. /** @class */
  54644. function() {
  54645. function t(e) {
  54646. this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
  54647. }
  54648. return t.prototype.getSetting = function(e) {
  54649. return this._setting[e];
  54650. }, t.prototype.unionExtent = function(e) {
  54651. var n = this._extent;
  54652. e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]);
  54653. }, t.prototype.unionExtentFromData = function(e, n) {
  54654. this.unionExtent(e.getApproximateExtent(n));
  54655. }, t.prototype.getExtent = function() {
  54656. return this._extent.slice();
  54657. }, t.prototype.setExtent = function(e, n) {
  54658. var r = this._extent;
  54659. isNaN(e) || (r[0] = e), isNaN(n) || (r[1] = n);
  54660. }, t.prototype.isInExtentRange = function(e) {
  54661. return this._extent[0] <= e && this._extent[1] >= e;
  54662. }, t.prototype.isBlank = function() {
  54663. return this._isBlank;
  54664. }, t.prototype.setBlank = function(e) {
  54665. this._isBlank = e;
  54666. }, t;
  54667. }()
  54668. );
  54669. Qx(cs);
  54670. var CNe = 0, tE = (
  54671. /** @class */
  54672. function() {
  54673. function t(e) {
  54674. this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++CNe;
  54675. }
  54676. return t.createByAxisModel = function(e) {
  54677. var n = e.option, r = n.data, i = r && ce(r, TNe);
  54678. return new t({
  54679. categories: i,
  54680. needCollect: !i,
  54681. // deduplication is default in axis.
  54682. deduplication: n.dedplication !== !1
  54683. });
  54684. }, t.prototype.getOrdinal = function(e) {
  54685. return this._getOrCreateMap().get(e);
  54686. }, t.prototype.parseAndCollect = function(e) {
  54687. var n, r = this._needCollect;
  54688. if (!Oe(e) && !r)
  54689. return e;
  54690. if (r && !this._deduplication)
  54691. return n = this.categories.length, this.categories[n] = e, n;
  54692. var i = this._getOrCreateMap();
  54693. return n = i.get(e), n == null && (r ? (n = this.categories.length, this.categories[n] = e, i.set(e, n)) : n = NaN), n;
  54694. }, t.prototype._getOrCreateMap = function() {
  54695. return this._map || (this._map = Pe(this.categories));
  54696. }, t;
  54697. }()
  54698. );
  54699. function TNe(t) {
  54700. return Ie(t) && t.value != null ? t.value : t + "";
  54701. }
  54702. function PNe(t) {
  54703. var e = Math.pow(10, L0(Math.abs(t))), n = Math.abs(t / e);
  54704. return n === 0 || n === 1 || n === 2 || n === 3 || n === 5;
  54705. }
  54706. function nE(t) {
  54707. return t.type === "interval" || t.type === "log";
  54708. }
  54709. function $Ne(t, e, n, r) {
  54710. var i = {}, a = t[1] - t[0], o = i.interval = $R(a / e, !0);
  54711. n != null && o < n && (o = i.interval = n), r != null && o > r && (o = i.interval = r);
  54712. var s = i.intervalPrecision = jee(o), l = i.niceTickExtent = [mn(Math.ceil(t[0] / o) * o, s), mn(Math.floor(t[1] / o) * o, s)];
  54713. return ANe(l, t), i;
  54714. }
  54715. function GT(t) {
  54716. var e = Math.pow(10, L0(t)), n = t / e;
  54717. return n ? n === 2 ? n = 3 : n === 3 ? n = 5 : n *= 2 : n = 1, mn(n * e);
  54718. }
  54719. function jee(t) {
  54720. return Ua(t) + 2;
  54721. }
  54722. function rV(t, e, n) {
  54723. t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
  54724. }
  54725. function ANe(t, e) {
  54726. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), rV(t, 0, e), rV(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
  54727. }
  54728. function dw(t, e) {
  54729. return t >= e[0] && t <= e[1];
  54730. }
  54731. function hw(t, e) {
  54732. return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
  54733. }
  54734. function pw(t, e) {
  54735. return t * (e[1] - e[0]) + e[0];
  54736. }
  54737. var vw = (
  54738. /** @class */
  54739. function(t) {
  54740. q(e, t);
  54741. function e(n) {
  54742. var r = t.call(this, n) || this;
  54743. r.type = "ordinal";
  54744. var i = r.getSetting("ordinalMeta");
  54745. return i || (i = new tE({})), ue(i) && (i = new tE({
  54746. categories: ce(i, function(a) {
  54747. return Ie(a) ? a.value : a;
  54748. })
  54749. })), r._ordinalMeta = i, r._extent = r.getSetting("extent") || [0, i.categories.length - 1], r;
  54750. }
  54751. return e.prototype.parse = function(n) {
  54752. return n == null ? NaN : Oe(n) ? this._ordinalMeta.getOrdinal(n) : Math.round(n);
  54753. }, e.prototype.contain = function(n) {
  54754. return n = this.parse(n), dw(n, this._extent) && this._ordinalMeta.categories[n] != null;
  54755. }, e.prototype.normalize = function(n) {
  54756. return n = this._getTickNumber(this.parse(n)), hw(n, this._extent);
  54757. }, e.prototype.scale = function(n) {
  54758. return n = Math.round(pw(n, this._extent)), this.getRawOrdinalNumber(n);
  54759. }, e.prototype.getTicks = function() {
  54760. for (var n = [], r = this._extent, i = r[0]; i <= r[1]; )
  54761. n.push({
  54762. value: i
  54763. }), i++;
  54764. return n;
  54765. }, e.prototype.getMinorTicks = function(n) {
  54766. }, e.prototype.setSortInfo = function(n) {
  54767. if (n == null) {
  54768. this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
  54769. return;
  54770. }
  54771. 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) {
  54772. var u = r[o];
  54773. i[o] = u, a[u] = o;
  54774. }
  54775. for (var c = 0; o < s; ++o) {
  54776. for (; a[c] != null; )
  54777. c++;
  54778. i.push(c), a[c] = o;
  54779. }
  54780. }, e.prototype._getTickNumber = function(n) {
  54781. var r = this._ticksByOrdinalNumber;
  54782. return r && n >= 0 && n < r.length ? r[n] : n;
  54783. }, e.prototype.getRawOrdinalNumber = function(n) {
  54784. var r = this._ordinalNumbersByTick;
  54785. return r && n >= 0 && n < r.length ? r[n] : n;
  54786. }, e.prototype.getLabel = function(n) {
  54787. if (!this.isBlank()) {
  54788. var r = this.getRawOrdinalNumber(n.value), i = this._ordinalMeta.categories[r];
  54789. return i == null ? "" : i + "";
  54790. }
  54791. }, e.prototype.count = function() {
  54792. return this._extent[1] - this._extent[0] + 1;
  54793. }, e.prototype.unionExtentFromData = function(n, r) {
  54794. this.unionExtent(n.getApproximateExtent(r));
  54795. }, e.prototype.isInExtentRange = function(n) {
  54796. return n = this._getTickNumber(n), this._extent[0] <= n && this._extent[1] >= n;
  54797. }, e.prototype.getOrdinalMeta = function() {
  54798. return this._ordinalMeta;
  54799. }, e.prototype.calcNiceTicks = function() {
  54800. }, e.prototype.calcNiceExtent = function() {
  54801. }, e.type = "ordinal", e;
  54802. }(cs)
  54803. );
  54804. cs.registerClass(vw);
  54805. var ic = mn, Ys = (
  54806. /** @class */
  54807. function(t) {
  54808. q(e, t);
  54809. function e() {
  54810. var n = t !== null && t.apply(this, arguments) || this;
  54811. return n.type = "interval", n._interval = 0, n._intervalPrecision = 2, n;
  54812. }
  54813. return e.prototype.parse = function(n) {
  54814. return n;
  54815. }, e.prototype.contain = function(n) {
  54816. return dw(n, this._extent);
  54817. }, e.prototype.normalize = function(n) {
  54818. return hw(n, this._extent);
  54819. }, e.prototype.scale = function(n) {
  54820. return pw(n, this._extent);
  54821. }, e.prototype.setExtent = function(n, r) {
  54822. var i = this._extent;
  54823. isNaN(n) || (i[0] = parseFloat(n)), isNaN(r) || (i[1] = parseFloat(r));
  54824. }, e.prototype.unionExtent = function(n) {
  54825. var r = this._extent;
  54826. n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]), this.setExtent(r[0], r[1]);
  54827. }, e.prototype.getInterval = function() {
  54828. return this._interval;
  54829. }, e.prototype.setInterval = function(n) {
  54830. this._interval = n, this._niceExtent = this._extent.slice(), this._intervalPrecision = jee(n);
  54831. }, e.prototype.getTicks = function(n) {
  54832. var r = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = [];
  54833. if (!r)
  54834. return s;
  54835. var l = 1e4;
  54836. i[0] < a[0] && (n ? s.push({
  54837. value: ic(a[0] - r, o)
  54838. }) : s.push({
  54839. value: i[0]
  54840. }));
  54841. for (var u = a[0]; u <= a[1] && (s.push({
  54842. value: u
  54843. }), u = ic(u + r, o), u !== s[s.length - 1].value); )
  54844. if (s.length > l)
  54845. return [];
  54846. var c = s.length ? s[s.length - 1].value : a[1];
  54847. return i[1] > c && (n ? s.push({
  54848. value: ic(c + r, o)
  54849. }) : s.push({
  54850. value: i[1]
  54851. })), s;
  54852. }, e.prototype.getMinorTicks = function(n) {
  54853. for (var r = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < r.length; o++) {
  54854. for (var s = r[o], l = r[o - 1], u = 0, c = [], f = s.value - l.value, d = f / n; u < n - 1; ) {
  54855. var h = ic(l.value + (u + 1) * d);
  54856. h > a[0] && h < a[1] && c.push(h), u++;
  54857. }
  54858. i.push(c);
  54859. }
  54860. return i;
  54861. }, e.prototype.getLabel = function(n, r) {
  54862. if (n == null)
  54863. return "";
  54864. var i = r && r.precision;
  54865. i == null ? i = Ua(n.value) || 0 : i === "auto" && (i = this._intervalPrecision);
  54866. var a = ic(n.value, i, !0);
  54867. return KR(a);
  54868. }, e.prototype.calcNiceTicks = function(n, r, i) {
  54869. n = n || 5;
  54870. var a = this._extent, o = a[1] - a[0];
  54871. if (isFinite(o)) {
  54872. o < 0 && (o = -o, a.reverse());
  54873. var s = $Ne(a, n, r, i);
  54874. this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
  54875. }
  54876. }, e.prototype.calcNiceExtent = function(n) {
  54877. var r = this._extent;
  54878. if (r[0] === r[1])
  54879. if (r[0] !== 0) {
  54880. var i = Math.abs(r[0]);
  54881. n.fixMax || (r[1] += i / 2), r[0] -= i / 2;
  54882. } else
  54883. r[1] = 1;
  54884. var a = r[1] - r[0];
  54885. isFinite(a) || (r[0] = 0, r[1] = 1), this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
  54886. var o = this._interval;
  54887. n.fixMin || (r[0] = ic(Math.floor(r[0] / o) * o)), n.fixMax || (r[1] = ic(Math.ceil(r[1] / o) * o));
  54888. }, e.prototype.setNiceExtent = function(n, r) {
  54889. this._niceExtent = [n, r];
  54890. }, e.type = "interval", e;
  54891. }(cs)
  54892. );
  54893. cs.registerClass(Ys);
  54894. var Zee = typeof Float32Array < "u", ENe = Zee ? Float32Array : Array;
  54895. function Fo(t) {
  54896. return ue(t) ? Zee ? new Float32Array(t) : t : new ENe(t);
  54897. }
  54898. var rE = "__ec_stack_";
  54899. function xk(t) {
  54900. return t.get("stack") || rE + t.seriesIndex;
  54901. }
  54902. function wk(t) {
  54903. return t.dim + t.index;
  54904. }
  54905. function MNe(t) {
  54906. var e = [], n = t.axis, r = "axis0";
  54907. if (n.type === "category") {
  54908. for (var i = n.getBandWidth(), a = 0; a < t.count; a++)
  54909. e.push(Re({
  54910. bandWidth: i,
  54911. axisKey: r,
  54912. stackId: rE + a
  54913. }, t));
  54914. for (var o = Yee(e), s = [], a = 0; a < t.count; a++) {
  54915. var l = o[r][rE + a];
  54916. l.offsetCenter = l.offset + l.width / 2, s.push(l);
  54917. }
  54918. return s;
  54919. }
  54920. }
  54921. function Uee(t, e) {
  54922. var n = [];
  54923. return e.eachSeriesByType(t, function(r) {
  54924. Jee(r) && n.push(r);
  54925. }), n;
  54926. }
  54927. function INe(t) {
  54928. var e = {};
  54929. k(t, function(l) {
  54930. var u = l.coordinateSystem, c = u.getBaseAxis();
  54931. if (!(c.type !== "time" && c.type !== "value"))
  54932. 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) {
  54933. var m = p.get(h, v);
  54934. e[d] ? e[d].push(m) : e[d] = [m];
  54935. }
  54936. });
  54937. var n = {};
  54938. for (var r in e)
  54939. if (e.hasOwnProperty(r)) {
  54940. var i = e[r];
  54941. if (i) {
  54942. i.sort(function(l, u) {
  54943. return l - u;
  54944. });
  54945. for (var a = null, o = 1; o < i.length; ++o) {
  54946. var s = i[o] - i[o - 1];
  54947. s > 0 && (a = a === null ? s : Math.min(a, s));
  54948. }
  54949. n[r] = a;
  54950. }
  54951. }
  54952. return n;
  54953. }
  54954. function Xee(t) {
  54955. var e = INe(t), n = [];
  54956. return k(t, function(r) {
  54957. var i = r.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s;
  54958. if (a.type === "category")
  54959. s = a.getBandWidth();
  54960. else if (a.type === "value" || a.type === "time") {
  54961. 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]);
  54962. s = u ? c / d * u : c;
  54963. } else {
  54964. var h = r.getData();
  54965. s = Math.abs(o[1] - o[0]) / h.count();
  54966. }
  54967. var p = _e(r.get("barWidth"), s), v = _e(r.get("barMaxWidth"), s), g = _e(
  54968. // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
  54969. // the auto-calculated bar width might be less than 0.5 / 1.
  54970. r.get("barMinWidth") || (ete(r) ? 0.5 : 1),
  54971. s
  54972. ), m = r.get("barGap"), y = r.get("barCategoryGap");
  54973. n.push({
  54974. bandWidth: s,
  54975. barWidth: p,
  54976. barMaxWidth: v,
  54977. barMinWidth: g,
  54978. barGap: m,
  54979. barCategoryGap: y,
  54980. axisKey: wk(a),
  54981. stackId: xk(r)
  54982. });
  54983. }), Yee(n);
  54984. }
  54985. function Yee(t) {
  54986. var e = {};
  54987. k(t, function(r, i) {
  54988. var a = r.axisKey, o = r.bandWidth, s = e[a] || {
  54989. bandWidth: o,
  54990. remainedWidth: o,
  54991. autoWidthCount: 0,
  54992. categoryGap: null,
  54993. gap: "20%",
  54994. stacks: {}
  54995. }, l = s.stacks;
  54996. e[a] = s;
  54997. var u = r.stackId;
  54998. l[u] || s.autoWidthCount++, l[u] = l[u] || {
  54999. width: 0,
  55000. maxWidth: 0
  55001. };
  55002. var c = r.barWidth;
  55003. c && !l[u].width && (l[u].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c);
  55004. var f = r.barMaxWidth;
  55005. f && (l[u].maxWidth = f);
  55006. var d = r.barMinWidth;
  55007. d && (l[u].minWidth = d);
  55008. var h = r.barGap;
  55009. h != null && (s.gap = h);
  55010. var p = r.barCategoryGap;
  55011. p != null && (s.categoryGap = p);
  55012. });
  55013. var n = {};
  55014. return k(e, function(r, i) {
  55015. n[i] = {};
  55016. var a = r.stacks, o = r.bandWidth, s = r.categoryGap;
  55017. if (s == null) {
  55018. var l = st(a).length;
  55019. s = Math.max(35 - l * 4, 15) + "%";
  55020. }
  55021. var u = _e(s, o), c = _e(r.gap, 1), f = r.remainedWidth, d = r.autoWidthCount, h = (f - u) / (d + (d - 1) * c);
  55022. h = Math.max(h, 0), k(a, function(m) {
  55023. var y = m.maxWidth, b = m.minWidth;
  55024. if (m.width) {
  55025. var _ = m.width;
  55026. y && (_ = Math.min(_, y)), b && (_ = Math.max(_, b)), m.width = _, f -= _ + c * _, d--;
  55027. } else {
  55028. var _ = h;
  55029. y && y < _ && (_ = Math.min(y, f)), b && b > _ && (_ = b), _ !== h && (m.width = _, f -= _ + c * _, d--);
  55030. }
  55031. }), h = (f - u) / (d + (d - 1) * c), h = Math.max(h, 0);
  55032. var p = 0, v;
  55033. k(a, function(m, y) {
  55034. m.width || (m.width = h), v = m, p += m.width * (1 + c);
  55035. }), v && (p -= v.width * c);
  55036. var g = -p / 2;
  55037. k(a, function(m, y) {
  55038. n[i][y] = n[i][y] || {
  55039. bandWidth: o,
  55040. offset: g,
  55041. width: m.width
  55042. }, g += m.width * (1 + c);
  55043. });
  55044. }), n;
  55045. }
  55046. function DNe(t, e, n) {
  55047. if (t && e) {
  55048. var r = t[wk(e)];
  55049. return r != null && n != null ? r[xk(n)] : r;
  55050. }
  55051. }
  55052. function qee(t, e) {
  55053. var n = Uee(t, e), r = Xee(n);
  55054. k(n, function(i) {
  55055. var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), l = xk(i), u = r[wk(s)][l], c = u.offset, f = u.width;
  55056. a.setLayout({
  55057. bandWidth: u.bandWidth,
  55058. offset: c,
  55059. size: f
  55060. });
  55061. });
  55062. }
  55063. function Kee(t) {
  55064. return {
  55065. seriesType: t,
  55066. plan: Op(),
  55067. reset: function(e) {
  55068. if (Jee(e)) {
  55069. 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 = Xs(n, u) && !!n.getCalculationInfo("stackedOnSeries"), d = a.isHorizontal(), h = RNe(i, a), p = ete(e), v = e.get("barMinHeight") || 0, g = c && n.getDimensionIndex(c), m = n.getLayout("size"), y = n.getLayout("offset");
  55070. return {
  55071. progress: function(b, _) {
  55072. for (var O = b.count, S = p && Fo(O * 3), x = p && l && Fo(O * 3), C = p && Fo(O), T = r.master.getRect(), w = d ? T.width : T.height, P, $ = _.getStore(), A = 0; (P = b.next()) != null; ) {
  55073. var D = $.get(f ? g : o, P), E = $.get(s, P), R = h, N = void 0;
  55074. f && (N = +D - $.get(o, P));
  55075. var V = void 0, z = void 0, W = void 0, F = void 0;
  55076. if (d) {
  55077. var Q = r.dataToPoint([D, E]);
  55078. if (f) {
  55079. var Z = r.dataToPoint([N, E]);
  55080. R = Z[0];
  55081. }
  55082. V = R, z = Q[1] + y, W = Q[0] - R, F = m, Math.abs(W) < v && (W = (W < 0 ? -1 : 1) * v);
  55083. } else {
  55084. var Q = r.dataToPoint([E, D]);
  55085. if (f) {
  55086. var Z = r.dataToPoint([E, N]);
  55087. R = Z[1];
  55088. }
  55089. V = Q[0] + y, z = R, W = m, F = Q[1] - R, Math.abs(F) < v && (F = (F <= 0 ? -1 : 1) * v);
  55090. }
  55091. p ? (S[A] = V, S[A + 1] = z, S[A + 2] = d ? W : F, x && (x[A] = d ? T.x : V, x[A + 1] = d ? z : T.y, x[A + 2] = w), C[P] = P) : _.setItemLayout(P, {
  55092. x: V,
  55093. y: z,
  55094. width: W,
  55095. height: F
  55096. }), A += 3;
  55097. }
  55098. p && _.setLayout({
  55099. largePoints: S,
  55100. largeDataIndices: C,
  55101. largeBackgroundPoints: x,
  55102. valueAxisHorizontal: d
  55103. });
  55104. }
  55105. };
  55106. }
  55107. }
  55108. };
  55109. }
  55110. function Jee(t) {
  55111. return t.coordinateSystem && t.coordinateSystem.type === "cartesian2d";
  55112. }
  55113. function ete(t) {
  55114. return t.pipelineContext && t.pipelineContext.large;
  55115. }
  55116. function RNe(t, e) {
  55117. var n = e.model.get("startValue");
  55118. return n || (n = 0), e.toGlobalCoord(e.dataToCoord(e.type === "log" ? n > 0 ? n : 1 : n));
  55119. }
  55120. var kNe = function(t, e, n, r) {
  55121. for (; n < r; ) {
  55122. var i = n + r >>> 1;
  55123. t[i][1] < e ? n = i + 1 : r = i;
  55124. }
  55125. return n;
  55126. }, Ck = (
  55127. /** @class */
  55128. function(t) {
  55129. q(e, t);
  55130. function e(n) {
  55131. var r = t.call(this, n) || this;
  55132. return r.type = "time", r;
  55133. }
  55134. return e.prototype.getLabel = function(n) {
  55135. var r = this.getSetting("useUTC");
  55136. return Q0(n.value, UB[uLe(rh(this._minLevelUnit))] || UB.second, r, this.getSetting("locale"));
  55137. }, e.prototype.getFormattedLabel = function(n, r, i) {
  55138. var a = this.getSetting("useUTC"), o = this.getSetting("locale");
  55139. return cLe(n, r, i, o, a);
  55140. }, e.prototype.getTicks = function() {
  55141. var n = this._interval, r = this._extent, i = [];
  55142. if (!n)
  55143. return i;
  55144. i.push({
  55145. value: r[0],
  55146. level: 0
  55147. });
  55148. var a = this.getSetting("useUTC"), o = WNe(this._minLevelUnit, this._approxInterval, a, r);
  55149. return i = i.concat(o), i.push({
  55150. value: r[1],
  55151. level: 0
  55152. }), i;
  55153. }, e.prototype.calcNiceExtent = function(n) {
  55154. var r = this._extent;
  55155. if (r[0] === r[1] && (r[0] -= va, r[1] += va), r[1] === -1 / 0 && r[0] === 1 / 0) {
  55156. var i = /* @__PURE__ */ new Date();
  55157. r[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), r[0] = r[1] - va;
  55158. }
  55159. this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
  55160. }, e.prototype.calcNiceTicks = function(n, r, i) {
  55161. n = n || 10;
  55162. var a = this._extent, o = a[1] - a[0];
  55163. this._approxInterval = o / n, r != null && this._approxInterval < r && (this._approxInterval = r), i != null && this._approxInterval > i && (this._approxInterval = i);
  55164. var s = hb.length, l = Math.min(kNe(hb, this._approxInterval, 0, s), s - 1);
  55165. this._interval = hb[l][1], this._minLevelUnit = hb[Math.max(l - 1, 0)][0];
  55166. }, e.prototype.parse = function(n) {
  55167. return St(n) ? n : +Yi(n);
  55168. }, e.prototype.contain = function(n) {
  55169. return dw(this.parse(n), this._extent);
  55170. }, e.prototype.normalize = function(n) {
  55171. return hw(this.parse(n), this._extent);
  55172. }, e.prototype.scale = function(n) {
  55173. return pw(n, this._extent);
  55174. }, e.type = "time", e;
  55175. }(Ys)
  55176. ), hb = [
  55177. // Format interval
  55178. ["second", XR],
  55179. ["minute", YR],
  55180. ["hour", Ig],
  55181. ["quarter-day", Ig * 6],
  55182. ["half-day", Ig * 12],
  55183. ["day", va * 1.2],
  55184. ["half-week", va * 3.5],
  55185. ["week", va * 7],
  55186. ["month", va * 31],
  55187. ["quarter", va * 95],
  55188. ["half-year", ZB / 2],
  55189. ["year", ZB]
  55190. // 1Y
  55191. ];
  55192. function LNe(t, e, n, r) {
  55193. var i = Yi(e), a = Yi(n), o = function(p) {
  55194. return XB(i, p, r) === XB(a, p, r);
  55195. }, s = function() {
  55196. return o("year");
  55197. }, l = function() {
  55198. return s() && o("month");
  55199. }, u = function() {
  55200. return l() && o("day");
  55201. }, c = function() {
  55202. return u() && o("hour");
  55203. }, f = function() {
  55204. return c() && o("minute");
  55205. }, d = function() {
  55206. return f() && o("second");
  55207. }, h = function() {
  55208. return d() && o("millisecond");
  55209. };
  55210. switch (t) {
  55211. case "year":
  55212. return s();
  55213. case "month":
  55214. return l();
  55215. case "day":
  55216. return u();
  55217. case "hour":
  55218. return c();
  55219. case "minute":
  55220. return f();
  55221. case "second":
  55222. return d();
  55223. case "millisecond":
  55224. return h();
  55225. }
  55226. }
  55227. function NNe(t, e) {
  55228. return t /= va, t > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1;
  55229. }
  55230. function BNe(t) {
  55231. var e = 30 * va;
  55232. return t /= e, t > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1;
  55233. }
  55234. function zNe(t) {
  55235. return t /= Ig, t > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1;
  55236. }
  55237. function iV(t, e) {
  55238. return t /= e ? YR : XR, t > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1;
  55239. }
  55240. function VNe(t) {
  55241. return $R(t, !0);
  55242. }
  55243. function FNe(t, e, n) {
  55244. var r = new Date(t);
  55245. switch (rh(e)) {
  55246. case "year":
  55247. case "month":
  55248. r[bJ(n)](0);
  55249. case "day":
  55250. r[_J(n)](1);
  55251. case "hour":
  55252. r[OJ(n)](0);
  55253. case "minute":
  55254. r[SJ(n)](0);
  55255. case "second":
  55256. r[xJ(n)](0), r[wJ(n)](0);
  55257. }
  55258. return r.getTime();
  55259. }
  55260. function WNe(t, e, n, r) {
  55261. var i = 1e4, a = mJ, o = 0;
  55262. function s(w, P, $, A, D, E, R) {
  55263. for (var N = new Date(P), V = P, z = N[A](); V < $ && V <= r[1]; )
  55264. R.push({
  55265. value: V
  55266. }), z += w, N[D](z), V = N.getTime();
  55267. R.push({
  55268. value: V,
  55269. notAdd: !0
  55270. });
  55271. }
  55272. function l(w, P, $) {
  55273. var A = [], D = !P.length;
  55274. if (!LNe(rh(w), r[0], r[1], n)) {
  55275. D && (P = [{
  55276. // TODO Optimize. Not include so may ticks.
  55277. value: FNe(new Date(r[0]), w, n)
  55278. }, {
  55279. value: r[1]
  55280. }]);
  55281. for (var E = 0; E < P.length - 1; E++) {
  55282. var R = P[E].value, N = P[E + 1].value;
  55283. if (R !== N) {
  55284. var V = void 0, z = void 0, W = void 0, F = !1;
  55285. switch (w) {
  55286. case "year":
  55287. V = Math.max(1, Math.round(e / va / 365)), z = qR(n), W = fLe(n);
  55288. break;
  55289. case "half-year":
  55290. case "quarter":
  55291. case "month":
  55292. V = BNe(e), z = ih(n), W = bJ(n);
  55293. break;
  55294. case "week":
  55295. case "half-week":
  55296. case "day":
  55297. V = NNe(e), z = tw(n), W = _J(n), F = !0;
  55298. break;
  55299. case "half-day":
  55300. case "quarter-day":
  55301. case "hour":
  55302. V = zNe(e), z = Cm(n), W = OJ(n);
  55303. break;
  55304. case "minute":
  55305. V = iV(e, !0), z = nw(n), W = SJ(n);
  55306. break;
  55307. case "second":
  55308. V = iV(e, !1), z = rw(n), W = xJ(n);
  55309. break;
  55310. case "millisecond":
  55311. V = VNe(e), z = iw(n), W = wJ(n);
  55312. break;
  55313. }
  55314. s(V, R, N, z, W, F, A), w === "year" && $.length > 1 && E === 0 && $.unshift({
  55315. value: $[0].value - V
  55316. });
  55317. }
  55318. }
  55319. for (var E = 0; E < A.length; E++)
  55320. $.push(A[E]);
  55321. return A;
  55322. }
  55323. }
  55324. for (var u = [], c = [], f = 0, d = 0, h = 0; h < a.length && o++ < i; ++h) {
  55325. var p = rh(a[h]);
  55326. if (lLe(a[h])) {
  55327. l(a[h], u[u.length - 1] || [], c);
  55328. var v = a[h + 1] ? rh(a[h + 1]) : null;
  55329. if (p !== v) {
  55330. if (c.length) {
  55331. d = f, c.sort(function(w, P) {
  55332. return w.value - P.value;
  55333. });
  55334. for (var g = [], m = 0; m < c.length; ++m) {
  55335. var y = c[m].value;
  55336. (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= r[0] && y <= r[1] && f++);
  55337. }
  55338. var b = (r[1] - r[0]) / e;
  55339. if (f > b * 1.5 && d > b / 1.5 || (u.push(g), f > b || t === a[h]))
  55340. break;
  55341. }
  55342. c = [];
  55343. }
  55344. }
  55345. }
  55346. process.env.NODE_ENV !== "production" && o >= i && dn("Exceed safe limit.");
  55347. for (var _ = Nt(ce(u, function(w) {
  55348. return Nt(w, function(P) {
  55349. return P.value >= r[0] && P.value <= r[1] && !P.notAdd;
  55350. });
  55351. }), function(w) {
  55352. return w.length > 0;
  55353. }), O = [], S = _.length - 1, h = 0; h < _.length; ++h)
  55354. for (var x = _[h], C = 0; C < x.length; ++C)
  55355. O.push({
  55356. value: x[C].value,
  55357. level: S - h
  55358. });
  55359. O.sort(function(w, P) {
  55360. return w.value - P.value;
  55361. });
  55362. for (var T = [], h = 0; h < O.length; ++h)
  55363. (h === 0 || O[h].value !== O[h - 1].value) && T.push(O[h]);
  55364. return T;
  55365. }
  55366. cs.registerClass(Ck);
  55367. var aV = cs.prototype, kg = Ys.prototype, QNe = mn, HNe = Math.floor, GNe = Math.ceil, pb = Math.pow, Wa = Math.log, Tk = (
  55368. /** @class */
  55369. function(t) {
  55370. q(e, t);
  55371. function e() {
  55372. var n = t !== null && t.apply(this, arguments) || this;
  55373. return n.type = "log", n.base = 10, n._originalScale = new Ys(), n._interval = 0, n;
  55374. }
  55375. return e.prototype.getTicks = function(n) {
  55376. var r = this._originalScale, i = this._extent, a = r.getExtent(), o = kg.getTicks.call(this, n);
  55377. return ce(o, function(s) {
  55378. var l = s.value, u = mn(pb(this.base, l));
  55379. return u = l === i[0] && this._fixMin ? vb(u, a[0]) : u, u = l === i[1] && this._fixMax ? vb(u, a[1]) : u, {
  55380. value: u
  55381. };
  55382. }, this);
  55383. }, e.prototype.setExtent = function(n, r) {
  55384. var i = Wa(this.base);
  55385. n = Wa(Math.max(0, n)) / i, r = Wa(Math.max(0, r)) / i, kg.setExtent.call(this, n, r);
  55386. }, e.prototype.getExtent = function() {
  55387. var n = this.base, r = aV.getExtent.call(this);
  55388. r[0] = pb(n, r[0]), r[1] = pb(n, r[1]);
  55389. var i = this._originalScale, a = i.getExtent();
  55390. return this._fixMin && (r[0] = vb(r[0], a[0])), this._fixMax && (r[1] = vb(r[1], a[1])), r;
  55391. }, e.prototype.unionExtent = function(n) {
  55392. this._originalScale.unionExtent(n);
  55393. var r = this.base;
  55394. n[0] = Wa(n[0]) / Wa(r), n[1] = Wa(n[1]) / Wa(r), aV.unionExtent.call(this, n);
  55395. }, e.prototype.unionExtentFromData = function(n, r) {
  55396. this.unionExtent(n.getApproximateExtent(r));
  55397. }, e.prototype.calcNiceTicks = function(n) {
  55398. n = n || 10;
  55399. var r = this._extent, i = r[1] - r[0];
  55400. if (!(i === 1 / 0 || i <= 0)) {
  55401. var a = lK(i), o = n / i * a;
  55402. for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; )
  55403. a *= 10;
  55404. var s = [mn(GNe(r[0] / a) * a), mn(HNe(r[1] / a) * a)];
  55405. this._interval = a, this._niceExtent = s;
  55406. }
  55407. }, e.prototype.calcNiceExtent = function(n) {
  55408. kg.calcNiceExtent.call(this, n), this._fixMin = n.fixMin, this._fixMax = n.fixMax;
  55409. }, e.prototype.parse = function(n) {
  55410. return n;
  55411. }, e.prototype.contain = function(n) {
  55412. return n = Wa(n) / Wa(this.base), dw(n, this._extent);
  55413. }, e.prototype.normalize = function(n) {
  55414. return n = Wa(n) / Wa(this.base), hw(n, this._extent);
  55415. }, e.prototype.scale = function(n) {
  55416. return n = pw(n, this._extent), pb(this.base, n);
  55417. }, e.type = "log", e;
  55418. }(cs)
  55419. ), tte = Tk.prototype;
  55420. tte.getMinorTicks = kg.getMinorTicks;
  55421. tte.getLabel = kg.getLabel;
  55422. function vb(t, e) {
  55423. return QNe(t, Ua(e));
  55424. }
  55425. cs.registerClass(Tk);
  55426. var jNe = (
  55427. /** @class */
  55428. function() {
  55429. function t(e, n, r) {
  55430. this._prepareParams(e, n, r);
  55431. }
  55432. return t.prototype._prepareParams = function(e, n, r) {
  55433. r[1] < r[0] && (r = [NaN, NaN]), this._dataMin = r[0], this._dataMax = r[1];
  55434. var i = this._isOrdinal = e.type === "ordinal";
  55435. this._needCrossZero = e.type === "interval" && n.getNeedCrossZero && n.getNeedCrossZero();
  55436. var a = n.get("min", !0);
  55437. a == null && (a = n.get("startValue", !0));
  55438. var o = this._modelMinRaw = a;
  55439. Me(o) ? this._modelMinNum = gb(e, o({
  55440. min: r[0],
  55441. max: r[1]
  55442. })) : o !== "dataMin" && (this._modelMinNum = gb(e, o));
  55443. var s = this._modelMaxRaw = n.get("max", !0);
  55444. if (Me(s) ? this._modelMaxNum = gb(e, s({
  55445. min: r[0],
  55446. max: r[1]
  55447. })) : s !== "dataMax" && (this._modelMaxNum = gb(e, s)), i)
  55448. this._axisDataLen = n.getCategories().length;
  55449. else {
  55450. var l = n.get("boundaryGap"), u = ue(l) ? l : [l || 0, l || 0];
  55451. 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 = [oo(u[0], 1), oo(u[1], 1)];
  55452. }
  55453. }, t.prototype.calculate = function() {
  55454. 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;
  55455. 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);
  55456. var f = ou(s) || ou(l) || e && !i;
  55457. this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !c && (l = 0));
  55458. var d = this._determinedMin, h = this._determinedMax;
  55459. return d != null && (s = d, u = !0), h != null && (l = h, c = !0), {
  55460. min: s,
  55461. max: l,
  55462. minFixed: u,
  55463. maxFixed: c,
  55464. isBlank: f
  55465. };
  55466. }, t.prototype.modifyDataMinMax = function(e, n) {
  55467. process.env.NODE_ENV !== "production" && ke(!this.frozen), this[UNe[e]] = n;
  55468. }, t.prototype.setDeterminedMinMax = function(e, n) {
  55469. var r = ZNe[e];
  55470. process.env.NODE_ENV !== "production" && ke(!this.frozen && this[r] == null), this[r] = n;
  55471. }, t.prototype.freeze = function() {
  55472. this.frozen = !0;
  55473. }, t;
  55474. }()
  55475. ), ZNe = {
  55476. min: "_determinedMin",
  55477. max: "_determinedMax"
  55478. }, UNe = {
  55479. min: "_dataMin",
  55480. max: "_dataMax"
  55481. };
  55482. function nte(t, e, n) {
  55483. var r = t.rawExtentInfo;
  55484. return r || (r = new jNe(t, e, n), t.rawExtentInfo = r, r);
  55485. }
  55486. function gb(t, e) {
  55487. return e == null ? null : ou(e) ? NaN : t.parse(e);
  55488. }
  55489. function rte(t, e) {
  55490. var n = t.type, r = nte(t, e, t.getExtent()).calculate();
  55491. t.setBlank(r.isBlank);
  55492. var i = r.min, a = r.max, o = e.ecModel;
  55493. if (o && n === "time") {
  55494. var s = Uee("bar", o), l = !1;
  55495. if (k(s, function(f) {
  55496. l = l || f.getBaseAxis() === e.axis;
  55497. }), l) {
  55498. var u = Xee(s), c = XNe(i, a, e, u);
  55499. i = c.min, a = c.max;
  55500. }
  55501. }
  55502. return {
  55503. extent: [i, a],
  55504. // "fix" means "fixed", the value should not be
  55505. // changed in the subsequent steps.
  55506. fixMin: r.minFixed,
  55507. fixMax: r.maxFixed
  55508. };
  55509. }
  55510. function XNe(t, e, n, r) {
  55511. var i = n.axis.getExtent(), a = i[1] - i[0], o = DNe(r, n.axis);
  55512. if (o === void 0)
  55513. return {
  55514. min: t,
  55515. max: e
  55516. };
  55517. var s = 1 / 0;
  55518. k(o, function(h) {
  55519. s = Math.min(h.offset, s);
  55520. });
  55521. var l = -1 / 0;
  55522. k(o, function(h) {
  55523. l = Math.max(h.offset + h.width, l);
  55524. }), s = Math.abs(s), l = Math.abs(l);
  55525. var u = s + l, c = e - t, f = 1 - (s + l) / a, d = c / f - c;
  55526. return e += d * (l / u), t -= d * (s / u), {
  55527. min: t,
  55528. max: e
  55529. };
  55530. }
  55531. function Of(t, e) {
  55532. var n = e, r = rte(t, n), i = r.extent, a = n.get("splitNumber");
  55533. t instanceof Tk && (t.base = n.get("logBase"));
  55534. var o = t.type, s = n.get("interval"), l = o === "interval" || o === "time";
  55535. t.setExtent(i[0], i[1]), t.calcNiceExtent({
  55536. splitNumber: a,
  55537. fixMin: r.fixMin,
  55538. fixMax: r.fixMax,
  55539. minInterval: l ? n.get("minInterval") : null,
  55540. maxInterval: l ? n.get("maxInterval") : null
  55541. }), s != null && t.setInterval && t.setInterval(s);
  55542. }
  55543. function G0(t, e) {
  55544. if (e = e || t.get("type"), e)
  55545. switch (e) {
  55546. case "category":
  55547. return new vw({
  55548. ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
  55549. extent: [1 / 0, -1 / 0]
  55550. });
  55551. case "time":
  55552. return new Ck({
  55553. locale: t.ecModel.getLocaleModel(),
  55554. useUTC: t.ecModel.get("useUTC")
  55555. });
  55556. default:
  55557. return new (cs.getClass(e) || Ys)();
  55558. }
  55559. }
  55560. function YNe(t) {
  55561. var e = t.scale.getExtent(), n = e[0], r = e[1];
  55562. return !(n > 0 && r > 0 || n < 0 && r < 0);
  55563. }
  55564. function Cp(t) {
  55565. var e = t.getLabelModel().get("formatter"), n = t.type === "category" ? t.scale.getExtent()[0] : null;
  55566. return t.scale.type === "time" ? /* @__PURE__ */ function(r) {
  55567. return function(i, a) {
  55568. return t.scale.getFormattedLabel(i, a, r);
  55569. };
  55570. }(e) : Oe(e) ? /* @__PURE__ */ function(r) {
  55571. return function(i) {
  55572. var a = t.scale.getLabel(i), o = r.replace("{value}", a ?? "");
  55573. return o;
  55574. };
  55575. }(e) : Me(e) ? /* @__PURE__ */ function(r) {
  55576. return function(i, a) {
  55577. return n != null && (a = i.value - n), r(Pk(t, i), a, i.level != null ? {
  55578. level: i.level
  55579. } : null);
  55580. };
  55581. }(e) : function(r) {
  55582. return t.scale.getLabel(r);
  55583. };
  55584. }
  55585. function Pk(t, e) {
  55586. return t.type === "category" ? t.scale.getLabel(e) : e.value;
  55587. }
  55588. function qNe(t) {
  55589. var e = t.model, n = t.scale;
  55590. if (!(!e.get(["axisLabel", "show"]) || n.isBlank())) {
  55591. var r, i, a = n.getExtent();
  55592. n instanceof vw ? i = n.count() : (r = n.getTicks(), i = r.length);
  55593. var o = t.getLabelModel(), s = Cp(t), l, u = 1;
  55594. i > 40 && (u = Math.ceil(i / 40));
  55595. for (var c = 0; c < i; c += u) {
  55596. var f = r ? r[c] : {
  55597. value: a[0] + c
  55598. }, d = s(f, c), h = o.getTextRect(d), p = KNe(h, o.get("rotate") || 0);
  55599. l ? l.union(p) : l = p;
  55600. }
  55601. return l;
  55602. }
  55603. }
  55604. function KNe(t, e) {
  55605. 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);
  55606. return s;
  55607. }
  55608. function $k(t) {
  55609. var e = t.get("interval");
  55610. return e ?? "auto";
  55611. }
  55612. function ite(t) {
  55613. return t.type === "category" && $k(t.getLabelModel()) === 0;
  55614. }
  55615. function CO(t, e) {
  55616. var n = {};
  55617. return k(t.mapDimensionsAll(e), function(r) {
  55618. n[Sk(t, r)] = !0;
  55619. }), st(n);
  55620. }
  55621. function JNe(t, e, n) {
  55622. e && k(CO(e, n), function(r) {
  55623. var i = e.getApproximateExtent(r);
  55624. i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1]);
  55625. });
  55626. }
  55627. var Tp = (
  55628. /** @class */
  55629. function() {
  55630. function t() {
  55631. }
  55632. return t.prototype.getNeedCrossZero = function() {
  55633. var e = this.option;
  55634. return !e.scale;
  55635. }, t.prototype.getCoordSysModel = function() {
  55636. }, t;
  55637. }()
  55638. );
  55639. function e5e(t) {
  55640. return us(null, t);
  55641. }
  55642. var t5e = {
  55643. isDimensionStacked: Xs,
  55644. enableDataStack: Gee,
  55645. getStackedDimension: Sk
  55646. };
  55647. function n5e(t, e) {
  55648. var n = e;
  55649. e instanceof Wt || (n = new Wt(e));
  55650. var r = G0(n);
  55651. return r.setExtent(t[0], t[1]), Of(r, n), r;
  55652. }
  55653. function r5e(t) {
  55654. xn(t, Tp);
  55655. }
  55656. function i5e(t, e) {
  55657. return e = e || {}, Zt(t, null, null, e.state !== "normal");
  55658. }
  55659. const a5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55660. __proto__: null,
  55661. createDimensions: hNe,
  55662. createList: e5e,
  55663. createScale: n5e,
  55664. createSymbol: $n,
  55665. createTextStyle: i5e,
  55666. dataStack: t5e,
  55667. enableHoverEmphasis: Yl,
  55668. getECData: Fe,
  55669. getLayoutRect: Rn,
  55670. mixinAxisModelCommonMethods: r5e
  55671. }, Symbol.toStringTag, { value: "Module" }));
  55672. var o5e = 1e-8;
  55673. function oV(t, e) {
  55674. return Math.abs(t - e) < o5e;
  55675. }
  55676. function Sc(t, e, n) {
  55677. var r = 0, i = t[0];
  55678. if (!i)
  55679. return !1;
  55680. for (var a = 1; a < t.length; a++) {
  55681. var o = t[a];
  55682. r += Os(i[0], i[1], o[0], o[1], e, n), i = o;
  55683. }
  55684. var s = t[0];
  55685. return (!oV(i[0], s[0]) || !oV(i[1], s[1])) && (r += Os(i[0], i[1], s[0], s[1], e, n)), r !== 0;
  55686. }
  55687. var s5e = [];
  55688. function jT(t, e) {
  55689. for (var n = 0; n < t.length; n++)
  55690. ar(t[n], t[n], e);
  55691. }
  55692. function sV(t, e, n, r) {
  55693. for (var i = 0; i < t.length; i++) {
  55694. var a = t[i];
  55695. r && (a = r.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && (Ps(e, e, a), $s(n, n, a));
  55696. }
  55697. }
  55698. function l5e(t) {
  55699. 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++) {
  55700. var l = t[s][0], u = t[s][1], c = a * u - l * o;
  55701. e += c, n += (a + l) * c, r += (o + u) * c, a = l, o = u;
  55702. }
  55703. return e ? [n / e / 3, r / e / 3, e] : [t[0][0] || 0, t[0][1] || 0];
  55704. }
  55705. var ate = (
  55706. /** @class */
  55707. function() {
  55708. function t(e) {
  55709. this.name = e;
  55710. }
  55711. return t.prototype.setCenter = function(e) {
  55712. this._center = e;
  55713. }, t.prototype.getCenter = function() {
  55714. var e = this._center;
  55715. return e || (e = this._center = this.calcCenter()), e;
  55716. }, t;
  55717. }()
  55718. ), lV = (
  55719. /** @class */
  55720. /* @__PURE__ */ function() {
  55721. function t(e, n) {
  55722. this.type = "polygon", this.exterior = e, this.interiors = n;
  55723. }
  55724. return t;
  55725. }()
  55726. ), uV = (
  55727. /** @class */
  55728. /* @__PURE__ */ function() {
  55729. function t(e) {
  55730. this.type = "linestring", this.points = e;
  55731. }
  55732. return t;
  55733. }()
  55734. ), ote = (
  55735. /** @class */
  55736. function(t) {
  55737. q(e, t);
  55738. function e(n, r, i) {
  55739. var a = t.call(this, n) || this;
  55740. return a.type = "geoJSON", a.geometries = r, a._center = i && [i[0], i[1]], a;
  55741. }
  55742. return e.prototype.calcCenter = function() {
  55743. for (var n = this.geometries, r, i = 0, a = 0; a < n.length; a++) {
  55744. var o = n[a], s = o.exterior, l = s && s.length;
  55745. l > i && (r = o, i = l);
  55746. }
  55747. if (r)
  55748. return l5e(r.exterior);
  55749. var u = this.getBoundingRect();
  55750. return [u.x + u.width / 2, u.y + u.height / 2];
  55751. }, e.prototype.getBoundingRect = function(n) {
  55752. var r = this._rect;
  55753. if (r && !n)
  55754. return r;
  55755. var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries;
  55756. return k(o, function(s) {
  55757. s.type === "polygon" ? sV(s.exterior, i, a, n) : k(s.points, function(l) {
  55758. sV(l, i, a, n);
  55759. });
  55760. }), 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;
  55761. }, e.prototype.contain = function(n) {
  55762. var r = this.getBoundingRect(), i = this.geometries;
  55763. if (!r.contain(n[0], n[1]))
  55764. return !1;
  55765. e: for (var a = 0, o = i.length; a < o; a++) {
  55766. var s = i[a];
  55767. if (s.type === "polygon") {
  55768. var l = s.exterior, u = s.interiors;
  55769. if (Sc(l, n[0], n[1])) {
  55770. for (var c = 0; c < (u ? u.length : 0); c++)
  55771. if (Sc(u[c], n[0], n[1]))
  55772. continue e;
  55773. return !0;
  55774. }
  55775. }
  55776. }
  55777. return !1;
  55778. }, e.prototype.transformTo = function(n, r, i, a) {
  55779. var o = this.getBoundingRect(), s = o.width / o.height;
  55780. i ? a || (a = i / s) : i = s * a;
  55781. for (var l = new Je(n, r, i, a), u = o.calculateTransform(l), c = this.geometries, f = 0; f < c.length; f++) {
  55782. var d = c[f];
  55783. d.type === "polygon" ? (jT(d.exterior, u), k(d.interiors, function(h) {
  55784. jT(h, u);
  55785. })) : k(d.points, function(h) {
  55786. jT(h, u);
  55787. });
  55788. }
  55789. o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
  55790. }, e.prototype.cloneShallow = function(n) {
  55791. n == null && (n = this.name);
  55792. var r = new e(n, this.geometries, this._center);
  55793. return r._rect = this._rect, r.transformTo = null, r;
  55794. }, e;
  55795. }(ate)
  55796. ), u5e = (
  55797. /** @class */
  55798. function(t) {
  55799. q(e, t);
  55800. function e(n, r) {
  55801. var i = t.call(this, n) || this;
  55802. return i.type = "geoSVG", i._elOnlyForCalculate = r, i;
  55803. }
  55804. return e.prototype.calcCenter = function() {
  55805. for (var n = this._elOnlyForCalculate, r = n.getBoundingRect(), i = [r.x + r.width / 2, r.y + r.height / 2], a = D0(s5e), o = n; o && !o.isGeoSVGGraphicRoot; )
  55806. Uo(a, o.getLocalTransform(), a), o = o.parent;
  55807. return kf(a, a), ar(i, i, a), i;
  55808. }, e;
  55809. }(ate)
  55810. );
  55811. function c5e(t) {
  55812. if (!t.UTF8Encoding)
  55813. return t;
  55814. var e = t, n = e.UTF8Scale;
  55815. n == null && (n = 1024);
  55816. var r = e.features;
  55817. return k(r, function(i) {
  55818. var a = i.geometry, o = a.encodeOffsets, s = a.coordinates;
  55819. if (o)
  55820. switch (a.type) {
  55821. case "LineString":
  55822. a.coordinates = ste(s, o, n);
  55823. break;
  55824. case "Polygon":
  55825. ZT(s, o, n);
  55826. break;
  55827. case "MultiLineString":
  55828. ZT(s, o, n);
  55829. break;
  55830. case "MultiPolygon":
  55831. k(s, function(l, u) {
  55832. return ZT(l, o[u], n);
  55833. });
  55834. }
  55835. }), e.UTF8Encoding = !1, e;
  55836. }
  55837. function ZT(t, e, n) {
  55838. for (var r = 0; r < t.length; r++)
  55839. t[r] = ste(t[r], e[r], n);
  55840. }
  55841. function ste(t, e, n) {
  55842. for (var r = [], i = e[0], a = e[1], o = 0; o < t.length; o += 2) {
  55843. var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
  55844. s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += i, l += a, i = s, a = l, r.push([s / n, l / n]);
  55845. }
  55846. return r;
  55847. }
  55848. function iE(t, e) {
  55849. return t = c5e(t), ce(Nt(t.features, function(n) {
  55850. return n.geometry && n.properties && n.geometry.coordinates.length > 0;
  55851. }), function(n) {
  55852. var r = n.properties, i = n.geometry, a = [];
  55853. switch (i.type) {
  55854. case "Polygon":
  55855. var o = i.coordinates;
  55856. a.push(new lV(o[0], o.slice(1)));
  55857. break;
  55858. case "MultiPolygon":
  55859. k(i.coordinates, function(l) {
  55860. l[0] && a.push(new lV(l[0], l.slice(1)));
  55861. });
  55862. break;
  55863. case "LineString":
  55864. a.push(new uV([i.coordinates]));
  55865. break;
  55866. case "MultiLineString":
  55867. a.push(new uV(i.coordinates));
  55868. }
  55869. var s = new ote(r[e || "name"], a, r.cp);
  55870. return s.properties = r, s;
  55871. });
  55872. }
  55873. const f5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55874. __proto__: null,
  55875. MAX_SAFE_INTEGER: CA,
  55876. asc: Vi,
  55877. getPercentWithPrecision: LDe,
  55878. getPixelPrecision: TR,
  55879. getPrecision: Ua,
  55880. getPrecisionSafe: iO,
  55881. isNumeric: Fx,
  55882. isRadianAroundZero: Lh,
  55883. linearMap: Lt,
  55884. nice: $R,
  55885. numericToNumber: is,
  55886. parseDate: Yi,
  55887. quantile: z_,
  55888. quantity: lK,
  55889. quantityExponent: L0,
  55890. reformIntervals: TA,
  55891. remRadian: PR,
  55892. round: mn
  55893. }, Symbol.toStringTag, { value: "Module" })), d5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55894. __proto__: null,
  55895. format: Q0,
  55896. parse: Yi
  55897. }, Symbol.toStringTag, { value: "Module" })), h5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55898. __proto__: null,
  55899. Arc: Yx,
  55900. BezierCurve: V0,
  55901. BoundingRect: Je,
  55902. Circle: ll,
  55903. CompoundPath: qx,
  55904. Ellipse: Xx,
  55905. Group: Ve,
  55906. Image: lr,
  55907. IncrementalDisplayable: iJ,
  55908. Line: Un,
  55909. LinearGradient: hp,
  55910. Polygon: ii,
  55911. Polyline: ai,
  55912. RadialGradient: VR,
  55913. Rect: mt,
  55914. Ring: z0,
  55915. Sector: ri,
  55916. Text: gt,
  55917. clipPointsByRect: HR,
  55918. clipRectByRect: uJ,
  55919. createIcon: vp,
  55920. extendPath: sJ,
  55921. extendShape: oJ,
  55922. getShapeClass: Kx,
  55923. getTransform: ql,
  55924. initProps: Yt,
  55925. makeImage: WR,
  55926. makePath: F0,
  55927. mergePath: Li,
  55928. registerShape: ka,
  55929. resizePath: QR,
  55930. updateProps: Ct
  55931. }, Symbol.toStringTag, { value: "Module" })), p5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55932. __proto__: null,
  55933. addCommas: KR,
  55934. capitalFirst: vLe,
  55935. encodeHTML: Gr,
  55936. formatTime: pLe,
  55937. formatTpl: ek,
  55938. getTextRect: dLe,
  55939. getTooltipMarker: CJ,
  55940. normalizeCssArray: Bf,
  55941. toCamelCase: JR,
  55942. truncateText: bK
  55943. }, Symbol.toStringTag, { value: "Module" })), v5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55944. __proto__: null,
  55945. bind: xe,
  55946. clone: Le,
  55947. curry: Ue,
  55948. defaults: Re,
  55949. each: k,
  55950. extend: le,
  55951. filter: Nt,
  55952. indexOf: et,
  55953. inherits: mR,
  55954. isArray: ue,
  55955. isFunction: Me,
  55956. isObject: Ie,
  55957. isString: Oe,
  55958. map: ce,
  55959. merge: qe,
  55960. reduce: Aa
  55961. }, Symbol.toStringTag, { value: "Module" }));
  55962. var Mm = bt();
  55963. function lte(t, e) {
  55964. var n = ce(e, function(r) {
  55965. return t.scale.parse(r);
  55966. });
  55967. return t.type === "time" && n.length > 0 && (n.sort(), n.unshift(n[0]), n.push(n[n.length - 1])), n;
  55968. }
  55969. function g5e(t) {
  55970. var e = t.getLabelModel().get("customValues");
  55971. if (e) {
  55972. var n = Cp(t);
  55973. return {
  55974. labels: lte(t, e).map(function(r) {
  55975. var i = {
  55976. value: r
  55977. };
  55978. return {
  55979. formattedLabel: n(i),
  55980. rawLabel: t.scale.getLabel(i),
  55981. tickValue: r
  55982. };
  55983. })
  55984. };
  55985. }
  55986. return t.type === "category" ? y5e(t) : _5e(t);
  55987. }
  55988. function m5e(t, e) {
  55989. var n = t.getTickModel().get("customValues");
  55990. return n ? {
  55991. ticks: lte(t, n)
  55992. } : t.type === "category" ? b5e(t, e) : {
  55993. ticks: ce(t.scale.getTicks(), function(r) {
  55994. return r.value;
  55995. })
  55996. };
  55997. }
  55998. function y5e(t) {
  55999. var e = t.getLabelModel(), n = ute(t, e);
  56000. return !e.get("show") || t.scale.isBlank() ? {
  56001. labels: [],
  56002. labelCategoryInterval: n.labelCategoryInterval
  56003. } : n;
  56004. }
  56005. function ute(t, e) {
  56006. var n = cte(t, "labels"), r = $k(e), i = fte(n, r);
  56007. if (i)
  56008. return i;
  56009. var a, o;
  56010. return Me(r) ? a = pte(t, r) : (o = r === "auto" ? O5e(t) : r, a = hte(t, o)), dte(n, r, {
  56011. labels: a,
  56012. labelCategoryInterval: o
  56013. });
  56014. }
  56015. function b5e(t, e) {
  56016. var n = cte(t, "ticks"), r = $k(e), i = fte(n, r);
  56017. if (i)
  56018. return i;
  56019. var a, o;
  56020. if ((!e.get("show") || t.scale.isBlank()) && (a = []), Me(r))
  56021. a = pte(t, r, !0);
  56022. else if (r === "auto") {
  56023. var s = ute(t, t.getLabelModel());
  56024. o = s.labelCategoryInterval, a = ce(s.labels, function(l) {
  56025. return l.tickValue;
  56026. });
  56027. } else
  56028. o = r, a = hte(t, o, !0);
  56029. return dte(n, r, {
  56030. ticks: a,
  56031. tickCategoryInterval: o
  56032. });
  56033. }
  56034. function _5e(t) {
  56035. var e = t.scale.getTicks(), n = Cp(t);
  56036. return {
  56037. labels: ce(e, function(r, i) {
  56038. return {
  56039. level: r.level,
  56040. formattedLabel: n(r, i),
  56041. rawLabel: t.scale.getLabel(r),
  56042. tickValue: r.value
  56043. };
  56044. })
  56045. };
  56046. }
  56047. function cte(t, e) {
  56048. return Mm(t)[e] || (Mm(t)[e] = []);
  56049. }
  56050. function fte(t, e) {
  56051. for (var n = 0; n < t.length; n++)
  56052. if (t[n].key === e)
  56053. return t[n].value;
  56054. }
  56055. function dte(t, e, n) {
  56056. return t.push({
  56057. key: e,
  56058. value: n
  56059. }), n;
  56060. }
  56061. function O5e(t) {
  56062. var e = Mm(t).autoInterval;
  56063. return e ?? (Mm(t).autoInterval = t.calculateCategoryInterval());
  56064. }
  56065. function S5e(t) {
  56066. var e = x5e(t), n = Cp(t), r = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = t.scale, a = i.getExtent(), o = i.count();
  56067. if (a[1] - a[0] < 1)
  56068. return 0;
  56069. var s = 1;
  56070. o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  56071. 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) {
  56072. var p = 0, v = 0, g = k0(n({
  56073. value: l
  56074. }), e.font, "center", "top");
  56075. p = g.width * 1.3, v = g.height * 1.3, d = Math.max(d, p, 7), h = Math.max(h, v, 7);
  56076. }
  56077. var m = d / c, y = h / f;
  56078. isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0);
  56079. var b = Math.max(0, Math.floor(Math.min(m, y))), _ = Mm(t.model), O = t.getExtent(), S = _.lastAutoInterval, x = _.lastTickCount;
  56080. 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;
  56081. }
  56082. function x5e(t) {
  56083. var e = t.getLabelModel();
  56084. return {
  56085. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  56086. labelRotate: e.get("rotate") || 0,
  56087. font: e.getFont()
  56088. };
  56089. }
  56090. function hte(t, e, n) {
  56091. var r = Cp(t), i = t.scale, a = i.getExtent(), o = t.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = a[0], c = i.count();
  56092. u !== 0 && l > 1 && c / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  56093. var f = ite(t), d = o.get("showMinLabel") || f, h = o.get("showMaxLabel") || f;
  56094. d && u !== a[0] && v(a[0]);
  56095. for (var p = u; p <= a[1]; p += l)
  56096. v(p);
  56097. h && p - l !== a[1] && v(a[1]);
  56098. function v(g) {
  56099. var m = {
  56100. value: g
  56101. };
  56102. s.push(n ? g : {
  56103. formattedLabel: r(m),
  56104. rawLabel: i.getLabel(m),
  56105. tickValue: g
  56106. });
  56107. }
  56108. return s;
  56109. }
  56110. function pte(t, e, n) {
  56111. var r = t.scale, i = Cp(t), a = [];
  56112. return k(r.getTicks(), function(o) {
  56113. var s = r.getLabel(o), l = o.value;
  56114. e(o.value, s) && a.push(n ? l : {
  56115. formattedLabel: i(o),
  56116. rawLabel: s,
  56117. tickValue: l
  56118. });
  56119. }), a;
  56120. }
  56121. var cV = [0, 1], w5e = (
  56122. /** @class */
  56123. function() {
  56124. function t(e, n, r) {
  56125. this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = n, this._extent = r || [0, 0];
  56126. }
  56127. return t.prototype.contain = function(e) {
  56128. var n = this._extent, r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
  56129. return e >= r && e <= i;
  56130. }, t.prototype.containData = function(e) {
  56131. return this.scale.contain(e);
  56132. }, t.prototype.getExtent = function() {
  56133. return this._extent.slice();
  56134. }, t.prototype.getPixelPrecision = function(e) {
  56135. return TR(e || this.scale.getExtent(), this._extent);
  56136. }, t.prototype.setExtent = function(e, n) {
  56137. var r = this._extent;
  56138. r[0] = e, r[1] = n;
  56139. }, t.prototype.dataToCoord = function(e, n) {
  56140. var r = this._extent, i = this.scale;
  56141. return e = i.normalize(e), this.onBand && i.type === "ordinal" && (r = r.slice(), fV(r, i.count())), Lt(e, cV, r, n);
  56142. }, t.prototype.coordToData = function(e, n) {
  56143. var r = this._extent, i = this.scale;
  56144. this.onBand && i.type === "ordinal" && (r = r.slice(), fV(r, i.count()));
  56145. var a = Lt(e, r, cV, n);
  56146. return this.scale.scale(a);
  56147. }, t.prototype.pointToData = function(e, n) {
  56148. }, t.prototype.getTicksCoords = function(e) {
  56149. e = e || {};
  56150. var n = e.tickModel || this.getTickModel(), r = m5e(this, n), i = r.ticks, a = ce(i, function(s) {
  56151. return {
  56152. coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
  56153. tickValue: s
  56154. };
  56155. }, this), o = n.get("alignWithLabel");
  56156. return C5e(this, a, o, e.clamp), a;
  56157. }, t.prototype.getMinorTicksCoords = function() {
  56158. if (this.scale.type === "ordinal")
  56159. return [];
  56160. var e = this.model.getModel("minorTick"), n = e.get("splitNumber");
  56161. n > 0 && n < 100 || (n = 5);
  56162. var r = this.scale.getMinorTicks(n), i = ce(r, function(a) {
  56163. return ce(a, function(o) {
  56164. return {
  56165. coord: this.dataToCoord(o),
  56166. tickValue: o
  56167. };
  56168. }, this);
  56169. }, this);
  56170. return i;
  56171. }, t.prototype.getViewLabels = function() {
  56172. return g5e(this).labels;
  56173. }, t.prototype.getLabelModel = function() {
  56174. return this.model.getModel("axisLabel");
  56175. }, t.prototype.getTickModel = function() {
  56176. return this.model.getModel("axisTick");
  56177. }, t.prototype.getBandWidth = function() {
  56178. var e = this._extent, n = this.scale.getExtent(), r = n[1] - n[0] + (this.onBand ? 1 : 0);
  56179. r === 0 && (r = 1);
  56180. var i = Math.abs(e[1] - e[0]);
  56181. return Math.abs(i) / r;
  56182. }, t.prototype.calculateCategoryInterval = function() {
  56183. return S5e(this);
  56184. }, t;
  56185. }()
  56186. );
  56187. function fV(t, e) {
  56188. var n = t[1] - t[0], r = e, i = n / r / 2;
  56189. t[0] += i, t[1] -= i;
  56190. }
  56191. function C5e(t, e, n, r) {
  56192. var i = e.length;
  56193. if (!t.onBand || n || !i)
  56194. return;
  56195. var a = t.getExtent(), o, s;
  56196. if (i === 1)
  56197. e[0].coord = a[0], o = e[1] = {
  56198. coord: a[1]
  56199. };
  56200. else {
  56201. var l = e[i - 1].tickValue - e[0].tickValue, u = (e[i - 1].coord - e[0].coord) / l;
  56202. k(e, function(h) {
  56203. h.coord -= u / 2;
  56204. });
  56205. var c = t.scale.getExtent();
  56206. s = 1 + c[1] - e[i - 1].tickValue, o = {
  56207. coord: e[i - 1].coord + u * s
  56208. }, e.push(o);
  56209. }
  56210. var f = a[0] > a[1];
  56211. d(e[0].coord, a[0]) && (r ? e[0].coord = a[0] : e.shift()), r && d(a[0], e[0].coord) && e.unshift({
  56212. coord: a[0]
  56213. }), d(a[1], o.coord) && (r ? o.coord = a[1] : e.pop()), r && d(o.coord, a[1]) && e.push({
  56214. coord: a[1]
  56215. });
  56216. function d(h, p) {
  56217. return h = mn(h), p = mn(p), f ? h > p : h < p;
  56218. }
  56219. }
  56220. const Ba = w5e;
  56221. function T5e(t) {
  56222. var e = rt.extend(t);
  56223. return rt.registerClass(e), e;
  56224. }
  56225. function P5e(t) {
  56226. var e = Xt.extend(t);
  56227. return Xt.registerClass(e), e;
  56228. }
  56229. function $5e(t) {
  56230. var e = Ht.extend(t);
  56231. return Ht.registerClass(e), e;
  56232. }
  56233. function A5e(t) {
  56234. var e = zt.extend(t);
  56235. return zt.registerClass(e), e;
  56236. }
  56237. var vv = Math.PI * 2, ac = as.CMD, E5e = ["top", "right", "bottom", "left"];
  56238. function M5e(t, e, n, r, i) {
  56239. var a = n.width, o = n.height;
  56240. switch (t) {
  56241. case "top":
  56242. r.set(n.x + a / 2, n.y - e), i.set(0, -1);
  56243. break;
  56244. case "bottom":
  56245. r.set(n.x + a / 2, n.y + o + e), i.set(0, 1);
  56246. break;
  56247. case "left":
  56248. r.set(n.x - e, n.y + o / 2), i.set(-1, 0);
  56249. break;
  56250. case "right":
  56251. r.set(n.x + a + e, n.y + o / 2), i.set(1, 0);
  56252. break;
  56253. }
  56254. }
  56255. function I5e(t, e, n, r, i, a, o, s, l) {
  56256. o -= t, s -= e;
  56257. var u = Math.sqrt(o * o + s * s);
  56258. o /= u, s /= u;
  56259. var c = o * n + t, f = s * n + e;
  56260. if (Math.abs(r - i) % vv < 1e-4)
  56261. return l[0] = c, l[1] = f, u - n;
  56262. if (a) {
  56263. var d = r;
  56264. r = Fi(i), i = Fi(d);
  56265. } else
  56266. r = Fi(r), i = Fi(i);
  56267. r > i && (i += vv);
  56268. var h = Math.atan2(s, o);
  56269. if (h < 0 && (h += vv), h >= r && h <= i || h + vv >= r && h + vv <= i)
  56270. return l[0] = c, l[1] = f, u - n;
  56271. 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);
  56272. return y < b ? (l[0] = p, l[1] = v, Math.sqrt(y)) : (l[0] = g, l[1] = m, Math.sqrt(b));
  56273. }
  56274. function TO(t, e, n, r, i, a, o, s) {
  56275. var l = i - t, u = a - e, c = n - t, f = r - e, d = Math.sqrt(c * c + f * f);
  56276. c /= d, f /= d;
  56277. var h = l * c + u * f, p = h / d;
  56278. s && (p = Math.min(Math.max(p, 0), 1)), p *= d;
  56279. var v = o[0] = t + p * c, g = o[1] = e + p * f;
  56280. return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a));
  56281. }
  56282. function vte(t, e, n, r, i, a, o) {
  56283. n < 0 && (t = t + n, n = -n), r < 0 && (e = e + r, r = -r);
  56284. 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);
  56285. return Math.sqrt((u - i) * (u - i) + (c - a) * (c - a));
  56286. }
  56287. var Za = [];
  56288. function D5e(t, e, n) {
  56289. var r = vte(e.x, e.y, e.width, e.height, t.x, t.y, Za);
  56290. return n.set(Za[0], Za[1]), r;
  56291. }
  56292. function R5e(t, e, n) {
  56293. 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; ) {
  56294. var p = c[h++];
  56295. h === 1 && (r = c[h], i = c[h + 1], a = r, o = i);
  56296. var v = u;
  56297. switch (p) {
  56298. case ac.M:
  56299. a = c[h++], o = c[h++], r = a, i = o;
  56300. break;
  56301. case ac.L:
  56302. v = TO(r, i, c[h], c[h + 1], f, d, Za, !0), r = c[h++], i = c[h++];
  56303. break;
  56304. case ac.C:
  56305. v = Vq(r, i, c[h++], c[h++], c[h++], c[h++], c[h], c[h + 1], f, d, Za), r = c[h++], i = c[h++];
  56306. break;
  56307. case ac.Q:
  56308. v = Wq(r, i, c[h++], c[h++], c[h], c[h + 1], f, d, Za), r = c[h++], i = c[h++];
  56309. break;
  56310. case ac.A:
  56311. var g = c[h++], m = c[h++], y = c[h++], b = c[h++], _ = c[h++], O = c[h++];
  56312. h += 1;
  56313. var S = !!(1 - c[h++]);
  56314. s = Math.cos(_) * y + g, l = Math.sin(_) * b + m, h <= 1 && (a = s, o = l);
  56315. var x = (f - g) * b / y + g;
  56316. v = I5e(g, m, b, _, _ + O, S, x, d, Za), r = Math.cos(_ + O) * y + g, i = Math.sin(_ + O) * b + m;
  56317. break;
  56318. case ac.R:
  56319. a = r = c[h++], o = i = c[h++];
  56320. var C = c[h++], T = c[h++];
  56321. v = vte(a, o, C, T, f, d, Za);
  56322. break;
  56323. case ac.Z:
  56324. v = TO(r, i, a, o, f, d, Za, !0), r = a, i = o;
  56325. break;
  56326. }
  56327. v < u && (u = v, n.set(Za[0], Za[1]));
  56328. }
  56329. return u;
  56330. }
  56331. var Xa = new Ke(), Ut = new Ke(), wn = new Ke(), Wo = new Ke(), Lo = new Ke();
  56332. function dV(t, e) {
  56333. if (t) {
  56334. var n = t.getTextGuideLine(), r = t.getTextContent();
  56335. if (r && n) {
  56336. var i = t.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || E5e, s = r.getBoundingRect().clone();
  56337. s.applyTransform(r.getComputedTransform());
  56338. var l = 1 / 0, u = i.anchor, c = t.getComputedTransform(), f = c && kf([], c), d = e.get("length2") || 0;
  56339. u && wn.copy(u);
  56340. for (var h = 0; h < o.length; h++) {
  56341. var p = o[h];
  56342. M5e(p, 0, s, Xa, Wo), Ke.scaleAndAdd(Ut, Xa, Wo, d), Ut.transform(f);
  56343. var v = t.getBoundingRect(), g = u ? u.distance(Ut) : t instanceof ot ? R5e(Ut, t.path, wn) : D5e(Ut, v, wn);
  56344. g < l && (l = g, Ut.transform(c), wn.transform(c), wn.toArray(a[0]), Ut.toArray(a[1]), Xa.toArray(a[2]));
  56345. }
  56346. gte(a, e.get("minTurnAngle")), n.setShape({
  56347. points: a
  56348. });
  56349. }
  56350. }
  56351. }
  56352. var PO = [], Hr = new Ke();
  56353. function gte(t, e) {
  56354. if (e <= 180 && e > 0) {
  56355. e = e / 180 * Math.PI, Xa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Wo, Xa, Ut), Ke.sub(Lo, wn, Ut);
  56356. var n = Wo.len(), r = Lo.len();
  56357. if (!(n < 1e-3 || r < 1e-3)) {
  56358. Wo.scale(1 / n), Lo.scale(1 / r);
  56359. var i = Wo.dot(Lo), a = Math.cos(e);
  56360. if (a < i) {
  56361. var o = TO(Ut.x, Ut.y, wn.x, wn.y, Xa.x, Xa.y, PO, !1);
  56362. Hr.fromArray(PO), Hr.scaleAndAdd(Lo, o / Math.tan(Math.PI - e));
  56363. var s = wn.x !== Ut.x ? (Hr.x - Ut.x) / (wn.x - Ut.x) : (Hr.y - Ut.y) / (wn.y - Ut.y);
  56364. if (isNaN(s))
  56365. return;
  56366. s < 0 ? Ke.copy(Hr, Ut) : s > 1 && Ke.copy(Hr, wn), Hr.toArray(t[1]);
  56367. }
  56368. }
  56369. }
  56370. }
  56371. function k5e(t, e, n) {
  56372. if (n <= 180 && n > 0) {
  56373. n = n / 180 * Math.PI, Xa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Wo, Ut, Xa), Ke.sub(Lo, wn, Ut);
  56374. var r = Wo.len(), i = Lo.len();
  56375. if (!(r < 1e-3 || i < 1e-3)) {
  56376. Wo.scale(1 / r), Lo.scale(1 / i);
  56377. var a = Wo.dot(e), o = Math.cos(n);
  56378. if (a < o) {
  56379. var s = TO(Ut.x, Ut.y, wn.x, wn.y, Xa.x, Xa.y, PO, !1);
  56380. Hr.fromArray(PO);
  56381. var l = Math.PI / 2, u = Math.acos(Lo.dot(e)), c = l + u - n;
  56382. if (c >= l)
  56383. Ke.copy(Hr, wn);
  56384. else {
  56385. Hr.scaleAndAdd(Lo, s / Math.tan(Math.PI / 2 - c));
  56386. var f = wn.x !== Ut.x ? (Hr.x - Ut.x) / (wn.x - Ut.x) : (Hr.y - Ut.y) / (wn.y - Ut.y);
  56387. if (isNaN(f))
  56388. return;
  56389. f < 0 ? Ke.copy(Hr, Ut) : f > 1 && Ke.copy(Hr, wn);
  56390. }
  56391. Hr.toArray(t[1]);
  56392. }
  56393. }
  56394. }
  56395. }
  56396. function UT(t, e, n, r) {
  56397. var i = n === "normal", a = i ? t : t.ensureState(n);
  56398. a.ignore = e;
  56399. var o = r.get("smooth");
  56400. o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o);
  56401. var s = r.getModel("lineStyle").getLineStyle();
  56402. i ? t.useStyle(s) : a.style = s;
  56403. }
  56404. function L5e(t, e) {
  56405. var n = e.smooth, r = e.points;
  56406. if (r)
  56407. if (t.moveTo(r[0][0], r[0][1]), n > 0 && r.length >= 3) {
  56408. var i = Ts(r[0], r[1]), a = Ts(r[1], r[2]);
  56409. if (!i || !a) {
  56410. t.lineTo(r[1][0], r[1][1]), t.lineTo(r[2][0], r[2][1]);
  56411. return;
  56412. }
  56413. var o = Math.min(i, a) * n, s = xg([], r[1], r[0], o / i), l = xg([], r[1], r[2], o / a), u = xg([], s, l, 0.5);
  56414. 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]);
  56415. } else
  56416. for (var c = 1; c < r.length; c++)
  56417. t.lineTo(r[c][0], r[c][1]);
  56418. }
  56419. function Ak(t, e, n) {
  56420. var r = t.getTextGuideLine(), i = t.getTextContent();
  56421. if (!i) {
  56422. r && t.removeTextGuideLine();
  56423. return;
  56424. }
  56425. for (var a = e.normal, o = a.get("show"), s = i.ignore, l = 0; l < xm.length; l++) {
  56426. var u = xm[l], c = e[u], f = u === "normal";
  56427. if (c) {
  56428. var d = c.get("show"), h = f ? s : We(i.states[u] && i.states[u].ignore, s);
  56429. if (h || !We(d, o)) {
  56430. var p = f ? r : r && r.states[u];
  56431. p && (p.ignore = !0), r && UT(r, !0, u, c);
  56432. continue;
  56433. }
  56434. r || (r = new ai(), t.setTextGuideLine(r), !f && (s || !o) && UT(r, !0, "normal", e.normal), t.stateProxy && (r.stateProxy = t.stateProxy)), UT(r, !1, u, c);
  56435. }
  56436. }
  56437. if (r) {
  56438. Re(r.style, n), r.style.fill = null;
  56439. var v = a.get("showAbove"), g = t.textGuideLineConfig = t.textGuideLineConfig || {};
  56440. g.showAbove = v || !1, r.buildPath = L5e;
  56441. }
  56442. }
  56443. function Ek(t, e) {
  56444. e = e || "labelLine";
  56445. for (var n = {
  56446. normal: t.getModel(e)
  56447. }, r = 0; r < ni.length; r++) {
  56448. var i = ni[r];
  56449. n[i] = t.getModel([i, e]);
  56450. }
  56451. return n;
  56452. }
  56453. function mte(t) {
  56454. for (var e = [], n = 0; n < t.length; n++) {
  56455. var r = t[n];
  56456. if (!r.defaultAttr.ignore) {
  56457. 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();
  56458. u.applyTransform(a), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
  56459. var c = s ? new sO(o, a) : null;
  56460. e.push({
  56461. label: i,
  56462. labelLine: r.labelLine,
  56463. rect: u,
  56464. localRect: o,
  56465. obb: c,
  56466. priority: r.priority,
  56467. defaultAttr: r.defaultAttr,
  56468. layoutOption: r.computedLayoutOption,
  56469. axisAligned: s,
  56470. transform: a
  56471. });
  56472. }
  56473. }
  56474. return e;
  56475. }
  56476. function yte(t, e, n, r, i, a) {
  56477. var o = t.length;
  56478. if (o < 2)
  56479. return;
  56480. t.sort(function(C, T) {
  56481. return C.rect[e] - T.rect[e];
  56482. });
  56483. for (var s = 0, l, u = !1, c = 0, f = 0; f < o; f++) {
  56484. var d = t[f], h = d.rect;
  56485. l = h[e] - s, l < 0 && (h[e] -= l, d.label[e] -= l, u = !0);
  56486. var p = Math.max(-l, 0);
  56487. c += p, s = h[e] + h[n];
  56488. }
  56489. c > 0 && a && O(-c / o, 0, o);
  56490. var v = t[0], g = t[o - 1], m, y;
  56491. 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);
  56492. function b() {
  56493. m = v.rect[e] - r, y = i - g.rect[e] - g.rect[n];
  56494. }
  56495. function _(C, T, w) {
  56496. if (C < 0) {
  56497. var P = Math.min(T, -C);
  56498. if (P > 0) {
  56499. O(P * w, 0, o);
  56500. var $ = P + C;
  56501. $ < 0 && S(-$ * w, 1);
  56502. } else
  56503. S(-C * w, 1);
  56504. }
  56505. }
  56506. function O(C, T, w) {
  56507. C !== 0 && (u = !0);
  56508. for (var P = T; P < w; P++) {
  56509. var $ = t[P], A = $.rect;
  56510. A[e] += C, $.label[e] += C;
  56511. }
  56512. }
  56513. function S(C, T) {
  56514. for (var w = [], P = 0, $ = 1; $ < o; $++) {
  56515. var A = t[$ - 1].rect, D = Math.max(t[$].rect[e] - A[e] - A[n], 0);
  56516. w.push(D), P += D;
  56517. }
  56518. if (P) {
  56519. var E = Math.min(Math.abs(C) / P, T);
  56520. if (C > 0)
  56521. for (var $ = 0; $ < o - 1; $++) {
  56522. var R = w[$] * E;
  56523. O(R, 0, $ + 1);
  56524. }
  56525. else
  56526. for (var $ = o - 1; $ > 0; $--) {
  56527. var R = w[$ - 1] * E;
  56528. O(-R, $, o);
  56529. }
  56530. }
  56531. }
  56532. function x(C) {
  56533. var T = C < 0 ? -1 : 1;
  56534. C = Math.abs(C);
  56535. for (var w = Math.ceil(C / (o - 1)), P = 0; P < o - 1; P++)
  56536. if (T > 0 ? O(w, 0, P + 1) : O(-w, o - P - 1, o), C -= w, C <= 0)
  56537. return;
  56538. }
  56539. return u;
  56540. }
  56541. function N5e(t, e, n, r) {
  56542. return yte(t, "x", "width", e, n, r);
  56543. }
  56544. function bte(t, e, n, r) {
  56545. return yte(t, "y", "height", e, n, r);
  56546. }
  56547. function _te(t) {
  56548. var e = [];
  56549. t.sort(function(v, g) {
  56550. return g.priority - v.priority;
  56551. });
  56552. var n = new Je(0, 0, 0, 0);
  56553. function r(v) {
  56554. if (!v.ignore) {
  56555. var g = v.ensureState("emphasis");
  56556. g.ignore == null && (g.ignore = !1);
  56557. }
  56558. v.ignore = !0;
  56559. }
  56560. for (var i = 0; i < t.length; i++) {
  56561. var a = t[i], o = a.axisAligned, s = a.localRect, l = a.transform, u = a.label, c = a.labelLine;
  56562. n.copy(a.rect), n.width -= 0.1, n.height -= 0.1, n.x += 0.05, n.y += 0.05;
  56563. for (var f = a.obb, d = !1, h = 0; h < e.length; h++) {
  56564. var p = e[h];
  56565. if (n.intersect(p.rect)) {
  56566. if (o && p.axisAligned) {
  56567. d = !0;
  56568. break;
  56569. }
  56570. if (p.obb || (p.obb = new sO(p.localRect, p.transform)), f || (f = new sO(s, l)), f.intersect(p.obb)) {
  56571. d = !0;
  56572. break;
  56573. }
  56574. }
  56575. }
  56576. d ? (r(u), c && r(c)) : (u.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a));
  56577. }
  56578. }
  56579. function B5e(t) {
  56580. if (t) {
  56581. for (var e = [], n = 0; n < t.length; n++)
  56582. e.push(t[n].slice());
  56583. return e;
  56584. }
  56585. }
  56586. function z5e(t, e) {
  56587. var n = t.label, r = e && e.getTextGuideLine();
  56588. return {
  56589. dataIndex: t.dataIndex,
  56590. dataType: t.dataType,
  56591. seriesIndex: t.seriesModel.seriesIndex,
  56592. text: t.label.style.text,
  56593. rect: t.hostRect,
  56594. labelRect: t.rect,
  56595. // x: labelAttr.x,
  56596. // y: labelAttr.y,
  56597. align: n.style.align,
  56598. verticalAlign: n.style.verticalAlign,
  56599. labelLinePoints: B5e(r && r.shape.points)
  56600. };
  56601. }
  56602. var hV = ["align", "verticalAlign", "width", "height", "fontSize"], Vr = new As(), XT = bt(), V5e = bt();
  56603. function mb(t, e, n) {
  56604. for (var r = 0; r < n.length; r++) {
  56605. var i = n[r];
  56606. e[i] != null && (t[i] = e[i]);
  56607. }
  56608. }
  56609. var yb = ["x", "y", "rotation"], F5e = (
  56610. /** @class */
  56611. function() {
  56612. function t() {
  56613. this._labelList = [], this._chartViewList = [];
  56614. }
  56615. return t.prototype.clearLabels = function() {
  56616. this._labelList = [], this._chartViewList = [];
  56617. }, t.prototype._addLabel = function(e, n, r, i, a) {
  56618. var o = i.style, s = i.__hostTarget, l = s.textConfig || {}, u = i.getComputedTransform(), c = i.getBoundingRect().plain();
  56619. Je.applyTransform(c, c, u), u ? Vr.setLocalTransform(u) : (Vr.x = Vr.y = Vr.rotation = Vr.originX = Vr.originY = 0, Vr.scaleX = Vr.scaleY = 1), Vr.rotation = Fi(Vr.rotation);
  56620. var f = i.__hostTarget, d;
  56621. if (f) {
  56622. d = f.getBoundingRect().plain();
  56623. var h = f.getComputedTransform();
  56624. Je.applyTransform(d, d, h);
  56625. }
  56626. var p = d && f.getTextGuideLine();
  56627. this._labelList.push({
  56628. label: i,
  56629. labelLine: p,
  56630. seriesModel: r,
  56631. dataIndex: e,
  56632. dataType: n,
  56633. layoutOption: a,
  56634. computedLayoutOption: null,
  56635. rect: c,
  56636. hostRect: d,
  56637. // Label with lower priority will be hidden when overlapped
  56638. // Use rect size as default priority
  56639. priority: d ? d.width * d.height : 0,
  56640. // Save default label attributes.
  56641. // For restore if developers want get back to default value in callback.
  56642. defaultAttr: {
  56643. ignore: i.ignore,
  56644. labelGuideIgnore: p && p.ignore,
  56645. x: Vr.x,
  56646. y: Vr.y,
  56647. scaleX: Vr.scaleX,
  56648. scaleY: Vr.scaleY,
  56649. rotation: Vr.rotation,
  56650. style: {
  56651. x: o.x,
  56652. y: o.y,
  56653. align: o.align,
  56654. verticalAlign: o.verticalAlign,
  56655. width: o.width,
  56656. height: o.height,
  56657. fontSize: o.fontSize
  56658. },
  56659. cursor: i.cursor,
  56660. attachedPos: l.position,
  56661. attachedRot: l.rotation
  56662. }
  56663. });
  56664. }, t.prototype.addLabelsOfSeries = function(e) {
  56665. var n = this;
  56666. this._chartViewList.push(e);
  56667. var r = e.__model, i = r.get("labelLayout");
  56668. (Me(i) || st(i).length) && e.group.traverse(function(a) {
  56669. if (a.ignore)
  56670. return !0;
  56671. var o = a.getTextContent(), s = Fe(a);
  56672. o && !o.disableLabelLayout && n._addLabel(s.dataIndex, s.dataType, r, o, i);
  56673. });
  56674. }, t.prototype.updateLayoutConfig = function(e) {
  56675. var n = e.getWidth(), r = e.getHeight();
  56676. function i(b, _) {
  56677. return function() {
  56678. dV(b, _);
  56679. };
  56680. }
  56681. for (var a = 0; a < this._labelList.length; a++) {
  56682. var o = this._labelList[a], s = o.label, l = s.__hostTarget, u = o.defaultAttr, c = void 0;
  56683. Me(o.layoutOption) ? c = o.layoutOption(z5e(o, l)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c;
  56684. var f = Math.PI / 180;
  56685. l && l.setTextConfig({
  56686. // Force to set local false.
  56687. local: !1,
  56688. // Ignore position and rotation config on the host el if x or y is changed.
  56689. position: c.x != null || c.y != null ? null : u.attachedPos,
  56690. // Ignore rotation config on the host el if rotation is changed.
  56691. rotation: c.rotate != null ? c.rotate * f : u.attachedRot,
  56692. offset: [c.dx || 0, c.dy || 0]
  56693. });
  56694. var d = !1;
  56695. 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) {
  56696. var h = l.getTextGuideLine();
  56697. h && (h.setShape({
  56698. points: c.labelLinePoints
  56699. }), d = !1);
  56700. }
  56701. var p = XT(s);
  56702. p.needsUpdateLabelLine = d, s.rotation = c.rotate != null ? c.rotate * f : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
  56703. for (var v = 0; v < hV.length; v++) {
  56704. var g = hV[v];
  56705. s.setStyle(g, c[g] != null ? c[g] : u.style[g]);
  56706. }
  56707. if (c.draggable) {
  56708. if (s.draggable = !0, s.cursor = "move", l) {
  56709. var m = o.seriesModel;
  56710. if (o.dataIndex != null) {
  56711. var y = o.seriesModel.getData(o.dataType);
  56712. m = y.getItemModel(o.dataIndex);
  56713. }
  56714. s.on("drag", i(l, m.getModel("labelLine")));
  56715. }
  56716. } else
  56717. s.off("drag"), s.cursor = u.cursor;
  56718. }
  56719. }, t.prototype.layout = function(e) {
  56720. var n = e.getWidth(), r = e.getHeight(), i = mte(this._labelList), a = Nt(i, function(l) {
  56721. return l.layoutOption.moveOverlap === "shiftX";
  56722. }), o = Nt(i, function(l) {
  56723. return l.layoutOption.moveOverlap === "shiftY";
  56724. });
  56725. N5e(a, 0, n), bte(o, 0, r);
  56726. var s = Nt(i, function(l) {
  56727. return l.layoutOption.hideOverlap;
  56728. });
  56729. _te(s);
  56730. }, t.prototype.processLabelsOverall = function() {
  56731. var e = this;
  56732. k(this._chartViewList, function(n) {
  56733. var r = n.__model, i = n.ignoreLabelLineUpdate, a = r.isAnimationEnabled();
  56734. n.group.traverse(function(o) {
  56735. if (o.ignore && !o.forceLabelAnimation)
  56736. return !0;
  56737. var s = !i, l = o.getTextContent();
  56738. !s && l && (s = XT(l).needsUpdateLabelLine), s && e._updateLabelLine(o, r), a && e._animateLabels(o, r);
  56739. });
  56740. });
  56741. }, t.prototype._updateLabelLine = function(e, n) {
  56742. var r = e.getTextContent(), i = Fe(e), a = i.dataIndex;
  56743. if (r && a != null) {
  56744. var o = n.getData(i.dataType), s = o.getItemModel(a), l = {}, u = o.getItemVisual(a, "style");
  56745. if (u) {
  56746. var c = o.getVisual("drawType");
  56747. l.stroke = u[c];
  56748. }
  56749. var f = s.getModel("labelLine");
  56750. Ak(e, Ek(s), l), dV(e, f);
  56751. }
  56752. }, t.prototype._animateLabels = function(e, n) {
  56753. var r = e.getTextContent(), i = e.getTextGuideLine();
  56754. if (r && (e.forceLabelAnimation || !r.ignore && !r.invisible && !e.disableLabelAnimation && !th(e))) {
  56755. var a = XT(r), o = a.oldLayout, s = Fe(e), l = s.dataIndex, u = {
  56756. x: r.x,
  56757. y: r.y,
  56758. rotation: r.rotation
  56759. }, c = n.getData(s.dataType);
  56760. if (o) {
  56761. r.attr(o);
  56762. var d = e.prevStates;
  56763. d && (et(d, "select") >= 0 && r.attr(a.oldLayoutSelect), et(d, "emphasis") >= 0 && r.attr(a.oldLayoutEmphasis)), Ct(r, u, n, l);
  56764. } else if (r.attr(u), !mp(r).valueAnimation) {
  56765. var f = We(r.style.opacity, 1);
  56766. r.style.opacity = 0, Yt(r, {
  56767. style: {
  56768. opacity: f
  56769. }
  56770. }, n, l);
  56771. }
  56772. if (a.oldLayout = u, r.states.select) {
  56773. var h = a.oldLayoutSelect = {};
  56774. mb(h, u, yb), mb(h, r.states.select, yb);
  56775. }
  56776. if (r.states.emphasis) {
  56777. var p = a.oldLayoutEmphasis = {};
  56778. mb(p, u, yb), mb(p, r.states.emphasis, yb);
  56779. }
  56780. hJ(r, l, c, n, n);
  56781. }
  56782. if (i && !i.ignore && !i.invisible) {
  56783. var a = V5e(i), o = a.oldLayout, v = {
  56784. points: i.shape.points
  56785. };
  56786. o ? (i.attr({
  56787. shape: o
  56788. }), Ct(i, {
  56789. shape: v
  56790. }, n)) : (i.setShape(v), i.style.strokePercent = 0, Yt(i, {
  56791. style: {
  56792. strokePercent: 1
  56793. }
  56794. }, n)), a.oldLayout = v;
  56795. }
  56796. }, t;
  56797. }()
  56798. ), YT = bt();
  56799. function W5e(t) {
  56800. t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
  56801. var i = YT(n).labelManager;
  56802. i || (i = YT(n).labelManager = new F5e()), i.clearLabels();
  56803. }), t.registerUpdateLifecycle("series:layoutlabels", function(e, n, r) {
  56804. var i = YT(n).labelManager;
  56805. r.updatedSeries.forEach(function(a) {
  56806. i.addLabelsOfSeries(n.getViewOfSeriesModel(a));
  56807. }), i.updateLayoutConfig(n), i.layout(n), i.processLabelsOverall();
  56808. });
  56809. }
  56810. var qT = Math.sin, KT = Math.cos, Ote = Math.PI, oc = Math.PI * 2, Q5e = 180 / Ote, Ste = function() {
  56811. function t() {
  56812. }
  56813. return t.prototype.reset = function(e) {
  56814. this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
  56815. }, t.prototype.moveTo = function(e, n) {
  56816. this._add("M", e, n);
  56817. }, t.prototype.lineTo = function(e, n) {
  56818. this._add("L", e, n);
  56819. }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
  56820. this._add("C", e, n, r, i, a, o);
  56821. }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
  56822. this._add("Q", e, n, r, i);
  56823. }, t.prototype.arc = function(e, n, r, i, a, o) {
  56824. this.ellipse(e, n, r, r, 0, i, a, o);
  56825. }, t.prototype.ellipse = function(e, n, r, i, a, o, s, l) {
  56826. 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;
  56827. d ? p = !0 : Bl(f) ? p = !1 : p = h >= Ote == !!c;
  56828. var v = e + r * KT(o), g = n + i * qT(o);
  56829. this._start && this._add("M", v, g);
  56830. var m = Math.round(a * Q5e);
  56831. if (d) {
  56832. var y = 1 / this._p, b = (c ? 1 : -1) * (oc - y);
  56833. this._add("A", r, i, m, 1, +c, e + r * KT(o + b), n + i * qT(o + b)), y > 0.01 && this._add("A", r, i, m, 0, +c, v, g);
  56834. } else {
  56835. var _ = e + r * KT(s), O = n + i * qT(s);
  56836. this._add("A", r, i, m, +p, +c, _, O);
  56837. }
  56838. }, t.prototype.rect = function(e, n, r, i) {
  56839. this._add("M", e, n), this._add("l", r, 0), this._add("l", 0, i), this._add("l", -r, 0), this._add("Z");
  56840. }, t.prototype.closePath = function() {
  56841. this._d.length > 0 && this._add("Z");
  56842. }, t.prototype._add = function(e, n, r, i, a, o, s, l, u) {
  56843. for (var c = [], f = this._p, d = 1; d < arguments.length; d++) {
  56844. var h = arguments[d];
  56845. if (isNaN(h)) {
  56846. this._invalid = !0;
  56847. return;
  56848. }
  56849. c.push(Math.round(h * f) / f);
  56850. }
  56851. this._d.push(e + c.join(" ")), this._start = e === "Z";
  56852. }, t.prototype.generateStr = function() {
  56853. this._str = this._invalid ? "" : this._d.join(""), this._d = [];
  56854. }, t.prototype.getStr = function() {
  56855. return this._str;
  56856. }, t;
  56857. }(), Mk = "none", H5e = Math.round;
  56858. function G5e(t) {
  56859. var e = t.fill;
  56860. return e != null && e !== Mk;
  56861. }
  56862. function j5e(t) {
  56863. var e = t.stroke;
  56864. return e != null && e !== Mk;
  56865. }
  56866. var aE = ["lineCap", "miterLimit", "lineJoin"], Z5e = ce(aE, function(t) {
  56867. return "stroke-" + t.toLowerCase();
  56868. });
  56869. function U5e(t, e, n, r) {
  56870. var i = e.opacity == null ? 1 : e.opacity;
  56871. if (n instanceof lr) {
  56872. t("opacity", i);
  56873. return;
  56874. }
  56875. if (G5e(e)) {
  56876. var a = Sm(e.fill);
  56877. t("fill", a.color);
  56878. var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i;
  56879. o < 1 && t("fill-opacity", o);
  56880. } else
  56881. t("fill", Mk);
  56882. if (j5e(e)) {
  56883. var s = Sm(e.stroke);
  56884. t("stroke", s.color);
  56885. 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;
  56886. if (u !== 1 && t("stroke-width", u), f && t("paint-order", f ? "stroke" : "fill"), c < 1 && t("stroke-opacity", c), e.lineDash) {
  56887. var d = fk(n), h = d[0], p = d[1];
  56888. h && (p = H5e(p || 0), t("stroke-dasharray", h.join(",")), (p || r) && t("stroke-dashoffset", p));
  56889. }
  56890. for (var v = 0; v < aE.length; v++) {
  56891. var g = aE[v];
  56892. if (e[g] !== aO[g]) {
  56893. var m = e[g] || aO[g];
  56894. m && t(Z5e[v], m);
  56895. }
  56896. }
  56897. }
  56898. }
  56899. var xte = "http://www.w3.org/2000/svg", wte = "http://www.w3.org/1999/xlink", X5e = "http://www.w3.org/2000/xmlns/", Y5e = "http://www.w3.org/XML/1998/namespace", pV = "ecmeta_";
  56900. function Cte(t) {
  56901. return document.createElementNS(xte, t);
  56902. }
  56903. function Xn(t, e, n, r, i) {
  56904. return {
  56905. tag: t,
  56906. attrs: n || {},
  56907. children: r,
  56908. text: i,
  56909. key: e
  56910. };
  56911. }
  56912. function q5e(t, e) {
  56913. var n = [];
  56914. if (e)
  56915. for (var r in e) {
  56916. var i = e[r], a = r;
  56917. i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), n.push(a));
  56918. }
  56919. return "<" + t + " " + n.join(" ") + ">";
  56920. }
  56921. function K5e(t) {
  56922. return "</" + t + ">";
  56923. }
  56924. function Ik(t, e) {
  56925. e = e || {};
  56926. var n = e.newline ? `
  56927. ` : "";
  56928. function r(i) {
  56929. var a = i.children, o = i.tag, s = i.attrs, l = i.text;
  56930. return q5e(o, s) + (o !== "style" ? Gr(l) : l || "") + (a ? "" + n + ce(a, function(u) {
  56931. return r(u);
  56932. }).join(n) + n : "") + K5e(o);
  56933. }
  56934. return r(t);
  56935. }
  56936. function J5e(t, e, n) {
  56937. n = n || {};
  56938. var r = n.newline ? `
  56939. ` : "", i = " {" + r, a = r + "}", o = ce(st(t), function(l) {
  56940. return l + i + ce(st(t[l]), function(u) {
  56941. return u + ":" + t[l][u] + ";";
  56942. }).join(r) + a;
  56943. }).join(r), s = ce(st(e), function(l) {
  56944. return "@keyframes " + l + i + ce(st(e[l]), function(u) {
  56945. return u + i + ce(st(e[l][u]), function(c) {
  56946. var f = e[l][u][c];
  56947. return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";";
  56948. }).join(r) + a;
  56949. }).join(r) + a;
  56950. }).join(r);
  56951. return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(r);
  56952. }
  56953. function oE(t) {
  56954. return {
  56955. zrId: t,
  56956. shadowCache: {},
  56957. patternCache: {},
  56958. gradientCache: {},
  56959. clipPathCache: {},
  56960. defs: {},
  56961. cssNodes: {},
  56962. cssAnims: {},
  56963. cssStyleCache: {},
  56964. cssAnimIdx: 0,
  56965. shadowIdx: 0,
  56966. gradientIdx: 0,
  56967. patternIdx: 0,
  56968. clipPathIdx: 0
  56969. };
  56970. }
  56971. function vV(t, e, n, r) {
  56972. return Xn("svg", "root", {
  56973. width: t,
  56974. height: e,
  56975. xmlns: xte,
  56976. "xmlns:xlink": wte,
  56977. version: "1.1",
  56978. baseProfile: "full",
  56979. viewBox: r ? "0 0 " + t + " " + e : !1
  56980. }, n);
  56981. }
  56982. var e3e = 0;
  56983. function Tte() {
  56984. return e3e++;
  56985. }
  56986. var gV = {
  56987. cubicIn: "0.32,0,0.67,0",
  56988. cubicOut: "0.33,1,0.68,1",
  56989. cubicInOut: "0.65,0,0.35,1",
  56990. quadraticIn: "0.11,0,0.5,0",
  56991. quadraticOut: "0.5,1,0.89,1",
  56992. quadraticInOut: "0.45,0,0.55,1",
  56993. quarticIn: "0.5,0,0.75,0",
  56994. quarticOut: "0.25,1,0.5,1",
  56995. quarticInOut: "0.76,0,0.24,1",
  56996. quinticIn: "0.64,0,0.78,0",
  56997. quinticOut: "0.22,1,0.36,1",
  56998. quinticInOut: "0.83,0,0.17,1",
  56999. sinusoidalIn: "0.12,0,0.39,0",
  57000. sinusoidalOut: "0.61,1,0.88,1",
  57001. sinusoidalInOut: "0.37,0,0.63,1",
  57002. exponentialIn: "0.7,0,0.84,0",
  57003. exponentialOut: "0.16,1,0.3,1",
  57004. exponentialInOut: "0.87,0,0.13,1",
  57005. circularIn: "0.55,0,1,0.45",
  57006. circularOut: "0,0.55,0.45,1",
  57007. circularInOut: "0.85,0,0.15,1"
  57008. }, dc = "transform-origin";
  57009. function t3e(t, e, n) {
  57010. var r = le({}, t.shape);
  57011. le(r, e), t.buildPath(n, r);
  57012. var i = new Ste();
  57013. return i.reset(Xq(t)), n.rebuildPath(i, 1), i.generateStr(), i.getStr();
  57014. }
  57015. function n3e(t, e) {
  57016. var n = e.originX, r = e.originY;
  57017. (n || r) && (t[dc] = n + "px " + r + "px");
  57018. }
  57019. var r3e = {
  57020. fill: "fill",
  57021. opacity: "opacity",
  57022. lineWidth: "stroke-width",
  57023. lineDashOffset: "stroke-dashoffset"
  57024. };
  57025. function Pte(t, e) {
  57026. var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  57027. return e.cssAnims[n] = t, n;
  57028. }
  57029. function i3e(t, e, n) {
  57030. var r = t.shape.paths, i = {}, a, o;
  57031. if (k(r, function(l) {
  57032. var u = oE(n.zrId);
  57033. u.animation = !0, gw(l, {}, u, !0);
  57034. var c = u.cssAnims, f = u.cssNodes, d = st(c), h = d.length;
  57035. if (h) {
  57036. o = d[h - 1];
  57037. var p = c[o];
  57038. for (var v in p) {
  57039. var g = p[v];
  57040. i[v] = i[v] || { d: "" }, i[v].d += g.d || "";
  57041. }
  57042. for (var m in f) {
  57043. var y = f[m].animation;
  57044. y.indexOf(o) >= 0 && (a = y);
  57045. }
  57046. }
  57047. }), !!a) {
  57048. e.d = !1;
  57049. var s = Pte(i, n);
  57050. return a.replace(o, s);
  57051. }
  57052. }
  57053. function mV(t) {
  57054. return Oe(t) ? gV[t] ? "cubic-bezier(" + gV[t] + ")" : SR(t) ? t : "" : "";
  57055. }
  57056. function gw(t, e, n, r) {
  57057. var i = t.animators, a = i.length, o = [];
  57058. if (t instanceof qx) {
  57059. var s = i3e(t, e, n);
  57060. if (s)
  57061. o.push(s);
  57062. else if (!a)
  57063. return;
  57064. } else if (!a)
  57065. return;
  57066. for (var l = {}, u = 0; u < a; u++) {
  57067. var c = i[u], f = [c.getMaxTime() / 1e3 + "s"], d = mV(c.getClip().easing), h = c.getDelay();
  57068. d ? f.push(d) : f.push("linear"), h && f.push(h / 1e3 + "s"), c.getLoop() && f.push("infinite");
  57069. var p = f.join(" ");
  57070. l[p] = l[p] || [p, []], l[p][1].push(c);
  57071. }
  57072. function v(y) {
  57073. var b = y[1], _ = b.length, O = {}, S = {}, x = {}, C = "animation-timing-function";
  57074. function T(ie, X, H) {
  57075. for (var G = ie.getTracks(), re = ie.getMaxTime(), fe = 0; fe < G.length; fe++) {
  57076. var de = G[fe];
  57077. if (de.needsAnimate()) {
  57078. var Ee = de.keyframes, $e = de.propName;
  57079. if (H && ($e = H($e)), $e)
  57080. for (var Se = 0; Se < Ee.length; Se++) {
  57081. var be = Ee[Se], he = Math.round(be.time / re * 100) + "%", Te = mV(be.easing), ze = be.rawValue;
  57082. (Oe(ze) || St(ze)) && (X[he] = X[he] || {}, X[he][$e] = be.rawValue, Te && (X[he][C] = Te));
  57083. }
  57084. }
  57085. }
  57086. }
  57087. for (var w = 0; w < _; w++) {
  57088. var P = b[w], $ = P.targetName;
  57089. $ ? $ === "shape" && T(P, S) : !r && T(P, O);
  57090. }
  57091. for (var A in O) {
  57092. var D = {};
  57093. eK(D, t), le(D, O[A]);
  57094. var E = Yq(D), R = O[A][C];
  57095. x[A] = E ? {
  57096. transform: E
  57097. } : {}, n3e(x[A], D), R && (x[A][C] = R);
  57098. }
  57099. var N, V = !0;
  57100. for (var A in S) {
  57101. x[A] = x[A] || {};
  57102. var z = !N, R = S[A][C];
  57103. z && (N = new as());
  57104. var W = N.len();
  57105. N.reset(), x[A].d = t3e(t, S[A], N);
  57106. var F = N.len();
  57107. if (!z && W !== F) {
  57108. V = !1;
  57109. break;
  57110. }
  57111. R && (x[A][C] = R);
  57112. }
  57113. if (!V)
  57114. for (var A in x)
  57115. delete x[A].d;
  57116. if (!r)
  57117. for (var w = 0; w < _; w++) {
  57118. var P = b[w], $ = P.targetName;
  57119. $ === "style" && T(P, x, function(G) {
  57120. return r3e[G];
  57121. });
  57122. }
  57123. for (var Q = st(x), Z = !0, ne, w = 1; w < Q.length; w++) {
  57124. var ee = Q[w - 1], oe = Q[w];
  57125. if (x[ee][dc] !== x[oe][dc]) {
  57126. Z = !1;
  57127. break;
  57128. }
  57129. ne = x[ee][dc];
  57130. }
  57131. if (Z && ne) {
  57132. for (var A in x)
  57133. x[A][dc] && delete x[A][dc];
  57134. e[dc] = ne;
  57135. }
  57136. if (Nt(Q, function(ie) {
  57137. return st(x[ie]).length > 0;
  57138. }).length) {
  57139. var K = Pte(x, n);
  57140. return K + " " + y[0] + " both";
  57141. }
  57142. }
  57143. for (var g in l) {
  57144. var s = v(l[g]);
  57145. s && o.push(s);
  57146. }
  57147. if (o.length) {
  57148. var m = n.zrId + "-cls-" + Tte();
  57149. n.cssNodes["." + m] = {
  57150. animation: o.join(",")
  57151. }, e.class = m;
  57152. }
  57153. }
  57154. function a3e(t, e, n) {
  57155. if (!t.ignore)
  57156. if (t.isSilent()) {
  57157. var r = {
  57158. "pointer-events": "none"
  57159. };
  57160. yV(r, e, n);
  57161. } else {
  57162. var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}, a = i.fill;
  57163. if (!a) {
  57164. 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;
  57165. l && (a = eO(l));
  57166. }
  57167. var u = i.lineWidth;
  57168. if (u) {
  57169. var c = !i.strokeNoScale && t.transform ? t.transform[0] : 1;
  57170. u = u / c;
  57171. }
  57172. var r = {
  57173. cursor: "pointer"
  57174. };
  57175. a && (r.fill = a), i.stroke && (r.stroke = i.stroke), u && (r["stroke-width"] = u), yV(r, e, n);
  57176. }
  57177. }
  57178. function yV(t, e, n, r) {
  57179. var i = JSON.stringify(t), a = n.cssStyleCache[i];
  57180. a || (a = n.zrId + "-cls-" + Tte(), n.cssStyleCache[i] = a, n.cssNodes["." + a + ":hover"] = t), e.class = e.class ? e.class + " " + a : a;
  57181. }
  57182. var Im = Math.round;
  57183. function $te(t) {
  57184. return t && Oe(t.src);
  57185. }
  57186. function Ate(t) {
  57187. return t && Me(t.toDataURL);
  57188. }
  57189. function Dk(t, e, n, r) {
  57190. U5e(function(i, a) {
  57191. var o = i === "fill" || i === "stroke";
  57192. o && Uq(a) ? Mte(e, t, i, r) : o && wR(a) ? Ite(n, t, i, r) : o && a === "none" ? t[i] = "transparent" : t[i] = a;
  57193. }, e, n, !1), d3e(n, t, r);
  57194. }
  57195. function Rk(t, e) {
  57196. var n = iK(e);
  57197. n && (n.each(function(r, i) {
  57198. r != null && (t[(pV + i).toLowerCase()] = r + "");
  57199. }), e.isSilent() && (t[pV + "silent"] = "true"));
  57200. }
  57201. function bV(t) {
  57202. return Bl(t[0] - 1) && Bl(t[1]) && Bl(t[2]) && Bl(t[3] - 1);
  57203. }
  57204. function o3e(t) {
  57205. return Bl(t[4]) && Bl(t[5]);
  57206. }
  57207. function kk(t, e, n) {
  57208. if (e && !(o3e(e) && bV(e))) {
  57209. var r = 1e4;
  57210. t.transform = bV(e) ? "translate(" + Im(e[4] * r) / r + " " + Im(e[5] * r) / r + ")" : JIe(e);
  57211. }
  57212. }
  57213. function _V(t, e, n) {
  57214. for (var r = t.points, i = [], a = 0; a < r.length; a++)
  57215. i.push(Im(r[a][0] * n) / n), i.push(Im(r[a][1] * n) / n);
  57216. e.points = i.join(" ");
  57217. }
  57218. function OV(t) {
  57219. return !t.smooth;
  57220. }
  57221. function s3e(t) {
  57222. var e = ce(t, function(n) {
  57223. return typeof n == "string" ? [n, n] : n;
  57224. });
  57225. return function(n, r, i) {
  57226. for (var a = 0; a < e.length; a++) {
  57227. var o = e[a], s = n[o[0]];
  57228. s != null && (r[o[1]] = Im(s * i) / i);
  57229. }
  57230. };
  57231. }
  57232. var l3e = {
  57233. circle: [s3e(["cx", "cy", "r"])],
  57234. polyline: [_V, OV],
  57235. polygon: [_V, OV]
  57236. };
  57237. function u3e(t) {
  57238. for (var e = t.animators, n = 0; n < e.length; n++)
  57239. if (e[n].targetName === "shape")
  57240. return !0;
  57241. return !1;
  57242. }
  57243. function Ete(t, e) {
  57244. var n = t.style, r = t.shape, i = l3e[t.type], a = {}, o = e.animation, s = "path", l = t.style.strokePercent, u = e.compress && Xq(t) || 4;
  57245. if (i && !e.willUpdate && !(i[1] && !i[1](r)) && !(o && u3e(t)) && !(l < 1)) {
  57246. s = t.type;
  57247. var c = Math.pow(10, u);
  57248. i[0](r, a, c);
  57249. } else {
  57250. var f = !t.path || t.shapeChanged();
  57251. t.path || t.createPathProxy();
  57252. var d = t.path;
  57253. f && (d.beginPath(), t.buildPath(d, t.shape), t.pathUpdated());
  57254. var h = d.getVersion(), p = t, v = p.__svgPathBuilder;
  57255. (p.__svgPathVersion !== h || !v || l !== p.__svgPathStrokePercent) && (v || (v = p.__svgPathBuilder = new Ste()), v.reset(u), d.rebuildPath(v, l), v.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = l), a.d = v.getStr();
  57256. }
  57257. return kk(a, t.transform), Dk(a, n, t, e), Rk(a, t), e.animation && gw(t, a, e), e.emphasis && a3e(t, a, e), Xn(s, t.id + "", a);
  57258. }
  57259. function c3e(t, e) {
  57260. var n = t.style, r = n.image;
  57261. if (r && !Oe(r) && ($te(r) ? r = r.src : Ate(r) && (r = r.toDataURL())), !!r) {
  57262. var i = n.x || 0, a = n.y || 0, o = n.width, s = n.height, l = {
  57263. href: r,
  57264. width: o,
  57265. height: s
  57266. };
  57267. return i && (l.x = i), a && (l.y = a), kk(l, t.transform), Dk(l, n, t, e), Rk(l, t), e.animation && gw(t, l, e), Xn("image", t.id + "", l);
  57268. }
  57269. }
  57270. function f3e(t, e) {
  57271. var n = t.style, r = n.text;
  57272. if (r != null && (r += ""), !(!r || isNaN(n.x) || isNaN(n.y))) {
  57273. var i = n.font || iu, a = n.x || 0, o = tDe(n.y || 0, zx(i), n.textBaseline), s = eDe[n.textAlign] || n.textAlign, l = {
  57274. "dominant-baseline": "central",
  57275. "text-anchor": s
  57276. };
  57277. if (MK(n)) {
  57278. var u = "", c = n.fontStyle, f = EK(n.fontSize);
  57279. if (!parseFloat(f))
  57280. return;
  57281. var d = n.fontFamily || _q, h = n.fontWeight;
  57282. u += "font-size:" + f + ";font-family:" + d + ";", c && c !== "normal" && (u += "font-style:" + c + ";"), h && h !== "normal" && (u += "font-weight:" + h + ";"), l.style = u;
  57283. } else
  57284. l.style = "font: " + i;
  57285. return r.match(/\s/) && (l["xml:space"] = "preserve"), a && (l.x = a), o && (l.y = o), kk(l, t.transform), Dk(l, n, t, e), Rk(l, t), e.animation && gw(t, l, e), Xn("text", t.id + "", l, void 0, r);
  57286. }
  57287. }
  57288. function SV(t, e) {
  57289. if (t instanceof ot)
  57290. return Ete(t, e);
  57291. if (t instanceof lr)
  57292. return c3e(t, e);
  57293. if (t instanceof Bh)
  57294. return f3e(t, e);
  57295. }
  57296. function d3e(t, e, n) {
  57297. var r = t.style;
  57298. if (nDe(r)) {
  57299. var i = rDe(t), a = n.shadowCache, o = a[i];
  57300. if (!o) {
  57301. var s = t.getGlobalScale(), l = s[0], u = s[1];
  57302. if (!l || !u)
  57303. return;
  57304. var c = r.shadowOffsetX || 0, f = r.shadowOffsetY || 0, d = r.shadowBlur, h = Sm(r.shadowColor), p = h.opacity, v = h.color, g = d / 2 / l, m = d / 2 / u, y = g + " " + m;
  57305. o = n.zrId + "-s" + n.shadowIdx++, n.defs[o] = Xn("filter", o, {
  57306. id: o,
  57307. x: "-100%",
  57308. y: "-100%",
  57309. width: "300%",
  57310. height: "300%"
  57311. }, [
  57312. Xn("feDropShadow", "", {
  57313. dx: c / l,
  57314. dy: f / u,
  57315. stdDeviation: y,
  57316. "flood-color": v,
  57317. "flood-opacity": p
  57318. })
  57319. ]), a[i] = o;
  57320. }
  57321. e.filter = Bx(o);
  57322. }
  57323. }
  57324. function Mte(t, e, n, r) {
  57325. var i = t[n], a, o = {
  57326. gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox"
  57327. };
  57328. if (jq(i))
  57329. a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2;
  57330. else if (Zq(i))
  57331. a = "radialGradient", o.cx = We(i.x, 0.5), o.cy = We(i.y, 0.5), o.r = We(i.r, 0.5);
  57332. else {
  57333. process.env.NODE_ENV !== "production" && Oa("Illegal gradient type.");
  57334. return;
  57335. }
  57336. for (var s = i.colorStops, l = [], u = 0, c = s.length; u < c; ++u) {
  57337. var f = pA(s[u].offset) * 100 + "%", d = s[u].color, h = Sm(d), p = h.color, v = h.opacity, g = {
  57338. offset: f
  57339. };
  57340. g["stop-color"] = p, v < 1 && (g["stop-opacity"] = v), l.push(Xn("stop", u + "", g));
  57341. }
  57342. var m = Xn(a, "", o, l), y = Ik(m), b = r.gradientCache, _ = b[y];
  57343. _ || (_ = r.zrId + "-g" + r.gradientIdx++, b[y] = _, o.id = _, r.defs[_] = Xn(a, _, o, l)), e[n] = Bx(_);
  57344. }
  57345. function Ite(t, e, n, r) {
  57346. 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;
  57347. if (Gq(i)) {
  57348. var d = i.imageWidth, h = i.imageHeight, p = void 0, v = i.image;
  57349. if (Oe(v) ? p = v : $te(v) ? p = v.src : Ate(v) && (p = v.toDataURL()), typeof Image > "u") {
  57350. var g = "Image width/height must been given explictly in svg-ssr renderer.";
  57351. ke(d, g), ke(h, g);
  57352. } else if (d == null || h == null) {
  57353. var m = function(w, P) {
  57354. if (w) {
  57355. var $ = w.elm, A = d || P.width, D = h || P.height;
  57356. 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));
  57357. }
  57358. }, y = IR(p, null, t, function(w) {
  57359. l || m(S, w), m(f, w);
  57360. });
  57361. y && y.width && y.height && (d = d || y.width, h = h || y.height);
  57362. }
  57363. f = Xn("image", "img", {
  57364. href: p,
  57365. width: d,
  57366. height: h
  57367. }), o.width = d, o.height = h;
  57368. } else i.svgElement && (f = Le(i.svgElement), o.width = i.svgWidth, o.height = i.svgHeight);
  57369. if (f) {
  57370. var b, _;
  57371. 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 = _);
  57372. var O = Yq(i);
  57373. O && (o.patternTransform = O);
  57374. var S = Xn("pattern", "", o, [f]), x = Ik(S), C = r.patternCache, T = C[x];
  57375. T || (T = r.zrId + "-p" + r.patternIdx++, C[x] = T, o.id = T, S = r.defs[T] = Xn("pattern", T, o, [f])), e[n] = Bx(T);
  57376. }
  57377. }
  57378. function h3e(t, e, n) {
  57379. var r = n.clipPathCache, i = n.defs, a = r[t.id];
  57380. if (!a) {
  57381. a = n.zrId + "-c" + n.clipPathIdx++;
  57382. var o = {
  57383. id: a
  57384. };
  57385. r[t.id] = a, i[a] = Xn("clipPath", a, o, [Ete(t, n)]);
  57386. }
  57387. e["clip-path"] = Bx(a);
  57388. }
  57389. function xV(t) {
  57390. return document.createTextNode(t);
  57391. }
  57392. function xc(t, e, n) {
  57393. t.insertBefore(e, n);
  57394. }
  57395. function wV(t, e) {
  57396. t.removeChild(e);
  57397. }
  57398. function CV(t, e) {
  57399. t.appendChild(e);
  57400. }
  57401. function Dte(t) {
  57402. return t.parentNode;
  57403. }
  57404. function Rte(t) {
  57405. return t.nextSibling;
  57406. }
  57407. function JT(t, e) {
  57408. t.textContent = e;
  57409. }
  57410. var TV = 58, p3e = 120, v3e = Xn("", "");
  57411. function sE(t) {
  57412. return t === void 0;
  57413. }
  57414. function Do(t) {
  57415. return t !== void 0;
  57416. }
  57417. function g3e(t, e, n) {
  57418. for (var r = {}, i = e; i <= n; ++i) {
  57419. var a = t[i].key;
  57420. a !== void 0 && (process.env.NODE_ENV !== "production" && r[a] != null && console.error("Duplicate key " + a), r[a] = i);
  57421. }
  57422. return r;
  57423. }
  57424. function Uv(t, e) {
  57425. var n = t.key === e.key, r = t.tag === e.tag;
  57426. return r && n;
  57427. }
  57428. function Dm(t) {
  57429. var e, n = t.children, r = t.tag;
  57430. if (Do(r)) {
  57431. var i = t.elm = Cte(r);
  57432. if (Lk(v3e, t), ue(n))
  57433. for (e = 0; e < n.length; ++e) {
  57434. var a = n[e];
  57435. a != null && CV(i, Dm(a));
  57436. }
  57437. else Do(t.text) && !Ie(t.text) && CV(i, xV(t.text));
  57438. } else
  57439. t.elm = xV(t.text);
  57440. return t.elm;
  57441. }
  57442. function kte(t, e, n, r, i) {
  57443. for (; r <= i; ++r) {
  57444. var a = n[r];
  57445. a != null && xc(t, Dm(a), e);
  57446. }
  57447. }
  57448. function $O(t, e, n, r) {
  57449. for (; n <= r; ++n) {
  57450. var i = e[n];
  57451. if (i != null)
  57452. if (Do(i.tag)) {
  57453. var a = Dte(i.elm);
  57454. wV(a, i.elm);
  57455. } else
  57456. wV(t, i.elm);
  57457. }
  57458. }
  57459. function Lk(t, e) {
  57460. var n, r = e.elm, i = t && t.attrs || {}, a = e.attrs || {};
  57461. if (i !== a) {
  57462. for (n in a) {
  57463. var o = a[n], s = i[n];
  57464. s !== o && (o === !0 ? r.setAttribute(n, "") : o === !1 ? r.removeAttribute(n) : n === "style" ? r.style.cssText = o : n.charCodeAt(0) !== p3e ? r.setAttribute(n, o) : n === "xmlns:xlink" || n === "xmlns" ? r.setAttributeNS(X5e, n, o) : n.charCodeAt(3) === TV ? r.setAttributeNS(Y5e, n, o) : n.charCodeAt(5) === TV ? r.setAttributeNS(wte, n, o) : r.setAttribute(n, o));
  57465. }
  57466. for (n in i)
  57467. n in a || r.removeAttribute(n);
  57468. }
  57469. }
  57470. function m3e(t, e, n) {
  57471. 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; )
  57472. o == null ? o = e[++r] : s == null ? s = e[--a] : u == null ? u = n[++i] : c == null ? c = n[--l] : Uv(o, u) ? (Ed(o, u), o = e[++r], u = n[++i]) : Uv(s, c) ? (Ed(s, c), s = e[--a], c = n[--l]) : Uv(o, c) ? (Ed(o, c), xc(t, o.elm, Rte(s.elm)), o = e[++r], c = n[--l]) : Uv(s, u) ? (Ed(s, u), xc(t, s.elm, o.elm), s = e[--a], u = n[++i]) : (sE(f) && (f = g3e(e, r, a)), d = f[u.key], sE(d) ? xc(t, Dm(u), o.elm) : (h = e[d], h.tag !== u.tag ? xc(t, Dm(u), o.elm) : (Ed(h, u), e[d] = void 0, xc(t, h.elm, o.elm))), u = n[++i]);
  57473. (r <= a || i <= l) && (r > a ? (p = n[l + 1] == null ? null : n[l + 1].elm, kte(t, p, n, i, l)) : $O(t, e, r, a));
  57474. }
  57475. function Ed(t, e) {
  57476. var n = e.elm = t.elm, r = t.children, i = e.children;
  57477. t !== e && (Lk(t, e), sE(e.text) ? Do(r) && Do(i) ? r !== i && m3e(n, r, i) : Do(i) ? (Do(t.text) && JT(n, ""), kte(n, null, i, 0, i.length - 1)) : Do(r) ? $O(n, r, 0, r.length - 1) : Do(t.text) && JT(n, "") : t.text !== e.text && (Do(r) && $O(n, r, 0, r.length - 1), JT(n, e.text)));
  57478. }
  57479. function y3e(t, e) {
  57480. if (Uv(t, e))
  57481. Ed(t, e);
  57482. else {
  57483. var n = t.elm, r = Dte(n);
  57484. Dm(e), r !== null && (xc(r, e.elm, Rte(n)), $O(r, [t], 0, 0));
  57485. }
  57486. return e;
  57487. }
  57488. var b3e = 0, _3e = function() {
  57489. function t(e, n, r) {
  57490. if (this.type = "svg", this.refreshHover = PV("refreshHover"), this.configLayer = PV("configLayer"), this.storage = n, this._opts = r = le({}, r), this.root = e, this._id = "zr" + b3e++, this._oldVNode = vV(r.width, r.height), e && !r.ssr) {
  57491. var i = this._viewport = document.createElement("div");
  57492. i.style.cssText = "position:relative;overflow:hidden";
  57493. var a = this._svgDom = this._oldVNode.elm = Cte("svg");
  57494. Lk(null, this._oldVNode), i.appendChild(a), e.appendChild(i);
  57495. }
  57496. this.resize(r.width, r.height);
  57497. }
  57498. return t.prototype.getType = function() {
  57499. return this.type;
  57500. }, t.prototype.getViewportRoot = function() {
  57501. return this._viewport;
  57502. }, t.prototype.getViewportRootOffset = function() {
  57503. var e = this.getViewportRoot();
  57504. if (e)
  57505. return {
  57506. offsetLeft: e.offsetLeft || 0,
  57507. offsetTop: e.offsetTop || 0
  57508. };
  57509. }, t.prototype.getSvgDom = function() {
  57510. return this._svgDom;
  57511. }, t.prototype.refresh = function() {
  57512. if (this.root) {
  57513. var e = this.renderToVNode({
  57514. willUpdate: !0
  57515. });
  57516. e.attrs.style = "position:absolute;left:0;top:0;user-select:none", y3e(this._oldVNode, e), this._oldVNode = e;
  57517. }
  57518. }, t.prototype.renderOneToVNode = function(e) {
  57519. return SV(e, oE(this._id));
  57520. }, t.prototype.renderToVNode = function(e) {
  57521. e = e || {};
  57522. var n = this.storage.getDisplayList(!0), r = this._width, i = this._height, a = oE(this._id);
  57523. a.animation = e.animation, a.willUpdate = e.willUpdate, a.compress = e.compress, a.emphasis = e.emphasis;
  57524. var o = [], s = this._bgVNode = O3e(r, i, this._backgroundColor, a);
  57525. s && o.push(s);
  57526. var l = e.compress ? null : this._mainVNode = Xn("g", "main", {}, []);
  57527. this._paintList(n, a, l ? l.children : o), l && o.push(l);
  57528. var u = ce(st(a.defs), function(d) {
  57529. return a.defs[d];
  57530. });
  57531. if (u.length && o.push(Xn("defs", "defs", {}, u)), e.animation) {
  57532. var c = J5e(a.cssNodes, a.cssAnims, { newline: !0 });
  57533. if (c) {
  57534. var f = Xn("style", "stl", {}, [], c);
  57535. o.push(f);
  57536. }
  57537. }
  57538. return vV(r, i, o, e.useViewBox);
  57539. }, t.prototype.renderToString = function(e) {
  57540. return e = e || {}, Ik(this.renderToVNode({
  57541. animation: We(e.cssAnimation, !0),
  57542. emphasis: We(e.cssEmphasis, !0),
  57543. willUpdate: !1,
  57544. compress: !0,
  57545. useViewBox: We(e.useViewBox, !0)
  57546. }), { newline: !0 });
  57547. }, t.prototype.setBackgroundColor = function(e) {
  57548. this._backgroundColor = e;
  57549. }, t.prototype.getSvgRoot = function() {
  57550. return this._mainVNode && this._mainVNode.elm;
  57551. }, t.prototype._paintList = function(e, n, r) {
  57552. for (var i = e.length, a = [], o = 0, s, l, u = 0, c = 0; c < i; c++) {
  57553. var f = e[c];
  57554. if (!f.invisible) {
  57555. var d = f.__clipPaths, h = d && d.length || 0, p = l && l.length || 0, v = void 0;
  57556. for (v = Math.max(h - 1, p - 1); v >= 0 && !(d && l && d[v] === l[v]); v--)
  57557. ;
  57558. for (var g = p - 1; g > v; g--)
  57559. o--, s = a[o - 1];
  57560. for (var m = v + 1; m < h; m++) {
  57561. var y = {};
  57562. h3e(d[m], y, n);
  57563. var b = Xn("g", "clip-g-" + u++, y, []);
  57564. (s ? s.children : r).push(b), a[o++] = b, s = b;
  57565. }
  57566. l = d;
  57567. var _ = SV(f, n);
  57568. _ && (s ? s.children : r).push(_);
  57569. }
  57570. }
  57571. }, t.prototype.resize = function(e, n) {
  57572. var r = this._opts, i = this.root, a = this._viewport;
  57573. if (e != null && (r.width = e), n != null && (r.height = n), i && a && (a.style.display = "none", e = Fd(i, 0, r), n = Fd(i, 1, r), a.style.display = ""), this._width !== e || this._height !== n) {
  57574. if (this._width = e, this._height = n, a) {
  57575. var o = a.style;
  57576. o.width = e + "px", o.height = n + "px";
  57577. }
  57578. if (wR(this._backgroundColor))
  57579. this.refresh();
  57580. else {
  57581. var s = this._svgDom;
  57582. s && (s.setAttribute("width", e), s.setAttribute("height", n));
  57583. var l = this._bgVNode && this._bgVNode.elm;
  57584. l && (l.setAttribute("width", e), l.setAttribute("height", n));
  57585. }
  57586. }
  57587. }, t.prototype.getWidth = function() {
  57588. return this._width;
  57589. }, t.prototype.getHeight = function() {
  57590. return this._height;
  57591. }, t.prototype.dispose = function() {
  57592. this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
  57593. }, t.prototype.clear = function() {
  57594. this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
  57595. }, t.prototype.toDataURL = function(e) {
  57596. var n = this.renderToString(), r = "data:image/svg+xml;";
  57597. return e ? (n = aDe(n), n && r + "base64," + n) : r + "charset=UTF-8," + encodeURIComponent(n);
  57598. }, t;
  57599. }();
  57600. function PV(t) {
  57601. return function() {
  57602. process.env.NODE_ENV !== "production" && Oa('In SVG mode painter not support method "' + t + '"');
  57603. };
  57604. }
  57605. function O3e(t, e, n, r) {
  57606. var i;
  57607. if (n && n !== "none")
  57608. if (i = Xn("rect", "bg", {
  57609. width: t,
  57610. height: e,
  57611. x: "0",
  57612. y: "0"
  57613. }), Uq(n))
  57614. Mte({ fill: n }, i.attrs, "fill", r);
  57615. else if (wR(n))
  57616. Ite({
  57617. style: {
  57618. fill: n
  57619. },
  57620. dirty: On,
  57621. getBoundingRect: function() {
  57622. return { width: t, height: e };
  57623. }
  57624. }, i.attrs, "fill", r);
  57625. else {
  57626. var a = Sm(n), o = a.color, s = a.opacity;
  57627. i.attrs.fill = o, s < 1 && (i.attrs["fill-opacity"] = s);
  57628. }
  57629. return i;
  57630. }
  57631. function S3e(t) {
  57632. t.registerPainter("svg", _3e);
  57633. }
  57634. function $V(t, e, n) {
  57635. var r = io.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = r.style;
  57636. 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;
  57637. }
  57638. var eP = function(t) {
  57639. q(e, t);
  57640. function e(n, r, i) {
  57641. var a = t.call(this) || this;
  57642. 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;
  57643. var o;
  57644. i = i || nO, typeof n == "string" ? o = $V(n, r, i) : Ie(n) && (o = n, n = o.id), a.id = n, a.dom = o;
  57645. var s = o.style;
  57646. return s && (bR(o), o.onselectstart = function() {
  57647. return !1;
  57648. }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = r, a.dpr = i, a;
  57649. }
  57650. return e.prototype.getElementCount = function() {
  57651. return this.__endIndex - this.__startIndex;
  57652. }, e.prototype.afterBrush = function() {
  57653. this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
  57654. }, e.prototype.initContext = function() {
  57655. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
  57656. }, e.prototype.setUnpainted = function() {
  57657. this.__firstTimePaint = !0;
  57658. }, e.prototype.createBackBuffer = function() {
  57659. var n = this.dpr;
  57660. this.domBack = $V("back-" + this.id, this.painter, n), this.ctxBack = this.domBack.getContext("2d"), n !== 1 && this.ctxBack.scale(n, n);
  57661. }, e.prototype.createRepaintRects = function(n, r, i, a) {
  57662. if (this.__firstTimePaint)
  57663. return this.__firstTimePaint = !1, null;
  57664. var o = [], s = this.maxRepaintRectCount, l = !1, u = new Je(0, 0, 0, 0);
  57665. function c(y) {
  57666. if (!(!y.isFinite() || y.isZero()))
  57667. if (o.length === 0) {
  57668. var b = new Je(0, 0, 0, 0);
  57669. b.copy(y), o.push(b);
  57670. } else {
  57671. for (var _ = !1, O = 1 / 0, S = 0, x = 0; x < o.length; ++x) {
  57672. var C = o[x];
  57673. if (C.intersect(y)) {
  57674. var T = new Je(0, 0, 0, 0);
  57675. T.copy(C), T.union(y), o[x] = T, _ = !0;
  57676. break;
  57677. } else if (l) {
  57678. u.copy(y), u.union(C);
  57679. var w = y.width * y.height, P = C.width * C.height, $ = u.width * u.height, A = $ - w - P;
  57680. A < O && (O = A, S = x);
  57681. }
  57682. }
  57683. if (l && (o[S].union(y), _ = !0), !_) {
  57684. var b = new Je(0, 0, 0, 0);
  57685. b.copy(y), o.push(b);
  57686. }
  57687. l || (l = o.length >= s);
  57688. }
  57689. }
  57690. for (var f = this.__startIndex; f < this.__endIndex; ++f) {
  57691. var d = n[f];
  57692. if (d) {
  57693. var h = d.shouldBePainted(i, a, !0, !0), p = d.__isRendered && (d.__dirty & ki || !h) ? d.getPrevPaintRect() : null;
  57694. p && c(p);
  57695. var v = h && (d.__dirty & ki || !d.__isRendered) ? d.getPaintRect() : null;
  57696. v && c(v);
  57697. }
  57698. }
  57699. for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) {
  57700. var d = r[f], h = d && d.shouldBePainted(i, a, !0, !0);
  57701. if (d && (!h || !d.__zr) && d.__isRendered) {
  57702. var p = d.getPrevPaintRect();
  57703. p && c(p);
  57704. }
  57705. }
  57706. var g;
  57707. do {
  57708. g = !1;
  57709. for (var f = 0; f < o.length; ) {
  57710. if (o[f].isZero()) {
  57711. o.splice(f, 1);
  57712. continue;
  57713. }
  57714. for (var m = f + 1; m < o.length; )
  57715. o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++;
  57716. f++;
  57717. }
  57718. } while (g);
  57719. return this._paintRects = o, o;
  57720. }, e.prototype.debugGetPaintRects = function() {
  57721. return (this._paintRects || []).slice();
  57722. }, e.prototype.resize = function(n, r) {
  57723. var i = this.dpr, a = this.dom, o = a.style, s = this.domBack;
  57724. 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));
  57725. }, e.prototype.clear = function(n, r, i) {
  57726. var a = this.dom, o = this.ctx, s = a.width, l = a.height;
  57727. r = r || this.clearColor;
  57728. var u = this.motionBlur && !n, c = this.lastFrameAlpha, f = this.dpr, d = this;
  57729. u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, l / f));
  57730. var h = this.domBack;
  57731. function p(v, g, m, y) {
  57732. if (o.clearRect(v, g, m, y), r && r !== "transparent") {
  57733. var b = void 0;
  57734. if (M0(r)) {
  57735. var _ = r.global || r.__width === m && r.__height === y;
  57736. b = _ && r.__canvasGradient || YA(o, r, {
  57737. x: 0,
  57738. y: 0,
  57739. width: m,
  57740. height: y
  57741. }), r.__canvasGradient = b, r.__width = m, r.__height = y;
  57742. } else Cq(r) && (r.scaleX = r.scaleX || f, r.scaleY = r.scaleY || f, b = qA(o, r, {
  57743. dirty: function() {
  57744. d.setUnpainted(), d.painter.refresh();
  57745. }
  57746. }));
  57747. o.save(), o.fillStyle = b || r, o.fillRect(v, g, m, y), o.restore();
  57748. }
  57749. u && (o.save(), o.globalAlpha = c, o.drawImage(h, v, g, m, y), o.restore());
  57750. }
  57751. !i || u ? p(0, 0, s, l) : i.length && k(i, function(v) {
  57752. p(v.x * f, v.y * f, v.width * f, v.height * f);
  57753. });
  57754. }, e;
  57755. }(Ra), AV = 1e5, sc = 314159, bb = 0.01, x3e = 1e-3;
  57756. function w3e(t) {
  57757. return t ? t.__builtin__ ? !0 : !(typeof t.resize != "function" || typeof t.refresh != "function") : !1;
  57758. }
  57759. function C3e(t, e) {
  57760. var n = document.createElement("div");
  57761. return n.style.cssText = [
  57762. "position:relative",
  57763. "width:" + t + "px",
  57764. "height:" + e + "px",
  57765. "padding:0",
  57766. "margin:0",
  57767. "border-width:0"
  57768. ].join(";") + ";", n;
  57769. }
  57770. var T3e = function() {
  57771. function t(e, n, r, i) {
  57772. this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
  57773. var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
  57774. this._opts = r = le({}, r || {}), this.dpr = r.devicePixelRatio || nO, this._singleCanvas = a, this.root = e;
  57775. var o = e.style;
  57776. o && (bR(e), e.innerHTML = ""), this.storage = n;
  57777. var s = this._zlevelList;
  57778. this._prevDisplayList = [];
  57779. var l = this._layers;
  57780. if (a) {
  57781. var c = e, f = c.width, d = c.height;
  57782. 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;
  57783. var h = new eP(c, this, this.dpr);
  57784. h.__builtin__ = !0, h.initContext(), l[sc] = h, h.zlevel = sc, s.push(sc), this._domRoot = e;
  57785. } else {
  57786. this._width = Fd(e, 0, r), this._height = Fd(e, 1, r);
  57787. var u = this._domRoot = C3e(this._width, this._height);
  57788. e.appendChild(u);
  57789. }
  57790. }
  57791. return t.prototype.getType = function() {
  57792. return "canvas";
  57793. }, t.prototype.isSingleCanvas = function() {
  57794. return this._singleCanvas;
  57795. }, t.prototype.getViewportRoot = function() {
  57796. return this._domRoot;
  57797. }, t.prototype.getViewportRootOffset = function() {
  57798. var e = this.getViewportRoot();
  57799. if (e)
  57800. return {
  57801. offsetLeft: e.offsetLeft || 0,
  57802. offsetTop: e.offsetTop || 0
  57803. };
  57804. }, t.prototype.refresh = function(e) {
  57805. var n = this.storage.getDisplayList(!0), r = this._prevDisplayList, i = this._zlevelList;
  57806. this._redrawId = Math.random(), this._paintList(n, r, e, this._redrawId);
  57807. for (var a = 0; a < i.length; a++) {
  57808. var o = i[a], s = this._layers[o];
  57809. if (!s.__builtin__ && s.refresh) {
  57810. var l = a === 0 ? this._backgroundColor : null;
  57811. s.refresh(l);
  57812. }
  57813. }
  57814. return this._opts.useDirtyRect && (this._prevDisplayList = n.slice()), this;
  57815. }, t.prototype.refreshHover = function() {
  57816. this._paintHoverList(this.storage.getDisplayList(!1));
  57817. }, t.prototype._paintHoverList = function(e) {
  57818. var n = e.length, r = this._hoverlayer;
  57819. if (r && r.clear(), !!n) {
  57820. for (var i = {
  57821. inHover: !0,
  57822. viewWidth: this._width,
  57823. viewHeight: this._height
  57824. }, a, o = 0; o < n; o++) {
  57825. var s = e[o];
  57826. s.__inHover && (r || (r = this._hoverlayer = this.getLayer(AV)), a || (a = r.ctx, a.save()), Vc(a, s, i, o === n - 1));
  57827. }
  57828. a && a.restore();
  57829. }
  57830. }, t.prototype.getHoverLayer = function() {
  57831. return this.getLayer(AV);
  57832. }, t.prototype.paintOne = function(e, n) {
  57833. dk(e, n);
  57834. }, t.prototype._paintList = function(e, n, r, i) {
  57835. if (this._redrawId === i) {
  57836. r = r || !1, this._updateLayerStatus(e);
  57837. var a = this._doPaintList(e, n, r), o = a.finished, s = a.needsRefreshHover;
  57838. if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
  57839. this.eachLayer(function(u) {
  57840. u.afterBrush && u.afterBrush();
  57841. });
  57842. else {
  57843. var l = this;
  57844. Y1(function() {
  57845. l._paintList(e, n, r, i);
  57846. });
  57847. }
  57848. }
  57849. }, t.prototype._compositeManually = function() {
  57850. var e = this.getLayer(sc).ctx, n = this._domRoot.width, r = this._domRoot.height;
  57851. e.clearRect(0, 0, n, r), this.eachBuiltinLayer(function(i) {
  57852. i.virtual && e.drawImage(i.dom, 0, 0, n, r);
  57853. });
  57854. }, t.prototype._doPaintList = function(e, n, r) {
  57855. for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
  57856. var l = this._zlevelList[s], u = this._layers[l];
  57857. u.__builtin__ && u !== this._hoverlayer && (u.__dirty || r) && a.push(u);
  57858. }
  57859. for (var c = !0, f = !1, d = function(v) {
  57860. 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;
  57861. if (g.__startIndex === g.__endIndex)
  57862. g.clear(!1, S, y);
  57863. else if (b === g.__startIndex) {
  57864. var x = e[b];
  57865. (!x.incremental || !x.notClear || r) && g.clear(!1, S, y);
  57866. }
  57867. b === -1 && (console.error("For some unknown reason. drawIndex is -1"), b = g.__startIndex);
  57868. var C, T = function(A) {
  57869. var D = {
  57870. inHover: !1,
  57871. allClipped: !1,
  57872. prevEl: null,
  57873. viewWidth: i._width,
  57874. viewHeight: i._height
  57875. };
  57876. for (C = b; C < g.__endIndex; C++) {
  57877. var E = e[C];
  57878. if (E.__inHover && (f = !0), i._doPaintEl(E, g, o, A, D, C === g.__endIndex - 1), _) {
  57879. var R = Date.now() - O;
  57880. if (R > 15)
  57881. break;
  57882. }
  57883. }
  57884. D.prevElClipPaths && m.restore();
  57885. };
  57886. if (y)
  57887. if (y.length === 0)
  57888. C = g.__endIndex;
  57889. else
  57890. for (var w = h.dpr, P = 0; P < y.length; ++P) {
  57891. var $ = y[P];
  57892. m.save(), m.beginPath(), m.rect($.x * w, $.y * w, $.width * w, $.height * w), m.clip(), T($), m.restore();
  57893. }
  57894. else
  57895. m.save(), T(), m.restore();
  57896. g.__drawIndex = C, g.__drawIndex < g.__endIndex && (c = !1);
  57897. }, h = this, p = 0; p < a.length; p++)
  57898. d(p);
  57899. return vt.wxa && k(this._layers, function(v) {
  57900. v && v.ctx && v.ctx.draw && v.ctx.draw();
  57901. }), {
  57902. finished: c,
  57903. needsRefreshHover: f
  57904. };
  57905. }, t.prototype._doPaintEl = function(e, n, r, i, a, o) {
  57906. var s = n.ctx;
  57907. if (r) {
  57908. var l = e.getPaintRect();
  57909. (!i || l && l.intersect(i)) && (Vc(s, e, a, o), e.setPrevPaintRect(l));
  57910. } else
  57911. Vc(s, e, a, o);
  57912. }, t.prototype.getLayer = function(e, n) {
  57913. this._singleCanvas && !this._needsManuallyCompositing && (e = sc);
  57914. var r = this._layers[e];
  57915. return r || (r = new eP("zr_" + e, this, this.dpr), r.zlevel = e, r.__builtin__ = !0, this._layerConfig[e] ? qe(r, this._layerConfig[e], !0) : this._layerConfig[e - bb] && qe(r, this._layerConfig[e - bb], !0), n && (r.virtual = n), this.insertLayer(e, r), r.initContext()), r;
  57916. }, t.prototype.insertLayer = function(e, n) {
  57917. var r = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, l = -1;
  57918. if (r[e]) {
  57919. process.env.NODE_ENV !== "production" && Oa("ZLevel " + e + " has been used already");
  57920. return;
  57921. }
  57922. if (!w3e(n)) {
  57923. process.env.NODE_ENV !== "production" && Oa("Layer of zlevel " + e + " is not valid");
  57924. return;
  57925. }
  57926. if (a > 0 && e > i[0]) {
  57927. for (l = 0; l < a - 1 && !(i[l] < e && i[l + 1] > e); l++)
  57928. ;
  57929. s = r[i[l]];
  57930. }
  57931. if (i.splice(l + 1, 0, e), r[e] = n, !n.virtual)
  57932. if (s) {
  57933. var u = s.dom;
  57934. u.nextSibling ? o.insertBefore(n.dom, u.nextSibling) : o.appendChild(n.dom);
  57935. } else
  57936. o.firstChild ? o.insertBefore(n.dom, o.firstChild) : o.appendChild(n.dom);
  57937. n.painter || (n.painter = this);
  57938. }, t.prototype.eachLayer = function(e, n) {
  57939. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57940. var a = r[i];
  57941. e.call(n, this._layers[a], a);
  57942. }
  57943. }, t.prototype.eachBuiltinLayer = function(e, n) {
  57944. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57945. var a = r[i], o = this._layers[a];
  57946. o.__builtin__ && e.call(n, o, a);
  57947. }
  57948. }, t.prototype.eachOtherLayer = function(e, n) {
  57949. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57950. var a = r[i], o = this._layers[a];
  57951. o.__builtin__ || e.call(n, o, a);
  57952. }
  57953. }, t.prototype.getLayers = function() {
  57954. return this._layers;
  57955. }, t.prototype._updateLayerStatus = function(e) {
  57956. this.eachBuiltinLayer(function(f, d) {
  57957. f.__dirty = f.__used = !1;
  57958. });
  57959. function n(f) {
  57960. a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f);
  57961. }
  57962. if (this._singleCanvas)
  57963. for (var r = 1; r < e.length; r++) {
  57964. var i = e[r];
  57965. if (i.zlevel !== e[r - 1].zlevel || i.incremental) {
  57966. this._needsManuallyCompositing = !0;
  57967. break;
  57968. }
  57969. }
  57970. var a = null, o = 0, s, l;
  57971. for (l = 0; l < e.length; l++) {
  57972. var i = e[l], u = i.zlevel, c = void 0;
  57973. s !== u && (s = u, o = 0), i.incremental ? (c = this.getLayer(u + x3e, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(u + (o > 0 ? bb : 0), this._needsManuallyCompositing), c.__builtin__ || Oa("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 & ki && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = l));
  57974. }
  57975. n(l), this.eachBuiltinLayer(function(f, d) {
  57976. !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex);
  57977. });
  57978. }, t.prototype.clear = function() {
  57979. return this.eachBuiltinLayer(this._clearLayer), this;
  57980. }, t.prototype._clearLayer = function(e) {
  57981. e.clear();
  57982. }, t.prototype.setBackgroundColor = function(e) {
  57983. this._backgroundColor = e, k(this._layers, function(n) {
  57984. n.setUnpainted();
  57985. });
  57986. }, t.prototype.configLayer = function(e, n) {
  57987. if (n) {
  57988. var r = this._layerConfig;
  57989. r[e] ? qe(r[e], n, !0) : r[e] = n;
  57990. for (var i = 0; i < this._zlevelList.length; i++) {
  57991. var a = this._zlevelList[i];
  57992. if (a === e || a === e + bb) {
  57993. var o = this._layers[a];
  57994. qe(o, r[e], !0);
  57995. }
  57996. }
  57997. }
  57998. }, t.prototype.delLayer = function(e) {
  57999. var n = this._layers, r = this._zlevelList, i = n[e];
  58000. i && (i.dom.parentNode.removeChild(i.dom), delete n[e], r.splice(et(r, e), 1));
  58001. }, t.prototype.resize = function(e, n) {
  58002. if (this._domRoot.style) {
  58003. var r = this._domRoot;
  58004. r.style.display = "none";
  58005. var i = this._opts, a = this.root;
  58006. if (e != null && (i.width = e), n != null && (i.height = n), e = Fd(a, 0, i), n = Fd(a, 1, i), r.style.display = "", this._width !== e || n !== this._height) {
  58007. r.style.width = e + "px", r.style.height = n + "px";
  58008. for (var o in this._layers)
  58009. this._layers.hasOwnProperty(o) && this._layers[o].resize(e, n);
  58010. this.refresh(!0);
  58011. }
  58012. this._width = e, this._height = n;
  58013. } else {
  58014. if (e == null || n == null)
  58015. return;
  58016. this._width = e, this._height = n, this.getLayer(sc).resize(e, n);
  58017. }
  58018. return this;
  58019. }, t.prototype.clearLayer = function(e) {
  58020. var n = this._layers[e];
  58021. n && n.clear();
  58022. }, t.prototype.dispose = function() {
  58023. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  58024. }, t.prototype.getRenderedCanvas = function(e) {
  58025. if (e = e || {}, this._singleCanvas && !this._compositeManually)
  58026. return this._layers[sc].dom;
  58027. var n = new eP("image", this, e.pixelRatio || this.dpr);
  58028. n.initContext(), n.clear(!1, e.backgroundColor || this._backgroundColor);
  58029. var r = n.ctx;
  58030. if (e.pixelRatio <= this.dpr) {
  58031. this.refresh();
  58032. var i = n.dom.width, a = n.dom.height;
  58033. this.eachLayer(function(f) {
  58034. f.__builtin__ ? r.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (r.save(), f.renderToCanvas(r), r.restore());
  58035. });
  58036. } else
  58037. for (var o = {
  58038. inHover: !1,
  58039. viewWidth: this._width,
  58040. viewHeight: this._height
  58041. }, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
  58042. var c = s[l];
  58043. Vc(r, c, o, l === u - 1);
  58044. }
  58045. return n.dom;
  58046. }, t.prototype.getWidth = function() {
  58047. return this._width;
  58048. }, t.prototype.getHeight = function() {
  58049. return this._height;
  58050. }, t;
  58051. }();
  58052. function P3e(t) {
  58053. t.registerPainter("canvas", T3e);
  58054. }
  58055. var $3e = (
  58056. /** @class */
  58057. function(t) {
  58058. q(e, t);
  58059. function e() {
  58060. var n = t !== null && t.apply(this, arguments) || this;
  58061. return n.type = e.type, n.hasSymbolVisual = !0, n;
  58062. }
  58063. return e.prototype.getInitialData = function(n) {
  58064. if (process.env.NODE_ENV !== "production") {
  58065. var r = n.coordinateSystem;
  58066. if (r !== "polar" && r !== "cartesian2d")
  58067. throw new Error("Line not support coordinateSystem besides cartesian and polar");
  58068. }
  58069. return us(null, this, {
  58070. useEncodeDefaulter: !0
  58071. });
  58072. }, e.prototype.getLegendIcon = function(n) {
  58073. var r = new Ve(), i = $n("line", 0, n.itemHeight / 2, n.itemWidth, 0, n.lineStyle.stroke, !1);
  58074. r.add(i), i.setStyle(n.lineStyle);
  58075. 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);
  58076. r.add(u), u.setStyle(n.itemStyle);
  58077. var c = n.iconRotate === "inherit" ? o : n.iconRotate || 0;
  58078. 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;
  58079. }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
  58080. // zlevel: 0,
  58081. z: 3,
  58082. coordinateSystem: "cartesian2d",
  58083. legendHoverLink: !0,
  58084. clip: !0,
  58085. label: {
  58086. position: "top"
  58087. },
  58088. // itemStyle: {
  58089. // },
  58090. endLabel: {
  58091. show: !1,
  58092. valueAnimation: !0,
  58093. distance: 8
  58094. },
  58095. lineStyle: {
  58096. width: 2,
  58097. type: "solid"
  58098. },
  58099. emphasis: {
  58100. scale: !0
  58101. },
  58102. // areaStyle: {
  58103. // origin of areaStyle. Valid values:
  58104. // `'auto'/null/undefined`: from axisLine to data
  58105. // `'start'`: from min to data
  58106. // `'end'`: from data to max
  58107. // origin: 'auto'
  58108. // },
  58109. // false, 'start', 'end', 'middle'
  58110. step: !1,
  58111. // Disabled if step is true
  58112. smooth: !1,
  58113. smoothMonotone: null,
  58114. symbol: "emptyCircle",
  58115. symbolSize: 4,
  58116. symbolRotate: null,
  58117. showSymbol: !0,
  58118. // `false`: follow the label interval strategy.
  58119. // `true`: show all symbols.
  58120. // `'auto'`: If possible, show all symbols, otherwise
  58121. // follow the label interval strategy.
  58122. showAllSymbol: "auto",
  58123. // Whether to connect break point.
  58124. connectNulls: !1,
  58125. // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
  58126. sampling: "none",
  58127. animationEasing: "linear",
  58128. // Disable progressive
  58129. progressive: 0,
  58130. hoverLayerThreshold: 1 / 0,
  58131. universalTransition: {
  58132. divideShape: "clone"
  58133. },
  58134. triggerLineEvent: !1
  58135. }, e;
  58136. }(Ht)
  58137. );
  58138. function Wh(t, e) {
  58139. var n = t.mapDimensionsAll("defaultedLabel"), r = n.length;
  58140. if (r === 1) {
  58141. var i = Vh(t, e, n[0]);
  58142. return i != null ? i + "" : null;
  58143. } else if (r) {
  58144. for (var a = [], o = 0; o < n.length; o++)
  58145. a.push(Vh(t, e, n[o]));
  58146. return a.join(" ");
  58147. }
  58148. }
  58149. function Lte(t, e) {
  58150. var n = t.mapDimensionsAll("defaultedLabel");
  58151. if (!ue(e))
  58152. return e + "";
  58153. for (var r = [], i = 0; i < n.length; i++) {
  58154. var a = t.getDimensionIndex(n[i]);
  58155. a >= 0 && r.push(e[a]);
  58156. }
  58157. return r.join(" ");
  58158. }
  58159. var j0 = (
  58160. /** @class */
  58161. function(t) {
  58162. q(e, t);
  58163. function e(n, r, i, a) {
  58164. var o = t.call(this) || this;
  58165. return o.updateData(n, r, i, a), o;
  58166. }
  58167. return e.prototype._createSymbol = function(n, r, i, a, o) {
  58168. this.removeAll();
  58169. var s = $n(n, -1, -1, 2, 2, null, o);
  58170. s.attr({
  58171. z2: 100,
  58172. culling: !0,
  58173. scaleX: a[0] / 2,
  58174. scaleY: a[1] / 2
  58175. }), s.drift = A3e, this._symbolType = n, this.add(s);
  58176. }, e.prototype.stopSymbolAnimation = function(n) {
  58177. this.childAt(0).stopAnimation(null, n);
  58178. }, e.prototype.getSymbolType = function() {
  58179. return this._symbolType;
  58180. }, e.prototype.getSymbolPath = function() {
  58181. return this.childAt(0);
  58182. }, e.prototype.highlight = function() {
  58183. js(this.childAt(0));
  58184. }, e.prototype.downplay = function() {
  58185. Zs(this.childAt(0));
  58186. }, e.prototype.setZ = function(n, r) {
  58187. var i = this.childAt(0);
  58188. i.zlevel = n, i.z = r;
  58189. }, e.prototype.setDraggable = function(n, r) {
  58190. var i = this.childAt(0);
  58191. i.draggable = n, i.cursor = !r && n ? "move" : i.cursor;
  58192. }, e.prototype.updateData = function(n, r, i, a) {
  58193. this.silent = !1;
  58194. var o = n.getItemVisual(r, "symbol") || "circle", s = n.hostModel, l = e.getSymbolSize(n, r), u = o !== this._symbolType, c = a && a.disableAnimation;
  58195. if (u) {
  58196. var f = n.getItemVisual(r, "symbolKeepAspect");
  58197. this._createSymbol(o, n, r, l, f);
  58198. } else {
  58199. var d = this.childAt(0);
  58200. d.silent = !1;
  58201. var h = {
  58202. scaleX: l[0] / 2,
  58203. scaleY: l[1] / 2
  58204. };
  58205. c ? d.attr(h) : Ct(d, h, s, r), so(d);
  58206. }
  58207. if (this._updateCommon(n, r, l, i, a), u) {
  58208. var d = this.childAt(0);
  58209. if (!c) {
  58210. var h = {
  58211. scaleX: this._sizeX,
  58212. scaleY: this._sizeY,
  58213. style: {
  58214. // Always fadeIn. Because it has fadeOut animation when symbol is removed..
  58215. opacity: d.style.opacity
  58216. }
  58217. };
  58218. d.scaleX = d.scaleY = 0, d.style.opacity = 0, Yt(d, h, s, r);
  58219. }
  58220. }
  58221. c && this.childAt(0).stopAnimation("leave");
  58222. }, e.prototype._updateCommon = function(n, r, i, a, o) {
  58223. var s = this.childAt(0), l = n.hostModel, u, c, f, d, h, p, v, g, m;
  58224. 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) {
  58225. var y = a && a.itemModel ? a.itemModel : n.getItemModel(r), b = y.getModel("emphasis");
  58226. 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");
  58227. }
  58228. var _ = n.getItemVisual(r, "symbolRotate");
  58229. s.attr("rotation", (_ || 0) * Math.PI / 180 || 0);
  58230. var O = Vf(n.getItemVisual(r, "symbolOffset"), i);
  58231. O && (s.x = O[0], s.y = O[1]), m && s.attr("cursor", m);
  58232. var S = n.getItemVisual(r, "style"), x = S.fill;
  58233. if (s instanceof lr) {
  58234. var C = s.style;
  58235. s.useStyle(le({
  58236. // TODO other properties like x, y ?
  58237. image: C.image,
  58238. x: C.x,
  58239. y: C.y,
  58240. width: C.width,
  58241. height: C.height
  58242. }, S));
  58243. } else
  58244. s.__isEmptyBrush ? s.useStyle(le({}, S)) : s.useStyle(S), s.style.decal = null, s.setColor(x, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
  58245. var T = n.getItemVisual(r, "liftZ"), w = this._z2;
  58246. T != null ? w == null && (this._z2 = s.z2, s.z2 += T) : w != null && (s.z2 = w, this._z2 = null);
  58247. var P = o && o.useNameLabel;
  58248. Pr(s, v, {
  58249. labelFetcher: l,
  58250. labelDataIndex: r,
  58251. defaultText: $,
  58252. inheritColor: x,
  58253. defaultOpacity: S.opacity
  58254. });
  58255. function $(E) {
  58256. return P ? n.getName(E) : Wh(n, E);
  58257. }
  58258. this._sizeX = i[0] / 2, this._sizeY = i[1] / 2;
  58259. var A = s.ensureState("emphasis");
  58260. A.style = u, s.ensureState("select").style = f, s.ensureState("blur").style = c;
  58261. var D = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
  58262. A.scaleX = this._sizeX * D, A.scaleY = this._sizeY * D, this.setSymbolScale(1), bn(this, d, h, p);
  58263. }, e.prototype.setSymbolScale = function(n) {
  58264. this.scaleX = this.scaleY = n;
  58265. }, e.prototype.fadeOut = function(n, r, i) {
  58266. var a = this.childAt(0), o = Fe(this).dataIndex, s = i && i.animation;
  58267. if (this.silent = a.silent = !0, i && i.fadeLabel) {
  58268. var l = a.getTextContent();
  58269. l && uu(l, {
  58270. style: {
  58271. opacity: 0
  58272. }
  58273. }, r, {
  58274. dataIndex: o,
  58275. removeOpt: s,
  58276. cb: function() {
  58277. a.removeTextContent();
  58278. }
  58279. });
  58280. } else
  58281. a.removeTextContent();
  58282. uu(a, {
  58283. style: {
  58284. opacity: 0
  58285. },
  58286. scaleX: 0,
  58287. scaleY: 0
  58288. }, r, {
  58289. dataIndex: o,
  58290. cb: n,
  58291. removeOpt: s
  58292. });
  58293. }, e.getSymbolSize = function(n, r) {
  58294. return xp(n.getItemVisual(r, "symbolSize"));
  58295. }, e;
  58296. }(Ve)
  58297. );
  58298. function A3e(t, e) {
  58299. this.parent.drift(t, e);
  58300. }
  58301. function tP(t, e, n, r) {
  58302. 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";
  58303. }
  58304. function EV(t) {
  58305. return t != null && !Ie(t) && (t = {
  58306. isIgnore: t
  58307. }), t || {};
  58308. }
  58309. function MV(t) {
  58310. var e = t.hostModel, n = e.getModel("emphasis");
  58311. return {
  58312. emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
  58313. blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
  58314. selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
  58315. focus: n.get("focus"),
  58316. blurScope: n.get("blurScope"),
  58317. emphasisDisabled: n.get("disabled"),
  58318. hoverScale: n.get("scale"),
  58319. labelStatesModels: er(e),
  58320. cursorStyle: e.get("cursor")
  58321. };
  58322. }
  58323. var Z0 = (
  58324. /** @class */
  58325. function() {
  58326. function t(e) {
  58327. this.group = new Ve(), this._SymbolCtor = e || j0;
  58328. }
  58329. return t.prototype.updateData = function(e, n) {
  58330. this._progressiveEls = null, n = EV(n);
  58331. var r = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = n.disableAnimation, l = MV(e), u = {
  58332. disableAnimation: s
  58333. }, c = n.getSymbolPoint || function(f) {
  58334. return e.getItemLayout(f);
  58335. };
  58336. a || r.removeAll(), e.diff(a).add(function(f) {
  58337. var d = c(f);
  58338. if (tP(e, d, f, n)) {
  58339. var h = new o(e, f, l, u);
  58340. h.setPosition(d), e.setItemGraphicEl(f, h), r.add(h);
  58341. }
  58342. }).update(function(f, d) {
  58343. var h = a.getItemGraphicEl(d), p = c(f);
  58344. if (!tP(e, p, f, n)) {
  58345. r.remove(h);
  58346. return;
  58347. }
  58348. var v = e.getItemVisual(f, "symbol") || "circle", g = h && h.getSymbolType && h.getSymbolType();
  58349. if (!h || g && g !== v)
  58350. r.remove(h), h = new o(e, f, l, u), h.setPosition(p);
  58351. else {
  58352. h.updateData(e, f, l, u);
  58353. var m = {
  58354. x: p[0],
  58355. y: p[1]
  58356. };
  58357. s ? h.attr(m) : Ct(h, m, i);
  58358. }
  58359. r.add(h), e.setItemGraphicEl(f, h);
  58360. }).remove(function(f) {
  58361. var d = a.getItemGraphicEl(f);
  58362. d && d.fadeOut(function() {
  58363. r.remove(d);
  58364. }, i);
  58365. }).execute(), this._getSymbolPoint = c, this._data = e;
  58366. }, t.prototype.updateLayout = function() {
  58367. var e = this, n = this._data;
  58368. n && n.eachItemGraphicEl(function(r, i) {
  58369. var a = e._getSymbolPoint(i);
  58370. r.setPosition(a), r.markRedraw();
  58371. });
  58372. }, t.prototype.incrementalPrepareUpdate = function(e) {
  58373. this._seriesScope = MV(e), this._data = null, this.group.removeAll();
  58374. }, t.prototype.incrementalUpdate = function(e, n, r) {
  58375. this._progressiveEls = [], r = EV(r);
  58376. function i(l) {
  58377. l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
  58378. }
  58379. for (var a = e.start; a < e.end; a++) {
  58380. var o = n.getItemLayout(a);
  58381. if (tP(n, o, a, r)) {
  58382. var s = new this._SymbolCtor(n, a, this._seriesScope);
  58383. s.traverse(i), s.setPosition(o), this.group.add(s), n.setItemGraphicEl(a, s), this._progressiveEls.push(s);
  58384. }
  58385. }
  58386. }, t.prototype.eachRendered = function(e) {
  58387. Tu(this._progressiveEls || this.group, e);
  58388. }, t.prototype.remove = function(e) {
  58389. var n = this.group, r = this._data;
  58390. r && e ? r.eachItemGraphicEl(function(i) {
  58391. i.fadeOut(function() {
  58392. n.remove(i);
  58393. }, r.hostModel);
  58394. }) : n.removeAll();
  58395. }, t;
  58396. }()
  58397. );
  58398. function Nte(t, e, n) {
  58399. var r = t.getBaseAxis(), i = t.getOtherAxis(r), a = E3e(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) {
  58400. return e.mapDimension(p);
  58401. }), d = !1, h = e.getCalculationInfo("stackResultDimension");
  58402. return Xs(
  58403. e,
  58404. f[0]
  58405. /* , dims[1] */
  58406. ) && (d = !0, f[0] = h), Xs(
  58407. e,
  58408. f[1]
  58409. /* , dims[0] */
  58410. ) && (d = !0, f[1] = h), {
  58411. dataDimsForPoint: f,
  58412. valueStart: a,
  58413. valueAxisDim: s,
  58414. baseAxisDim: o,
  58415. stacked: !!d,
  58416. valueDim: l,
  58417. baseDim: u,
  58418. baseDataOffset: c,
  58419. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  58420. };
  58421. }
  58422. function E3e(t, e) {
  58423. var n = 0, r = t.scale.getExtent();
  58424. 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;
  58425. }
  58426. function Bte(t, e, n, r) {
  58427. var i = NaN;
  58428. t.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = t.valueStart);
  58429. var a = t.baseDataOffset, o = [];
  58430. return o[a] = n.get(t.baseDim, r), o[1 - a] = i, e.dataToPoint(o);
  58431. }
  58432. function M3e(t, e) {
  58433. var n = [];
  58434. return e.diff(t).add(function(r) {
  58435. n.push({
  58436. cmd: "+",
  58437. idx: r
  58438. });
  58439. }).update(function(r, i) {
  58440. n.push({
  58441. cmd: "=",
  58442. idx: i,
  58443. idx1: r
  58444. });
  58445. }).remove(function(r) {
  58446. n.push({
  58447. cmd: "-",
  58448. idx: r
  58449. });
  58450. }).execute(), n;
  58451. }
  58452. function I3e(t, e, n, r, i, a, o, s) {
  58453. for (var l = M3e(t, e), u = [], c = [], f = [], d = [], h = [], p = [], v = [], g = Nte(i, e, o), m = t.getLayout("points") || [], y = e.getLayout("points") || [], b = 0; b < l.length; b++) {
  58454. var _ = l[b], O = !0, S = void 0, x = void 0;
  58455. switch (_.cmd) {
  58456. case "=":
  58457. S = _.idx * 2, x = _.idx1 * 2;
  58458. var C = m[S], T = m[S + 1], w = y[x], P = y[x + 1];
  58459. (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));
  58460. break;
  58461. case "+":
  58462. var $ = _.idx, A = g.dataDimsForPoint, D = i.dataToPoint([e.get(A[0], $), e.get(A[1], $)]);
  58463. x = $ * 2, u.push(D[0], D[1]), c.push(y[x], y[x + 1]);
  58464. var E = Bte(g, i, e, $);
  58465. f.push(E[0], E[1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex($));
  58466. break;
  58467. case "-":
  58468. O = !1;
  58469. }
  58470. O && (h.push(_), p.push(p.length));
  58471. }
  58472. p.sort(function(ee, oe) {
  58473. return v[ee] - v[oe];
  58474. });
  58475. for (var R = u.length, N = Fo(R), V = Fo(R), z = Fo(R), W = Fo(R), F = [], b = 0; b < p.length; b++) {
  58476. var Q = p[b], Z = b * 2, ne = Q * 2;
  58477. N[Z] = u[ne], N[Z + 1] = u[ne + 1], V[Z] = c[ne], V[Z + 1] = c[ne + 1], z[Z] = f[ne], z[Z + 1] = f[ne + 1], W[Z] = d[ne], W[Z + 1] = d[ne + 1], F[b] = h[Q];
  58478. }
  58479. return {
  58480. current: N,
  58481. next: V,
  58482. stackedOnCurrent: z,
  58483. stackedOnNext: W,
  58484. status: F
  58485. };
  58486. }
  58487. var ml = Math.min, yl = Math.max;
  58488. function nf(t, e) {
  58489. return isNaN(t) || isNaN(e);
  58490. }
  58491. function lE(t, e, n, r, i, a, o, s, l) {
  58492. for (var u, c, f, d, h, p, v = n, g = 0; g < r; g++) {
  58493. var m = e[v * 2], y = e[v * 2 + 1];
  58494. if (v >= i || v < 0)
  58495. break;
  58496. if (nf(m, y)) {
  58497. if (l) {
  58498. v += a;
  58499. continue;
  58500. }
  58501. break;
  58502. }
  58503. if (v === n)
  58504. t[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, d = y;
  58505. else {
  58506. var b = m - u, _ = y - c;
  58507. if (b * b + _ * _ < 0.5) {
  58508. v += a;
  58509. continue;
  58510. }
  58511. if (o > 0) {
  58512. for (var O = v + a, S = e[O * 2], x = e[O * 2 + 1]; S === m && x === y && g < r; )
  58513. 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;
  58514. var C = g + 1;
  58515. if (l)
  58516. for (; nf(S, x) && C < r; )
  58517. C++, O += a, S = e[O * 2], x = e[O * 2 + 1];
  58518. var T = 0.5, w = 0, P = 0, $ = void 0, A = void 0;
  58519. if (C >= r || nf(S, x))
  58520. h = m, p = y;
  58521. else {
  58522. w = S - u, P = x - c;
  58523. var D = m - u, E = S - m, R = y - c, N = x - y, V = void 0, z = void 0;
  58524. if (s === "x") {
  58525. V = Math.abs(D), z = Math.abs(E);
  58526. var W = w > 0 ? 1 : -1;
  58527. h = m - W * V * o, p = y, $ = m + W * z * o, A = y;
  58528. } else if (s === "y") {
  58529. V = Math.abs(R), z = Math.abs(N);
  58530. var F = P > 0 ? 1 : -1;
  58531. h = m, p = y - F * V * o, $ = m, A = y + F * z * o;
  58532. } else
  58533. V = Math.sqrt(D * D + R * R), z = Math.sqrt(E * E + N * N), T = z / (z + 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 / z, p = y - P * V / z, 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 * z / V, A = y + P * z / V;
  58534. }
  58535. t.bezierCurveTo(f, d, h, p, m, y), f = $, d = A;
  58536. } else
  58537. t.lineTo(m, y);
  58538. }
  58539. u = m, c = y, v += a;
  58540. }
  58541. return g;
  58542. }
  58543. var zte = (
  58544. /** @class */
  58545. /* @__PURE__ */ function() {
  58546. function t() {
  58547. this.smooth = 0, this.smoothConstraint = !0;
  58548. }
  58549. return t;
  58550. }()
  58551. ), D3e = (
  58552. /** @class */
  58553. function(t) {
  58554. q(e, t);
  58555. function e(n) {
  58556. var r = t.call(this, n) || this;
  58557. return r.type = "ec-polyline", r;
  58558. }
  58559. return e.prototype.getDefaultStyle = function() {
  58560. return {
  58561. stroke: "#000",
  58562. fill: null
  58563. };
  58564. }, e.prototype.getDefaultShape = function() {
  58565. return new zte();
  58566. }, e.prototype.buildPath = function(n, r) {
  58567. var i = r.points, a = 0, o = i.length / 2;
  58568. if (r.connectNulls) {
  58569. for (; o > 0 && nf(i[o * 2 - 2], i[o * 2 - 1]); o--)
  58570. ;
  58571. for (; a < o && nf(i[a * 2], i[a * 2 + 1]); a++)
  58572. ;
  58573. }
  58574. for (; a < o; )
  58575. a += lE(n, i, a, o, o, 1, r.smooth, r.smoothMonotone, r.connectNulls) + 1;
  58576. }, e.prototype.getPointOn = function(n, r) {
  58577. this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
  58578. for (var i = this.path, a = i.data, o = as.CMD, s, l, u = r === "x", c = [], f = 0; f < a.length; ) {
  58579. 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;
  58580. switch (d) {
  58581. case o.M:
  58582. s = a[f++], l = a[f++];
  58583. break;
  58584. case o.L:
  58585. if (h = a[f++], p = a[f++], b = u ? (n - s) / (h - s) : (n - l) / (p - l), b <= 1 && b >= 0) {
  58586. var _ = u ? (p - l) * b + l : (h - s) * b + s;
  58587. return u ? [n, _] : [_, n];
  58588. }
  58589. s = h, l = p;
  58590. break;
  58591. case o.C:
  58592. h = a[f++], p = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++];
  58593. var O = u ? K1(s, h, v, m, n, c) : K1(l, p, g, y, n, c);
  58594. if (O > 0)
  58595. for (var S = 0; S < O; S++) {
  58596. var x = c[S];
  58597. if (x <= 1 && x >= 0) {
  58598. var _ = u ? Gn(l, p, g, y, x) : Gn(s, h, v, m, x);
  58599. return u ? [n, _] : [_, n];
  58600. }
  58601. }
  58602. s = m, l = y;
  58603. break;
  58604. }
  58605. }
  58606. }, e;
  58607. }(ot)
  58608. ), R3e = (
  58609. /** @class */
  58610. function(t) {
  58611. q(e, t);
  58612. function e() {
  58613. return t !== null && t.apply(this, arguments) || this;
  58614. }
  58615. return e;
  58616. }(zte)
  58617. ), Vte = (
  58618. /** @class */
  58619. function(t) {
  58620. q(e, t);
  58621. function e(n) {
  58622. var r = t.call(this, n) || this;
  58623. return r.type = "ec-polygon", r;
  58624. }
  58625. return e.prototype.getDefaultShape = function() {
  58626. return new R3e();
  58627. }, e.prototype.buildPath = function(n, r) {
  58628. var i = r.points, a = r.stackedOnPoints, o = 0, s = i.length / 2, l = r.smoothMonotone;
  58629. if (r.connectNulls) {
  58630. for (; s > 0 && nf(i[s * 2 - 2], i[s * 2 - 1]); s--)
  58631. ;
  58632. for (; o < s && nf(i[o * 2], i[o * 2 + 1]); o++)
  58633. ;
  58634. }
  58635. for (; o < s; ) {
  58636. var u = lE(n, i, o, s, s, 1, r.smooth, l, r.connectNulls);
  58637. lE(n, a, o + u - 1, u, s, -1, r.stackedOnSmooth, l, r.connectNulls), o += u + 1, n.closePath();
  58638. }
  58639. }, e;
  58640. }(ot)
  58641. );
  58642. function Fte(t, e, n, r, i) {
  58643. var a = t.getArea(), o = a.x, s = a.y, l = a.width, u = a.height, c = n.get(["lineStyle", "width"]) || 2;
  58644. o -= c / 2, s -= c / 2, l += c, u += c, l = Math.ceil(l), o !== Math.floor(o) && (o = Math.floor(o), l++);
  58645. var f = new mt({
  58646. shape: {
  58647. x: o,
  58648. y: s,
  58649. width: l,
  58650. height: u
  58651. }
  58652. });
  58653. if (e) {
  58654. var d = t.getBaseAxis(), h = d.isHorizontal(), p = d.inverse;
  58655. h ? (p && (f.shape.x += l), f.shape.width = 0) : (p || (f.shape.y += u), f.shape.height = 0);
  58656. var v = Me(i) ? function(g) {
  58657. i(g, f);
  58658. } : null;
  58659. Yt(f, {
  58660. shape: {
  58661. width: l,
  58662. height: u,
  58663. x: o,
  58664. y: s
  58665. }
  58666. }, n, null, r, v);
  58667. }
  58668. return f;
  58669. }
  58670. function Wte(t, e, n) {
  58671. var r = t.getArea(), i = mn(r.r0, 1), a = mn(r.r, 1), o = new ri({
  58672. shape: {
  58673. cx: mn(t.cx, 1),
  58674. cy: mn(t.cy, 1),
  58675. r0: i,
  58676. r: a,
  58677. startAngle: r.startAngle,
  58678. endAngle: r.endAngle,
  58679. clockwise: r.clockwise
  58680. }
  58681. });
  58682. if (e) {
  58683. var s = t.getBaseAxis().dim === "angle";
  58684. s ? o.shape.endAngle = r.startAngle : o.shape.r = i, Yt(o, {
  58685. shape: {
  58686. endAngle: r.endAngle,
  58687. r: a
  58688. }
  58689. }, n);
  58690. }
  58691. return o;
  58692. }
  58693. function U0(t, e, n, r, i) {
  58694. if (t) {
  58695. if (t.type === "polar")
  58696. return Wte(t, e, n);
  58697. if (t.type === "cartesian2d")
  58698. return Fte(t, e, n, r, i);
  58699. } else return null;
  58700. return null;
  58701. }
  58702. function Ff(t, e) {
  58703. return t.type === e;
  58704. }
  58705. function IV(t, e) {
  58706. if (t.length === e.length) {
  58707. for (var n = 0; n < t.length; n++)
  58708. if (t[n] !== e[n])
  58709. return;
  58710. return !0;
  58711. }
  58712. }
  58713. function DV(t) {
  58714. for (var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = 0; a < t.length; ) {
  58715. var o = t[a++], s = t[a++];
  58716. isNaN(o) || (e = Math.min(o, e), r = Math.max(o, r)), isNaN(s) || (n = Math.min(s, n), i = Math.max(s, i));
  58717. }
  58718. return [[e, n], [r, i]];
  58719. }
  58720. function RV(t, e) {
  58721. var n = DV(t), r = n[0], i = n[1], a = DV(e), o = a[0], s = a[1];
  58722. 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]));
  58723. }
  58724. function kV(t) {
  58725. return St(t) ? t : t ? 0.5 : 0;
  58726. }
  58727. function k3e(t, e, n) {
  58728. if (!n.valueDim)
  58729. return [];
  58730. for (var r = e.count(), i = Fo(r * 2), a = 0; a < r; a++) {
  58731. var o = Bte(n, t, e, a);
  58732. i[a * 2] = o[0], i[a * 2 + 1] = o[1];
  58733. }
  58734. return i;
  58735. }
  58736. function bl(t, e, n, r) {
  58737. var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], c = [], f = [];
  58738. if (r) {
  58739. for (s = 0; s < t.length; s += 2)
  58740. !isNaN(t[s]) && !isNaN(t[s + 1]) && f.push(t[s], t[s + 1]);
  58741. t = f;
  58742. }
  58743. for (s = 0; s < t.length - 2; s += 2)
  58744. 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) {
  58745. case "end":
  58746. l[a] = c[a], l[1 - a] = u[1 - a], o.push(l[0], l[1]);
  58747. break;
  58748. case "middle":
  58749. var d = (u[a] + c[a]) / 2, h = [];
  58750. 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]);
  58751. break;
  58752. default:
  58753. l[a] = u[a], l[1 - a] = c[1 - a], o.push(l[0], l[1]);
  58754. }
  58755. return o.push(t[s++], t[s++]), o;
  58756. }
  58757. function L3e(t, e) {
  58758. var n = [], r = t.length, i, a;
  58759. function o(c, f, d) {
  58760. var h = c.coord, p = (d - h) / (f.coord - h), v = xR(p, [c.color, f.color]);
  58761. return {
  58762. coord: d,
  58763. color: v
  58764. };
  58765. }
  58766. for (var s = 0; s < r; s++) {
  58767. var l = t[s], u = l.coord;
  58768. if (u < 0)
  58769. i = l;
  58770. else if (u > e) {
  58771. a ? n.push(o(a, l, e)) : i && n.push(o(i, l, 0), o(i, l, e));
  58772. break;
  58773. } else
  58774. i && (n.push(o(i, l, 0)), i = null), n.push(l), a = l;
  58775. }
  58776. return n;
  58777. }
  58778. function N3e(t, e, n) {
  58779. var r = t.getVisual("visualMeta");
  58780. if (!(!r || !r.length || !t.count())) {
  58781. if (e.type !== "cartesian2d") {
  58782. process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
  58783. return;
  58784. }
  58785. for (var i, a, o = r.length - 1; o >= 0; o--) {
  58786. var s = t.getDimensionInfo(r[o].dimension);
  58787. if (i = s && s.coordDim, i === "x" || i === "y") {
  58788. a = r[o];
  58789. break;
  58790. }
  58791. }
  58792. if (!a) {
  58793. process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
  58794. return;
  58795. }
  58796. var l = e.getAxis(i), u = ce(a.stops, function(b) {
  58797. return {
  58798. coord: l.toGlobalCoord(l.dataToCoord(b.value)),
  58799. color: b.color
  58800. };
  58801. }), c = u.length, f = a.outerColors.slice();
  58802. c && u[0].coord > u[c - 1].coord && (u.reverse(), f.reverse());
  58803. var d = L3e(u, i === "x" ? n.getWidth() : n.getHeight()), h = d.length;
  58804. if (!h && c)
  58805. return u[0].coord < 0 ? f[1] ? f[1] : u[c - 1].color : f[0] ? f[0] : u[0].color;
  58806. var p = 10, v = d[0].coord - p, g = d[h - 1].coord + p, m = g - v;
  58807. if (m < 1e-3)
  58808. return "transparent";
  58809. k(d, function(b) {
  58810. b.offset = (b.coord - v) / m;
  58811. }), d.push({
  58812. // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
  58813. offset: h ? d[h - 1].offset : 0.5,
  58814. color: f[1] || "transparent"
  58815. }), d.unshift({
  58816. offset: h ? d[0].offset : 0.5,
  58817. color: f[0] || "transparent"
  58818. });
  58819. var y = new hp(0, 0, 0, 0, d, !0);
  58820. return y[i] = v, y[i + "2"] = g, y;
  58821. }
  58822. }
  58823. function B3e(t, e, n) {
  58824. var r = t.get("showAllSymbol"), i = r === "auto";
  58825. if (!(r && !i)) {
  58826. var a = n.getAxesByScale("ordinal")[0];
  58827. if (a && !(i && z3e(a, e))) {
  58828. var o = e.mapDimension(a.dim), s = {};
  58829. return k(a.getViewLabels(), function(l) {
  58830. var u = a.scale.getRawOrdinalNumber(l.tickValue);
  58831. s[u] = 1;
  58832. }), function(l) {
  58833. return !s.hasOwnProperty(e.get(o, l));
  58834. };
  58835. }
  58836. }
  58837. }
  58838. function z3e(t, e) {
  58839. var n = t.getExtent(), r = Math.abs(n[1] - n[0]) / t.scale.count();
  58840. isNaN(r) && (r = 0);
  58841. for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a)
  58842. if (j0.getSymbolSize(
  58843. e,
  58844. o
  58845. // Only for cartesian, where `isHorizontal` exists.
  58846. )[t.isHorizontal() ? 1 : 0] * 1.5 > r)
  58847. return !1;
  58848. return !0;
  58849. }
  58850. function V3e(t, e) {
  58851. return isNaN(t) || isNaN(e);
  58852. }
  58853. function F3e(t) {
  58854. for (var e = t.length / 2; e > 0 && V3e(t[e * 2 - 2], t[e * 2 - 1]); e--)
  58855. ;
  58856. return e - 1;
  58857. }
  58858. function LV(t, e) {
  58859. return [t[e * 2], t[e * 2 + 1]];
  58860. }
  58861. function W3e(t, e, n) {
  58862. for (var r = t.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, l = -1, u = 0; u < r; u++)
  58863. if (o = t[u * 2 + i], !(isNaN(o) || isNaN(t[u * 2 + 1 - i]))) {
  58864. if (u === 0) {
  58865. a = o;
  58866. continue;
  58867. }
  58868. if (a <= e && o >= e || a >= e && o <= e) {
  58869. l = u;
  58870. break;
  58871. }
  58872. s = u, a = o;
  58873. }
  58874. return {
  58875. range: [s, l],
  58876. t: (e - a) / (o - a)
  58877. };
  58878. }
  58879. function Qte(t) {
  58880. if (t.get(["endLabel", "show"]))
  58881. return !0;
  58882. for (var e = 0; e < ni.length; e++)
  58883. if (t.get([ni[e], "endLabel", "show"]))
  58884. return !0;
  58885. return !1;
  58886. }
  58887. function nP(t, e, n, r) {
  58888. if (Ff(e, "cartesian2d")) {
  58889. var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = {
  58890. lastFrameIndex: 0
  58891. }, l = Qte(r) ? function(h, p) {
  58892. t._endLabelOnDuring(h, p, o, s, a, i, e);
  58893. } : null, u = e.getBaseAxis().isHorizontal(), c = Fte(e, n, r, function() {
  58894. var h = t._endLabel;
  58895. h && n && s.originalX != null && h.attr({
  58896. x: s.originalX,
  58897. y: s.originalY
  58898. });
  58899. }, l);
  58900. if (!r.get("clip", !0)) {
  58901. var f = c.shape, d = Math.max(f.width, f.height);
  58902. u ? (f.y -= d, f.height += d * 2) : (f.x -= d, f.width += d * 2);
  58903. }
  58904. return l && l(1, c), c;
  58905. } else
  58906. return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), Wte(e, n, r);
  58907. }
  58908. function Q3e(t, e) {
  58909. var n = e.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
  58910. return {
  58911. normal: {
  58912. align: t.get("align") || a,
  58913. verticalAlign: t.get("verticalAlign") || o
  58914. }
  58915. };
  58916. }
  58917. var H3e = (
  58918. /** @class */
  58919. function(t) {
  58920. q(e, t);
  58921. function e() {
  58922. return t !== null && t.apply(this, arguments) || this;
  58923. }
  58924. return e.prototype.init = function() {
  58925. var n = new Ve(), r = new Z0();
  58926. this.group.add(r.group), this._symbolDraw = r, this._lineGroup = n;
  58927. }, e.prototype.render = function(n, r, i) {
  58928. 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 = Nte(o, l, _), S = b && k3e(o, l, O), x = n.get("showSymbol"), C = n.get("connectNulls"), T = x && !d && B3e(n, l, o), w = this._data;
  58929. w && w.eachItemGraphicEl(function(oe, K) {
  58930. oe.__temp && (s.remove(oe), w.setItemGraphicEl(K, null));
  58931. }), x || p.remove(), s.add(m);
  58932. var P = d ? !1 : n.get("step"), $;
  58933. 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 = $;
  58934. var A = N3e(l, o, i) || l.getVisual("style")[l.getVisual("drawType")];
  58935. if (!(v && h.type === o.type && P === this._step))
  58936. x && p.updateData(l, {
  58937. isIgnore: T,
  58938. clipShape: $,
  58939. disableAnimation: !0,
  58940. getSymbolPoint: function(oe) {
  58941. return [f[oe * 2], f[oe * 2 + 1]];
  58942. }
  58943. }), 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, _f(A)), m.setClipPath(nP(this, o, !0, n));
  58944. else {
  58945. b && !g ? g = this._newPolygon(f, S) : g && !b && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, _f(A));
  58946. var D = m.getClipPath();
  58947. if (D) {
  58948. var E = nP(this, o, !1, n);
  58949. Yt(D, {
  58950. shape: E.shape
  58951. }, n);
  58952. } else
  58953. m.setClipPath(nP(this, o, !0, n));
  58954. x && p.updateData(l, {
  58955. isIgnore: T,
  58956. clipShape: $,
  58957. disableAnimation: !0,
  58958. getSymbolPoint: function(oe) {
  58959. return [f[oe * 2], f[oe * 2 + 1]];
  58960. }
  58961. }), (!IV(this._stackedOnPoints, S) || !IV(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({
  58962. points: f
  58963. }), g && g.setShape({
  58964. points: f,
  58965. stackedOnPoints: S
  58966. })));
  58967. }
  58968. var R = n.getModel("emphasis"), N = R.get("focus"), V = R.get("blurScope"), z = R.get("disabled");
  58969. if (v.useStyle(Re(
  58970. // Use color in lineStyle first
  58971. u.getLineStyle(),
  58972. {
  58973. fill: "none",
  58974. stroke: A,
  58975. lineJoin: "bevel"
  58976. }
  58977. )), Tr(v, n, "lineStyle"), v.style.lineWidth > 0 && n.get(["emphasis", "lineStyle", "width"]) === "bolder") {
  58978. var W = v.getState("emphasis").style;
  58979. W.lineWidth = +v.style.lineWidth + 1;
  58980. }
  58981. Fe(v).seriesIndex = n.seriesIndex, bn(v, N, V, z);
  58982. var F = kV(n.get("smooth")), Q = n.get("smoothMonotone");
  58983. if (v.setShape({
  58984. smooth: F,
  58985. smoothMonotone: Q,
  58986. connectNulls: C
  58987. }), g) {
  58988. var Z = l.getCalculationInfo("stackedOnSeries"), ne = 0;
  58989. g.useStyle(Re(c.getAreaStyle(), {
  58990. fill: A,
  58991. opacity: 0.7,
  58992. lineJoin: "bevel",
  58993. decal: l.getVisual("style").decal
  58994. })), Z && (ne = kV(Z.get("smooth"))), g.setShape({
  58995. smooth: F,
  58996. stackedOnSmooth: ne,
  58997. smoothMonotone: Q,
  58998. connectNulls: C
  58999. }), Tr(g, n, "areaStyle"), Fe(g).seriesIndex = n.seriesIndex, bn(g, N, V, z);
  59000. }
  59001. var ee = function(oe) {
  59002. a._changePolyState(oe);
  59003. };
  59004. l.eachItemGraphicEl(function(oe) {
  59005. oe && (oe.onHoverStateChange = ee);
  59006. }), 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));
  59007. }, e.prototype.packEventData = function(n, r) {
  59008. Fe(r).eventData = {
  59009. componentType: "series",
  59010. componentSubType: "line",
  59011. componentIndex: n.componentIndex,
  59012. seriesIndex: n.seriesIndex,
  59013. seriesName: n.name,
  59014. seriesType: "line"
  59015. };
  59016. }, e.prototype.highlight = function(n, r, i, a) {
  59017. var o = n.getData(), s = mf(o, a);
  59018. if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
  59019. var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
  59020. if (!u) {
  59021. var c = l[s * 2], f = l[s * 2 + 1];
  59022. if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f))
  59023. return;
  59024. var d = n.get("zlevel") || 0, h = n.get("z") || 0;
  59025. u = new j0(o, s), u.x = c, u.y = f, u.setZ(d, h);
  59026. var p = u.getSymbolPath().getTextContent();
  59027. 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);
  59028. }
  59029. u.highlight();
  59030. } else
  59031. zt.prototype.highlight.call(this, n, r, i, a);
  59032. }, e.prototype.downplay = function(n, r, i, a) {
  59033. var o = n.getData(), s = mf(o, a);
  59034. if (this._changePolyState("normal"), s != null && s >= 0) {
  59035. var l = o.getItemGraphicEl(s);
  59036. l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
  59037. } else
  59038. zt.prototype.downplay.call(this, n, r, i, a);
  59039. }, e.prototype._changePolyState = function(n) {
  59040. var r = this._polygon;
  59041. oO(this._polyline, n), r && oO(r, n);
  59042. }, e.prototype._newPolyline = function(n) {
  59043. var r = this._polyline;
  59044. return r && this._lineGroup.remove(r), r = new D3e({
  59045. shape: {
  59046. points: n
  59047. },
  59048. segmentIgnoreThreshold: 2,
  59049. z2: 10
  59050. }), this._lineGroup.add(r), this._polyline = r, r;
  59051. }, e.prototype._newPolygon = function(n, r) {
  59052. var i = this._polygon;
  59053. return i && this._lineGroup.remove(i), i = new Vte({
  59054. shape: {
  59055. points: n,
  59056. stackedOnPoints: r
  59057. },
  59058. segmentIgnoreThreshold: 2
  59059. }), this._lineGroup.add(i), this._polygon = i, i;
  59060. }, e.prototype._initSymbolLabelAnimation = function(n, r, i) {
  59061. var a, o, s = r.getBaseAxis(), l = s.inverse;
  59062. r.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : r.type === "polar" && (a = s.dim === "angle", o = !0);
  59063. var u = n.hostModel, c = u.get("animationDuration");
  59064. Me(c) && (c = c(null));
  59065. var f = u.get("animationDelay") || 0, d = Me(f) ? f(null) : f;
  59066. n.eachItemGraphicEl(function(h, p) {
  59067. var v = h;
  59068. if (v) {
  59069. var g = [h.x, h.y], m = void 0, y = void 0, b = void 0;
  59070. if (i)
  59071. if (o) {
  59072. var _ = i, O = r.pointToCoord(g);
  59073. a ? (m = _.startAngle, y = _.endAngle, b = -O[1] / 180 * Math.PI) : (m = _.r0, y = _.r, b = O[0]);
  59074. } else {
  59075. var S = i;
  59076. a ? (m = S.x, y = S.x + S.width, b = h.x) : (m = S.y + S.height, y = S.y, b = h.y);
  59077. }
  59078. var x = y === m ? 0 : (b - m) / (y - m);
  59079. l && (x = 1 - x);
  59080. var C = Me(f) ? f(p) : c * x + d, T = v.getSymbolPath(), w = T.getTextContent();
  59081. v.attr({
  59082. scaleX: 0,
  59083. scaleY: 0
  59084. }), v.animateTo({
  59085. scaleX: 1,
  59086. scaleY: 1
  59087. }, {
  59088. duration: 200,
  59089. setToFinal: !0,
  59090. delay: C
  59091. }), w && w.animateFrom({
  59092. style: {
  59093. opacity: 0
  59094. }
  59095. }, {
  59096. duration: 300,
  59097. delay: C
  59098. }), T.disableLabelAnimation = !0;
  59099. }
  59100. });
  59101. }, e.prototype._initOrUpdateEndLabel = function(n, r, i) {
  59102. var a = n.getModel("endLabel");
  59103. if (Qte(n)) {
  59104. var o = n.getData(), s = this._polyline, l = o.getLayout("points");
  59105. if (!l) {
  59106. s.removeTextContent(), this._endLabel = null;
  59107. return;
  59108. }
  59109. var u = this._endLabel;
  59110. u || (u = this._endLabel = new gt({
  59111. z2: 200
  59112. // should be higher than item symbol
  59113. }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
  59114. var c = F3e(l);
  59115. c >= 0 && (Pr(s, er(n, "endLabel"), {
  59116. inheritColor: i,
  59117. labelFetcher: n,
  59118. labelDataIndex: c,
  59119. defaultText: function(f, d, h) {
  59120. return h != null ? Lte(o, h) : Wh(o, f);
  59121. },
  59122. enableTextSetter: !0
  59123. }, Q3e(a, r)), s.textConfig.position = null);
  59124. } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
  59125. }, e.prototype._endLabelOnDuring = function(n, r, i, a, o, s, l) {
  59126. var u = this._endLabel, c = this._polyline;
  59127. if (u) {
  59128. n < 1 && a.originalX == null && (a.originalX = u.x, a.originalY = u.y);
  59129. 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 = W3e(f, _, x), T = C.range, w = T[1] - T[0], P = void 0;
  59130. if (w >= 1) {
  59131. if (w > 1 && !h) {
  59132. var $ = LV(f, T[0]);
  59133. u.attr({
  59134. x: $[0] + O,
  59135. y: $[1] + S
  59136. }), o && (P = d.getRawValue(T[0]));
  59137. } else {
  59138. var $ = c.getPointOn(_, x);
  59139. $ && u.attr({
  59140. x: $[0] + O,
  59141. y: $[1] + S
  59142. });
  59143. var A = d.getRawValue(T[0]), D = d.getRawValue(T[1]);
  59144. o && (P = gK(i, p, A, D, C.t));
  59145. }
  59146. a.lastFrameIndex = T[0];
  59147. } else {
  59148. var E = n === 1 || a.lastFrameIndex > 0 ? T[0] : 0, $ = LV(f, E);
  59149. o && (P = d.getRawValue(E)), u.attr({
  59150. x: $[0] + O,
  59151. y: $[1] + S
  59152. });
  59153. }
  59154. if (o) {
  59155. var R = mp(u);
  59156. typeof R.setLabelText == "function" && R.setLabelText(P);
  59157. }
  59158. }
  59159. }, e.prototype._doUpdateAnimation = function(n, r, i, a, o, s, l) {
  59160. var u = this._polyline, c = this._polygon, f = n.hostModel, d = I3e(this._data, n, this._stackedOnPoints, r, this._coordSys, i, this._valueOrigin), h = d.current, p = d.stackedOnCurrent, v = d.next, g = d.stackedOnNext;
  59161. 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)), RV(h, v) > 3e3 || c && RV(p, g) > 3e3) {
  59162. u.stopAnimation(), u.setShape({
  59163. points: v
  59164. }), c && (c.stopAnimation(), c.setShape({
  59165. points: v,
  59166. stackedOnPoints: g
  59167. }));
  59168. return;
  59169. }
  59170. u.shape.__points = d.current, u.shape.points = h;
  59171. var m = {
  59172. shape: {
  59173. points: v
  59174. }
  59175. };
  59176. d.current !== h && (m.shape.__points = d.next), u.stopAnimation(), Ct(u, m, f), c && (c.setShape({
  59177. // Reuse the points with polyline.
  59178. points: h,
  59179. stackedOnPoints: p
  59180. }), c.stopAnimation(), Ct(c, {
  59181. shape: {
  59182. stackedOnPoints: g
  59183. }
  59184. }, f), u.shape.points !== c.shape.points && (c.shape.points = u.shape.points));
  59185. for (var y = [], b = d.status, _ = 0; _ < b.length; _++) {
  59186. var O = b[_].cmd;
  59187. if (O === "=") {
  59188. var S = n.getItemGraphicEl(b[_].idx1);
  59189. S && y.push({
  59190. el: S,
  59191. ptIdx: _
  59192. // Index of points
  59193. });
  59194. }
  59195. }
  59196. u.animators && u.animators.length && u.animators[0].during(function() {
  59197. c && c.dirtyShape();
  59198. for (var x = u.shape.__points, C = 0; C < y.length; C++) {
  59199. var T = y[C].el, w = y[C].ptIdx * 2;
  59200. T.x = x[w], T.y = x[w + 1], T.markRedraw();
  59201. }
  59202. });
  59203. }, e.prototype.remove = function(n) {
  59204. var r = this.group, i = this._data;
  59205. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) {
  59206. a.__temp && (r.remove(a), i.setItemGraphicEl(o, null));
  59207. }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
  59208. }, e.type = "line", e;
  59209. }(zt)
  59210. );
  59211. function X0(t, e) {
  59212. return {
  59213. seriesType: t,
  59214. plan: Op(),
  59215. reset: function(n) {
  59216. var r = n.getData(), i = n.coordinateSystem, a = n.pipelineContext, o = e || a.large;
  59217. if (i) {
  59218. var s = ce(i.dimensions, function(h) {
  59219. return r.mapDimension(h);
  59220. }).slice(0, 2), l = s.length, u = r.getCalculationInfo("stackResultDimension");
  59221. Xs(r, s[0]) && (s[0] = u), Xs(r, s[1]) && (s[1] = u);
  59222. var c = r.getStore(), f = r.getDimensionIndex(s[0]), d = r.getDimensionIndex(s[1]);
  59223. return l && {
  59224. progress: function(h, p) {
  59225. for (var v = h.end - h.start, g = o && Fo(v * l), m = [], y = [], b = h.start, _ = 0; b < h.end; b++) {
  59226. var O = void 0;
  59227. if (l === 1) {
  59228. var S = c.get(f, b);
  59229. O = i.dataToPoint(S, null, y);
  59230. } else
  59231. m[0] = c.get(f, b), m[1] = c.get(d, b), O = i.dataToPoint(m, null, y);
  59232. o ? (g[_++] = O[0], g[_++] = O[1]) : p.setItemLayout(b, O.slice());
  59233. }
  59234. o && p.setLayout("points", g);
  59235. }
  59236. };
  59237. }
  59238. }
  59239. };
  59240. }
  59241. var G3e = {
  59242. average: function(t) {
  59243. for (var e = 0, n = 0, r = 0; r < t.length; r++)
  59244. isNaN(t[r]) || (e += t[r], n++);
  59245. return n === 0 ? NaN : e / n;
  59246. },
  59247. sum: function(t) {
  59248. for (var e = 0, n = 0; n < t.length; n++)
  59249. e += t[n] || 0;
  59250. return e;
  59251. },
  59252. max: function(t) {
  59253. for (var e = -1 / 0, n = 0; n < t.length; n++)
  59254. t[n] > e && (e = t[n]);
  59255. return isFinite(e) ? e : NaN;
  59256. },
  59257. min: function(t) {
  59258. for (var e = 1 / 0, n = 0; n < t.length; n++)
  59259. t[n] < e && (e = t[n]);
  59260. return isFinite(e) ? e : NaN;
  59261. },
  59262. minmax: function(t) {
  59263. for (var e = -1 / 0, n = -1 / 0, r = 0; r < t.length; r++) {
  59264. var i = t[r], a = Math.abs(i);
  59265. a > e && (e = a, n = i);
  59266. }
  59267. return isFinite(n) ? n : NaN;
  59268. },
  59269. // TODO
  59270. // Median
  59271. nearest: function(t) {
  59272. return t[0];
  59273. }
  59274. }, j3e = function(t) {
  59275. return Math.round(t.length / 2);
  59276. };
  59277. function Hte(t) {
  59278. return {
  59279. seriesType: t,
  59280. // FIXME:TS never used, so comment it
  59281. // modifyOutputEnd: true,
  59282. reset: function(e, n, r) {
  59283. var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count();
  59284. if (s > 10 && o.type === "cartesian2d" && a) {
  59285. 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);
  59286. if (isFinite(h) && h > 1) {
  59287. a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(u.dim), 1 / h));
  59288. var p = void 0;
  59289. Oe(a) ? p = G3e[a] : Me(a) && (p = a), p && e.setData(i.downSample(i.mapDimension(u.dim), 1 / h, p, j3e));
  59290. }
  59291. }
  59292. }
  59293. };
  59294. }
  59295. function Z3e(t) {
  59296. t.registerChartView(H3e), t.registerSeriesModel($3e), t.registerLayout(X0("line", !0)), t.registerVisual({
  59297. seriesType: "line",
  59298. reset: function(e) {
  59299. var n = e.getData(), r = e.getModel("lineStyle").getLineStyle();
  59300. r && !r.stroke && (r.stroke = n.getVisual("style").fill), n.setVisual("legendLineStyle", r);
  59301. }
  59302. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Hte("line"));
  59303. }
  59304. var Rm = (
  59305. /** @class */
  59306. function(t) {
  59307. q(e, t);
  59308. function e() {
  59309. var n = t !== null && t.apply(this, arguments) || this;
  59310. return n.type = e.type, n;
  59311. }
  59312. return e.prototype.getInitialData = function(n, r) {
  59313. return us(null, this, {
  59314. useEncodeDefaulter: !0
  59315. });
  59316. }, e.prototype.getMarkerPosition = function(n, r, i) {
  59317. var a = this.coordinateSystem;
  59318. if (a && a.clampData) {
  59319. var o = a.clampData(n), s = a.dataToPoint(o);
  59320. if (i)
  59321. k(a.getAxes(), function(d, h) {
  59322. if (d.type === "category" && r != null) {
  59323. var p = d.getTicksCoords(), v = d.getTickModel().get("alignWithLabel"), g = o[h], m = r[h] === "x1" || r[h] === "y1";
  59324. if (m && !v && (g += 1), p.length < 2)
  59325. return;
  59326. if (p.length === 2) {
  59327. s[h] = d.toGlobalCoord(d.getExtent()[m ? 1 : 0]);
  59328. return;
  59329. }
  59330. for (var y = void 0, b = void 0, _ = 1, O = 0; O < p.length; O++) {
  59331. var S = p[O].coord, x = O === p.length - 1 ? p[O - 1].tickValue + _ : p[O].tickValue;
  59332. if (x === g) {
  59333. b = S;
  59334. break;
  59335. } else if (x < g)
  59336. y = S;
  59337. else if (y != null && x > g) {
  59338. b = (S + y) / 2;
  59339. break;
  59340. }
  59341. O === 1 && (_ = x - p[0].tickValue);
  59342. }
  59343. b == null && (y ? y && (b = p[p.length - 1].coord) : b = p[0].coord), s[h] = d.toGlobalCoord(b);
  59344. }
  59345. });
  59346. else {
  59347. var l = this.getData(), u = l.getLayout("offset"), c = l.getLayout("size"), f = a.getBaseAxis().isHorizontal() ? 0 : 1;
  59348. s[f] += u + c / 2;
  59349. }
  59350. return s;
  59351. }
  59352. return [NaN, NaN];
  59353. }, e.type = "series.__base_bar__", e.defaultOption = {
  59354. // zlevel: 0,
  59355. z: 2,
  59356. coordinateSystem: "cartesian2d",
  59357. legendHoverLink: !0,
  59358. // stack: null
  59359. // Cartesian coordinate system
  59360. // xAxisIndex: 0,
  59361. // yAxisIndex: 0,
  59362. barMinHeight: 0,
  59363. barMinAngle: 0,
  59364. // cursor: null,
  59365. large: !1,
  59366. largeThreshold: 400,
  59367. progressive: 3e3,
  59368. progressiveChunkMode: "mod"
  59369. }, e;
  59370. }(Ht)
  59371. );
  59372. Ht.registerClass(Rm);
  59373. var U3e = (
  59374. /** @class */
  59375. function(t) {
  59376. q(e, t);
  59377. function e() {
  59378. var n = t !== null && t.apply(this, arguments) || this;
  59379. return n.type = e.type, n;
  59380. }
  59381. return e.prototype.getInitialData = function() {
  59382. return us(null, this, {
  59383. useEncodeDefaulter: !0,
  59384. createInvertedIndices: !!this.get("realtimeSort", !0) || null
  59385. });
  59386. }, e.prototype.getProgressive = function() {
  59387. return this.get("large") ? this.get("progressive") : !1;
  59388. }, e.prototype.getProgressiveThreshold = function() {
  59389. var n = this.get("progressiveThreshold"), r = this.get("largeThreshold");
  59390. return r > n && (n = r), n;
  59391. }, e.prototype.brushSelector = function(n, r, i) {
  59392. return i.rect(r.getItemLayout(n));
  59393. }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Pu(Rm.defaultOption, {
  59394. // If clipped
  59395. // Only available on cartesian2d
  59396. clip: !0,
  59397. roundCap: !1,
  59398. showBackground: !1,
  59399. backgroundStyle: {
  59400. color: "rgba(180, 180, 180, 0.2)",
  59401. borderColor: null,
  59402. borderWidth: 0,
  59403. borderType: "solid",
  59404. borderRadius: 0,
  59405. shadowBlur: 0,
  59406. shadowColor: null,
  59407. shadowOffsetX: 0,
  59408. shadowOffsetY: 0,
  59409. opacity: 1
  59410. },
  59411. select: {
  59412. itemStyle: {
  59413. borderColor: "#212121"
  59414. }
  59415. },
  59416. realtimeSort: !1
  59417. }), e;
  59418. }(Rm)
  59419. ), X3e = (
  59420. /** @class */
  59421. /* @__PURE__ */ function() {
  59422. function t() {
  59423. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  59424. }
  59425. return t;
  59426. }()
  59427. ), AO = (
  59428. /** @class */
  59429. function(t) {
  59430. q(e, t);
  59431. function e(n) {
  59432. var r = t.call(this, n) || this;
  59433. return r.type = "sausage", r;
  59434. }
  59435. return e.prototype.getDefaultShape = function() {
  59436. return new X3e();
  59437. }, e.prototype.buildPath = function(n, r) {
  59438. 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;
  59439. p || (c = f - (d ? h : -h));
  59440. var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f);
  59441. 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);
  59442. }, e;
  59443. }(ot)
  59444. );
  59445. function Y3e(t, e) {
  59446. e = e || {};
  59447. var n = e.isRoundCap;
  59448. return function(r, i, a) {
  59449. var o = i.position;
  59450. if (!o || o instanceof Array)
  59451. return rO(r, i, a);
  59452. 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";
  59453. switch (s) {
  59454. case "startArc":
  59455. O = c + (h - l) * b(m), S = f + (h - l) * _(m), x = "center", C = "top";
  59456. break;
  59457. case "insideStartArc":
  59458. O = c + (h + l) * b(m), S = f + (h + l) * _(m), x = "center", C = "bottom";
  59459. break;
  59460. case "startAngle":
  59461. O = c + p * b(v) + _b(v, l + y, !1), S = f + p * _(v) + Ob(v, l + y, !1), x = "right", C = "middle";
  59462. break;
  59463. case "insideStartAngle":
  59464. O = c + p * b(v) + _b(v, -l + y, !1), S = f + p * _(v) + Ob(v, -l + y, !1), x = "left", C = "middle";
  59465. break;
  59466. case "middle":
  59467. O = c + p * b(m), S = f + p * _(m), x = "center", C = "middle";
  59468. break;
  59469. case "endArc":
  59470. O = c + (d + l) * b(m), S = f + (d + l) * _(m), x = "center", C = "bottom";
  59471. break;
  59472. case "insideEndArc":
  59473. O = c + (d - l) * b(m), S = f + (d - l) * _(m), x = "center", C = "top";
  59474. break;
  59475. case "endAngle":
  59476. O = c + p * b(g) + _b(g, l + y, !0), S = f + p * _(g) + Ob(g, l + y, !0), x = "left", C = "middle";
  59477. break;
  59478. case "insideEndAngle":
  59479. O = c + p * b(g) + _b(g, -l + y, !0), S = f + p * _(g) + Ob(g, -l + y, !0), x = "right", C = "middle";
  59480. break;
  59481. default:
  59482. return rO(r, i, a);
  59483. }
  59484. return r = r || {}, r.x = O, r.y = S, r.align = x, r.verticalAlign = C, r;
  59485. };
  59486. }
  59487. function q3e(t, e, n, r) {
  59488. if (St(r)) {
  59489. t.setTextConfig({
  59490. rotation: r
  59491. });
  59492. return;
  59493. } else if (ue(e)) {
  59494. t.setTextConfig({
  59495. rotation: 0
  59496. });
  59497. return;
  59498. }
  59499. 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);
  59500. switch (u) {
  59501. case "startArc":
  59502. case "insideStartArc":
  59503. case "middle":
  59504. case "insideEndArc":
  59505. case "endArc":
  59506. l = s;
  59507. break;
  59508. case "startAngle":
  59509. case "insideStartAngle":
  59510. l = a;
  59511. break;
  59512. case "endAngle":
  59513. case "insideEndAngle":
  59514. l = o;
  59515. break;
  59516. default:
  59517. t.setTextConfig({
  59518. rotation: 0
  59519. });
  59520. return;
  59521. }
  59522. var c = Math.PI * 1.5 - l;
  59523. u === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), t.setTextConfig({
  59524. rotation: c
  59525. });
  59526. }
  59527. function _b(t, e, n) {
  59528. return e * Math.sin(t) * (n ? -1 : 1);
  59529. }
  59530. function Ob(t, e, n) {
  59531. return e * Math.cos(t) * (n ? 1 : -1);
  59532. }
  59533. function Fc(t, e, n) {
  59534. var r = t.get("borderRadius");
  59535. if (r == null)
  59536. return n ? {
  59537. cornerRadius: 0
  59538. } : null;
  59539. ue(r) || (r = [r, r, r, r]);
  59540. var i = Math.abs(e.r || 0 - e.r0 || 0);
  59541. return {
  59542. cornerRadius: ce(r, function(a) {
  59543. return oo(a, i);
  59544. })
  59545. };
  59546. }
  59547. var rP = Math.max, iP = Math.min;
  59548. function K3e(t, e) {
  59549. var n = t.getArea && t.getArea();
  59550. if (Ff(t, "cartesian2d")) {
  59551. var r = t.getBaseAxis();
  59552. if (r.type !== "category" || !r.onBand) {
  59553. var i = e.getLayout("bandWidth");
  59554. r.isHorizontal() ? (n.x -= i, n.width += i * 2) : (n.y -= i, n.height += i * 2);
  59555. }
  59556. }
  59557. return n;
  59558. }
  59559. var J3e = (
  59560. /** @class */
  59561. function(t) {
  59562. q(e, t);
  59563. function e() {
  59564. var n = t.call(this) || this;
  59565. return n.type = e.type, n._isFirstFrame = !0, n;
  59566. }
  59567. return e.prototype.render = function(n, r, i, a) {
  59568. this._model = n, this._removeOnRenderedListener(i), this._updateDrawMode(n);
  59569. var o = n.get("coordinateSystem");
  59570. 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.");
  59571. }, e.prototype.incrementalPrepareRender = function(n) {
  59572. this._clear(), this._updateDrawMode(n), this._updateLargeClip(n);
  59573. }, e.prototype.incrementalRender = function(n, r) {
  59574. this._progressiveEls = [], this._incrementalRenderLarge(n, r);
  59575. }, e.prototype.eachRendered = function(n) {
  59576. Tu(this._progressiveEls || this.group, n);
  59577. }, e.prototype._updateDrawMode = function(n) {
  59578. var r = n.pipelineContext.large;
  59579. (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
  59580. }, e.prototype._renderNormal = function(n, r, i, a) {
  59581. var o = this.group, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.getBaseAxis(), f;
  59582. u.type === "cartesian2d" ? f = c.isHorizontal() : u.type === "polar" && (f = c.dim === "angle");
  59583. var d = n.isAnimationEnabled() ? n : null, h = e6e(n, u);
  59584. h && this._enableRealtimeSort(h, s, i);
  59585. var p = n.get("clip", !0) || h, v = K3e(u, s);
  59586. o.removeClipPath();
  59587. 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";
  59588. function C(P) {
  59589. var $ = Sb[u.type](s, P), A = s6e(u, f, $);
  59590. return A.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? A.setShape("r", b) : A.setShape("cornerRadius", b), _[P] = A, A;
  59591. }
  59592. s.diff(l).add(function(P) {
  59593. var $ = s.getItemModel(P), A = Sb[u.type](s, P, $);
  59594. if (m && C(P), !(!s.hasValue(P) || !FV[u.type](A))) {
  59595. var D = !1;
  59596. p && (D = NV[u.type](v, A));
  59597. var E = BV[u.type](n, s, P, A, f, d, c.model, !1, g);
  59598. h && (E.forceLabelAnimation = !0), WV(E, s, P, $, A, n, f, u.type === "polar"), S ? E.attr({
  59599. shape: A
  59600. }) : h ? zV(h, d, E, A, P, f, !1, !1) : Yt(E, {
  59601. shape: A
  59602. }, n, P), s.setItemGraphicEl(P, E), o.add(E), E.ignore = D;
  59603. }
  59604. }).update(function(P, $) {
  59605. var A = s.getItemModel(P), D = Sb[u.type](s, P, A);
  59606. if (m) {
  59607. var E = void 0;
  59608. O.length === 0 ? E = C($) : (E = O[$], E.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? E.setShape("r", b) : E.setShape("cornerRadius", b), _[P] = E);
  59609. var R = Sb[u.type](s, P), N = jte(f, R, u);
  59610. Ct(E, {
  59611. shape: N
  59612. }, d, P);
  59613. }
  59614. var V = l.getItemGraphicEl($);
  59615. if (!s.hasValue(P) || !FV[u.type](D)) {
  59616. o.remove(V);
  59617. return;
  59618. }
  59619. var z = !1;
  59620. if (p && (z = NV[u.type](v, D), z && o.remove(V)), V ? so(V) : V = BV[u.type](n, s, P, D, f, d, c.model, !!V, g), h && (V.forceLabelAnimation = !0), x) {
  59621. var W = V.getTextContent();
  59622. if (W) {
  59623. var F = mp(W);
  59624. F.prevValue != null && (F.prevValue = F.value);
  59625. }
  59626. } else
  59627. WV(V, s, P, A, D, n, f, u.type === "polar");
  59628. S ? V.attr({
  59629. shape: D
  59630. }) : h ? zV(h, d, V, D, P, f, !0, x) : Ct(V, {
  59631. shape: D
  59632. }, n, P, null), s.setItemGraphicEl(P, V), V.ignore = z, o.add(V);
  59633. }).remove(function(P) {
  59634. var $ = l.getItemGraphicEl(P);
  59635. $ && wm($, n, P);
  59636. }).execute();
  59637. var T = this._backgroundGroup || (this._backgroundGroup = new Ve());
  59638. T.removeAll();
  59639. for (var w = 0; w < _.length; ++w)
  59640. T.add(_[w]);
  59641. o.add(T), this._backgroundEls = _, this._data = s;
  59642. }, e.prototype._renderLarge = function(n, r, i) {
  59643. this._clear(), HV(n, this.group), this._updateLargeClip(n);
  59644. }, e.prototype._incrementalRenderLarge = function(n, r) {
  59645. this._removeBackground(), HV(r, this.group, this._progressiveEls, !0);
  59646. }, e.prototype._updateLargeClip = function(n) {
  59647. var r = n.get("clip", !0) && U0(n.coordinateSystem, !1, n), i = this.group;
  59648. r ? i.setClipPath(r) : i.removeClipPath();
  59649. }, e.prototype._enableRealtimeSort = function(n, r, i) {
  59650. var a = this;
  59651. if (r.count()) {
  59652. var o = n.baseAxis;
  59653. if (this._isFirstFrame)
  59654. this._dispatchInitSort(r, n, i), this._isFirstFrame = !1;
  59655. else {
  59656. var s = function(l) {
  59657. var u = r.getItemGraphicEl(l), c = u && u.shape;
  59658. return c && // The result should be consistent with the initial sort by data value.
  59659. // Do not support the case that both positive and negative exist.
  59660. Math.abs(o.isHorizontal() ? c.height : c.width) || 0;
  59661. };
  59662. this._onRendered = function() {
  59663. a._updateSortWithinSameData(r, s, o, i);
  59664. }, i.getZr().on("rendered", this._onRendered);
  59665. }
  59666. }
  59667. }, e.prototype._dataSort = function(n, r, i) {
  59668. var a = [];
  59669. return n.each(n.mapDimension(r.dim), function(o, s) {
  59670. var l = i(s);
  59671. l = l ?? NaN, a.push({
  59672. dataIndex: s,
  59673. mappedValue: l,
  59674. ordinalNumber: o
  59675. });
  59676. }), a.sort(function(o, s) {
  59677. return s.mappedValue - o.mappedValue;
  59678. }), {
  59679. ordinalNumbers: ce(a, function(o) {
  59680. return o.ordinalNumber;
  59681. })
  59682. };
  59683. }, e.prototype._isOrderChangedWithinSameData = function(n, r, i) {
  59684. for (var a = i.scale, o = n.mapDimension(i.dim), s = Number.MAX_VALUE, l = 0, u = a.getOrdinalMeta().categories.length; l < u; ++l) {
  59685. var c = n.rawIndexOf(o, a.getRawOrdinalNumber(l)), f = c < 0 ? Number.MIN_VALUE : r(n.indexOfRawIndex(c));
  59686. if (f > s)
  59687. return !0;
  59688. s = f;
  59689. }
  59690. return !1;
  59691. }, e.prototype._isOrderDifferentInView = function(n, r) {
  59692. 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)
  59693. if (n.ordinalNumbers[o] !== i.getRawOrdinalNumber(o))
  59694. return !0;
  59695. }, e.prototype._updateSortWithinSameData = function(n, r, i, a) {
  59696. if (this._isOrderChangedWithinSameData(n, r, i)) {
  59697. var o = this._dataSort(n, i, r);
  59698. this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({
  59699. type: "changeAxisOrder",
  59700. componentType: i.dim + "Axis",
  59701. axisId: i.index,
  59702. sortInfo: o
  59703. }));
  59704. }
  59705. }, e.prototype._dispatchInitSort = function(n, r, i) {
  59706. var a = r.baseAxis, o = this._dataSort(n, a, function(s) {
  59707. return n.get(n.mapDimension(r.otherAxis.dim), s);
  59708. });
  59709. i.dispatchAction({
  59710. type: "changeAxisOrder",
  59711. componentType: a.dim + "Axis",
  59712. isInitSort: !0,
  59713. axisId: a.index,
  59714. sortInfo: o
  59715. });
  59716. }, e.prototype.remove = function(n, r) {
  59717. this._clear(this._model), this._removeOnRenderedListener(r);
  59718. }, e.prototype.dispose = function(n, r) {
  59719. this._removeOnRenderedListener(r);
  59720. }, e.prototype._removeOnRenderedListener = function(n) {
  59721. this._onRendered && (n.getZr().off("rendered", this._onRendered), this._onRendered = null);
  59722. }, e.prototype._clear = function(n) {
  59723. var r = this.group, i = this._data;
  59724. n && n.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) {
  59725. wm(a, n, Fe(a).dataIndex);
  59726. })) : r.removeAll(), this._data = null, this._isFirstFrame = !0;
  59727. }, e.prototype._removeBackground = function() {
  59728. this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
  59729. }, e.type = "bar", e;
  59730. }(zt)
  59731. ), NV = {
  59732. cartesian2d: function(t, e) {
  59733. var n = e.width < 0 ? -1 : 1, r = e.height < 0 ? -1 : 1;
  59734. n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height);
  59735. var i = t.x + t.width, a = t.y + t.height, o = rP(e.x, t.x), s = iP(e.x + e.width, i), l = rP(e.y, t.y), u = iP(e.y + e.height, a), c = s < o, f = u < l;
  59736. 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;
  59737. },
  59738. polar: function(t, e) {
  59739. var n = e.r0 <= e.r ? 1 : -1;
  59740. if (n < 0) {
  59741. var r = e.r;
  59742. e.r = e.r0, e.r0 = r;
  59743. }
  59744. var i = iP(e.r, t.r), a = rP(e.r0, t.r0);
  59745. e.r = i, e.r0 = a;
  59746. var o = i - a < 0;
  59747. if (n < 0) {
  59748. var r = e.r;
  59749. e.r = e.r0, e.r0 = r;
  59750. }
  59751. return o;
  59752. }
  59753. }, BV = {
  59754. cartesian2d: function(t, e, n, r, i, a, o, s, l) {
  59755. var u = new mt({
  59756. shape: le({}, r),
  59757. z2: 1
  59758. });
  59759. if (u.__dataIndex = n, u.name = "item", a) {
  59760. var c = u.shape, f = i ? "height" : "width";
  59761. c[f] = 0;
  59762. }
  59763. return u;
  59764. },
  59765. polar: function(t, e, n, r, i, a, o, s, l) {
  59766. var u = !i && l ? AO : ri, c = new u({
  59767. shape: r,
  59768. z2: 1
  59769. });
  59770. c.name = "item";
  59771. var f = Gte(i);
  59772. if (c.calculateTextPosition = Y3e(f, {
  59773. isRoundCap: u === AO
  59774. }), a) {
  59775. var d = c.shape, h = i ? "r" : "endAngle", p = {};
  59776. d[h] = i ? r.r0 : r.startAngle, p[h] = r[h], (s ? Ct : Yt)(c, {
  59777. shape: p
  59778. // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
  59779. }, a);
  59780. }
  59781. return c;
  59782. }
  59783. };
  59784. function e6e(t, e) {
  59785. var n = t.get("realtimeSort", !0), r = e.getBaseAxis();
  59786. 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")
  59787. return {
  59788. baseAxis: r,
  59789. otherAxis: e.getOtherAxis(r)
  59790. };
  59791. }
  59792. function zV(t, e, n, r, i, a, o, s) {
  59793. var l, u;
  59794. a ? (u = {
  59795. x: r.x,
  59796. width: r.width
  59797. }, l = {
  59798. y: r.y,
  59799. height: r.height
  59800. }) : (u = {
  59801. y: r.y,
  59802. height: r.height
  59803. }, l = {
  59804. x: r.x,
  59805. width: r.width
  59806. }), s || (o ? Ct : Yt)(n, {
  59807. shape: l
  59808. }, e, i, null);
  59809. var c = e ? t.baseAxis.model : null;
  59810. (o ? Ct : Yt)(n, {
  59811. shape: u
  59812. }, c, i);
  59813. }
  59814. function VV(t, e) {
  59815. for (var n = 0; n < e.length; n++)
  59816. if (!isFinite(t[e[n]]))
  59817. return !0;
  59818. return !1;
  59819. }
  59820. var t6e = ["x", "y", "width", "height"], n6e = ["cx", "cy", "r", "startAngle", "endAngle"], FV = {
  59821. cartesian2d: function(t) {
  59822. return !VV(t, t6e);
  59823. },
  59824. polar: function(t) {
  59825. return !VV(t, n6e);
  59826. }
  59827. }, Sb = {
  59828. // itemModel is only used to get borderWidth, which is not needed
  59829. // when calculating bar background layout.
  59830. cartesian2d: function(t, e, n) {
  59831. var r = t.getItemLayout(e), i = n ? i6e(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
  59832. return {
  59833. x: r.x + a * i / 2,
  59834. y: r.y + o * i / 2,
  59835. width: r.width - a * i,
  59836. height: r.height - o * i
  59837. };
  59838. },
  59839. polar: function(t, e, n) {
  59840. var r = t.getItemLayout(e);
  59841. return {
  59842. cx: r.cx,
  59843. cy: r.cy,
  59844. r0: r.r0,
  59845. r: r.r,
  59846. startAngle: r.startAngle,
  59847. endAngle: r.endAngle,
  59848. clockwise: r.clockwise
  59849. };
  59850. }
  59851. };
  59852. function r6e(t) {
  59853. return t.startAngle != null && t.endAngle != null && t.startAngle === t.endAngle;
  59854. }
  59855. function Gte(t) {
  59856. return /* @__PURE__ */ function(e) {
  59857. var n = e ? "Arc" : "Angle";
  59858. return function(r) {
  59859. switch (r) {
  59860. case "start":
  59861. case "insideStart":
  59862. case "end":
  59863. case "insideEnd":
  59864. return r + n;
  59865. default:
  59866. return r;
  59867. }
  59868. };
  59869. }(t);
  59870. }
  59871. function WV(t, e, n, r, i, a, o, s) {
  59872. var l = e.getItemVisual(n, "style");
  59873. if (s) {
  59874. if (!a.get("roundCap")) {
  59875. var c = t.shape, f = Fc(r.getModel("itemStyle"), c, !0);
  59876. le(c, f), t.setShape(c);
  59877. }
  59878. } else {
  59879. var u = r.get(["itemStyle", "borderRadius"]) || 0;
  59880. t.setShape("r", u);
  59881. }
  59882. t.useStyle(l);
  59883. var d = r.getShallow("cursor");
  59884. d && t.attr("cursor", d);
  59885. 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);
  59886. Pr(t, p, {
  59887. labelFetcher: a,
  59888. labelDataIndex: n,
  59889. defaultText: Wh(a.getData(), n),
  59890. inheritColor: l.fill,
  59891. defaultOpacity: l.opacity,
  59892. defaultOutsidePosition: h
  59893. });
  59894. var v = t.getTextContent();
  59895. if (s && v) {
  59896. var g = r.get(["label", "position"]);
  59897. t.textConfig.inside = g === "middle" ? !0 : null, q3e(t, g === "outside" ? h : g, Gte(o), r.get(["label", "rotate"]));
  59898. }
  59899. dJ(v, p, a.getRawValue(n), function(y) {
  59900. return Lte(e, y);
  59901. });
  59902. var m = r.getModel(["emphasis"]);
  59903. bn(t, m.get("focus"), m.get("blurScope"), m.get("disabled")), Tr(t, r), r6e(i) && (t.style.fill = "none", t.style.stroke = "none", k(t.states, function(y) {
  59904. y.style && (y.style.fill = y.style.stroke = "none");
  59905. }));
  59906. }
  59907. function i6e(t, e) {
  59908. var n = t.get(["itemStyle", "borderColor"]);
  59909. if (!n || n === "none")
  59910. return 0;
  59911. 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);
  59912. return Math.min(r, i, a);
  59913. }
  59914. var a6e = (
  59915. /** @class */
  59916. /* @__PURE__ */ function() {
  59917. function t() {
  59918. }
  59919. return t;
  59920. }()
  59921. ), QV = (
  59922. /** @class */
  59923. function(t) {
  59924. q(e, t);
  59925. function e(n) {
  59926. var r = t.call(this, n) || this;
  59927. return r.type = "largeBar", r;
  59928. }
  59929. return e.prototype.getDefaultShape = function() {
  59930. return new a6e();
  59931. }, e.prototype.buildPath = function(n, r) {
  59932. for (var i = r.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, c = 0; c < i.length; c += 3)
  59933. 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]);
  59934. }, e;
  59935. }(ot)
  59936. );
  59937. function HV(t, e, n, r) {
  59938. 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");
  59939. if (u) {
  59940. var c = new QV({
  59941. shape: {
  59942. points: u
  59943. },
  59944. incremental: !!r,
  59945. silent: !0,
  59946. z2: 0
  59947. });
  59948. c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(l.getItemStyle()), e.add(c), n && n.push(c);
  59949. }
  59950. var f = new QV({
  59951. shape: {
  59952. points: i.getLayout("largePoints")
  59953. },
  59954. incremental: !!r,
  59955. ignoreCoarsePointer: !0,
  59956. z2: 1
  59957. });
  59958. 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", GV), f.on("mousemove", GV)), n && n.push(f);
  59959. }
  59960. var GV = uw(function(t) {
  59961. var e = this, n = o6e(e, t.offsetX, t.offsetY);
  59962. Fe(e).dataIndex = n >= 0 ? n : null;
  59963. }, 30, !1);
  59964. function o6e(t, e, n) {
  59965. 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++) {
  59966. var d = c * 3;
  59967. 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])
  59968. return o[c];
  59969. }
  59970. return -1;
  59971. }
  59972. function jte(t, e, n) {
  59973. if (Ff(n, "cartesian2d")) {
  59974. var r = e, i = n.getArea();
  59975. return {
  59976. x: t ? r.x : i.x,
  59977. y: t ? i.y : r.y,
  59978. width: t ? r.width : i.width,
  59979. height: t ? i.height : r.height
  59980. };
  59981. } else {
  59982. var i = n.getArea(), a = e;
  59983. return {
  59984. cx: i.cx,
  59985. cy: i.cy,
  59986. r0: t ? i.r0 : a.r0,
  59987. r: t ? i.r : a.r,
  59988. startAngle: t ? a.startAngle : 0,
  59989. endAngle: t ? a.endAngle : Math.PI * 2
  59990. };
  59991. }
  59992. }
  59993. function s6e(t, e, n) {
  59994. var r = t.type === "polar" ? ri : mt;
  59995. return new r({
  59996. shape: jte(e, n, t),
  59997. silent: !0,
  59998. z2: 0
  59999. });
  60000. }
  60001. function l6e(t) {
  60002. t.registerChartView(J3e), t.registerSeriesModel(U3e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(qee, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Kee("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Hte("bar")), t.registerAction({
  60003. type: "changeAxisOrder",
  60004. event: "changeAxisOrder",
  60005. update: "update"
  60006. }, function(e, n) {
  60007. var r = e.componentType || "series";
  60008. n.eachComponent({
  60009. mainType: r,
  60010. query: e
  60011. }, function(i) {
  60012. e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo);
  60013. });
  60014. });
  60015. }
  60016. var jV = Math.PI * 2, xb = Math.PI / 180;
  60017. function Zte(t, e) {
  60018. return Rn(t.getBoxLayoutParams(), {
  60019. width: e.getWidth(),
  60020. height: e.getHeight()
  60021. });
  60022. }
  60023. function Ute(t, e) {
  60024. var n = Zte(t, e), r = t.get("center"), i = t.get("radius");
  60025. ue(i) || (i = [0, i]);
  60026. 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;
  60027. if (d) {
  60028. var h = d.dataToPoint(r);
  60029. c = h[0] || 0, f = h[1] || 0;
  60030. } else
  60031. ue(r) || (r = [r, r]), c = _e(r[0], a) + n.x, f = _e(r[1], o) + n.y;
  60032. return {
  60033. cx: c,
  60034. cy: f,
  60035. r0: l,
  60036. r: u
  60037. };
  60038. }
  60039. function u6e(t, e, n) {
  60040. e.eachSeriesByType(t, function(r) {
  60041. var i = r.getData(), a = i.mapDimension("value"), o = Zte(r, n), s = Ute(r, n), l = s.cx, u = s.cy, c = s.r, f = s.r0, d = -r.get("startAngle") * xb, h = r.get("endAngle"), p = r.get("padAngle") * xb;
  60042. h = h === "auto" ? d - jV : -h * xb;
  60043. var v = r.get("minAngle") * xb, g = v + p, m = 0;
  60044. i.each(a, function(N) {
  60045. !isNaN(N) && m++;
  60046. });
  60047. 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);
  60048. x[0] = 0;
  60049. var C = _ ? 1 : -1, T = [d, h], w = C * p / 2;
  60050. DR(T, !_), d = T[0], h = T[1];
  60051. var P = Xte(r);
  60052. P.startAngle = d, P.endAngle = h, P.clockwise = _;
  60053. var $ = Math.abs(h - d), A = $, D = 0, E = d;
  60054. if (i.setLayout({
  60055. viewRect: o,
  60056. r: c
  60057. }), i.each(a, function(N, V) {
  60058. var z;
  60059. if (isNaN(N)) {
  60060. i.setItemLayout(V, {
  60061. angle: NaN,
  60062. startAngle: NaN,
  60063. endAngle: NaN,
  60064. clockwise: _,
  60065. cx: l,
  60066. cy: u,
  60067. r0: f,
  60068. r: O ? NaN : c
  60069. });
  60070. return;
  60071. }
  60072. O !== "area" ? z = y === 0 && S ? b : N * b : z = $ / m, z < g ? (z = g, A -= g) : D += N;
  60073. var W = E + C * z, F = 0, Q = 0;
  60074. p > z ? (F = E + C * z / 2, Q = F) : (F = E + w, Q = W - w), i.setItemLayout(V, {
  60075. angle: z,
  60076. startAngle: F,
  60077. endAngle: Q,
  60078. clockwise: _,
  60079. cx: l,
  60080. cy: u,
  60081. r0: f,
  60082. r: O ? Lt(N, x, [f, c]) : c
  60083. }), E = W;
  60084. }), A < jV && m)
  60085. if (A <= 1e-3) {
  60086. var R = $ / m;
  60087. i.each(a, function(N, V) {
  60088. if (!isNaN(N)) {
  60089. var z = i.getItemLayout(V);
  60090. z.angle = R;
  60091. var W = 0, F = 0;
  60092. R < p ? (W = d + C * (V + 1 / 2) * R, F = W) : (W = d + C * V * R + w, F = d + C * (V + 1) * R - w), z.startAngle = W, z.endAngle = F;
  60093. }
  60094. });
  60095. } else
  60096. b = A / D, E = d, i.each(a, function(N, V) {
  60097. if (!isNaN(N)) {
  60098. var z = i.getItemLayout(V), W = z.angle === g ? g : N * b, F = 0, Q = 0;
  60099. W < p ? (F = E + C * W / 2, Q = F) : (F = E + w, Q = E + C * W - w), z.startAngle = F, z.endAngle = Q, E += C * W;
  60100. }
  60101. });
  60102. });
  60103. }
  60104. var Xte = bt();
  60105. function Y0(t) {
  60106. return {
  60107. seriesType: t,
  60108. reset: function(e, n) {
  60109. var r = n.findComponents({
  60110. mainType: "legend"
  60111. });
  60112. if (!(!r || !r.length)) {
  60113. var i = e.getData();
  60114. i.filterSelf(function(a) {
  60115. for (var o = i.getName(a), s = 0; s < r.length; s++)
  60116. if (!r[s].isSelected(o))
  60117. return !1;
  60118. return !0;
  60119. });
  60120. }
  60121. }
  60122. };
  60123. }
  60124. var c6e = Math.PI / 180;
  60125. function ZV(t, e, n, r, i, a, o, s, l, u) {
  60126. if (t.length < 2)
  60127. return;
  60128. function c(v) {
  60129. for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) {
  60130. 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;
  60131. Yte(b, w, !0), b.label.x = C;
  60132. }
  60133. }
  60134. function f(v) {
  60135. for (var g = {
  60136. list: [],
  60137. maxY: 0
  60138. }, m = {
  60139. list: [],
  60140. maxY: 0
  60141. }, y = 0; y < v.length; y++)
  60142. if (v[y].labelAlignTo === "none") {
  60143. var b = v[y], _ = b.label.y > n ? m : g, O = Math.abs(b.label.y - n);
  60144. if (O >= _.maxY) {
  60145. 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;
  60146. _.rB = C, _.maxY = O;
  60147. }
  60148. _.list.push(b);
  60149. }
  60150. c(g), c(m);
  60151. }
  60152. for (var d = t.length, h = 0; h < d; h++)
  60153. if (t[h].position === "outer" && t[h].labelAlignTo === "labelLine") {
  60154. var p = t[h].label.x - u;
  60155. t[h].linePoints[1][0] += p, t[h].label.x = u;
  60156. }
  60157. bte(t, l, l + o) && f(t);
  60158. }
  60159. function f6e(t, e, n, r, i, a, o, s) {
  60160. for (var l = [], u = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, d = 0; d < t.length; d++) {
  60161. var h = t[d].label;
  60162. aP(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])));
  60163. }
  60164. for (var d = 0; d < t.length; d++) {
  60165. var p = t[d];
  60166. if (!aP(p) && p.linePoints) {
  60167. if (p.labelStyleWidth != null)
  60168. continue;
  60169. var h = p.label, v = p.linePoints, g = void 0;
  60170. 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, Yte(p, g);
  60171. }
  60172. }
  60173. ZV(u, e, n, r, 1, i, a, o, s, f), ZV(l, e, n, r, -1, i, a, o, s, c);
  60174. for (var d = 0; d < t.length; d++) {
  60175. var p = t[d];
  60176. if (!aP(p) && p.linePoints) {
  60177. 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];
  60178. 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;
  60179. }
  60180. }
  60181. }
  60182. function Yte(t, e, n) {
  60183. if (n === void 0 && (n = !1), t.labelStyleWidth == null) {
  60184. 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);
  60185. if (e < c || n) {
  60186. var f = a.height;
  60187. if (u && u.match("break")) {
  60188. r.setStyle("backgroundColor", null), r.setStyle("width", e - l);
  60189. var d = r.getBoundingRect();
  60190. r.setStyle("width", Math.ceil(d.width)), r.setStyle("backgroundColor", o);
  60191. } else {
  60192. var h = e - l, p = e < c ? h : (
  60193. // Current available width is enough, but the text may have
  60194. // already been wrapped with a smaller available width.
  60195. n ? h > t.unconstrainedWidth ? null : h : null
  60196. );
  60197. r.setStyle("width", p);
  60198. }
  60199. var v = r.getBoundingRect();
  60200. a.width = v.width;
  60201. var g = (r.style.margin || 0) + 2.1;
  60202. a.height = v.height + g, a.y -= (a.height - f) / 2;
  60203. }
  60204. }
  60205. }
  60206. function aP(t) {
  60207. return t.position === "center";
  60208. }
  60209. function d6e(t) {
  60210. var e = t.getData(), n = [], r, i, a = !1, o = (t.get("minShowLabelAngle") || 0) * c6e, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, c = s.x, f = s.y, d = s.height;
  60211. function h(S) {
  60212. S.ignore = !0;
  60213. }
  60214. function p(S) {
  60215. if (!S.ignore)
  60216. return !0;
  60217. for (var x in S.states)
  60218. if (S.states[x].ignore === !1)
  60219. return !0;
  60220. return !1;
  60221. }
  60222. e.each(function(S) {
  60223. 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"), z = V.get("length");
  60224. z = _e(z, u);
  60225. var W = V.get("length2");
  60226. if (W = _e(W, u), Math.abs(C.endAngle - C.startAngle) < o) {
  60227. k(T.states, h), T.ignore = !0, w && (k(w.states, h), w.ignore = !0);
  60228. return;
  60229. }
  60230. if (p(T)) {
  60231. var F = (C.startAngle + C.endAngle) / 2, Q = Math.cos(F), Z = Math.sin(F), ne, ee, oe, K;
  60232. r = C.cx, i = C.cy;
  60233. var ie = A === "inside" || A === "inner";
  60234. if (A === "center")
  60235. ne = C.cx, ee = C.cy, K = "center";
  60236. else {
  60237. 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;
  60238. if (ne = X + Q * 3, ee = H + Z * 3, !ie) {
  60239. var G = X + Q * (z + l - C.r), re = H + Z * (z + l - C.r), fe = G + (Q < 0 ? -1 : 1) * W, de = re;
  60240. 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]];
  60241. }
  60242. K = ie ? "center" : E === "edge" ? Q > 0 ? "right" : "left" : Q > 0 ? "left" : "right";
  60243. }
  60244. var Ee = Math.PI, $e = 0, Se = $.get("rotate");
  60245. if (St(Se))
  60246. $e = Se * (Ee / 180);
  60247. else if (A === "center")
  60248. $e = 0;
  60249. else if (Se === "radial" || Se === !0) {
  60250. var be = Q < 0 ? -F + Ee : -F;
  60251. $e = be;
  60252. } else if (Se === "tangential" && A !== "outside" && A !== "outer") {
  60253. var he = Math.atan2(Q, Z);
  60254. he < 0 && (he = Ee * 2 + he);
  60255. var Te = Z > 0;
  60256. Te && (he = Ee + he), $e = he - Ee;
  60257. }
  60258. if (a = !!$e, T.x = ne, T.y = ee, T.rotation = $e, T.setStyle({
  60259. verticalAlign: "middle"
  60260. }), ie) {
  60261. T.setStyle({
  60262. align: K
  60263. });
  60264. var ct = T.states.select;
  60265. ct && (ct.x += T.x, ct.y += T.y);
  60266. } else {
  60267. var ze = T.getBoundingRect().clone();
  60268. ze.applyTransform(T.getComputedTransform());
  60269. var ut = (T.style.margin || 0) + 2.1;
  60270. ze.y -= ut / 2, ze.height += ut, n.push({
  60271. label: T,
  60272. labelLine: w,
  60273. position: A,
  60274. len: z,
  60275. len2: W,
  60276. minTurnAngle: V.get("minTurnAngle"),
  60277. maxSurfaceAngle: V.get("maxSurfaceAngle"),
  60278. surfaceNormal: new Ke(Q, Z),
  60279. linePoints: oe,
  60280. textAlign: K,
  60281. labelDistance: D,
  60282. labelAlignTo: E,
  60283. edgeDistance: R,
  60284. bleedMargin: N,
  60285. rect: ze,
  60286. unconstrainedWidth: ze.width,
  60287. labelStyleWidth: T.style.width
  60288. });
  60289. }
  60290. x.setTextConfig({
  60291. inside: ie
  60292. });
  60293. }
  60294. }), !a && t.get("avoidLabelOverlap") && f6e(n, r, i, l, u, d, c, f);
  60295. for (var v = 0; v < n.length; v++) {
  60296. var g = n[v], m = g.label, y = g.labelLine, b = isNaN(m.x) || isNaN(m.y);
  60297. if (m) {
  60298. m.setStyle({
  60299. align: g.textAlign
  60300. }), b && (k(m.states, h), m.ignore = !0);
  60301. var _ = m.states.select;
  60302. _ && (_.x += m.x, _.y += m.y);
  60303. }
  60304. if (y) {
  60305. var O = g.linePoints;
  60306. b || !O ? (k(y.states, h), y.ignore = !0) : (gte(O, g.minTurnAngle), k5e(O, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({
  60307. points: O
  60308. }), m.__hostTarget.textGuideLineConfig = {
  60309. anchor: new Ke(O[0][0], O[0][1])
  60310. });
  60311. }
  60312. }
  60313. }
  60314. var h6e = (
  60315. /** @class */
  60316. function(t) {
  60317. q(e, t);
  60318. function e(n, r, i) {
  60319. var a = t.call(this) || this;
  60320. a.z2 = 2;
  60321. var o = new gt();
  60322. return a.setTextContent(o), a.updateData(n, r, i, !0), a;
  60323. }
  60324. return e.prototype.updateData = function(n, r, i, a) {
  60325. 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);
  60326. if (isNaN(f.startAngle)) {
  60327. o.setShape(f);
  60328. return;
  60329. }
  60330. if (a) {
  60331. o.setShape(f);
  60332. var d = s.getShallow("animationType");
  60333. s.ecModel.ssr ? (Yt(o, {
  60334. scaleX: 0,
  60335. scaleY: 0
  60336. }, s, {
  60337. dataIndex: r,
  60338. isFrom: !0
  60339. }), o.originX = f.cx, o.originY = f.cy) : d === "scale" ? (o.shape.r = c.r0, Yt(o, {
  60340. shape: {
  60341. r: c.r
  60342. }
  60343. }, s, r)) : i != null ? (o.setShape({
  60344. startAngle: i,
  60345. endAngle: i
  60346. }), Yt(o, {
  60347. shape: {
  60348. startAngle: c.startAngle,
  60349. endAngle: c.endAngle
  60350. }
  60351. }, s, r)) : (o.shape.endAngle = c.startAngle, Ct(o, {
  60352. shape: {
  60353. endAngle: c.endAngle
  60354. }
  60355. }, s, r));
  60356. } else
  60357. so(o), Ct(o, {
  60358. shape: f
  60359. }, s, r);
  60360. o.useStyle(n.getItemVisual(r, "style")), Tr(o, l);
  60361. 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");
  60362. m && o.attr("cursor", m), this._updateLabel(s, n, r), o.ensureState("emphasis").shape = le({
  60363. r: c.r + (u.get("scale") && u.get("scaleSize") || 0)
  60364. }, Fc(u.getModel("itemStyle"), c)), le(o.ensureState("select"), {
  60365. x: v,
  60366. y: g,
  60367. shape: Fc(l.getModel(["select", "itemStyle"]), c)
  60368. }), le(o.ensureState("blur"), {
  60369. shape: Fc(l.getModel(["blur", "itemStyle"]), c)
  60370. });
  60371. var y = o.getTextGuideLine(), b = o.getTextContent();
  60372. y && le(y.ensureState("select"), {
  60373. x: v,
  60374. y: g
  60375. }), le(b.ensureState("select"), {
  60376. x: v,
  60377. y: g
  60378. }), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
  60379. }, e.prototype._updateLabel = function(n, r, i) {
  60380. var a = this, o = r.getItemModel(i), s = o.getModel("labelLine"), l = r.getItemVisual(i, "style"), u = l && l.fill, c = l && l.opacity;
  60381. Pr(a, er(o), {
  60382. labelFetcher: r.hostModel,
  60383. labelDataIndex: i,
  60384. inheritColor: u,
  60385. defaultOpacity: c,
  60386. defaultText: n.getFormattedLabel(i, "normal") || r.getName(i)
  60387. });
  60388. var f = a.getTextContent();
  60389. a.setTextConfig({
  60390. // reset position, rotation
  60391. position: null,
  60392. rotation: null
  60393. }), f.attr({
  60394. z2: 10
  60395. });
  60396. var d = n.get(["label", "position"]);
  60397. if (d !== "outside" && d !== "outer")
  60398. a.removeTextGuideLine();
  60399. else {
  60400. var h = this.getTextGuideLine();
  60401. h || (h = new ai(), this.setTextGuideLine(h)), Ak(this, Ek(o), {
  60402. stroke: u,
  60403. opacity: ji(s.get(["lineStyle", "opacity"]), c, 1)
  60404. });
  60405. }
  60406. }, e;
  60407. }(ri)
  60408. ), p6e = (
  60409. /** @class */
  60410. function(t) {
  60411. q(e, t);
  60412. function e() {
  60413. var n = t !== null && t.apply(this, arguments) || this;
  60414. return n.ignoreLabelLineUpdate = !0, n;
  60415. }
  60416. return e.prototype.render = function(n, r, i, a) {
  60417. var o = n.getData(), s = this._data, l = this.group, u;
  60418. if (!s && o.count() > 0) {
  60419. for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f)
  60420. c = o.getItemLayout(f);
  60421. c && (u = c.startAngle);
  60422. }
  60423. if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && n.get("showEmptyCircle")) {
  60424. var d = Xte(n), h = new ri({
  60425. shape: le(Ute(n, i), d)
  60426. });
  60427. h.useStyle(n.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, l.add(h);
  60428. }
  60429. o.diff(s).add(function(p) {
  60430. var v = new h6e(o, p, u);
  60431. o.setItemGraphicEl(p, v), l.add(v);
  60432. }).update(function(p, v) {
  60433. var g = s.getItemGraphicEl(v);
  60434. g.updateData(o, p, u), g.off("click"), l.add(g), o.setItemGraphicEl(p, g);
  60435. }).remove(function(p) {
  60436. var v = s.getItemGraphicEl(p);
  60437. wm(v, n, p);
  60438. }).execute(), d6e(n), n.get("animationTypeUpdate") !== "expansion" && (this._data = o);
  60439. }, e.prototype.dispose = function() {
  60440. }, e.prototype.containPoint = function(n, r) {
  60441. var i = r.getData(), a = i.getItemLayout(0);
  60442. if (a) {
  60443. var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
  60444. return l <= a.r && l >= a.r0;
  60445. }
  60446. }, e.type = "pie", e;
  60447. }(zt)
  60448. );
  60449. function Pp(t, e, n) {
  60450. e = ue(e) && {
  60451. coordDimensions: e
  60452. } || le({
  60453. encodeDefine: t.getEncode()
  60454. }, e);
  60455. var r = t.getSource(), i = wp(r, e).dimensions, a = new Lr(i, t);
  60456. return a.initData(r, n), a;
  60457. }
  60458. var q0 = (
  60459. /** @class */
  60460. function() {
  60461. function t(e, n) {
  60462. this._getDataWithEncodedVisual = e, this._getRawData = n;
  60463. }
  60464. return t.prototype.getAllNames = function() {
  60465. var e = this._getRawData();
  60466. return e.mapArray(e.getName);
  60467. }, t.prototype.containName = function(e) {
  60468. var n = this._getRawData();
  60469. return n.indexOfName(e) >= 0;
  60470. }, t.prototype.indexOfName = function(e) {
  60471. var n = this._getDataWithEncodedVisual();
  60472. return n.indexOfName(e);
  60473. }, t.prototype.getItemVisual = function(e, n) {
  60474. var r = this._getDataWithEncodedVisual();
  60475. return r.getItemVisual(e, n);
  60476. }, t;
  60477. }()
  60478. ), v6e = bt(), g6e = (
  60479. /** @class */
  60480. function(t) {
  60481. q(e, t);
  60482. function e() {
  60483. return t !== null && t.apply(this, arguments) || this;
  60484. }
  60485. return e.prototype.init = function(n) {
  60486. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
  60487. }, e.prototype.mergeOption = function() {
  60488. t.prototype.mergeOption.apply(this, arguments);
  60489. }, e.prototype.getInitialData = function() {
  60490. return Pp(this, {
  60491. coordDimensions: ["value"],
  60492. encodeDefaulter: Ue(nk, this)
  60493. });
  60494. }, e.prototype.getDataParams = function(n) {
  60495. var r = this.getData(), i = v6e(r), a = i.seats;
  60496. if (!a) {
  60497. var o = [];
  60498. r.each(r.mapDimension("value"), function(l) {
  60499. o.push(l);
  60500. }), a = i.seats = sK(o, r.hostModel.get("percentPrecision"));
  60501. }
  60502. var s = t.prototype.getDataParams.call(this, n);
  60503. return s.percent = a[n] || 0, s.$vars.push("percent"), s;
  60504. }, e.prototype._defaultLabelLine = function(n) {
  60505. gf(n, "labelLine", ["show"]);
  60506. var r = n.labelLine, i = n.emphasis.labelLine;
  60507. r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
  60508. }, e.type = "series.pie", e.defaultOption = {
  60509. // zlevel: 0,
  60510. z: 2,
  60511. legendHoverLink: !0,
  60512. colorBy: "data",
  60513. // 默认全局居中
  60514. center: ["50%", "50%"],
  60515. radius: [0, "75%"],
  60516. // 默认顺时针
  60517. clockwise: !0,
  60518. startAngle: 90,
  60519. endAngle: "auto",
  60520. padAngle: 0,
  60521. // 最小角度改为0
  60522. minAngle: 0,
  60523. // If the angle of a sector less than `minShowLabelAngle`,
  60524. // the label will not be displayed.
  60525. minShowLabelAngle: 0,
  60526. // 选中时扇区偏移量
  60527. selectedOffset: 10,
  60528. // 选择模式,默认关闭,可选single,multiple
  60529. // selectedMode: false,
  60530. // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)
  60531. // roseType: null,
  60532. percentPrecision: 2,
  60533. // If still show when all data zero.
  60534. stillShowZeroSum: !0,
  60535. // cursor: null,
  60536. left: 0,
  60537. top: 0,
  60538. right: 0,
  60539. bottom: 0,
  60540. width: null,
  60541. height: null,
  60542. label: {
  60543. // color: 'inherit',
  60544. // If rotate around circle
  60545. rotate: 0,
  60546. show: !0,
  60547. overflow: "truncate",
  60548. // 'outer', 'inside', 'center'
  60549. position: "outer",
  60550. // 'none', 'labelLine', 'edge'. Works only when position is 'outer'
  60551. alignTo: "none",
  60552. // Closest distance between label and chart edge.
  60553. // Works only position is 'outer' and alignTo is 'edge'.
  60554. edgeDistance: "25%",
  60555. // Works only position is 'outer' and alignTo is not 'edge'.
  60556. bleedMargin: 10,
  60557. // Distance between text and label line.
  60558. distanceToLabelLine: 5
  60559. // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调
  60560. // 默认使用全局文本样式,详见 textStyle
  60561. // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
  60562. },
  60563. // Enabled when label.normal.position is 'outer'
  60564. labelLine: {
  60565. show: !0,
  60566. // 引导线两段中的第一段长度
  60567. length: 15,
  60568. // 引导线两段中的第二段长度
  60569. length2: 15,
  60570. smooth: !1,
  60571. minTurnAngle: 90,
  60572. maxSurfaceAngle: 90,
  60573. lineStyle: {
  60574. // color: 各异,
  60575. width: 1,
  60576. type: "solid"
  60577. }
  60578. },
  60579. itemStyle: {
  60580. borderWidth: 1,
  60581. borderJoin: "round"
  60582. },
  60583. showEmptyCircle: !0,
  60584. emptyCircleStyle: {
  60585. color: "lightgray",
  60586. opacity: 1
  60587. },
  60588. labelLayout: {
  60589. // Hide the overlapped label.
  60590. hideOverlap: !0
  60591. },
  60592. emphasis: {
  60593. scale: !0,
  60594. scaleSize: 5
  60595. },
  60596. // If use strategy to avoid label overlapping
  60597. avoidLabelOverlap: !0,
  60598. // Animation type. Valid values: expansion, scale
  60599. animationType: "expansion",
  60600. animationDuration: 1e3,
  60601. // Animation type when update. Valid values: transition, expansion
  60602. animationTypeUpdate: "transition",
  60603. animationEasingUpdate: "cubicInOut",
  60604. animationDurationUpdate: 500,
  60605. animationEasing: "cubicInOut"
  60606. }, e;
  60607. }(Ht)
  60608. );
  60609. function m6e(t) {
  60610. return {
  60611. seriesType: t,
  60612. reset: function(e, n) {
  60613. var r = e.getData();
  60614. r.filterSelf(function(i) {
  60615. var a = r.mapDimension("value"), o = r.get(a, i);
  60616. return !(St(o) && !isNaN(o) && o < 0);
  60617. });
  60618. }
  60619. };
  60620. }
  60621. function y6e(t) {
  60622. t.registerChartView(p6e), t.registerSeriesModel(g6e), pee("pie", t.registerAction), t.registerLayout(Ue(u6e, "pie")), t.registerProcessor(Y0("pie")), t.registerProcessor(m6e("pie"));
  60623. }
  60624. var b6e = (
  60625. /** @class */
  60626. function(t) {
  60627. q(e, t);
  60628. function e() {
  60629. var n = t !== null && t.apply(this, arguments) || this;
  60630. return n.type = e.type, n.hasSymbolVisual = !0, n;
  60631. }
  60632. return e.prototype.getInitialData = function(n, r) {
  60633. return us(null, this, {
  60634. useEncodeDefaulter: !0
  60635. });
  60636. }, e.prototype.getProgressive = function() {
  60637. var n = this.option.progressive;
  60638. return n ?? (this.option.large ? 5e3 : this.get("progressive"));
  60639. }, e.prototype.getProgressiveThreshold = function() {
  60640. var n = this.option.progressiveThreshold;
  60641. return n ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
  60642. }, e.prototype.brushSelector = function(n, r, i) {
  60643. return i.point(r.getItemLayout(n));
  60644. }, e.prototype.getZLevelKey = function() {
  60645. return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
  60646. }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  60647. coordinateSystem: "cartesian2d",
  60648. // zlevel: 0,
  60649. z: 2,
  60650. legendHoverLink: !0,
  60651. symbolSize: 10,
  60652. // symbolRotate: null, // 图形旋转控制
  60653. large: !1,
  60654. // Available when large is true
  60655. largeThreshold: 2e3,
  60656. // cursor: null,
  60657. itemStyle: {
  60658. opacity: 0.8
  60659. // color: 各异
  60660. },
  60661. emphasis: {
  60662. scale: !0
  60663. },
  60664. // If clip the overflow graphics
  60665. // Works on cartesian / polar series
  60666. clip: !0,
  60667. select: {
  60668. itemStyle: {
  60669. borderColor: "#212121"
  60670. }
  60671. },
  60672. universalTransition: {
  60673. divideShape: "clone"
  60674. }
  60675. // progressive: null
  60676. }, e;
  60677. }(Ht)
  60678. ), qte = 4, _6e = (
  60679. /** @class */
  60680. /* @__PURE__ */ function() {
  60681. function t() {
  60682. }
  60683. return t;
  60684. }()
  60685. ), O6e = (
  60686. /** @class */
  60687. function(t) {
  60688. q(e, t);
  60689. function e(n) {
  60690. var r = t.call(this, n) || this;
  60691. return r._off = 0, r.hoverDataIdx = -1, r;
  60692. }
  60693. return e.prototype.getDefaultShape = function() {
  60694. return new _6e();
  60695. }, e.prototype.reset = function() {
  60696. this.notClear = !1, this._off = 0;
  60697. }, e.prototype.buildPath = function(n, r) {
  60698. var i = r.points, a = r.size, o = this.symbolProxy, s = o.shape, l = n.getContext ? n.getContext() : n, u = l && a[0] < qte, c = this.softClipShape, f;
  60699. if (u) {
  60700. this._ctx = l;
  60701. return;
  60702. }
  60703. for (this._ctx = null, f = this._off; f < i.length; ) {
  60704. var d = i[f++], h = i[f++];
  60705. 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));
  60706. }
  60707. this.incremental && (this._off = f, this.notClear = !0);
  60708. }, e.prototype.afterBrush = function() {
  60709. var n = this.shape, r = n.points, i = n.size, a = this._ctx, o = this.softClipShape, s;
  60710. if (a) {
  60711. for (s = this._off; s < r.length; ) {
  60712. var l = r[s++], u = r[s++];
  60713. isNaN(l) || isNaN(u) || o && !o.contain(l, u) || a.fillRect(l - i[0] / 2, u - i[1] / 2, i[0], i[1]);
  60714. }
  60715. this.incremental && (this._off = s, this.notClear = !0);
  60716. }
  60717. }, e.prototype.findDataIndex = function(n, r) {
  60718. 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--) {
  60719. var c = u * 2, f = a[c] - s / 2, d = a[c + 1] - l / 2;
  60720. if (n >= f && r >= d && n <= f + s && r <= d + l)
  60721. return u;
  60722. }
  60723. return -1;
  60724. }, e.prototype.contain = function(n, r) {
  60725. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  60726. if (n = i[0], r = i[1], a.contain(n, r)) {
  60727. var o = this.hoverDataIdx = this.findDataIndex(n, r);
  60728. return o >= 0;
  60729. }
  60730. return this.hoverDataIdx = -1, !1;
  60731. }, e.prototype.getBoundingRect = function() {
  60732. var n = this._rect;
  60733. if (!n) {
  60734. 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; ) {
  60735. var h = i[d++], p = i[d++];
  60736. l = Math.min(h, l), c = Math.max(h, c), u = Math.min(p, u), f = Math.max(p, f);
  60737. }
  60738. n = this._rect = new Je(l - o / 2, u - s / 2, c - l + o, f - u + s);
  60739. }
  60740. return n;
  60741. }, e;
  60742. }(ot)
  60743. ), S6e = (
  60744. /** @class */
  60745. function() {
  60746. function t() {
  60747. this.group = new Ve();
  60748. }
  60749. return t.prototype.updateData = function(e, n) {
  60750. this._clear();
  60751. var r = this._create();
  60752. r.setShape({
  60753. points: e.getLayout("points")
  60754. }), this._setCommon(r, e, n);
  60755. }, t.prototype.updateLayout = function(e) {
  60756. var n = e.getLayout("points");
  60757. this.group.eachChild(function(r) {
  60758. if (r.startIndex != null) {
  60759. var i = (r.endIndex - r.startIndex) * 2, a = r.startIndex * 4 * 2;
  60760. n = new Float32Array(n.buffer, a, i);
  60761. }
  60762. r.setShape("points", n), r.reset();
  60763. });
  60764. }, t.prototype.incrementalPrepareUpdate = function(e) {
  60765. this._clear();
  60766. }, t.prototype.incrementalUpdate = function(e, n, r) {
  60767. var i = this._newAdded[0], a = n.getLayout("points"), o = i && i.shape.points;
  60768. if (o && o.length < 2e4) {
  60769. var s = o.length, l = new Float32Array(s + a.length);
  60770. l.set(o), l.set(a, s), i.endIndex = e.end, i.setShape({
  60771. points: l
  60772. });
  60773. } else {
  60774. this._newAdded = [];
  60775. var u = this._create();
  60776. u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
  60777. points: a
  60778. }), this._setCommon(u, n, r);
  60779. }
  60780. }, t.prototype.eachRendered = function(e) {
  60781. this._newAdded[0] && e(this._newAdded[0]);
  60782. }, t.prototype._create = function() {
  60783. var e = new O6e({
  60784. cursor: "default"
  60785. });
  60786. return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
  60787. }, t.prototype._setCommon = function(e, n, r) {
  60788. var i = n.hostModel;
  60789. r = r || {};
  60790. var a = n.getVisual("symbolSize");
  60791. 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;
  60792. var o = e.shape.size[0] < qte;
  60793. e.useStyle(
  60794. // Draw shadow when doing fillRect is extremely slow.
  60795. i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
  60796. );
  60797. var s = n.getVisual("style"), l = s && s.fill;
  60798. l && e.setColor(l);
  60799. var u = Fe(e);
  60800. u.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) {
  60801. u.dataIndex = null;
  60802. var f = e.hoverDataIdx;
  60803. f >= 0 && (u.dataIndex = f + (e.startIndex || 0));
  60804. });
  60805. }, t.prototype.remove = function() {
  60806. this._clear();
  60807. }, t.prototype._clear = function() {
  60808. this._newAdded = [], this.group.removeAll();
  60809. }, t;
  60810. }()
  60811. ), x6e = (
  60812. /** @class */
  60813. function(t) {
  60814. q(e, t);
  60815. function e() {
  60816. var n = t !== null && t.apply(this, arguments) || this;
  60817. return n.type = e.type, n;
  60818. }
  60819. return e.prototype.render = function(n, r, i) {
  60820. var a = n.getData(), o = this._updateSymbolDraw(a, n);
  60821. o.updateData(a, {
  60822. // TODO
  60823. // If this parameter should be a shape or a bounding volume
  60824. // shape will be more general.
  60825. // But bounding volume like bounding rect will be much faster in the contain calculation
  60826. clipShape: this._getClipShape(n)
  60827. }), this._finished = !0;
  60828. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  60829. var a = n.getData(), o = this._updateSymbolDraw(a, n);
  60830. o.incrementalPrepareUpdate(a), this._finished = !1;
  60831. }, e.prototype.incrementalRender = function(n, r, i) {
  60832. this._symbolDraw.incrementalUpdate(n, r.getData(), {
  60833. clipShape: this._getClipShape(r)
  60834. }), this._finished = n.end === r.getData().count();
  60835. }, e.prototype.updateTransform = function(n, r, i) {
  60836. var a = n.getData();
  60837. if (this.group.dirty(), !this._finished || a.count() > 1e4)
  60838. return {
  60839. update: !0
  60840. };
  60841. var o = X0("").reset(n, r, i);
  60842. o.progress && o.progress({
  60843. start: 0,
  60844. end: a.count(),
  60845. count: a.count()
  60846. }, a), this._symbolDraw.updateLayout(a);
  60847. }, e.prototype.eachRendered = function(n) {
  60848. this._symbolDraw && this._symbolDraw.eachRendered(n);
  60849. }, e.prototype._getClipShape = function(n) {
  60850. if (n.get("clip", !0)) {
  60851. var r = n.coordinateSystem;
  60852. return r && r.getArea && r.getArea(0.1);
  60853. }
  60854. }, e.prototype._updateSymbolDraw = function(n, r) {
  60855. var i = this._symbolDraw, a = r.pipelineContext, o = a.large;
  60856. return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new S6e() : new Z0(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i;
  60857. }, e.prototype.remove = function(n, r) {
  60858. this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
  60859. }, e.prototype.dispose = function() {
  60860. }, e.type = "scatter", e;
  60861. }(zt)
  60862. ), w6e = (
  60863. /** @class */
  60864. function(t) {
  60865. q(e, t);
  60866. function e() {
  60867. return t !== null && t.apply(this, arguments) || this;
  60868. }
  60869. return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
  60870. show: !1,
  60871. // zlevel: 0,
  60872. z: 0,
  60873. left: "10%",
  60874. top: 60,
  60875. right: "10%",
  60876. bottom: 70,
  60877. // If grid size contain label
  60878. containLabel: !1,
  60879. // width: {totalWidth} - left - right,
  60880. // height: {totalHeight} - top - bottom,
  60881. backgroundColor: "rgba(0,0,0,0)",
  60882. borderWidth: 1,
  60883. borderColor: "#ccc"
  60884. }, e;
  60885. }(rt)
  60886. ), uE = (
  60887. /** @class */
  60888. function(t) {
  60889. q(e, t);
  60890. function e() {
  60891. return t !== null && t.apply(this, arguments) || this;
  60892. }
  60893. return e.prototype.getCoordSysModel = function() {
  60894. return this.getReferringComponents("grid", Dn).models[0];
  60895. }, e.type = "cartesian2dAxis", e;
  60896. }(rt)
  60897. );
  60898. xn(uE, Tp);
  60899. var Kte = {
  60900. show: !0,
  60901. // zlevel: 0,
  60902. z: 0,
  60903. // Inverse the axis.
  60904. inverse: !1,
  60905. // Axis name displayed.
  60906. name: "",
  60907. // 'start' | 'middle' | 'end'
  60908. nameLocation: "end",
  60909. // By degree. By default auto rotate by nameLocation.
  60910. nameRotate: null,
  60911. nameTruncate: {
  60912. maxWidth: null,
  60913. ellipsis: "...",
  60914. placeholder: "."
  60915. },
  60916. // Use global text style by default.
  60917. nameTextStyle: {},
  60918. // The gap between axisName and axisLine.
  60919. nameGap: 15,
  60920. // Default `false` to support tooltip.
  60921. silent: !1,
  60922. // Default `false` to avoid legacy user event listener fail.
  60923. triggerEvent: !1,
  60924. tooltip: {
  60925. show: !1
  60926. },
  60927. axisPointer: {},
  60928. axisLine: {
  60929. show: !0,
  60930. onZero: !0,
  60931. onZeroAxisIndex: null,
  60932. lineStyle: {
  60933. color: "#6E7079",
  60934. width: 1,
  60935. type: "solid"
  60936. },
  60937. // The arrow at both ends the the axis.
  60938. symbol: ["none", "none"],
  60939. symbolSize: [10, 15]
  60940. },
  60941. axisTick: {
  60942. show: !0,
  60943. // Whether axisTick is inside the grid or outside the grid.
  60944. inside: !1,
  60945. // The length of axisTick.
  60946. length: 5,
  60947. lineStyle: {
  60948. width: 1
  60949. }
  60950. },
  60951. axisLabel: {
  60952. show: !0,
  60953. // Whether axisLabel is inside the grid or outside the grid.
  60954. inside: !1,
  60955. rotate: 0,
  60956. // true | false | null/undefined (auto)
  60957. showMinLabel: null,
  60958. // true | false | null/undefined (auto)
  60959. showMaxLabel: null,
  60960. margin: 8,
  60961. // formatter: null,
  60962. fontSize: 12
  60963. },
  60964. splitLine: {
  60965. show: !0,
  60966. lineStyle: {
  60967. color: ["#E0E6F1"],
  60968. width: 1,
  60969. type: "solid"
  60970. }
  60971. },
  60972. splitArea: {
  60973. show: !1,
  60974. areaStyle: {
  60975. color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
  60976. }
  60977. }
  60978. }, C6e = qe({
  60979. // The gap at both ends of the axis. For categoryAxis, boolean.
  60980. boundaryGap: !0,
  60981. // Set false to faster category collection.
  60982. deduplication: null,
  60983. // splitArea: {
  60984. // show: false
  60985. // },
  60986. splitLine: {
  60987. show: !1
  60988. },
  60989. axisTick: {
  60990. // If tick is align with label when boundaryGap is true
  60991. alignWithLabel: !1,
  60992. interval: "auto"
  60993. },
  60994. axisLabel: {
  60995. interval: "auto"
  60996. }
  60997. }, Kte), Nk = qe({
  60998. boundaryGap: [0, 0],
  60999. axisLine: {
  61000. // Not shown when other axis is categoryAxis in cartesian
  61001. show: "auto"
  61002. },
  61003. axisTick: {
  61004. // Not shown when other axis is categoryAxis in cartesian
  61005. show: "auto"
  61006. },
  61007. // TODO
  61008. // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
  61009. splitNumber: 5,
  61010. minorTick: {
  61011. // Minor tick, not available for cateogry axis.
  61012. show: !1,
  61013. // Split number of minor ticks. The value should be in range of (0, 100)
  61014. splitNumber: 5,
  61015. // Length of minor tick
  61016. length: 3,
  61017. // Line style
  61018. lineStyle: {
  61019. // Default to be same with axisTick
  61020. }
  61021. },
  61022. minorSplitLine: {
  61023. show: !1,
  61024. lineStyle: {
  61025. color: "#F4F7FD",
  61026. width: 1
  61027. }
  61028. }
  61029. }, Kte), T6e = qe({
  61030. splitNumber: 6,
  61031. axisLabel: {
  61032. // To eliminate labels that are not nice
  61033. showMinLabel: !1,
  61034. showMaxLabel: !1,
  61035. rich: {
  61036. primary: {
  61037. fontWeight: "bold"
  61038. }
  61039. }
  61040. },
  61041. splitLine: {
  61042. show: !1
  61043. }
  61044. }, Nk), P6e = Re({
  61045. logBase: 10
  61046. }, Nk);
  61047. const Jte = {
  61048. category: C6e,
  61049. value: Nk,
  61050. time: T6e,
  61051. log: P6e
  61052. };
  61053. var $6e = {
  61054. value: 1,
  61055. category: 1,
  61056. time: 1,
  61057. log: 1
  61058. };
  61059. function Qh(t, e, n, r) {
  61060. k($6e, function(i, a) {
  61061. var o = qe(qe({}, Jte[a], !0), r, !0), s = (
  61062. /** @class */
  61063. function(l) {
  61064. q(u, l);
  61065. function u() {
  61066. var c = l !== null && l.apply(this, arguments) || this;
  61067. return c.type = e + "Axis." + a, c;
  61068. }
  61069. return u.prototype.mergeDefaultAndTheme = function(c, f) {
  61070. var d = Tm(this), h = d ? bp(c) : {}, p = f.getTheme();
  61071. qe(c, p.get(a + "Axis")), qe(c, this.getDefaultOption()), c.type = UV(c), d && cu(c, h, d);
  61072. }, u.prototype.optionUpdated = function() {
  61073. var c = this.option;
  61074. c.type === "category" && (this.__ordinalMeta = tE.createByAxisModel(this));
  61075. }, u.prototype.getCategories = function(c) {
  61076. var f = this.option;
  61077. if (f.type === "category")
  61078. return c ? f.data : this.__ordinalMeta.categories;
  61079. }, u.prototype.getOrdinalMeta = function() {
  61080. return this.__ordinalMeta;
  61081. }, u.type = e + "Axis." + a, u.defaultOption = o, u;
  61082. }(n)
  61083. );
  61084. t.registerComponentModel(s);
  61085. }), t.registerSubTypeDefaulter(e + "Axis", UV);
  61086. }
  61087. function UV(t) {
  61088. return t.type || (t.data ? "category" : "value");
  61089. }
  61090. var A6e = (
  61091. /** @class */
  61092. function() {
  61093. function t(e) {
  61094. this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
  61095. }
  61096. return t.prototype.getAxis = function(e) {
  61097. return this._axes[e];
  61098. }, t.prototype.getAxes = function() {
  61099. return ce(this._dimList, function(e) {
  61100. return this._axes[e];
  61101. }, this);
  61102. }, t.prototype.getAxesByScale = function(e) {
  61103. return e = e.toLowerCase(), Nt(this.getAxes(), function(n) {
  61104. return n.scale.type === e;
  61105. });
  61106. }, t.prototype.addAxis = function(e) {
  61107. var n = e.dim;
  61108. this._axes[n] = e, this._dimList.push(n);
  61109. }, t;
  61110. }()
  61111. ), cE = ["x", "y"];
  61112. function XV(t) {
  61113. return t.type === "interval" || t.type === "time";
  61114. }
  61115. var E6e = (
  61116. /** @class */
  61117. function(t) {
  61118. q(e, t);
  61119. function e() {
  61120. var n = t !== null && t.apply(this, arguments) || this;
  61121. return n.type = "cartesian2d", n.dimensions = cE, n;
  61122. }
  61123. return e.prototype.calcAffineTransform = function() {
  61124. this._transform = this._invTransform = null;
  61125. var n = this.getAxis("x").scale, r = this.getAxis("y").scale;
  61126. if (!(!XV(n) || !XV(r))) {
  61127. 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];
  61128. if (!(!l || !u)) {
  61129. 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];
  61130. this._invTransform = kf([], p);
  61131. }
  61132. }
  61133. }, e.prototype.getBaseAxis = function() {
  61134. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
  61135. }, e.prototype.containPoint = function(n) {
  61136. var r = this.getAxis("x"), i = this.getAxis("y");
  61137. return r.contain(r.toLocalCoord(n[0])) && i.contain(i.toLocalCoord(n[1]));
  61138. }, e.prototype.containData = function(n) {
  61139. return this.getAxis("x").containData(n[0]) && this.getAxis("y").containData(n[1]);
  61140. }, e.prototype.containZone = function(n, r) {
  61141. 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]);
  61142. return o.intersect(s);
  61143. }, e.prototype.dataToPoint = function(n, r, i) {
  61144. i = i || [];
  61145. var a = n[0], o = n[1];
  61146. if (this._transform && a != null && isFinite(a) && o != null && isFinite(o))
  61147. return ar(i, n, this._transform);
  61148. var s = this.getAxis("x"), l = this.getAxis("y");
  61149. return i[0] = s.toGlobalCoord(s.dataToCoord(a, r)), i[1] = l.toGlobalCoord(l.dataToCoord(o, r)), i;
  61150. }, e.prototype.clampData = function(n, r) {
  61151. 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]);
  61152. 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;
  61153. }, e.prototype.pointToData = function(n, r) {
  61154. var i = [];
  61155. if (this._invTransform)
  61156. return ar(i, n, this._invTransform);
  61157. var a = this.getAxis("x"), o = this.getAxis("y");
  61158. return i[0] = a.coordToData(a.toLocalCoord(n[0]), r), i[1] = o.coordToData(o.toLocalCoord(n[1]), r), i;
  61159. }, e.prototype.getOtherAxis = function(n) {
  61160. return this.getAxis(n.dim === "x" ? "y" : "x");
  61161. }, e.prototype.getArea = function(n) {
  61162. n = n || 0;
  61163. 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;
  61164. return new Je(a, o, s, l);
  61165. }, e;
  61166. }(A6e)
  61167. ), M6e = (
  61168. /** @class */
  61169. function(t) {
  61170. q(e, t);
  61171. function e(n, r, i, a, o) {
  61172. var s = t.call(this, n, r, i) || this;
  61173. return s.index = 0, s.type = a || "value", s.position = o || "bottom", s;
  61174. }
  61175. return e.prototype.isHorizontal = function() {
  61176. var n = this.position;
  61177. return n === "top" || n === "bottom";
  61178. }, e.prototype.getGlobalExtent = function(n) {
  61179. var r = this.getExtent();
  61180. return r[0] = this.toGlobalCoord(r[0]), r[1] = this.toGlobalCoord(r[1]), n && r[0] > r[1] && r.reverse(), r;
  61181. }, e.prototype.pointToData = function(n, r) {
  61182. return this.coordToData(this.toLocalCoord(n[this.dim === "x" ? 0 : 1]), r);
  61183. }, e.prototype.setCategorySortInfo = function(n) {
  61184. if (this.type !== "category")
  61185. return !1;
  61186. this.model.option.categorySortInfo = n, this.scale.setSortInfo(n);
  61187. }, e;
  61188. }(Ba)
  61189. );
  61190. function fE(t, e, n) {
  61191. n = n || {};
  61192. 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 = {
  61193. left: 0,
  61194. right: 1,
  61195. top: 0,
  61196. bottom: 1,
  61197. onZero: 2
  61198. }, h = e.get("offset") || 0, p = u === "x" ? [f[2] - h, f[3] + h] : [f[0] - h, f[1] + h];
  61199. if (o) {
  61200. var v = o.toGlobalCoord(o.dataToCoord(0));
  61201. p[d.onZero] = Math.max(Math.min(v, p[1]), p[0]);
  61202. }
  61203. 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);
  61204. var g = {
  61205. top: -1,
  61206. bottom: 1,
  61207. left: -1,
  61208. right: 1
  61209. };
  61210. 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);
  61211. var m = e.get(["axisLabel", "rotate"]);
  61212. return a.labelRotate = l === "top" ? -m : m, a.z2 = 1, a;
  61213. }
  61214. function YV(t) {
  61215. return t.get("coordinateSystem") === "cartesian2d";
  61216. }
  61217. function qV(t) {
  61218. var e = {
  61219. xAxisModel: null,
  61220. yAxisModel: null
  61221. };
  61222. return k(e, function(n, r) {
  61223. var i = r.replace(/Model$/, ""), a = t.getReferringComponents(i, Dn).models[0];
  61224. if (process.env.NODE_ENV !== "production" && !a)
  61225. throw new Error(i + ' "' + ji(t.get(i + "Index"), t.get(i + "Id"), 0) + '" not found');
  61226. e[r] = a;
  61227. }), e;
  61228. }
  61229. var oP = Math.log;
  61230. function ene(t, e, n) {
  61231. var r = Ys.prototype, i = r.getTicks.call(n), a = r.getTicks.call(n, !0), o = i.length - 1, s = r.getInterval.call(n), l = rte(t, e), u = l.extent, c = l.fixMin, f = l.fixMax;
  61232. if (t.type === "log") {
  61233. var d = oP(t.base);
  61234. u = [oP(u[0]) / d, oP(u[1]) / d];
  61235. }
  61236. t.setExtent(u[0], u[1]), t.calcNiceExtent({
  61237. splitNumber: o,
  61238. fixMin: c,
  61239. fixMax: f
  61240. });
  61241. var h = r.getExtent.call(t);
  61242. c && (u[0] = h[0]), f && (u[1] = h[1]);
  61243. var p = r.getInterval.call(t), v = u[0], g = u[1];
  61244. if (c && f)
  61245. p = (g - v) / o;
  61246. else if (c)
  61247. for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
  61248. p = GT(p), g = u[0] + p * o;
  61249. else if (f)
  61250. for (v = u[1] - p * o; v > u[0] && isFinite(v) && isFinite(u[0]); )
  61251. p = GT(p), v = u[1] - p * o;
  61252. else {
  61253. var m = t.getTicks().length - 1;
  61254. m > o && (p = GT(p));
  61255. var y = p * o;
  61256. 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));
  61257. }
  61258. var b = (i[0].value - a[0].value) / s, _ = (i[o].value - a[o].value) / s;
  61259. 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") {
  61260. var O = r.getTicks.call(t);
  61261. O[1] && (!PNe(p) || iO(O[1].value) > iO(p)) && dn(
  61262. // eslint-disable-next-line
  61263. "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
  61264. );
  61265. }
  61266. }
  61267. var I6e = (
  61268. /** @class */
  61269. function() {
  61270. function t(e, n, r) {
  61271. this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = cE, this._initCartesian(e, n, r), this.model = e;
  61272. }
  61273. return t.prototype.getRect = function() {
  61274. return this._rect;
  61275. }, t.prototype.update = function(e, n) {
  61276. var r = this._axesMap;
  61277. this._updateScale(e, this.model);
  61278. function i(o) {
  61279. var s, l = st(o), u = l.length;
  61280. if (u) {
  61281. for (var c = [], f = u - 1; f >= 0; f--) {
  61282. var d = +l[f], h = o[d], p = h.model, v = h.scale;
  61283. // Only value and log axis without interval support alignTicks.
  61284. nE(v) && p.get("alignTicks") && p.get("interval") == null ? c.push(h) : (Of(v, p), nE(v) && (s = h));
  61285. }
  61286. c.length && (s || (s = c.pop(), Of(s.scale, s.model)), k(c, function(g) {
  61287. ene(g.scale, g.model, s.scale);
  61288. }));
  61289. }
  61290. }
  61291. i(r.x), i(r.y);
  61292. var a = {};
  61293. k(r.x, function(o) {
  61294. KV(r, "y", o, a);
  61295. }), k(r.y, function(o) {
  61296. KV(r, "x", o, a);
  61297. }), this.resize(this.model, n);
  61298. }, t.prototype.resize = function(e, n, r) {
  61299. var i = e.getBoxLayoutParams(), a = !r && e.get("containLabel"), o = Rn(i, {
  61300. width: n.getWidth(),
  61301. height: n.getHeight()
  61302. });
  61303. this._rect = o;
  61304. var s = this._axesList;
  61305. l(), a && (k(s, function(u) {
  61306. if (!u.model.get(["axisLabel", "inside"])) {
  61307. var c = qNe(u);
  61308. if (c) {
  61309. var f = u.isHorizontal() ? "height" : "width", d = u.model.get(["axisLabel", "margin"]);
  61310. o[f] -= c[f] + d, u.position === "top" ? o.y += c.height + d : u.position === "left" && (o.x += c.width + d);
  61311. }
  61312. }
  61313. }), l()), k(this._coordsList, function(u) {
  61314. u.calcAffineTransform();
  61315. });
  61316. function l() {
  61317. k(s, function(u) {
  61318. var c = u.isHorizontal(), f = c ? [0, o.width] : [0, o.height], d = u.inverse ? 1 : 0;
  61319. u.setExtent(f[d], f[1 - d]), D6e(u, c ? o.x : o.y);
  61320. });
  61321. }
  61322. }, t.prototype.getAxis = function(e, n) {
  61323. var r = this._axesMap[e];
  61324. if (r != null)
  61325. return r[n || 0];
  61326. }, t.prototype.getAxes = function() {
  61327. return this._axesList.slice();
  61328. }, t.prototype.getCartesian = function(e, n) {
  61329. if (e != null && n != null) {
  61330. var r = "x" + e + "y" + n;
  61331. return this._coordsMap[r];
  61332. }
  61333. Ie(e) && (n = e.yAxisIndex, e = e.xAxisIndex);
  61334. for (var i = 0, a = this._coordsList; i < a.length; i++)
  61335. if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === n)
  61336. return a[i];
  61337. }, t.prototype.getCartesians = function() {
  61338. return this._coordsList.slice();
  61339. }, t.prototype.convertToPixel = function(e, n, r) {
  61340. var i = this._findConvertTarget(n);
  61341. return i.cartesian ? i.cartesian.dataToPoint(r) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(r)) : null;
  61342. }, t.prototype.convertFromPixel = function(e, n, r) {
  61343. var i = this._findConvertTarget(n);
  61344. return i.cartesian ? i.cartesian.pointToData(r) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(r)) : null;
  61345. }, t.prototype._findConvertTarget = function(e) {
  61346. 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;
  61347. if (n)
  61348. s = n.coordinateSystem, et(o, s) < 0 && (s = null);
  61349. else if (r && i)
  61350. s = this.getCartesian(r.componentIndex, i.componentIndex);
  61351. else if (r)
  61352. l = this.getAxis("x", r.componentIndex);
  61353. else if (i)
  61354. l = this.getAxis("y", i.componentIndex);
  61355. else if (a) {
  61356. var u = a.coordinateSystem;
  61357. u === this && (s = this._coordsList[0]);
  61358. }
  61359. return {
  61360. cartesian: s,
  61361. axis: l
  61362. };
  61363. }, t.prototype.containPoint = function(e) {
  61364. var n = this._coordsList[0];
  61365. if (n)
  61366. return n.containPoint(e);
  61367. }, t.prototype._initCartesian = function(e, n, r) {
  61368. var i = this, a = this, o = {
  61369. left: !1,
  61370. right: !1,
  61371. top: !1,
  61372. bottom: !1
  61373. }, s = {
  61374. x: {},
  61375. y: {}
  61376. }, l = {
  61377. x: 0,
  61378. y: 0
  61379. };
  61380. if (n.eachComponent("xAxis", u("x"), this), n.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
  61381. this._axesMap = {}, this._axesList = [];
  61382. return;
  61383. }
  61384. this._axesMap = s, k(s.x, function(c, f) {
  61385. k(s.y, function(d, h) {
  61386. var p = "x" + f + "y" + h, v = new E6e(p);
  61387. v.master = i, v.model = e, i._coordsMap[p] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(d);
  61388. });
  61389. });
  61390. function u(c) {
  61391. return function(f, d) {
  61392. if (sP(f, e)) {
  61393. var h = f.get("position");
  61394. c === "x" ? h !== "top" && h !== "bottom" && (h = o.bottom ? "top" : "bottom") : h !== "left" && h !== "right" && (h = o.left ? "right" : "left"), o[h] = !0;
  61395. var p = new M6e(c, G0(f), [0, 0], f.get("type"), h), v = p.type === "category";
  61396. 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]++;
  61397. }
  61398. };
  61399. }
  61400. }, t.prototype._updateScale = function(e, n) {
  61401. k(this._axesList, function(i) {
  61402. if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") {
  61403. var a = i.model.get("categorySortInfo");
  61404. i.scale.setSortInfo(a);
  61405. }
  61406. }), e.eachSeries(function(i) {
  61407. if (YV(i)) {
  61408. var a = qV(i), o = a.xAxisModel, s = a.yAxisModel;
  61409. if (!sP(o, n) || !sP(s, n))
  61410. return;
  61411. var l = this.getCartesian(o.componentIndex, s.componentIndex), u = i.getData(), c = l.getAxis("x"), f = l.getAxis("y");
  61412. r(u, c), r(u, f);
  61413. }
  61414. }, this);
  61415. function r(i, a) {
  61416. k(CO(i, a.dim), function(o) {
  61417. a.scale.unionExtentFromData(i, o);
  61418. });
  61419. }
  61420. }, t.prototype.getTooltipAxes = function(e) {
  61421. var n = [], r = [];
  61422. return k(this.getCartesians(), function(i) {
  61423. var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a);
  61424. et(n, a) < 0 && n.push(a), et(r, o) < 0 && r.push(o);
  61425. }), {
  61426. baseAxes: n,
  61427. otherAxes: r
  61428. };
  61429. }, t.create = function(e, n) {
  61430. var r = [];
  61431. return e.eachComponent("grid", function(i, a) {
  61432. var o = new t(i, e, n);
  61433. o.name = "grid_" + a, o.resize(i, n, !0), i.coordinateSystem = o, r.push(o);
  61434. }), e.eachSeries(function(i) {
  61435. if (YV(i)) {
  61436. var a = qV(i), o = a.xAxisModel, s = a.yAxisModel, l = o.getCoordSysModel();
  61437. if (process.env.NODE_ENV !== "production") {
  61438. if (!l)
  61439. throw new Error('Grid "' + ji(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
  61440. if (o.getCoordSysModel() !== s.getCoordSysModel())
  61441. throw new Error("xAxis and yAxis must use the same grid");
  61442. }
  61443. var u = l.coordinateSystem;
  61444. i.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
  61445. }
  61446. }), r;
  61447. }, t.dimensions = cE, t;
  61448. }()
  61449. );
  61450. function sP(t, e) {
  61451. return t.getCoordSysModel() === e;
  61452. }
  61453. function KV(t, e, n, r) {
  61454. n.getAxesOnZeroOf = function() {
  61455. return a ? [a] : [];
  61456. };
  61457. var i = t[e], a, o = n.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
  61458. if (!s)
  61459. return;
  61460. if (l != null)
  61461. JV(i[l]) && (a = i[l]);
  61462. else
  61463. for (var u in i)
  61464. if (i.hasOwnProperty(u) && JV(i[u]) && !r[c(i[u])]) {
  61465. a = i[u];
  61466. break;
  61467. }
  61468. a && (r[c(a)] = !0);
  61469. function c(f) {
  61470. return f.dim + "_" + f.index;
  61471. }
  61472. }
  61473. function JV(t) {
  61474. return t && t.type !== "category" && t.type !== "time" && YNe(t);
  61475. }
  61476. function D6e(t, e) {
  61477. var n = t.getExtent(), r = n[0] + n[1];
  61478. t.toGlobalCoord = t.dim === "x" ? function(i) {
  61479. return i + e;
  61480. } : function(i) {
  61481. return r - i + e;
  61482. }, t.toLocalCoord = t.dim === "x" ? function(i) {
  61483. return i - e;
  61484. } : function(i) {
  61485. return r - i + e;
  61486. };
  61487. }
  61488. var zl = Math.PI, Kr = (
  61489. /** @class */
  61490. function() {
  61491. function t(e, n) {
  61492. this.group = new Ve(), this.opt = n, this.axisModel = e, Re(n, {
  61493. labelOffset: 0,
  61494. nameDirection: 1,
  61495. tickDirection: 1,
  61496. labelDirection: 1,
  61497. silent: !0,
  61498. handleAutoShown: function() {
  61499. return !0;
  61500. }
  61501. });
  61502. var r = new Ve({
  61503. x: n.position[0],
  61504. y: n.position[1],
  61505. rotation: n.rotation
  61506. });
  61507. r.updateTransform(), this._transformGroup = r;
  61508. }
  61509. return t.prototype.hasBuilder = function(e) {
  61510. return !!eF[e];
  61511. }, t.prototype.add = function(e) {
  61512. eF[e](this.opt, this.axisModel, this.group, this._transformGroup);
  61513. }, t.prototype.getGroup = function() {
  61514. return this.group;
  61515. }, t.innerTextLayout = function(e, n, r) {
  61516. var i = PR(n - e), a, o;
  61517. return Lh(i) ? (o = r > 0 ? "top" : "bottom", a = "center") : Lh(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"), {
  61518. rotation: i,
  61519. textAlign: a,
  61520. textVerticalAlign: o
  61521. };
  61522. }, t.makeAxisEventDataBase = function(e) {
  61523. var n = {
  61524. componentType: e.mainType,
  61525. componentIndex: e.componentIndex
  61526. };
  61527. return n[e.mainType + "Index"] = e.componentIndex, n;
  61528. }, t.isLabelSilent = function(e) {
  61529. var n = e.get("tooltip");
  61530. return e.get("silent") || !(e.get("triggerEvent") || n && n.show);
  61531. }, t;
  61532. }()
  61533. ), eF = {
  61534. axisLine: function(t, e, n, r) {
  61535. var i = e.get(["axisLine", "show"]);
  61536. if (i === "auto" && t.handleAutoShown && (i = t.handleAutoShown("axisLine")), !!i) {
  61537. var a = e.axis.getExtent(), o = r.transform, s = [a[0], 0], l = [a[1], 0], u = s[0] > l[0];
  61538. o && (ar(s, s, o), ar(l, l, o));
  61539. var c = le({
  61540. lineCap: "round"
  61541. }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new Un({
  61542. shape: {
  61543. x1: s[0],
  61544. y1: s[1],
  61545. x2: l[0],
  61546. y2: l[1]
  61547. },
  61548. style: c,
  61549. strokeContainThreshold: t.strokeContainThreshold || 5,
  61550. silent: !0,
  61551. z2: 1
  61552. });
  61553. zh(f.shape, f.style.lineWidth), f.anid = "line", n.add(f);
  61554. var d = e.get(["axisLine", "symbol"]);
  61555. if (d != null) {
  61556. var h = e.get(["axisLine", "symbolSize"]);
  61557. Oe(d) && (d = [d, d]), (Oe(h) || St(h)) && (h = [h, h]);
  61558. var p = Vf(e.get(["axisLine", "symbolOffset"]) || 0, h), v = h[0], g = h[1];
  61559. k([{
  61560. rotate: t.rotation + Math.PI / 2,
  61561. offset: p[0],
  61562. r: 0
  61563. }, {
  61564. rotate: t.rotation - Math.PI / 2,
  61565. offset: p[1],
  61566. r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
  61567. }], function(m, y) {
  61568. if (d[y] !== "none" && d[y] != null) {
  61569. var b = $n(d[y], -v / 2, -g / 2, v, g, c.stroke, !0), _ = m.r + m.offset, O = u ? l : s;
  61570. b.attr({
  61571. rotation: m.rotate,
  61572. x: O[0] + _ * Math.cos(t.rotation),
  61573. y: O[1] - _ * Math.sin(t.rotation),
  61574. silent: !0,
  61575. z2: 11
  61576. }), n.add(b);
  61577. }
  61578. });
  61579. }
  61580. }
  61581. },
  61582. axisTickLabel: function(t, e, n, r) {
  61583. var i = L6e(n, r, e, t), a = B6e(n, r, e, t);
  61584. if (k6e(e, a, i), N6e(n, r, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
  61585. var o = mte(ce(a, function(s) {
  61586. return {
  61587. label: s,
  61588. priority: s.z2,
  61589. defaultAttr: {
  61590. ignore: s.ignore
  61591. }
  61592. };
  61593. }));
  61594. _te(o);
  61595. }
  61596. },
  61597. axisName: function(t, e, n, r) {
  61598. var i = Tn(t.axisName, e.get("name"));
  61599. if (i) {
  61600. 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 = [
  61601. a === "start" ? u[0] - c * l : a === "end" ? u[1] + c * l : (u[0] + u[1]) / 2,
  61602. // Reuse labelOffset.
  61603. nF(a) ? t.labelOffset + o * l : 0
  61604. ], d, h = e.get("nameRotate");
  61605. h != null && (h = h * zl / 180);
  61606. var p;
  61607. nF(a) ? d = Kr.innerTextLayout(
  61608. t.rotation,
  61609. h ?? t.rotation,
  61610. // Adapt to axis.
  61611. o
  61612. ) : (d = R6e(t.rotation, a, h || 0, u), p = t.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(d.rotation)), !isFinite(p) && (p = null)));
  61613. var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = Tn(t.nameTruncateMaxWidth, g.maxWidth, p), b = new gt({
  61614. x: f[0],
  61615. y: f[1],
  61616. rotation: d.rotation,
  61617. silent: Kr.isLabelSilent(e),
  61618. style: Zt(s, {
  61619. text: i,
  61620. font: v,
  61621. overflow: "truncate",
  61622. width: y,
  61623. ellipsis: m,
  61624. fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  61625. align: s.get("align") || d.textAlign,
  61626. verticalAlign: s.get("verticalAlign") || d.textVerticalAlign
  61627. }),
  61628. z2: 1
  61629. });
  61630. if (gp({
  61631. el: b,
  61632. componentModel: e,
  61633. itemName: i
  61634. }), b.__fullText = i, b.anid = "name", e.get("triggerEvent")) {
  61635. var _ = Kr.makeAxisEventDataBase(e);
  61636. _.targetType = "axisName", _.name = i, Fe(b).eventData = _;
  61637. }
  61638. r.add(b), b.updateTransform(), n.add(b), b.decomposeTransform();
  61639. }
  61640. }
  61641. };
  61642. function R6e(t, e, n, r) {
  61643. var i = PR(n - t), a, o, s = r[0] > r[1], l = e === "start" && !s || e !== "start" && s;
  61644. return Lh(i - zl / 2) ? (o = l ? "bottom" : "top", a = "center") : Lh(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"), {
  61645. rotation: i,
  61646. textAlign: a,
  61647. textVerticalAlign: o
  61648. };
  61649. }
  61650. function k6e(t, e, n) {
  61651. if (!ite(t.axis)) {
  61652. var r = t.get(["axisLabel", "showMinLabel"]), i = t.get(["axisLabel", "showMaxLabel"]);
  61653. e = e || [], n = n || [];
  61654. 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];
  61655. r === !1 ? (na(a), na(u)) : tF(a, o) && (r ? (na(o), na(c)) : (na(a), na(u))), i === !1 ? (na(s), na(f)) : tF(l, s) && (i ? (na(l), na(d)) : (na(s), na(f)));
  61656. }
  61657. }
  61658. function na(t) {
  61659. t && (t.ignore = !0);
  61660. }
  61661. function tF(t, e) {
  61662. var n = t && t.getBoundingRect().clone(), r = e && e.getBoundingRect().clone();
  61663. if (!(!n || !r)) {
  61664. var i = D0([]);
  61665. return Cu(i, i, -t.rotation), n.applyTransform(Uo([], i, t.getLocalTransform())), r.applyTransform(Uo([], i, e.getLocalTransform())), n.intersect(r);
  61666. }
  61667. }
  61668. function nF(t) {
  61669. return t === "middle" || t === "center";
  61670. }
  61671. function tne(t, e, n, r, i) {
  61672. for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
  61673. var u = t[l].coord;
  61674. o[0] = u, o[1] = 0, s[0] = u, s[1] = n, e && (ar(o, o, e), ar(s, s, e));
  61675. var c = new Un({
  61676. shape: {
  61677. x1: o[0],
  61678. y1: o[1],
  61679. x2: s[0],
  61680. y2: s[1]
  61681. },
  61682. style: r,
  61683. z2: 2,
  61684. autoBatch: !0,
  61685. silent: !0
  61686. });
  61687. zh(c.shape, c.style.lineWidth), c.anid = i + "_" + t[l].tickValue, a.push(c);
  61688. }
  61689. return a;
  61690. }
  61691. function L6e(t, e, n, r) {
  61692. var i = n.axis, a = n.getModel("axisTick"), o = a.get("show");
  61693. if (o === "auto" && r.handleAutoShown && (o = r.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) {
  61694. for (var s = a.getModel("lineStyle"), l = r.tickDirection * a.get("length"), u = i.getTicksCoords(), c = tne(u, e.transform, l, Re(s.getLineStyle(), {
  61695. stroke: n.get(["axisLine", "lineStyle", "color"])
  61696. }), "ticks"), f = 0; f < c.length; f++)
  61697. t.add(c[f]);
  61698. return c;
  61699. }
  61700. }
  61701. function N6e(t, e, n, r) {
  61702. var i = n.axis, a = n.getModel("minorTick");
  61703. if (!(!a.get("show") || i.scale.isBlank())) {
  61704. var o = i.getMinorTicksCoords();
  61705. if (o.length)
  61706. for (var s = a.getModel("lineStyle"), l = r * a.get("length"), u = Re(s.getLineStyle(), Re(n.getModel("axisTick").getLineStyle(), {
  61707. stroke: n.get(["axisLine", "lineStyle", "color"])
  61708. })), c = 0; c < o.length; c++)
  61709. for (var f = tne(o[c], e.transform, l, u, "minorticks_" + c), d = 0; d < f.length; d++)
  61710. t.add(f[d]);
  61711. }
  61712. }
  61713. function B6e(t, e, n, r) {
  61714. var i = n.axis, a = Tn(r.axisLabelShow, n.get(["axisLabel", "show"]));
  61715. if (!(!a || i.scale.isBlank())) {
  61716. var o = n.getModel("axisLabel"), s = o.get("margin"), l = i.getViewLabels(), u = (Tn(r.labelRotate, o.get("rotate")) || 0) * zl / 180, c = Kr.innerTextLayout(r.rotation, u, r.labelDirection), f = n.getCategories && n.getCategories(!0), d = [], h = Kr.isLabelSilent(n), p = n.get("triggerEvent");
  61717. return k(l, function(v, g) {
  61718. var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, b = v.rawLabel, _ = o;
  61719. if (f && f[m]) {
  61720. var O = f[m];
  61721. Ie(O) && O.textStyle && (_ = new Wt(O.textStyle, o, n.ecModel));
  61722. }
  61723. 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({
  61724. x,
  61725. y: r.labelOffset + r.labelDirection * s,
  61726. rotation: c.rotation,
  61727. silent: h,
  61728. z2: 10 + (v.level || 0),
  61729. style: Zt(_, {
  61730. text: y,
  61731. align: g === 0 ? T : g === l.length - 1 ? w : C,
  61732. verticalAlign: g === 0 ? $ : g === l.length - 1 ? A : P,
  61733. fill: Me(S) ? S(
  61734. // (1) In category axis with data zoom, tick is not the original
  61735. // index of axis.data. So tick should not be exposed to user
  61736. // in category axis.
  61737. // (2) Compatible with previous version, which always use formatted label as
  61738. // input. But in interval scale the formatted label is like '223,445', which
  61739. // maked user replace ','. So we modify it to return original val but remain
  61740. // it as 'string' to avoid error in replacing.
  61741. i.type === "category" ? b : i.type === "value" ? m + "" : m,
  61742. g
  61743. ) : S
  61744. })
  61745. });
  61746. if (D.anid = "label_" + m, p) {
  61747. var E = Kr.makeAxisEventDataBase(n);
  61748. E.targetType = "axisLabel", E.value = b, E.tickIndex = g, i.type === "category" && (E.dataIndex = m), Fe(D).eventData = E;
  61749. }
  61750. e.add(D), D.updateTransform(), d.push(D), t.add(D), D.decomposeTransform();
  61751. }), d;
  61752. }
  61753. }
  61754. function z6e(t, e) {
  61755. var n = {
  61756. /**
  61757. * key: makeKey(axis.model)
  61758. * value: {
  61759. * axis,
  61760. * coordSys,
  61761. * axisPointerModel,
  61762. * triggerTooltip,
  61763. * triggerEmphasis,
  61764. * involveSeries,
  61765. * snap,
  61766. * seriesModels,
  61767. * seriesDataCount
  61768. * }
  61769. */
  61770. axesInfo: {},
  61771. seriesInvolved: !1,
  61772. /**
  61773. * key: makeKey(coordSys.model)
  61774. * value: Object: key makeKey(axis.model), value: axisInfo
  61775. */
  61776. coordSysAxesInfo: {},
  61777. coordSysMap: {}
  61778. };
  61779. return V6e(n, t, e), n.seriesInvolved && W6e(n, t), n;
  61780. }
  61781. function V6e(t, e, n) {
  61782. var r = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = [];
  61783. k(n.getCoordinateSystems(), function(s) {
  61784. if (!s.axisPointerEnabled)
  61785. return;
  61786. var l = km(s.model), u = t.coordSysAxesInfo[l] = {};
  61787. t.coordSysMap[l] = s;
  61788. var c = s.model, f = c.getModel("tooltip", r);
  61789. if (k(s.getAxes(), Ue(v, !1, null)), s.getTooltipAxes && r && f.get("show")) {
  61790. var d = f.get("trigger") === "axis", h = f.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(f.get(["axisPointer", "axis"]));
  61791. (d || h) && k(p.baseAxes, Ue(v, h ? "cross" : !0, d)), h && k(p.otherAxes, Ue(v, "cross", !1));
  61792. }
  61793. function v(g, m, y) {
  61794. var b = y.model.getModel("axisPointer", i), _ = b.get("show");
  61795. if (!(!_ || _ === "auto" && !g && !dE(b))) {
  61796. m == null && (m = b.get("triggerTooltip")), b = g ? F6e(y, f, i, e, g, m) : b;
  61797. var O = b.get("snap"), S = b.get("triggerEmphasis"), x = km(y.model), C = m || O || y.type === "category", T = t.axesInfo[x] = {
  61798. key: x,
  61799. axis: y,
  61800. coordSys: s,
  61801. axisPointerModel: b,
  61802. triggerTooltip: m,
  61803. triggerEmphasis: S,
  61804. involveSeries: C,
  61805. snap: O,
  61806. useHandle: dE(b),
  61807. seriesModels: [],
  61808. linkGroup: null
  61809. };
  61810. u[x] = T, t.seriesInvolved = t.seriesInvolved || C;
  61811. var w = Q6e(a, y);
  61812. if (w != null) {
  61813. var P = o[w] || (o[w] = {
  61814. axesInfo: {}
  61815. });
  61816. P.axesInfo[x] = T, P.mapper = a[w].mapper, T.linkGroup = P;
  61817. }
  61818. }
  61819. }
  61820. });
  61821. }
  61822. function F6e(t, e, n, r, i, a) {
  61823. var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
  61824. k(s, function(d) {
  61825. l[d] = Le(o.get(d));
  61826. }), l.snap = t.type !== "category" && !!a, o.get("type") === "cross" && (l.type = "line");
  61827. var u = l.label || (l.label = {});
  61828. if (u.show == null && (u.show = !1), i === "cross") {
  61829. var c = o.get(["label", "show"]);
  61830. if (u.show = c ?? !0, !a) {
  61831. var f = l.lineStyle = o.get("crossStyle");
  61832. f && Re(u, f.textStyle);
  61833. }
  61834. }
  61835. return t.model.getModel("axisPointer", new Wt(l, n, r));
  61836. }
  61837. function W6e(t, e) {
  61838. e.eachSeries(function(n) {
  61839. var r = n.coordinateSystem, i = n.get(["tooltip", "trigger"], !0), a = n.get(["tooltip", "show"], !0);
  61840. !r || i === "none" || i === !1 || i === "item" || a === !1 || n.get(["axisPointer", "show"], !0) === !1 || k(t.coordSysAxesInfo[km(r.model)], function(o) {
  61841. var s = o.axis;
  61842. r.getAxis(s.dim) === s && (o.seriesModels.push(n), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += n.getData().count());
  61843. });
  61844. });
  61845. }
  61846. function Q6e(t, e) {
  61847. for (var n = e.model, r = e.dim, i = 0; i < t.length; i++) {
  61848. var a = t[i] || {};
  61849. if (lP(a[r + "AxisId"], n.id) || lP(a[r + "AxisIndex"], n.componentIndex) || lP(a[r + "AxisName"], n.name))
  61850. return i;
  61851. }
  61852. }
  61853. function lP(t, e) {
  61854. return t === "all" || ue(t) && et(t, e) >= 0 || t === e;
  61855. }
  61856. function H6e(t) {
  61857. var e = Bk(t);
  61858. if (e) {
  61859. var n = e.axisPointerModel, r = e.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
  61860. o != null && (o = r.parse(o));
  61861. var s = dE(n);
  61862. a == null && (i.status = s ? "show" : "hide");
  61863. var l = r.getExtent().slice();
  61864. l[0] > l[1] && l.reverse(), // Pick a value on axis when initializing.
  61865. (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");
  61866. }
  61867. }
  61868. function Bk(t) {
  61869. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  61870. return e && e.axesInfo[km(t)];
  61871. }
  61872. function G6e(t) {
  61873. var e = Bk(t);
  61874. return e && e.axisPointerModel;
  61875. }
  61876. function dE(t) {
  61877. return !!t.get(["handle", "show"]);
  61878. }
  61879. function km(t) {
  61880. return t.type + "||" + t.id;
  61881. }
  61882. var uP = {}, Wf = (
  61883. /** @class */
  61884. function(t) {
  61885. q(e, t);
  61886. function e() {
  61887. var n = t !== null && t.apply(this, arguments) || this;
  61888. return n.type = e.type, n;
  61889. }
  61890. return e.prototype.render = function(n, r, i, a) {
  61891. this.axisPointerClass && H6e(n), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(n, i, !0);
  61892. }, e.prototype.updateAxisPointer = function(n, r, i, a) {
  61893. this._doUpdateAxisPointerClass(n, i, !1);
  61894. }, e.prototype.remove = function(n, r) {
  61895. var i = this._axisPointer;
  61896. i && i.remove(r);
  61897. }, e.prototype.dispose = function(n, r) {
  61898. this._disposeAxisPointer(r), t.prototype.dispose.apply(this, arguments);
  61899. }, e.prototype._doUpdateAxisPointerClass = function(n, r, i) {
  61900. var a = e.getAxisPointerClass(this.axisPointerClass);
  61901. if (a) {
  61902. var o = G6e(n);
  61903. o ? (this._axisPointer || (this._axisPointer = new a())).render(n, o, r, i) : this._disposeAxisPointer(r);
  61904. }
  61905. }, e.prototype._disposeAxisPointer = function(n) {
  61906. this._axisPointer && this._axisPointer.dispose(n), this._axisPointer = null;
  61907. }, e.registerAxisPointerClass = function(n, r) {
  61908. if (process.env.NODE_ENV !== "production" && uP[n])
  61909. throw new Error("axisPointer " + n + " exists");
  61910. uP[n] = r;
  61911. }, e.getAxisPointerClass = function(n) {
  61912. return n && uP[n];
  61913. }, e.type = "axis", e;
  61914. }(Xt)
  61915. ), hE = bt();
  61916. function nne(t, e, n, r) {
  61917. var i = n.axis;
  61918. if (!i.scale.isBlank()) {
  61919. var a = n.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), l = r.coordinateSystem.getRect(), u = i.getTicksCoords({
  61920. tickModel: a,
  61921. clamp: !0
  61922. });
  61923. if (u.length) {
  61924. var c = s.length, f = hE(t).splitAreaColors, d = Pe(), h = 0;
  61925. if (f)
  61926. for (var p = 0; p < u.length; p++) {
  61927. var v = f.get(u[p].tickValue);
  61928. if (v != null) {
  61929. h = (v + (c - 1) * p) % c;
  61930. break;
  61931. }
  61932. }
  61933. var g = i.toGlobalCoord(u[0].coord), m = o.getAreaStyle();
  61934. s = ue(s) ? s : [s];
  61935. for (var p = 1; p < u.length; p++) {
  61936. var y = i.toGlobalCoord(u[p].coord), b = void 0, _ = void 0, O = void 0, S = void 0;
  61937. 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);
  61938. var x = u[p - 1].tickValue;
  61939. x != null && d.set(x, h), e.add(new mt({
  61940. anid: x != null ? "area_" + x : null,
  61941. shape: {
  61942. x: b,
  61943. y: _,
  61944. width: O,
  61945. height: S
  61946. },
  61947. style: Re({
  61948. fill: s[h]
  61949. }, m),
  61950. autoBatch: !0,
  61951. silent: !0
  61952. })), h = (h + 1) % c;
  61953. }
  61954. hE(t).splitAreaColors = d;
  61955. }
  61956. }
  61957. }
  61958. function rne(t) {
  61959. hE(t).splitAreaColors = null;
  61960. }
  61961. var j6e = ["axisLine", "axisTickLabel", "axisName"], Z6e = ["splitArea", "splitLine", "minorSplitLine"], ine = (
  61962. /** @class */
  61963. function(t) {
  61964. q(e, t);
  61965. function e() {
  61966. var n = t !== null && t.apply(this, arguments) || this;
  61967. return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n;
  61968. }
  61969. return e.prototype.render = function(n, r, i, a) {
  61970. this.group.removeAll();
  61971. var o = this._axisGroup;
  61972. if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
  61973. var s = n.getCoordSysModel(), l = fE(s, n), u = new Kr(n, le({
  61974. handleAutoShown: function(f) {
  61975. for (var d = s.coordinateSystem.getCartesians(), h = 0; h < d.length; h++)
  61976. if (nE(d[h].getOtherAxis(n.axis).scale))
  61977. return !0;
  61978. return !1;
  61979. }
  61980. }, l));
  61981. k(j6e, u.add, u), this._axisGroup.add(u.getGroup()), k(Z6e, function(f) {
  61982. n.get([f, "show"]) && U6e[f](this, this._axisGroup, n, s);
  61983. }, this);
  61984. var c = a && a.type === "changeAxisOrder" && a.isInitSort;
  61985. c || W0(o, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
  61986. }
  61987. }, e.prototype.remove = function() {
  61988. rne(this);
  61989. }, e.type = "cartesianAxis", e;
  61990. }(Wf)
  61991. ), U6e = {
  61992. splitLine: function(t, e, n, r) {
  61993. var i = n.axis;
  61994. if (!i.scale.isBlank()) {
  61995. var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
  61996. s = ue(s) ? s : [s];
  61997. for (var l = r.coordinateSystem.getRect(), u = i.isHorizontal(), c = 0, f = i.getTicksCoords({
  61998. tickModel: a
  61999. }), d = [], h = [], p = o.getLineStyle(), v = 0; v < f.length; v++) {
  62000. var g = i.toGlobalCoord(f[v].coord);
  62001. 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);
  62002. var m = c++ % s.length, y = f[v].tickValue, b = new Un({
  62003. anid: y != null ? "line_" + f[v].tickValue : null,
  62004. autoBatch: !0,
  62005. shape: {
  62006. x1: d[0],
  62007. y1: d[1],
  62008. x2: h[0],
  62009. y2: h[1]
  62010. },
  62011. style: Re({
  62012. stroke: s[m]
  62013. }, p),
  62014. silent: !0
  62015. });
  62016. zh(b.shape, p.lineWidth), e.add(b);
  62017. }
  62018. }
  62019. },
  62020. minorSplitLine: function(t, e, n, r) {
  62021. var i = n.axis, a = n.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = r.coordinateSystem.getRect(), l = i.isHorizontal(), u = i.getMinorTicksCoords();
  62022. if (u.length)
  62023. for (var c = [], f = [], d = o.getLineStyle(), h = 0; h < u.length; h++)
  62024. for (var p = 0; p < u[h].length; p++) {
  62025. var v = i.toGlobalCoord(u[h][p].coord);
  62026. 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);
  62027. var g = new Un({
  62028. anid: "minor_line_" + u[h][p].tickValue,
  62029. autoBatch: !0,
  62030. shape: {
  62031. x1: c[0],
  62032. y1: c[1],
  62033. x2: f[0],
  62034. y2: f[1]
  62035. },
  62036. style: d,
  62037. silent: !0
  62038. });
  62039. zh(g.shape, d.lineWidth), e.add(g);
  62040. }
  62041. },
  62042. splitArea: function(t, e, n, r) {
  62043. nne(t, e, n, r);
  62044. }
  62045. }, ane = (
  62046. /** @class */
  62047. function(t) {
  62048. q(e, t);
  62049. function e() {
  62050. var n = t !== null && t.apply(this, arguments) || this;
  62051. return n.type = e.type, n;
  62052. }
  62053. return e.type = "xAxis", e;
  62054. }(ine)
  62055. ), X6e = (
  62056. /** @class */
  62057. function(t) {
  62058. q(e, t);
  62059. function e() {
  62060. var n = t !== null && t.apply(this, arguments) || this;
  62061. return n.type = ane.type, n;
  62062. }
  62063. return e.type = "yAxis", e;
  62064. }(ine)
  62065. ), Y6e = (
  62066. /** @class */
  62067. function(t) {
  62068. q(e, t);
  62069. function e() {
  62070. var n = t !== null && t.apply(this, arguments) || this;
  62071. return n.type = "grid", n;
  62072. }
  62073. return e.prototype.render = function(n, r) {
  62074. this.group.removeAll(), n.get("show") && this.group.add(new mt({
  62075. shape: n.coordinateSystem.getRect(),
  62076. style: Re({
  62077. fill: n.get("backgroundColor")
  62078. }, n.getItemStyle()),
  62079. silent: !0,
  62080. z2: -1
  62081. }));
  62082. }, e.type = "grid", e;
  62083. }(Xt)
  62084. ), rF = {
  62085. // gridIndex: 0,
  62086. // gridId: '',
  62087. offset: 0
  62088. };
  62089. function one(t) {
  62090. t.registerComponentView(Y6e), t.registerComponentModel(w6e), t.registerCoordinateSystem("cartesian2d", I6e), Qh(t, "x", uE, rF), Qh(t, "y", uE, rF), t.registerComponentView(ane), t.registerComponentView(X6e), t.registerPreprocessor(function(e) {
  62091. e.xAxis && e.yAxis && !e.grid && (e.grid = {});
  62092. });
  62093. }
  62094. function q6e(t) {
  62095. at(one), t.registerSeriesModel(b6e), t.registerChartView(x6e), t.registerLayout(X0("scatter"));
  62096. }
  62097. function K6e(t) {
  62098. t.eachSeriesByType("radar", function(e) {
  62099. var n = e.getData(), r = [], i = e.coordinateSystem;
  62100. if (i) {
  62101. var a = i.getIndicatorAxes();
  62102. k(a, function(o, s) {
  62103. n.each(n.mapDimension(a[s].dim), function(l, u) {
  62104. r[u] = r[u] || [];
  62105. var c = i.dataToPoint(l, s);
  62106. r[u][s] = iF(c) ? c : aF(i);
  62107. });
  62108. }), n.each(function(o) {
  62109. var s = wq(r[o], function(l) {
  62110. return iF(l);
  62111. }) || aF(i);
  62112. r[o].push(s.slice()), n.setItemLayout(o, r[o]);
  62113. });
  62114. }
  62115. });
  62116. }
  62117. function iF(t) {
  62118. return !isNaN(t[0]) && !isNaN(t[1]);
  62119. }
  62120. function aF(t) {
  62121. return [t.cx, t.cy];
  62122. }
  62123. function J6e(t) {
  62124. var e = t.polar;
  62125. if (e) {
  62126. ue(e) || (e = [e]);
  62127. var n = [];
  62128. k(e, function(r, i) {
  62129. 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);
  62130. }), t.polar = n;
  62131. }
  62132. k(t.series, function(r) {
  62133. r && r.type === "radar" && r.polarIndex && (r.radarIndex = r.polarIndex);
  62134. });
  62135. }
  62136. var eBe = (
  62137. /** @class */
  62138. function(t) {
  62139. q(e, t);
  62140. function e() {
  62141. var n = t !== null && t.apply(this, arguments) || this;
  62142. return n.type = e.type, n;
  62143. }
  62144. return e.prototype.render = function(n, r, i) {
  62145. var a = n.coordinateSystem, o = this.group, s = n.getData(), l = this._data;
  62146. function u(d, h) {
  62147. var p = d.getItemVisual(h, "symbol") || "circle";
  62148. if (p !== "none") {
  62149. var v = xp(d.getItemVisual(h, "symbolSize")), g = $n(p, -1, -1, 2, 2), m = d.getItemVisual(h, "symbolRotate") || 0;
  62150. return g.attr({
  62151. style: {
  62152. strokeNoScale: !0
  62153. },
  62154. z2: 100,
  62155. scaleX: v[0] / 2,
  62156. scaleY: v[1] / 2,
  62157. rotation: m * Math.PI / 180 || 0
  62158. }), g;
  62159. }
  62160. }
  62161. function c(d, h, p, v, g, m) {
  62162. p.removeAll();
  62163. for (var y = 0; y < h.length - 1; y++) {
  62164. var b = u(v, g);
  62165. b && (b.__dimIdx = y, d[y] ? (b.setPosition(d[y]), Lf[m ? "initProps" : "updateProps"](b, {
  62166. x: h[y][0],
  62167. y: h[y][1]
  62168. }, n, g)) : b.setPosition(h[y]), p.add(b));
  62169. }
  62170. }
  62171. function f(d) {
  62172. return ce(d, function(h) {
  62173. return [a.cx, a.cy];
  62174. });
  62175. }
  62176. s.diff(l).add(function(d) {
  62177. var h = s.getItemLayout(d);
  62178. if (h) {
  62179. var p = new ii(), v = new ai(), g = {
  62180. shape: {
  62181. points: h
  62182. }
  62183. };
  62184. p.shape.points = f(h), v.shape.points = f(h), Yt(p, g, n, d), Yt(v, g, n, d);
  62185. var m = new Ve(), y = new Ve();
  62186. m.add(v), m.add(p), m.add(y), c(v.shape.points, h, y, s, d, !0), s.setItemGraphicEl(d, m);
  62187. }
  62188. }).update(function(d, h) {
  62189. var p = l.getItemGraphicEl(h), v = p.childAt(0), g = p.childAt(1), m = p.childAt(2), y = {
  62190. shape: {
  62191. points: s.getItemLayout(d)
  62192. }
  62193. };
  62194. y.shape.points && (c(v.shape.points, y.shape.points, m, s, d, !1), so(g), so(v), Ct(v, y, n), Ct(g, y, n), s.setItemGraphicEl(d, p));
  62195. }).remove(function(d) {
  62196. o.remove(l.getItemGraphicEl(d));
  62197. }).execute(), s.eachItemGraphicEl(function(d, h) {
  62198. 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;
  62199. o.add(d), v.useStyle(Re(p.getModel("lineStyle").getLineStyle(), {
  62200. fill: "none",
  62201. stroke: b
  62202. })), Tr(v, p, "lineStyle"), Tr(g, p, "areaStyle");
  62203. var _ = p.getModel("areaStyle"), O = _.isEmpty() && _.parentModel.isEmpty();
  62204. g.ignore = O, k(["emphasis", "select", "blur"], function(C) {
  62205. var T = p.getModel([C, "areaStyle"]), w = T.isEmpty() && T.parentModel.isEmpty();
  62206. g.ensureState(C).ignore = w && O;
  62207. }), g.useStyle(Re(_.getAreaStyle(), {
  62208. fill: b,
  62209. opacity: 0.7,
  62210. decal: y.decal
  62211. }));
  62212. var S = p.getModel("emphasis"), x = S.getModel("itemStyle").getItemStyle();
  62213. m.eachChild(function(C) {
  62214. if (C instanceof lr) {
  62215. var T = C.style;
  62216. C.useStyle(le({
  62217. // TODO other properties like x, y ?
  62218. image: T.image,
  62219. x: T.x,
  62220. y: T.y,
  62221. width: T.width,
  62222. height: T.height
  62223. }, y));
  62224. } else
  62225. C.useStyle(y), C.setColor(b), C.style.strokeNoScale = !0;
  62226. var w = C.ensureState("emphasis");
  62227. w.style = Le(x);
  62228. var P = s.getStore().get(s.getDimensionIndex(C.__dimIdx), h);
  62229. (P == null || isNaN(P)) && (P = ""), Pr(C, er(p), {
  62230. labelFetcher: s.hostModel,
  62231. labelDataIndex: h,
  62232. labelDimIndex: C.__dimIdx,
  62233. defaultText: P,
  62234. inheritColor: b,
  62235. defaultOpacity: y.opacity
  62236. });
  62237. }), bn(d, S.get("focus"), S.get("blurScope"), S.get("disabled"));
  62238. }), this._data = s;
  62239. }, e.prototype.remove = function() {
  62240. this.group.removeAll(), this._data = null;
  62241. }, e.type = "radar", e;
  62242. }(zt)
  62243. ), tBe = (
  62244. /** @class */
  62245. function(t) {
  62246. q(e, t);
  62247. function e() {
  62248. var n = t !== null && t.apply(this, arguments) || this;
  62249. return n.type = e.type, n.hasSymbolVisual = !0, n;
  62250. }
  62251. return e.prototype.init = function(n) {
  62252. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this));
  62253. }, e.prototype.getInitialData = function(n, r) {
  62254. return Pp(this, {
  62255. generateCoord: "indicator_",
  62256. generateCoordCount: 1 / 0
  62257. });
  62258. }, e.prototype.formatTooltip = function(n, r, i) {
  62259. var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(n), u = l === "" ? this.name : l, c = nee(this, n);
  62260. return tr("section", {
  62261. header: u,
  62262. sortBlocks: !0,
  62263. blocks: ce(s, function(f) {
  62264. var d = a.get(a.mapDimension(f.dim), n);
  62265. return tr("nameValue", {
  62266. markerType: "subItem",
  62267. markerColor: c,
  62268. name: f.name,
  62269. value: d,
  62270. sortParam: d
  62271. });
  62272. })
  62273. });
  62274. }, e.prototype.getTooltipPosition = function(n) {
  62275. if (n != null) {
  62276. for (var r = this.getData(), i = this.coordinateSystem, a = r.getValues(ce(i.dimensions, function(u) {
  62277. return r.mapDimension(u);
  62278. }), n), o = 0, s = a.length; o < s; o++)
  62279. if (!isNaN(a[o])) {
  62280. var l = i.getIndicatorAxes();
  62281. return i.coordToPoint(l[o].dataToCoord(a[o]), o);
  62282. }
  62283. }
  62284. }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
  62285. // zlevel: 0,
  62286. z: 2,
  62287. colorBy: "data",
  62288. coordinateSystem: "radar",
  62289. legendHoverLink: !0,
  62290. radarIndex: 0,
  62291. lineStyle: {
  62292. width: 2,
  62293. type: "solid",
  62294. join: "round"
  62295. },
  62296. label: {
  62297. position: "top"
  62298. },
  62299. // areaStyle: {
  62300. // },
  62301. // itemStyle: {}
  62302. symbolSize: 8
  62303. // symbolRotate: null
  62304. }, e;
  62305. }(Ht)
  62306. ), gv = Jte.value;
  62307. function wb(t, e) {
  62308. return Re({
  62309. show: e
  62310. }, t);
  62311. }
  62312. var nBe = (
  62313. /** @class */
  62314. function(t) {
  62315. q(e, t);
  62316. function e() {
  62317. var n = t !== null && t.apply(this, arguments) || this;
  62318. return n.type = e.type, n;
  62319. }
  62320. return e.prototype.optionUpdated = function() {
  62321. 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) {
  62322. p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
  62323. var v = l;
  62324. p.color != null && (v = Re({
  62325. color: p.color
  62326. }, l));
  62327. var g = qe(Le(p), {
  62328. boundaryGap: n,
  62329. splitNumber: r,
  62330. scale: i,
  62331. axisLine: a,
  62332. axisTick: o,
  62333. // axisType: axisType,
  62334. axisLabel: s,
  62335. // Compatible with 2 and use text
  62336. name: p.text,
  62337. showName: u,
  62338. nameLocation: "end",
  62339. nameGap: f,
  62340. // min: 0,
  62341. nameTextStyle: v,
  62342. triggerEvent: d
  62343. }, !1);
  62344. if (Oe(c)) {
  62345. var m = g.name;
  62346. g.name = c.replace("{value}", m ?? "");
  62347. } else Me(c) && (g.name = c(g.name, g));
  62348. var y = new Wt(g, null, this.ecModel);
  62349. return xn(y, Tp.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y;
  62350. }, this);
  62351. this._indicatorModels = h;
  62352. }, e.prototype.getIndicatorModels = function() {
  62353. return this._indicatorModels;
  62354. }, e.type = "radar", e.defaultOption = {
  62355. // zlevel: 0,
  62356. z: 0,
  62357. center: ["50%", "50%"],
  62358. radius: "75%",
  62359. startAngle: 90,
  62360. axisName: {
  62361. show: !0
  62362. // formatter: null
  62363. // textStyle: {}
  62364. },
  62365. boundaryGap: [0, 0],
  62366. splitNumber: 5,
  62367. axisNameGap: 15,
  62368. scale: !1,
  62369. // Polygon or circle
  62370. shape: "polygon",
  62371. axisLine: qe({
  62372. lineStyle: {
  62373. color: "#bbb"
  62374. }
  62375. }, gv.axisLine),
  62376. axisLabel: wb(gv.axisLabel, !1),
  62377. axisTick: wb(gv.axisTick, !1),
  62378. // axisType: 'value',
  62379. splitLine: wb(gv.splitLine, !0),
  62380. splitArea: wb(gv.splitArea, !0),
  62381. // {text, min, max}
  62382. indicator: []
  62383. }, e;
  62384. }(rt)
  62385. ), rBe = ["axisLine", "axisTickLabel", "axisName"], iBe = (
  62386. /** @class */
  62387. function(t) {
  62388. q(e, t);
  62389. function e() {
  62390. var n = t !== null && t.apply(this, arguments) || this;
  62391. return n.type = e.type, n;
  62392. }
  62393. return e.prototype.render = function(n, r, i) {
  62394. var a = this.group;
  62395. a.removeAll(), this._buildAxes(n), this._buildSplitLineAndArea(n);
  62396. }, e.prototype._buildAxes = function(n) {
  62397. var r = n.coordinateSystem, i = r.getIndicatorAxes(), a = ce(i, function(o) {
  62398. var s = o.model.get("showName") ? o.name : "", l = new Kr(o.model, {
  62399. axisName: s,
  62400. position: [r.cx, r.cy],
  62401. rotation: o.angle,
  62402. labelDirection: -1,
  62403. tickDirection: -1,
  62404. nameDirection: 1
  62405. });
  62406. return l;
  62407. });
  62408. k(a, function(o) {
  62409. k(rBe, o.add, o), this.group.add(o.getGroup());
  62410. }, this);
  62411. }, e.prototype._buildSplitLineAndArea = function(n) {
  62412. var r = n.coordinateSystem, i = r.getIndicatorAxes();
  62413. if (!i.length)
  62414. return;
  62415. 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 = [];
  62416. function y(E, R, N) {
  62417. var V = N % R.length;
  62418. return E[V] = E[V] || [], V;
  62419. }
  62420. if (a === "circle")
  62421. for (var b = i[0].getTicksCoords(), _ = r.cx, O = r.cy, S = 0; S < b.length; S++) {
  62422. if (c) {
  62423. var x = y(g, p, S);
  62424. g[x].push(new ll({
  62425. shape: {
  62426. cx: _,
  62427. cy: O,
  62428. r: b[S].coord
  62429. }
  62430. }));
  62431. }
  62432. if (f && S < b.length - 1) {
  62433. var x = y(m, v, S);
  62434. m[x].push(new z0({
  62435. shape: {
  62436. cx: _,
  62437. cy: O,
  62438. r0: b[S].coord,
  62439. r: b[S + 1].coord
  62440. }
  62441. }));
  62442. }
  62443. }
  62444. else
  62445. for (var C, T = ce(i, function(E, R) {
  62446. var N = E.getTicksCoords();
  62447. return C = C == null ? N.length - 1 : Math.min(N.length - 1, C), ce(N, function(V) {
  62448. return r.coordToPoint(V.coord, R);
  62449. });
  62450. }), w = [], S = 0; S <= C; S++) {
  62451. for (var P = [], $ = 0; $ < i.length; $++)
  62452. P.push(T[$][S]);
  62453. if (P[0] ? P.push(P[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + S), c) {
  62454. var x = y(g, p, S);
  62455. g[x].push(new ai({
  62456. shape: {
  62457. points: P
  62458. }
  62459. }));
  62460. }
  62461. if (f && w) {
  62462. var x = y(m, v, S - 1);
  62463. m[x].push(new ii({
  62464. shape: {
  62465. points: P.concat(w)
  62466. }
  62467. }));
  62468. }
  62469. w = P.slice().reverse();
  62470. }
  62471. var A = l.getLineStyle(), D = u.getAreaStyle();
  62472. k(m, function(E, R) {
  62473. this.group.add(Li(E, {
  62474. style: Re({
  62475. stroke: "none",
  62476. fill: v[R % v.length]
  62477. }, D),
  62478. silent: !0
  62479. }));
  62480. }, this), k(g, function(E, R) {
  62481. this.group.add(Li(E, {
  62482. style: Re({
  62483. fill: "none",
  62484. stroke: p[R % p.length]
  62485. }, A),
  62486. silent: !0
  62487. }));
  62488. }, this);
  62489. }, e.type = "radar", e;
  62490. }(Xt)
  62491. ), aBe = (
  62492. /** @class */
  62493. function(t) {
  62494. q(e, t);
  62495. function e(n, r, i) {
  62496. var a = t.call(this, n, r, i) || this;
  62497. return a.type = "value", a.angle = 0, a.name = "", a;
  62498. }
  62499. return e;
  62500. }(Ba)
  62501. ), oBe = (
  62502. /** @class */
  62503. function() {
  62504. function t(e, n, r) {
  62505. this.dimensions = [], this._model = e, this._indicatorAxes = ce(e.getIndicatorModels(), function(i, a) {
  62506. var o = "indicator_" + a, s = new aBe(
  62507. o,
  62508. new Ys()
  62509. // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
  62510. );
  62511. return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s;
  62512. }, this), this.resize(e, r);
  62513. }
  62514. return t.prototype.getIndicatorAxes = function() {
  62515. return this._indicatorAxes;
  62516. }, t.prototype.dataToPoint = function(e, n) {
  62517. var r = this._indicatorAxes[n];
  62518. return this.coordToPoint(r.dataToCoord(e), n);
  62519. }, t.prototype.coordToPoint = function(e, n) {
  62520. var r = this._indicatorAxes[n], i = r.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i);
  62521. return [a, o];
  62522. }, t.prototype.pointToData = function(e) {
  62523. var n = e[0] - this.cx, r = e[1] - this.cy, i = Math.sqrt(n * n + r * r);
  62524. n /= i, r /= i;
  62525. for (var a = Math.atan2(-r, n), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
  62526. var c = this._indicatorAxes[u], f = Math.abs(a - c.angle);
  62527. f < o && (s = c, l = u, o = f);
  62528. }
  62529. return [l, +(s && s.coordToData(i))];
  62530. }, t.prototype.resize = function(e, n) {
  62531. var r = e.get("center"), i = n.getWidth(), a = n.getHeight(), o = Math.min(i, a) / 2;
  62532. this.cx = _e(r[0], i), this.cy = _e(r[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180;
  62533. var s = e.get("radius");
  62534. (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) {
  62535. l.setExtent(this.r0, this.r);
  62536. var c = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
  62537. c = Math.atan2(Math.sin(c), Math.cos(c)), l.angle = c;
  62538. }, this);
  62539. }, t.prototype.update = function(e, n) {
  62540. var r = this._indicatorAxes, i = this._model;
  62541. k(r, function(s) {
  62542. s.scale.setExtent(1 / 0, -1 / 0);
  62543. }), e.eachSeriesByType("radar", function(s, l) {
  62544. if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) {
  62545. var u = s.getData();
  62546. k(r, function(c) {
  62547. c.scale.unionExtentFromData(u, u.mapDimension(c.dim));
  62548. });
  62549. }
  62550. }, this);
  62551. var a = i.get("splitNumber"), o = new Ys();
  62552. o.setExtent(0, a), o.setInterval(1), k(r, function(s, l) {
  62553. ene(s.scale, s.model, o);
  62554. });
  62555. }, t.prototype.convertToPixel = function(e, n, r) {
  62556. return console.warn("Not implemented."), null;
  62557. }, t.prototype.convertFromPixel = function(e, n, r) {
  62558. return console.warn("Not implemented."), null;
  62559. }, t.prototype.containPoint = function(e) {
  62560. return console.warn("Not implemented."), !1;
  62561. }, t.create = function(e, n) {
  62562. var r = [];
  62563. return e.eachComponent("radar", function(i) {
  62564. var a = new t(i, e, n);
  62565. r.push(a), i.coordinateSystem = a;
  62566. }), e.eachSeriesByType("radar", function(i) {
  62567. i.get("coordinateSystem") === "radar" && (i.coordinateSystem = r[i.get("radarIndex") || 0]);
  62568. }), r;
  62569. }, t.dimensions = [], t;
  62570. }()
  62571. );
  62572. function sBe(t) {
  62573. t.registerCoordinateSystem("radar", oBe), t.registerComponentModel(nBe), t.registerComponentView(iBe), t.registerVisual({
  62574. seriesType: "radar",
  62575. reset: function(e) {
  62576. var n = e.getData();
  62577. n.each(function(r) {
  62578. n.setItemVisual(r, "legendIcon", "roundRect");
  62579. }), n.setVisual("legendIcon", "roundRect");
  62580. }
  62581. });
  62582. }
  62583. function lBe(t) {
  62584. at(sBe), t.registerChartView(eBe), t.registerSeriesModel(tBe), t.registerLayout(K6e), t.registerProcessor(Y0("radar")), t.registerPreprocessor(J6e);
  62585. }
  62586. var oF = "\0_ec_interaction_mutex";
  62587. function uBe(t, e, n) {
  62588. var r = zk(t);
  62589. r[e] = n;
  62590. }
  62591. function cBe(t, e, n) {
  62592. var r = zk(t), i = r[e];
  62593. i === n && (r[e] = null);
  62594. }
  62595. function sF(t, e) {
  62596. return !!zk(t)[e];
  62597. }
  62598. function zk(t) {
  62599. return t[oF] || (t[oF] = {});
  62600. }
  62601. vo({
  62602. type: "takeGlobalCursor",
  62603. event: "globalCursorTaken",
  62604. update: "update"
  62605. }, On);
  62606. var K0 = (
  62607. /** @class */
  62608. function(t) {
  62609. q(e, t);
  62610. function e(n) {
  62611. var r = t.call(this) || this;
  62612. r._zr = n;
  62613. 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);
  62614. return r.enable = function(u, c) {
  62615. this.disable(), this._opt = Re(Le(c) || {}, {
  62616. zoomOnMouseWheel: !0,
  62617. moveOnMouseMove: !0,
  62618. // By default, wheel do not trigger move.
  62619. moveOnMouseWheel: !1,
  62620. preventDefaultMouseMove: !0
  62621. }), 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));
  62622. }, r.disable = function() {
  62623. n.off("mousedown", i), n.off("mousemove", a), n.off("mouseup", o), n.off("mousewheel", s), n.off("pinch", l);
  62624. }, r;
  62625. }
  62626. return e.prototype.isDragging = function() {
  62627. return this._dragging;
  62628. }, e.prototype.isPinching = function() {
  62629. return this._pinching;
  62630. }, e.prototype.setPointerChecker = function(n) {
  62631. this.pointerChecker = n;
  62632. }, e.prototype.dispose = function() {
  62633. this.disable();
  62634. }, e.prototype._mousedownHandler = function(n) {
  62635. if (!k6(n)) {
  62636. for (var r = n.target; r; ) {
  62637. if (r.draggable)
  62638. return;
  62639. r = r.__hostTarget || r.parent;
  62640. }
  62641. var i = n.offsetX, a = n.offsetY;
  62642. this.pointerChecker && this.pointerChecker(n, i, a) && (this._x = i, this._y = a, this._dragging = !0);
  62643. }
  62644. }, e.prototype._mousemoveHandler = function(n) {
  62645. if (!(!this._dragging || !Z_("moveOnMouseMove", n, this._opt) || n.gestureEvent === "pinch" || sF(this._zr, "globalPan"))) {
  62646. var r = n.offsetX, i = n.offsetY, a = this._x, o = this._y, s = r - a, l = i - o;
  62647. this._x = r, this._y = i, this._opt.preventDefaultMouseMove && Gs(n.event), sne(this, "pan", "moveOnMouseMove", n, {
  62648. dx: s,
  62649. dy: l,
  62650. oldX: a,
  62651. oldY: o,
  62652. newX: r,
  62653. newY: i,
  62654. isAvailableBehavior: null
  62655. });
  62656. }
  62657. }, e.prototype._mouseupHandler = function(n) {
  62658. k6(n) || (this._dragging = !1);
  62659. }, e.prototype._mousewheelHandler = function(n) {
  62660. var r = Z_("zoomOnMouseWheel", n, this._opt), i = Z_("moveOnMouseWheel", n, this._opt), a = n.wheelDelta, o = Math.abs(a), s = n.offsetX, l = n.offsetY;
  62661. if (!(a === 0 || !r && !i)) {
  62662. if (r) {
  62663. var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? u : 1 / u;
  62664. cP(this, "zoom", "zoomOnMouseWheel", n, {
  62665. scale: c,
  62666. originX: s,
  62667. originY: l,
  62668. isAvailableBehavior: null
  62669. });
  62670. }
  62671. if (i) {
  62672. var f = Math.abs(a), d = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05);
  62673. cP(this, "scrollMove", "moveOnMouseWheel", n, {
  62674. scrollDelta: d,
  62675. originX: s,
  62676. originY: l,
  62677. isAvailableBehavior: null
  62678. });
  62679. }
  62680. }
  62681. }, e.prototype._pinchHandler = function(n) {
  62682. if (!sF(this._zr, "globalPan")) {
  62683. var r = n.pinchScale > 1 ? 1.1 : 1 / 1.1;
  62684. cP(this, "zoom", null, n, {
  62685. scale: r,
  62686. originX: n.pinchX,
  62687. originY: n.pinchY,
  62688. isAvailableBehavior: null
  62689. });
  62690. }
  62691. }, e;
  62692. }(Ra)
  62693. );
  62694. function cP(t, e, n, r, i) {
  62695. t.pointerChecker && t.pointerChecker(r, i.originX, i.originY) && (Gs(r.event), sne(t, e, n, r, i));
  62696. }
  62697. function sne(t, e, n, r, i) {
  62698. i.isAvailableBehavior = xe(Z_, null, n, r), t.trigger(e, i);
  62699. }
  62700. function Z_(t, e, n) {
  62701. var r = n[t];
  62702. return !t || r && (!Oe(r) || e.event[r + "Key"]);
  62703. }
  62704. function Vk(t, e, n) {
  62705. var r = t.target;
  62706. r.x += e, r.y += n, r.dirty();
  62707. }
  62708. function Fk(t, e, n, r) {
  62709. var i = t.target, a = t.zoomLimit, o = t.zoom = t.zoom || 1;
  62710. if (o *= e, a) {
  62711. var s = a.min || 0, l = a.max || 1 / 0;
  62712. o = Math.max(Math.min(l, o), s);
  62713. }
  62714. var u = o / t.zoom;
  62715. 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();
  62716. }
  62717. var fBe = {
  62718. axisPointer: 1,
  62719. tooltip: 1,
  62720. brush: 1
  62721. };
  62722. function mw(t, e, n) {
  62723. var r = e.getComponentByElement(t.topTarget), i = r && r.coordinateSystem;
  62724. return r && r !== n && !fBe.hasOwnProperty(r.mainType) && i && i.model !== n;
  62725. }
  62726. function lne(t) {
  62727. if (Oe(t)) {
  62728. var e = new DOMParser();
  62729. t = e.parseFromString(t, "text/xml");
  62730. }
  62731. var n = t;
  62732. for (n.nodeType === 9 && (n = n.firstChild); n.nodeName.toLowerCase() !== "svg" || n.nodeType !== 1; )
  62733. n = n.nextSibling;
  62734. return n;
  62735. }
  62736. var fP, EO = {
  62737. fill: "fill",
  62738. stroke: "stroke",
  62739. "stroke-width": "lineWidth",
  62740. opacity: "opacity",
  62741. "fill-opacity": "fillOpacity",
  62742. "stroke-opacity": "strokeOpacity",
  62743. "stroke-dasharray": "lineDash",
  62744. "stroke-dashoffset": "lineDashOffset",
  62745. "stroke-linecap": "lineCap",
  62746. "stroke-linejoin": "lineJoin",
  62747. "stroke-miterlimit": "miterLimit",
  62748. "font-family": "fontFamily",
  62749. "font-size": "fontSize",
  62750. "font-style": "fontStyle",
  62751. "font-weight": "fontWeight",
  62752. "text-anchor": "textAlign",
  62753. visibility: "visibility",
  62754. display: "display"
  62755. }, lF = st(EO), MO = {
  62756. "alignment-baseline": "textBaseline",
  62757. "stop-color": "stopColor"
  62758. }, uF = st(MO), dBe = function() {
  62759. function t() {
  62760. this._defs = {}, this._root = null;
  62761. }
  62762. return t.prototype.parse = function(e, n) {
  62763. n = n || {};
  62764. var r = lne(e);
  62765. if (process.env.NODE_ENV !== "production" && !r)
  62766. throw new Error("Illegal svg");
  62767. this._defsUsePending = [];
  62768. var i = new Ve();
  62769. this._root = i;
  62770. var a = [], o = r.getAttribute("viewBox") || "", s = parseFloat(r.getAttribute("width") || n.width), l = parseFloat(r.getAttribute("height") || n.height);
  62771. isNaN(s) && (s = null), isNaN(l) && (l = null), $i(r, i, null, !0, !1);
  62772. for (var u = r.firstChild; u; )
  62773. this._parseNode(u, i, a, null, !1, !1), u = u.nextSibling;
  62774. vBe(this._defs, this._defsUsePending), this._defsUsePending = [];
  62775. var c, f;
  62776. if (o) {
  62777. var d = yw(o);
  62778. d.length >= 4 && (c = {
  62779. x: parseFloat(d[0] || 0),
  62780. y: parseFloat(d[1] || 0),
  62781. width: parseFloat(d[2]),
  62782. height: parseFloat(d[3])
  62783. });
  62784. }
  62785. if (c && s != null && l != null && (f = cne(c, { x: 0, y: 0, width: s, height: l }), !n.ignoreViewBox)) {
  62786. var h = i;
  62787. i = new Ve(), i.add(h), h.scaleX = h.scaleY = f.scale, h.x = f.x, h.y = f.y;
  62788. }
  62789. return !n.ignoreRootClip && s != null && l != null && i.setClipPath(new mt({
  62790. shape: { x: 0, y: 0, width: s, height: l }
  62791. })), {
  62792. root: i,
  62793. width: s,
  62794. height: l,
  62795. viewBoxRect: c,
  62796. viewBoxTransform: f,
  62797. named: a
  62798. };
  62799. }, t.prototype._parseNode = function(e, n, r, i, a, o) {
  62800. var s = e.nodeName.toLowerCase(), l, u = i;
  62801. if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
  62802. l = n;
  62803. else {
  62804. if (!a) {
  62805. var c = fP[s];
  62806. if (c && Ce(fP, s)) {
  62807. l = c.call(this, e, n);
  62808. var f = e.getAttribute("name");
  62809. if (f) {
  62810. var d = {
  62811. name: f,
  62812. namedFrom: null,
  62813. svgNodeTagLower: s,
  62814. el: l
  62815. };
  62816. r.push(d), s === "g" && (u = d);
  62817. } else i && r.push({
  62818. name: i.name,
  62819. namedFrom: i,
  62820. svgNodeTagLower: s,
  62821. el: l
  62822. });
  62823. n.add(l);
  62824. }
  62825. }
  62826. var h = cF[s];
  62827. if (h && Ce(cF, s)) {
  62828. var p = h.call(this, e), v = e.getAttribute("id");
  62829. v && (this._defs[v] = p);
  62830. }
  62831. }
  62832. if (l && l.isGroup)
  62833. for (var g = e.firstChild; g; )
  62834. g.nodeType === 1 ? this._parseNode(g, l, r, u, a, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
  62835. }, t.prototype._parseText = function(e, n) {
  62836. var r = new Bh({
  62837. style: {
  62838. text: e.textContent
  62839. },
  62840. silent: !0,
  62841. x: this._textX || 0,
  62842. y: this._textY || 0
  62843. });
  62844. ra(n, r), $i(e, r, this._defsUsePending, !1, !1), hBe(r, n);
  62845. var i = r.style, a = i.fontSize;
  62846. a && a < 9 && (i.fontSize = 9, r.scaleX *= a / 9, r.scaleY *= a / 9);
  62847. var o = (i.fontSize || i.fontFamily) && [
  62848. i.fontStyle,
  62849. i.fontWeight,
  62850. (i.fontSize || 12) + "px",
  62851. i.fontFamily || "sans-serif"
  62852. ].join(" ");
  62853. i.font = o;
  62854. var s = r.getBoundingRect();
  62855. return this._textX += s.width, n.add(r), r;
  62856. }, t.internalField = function() {
  62857. fP = {
  62858. g: function(e, n) {
  62859. var r = new Ve();
  62860. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r;
  62861. },
  62862. rect: function(e, n) {
  62863. var r = new mt();
  62864. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62865. x: parseFloat(e.getAttribute("x") || "0"),
  62866. y: parseFloat(e.getAttribute("y") || "0"),
  62867. width: parseFloat(e.getAttribute("width") || "0"),
  62868. height: parseFloat(e.getAttribute("height") || "0")
  62869. }), r.silent = !0, r;
  62870. },
  62871. circle: function(e, n) {
  62872. var r = new ll();
  62873. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62874. cx: parseFloat(e.getAttribute("cx") || "0"),
  62875. cy: parseFloat(e.getAttribute("cy") || "0"),
  62876. r: parseFloat(e.getAttribute("r") || "0")
  62877. }), r.silent = !0, r;
  62878. },
  62879. line: function(e, n) {
  62880. var r = new Un();
  62881. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62882. x1: parseFloat(e.getAttribute("x1") || "0"),
  62883. y1: parseFloat(e.getAttribute("y1") || "0"),
  62884. x2: parseFloat(e.getAttribute("x2") || "0"),
  62885. y2: parseFloat(e.getAttribute("y2") || "0")
  62886. }), r.silent = !0, r;
  62887. },
  62888. ellipse: function(e, n) {
  62889. var r = new Xx();
  62890. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62891. cx: parseFloat(e.getAttribute("cx") || "0"),
  62892. cy: parseFloat(e.getAttribute("cy") || "0"),
  62893. rx: parseFloat(e.getAttribute("rx") || "0"),
  62894. ry: parseFloat(e.getAttribute("ry") || "0")
  62895. }), r.silent = !0, r;
  62896. },
  62897. polygon: function(e, n) {
  62898. var r = e.getAttribute("points"), i;
  62899. r && (i = hF(r));
  62900. var a = new ii({
  62901. shape: {
  62902. points: i || []
  62903. },
  62904. silent: !0
  62905. });
  62906. return ra(n, a), $i(e, a, this._defsUsePending, !1, !1), a;
  62907. },
  62908. polyline: function(e, n) {
  62909. var r = e.getAttribute("points"), i;
  62910. r && (i = hF(r));
  62911. var a = new ai({
  62912. shape: {
  62913. points: i || []
  62914. },
  62915. silent: !0
  62916. });
  62917. return ra(n, a), $i(e, a, this._defsUsePending, !1, !1), a;
  62918. },
  62919. image: function(e, n) {
  62920. var r = new lr();
  62921. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setStyle({
  62922. image: e.getAttribute("xlink:href") || e.getAttribute("href"),
  62923. x: +e.getAttribute("x"),
  62924. y: +e.getAttribute("y"),
  62925. width: +e.getAttribute("width"),
  62926. height: +e.getAttribute("height")
  62927. }), r.silent = !0, r;
  62928. },
  62929. text: function(e, n) {
  62930. var r = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
  62931. this._textX = parseFloat(r) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o);
  62932. var s = new Ve();
  62933. return ra(n, s), $i(e, s, this._defsUsePending, !1, !0), s;
  62934. },
  62935. tspan: function(e, n) {
  62936. var r = e.getAttribute("x"), i = e.getAttribute("y");
  62937. r != null && (this._textX = parseFloat(r)), i != null && (this._textY = parseFloat(i));
  62938. var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new Ve();
  62939. return ra(n, s), $i(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s;
  62940. },
  62941. path: function(e, n) {
  62942. var r = e.getAttribute("d") || "", i = GK(r);
  62943. return ra(n, i), $i(e, i, this._defsUsePending, !1, !1), i.silent = !0, i;
  62944. }
  62945. };
  62946. }(), t;
  62947. }(), cF = {
  62948. lineargradient: function(t) {
  62949. 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 hp(e, n, r, i);
  62950. return fF(t, a), dF(t, a), a;
  62951. },
  62952. radialgradient: function(t) {
  62953. var e = parseInt(t.getAttribute("cx") || "0", 10), n = parseInt(t.getAttribute("cy") || "0", 10), r = parseInt(t.getAttribute("r") || "0", 10), i = new VR(e, n, r);
  62954. return fF(t, i), dF(t, i), i;
  62955. }
  62956. };
  62957. function fF(t, e) {
  62958. var n = t.getAttribute("gradientUnits");
  62959. n === "userSpaceOnUse" && (e.global = !0);
  62960. }
  62961. function dF(t, e) {
  62962. for (var n = t.firstChild; n; ) {
  62963. if (n.nodeType === 1 && n.nodeName.toLocaleLowerCase() === "stop") {
  62964. var r = n.getAttribute("offset"), i = void 0;
  62965. r && r.indexOf("%") > 0 ? i = parseInt(r, 10) / 100 : r ? i = parseFloat(r) : i = 0;
  62966. var a = {};
  62967. une(n, a, a);
  62968. var o = a.stopColor || n.getAttribute("stop-color") || "#000000";
  62969. e.colorStops.push({
  62970. offset: i,
  62971. color: o
  62972. });
  62973. }
  62974. n = n.nextSibling;
  62975. }
  62976. }
  62977. function ra(t, e) {
  62978. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), Re(e.__inheritedStyle, t.__inheritedStyle));
  62979. }
  62980. function hF(t) {
  62981. for (var e = yw(t), n = [], r = 0; r < e.length; r += 2) {
  62982. var i = parseFloat(e[r]), a = parseFloat(e[r + 1]);
  62983. n.push([i, a]);
  62984. }
  62985. return n;
  62986. }
  62987. function $i(t, e, n, r, i) {
  62988. var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {};
  62989. t.nodeType === 1 && (yBe(t, e), une(t, o, s), r || bBe(t, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = pF(a, "fill", o.fill, n)), o.stroke != null && (a.style.stroke = pF(a, "stroke", o.stroke, n)), k([
  62990. "lineWidth",
  62991. "opacity",
  62992. "fillOpacity",
  62993. "strokeOpacity",
  62994. "miterLimit",
  62995. "fontSize"
  62996. ], function(l) {
  62997. o[l] != null && (a.style[l] = parseFloat(o[l]));
  62998. }), k([
  62999. "lineDashOffset",
  63000. "lineCap",
  63001. "lineJoin",
  63002. "fontWeight",
  63003. "fontFamily",
  63004. "fontStyle",
  63005. "textAlign"
  63006. ], function(l) {
  63007. o[l] != null && (a.style[l] = o[l]);
  63008. }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = ce(yw(o.lineDash), function(l) {
  63009. return parseFloat(l);
  63010. })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0);
  63011. }
  63012. function hBe(t, e) {
  63013. var n = e.__selfStyle;
  63014. if (n) {
  63015. var r = n.textBaseline, i = r;
  63016. !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;
  63017. }
  63018. var a = e.__inheritedStyle;
  63019. if (a) {
  63020. var o = a.textAlign, s = o;
  63021. o && (o === "middle" && (s = "center"), t.style.textAlign = s);
  63022. }
  63023. }
  63024. var pBe = /^url\(\s*#(.*?)\)/;
  63025. function pF(t, e, n, r) {
  63026. var i = n && n.match(pBe);
  63027. if (i) {
  63028. var a = ma(i[1]);
  63029. r.push([t, e, a]);
  63030. return;
  63031. }
  63032. return n === "none" && (n = null), n;
  63033. }
  63034. function vBe(t, e) {
  63035. for (var n = 0; n < e.length; n++) {
  63036. var r = e[n];
  63037. r[0].style[r[1]] = t[r[2]];
  63038. }
  63039. }
  63040. var gBe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  63041. function yw(t) {
  63042. return t.match(gBe) || [];
  63043. }
  63044. var mBe = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, dP = Math.PI / 180;
  63045. function yBe(t, e) {
  63046. var n = t.getAttribute("transform");
  63047. if (n) {
  63048. n = n.replace(/,/g, " ");
  63049. var r = [], i = null;
  63050. n.replace(mBe, function(f, d, h) {
  63051. return r.push(d, h), "";
  63052. });
  63053. for (var a = r.length - 1; a > 0; a -= 2) {
  63054. var o = r[a], s = r[a - 1], l = yw(o);
  63055. switch (i = i || Si(), s) {
  63056. case "translate":
  63057. ao(i, i, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
  63058. break;
  63059. case "scale":
  63060. Nx(i, i, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
  63061. break;
  63062. case "rotate":
  63063. Cu(i, i, -parseFloat(l[0]) * dP, [
  63064. parseFloat(l[1] || "0"),
  63065. parseFloat(l[2] || "0")
  63066. ]);
  63067. break;
  63068. case "skewX":
  63069. var u = Math.tan(parseFloat(l[0]) * dP);
  63070. Uo(i, [1, 0, u, 1, 0, 0], i);
  63071. break;
  63072. case "skewY":
  63073. var c = Math.tan(parseFloat(l[0]) * dP);
  63074. Uo(i, [1, c, 0, 1, 0, 0], i);
  63075. break;
  63076. case "matrix":
  63077. 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]);
  63078. break;
  63079. }
  63080. }
  63081. e.setLocalTransform(i);
  63082. }
  63083. }
  63084. var vF = /([^\s:;]+)\s*:\s*([^:;]+)/g;
  63085. function une(t, e, n) {
  63086. var r = t.getAttribute("style");
  63087. if (r) {
  63088. vF.lastIndex = 0;
  63089. for (var i; (i = vF.exec(r)) != null; ) {
  63090. var a = i[1], o = Ce(EO, a) ? EO[a] : null;
  63091. o && (e[o] = i[2]);
  63092. var s = Ce(MO, a) ? MO[a] : null;
  63093. s && (n[s] = i[2]);
  63094. }
  63095. }
  63096. }
  63097. function bBe(t, e, n) {
  63098. for (var r = 0; r < lF.length; r++) {
  63099. var i = lF[r], a = t.getAttribute(i);
  63100. a != null && (e[EO[i]] = a);
  63101. }
  63102. for (var r = 0; r < uF.length; r++) {
  63103. var i = uF[r], a = t.getAttribute(i);
  63104. a != null && (n[MO[i]] = a);
  63105. }
  63106. }
  63107. function cne(t, e) {
  63108. var n = e.width / t.width, r = e.height / t.height, i = Math.min(n, r);
  63109. return {
  63110. scale: i,
  63111. x: -(t.x + t.width / 2) * i + (e.x + e.width / 2),
  63112. y: -(t.y + t.height / 2) * i + (e.y + e.height / 2)
  63113. };
  63114. }
  63115. function _Be(t, e) {
  63116. var n = new dBe();
  63117. return n.parse(t, e);
  63118. }
  63119. var OBe = Pe([
  63120. "rect",
  63121. "circle",
  63122. "line",
  63123. "ellipse",
  63124. "polygon",
  63125. "polyline",
  63126. "path",
  63127. // <text> <tspan> are also enabled because some SVG might paint text itself,
  63128. // but still need to trigger events or tooltip.
  63129. "text",
  63130. "tspan",
  63131. // <g> is also enabled because this case: if multiple tags share one name
  63132. // and need label displayed, every tags will display the name, which is not
  63133. // expected. So we can put them into a <g name="xxx">. Thereby only one label
  63134. // displayed and located based on the bounding rect of the <g>.
  63135. "g"
  63136. ]), SBe = (
  63137. /** @class */
  63138. function() {
  63139. function t(e, n) {
  63140. this.type = "geoSVG", this._usedGraphicMap = Pe(), this._freedGraphics = [], this._mapName = e, this._parsedXML = lne(n);
  63141. }
  63142. return t.prototype.load = function() {
  63143. var e = this._firstGraphic;
  63144. if (!e) {
  63145. e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
  63146. var n = wBe(e.named), r = n.regions, i = n.regionsMap;
  63147. this._regions = r, this._regionsMap = i;
  63148. }
  63149. return {
  63150. boundingRect: this._boundingRect,
  63151. regions: this._regions,
  63152. regionsMap: this._regionsMap
  63153. };
  63154. }, t.prototype._buildGraphic = function(e) {
  63155. var n, r;
  63156. try {
  63157. n = e && _Be(e, {
  63158. ignoreViewBox: !0,
  63159. ignoreRootClip: !0
  63160. }) || {}, r = n.root, ke(r != null);
  63161. } catch (g) {
  63162. throw new Error(`Invalid svg format
  63163. ` + g.message);
  63164. }
  63165. var i = new Ve();
  63166. i.add(r), i.isGeoSVGGraphicRoot = !0;
  63167. var a = n.width, o = n.height, s = n.viewBoxRect, l = this._boundingRect;
  63168. if (!l) {
  63169. var u = void 0, c = void 0, f = void 0, d = void 0;
  63170. 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) {
  63171. var h = r.getBoundingRect();
  63172. u == null && (u = h.x, f = h.width), c == null && (c = h.y, d = h.height);
  63173. }
  63174. l = this._boundingRect = new Je(u, c, f, d);
  63175. }
  63176. if (s) {
  63177. var p = cne(s, l);
  63178. r.scaleX = r.scaleY = p.scale, r.x = p.x, r.y = p.y;
  63179. }
  63180. i.setClipPath(new mt({
  63181. shape: l.plain()
  63182. }));
  63183. var v = [];
  63184. return k(n.named, function(g) {
  63185. OBe.get(g.svgNodeTagLower) != null && (v.push(g), xBe(g.el));
  63186. }), {
  63187. root: i,
  63188. boundingRect: l,
  63189. named: v
  63190. };
  63191. }, t.prototype.useGraphic = function(e) {
  63192. var n = this._usedGraphicMap, r = n.get(e);
  63193. return r || (r = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), n.set(e, r), r);
  63194. }, t.prototype.freeGraphic = function(e) {
  63195. var n = this._usedGraphicMap, r = n.get(e);
  63196. r && (n.removeKey(e), this._freedGraphics.push(r));
  63197. }, t;
  63198. }()
  63199. );
  63200. function xBe(t) {
  63201. t.silent = !1, t.isGroup && t.traverse(function(e) {
  63202. e.silent = !1;
  63203. });
  63204. }
  63205. function wBe(t) {
  63206. var e = [], n = Pe();
  63207. return k(t, function(r) {
  63208. if (r.namedFrom == null) {
  63209. var i = new u5e(r.name, r.el);
  63210. e.push(i), n.set(r.name, i);
  63211. }
  63212. }), {
  63213. regions: e,
  63214. regionsMap: n
  63215. };
  63216. }
  63217. var pE = [126, 25], gF = "南海诸岛", 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]]];
  63218. for (var lc = 0; lc < hc.length; lc++)
  63219. for (var hd = 0; hd < hc[lc].length; hd++)
  63220. hc[lc][hd][0] /= 10.5, hc[lc][hd][1] /= -10.5 / 0.75, hc[lc][hd][0] += pE[0], hc[lc][hd][1] += pE[1];
  63221. function CBe(t, e) {
  63222. if (t === "china") {
  63223. for (var n = 0; n < e.length; n++)
  63224. if (e[n].name === gF)
  63225. return;
  63226. e.push(new ote(gF, ce(hc, function(r) {
  63227. return {
  63228. type: "polygon",
  63229. exterior: r
  63230. };
  63231. }), pE));
  63232. }
  63233. }
  63234. var TBe = {
  63235. 南海诸岛: [32, 80],
  63236. // 全国
  63237. 广东: [0, -10],
  63238. 香港: [10, 5],
  63239. 澳门: [-10, 10],
  63240. // '北京': [-10, 0],
  63241. 天津: [5, 5]
  63242. };
  63243. function PBe(t, e) {
  63244. if (t === "china") {
  63245. var n = TBe[e.name];
  63246. if (n) {
  63247. var r = e.getCenter();
  63248. r[0] += n[0] / 10.5, r[1] += -n[1] / (10.5 / 0.75), e.setCenter(r);
  63249. }
  63250. }
  63251. }
  63252. var $Be = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
  63253. function ABe(t, e) {
  63254. t === "china" && e.name === "台湾" && e.geometries.push({
  63255. type: "polygon",
  63256. exterior: $Be[0]
  63257. });
  63258. }
  63259. var EBe = "name", MBe = (
  63260. /** @class */
  63261. function() {
  63262. function t(e, n, r) {
  63263. this.type = "geoJSON", this._parsedMap = Pe(), this._mapName = e, this._specialAreas = r, this._geoJSON = DBe(n);
  63264. }
  63265. return t.prototype.load = function(e, n) {
  63266. n = n || EBe;
  63267. var r = this._parsedMap.get(n);
  63268. if (!r) {
  63269. var i = this._parseToRegions(n);
  63270. r = this._parsedMap.set(n, {
  63271. regions: i,
  63272. boundingRect: IBe(i)
  63273. });
  63274. }
  63275. var a = Pe(), o = [];
  63276. return k(r.regions, function(s) {
  63277. var l = s.name;
  63278. e && Ce(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), a.set(l, s);
  63279. }), {
  63280. regions: o,
  63281. boundingRect: r.boundingRect || new Je(0, 0, 0, 0),
  63282. regionsMap: a
  63283. };
  63284. }, t.prototype._parseToRegions = function(e) {
  63285. var n = this._mapName, r = this._geoJSON, i;
  63286. try {
  63287. i = r ? iE(r, e) : [];
  63288. } catch (a) {
  63289. throw new Error(`Invalid geoJson format
  63290. ` + a.message);
  63291. }
  63292. return CBe(n, i), k(i, function(a) {
  63293. var o = a.name;
  63294. PBe(n, a), ABe(n, a);
  63295. var s = this._specialAreas && this._specialAreas[o];
  63296. s && a.transformTo(s.left, s.top, s.width, s.height);
  63297. }, this), i;
  63298. }, t.prototype.getMapForUser = function() {
  63299. return {
  63300. // For backward compatibility, use geoJson
  63301. // PENDING: it has been returning them without clone.
  63302. // do we need to avoid outsite modification?
  63303. geoJson: this._geoJSON,
  63304. geoJSON: this._geoJSON,
  63305. specialAreas: this._specialAreas
  63306. };
  63307. }, t;
  63308. }()
  63309. );
  63310. function IBe(t) {
  63311. for (var e, n = 0; n < t.length; n++) {
  63312. var r = t[n].getBoundingRect();
  63313. e = e || r.clone(), e.union(r);
  63314. }
  63315. return e;
  63316. }
  63317. function DBe(t) {
  63318. return Oe(t) ? typeof JSON < "u" && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t;
  63319. }
  63320. var mv = Pe();
  63321. const qs = {
  63322. /**
  63323. * Compatible with previous `echarts.registerMap`.
  63324. *
  63325. * @usage
  63326. * ```js
  63327. *
  63328. * echarts.registerMap('USA', geoJson, specialAreas);
  63329. *
  63330. * echarts.registerMap('USA', {
  63331. * geoJson: geoJson,
  63332. * specialAreas: {...}
  63333. * });
  63334. * echarts.registerMap('USA', {
  63335. * geoJSON: geoJson,
  63336. * specialAreas: {...}
  63337. * });
  63338. *
  63339. * echarts.registerMap('airport', {
  63340. * svg: svg
  63341. * }
  63342. * ```
  63343. *
  63344. * Note:
  63345. * Do not support that register multiple geoJSON or SVG
  63346. * one map name. Because different geoJSON and SVG have
  63347. * different unit. It's not easy to make sure how those
  63348. * units are mapping/normalize.
  63349. * If intending to use multiple geoJSON or SVG, we can
  63350. * use multiple geo coordinate system.
  63351. */
  63352. registerMap: function(t, e, n) {
  63353. if (e.svg) {
  63354. var r = new SBe(t, e.svg);
  63355. mv.set(t, r);
  63356. } else {
  63357. var i = e.geoJson || e.geoJSON;
  63358. i && !e.features ? n = e.specialAreas : i = e;
  63359. var r = new MBe(t, i, n);
  63360. mv.set(t, r);
  63361. }
  63362. },
  63363. getGeoResource: function(t) {
  63364. return mv.get(t);
  63365. },
  63366. /**
  63367. * Only for exporting to users.
  63368. * **MUST NOT** used internally.
  63369. */
  63370. getMapForUser: function(t) {
  63371. var e = mv.get(t);
  63372. return e && e.type === "geoJSON" && e.getMapForUser();
  63373. },
  63374. load: function(t, e, n) {
  63375. var r = mv.get(t);
  63376. if (!r) {
  63377. process.env.NODE_ENV !== "production" && console.error("Map " + t + " not exists. The GeoJSON of the map must be provided.");
  63378. return;
  63379. }
  63380. return r.load(e, n);
  63381. }
  63382. };
  63383. var Wk = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], RBe = Pe(Wk), kBe = Pe(Wk.concat(["g"])), LBe = Pe(Wk.concat(["g"])), fne = bt();
  63384. function Cb(t) {
  63385. var e = t.getItemStyle(), n = t.get("areaColor");
  63386. return n != null && (e.fill = n), e;
  63387. }
  63388. function mF(t) {
  63389. var e = t.style;
  63390. e && (e.stroke = e.stroke || e.fill, e.fill = null);
  63391. }
  63392. var dne = (
  63393. /** @class */
  63394. function() {
  63395. function t(e) {
  63396. var n = new Ve();
  63397. this.uid = yp("ec_map_draw"), this._controller = new K0(e.getZr()), this._controllerHost = {
  63398. target: n
  63399. }, this.group = n, n.add(this._regionsGroup = new Ve()), n.add(this._svgGroup = new Ve());
  63400. }
  63401. return t.prototype.draw = function(e, n, r, i, a) {
  63402. var o = e.mainType === "geo", s = e.getData && e.getData();
  63403. o && n.eachComponent({
  63404. mainType: "series",
  63405. subType: "map"
  63406. }, function(m) {
  63407. !s && m.getHostGeoModel() === e && (s = m.getData());
  63408. });
  63409. var l = e.coordinateSystem, u = this._regionsGroup, c = this.group, f = l.getTransformInfo(), d = f.raw, h = f.roam, p = !u.childAt(0) || a;
  63410. p ? (c.x = h.x, c.y = h.y, c.scaleX = h.scaleX, c.scaleY = h.scaleY, c.dirty()) : Ct(c, h, e);
  63411. var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
  63412. api: r,
  63413. geo: l,
  63414. mapOrGeoModel: e,
  63415. data: s,
  63416. isVisualEncodedByVisualMap: v,
  63417. isGeo: o,
  63418. transformInfoRaw: d
  63419. };
  63420. l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, n, r), this._updateMapSelectHandler(e, u, r, i);
  63421. }, t.prototype._buildGeoJSON = function(e) {
  63422. 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;
  63423. function c(h, p) {
  63424. return p && (h = p(h)), h && [h[0] * a.scaleX + a.x, h[1] * a.scaleY + a.y];
  63425. }
  63426. function f(h) {
  63427. for (var p = [], v = !u && l && l.project, g = 0; g < h.length; ++g) {
  63428. var m = c(h[g], v);
  63429. m && p.push(m);
  63430. }
  63431. return p;
  63432. }
  63433. function d(h) {
  63434. return {
  63435. shape: {
  63436. points: f(h)
  63437. }
  63438. };
  63439. }
  63440. i.removeAll(), k(e.geo.regions, function(h) {
  63441. var p = h.name, v = n.get(p), g = r.get(p) || {}, m = g.dataIdx, y = g.regionModel;
  63442. 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, {
  63443. dataIdx: m,
  63444. regionModel: y
  63445. }));
  63446. var b = [], _ = [];
  63447. k(h.geometries, function(x) {
  63448. if (x.type === "polygon") {
  63449. var C = [x.exterior].concat(x.interiors || []);
  63450. u && (C = xF(C, u)), k(C, function(w) {
  63451. b.push(new ii(d(w)));
  63452. });
  63453. } else {
  63454. var T = x.points;
  63455. u && (T = xF(T, u, !0)), k(T, function(w) {
  63456. _.push(new ai(d(w)));
  63457. });
  63458. }
  63459. });
  63460. var O = c(h.getCenter(), l && l.project);
  63461. function S(x, C) {
  63462. if (x.length) {
  63463. var T = new qx({
  63464. culling: !0,
  63465. segmentIgnoreThreshold: 1,
  63466. shape: {
  63467. paths: x
  63468. }
  63469. });
  63470. v.add(T), yF(e, T, m, y), bF(e, T, p, y, o, m, O), C && (mF(T), k(T.states, mF));
  63471. }
  63472. }
  63473. S(b), S(_, !0);
  63474. }), n.each(function(h, p) {
  63475. var v = r.get(p), g = v.dataIdx, m = v.regionModel;
  63476. _F(e, h, p, m, o, g), OF(e, h, p, m, o), SF(e, h, p, m, o);
  63477. }, this);
  63478. }, t.prototype._buildSVG = function(e) {
  63479. var n = e.geo.map, r = e.transformInfoRaw;
  63480. 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));
  63481. var i = this._svgDispatcherMap = Pe(), a = !1;
  63482. k(this._svgGraphicRecord.named, function(o) {
  63483. 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);
  63484. if (RBe.get(c) != null && f instanceof Ma && yF(e, f, d, h), f instanceof Ma && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (LBe.get(c) != null && bF(e, f, s, h, l, d, null), _F(e, f, s, h, l, d), OF(e, f, s, h, l), kBe.get(c) != null)) {
  63485. var p = SF(e, f, s, h, l);
  63486. p === "self" && (a = !0);
  63487. var v = i.get(s) || i.set(s, []);
  63488. v.push(f);
  63489. }
  63490. }, this), this._enableBlurEntireSVG(a, e);
  63491. }, t.prototype._enableBlurEntireSVG = function(e, n) {
  63492. if (e && n.isGeo) {
  63493. var r = n.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = r.opacity;
  63494. this._svgGraphicRecord.root.traverse(function(a) {
  63495. if (!a.isGroup) {
  63496. bf(a);
  63497. var o = a.ensureState("blur").style || {};
  63498. o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis");
  63499. }
  63500. });
  63501. }
  63502. }, t.prototype.remove = function() {
  63503. this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
  63504. }, t.prototype.findHighDownDispatchers = function(e, n) {
  63505. if (e == null)
  63506. return [];
  63507. var r = n.coordinateSystem;
  63508. if (r.resourceType === "geoJSON") {
  63509. var i = this._regionsGroupByName;
  63510. if (i) {
  63511. var a = i.get(e);
  63512. return a ? [a] : [];
  63513. }
  63514. } else if (r.resourceType === "geoSVG")
  63515. return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
  63516. }, t.prototype._svgResourceChanged = function(e) {
  63517. return this._svgMapName !== e;
  63518. }, t.prototype._useSVG = function(e) {
  63519. var n = qs.getGeoResource(e);
  63520. if (n && n.type === "geoSVG") {
  63521. var r = n.useGraphic(this.uid);
  63522. this._svgGroup.add(r.root), this._svgGraphicRecord = r, this._svgMapName = e;
  63523. }
  63524. }, t.prototype._freeSVG = function() {
  63525. var e = this._svgMapName;
  63526. if (e != null) {
  63527. var n = qs.getGeoResource(e);
  63528. n && n.type === "geoSVG" && n.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
  63529. }
  63530. }, t.prototype._updateController = function(e, n, r) {
  63531. var i = e.coordinateSystem, a = this._controller, o = this._controllerHost;
  63532. o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1);
  63533. var s = e.mainType;
  63534. function l() {
  63535. var u = {
  63536. type: "geoRoam",
  63537. componentType: s
  63538. };
  63539. return u[s + "Id"] = e.id, u;
  63540. }
  63541. a.off("pan").on("pan", function(u) {
  63542. this._mouseDownFlag = !1, Vk(o, u.dx, u.dy), r.dispatchAction(le(l(), {
  63543. dx: u.dx,
  63544. dy: u.dy,
  63545. animation: {
  63546. duration: 0
  63547. }
  63548. }));
  63549. }, this), a.off("zoom").on("zoom", function(u) {
  63550. this._mouseDownFlag = !1, Fk(o, u.scale, u.originX, u.originY), r.dispatchAction(le(l(), {
  63551. totalZoom: o.zoom,
  63552. zoom: u.scale,
  63553. originX: u.originX,
  63554. originY: u.originY,
  63555. animation: {
  63556. duration: 0
  63557. }
  63558. }));
  63559. }, this), a.setPointerChecker(function(u, c, f) {
  63560. return i.containPoint([c, f]) && !mw(u, r, e);
  63561. });
  63562. }, t.prototype.resetForLabelLayout = function() {
  63563. this.group.traverse(function(e) {
  63564. var n = e.getTextContent();
  63565. n && (n.ignore = fne(n).ignore);
  63566. });
  63567. }, t.prototype._updateMapSelectHandler = function(e, n, r, i) {
  63568. var a = this;
  63569. n.off("mousedown"), n.off("click"), e.get("selectedMode") && (n.on("mousedown", function() {
  63570. a._mouseDownFlag = !0;
  63571. }), n.on("click", function(o) {
  63572. a._mouseDownFlag && (a._mouseDownFlag = !1);
  63573. }));
  63574. }, t;
  63575. }()
  63576. );
  63577. function yF(t, e, n, r) {
  63578. var i = r.getModel("itemStyle"), a = r.getModel(["emphasis", "itemStyle"]), o = r.getModel(["blur", "itemStyle"]), s = r.getModel(["select", "itemStyle"]), l = Cb(i), u = Cb(a), c = Cb(s), f = Cb(o), d = t.data;
  63579. if (d) {
  63580. var h = d.getItemVisual(n, "style"), p = d.getItemVisual(n, "decal");
  63581. t.isVisualEncodedByVisualMap && h.fill && (l.fill = h.fill), p && (l.decal = Fh(p, t.api));
  63582. }
  63583. e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = c, e.ensureState("blur").style = f, bf(e);
  63584. }
  63585. function bF(t, e, n, r, i, a, o) {
  63586. var s = t.data, l = t.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a);
  63587. if (l || u || c && c.showLabel) {
  63588. var f = l ? n : a, d = void 0;
  63589. (!s || a >= 0) && (d = i);
  63590. var h = o ? {
  63591. normal: {
  63592. align: "center",
  63593. verticalAlign: "middle"
  63594. }
  63595. } : null;
  63596. Pr(e, er(r), {
  63597. labelFetcher: d,
  63598. labelDataIndex: f,
  63599. defaultText: n
  63600. }, h);
  63601. var p = e.getTextContent();
  63602. if (p && (fne(p).ignore = p.ignore, e.textConfig && o)) {
  63603. var v = e.getBoundingRect().clone();
  63604. e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"];
  63605. }
  63606. e.disableLabelAnimation = !0;
  63607. } else
  63608. e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
  63609. }
  63610. function _F(t, e, n, r, i, a) {
  63611. t.data ? t.data.setItemGraphicEl(a, e) : Fe(e).eventData = {
  63612. componentType: "geo",
  63613. componentIndex: i.componentIndex,
  63614. geoIndex: i.componentIndex,
  63615. name: n,
  63616. region: r && r.option || {}
  63617. };
  63618. }
  63619. function OF(t, e, n, r, i) {
  63620. t.data || gp({
  63621. el: e,
  63622. componentModel: i,
  63623. itemName: n,
  63624. // @ts-ignore FIXME:TS fix the "compatible with each other"?
  63625. itemTooltipOption: r.get("tooltip")
  63626. });
  63627. }
  63628. function SF(t, e, n, r, i) {
  63629. e.highDownSilentOnTouch = !!i.get("selectedMode");
  63630. var a = r.getModel("emphasis"), o = a.get("focus");
  63631. return bn(e, o, a.get("blurScope"), a.get("disabled")), t.isGeo && fke(e, i, n), o;
  63632. }
  63633. function xF(t, e, n) {
  63634. var r = [], i;
  63635. function a() {
  63636. i = [];
  63637. }
  63638. function o() {
  63639. i.length && (r.push(i), i = []);
  63640. }
  63641. var s = e({
  63642. polygonStart: a,
  63643. polygonEnd: o,
  63644. lineStart: a,
  63645. lineEnd: o,
  63646. point: function(l, u) {
  63647. isFinite(l) && isFinite(u) && i.push([l, u]);
  63648. },
  63649. sphere: function() {
  63650. }
  63651. });
  63652. return !n && s.polygonStart(), k(t, function(l) {
  63653. s.lineStart();
  63654. for (var u = 0; u < l.length; u++)
  63655. s.point(l[u][0], l[u][1]);
  63656. s.lineEnd();
  63657. }), !n && s.polygonEnd(), r;
  63658. }
  63659. var NBe = (
  63660. /** @class */
  63661. function(t) {
  63662. q(e, t);
  63663. function e() {
  63664. var n = t !== null && t.apply(this, arguments) || this;
  63665. return n.type = e.type, n;
  63666. }
  63667. return e.prototype.render = function(n, r, i, a) {
  63668. if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) {
  63669. var o = this.group;
  63670. if (o.removeAll(), !n.getHostGeoModel()) {
  63671. if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === n.id) {
  63672. var s = this._mapDraw;
  63673. s && o.add(s.group);
  63674. } else if (n.needsDrawMap) {
  63675. var s = this._mapDraw || new dne(i);
  63676. o.add(s.group), s.draw(n, r, i, this, a), this._mapDraw = s;
  63677. } else
  63678. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  63679. n.get("showLegendSymbol") && r.getComponent("legend") && this._renderSymbols(n, r, i);
  63680. }
  63681. }
  63682. }, e.prototype.remove = function() {
  63683. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
  63684. }, e.prototype.dispose = function() {
  63685. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  63686. }, e.prototype._renderSymbols = function(n, r, i) {
  63687. var a = n.originalData, o = this.group;
  63688. a.each(a.mapDimension("value"), function(s, l) {
  63689. if (!isNaN(s)) {
  63690. var u = a.getItemLayout(l);
  63691. if (!(!u || !u.point)) {
  63692. var c = u.point, f = u.offset, d = new ll({
  63693. style: {
  63694. // Because the special of map draw.
  63695. // Which needs statistic of multiple series and draw on one map.
  63696. // And each series also need a symbol with legend color
  63697. //
  63698. // Layout and visual are put one the different data
  63699. // TODO
  63700. fill: n.getData().getVisual("style").fill
  63701. },
  63702. shape: {
  63703. cx: c[0] + f * 9,
  63704. cy: c[1],
  63705. r: 3
  63706. },
  63707. silent: !0,
  63708. // Do not overlap the first series, on which labels are displayed.
  63709. z2: 8 + (f ? 0 : dp + 1)
  63710. });
  63711. if (!f) {
  63712. 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);
  63713. Pr(d, er(g), {
  63714. labelFetcher: {
  63715. getFormattedLabel: function(b, _) {
  63716. return n.getFormattedLabel(v, _);
  63717. }
  63718. },
  63719. defaultText: p
  63720. }), d.disableLabelAnimation = !0, m.get("position") || d.setTextConfig({
  63721. position: "bottom"
  63722. }), y.onHoverStateChange = function(b) {
  63723. oO(d, b);
  63724. };
  63725. }
  63726. o.add(d);
  63727. }
  63728. }
  63729. });
  63730. }, e.type = "map", e;
  63731. }(zt)
  63732. ), BBe = (
  63733. /** @class */
  63734. function(t) {
  63735. q(e, t);
  63736. function e() {
  63737. var n = t !== null && t.apply(this, arguments) || this;
  63738. return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function(r) {
  63739. if (r != null) {
  63740. var i = this.getData().getName(r), a = this.coordinateSystem, o = a.getRegion(i);
  63741. return o && a.dataToPoint(o.getCenter());
  63742. }
  63743. }, n;
  63744. }
  63745. return e.prototype.getInitialData = function(n) {
  63746. for (var r = Pp(this, {
  63747. coordDimensions: ["value"],
  63748. encodeDefaulter: Ue(nk, this)
  63749. }), i = Pe(), a = [], o = 0, s = r.count(); o < s; o++) {
  63750. var l = r.getName(o);
  63751. i.set(l, !0);
  63752. }
  63753. var u = qs.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
  63754. return k(u.regions, function(c) {
  63755. var f = c.name;
  63756. i.get(f) || a.push(f);
  63757. }), r.appendValues([], a), r;
  63758. }, e.prototype.getHostGeoModel = function() {
  63759. var n = this.option.geoIndex;
  63760. return n != null ? this.ecModel.getComponent("geo", n) : null;
  63761. }, e.prototype.getMapType = function() {
  63762. return (this.getHostGeoModel() || this).option.map;
  63763. }, e.prototype.getRawValue = function(n) {
  63764. var r = this.getData();
  63765. return r.get(r.mapDimension("value"), n);
  63766. }, e.prototype.getRegionModel = function(n) {
  63767. var r = this.getData();
  63768. return r.getItemModel(r.indexOfName(n));
  63769. }, e.prototype.formatTooltip = function(n, r, i) {
  63770. for (var a = this.getData(), o = this.getRawValue(n), s = a.getName(n), l = this.seriesGroup, u = [], c = 0; c < l.length; c++) {
  63771. var f = l[c].originalData.indexOfName(s), d = a.mapDimension("value");
  63772. isNaN(l[c].originalData.get(d, f)) || u.push(l[c].name);
  63773. }
  63774. return tr("section", {
  63775. header: u.join(", "),
  63776. noHeader: !u.length,
  63777. blocks: [tr("nameValue", {
  63778. name: s,
  63779. value: o
  63780. })]
  63781. });
  63782. }, e.prototype.setZoom = function(n) {
  63783. this.option.zoom = n;
  63784. }, e.prototype.setCenter = function(n) {
  63785. this.option.center = n;
  63786. }, e.prototype.getLegendIcon = function(n) {
  63787. var r = n.icon || "roundRect", i = $n(r, 0, 0, n.itemWidth, n.itemHeight, n.itemStyle.fill);
  63788. 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;
  63789. }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
  63790. // 一级层叠
  63791. // zlevel: 0,
  63792. // 二级层叠
  63793. z: 2,
  63794. coordinateSystem: "geo",
  63795. // map should be explicitly specified since ec3.
  63796. map: "",
  63797. // If `geoIndex` is not specified, a exclusive geo will be
  63798. // created. Otherwise use the specified geo component, and
  63799. // `map` and `mapType` are ignored.
  63800. // geoIndex: 0,
  63801. // 'center' | 'left' | 'right' | 'x%' | {number}
  63802. left: "center",
  63803. // 'center' | 'top' | 'bottom' | 'x%' | {number}
  63804. top: "center",
  63805. // right
  63806. // bottom
  63807. // width:
  63808. // height
  63809. // Aspect is width / height. Inited to be geoJson bbox aspect
  63810. // This parameter is used for scale this aspect
  63811. // Default value:
  63812. // for geoSVG source: 1,
  63813. // for geoJSON source: 0.75.
  63814. aspectScale: null,
  63815. // Layout with center and size
  63816. // If you want to put map in a fixed size box with right aspect ratio
  63817. // This two properties may be more convenient.
  63818. // layoutCenter: [50%, 50%]
  63819. // layoutSize: 100
  63820. showLegendSymbol: !0,
  63821. // Define left-top, right-bottom coords to control view
  63822. // For example, [ [180, 90], [-180, -90] ],
  63823. // higher priority than center and zoom
  63824. boundingCoords: null,
  63825. // Default on center of map
  63826. center: null,
  63827. zoom: 1,
  63828. scaleLimit: null,
  63829. selectedMode: !0,
  63830. label: {
  63831. show: !1,
  63832. color: "#000"
  63833. },
  63834. // scaleLimit: null,
  63835. itemStyle: {
  63836. borderWidth: 0.5,
  63837. borderColor: "#444",
  63838. areaColor: "#eee"
  63839. },
  63840. emphasis: {
  63841. label: {
  63842. show: !0,
  63843. color: "rgb(100,0,0)"
  63844. },
  63845. itemStyle: {
  63846. areaColor: "rgba(255,215,0,0.8)"
  63847. }
  63848. },
  63849. select: {
  63850. label: {
  63851. show: !0,
  63852. color: "rgb(100,0,0)"
  63853. },
  63854. itemStyle: {
  63855. color: "rgba(255,215,0,0.8)"
  63856. }
  63857. },
  63858. nameProperty: "name"
  63859. }, e;
  63860. }(Ht)
  63861. );
  63862. function zBe(t, e) {
  63863. var n = {};
  63864. return k(t, function(r) {
  63865. r.each(r.mapDimension("value"), function(i, a) {
  63866. var o = "ec-" + r.getName(a);
  63867. n[o] = n[o] || [], isNaN(i) || n[o].push(i);
  63868. });
  63869. }), t[0].map(t[0].mapDimension("value"), function(r, i) {
  63870. 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++)
  63871. s = Math.min(s, n[a][c]), l = Math.max(l, n[a][c]), o += n[a][c];
  63872. var f;
  63873. return e === "min" ? f = s : e === "max" ? f = l : e === "average" ? f = o / u : f = o, u === 0 ? NaN : f;
  63874. });
  63875. }
  63876. function VBe(t) {
  63877. var e = {};
  63878. t.eachSeriesByType("map", function(n) {
  63879. var r = n.getHostGeoModel(), i = r ? "o" + r.id : "i" + n.getMapType();
  63880. (e[i] = e[i] || []).push(n);
  63881. }), k(e, function(n, r) {
  63882. for (var i = zBe(ce(n, function(o) {
  63883. return o.getData();
  63884. }), n[0].get("mapValueCalculation")), a = 0; a < n.length; a++)
  63885. n[a].originalData = n[a].getData();
  63886. for (var a = 0; a < n.length; a++)
  63887. n[a].seriesGroup = n, n[a].needsDrawMap = a === 0 && !n[a].getHostGeoModel(), n[a].setData(i.cloneShallow()), n[a].mainSeries = n[0];
  63888. });
  63889. }
  63890. function FBe(t) {
  63891. var e = {};
  63892. t.eachSeriesByType("map", function(n) {
  63893. var r = n.getMapType();
  63894. if (!(n.getHostGeoModel() || e[r])) {
  63895. var i = {};
  63896. k(n.seriesGroup, function(o) {
  63897. var s = o.coordinateSystem, l = o.originalData;
  63898. o.get("showLegendSymbol") && t.getComponent("legend") && l.each(l.mapDimension("value"), function(u, c) {
  63899. var f = l.getName(c), d = s.getRegion(f);
  63900. if (!(!d || isNaN(u))) {
  63901. var h = i[f] || 0, p = s.dataToPoint(d.getCenter());
  63902. i[f] = h + 1, l.setItemLayout(c, {
  63903. point: p,
  63904. offset: h
  63905. });
  63906. }
  63907. });
  63908. });
  63909. var a = n.getData();
  63910. a.each(function(o) {
  63911. var s = a.getName(o), l = a.getItemLayout(o) || {};
  63912. l.showLabel = !i[s], a.setItemLayout(o, l);
  63913. }), e[r] = !0;
  63914. }
  63915. });
  63916. }
  63917. var wF = ar, J0 = (
  63918. /** @class */
  63919. function(t) {
  63920. q(e, t);
  63921. function e(n) {
  63922. var r = t.call(this) || this;
  63923. return r.type = "view", r.dimensions = ["x", "y"], r._roamTransformable = new As(), r._rawTransformable = new As(), r.name = n, r;
  63924. }
  63925. return e.prototype.setBoundingRect = function(n, r, i, a) {
  63926. return this._rect = new Je(n, r, i, a), this._rect;
  63927. }, e.prototype.getBoundingRect = function() {
  63928. return this._rect;
  63929. }, e.prototype.setViewRect = function(n, r, i, a) {
  63930. this._transformTo(n, r, i, a), this._viewRect = new Je(n, r, i, a);
  63931. }, e.prototype._transformTo = function(n, r, i, a) {
  63932. var o = this.getBoundingRect(), s = this._rawTransformable;
  63933. s.transform = o.calculateTransform(new Je(n, r, i, a));
  63934. var l = s.parent;
  63935. s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
  63936. }, e.prototype.setCenter = function(n, r) {
  63937. n && (this._center = [_e(n[0], r.getWidth()), _e(n[1], r.getHeight())], this._updateCenterAndZoom());
  63938. }, e.prototype.setZoom = function(n) {
  63939. n = n || 1;
  63940. var r = this.zoomLimit;
  63941. r && (r.max != null && (n = Math.min(r.max, n)), r.min != null && (n = Math.max(r.min, n))), this._zoom = n, this._updateCenterAndZoom();
  63942. }, e.prototype.getDefaultCenter = function() {
  63943. var n = this.getBoundingRect(), r = n.x + n.width / 2, i = n.y + n.height / 2;
  63944. return [r, i];
  63945. }, e.prototype.getCenter = function() {
  63946. return this._center || this.getDefaultCenter();
  63947. }, e.prototype.getZoom = function() {
  63948. return this._zoom || 1;
  63949. }, e.prototype.getRoamTransform = function() {
  63950. return this._roamTransformable.getLocalTransform();
  63951. }, e.prototype._updateCenterAndZoom = function() {
  63952. var n = this._rawTransformable.getLocalTransform(), r = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom();
  63953. 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();
  63954. }, e.prototype._updateTransform = function() {
  63955. var n = this._roamTransformable, r = this._rawTransformable;
  63956. r.parent = n, n.updateTransform(), r.updateTransform(), Lx(this.transform || (this.transform = []), r.transform || Si()), this._rawTransform = r.getLocalTransform(), this.invTransform = this.invTransform || [], kf(this.invTransform, this.transform), this.decomposeTransform();
  63957. }, e.prototype.getTransformInfo = function() {
  63958. var n = this._rawTransformable, r = this._roamTransformable, i = new As();
  63959. return i.transform = r.transform, i.decomposeTransform(), {
  63960. roam: {
  63961. x: i.x,
  63962. y: i.y,
  63963. scaleX: i.scaleX,
  63964. scaleY: i.scaleY
  63965. },
  63966. raw: {
  63967. x: n.x,
  63968. y: n.y,
  63969. scaleX: n.scaleX,
  63970. scaleY: n.scaleY
  63971. }
  63972. };
  63973. }, e.prototype.getViewRect = function() {
  63974. return this._viewRect;
  63975. }, e.prototype.getViewRectAfterRoam = function() {
  63976. var n = this.getBoundingRect().clone();
  63977. return n.applyTransform(this.transform), n;
  63978. }, e.prototype.dataToPoint = function(n, r, i) {
  63979. var a = r ? this._rawTransform : this.transform;
  63980. return i = i || [], a ? wF(i, n, a) : Mr(i, n);
  63981. }, e.prototype.pointToData = function(n) {
  63982. var r = this.invTransform;
  63983. return r ? wF([], n, r) : [n[0], n[1]];
  63984. }, e.prototype.convertToPixel = function(n, r, i) {
  63985. var a = CF(r);
  63986. return a === this ? a.dataToPoint(i) : null;
  63987. }, e.prototype.convertFromPixel = function(n, r, i) {
  63988. var a = CF(r);
  63989. return a === this ? a.pointToData(i) : null;
  63990. }, e.prototype.containPoint = function(n) {
  63991. return this.getViewRectAfterRoam().contain(n[0], n[1]);
  63992. }, e.dimensions = ["x", "y"], e;
  63993. }(As)
  63994. );
  63995. function CF(t) {
  63996. var e = t.seriesModel;
  63997. return e ? e.coordinateSystem : null;
  63998. }
  63999. var WBe = {
  64000. geoJSON: {
  64001. aspectScale: 0.75,
  64002. invertLongitute: !0
  64003. },
  64004. geoSVG: {
  64005. aspectScale: 1,
  64006. invertLongitute: !1
  64007. }
  64008. }, hne = ["lng", "lat"], pne = (
  64009. /** @class */
  64010. function(t) {
  64011. q(e, t);
  64012. function e(n, r, i) {
  64013. var a = t.call(this, n) || this;
  64014. a.dimensions = hne, a.type = "geo", a._nameCoordMap = Pe(), a.map = r;
  64015. var o = i.projection, s = qs.load(r, i.nameMap, i.nameProperty), l = qs.getGeoResource(r), u = a.resourceType = l ? l.type : null, c = a.regions = s.regions, f = WBe[l.type];
  64016. 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;
  64017. var d;
  64018. if (o)
  64019. for (var h = 0; h < c.length; h++) {
  64020. var p = c[h].getBoundingRect(o);
  64021. d = d || p.clone(), d.union(p);
  64022. }
  64023. else
  64024. d = s.boundingRect;
  64025. 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;
  64026. }
  64027. return e.prototype._transformTo = function(n, r, i, a) {
  64028. var o = this.getBoundingRect(), s = this._invertLongitute;
  64029. o = o.clone(), s && (o.y = -o.y - o.height);
  64030. var l = this._rawTransformable;
  64031. l.transform = o.calculateTransform(new Je(n, r, i, a));
  64032. var u = l.parent;
  64033. l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
  64034. }, e.prototype.getRegion = function(n) {
  64035. return this._regionsMap.get(n);
  64036. }, e.prototype.getRegionByCoord = function(n) {
  64037. for (var r = this.regions, i = 0; i < r.length; i++) {
  64038. var a = r[i];
  64039. if (a.type === "geoJSON" && a.contain(n))
  64040. return r[i];
  64041. }
  64042. }, e.prototype.addGeoCoord = function(n, r) {
  64043. this._nameCoordMap.set(n, r);
  64044. }, e.prototype.getGeoCoord = function(n) {
  64045. var r = this._regionsMap.get(n);
  64046. return this._nameCoordMap.get(n) || r && r.getCenter();
  64047. }, e.prototype.dataToPoint = function(n, r, i) {
  64048. if (Oe(n) && (n = this.getGeoCoord(n)), n) {
  64049. var a = this.projection;
  64050. return a && (n = a.project(n)), n && this.projectedToPoint(n, r, i);
  64051. }
  64052. }, e.prototype.pointToData = function(n) {
  64053. var r = this.projection;
  64054. return r && (n = r.unproject(n)), n && this.pointToProjected(n);
  64055. }, e.prototype.pointToProjected = function(n) {
  64056. return t.prototype.pointToData.call(this, n);
  64057. }, e.prototype.projectedToPoint = function(n, r, i) {
  64058. return t.prototype.dataToPoint.call(this, n, r, i);
  64059. }, e.prototype.convertToPixel = function(n, r, i) {
  64060. var a = TF(r);
  64061. return a === this ? a.dataToPoint(i) : null;
  64062. }, e.prototype.convertFromPixel = function(n, r, i) {
  64063. var a = TF(r);
  64064. return a === this ? a.pointToData(i) : null;
  64065. }, e;
  64066. }(J0)
  64067. );
  64068. xn(pne, J0);
  64069. function TF(t) {
  64070. var e = t.geoModel, n = t.seriesModel;
  64071. return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Dn).models[0] || {}).coordinateSystem : null;
  64072. }
  64073. const PF = pne;
  64074. function $F(t, e) {
  64075. var n = t.get("boundingCoords");
  64076. if (n != null) {
  64077. var r = n[0], i = n[1];
  64078. if (!(isFinite(r[0]) && isFinite(r[1]) && isFinite(i[0]) && isFinite(i[1])))
  64079. process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
  64080. else {
  64081. var a = this.projection;
  64082. if (a) {
  64083. var o = r[0], s = r[1], l = i[0], u = i[1];
  64084. r = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0];
  64085. var c = function(S, x, C, T) {
  64086. for (var w = C - S, P = T - x, $ = 0; $ <= 100; $++) {
  64087. var A = $ / 100, D = a.project([S + w * A, x + P * A]);
  64088. Ps(r, r, D), $s(i, i, D);
  64089. }
  64090. };
  64091. c(o, s, l, s), c(l, s, l, u), c(l, u, o, u), c(o, u, l, s);
  64092. }
  64093. this.setBoundingRect(r[0], r[1], i[0] - r[0], i[1] - r[1]);
  64094. }
  64095. }
  64096. 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;
  64097. 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."));
  64098. var _;
  64099. if (m)
  64100. _ = {}, g > 1 ? (_.width = b, _.height = b / g) : (_.height = b, _.width = b * g), _.y = y[1] - _.height / 2, _.x = y[0] - _.width / 2;
  64101. else {
  64102. var O = t.getBoxLayoutParams();
  64103. O.aspect = g, _ = Rn(O, {
  64104. width: p,
  64105. height: v
  64106. });
  64107. }
  64108. this.setViewRect(_.x, _.y, _.width, _.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"));
  64109. }
  64110. function QBe(t, e) {
  64111. k(e.get("geoCoord"), function(n, r) {
  64112. t.addGeoCoord(r, n);
  64113. });
  64114. }
  64115. var HBe = (
  64116. /** @class */
  64117. function() {
  64118. function t() {
  64119. this.dimensions = hne;
  64120. }
  64121. return t.prototype.create = function(e, n) {
  64122. var r = [];
  64123. function i(o) {
  64124. return {
  64125. nameProperty: o.get("nameProperty"),
  64126. aspectScale: o.get("aspectScale"),
  64127. projection: o.get("projection")
  64128. };
  64129. }
  64130. e.eachComponent("geo", function(o, s) {
  64131. var l = o.get("map"), u = new PF(l + s, l, le({
  64132. nameMap: o.get("nameMap")
  64133. }, i(o)));
  64134. u.zoomLimit = o.get("scaleLimit"), r.push(u), o.coordinateSystem = u, u.model = o, u.resize = $F, u.resize(o, n);
  64135. }), e.eachSeries(function(o) {
  64136. var s = o.get("coordinateSystem");
  64137. if (s === "geo") {
  64138. var l = o.get("geoIndex") || 0;
  64139. o.coordinateSystem = r[l];
  64140. }
  64141. });
  64142. var a = {};
  64143. return e.eachSeriesByType("map", function(o) {
  64144. if (!o.getHostGeoModel()) {
  64145. var s = o.getMapType();
  64146. a[s] = a[s] || [], a[s].push(o);
  64147. }
  64148. }), k(a, function(o, s) {
  64149. var l = ce(o, function(c) {
  64150. return c.get("nameMap");
  64151. }), u = new PF(s, s, le({
  64152. nameMap: Dx(l)
  64153. }, i(o[0])));
  64154. u.zoomLimit = Tn.apply(null, ce(o, function(c) {
  64155. return c.get("scaleLimit");
  64156. })), r.push(u), u.resize = $F, u.resize(o[0], n), k(o, function(c) {
  64157. c.coordinateSystem = u, QBe(u, c);
  64158. });
  64159. }), r;
  64160. }, t.prototype.getFilledRegions = function(e, n, r, i) {
  64161. for (var a = (e || []).slice(), o = Pe(), s = 0; s < a.length; s++)
  64162. o.set(a[s].name, a[s]);
  64163. var l = qs.load(n, r, i);
  64164. return k(l.regions, function(u) {
  64165. var c = u.name;
  64166. !o.get(c) && a.push({
  64167. name: c
  64168. });
  64169. }), a;
  64170. }, t;
  64171. }()
  64172. ), vne = new HBe(), GBe = (
  64173. /** @class */
  64174. function(t) {
  64175. q(e, t);
  64176. function e() {
  64177. var n = t !== null && t.apply(this, arguments) || this;
  64178. return n.type = e.type, n;
  64179. }
  64180. return e.prototype.init = function(n, r, i) {
  64181. var a = qs.getGeoResource(n.map);
  64182. if (a && a.type === "geoJSON") {
  64183. var o = n.itemStyle = n.itemStyle || {};
  64184. "color" in o || (o.color = "#eee");
  64185. }
  64186. this.mergeDefaultAndTheme(n, i), gf(n, "label", ["show"]);
  64187. }, e.prototype.optionUpdated = function() {
  64188. var n = this, r = this.option;
  64189. r.regions = vne.getFilledRegions(r.regions, r.map, r.nameMap, r.nameProperty);
  64190. var i = {};
  64191. this._optionModelMap = Aa(r.regions || [], function(a, o) {
  64192. var s = o.name;
  64193. return s && (a.set(s, new Wt(o, n, n.ecModel)), o.selected && (i[s] = !0)), a;
  64194. }, Pe()), r.selectedMap || (r.selectedMap = i);
  64195. }, e.prototype.getRegionModel = function(n) {
  64196. return this._optionModelMap.get(n) || new Wt(null, this, this.ecModel);
  64197. }, e.prototype.getFormattedLabel = function(n, r) {
  64198. var i = this.getRegionModel(n), a = r === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = {
  64199. name: n
  64200. };
  64201. if (Me(a))
  64202. return o.status = r, a(o);
  64203. if (Oe(a))
  64204. return a.replace("{a}", n ?? "");
  64205. }, e.prototype.setZoom = function(n) {
  64206. this.option.zoom = n;
  64207. }, e.prototype.setCenter = function(n) {
  64208. this.option.center = n;
  64209. }, e.prototype.select = function(n) {
  64210. var r = this.option, i = r.selectedMode;
  64211. if (i) {
  64212. i !== "multiple" && (r.selectedMap = null);
  64213. var a = r.selectedMap || (r.selectedMap = {});
  64214. a[n] = !0;
  64215. }
  64216. }, e.prototype.unSelect = function(n) {
  64217. var r = this.option.selectedMap;
  64218. r && (r[n] = !1);
  64219. }, e.prototype.toggleSelected = function(n) {
  64220. this[this.isSelected(n) ? "unSelect" : "select"](n);
  64221. }, e.prototype.isSelected = function(n) {
  64222. var r = this.option.selectedMap;
  64223. return !!(r && r[n]);
  64224. }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
  64225. // zlevel: 0,
  64226. z: 0,
  64227. show: !0,
  64228. left: "center",
  64229. top: "center",
  64230. // Default value:
  64231. // for geoSVG source: 1,
  64232. // for geoJSON source: 0.75.
  64233. aspectScale: null,
  64234. // /// Layout with center and size
  64235. // If you want to put map in a fixed size box with right aspect ratio
  64236. // This two properties may be more convenient
  64237. // layoutCenter: [50%, 50%]
  64238. // layoutSize: 100
  64239. silent: !1,
  64240. // Map type
  64241. map: "",
  64242. // Define left-top, right-bottom coords to control view
  64243. // For example, [ [180, 90], [-180, -90] ]
  64244. boundingCoords: null,
  64245. // Default on center of map
  64246. center: null,
  64247. zoom: 1,
  64248. scaleLimit: null,
  64249. // selectedMode: false
  64250. label: {
  64251. show: !1,
  64252. color: "#000"
  64253. },
  64254. itemStyle: {
  64255. borderWidth: 0.5,
  64256. borderColor: "#444"
  64257. // Default color:
  64258. // + geoJSON: #eee
  64259. // + geoSVG: null (use SVG original `fill`)
  64260. // color: '#eee'
  64261. },
  64262. emphasis: {
  64263. label: {
  64264. show: !0,
  64265. color: "rgb(100,0,0)"
  64266. },
  64267. itemStyle: {
  64268. color: "rgba(255,215,0,0.8)"
  64269. }
  64270. },
  64271. select: {
  64272. label: {
  64273. show: !0,
  64274. color: "rgb(100,0,0)"
  64275. },
  64276. itemStyle: {
  64277. color: "rgba(255,215,0,0.8)"
  64278. }
  64279. },
  64280. regions: []
  64281. // tooltip: {
  64282. // show: false
  64283. // }
  64284. }, e;
  64285. }(rt)
  64286. );
  64287. function AF(t, e) {
  64288. return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e);
  64289. }
  64290. function Qk(t, e, n, r) {
  64291. var i = t.getZoom(), a = t.getCenter(), o = e.zoom, s = t.projectedToPoint ? t.projectedToPoint(a) : t.dataToPoint(a);
  64292. if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(AF(t, s), r)), o != null) {
  64293. if (n) {
  64294. var l = n.min || 0, u = n.max || 1 / 0;
  64295. o = Math.max(Math.min(i * o, u), l) / i;
  64296. }
  64297. t.scaleX *= o, t.scaleY *= o;
  64298. var c = (e.originX - t.x) * (o - 1), f = (e.originY - t.y) * (o - 1);
  64299. t.x -= c, t.y -= f, t.updateTransform(), t.setCenter(AF(t, s), r), t.setZoom(o * i);
  64300. }
  64301. return {
  64302. center: t.getCenter(),
  64303. zoom: t.getZoom()
  64304. };
  64305. }
  64306. var jBe = (
  64307. /** @class */
  64308. function(t) {
  64309. q(e, t);
  64310. function e() {
  64311. var n = t !== null && t.apply(this, arguments) || this;
  64312. return n.type = e.type, n.focusBlurEnabled = !0, n;
  64313. }
  64314. return e.prototype.init = function(n, r) {
  64315. this._api = r;
  64316. }, e.prototype.render = function(n, r, i, a) {
  64317. if (this._model = n, !n.get("show")) {
  64318. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  64319. return;
  64320. }
  64321. this._mapDraw || (this._mapDraw = new dne(i));
  64322. var o = this._mapDraw;
  64323. 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);
  64324. }, e.prototype._handleRegionClick = function(n) {
  64325. var r;
  64326. Bc(n.target, function(i) {
  64327. return (r = Fe(i).eventData) != null;
  64328. }, !0), r && this._api.dispatchAction({
  64329. type: "geoToggleSelect",
  64330. geoId: this._model.id,
  64331. name: r.name
  64332. });
  64333. }, e.prototype.updateSelectStatus = function(n, r, i) {
  64334. var a = this;
  64335. this._mapDraw.group.traverse(function(o) {
  64336. var s = Fe(o).eventData;
  64337. if (s)
  64338. return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0;
  64339. });
  64340. }, e.prototype.findHighDownDispatchers = function(n) {
  64341. return this._mapDraw && this._mapDraw.findHighDownDispatchers(n, this._model);
  64342. }, e.prototype.dispose = function() {
  64343. this._mapDraw && this._mapDraw.remove();
  64344. }, e.type = "geo", e;
  64345. }(Xt)
  64346. );
  64347. function ZBe(t, e, n) {
  64348. qs.registerMap(t, e, n);
  64349. }
  64350. function gne(t) {
  64351. t.registerCoordinateSystem("geo", vne), t.registerComponentModel(GBe), t.registerComponentView(jBe), t.registerImpl("registerMap", ZBe), t.registerImpl("getMap", function(n) {
  64352. return qs.getMapForUser(n);
  64353. });
  64354. function e(n, r) {
  64355. r.update = "geo:updateSelectStatus", t.registerAction(r, function(i, a) {
  64356. var o = {}, s = [];
  64357. return a.eachComponent({
  64358. mainType: "geo",
  64359. query: i
  64360. }, function(l) {
  64361. l[n](i.name);
  64362. var u = l.coordinateSystem;
  64363. k(u.regions, function(f) {
  64364. o[f.name] = l.isSelected(f.name) || !1;
  64365. });
  64366. var c = [];
  64367. k(o, function(f, d) {
  64368. o[d] && c.push(d);
  64369. }), s.push({
  64370. geoIndex: l.componentIndex,
  64371. // Use singular, the same naming convention as the event `selectchanged`.
  64372. name: c
  64373. });
  64374. }), {
  64375. selected: o,
  64376. allSelected: s,
  64377. name: i.name
  64378. };
  64379. });
  64380. }
  64381. e("toggleSelected", {
  64382. type: "geoToggleSelect",
  64383. event: "geoselectchanged"
  64384. }), e("select", {
  64385. type: "geoSelect",
  64386. event: "geoselected"
  64387. }), e("unSelect", {
  64388. type: "geoUnSelect",
  64389. event: "geounselected"
  64390. }), t.registerAction({
  64391. type: "geoRoam",
  64392. event: "geoRoam",
  64393. update: "updateTransform"
  64394. }, function(n, r, i) {
  64395. var a = n.componentType || "series";
  64396. r.eachComponent({
  64397. mainType: a,
  64398. query: n
  64399. }, function(o) {
  64400. var s = o.coordinateSystem;
  64401. if (s.type === "geo") {
  64402. var l = Qk(s, n, o.get("scaleLimit"), i);
  64403. o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), a === "series" && k(o.seriesGroup, function(u) {
  64404. u.setCenter(l.center), u.setZoom(l.zoom);
  64405. });
  64406. }
  64407. });
  64408. });
  64409. }
  64410. function UBe(t) {
  64411. at(gne), t.registerChartView(NBe), t.registerSeriesModel(BBe), t.registerLayout(FBe), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, VBe), pee("map", t.registerAction);
  64412. }
  64413. function XBe(t) {
  64414. var e = t;
  64415. e.hierNode = {
  64416. defaultAncestor: null,
  64417. ancestor: e,
  64418. prelim: 0,
  64419. modifier: 0,
  64420. change: 0,
  64421. shift: 0,
  64422. i: 0,
  64423. thread: null
  64424. };
  64425. for (var n = [e], r, i; r = n.pop(); )
  64426. if (i = r.children, r.isExpand && i.length)
  64427. for (var a = i.length, o = a - 1; o >= 0; o--) {
  64428. var s = i[o];
  64429. s.hierNode = {
  64430. defaultAncestor: null,
  64431. ancestor: s,
  64432. prelim: 0,
  64433. modifier: 0,
  64434. change: 0,
  64435. shift: 0,
  64436. i: o,
  64437. thread: null
  64438. }, n.push(s);
  64439. }
  64440. }
  64441. function YBe(t, e) {
  64442. var n = t.isExpand ? t.children : [], r = t.parentNode.children, i = t.hierNode.i ? r[t.hierNode.i - 1] : null;
  64443. if (n.length) {
  64444. JBe(t);
  64445. var a = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
  64446. i ? (t.hierNode.prelim = i.hierNode.prelim + e(t, i), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a;
  64447. } else i && (t.hierNode.prelim = i.hierNode.prelim + e(t, i));
  64448. t.parentNode.hierNode.defaultAncestor = eze(t, i, t.parentNode.hierNode.defaultAncestor || r[0], e);
  64449. }
  64450. function qBe(t) {
  64451. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  64452. t.setLayout({
  64453. x: e
  64454. }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier;
  64455. }
  64456. function EF(t) {
  64457. return arguments.length ? t : rze;
  64458. }
  64459. function Xv(t, e) {
  64460. return t -= Math.PI / 2, {
  64461. x: e * Math.cos(t),
  64462. y: e * Math.sin(t)
  64463. };
  64464. }
  64465. function KBe(t, e) {
  64466. return Rn(t.getBoxLayoutParams(), {
  64467. width: e.getWidth(),
  64468. height: e.getHeight()
  64469. });
  64470. }
  64471. function JBe(t) {
  64472. for (var e = t.children, n = e.length, r = 0, i = 0; --n >= 0; ) {
  64473. var a = e[n];
  64474. a.hierNode.prelim += r, a.hierNode.modifier += r, i += a.hierNode.change, r += a.hierNode.shift + i;
  64475. }
  64476. }
  64477. function eze(t, e, n, r) {
  64478. if (e) {
  64479. 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 = hP(s), a = pP(a), s && a; ) {
  64480. i = hP(i), o = pP(o), i.hierNode.ancestor = t;
  64481. var d = s.hierNode.prelim + f - a.hierNode.prelim - u + r(s, a);
  64482. d > 0 && (nze(tze(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;
  64483. }
  64484. s && !hP(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - l), a && !pP(o) && (o.hierNode.thread = a, o.hierNode.modifier += u - c, n = t);
  64485. }
  64486. return n;
  64487. }
  64488. function hP(t) {
  64489. var e = t.children;
  64490. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread;
  64491. }
  64492. function pP(t) {
  64493. var e = t.children;
  64494. return e.length && t.isExpand ? e[0] : t.hierNode.thread;
  64495. }
  64496. function tze(t, e, n) {
  64497. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n;
  64498. }
  64499. function nze(t, e, n) {
  64500. var r = n / (e.hierNode.i - t.hierNode.i);
  64501. e.hierNode.change -= r, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += r;
  64502. }
  64503. function rze(t, e) {
  64504. return t.parentNode === e.parentNode ? 1 : 2;
  64505. }
  64506. var ize = (
  64507. /** @class */
  64508. /* @__PURE__ */ function() {
  64509. function t() {
  64510. this.parentPoint = [], this.childPoints = [];
  64511. }
  64512. return t;
  64513. }()
  64514. ), aze = (
  64515. /** @class */
  64516. function(t) {
  64517. q(e, t);
  64518. function e(n) {
  64519. return t.call(this, n) || this;
  64520. }
  64521. return e.prototype.getDefaultStyle = function() {
  64522. return {
  64523. stroke: "#000",
  64524. fill: null
  64525. };
  64526. }, e.prototype.getDefaultShape = function() {
  64527. return new ize();
  64528. }, e.prototype.buildPath = function(n, r) {
  64529. var i = r.childPoints, a = i.length, o = r.parentPoint, s = i[0], l = i[a - 1];
  64530. if (a === 1) {
  64531. n.moveTo(o[0], o[1]), n.lineTo(s[0], s[1]);
  64532. return;
  64533. }
  64534. var u = r.orient, c = u === "TB" || u === "BT" ? 0 : 1, f = 1 - c, d = _e(r.forkPosition, 1), h = [];
  64535. 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]);
  64536. for (var p = 1; p < a - 1; p++) {
  64537. var v = i[p];
  64538. n.moveTo(v[0], v[1]), h[c] = v[c], n.lineTo(h[0], h[1]);
  64539. }
  64540. }, e;
  64541. }(ot)
  64542. ), oze = (
  64543. /** @class */
  64544. function(t) {
  64545. q(e, t);
  64546. function e() {
  64547. var n = t !== null && t.apply(this, arguments) || this;
  64548. return n.type = e.type, n._mainGroup = new Ve(), n;
  64549. }
  64550. return e.prototype.init = function(n, r) {
  64551. this._controller = new K0(r.getZr()), this._controllerHost = {
  64552. target: this.group
  64553. }, this.group.add(this._mainGroup);
  64554. }, e.prototype.render = function(n, r, i) {
  64555. var a = n.getData(), o = n.layoutInfo, s = this._mainGroup, l = n.get("layout");
  64556. 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);
  64557. var u = this._data;
  64558. a.diff(u).add(function(c) {
  64559. MF(a, c) && IF(a, c, null, s, n);
  64560. }).update(function(c, f) {
  64561. var d = u.getItemGraphicEl(f);
  64562. if (!MF(a, c)) {
  64563. d && RF(u, f, d, s, n);
  64564. return;
  64565. }
  64566. IF(a, c, d, s, n);
  64567. }).remove(function(c) {
  64568. var f = u.getItemGraphicEl(c);
  64569. f && RF(u, c, f, s, n);
  64570. }).execute(), this._nodeScaleRatio = n.get("nodeScaleRatio"), this._updateNodeAndLinkScale(n), n.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) {
  64571. c.off("click").on("click", function() {
  64572. i.dispatchAction({
  64573. type: "treeExpandAndCollapse",
  64574. seriesId: n.id,
  64575. dataIndex: f
  64576. });
  64577. });
  64578. }), this._data = a;
  64579. }, e.prototype._updateViewCoordSys = function(n, r) {
  64580. var i = n.getData(), a = [];
  64581. i.each(function(f) {
  64582. var d = i.getItemLayout(f);
  64583. d && !isNaN(d.x) && !isNaN(d.y) && a.push([+d.x, +d.y]);
  64584. });
  64585. var o = [], s = [];
  64586. jx(a, o, s);
  64587. var l = this._min, u = this._max;
  64588. 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);
  64589. var c = n.coordinateSystem = new J0();
  64590. 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({
  64591. x: c.x,
  64592. y: c.y,
  64593. scaleX: c.scaleX,
  64594. scaleY: c.scaleY
  64595. }), this._min = o, this._max = s;
  64596. }, e.prototype._updateController = function(n, r, i) {
  64597. var a = this, o = this._controller, s = this._controllerHost, l = this.group;
  64598. o.setPointerChecker(function(u, c, f) {
  64599. var d = l.getBoundingRect();
  64600. return d.applyTransform(l.transform), d.contain(c, f) && !mw(u, i, n);
  64601. }), o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
  64602. Vk(s, u.dx, u.dy), i.dispatchAction({
  64603. seriesId: n.id,
  64604. type: "treeRoam",
  64605. dx: u.dx,
  64606. dy: u.dy
  64607. });
  64608. }).on("zoom", function(u) {
  64609. Fk(s, u.scale, u.originX, u.originY), i.dispatchAction({
  64610. seriesId: n.id,
  64611. type: "treeRoam",
  64612. zoom: u.scale,
  64613. originX: u.originX,
  64614. originY: u.originY
  64615. }), a._updateNodeAndLinkScale(n), i.updateLabelLayout();
  64616. });
  64617. }, e.prototype._updateNodeAndLinkScale = function(n) {
  64618. var r = n.getData(), i = this._getNodeGlobalScale(n);
  64619. r.eachItemGraphicEl(function(a, o) {
  64620. a.setSymbolScale(i);
  64621. });
  64622. }, e.prototype._getNodeGlobalScale = function(n) {
  64623. var r = n.coordinateSystem;
  64624. if (r.type !== "view")
  64625. return 1;
  64626. var i = this._nodeScaleRatio, a = r.scaleX || 1, o = r.getZoom(), s = (o - 1) * i + 1;
  64627. return s / a;
  64628. }, e.prototype.dispose = function() {
  64629. this._controller && this._controller.dispose(), this._controllerHost = null;
  64630. }, e.prototype.remove = function() {
  64631. this._mainGroup.removeAll(), this._data = null;
  64632. }, e.type = "tree", e;
  64633. }(zt)
  64634. );
  64635. function MF(t, e) {
  64636. var n = t.getItemLayout(e);
  64637. return n && !isNaN(n.x) && !isNaN(n.y);
  64638. }
  64639. function IF(t, e, n, r, i) {
  64640. 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 ? {
  64641. x: d.__oldX,
  64642. y: d.__oldY,
  64643. rawX: d.__radialOldRawX,
  64644. rawY: d.__radialOldRawY
  64645. } : h, v = o.getLayout();
  64646. a ? (n = new j0(t, e, null, {
  64647. symbolInnerColor: u,
  64648. useNameLabel: !0
  64649. }), n.x = p.x, n.y = p.y) : n.updateData(t, e, null, {
  64650. symbolInnerColor: u,
  64651. useNameLabel: !0
  64652. }), 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, {
  64653. x: v.x,
  64654. y: v.y
  64655. }, i);
  64656. var g = n.getSymbolPath();
  64657. if (i.get("layout") === "radial") {
  64658. var m = c.children[0], y = m.getLayout(), b = m.children.length, _ = void 0, O = void 0;
  64659. if (v.x === y.x && o.isExpand === !0 && m.children.length) {
  64660. var S = {
  64661. x: (m.children[0].getLayout().x + m.children[b - 1].getLayout().x) / 2,
  64662. y: (m.children[0].getLayout().y + m.children[b - 1].getLayout().y) / 2
  64663. };
  64664. _ = Math.atan2(S.y - y.y, S.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), O = S.x < y.x, O && (_ = _ - Math.PI);
  64665. } else
  64666. _ = 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));
  64667. var x = O ? "left" : "right", C = s.getModel("label"), T = C.get("rotate"), w = T * (Math.PI / 180), P = g.getTextContent();
  64668. P && (g.setTextConfig({
  64669. position: C.get("position") || x,
  64670. rotation: T == null ? -_ : w,
  64671. origin: "center"
  64672. }), P.setStyle("verticalAlign", "middle"));
  64673. }
  64674. var $ = s.get(["emphasis", "focus"]), A = $ === "relative" ? gm(o.getAncestorsIndices(), o.getDescendantIndices()) : $ === "ancestor" ? o.getAncestorsIndices() : $ === "descendant" ? o.getDescendantIndices() : null;
  64675. A && (Fe(n).focus = A), sze(i, o, c, n, p, h, v, r), n.__edge && (n.onHoverStateChange = function(D) {
  64676. if (D !== "blur") {
  64677. var E = o.parentNode && t.getItemGraphicEl(o.parentNode.dataIndex);
  64678. E && E.hoverState === B0 || oO(n.__edge, D);
  64679. }
  64680. });
  64681. }
  64682. function sze(t, e, n, r, i, a, o, s) {
  64683. 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;
  64684. if (u === "curve")
  64685. e.parentNode && e.parentNode !== n && (v || (v = r.__edge = new V0({
  64686. shape: vE(c, f, d, i, i)
  64687. })), Ct(v, {
  64688. shape: vE(c, f, d, a, o)
  64689. }, t));
  64690. else if (u === "polyline") {
  64691. if (c === "orthogonal") {
  64692. if (e !== n && e.children && e.children.length !== 0 && e.isExpand === !0) {
  64693. for (var g = e.children, m = [], y = 0; y < g.length; y++) {
  64694. var b = g[y].getLayout();
  64695. m.push([b.x, b.y]);
  64696. }
  64697. v || (v = r.__edge = new aze({
  64698. shape: {
  64699. parentPoint: [o.x, o.y],
  64700. childPoints: [[o.x, o.y]],
  64701. orient: f,
  64702. forkPosition: h
  64703. }
  64704. })), Ct(v, {
  64705. shape: {
  64706. parentPoint: [o.x, o.y],
  64707. childPoints: m
  64708. }
  64709. }, t);
  64710. }
  64711. } else if (process.env.NODE_ENV !== "production")
  64712. throw new Error("The polyline edgeShape can only be used in orthogonal layout");
  64713. }
  64714. v && !(u === "polyline" && !e.isExpand) && (v.useStyle(Re({
  64715. strokeNoScale: !0,
  64716. fill: null
  64717. }, p)), Tr(v, l, "lineStyle"), bf(v), s.add(v));
  64718. }
  64719. function DF(t, e, n, r, i) {
  64720. var a = e.tree.root, o = mne(a, t), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(t.dataIndex);
  64721. if (u) {
  64722. 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"]);
  64723. d && (h === "curve" ? uu(d, {
  64724. shape: vE(p, v, g, l, l),
  64725. style: {
  64726. opacity: 0
  64727. }
  64728. }, r, {
  64729. cb: function() {
  64730. n.remove(d);
  64731. },
  64732. removeOpt: i
  64733. }) : h === "polyline" && r.get("layout") === "orthogonal" && uu(d, {
  64734. shape: {
  64735. parentPoint: [l.x, l.y],
  64736. childPoints: [[l.x, l.y]]
  64737. },
  64738. style: {
  64739. opacity: 0
  64740. }
  64741. }, r, {
  64742. cb: function() {
  64743. n.remove(d);
  64744. },
  64745. removeOpt: i
  64746. }));
  64747. }
  64748. }
  64749. function mne(t, e) {
  64750. for (var n = e.parentNode === t ? e : e.parentNode || e, r; r = n.getLayout(), r == null; )
  64751. n = n.parentNode === t ? n : n.parentNode || n;
  64752. return {
  64753. source: n,
  64754. sourceLayout: r
  64755. };
  64756. }
  64757. function RF(t, e, n, r, i) {
  64758. var a = t.tree.getNodeByDataIndex(e), o = t.tree.root, s = mne(o, a).sourceLayout, l = {
  64759. duration: i.get("animationDurationUpdate"),
  64760. easing: i.get("animationEasingUpdate")
  64761. };
  64762. uu(n, {
  64763. x: s.x + 1,
  64764. y: s.y + 1
  64765. }, i, {
  64766. cb: function() {
  64767. r.remove(n), t.setItemGraphicEl(e, null);
  64768. },
  64769. removeOpt: l
  64770. }), n.fadeOut(null, t.hostModel, {
  64771. fadeLabel: !0,
  64772. animation: l
  64773. }), a.children.forEach(function(u) {
  64774. DF(u, t, r, i, l);
  64775. }), DF(a, t, r, i, l);
  64776. }
  64777. function vE(t, e, n, r, i) {
  64778. var a, o, s, l, u, c, f, d;
  64779. if (t === "radial") {
  64780. u = r.rawX, f = r.rawY, c = i.rawX, d = i.rawY;
  64781. var h = Xv(u, f), p = Xv(u, f + (d - f) * n), v = Xv(c, d + (f - d) * n), g = Xv(c, d);
  64782. return {
  64783. x1: h.x || 0,
  64784. y1: h.y || 0,
  64785. x2: g.x || 0,
  64786. y2: g.y || 0,
  64787. cpx1: p.x || 0,
  64788. cpy1: p.y || 0,
  64789. cpx2: v.x || 0,
  64790. cpy2: v.y || 0
  64791. };
  64792. } else
  64793. 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);
  64794. return {
  64795. x1: u,
  64796. y1: f,
  64797. x2: c,
  64798. y2: d,
  64799. cpx1: a,
  64800. cpy1: o,
  64801. cpx2: s,
  64802. cpy2: l
  64803. };
  64804. }
  64805. var Sa = bt();
  64806. function yne(t) {
  64807. var e = t.mainData, n = t.datas;
  64808. n || (n = {
  64809. main: e
  64810. }, t.datasAttr = {
  64811. main: "data"
  64812. }), t.datas = t.mainData = null, bne(e, n, t), k(n, function(r) {
  64813. k(e.TRANSFERABLE_METHODS, function(i) {
  64814. r.wrapMethod(i, Ue(lze, t));
  64815. });
  64816. }), e.wrapMethod("cloneShallow", Ue(cze, t)), k(e.CHANGABLE_METHODS, function(r) {
  64817. e.wrapMethod(r, Ue(uze, t));
  64818. }), ke(n[e.dataType] === e);
  64819. }
  64820. function lze(t, e) {
  64821. if (hze(this)) {
  64822. var n = le({}, Sa(this).datas);
  64823. n[this.dataType] = e, bne(e, n, t);
  64824. } else
  64825. Hk(e, this.dataType, Sa(this).mainData, t);
  64826. return e;
  64827. }
  64828. function uze(t, e) {
  64829. return t.struct && t.struct.update(), e;
  64830. }
  64831. function cze(t, e) {
  64832. return k(Sa(e).datas, function(n, r) {
  64833. n !== e && Hk(n.cloneShallow(), r, e, t);
  64834. }), e;
  64835. }
  64836. function fze(t) {
  64837. var e = Sa(this).mainData;
  64838. return t == null || e == null ? e : Sa(e).datas[t];
  64839. }
  64840. function dze() {
  64841. var t = Sa(this).mainData;
  64842. return t == null ? [{
  64843. data: t
  64844. }] : ce(st(Sa(t).datas), function(e) {
  64845. return {
  64846. type: e,
  64847. data: Sa(t).datas[e]
  64848. };
  64849. });
  64850. }
  64851. function hze(t) {
  64852. return Sa(t).mainData === t;
  64853. }
  64854. function bne(t, e, n) {
  64855. Sa(t).datas = {}, k(e, function(r, i) {
  64856. Hk(r, i, t, n);
  64857. });
  64858. }
  64859. function Hk(t, e, n, r) {
  64860. Sa(n).datas[e] = t, Sa(t).mainData = n, t.dataType = e, r.struct && (t[r.structAttr] = r.struct, r.struct[r.datasAttr[e]] = t), t.getLinkedData = fze, t.getLinkedDataAll = dze;
  64861. }
  64862. var pze = (
  64863. /** @class */
  64864. function() {
  64865. function t(e, n) {
  64866. this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = n;
  64867. }
  64868. return t.prototype.isRemoved = function() {
  64869. return this.dataIndex < 0;
  64870. }, t.prototype.eachNode = function(e, n, r) {
  64871. Me(e) && (r = n, n = e, e = null), e = e || {}, Oe(e) && (e = {
  64872. order: e
  64873. });
  64874. var i = e.order || "preorder", a = this[e.attr || "children"], o;
  64875. i === "preorder" && (o = n.call(r, this));
  64876. for (var s = 0; !o && s < a.length; s++)
  64877. a[s].eachNode(e, n, r);
  64878. i === "postorder" && n.call(r, this);
  64879. }, t.prototype.updateDepthAndHeight = function(e) {
  64880. var n = 0;
  64881. this.depth = e;
  64882. for (var r = 0; r < this.children.length; r++) {
  64883. var i = this.children[r];
  64884. i.updateDepthAndHeight(e + 1), i.height > n && (n = i.height);
  64885. }
  64886. this.height = n + 1;
  64887. }, t.prototype.getNodeById = function(e) {
  64888. if (this.getId() === e)
  64889. return this;
  64890. for (var n = 0, r = this.children, i = r.length; n < i; n++) {
  64891. var a = r[n].getNodeById(e);
  64892. if (a)
  64893. return a;
  64894. }
  64895. }, t.prototype.contains = function(e) {
  64896. if (e === this)
  64897. return !0;
  64898. for (var n = 0, r = this.children, i = r.length; n < i; n++) {
  64899. var a = r[n].contains(e);
  64900. if (a)
  64901. return a;
  64902. }
  64903. }, t.prototype.getAncestors = function(e) {
  64904. for (var n = [], r = e ? this : this.parentNode; r; )
  64905. n.push(r), r = r.parentNode;
  64906. return n.reverse(), n;
  64907. }, t.prototype.getAncestorsIndices = function() {
  64908. for (var e = [], n = this; n; )
  64909. e.push(n.dataIndex), n = n.parentNode;
  64910. return e.reverse(), e;
  64911. }, t.prototype.getDescendantIndices = function() {
  64912. var e = [];
  64913. return this.eachNode(function(n) {
  64914. e.push(n.dataIndex);
  64915. }), e;
  64916. }, t.prototype.getValue = function(e) {
  64917. var n = this.hostTree.data;
  64918. return n.getStore().get(n.getDimensionIndex(e || "value"), this.dataIndex);
  64919. }, t.prototype.setLayout = function(e, n) {
  64920. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, n);
  64921. }, t.prototype.getLayout = function() {
  64922. return this.hostTree.data.getItemLayout(this.dataIndex);
  64923. }, t.prototype.getModel = function(e) {
  64924. if (!(this.dataIndex < 0)) {
  64925. var n = this.hostTree, r = n.data.getItemModel(this.dataIndex);
  64926. return r.getModel(e);
  64927. }
  64928. }, t.prototype.getLevelModel = function() {
  64929. return (this.hostTree.levelModels || [])[this.depth];
  64930. }, t.prototype.setVisual = function(e, n) {
  64931. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, n);
  64932. }, t.prototype.getVisual = function(e) {
  64933. return this.hostTree.data.getItemVisual(this.dataIndex, e);
  64934. }, t.prototype.getRawIndex = function() {
  64935. return this.hostTree.data.getRawIndex(this.dataIndex);
  64936. }, t.prototype.getId = function() {
  64937. return this.hostTree.data.getId(this.dataIndex);
  64938. }, t.prototype.getChildIndex = function() {
  64939. if (this.parentNode) {
  64940. for (var e = this.parentNode.children, n = 0; n < e.length; ++n)
  64941. if (e[n] === this)
  64942. return n;
  64943. return -1;
  64944. }
  64945. return -1;
  64946. }, t.prototype.isAncestorOf = function(e) {
  64947. for (var n = e.parentNode; n; ) {
  64948. if (n === this)
  64949. return !0;
  64950. n = n.parentNode;
  64951. }
  64952. return !1;
  64953. }, t.prototype.isDescendantOf = function(e) {
  64954. return e !== this && e.isAncestorOf(this);
  64955. }, t;
  64956. }()
  64957. ), Gk = (
  64958. /** @class */
  64959. function() {
  64960. function t(e) {
  64961. this.type = "tree", this._nodes = [], this.hostModel = e;
  64962. }
  64963. return t.prototype.eachNode = function(e, n, r) {
  64964. this.root.eachNode(e, n, r);
  64965. }, t.prototype.getNodeByDataIndex = function(e) {
  64966. var n = this.data.getRawIndex(e);
  64967. return this._nodes[n];
  64968. }, t.prototype.getNodeById = function(e) {
  64969. return this.root.getNodeById(e);
  64970. }, t.prototype.update = function() {
  64971. for (var e = this.data, n = this._nodes, r = 0, i = n.length; r < i; r++)
  64972. n[r].dataIndex = -1;
  64973. for (var r = 0, i = e.count(); r < i; r++)
  64974. n[e.getRawIndex(r)].dataIndex = r;
  64975. }, t.prototype.clearLayouts = function() {
  64976. this.data.clearItemLayouts();
  64977. }, t.createTree = function(e, n, r) {
  64978. var i = new t(n), a = [], o = 1;
  64979. s(e);
  64980. function s(c, f) {
  64981. var d = c.value;
  64982. o = Math.max(o, ue(d) ? d.length : 1), a.push(c);
  64983. var h = new pze(Vn(c.name, ""), i);
  64984. f ? vze(h, f) : i.root = h, i._nodes.push(h);
  64985. var p = c.children;
  64986. if (p)
  64987. for (var v = 0; v < p.length; v++)
  64988. s(p[v], h);
  64989. }
  64990. i.root.updateDepthAndHeight(0);
  64991. var l = wp(a, {
  64992. coordDimensions: ["value"],
  64993. dimensionsCount: o
  64994. }).dimensions, u = new Lr(l, n);
  64995. return u.initData(a), r && r(u), yne({
  64996. mainData: u,
  64997. struct: i,
  64998. structAttr: "tree"
  64999. }), i.update(), i;
  65000. }, t;
  65001. }()
  65002. );
  65003. function vze(t, e) {
  65004. var n = e.children;
  65005. t.parentNode !== e && (n.push(t), t.parentNode = e);
  65006. }
  65007. function Lm(t, e, n) {
  65008. if (t && et(e, t.type) >= 0) {
  65009. var r = n.getData().tree.root, i = t.targetNode;
  65010. if (Oe(i) && (i = r.getNodeById(i)), i && r.contains(i))
  65011. return {
  65012. node: i
  65013. };
  65014. var a = t.targetNodeId;
  65015. if (a != null && (i = r.getNodeById(a)))
  65016. return {
  65017. node: i
  65018. };
  65019. }
  65020. }
  65021. function _ne(t) {
  65022. for (var e = []; t; )
  65023. t = t.parentNode, t && e.push(t);
  65024. return e.reverse();
  65025. }
  65026. function jk(t, e) {
  65027. var n = _ne(t);
  65028. return et(n, e) >= 0;
  65029. }
  65030. function bw(t, e) {
  65031. for (var n = []; t; ) {
  65032. var r = t.dataIndex;
  65033. n.push({
  65034. name: t.name,
  65035. dataIndex: r,
  65036. value: e.getRawValue(r)
  65037. }), t = t.parentNode;
  65038. }
  65039. return n.reverse(), n;
  65040. }
  65041. var gze = (
  65042. /** @class */
  65043. function(t) {
  65044. q(e, t);
  65045. function e() {
  65046. var n = t !== null && t.apply(this, arguments) || this;
  65047. return n.hasSymbolVisual = !0, n.ignoreStyleOnData = !0, n;
  65048. }
  65049. return e.prototype.getInitialData = function(n) {
  65050. var r = {
  65051. name: n.name,
  65052. children: n.data
  65053. }, i = n.leaves || {}, a = new Wt(i, this, this.ecModel), o = Gk.createTree(r, this, s);
  65054. function s(f) {
  65055. f.wrapMethod("getItemModel", function(d, h) {
  65056. var p = o.getNodeByDataIndex(h);
  65057. return p && p.children.length && p.isExpand || (d.parentModel = a), d;
  65058. });
  65059. }
  65060. var l = 0;
  65061. o.eachNode("preorder", function(f) {
  65062. f.depth > l && (l = f.depth);
  65063. });
  65064. var u = n.expandAndCollapse, c = u && n.initialTreeDepth >= 0 ? n.initialTreeDepth : l;
  65065. return o.root.eachNode("preorder", function(f) {
  65066. var d = f.hostTree.data.getRawDataItem(f.dataIndex);
  65067. f.isExpand = d && d.collapsed != null ? !d.collapsed : f.depth <= c;
  65068. }), o.data;
  65069. }, e.prototype.getOrient = function() {
  65070. var n = this.get("orient");
  65071. return n === "horizontal" ? n = "LR" : n === "vertical" && (n = "TB"), n;
  65072. }, e.prototype.setZoom = function(n) {
  65073. this.option.zoom = n;
  65074. }, e.prototype.setCenter = function(n) {
  65075. this.option.center = n;
  65076. }, e.prototype.formatTooltip = function(n, r, i) {
  65077. for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(n), l = s.getValue(), u = s.name; s && s !== o; )
  65078. u = s.parentNode.name + "." + u, s = s.parentNode;
  65079. return tr("nameValue", {
  65080. name: u,
  65081. value: l,
  65082. noValue: isNaN(l) || l == null
  65083. });
  65084. }, e.prototype.getDataParams = function(n) {
  65085. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  65086. return r.treeAncestors = bw(i, this), r.collapsed = !i.isExpand, r;
  65087. }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
  65088. // zlevel: 0,
  65089. z: 2,
  65090. coordinateSystem: "view",
  65091. // the position of the whole view
  65092. left: "12%",
  65093. top: "12%",
  65094. right: "12%",
  65095. bottom: "12%",
  65096. // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
  65097. layout: "orthogonal",
  65098. // value can be 'polyline'
  65099. edgeShape: "curve",
  65100. edgeForkPosition: "50%",
  65101. // true | false | 'move' | 'scale', see module:component/helper/RoamController.
  65102. roam: !1,
  65103. // Symbol size scale ratio in roam
  65104. nodeScaleRatio: 0.4,
  65105. // Default on center of graph
  65106. center: null,
  65107. zoom: 1,
  65108. orient: "LR",
  65109. symbol: "emptyCircle",
  65110. symbolSize: 7,
  65111. expandAndCollapse: !0,
  65112. initialTreeDepth: 2,
  65113. lineStyle: {
  65114. color: "#ccc",
  65115. width: 1.5,
  65116. curveness: 0.5
  65117. },
  65118. itemStyle: {
  65119. color: "lightsteelblue",
  65120. // borderColor: '#c23531',
  65121. borderWidth: 1.5
  65122. },
  65123. label: {
  65124. show: !0
  65125. },
  65126. animationEasing: "linear",
  65127. animationDuration: 700,
  65128. animationDurationUpdate: 500
  65129. }, e;
  65130. }(Ht)
  65131. );
  65132. function mze(t, e, n) {
  65133. for (var r = [t], i = [], a; a = r.pop(); )
  65134. if (i.push(a), a.isExpand) {
  65135. var o = a.children;
  65136. if (o.length)
  65137. for (var s = 0; s < o.length; s++)
  65138. r.push(o[s]);
  65139. }
  65140. for (; a = i.pop(); )
  65141. e(a, n);
  65142. }
  65143. function yv(t, e) {
  65144. for (var n = [t], r; r = n.pop(); )
  65145. if (e(r), r.isExpand) {
  65146. var i = r.children;
  65147. if (i.length)
  65148. for (var a = i.length - 1; a >= 0; a--)
  65149. n.push(i[a]);
  65150. }
  65151. }
  65152. function yze(t, e) {
  65153. t.eachSeriesByType("tree", function(n) {
  65154. bze(n, e);
  65155. });
  65156. }
  65157. function bze(t, e) {
  65158. var n = KBe(t, e);
  65159. t.layoutInfo = n;
  65160. var r = t.get("layout"), i = 0, a = 0, o = null;
  65161. r === "radial" ? (i = 2 * Math.PI, a = Math.min(n.height, n.width) / 2, o = EF(function(b, _) {
  65162. return (b.parentNode === _.parentNode ? 1 : 2) / b.depth;
  65163. })) : (i = n.width, a = n.height, o = EF());
  65164. var s = t.getData().tree.root, l = s.children[0];
  65165. if (l) {
  65166. XBe(s), mze(l, YBe, o), s.hierNode.modifier = -l.hierNode.prelim, yv(l, qBe);
  65167. var u = l, c = l, f = l;
  65168. yv(l, function(b) {
  65169. var _ = b.getLayout().x;
  65170. _ < u.getLayout().x && (u = b), _ > c.getLayout().x && (c = b), b.depth > f.depth && (f = b);
  65171. });
  65172. var d = u === c ? 1 : o(u, c) / 2, h = d - u.getLayout().x, p = 0, v = 0, g = 0, m = 0;
  65173. if (r === "radial")
  65174. p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), yv(l, function(b) {
  65175. g = (b.getLayout().x + h) * p, m = (b.depth - 1) * v;
  65176. var _ = Xv(g, m);
  65177. b.setLayout({
  65178. x: _.x,
  65179. y: _.y,
  65180. rawX: g,
  65181. rawY: m
  65182. }, !0);
  65183. });
  65184. else {
  65185. var y = t.getOrient();
  65186. y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + d + h), p = i / (f.depth - 1 || 1), yv(l, function(b) {
  65187. m = (b.getLayout().x + h) * v, g = y === "LR" ? (b.depth - 1) * p : i - (b.depth - 1) * p, b.setLayout({
  65188. x: g,
  65189. y: m
  65190. }, !0);
  65191. })) : (y === "TB" || y === "BT") && (p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), yv(l, function(b) {
  65192. g = (b.getLayout().x + h) * p, m = y === "TB" ? (b.depth - 1) * v : a - (b.depth - 1) * v, b.setLayout({
  65193. x: g,
  65194. y: m
  65195. }, !0);
  65196. }));
  65197. }
  65198. }
  65199. }
  65200. function _ze(t) {
  65201. t.eachSeriesByType("tree", function(e) {
  65202. var n = e.getData(), r = n.tree;
  65203. r.eachNode(function(i) {
  65204. var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = n.ensureUniqueItemVisual(i.dataIndex, "style");
  65205. le(s, o);
  65206. });
  65207. });
  65208. }
  65209. function Oze(t) {
  65210. t.registerAction({
  65211. type: "treeExpandAndCollapse",
  65212. event: "treeExpandAndCollapse",
  65213. update: "update"
  65214. }, function(e, n) {
  65215. n.eachComponent({
  65216. mainType: "series",
  65217. subType: "tree",
  65218. query: e
  65219. }, function(r) {
  65220. var i = e.dataIndex, a = r.getData().tree, o = a.getNodeByDataIndex(i);
  65221. o.isExpand = !o.isExpand;
  65222. });
  65223. }), t.registerAction({
  65224. type: "treeRoam",
  65225. event: "treeRoam",
  65226. // Here we set 'none' instead of 'update', because roam action
  65227. // just need to update the transform matrix without having to recalculate
  65228. // the layout. So don't need to go through the whole update process, such
  65229. // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
  65230. update: "none"
  65231. }, function(e, n, r) {
  65232. n.eachComponent({
  65233. mainType: "series",
  65234. subType: "tree",
  65235. query: e
  65236. }, function(i) {
  65237. var a = i.coordinateSystem, o = Qk(a, e, void 0, r);
  65238. i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
  65239. });
  65240. });
  65241. }
  65242. function Sze(t) {
  65243. t.registerChartView(oze), t.registerSeriesModel(gze), t.registerLayout(yze), t.registerVisual(_ze), Oze(t);
  65244. }
  65245. var kF = ["treemapZoomToNode", "treemapRender", "treemapMove"];
  65246. function xze(t) {
  65247. for (var e = 0; e < kF.length; e++)
  65248. t.registerAction({
  65249. type: kF[e],
  65250. update: "updateView"
  65251. }, On);
  65252. t.registerAction({
  65253. type: "treemapRootToNode",
  65254. update: "updateView"
  65255. }, function(n, r) {
  65256. r.eachComponent({
  65257. mainType: "series",
  65258. subType: "treemap",
  65259. query: n
  65260. }, i);
  65261. function i(a, o) {
  65262. var s = ["treemapZoomToNode", "treemapRootToNode"], l = Lm(n, s, a);
  65263. if (l) {
  65264. var u = a.getViewRoot();
  65265. u && (n.direction = jk(u, l.node) ? "rollUp" : "drillDown"), a.resetViewRoot(l.node);
  65266. }
  65267. }
  65268. });
  65269. }
  65270. function One(t) {
  65271. var e = t.getData(), n = e.tree, r = {};
  65272. n.eachNode(function(i) {
  65273. for (var a = i; a && a.depth > 1; )
  65274. a = a.parentNode;
  65275. var o = QA(t.ecModel, a.name || a.dataIndex + "", r);
  65276. i.setVisual("decal", o);
  65277. });
  65278. }
  65279. var wze = (
  65280. /** @class */
  65281. function(t) {
  65282. q(e, t);
  65283. function e() {
  65284. var n = t !== null && t.apply(this, arguments) || this;
  65285. return n.type = e.type, n.preventUsingHoverLayer = !0, n;
  65286. }
  65287. return e.prototype.getInitialData = function(n, r) {
  65288. var i = {
  65289. name: n.name,
  65290. children: n.data
  65291. };
  65292. Sne(i);
  65293. var a = n.levels || [], o = this.designatedVisualItemStyle = {}, s = new Wt({
  65294. itemStyle: o
  65295. }, this, r);
  65296. a = n.levels = Cze(a, r);
  65297. var l = ce(a || [], function(f) {
  65298. return new Wt(f, s, r);
  65299. }, this), u = Gk.createTree(i, this, c);
  65300. function c(f) {
  65301. f.wrapMethod("getItemModel", function(d, h) {
  65302. var p = u.getNodeByDataIndex(h), v = p ? l[p.depth] : null;
  65303. return d.parentModel = v || s, d;
  65304. });
  65305. }
  65306. return u.data;
  65307. }, e.prototype.optionUpdated = function() {
  65308. this.resetViewRoot();
  65309. }, e.prototype.formatTooltip = function(n, r, i) {
  65310. var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
  65311. return tr("nameValue", {
  65312. name: s,
  65313. value: o
  65314. });
  65315. }, e.prototype.getDataParams = function(n) {
  65316. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  65317. return r.treeAncestors = bw(i, this), r.treePathInfo = r.treeAncestors, r;
  65318. }, e.prototype.setLayoutInfo = function(n) {
  65319. this.layoutInfo = this.layoutInfo || {}, le(this.layoutInfo, n);
  65320. }, e.prototype.mapIdToIndex = function(n) {
  65321. var r = this._idIndexMap;
  65322. r || (r = this._idIndexMap = Pe(), this._idIndexMapCount = 0);
  65323. var i = r.get(n);
  65324. return i == null && r.set(n, i = this._idIndexMapCount++), i;
  65325. }, e.prototype.getViewRoot = function() {
  65326. return this._viewRoot;
  65327. }, e.prototype.resetViewRoot = function(n) {
  65328. n ? this._viewRoot = n : n = this._viewRoot;
  65329. var r = this.getRawData().tree.root;
  65330. (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
  65331. }, e.prototype.enableAriaDecal = function() {
  65332. One(this);
  65333. }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
  65334. // Disable progressive rendering
  65335. progressive: 0,
  65336. // size: ['80%', '80%'], // deprecated, compatible with ec2.
  65337. left: "center",
  65338. top: "middle",
  65339. width: "80%",
  65340. height: "80%",
  65341. sort: !0,
  65342. clipWindow: "origin",
  65343. squareRatio: 0.5 * (1 + Math.sqrt(5)),
  65344. leafDepth: null,
  65345. drillDownIcon: "▶",
  65346. // to align specialized icon. ▷▶❒❐▼✚
  65347. zoomToNodeRatio: 0.32 * 0.32,
  65348. scaleLimit: null,
  65349. roam: !0,
  65350. nodeClick: "zoomToNode",
  65351. animation: !0,
  65352. animationDurationUpdate: 900,
  65353. animationEasing: "quinticInOut",
  65354. breadcrumb: {
  65355. show: !0,
  65356. height: 22,
  65357. left: "center",
  65358. top: "bottom",
  65359. // right
  65360. // bottom
  65361. emptyItemWidth: 25,
  65362. itemStyle: {
  65363. color: "rgba(0,0,0,0.7)",
  65364. textStyle: {
  65365. color: "#fff"
  65366. }
  65367. },
  65368. emphasis: {
  65369. itemStyle: {
  65370. color: "rgba(0,0,0,0.9)"
  65371. // '#5793f3',
  65372. }
  65373. }
  65374. },
  65375. label: {
  65376. show: !0,
  65377. // Do not use textDistance, for ellipsis rect just the same as treemap node rect.
  65378. distance: 0,
  65379. padding: 5,
  65380. position: "inside",
  65381. // formatter: null,
  65382. color: "#fff",
  65383. overflow: "truncate"
  65384. // align
  65385. // verticalAlign
  65386. },
  65387. upperLabel: {
  65388. show: !1,
  65389. position: [0, "50%"],
  65390. height: 20,
  65391. // formatter: null,
  65392. // color: '#fff',
  65393. overflow: "truncate",
  65394. // align: null,
  65395. verticalAlign: "middle"
  65396. },
  65397. itemStyle: {
  65398. color: null,
  65399. colorAlpha: null,
  65400. colorSaturation: null,
  65401. borderWidth: 0,
  65402. gapWidth: 0,
  65403. borderColor: "#fff",
  65404. borderColorSaturation: null
  65405. // If specified, borderColor will be ineffective, and the
  65406. // border color is evaluated by color of current node and
  65407. // borderColorSaturation.
  65408. },
  65409. emphasis: {
  65410. upperLabel: {
  65411. show: !0,
  65412. position: [0, "50%"],
  65413. overflow: "truncate",
  65414. verticalAlign: "middle"
  65415. }
  65416. },
  65417. visualDimension: 0,
  65418. visualMin: null,
  65419. visualMax: null,
  65420. color: [],
  65421. // level[n].color (if necessary).
  65422. // + Specify color list of each level. level[0].color would be global
  65423. // color list if not specified. (see method `setDefault`).
  65424. // + But set as a empty array to forbid fetch color from global palette
  65425. // when using nodeModel.get('color'), otherwise nodes on deep level
  65426. // will always has color palette set and are not able to inherit color
  65427. // from parent node.
  65428. // + TreemapSeries.color can not be set as 'none', otherwise effect
  65429. // legend color fetching (see seriesColor.js).
  65430. colorAlpha: null,
  65431. colorSaturation: null,
  65432. colorMappingBy: "index",
  65433. visibleMin: 10,
  65434. // be rendered. Only works when sort is 'asc' or 'desc'.
  65435. childrenVisibleMin: null,
  65436. // grandchildren will not show.
  65437. // Why grandchildren? If not grandchildren but children,
  65438. // some siblings show children and some not,
  65439. // the appearance may be mess and not consistent,
  65440. levels: []
  65441. // Each item: {
  65442. // visibleMin, itemStyle, visualDimension, label
  65443. // }
  65444. }, e;
  65445. }(Ht)
  65446. );
  65447. function Sne(t) {
  65448. var e = 0;
  65449. k(t.children, function(r) {
  65450. Sne(r);
  65451. var i = r.value;
  65452. ue(i) && (i = i[0]), e += i;
  65453. });
  65454. var n = t.value;
  65455. 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;
  65456. }
  65457. function Cze(t, e) {
  65458. var n = Qt(e.get("color")), r = Qt(e.get(["aria", "decal", "decals"]));
  65459. if (n) {
  65460. t = t || [];
  65461. var i, a;
  65462. k(t, function(s) {
  65463. var l = new Wt(s), u = l.get("color"), c = l.get("decal");
  65464. (l.get(["itemStyle", "color"]) || u && u !== "none") && (i = !0), (l.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0);
  65465. });
  65466. var o = t[0] || (t[0] = {});
  65467. return i || (o.color = n.slice()), !a && r && (o.decal = r.slice()), t;
  65468. }
  65469. }
  65470. var Tze = 8, LF = 8, vP = 5, Pze = (
  65471. /** @class */
  65472. function() {
  65473. function t(e) {
  65474. this.group = new Ve(), e.add(this.group);
  65475. }
  65476. return t.prototype.render = function(e, n, r, i) {
  65477. var a = e.getModel("breadcrumb"), o = this.group;
  65478. if (o.removeAll(), !(!a.get("show") || !r)) {
  65479. var s = a.getModel("itemStyle"), l = a.getModel("emphasis"), u = s.getModel("textStyle"), c = l.getModel(["itemStyle", "textStyle"]), f = {
  65480. pos: {
  65481. left: a.get("left"),
  65482. right: a.get("right"),
  65483. top: a.get("top"),
  65484. bottom: a.get("bottom")
  65485. },
  65486. box: {
  65487. width: n.getWidth(),
  65488. height: n.getHeight()
  65489. },
  65490. emptyItemWidth: a.get("emptyItemWidth"),
  65491. totalWidth: 0,
  65492. renderList: []
  65493. };
  65494. this._prepare(r, f, u), this._renderContent(e, f, s, l, u, c, i), aw(o, f.pos, f.box);
  65495. }
  65496. }, t.prototype._prepare = function(e, n, r) {
  65497. for (var i = e; i; i = i.parentNode) {
  65498. var a = Vn(i.getModel().get("name"), ""), o = r.getTextRect(a), s = Math.max(o.width + Tze * 2, n.emptyItemWidth);
  65499. n.totalWidth += s + LF, n.renderList.push({
  65500. node: i,
  65501. text: a,
  65502. width: s
  65503. });
  65504. }
  65505. }, t.prototype._renderContent = function(e, n, r, i, a, o, s) {
  65506. for (var l = 0, u = n.emptyItemWidth, c = e.get(["breadcrumb", "height"]), f = gLe(n.pos, n.box), d = n.totalWidth, h = n.renderList, p = i.getModel("itemStyle").getItemStyle(), v = h.length - 1; v >= 0; v--) {
  65507. var g = h[v], m = g.node, y = g.width, b = g.text;
  65508. d > f.width && (d -= y - u, y = u, b = null);
  65509. var _ = new ii({
  65510. shape: {
  65511. points: $ze(l, 0, y, c, v === h.length - 1, v === 0)
  65512. },
  65513. style: Re(r.getItemStyle(), {
  65514. lineJoin: "bevel"
  65515. }),
  65516. textContent: new gt({
  65517. style: Zt(a, {
  65518. text: b
  65519. })
  65520. }),
  65521. textConfig: {
  65522. position: "inside"
  65523. },
  65524. z2: dp * 1e4,
  65525. onclick: Ue(s, m)
  65526. });
  65527. _.disableLabelAnimation = !0, _.getTextContent().ensureState("emphasis").style = Zt(o, {
  65528. text: b
  65529. }), _.ensureState("emphasis").style = p, bn(_, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(_), Aze(_, e, m), l += y + LF;
  65530. }
  65531. }, t.prototype.remove = function() {
  65532. this.group.removeAll();
  65533. }, t;
  65534. }()
  65535. );
  65536. function $ze(t, e, n, r, i, a) {
  65537. var o = [[i ? t : t - vP, e], [t + n, e], [t + n, e + r], [i ? t : t - vP, e + r]];
  65538. return !a && o.splice(2, 0, [t + n + vP, e + r / 2]), !i && o.push([t, e + r / 2]), o;
  65539. }
  65540. function Aze(t, e, n) {
  65541. Fe(t).eventData = {
  65542. componentType: "series",
  65543. componentSubType: "treemap",
  65544. componentIndex: e.componentIndex,
  65545. seriesIndex: e.seriesIndex,
  65546. seriesName: e.name,
  65547. seriesType: "treemap",
  65548. selfType: "breadcrumb",
  65549. nodeData: {
  65550. dataIndex: n && n.dataIndex,
  65551. name: n && n.name
  65552. },
  65553. treePathInfo: n && bw(n, e)
  65554. };
  65555. }
  65556. var Eze = (
  65557. /** @class */
  65558. function() {
  65559. function t() {
  65560. this._storage = [], this._elExistsMap = {};
  65561. }
  65562. return t.prototype.add = function(e, n, r, i, a) {
  65563. return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
  65564. el: e,
  65565. target: n,
  65566. duration: r,
  65567. delay: i,
  65568. easing: a
  65569. }), !0);
  65570. }, t.prototype.finished = function(e) {
  65571. return this._finishedCallback = e, this;
  65572. }, t.prototype.start = function() {
  65573. for (var e = this, n = this._storage.length, r = function() {
  65574. n--, n <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
  65575. }, i = 0, a = this._storage.length; i < a; i++) {
  65576. var o = this._storage[i];
  65577. o.el.animateTo(o.target, {
  65578. duration: o.duration,
  65579. delay: o.delay,
  65580. easing: o.easing,
  65581. setToFinal: !0,
  65582. done: r,
  65583. aborted: r
  65584. });
  65585. }
  65586. return this;
  65587. }, t;
  65588. }()
  65589. );
  65590. function Mze() {
  65591. return new Eze();
  65592. }
  65593. var gE = Ve, NF = mt, BF = 3, zF = "label", VF = "upperLabel", Ize = dp * 10, Dze = dp * 2, Rze = dp * 3, pc = yf([
  65594. ["fill", "color"],
  65595. // `borderColor` and `borderWidth` has been occupied,
  65596. // so use `stroke` to indicate the stroke of the rect.
  65597. ["stroke", "strokeColor"],
  65598. ["lineWidth", "strokeWidth"],
  65599. ["shadowBlur"],
  65600. ["shadowOffsetX"],
  65601. ["shadowOffsetY"],
  65602. ["shadowColor"]
  65603. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  65604. // So do not transfer decal directly.
  65605. ]), FF = function(t) {
  65606. var e = pc(t);
  65607. return e.stroke = e.fill = e.lineWidth = null, e;
  65608. }, IO = bt(), kze = (
  65609. /** @class */
  65610. function(t) {
  65611. q(e, t);
  65612. function e() {
  65613. var n = t !== null && t.apply(this, arguments) || this;
  65614. return n.type = e.type, n._state = "ready", n._storage = bv(), n;
  65615. }
  65616. return e.prototype.render = function(n, r, i, a) {
  65617. var o = r.findComponents({
  65618. mainType: "series",
  65619. subType: "treemap",
  65620. query: a
  65621. });
  65622. if (!(et(o, n) < 0)) {
  65623. this.seriesModel = n, this.api = i, this.ecModel = r;
  65624. var s = ["treemapZoomToNode", "treemapRootToNode"], l = Lm(a, s, n), u = a && a.type, c = n.layoutInfo, f = !this._oldTree, d = this._storage, h = u === "treemapRootToNode" && l && d ? {
  65625. rootNodeGroup: d.nodeGroup[l.node.getRawIndex()],
  65626. direction: a.direction
  65627. } : null, p = this._giveContainerGroup(c), v = n.get("animation"), g = this._doRender(p, n, h);
  65628. v && !f && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, n, h) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(n, i, l);
  65629. }
  65630. }, e.prototype._giveContainerGroup = function(n) {
  65631. var r = this._containerGroup;
  65632. return r || (r = this._containerGroup = new gE(), this._initEvents(r), this.group.add(r)), r.x = n.x, r.y = n.y, r;
  65633. }, e.prototype._doRender = function(n, r, i) {
  65634. var a = r.getData().tree, o = this._oldTree, s = bv(), l = bv(), u = this._storage, c = [];
  65635. function f(y, b, _, O) {
  65636. return Lze(r, l, u, i, s, c, y, b, _, O);
  65637. }
  65638. v(a.root ? [a.root] : [], o && o.root ? [o.root] : [], n, a === o || !o, 0);
  65639. var d = g(u);
  65640. if (this._oldTree = a, this._storage = l, this._controllerHost) {
  65641. var h = this.seriesModel.layoutInfo, p = a.root.getLayout();
  65642. p.width === h.width && p.height === h.height && (this._controllerHost.zoom = 1);
  65643. }
  65644. return {
  65645. lastsForAnimation: s,
  65646. willDeleteEls: d,
  65647. renderFinally: m
  65648. };
  65649. function v(y, b, _, O, S) {
  65650. O ? (b = y, k(y, function(T, w) {
  65651. !T.isRemoved() && C(w, w);
  65652. })) : new Us(b, y, x, x).add(C).update(C).remove(Ue(C, null)).execute();
  65653. function x(T) {
  65654. return T.getId();
  65655. }
  65656. function C(T, w) {
  65657. var P = T != null ? y[T] : null, $ = w != null ? b[w] : null, A = f(P, $, _, S);
  65658. A && v(P && P.viewChildren || [], $ && $.viewChildren || [], A, O, S + 1);
  65659. }
  65660. }
  65661. function g(y) {
  65662. var b = bv();
  65663. return y && k(y, function(_, O) {
  65664. var S = b[O];
  65665. k(_, function(x) {
  65666. x && (S.push(x), IO(x).willDelete = !0);
  65667. });
  65668. }), b;
  65669. }
  65670. function m() {
  65671. k(d, function(y) {
  65672. k(y, function(b) {
  65673. b.parent && b.parent.remove(b);
  65674. });
  65675. }), k(c, function(y) {
  65676. y.invisible = !0, y.dirty();
  65677. });
  65678. }
  65679. }, e.prototype._doAnimation = function(n, r, i, a) {
  65680. var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), l = (Me(o) ? 0 : o) || 0, u = (Me(s) ? null : s) || "cubicOut", c = Mze();
  65681. k(r.willDeleteEls, function(f, d) {
  65682. k(f, function(h, p) {
  65683. if (!h.invisible) {
  65684. var v = h.parent, g, m = IO(v);
  65685. if (a && a.direction === "drillDown")
  65686. g = v === a.rootNodeGroup ? {
  65687. shape: {
  65688. x: 0,
  65689. y: 0,
  65690. width: m.nodeWidth,
  65691. height: m.nodeHeight
  65692. },
  65693. style: {
  65694. opacity: 0
  65695. }
  65696. } : {
  65697. style: {
  65698. opacity: 0
  65699. }
  65700. };
  65701. else {
  65702. var y = 0, b = 0;
  65703. m.willDelete || (y = m.nodeWidth / 2, b = m.nodeHeight / 2), g = d === "nodeGroup" ? {
  65704. x: y,
  65705. y: b,
  65706. style: {
  65707. opacity: 0
  65708. }
  65709. } : {
  65710. shape: {
  65711. x: y,
  65712. y: b,
  65713. width: 0,
  65714. height: 0
  65715. },
  65716. style: {
  65717. opacity: 0
  65718. }
  65719. };
  65720. }
  65721. g && c.add(h, g, l, 0, u);
  65722. }
  65723. });
  65724. }), k(this._storage, function(f, d) {
  65725. k(f, function(h, p) {
  65726. var v = r.lastsForAnimation[d][p], g = {};
  65727. 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 = {
  65728. opacity: 1
  65729. }) : h.style.opacity !== 1 && (g.style = {
  65730. opacity: 1
  65731. })), c.add(h, g, l, 0, u));
  65732. });
  65733. }, this), this._state = "animating", c.finished(xe(function() {
  65734. this._state = "ready", r.renderFinally();
  65735. }, this)).start();
  65736. }, e.prototype._resetController = function(n) {
  65737. var r = this._controller, i = this._controllerHost;
  65738. i || (this._controllerHost = {
  65739. target: this.group
  65740. }, i = this._controllerHost), r || (r = this._controller = new K0(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)));
  65741. var a = new Je(0, 0, n.getWidth(), n.getHeight());
  65742. r.setPointerChecker(function(o, s, l) {
  65743. return a.contain(s, l);
  65744. });
  65745. }, e.prototype._clearController = function() {
  65746. var n = this._controller;
  65747. this._controllerHost = null, n && (n.dispose(), n = null);
  65748. }, e.prototype._onPan = function(n) {
  65749. if (this._state !== "animating" && (Math.abs(n.dx) > BF || Math.abs(n.dy) > BF)) {
  65750. var r = this.seriesModel.getData().tree.root;
  65751. if (!r)
  65752. return;
  65753. var i = r.getLayout();
  65754. if (!i)
  65755. return;
  65756. this.api.dispatchAction({
  65757. type: "treemapMove",
  65758. from: this.uid,
  65759. seriesId: this.seriesModel.id,
  65760. rootRect: {
  65761. x: i.x + n.dx,
  65762. y: i.y + n.dy,
  65763. width: i.width,
  65764. height: i.height
  65765. }
  65766. });
  65767. }
  65768. }, e.prototype._onZoom = function(n) {
  65769. var r = n.originX, i = n.originY, a = n.scale;
  65770. if (this._state !== "animating") {
  65771. var o = this.seriesModel.getData().tree.root;
  65772. if (!o)
  65773. return;
  65774. var s = o.getLayout();
  65775. if (!s)
  65776. return;
  65777. var l = new Je(s.x, s.y, s.width, s.height), u = null, c = this._controllerHost;
  65778. u = c.zoomLimit;
  65779. var f = c.zoom = c.zoom || 1;
  65780. if (f *= a, u) {
  65781. var d = u.min || 0, h = u.max || 1 / 0;
  65782. f = Math.max(Math.min(h, f), d);
  65783. }
  65784. var p = f / c.zoom;
  65785. c.zoom = f;
  65786. var v = this.seriesModel.layoutInfo;
  65787. r -= v.x, i -= v.y;
  65788. var g = Si();
  65789. ao(g, g, [-r, -i]), Nx(g, g, [p, p]), ao(g, g, [r, i]), l.applyTransform(g), this.api.dispatchAction({
  65790. type: "treemapRender",
  65791. from: this.uid,
  65792. seriesId: this.seriesModel.id,
  65793. rootRect: {
  65794. x: l.x,
  65795. y: l.y,
  65796. width: l.width,
  65797. height: l.height
  65798. }
  65799. });
  65800. }
  65801. }, e.prototype._initEvents = function(n) {
  65802. var r = this;
  65803. n.on("click", function(i) {
  65804. if (r._state === "ready") {
  65805. var a = r.seriesModel.get("nodeClick", !0);
  65806. if (a) {
  65807. var o = r.findTarget(i.offsetX, i.offsetY);
  65808. if (o) {
  65809. var s = o.node;
  65810. if (s.getLayout().isLeafRoot)
  65811. r._rootToNode(o);
  65812. else if (a === "zoomToNode")
  65813. r._zoomToNode(o);
  65814. else if (a === "link") {
  65815. var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), c = l.get("target", !0) || "blank";
  65816. u && dO(u, c);
  65817. }
  65818. }
  65819. }
  65820. }
  65821. }, this);
  65822. }, e.prototype._renderBreadcrumb = function(n, r, i) {
  65823. var a = this;
  65824. i || (i = n.get("leafDepth", !0) != null ? {
  65825. node: n.getViewRoot()
  65826. } : this.findTarget(r.getWidth() / 2, r.getHeight() / 2), i || (i = {
  65827. node: n.getData().tree.root
  65828. })), (this._breadcrumb || (this._breadcrumb = new Pze(this.group))).render(n, r, i.node, function(o) {
  65829. a._state !== "animating" && (jk(n.getViewRoot(), o) ? a._rootToNode({
  65830. node: o
  65831. }) : a._zoomToNode({
  65832. node: o
  65833. }));
  65834. });
  65835. }, e.prototype.remove = function() {
  65836. this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = bv(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
  65837. }, e.prototype.dispose = function() {
  65838. this._clearController();
  65839. }, e.prototype._zoomToNode = function(n) {
  65840. this.api.dispatchAction({
  65841. type: "treemapZoomToNode",
  65842. from: this.uid,
  65843. seriesId: this.seriesModel.id,
  65844. targetNode: n.node
  65845. });
  65846. }, e.prototype._rootToNode = function(n) {
  65847. this.api.dispatchAction({
  65848. type: "treemapRootToNode",
  65849. from: this.uid,
  65850. seriesId: this.seriesModel.id,
  65851. targetNode: n.node
  65852. });
  65853. }, e.prototype.findTarget = function(n, r) {
  65854. var i, a = this.seriesModel.getViewRoot();
  65855. return a.eachNode({
  65856. attr: "viewChildren",
  65857. order: "preorder"
  65858. }, function(o) {
  65859. var s = this._storage.background[o.getRawIndex()];
  65860. if (s) {
  65861. var l = s.transformCoordToLocal(n, r), u = s.shape;
  65862. if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
  65863. i = {
  65864. node: o,
  65865. offsetX: l[0],
  65866. offsetY: l[1]
  65867. };
  65868. else
  65869. return !1;
  65870. }
  65871. }, this), i;
  65872. }, e.type = "treemap", e;
  65873. }(zt)
  65874. );
  65875. function bv() {
  65876. return {
  65877. nodeGroup: [],
  65878. background: [],
  65879. content: []
  65880. };
  65881. }
  65882. function Lze(t, e, n, r, i, a, o, s, l, u) {
  65883. if (!o)
  65884. return;
  65885. var c = o.getLayout(), f = t.getData(), d = o.getModel();
  65886. if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView)
  65887. return;
  65888. 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", gE);
  65889. if (!P)
  65890. return;
  65891. if (l.add(P), P.x = c.x || 0, P.y = c.y || 0, P.markRedraw(), IO(P).nodeWidth = h, IO(P).nodeHeight = p, c.isAboveViewRoot)
  65892. return P;
  65893. var $ = ne("background", NF, u, Dze);
  65894. $ && z(P, $, O && c.upperLabelHeight);
  65895. 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;
  65896. if (O)
  65897. lu(P) && Lc(P, !1), $ && (Lc($, !R), f.setItemGraphicEl(o.dataIndex, $), RA($, N, E));
  65898. else {
  65899. var V = ne("content", NF, u, Rze);
  65900. V && W(P, V), $.disableMorphing = !0, $ && lu($) && Lc($, !1), Lc(P, !R), f.setItemGraphicEl(o.dataIndex, P), RA(P, N, E);
  65901. }
  65902. return P;
  65903. function z(K, ie, X) {
  65904. var H = Fe(ie);
  65905. if (H.dataIndex = o.dataIndex, H.seriesIndex = t.seriesIndex, ie.setShape({
  65906. x: 0,
  65907. y: 0,
  65908. width: h,
  65909. height: p,
  65910. r: w
  65911. }), g)
  65912. F(ie);
  65913. else {
  65914. ie.invisible = !1;
  65915. var G = o.getVisual("style"), re = G.stroke, fe = FF(S);
  65916. fe.fill = re;
  65917. var de = pc(x);
  65918. de.fill = x.get("borderColor");
  65919. var Ee = pc(C);
  65920. Ee.fill = C.get("borderColor");
  65921. var $e = pc(T);
  65922. if ($e.fill = T.get("borderColor"), X) {
  65923. var Se = h - 2 * v;
  65924. Q(
  65925. // PENDING: convert ZRColor to ColorString for text.
  65926. ie,
  65927. re,
  65928. G.opacity,
  65929. {
  65930. x: v,
  65931. y: 0,
  65932. width: Se,
  65933. height: _
  65934. }
  65935. );
  65936. } else
  65937. ie.removeTextContent();
  65938. ie.setStyle(fe), ie.ensureState("emphasis").style = de, ie.ensureState("blur").style = Ee, ie.ensureState("select").style = $e, bf(ie);
  65939. }
  65940. K.add(ie);
  65941. }
  65942. function W(K, ie) {
  65943. var X = Fe(ie);
  65944. X.dataIndex = o.dataIndex, X.seriesIndex = t.seriesIndex;
  65945. var H = Math.max(h - 2 * v, 0), G = Math.max(p - 2 * v, 0);
  65946. if (ie.culling = !0, ie.setShape({
  65947. x: v,
  65948. y: v,
  65949. width: H,
  65950. height: G,
  65951. r: w
  65952. }), g)
  65953. F(ie);
  65954. else {
  65955. ie.invisible = !1;
  65956. var re = o.getVisual("style"), fe = re.fill, de = FF(S);
  65957. de.fill = fe, de.decal = re.decal;
  65958. var Ee = pc(x), $e = pc(C), Se = pc(T);
  65959. Q(ie, fe, re.opacity, null), ie.setStyle(de), ie.ensureState("emphasis").style = Ee, ie.ensureState("blur").style = $e, ie.ensureState("select").style = Se, bf(ie);
  65960. }
  65961. K.add(ie);
  65962. }
  65963. function F(K) {
  65964. !K.invisible && a.push(K);
  65965. }
  65966. function Q(K, ie, X, H) {
  65967. var G = d.getModel(H ? VF : zF), re = Vn(d.get("name"), null), fe = G.getShallow("show");
  65968. Pr(K, er(d, H ? VF : zF), {
  65969. defaultText: fe ? re : null,
  65970. inheritColor: ie,
  65971. defaultOpacity: X,
  65972. labelFetcher: t,
  65973. labelDataIndex: o.dataIndex
  65974. });
  65975. var de = K.getTextContent();
  65976. if (de) {
  65977. var Ee = de.style, $e = kx(Ee.padding || 0);
  65978. H && (K.setTextConfig({
  65979. layoutRect: H
  65980. }), de.disableLabelLayout = !0), de.beforeUpdate = function() {
  65981. 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);
  65982. (Ee.width !== be || Ee.height !== he) && de.setStyle({
  65983. width: be,
  65984. height: he
  65985. });
  65986. }, Ee.truncateMinChar = 2, Ee.lineOverflow = "truncate", Z(Ee, H, c);
  65987. var Se = de.getState("emphasis");
  65988. Z(Se ? Se.style : null, H, c);
  65989. }
  65990. }
  65991. function Z(K, ie, X) {
  65992. var H = K ? K.text : null;
  65993. if (!ie && X.isLeafRoot && H != null) {
  65994. var G = t.get("drillDownIcon", !0);
  65995. K.text = G ? G + " " + H : H;
  65996. }
  65997. }
  65998. function ne(K, ie, X, H) {
  65999. var G = y != null && n[K][y], re = i[K];
  66000. return G ? (n[K][y] = null, ee(re, G)) : g || (G = new ie(), G instanceof Ma && (G.z2 = Nze(X, H)), oe(re, G)), e[K][m] = G;
  66001. }
  66002. function ee(K, ie) {
  66003. var X = K[m] = {};
  66004. ie instanceof gE ? (X.oldX = ie.x, X.oldY = ie.y) : X.oldShape = le({}, ie.shape);
  66005. }
  66006. function oe(K, ie) {
  66007. var X = K[m] = {}, H = o.parentNode, G = ie instanceof Ve;
  66008. if (H && (!r || r.direction === "drillDown")) {
  66009. var re = 0, fe = 0, de = i.background[H.getRawIndex()];
  66010. !r && de && de.oldShape && (re = de.oldShape.width, fe = de.oldShape.height), G ? (X.oldX = 0, X.oldY = fe) : X.oldShape = {
  66011. x: re,
  66012. y: fe,
  66013. width: 0,
  66014. height: 0
  66015. };
  66016. }
  66017. X.fadein = !G;
  66018. }
  66019. }
  66020. function Nze(t, e) {
  66021. return t * Ize + e;
  66022. }
  66023. var Nm = k, Bze = Ie, DO = -1, qn = (
  66024. /** @class */
  66025. function() {
  66026. function t(e) {
  66027. var n = e.mappingMethod, r = e.type, i = this.option = Le(e);
  66028. this.type = r, this.mappingMethod = n, this._normalizeData = Fze[n];
  66029. var a = t.visualHandlers[r];
  66030. this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[n], n === "piecewise" ? (gP(i), zze(i)) : n === "category" ? i.categories ? Vze(i) : gP(i, !0) : (ke(n !== "linear" || i.dataExtent), gP(i));
  66031. }
  66032. return t.prototype.mapValueToVisual = function(e) {
  66033. var n = this._normalizeData(e);
  66034. return this._normalizedToVisual(n, e);
  66035. }, t.prototype.getNormalizer = function() {
  66036. return xe(this._normalizeData, this);
  66037. }, t.listVisualTypes = function() {
  66038. return st(t.visualHandlers);
  66039. }, t.isValidType = function(e) {
  66040. return t.visualHandlers.hasOwnProperty(e);
  66041. }, t.eachVisual = function(e, n, r) {
  66042. Ie(e) ? k(e, n, r) : n.call(r, e);
  66043. }, t.mapVisual = function(e, n, r) {
  66044. var i, a = ue(e) ? [] : Ie(e) ? {} : (i = !0, null);
  66045. return t.eachVisual(e, function(o, s) {
  66046. var l = n.call(r, o, s);
  66047. i ? a = l : a[s] = l;
  66048. }), a;
  66049. }, t.retrieveVisuals = function(e) {
  66050. var n = {}, r;
  66051. return e && Nm(t.visualHandlers, function(i, a) {
  66052. e.hasOwnProperty(a) && (n[a] = e[a], r = !0);
  66053. }), r ? n : null;
  66054. }, t.prepareVisualTypes = function(e) {
  66055. if (ue(e))
  66056. e = e.slice();
  66057. else if (Bze(e)) {
  66058. var n = [];
  66059. Nm(e, function(r, i) {
  66060. n.push(i);
  66061. }), e = n;
  66062. } else
  66063. return [];
  66064. return e.sort(function(r, i) {
  66065. return i === "color" && r !== "color" && r.indexOf("color") === 0 ? 1 : -1;
  66066. }), e;
  66067. }, t.dependsOn = function(e, n) {
  66068. return n === "color" ? !!(e && e.indexOf(n) === 0) : e === n;
  66069. }, t.findPieceIndex = function(e, n, r) {
  66070. for (var i, a = 1 / 0, o = 0, s = n.length; o < s; o++) {
  66071. var l = n[o].value;
  66072. if (l != null) {
  66073. if (l === e || Oe(l) && l === e + "")
  66074. return o;
  66075. r && d(l, o);
  66076. }
  66077. }
  66078. for (var o = 0, s = n.length; o < s; o++) {
  66079. var u = n[o], c = u.interval, f = u.close;
  66080. if (c) {
  66081. if (c[0] === -1 / 0) {
  66082. if (Pb(f[1], e, c[1]))
  66083. return o;
  66084. } else if (c[1] === 1 / 0) {
  66085. if (Pb(f[0], c[0], e))
  66086. return o;
  66087. } else if (Pb(f[0], c[0], e) && Pb(f[1], e, c[1]))
  66088. return o;
  66089. r && d(c[0], o), r && d(c[1], o);
  66090. }
  66091. }
  66092. if (r)
  66093. return e === 1 / 0 ? n.length - 1 : e === -1 / 0 ? 0 : i;
  66094. function d(h, p) {
  66095. var v = Math.abs(h - e);
  66096. v < a && (a = v, i = p);
  66097. }
  66098. }, t.visualHandlers = {
  66099. color: {
  66100. applyVisual: _v("color"),
  66101. getColorMapper: function() {
  66102. var e = this.option;
  66103. return xe(e.mappingMethod === "category" ? function(n, r) {
  66104. return !r && (n = this._normalizeData(n)), Yv.call(this, n);
  66105. } : function(n, r, i) {
  66106. var a = !!i;
  66107. return !r && (n = this._normalizeData(n)), i = Cg(n, e.parsedVisual, i), a ? i : eo(i, "rgba");
  66108. }, this);
  66109. },
  66110. _normalizedToVisual: {
  66111. linear: function(e) {
  66112. return eo(Cg(e, this.option.parsedVisual), "rgba");
  66113. },
  66114. category: Yv,
  66115. piecewise: function(e, n) {
  66116. var r = yE.call(this, n);
  66117. return r == null && (r = eo(Cg(e, this.option.parsedVisual), "rgba")), r;
  66118. },
  66119. fixed: vc
  66120. }
  66121. },
  66122. colorHue: Tb(function(e, n) {
  66123. return eh(e, n);
  66124. }),
  66125. colorSaturation: Tb(function(e, n) {
  66126. return eh(e, null, n);
  66127. }),
  66128. colorLightness: Tb(function(e, n) {
  66129. return eh(e, null, null, n);
  66130. }),
  66131. colorAlpha: Tb(function(e, n) {
  66132. return _m(e, n);
  66133. }),
  66134. decal: {
  66135. applyVisual: _v("decal"),
  66136. _normalizedToVisual: {
  66137. linear: null,
  66138. category: Yv,
  66139. piecewise: null,
  66140. fixed: null
  66141. }
  66142. },
  66143. opacity: {
  66144. applyVisual: _v("opacity"),
  66145. _normalizedToVisual: mE([0, 1])
  66146. },
  66147. liftZ: {
  66148. applyVisual: _v("liftZ"),
  66149. _normalizedToVisual: {
  66150. linear: vc,
  66151. category: vc,
  66152. piecewise: vc,
  66153. fixed: vc
  66154. }
  66155. },
  66156. symbol: {
  66157. applyVisual: function(e, n, r) {
  66158. var i = this.mapValueToVisual(e);
  66159. r("symbol", i);
  66160. },
  66161. _normalizedToVisual: {
  66162. linear: WF,
  66163. category: Yv,
  66164. piecewise: function(e, n) {
  66165. var r = yE.call(this, n);
  66166. return r == null && (r = WF.call(this, e)), r;
  66167. },
  66168. fixed: vc
  66169. }
  66170. },
  66171. symbolSize: {
  66172. applyVisual: _v("symbolSize"),
  66173. _normalizedToVisual: mE([0, 1])
  66174. }
  66175. }, t;
  66176. }()
  66177. );
  66178. function zze(t) {
  66179. var e = t.pieceList;
  66180. t.hasSpecialVisual = !1, k(e, function(n, r) {
  66181. n.originIndex = r, n.visual != null && (t.hasSpecialVisual = !0);
  66182. });
  66183. }
  66184. function Vze(t) {
  66185. var e = t.categories, n = t.categoryMap = {}, r = t.visual;
  66186. if (Nm(e, function(o, s) {
  66187. n[o] = s;
  66188. }), !ue(r)) {
  66189. var i = [];
  66190. Ie(r) ? Nm(r, function(o, s) {
  66191. var l = n[s];
  66192. i[l ?? DO] = o;
  66193. }) : i[DO] = r, r = xne(t, i);
  66194. }
  66195. for (var a = e.length - 1; a >= 0; a--)
  66196. r[a] == null && (delete n[e[a]], e.pop());
  66197. }
  66198. function gP(t, e) {
  66199. var n = t.visual, r = [];
  66200. Ie(n) ? Nm(n, function(a) {
  66201. r.push(a);
  66202. }) : n != null && r.push(n);
  66203. var i = {
  66204. color: 1,
  66205. symbol: 1
  66206. };
  66207. !e && r.length === 1 && !i.hasOwnProperty(t.type) && (r[1] = r[0]), xne(t, r);
  66208. }
  66209. function Tb(t) {
  66210. return {
  66211. applyVisual: function(e, n, r) {
  66212. var i = this.mapValueToVisual(e);
  66213. r("color", t(n("color"), i));
  66214. },
  66215. _normalizedToVisual: mE([0, 1])
  66216. };
  66217. }
  66218. function WF(t) {
  66219. var e = this.option.visual;
  66220. return e[Math.round(Lt(t, [0, 1], [0, e.length - 1], !0))] || {};
  66221. }
  66222. function _v(t) {
  66223. return function(e, n, r) {
  66224. r(t, this.mapValueToVisual(e));
  66225. };
  66226. }
  66227. function Yv(t) {
  66228. var e = this.option.visual;
  66229. return e[this.option.loop && t !== DO ? t % e.length : t];
  66230. }
  66231. function vc() {
  66232. return this.option.visual[0];
  66233. }
  66234. function mE(t) {
  66235. return {
  66236. linear: function(e) {
  66237. return Lt(e, t, this.option.visual, !0);
  66238. },
  66239. category: Yv,
  66240. piecewise: function(e, n) {
  66241. var r = yE.call(this, n);
  66242. return r == null && (r = Lt(e, t, this.option.visual, !0)), r;
  66243. },
  66244. fixed: vc
  66245. };
  66246. }
  66247. function yE(t) {
  66248. var e = this.option, n = e.pieceList;
  66249. if (e.hasSpecialVisual) {
  66250. var r = qn.findPieceIndex(t, n), i = n[r];
  66251. if (i && i.visual)
  66252. return i.visual[this.type];
  66253. }
  66254. }
  66255. function xne(t, e) {
  66256. return t.visual = e, t.type === "color" && (t.parsedVisual = ce(e, function(n) {
  66257. var r = qr(n);
  66258. return !r && process.env.NODE_ENV !== "production" && dn("'" + n + "' is an illegal color, fallback to '#000000'", !0), r || [0, 0, 0, 1];
  66259. })), e;
  66260. }
  66261. var Fze = {
  66262. linear: function(t) {
  66263. return Lt(t, this.option.dataExtent, [0, 1], !0);
  66264. },
  66265. piecewise: function(t) {
  66266. var e = this.option.pieceList, n = qn.findPieceIndex(t, e, !0);
  66267. if (n != null)
  66268. return Lt(n, [0, e.length - 1], [0, 1], !0);
  66269. },
  66270. category: function(t) {
  66271. var e = this.option.categories ? this.option.categoryMap[t] : t;
  66272. return e ?? DO;
  66273. },
  66274. fixed: On
  66275. };
  66276. function Pb(t, e, n) {
  66277. return t ? e <= n : e < n;
  66278. }
  66279. var Wze = "itemStyle", wne = bt();
  66280. const Qze = {
  66281. seriesType: "treemap",
  66282. reset: function(t) {
  66283. var e = t.getData().tree, n = e.root;
  66284. n.isRemoved() || Cne(
  66285. n,
  66286. // Visual should calculate from tree root but not view root.
  66287. {},
  66288. t.getViewRoot().getAncestors(),
  66289. t
  66290. );
  66291. }
  66292. };
  66293. function Cne(t, e, n, r) {
  66294. var i = t.getModel(), a = t.getLayout(), o = t.hostTree.data;
  66295. if (!(!a || a.invisible || !a.isInView)) {
  66296. var s = i.getModel(Wze), l = Hze(s, e, r), u = o.ensureUniqueItemVisual(t.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), d;
  66297. f != null && (d = QF(l), c = Gze(f, d)), u.stroke = c;
  66298. var h = t.viewChildren;
  66299. if (!h || !h.length)
  66300. d = QF(l), u.fill = d;
  66301. else {
  66302. var p = jze(t, i, a, s, l, h);
  66303. k(h, function(v, g) {
  66304. if (v.depth >= n.length || v === n[v.depth]) {
  66305. var m = Zze(i, l, v, g, p, r);
  66306. Cne(v, m, n, r);
  66307. }
  66308. });
  66309. }
  66310. }
  66311. }
  66312. function Hze(t, e, n) {
  66313. var r = le({}, e), i = n.designatedVisualItemStyle;
  66314. return k(["color", "colorAlpha", "colorSaturation"], function(a) {
  66315. i[a] = e[a];
  66316. var o = t.get(a);
  66317. i[a] = null, o != null && (r[a] = o);
  66318. }), r;
  66319. }
  66320. function QF(t) {
  66321. var e = mP(t, "color");
  66322. if (e) {
  66323. var n = mP(t, "colorAlpha"), r = mP(t, "colorSaturation");
  66324. return r && (e = eh(e, null, null, r)), n && (e = _m(e, n)), e;
  66325. }
  66326. }
  66327. function Gze(t, e) {
  66328. return e != null ? eh(e, null, null, t) : null;
  66329. }
  66330. function mP(t, e) {
  66331. var n = t[e];
  66332. if (n != null && n !== "none")
  66333. return n;
  66334. }
  66335. function jze(t, e, n, r, i, a) {
  66336. if (!(!a || !a.length)) {
  66337. var o = yP(e, "color") || i.color != null && i.color !== "none" && (yP(e, "colorAlpha") || yP(e, "colorSaturation"));
  66338. if (o) {
  66339. var s = e.get("visualMin"), l = e.get("visualMax"), u = n.dataExtent.slice();
  66340. s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
  66341. var c = e.get("colorMappingBy"), f = {
  66342. type: o.name,
  66343. dataExtent: u,
  66344. visual: o.range
  66345. };
  66346. f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear";
  66347. var d = new qn(f);
  66348. return wne(d).drColorMappingBy = c, d;
  66349. }
  66350. }
  66351. }
  66352. function yP(t, e) {
  66353. var n = t.get(e);
  66354. return ue(n) && n.length ? {
  66355. name: e,
  66356. range: n
  66357. } : null;
  66358. }
  66359. function Zze(t, e, n, r, i, a) {
  66360. var o = le({}, e);
  66361. if (i) {
  66362. var s = i.type, l = s === "color" && wne(i).drColorMappingBy, u = l === "index" ? r : l === "id" ? a.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
  66363. o[s] = i.mapValueToVisual(u);
  66364. }
  66365. return o;
  66366. }
  66367. var Bm = Math.max, RO = Math.min, HF = Tn, Zk = k, Tne = ["itemStyle", "borderWidth"], Uze = ["itemStyle", "gapWidth"], Xze = ["upperLabel", "show"], Yze = ["upperLabel", "height"];
  66368. const qze = {
  66369. seriesType: "treemap",
  66370. reset: function(t, e, n, r) {
  66371. var i = n.getWidth(), a = n.getHeight(), o = t.option, s = Rn(t.getBoxLayoutParams(), {
  66372. width: n.getWidth(),
  66373. height: n.getHeight()
  66374. }), l = o.size || [], u = _e(HF(s.width, l[0]), i), c = _e(HF(s.height, l[1]), a), f = r && r.type, d = ["treemapZoomToNode", "treemapRootToNode"], h = Lm(r, d, t), p = f === "treemapRender" || f === "treemapMove" ? r.rootRect : null, v = t.getViewRoot(), g = _ne(v);
  66375. if (f !== "treemapMove") {
  66376. var m = f === "treemapZoomToNode" ? rVe(t, h, v, u, c) : p ? [p.width, p.height] : [u, c], y = o.sort;
  66377. y && y !== "asc" && y !== "desc" && (y = "desc");
  66378. var b = {
  66379. squareRatio: o.squareRatio,
  66380. sort: y,
  66381. leafDepth: o.leafDepth
  66382. };
  66383. v.hostTree.clearLayouts();
  66384. var _ = {
  66385. x: 0,
  66386. y: 0,
  66387. width: m[0],
  66388. height: m[1],
  66389. area: m[0] * m[1]
  66390. };
  66391. v.setLayout(_), Pne(v, b, !1, 0), _ = v.getLayout(), Zk(g, function(S, x) {
  66392. var C = (g[x + 1] || v).getValue();
  66393. S.setLayout(le({
  66394. dataExtent: [C, C],
  66395. borderWidth: 0,
  66396. upperHeight: 0
  66397. }, _));
  66398. });
  66399. }
  66400. var O = t.getData().tree.root;
  66401. O.setLayout(iVe(s, p, h), !0), t.setLayoutInfo(s), $ne(
  66402. O,
  66403. // Transform to base element coordinate system.
  66404. new Je(-s.x, -s.y, i, a),
  66405. g,
  66406. v,
  66407. 0
  66408. );
  66409. }
  66410. };
  66411. function Pne(t, e, n, r) {
  66412. var i, a;
  66413. if (!t.isRemoved()) {
  66414. var o = t.getLayout();
  66415. i = o.width, a = o.height;
  66416. var s = t.getModel(), l = s.get(Tne), u = s.get(Uze) / 2, c = Ane(s), f = Math.max(l, c), d = l - u, h = f - u;
  66417. t.setLayout({
  66418. borderWidth: l,
  66419. upperHeight: f,
  66420. upperLabelHeight: c
  66421. }, !0), i = Bm(i - 2 * d, 0), a = Bm(a - d - h, 0);
  66422. var p = i * a, v = Kze(t, s, p, e, n, r);
  66423. if (v.length) {
  66424. var g = {
  66425. x: d,
  66426. y: h,
  66427. width: i,
  66428. height: a
  66429. }, m = RO(i, a), y = 1 / 0, b = [];
  66430. b.area = 0;
  66431. for (var _ = 0, O = v.length; _ < O; ) {
  66432. var S = v[_];
  66433. b.push(S), b.area += S.getLayout().area;
  66434. var x = nVe(b, m, e.squareRatio);
  66435. x <= y ? (_++, y = x) : (b.area -= b.pop().getLayout().area, GF(b, m, g, u, !1), m = RO(g.width, g.height), b.length = b.area = 0, y = 1 / 0);
  66436. }
  66437. if (b.length && GF(b, m, g, u, !0), !n) {
  66438. var C = s.get("childrenVisibleMin");
  66439. C != null && p < C && (n = !0);
  66440. }
  66441. for (var _ = 0, O = v.length; _ < O; _++)
  66442. Pne(v[_], e, n, r + 1);
  66443. }
  66444. }
  66445. }
  66446. function Kze(t, e, n, r, i, a) {
  66447. var o = t.children || [], s = r.sort;
  66448. s !== "asc" && s !== "desc" && (s = null);
  66449. var l = r.leafDepth != null && r.leafDepth <= a;
  66450. if (i && !l)
  66451. return t.viewChildren = [];
  66452. o = Nt(o, function(h) {
  66453. return !h.isRemoved();
  66454. }), eVe(o, s);
  66455. var u = tVe(e, o, s);
  66456. if (u.sum === 0)
  66457. return t.viewChildren = [];
  66458. if (u.sum = Jze(e, n, u.sum, s, o), u.sum === 0)
  66459. return t.viewChildren = [];
  66460. for (var c = 0, f = o.length; c < f; c++) {
  66461. var d = o[c].getValue() / u.sum * n;
  66462. o[c].setLayout({
  66463. area: d
  66464. });
  66465. }
  66466. return l && (o.length && t.setLayout({
  66467. isLeafRoot: !0
  66468. }, !0), o.length = 0), t.viewChildren = o, t.setLayout({
  66469. dataExtent: u.dataExtent
  66470. }, !0), o;
  66471. }
  66472. function Jze(t, e, n, r, i) {
  66473. if (!r)
  66474. return n;
  66475. for (var a = t.get("visibleMin"), o = i.length, s = o, l = o - 1; l >= 0; l--) {
  66476. var u = i[r === "asc" ? o - l - 1 : l].getValue();
  66477. u / n * e < a && (s = l, n -= u);
  66478. }
  66479. return r === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), n;
  66480. }
  66481. function eVe(t, e) {
  66482. return e && t.sort(function(n, r) {
  66483. var i = e === "asc" ? n.getValue() - r.getValue() : r.getValue() - n.getValue();
  66484. return i === 0 ? e === "asc" ? n.dataIndex - r.dataIndex : r.dataIndex - n.dataIndex : i;
  66485. }), t;
  66486. }
  66487. function tVe(t, e, n) {
  66488. for (var r = 0, i = 0, a = e.length; i < a; i++)
  66489. r += e[i].getValue();
  66490. var o = t.get("visualDimension"), s;
  66491. 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], Zk(e, function(l) {
  66492. var u = l.getValue(o);
  66493. u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
  66494. })), {
  66495. sum: r,
  66496. dataExtent: s
  66497. };
  66498. }
  66499. function nVe(t, e, n) {
  66500. for (var r = 0, i = 1 / 0, a = 0, o = void 0, s = t.length; a < s; a++)
  66501. o = t[a].getLayout().area, o && (o < i && (i = o), o > r && (r = o));
  66502. var l = t.area * t.area, u = e * e * n;
  66503. return l ? Bm(u * r / l, l / (u * i)) : 1 / 0;
  66504. }
  66505. function GF(t, e, n, r, i) {
  66506. 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;
  66507. (i || c > n[l[o]]) && (c = n[l[o]]);
  66508. for (var f = 0, d = t.length; f < d; f++) {
  66509. var h = t[f], p = {}, v = c ? h.getLayout().area / c : 0, g = p[l[o]] = Bm(c - 2 * r, 0), m = n[s[a]] + n[l[a]] - u, y = f === d - 1 || m < v ? m : v, b = p[l[a]] = Bm(y - 2 * r, 0);
  66510. p[s[o]] = n[s[o]] + RO(r, g / 2), p[s[a]] = u + RO(r, b / 2), u += y, h.setLayout(p, !0);
  66511. }
  66512. n[s[o]] += c, n[l[o]] -= c;
  66513. }
  66514. function rVe(t, e, n, r, i) {
  66515. var a = (e || {}).node, o = [r, i];
  66516. if (!a || a === n)
  66517. return o;
  66518. for (var s, l = r * i, u = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
  66519. for (var c = 0, f = s.children, d = 0, h = f.length; d < h; d++)
  66520. c += f[d].getValue();
  66521. var p = a.getValue();
  66522. if (p === 0)
  66523. return o;
  66524. u *= c / p;
  66525. var v = s.getModel(), g = v.get(Tne), m = Math.max(g, Ane(v));
  66526. u += 4 * g * g + (3 * g + m) * Math.pow(u, 0.5), u > CA && (u = CA), a = s;
  66527. }
  66528. u < l && (u = l);
  66529. var y = Math.pow(u / l, 0.5);
  66530. return [r * y, i * y];
  66531. }
  66532. function iVe(t, e, n) {
  66533. if (e)
  66534. return {
  66535. x: e.x,
  66536. y: e.y
  66537. };
  66538. var r = {
  66539. x: 0,
  66540. y: 0
  66541. };
  66542. if (!n)
  66543. return r;
  66544. var i = n.node, a = i.getLayout();
  66545. if (!a)
  66546. return r;
  66547. for (var o = [a.width / 2, a.height / 2], s = i; s; ) {
  66548. var l = s.getLayout();
  66549. o[0] += l.x, o[1] += l.y, s = s.parentNode;
  66550. }
  66551. return {
  66552. x: t.width / 2 - o[0],
  66553. y: t.height / 2 - o[1]
  66554. };
  66555. }
  66556. function $ne(t, e, n, r, i) {
  66557. var a = t.getLayout(), o = n[i], s = o && o === t;
  66558. if (!(o && !s || i === n.length && t !== r)) {
  66559. t.setLayout({
  66560. // isInView means: viewRoot sub tree + viewAbovePath
  66561. isInView: !0,
  66562. // invisible only means: outside view clip so that the node can not
  66563. // see but still layout for animation preparation but not render.
  66564. invisible: !s && !e.intersect(a),
  66565. isAboveViewRoot: s
  66566. }, !0);
  66567. var l = new Je(e.x - a.x, e.y - a.y, e.width, e.height);
  66568. Zk(t.viewChildren || [], function(u) {
  66569. $ne(u, l, n, r, i + 1);
  66570. });
  66571. }
  66572. }
  66573. function Ane(t) {
  66574. return t.get(Xze) ? t.get(Yze) : 0;
  66575. }
  66576. function aVe(t) {
  66577. t.registerSeriesModel(wze), t.registerChartView(kze), t.registerVisual(Qze), t.registerLayout(qze), xze(t);
  66578. }
  66579. function oVe(t) {
  66580. var e = t.findComponents({
  66581. mainType: "legend"
  66582. });
  66583. !e || !e.length || t.eachSeriesByType("graph", function(n) {
  66584. var r = n.getCategoriesData(), i = n.getGraph(), a = i.data, o = r.mapArray(r.getName);
  66585. a.filterSelf(function(s) {
  66586. var l = a.getItemModel(s), u = l.getShallow("category");
  66587. if (u != null) {
  66588. St(u) && (u = o[u]);
  66589. for (var c = 0; c < e.length; c++)
  66590. if (!e[c].isSelected(u))
  66591. return !1;
  66592. }
  66593. return !0;
  66594. });
  66595. });
  66596. }
  66597. function sVe(t) {
  66598. var e = {};
  66599. t.eachSeriesByType("graph", function(n) {
  66600. var r = n.getCategoriesData(), i = n.getData(), a = {};
  66601. r.each(function(o) {
  66602. var s = r.getName(o);
  66603. a["ec-" + s] = o;
  66604. var l = r.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
  66605. u.fill || (u.fill = n.getColorFromPalette(s, e)), r.setItemVisual(o, "style", u);
  66606. for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) {
  66607. var d = l.getShallow(c[f], !0);
  66608. d != null && r.setItemVisual(o, c[f], d);
  66609. }
  66610. }), r.count() && i.each(function(o) {
  66611. var s = i.getItemModel(o), l = s.getShallow("category");
  66612. if (l != null) {
  66613. Oe(l) && (l = a["ec-" + l]);
  66614. var u = r.getItemVisual(l, "style"), c = i.ensureUniqueItemVisual(o, "style");
  66615. le(c, u);
  66616. for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < f.length; d++)
  66617. i.setItemVisual(o, f[d], r.getItemVisual(l, f[d]));
  66618. }
  66619. });
  66620. });
  66621. }
  66622. function $b(t) {
  66623. return t instanceof Array || (t = [t, t]), t;
  66624. }
  66625. function lVe(t) {
  66626. t.eachSeriesByType("graph", function(e) {
  66627. var n = e.getGraph(), r = e.getEdgeData(), i = $b(e.get("edgeSymbol")), a = $b(e.get("edgeSymbolSize"));
  66628. 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) {
  66629. var s = r.getItemModel(o), l = n.getEdgeByIndex(o), u = $b(s.getShallow("symbol", !0)), c = $b(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), d = r.ensureUniqueItemVisual(o, "style");
  66630. switch (le(d, f), d.stroke) {
  66631. case "source": {
  66632. var h = l.node1.getVisual("style");
  66633. d.stroke = h && h.fill;
  66634. break;
  66635. }
  66636. case "target": {
  66637. var h = l.node2.getVisual("style");
  66638. d.stroke = h && h.fill;
  66639. break;
  66640. }
  66641. }
  66642. 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]);
  66643. });
  66644. });
  66645. }
  66646. var bE = "-->", _w = function(t) {
  66647. return t.get("autoCurveness") || null;
  66648. }, Ene = function(t, e) {
  66649. var n = _w(t), r = 20, i = [];
  66650. if (St(n))
  66651. r = n;
  66652. else if (ue(n)) {
  66653. t.__curvenessList = n;
  66654. return;
  66655. }
  66656. e > r && (r = e);
  66657. var a = r % 2 ? r + 2 : r + 3;
  66658. i = [];
  66659. for (var o = 0; o < a; o++)
  66660. i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
  66661. t.__curvenessList = i;
  66662. }, zm = function(t, e, n) {
  66663. var r = [t.id, t.dataIndex].join("."), i = [e.id, e.dataIndex].join(".");
  66664. return [n.uid, r, i].join(bE);
  66665. }, Mne = function(t) {
  66666. var e = t.split(bE);
  66667. return [e[0], e[2], e[1]].join(bE);
  66668. }, uVe = function(t, e) {
  66669. var n = zm(t.node1, t.node2, e);
  66670. return e.__edgeMap[n];
  66671. }, cVe = function(t, e) {
  66672. var n = _E(zm(t.node1, t.node2, e), e), r = _E(zm(t.node2, t.node1, e), e);
  66673. return n + r;
  66674. }, _E = function(t, e) {
  66675. var n = e.__edgeMap;
  66676. return n[t] ? n[t].length : 0;
  66677. };
  66678. function fVe(t) {
  66679. _w(t) && (t.__curvenessList = [], t.__edgeMap = {}, Ene(t));
  66680. }
  66681. function dVe(t, e, n, r) {
  66682. if (_w(n)) {
  66683. var i = zm(t, e, n), a = n.__edgeMap, o = a[Mne(i)];
  66684. 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);
  66685. }
  66686. }
  66687. function Uk(t, e, n, r) {
  66688. var i = _w(e), a = ue(i);
  66689. if (!i)
  66690. return null;
  66691. var o = uVe(t, e);
  66692. if (!o)
  66693. return null;
  66694. for (var s = -1, l = 0; l < o.length; l++)
  66695. if (o[l] === n) {
  66696. s = l;
  66697. break;
  66698. }
  66699. var u = cVe(t, e);
  66700. Ene(e, u), t.lineStyle = t.lineStyle || {};
  66701. var c = zm(t.node1, t.node2, e), f = e.__curvenessList, d = a || u % 2 ? 0 : 1;
  66702. if (o.isForward)
  66703. return f[d + s];
  66704. var h = Mne(c), p = _E(h, e), v = f[s + p + d];
  66705. 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];
  66706. }
  66707. function Ine(t) {
  66708. var e = t.coordinateSystem;
  66709. if (!(e && e.type !== "view")) {
  66710. var n = t.getGraph();
  66711. n.eachNode(function(r) {
  66712. var i = r.getModel();
  66713. r.setLayout([+i.get("x"), +i.get("y")]);
  66714. }), Xk(n, t);
  66715. }
  66716. }
  66717. function Xk(t, e) {
  66718. t.eachEdge(function(n, r) {
  66719. var i = ji(n.getModel().get(["lineStyle", "curveness"]), -Uk(n, e, r, !0), 0), a = Zo(n.node1.getLayout()), o = Zo(n.node2.getLayout()), s = [a, o];
  66720. +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);
  66721. });
  66722. }
  66723. function hVe(t, e) {
  66724. t.eachSeriesByType("graph", function(n) {
  66725. var r = n.get("layout"), i = n.coordinateSystem;
  66726. if (i && i.type !== "view") {
  66727. var a = n.getData(), o = [];
  66728. k(i.dimensions, function(d) {
  66729. o = o.concat(a.mapDimensionsAll(d));
  66730. });
  66731. for (var s = 0; s < a.count(); s++) {
  66732. for (var l = [], u = !1, c = 0; c < o.length; c++) {
  66733. var f = a.get(o[c], s);
  66734. isNaN(f) || (u = !0), l.push(f);
  66735. }
  66736. u ? a.setItemLayout(s, i.dataToPoint(l)) : a.setItemLayout(s, [NaN, NaN]);
  66737. }
  66738. Xk(a.graph, n);
  66739. } else (!r || r === "none") && Ine(n);
  66740. });
  66741. }
  66742. function qv(t) {
  66743. var e = t.coordinateSystem;
  66744. if (e.type !== "view")
  66745. return 1;
  66746. var n = t.option.nodeScaleRatio, r = e.scaleX, i = e.getZoom(), a = (i - 1) * n + 1;
  66747. return a / r;
  66748. }
  66749. function Kv(t) {
  66750. var e = t.getVisual("symbolSize");
  66751. return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
  66752. }
  66753. var jF = Math.PI, bP = [];
  66754. function Yk(t, e, n, r) {
  66755. var i = t.coordinateSystem;
  66756. if (!(i && i.type !== "view")) {
  66757. 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();
  66758. if (o.setLayout({
  66759. cx: l,
  66760. cy: u
  66761. }), !!f) {
  66762. if (n) {
  66763. var d = i.pointToData(r), h = d[0], p = d[1], v = [h - l, p - u];
  66764. Rf(v, v), Sg(v, v, c), n.setLayout([l + v[0], u + v[1]], !0);
  66765. var g = t.get(["circular", "rotateLabel"]);
  66766. Dne(n, g, l, u);
  66767. }
  66768. pVe[e](t, s, o, c, l, u, f), s.eachEdge(function(m, y) {
  66769. var b = ji(m.getModel().get(["lineStyle", "curveness"]), Uk(m, t, y), 0), _ = Zo(m.node1.getLayout()), O = Zo(m.node2.getLayout()), S, x = (_[0] + O[0]) / 2, C = (_[1] + O[1]) / 2;
  66770. +b && (b *= 3, S = [l * b + x * (1 - b), u * b + C * (1 - b)]), m.setLayout([_, O, S]);
  66771. });
  66772. }
  66773. }
  66774. }
  66775. var pVe = {
  66776. value: function(t, e, n, r, i, a, o) {
  66777. var s = 0, l = n.getSum("value"), u = Math.PI * 2 / (l || o);
  66778. e.eachNode(function(c) {
  66779. var f = c.getValue("value"), d = u * (l ? f : 1) / 2;
  66780. s += d, c.setLayout([r * Math.cos(s) + i, r * Math.sin(s) + a]), s += d;
  66781. });
  66782. },
  66783. symbolSize: function(t, e, n, r, i, a, o) {
  66784. var s = 0;
  66785. bP.length = o;
  66786. var l = qv(t);
  66787. e.eachNode(function(f) {
  66788. var d = Kv(f);
  66789. isNaN(d) && (d = 2), d < 0 && (d = 0), d *= l;
  66790. var h = Math.asin(d / 2 / r);
  66791. isNaN(h) && (h = jF / 2), bP[f.dataIndex] = h, s += h * 2;
  66792. });
  66793. var u = (2 * jF - s) / o / 2, c = 0;
  66794. e.eachNode(function(f) {
  66795. var d = u + bP[f.dataIndex];
  66796. c += d, (!f.getLayout() || !f.getLayout().fixed) && f.setLayout([r * Math.cos(c) + i, r * Math.sin(c) + a]), c += d;
  66797. });
  66798. }
  66799. };
  66800. function Dne(t, e, n, r) {
  66801. var i = t.getGraphicEl();
  66802. if (i) {
  66803. var a = t.getModel(), o = a.get(["label", "rotate"]) || 0, s = i.getSymbolPath();
  66804. if (e) {
  66805. var l = t.getLayout(), u = Math.atan2(l[1] - r, l[0] - n);
  66806. u < 0 && (u = Math.PI * 2 + u);
  66807. var c = l[0] < n;
  66808. c && (u = u - Math.PI);
  66809. var f = c ? "left" : "right";
  66810. s.setTextConfig({
  66811. rotation: -u,
  66812. position: f,
  66813. origin: "center"
  66814. });
  66815. var d = s.ensureState("emphasis");
  66816. le(d.textConfig || (d.textConfig = {}), {
  66817. position: f
  66818. });
  66819. } else
  66820. s.setTextConfig({
  66821. rotation: o *= Math.PI / 180
  66822. });
  66823. }
  66824. }
  66825. function vVe(t) {
  66826. t.eachSeriesByType("graph", function(e) {
  66827. e.get("layout") === "circular" && Yk(e, "symbolSize");
  66828. });
  66829. }
  66830. var pd = U1;
  66831. function gVe(t, e, n) {
  66832. 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++) {
  66833. var f = r[c];
  66834. f.p || (f.p = wu(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), f.pp = Zo(f.p), f.edges = null;
  66835. }
  66836. var d = n.friction == null ? 0.6 : n.friction, h = d, p, v;
  66837. return {
  66838. warmUp: function() {
  66839. h = d * 0.8;
  66840. },
  66841. setFixed: function(g) {
  66842. r[g].fixed = !0;
  66843. },
  66844. setUnfixed: function(g) {
  66845. r[g].fixed = !1;
  66846. },
  66847. /**
  66848. * Before step hook
  66849. */
  66850. beforeStep: function(g) {
  66851. p = g;
  66852. },
  66853. /**
  66854. * After step hook
  66855. */
  66856. afterStep: function(g) {
  66857. v = g;
  66858. },
  66859. /**
  66860. * Some formulas were originally copied from "d3.js"
  66861. * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
  66862. * with some modifications made for this project.
  66863. * See the license statement at the head of this file.
  66864. */
  66865. step: function(g) {
  66866. p && p(r, i);
  66867. for (var m = [], y = r.length, b = 0; b < i.length; b++) {
  66868. var _ = i[b];
  66869. if (!_.ignoreForceLayout) {
  66870. var O = _.n1, S = _.n2;
  66871. kl(m, S.p, O.p);
  66872. var x = mm(m) - _.d, C = S.w / (O.w + S.w);
  66873. isNaN(C) && (C = 0), Rf(m, m), !O.fixed && pd(O.p, O.p, m, C * x * h), !S.fixed && pd(S.p, S.p, m, -(1 - C) * x * h);
  66874. }
  66875. }
  66876. for (var b = 0; b < y; b++) {
  66877. var T = r[b];
  66878. T.fixed || (kl(m, l, T.p), pd(T.p, T.p, m, u * h));
  66879. }
  66880. for (var b = 0; b < y; b++)
  66881. for (var O = r[b], w = b + 1; w < y; w++) {
  66882. var S = r[w];
  66883. kl(m, S.p, O.p);
  66884. var x = mm(m);
  66885. x === 0 && (Aq(m, Math.random() - 0.5, Math.random() - 0.5), x = 1);
  66886. var P = (O.rep + S.rep) / x / x;
  66887. !O.fixed && pd(O.pp, O.pp, m, P), !S.fixed && pd(S.pp, S.pp, m, -P);
  66888. }
  66889. for (var $ = [], b = 0; b < y; b++) {
  66890. var T = r[b];
  66891. T.fixed || (kl($, T.p, T.pp), pd(T.p, T.p, $, h), Mr(T.pp, T.p));
  66892. }
  66893. h = h * 0.992;
  66894. var A = h < 0.01;
  66895. v && v(r, i, A), g && g(A);
  66896. }
  66897. };
  66898. }
  66899. function mVe(t) {
  66900. t.eachSeriesByType("graph", function(e) {
  66901. var n = e.coordinateSystem;
  66902. if (!(n && n.type !== "view"))
  66903. if (e.get("layout") === "force") {
  66904. var r = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), l = s.get("initLayout");
  66905. e.preservedPoints ? a.each(function(b) {
  66906. var _ = a.getId(b);
  66907. a.setItemLayout(b, r[_] || [NaN, NaN]);
  66908. }) : !l || l === "none" ? Ine(e) : l === "circular" && Yk(e, "value");
  66909. 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];
  66910. p = [p[1], p[0]];
  66911. var v = a.mapArray("value", function(b, _) {
  66912. var O = a.getItemLayout(_), S = Lt(b, u, h);
  66913. return isNaN(S) && (S = (h[0] + h[1]) / 2), {
  66914. w: S,
  66915. rep: S,
  66916. fixed: a.getItemModel(_).get("fixed"),
  66917. p: !O || isNaN(O[0]) || isNaN(O[1]) ? null : O
  66918. };
  66919. }), g = o.mapArray("value", function(b, _) {
  66920. var O = i.getEdgeByIndex(_), S = Lt(b, c, p);
  66921. isNaN(S) && (S = (p[0] + p[1]) / 2);
  66922. var x = O.getModel(), C = ji(O.getModel().get(["lineStyle", "curveness"]), -Uk(O, e, _, !0), 0);
  66923. return {
  66924. n1: v[O.node1.dataIndex],
  66925. n2: v[O.node2.dataIndex],
  66926. d: S,
  66927. curveness: C,
  66928. ignoreForceLayout: x.get("ignoreForceLayout")
  66929. };
  66930. }), m = n.getBoundingRect(), y = gVe(v, g, {
  66931. rect: m,
  66932. gravity: s.get("gravity"),
  66933. friction: s.get("friction")
  66934. });
  66935. y.beforeStep(function(b, _) {
  66936. for (var O = 0, S = b.length; O < S; O++)
  66937. b[O].fixed && Mr(b[O].p, i.getNodeByIndex(O).getLayout());
  66938. }), y.afterStep(function(b, _, O) {
  66939. for (var S = 0, x = b.length; S < x; S++)
  66940. b[S].fixed || i.getNodeByIndex(S).setLayout(b[S].p), r[a.getId(S)] = b[S].p;
  66941. for (var S = 0, x = _.length; S < x; S++) {
  66942. var C = _[S], T = i.getEdgeByIndex(S), w = C.n1.p, P = C.n2.p, $ = T.getLayout();
  66943. $ = $ ? $.slice() : [], $[0] = $[0] || [], $[1] = $[1] || [], Mr($[0], w), Mr($[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($);
  66944. }
  66945. }), e.forceLayout = y, e.preservedPoints = r, y.step();
  66946. } else
  66947. e.forceLayout = null;
  66948. });
  66949. }
  66950. function yVe(t, e, n) {
  66951. var r = le(t.getBoxLayoutParams(), {
  66952. aspect: n
  66953. });
  66954. return Rn(r, {
  66955. width: e.getWidth(),
  66956. height: e.getHeight()
  66957. });
  66958. }
  66959. function bVe(t, e) {
  66960. var n = [];
  66961. return t.eachSeriesByType("graph", function(r) {
  66962. var i = r.get("coordinateSystem");
  66963. if (!i || i === "view") {
  66964. var a = r.getData(), o = a.mapArray(function(g) {
  66965. var m = a.getItemModel(g);
  66966. return [+m.get("x"), +m.get("y")];
  66967. }), s = [], l = [];
  66968. jx(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);
  66969. var u = (l[0] - s[0]) / (l[1] - s[1]), c = yVe(r, e, u);
  66970. isNaN(u) && (s = [c.x, c.y], l = [c.x + c.width, c.y + c.height]);
  66971. var f = l[0] - s[0], d = l[1] - s[1], h = c.width, p = c.height, v = r.coordinateSystem = new J0();
  66972. 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);
  66973. }
  66974. }), n;
  66975. }
  66976. var ZF = Un.prototype, _P = V0.prototype, Rne = (
  66977. /** @class */
  66978. /* @__PURE__ */ function() {
  66979. function t() {
  66980. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  66981. }
  66982. return t;
  66983. }()
  66984. );
  66985. (function(t) {
  66986. q(e, t);
  66987. function e() {
  66988. return t !== null && t.apply(this, arguments) || this;
  66989. }
  66990. return e;
  66991. })(Rne);
  66992. function OP(t) {
  66993. return isNaN(+t.cpx1) || isNaN(+t.cpy1);
  66994. }
  66995. var _Ve = (
  66996. /** @class */
  66997. function(t) {
  66998. q(e, t);
  66999. function e(n) {
  67000. var r = t.call(this, n) || this;
  67001. return r.type = "ec-line", r;
  67002. }
  67003. return e.prototype.getDefaultStyle = function() {
  67004. return {
  67005. stroke: "#000",
  67006. fill: null
  67007. };
  67008. }, e.prototype.getDefaultShape = function() {
  67009. return new Rne();
  67010. }, e.prototype.buildPath = function(n, r) {
  67011. OP(r) ? ZF.buildPath.call(this, n, r) : _P.buildPath.call(this, n, r);
  67012. }, e.prototype.pointAt = function(n) {
  67013. return OP(this.shape) ? ZF.pointAt.call(this, n) : _P.pointAt.call(this, n);
  67014. }, e.prototype.tangentAt = function(n) {
  67015. var r = this.shape, i = OP(r) ? [r.x2 - r.x1, r.y2 - r.y1] : _P.tangentAt.call(this, n);
  67016. return Rf(i, i);
  67017. }, e;
  67018. }(ot)
  67019. ), SP = ["fromSymbol", "toSymbol"];
  67020. function UF(t) {
  67021. return "_" + t + "Type";
  67022. }
  67023. function XF(t, e, n) {
  67024. var r = e.getItemVisual(n, t);
  67025. if (!r || r === "none")
  67026. return r;
  67027. 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 = xp(i), u = Vf(o || 0, l);
  67028. return r + l + u + (a || "") + (s || "");
  67029. }
  67030. function YF(t, e, n) {
  67031. var r = e.getItemVisual(n, t);
  67032. if (!(!r || r === "none")) {
  67033. 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 = xp(i), u = Vf(o || 0, l), c = $n(r, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
  67034. return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = t, c;
  67035. }
  67036. }
  67037. function OVe(t) {
  67038. var e = new _Ve({
  67039. name: "line",
  67040. subPixelOptimize: !0
  67041. });
  67042. return OE(e.shape, t), e;
  67043. }
  67044. function OE(t, e) {
  67045. t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  67046. var n = e[2];
  67047. n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN);
  67048. }
  67049. var qk = (
  67050. /** @class */
  67051. function(t) {
  67052. q(e, t);
  67053. function e(n, r, i) {
  67054. var a = t.call(this) || this;
  67055. return a._createLine(n, r, i), a;
  67056. }
  67057. return e.prototype._createLine = function(n, r, i) {
  67058. var a = n.hostModel, o = n.getItemLayout(r), s = OVe(o);
  67059. s.shape.percent = 0, Yt(s, {
  67060. shape: {
  67061. percent: 1
  67062. }
  67063. }, a, r), this.add(s), k(SP, function(l) {
  67064. var u = YF(l, n, r);
  67065. this.add(u), this[UF(l)] = XF(l, n, r);
  67066. }, this), this._updateCommonStl(n, r, i);
  67067. }, e.prototype.updateData = function(n, r, i) {
  67068. var a = n.hostModel, o = this.childOfName("line"), s = n.getItemLayout(r), l = {
  67069. shape: {}
  67070. };
  67071. OE(l.shape, s), Ct(o, l, a, r), k(SP, function(u) {
  67072. var c = XF(u, n, r), f = UF(u);
  67073. if (this[f] !== c) {
  67074. this.remove(this.childOfName(u));
  67075. var d = YF(u, n, r);
  67076. this.add(d);
  67077. }
  67078. this[f] = c;
  67079. }, this), this._updateCommonStl(n, r, i);
  67080. }, e.prototype.getLinePath = function() {
  67081. return this.childAt(0);
  67082. }, e.prototype._updateCommonStl = function(n, r, i) {
  67083. 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;
  67084. if (!i || n.hasItemOption) {
  67085. var p = n.getItemModel(r), v = p.getModel("emphasis");
  67086. 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);
  67087. }
  67088. var g = n.getItemVisual(r, "style"), m = g.stroke;
  67089. 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(SP, function(S) {
  67090. var x = this.childOfName(S);
  67091. if (x) {
  67092. x.setColor(m), x.style.opacity = g.opacity;
  67093. for (var C = 0; C < ni.length; C++) {
  67094. var T = ni[C], w = o.getState(T);
  67095. if (w) {
  67096. var P = w.style || {}, $ = x.ensureState(T), A = $.style || ($.style = {});
  67097. P.stroke != null && (A[x.__isEmptyBrush ? "stroke" : "fill"] = P.stroke), P.opacity != null && (A.opacity = P.opacity);
  67098. }
  67099. }
  67100. x.markRedraw();
  67101. }
  67102. }, this);
  67103. var y = a.getRawValue(r);
  67104. Pr(this, c, {
  67105. labelDataIndex: r,
  67106. labelFetcher: {
  67107. getFormattedLabel: function(S, x) {
  67108. return a.getFormattedLabel(S, x, n.dataType);
  67109. }
  67110. },
  67111. inheritColor: m || "#000",
  67112. defaultOpacity: g.opacity,
  67113. defaultText: (y == null ? n.getName(r) : isFinite(y) ? mn(y) : y) + ""
  67114. });
  67115. var b = this.getTextContent();
  67116. if (b) {
  67117. var _ = c.normal;
  67118. b.__align = b.style.align, b.__verticalAlign = b.style.verticalAlign, b.__position = _.get("position") || "middle";
  67119. var O = _.get("distance");
  67120. ue(O) || (O = [O, O]), b.__labelDistance = O;
  67121. }
  67122. this.setTextConfig({
  67123. position: null,
  67124. local: !0,
  67125. inside: !1
  67126. // Can't be inside for stroke element.
  67127. }), bn(this, d, h, f);
  67128. }, e.prototype.highlight = function() {
  67129. js(this);
  67130. }, e.prototype.downplay = function() {
  67131. Zs(this);
  67132. }, e.prototype.updateLayout = function(n, r) {
  67133. this.setLinePoints(n.getItemLayout(r));
  67134. }, e.prototype.setLinePoints = function(n) {
  67135. var r = this.childOfName("line");
  67136. OE(r.shape, n), r.dirty();
  67137. }, e.prototype.beforeUpdate = function() {
  67138. var n = this, r = n.childOfName("fromSymbol"), i = n.childOfName("toSymbol"), a = n.getTextContent();
  67139. if (!r && !i && (!a || a.ignore))
  67140. return;
  67141. for (var o = 1, s = this.parent; s; )
  67142. s.scaleX && (o /= s.scaleX), s = s.parent;
  67143. var l = n.childOfName("line");
  67144. if (!this.__dirty && !l.__dirty)
  67145. return;
  67146. var u = l.shape.percent, c = l.pointAt(0), f = l.pointAt(u), d = kl([], f, c);
  67147. Rf(d, d);
  67148. function h(w, P) {
  67149. var $ = w.__specifiedRotation;
  67150. if ($ == null) {
  67151. var A = l.tangentAt(P);
  67152. w.attr("rotation", (P === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(A[1], A[0]));
  67153. } else
  67154. w.attr("rotation", $);
  67155. }
  67156. 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) {
  67157. a.x = a.y = 0, a.originX = a.originY = 0;
  67158. 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);
  67159. O[1] > 0 && (O[0] = -O[0], O[1] = -O[1]);
  67160. var x = _[0] < 0 ? -1 : 1;
  67161. if (a.__position !== "start" && a.__position !== "end") {
  67162. var C = -Math.atan2(_[1], _[0]);
  67163. f[0] < c[0] && (C = Math.PI + C), a.rotation = C;
  67164. }
  67165. var T = void 0;
  67166. switch (a.__position) {
  67167. case "insideStartTop":
  67168. case "insideMiddleTop":
  67169. case "insideEndTop":
  67170. case "middle":
  67171. T = -y, v = "bottom";
  67172. break;
  67173. case "insideStartBottom":
  67174. case "insideMiddleBottom":
  67175. case "insideEndBottom":
  67176. T = y, v = "top";
  67177. break;
  67178. default:
  67179. T = 0, v = "middle";
  67180. }
  67181. switch (a.__position) {
  67182. case "end":
  67183. 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";
  67184. break;
  67185. case "start":
  67186. 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";
  67187. break;
  67188. case "insideStartTop":
  67189. case "insideStart":
  67190. case "insideStartBottom":
  67191. a.x = m * x + c[0], a.y = c[1] + T, p = _[0] < 0 ? "right" : "left", a.originX = -m * x, a.originY = -T;
  67192. break;
  67193. case "insideMiddleTop":
  67194. case "insideMiddle":
  67195. case "insideMiddleBottom":
  67196. case "middle":
  67197. a.x = S[0], a.y = S[1] + T, p = "center", a.originY = -T;
  67198. break;
  67199. case "insideEndTop":
  67200. case "insideEnd":
  67201. case "insideEndBottom":
  67202. a.x = -m * x + f[0], a.y = f[1] + T, p = _[0] >= 0 ? "right" : "left", a.originX = m * x, a.originY = -T;
  67203. break;
  67204. }
  67205. a.scaleX = a.scaleY = o, a.setStyle({
  67206. // Use the user specified text align and baseline first
  67207. verticalAlign: a.__verticalAlign || v,
  67208. align: a.__align || p
  67209. });
  67210. }
  67211. }, e;
  67212. }(Ve)
  67213. ), Kk = (
  67214. /** @class */
  67215. function() {
  67216. function t(e) {
  67217. this.group = new Ve(), this._LineCtor = e || qk;
  67218. }
  67219. return t.prototype.updateData = function(e) {
  67220. var n = this;
  67221. this._progressiveEls = null;
  67222. var r = this, i = r.group, a = r._lineData;
  67223. r._lineData = e, a || i.removeAll();
  67224. var o = qF(e);
  67225. e.diff(a).add(function(s) {
  67226. n._doAdd(e, s, o);
  67227. }).update(function(s, l) {
  67228. n._doUpdate(a, e, l, s, o);
  67229. }).remove(function(s) {
  67230. i.remove(a.getItemGraphicEl(s));
  67231. }).execute();
  67232. }, t.prototype.updateLayout = function() {
  67233. var e = this._lineData;
  67234. e && e.eachItemGraphicEl(function(n, r) {
  67235. n.updateLayout(e, r);
  67236. }, this);
  67237. }, t.prototype.incrementalPrepareUpdate = function(e) {
  67238. this._seriesScope = qF(e), this._lineData = null, this.group.removeAll();
  67239. }, t.prototype.incrementalUpdate = function(e, n) {
  67240. this._progressiveEls = [];
  67241. function r(s) {
  67242. !s.isGroup && !SVe(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
  67243. }
  67244. for (var i = e.start; i < e.end; i++) {
  67245. var a = n.getItemLayout(i);
  67246. if (xP(a)) {
  67247. var o = new this._LineCtor(n, i, this._seriesScope);
  67248. o.traverse(r), this.group.add(o), n.setItemGraphicEl(i, o), this._progressiveEls.push(o);
  67249. }
  67250. }
  67251. }, t.prototype.remove = function() {
  67252. this.group.removeAll();
  67253. }, t.prototype.eachRendered = function(e) {
  67254. Tu(this._progressiveEls || this.group, e);
  67255. }, t.prototype._doAdd = function(e, n, r) {
  67256. var i = e.getItemLayout(n);
  67257. if (xP(i)) {
  67258. var a = new this._LineCtor(e, n, r);
  67259. e.setItemGraphicEl(n, a), this.group.add(a);
  67260. }
  67261. }, t.prototype._doUpdate = function(e, n, r, i, a) {
  67262. var o = e.getItemGraphicEl(r);
  67263. if (!xP(n.getItemLayout(i))) {
  67264. this.group.remove(o);
  67265. return;
  67266. }
  67267. o ? o.updateData(n, i, a) : o = new this._LineCtor(n, i, a), n.setItemGraphicEl(i, o), this.group.add(o);
  67268. }, t;
  67269. }()
  67270. );
  67271. function SVe(t) {
  67272. return t.animators && t.animators.length > 0;
  67273. }
  67274. function qF(t) {
  67275. var e = t.hostModel, n = e.getModel("emphasis");
  67276. return {
  67277. lineStyle: e.getModel("lineStyle").getLineStyle(),
  67278. emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
  67279. blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
  67280. selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
  67281. emphasisDisabled: n.get("disabled"),
  67282. blurScope: n.get("blurScope"),
  67283. focus: n.get("focus"),
  67284. labelStatesModels: er(e)
  67285. };
  67286. }
  67287. function KF(t) {
  67288. return isNaN(t[0]) || isNaN(t[1]);
  67289. }
  67290. function xP(t) {
  67291. return t && !KF(t[0]) && !KF(t[1]);
  67292. }
  67293. var wP = [], CP = [], TP = [], vd = ir, PP = Ul, JF = Math.abs;
  67294. function eW(t, e, n) {
  67295. 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) {
  67296. wP[0] = vd(r[0], i[0], a[0], c), wP[1] = vd(r[1], i[1], a[1], c);
  67297. var f = JF(PP(wP, e) - l);
  67298. f < o && (o = f, s = c);
  67299. }
  67300. for (var d = 0; d < 32; d++) {
  67301. var h = s + u;
  67302. CP[0] = vd(r[0], i[0], a[0], s), CP[1] = vd(r[1], i[1], a[1], s), TP[0] = vd(r[0], i[0], a[0], h), TP[1] = vd(r[1], i[1], a[1], h);
  67303. var f = PP(CP, e) - l;
  67304. if (JF(f) < 0.01)
  67305. break;
  67306. var p = PP(TP, e) - l;
  67307. u /= 2, f < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
  67308. }
  67309. return s;
  67310. }
  67311. function $P(t, e) {
  67312. var n = [], r = ym, i = [[], [], []], a = [[], []], o = [];
  67313. e /= 2, t.eachEdge(function(s, l) {
  67314. var u = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol");
  67315. u.__original || (u.__original = [Zo(u[0]), Zo(u[1])], u[2] && u.__original.push(Zo(u[2])));
  67316. var d = u.__original;
  67317. if (u[2] != null) {
  67318. if (Mr(i[0], d[0]), Mr(i[1], d[2]), Mr(i[2], d[1]), c && c !== "none") {
  67319. var h = Kv(s.node1), p = eW(i, d[0], h * e);
  67320. 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];
  67321. }
  67322. if (f && f !== "none") {
  67323. var h = Kv(s.node2), p = eW(i, d[1], h * e);
  67324. 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];
  67325. }
  67326. Mr(u[0], i[0]), Mr(u[1], i[2]), Mr(u[2], i[1]);
  67327. } else {
  67328. if (Mr(a[0], d[0]), Mr(a[1], d[1]), kl(o, a[1], a[0]), Rf(o, o), c && c !== "none") {
  67329. var h = Kv(s.node1);
  67330. U1(a[0], a[0], o, h * e);
  67331. }
  67332. if (f && f !== "none") {
  67333. var h = Kv(s.node2);
  67334. U1(a[1], a[1], o, -h * e);
  67335. }
  67336. Mr(u[0], a[0]), Mr(u[1], a[1]);
  67337. }
  67338. });
  67339. }
  67340. function tW(t) {
  67341. return t.type === "view";
  67342. }
  67343. var xVe = (
  67344. /** @class */
  67345. function(t) {
  67346. q(e, t);
  67347. function e() {
  67348. var n = t !== null && t.apply(this, arguments) || this;
  67349. return n.type = e.type, n;
  67350. }
  67351. return e.prototype.init = function(n, r) {
  67352. var i = new Z0(), a = new Kk(), o = this.group;
  67353. this._controller = new K0(r.getZr()), this._controllerHost = {
  67354. target: o
  67355. }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0;
  67356. }, e.prototype.render = function(n, r, i) {
  67357. var a = this, o = n.coordinateSystem;
  67358. this._model = n;
  67359. var s = this._symbolDraw, l = this._lineDraw, u = this.group;
  67360. if (tW(o)) {
  67361. var c = {
  67362. x: o.x,
  67363. y: o.y,
  67364. scaleX: o.scaleX,
  67365. scaleY: o.scaleY
  67366. };
  67367. this._firstRender ? u.attr(c) : Ct(u, c, n);
  67368. }
  67369. $P(n.getGraph(), qv(n));
  67370. var f = n.getData();
  67371. s.updateData(f);
  67372. var d = n.getEdgeData();
  67373. l.updateData(d), this._updateNodeAndLinkScale(), this._updateController(n, r, i), clearTimeout(this._layoutTimeout);
  67374. var h = n.forceLayout, p = n.get(["force", "layoutAnimation"]);
  67375. h && this._startForceLayoutIteration(h, p);
  67376. var v = n.get("layout");
  67377. f.graph.eachNode(function(b) {
  67378. var _ = b.dataIndex, O = b.getGraphicEl(), S = b.getModel();
  67379. if (O) {
  67380. O.off("drag").off("dragend");
  67381. var x = S.get("draggable");
  67382. x && O.on("drag", function(T) {
  67383. switch (v) {
  67384. case "force":
  67385. h.warmUp(), !a._layouting && a._startForceLayoutIteration(h, p), h.setFixed(_), f.setItemLayout(_, [O.x, O.y]);
  67386. break;
  67387. case "circular":
  67388. f.setItemLayout(_, [O.x, O.y]), b.setLayout({
  67389. fixed: !0
  67390. }, !0), Yk(n, "symbolSize", b, [T.offsetX, T.offsetY]), a.updateLayout(n);
  67391. break;
  67392. case "none":
  67393. default:
  67394. f.setItemLayout(_, [O.x, O.y]), Xk(n.getGraph(), n), a.updateLayout(n);
  67395. break;
  67396. }
  67397. }).on("dragend", function() {
  67398. h && h.setUnfixed(_);
  67399. }), O.setDraggable(x, !!S.get("cursor"));
  67400. var C = S.get(["emphasis", "focus"]);
  67401. C === "adjacency" && (Fe(O).focus = b.getAdjacentDataIndices());
  67402. }
  67403. }), f.graph.eachEdge(function(b) {
  67404. var _ = b.getGraphicEl(), O = b.getModel().get(["emphasis", "focus"]);
  67405. _ && O === "adjacency" && (Fe(_).focus = {
  67406. edge: [b.dataIndex],
  67407. node: [b.node1.dataIndex, b.node2.dataIndex]
  67408. });
  67409. });
  67410. var g = n.get("layout") === "circular" && n.get(["circular", "rotateLabel"]), m = f.getLayout("cx"), y = f.getLayout("cy");
  67411. f.graph.eachNode(function(b) {
  67412. Dne(b, g, m, y);
  67413. }), this._firstRender = !1;
  67414. }, e.prototype.dispose = function() {
  67415. this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null;
  67416. }, e.prototype._startForceLayoutIteration = function(n, r) {
  67417. var i = this;
  67418. (function a() {
  67419. n.step(function(o) {
  67420. i.updateLayout(i._model), (i._layouting = !o) && (r ? i._layoutTimeout = setTimeout(a, 16) : a());
  67421. });
  67422. })();
  67423. }, e.prototype._updateController = function(n, r, i) {
  67424. var a = this, o = this._controller, s = this._controllerHost, l = this.group;
  67425. if (o.setPointerChecker(function(u, c, f) {
  67426. var d = l.getBoundingRect();
  67427. return d.applyTransform(l.transform), d.contain(c, f) && !mw(u, i, n);
  67428. }), !tW(n.coordinateSystem)) {
  67429. o.disable();
  67430. return;
  67431. }
  67432. o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
  67433. Vk(s, u.dx, u.dy), i.dispatchAction({
  67434. seriesId: n.id,
  67435. type: "graphRoam",
  67436. dx: u.dx,
  67437. dy: u.dy
  67438. });
  67439. }).on("zoom", function(u) {
  67440. Fk(s, u.scale, u.originX, u.originY), i.dispatchAction({
  67441. seriesId: n.id,
  67442. type: "graphRoam",
  67443. zoom: u.scale,
  67444. originX: u.originX,
  67445. originY: u.originY
  67446. }), a._updateNodeAndLinkScale(), $P(n.getGraph(), qv(n)), a._lineDraw.updateLayout(), i.updateLabelLayout();
  67447. });
  67448. }, e.prototype._updateNodeAndLinkScale = function() {
  67449. var n = this._model, r = n.getData(), i = qv(n);
  67450. r.eachItemGraphicEl(function(a, o) {
  67451. a && a.setSymbolScale(i);
  67452. });
  67453. }, e.prototype.updateLayout = function(n) {
  67454. $P(n.getGraph(), qv(n)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
  67455. }, e.prototype.remove = function() {
  67456. clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
  67457. }, e.type = "graph", e;
  67458. }(zt)
  67459. );
  67460. function gd(t) {
  67461. return "_EC_" + t;
  67462. }
  67463. var wVe = (
  67464. /** @class */
  67465. function() {
  67466. function t(e) {
  67467. this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
  67468. }
  67469. return t.prototype.isDirected = function() {
  67470. return this._directed;
  67471. }, t.prototype.addNode = function(e, n) {
  67472. e = e == null ? "" + n : "" + e;
  67473. var r = this._nodesMap;
  67474. if (r[gd(e)]) {
  67475. process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
  67476. return;
  67477. }
  67478. var i = new gc(e, n);
  67479. return i.hostGraph = this, this.nodes.push(i), r[gd(e)] = i, i;
  67480. }, t.prototype.getNodeByIndex = function(e) {
  67481. var n = this.data.getRawIndex(e);
  67482. return this.nodes[n];
  67483. }, t.prototype.getNodeById = function(e) {
  67484. return this._nodesMap[gd(e)];
  67485. }, t.prototype.addEdge = function(e, n, r) {
  67486. var i = this._nodesMap, a = this._edgesMap;
  67487. if (St(e) && (e = this.nodes[e]), St(n) && (n = this.nodes[n]), e instanceof gc || (e = i[gd(e)]), n instanceof gc || (n = i[gd(n)]), !(!e || !n)) {
  67488. var o = e.id + "-" + n.id, s = new kne(e, n, r);
  67489. 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;
  67490. }
  67491. }, t.prototype.getEdgeByIndex = function(e) {
  67492. var n = this.edgeData.getRawIndex(e);
  67493. return this.edges[n];
  67494. }, t.prototype.getEdge = function(e, n) {
  67495. e instanceof gc && (e = e.id), n instanceof gc && (n = n.id);
  67496. var r = this._edgesMap;
  67497. return this._directed ? r[e + "-" + n] : r[e + "-" + n] || r[n + "-" + e];
  67498. }, t.prototype.eachNode = function(e, n) {
  67499. for (var r = this.nodes, i = r.length, a = 0; a < i; a++)
  67500. r[a].dataIndex >= 0 && e.call(n, r[a], a);
  67501. }, t.prototype.eachEdge = function(e, n) {
  67502. for (var r = this.edges, i = r.length, a = 0; a < i; a++)
  67503. r[a].dataIndex >= 0 && r[a].node1.dataIndex >= 0 && r[a].node2.dataIndex >= 0 && e.call(n, r[a], a);
  67504. }, t.prototype.breadthFirstTraverse = function(e, n, r, i) {
  67505. if (n instanceof gc || (n = this._nodesMap[gd(n)]), !!n) {
  67506. for (var a = r === "out" ? "outEdges" : r === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
  67507. this.nodes[o].__visited = !1;
  67508. if (!e.call(i, n, null))
  67509. for (var s = [n]; s.length; )
  67510. for (var l = s.shift(), u = l[a], o = 0; o < u.length; o++) {
  67511. var c = u[o], f = c.node1 === l ? c.node2 : c.node1;
  67512. if (!f.__visited) {
  67513. if (e.call(i, f, l))
  67514. return;
  67515. s.push(f), f.__visited = !0;
  67516. }
  67517. }
  67518. }
  67519. }, t.prototype.update = function() {
  67520. for (var e = this.data, n = this.edgeData, r = this.nodes, i = this.edges, a = 0, o = r.length; a < o; a++)
  67521. r[a].dataIndex = -1;
  67522. for (var a = 0, o = e.count(); a < o; a++)
  67523. r[e.getRawIndex(a)].dataIndex = a;
  67524. n.filterSelf(function(s) {
  67525. var l = i[n.getRawIndex(s)];
  67526. return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
  67527. });
  67528. for (var a = 0, o = i.length; a < o; a++)
  67529. i[a].dataIndex = -1;
  67530. for (var a = 0, o = n.count(); a < o; a++)
  67531. i[n.getRawIndex(a)].dataIndex = a;
  67532. }, t.prototype.clone = function() {
  67533. for (var e = new t(this._directed), n = this.nodes, r = this.edges, i = 0; i < n.length; i++)
  67534. e.addNode(n[i].id, n[i].dataIndex);
  67535. for (var i = 0; i < r.length; i++) {
  67536. var a = r[i];
  67537. e.addEdge(a.node1.id, a.node2.id, a.dataIndex);
  67538. }
  67539. return e;
  67540. }, t;
  67541. }()
  67542. ), gc = (
  67543. /** @class */
  67544. function() {
  67545. function t(e, n) {
  67546. this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = n ?? -1;
  67547. }
  67548. return t.prototype.degree = function() {
  67549. return this.edges.length;
  67550. }, t.prototype.inDegree = function() {
  67551. return this.inEdges.length;
  67552. }, t.prototype.outDegree = function() {
  67553. return this.outEdges.length;
  67554. }, t.prototype.getModel = function(e) {
  67555. if (!(this.dataIndex < 0)) {
  67556. var n = this.hostGraph, r = n.data.getItemModel(this.dataIndex);
  67557. return r.getModel(e);
  67558. }
  67559. }, t.prototype.getAdjacentDataIndices = function() {
  67560. for (var e = {
  67561. edge: [],
  67562. node: []
  67563. }, n = 0; n < this.edges.length; n++) {
  67564. var r = this.edges[n];
  67565. r.dataIndex < 0 || (e.edge.push(r.dataIndex), e.node.push(r.node1.dataIndex, r.node2.dataIndex));
  67566. }
  67567. return e;
  67568. }, t.prototype.getTrajectoryDataIndices = function() {
  67569. for (var e = Pe(), n = Pe(), r = 0; r < this.edges.length; r++) {
  67570. var i = this.edges[r];
  67571. if (!(i.dataIndex < 0)) {
  67572. e.set(i.dataIndex, !0);
  67573. for (var a = [i.node1], o = [i.node2], s = 0; s < a.length; ) {
  67574. var l = a[s];
  67575. s++, n.set(l.dataIndex, !0);
  67576. for (var u = 0; u < l.inEdges.length; u++)
  67577. e.set(l.inEdges[u].dataIndex, !0), a.push(l.inEdges[u].node1);
  67578. }
  67579. for (s = 0; s < o.length; ) {
  67580. var c = o[s];
  67581. s++, n.set(c.dataIndex, !0);
  67582. for (var u = 0; u < c.outEdges.length; u++)
  67583. e.set(c.outEdges[u].dataIndex, !0), o.push(c.outEdges[u].node2);
  67584. }
  67585. }
  67586. }
  67587. return {
  67588. edge: e.keys(),
  67589. node: n.keys()
  67590. };
  67591. }, t;
  67592. }()
  67593. ), kne = (
  67594. /** @class */
  67595. function() {
  67596. function t(e, n, r) {
  67597. this.dataIndex = -1, this.node1 = e, this.node2 = n, this.dataIndex = r ?? -1;
  67598. }
  67599. return t.prototype.getModel = function(e) {
  67600. if (!(this.dataIndex < 0)) {
  67601. var n = this.hostGraph, r = n.edgeData.getItemModel(this.dataIndex);
  67602. return r.getModel(e);
  67603. }
  67604. }, t.prototype.getAdjacentDataIndices = function() {
  67605. return {
  67606. edge: [this.dataIndex],
  67607. node: [this.node1.dataIndex, this.node2.dataIndex]
  67608. };
  67609. }, t.prototype.getTrajectoryDataIndices = function() {
  67610. var e = Pe(), n = Pe();
  67611. e.set(this.dataIndex, !0);
  67612. for (var r = [this.node1], i = [this.node2], a = 0; a < r.length; ) {
  67613. var o = r[a];
  67614. a++, n.set(o.dataIndex, !0);
  67615. for (var s = 0; s < o.inEdges.length; s++)
  67616. e.set(o.inEdges[s].dataIndex, !0), r.push(o.inEdges[s].node1);
  67617. }
  67618. for (a = 0; a < i.length; ) {
  67619. var l = i[a];
  67620. a++, n.set(l.dataIndex, !0);
  67621. for (var s = 0; s < l.outEdges.length; s++)
  67622. e.set(l.outEdges[s].dataIndex, !0), i.push(l.outEdges[s].node2);
  67623. }
  67624. return {
  67625. edge: e.keys(),
  67626. node: n.keys()
  67627. };
  67628. }, t;
  67629. }()
  67630. );
  67631. function Lne(t, e) {
  67632. return {
  67633. /**
  67634. * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
  67635. */
  67636. getValue: function(n) {
  67637. var r = this[t][e];
  67638. return r.getStore().get(r.getDimensionIndex(n || "value"), this.dataIndex);
  67639. },
  67640. // TODO: TYPE stricter type.
  67641. setVisual: function(n, r) {
  67642. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, r);
  67643. },
  67644. getVisual: function(n) {
  67645. return this[t][e].getItemVisual(this.dataIndex, n);
  67646. },
  67647. setLayout: function(n, r) {
  67648. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, r);
  67649. },
  67650. getLayout: function() {
  67651. return this[t][e].getItemLayout(this.dataIndex);
  67652. },
  67653. getGraphicEl: function() {
  67654. return this[t][e].getItemGraphicEl(this.dataIndex);
  67655. },
  67656. getRawIndex: function() {
  67657. return this[t][e].getRawIndex(this.dataIndex);
  67658. }
  67659. };
  67660. }
  67661. xn(gc, Lne("hostGraph", "data"));
  67662. xn(kne, Lne("hostGraph", "edgeData"));
  67663. function Nne(t, e, n, r, i) {
  67664. for (var a = new wVe(r), o = 0; o < t.length; o++)
  67665. a.addNode(Tn(
  67666. // Id, name, dataIndex
  67667. t[o].id,
  67668. t[o].name,
  67669. o
  67670. ), o);
  67671. for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
  67672. var c = e[o], f = c.source, d = c.target;
  67673. a.addEdge(f, d, u) && (l.push(c), s.push(Tn(Vn(c.id, null), f + " > " + d)), u++);
  67674. }
  67675. var h = n.get("coordinateSystem"), p;
  67676. if (h === "cartesian2d" || h === "polar")
  67677. p = us(t, n);
  67678. else {
  67679. var v = zf.get(h), g = v ? v.dimensions || [] : [];
  67680. et(g, "value") < 0 && g.concat(["value"]);
  67681. var m = wp(t, {
  67682. coordDimensions: g,
  67683. encodeDefine: n.getEncode()
  67684. }).dimensions;
  67685. p = new Lr(m, n), p.initData(t);
  67686. }
  67687. var y = new Lr(["value"], n);
  67688. return y.initData(l, s), i && i(p, y), yne({
  67689. mainData: p,
  67690. struct: a,
  67691. structAttr: "graph",
  67692. datas: {
  67693. node: p,
  67694. edge: y
  67695. },
  67696. datasAttr: {
  67697. node: "data",
  67698. edge: "edgeData"
  67699. }
  67700. }), a.update(), a;
  67701. }
  67702. var CVe = (
  67703. /** @class */
  67704. function(t) {
  67705. q(e, t);
  67706. function e() {
  67707. var n = t !== null && t.apply(this, arguments) || this;
  67708. return n.type = e.type, n.hasSymbolVisual = !0, n;
  67709. }
  67710. return e.prototype.init = function(n) {
  67711. t.prototype.init.apply(this, arguments);
  67712. var r = this;
  67713. function i() {
  67714. return r._categoriesData;
  67715. }
  67716. this.legendVisualProvider = new q0(i, i), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
  67717. }, e.prototype.mergeOption = function(n) {
  67718. t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
  67719. }, e.prototype.mergeDefaultAndTheme = function(n) {
  67720. t.prototype.mergeDefaultAndTheme.apply(this, arguments), gf(n, "edgeLabel", ["show"]);
  67721. }, e.prototype.getInitialData = function(n, r) {
  67722. var i = n.edges || n.links || [], a = n.data || n.nodes || [], o = this;
  67723. if (a && i) {
  67724. fVe(this);
  67725. var s = Nne(a, i, this, !0, l);
  67726. return k(s.edges, function(u) {
  67727. dVe(u.node1, u.node2, this, u.dataIndex);
  67728. }, this), s.data;
  67729. }
  67730. function l(u, c) {
  67731. u.wrapMethod("getItemModel", function(p) {
  67732. var v = o._categoriesModels, g = p.getShallow("category"), m = v[g];
  67733. return m && (m.parentModel = p.parentModel, p.parentModel = m), p;
  67734. });
  67735. var f = Wt.prototype.getModel;
  67736. function d(p, v) {
  67737. var g = f.call(this, p, v);
  67738. return g.resolveParentPath = h, g;
  67739. }
  67740. c.wrapMethod("getItemModel", function(p) {
  67741. return p.resolveParentPath = h, p.getModel = d, p;
  67742. });
  67743. function h(p) {
  67744. if (p && (p[0] === "label" || p[1] === "label")) {
  67745. var v = p.slice();
  67746. return p[0] === "label" ? v[0] = "edgeLabel" : p[1] === "label" && (v[1] = "edgeLabel"), v;
  67747. }
  67748. return p;
  67749. }
  67750. }
  67751. }, e.prototype.getGraph = function() {
  67752. return this.getData().graph;
  67753. }, e.prototype.getEdgeData = function() {
  67754. return this.getGraph().edgeData;
  67755. }, e.prototype.getCategoriesData = function() {
  67756. return this._categoriesData;
  67757. }, e.prototype.formatTooltip = function(n, r, i) {
  67758. if (i === "edge") {
  67759. 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 = [];
  67760. return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
  67761. name: c.join(" > "),
  67762. value: o.value,
  67763. noValue: o.value == null
  67764. });
  67765. }
  67766. var f = iee({
  67767. series: this,
  67768. dataIndex: n,
  67769. multipleSeries: r
  67770. });
  67771. return f;
  67772. }, e.prototype._updateCategoriesData = function() {
  67773. var n = ce(this.option.categories || [], function(i) {
  67774. return i.value != null ? i : le({
  67775. value: 0
  67776. }, i);
  67777. }), r = new Lr(["value"], this);
  67778. r.initData(n), this._categoriesData = r, this._categoriesModels = r.mapArray(function(i) {
  67779. return r.getItemModel(i);
  67780. });
  67781. }, e.prototype.setZoom = function(n) {
  67782. this.option.zoom = n;
  67783. }, e.prototype.setCenter = function(n) {
  67784. this.option.center = n;
  67785. }, e.prototype.isAnimationEnabled = function() {
  67786. return t.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
  67787. }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  67788. // zlevel: 0,
  67789. z: 2,
  67790. coordinateSystem: "view",
  67791. // Default option for all coordinate systems
  67792. // xAxisIndex: 0,
  67793. // yAxisIndex: 0,
  67794. // polarIndex: 0,
  67795. // geoIndex: 0,
  67796. legendHoverLink: !0,
  67797. layout: null,
  67798. // Configuration of circular layout
  67799. circular: {
  67800. rotateLabel: !1
  67801. },
  67802. // Configuration of force directed layout
  67803. force: {
  67804. initLayout: null,
  67805. // Node repulsion. Can be an array to represent range.
  67806. repulsion: [0, 50],
  67807. gravity: 0.1,
  67808. // Initial friction
  67809. friction: 0.6,
  67810. // Edge length. Can be an array to represent range.
  67811. edgeLength: 30,
  67812. layoutAnimation: !0
  67813. },
  67814. left: "center",
  67815. top: "center",
  67816. // right: null,
  67817. // bottom: null,
  67818. // width: '80%',
  67819. // height: '80%',
  67820. symbol: "circle",
  67821. symbolSize: 10,
  67822. edgeSymbol: ["none", "none"],
  67823. edgeSymbolSize: 10,
  67824. edgeLabel: {
  67825. position: "middle",
  67826. distance: 5
  67827. },
  67828. draggable: !1,
  67829. roam: !1,
  67830. // Default on center of graph
  67831. center: null,
  67832. zoom: 1,
  67833. // Symbol size scale ratio in roam
  67834. nodeScaleRatio: 0.6,
  67835. // cursor: null,
  67836. // categories: [],
  67837. // data: []
  67838. // Or
  67839. // nodes: []
  67840. //
  67841. // links: []
  67842. // Or
  67843. // edges: []
  67844. label: {
  67845. show: !1,
  67846. formatter: "{b}"
  67847. },
  67848. itemStyle: {},
  67849. lineStyle: {
  67850. color: "#aaa",
  67851. width: 1,
  67852. opacity: 0.5
  67853. },
  67854. emphasis: {
  67855. scale: !0,
  67856. label: {
  67857. show: !0
  67858. }
  67859. },
  67860. select: {
  67861. itemStyle: {
  67862. borderColor: "#212121"
  67863. }
  67864. }
  67865. }, e;
  67866. }(Ht)
  67867. ), TVe = {
  67868. type: "graphRoam",
  67869. event: "graphRoam",
  67870. update: "none"
  67871. };
  67872. function PVe(t) {
  67873. t.registerChartView(xVe), t.registerSeriesModel(CVe), t.registerProcessor(oVe), t.registerVisual(sVe), t.registerVisual(lVe), t.registerLayout(hVe), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, vVe), t.registerLayout(mVe), t.registerCoordinateSystem("graphView", {
  67874. dimensions: J0.dimensions,
  67875. create: bVe
  67876. }), t.registerAction({
  67877. type: "focusNodeAdjacency",
  67878. event: "focusNodeAdjacency",
  67879. update: "series:focusNodeAdjacency"
  67880. }, On), t.registerAction({
  67881. type: "unfocusNodeAdjacency",
  67882. event: "unfocusNodeAdjacency",
  67883. update: "series:unfocusNodeAdjacency"
  67884. }, On), t.registerAction(TVe, function(e, n, r) {
  67885. n.eachComponent({
  67886. mainType: "series",
  67887. query: e
  67888. }, function(i) {
  67889. var a = i.coordinateSystem, o = Qk(a, e, void 0, r);
  67890. i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
  67891. });
  67892. });
  67893. }
  67894. var $Ve = (
  67895. /** @class */
  67896. /* @__PURE__ */ function() {
  67897. function t() {
  67898. this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
  67899. }
  67900. return t;
  67901. }()
  67902. ), AVe = (
  67903. /** @class */
  67904. function(t) {
  67905. q(e, t);
  67906. function e(n) {
  67907. var r = t.call(this, n) || this;
  67908. return r.type = "pointer", r;
  67909. }
  67910. return e.prototype.getDefaultShape = function() {
  67911. return new $Ve();
  67912. }, e.prototype.buildPath = function(n, r) {
  67913. 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);
  67914. 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);
  67915. }, e;
  67916. }(ot)
  67917. );
  67918. function EVe(t, e) {
  67919. 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);
  67920. return {
  67921. cx: o,
  67922. cy: s,
  67923. r: l
  67924. };
  67925. }
  67926. function Ab(t, e) {
  67927. var n = t == null ? "" : t + "";
  67928. return e && (Oe(e) ? n = e.replace("{value}", n) : Me(e) && (n = e(t))), n;
  67929. }
  67930. var MVe = (
  67931. /** @class */
  67932. function(t) {
  67933. q(e, t);
  67934. function e() {
  67935. var n = t !== null && t.apply(this, arguments) || this;
  67936. return n.type = e.type, n;
  67937. }
  67938. return e.prototype.render = function(n, r, i) {
  67939. this.group.removeAll();
  67940. var a = n.get(["axisLine", "lineStyle", "color"]), o = EVe(n, i);
  67941. this._renderMain(n, r, i, a, o), this._data = n.getData();
  67942. }, e.prototype.dispose = function() {
  67943. }, e.prototype._renderMain = function(n, r, i, a, o) {
  67944. 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 ? AO : ri, p = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [u, c];
  67945. DR(m, !l), u = m[0], c = m[1];
  67946. for (var y = c - u, b = u, _ = [], O = 0; p && O < a.length; O++) {
  67947. var S = Math.min(Math.max(a[O][0], 0), 1);
  67948. c = u + y * S;
  67949. var x = new h({
  67950. shape: {
  67951. startAngle: b,
  67952. endAngle: c,
  67953. cx: o.cx,
  67954. cy: o.cy,
  67955. clockwise: l,
  67956. r0: o.r - g,
  67957. r: o.r
  67958. },
  67959. silent: !0
  67960. });
  67961. x.setStyle({
  67962. fill: a[O][1]
  67963. }), x.setStyle(v.getLineStyle(
  67964. // Because we use sector to simulate arc
  67965. // so the properties for stroking are useless
  67966. ["color", "width"]
  67967. )), _.push(x), b = c;
  67968. }
  67969. _.reverse(), k(_, function(T) {
  67970. return s.add(T);
  67971. });
  67972. var C = function(T) {
  67973. if (T <= 0)
  67974. return a[0][1];
  67975. var w;
  67976. for (w = 0; w < a.length; w++)
  67977. if (a[w][0] >= T && (w === 0 ? 0 : a[w - 1][0]) < T)
  67978. return a[w][1];
  67979. return a[w - 1][1];
  67980. };
  67981. 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);
  67982. }, e.prototype._renderTicks = function(n, r, i, a, o, s, l, u, c) {
  67983. 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++) {
  67984. if (D = Math.cos(C), E = Math.sin(C), m.get("show")) {
  67985. var N = A ? A + c : c, V = new Un({
  67986. shape: {
  67987. x1: D * (p - N) + d,
  67988. y1: E * (p - N) + h,
  67989. x2: D * (p - S - N) + d,
  67990. y2: E * (p - S - N) + h
  67991. },
  67992. style: P,
  67993. silent: !0
  67994. });
  67995. P.stroke === "auto" && V.setStyle({
  67996. stroke: a(R / _)
  67997. }), f.add(V);
  67998. }
  67999. if (b.get("show")) {
  68000. var N = b.get("distance") + A, z = Ab(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;
  68001. 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({
  68002. style: Zt(b, {
  68003. text: z,
  68004. x: F,
  68005. y: Q,
  68006. verticalAlign: E < -0.8 ? "top" : E > 0.8 ? "bottom" : "middle",
  68007. align: D < -0.4 ? "left" : D > 0.4 ? "right" : "center"
  68008. }, {
  68009. inheritColor: W
  68010. }),
  68011. silent: !0
  68012. })) : f.add(new gt({
  68013. style: Zt(b, {
  68014. text: z,
  68015. x: F,
  68016. y: Q,
  68017. verticalAlign: "middle",
  68018. align: "center"
  68019. }, {
  68020. inheritColor: W
  68021. }),
  68022. silent: !0,
  68023. originX: F,
  68024. originY: Q,
  68025. rotation: ne
  68026. }));
  68027. }
  68028. if (y.get("show") && R !== _) {
  68029. var N = y.get("distance");
  68030. N = N ? N + c : c;
  68031. for (var ee = 0; ee <= O; ee++) {
  68032. D = Math.cos(C), E = Math.sin(C);
  68033. var oe = new Un({
  68034. shape: {
  68035. x1: D * (p - N) + d,
  68036. y1: E * (p - N) + h,
  68037. x2: D * (p - x - N) + d,
  68038. y2: E * (p - x - N) + h
  68039. },
  68040. silent: !0,
  68041. style: $
  68042. });
  68043. $.stroke === "auto" && oe.setStyle({
  68044. stroke: a((R + ee / O) / _)
  68045. }), f.add(oe), C += w;
  68046. }
  68047. C -= w;
  68048. } else
  68049. C += T;
  68050. }
  68051. }, e.prototype._renderPointer = function(n, r, i, a, o, s, l, u, c) {
  68052. 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];
  68053. function C(w, P) {
  68054. 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), z = _e(N[1], o.r), W = A.get("keepAspect"), F;
  68055. return R ? F = $n(R, V - D / 2, z - E, D, E, null, W) : F = new AVe({
  68056. shape: {
  68057. angle: -Math.PI / 2,
  68058. width: D,
  68059. r: E,
  68060. x: V,
  68061. y: z
  68062. }
  68063. }), F.rotation = -(P + Math.PI / 2), F.x = o.cx, F.y = o.cy, F;
  68064. }
  68065. function T(w, P) {
  68066. var $ = g.get("roundCap"), A = $ ? AO : ri, 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({
  68067. shape: {
  68068. startAngle: s,
  68069. endAngle: P,
  68070. cx: o.cx,
  68071. cy: o.cy,
  68072. clockwise: u,
  68073. r0: R,
  68074. r: N
  68075. }
  68076. });
  68077. return D && (V.z2 = O - y.get(b, w) % O), V;
  68078. }
  68079. (m || v) && (y.diff(d).add(function(w) {
  68080. var P = y.get(b, w);
  68081. if (v) {
  68082. var $ = C(w, s);
  68083. Yt($, {
  68084. rotation: -((isNaN(+P) ? x[0] : Lt(P, S, x, !0)) + Math.PI / 2)
  68085. }, n), f.add($), y.setItemGraphicEl(w, $);
  68086. }
  68087. if (m) {
  68088. var A = T(w, s), D = g.get("clip");
  68089. Yt(A, {
  68090. shape: {
  68091. endAngle: Lt(P, S, x, D)
  68092. }
  68093. }, n), f.add(A), MA(n.seriesIndex, y.dataType, w, A), p[w] = A;
  68094. }
  68095. }).update(function(w, P) {
  68096. var $ = y.get(b, w);
  68097. if (v) {
  68098. var A = d.getItemGraphicEl(P), D = A ? A.rotation : s, E = C(w, D);
  68099. E.rotation = D, Ct(E, {
  68100. rotation: -((isNaN(+$) ? x[0] : Lt($, S, x, !0)) + Math.PI / 2)
  68101. }, n), f.add(E), y.setItemGraphicEl(w, E);
  68102. }
  68103. if (m) {
  68104. var R = h[P], N = R ? R.shape.endAngle : s, V = T(w, N), z = g.get("clip");
  68105. Ct(V, {
  68106. shape: {
  68107. endAngle: Lt($, S, x, z)
  68108. }
  68109. }, n), f.add(V), MA(n.seriesIndex, y.dataType, w, V), p[w] = V;
  68110. }
  68111. }).execute(), y.each(function(w) {
  68112. var P = y.getItemModel(w), $ = P.getModel("emphasis"), A = $.get("focus"), D = $.get("blurScope"), E = $.get("disabled");
  68113. if (v) {
  68114. var R = y.getItemGraphicEl(w), N = y.getItemVisual(w, "style"), V = N.fill;
  68115. if (R instanceof lr) {
  68116. var z = R.style;
  68117. R.useStyle(le({
  68118. image: z.image,
  68119. x: z.x,
  68120. y: z.y,
  68121. width: z.width,
  68122. height: z.height
  68123. }, N));
  68124. } else
  68125. R.useStyle(N), R.type !== "pointer" && R.setColor(V);
  68126. 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);
  68127. }
  68128. if (m) {
  68129. var W = p[w];
  68130. W.useStyle(y.getItemVisual(w, "style")), W.setStyle(P.getModel(["progress", "itemStyle"]).getItemStyle()), W.z2EmphasisLift = 0, Tr(W, P), bn(W, A, D, E);
  68131. }
  68132. }), this._progressEls = p);
  68133. }, e.prototype._renderAnchor = function(n, r) {
  68134. var i = n.getModel("anchor"), a = i.get("show");
  68135. if (a) {
  68136. 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);
  68137. c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c);
  68138. }
  68139. }, e.prototype._renderTitleAndDetail = function(n, r, i, a, o) {
  68140. 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"]);
  68141. l.diff(this._data).add(function(m) {
  68142. h[m] = new gt({
  68143. silent: !0
  68144. }), p[m] = new gt({
  68145. silent: !0
  68146. });
  68147. }).update(function(m, y) {
  68148. h[m] = s._titleEls[y], p[m] = s._detailEls[y];
  68149. }).execute(), l.each(function(m) {
  68150. 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");
  68151. if (S.get("show")) {
  68152. var x = S.get("offsetCenter"), C = o.cx + _e(x[0], o.r), T = o.cy + _e(x[1], o.r), w = h[m];
  68153. w.attr({
  68154. z2: g ? 0 : 2,
  68155. style: Zt(S, {
  68156. x: C,
  68157. y: T,
  68158. text: l.getName(m),
  68159. align: "center",
  68160. verticalAlign: "middle"
  68161. }, {
  68162. inheritColor: O
  68163. })
  68164. }), _.add(w);
  68165. }
  68166. var P = y.getModel("detail");
  68167. if (P.get("show")) {
  68168. 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");
  68169. w.attr({
  68170. z2: g ? 0 : 2,
  68171. style: Zt(P, {
  68172. x: A,
  68173. y: D,
  68174. text: Ab(b, V),
  68175. width: isNaN(E) ? null : E,
  68176. height: isNaN(R) ? null : R,
  68177. align: "center",
  68178. verticalAlign: "middle"
  68179. }, {
  68180. inheritColor: N
  68181. })
  68182. }), dJ(w, {
  68183. normal: P
  68184. }, b, function(W) {
  68185. return Ab(W, V);
  68186. }), v && hJ(w, m, l, n, {
  68187. getFormattedLabel: function(W, F, Q, Z, ne, ee) {
  68188. return Ab(ee ? ee.interpolatedValue : b, V);
  68189. }
  68190. }), _.add(w);
  68191. }
  68192. d.add(_);
  68193. }), this.group.add(d), this._titleEls = h, this._detailEls = p;
  68194. }, e.type = "gauge", e;
  68195. }(zt)
  68196. ), IVe = (
  68197. /** @class */
  68198. function(t) {
  68199. q(e, t);
  68200. function e() {
  68201. var n = t !== null && t.apply(this, arguments) || this;
  68202. return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n;
  68203. }
  68204. return e.prototype.getInitialData = function(n, r) {
  68205. return Pp(this, ["value"]);
  68206. }, e.type = "series.gauge", e.defaultOption = {
  68207. // zlevel: 0,
  68208. z: 2,
  68209. colorBy: "data",
  68210. // 默认全局居中
  68211. center: ["50%", "50%"],
  68212. legendHoverLink: !0,
  68213. radius: "75%",
  68214. startAngle: 225,
  68215. endAngle: -45,
  68216. clockwise: !0,
  68217. // 最小值
  68218. min: 0,
  68219. // 最大值
  68220. max: 100,
  68221. // 分割段数,默认为10
  68222. splitNumber: 10,
  68223. // 坐标轴线
  68224. axisLine: {
  68225. // 默认显示,属性show控制显示与否
  68226. show: !0,
  68227. roundCap: !1,
  68228. lineStyle: {
  68229. color: [[1, "#E6EBF8"]],
  68230. width: 10
  68231. }
  68232. },
  68233. // 坐标轴线
  68234. progress: {
  68235. // 默认显示,属性show控制显示与否
  68236. show: !1,
  68237. overlap: !0,
  68238. width: 10,
  68239. roundCap: !1,
  68240. clip: !0
  68241. },
  68242. // 分隔线
  68243. splitLine: {
  68244. // 默认显示,属性show控制显示与否
  68245. show: !0,
  68246. // 属性length控制线长
  68247. length: 10,
  68248. distance: 10,
  68249. // 属性lineStyle(详见lineStyle)控制线条样式
  68250. lineStyle: {
  68251. color: "#63677A",
  68252. width: 3,
  68253. type: "solid"
  68254. }
  68255. },
  68256. // 坐标轴小标记
  68257. axisTick: {
  68258. // 属性show控制显示与否,默认不显示
  68259. show: !0,
  68260. // 每份split细分多少段
  68261. splitNumber: 5,
  68262. // 属性length控制线长
  68263. length: 6,
  68264. distance: 10,
  68265. // 属性lineStyle控制线条样式
  68266. lineStyle: {
  68267. color: "#63677A",
  68268. width: 1,
  68269. type: "solid"
  68270. }
  68271. },
  68272. axisLabel: {
  68273. show: !0,
  68274. distance: 15,
  68275. // formatter: null,
  68276. color: "#464646",
  68277. fontSize: 12,
  68278. rotate: 0
  68279. },
  68280. pointer: {
  68281. icon: null,
  68282. offsetCenter: [0, 0],
  68283. show: !0,
  68284. showAbove: !0,
  68285. length: "60%",
  68286. width: 6,
  68287. keepAspect: !1
  68288. },
  68289. anchor: {
  68290. show: !1,
  68291. showAbove: !1,
  68292. size: 6,
  68293. icon: "circle",
  68294. offsetCenter: [0, 0],
  68295. keepAspect: !1,
  68296. itemStyle: {
  68297. color: "#fff",
  68298. borderWidth: 0,
  68299. borderColor: "#5470c6"
  68300. }
  68301. },
  68302. title: {
  68303. show: !0,
  68304. // x, y,单位px
  68305. offsetCenter: [0, "20%"],
  68306. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  68307. color: "#464646",
  68308. fontSize: 16,
  68309. valueAnimation: !1
  68310. },
  68311. detail: {
  68312. show: !0,
  68313. backgroundColor: "rgba(0,0,0,0)",
  68314. borderWidth: 0,
  68315. borderColor: "#ccc",
  68316. width: 100,
  68317. height: null,
  68318. padding: [5, 10],
  68319. // x, y,单位px
  68320. offsetCenter: [0, "40%"],
  68321. // formatter: null,
  68322. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  68323. color: "#464646",
  68324. fontSize: 30,
  68325. fontWeight: "bold",
  68326. lineHeight: 30,
  68327. valueAnimation: !1
  68328. }
  68329. }, e;
  68330. }(Ht)
  68331. );
  68332. function DVe(t) {
  68333. t.registerChartView(MVe), t.registerSeriesModel(IVe);
  68334. }
  68335. var RVe = ["itemStyle", "opacity"], kVe = (
  68336. /** @class */
  68337. function(t) {
  68338. q(e, t);
  68339. function e(n, r) {
  68340. var i = t.call(this) || this, a = i, o = new ai(), s = new gt();
  68341. return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(n, r, !0), i;
  68342. }
  68343. return e.prototype.updateData = function(n, r, i) {
  68344. var a = this, o = n.hostModel, s = n.getItemModel(r), l = n.getItemLayout(r), u = s.getModel("emphasis"), c = s.get(RVe);
  68345. c = c ?? 1, i || so(a), a.useStyle(n.getItemVisual(r, "style")), a.style.lineJoin = "round", i ? (a.setShape({
  68346. points: l.points
  68347. }), a.style.opacity = 0, Yt(a, {
  68348. style: {
  68349. opacity: c
  68350. }
  68351. }, o, r)) : Ct(a, {
  68352. style: {
  68353. opacity: c
  68354. },
  68355. shape: {
  68356. points: l.points
  68357. }
  68358. }, o, r), Tr(a, s), this._updateLabel(n, r), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
  68359. }, e.prototype._updateLabel = function(n, r) {
  68360. 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;
  68361. Pr(
  68362. // position will not be used in setLabelStyle
  68363. o,
  68364. er(l),
  68365. {
  68366. labelFetcher: n.hostModel,
  68367. labelDataIndex: r,
  68368. defaultOpacity: f.opacity,
  68369. defaultText: n.getName(r)
  68370. },
  68371. {
  68372. normal: {
  68373. align: c.textAlign,
  68374. verticalAlign: c.verticalAlign
  68375. }
  68376. }
  68377. ), i.setTextConfig({
  68378. local: !0,
  68379. inside: !!c.inside,
  68380. insideStroke: d,
  68381. // insideFill: 'auto',
  68382. outsideFill: d
  68383. });
  68384. var h = c.linePoints;
  68385. a.setShape({
  68386. points: h
  68387. }), i.textGuideLineConfig = {
  68388. anchor: h ? new Ke(h[0][0], h[0][1]) : null
  68389. }, Ct(o, {
  68390. style: {
  68391. x: c.x,
  68392. y: c.y
  68393. }
  68394. }, s, r), o.attr({
  68395. rotation: c.rotation,
  68396. originX: c.x,
  68397. originY: c.y,
  68398. z2: 10
  68399. }), Ak(i, Ek(l), {
  68400. // Default use item visual color
  68401. stroke: d
  68402. });
  68403. }, e;
  68404. }(ii)
  68405. ), LVe = (
  68406. /** @class */
  68407. function(t) {
  68408. q(e, t);
  68409. function e() {
  68410. var n = t !== null && t.apply(this, arguments) || this;
  68411. return n.type = e.type, n.ignoreLabelLineUpdate = !0, n;
  68412. }
  68413. return e.prototype.render = function(n, r, i) {
  68414. var a = n.getData(), o = this._data, s = this.group;
  68415. a.diff(o).add(function(l) {
  68416. var u = new kVe(a, l);
  68417. a.setItemGraphicEl(l, u), s.add(u);
  68418. }).update(function(l, u) {
  68419. var c = o.getItemGraphicEl(u);
  68420. c.updateData(a, l), s.add(c), a.setItemGraphicEl(l, c);
  68421. }).remove(function(l) {
  68422. var u = o.getItemGraphicEl(l);
  68423. wm(u, n, l);
  68424. }).execute(), this._data = a;
  68425. }, e.prototype.remove = function() {
  68426. this.group.removeAll(), this._data = null;
  68427. }, e.prototype.dispose = function() {
  68428. }, e.type = "funnel", e;
  68429. }(zt)
  68430. ), NVe = (
  68431. /** @class */
  68432. function(t) {
  68433. q(e, t);
  68434. function e() {
  68435. var n = t !== null && t.apply(this, arguments) || this;
  68436. return n.type = e.type, n;
  68437. }
  68438. return e.prototype.init = function(n) {
  68439. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
  68440. }, e.prototype.getInitialData = function(n, r) {
  68441. return Pp(this, {
  68442. coordDimensions: ["value"],
  68443. encodeDefaulter: Ue(nk, this)
  68444. });
  68445. }, e.prototype._defaultLabelLine = function(n) {
  68446. gf(n, "labelLine", ["show"]);
  68447. var r = n.labelLine, i = n.emphasis.labelLine;
  68448. r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
  68449. }, e.prototype.getDataParams = function(n) {
  68450. var r = this.getData(), i = t.prototype.getDataParams.call(this, n), a = r.mapDimension("value"), o = r.getSum(a);
  68451. return i.percent = o ? +(r.get(a, n) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i;
  68452. }, e.type = "series.funnel", e.defaultOption = {
  68453. // zlevel: 0, // 一级层叠
  68454. z: 2,
  68455. legendHoverLink: !0,
  68456. colorBy: "data",
  68457. left: 80,
  68458. top: 60,
  68459. right: 80,
  68460. bottom: 60,
  68461. // width: {totalWidth} - left - right,
  68462. // height: {totalHeight} - top - bottom,
  68463. // 默认取数据最小最大值
  68464. // min: 0,
  68465. // max: 100,
  68466. minSize: "0%",
  68467. maxSize: "100%",
  68468. sort: "descending",
  68469. orient: "vertical",
  68470. gap: 0,
  68471. funnelAlign: "center",
  68472. label: {
  68473. show: !0,
  68474. position: "outer"
  68475. // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
  68476. },
  68477. labelLine: {
  68478. show: !0,
  68479. length: 20,
  68480. lineStyle: {
  68481. // color: 各异,
  68482. width: 1
  68483. }
  68484. },
  68485. itemStyle: {
  68486. // color: 各异,
  68487. borderColor: "#fff",
  68488. borderWidth: 1
  68489. },
  68490. emphasis: {
  68491. label: {
  68492. show: !0
  68493. }
  68494. },
  68495. select: {
  68496. itemStyle: {
  68497. borderColor: "#212121"
  68498. }
  68499. }
  68500. }, e;
  68501. }(Ht)
  68502. );
  68503. function BVe(t, e) {
  68504. return Rn(t.getBoxLayoutParams(), {
  68505. width: e.getWidth(),
  68506. height: e.getHeight()
  68507. });
  68508. }
  68509. function zVe(t, e) {
  68510. for (var n = t.mapDimension("value"), r = t.mapArray(n, function(l) {
  68511. return l;
  68512. }), i = [], a = e === "ascending", o = 0, s = t.count(); o < s; o++)
  68513. i[o] = o;
  68514. return Me(e) ? i.sort(e) : e !== "none" && i.sort(function(l, u) {
  68515. return a ? r[l] - r[u] : r[u] - r[l];
  68516. }), i;
  68517. }
  68518. function VVe(t) {
  68519. var e = t.hostModel, n = e.get("orient");
  68520. t.each(function(r) {
  68521. 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;
  68522. if (c)
  68523. 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]];
  68524. else {
  68525. var v = void 0, g = void 0, m = void 0, y = void 0, b = s.get("length");
  68526. 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]];
  68527. }
  68528. l.label = {
  68529. linePoints: p,
  68530. x: d,
  68531. y: h,
  68532. verticalAlign: "middle",
  68533. textAlign: f,
  68534. inside: c
  68535. };
  68536. });
  68537. }
  68538. function FVe(t, e) {
  68539. t.eachSeriesByType("funnel", function(n) {
  68540. var r = n.getData(), i = r.mapDimension("value"), a = n.get("sort"), o = BVe(n, e), s = n.get("orient"), l = o.width, u = o.height, c = zVe(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");
  68541. v == null && (v = Math.min(p[0], 0)), g == null && (g = p[1]);
  68542. 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) {
  68543. if (s === "horizontal") {
  68544. var R = r.get(i, D) || 0, N = Lt(R, [v, g], h, !0), V = void 0;
  68545. switch (m) {
  68546. case "top":
  68547. V = d;
  68548. break;
  68549. case "center":
  68550. V = d + (u - N) / 2;
  68551. break;
  68552. case "bottom":
  68553. V = d + (u - N);
  68554. break;
  68555. }
  68556. return [[E, V], [E, V + N]];
  68557. }
  68558. var z = r.get(i, D) || 0, W = Lt(z, [v, g], h, !0), F;
  68559. switch (m) {
  68560. case "left":
  68561. F = f;
  68562. break;
  68563. case "center":
  68564. F = f + (l - W) / 2;
  68565. break;
  68566. case "right":
  68567. F = f + l - W;
  68568. break;
  68569. }
  68570. return [[F, E], [F + W, E]];
  68571. };
  68572. a === "ascending" && (_ = -_, y = -y, s === "horizontal" ? f += l : d += u, c = c.reverse());
  68573. for (var S = 0; S < c.length; S++) {
  68574. var x = c[S], C = c[S + 1], T = r.getItemModel(x);
  68575. if (s === "horizontal") {
  68576. var w = T.get(["itemStyle", "width"]);
  68577. w == null ? w = _ : (w = _e(w, l), a === "ascending" && (w = -w));
  68578. var P = O(x, f), $ = O(C, f + w);
  68579. f += w + y, r.setItemLayout(x, {
  68580. points: P.concat($.slice().reverse())
  68581. });
  68582. } else {
  68583. var A = T.get(["itemStyle", "height"]);
  68584. A == null ? A = _ : (A = _e(A, u), a === "ascending" && (A = -A));
  68585. var P = O(x, d), $ = O(C, d + A);
  68586. d += A + y, r.setItemLayout(x, {
  68587. points: P.concat($.slice().reverse())
  68588. });
  68589. }
  68590. }
  68591. VVe(r);
  68592. });
  68593. }
  68594. function WVe(t) {
  68595. t.registerChartView(LVe), t.registerSeriesModel(NVe), t.registerLayout(FVe), t.registerProcessor(Y0("funnel"));
  68596. }
  68597. var QVe = 0.3, HVe = (
  68598. /** @class */
  68599. function(t) {
  68600. q(e, t);
  68601. function e() {
  68602. var n = t !== null && t.apply(this, arguments) || this;
  68603. return n.type = e.type, n._dataGroup = new Ve(), n._initialized = !1, n;
  68604. }
  68605. return e.prototype.init = function() {
  68606. this.group.add(this._dataGroup);
  68607. }, e.prototype.render = function(n, r, i, a) {
  68608. this._progressiveEls = null;
  68609. var o = this._dataGroup, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.dimensions, f = rW(n);
  68610. s.diff(l).add(d).update(h).remove(p).execute();
  68611. function d(g) {
  68612. var m = nW(s, o, g, c, u);
  68613. AP(m, s, g, f);
  68614. }
  68615. function h(g, m) {
  68616. var y = l.getItemGraphicEl(m), b = Bne(s, g, c, u);
  68617. s.setItemGraphicEl(g, y), Ct(y, {
  68618. shape: {
  68619. points: b
  68620. }
  68621. }, n, g), so(y), AP(y, s, g, f);
  68622. }
  68623. function p(g) {
  68624. var m = l.getItemGraphicEl(g);
  68625. o.remove(m);
  68626. }
  68627. if (!this._initialized) {
  68628. this._initialized = !0;
  68629. var v = GVe(u, n, function() {
  68630. setTimeout(function() {
  68631. o.removeClipPath();
  68632. });
  68633. });
  68634. o.setClipPath(v);
  68635. }
  68636. this._data = s;
  68637. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  68638. this._initialized = !0, this._data = null, this._dataGroup.removeAll();
  68639. }, e.prototype.incrementalRender = function(n, r, i) {
  68640. for (var a = r.getData(), o = r.coordinateSystem, s = o.dimensions, l = rW(r), u = this._progressiveEls = [], c = n.start; c < n.end; c++) {
  68641. var f = nW(a, this._dataGroup, c, s, o);
  68642. f.incremental = !0, AP(f, a, c, l), u.push(f);
  68643. }
  68644. }, e.prototype.remove = function() {
  68645. this._dataGroup && this._dataGroup.removeAll(), this._data = null;
  68646. }, e.type = "parallel", e;
  68647. }(zt)
  68648. );
  68649. function GVe(t, e, n) {
  68650. var r = t.model, i = t.getRect(), a = new mt({
  68651. shape: {
  68652. x: i.x,
  68653. y: i.y,
  68654. width: i.width,
  68655. height: i.height
  68656. }
  68657. }), o = r.get("layout") === "horizontal" ? "width" : "height";
  68658. return a.setShape(o, 0), Yt(a, {
  68659. shape: {
  68660. width: i.width,
  68661. height: i.height
  68662. }
  68663. }, e, n), a;
  68664. }
  68665. function Bne(t, e, n, r) {
  68666. for (var i = [], a = 0; a < n.length; a++) {
  68667. var o = n[a], s = t.get(t.mapDimension(o), e);
  68668. jVe(s, r.getAxis(o).type) || i.push(r.dataToPoint(s, o));
  68669. }
  68670. return i;
  68671. }
  68672. function nW(t, e, n, r, i) {
  68673. var a = Bne(t, n, r, i), o = new ai({
  68674. shape: {
  68675. points: a
  68676. },
  68677. // silent: true,
  68678. z2: 10
  68679. });
  68680. return e.add(o), t.setItemGraphicEl(n, o), o;
  68681. }
  68682. function rW(t) {
  68683. var e = t.get("smooth", !0);
  68684. return e === !0 && (e = QVe), e = is(e), ou(e) && (e = 0), {
  68685. smooth: e
  68686. };
  68687. }
  68688. function AP(t, e, n, r) {
  68689. t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", r.smooth);
  68690. var i = e.getItemModel(n), a = i.getModel("emphasis");
  68691. Tr(t, i, "lineStyle"), bn(t, a.get("focus"), a.get("blurScope"), a.get("disabled"));
  68692. }
  68693. function jVe(t, e) {
  68694. return e === "category" ? t == null : t == null || isNaN(t);
  68695. }
  68696. var ZVe = (
  68697. /** @class */
  68698. function(t) {
  68699. q(e, t);
  68700. function e() {
  68701. var n = t !== null && t.apply(this, arguments) || this;
  68702. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
  68703. }
  68704. return e.prototype.getInitialData = function(n, r) {
  68705. return us(null, this, {
  68706. useEncodeDefaulter: xe(UVe, null, this)
  68707. });
  68708. }, e.prototype.getRawIndicesByActiveState = function(n) {
  68709. var r = this.coordinateSystem, i = this.getData(), a = [];
  68710. return r.eachActiveState(i, function(o, s) {
  68711. n === o && a.push(i.getRawIndex(s));
  68712. }), a;
  68713. }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
  68714. // zlevel: 0,
  68715. z: 2,
  68716. coordinateSystem: "parallel",
  68717. parallelIndex: 0,
  68718. label: {
  68719. show: !1
  68720. },
  68721. inactiveOpacity: 0.05,
  68722. activeOpacity: 1,
  68723. lineStyle: {
  68724. width: 1,
  68725. opacity: 0.45,
  68726. type: "solid"
  68727. },
  68728. emphasis: {
  68729. label: {
  68730. show: !1
  68731. }
  68732. },
  68733. progressive: 500,
  68734. smooth: !1,
  68735. animationEasing: "linear"
  68736. }, e;
  68737. }(Ht)
  68738. );
  68739. function UVe(t) {
  68740. var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  68741. if (e) {
  68742. var n = {};
  68743. return k(e.dimensions, function(r) {
  68744. var i = XVe(r);
  68745. n[r] = i;
  68746. }), n;
  68747. }
  68748. }
  68749. function XVe(t) {
  68750. return +t.replace("dim", "");
  68751. }
  68752. var YVe = ["lineStyle", "opacity"], qVe = {
  68753. seriesType: "parallel",
  68754. reset: function(t, e) {
  68755. var n = t.coordinateSystem, r = {
  68756. normal: t.get(["lineStyle", "opacity"]),
  68757. active: t.get("activeOpacity"),
  68758. inactive: t.get("inactiveOpacity")
  68759. };
  68760. return {
  68761. progress: function(i, a) {
  68762. n.eachActiveState(a, function(o, s) {
  68763. var l = r[o];
  68764. if (o === "normal" && a.hasItemOption) {
  68765. var u = a.getItemModel(s).get(YVe, !0);
  68766. u != null && (l = u);
  68767. }
  68768. var c = a.ensureUniqueItemVisual(s, "style");
  68769. c.opacity = l;
  68770. }, i.start, i.end);
  68771. }
  68772. };
  68773. }
  68774. };
  68775. function KVe(t) {
  68776. JVe(t), eFe(t);
  68777. }
  68778. function JVe(t) {
  68779. if (!t.parallel) {
  68780. var e = !1;
  68781. k(t.series, function(n) {
  68782. n && n.type === "parallel" && (e = !0);
  68783. }), e && (t.parallel = [{}]);
  68784. }
  68785. }
  68786. function eFe(t) {
  68787. var e = Qt(t.parallelAxis);
  68788. k(e, function(n) {
  68789. if (Ie(n)) {
  68790. var r = n.parallelIndex || 0, i = Qt(t.parallel)[r];
  68791. i && i.parallelAxisDefault && qe(n, i.parallelAxisDefault, !1);
  68792. }
  68793. });
  68794. }
  68795. var tFe = 5, nFe = (
  68796. /** @class */
  68797. function(t) {
  68798. q(e, t);
  68799. function e() {
  68800. var n = t !== null && t.apply(this, arguments) || this;
  68801. return n.type = e.type, n;
  68802. }
  68803. return e.prototype.render = function(n, r, i) {
  68804. this._model = n, this._api = i, this._handlers || (this._handlers = {}, k(rFe, function(a, o) {
  68805. i.getZr().on(o, this._handlers[o] = xe(a, this));
  68806. }, this)), Sp(this, "_throttledDispatchExpand", n.get("axisExpandRate"), "fixRate");
  68807. }, e.prototype.dispose = function(n, r) {
  68808. $m(this, "_throttledDispatchExpand"), k(this._handlers, function(i, a) {
  68809. r.getZr().off(a, i);
  68810. }), this._handlers = null;
  68811. }, e.prototype._throttledDispatchExpand = function(n) {
  68812. this._dispatchExpand(n);
  68813. }, e.prototype._dispatchExpand = function(n) {
  68814. n && this._api.dispatchAction(le({
  68815. type: "parallelAxisExpand"
  68816. }, n));
  68817. }, e.type = "parallel", e;
  68818. }(Xt)
  68819. ), rFe = {
  68820. mousedown: function(t) {
  68821. EP(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]);
  68822. },
  68823. mouseup: function(t) {
  68824. var e = this._mouseDownPoint;
  68825. if (EP(this, "click") && e) {
  68826. var n = [t.offsetX, t.offsetY], r = Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2);
  68827. if (r > tFe)
  68828. return;
  68829. var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  68830. i.behavior !== "none" && this._dispatchExpand({
  68831. axisExpandWindow: i.axisExpandWindow
  68832. });
  68833. }
  68834. this._mouseDownPoint = null;
  68835. },
  68836. mousemove: function(t) {
  68837. if (!(this._mouseDownPoint || !EP(this, "mousemove"))) {
  68838. var e = this._model, n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]), r = n.behavior;
  68839. r === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(r === "none" ? null : {
  68840. axisExpandWindow: n.axisExpandWindow,
  68841. // Jumping uses animation, and sliding suppresses animation.
  68842. animation: r === "jump" ? null : {
  68843. duration: 0
  68844. // Disable animation.
  68845. }
  68846. });
  68847. }
  68848. }
  68849. };
  68850. function EP(t, e) {
  68851. var n = t._model;
  68852. return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e;
  68853. }
  68854. var iFe = (
  68855. /** @class */
  68856. function(t) {
  68857. q(e, t);
  68858. function e() {
  68859. var n = t !== null && t.apply(this, arguments) || this;
  68860. return n.type = e.type, n;
  68861. }
  68862. return e.prototype.init = function() {
  68863. t.prototype.init.apply(this, arguments), this.mergeOption({});
  68864. }, e.prototype.mergeOption = function(n) {
  68865. var r = this.option;
  68866. n && qe(r, n, !0), this._initDimensions();
  68867. }, e.prototype.contains = function(n, r) {
  68868. var i = n.get("parallelIndex");
  68869. return i != null && r.getComponent("parallel", i) === this;
  68870. }, e.prototype.setAxisExpand = function(n) {
  68871. k(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(r) {
  68872. n.hasOwnProperty(r) && (this.option[r] = n[r]);
  68873. }, this);
  68874. }, e.prototype._initDimensions = function() {
  68875. var n = this.dimensions = [], r = this.parallelAxisIndex = [], i = Nt(this.ecModel.queryComponents({
  68876. mainType: "parallelAxis"
  68877. }), function(a) {
  68878. return (a.get("parallelIndex") || 0) === this.componentIndex;
  68879. }, this);
  68880. k(i, function(a) {
  68881. n.push("dim" + a.get("dim")), r.push(a.componentIndex);
  68882. });
  68883. }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
  68884. // zlevel: 0,
  68885. z: 0,
  68886. left: 80,
  68887. top: 60,
  68888. right: 80,
  68889. bottom: 60,
  68890. // width: {totalWidth} - left - right,
  68891. // height: {totalHeight} - top - bottom,
  68892. layout: "horizontal",
  68893. // FIXME
  68894. // naming?
  68895. axisExpandable: !1,
  68896. axisExpandCenter: null,
  68897. axisExpandCount: 0,
  68898. axisExpandWidth: 50,
  68899. axisExpandRate: 17,
  68900. axisExpandDebounce: 50,
  68901. // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
  68902. // Do not doc to user until necessary.
  68903. axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
  68904. axisExpandTriggerOn: "click",
  68905. parallelAxisDefault: null
  68906. }, e;
  68907. }(rt)
  68908. ), aFe = (
  68909. /** @class */
  68910. function(t) {
  68911. q(e, t);
  68912. function e(n, r, i, a, o) {
  68913. var s = t.call(this, n, r, i) || this;
  68914. return s.type = a || "value", s.axisIndex = o, s;
  68915. }
  68916. return e.prototype.isHorizontal = function() {
  68917. return this.coordinateSystem.getModel().get("layout") !== "horizontal";
  68918. }, e;
  68919. }(Ba)
  68920. );
  68921. function Qf(t, e, n, r, i, a) {
  68922. t = t || 0;
  68923. var o = n[1] - n[0];
  68924. if (i != null && (i = md(i, [0, o])), a != null && (a = Math.max(a, i ?? 0)), r === "all") {
  68925. var s = Math.abs(e[1] - e[0]);
  68926. s = md(s, [0, o]), i = a = md(s, [i, a]), r = 0;
  68927. }
  68928. e[0] = md(e[0], n), e[1] = md(e[1], n);
  68929. var l = MP(e, r);
  68930. e[r] += t;
  68931. var u = i || 0, c = n.slice();
  68932. l.sign < 0 ? c[0] += u : c[1] -= u, e[r] = md(e[r], c);
  68933. var f;
  68934. return f = MP(e, r), i != null && (f.sign !== l.sign || f.span < i) && (e[1 - r] = e[r] + l.sign * i), f = MP(e, r), a != null && f.span > a && (e[1 - r] = e[r] + f.sign * a), e;
  68935. }
  68936. function MP(t, e) {
  68937. var n = t[e] - t[1 - e];
  68938. return {
  68939. span: Math.abs(n),
  68940. sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  68941. };
  68942. }
  68943. function md(t, e) {
  68944. return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, t));
  68945. }
  68946. var IP = k, zne = Math.min, Vne = Math.max, iW = Math.floor, oFe = Math.ceil, aW = mn, sFe = Math.PI, lFe = (
  68947. /** @class */
  68948. function() {
  68949. function t(e, n, r) {
  68950. this.type = "parallel", this._axesMap = Pe(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, n, r);
  68951. }
  68952. return t.prototype._init = function(e, n, r) {
  68953. var i = e.dimensions, a = e.parallelAxisIndex;
  68954. IP(i, function(o, s) {
  68955. var l = a[s], u = n.getComponent("parallelAxis", l), c = this._axesMap.set(o, new aFe(o, G0(u), [0, 0], u.get("type"), l)), f = c.type === "category";
  68956. c.onBand = f && u.get("boundaryGap"), c.inverse = u.get("inverse"), u.axis = c, c.model = u, c.coordinateSystem = u.coordinateSystem = this;
  68957. }, this);
  68958. }, t.prototype.update = function(e, n) {
  68959. this._updateAxesFromSeries(this._model, e);
  68960. }, t.prototype.containPoint = function(e) {
  68961. var n = this._makeLayoutInfo(), r = n.axisBase, i = n.layoutBase, a = n.pixelDimIndex, o = e[1 - a], s = e[a];
  68962. return o >= r && o <= r + n.axisLength && s >= i && s <= i + n.layoutLength;
  68963. }, t.prototype.getModel = function() {
  68964. return this._model;
  68965. }, t.prototype._updateAxesFromSeries = function(e, n) {
  68966. n.eachSeries(function(r) {
  68967. if (e.contains(r, n)) {
  68968. var i = r.getData();
  68969. IP(this.dimensions, function(a) {
  68970. var o = this._axesMap.get(a);
  68971. o.scale.unionExtentFromData(i, i.mapDimension(a)), Of(o.scale, o.model);
  68972. }, this);
  68973. }
  68974. }, this);
  68975. }, t.prototype.resize = function(e, n) {
  68976. this._rect = Rn(e.getBoxLayoutParams(), {
  68977. width: n.getWidth(),
  68978. height: n.getHeight()
  68979. }), this._layoutAxes();
  68980. }, t.prototype.getRect = function() {
  68981. return this._rect;
  68982. }, t.prototype._makeLayoutInfo = function() {
  68983. 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 = Eb(e.get("axisExpandWidth"), l), f = Eb(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;
  68984. if (h)
  68985. p = Eb(h[1] - h[0], l), h[1] = h[0] + p;
  68986. else {
  68987. p = Eb(c * (f - 1), l);
  68988. var v = e.get("axisExpandCenter") || iW(u / 2);
  68989. h = [c * v - p / 2], h[1] = h[0] + p;
  68990. }
  68991. var g = (s - p) / (u - f);
  68992. g < 3 && (g = 0);
  68993. var m = [iW(aW(h[0] / c, 1)) + 1, oFe(aW(h[1] / c, 1)) - 1], y = g / c * h[0];
  68994. return {
  68995. layout: a,
  68996. pixelDimIndex: o,
  68997. layoutBase: n[r[o]],
  68998. layoutLength: s,
  68999. axisBase: n[r[1 - o]],
  69000. axisLength: n[i[1 - o]],
  69001. axisExpandable: d,
  69002. axisExpandWidth: c,
  69003. axisCollapseWidth: g,
  69004. axisExpandWindow: h,
  69005. axisCount: u,
  69006. winInnerIndices: m,
  69007. axisExpandWindow0Pos: y
  69008. };
  69009. }, t.prototype._layoutAxes = function() {
  69010. var e = this._rect, n = this._axesMap, r = this.dimensions, i = this._makeLayoutInfo(), a = i.layout;
  69011. n.each(function(o) {
  69012. var s = [0, i.axisLength], l = o.inverse ? 1 : 0;
  69013. o.setExtent(s[l], s[1 - l]);
  69014. }), IP(r, function(o, s) {
  69015. var l = (i.axisExpandable ? cFe : uFe)(s, i), u = {
  69016. horizontal: {
  69017. x: l.position,
  69018. y: i.axisLength
  69019. },
  69020. vertical: {
  69021. x: 0,
  69022. y: l.position
  69023. }
  69024. }, c = {
  69025. horizontal: sFe / 2,
  69026. vertical: 0
  69027. }, f = [u[a].x + e.x, u[a].y + e.y], d = c[a], h = Si();
  69028. Cu(h, h, d), ao(h, h, f), this._axesLayout[o] = {
  69029. position: f,
  69030. rotation: d,
  69031. transform: h,
  69032. axisNameAvailableWidth: l.axisNameAvailableWidth,
  69033. axisLabelShow: l.axisLabelShow,
  69034. nameTruncateMaxWidth: l.nameTruncateMaxWidth,
  69035. tickDirection: 1,
  69036. labelDirection: 1
  69037. };
  69038. }, this);
  69039. }, t.prototype.getAxis = function(e) {
  69040. return this._axesMap.get(e);
  69041. }, t.prototype.dataToPoint = function(e, n) {
  69042. return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(e), n);
  69043. }, t.prototype.eachActiveState = function(e, n, r, i) {
  69044. r == null && (r = 0), i == null && (i = e.count());
  69045. var a = this._axesMap, o = this.dimensions, s = [], l = [];
  69046. k(o, function(g) {
  69047. s.push(e.mapDimension(g)), l.push(a.get(g).model);
  69048. });
  69049. for (var u = this.hasAxisBrushed(), c = r; c < i; c++) {
  69050. var f = void 0;
  69051. if (!u)
  69052. f = "normal";
  69053. else {
  69054. f = "active";
  69055. for (var d = e.getValues(s, c), h = 0, p = o.length; h < p; h++) {
  69056. var v = l[h].getActiveState(d[h]);
  69057. if (v === "inactive") {
  69058. f = "inactive";
  69059. break;
  69060. }
  69061. }
  69062. }
  69063. n(f, c);
  69064. }
  69065. }, t.prototype.hasAxisBrushed = function() {
  69066. for (var e = this.dimensions, n = this._axesMap, r = !1, i = 0, a = e.length; i < a; i++)
  69067. n.get(e[i]).model.getActiveState() !== "normal" && (r = !0);
  69068. return r;
  69069. }, t.prototype.axisCoordToPoint = function(e, n) {
  69070. var r = this._axesLayout[n];
  69071. return to([e, 0], r.transform);
  69072. }, t.prototype.getAxisLayout = function(e) {
  69073. return Le(this._axesLayout[e]);
  69074. }, t.prototype.getSlidedAxisExpandWindow = function(e) {
  69075. var n = this._makeLayoutInfo(), r = n.pixelDimIndex, i = n.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, n.axisExpandWidth * (n.axisCount - 1)];
  69076. if (!this.containPoint(e))
  69077. return {
  69078. behavior: "none",
  69079. axisExpandWindow: i
  69080. };
  69081. var s = e[r] - n.layoutBase - n.axisExpandWindow0Pos, l, u = "slide", c = n.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), d = f[0] != null;
  69082. if (c)
  69083. 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 ? Qf(l, i, o, "all") : u = "none";
  69084. else {
  69085. var h = i[1] - i[0], p = o[1] * s / h;
  69086. i = [Vne(0, p - h / 2)], i[1] = zne(o[1], i[0] + h), i[0] = i[1] - h;
  69087. }
  69088. return {
  69089. axisExpandWindow: i,
  69090. behavior: u
  69091. };
  69092. }, t;
  69093. }()
  69094. );
  69095. function Eb(t, e) {
  69096. return zne(Vne(t, e[0]), e[1]);
  69097. }
  69098. function uFe(t, e) {
  69099. var n = e.layoutLength / (e.axisCount - 1);
  69100. return {
  69101. position: n * t,
  69102. axisNameAvailableWidth: n,
  69103. axisLabelShow: !0
  69104. };
  69105. }
  69106. function cFe(t, e) {
  69107. var n = e.layoutLength, r = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, l = a, u = !1, c;
  69108. 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), {
  69109. position: s,
  69110. axisNameAvailableWidth: l,
  69111. axisLabelShow: u,
  69112. nameTruncateMaxWidth: c
  69113. };
  69114. }
  69115. function fFe(t, e) {
  69116. var n = [];
  69117. return t.eachComponent("parallel", function(r, i) {
  69118. var a = new lFe(r, t, e);
  69119. a.name = "parallel_" + i, a.resize(r, e), r.coordinateSystem = a, a.model = r, n.push(a);
  69120. }), t.eachSeries(function(r) {
  69121. if (r.get("coordinateSystem") === "parallel") {
  69122. var i = r.getReferringComponents("parallel", Dn).models[0];
  69123. r.coordinateSystem = i.coordinateSystem;
  69124. }
  69125. }), n;
  69126. }
  69127. var dFe = {
  69128. create: fFe
  69129. }, SE = (
  69130. /** @class */
  69131. function(t) {
  69132. q(e, t);
  69133. function e() {
  69134. var n = t !== null && t.apply(this, arguments) || this;
  69135. return n.type = e.type, n.activeIntervals = [], n;
  69136. }
  69137. return e.prototype.getAreaSelectStyle = function() {
  69138. return yf([
  69139. ["fill", "color"],
  69140. ["lineWidth", "borderWidth"],
  69141. ["stroke", "borderColor"],
  69142. ["width", "width"],
  69143. ["opacity", "opacity"]
  69144. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  69145. // So do not transfer decal directly.
  69146. ])(this.getModel("areaSelectStyle"));
  69147. }, e.prototype.setActiveIntervals = function(n) {
  69148. var r = this.activeIntervals = Le(n);
  69149. if (r)
  69150. for (var i = r.length - 1; i >= 0; i--)
  69151. Vi(r[i]);
  69152. }, e.prototype.getActiveState = function(n) {
  69153. var r = this.activeIntervals;
  69154. if (!r.length)
  69155. return "normal";
  69156. if (n == null || isNaN(+n))
  69157. return "inactive";
  69158. if (r.length === 1) {
  69159. var i = r[0];
  69160. if (i[0] <= n && n <= i[1])
  69161. return "active";
  69162. } else
  69163. for (var a = 0, o = r.length; a < o; a++)
  69164. if (r[a][0] <= n && n <= r[a][1])
  69165. return "active";
  69166. return "inactive";
  69167. }, e;
  69168. }(rt)
  69169. );
  69170. xn(SE, Tp);
  69171. var Sf = !0, Vm = Math.min, Hh = Math.max, hFe = Math.pow, pFe = 1e4, vFe = 6, gFe = 6, oW = "globalPan", mFe = {
  69172. w: [0, 0],
  69173. e: [0, 1],
  69174. n: [1, 0],
  69175. s: [1, 1]
  69176. }, yFe = {
  69177. w: "ew",
  69178. e: "ew",
  69179. n: "ns",
  69180. s: "ns",
  69181. ne: "nesw",
  69182. sw: "nesw",
  69183. nw: "nwse",
  69184. se: "nwse"
  69185. }, sW = {
  69186. brushStyle: {
  69187. lineWidth: 2,
  69188. stroke: "rgba(210,219,238,0.3)",
  69189. fill: "#D2DBEE"
  69190. },
  69191. transformable: !0,
  69192. brushMode: "single",
  69193. removeOnClick: !1
  69194. }, bFe = 0, Jk = (
  69195. /** @class */
  69196. function(t) {
  69197. q(e, t);
  69198. function e(n) {
  69199. var r = t.call(this) || this;
  69200. return r._track = [], r._covers = [], r._handlers = {}, process.env.NODE_ENV !== "production" && ke(n), r._zr = n, r.group = new Ve(), r._uid = "brushController_" + bFe++, k(TFe, function(i, a) {
  69201. this._handlers[a] = xe(i, this);
  69202. }, r), r;
  69203. }
  69204. return e.prototype.enableBrush = function(n) {
  69205. return process.env.NODE_ENV !== "production" && ke(this._mounted), this._brushType && this._doDisableBrush(), n.brushType && this._doEnableBrush(n), this;
  69206. }, e.prototype._doEnableBrush = function(n) {
  69207. var r = this._zr;
  69208. this._enableGlobalPan || uBe(r, oW, this._uid), k(this._handlers, function(i, a) {
  69209. r.on(a, i);
  69210. }), this._brushType = n.brushType, this._brushOption = qe(Le(sW), n, !0);
  69211. }, e.prototype._doDisableBrush = function() {
  69212. var n = this._zr;
  69213. cBe(n, oW, this._uid), k(this._handlers, function(r, i) {
  69214. n.off(i, r);
  69215. }), this._brushType = this._brushOption = null;
  69216. }, e.prototype.setPanels = function(n) {
  69217. if (n && n.length) {
  69218. var r = this._panels = {};
  69219. k(n, function(i) {
  69220. r[i.panelId] = Le(i);
  69221. });
  69222. } else
  69223. this._panels = null;
  69224. return this;
  69225. }, e.prototype.mount = function(n) {
  69226. n = n || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = n.enableGlobalPan;
  69227. var r = this.group;
  69228. return this._zr.add(r), r.attr({
  69229. x: n.x || 0,
  69230. y: n.y || 0,
  69231. rotation: n.rotation || 0,
  69232. scaleX: n.scaleX || 1,
  69233. scaleY: n.scaleY || 1
  69234. }), this._transform = r.getLocalTransform(), this;
  69235. }, e.prototype.updateCovers = function(n) {
  69236. process.env.NODE_ENV !== "production" && ke(this._mounted), n = ce(n, function(d) {
  69237. return qe(Le(sW), d, !0);
  69238. });
  69239. var r = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover;
  69240. return new Us(i, n, u, l).add(c).update(c).remove(f).execute(), this;
  69241. function l(d, h) {
  69242. return (d.id != null ? d.id : r + h) + "-" + d.brushType;
  69243. }
  69244. function u(d, h) {
  69245. return l(d.__brushOption, h);
  69246. }
  69247. function c(d, h) {
  69248. var p = n[d];
  69249. if (h != null && i[h] === s)
  69250. a[d] = i[h];
  69251. else {
  69252. var v = a[d] = h != null ? (i[h].__brushOption = p, i[h]) : Wne(o, Fne(o, p));
  69253. eL(o, v);
  69254. }
  69255. }
  69256. function f(d) {
  69257. i[d] !== s && o.group.remove(i[d]);
  69258. }
  69259. }, e.prototype.unmount = function() {
  69260. if (!(process.env.NODE_ENV !== "production" && !this._mounted))
  69261. return this.enableBrush(!1), xE(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
  69262. }, e.prototype.dispose = function() {
  69263. this.unmount(), this.off();
  69264. }, e;
  69265. }(Ra)
  69266. );
  69267. function Fne(t, e) {
  69268. var n = Ow[e.brushType].createCover(t, e);
  69269. return n.__brushOption = e, Hne(n, e), t.group.add(n), n;
  69270. }
  69271. function Wne(t, e) {
  69272. var n = tL(e);
  69273. return n.endCreating && (n.endCreating(t, e), Hne(e, e.__brushOption)), e;
  69274. }
  69275. function Qne(t, e) {
  69276. var n = e.__brushOption;
  69277. tL(e).updateCoverShape(t, e, n.range, n);
  69278. }
  69279. function Hne(t, e) {
  69280. var n = e.z;
  69281. n == null && (n = pFe), t.traverse(function(r) {
  69282. r.z = n, r.z2 = n;
  69283. });
  69284. }
  69285. function eL(t, e) {
  69286. tL(e).updateCommon(t, e), Qne(t, e);
  69287. }
  69288. function tL(t) {
  69289. return Ow[t.__brushOption.brushType];
  69290. }
  69291. function nL(t, e, n) {
  69292. var r = t._panels;
  69293. if (!r)
  69294. return Sf;
  69295. var i, a = t._transform;
  69296. return k(r, function(o) {
  69297. o.isTargetByCursor(e, n, a) && (i = o);
  69298. }), i;
  69299. }
  69300. function Gne(t, e) {
  69301. var n = t._panels;
  69302. if (!n)
  69303. return Sf;
  69304. var r = e.__brushOption.panelId;
  69305. return r != null ? n[r] : Sf;
  69306. }
  69307. function xE(t) {
  69308. var e = t._covers, n = e.length;
  69309. return k(e, function(r) {
  69310. t.group.remove(r);
  69311. }, t), e.length = 0, !!n;
  69312. }
  69313. function xf(t, e) {
  69314. var n = ce(t._covers, function(r) {
  69315. var i = r.__brushOption, a = Le(i.range);
  69316. return {
  69317. brushType: i.brushType,
  69318. panelId: i.panelId,
  69319. range: a
  69320. };
  69321. });
  69322. t.trigger("brush", {
  69323. areas: n,
  69324. isEnd: !!e.isEnd,
  69325. removeOnClick: !!e.removeOnClick
  69326. });
  69327. }
  69328. function _Fe(t) {
  69329. var e = t._track;
  69330. if (!e.length)
  69331. return !1;
  69332. var n = e[e.length - 1], r = e[0], i = n[0] - r[0], a = n[1] - r[1], o = hFe(i * i + a * a, 0.5);
  69333. return o > vFe;
  69334. }
  69335. function jne(t) {
  69336. var e = t.length - 1;
  69337. return e < 0 && (e = 0), [t[0], t[e]];
  69338. }
  69339. function Zne(t, e, n, r) {
  69340. var i = new Ve();
  69341. return i.add(new mt({
  69342. name: "main",
  69343. style: rL(n),
  69344. silent: !0,
  69345. draggable: !0,
  69346. cursor: "move",
  69347. drift: Ue(lW, t, e, i, ["n", "s", "w", "e"]),
  69348. ondragend: Ue(xf, e, {
  69349. isEnd: !0
  69350. })
  69351. })), k(r, function(a) {
  69352. i.add(new mt({
  69353. name: a.join(""),
  69354. style: {
  69355. opacity: 0
  69356. },
  69357. draggable: !0,
  69358. silent: !0,
  69359. invisible: !0,
  69360. drift: Ue(lW, t, e, i, a),
  69361. ondragend: Ue(xf, e, {
  69362. isEnd: !0
  69363. })
  69364. }));
  69365. }), i;
  69366. }
  69367. function Une(t, e, n, r) {
  69368. var i = r.brushStyle.lineWidth || 0, a = Hh(i, gFe), 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;
  69369. ys(t, e, "main", o, s, p, v), r.transformable && (ys(t, e, "w", l, u, a, m), ys(t, e, "e", d, u, a, m), ys(t, e, "n", l, u, g, a), ys(t, e, "s", l, h, g, a), ys(t, e, "nw", l, u, a, a), ys(t, e, "ne", d, u, a, a), ys(t, e, "sw", l, h, a, a), ys(t, e, "se", d, h, a, a));
  69370. }
  69371. function wE(t, e) {
  69372. var n = e.__brushOption, r = n.transformable, i = e.childAt(0);
  69373. i.useStyle(rL(n)), i.attr({
  69374. silent: !r,
  69375. cursor: r ? "move" : "default"
  69376. }), k([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) {
  69377. var o = e.childOfName(a.join("")), s = a.length === 1 ? CE(t, a[0]) : SFe(t, a);
  69378. o && o.attr({
  69379. silent: !r,
  69380. invisible: !r,
  69381. cursor: r ? yFe[s] + "-resize" : null
  69382. });
  69383. });
  69384. }
  69385. function ys(t, e, n, r, i, a, o) {
  69386. var s = e.childOfName(n);
  69387. s && s.setShape(wFe(iL(t, e, [[r, i], [r + a, i + o]])));
  69388. }
  69389. function rL(t) {
  69390. return Re({
  69391. strokeNoScale: !0
  69392. }, t.brushStyle);
  69393. }
  69394. function Xne(t, e, n, r) {
  69395. var i = [Vm(t, n), Vm(e, r)], a = [Hh(t, n), Hh(e, r)];
  69396. return [
  69397. [i[0], a[0]],
  69398. [i[1], a[1]]
  69399. // y range
  69400. ];
  69401. }
  69402. function OFe(t) {
  69403. return ql(t.group);
  69404. }
  69405. function CE(t, e) {
  69406. var n = {
  69407. w: "left",
  69408. e: "right",
  69409. n: "top",
  69410. s: "bottom"
  69411. }, r = {
  69412. left: "w",
  69413. right: "e",
  69414. top: "n",
  69415. bottom: "s"
  69416. }, i = Jx(n[e], OFe(t));
  69417. return r[i];
  69418. }
  69419. function SFe(t, e) {
  69420. var n = [CE(t, e[0]), CE(t, e[1])];
  69421. return (n[0] === "e" || n[0] === "w") && n.reverse(), n.join("");
  69422. }
  69423. function lW(t, e, n, r, i, a) {
  69424. var o = n.__brushOption, s = t.toRectRange(o.range), l = Yne(e, i, a);
  69425. k(r, function(u) {
  69426. var c = mFe[u];
  69427. s[c[0]][c[1]] += l[c[0]];
  69428. }), o.range = t.fromRectRange(Xne(s[0][0], s[1][0], s[0][1], s[1][1])), eL(e, n), xf(e, {
  69429. isEnd: !1
  69430. });
  69431. }
  69432. function xFe(t, e, n, r) {
  69433. var i = e.__brushOption.range, a = Yne(t, n, r);
  69434. k(i, function(o) {
  69435. o[0] += a[0], o[1] += a[1];
  69436. }), eL(t, e), xf(t, {
  69437. isEnd: !1
  69438. });
  69439. }
  69440. function Yne(t, e, n) {
  69441. var r = t.group, i = r.transformCoordToLocal(e, n), a = r.transformCoordToLocal(0, 0);
  69442. return [i[0] - a[0], i[1] - a[1]];
  69443. }
  69444. function iL(t, e, n) {
  69445. var r = Gne(t, e);
  69446. return r && r !== Sf ? r.clipPath(n, t._transform) : Le(n);
  69447. }
  69448. function wFe(t) {
  69449. var e = Vm(t[0][0], t[1][0]), n = Vm(t[0][1], t[1][1]), r = Hh(t[0][0], t[1][0]), i = Hh(t[0][1], t[1][1]);
  69450. return {
  69451. x: e,
  69452. y: n,
  69453. width: r - e,
  69454. height: i - n
  69455. };
  69456. }
  69457. function CFe(t, e, n) {
  69458. if (
  69459. // Check active
  69460. !(!t._brushType || PFe(t, e.offsetX, e.offsetY))
  69461. ) {
  69462. var r = t._zr, i = t._covers, a = nL(t, e, n);
  69463. if (!t._dragging)
  69464. for (var o = 0; o < i.length; o++) {
  69465. var s = i[o].__brushOption;
  69466. if (a && (a === Sf || s.panelId === a.panelId) && Ow[s.brushType].contain(i[o], n[0], n[1]))
  69467. return;
  69468. }
  69469. a && r.setCursorStyle("crosshair");
  69470. }
  69471. }
  69472. function TE(t) {
  69473. var e = t.event;
  69474. e.preventDefault && e.preventDefault();
  69475. }
  69476. function PE(t, e, n) {
  69477. return t.childOfName("main").contain(e, n);
  69478. }
  69479. function qne(t, e, n, r) {
  69480. var i = t._creatingCover, a = t._creatingPanel, o = t._brushOption, s;
  69481. if (t._track.push(n.slice()), _Fe(t) || i) {
  69482. if (a && !i) {
  69483. o.brushMode === "single" && xE(t);
  69484. var l = Le(o);
  69485. l.brushType = uW(l.brushType, a), l.panelId = a === Sf ? null : a.panelId, i = t._creatingCover = Fne(t, l), t._covers.push(i);
  69486. }
  69487. if (i) {
  69488. var u = Ow[uW(t._brushType, a)], c = i.__brushOption;
  69489. c.range = u.getCreatingRange(iL(t, i, t._track)), r && (Wne(t, i), u.updateCommon(t, i)), Qne(t, i), s = {
  69490. isEnd: r
  69491. };
  69492. }
  69493. } else r && o.brushMode === "single" && o.removeOnClick && nL(t, e, n) && xE(t) && (s = {
  69494. isEnd: r,
  69495. removeOnClick: !0
  69496. });
  69497. return s;
  69498. }
  69499. function uW(t, e) {
  69500. return t === "auto" ? (process.env.NODE_ENV !== "production" && ke(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : t;
  69501. }
  69502. var TFe = {
  69503. mousedown: function(t) {
  69504. if (this._dragging)
  69505. cW(this, t);
  69506. else if (!t.target || !t.target.draggable) {
  69507. TE(t);
  69508. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  69509. this._creatingCover = null;
  69510. var n = this._creatingPanel = nL(this, t, e);
  69511. n && (this._dragging = !0, this._track = [e.slice()]);
  69512. }
  69513. },
  69514. mousemove: function(t) {
  69515. var e = t.offsetX, n = t.offsetY, r = this.group.transformCoordToLocal(e, n);
  69516. if (CFe(this, t, r), this._dragging) {
  69517. TE(t);
  69518. var i = qne(this, t, r, !1);
  69519. i && xf(this, i);
  69520. }
  69521. },
  69522. mouseup: function(t) {
  69523. cW(this, t);
  69524. }
  69525. };
  69526. function cW(t, e) {
  69527. if (t._dragging) {
  69528. TE(e);
  69529. var n = e.offsetX, r = e.offsetY, i = t.group.transformCoordToLocal(n, r), a = qne(t, e, i, !0);
  69530. t._dragging = !1, t._track = [], t._creatingCover = null, a && xf(t, a);
  69531. }
  69532. }
  69533. function PFe(t, e, n) {
  69534. var r = t._zr;
  69535. return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
  69536. }
  69537. var Ow = {
  69538. lineX: fW(0),
  69539. lineY: fW(1),
  69540. rect: {
  69541. createCover: function(t, e) {
  69542. function n(r) {
  69543. return r;
  69544. }
  69545. return Zne({
  69546. toRectRange: n,
  69547. fromRectRange: n
  69548. }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
  69549. },
  69550. getCreatingRange: function(t) {
  69551. var e = jne(t);
  69552. return Xne(e[1][0], e[1][1], e[0][0], e[0][1]);
  69553. },
  69554. updateCoverShape: function(t, e, n, r) {
  69555. Une(t, e, n, r);
  69556. },
  69557. updateCommon: wE,
  69558. contain: PE
  69559. },
  69560. polygon: {
  69561. createCover: function(t, e) {
  69562. var n = new Ve();
  69563. return n.add(new ai({
  69564. name: "main",
  69565. style: rL(e),
  69566. silent: !0
  69567. })), n;
  69568. },
  69569. getCreatingRange: function(t) {
  69570. return t;
  69571. },
  69572. endCreating: function(t, e) {
  69573. e.remove(e.childAt(0)), e.add(new ii({
  69574. name: "main",
  69575. draggable: !0,
  69576. drift: Ue(xFe, t, e),
  69577. ondragend: Ue(xf, t, {
  69578. isEnd: !0
  69579. })
  69580. }));
  69581. },
  69582. updateCoverShape: function(t, e, n, r) {
  69583. e.childAt(0).setShape({
  69584. points: iL(t, e, n)
  69585. });
  69586. },
  69587. updateCommon: wE,
  69588. contain: PE
  69589. }
  69590. };
  69591. function fW(t) {
  69592. return {
  69593. createCover: function(e, n) {
  69594. return Zne({
  69595. toRectRange: function(r) {
  69596. var i = [r, [0, 100]];
  69597. return t && i.reverse(), i;
  69598. },
  69599. fromRectRange: function(r) {
  69600. return r[t];
  69601. }
  69602. }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t]);
  69603. },
  69604. getCreatingRange: function(e) {
  69605. var n = jne(e), r = Vm(n[0][t], n[1][t]), i = Hh(n[0][t], n[1][t]);
  69606. return [r, i];
  69607. },
  69608. updateCoverShape: function(e, n, r, i) {
  69609. var a, o = Gne(e, n);
  69610. if (o !== Sf && o.getLinearBrushOtherExtent)
  69611. a = o.getLinearBrushOtherExtent(t);
  69612. else {
  69613. var s = e._zr;
  69614. a = [0, [s.getWidth(), s.getHeight()][1 - t]];
  69615. }
  69616. var l = [r, a];
  69617. t && l.reverse(), Une(e, n, l, i);
  69618. },
  69619. updateCommon: wE,
  69620. contain: PE
  69621. };
  69622. }
  69623. function Kne(t) {
  69624. return t = aL(t), function(e) {
  69625. return HR(e, t);
  69626. };
  69627. }
  69628. function Jne(t, e) {
  69629. return t = aL(t), function(n) {
  69630. var r = e ?? n, i = r ? t.width : t.height, a = r ? t.x : t.y;
  69631. return [a, a + (i || 0)];
  69632. };
  69633. }
  69634. function ere(t, e, n) {
  69635. var r = aL(t);
  69636. return function(i, a) {
  69637. return r.contain(a[0], a[1]) && !mw(i, e, n);
  69638. };
  69639. }
  69640. function aL(t) {
  69641. return Je.create(t);
  69642. }
  69643. var $Fe = ["axisLine", "axisTickLabel", "axisName"], AFe = (
  69644. /** @class */
  69645. function(t) {
  69646. q(e, t);
  69647. function e() {
  69648. var n = t !== null && t.apply(this, arguments) || this;
  69649. return n.type = e.type, n;
  69650. }
  69651. return e.prototype.init = function(n, r) {
  69652. t.prototype.init.apply(this, arguments), (this._brushController = new Jk(r.getZr())).on("brush", xe(this._onBrush, this));
  69653. }, e.prototype.render = function(n, r, i, a) {
  69654. if (!EFe(n, r, a)) {
  69655. this.axisModel = n, this.api = i, this.group.removeAll();
  69656. var o = this._axisGroup;
  69657. if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
  69658. var s = IFe(n, r), l = s.coordinateSystem, u = n.getAreaSelectStyle(), c = u.width, f = n.axis.dim, d = l.getAxisLayout(f), h = le({
  69659. strokeContainThreshold: c
  69660. }, d), p = new Kr(n, h);
  69661. k($Fe, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(h, u, n, s, c, i), W0(o, this._axisGroup, n);
  69662. }
  69663. }
  69664. }, e.prototype._refreshBrushController = function(n, r, i, a, o, s) {
  69665. var l = i.axis.getExtent(), u = l[1] - l[0], c = Math.min(30, Math.abs(u) * 0.1), f = Je.create({
  69666. x: l[0],
  69667. y: -o / 2,
  69668. width: u,
  69669. height: o
  69670. });
  69671. f.x -= c, f.width += 2 * c, this._brushController.mount({
  69672. enableGlobalPan: !0,
  69673. rotation: n.rotation,
  69674. x: n.position[0],
  69675. y: n.position[1]
  69676. }).setPanels([{
  69677. panelId: "pl",
  69678. clipPath: Kne(f),
  69679. isTargetByCursor: ere(f, s, a),
  69680. getLinearBrushOtherExtent: Jne(f, 0)
  69681. }]).enableBrush({
  69682. brushType: "lineX",
  69683. brushStyle: r,
  69684. removeOnClick: !0
  69685. }).updateCovers(MFe(i));
  69686. }, e.prototype._onBrush = function(n) {
  69687. var r = n.areas, i = this.axisModel, a = i.axis, o = ce(r, function(s) {
  69688. return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)];
  69689. });
  69690. (!i.option.realtime === n.isEnd || n.removeOnClick) && this.api.dispatchAction({
  69691. type: "axisAreaSelect",
  69692. parallelAxisId: i.id,
  69693. intervals: o
  69694. });
  69695. }, e.prototype.dispose = function() {
  69696. this._brushController.dispose();
  69697. }, e.type = "parallelAxis", e;
  69698. }(Xt)
  69699. );
  69700. function EFe(t, e, n) {
  69701. return n && n.type === "axisAreaSelect" && e.findComponents({
  69702. mainType: "parallelAxis",
  69703. query: n
  69704. })[0] === t;
  69705. }
  69706. function MFe(t) {
  69707. var e = t.axis;
  69708. return ce(t.activeIntervals, function(n) {
  69709. return {
  69710. brushType: "lineX",
  69711. panelId: "pl",
  69712. range: [e.dataToCoord(n[0], !0), e.dataToCoord(n[1], !0)]
  69713. };
  69714. });
  69715. }
  69716. function IFe(t, e) {
  69717. return e.getComponent("parallel", t.get("parallelIndex"));
  69718. }
  69719. var DFe = {
  69720. type: "axisAreaSelect",
  69721. event: "axisAreaSelected"
  69722. // update: 'updateVisual'
  69723. };
  69724. function RFe(t) {
  69725. t.registerAction(DFe, function(e, n) {
  69726. n.eachComponent({
  69727. mainType: "parallelAxis",
  69728. query: e
  69729. }, function(r) {
  69730. r.axis.model.setActiveIntervals(e.intervals);
  69731. });
  69732. }), t.registerAction("parallelAxisExpand", function(e, n) {
  69733. n.eachComponent({
  69734. mainType: "parallel",
  69735. query: e
  69736. }, function(r) {
  69737. r.setAxisExpand(e);
  69738. });
  69739. });
  69740. }
  69741. var kFe = {
  69742. type: "value",
  69743. areaSelectStyle: {
  69744. width: 20,
  69745. borderWidth: 1,
  69746. borderColor: "rgba(160,197,232)",
  69747. color: "rgba(160,197,232)",
  69748. opacity: 0.3
  69749. },
  69750. realtime: !0,
  69751. z: 10
  69752. };
  69753. function tre(t) {
  69754. t.registerComponentView(nFe), t.registerComponentModel(iFe), t.registerCoordinateSystem("parallel", dFe), t.registerPreprocessor(KVe), t.registerComponentModel(SE), t.registerComponentView(AFe), Qh(t, "parallel", SE, kFe), RFe(t);
  69755. }
  69756. function LFe(t) {
  69757. at(tre), t.registerChartView(HVe), t.registerSeriesModel(ZVe), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, qVe);
  69758. }
  69759. var NFe = (
  69760. /** @class */
  69761. /* @__PURE__ */ function() {
  69762. function t() {
  69763. 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;
  69764. }
  69765. return t;
  69766. }()
  69767. ), BFe = (
  69768. /** @class */
  69769. function(t) {
  69770. q(e, t);
  69771. function e(n) {
  69772. return t.call(this, n) || this;
  69773. }
  69774. return e.prototype.getDefaultShape = function() {
  69775. return new NFe();
  69776. }, e.prototype.buildPath = function(n, r) {
  69777. var i = r.extent;
  69778. 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();
  69779. }, e.prototype.highlight = function() {
  69780. js(this);
  69781. }, e.prototype.downplay = function() {
  69782. Zs(this);
  69783. }, e;
  69784. }(ot)
  69785. ), zFe = (
  69786. /** @class */
  69787. function(t) {
  69788. q(e, t);
  69789. function e() {
  69790. var n = t !== null && t.apply(this, arguments) || this;
  69791. return n.type = e.type, n._focusAdjacencyDisabled = !1, n;
  69792. }
  69793. return e.prototype.render = function(n, r, i) {
  69794. 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");
  69795. this._model = n, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
  69796. var v = new BFe(), g = Fe(v);
  69797. g.dataIndex = p.dataIndex, g.seriesIndex = n.seriesIndex, g.dataType = "edge";
  69798. 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, z, W;
  69799. 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, z = 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, z = A * b + E * (1 - b), W = R), v.setShape({
  69800. x1: A,
  69801. y1: D,
  69802. x2: E,
  69803. y2: R,
  69804. cpx1: N,
  69805. cpy1: V,
  69806. cpx2: z,
  69807. cpy2: W
  69808. }), v.useStyle(y.getItemStyle()), dW(v.style, h, p);
  69809. var F = "" + m.get("value"), Q = er(m, "edgeLabel");
  69810. Pr(v, Q, {
  69811. labelFetcher: {
  69812. getFormattedLabel: function(ee, oe, K, ie, X, H) {
  69813. return n.getFormattedLabel(
  69814. ee,
  69815. oe,
  69816. "edge",
  69817. ie,
  69818. // ensure edgeLabel formatter is provided
  69819. // to prevent the inheritance from `label.formatter` of the series
  69820. ji(X, Q.normal && Q.normal.get("formatter"), F),
  69821. H
  69822. );
  69823. }
  69824. },
  69825. labelDataIndex: p.dataIndex,
  69826. defaultText: F
  69827. }), v.setTextConfig({
  69828. position: "inside"
  69829. });
  69830. var Z = m.getModel("emphasis");
  69831. Tr(v, m, "lineStyle", function(ee) {
  69832. var oe = ee.getItemStyle();
  69833. return dW(oe, h, p), oe;
  69834. }), s.add(v), d.setItemGraphicEl(p.dataIndex, v);
  69835. var ne = Z.get("focus");
  69836. bn(v, ne === "adjacency" ? p.getAdjacentDataIndices() : ne === "trajectory" ? p.getTrajectoryDataIndices() : ne, Z.get("blurScope"), Z.get("disabled"));
  69837. }), o.eachNode(function(p) {
  69838. 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({
  69839. shape: {
  69840. x: m != null ? m * u : v.x,
  69841. y: y != null ? y * c : v.y,
  69842. width: v.dx,
  69843. height: v.dy,
  69844. r: _
  69845. },
  69846. style: g.getModel("itemStyle").getItemStyle(),
  69847. z2: 10
  69848. });
  69849. Pr(O, er(g), {
  69850. labelFetcher: {
  69851. getFormattedLabel: function(x, C) {
  69852. return n.getFormattedLabel(x, C, "node");
  69853. }
  69854. },
  69855. labelDataIndex: p.dataIndex,
  69856. defaultText: p.id
  69857. }), 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";
  69858. var S = b.get("focus");
  69859. bn(O, S === "adjacency" ? p.getAdjacentDataIndices() : S === "trajectory" ? p.getTrajectoryDataIndices() : S, b.get("blurScope"), b.get("disabled"));
  69860. }), f.eachItemGraphicEl(function(p, v) {
  69861. var g = f.getItemModel(v);
  69862. g.get("draggable") && (p.drift = function(m, y) {
  69863. a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({
  69864. type: "dragNode",
  69865. seriesId: n.id,
  69866. dataIndex: f.getRawIndex(v),
  69867. localX: this.shape.x / u,
  69868. localY: this.shape.y / c
  69869. });
  69870. }, p.ondragend = function() {
  69871. a._focusAdjacencyDisabled = !1;
  69872. }, p.draggable = !0, p.cursor = "move");
  69873. }), !this._data && n.isAnimationEnabled() && s.setClipPath(VFe(s.getBoundingRect(), n, function() {
  69874. s.removeClipPath();
  69875. })), this._data = n.getData();
  69876. }, e.prototype.dispose = function() {
  69877. }, e.type = "sankey", e;
  69878. }(zt)
  69879. );
  69880. function dW(t, e, n) {
  69881. switch (t.fill) {
  69882. case "source":
  69883. t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
  69884. break;
  69885. case "target":
  69886. t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
  69887. break;
  69888. case "gradient":
  69889. var r = n.node1.getVisual("color"), i = n.node2.getVisual("color");
  69890. Oe(r) && Oe(i) && (t.fill = new hp(0, 0, +(e === "horizontal"), +(e === "vertical"), [{
  69891. color: r,
  69892. offset: 0
  69893. }, {
  69894. color: i,
  69895. offset: 1
  69896. }]));
  69897. }
  69898. }
  69899. function VFe(t, e, n) {
  69900. var r = new mt({
  69901. shape: {
  69902. x: t.x - 10,
  69903. y: t.y - 10,
  69904. width: 0,
  69905. height: t.height + 20
  69906. }
  69907. });
  69908. return Yt(r, {
  69909. shape: {
  69910. width: t.width + 20
  69911. }
  69912. }, e, n), r;
  69913. }
  69914. var FFe = (
  69915. /** @class */
  69916. function(t) {
  69917. q(e, t);
  69918. function e() {
  69919. var n = t !== null && t.apply(this, arguments) || this;
  69920. return n.type = e.type, n;
  69921. }
  69922. return e.prototype.getInitialData = function(n, r) {
  69923. var i = n.edges || n.links, a = n.data || n.nodes, o = n.levels;
  69924. this.levelModels = [];
  69925. for (var s = this.levelModels, l = 0; l < o.length; l++)
  69926. if (o[l].depth != null && o[l].depth >= 0)
  69927. s[o[l].depth] = new Wt(o[l], this, r);
  69928. else if (process.env.NODE_ENV !== "production")
  69929. throw new Error("levels[i].depth is mandatory and should be natural number");
  69930. if (a && i) {
  69931. var u = Nne(a, i, this, !0, c);
  69932. return u.data;
  69933. }
  69934. function c(f, d) {
  69935. f.wrapMethod("getItemModel", function(h, p) {
  69936. var v = h.parentModel, g = v.getData().getItemLayout(p);
  69937. if (g) {
  69938. var m = g.depth, y = v.levelModels[m];
  69939. y && (h.parentModel = y);
  69940. }
  69941. return h;
  69942. }), d.wrapMethod("getItemModel", function(h, p) {
  69943. var v = h.parentModel, g = v.getGraph().getEdgeByIndex(p), m = g.node1.getLayout();
  69944. if (m) {
  69945. var y = m.depth, b = v.levelModels[y];
  69946. b && (h.parentModel = b);
  69947. }
  69948. return h;
  69949. });
  69950. }
  69951. }, e.prototype.setNodePosition = function(n, r) {
  69952. var i = this.option.data || this.option.nodes, a = i[n];
  69953. a.localX = r[0], a.localY = r[1];
  69954. }, e.prototype.getGraph = function() {
  69955. return this.getData().graph;
  69956. }, e.prototype.getEdgeData = function() {
  69957. return this.getGraph().edgeData;
  69958. }, e.prototype.formatTooltip = function(n, r, i) {
  69959. function a(h) {
  69960. return isNaN(h) || h == null;
  69961. }
  69962. if (i === "edge") {
  69963. var o = this.getDataParams(n, i), s = o.data, l = o.value, u = s.source + " -- " + s.target;
  69964. return tr("nameValue", {
  69965. name: u,
  69966. value: l,
  69967. noValue: a(l)
  69968. });
  69969. } else {
  69970. var c = this.getGraph().getNodeByIndex(n), f = c.getLayout().value, d = this.getDataParams(n, i).data.name;
  69971. return tr("nameValue", {
  69972. name: d != null ? d + "" : null,
  69973. value: f,
  69974. noValue: a(f)
  69975. });
  69976. }
  69977. }, e.prototype.optionUpdated = function() {
  69978. }, e.prototype.getDataParams = function(n, r) {
  69979. var i = t.prototype.getDataParams.call(this, n, r);
  69980. if (i.value == null && r === "node") {
  69981. var a = this.getGraph().getNodeByIndex(n), o = a.getLayout().value;
  69982. i.value = o;
  69983. }
  69984. return i;
  69985. }, e.type = "series.sankey", e.defaultOption = {
  69986. // zlevel: 0,
  69987. z: 2,
  69988. coordinateSystem: "view",
  69989. left: "5%",
  69990. top: "5%",
  69991. right: "20%",
  69992. bottom: "5%",
  69993. orient: "horizontal",
  69994. nodeWidth: 20,
  69995. nodeGap: 8,
  69996. draggable: !0,
  69997. layoutIterations: 32,
  69998. label: {
  69999. show: !0,
  70000. position: "right",
  70001. fontSize: 12
  70002. },
  70003. edgeLabel: {
  70004. show: !1,
  70005. fontSize: 12
  70006. },
  70007. levels: [],
  70008. nodeAlign: "justify",
  70009. lineStyle: {
  70010. color: "#314656",
  70011. opacity: 0.2,
  70012. curveness: 0.5
  70013. },
  70014. emphasis: {
  70015. label: {
  70016. show: !0
  70017. },
  70018. lineStyle: {
  70019. opacity: 0.5
  70020. }
  70021. },
  70022. select: {
  70023. itemStyle: {
  70024. borderColor: "#212121"
  70025. }
  70026. },
  70027. animationEasing: "linear",
  70028. animationDuration: 1e3
  70029. }, e;
  70030. }(Ht)
  70031. );
  70032. function WFe(t, e) {
  70033. t.eachSeriesByType("sankey", function(n) {
  70034. var r = n.get("nodeWidth"), i = n.get("nodeGap"), a = QFe(n, e);
  70035. n.layoutInfo = a;
  70036. var o = a.width, s = a.height, l = n.getGraph(), u = l.nodes, c = l.edges;
  70037. GFe(u);
  70038. var f = Nt(u, function(v) {
  70039. return v.getLayout().value === 0;
  70040. }), d = f.length !== 0 ? 0 : n.get("layoutIterations"), h = n.get("orient"), p = n.get("nodeAlign");
  70041. HFe(u, c, r, i, o, s, d, h, p);
  70042. });
  70043. }
  70044. function QFe(t, e) {
  70045. return Rn(t.getBoxLayoutParams(), {
  70046. width: e.getWidth(),
  70047. height: e.getHeight()
  70048. });
  70049. }
  70050. function HFe(t, e, n, r, i, a, o, s, l) {
  70051. jFe(t, e, n, i, a, s, l), YFe(t, e, a, i, r, o, s), aWe(t, s);
  70052. }
  70053. function GFe(t) {
  70054. k(t, function(e) {
  70055. var n = Jl(e.outEdges, kO), r = Jl(e.inEdges, kO), i = e.getValue() || 0, a = Math.max(n, r, i);
  70056. e.setLayout({
  70057. value: a
  70058. }, !0);
  70059. });
  70060. }
  70061. function jFe(t, e, n, r, i, a, o) {
  70062. for (var s = [], l = [], u = [], c = [], f = 0, d = 0; d < e.length; d++)
  70063. s[d] = 1;
  70064. for (var d = 0; d < t.length; d++)
  70065. l[d] = t[d].inEdges.length, l[d] === 0 && u.push(t[d]);
  70066. for (var h = -1; u.length; ) {
  70067. for (var p = 0; p < u.length; p++) {
  70068. var v = u[p], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0;
  70069. m && g.depth > h && (h = g.depth), v.setLayout({
  70070. depth: m ? g.depth : f
  70071. }, !0), a === "vertical" ? v.setLayout({
  70072. dy: n
  70073. }, !0) : v.setLayout({
  70074. dx: n
  70075. }, !0);
  70076. for (var y = 0; y < v.outEdges.length; y++) {
  70077. var b = v.outEdges[y], _ = e.indexOf(b);
  70078. s[_] = 0;
  70079. var O = b.node2, S = t.indexOf(O);
  70080. --l[S] === 0 && c.indexOf(O) < 0 && c.push(O);
  70081. }
  70082. }
  70083. ++f, u = c, c = [];
  70084. }
  70085. for (var d = 0; d < s.length; d++)
  70086. if (s[d] === 1)
  70087. throw new Error("Sankey is a DAG, the original data has cycle!");
  70088. var x = h > f - 1 ? h : f - 1;
  70089. o && o !== "left" && ZFe(t, o, a, x);
  70090. var C = a === "vertical" ? (i - n) / x : (r - n) / x;
  70091. XFe(t, C, a);
  70092. }
  70093. function nre(t) {
  70094. var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  70095. return e.depth != null && e.depth >= 0;
  70096. }
  70097. function ZFe(t, e, n, r) {
  70098. if (e === "right") {
  70099. for (var i = [], a = t, o = 0; a.length; ) {
  70100. for (var s = 0; s < a.length; s++) {
  70101. var l = a[s];
  70102. l.setLayout({
  70103. skNodeHeight: o
  70104. }, !0);
  70105. for (var u = 0; u < l.inEdges.length; u++) {
  70106. var c = l.inEdges[u];
  70107. i.indexOf(c.node1) < 0 && i.push(c.node1);
  70108. }
  70109. }
  70110. a = i, i = [], ++o;
  70111. }
  70112. k(t, function(f) {
  70113. nre(f) || f.setLayout({
  70114. depth: Math.max(0, r - f.getLayout().skNodeHeight)
  70115. }, !0);
  70116. });
  70117. } else e === "justify" && UFe(t, r);
  70118. }
  70119. function UFe(t, e) {
  70120. k(t, function(n) {
  70121. !nre(n) && !n.outEdges.length && n.setLayout({
  70122. depth: e
  70123. }, !0);
  70124. });
  70125. }
  70126. function XFe(t, e, n) {
  70127. k(t, function(r) {
  70128. var i = r.getLayout().depth * e;
  70129. n === "vertical" ? r.setLayout({
  70130. y: i
  70131. }, !0) : r.setLayout({
  70132. x: i
  70133. }, !0);
  70134. });
  70135. }
  70136. function YFe(t, e, n, r, i, a, o) {
  70137. var s = qFe(t, o);
  70138. KFe(s, e, n, r, i, o), DP(s, i, n, r, o);
  70139. for (var l = 1; a > 0; a--)
  70140. l *= 0.99, JFe(s, l, o), DP(s, i, n, r, o), iWe(s, l, o), DP(s, i, n, r, o);
  70141. }
  70142. function qFe(t, e) {
  70143. var n = [], r = e === "vertical" ? "y" : "x", i = PA(t, function(a) {
  70144. return a.getLayout()[r];
  70145. });
  70146. return i.keys.sort(function(a, o) {
  70147. return a - o;
  70148. }), k(i.keys, function(a) {
  70149. n.push(i.buckets.get(a));
  70150. }), n;
  70151. }
  70152. function KFe(t, e, n, r, i, a) {
  70153. var o = 1 / 0;
  70154. k(t, function(s) {
  70155. var l = s.length, u = 0;
  70156. k(s, function(f) {
  70157. u += f.getLayout().value;
  70158. });
  70159. var c = a === "vertical" ? (r - (l - 1) * i) / u : (n - (l - 1) * i) / u;
  70160. c < o && (o = c);
  70161. }), k(t, function(s) {
  70162. k(s, function(l, u) {
  70163. var c = l.getLayout().value * o;
  70164. a === "vertical" ? (l.setLayout({
  70165. x: u
  70166. }, !0), l.setLayout({
  70167. dx: c
  70168. }, !0)) : (l.setLayout({
  70169. y: u
  70170. }, !0), l.setLayout({
  70171. dy: c
  70172. }, !0));
  70173. });
  70174. }), k(e, function(s) {
  70175. var l = +s.getValue() * o;
  70176. s.setLayout({
  70177. dy: l
  70178. }, !0);
  70179. });
  70180. }
  70181. function DP(t, e, n, r, i) {
  70182. var a = i === "vertical" ? "x" : "y";
  70183. k(t, function(o) {
  70184. o.sort(function(v, g) {
  70185. return v.getLayout()[a] - g.getLayout()[a];
  70186. });
  70187. for (var s, l, u, c = 0, f = o.length, d = i === "vertical" ? "dx" : "dy", h = 0; h < f; h++)
  70188. l = o[h], u = c - l.getLayout()[a], u > 0 && (s = l.getLayout()[a] + u, i === "vertical" ? l.setLayout({
  70189. x: s
  70190. }, !0) : l.setLayout({
  70191. y: s
  70192. }, !0)), c = l.getLayout()[a] + l.getLayout()[d] + e;
  70193. var p = i === "vertical" ? r : n;
  70194. if (u = c - e - p, u > 0) {
  70195. s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
  70196. x: s
  70197. }, !0) : l.setLayout({
  70198. y: s
  70199. }, !0), c = s;
  70200. for (var h = f - 2; h >= 0; --h)
  70201. l = o[h], u = l.getLayout()[a] + l.getLayout()[d] + e - c, u > 0 && (s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
  70202. x: s
  70203. }, !0) : l.setLayout({
  70204. y: s
  70205. }, !0)), c = l.getLayout()[a];
  70206. }
  70207. });
  70208. }
  70209. function JFe(t, e, n) {
  70210. k(t.slice().reverse(), function(r) {
  70211. k(r, function(i) {
  70212. if (i.outEdges.length) {
  70213. var a = Jl(i.outEdges, eWe, n) / Jl(i.outEdges, kO);
  70214. if (isNaN(a)) {
  70215. var o = i.outEdges.length;
  70216. a = o ? Jl(i.outEdges, tWe, n) / o : 0;
  70217. }
  70218. if (n === "vertical") {
  70219. var s = i.getLayout().x + (a - fu(i, n)) * e;
  70220. i.setLayout({
  70221. x: s
  70222. }, !0);
  70223. } else {
  70224. var l = i.getLayout().y + (a - fu(i, n)) * e;
  70225. i.setLayout({
  70226. y: l
  70227. }, !0);
  70228. }
  70229. }
  70230. });
  70231. });
  70232. }
  70233. function eWe(t, e) {
  70234. return fu(t.node2, e) * t.getValue();
  70235. }
  70236. function tWe(t, e) {
  70237. return fu(t.node2, e);
  70238. }
  70239. function nWe(t, e) {
  70240. return fu(t.node1, e) * t.getValue();
  70241. }
  70242. function rWe(t, e) {
  70243. return fu(t.node1, e);
  70244. }
  70245. function fu(t, e) {
  70246. return e === "vertical" ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2;
  70247. }
  70248. function kO(t) {
  70249. return t.getValue();
  70250. }
  70251. function Jl(t, e, n) {
  70252. for (var r = 0, i = t.length, a = -1; ++a < i; ) {
  70253. var o = +e(t[a], n);
  70254. isNaN(o) || (r += o);
  70255. }
  70256. return r;
  70257. }
  70258. function iWe(t, e, n) {
  70259. k(t, function(r) {
  70260. k(r, function(i) {
  70261. if (i.inEdges.length) {
  70262. var a = Jl(i.inEdges, nWe, n) / Jl(i.inEdges, kO);
  70263. if (isNaN(a)) {
  70264. var o = i.inEdges.length;
  70265. a = o ? Jl(i.inEdges, rWe, n) / o : 0;
  70266. }
  70267. if (n === "vertical") {
  70268. var s = i.getLayout().x + (a - fu(i, n)) * e;
  70269. i.setLayout({
  70270. x: s
  70271. }, !0);
  70272. } else {
  70273. var l = i.getLayout().y + (a - fu(i, n)) * e;
  70274. i.setLayout({
  70275. y: l
  70276. }, !0);
  70277. }
  70278. }
  70279. });
  70280. });
  70281. }
  70282. function aWe(t, e) {
  70283. var n = e === "vertical" ? "x" : "y";
  70284. k(t, function(r) {
  70285. r.outEdges.sort(function(i, a) {
  70286. return i.node2.getLayout()[n] - a.node2.getLayout()[n];
  70287. }), r.inEdges.sort(function(i, a) {
  70288. return i.node1.getLayout()[n] - a.node1.getLayout()[n];
  70289. });
  70290. }), k(t, function(r) {
  70291. var i = 0, a = 0;
  70292. k(r.outEdges, function(o) {
  70293. o.setLayout({
  70294. sy: i
  70295. }, !0), i += o.getLayout().dy;
  70296. }), k(r.inEdges, function(o) {
  70297. o.setLayout({
  70298. ty: a
  70299. }, !0), a += o.getLayout().dy;
  70300. });
  70301. });
  70302. }
  70303. function oWe(t) {
  70304. t.eachSeriesByType("sankey", function(e) {
  70305. var n = e.getGraph(), r = n.nodes, i = n.edges;
  70306. if (r.length) {
  70307. var a = 1 / 0, o = -1 / 0;
  70308. k(r, function(s) {
  70309. var l = s.getLayout().value;
  70310. l < a && (a = l), l > o && (o = l);
  70311. }), k(r, function(s) {
  70312. var l = new qn({
  70313. type: "color",
  70314. mappingMethod: "linear",
  70315. dataExtent: [a, o],
  70316. visual: e.get("color")
  70317. }), u = l.mapValueToVisual(s.getLayout().value), c = s.getModel().get(["itemStyle", "color"]);
  70318. c != null ? (s.setVisual("color", c), s.setVisual("style", {
  70319. fill: c
  70320. })) : (s.setVisual("color", u), s.setVisual("style", {
  70321. fill: u
  70322. }));
  70323. });
  70324. }
  70325. i.length && k(i, function(s) {
  70326. var l = s.getModel().get("lineStyle");
  70327. s.setVisual("style", l);
  70328. });
  70329. });
  70330. }
  70331. function sWe(t) {
  70332. t.registerChartView(zFe), t.registerSeriesModel(FFe), t.registerLayout(WFe), t.registerVisual(oWe), t.registerAction({
  70333. type: "dragNode",
  70334. event: "dragnode",
  70335. // here can only use 'update' now, other value is not support in echarts.
  70336. update: "update"
  70337. }, function(e, n) {
  70338. n.eachComponent({
  70339. mainType: "series",
  70340. subType: "sankey",
  70341. query: e
  70342. }, function(r) {
  70343. r.setNodePosition(e.dataIndex, [e.localX, e.localY]);
  70344. });
  70345. });
  70346. }
  70347. var rre = (
  70348. /** @class */
  70349. function() {
  70350. function t() {
  70351. }
  70352. return t.prototype.getInitialData = function(e, n) {
  70353. 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;
  70354. 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";
  70355. 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;
  70356. if (g && l) {
  70357. var m = [];
  70358. k(g, function(_, O) {
  70359. var S;
  70360. ue(_) ? (S = _.slice(), _.unshift(O)) : ue(_.value) ? (S = le({}, _), S.value = S.value.slice(), _.value.unshift(O)) : S = _, m.push(S);
  70361. }), e.data = m;
  70362. }
  70363. var y = this.defaultValueDimensions, b = [{
  70364. name: f,
  70365. type: wO(p),
  70366. ordinalMeta: r,
  70367. otherDims: {
  70368. tooltip: !1,
  70369. itemName: 0
  70370. },
  70371. dimsDef: ["base"]
  70372. }, {
  70373. name: d,
  70374. type: wO(v),
  70375. dimsDef: y.slice()
  70376. }];
  70377. return Pp(this, {
  70378. coordDimensions: b,
  70379. dimensionsCount: y.length + 1,
  70380. encodeDefaulter: Ue(MJ, b, this)
  70381. });
  70382. }, t.prototype.getBaseAxis = function() {
  70383. var e = this._baseAxisDim;
  70384. return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
  70385. }, t;
  70386. }()
  70387. ), ire = (
  70388. /** @class */
  70389. function(t) {
  70390. q(e, t);
  70391. function e() {
  70392. var n = t !== null && t.apply(this, arguments) || this;
  70393. return n.type = e.type, n.defaultValueDimensions = [{
  70394. name: "min",
  70395. defaultTooltip: !0
  70396. }, {
  70397. name: "Q1",
  70398. defaultTooltip: !0
  70399. }, {
  70400. name: "median",
  70401. defaultTooltip: !0
  70402. }, {
  70403. name: "Q3",
  70404. defaultTooltip: !0
  70405. }, {
  70406. name: "max",
  70407. defaultTooltip: !0
  70408. }], n.visualDrawType = "stroke", n;
  70409. }
  70410. return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  70411. // zlevel: 0,
  70412. z: 2,
  70413. coordinateSystem: "cartesian2d",
  70414. legendHoverLink: !0,
  70415. layout: null,
  70416. boxWidth: [7, 50],
  70417. itemStyle: {
  70418. color: "#fff",
  70419. borderWidth: 1
  70420. },
  70421. emphasis: {
  70422. scale: !0,
  70423. itemStyle: {
  70424. borderWidth: 2,
  70425. shadowBlur: 5,
  70426. shadowOffsetX: 1,
  70427. shadowOffsetY: 1,
  70428. shadowColor: "rgba(0,0,0,0.2)"
  70429. }
  70430. },
  70431. animationDuration: 800
  70432. }, e;
  70433. }(Ht)
  70434. );
  70435. xn(ire, rre, !0);
  70436. var lWe = (
  70437. /** @class */
  70438. function(t) {
  70439. q(e, t);
  70440. function e() {
  70441. var n = t !== null && t.apply(this, arguments) || this;
  70442. return n.type = e.type, n;
  70443. }
  70444. return e.prototype.render = function(n, r, i) {
  70445. var a = n.getData(), o = this.group, s = this._data;
  70446. this._data || o.removeAll();
  70447. var l = n.get("layout") === "horizontal" ? 1 : 0;
  70448. a.diff(s).add(function(u) {
  70449. if (a.hasValue(u)) {
  70450. var c = a.getItemLayout(u), f = hW(c, a, u, l, !0);
  70451. a.setItemGraphicEl(u, f), o.add(f);
  70452. }
  70453. }).update(function(u, c) {
  70454. var f = s.getItemGraphicEl(c);
  70455. if (!a.hasValue(u)) {
  70456. o.remove(f);
  70457. return;
  70458. }
  70459. var d = a.getItemLayout(u);
  70460. f ? (so(f), are(d, f, a, u)) : f = hW(d, a, u, l), o.add(f), a.setItemGraphicEl(u, f);
  70461. }).remove(function(u) {
  70462. var c = s.getItemGraphicEl(u);
  70463. c && o.remove(c);
  70464. }).execute(), this._data = a;
  70465. }, e.prototype.remove = function(n) {
  70466. var r = this.group, i = this._data;
  70467. this._data = null, i && i.eachItemGraphicEl(function(a) {
  70468. a && r.remove(a);
  70469. });
  70470. }, e.type = "boxplot", e;
  70471. }(zt)
  70472. ), uWe = (
  70473. /** @class */
  70474. /* @__PURE__ */ function() {
  70475. function t() {
  70476. }
  70477. return t;
  70478. }()
  70479. ), cWe = (
  70480. /** @class */
  70481. function(t) {
  70482. q(e, t);
  70483. function e(n) {
  70484. var r = t.call(this, n) || this;
  70485. return r.type = "boxplotBoxPath", r;
  70486. }
  70487. return e.prototype.getDefaultShape = function() {
  70488. return new uWe();
  70489. }, e.prototype.buildPath = function(n, r) {
  70490. var i = r.points, a = 0;
  70491. for (n.moveTo(i[a][0], i[a][1]), a++; a < 4; a++)
  70492. n.lineTo(i[a][0], i[a][1]);
  70493. for (n.closePath(); a < i.length; a++)
  70494. n.moveTo(i[a][0], i[a][1]), a++, n.lineTo(i[a][0], i[a][1]);
  70495. }, e;
  70496. }(ot)
  70497. );
  70498. function hW(t, e, n, r, i) {
  70499. var a = t.ends, o = new cWe({
  70500. shape: {
  70501. points: i ? fWe(a, r, t) : a
  70502. }
  70503. });
  70504. return are(t, o, e, n, i), o;
  70505. }
  70506. function are(t, e, n, r, i) {
  70507. var a = n.hostModel, o = Lf[i ? "initProps" : "updateProps"];
  70508. o(e, {
  70509. shape: {
  70510. points: t.ends
  70511. }
  70512. }, a, r), e.useStyle(n.getItemVisual(r, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  70513. var s = n.getItemModel(r), l = s.getModel("emphasis");
  70514. Tr(e, s), bn(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
  70515. }
  70516. function fWe(t, e, n) {
  70517. return ce(t, function(r) {
  70518. return r = r.slice(), r[e] = n.initBaseline, r;
  70519. });
  70520. }
  70521. var Lg = k;
  70522. function dWe(t) {
  70523. var e = hWe(t);
  70524. Lg(e, function(n) {
  70525. var r = n.seriesModels;
  70526. r.length && (pWe(n), Lg(r, function(i, a) {
  70527. vWe(i, n.boxOffsetList[a], n.boxWidthList[a]);
  70528. }));
  70529. });
  70530. }
  70531. function hWe(t) {
  70532. var e = [], n = [];
  70533. return t.eachSeriesByType("boxplot", function(r) {
  70534. var i = r.getBaseAxis(), a = et(n, i);
  70535. a < 0 && (a = n.length, n[a] = i, e[a] = {
  70536. axis: i,
  70537. seriesModels: []
  70538. }), e[a].seriesModels.push(r);
  70539. }), e;
  70540. }
  70541. function pWe(t) {
  70542. var e = t.axis, n = t.seriesModels, r = n.length, i = t.boxWidthList = [], a = t.boxOffsetList = [], o = [], s;
  70543. if (e.type === "category")
  70544. s = e.getBandWidth();
  70545. else {
  70546. var l = 0;
  70547. Lg(n, function(p) {
  70548. l = Math.max(l, p.getData().count());
  70549. });
  70550. var u = e.getExtent();
  70551. s = Math.abs(u[1] - u[0]) / l;
  70552. }
  70553. Lg(n, function(p) {
  70554. var v = p.get("boxWidth");
  70555. ue(v) || (v = [v, v]), o.push([_e(v[0], s) || 0, _e(v[1], s) || 0]);
  70556. });
  70557. var c = s * 0.8 - 2, f = c / r * 0.3, d = (c - f * (r - 1)) / r, h = d / 2 - c / 2;
  70558. Lg(n, function(p, v) {
  70559. a.push(h), h += f + d, i.push(Math.min(Math.max(d, o[v][0]), o[v][1]));
  70560. });
  70561. }
  70562. function vWe(t, e, n) {
  70563. 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]);
  70564. if (u == null || c.length < 5)
  70565. return;
  70566. for (var f = 0; f < i.count(); f++) {
  70567. 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 = [];
  70568. _(y, v, !1), _(y, g, !0), y.push(p, v, m, g), O(y, p), O(y, m), O(y, h), i.setItemLayout(f, {
  70569. initBaseline: h[s],
  70570. ends: y
  70571. });
  70572. }
  70573. function b(S, x, C) {
  70574. var T = i.get(x, C), w = [];
  70575. w[o] = S, w[s] = T;
  70576. var P;
  70577. return isNaN(S) || isNaN(T) ? P = [NaN, NaN] : (P = r.dataToPoint(w), P[o] += e), P;
  70578. }
  70579. function _(S, x, C) {
  70580. var T = x.slice(), w = x.slice();
  70581. T[o] += a, w[o] -= a, C ? S.push(T, w) : S.push(w, T);
  70582. }
  70583. function O(S, x) {
  70584. var C = x.slice(), T = x.slice();
  70585. C[o] -= a, T[o] += a, S.push(C, T);
  70586. }
  70587. }
  70588. function gWe(t, e) {
  70589. e = e || {};
  70590. for (var n = [], r = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < t.length; o++) {
  70591. var s = Vi(t[o].slice()), l = z_(s, 0.25), u = z_(s, 0.5), c = z_(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({
  70592. value: o
  70593. }) : Oe(g) ? g.replace("{value}", o + "") : o + "";
  70594. n.push([m, p, l, u, c, v]);
  70595. for (var y = 0; y < s.length; y++) {
  70596. var b = s[y];
  70597. if (b < p || b > v) {
  70598. var _ = [m, b];
  70599. r.push(_);
  70600. }
  70601. }
  70602. }
  70603. return {
  70604. boxData: n,
  70605. outliers: r
  70606. };
  70607. }
  70608. var mWe = {
  70609. type: "echarts:boxplot",
  70610. transform: function(e) {
  70611. var n = e.upstream;
  70612. if (n.sourceFormat !== Br) {
  70613. var r = "";
  70614. process.env.NODE_ENV !== "production" && (r = ti("source data is not applicable for this boxplot transform. Expect number[][].")), Et(r);
  70615. }
  70616. var i = gWe(n.getRawData(), e.config);
  70617. return [{
  70618. dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
  70619. data: i.boxData
  70620. }, {
  70621. data: i.outliers
  70622. }];
  70623. }
  70624. };
  70625. function yWe(t) {
  70626. t.registerSeriesModel(ire), t.registerChartView(lWe), t.registerLayout(dWe), t.registerTransform(mWe);
  70627. }
  70628. var bWe = ["color", "borderColor"], _We = (
  70629. /** @class */
  70630. function(t) {
  70631. q(e, t);
  70632. function e() {
  70633. var n = t !== null && t.apply(this, arguments) || this;
  70634. return n.type = e.type, n;
  70635. }
  70636. return e.prototype.render = function(n, r, i) {
  70637. this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(n), this._isLargeDraw ? this._renderLarge(n) : this._renderNormal(n);
  70638. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  70639. this._clear(), this._updateDrawMode(n);
  70640. }, e.prototype.incrementalRender = function(n, r, i, a) {
  70641. this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(n, r) : this._incrementalRenderNormal(n, r);
  70642. }, e.prototype.eachRendered = function(n) {
  70643. Tu(this._progressiveEls || this.group, n);
  70644. }, e.prototype._updateDrawMode = function(n) {
  70645. var r = n.pipelineContext.large;
  70646. (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
  70647. }, e.prototype._renderNormal = function(n) {
  70648. 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();
  70649. this._data || a.removeAll(), r.diff(i).add(function(c) {
  70650. if (r.hasValue(c)) {
  70651. var f = r.getItemLayout(c);
  70652. if (s && pW(u, f))
  70653. return;
  70654. var d = RP(f, c, !0);
  70655. Yt(d, {
  70656. shape: {
  70657. points: f.ends
  70658. }
  70659. }, n, c), kP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
  70660. }
  70661. }).update(function(c, f) {
  70662. var d = i.getItemGraphicEl(f);
  70663. if (!r.hasValue(c)) {
  70664. a.remove(d);
  70665. return;
  70666. }
  70667. var h = r.getItemLayout(c);
  70668. if (s && pW(u, h)) {
  70669. a.remove(d);
  70670. return;
  70671. }
  70672. d ? (Ct(d, {
  70673. shape: {
  70674. points: h.ends
  70675. }
  70676. }, n, c), so(d)) : d = RP(h), kP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
  70677. }).remove(function(c) {
  70678. var f = i.getItemGraphicEl(c);
  70679. f && a.remove(f);
  70680. }).execute(), this._data = r;
  70681. }, e.prototype._renderLarge = function(n) {
  70682. this._clear(), vW(n, this.group);
  70683. var r = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
  70684. r ? this.group.setClipPath(r) : this.group.removeClipPath();
  70685. }, e.prototype._incrementalRenderNormal = function(n, r) {
  70686. for (var i = r.getData(), a = i.getLayout("isSimpleBox"), o; (o = n.next()) != null; ) {
  70687. var s = i.getItemLayout(o), l = RP(s);
  70688. kP(l, i, o, a), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
  70689. }
  70690. }, e.prototype._incrementalRenderLarge = function(n, r) {
  70691. vW(r, this.group, this._progressiveEls, !0);
  70692. }, e.prototype.remove = function(n) {
  70693. this._clear();
  70694. }, e.prototype._clear = function() {
  70695. this.group.removeAll(), this._data = null;
  70696. }, e.type = "candlestick", e;
  70697. }(zt)
  70698. ), OWe = (
  70699. /** @class */
  70700. /* @__PURE__ */ function() {
  70701. function t() {
  70702. }
  70703. return t;
  70704. }()
  70705. ), SWe = (
  70706. /** @class */
  70707. function(t) {
  70708. q(e, t);
  70709. function e(n) {
  70710. var r = t.call(this, n) || this;
  70711. return r.type = "normalCandlestickBox", r;
  70712. }
  70713. return e.prototype.getDefaultShape = function() {
  70714. return new OWe();
  70715. }, e.prototype.buildPath = function(n, r) {
  70716. var i = r.points;
  70717. 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]));
  70718. }, e;
  70719. }(ot)
  70720. );
  70721. function RP(t, e, n) {
  70722. var r = t.ends;
  70723. return new SWe({
  70724. shape: {
  70725. points: n ? xWe(r, t) : r
  70726. },
  70727. z2: 100
  70728. });
  70729. }
  70730. function pW(t, e) {
  70731. for (var n = !0, r = 0; r < e.ends.length; r++)
  70732. if (t.contain(e.ends[r][0], e.ends[r][1])) {
  70733. n = !1;
  70734. break;
  70735. }
  70736. return n;
  70737. }
  70738. function kP(t, e, n, r) {
  70739. var i = e.getItemModel(n);
  70740. t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = r, Tr(t, i);
  70741. }
  70742. function xWe(t, e) {
  70743. return ce(t, function(n) {
  70744. return n = n.slice(), n[1] = e.initBaseline, n;
  70745. });
  70746. }
  70747. var wWe = (
  70748. /** @class */
  70749. /* @__PURE__ */ function() {
  70750. function t() {
  70751. }
  70752. return t;
  70753. }()
  70754. ), LP = (
  70755. /** @class */
  70756. function(t) {
  70757. q(e, t);
  70758. function e(n) {
  70759. var r = t.call(this, n) || this;
  70760. return r.type = "largeCandlestickBox", r;
  70761. }
  70762. return e.prototype.getDefaultShape = function() {
  70763. return new wWe();
  70764. }, e.prototype.buildPath = function(n, r) {
  70765. for (var i = r.points, a = 0; a < i.length; )
  70766. if (this.__sign === i[a++]) {
  70767. var o = i[a++];
  70768. n.moveTo(o, i[a++]), n.lineTo(o, i[a++]);
  70769. } else
  70770. a += 3;
  70771. }, e;
  70772. }(ot)
  70773. );
  70774. function vW(t, e, n, r) {
  70775. var i = t.getData(), a = i.getLayout("largePoints"), o = new LP({
  70776. shape: {
  70777. points: a
  70778. },
  70779. __sign: 1,
  70780. ignoreCoarsePointer: !0
  70781. });
  70782. e.add(o);
  70783. var s = new LP({
  70784. shape: {
  70785. points: a
  70786. },
  70787. __sign: -1,
  70788. ignoreCoarsePointer: !0
  70789. });
  70790. e.add(s);
  70791. var l = new LP({
  70792. shape: {
  70793. points: a
  70794. },
  70795. __sign: 0,
  70796. ignoreCoarsePointer: !0
  70797. });
  70798. e.add(l), NP(1, o, t), NP(-1, s, t), NP(0, l, t), r && (o.incremental = !0, s.incremental = !0), n && n.push(o, s);
  70799. }
  70800. function NP(t, e, n, r) {
  70801. var i = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  70802. t === 0 && (i = n.get(["itemStyle", "borderColorDoji"]));
  70803. var a = n.getModel("itemStyle").getItemStyle(bWe);
  70804. e.useStyle(a), e.style.fill = null, e.style.stroke = i;
  70805. }
  70806. var ore = (
  70807. /** @class */
  70808. function(t) {
  70809. q(e, t);
  70810. function e() {
  70811. var n = t !== null && t.apply(this, arguments) || this;
  70812. return n.type = e.type, n.defaultValueDimensions = [{
  70813. name: "open",
  70814. defaultTooltip: !0
  70815. }, {
  70816. name: "close",
  70817. defaultTooltip: !0
  70818. }, {
  70819. name: "lowest",
  70820. defaultTooltip: !0
  70821. }, {
  70822. name: "highest",
  70823. defaultTooltip: !0
  70824. }], n;
  70825. }
  70826. return e.prototype.getShadowDim = function() {
  70827. return "open";
  70828. }, e.prototype.brushSelector = function(n, r, i) {
  70829. var a = r.getItemLayout(n);
  70830. return a && i.rect(a.brushRect);
  70831. }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  70832. // zlevel: 0,
  70833. z: 2,
  70834. coordinateSystem: "cartesian2d",
  70835. legendHoverLink: !0,
  70836. // xAxisIndex: 0,
  70837. // yAxisIndex: 0,
  70838. layout: null,
  70839. clip: !0,
  70840. itemStyle: {
  70841. color: "#eb5454",
  70842. color0: "#47b262",
  70843. borderColor: "#eb5454",
  70844. borderColor0: "#47b262",
  70845. borderColorDoji: null,
  70846. // borderColor: '#d24040',
  70847. // borderColor0: '#398f4f',
  70848. borderWidth: 1
  70849. },
  70850. emphasis: {
  70851. scale: !0,
  70852. itemStyle: {
  70853. borderWidth: 2
  70854. }
  70855. },
  70856. barMaxWidth: null,
  70857. barMinWidth: null,
  70858. barWidth: null,
  70859. large: !0,
  70860. largeThreshold: 600,
  70861. progressive: 3e3,
  70862. progressiveThreshold: 1e4,
  70863. progressiveChunkMode: "mod",
  70864. animationEasing: "linear",
  70865. animationDuration: 300
  70866. }, e;
  70867. }(Ht)
  70868. );
  70869. xn(ore, rre, !0);
  70870. function CWe(t) {
  70871. !t || !ue(t.series) || k(t.series, function(e) {
  70872. Ie(e) && e.type === "k" && (e.type = "candlestick");
  70873. });
  70874. }
  70875. var TWe = ["itemStyle", "borderColor"], PWe = ["itemStyle", "borderColor0"], $We = ["itemStyle", "borderColorDoji"], AWe = ["itemStyle", "color"], EWe = ["itemStyle", "color0"], MWe = {
  70876. seriesType: "candlestick",
  70877. plan: Op(),
  70878. // For legend.
  70879. performRawSeries: !0,
  70880. reset: function(t, e) {
  70881. function n(a, o) {
  70882. return o.get(a > 0 ? AWe : EWe);
  70883. }
  70884. function r(a, o) {
  70885. return o.get(a === 0 ? $We : a > 0 ? TWe : PWe);
  70886. }
  70887. if (!e.isSeriesFiltered(t)) {
  70888. var i = t.pipelineContext.large;
  70889. return !i && {
  70890. progress: function(a, o) {
  70891. for (var s; (s = a.next()) != null; ) {
  70892. var l = o.getItemModel(s), u = o.getItemLayout(s).sign, c = l.getItemStyle();
  70893. c.fill = n(u, l), c.stroke = r(u, l) || c.fill;
  70894. var f = o.ensureUniqueItemVisual(s, "style");
  70895. le(f, c);
  70896. }
  70897. }
  70898. };
  70899. }
  70900. }
  70901. }, IWe = {
  70902. seriesType: "candlestick",
  70903. plan: Op(),
  70904. reset: function(t) {
  70905. var e = t.coordinateSystem, n = t.getData(), r = DWe(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];
  70906. if (n.setLayout({
  70907. candleWidth: r,
  70908. // The value is experimented visually.
  70909. isSimpleBox: r <= 1.3
  70910. }), s < 0 || l.length < 4)
  70911. return;
  70912. return {
  70913. progress: t.pipelineContext.large ? p : h
  70914. };
  70915. function h(v, g) {
  70916. for (var m, y = g.getStore(); (m = v.next()) != null; ) {
  70917. 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 = [];
  70918. V(D, P, 0), V(D, w, 1), D.push(W(A), W(P), W($), W(w));
  70919. var E = g.getItemModel(m), R = !!E.get(["itemStyle", "borderColorDoji"]);
  70920. g.setItemLayout(m, {
  70921. sign: gW(y, m, _, O, c, R),
  70922. initBaseline: _ > O ? P[a] : w[a],
  70923. ends: D,
  70924. brushRect: z(S, x, b)
  70925. });
  70926. }
  70927. function N(F, Q) {
  70928. var Z = [];
  70929. return Z[i] = Q, Z[a] = F, isNaN(Q) || isNaN(F) ? [NaN, NaN] : e.dataToPoint(Z);
  70930. }
  70931. function V(F, Q, Z) {
  70932. var ne = Q.slice(), ee = Q.slice();
  70933. ne[i] = W_(ne[i] + r / 2, 1, !1), ee[i] = W_(ee[i] - r / 2, 1, !0), Z ? F.push(ne, ee) : F.push(ee, ne);
  70934. }
  70935. function z(F, Q, Z) {
  70936. var ne = N(F, Z), ee = N(Q, Z);
  70937. return ne[i] -= r / 2, ee[i] -= r / 2, {
  70938. x: ne[0],
  70939. y: ne[1],
  70940. width: r,
  70941. height: ee[1] - ne[1]
  70942. };
  70943. }
  70944. function W(F) {
  70945. return F[i] = W_(F[i], 1), F;
  70946. }
  70947. }
  70948. function p(v, g) {
  70949. for (var m = Fo(v.count * 4), y = 0, b, _ = [], O = [], S, x = g.getStore(), C = !!t.get(["itemStyle", "borderColorDoji"]); (S = v.next()) != null; ) {
  70950. 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);
  70951. if (isNaN(T) || isNaN($) || isNaN(A)) {
  70952. m[y++] = NaN, y += 3;
  70953. continue;
  70954. }
  70955. m[y++] = gW(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;
  70956. }
  70957. g.setLayout("largePoints", m);
  70958. }
  70959. }
  70960. };
  70961. function gW(t, e, n, r, i, a) {
  70962. var o;
  70963. return n > r ? o = -1 : n < r ? o = 1 : o = a ? 0 : e > 0 ? t.get(i, e - 1) <= r ? 1 : -1 : 1, o;
  70964. }
  70965. function DWe(t, e) {
  70966. 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");
  70967. return s != null ? _e(s, i) : Math.max(Math.min(i / 2, a), o);
  70968. }
  70969. function RWe(t) {
  70970. t.registerChartView(_We), t.registerSeriesModel(ore), t.registerPreprocessor(CWe), t.registerVisual(MWe), t.registerLayout(IWe);
  70971. }
  70972. function mW(t, e) {
  70973. var n = e.rippleEffectColor || e.color;
  70974. t.eachChild(function(r) {
  70975. r.attr({
  70976. z: e.z,
  70977. zlevel: e.zlevel,
  70978. style: {
  70979. stroke: e.brushType === "stroke" ? n : null,
  70980. fill: e.brushType === "fill" ? n : null
  70981. }
  70982. });
  70983. });
  70984. }
  70985. var kWe = (
  70986. /** @class */
  70987. function(t) {
  70988. q(e, t);
  70989. function e(n, r) {
  70990. var i = t.call(this) || this, a = new j0(n, r), o = new Ve();
  70991. return i.add(a), i.add(o), i.updateData(n, r), i;
  70992. }
  70993. return e.prototype.stopEffectAnimation = function() {
  70994. this.childAt(1).removeAll();
  70995. }, e.prototype.startEffectAnimation = function(n) {
  70996. for (var r = n.symbolType, i = n.color, a = n.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) {
  70997. var l = $n(r, -1, -1, 2, 2, i);
  70998. l.attr({
  70999. style: {
  71000. strokeNoScale: !0
  71001. },
  71002. z2: 99,
  71003. silent: !0,
  71004. scaleX: 0.5,
  71005. scaleY: 0.5
  71006. });
  71007. var u = -s / a * n.period + n.effectOffset;
  71008. l.animate("", !0).when(n.period, {
  71009. scaleX: n.rippleScale / 2,
  71010. scaleY: n.rippleScale / 2
  71011. }).delay(u).start(), l.animateStyle(!0).when(n.period, {
  71012. opacity: 0
  71013. }).delay(u).start(), o.add(l);
  71014. }
  71015. mW(o, n);
  71016. }, e.prototype.updateEffectAnimation = function(n) {
  71017. for (var r = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) {
  71018. var s = a[o];
  71019. if (r[s] !== n[s]) {
  71020. this.stopEffectAnimation(), this.startEffectAnimation(n);
  71021. return;
  71022. }
  71023. }
  71024. mW(i, n);
  71025. }, e.prototype.highlight = function() {
  71026. js(this);
  71027. }, e.prototype.downplay = function() {
  71028. Zs(this);
  71029. }, e.prototype.getSymbolType = function() {
  71030. var n = this.childAt(0);
  71031. return n && n.getSymbolType();
  71032. }, e.prototype.updateData = function(n, r) {
  71033. var i = this, a = n.hostModel;
  71034. this.childAt(0).updateData(n, r);
  71035. var o = this.childAt(1), s = n.getItemModel(r), l = n.getItemVisual(r, "symbol"), u = xp(n.getItemVisual(r, "symbolSize")), c = n.getItemVisual(r, "style"), f = c && c.fill, d = s.getModel("emphasis");
  71036. o.setScale(u), o.traverse(function(g) {
  71037. g.setStyle("fill", f);
  71038. });
  71039. var h = Vf(n.getItemVisual(r, "symbolOffset"), u);
  71040. h && (o.x = h[0], o.y = h[1]);
  71041. var p = n.getItemVisual(r, "symbolRotate");
  71042. o.rotation = (p || 0) * Math.PI / 180 || 0;
  71043. var v = {};
  71044. 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) {
  71045. g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation();
  71046. }), this._effectCfg = v, bn(this, d.get("focus"), d.get("blurScope"), d.get("disabled"));
  71047. }, e.prototype.fadeOut = function(n) {
  71048. n && n();
  71049. }, e;
  71050. }(Ve)
  71051. ), LWe = (
  71052. /** @class */
  71053. function(t) {
  71054. q(e, t);
  71055. function e() {
  71056. var n = t !== null && t.apply(this, arguments) || this;
  71057. return n.type = e.type, n;
  71058. }
  71059. return e.prototype.init = function() {
  71060. this._symbolDraw = new Z0(kWe);
  71061. }, e.prototype.render = function(n, r, i) {
  71062. var a = n.getData(), o = this._symbolDraw;
  71063. o.updateData(a, {
  71064. clipShape: this._getClipShape(n)
  71065. }), this.group.add(o.group);
  71066. }, e.prototype._getClipShape = function(n) {
  71067. var r = n.coordinateSystem, i = r && r.getArea && r.getArea();
  71068. return n.get("clip", !0) ? i : null;
  71069. }, e.prototype.updateTransform = function(n, r, i) {
  71070. var a = n.getData();
  71071. this.group.dirty();
  71072. var o = X0("").reset(n, r, i);
  71073. o.progress && o.progress({
  71074. start: 0,
  71075. end: a.count(),
  71076. count: a.count()
  71077. }, a), this._symbolDraw.updateLayout();
  71078. }, e.prototype._updateGroupTransform = function(n) {
  71079. var r = n.coordinateSystem;
  71080. r && r.getRoamTransform && (this.group.transform = Iq(r.getRoamTransform()), this.group.decomposeTransform());
  71081. }, e.prototype.remove = function(n, r) {
  71082. this._symbolDraw && this._symbolDraw.remove(!0);
  71083. }, e.type = "effectScatter", e;
  71084. }(zt)
  71085. ), NWe = (
  71086. /** @class */
  71087. function(t) {
  71088. q(e, t);
  71089. function e() {
  71090. var n = t !== null && t.apply(this, arguments) || this;
  71091. return n.type = e.type, n.hasSymbolVisual = !0, n;
  71092. }
  71093. return e.prototype.getInitialData = function(n, r) {
  71094. return us(null, this, {
  71095. useEncodeDefaulter: !0
  71096. });
  71097. }, e.prototype.brushSelector = function(n, r, i) {
  71098. return i.point(r.getItemLayout(n));
  71099. }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
  71100. coordinateSystem: "cartesian2d",
  71101. // zlevel: 0,
  71102. z: 2,
  71103. legendHoverLink: !0,
  71104. effectType: "ripple",
  71105. progressive: 0,
  71106. // When to show the effect, option: 'render'|'emphasis'
  71107. showEffectOn: "render",
  71108. clip: !0,
  71109. // Ripple effect config
  71110. rippleEffect: {
  71111. period: 4,
  71112. // Scale of ripple
  71113. scale: 2.5,
  71114. // Brush type can be fill or stroke
  71115. brushType: "fill",
  71116. // Ripple number
  71117. number: 3
  71118. },
  71119. universalTransition: {
  71120. divideShape: "clone"
  71121. },
  71122. // Cartesian coordinate system
  71123. // xAxisIndex: 0,
  71124. // yAxisIndex: 0,
  71125. // Polar coordinate system
  71126. // polarIndex: 0,
  71127. // Geo coordinate system
  71128. // geoIndex: 0,
  71129. // symbol: null, // 图形类型
  71130. symbolSize: 10
  71131. // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
  71132. // symbolRotate: null, // 图形旋转控制
  71133. // itemStyle: {
  71134. // opacity: 1
  71135. // }
  71136. }, e;
  71137. }(Ht)
  71138. );
  71139. function BWe(t) {
  71140. t.registerChartView(LWe), t.registerSeriesModel(NWe), t.registerLayout(X0("effectScatter"));
  71141. }
  71142. var sre = (
  71143. /** @class */
  71144. function(t) {
  71145. q(e, t);
  71146. function e(n, r, i) {
  71147. var a = t.call(this) || this;
  71148. return a.add(a.createLine(n, r, i)), a._updateEffectSymbol(n, r), a;
  71149. }
  71150. return e.prototype.createLine = function(n, r, i) {
  71151. return new qk(n, r, i);
  71152. }, e.prototype._updateEffectSymbol = function(n, r) {
  71153. var i = n.getItemModel(r), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol");
  71154. ue(o) || (o = [o, o]);
  71155. var l = n.getItemVisual(r, "style"), u = a.get("color") || l && l.stroke, c = this.childAt(1);
  71156. 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));
  71157. }, e.prototype._updateEffectAnimation = function(n, r, i) {
  71158. var a = this.childAt(1);
  71159. if (a) {
  71160. 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) {
  71161. return h / n.count() * s / 3;
  71162. });
  71163. 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) {
  71164. a.stopAnimation();
  71165. var d = void 0;
  71166. Me(f) ? d = f(i) : d = f, a.__t > 0 && (d = -s * a.__t), this._animateSymbol(a, s, d, l, u);
  71167. }
  71168. this._period = s, this._loop = l, this._roundTrip = u;
  71169. }
  71170. }, e.prototype._animateSymbol = function(n, r, i, a, o) {
  71171. if (r > 0) {
  71172. n.__t = 0;
  71173. var s = this, l = n.animate("", a).when(o ? r * 2 : r, {
  71174. __t: o ? 2 : 1
  71175. }).delay(i).during(function() {
  71176. s._updateSymbolPosition(n);
  71177. });
  71178. a || l.done(function() {
  71179. s.remove(n);
  71180. }), l.start();
  71181. }
  71182. }, e.prototype._getLineLength = function(n) {
  71183. return Ts(n.__p1, n.__cp1) + Ts(n.__cp1, n.__p2);
  71184. }, e.prototype._updateAnimationPoints = function(n, r) {
  71185. 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];
  71186. }, e.prototype.updateData = function(n, r, i) {
  71187. this.childAt(0).updateData(n, r, i), this._updateEffectSymbol(n, r);
  71188. }, e.prototype._updateSymbolPosition = function(n) {
  71189. 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 = fA;
  71190. s[0] = u(r[0], a[0], i[0], o), s[1] = u(r[1], a[1], i[1], o);
  71191. 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);
  71192. 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 = Ts(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 * Ts(r, s) : n.scaleY = this._symbolScale[1]), n.__lastT = n.__t, n.ignore = !1, n.x = s[0], n.y = s[1];
  71193. }, e.prototype.updateLayout = function(n, r) {
  71194. this.childAt(0).updateLayout(n, r);
  71195. var i = n.getItemModel(r).getModel("effect");
  71196. this._updateEffectAnimation(n, i, r);
  71197. }, e;
  71198. }(Ve)
  71199. ), lre = (
  71200. /** @class */
  71201. function(t) {
  71202. q(e, t);
  71203. function e(n, r, i) {
  71204. var a = t.call(this) || this;
  71205. return a._createPolyline(n, r, i), a;
  71206. }
  71207. return e.prototype._createPolyline = function(n, r, i) {
  71208. var a = n.getItemLayout(r), o = new ai({
  71209. shape: {
  71210. points: a
  71211. }
  71212. });
  71213. this.add(o), this._updateCommonStl(n, r, i);
  71214. }, e.prototype.updateData = function(n, r, i) {
  71215. var a = n.hostModel, o = this.childAt(0), s = {
  71216. shape: {
  71217. points: n.getItemLayout(r)
  71218. }
  71219. };
  71220. Ct(o, s, a, r), this._updateCommonStl(n, r, i);
  71221. }, e.prototype._updateCommonStl = function(n, r, i) {
  71222. 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;
  71223. if (!i || n.hasItemOption) {
  71224. var f = o.getModel("emphasis");
  71225. s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), l = f.get("focus"), u = f.get("blurScope");
  71226. }
  71227. a.useStyle(n.getItemVisual(r, "style")), a.style.fill = null, a.style.strokeNoScale = !0;
  71228. var d = a.ensureState("emphasis");
  71229. d.style = s, bn(this, l, u, c);
  71230. }, e.prototype.updateLayout = function(n, r) {
  71231. var i = this.childAt(0);
  71232. i.setShape("points", n.getItemLayout(r));
  71233. }, e;
  71234. }(Ve)
  71235. ), zWe = (
  71236. /** @class */
  71237. function(t) {
  71238. q(e, t);
  71239. function e() {
  71240. var n = t !== null && t.apply(this, arguments) || this;
  71241. return n._lastFrame = 0, n._lastFramePercent = 0, n;
  71242. }
  71243. return e.prototype.createLine = function(n, r, i) {
  71244. return new lre(n, r, i);
  71245. }, e.prototype._updateAnimationPoints = function(n, r) {
  71246. this._points = r;
  71247. for (var i = [0], a = 0, o = 1; o < r.length; o++) {
  71248. var s = r[o - 1], l = r[o];
  71249. a += Ts(s, l), i.push(a);
  71250. }
  71251. if (a === 0) {
  71252. this._length = 0;
  71253. return;
  71254. }
  71255. for (var o = 0; o < i.length; o++)
  71256. i[o] /= a;
  71257. this._offsets = i, this._length = a;
  71258. }, e.prototype._getLineLength = function() {
  71259. return this._length;
  71260. }, e.prototype._updateSymbolPosition = function(n) {
  71261. var r = n.__t < 1 ? n.__t : 2 - n.__t, i = this._points, a = this._offsets, o = i.length;
  71262. if (a) {
  71263. var s = this._lastFrame, l;
  71264. if (r < this._lastFramePercent) {
  71265. var u = Math.min(s + 1, o - 1);
  71266. for (l = u; l >= 0 && !(a[l] <= r); l--)
  71267. ;
  71268. l = Math.min(l, o - 2);
  71269. } else {
  71270. for (l = s; l < o && !(a[l] > r); l++)
  71271. ;
  71272. l = Math.min(l - 1, o - 2);
  71273. }
  71274. var c = (r - a[l]) / (a[l + 1] - a[l]), f = i[l], d = i[l + 1];
  71275. n.x = f[0] * (1 - c) + c * d[0], n.y = f[1] * (1 - c) + c * d[1];
  71276. 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];
  71277. n.rotation = -Math.atan2(p, h) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = r, n.ignore = !1;
  71278. }
  71279. }, e;
  71280. }(sre)
  71281. ), VWe = (
  71282. /** @class */
  71283. /* @__PURE__ */ function() {
  71284. function t() {
  71285. this.polyline = !1, this.curveness = 0, this.segs = [];
  71286. }
  71287. return t;
  71288. }()
  71289. ), FWe = (
  71290. /** @class */
  71291. function(t) {
  71292. q(e, t);
  71293. function e(n) {
  71294. var r = t.call(this, n) || this;
  71295. return r._off = 0, r.hoverDataIdx = -1, r;
  71296. }
  71297. return e.prototype.reset = function() {
  71298. this.notClear = !1, this._off = 0;
  71299. }, e.prototype.getDefaultStyle = function() {
  71300. return {
  71301. stroke: "#000",
  71302. fill: null
  71303. };
  71304. }, e.prototype.getDefaultShape = function() {
  71305. return new VWe();
  71306. }, e.prototype.buildPath = function(n, r) {
  71307. var i = r.segs, a = r.curveness, o;
  71308. if (r.polyline)
  71309. for (o = this._off; o < i.length; ) {
  71310. var s = i[o++];
  71311. if (s > 0) {
  71312. n.moveTo(i[o++], i[o++]);
  71313. for (var l = 1; l < s; l++)
  71314. n.lineTo(i[o++], i[o++]);
  71315. }
  71316. }
  71317. else
  71318. for (o = this._off; o < i.length; ) {
  71319. var u = i[o++], c = i[o++], f = i[o++], d = i[o++];
  71320. if (n.moveTo(u, c), a > 0) {
  71321. var h = (u + f) / 2 - (c - d) * a, p = (c + d) / 2 - (f - u) * a;
  71322. n.quadraticCurveTo(h, p, f, d);
  71323. } else
  71324. n.lineTo(f, d);
  71325. }
  71326. this.incremental && (this._off = o, this.notClear = !0);
  71327. }, e.prototype.findDataIndex = function(n, r) {
  71328. var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth;
  71329. if (i.polyline)
  71330. for (var l = 0, u = 0; u < a.length; ) {
  71331. var c = a[u++];
  71332. if (c > 0)
  71333. for (var f = a[u++], d = a[u++], h = 1; h < c; h++) {
  71334. var p = a[u++], v = a[u++];
  71335. if (wl(f, d, p, v, s, n, r))
  71336. return l;
  71337. }
  71338. l++;
  71339. }
  71340. else
  71341. for (var l = 0, u = 0; u < a.length; ) {
  71342. var f = a[u++], d = a[u++], p = a[u++], v = a[u++];
  71343. if (o > 0) {
  71344. var g = (f + p) / 2 - (d - v) * o, m = (d + v) / 2 - (p - f) * o;
  71345. if (xK(f, d, g, m, p, v, s, n, r))
  71346. return l;
  71347. } else if (wl(f, d, p, v, s, n, r))
  71348. return l;
  71349. l++;
  71350. }
  71351. return -1;
  71352. }, e.prototype.contain = function(n, r) {
  71353. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  71354. if (n = i[0], r = i[1], a.contain(n, r)) {
  71355. var o = this.hoverDataIdx = this.findDataIndex(n, r);
  71356. return o >= 0;
  71357. }
  71358. return this.hoverDataIdx = -1, !1;
  71359. }, e.prototype.getBoundingRect = function() {
  71360. var n = this._rect;
  71361. if (!n) {
  71362. 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; ) {
  71363. var c = i[u++], f = i[u++];
  71364. a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), l = Math.max(f, l);
  71365. }
  71366. n = this._rect = new Je(a, o, s, l);
  71367. }
  71368. return n;
  71369. }, e;
  71370. }(ot)
  71371. ), WWe = (
  71372. /** @class */
  71373. function() {
  71374. function t() {
  71375. this.group = new Ve();
  71376. }
  71377. return t.prototype.updateData = function(e) {
  71378. this._clear();
  71379. var n = this._create();
  71380. n.setShape({
  71381. segs: e.getLayout("linesPoints")
  71382. }), this._setCommon(n, e);
  71383. }, t.prototype.incrementalPrepareUpdate = function(e) {
  71384. this.group.removeAll(), this._clear();
  71385. }, t.prototype.incrementalUpdate = function(e, n) {
  71386. var r = this._newAdded[0], i = n.getLayout("linesPoints"), a = r && r.shape.segs;
  71387. if (a && a.length < 2e4) {
  71388. var o = a.length, s = new Float32Array(o + i.length);
  71389. s.set(a), s.set(i, o), r.setShape({
  71390. segs: s
  71391. });
  71392. } else {
  71393. this._newAdded = [];
  71394. var l = this._create();
  71395. l.incremental = !0, l.setShape({
  71396. segs: i
  71397. }), this._setCommon(l, n), l.__startIndex = e.start;
  71398. }
  71399. }, t.prototype.remove = function() {
  71400. this._clear();
  71401. }, t.prototype.eachRendered = function(e) {
  71402. this._newAdded[0] && e(this._newAdded[0]);
  71403. }, t.prototype._create = function() {
  71404. var e = new FWe({
  71405. cursor: "default",
  71406. ignoreCoarsePointer: !0
  71407. });
  71408. return this._newAdded.push(e), this.group.add(e), e;
  71409. }, t.prototype._setCommon = function(e, n, r) {
  71410. var i = n.hostModel;
  71411. e.setShape({
  71412. polyline: i.get("polyline"),
  71413. curveness: i.get(["lineStyle", "curveness"])
  71414. }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
  71415. var a = n.getVisual("style");
  71416. a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null);
  71417. var o = Fe(e);
  71418. o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) {
  71419. o.dataIndex = null;
  71420. var l = e.hoverDataIdx;
  71421. l > 0 && (o.dataIndex = l + e.__startIndex);
  71422. });
  71423. }, t.prototype._clear = function() {
  71424. this._newAdded = [], this.group.removeAll();
  71425. }, t;
  71426. }()
  71427. ), ure = {
  71428. seriesType: "lines",
  71429. plan: Op(),
  71430. reset: function(t) {
  71431. var e = t.coordinateSystem;
  71432. if (!e) {
  71433. process.env.NODE_ENV !== "production" && Cr("The lines series must have a coordinate system.");
  71434. return;
  71435. }
  71436. var n = t.get("polyline"), r = t.pipelineContext.large;
  71437. return {
  71438. progress: function(i, a) {
  71439. var o = [];
  71440. if (r) {
  71441. var s = void 0, l = i.end - i.start;
  71442. if (n) {
  71443. for (var u = 0, c = i.start; c < i.end; c++)
  71444. u += t.getLineCoordsCount(c);
  71445. s = new Float32Array(l + u * 2);
  71446. } else
  71447. s = new Float32Array(l * 4);
  71448. for (var f = 0, d = [], c = i.start; c < i.end; c++) {
  71449. var h = t.getLineCoords(c, o);
  71450. n && (s[f++] = h);
  71451. for (var p = 0; p < h; p++)
  71452. d = e.dataToPoint(o[p], !1, d), s[f++] = d[0], s[f++] = d[1];
  71453. }
  71454. a.setLayout("linesPoints", s);
  71455. } else
  71456. for (var c = i.start; c < i.end; c++) {
  71457. var v = a.getItemModel(c), h = t.getLineCoords(c, o), g = [];
  71458. if (n)
  71459. for (var m = 0; m < h; m++)
  71460. g.push(e.dataToPoint(o[m]));
  71461. else {
  71462. g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
  71463. var y = v.get(["lineStyle", "curveness"]);
  71464. +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]);
  71465. }
  71466. a.setItemLayout(c, g);
  71467. }
  71468. }
  71469. };
  71470. }
  71471. }, QWe = (
  71472. /** @class */
  71473. function(t) {
  71474. q(e, t);
  71475. function e() {
  71476. var n = t !== null && t.apply(this, arguments) || this;
  71477. return n.type = e.type, n;
  71478. }
  71479. return e.prototype.render = function(n, r, i) {
  71480. 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";
  71481. c || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && u.configLayer(this._lastZlevel, {
  71482. motionBlur: !1
  71483. }), 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, {
  71484. motionBlur: !0,
  71485. lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
  71486. })), o.updateData(a);
  71487. var f = n.get("clip", !0) && U0(n.coordinateSystem, !1, n);
  71488. f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
  71489. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  71490. var a = n.getData(), o = this._updateLineDraw(a, n);
  71491. o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1;
  71492. }, e.prototype.incrementalRender = function(n, r, i) {
  71493. this._lineDraw.incrementalUpdate(n, r.getData()), this._finished = n.end === r.getData().count();
  71494. }, e.prototype.eachRendered = function(n) {
  71495. this._lineDraw && this._lineDraw.eachRendered(n);
  71496. }, e.prototype.updateTransform = function(n, r, i) {
  71497. var a = n.getData(), o = n.pipelineContext;
  71498. if (!this._finished || o.large || o.progressiveRender)
  71499. return {
  71500. update: !0
  71501. };
  71502. var s = ure.reset(n, r, i);
  71503. s.progress && s.progress({
  71504. start: 0,
  71505. end: a.count(),
  71506. count: a.count()
  71507. }, a), this._lineDraw.updateLayout(), this._clearLayer(i);
  71508. }, e.prototype._updateLineDraw = function(n, r) {
  71509. var i = this._lineDraw, a = this._showEffect(r), o = !!r.get("polyline"), s = r.pipelineContext, l = s.large;
  71510. 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 WWe() : new Kk(o ? a ? zWe : lre : a ? sre : qk), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = l), this.group.add(i.group), i;
  71511. }, e.prototype._showEffect = function(n) {
  71512. return !!n.get(["effect", "show"]);
  71513. }, e.prototype._clearLayer = function(n) {
  71514. var r = n.getZr(), i = r.painter.getType() === "svg";
  71515. !i && this._lastZlevel != null && r.painter.getLayer(this._lastZlevel).clear(!0);
  71516. }, e.prototype.remove = function(n, r) {
  71517. this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(r);
  71518. }, e.prototype.dispose = function(n, r) {
  71519. this.remove(n, r);
  71520. }, e.type = "lines", e;
  71521. }(zt)
  71522. ), HWe = typeof Uint32Array > "u" ? Array : Uint32Array, GWe = typeof Float64Array > "u" ? Array : Float64Array;
  71523. function yW(t) {
  71524. var e = t.data;
  71525. 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) {
  71526. var r = [n[0].coord, n[1].coord], i = {
  71527. coords: r
  71528. };
  71529. return n[0].name && (i.fromName = n[0].name), n[1].name && (i.toName = n[1].name), Dx([i, n[0], n[1]]);
  71530. }));
  71531. }
  71532. var jWe = (
  71533. /** @class */
  71534. function(t) {
  71535. q(e, t);
  71536. function e() {
  71537. var n = t !== null && t.apply(this, arguments) || this;
  71538. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
  71539. }
  71540. return e.prototype.init = function(n) {
  71541. n.data = n.data || [], yW(n);
  71542. var r = this._processFlatCoordsArray(n.data);
  71543. this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count)), t.prototype.init.apply(this, arguments);
  71544. }, e.prototype.mergeOption = function(n) {
  71545. if (yW(n), n.data) {
  71546. var r = this._processFlatCoordsArray(n.data);
  71547. this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count));
  71548. }
  71549. t.prototype.mergeOption.apply(this, arguments);
  71550. }, e.prototype.appendData = function(n) {
  71551. var r = this._processFlatCoordsArray(n.data);
  71552. r.flatCoords && (this._flatCoords ? (this._flatCoords = gm(this._flatCoords, r.flatCoords), this._flatCoordsOffset = gm(this._flatCoordsOffset, r.flatCoordsOffset)) : (this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset), n.data = new Float32Array(r.count)), this.getRawData().appendData(n.data);
  71553. }, e.prototype._getCoordsFromItemModel = function(n) {
  71554. var r = this.getData().getItemModel(n), i = r.option instanceof Array ? r.option : r.getShallow("coords");
  71555. if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array))
  71556. throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item.");
  71557. return i;
  71558. }, e.prototype.getLineCoordsCount = function(n) {
  71559. return this._flatCoordsOffset ? this._flatCoordsOffset[n * 2 + 1] : this._getCoordsFromItemModel(n).length;
  71560. }, e.prototype.getLineCoords = function(n, r) {
  71561. if (this._flatCoordsOffset) {
  71562. for (var i = this._flatCoordsOffset[n * 2], a = this._flatCoordsOffset[n * 2 + 1], o = 0; o < a; o++)
  71563. r[o] = r[o] || [], r[o][0] = this._flatCoords[i + o * 2], r[o][1] = this._flatCoords[i + o * 2 + 1];
  71564. return a;
  71565. } else {
  71566. for (var s = this._getCoordsFromItemModel(n), o = 0; o < s.length; o++)
  71567. r[o] = r[o] || [], r[o][0] = s[o][0], r[o][1] = s[o][1];
  71568. return s.length;
  71569. }
  71570. }, e.prototype._processFlatCoordsArray = function(n) {
  71571. var r = 0;
  71572. if (this._flatCoords && (r = this._flatCoords.length), St(n[0])) {
  71573. for (var i = n.length, a = new HWe(i), o = new GWe(i), s = 0, l = 0, u = 0, c = 0; c < i; ) {
  71574. u++;
  71575. var f = n[c++];
  71576. a[l++] = s + r, a[l++] = f;
  71577. for (var d = 0; d < f; d++) {
  71578. var h = n[c++], p = n[c++];
  71579. if (o[s++] = h, o[s++] = p, c > i && process.env.NODE_ENV !== "production")
  71580. throw new Error("Invalid data format.");
  71581. }
  71582. }
  71583. return {
  71584. flatCoordsOffset: new Uint32Array(a.buffer, 0, l),
  71585. flatCoords: o,
  71586. count: u
  71587. };
  71588. }
  71589. return {
  71590. flatCoordsOffset: null,
  71591. flatCoords: null,
  71592. count: n.length
  71593. };
  71594. }, e.prototype.getInitialData = function(n, r) {
  71595. if (process.env.NODE_ENV !== "production") {
  71596. var i = zf.get(n.coordinateSystem);
  71597. if (!i)
  71598. throw new Error("Unknown coordinate system " + n.coordinateSystem);
  71599. }
  71600. var a = new Lr(["value"], this);
  71601. return a.hasItemOption = !1, a.initData(n.data, [], function(o, s, l, u) {
  71602. if (o instanceof Array)
  71603. return NaN;
  71604. a.hasItemOption = !0;
  71605. var c = o.value;
  71606. if (c != null)
  71607. return c instanceof Array ? c[u] : c;
  71608. }), a;
  71609. }, e.prototype.formatTooltip = function(n, r, i) {
  71610. var a = this.getData(), o = a.getItemModel(n), s = o.get("name");
  71611. if (s)
  71612. return s;
  71613. var l = o.get("fromName"), u = o.get("toName"), c = [];
  71614. return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
  71615. name: c.join(" > ")
  71616. });
  71617. }, e.prototype.preventIncremental = function() {
  71618. return !!this.get(["effect", "show"]);
  71619. }, e.prototype.getProgressive = function() {
  71620. var n = this.option.progressive;
  71621. return n ?? (this.option.large ? 1e4 : this.get("progressive"));
  71622. }, e.prototype.getProgressiveThreshold = function() {
  71623. var n = this.option.progressiveThreshold;
  71624. return n ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
  71625. }, e.prototype.getZLevelKey = function() {
  71626. var n = this.getModel("effect"), r = n.get("trailLength");
  71627. return this.getData().count() > this.getProgressiveThreshold() ? this.id : n.get("show") && r > 0 ? r + "" : "";
  71628. }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
  71629. coordinateSystem: "geo",
  71630. // zlevel: 0,
  71631. z: 2,
  71632. legendHoverLink: !0,
  71633. // Cartesian coordinate system
  71634. xAxisIndex: 0,
  71635. yAxisIndex: 0,
  71636. symbol: ["none", "none"],
  71637. symbolSize: [10, 10],
  71638. // Geo coordinate system
  71639. geoIndex: 0,
  71640. effect: {
  71641. show: !1,
  71642. period: 4,
  71643. constantSpeed: 0,
  71644. symbol: "circle",
  71645. symbolSize: 3,
  71646. loop: !0,
  71647. trailLength: 0.2
  71648. },
  71649. large: !1,
  71650. // Available when large is true
  71651. largeThreshold: 2e3,
  71652. polyline: !1,
  71653. clip: !0,
  71654. label: {
  71655. show: !1,
  71656. position: "end"
  71657. // distance: 5,
  71658. // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
  71659. },
  71660. lineStyle: {
  71661. opacity: 0.5
  71662. }
  71663. }, e;
  71664. }(Ht)
  71665. );
  71666. function Mb(t) {
  71667. return t instanceof Array || (t = [t, t]), t;
  71668. }
  71669. var ZWe = {
  71670. seriesType: "lines",
  71671. reset: function(t) {
  71672. var e = Mb(t.get("symbol")), n = Mb(t.get("symbolSize")), r = t.getData();
  71673. r.setVisual("fromSymbol", e && e[0]), r.setVisual("toSymbol", e && e[1]), r.setVisual("fromSymbolSize", n && n[0]), r.setVisual("toSymbolSize", n && n[1]);
  71674. function i(a, o) {
  71675. var s = a.getItemModel(o), l = Mb(s.getShallow("symbol", !0)), u = Mb(s.getShallow("symbolSize", !0));
  71676. 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]);
  71677. }
  71678. return {
  71679. dataEach: r.hasItemOption ? i : null
  71680. };
  71681. }
  71682. };
  71683. function UWe(t) {
  71684. t.registerChartView(QWe), t.registerSeriesModel(jWe), t.registerLayout(ure), t.registerVisual(ZWe);
  71685. }
  71686. var XWe = 256, YWe = (
  71687. /** @class */
  71688. function() {
  71689. function t() {
  71690. this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
  71691. inRange: null,
  71692. outOfRange: null
  71693. };
  71694. var e = io.createCanvas();
  71695. this.canvas = e;
  71696. }
  71697. return t.prototype.update = function(e, n, r, i, a, o) {
  71698. 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;
  71699. f.width = n, f.height = r;
  71700. for (var p = 0; p < h; ++p) {
  71701. var v = e[p], g = v[0], m = v[1], y = v[2], b = i(y);
  71702. d.globalAlpha = b, d.drawImage(s, g - c, m - c);
  71703. }
  71704. if (!f.width || !f.height)
  71705. return f;
  71706. 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; ) {
  71707. var b = O[S + 3] / 256, P = Math.floor(b * (XWe - 1)) * 4;
  71708. if (b > 0) {
  71709. var $ = o(b) ? l : u;
  71710. b > 0 && (b = b * w + C), O[S++] = $[P], O[S++] = $[P + 1], O[S++] = $[P + 2], O[S++] = $[P + 3] * b * 256;
  71711. } else
  71712. S += 4;
  71713. }
  71714. return d.putImageData(_, 0, 0), f;
  71715. }, t.prototype._getBrush = function() {
  71716. var e = this._brushCanvas || (this._brushCanvas = io.createCanvas()), n = this.pointSize + this.blurSize, r = n * 2;
  71717. e.width = r, e.height = r;
  71718. var i = e.getContext("2d");
  71719. 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;
  71720. }, t.prototype._getGradient = function(e, n) {
  71721. 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++)
  71722. e[n](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3];
  71723. return i;
  71724. }, t;
  71725. }()
  71726. );
  71727. function qWe(t, e, n) {
  71728. var r = t[1] - t[0];
  71729. e = ce(e, function(o) {
  71730. return {
  71731. interval: [(o.interval[0] - t[0]) / r, (o.interval[1] - t[0]) / r]
  71732. };
  71733. });
  71734. var i = e.length, a = 0;
  71735. return function(o) {
  71736. var s;
  71737. for (s = a; s < i; s++) {
  71738. var l = e[s].interval;
  71739. if (l[0] <= o && o <= l[1]) {
  71740. a = s;
  71741. break;
  71742. }
  71743. }
  71744. if (s === i)
  71745. for (s = a - 1; s >= 0; s--) {
  71746. var l = e[s].interval;
  71747. if (l[0] <= o && o <= l[1]) {
  71748. a = s;
  71749. break;
  71750. }
  71751. }
  71752. return s >= 0 && s < i && n[s];
  71753. };
  71754. }
  71755. function KWe(t, e) {
  71756. var n = t[1] - t[0];
  71757. return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n], function(r) {
  71758. return r >= e[0] && r <= e[1];
  71759. };
  71760. }
  71761. function bW(t) {
  71762. var e = t.dimensions;
  71763. return e[0] === "lng" && e[1] === "lat";
  71764. }
  71765. var JWe = (
  71766. /** @class */
  71767. function(t) {
  71768. q(e, t);
  71769. function e() {
  71770. var n = t !== null && t.apply(this, arguments) || this;
  71771. return n.type = e.type, n;
  71772. }
  71773. return e.prototype.render = function(n, r, i) {
  71774. var a;
  71775. if (r.eachComponent("visualMap", function(s) {
  71776. s.eachTargetSeries(function(l) {
  71777. l === n && (a = s);
  71778. });
  71779. }), process.env.NODE_ENV !== "production" && !a)
  71780. throw new Error("Heatmap must use with visualMap");
  71781. this._progressiveEls = null, this.group.removeAll();
  71782. var o = n.coordinateSystem;
  71783. o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(n, i, 0, n.getData().count()) : bW(o) && this._renderOnGeo(o, n, a, i);
  71784. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  71785. this.group.removeAll();
  71786. }, e.prototype.incrementalRender = function(n, r, i, a) {
  71787. var o = r.coordinateSystem;
  71788. o && (bW(o) ? this.render(r, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(r, a, n.start, n.end, !0)));
  71789. }, e.prototype.eachRendered = function(n) {
  71790. Tu(this._progressiveEls || this.group, n);
  71791. }, e.prototype._renderOnCartesianAndCalendar = function(n, r, i, a, o) {
  71792. var s = n.coordinateSystem, l = Ff(s, "cartesian2d"), u, c, f, d;
  71793. if (l) {
  71794. var h = s.getAxis("x"), p = s.getAxis("y");
  71795. if (process.env.NODE_ENV !== "production") {
  71796. if (!(h.type === "category" && p.type === "category"))
  71797. throw new Error("Heatmap on cartesian must have two category axes");
  71798. if (!(h.onBand && p.onBand))
  71799. throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
  71800. }
  71801. u = h.getBandWidth() + 0.5, c = p.getBandWidth() + 0.5, f = h.scale.getExtent(), d = p.scale.getExtent();
  71802. }
  71803. 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++) {
  71804. var $ = void 0, A = g.getItemVisual(P, "style");
  71805. if (l) {
  71806. var D = g.get(w[0], P), E = g.get(w[1], P);
  71807. if (isNaN(g.get(w[2], P)) || isNaN(D) || isNaN(E) || D < f[0] || D > f[1] || E < d[0] || E > d[1])
  71808. continue;
  71809. var R = s.dataToPoint([D, E]);
  71810. $ = new mt({
  71811. shape: {
  71812. x: R[0] - u / 2,
  71813. y: R[1] - c / 2,
  71814. width: u,
  71815. height: c
  71816. },
  71817. style: A
  71818. });
  71819. } else {
  71820. if (isNaN(g.get(w[1], P)))
  71821. continue;
  71822. $ = new mt({
  71823. z2: 1,
  71824. shape: s.dataToRect([g.get(w[0], P)]).contentShape,
  71825. style: A
  71826. });
  71827. }
  71828. if (g.hasItemOption) {
  71829. var N = g.getItemModel(P), V = N.getModel("emphasis");
  71830. 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);
  71831. }
  71832. $.shape.r = _;
  71833. var z = n.getRawValue(P), W = "-";
  71834. z && z[2] != null && (W = z[2] + ""), Pr($, O, {
  71835. labelFetcher: n,
  71836. labelDataIndex: P,
  71837. defaultOpacity: A.opacity,
  71838. defaultText: W
  71839. }), $.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($);
  71840. }
  71841. }, e.prototype._renderOnGeo = function(n, r, i, a) {
  71842. var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, l = r.getData(), u = this._hmLayer || this._hmLayer || new YWe();
  71843. u.blurSize = r.get("blurSize"), u.pointSize = r.get("pointSize"), u.minOpacity = r.get("minOpacity"), u.maxOpacity = r.get("maxOpacity");
  71844. var c = n.getViewRect().clone(), f = n.getRoamTransform();
  71845. c.applyTransform(f);
  71846. 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) {
  71847. var w = n.dataToPoint([x, C]);
  71848. return w[0] -= d, w[1] -= h, w.push(T), w;
  71849. }), _ = i.getExtent(), O = i.type === "visualMap.continuous" ? KWe(_, i.option.range) : qWe(_, i.getPieceList(), i.option.selected);
  71850. u.update(b, g, m, o.color.getNormalizer(), {
  71851. inRange: o.color.getColorMapper(),
  71852. outOfRange: s.color.getColorMapper()
  71853. }, O);
  71854. var S = new lr({
  71855. style: {
  71856. width: g,
  71857. height: m,
  71858. x: d,
  71859. y: h,
  71860. image: u.canvas
  71861. },
  71862. silent: !0
  71863. });
  71864. this.group.add(S);
  71865. }, e.type = "heatmap", e;
  71866. }(zt)
  71867. ), e7e = (
  71868. /** @class */
  71869. function(t) {
  71870. q(e, t);
  71871. function e() {
  71872. var n = t !== null && t.apply(this, arguments) || this;
  71873. return n.type = e.type, n;
  71874. }
  71875. return e.prototype.getInitialData = function(n, r) {
  71876. return us(null, this, {
  71877. generateCoord: "value"
  71878. });
  71879. }, e.prototype.preventIncremental = function() {
  71880. var n = zf.get(this.get("coordinateSystem"));
  71881. if (n && n.dimensions)
  71882. return n.dimensions[0] === "lng" && n.dimensions[1] === "lat";
  71883. }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
  71884. coordinateSystem: "cartesian2d",
  71885. // zlevel: 0,
  71886. z: 2,
  71887. // Cartesian coordinate system
  71888. // xAxisIndex: 0,
  71889. // yAxisIndex: 0,
  71890. // Geo coordinate system
  71891. geoIndex: 0,
  71892. blurSize: 30,
  71893. pointSize: 20,
  71894. maxOpacity: 1,
  71895. minOpacity: 0,
  71896. select: {
  71897. itemStyle: {
  71898. borderColor: "#212121"
  71899. }
  71900. }
  71901. }, e;
  71902. }(Ht)
  71903. );
  71904. function t7e(t) {
  71905. t.registerChartView(JWe), t.registerSeriesModel(e7e);
  71906. }
  71907. var n7e = ["itemStyle", "borderWidth"], _W = [{
  71908. xy: "x",
  71909. wh: "width",
  71910. index: 0,
  71911. posDesc: ["left", "right"]
  71912. }, {
  71913. xy: "y",
  71914. wh: "height",
  71915. index: 1,
  71916. posDesc: ["top", "bottom"]
  71917. }], BP = new ll(), r7e = (
  71918. /** @class */
  71919. function(t) {
  71920. q(e, t);
  71921. function e() {
  71922. var n = t !== null && t.apply(this, arguments) || this;
  71923. return n.type = e.type, n;
  71924. }
  71925. return e.prototype.render = function(n, r, i) {
  71926. var a = this.group, o = n.getData(), s = this._data, l = n.coordinateSystem, u = l.getBaseAxis(), c = u.isHorizontal(), f = l.master.getRect(), d = {
  71927. ecSize: {
  71928. width: i.getWidth(),
  71929. height: i.getHeight()
  71930. },
  71931. seriesModel: n,
  71932. coordSys: l,
  71933. coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]],
  71934. isHorizontal: c,
  71935. valueDim: _W[+c],
  71936. categoryDim: _W[1 - +c]
  71937. };
  71938. o.diff(s).add(function(p) {
  71939. if (o.hasValue(p)) {
  71940. var v = SW(o, p), g = OW(o, p, v, d), m = xW(o, d, g);
  71941. o.setItemGraphicEl(p, m), a.add(m), CW(m, d, g);
  71942. }
  71943. }).update(function(p, v) {
  71944. var g = s.getItemGraphicEl(v);
  71945. if (!o.hasValue(p)) {
  71946. a.remove(g);
  71947. return;
  71948. }
  71949. var m = SW(o, p), y = OW(o, p, m, d), b = vre(o, y);
  71950. g && b !== g.__pictorialShapeStr && (a.remove(g), o.setItemGraphicEl(p, null), g = null), g ? c7e(g, d, y) : g = xW(o, d, y, !0), o.setItemGraphicEl(p, g), g.__pictorialSymbolMeta = y, a.add(g), CW(g, d, y);
  71951. }).remove(function(p) {
  71952. var v = s.getItemGraphicEl(p);
  71953. v && wW(s, p, v.__pictorialSymbolMeta.animationModel, v);
  71954. }).execute();
  71955. var h = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
  71956. return h ? a.setClipPath(h) : a.removeClipPath(), this._data = o, this.group;
  71957. }, e.prototype.remove = function(n, r) {
  71958. var i = this.group, a = this._data;
  71959. n.get("animation") ? a && a.eachItemGraphicEl(function(o) {
  71960. wW(a, Fe(o).dataIndex, n, o);
  71961. }) : i.removeAll();
  71962. }, e.type = "pictorialBar", e;
  71963. }(zt)
  71964. );
  71965. function OW(t, e, n, r) {
  71966. 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 = {
  71967. dataIndex: e,
  71968. layout: i,
  71969. itemModel: n,
  71970. symbolType: t.getItemVisual(e, "symbol") || "circle",
  71971. style: t.getItemVisual(e, "style"),
  71972. symbolClip: o,
  71973. symbolRepeat: a,
  71974. symbolRepeatDirection: n.get("symbolRepeatDirection"),
  71975. symbolPatternSize: c,
  71976. rotation: u,
  71977. animationModel: f ? n : null,
  71978. hoverScale: f && n.get(["emphasis", "scale"]),
  71979. z2: n.getShallow("z", !0) || 0
  71980. };
  71981. i7e(n, a, i, r, d), a7e(t, e, i, a, o, d.boundingLength, d.pxSign, c, r, d), o7e(n, d.symbolScale, u, r, d);
  71982. var h = d.symbolSize, p = Vf(n.get("symbolOffset"), h);
  71983. return s7e(n, h, i, a, o, p, s, d.valueLineWidth, d.boundingLength, d.repeatCutLength, r, d), d;
  71984. }
  71985. function i7e(t, e, n, r, i) {
  71986. 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;
  71987. if (ue(o)) {
  71988. var f = [zP(s, o[0]) - l, zP(s, o[1]) - l];
  71989. f[1] < f[0] && f.reverse(), c = f[u];
  71990. } else o != null ? c = zP(s, o) - l : e ? c = r.coordSysExtent[a.index][u] - l : c = n[a.wh];
  71991. i.boundingLength = c, e && (i.repeatCutLength = n[a.wh]), i.pxSign = c > 0 ? 1 : -1;
  71992. }
  71993. function zP(t, e) {
  71994. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)));
  71995. }
  71996. function a7e(t, e, n, r, i, a, o, s, l, u) {
  71997. var c = l.valueDim, f = l.categoryDim, d = Math.abs(n[f.wh]), h = t.getItemVisual(e, "symbolSize"), p;
  71998. 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;
  71999. var v = u.symbolScale = [p[0] / s, p[1] / s];
  72000. v[c.index] *= (l.isHorizontal ? -1 : 1) * o;
  72001. }
  72002. function o7e(t, e, n, r, i) {
  72003. var a = t.get(n7e) || 0;
  72004. a && (BP.attr({
  72005. scaleX: e[0],
  72006. scaleY: e[1],
  72007. rotation: n
  72008. }), BP.updateTransform(), a /= BP.getLineScale(), a *= e[r.valueDim.index]), i.valueLineWidth = a || 0;
  72009. }
  72010. function s7e(t, e, n, r, i, a, o, s, l, u, c, f) {
  72011. var d = c.categoryDim, h = c.valueDim, p = f.pxSign, v = Math.max(e[h.index] + s, 0), g = v;
  72012. if (r) {
  72013. var m = Math.abs(l), y = Tn(t.get("symbolMargin"), "15%") + "", b = !1;
  72014. y.lastIndexOf("!") === y.length - 1 && (b = !0, y = y.slice(0, y.length - 1));
  72015. var _ = _e(y, e[h.index]), O = Math.max(v + _ * 2, 0), S = b ? 0 : _ * 2, x = Fx(r), C = x ? r : TW((m + S) / O), T = m - C * v;
  72016. _ = T / 2 / (b ? C : Math.max(C - 1, 1)), O = v + _ * 2, S = b ? 0 : _ * 2, !x && r !== "fixed" && (C = u ? TW((Math.abs(u) + S) / O) : 0), g = C * O - S, f.repeatTimes = C, f.symbolMargin = _;
  72017. }
  72018. var w = p * (g / 2), P = f.pathPosition = [];
  72019. 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]);
  72020. var $ = f.bundlePosition = [];
  72021. $[d.index] = n[d.xy], $[h.index] = n[h.xy];
  72022. var A = f.barRectShape = le({}, n);
  72023. A[h.wh] = p * Math.max(Math.abs(n[h.wh]), Math.abs(P[h.index] + w)), A[d.wh] = n[d.wh];
  72024. var D = f.clipShape = {};
  72025. D[d.xy] = -n[d.xy], D[d.wh] = c.ecSize[d.wh], D[h.xy] = 0, D[h.wh] = n[h.wh];
  72026. }
  72027. function cre(t) {
  72028. var e = t.symbolPatternSize, n = $n(
  72029. // Consider texture img, make a big size.
  72030. t.symbolType,
  72031. -e / 2,
  72032. -e / 2,
  72033. e,
  72034. e
  72035. );
  72036. return n.attr({
  72037. culling: !0
  72038. }), n.type !== "image" && n.setStyle({
  72039. strokeNoScale: !0
  72040. }), n;
  72041. }
  72042. function fre(t, e, n, r) {
  72043. 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;
  72044. for (oL(t, function(v) {
  72045. v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = u, c < u ? ah(v, null, p(c), n, r) : ah(v, null, {
  72046. scaleX: 0,
  72047. scaleY: 0
  72048. }, n, r, function() {
  72049. i.remove(v);
  72050. }), c++;
  72051. }); c < u; c++) {
  72052. var d = cre(n);
  72053. d.__pictorialAnimationIndex = c, d.__pictorialRepeatTimes = u, i.add(d);
  72054. var h = p(c);
  72055. ah(d, {
  72056. x: h.x,
  72057. y: h.y,
  72058. scaleX: 0,
  72059. scaleY: 0
  72060. }, {
  72061. scaleX: h.scaleX,
  72062. scaleY: h.scaleY,
  72063. rotation: h.rotation
  72064. }, n, r);
  72065. }
  72066. function p(v) {
  72067. var g = s.slice(), m = n.pxSign, y = v;
  72068. return (n.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = u - 1 - v), g[l.index] = f * (y - u / 2 + 0.5) + s[l.index], {
  72069. x: g[0],
  72070. y: g[1],
  72071. scaleX: n.symbolScale[0],
  72072. scaleY: n.symbolScale[1],
  72073. rotation: n.rotation
  72074. };
  72075. }
  72076. }
  72077. function dre(t, e, n, r) {
  72078. var i = t.__pictorialBundle, a = t.__pictorialMainPath;
  72079. a ? ah(a, null, {
  72080. x: n.pathPosition[0],
  72081. y: n.pathPosition[1],
  72082. scaleX: n.symbolScale[0],
  72083. scaleY: n.symbolScale[1],
  72084. rotation: n.rotation
  72085. }, n, r) : (a = t.__pictorialMainPath = cre(n), i.add(a), ah(a, {
  72086. x: n.pathPosition[0],
  72087. y: n.pathPosition[1],
  72088. scaleX: 0,
  72089. scaleY: 0,
  72090. rotation: n.rotation
  72091. }, {
  72092. scaleX: n.symbolScale[0],
  72093. scaleY: n.symbolScale[1]
  72094. }, n, r));
  72095. }
  72096. function hre(t, e, n) {
  72097. var r = le({}, e.barRectShape), i = t.__pictorialBarRect;
  72098. i ? ah(i, null, {
  72099. shape: r
  72100. }, e, n) : (i = t.__pictorialBarRect = new mt({
  72101. z2: 2,
  72102. shape: r,
  72103. silent: !0,
  72104. style: {
  72105. stroke: "transparent",
  72106. fill: "transparent",
  72107. lineWidth: 0
  72108. }
  72109. }), i.disableMorphing = !0, t.add(i));
  72110. }
  72111. function pre(t, e, n, r) {
  72112. if (n.symbolClip) {
  72113. var i = t.__pictorialClipPath, a = le({}, n.clipShape), o = e.valueDim, s = n.animationModel, l = n.dataIndex;
  72114. if (i)
  72115. Ct(i, {
  72116. shape: a
  72117. }, s, l);
  72118. else {
  72119. a[o.wh] = 0, i = new mt({
  72120. shape: a
  72121. }), t.__pictorialBundle.setClipPath(i), t.__pictorialClipPath = i;
  72122. var u = {};
  72123. u[o.wh] = n.clipShape[o.wh], Lf[r ? "updateProps" : "initProps"](i, {
  72124. shape: u
  72125. }, s, l);
  72126. }
  72127. }
  72128. }
  72129. function SW(t, e) {
  72130. var n = t.getItemModel(e);
  72131. return n.getAnimationDelayParams = l7e, n.isAnimationEnabled = u7e, n;
  72132. }
  72133. function l7e(t) {
  72134. return {
  72135. index: t.__pictorialAnimationIndex,
  72136. count: t.__pictorialRepeatTimes
  72137. };
  72138. }
  72139. function u7e() {
  72140. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
  72141. }
  72142. function xW(t, e, n, r) {
  72143. var i = new Ve(), a = new Ve();
  72144. return i.add(a), i.__pictorialBundle = a, a.x = n.bundlePosition[0], a.y = n.bundlePosition[1], n.symbolRepeat ? fre(i, e, n) : dre(i, e, n), hre(i, n, r), pre(i, e, n, r), i.__pictorialShapeStr = vre(t, n), i.__pictorialSymbolMeta = n, i;
  72145. }
  72146. function c7e(t, e, n) {
  72147. var r = n.animationModel, i = n.dataIndex, a = t.__pictorialBundle;
  72148. Ct(a, {
  72149. x: n.bundlePosition[0],
  72150. y: n.bundlePosition[1]
  72151. }, r, i), n.symbolRepeat ? fre(t, e, n, !0) : dre(t, e, n, !0), hre(t, n, !0), pre(t, e, n, !0);
  72152. }
  72153. function wW(t, e, n, r) {
  72154. var i = r.__pictorialBarRect;
  72155. i && i.removeTextContent();
  72156. var a = [];
  72157. oL(r, function(o) {
  72158. a.push(o);
  72159. }), r.__pictorialMainPath && a.push(r.__pictorialMainPath), r.__pictorialClipPath && (n = null), k(a, function(o) {
  72160. uu(o, {
  72161. scaleX: 0,
  72162. scaleY: 0
  72163. }, n, e, function() {
  72164. r.parent && r.parent.remove(r);
  72165. });
  72166. }), t.setItemGraphicEl(e, null);
  72167. }
  72168. function vre(t, e) {
  72169. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
  72170. }
  72171. function oL(t, e, n) {
  72172. k(t.__pictorialBundle.children(), function(r) {
  72173. r !== t.__pictorialBarRect && e.call(n, r);
  72174. });
  72175. }
  72176. function ah(t, e, n, r, i, a) {
  72177. e && t.attr(e), r.symbolClip && !i ? n && t.attr(n) : n && Lf[i ? "updateProps" : "initProps"](t, n, r.animationModel, r.dataIndex, a);
  72178. }
  72179. function CW(t, e, n) {
  72180. 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");
  72181. oL(t, function(v) {
  72182. if (v instanceof lr) {
  72183. var g = v.style;
  72184. v.useStyle(le({
  72185. // TODO other properties like dx, dy ?
  72186. image: g.image,
  72187. x: g.x,
  72188. y: g.y,
  72189. width: g.width,
  72190. height: g.height
  72191. }, n.style));
  72192. } else
  72193. v.useStyle(n.style);
  72194. var m = v.ensureState("emphasis");
  72195. 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;
  72196. });
  72197. var h = e.valueDim.posDesc[+(n.boundingLength > 0)], p = t.__pictorialBarRect;
  72198. p.ignoreClip = !0, Pr(p, er(i), {
  72199. labelFetcher: e.seriesModel,
  72200. labelDataIndex: r,
  72201. defaultText: Wh(e.seriesModel.getData(), r),
  72202. inheritColor: n.style.fill,
  72203. defaultOpacity: n.style.opacity,
  72204. defaultOutsidePosition: h
  72205. }), bn(t, c, f, a.get("disabled"));
  72206. }
  72207. function TW(t) {
  72208. var e = Math.round(t);
  72209. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t);
  72210. }
  72211. var f7e = (
  72212. /** @class */
  72213. function(t) {
  72214. q(e, t);
  72215. function e() {
  72216. var n = t !== null && t.apply(this, arguments) || this;
  72217. return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n;
  72218. }
  72219. return e.prototype.getInitialData = function(n) {
  72220. return n.stack = null, t.prototype.getInitialData.apply(this, arguments);
  72221. }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Pu(Rm.defaultOption, {
  72222. symbol: "circle",
  72223. symbolSize: null,
  72224. symbolRotate: null,
  72225. symbolPosition: null,
  72226. symbolOffset: null,
  72227. symbolMargin: null,
  72228. symbolRepeat: !1,
  72229. symbolRepeatDirection: "end",
  72230. symbolClip: !1,
  72231. symbolBoundingData: null,
  72232. symbolPatternSize: 400,
  72233. barGap: "-100%",
  72234. // Pictorial bar do not clip by default because in many cases
  72235. // xAxis and yAxis are not displayed and it's expected not to clip
  72236. clip: !1,
  72237. // z can be set in data item, which is z2 actually.
  72238. // Disable progressive
  72239. progressive: 0,
  72240. emphasis: {
  72241. // By default pictorialBar do not hover scale. Hover scale is not suitable
  72242. // for the case that both has foreground and background.
  72243. scale: !1
  72244. },
  72245. select: {
  72246. itemStyle: {
  72247. borderColor: "#212121"
  72248. }
  72249. }
  72250. }), e;
  72251. }(Rm)
  72252. );
  72253. function d7e(t) {
  72254. t.registerChartView(r7e), t.registerSeriesModel(f7e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(qee, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Kee("pictorialBar"));
  72255. }
  72256. var h7e = (
  72257. /** @class */
  72258. function(t) {
  72259. q(e, t);
  72260. function e() {
  72261. var n = t !== null && t.apply(this, arguments) || this;
  72262. return n.type = e.type, n._layers = [], n;
  72263. }
  72264. return e.prototype.render = function(n, r, i) {
  72265. var a = n.getData(), o = this, s = this.group, l = n.getLayerSeries(), u = a.getLayout("layoutInfo"), c = u.rect, f = u.boundaryGap;
  72266. s.x = 0, s.y = c.y + f[0];
  72267. function d(g) {
  72268. return g.name;
  72269. }
  72270. var h = new Us(this._layersSeries || [], l, d, d), p = [];
  72271. h.add(xe(v, this, "add")).update(xe(v, this, "update")).remove(xe(v, this, "remove")).execute();
  72272. function v(g, m, y) {
  72273. var b = o._layers;
  72274. if (g === "remove") {
  72275. s.remove(b[m]);
  72276. return;
  72277. }
  72278. for (var _ = [], O = [], S, x = l[m].indices, C = 0; C < x.length; C++) {
  72279. var T = a.getItemLayout(x[C]), w = T.x, P = T.y0, $ = T.y;
  72280. _.push(w, P), O.push(w, P + $), S = a.getItemVisual(x[C], "style");
  72281. }
  72282. var A, D = a.getItemLayout(x[0]), E = n.getModel("label"), R = E.get("margin"), N = n.getModel("emphasis");
  72283. if (g === "add") {
  72284. var V = p[m] = new Ve();
  72285. A = new Vte({
  72286. shape: {
  72287. points: _,
  72288. stackedOnPoints: O,
  72289. smooth: 0.4,
  72290. stackedOnSmooth: 0.4,
  72291. smoothConstraint: !1
  72292. },
  72293. z2: 0
  72294. }), V.add(A), s.add(V), n.isAnimationEnabled() && A.setClipPath(p7e(A.getBoundingRect(), n, function() {
  72295. A.removeClipPath();
  72296. }));
  72297. } else {
  72298. var V = b[y];
  72299. A = V.childAt(0), s.add(V), p[m] = V, Ct(A, {
  72300. shape: {
  72301. points: _,
  72302. stackedOnPoints: O
  72303. }
  72304. }, n), so(A);
  72305. }
  72306. Pr(A, er(n), {
  72307. labelDataIndex: x[C - 1],
  72308. defaultText: a.getName(x[C - 1]),
  72309. inheritColor: S.fill
  72310. }, {
  72311. normal: {
  72312. verticalAlign: "middle"
  72313. // align: 'right'
  72314. }
  72315. }), A.setTextConfig({
  72316. position: null,
  72317. local: !0
  72318. });
  72319. var z = A.getTextContent();
  72320. z && (z.x = D.x - R, z.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"));
  72321. }
  72322. this._layersSeries = l, this._layers = p;
  72323. }, e.type = "themeRiver", e;
  72324. }(zt)
  72325. );
  72326. function p7e(t, e, n) {
  72327. var r = new mt({
  72328. shape: {
  72329. x: t.x - 10,
  72330. y: t.y - 10,
  72331. width: 0,
  72332. height: t.height + 20
  72333. }
  72334. });
  72335. return Yt(r, {
  72336. shape: {
  72337. x: t.x - 50,
  72338. width: t.width + 100,
  72339. height: t.height + 20
  72340. }
  72341. }, e, n), r;
  72342. }
  72343. var VP = 2, v7e = (
  72344. /** @class */
  72345. function(t) {
  72346. q(e, t);
  72347. function e() {
  72348. var n = t !== null && t.apply(this, arguments) || this;
  72349. return n.type = e.type, n;
  72350. }
  72351. return e.prototype.init = function(n) {
  72352. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this));
  72353. }, e.prototype.fixData = function(n) {
  72354. var r = n.length, i = {}, a = PA(n, function(d) {
  72355. return i.hasOwnProperty(d[0] + "") || (i[d[0] + ""] = -1), d[2];
  72356. }), o = [];
  72357. a.buckets.each(function(d, h) {
  72358. o.push({
  72359. name: h,
  72360. dataList: d
  72361. });
  72362. });
  72363. for (var s = o.length, l = 0; l < s; ++l) {
  72364. for (var u = o[l].name, c = 0; c < o[l].dataList.length; ++c) {
  72365. var f = o[l].dataList[c][0] + "";
  72366. i[f] = l;
  72367. }
  72368. for (var f in i)
  72369. i.hasOwnProperty(f) && i[f] !== l && (i[f] = l, n[r] = [f, 0, u], r++);
  72370. }
  72371. return n;
  72372. }, e.prototype.getInitialData = function(n, r) {
  72373. for (var i = this.getReferringComponents("singleAxis", Dn).models[0], a = i.get("type"), o = Nt(n.data, function(p) {
  72374. return p[2] !== void 0;
  72375. }), s = this.fixData(o || []), l = [], u = this.nameMap = Pe(), c = 0, f = 0; f < s.length; ++f)
  72376. l.push(s[f][VP]), u.get(s[f][VP]) || (u.set(s[f][VP], c), c++);
  72377. var d = wp(s, {
  72378. coordDimensions: ["single"],
  72379. dimensionsDefine: [{
  72380. name: "time",
  72381. type: wO(a)
  72382. }, {
  72383. name: "value",
  72384. type: "float"
  72385. }, {
  72386. name: "name",
  72387. type: "ordinal"
  72388. }],
  72389. encodeDefine: {
  72390. single: 0,
  72391. value: 1,
  72392. itemName: 2
  72393. }
  72394. }).dimensions, h = new Lr(d, this);
  72395. return h.initData(s), h;
  72396. }, e.prototype.getLayerSeries = function() {
  72397. for (var n = this.getData(), r = n.count(), i = [], a = 0; a < r; ++a)
  72398. i[a] = a;
  72399. var o = n.mapDimension("single"), s = PA(i, function(u) {
  72400. return n.get("name", u);
  72401. }), l = [];
  72402. return s.buckets.each(function(u, c) {
  72403. u.sort(function(f, d) {
  72404. return n.get(o, f) - n.get(o, d);
  72405. }), l.push({
  72406. name: c,
  72407. indices: u
  72408. });
  72409. }), l;
  72410. }, e.prototype.getAxisTooltipData = function(n, r, i) {
  72411. ue(n) || (n = n ? [n] : []);
  72412. for (var a = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, c = 0; c < l; ++c) {
  72413. for (var f = Number.MAX_VALUE, d = -1, h = o[c].indices.length, p = 0; p < h; ++p) {
  72414. var v = a.get(n[0], o[c].indices[p]), g = Math.abs(v - r);
  72415. g <= f && (u = v, f = g, d = o[c].indices[p]);
  72416. }
  72417. s.push(d);
  72418. }
  72419. return {
  72420. dataIndices: s,
  72421. nestestValue: u
  72422. };
  72423. }, e.prototype.formatTooltip = function(n, r, i) {
  72424. var a = this.getData(), o = a.getName(n), s = a.get(a.mapDimension("value"), n);
  72425. return tr("nameValue", {
  72426. name: o,
  72427. value: s
  72428. });
  72429. }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
  72430. // zlevel: 0,
  72431. z: 2,
  72432. colorBy: "data",
  72433. coordinateSystem: "singleAxis",
  72434. // gap in axis's orthogonal orientation
  72435. boundaryGap: ["10%", "10%"],
  72436. // legendHoverLink: true,
  72437. singleAxisIndex: 0,
  72438. animationEasing: "linear",
  72439. label: {
  72440. margin: 4,
  72441. show: !0,
  72442. position: "left",
  72443. fontSize: 11
  72444. },
  72445. emphasis: {
  72446. label: {
  72447. show: !0
  72448. }
  72449. }
  72450. }, e;
  72451. }(Ht)
  72452. );
  72453. function g7e(t, e) {
  72454. t.eachSeriesByType("themeRiver", function(n) {
  72455. var r = n.getData(), i = n.coordinateSystem, a = {}, o = i.getRect();
  72456. a.rect = o;
  72457. var s = n.get("boundaryGap"), l = i.getAxis();
  72458. if (a.boundaryGap = s, l.orient === "horizontal") {
  72459. s[0] = _e(s[0], o.height), s[1] = _e(s[1], o.height);
  72460. var u = o.height - s[0] - s[1];
  72461. PW(r, n, u);
  72462. } else {
  72463. s[0] = _e(s[0], o.width), s[1] = _e(s[1], o.width);
  72464. var c = o.width - s[0] - s[1];
  72465. PW(r, n, c);
  72466. }
  72467. r.setLayout("layoutInfo", a);
  72468. });
  72469. }
  72470. function PW(t, e, n) {
  72471. if (t.count())
  72472. for (var r = e.coordinateSystem, i = e.getLayerSeries(), a = t.mapDimension("single"), o = t.mapDimension("value"), s = ce(i, function(g) {
  72473. return ce(g.indices, function(m) {
  72474. var y = r.dataToPoint(t.get(a, m));
  72475. return y[1] = t.get(o, m), y;
  72476. });
  72477. }), l = m7e(s), u = l.y0, c = n / l.max, f = i.length, d = i[0].indices.length, h, p = 0; p < d; ++p) {
  72478. h = u[p] * c, t.setItemLayout(i[0].indices[p], {
  72479. layerIndex: 0,
  72480. x: s[0][p][0],
  72481. y0: h,
  72482. y: s[0][p][1] * c
  72483. });
  72484. for (var v = 1; v < f; ++v)
  72485. h += s[v - 1][p][1] * c, t.setItemLayout(i[v].indices[p], {
  72486. layerIndex: v,
  72487. x: s[v][p][0],
  72488. y0: h,
  72489. y: s[v][p][1] * c
  72490. });
  72491. }
  72492. }
  72493. function m7e(t) {
  72494. for (var e = t.length, n = t[0].length, r = [], i = [], a = 0, o = 0; o < n; ++o) {
  72495. for (var s = 0, l = 0; l < e; ++l)
  72496. s += t[l][o][1];
  72497. s > a && (a = s), r.push(s);
  72498. }
  72499. for (var u = 0; u < n; ++u)
  72500. i[u] = (a - r[u]) / 2;
  72501. a = 0;
  72502. for (var c = 0; c < n; ++c) {
  72503. var f = r[c] + i[c];
  72504. f > a && (a = f);
  72505. }
  72506. return {
  72507. y0: i,
  72508. max: a
  72509. };
  72510. }
  72511. function y7e(t) {
  72512. t.registerChartView(h7e), t.registerSeriesModel(v7e), t.registerLayout(g7e), t.registerProcessor(Y0("themeRiver"));
  72513. }
  72514. var b7e = 2, _7e = 4, $W = (
  72515. /** @class */
  72516. function(t) {
  72517. q(e, t);
  72518. function e(n, r, i, a) {
  72519. var o = t.call(this) || this;
  72520. o.z2 = b7e, o.textConfig = {
  72521. inside: !0
  72522. }, Fe(o).seriesIndex = r.seriesIndex;
  72523. var s = new gt({
  72524. z2: _7e,
  72525. silent: n.getModel().get(["label", "silent"])
  72526. });
  72527. return o.setTextContent(s), o.updateData(!0, n, r, i, a), o;
  72528. }
  72529. return e.prototype.updateData = function(n, r, i, a, o) {
  72530. this.node = r, r.piece = this, i = i || this._seriesModel, a = a || this._ecModel;
  72531. var s = this;
  72532. Fe(s).dataIndex = r.dataIndex;
  72533. var l = r.getModel(), u = l.getModel("emphasis"), c = r.getLayout(), f = le({}, c);
  72534. f.label = null;
  72535. var d = r.getVisual("style");
  72536. d.lineJoin = "bevel";
  72537. var h = r.getVisual("decal");
  72538. h && (d.decal = Fh(h, o));
  72539. var p = Fc(l.getModel("itemStyle"), f, !0);
  72540. le(f, p), k(ni, function(y) {
  72541. var b = s.ensureState(y), _ = l.getModel([y, "itemStyle"]);
  72542. b.style = _.getItemStyle();
  72543. var O = Fc(_, f);
  72544. O && (b.shape = O);
  72545. }), n ? (s.setShape(f), s.shape.r = c.r0, Yt(s, {
  72546. shape: {
  72547. r: c.r
  72548. }
  72549. }, i, r.dataIndex)) : (Ct(s, {
  72550. shape: f
  72551. }, i), so(s)), s.useStyle(d), this._updateLabel(i);
  72552. var v = l.getShallow("cursor");
  72553. v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel;
  72554. var g = u.get("focus"), m = g === "ancestor" ? r.getAncestorsIndices() : g === "descendant" ? r.getDescendantIndices() : g;
  72555. bn(this, m, u.get("blurScope"), u.get("disabled"));
  72556. }, e.prototype._updateLabel = function(n) {
  72557. 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);
  72558. d.ignore = !v, k(xm, function(m) {
  72559. var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), b = m === "normal", _ = b ? d : d.ensureState(m), O = n.getFormattedLabel(h, m);
  72560. b && (O = O || r.node.name), _.style = Zt(y, {}, null, m !== "normal", !0), O && (_.style.text = O);
  72561. var S = y.get("show");
  72562. S != null && !b && (_.ignore = !S);
  72563. var x = g(y, "position"), C = b ? f : f.states[m], T = C.style.fill;
  72564. C.textConfig = {
  72565. outsideFill: y.get("color") === "inherit" ? T : null,
  72566. inside: x !== "outside"
  72567. };
  72568. 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 = Fi(A === "tangential" ? Math.PI / 2 - l : l), N = R > D && !Lh(R - D) && R < E;
  72569. 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;
  72570. var V = 0;
  72571. A === "radial" ? V = Fi(-l) + (N ? Math.PI : 0) : A === "tangential" ? V = Fi(Math.PI / 2 - l) + (N ? Math.PI : 0) : St(A) && (V = A * Math.PI / 180), _.rotation = Fi(V);
  72572. });
  72573. function g(m, y) {
  72574. var b = m.get(y);
  72575. return b ?? a.get(y);
  72576. }
  72577. d.dirtyStyle();
  72578. }, e;
  72579. }(ri)
  72580. ), $E = "sunburstRootToNode", AW = "sunburstHighlight", O7e = "sunburstUnhighlight";
  72581. function S7e(t) {
  72582. t.registerAction({
  72583. type: $E,
  72584. update: "updateView"
  72585. }, function(e, n) {
  72586. n.eachComponent({
  72587. mainType: "series",
  72588. subType: "sunburst",
  72589. query: e
  72590. }, r);
  72591. function r(i, a) {
  72592. var o = Lm(e, [$E], i);
  72593. if (o) {
  72594. var s = i.getViewRoot();
  72595. s && (e.direction = jk(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node);
  72596. }
  72597. }
  72598. }), t.registerAction({
  72599. type: AW,
  72600. update: "none"
  72601. }, function(e, n, r) {
  72602. e = le({}, e), n.eachComponent({
  72603. mainType: "series",
  72604. subType: "sunburst",
  72605. query: e
  72606. }, i);
  72607. function i(a) {
  72608. var o = Lm(e, [AW], a);
  72609. o && (e.dataIndex = o.node.dataIndex);
  72610. }
  72611. process.env.NODE_ENV !== "production" && Cn("sunburstHighlight", "highlight"), r.dispatchAction(le(e, {
  72612. type: "highlight"
  72613. }));
  72614. }), t.registerAction({
  72615. type: O7e,
  72616. update: "updateView"
  72617. }, function(e, n, r) {
  72618. e = le({}, e), process.env.NODE_ENV !== "production" && Cn("sunburstUnhighlight", "downplay"), r.dispatchAction(le(e, {
  72619. type: "downplay"
  72620. }));
  72621. });
  72622. }
  72623. var x7e = (
  72624. /** @class */
  72625. function(t) {
  72626. q(e, t);
  72627. function e() {
  72628. var n = t !== null && t.apply(this, arguments) || this;
  72629. return n.type = e.type, n;
  72630. }
  72631. return e.prototype.render = function(n, r, i, a) {
  72632. var o = this;
  72633. this.seriesModel = n, this.api = i, this.ecModel = r;
  72634. var s = n.getData(), l = s.tree.root, u = n.getViewRoot(), c = this.group, f = n.get("renderLabelForZeroData"), d = [];
  72635. u.eachNode(function(y) {
  72636. d.push(y);
  72637. });
  72638. var h = this._oldChildren || [];
  72639. p(d, h), m(l, u), this._initEvents(), this._oldChildren = d;
  72640. function p(y, b) {
  72641. if (y.length === 0 && b.length === 0)
  72642. return;
  72643. new Us(b, y, _, _).add(O).update(O).remove(Ue(O, null)).execute();
  72644. function _(S) {
  72645. return S.getId();
  72646. }
  72647. function O(S, x) {
  72648. var C = S == null ? null : y[S], T = x == null ? null : b[x];
  72649. v(C, T);
  72650. }
  72651. }
  72652. function v(y, b) {
  72653. if (!f && y && !y.getValue() && (y = null), y !== l && b !== l) {
  72654. if (b && b.piece)
  72655. y ? (b.piece.updateData(!1, y, n, r, i), s.setItemGraphicEl(y.dataIndex, b.piece)) : g(b);
  72656. else if (y) {
  72657. var _ = new $W(y, n, r, i);
  72658. c.add(_), s.setItemGraphicEl(y.dataIndex, _);
  72659. }
  72660. }
  72661. }
  72662. function g(y) {
  72663. y && y.piece && (c.remove(y.piece), y.piece = null);
  72664. }
  72665. function m(y, b) {
  72666. b.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, n, r, i) : (o.virtualPiece = new $W(y, n, r, i), c.add(o.virtualPiece)), b.piece.off("click"), o.virtualPiece.on("click", function(_) {
  72667. o._rootToNode(b.parentNode);
  72668. })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null);
  72669. }
  72670. }, e.prototype._initEvents = function() {
  72671. var n = this;
  72672. this.group.off("click"), this.group.on("click", function(r) {
  72673. var i = !1, a = n.seriesModel.getViewRoot();
  72674. a.eachNode(function(o) {
  72675. if (!i && o.piece && o.piece === r.target) {
  72676. var s = o.getModel().get("nodeClick");
  72677. if (s === "rootToNode")
  72678. n._rootToNode(o);
  72679. else if (s === "link") {
  72680. var l = o.getModel(), u = l.get("link");
  72681. if (u) {
  72682. var c = l.get("target", !0) || "_blank";
  72683. dO(u, c);
  72684. }
  72685. }
  72686. i = !0;
  72687. }
  72688. });
  72689. });
  72690. }, e.prototype._rootToNode = function(n) {
  72691. n !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  72692. type: $E,
  72693. from: this.uid,
  72694. seriesId: this.seriesModel.id,
  72695. targetNode: n
  72696. });
  72697. }, e.prototype.containPoint = function(n, r) {
  72698. var i = r.getData(), a = i.getItemLayout(0);
  72699. if (a) {
  72700. var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
  72701. return l <= a.r && l >= a.r0;
  72702. }
  72703. }, e.type = "sunburst", e;
  72704. }(zt)
  72705. ), w7e = (
  72706. /** @class */
  72707. function(t) {
  72708. q(e, t);
  72709. function e() {
  72710. var n = t !== null && t.apply(this, arguments) || this;
  72711. return n.type = e.type, n.ignoreStyleOnData = !0, n;
  72712. }
  72713. return e.prototype.getInitialData = function(n, r) {
  72714. var i = {
  72715. name: n.name,
  72716. children: n.data
  72717. };
  72718. gre(i);
  72719. var a = this._levelModels = ce(n.levels || [], function(l) {
  72720. return new Wt(l, this, r);
  72721. }, this), o = Gk.createTree(i, this, s);
  72722. function s(l) {
  72723. l.wrapMethod("getItemModel", function(u, c) {
  72724. var f = o.getNodeByDataIndex(c), d = a[f.depth];
  72725. return d && (u.parentModel = d), u;
  72726. });
  72727. }
  72728. return o.data;
  72729. }, e.prototype.optionUpdated = function() {
  72730. this.resetViewRoot();
  72731. }, e.prototype.getDataParams = function(n) {
  72732. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  72733. return r.treePathInfo = bw(i, this), r;
  72734. }, e.prototype.getLevelModel = function(n) {
  72735. return this._levelModels && this._levelModels[n.depth];
  72736. }, e.prototype.getViewRoot = function() {
  72737. return this._viewRoot;
  72738. }, e.prototype.resetViewRoot = function(n) {
  72739. n ? this._viewRoot = n : n = this._viewRoot;
  72740. var r = this.getRawData().tree.root;
  72741. (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
  72742. }, e.prototype.enableAriaDecal = function() {
  72743. One(this);
  72744. }, e.type = "series.sunburst", e.defaultOption = {
  72745. // zlevel: 0,
  72746. z: 2,
  72747. // 默认全局居中
  72748. center: ["50%", "50%"],
  72749. radius: [0, "75%"],
  72750. // 默认顺时针
  72751. clockwise: !0,
  72752. startAngle: 90,
  72753. // 最小角度改为0
  72754. minAngle: 0,
  72755. // If still show when all data zero.
  72756. stillShowZeroSum: !0,
  72757. // 'rootToNode', 'link', or false
  72758. nodeClick: "rootToNode",
  72759. renderLabelForZeroData: !1,
  72760. label: {
  72761. // could be: 'radial', 'tangential', or 'none'
  72762. rotate: "radial",
  72763. show: !0,
  72764. opacity: 1,
  72765. // 'left' is for inner side of inside, and 'right' is for outer
  72766. // side for inside
  72767. align: "center",
  72768. position: "inside",
  72769. distance: 5,
  72770. silent: !0
  72771. },
  72772. itemStyle: {
  72773. borderWidth: 1,
  72774. borderColor: "white",
  72775. borderType: "solid",
  72776. shadowBlur: 0,
  72777. shadowColor: "rgba(0, 0, 0, 0.2)",
  72778. shadowOffsetX: 0,
  72779. shadowOffsetY: 0,
  72780. opacity: 1
  72781. },
  72782. emphasis: {
  72783. focus: "descendant"
  72784. },
  72785. blur: {
  72786. itemStyle: {
  72787. opacity: 0.2
  72788. },
  72789. label: {
  72790. opacity: 0.1
  72791. }
  72792. },
  72793. // Animation type can be expansion, scale.
  72794. animationType: "expansion",
  72795. animationDuration: 1e3,
  72796. animationDurationUpdate: 500,
  72797. data: [],
  72798. /**
  72799. * Sort order.
  72800. *
  72801. * Valid values: 'desc', 'asc', null, or callback function.
  72802. * 'desc' and 'asc' for descend and ascendant order;
  72803. * null for not sorting;
  72804. * example of callback function:
  72805. * function(nodeA, nodeB) {
  72806. * return nodeA.getValue() - nodeB.getValue();
  72807. * }
  72808. */
  72809. sort: "desc"
  72810. }, e;
  72811. }(Ht)
  72812. );
  72813. function gre(t) {
  72814. var e = 0;
  72815. k(t.children, function(r) {
  72816. gre(r);
  72817. var i = r.value;
  72818. ue(i) && (i = i[0]), e += i;
  72819. });
  72820. var n = t.value;
  72821. 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;
  72822. }
  72823. var EW = Math.PI / 180;
  72824. function C7e(t, e, n) {
  72825. e.eachSeriesByType(t, function(r) {
  72826. var i = r.get("center"), a = r.get("radius");
  72827. ue(a) || (a = [0, a]), ue(i) || (i = [i, i]);
  72828. 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") * EW, p = r.get("minAngle") * EW, v = r.getData().tree.root, g = r.getViewRoot(), m = g.depth, y = r.get("sort");
  72829. y != null && mre(g, y);
  72830. var b = 0;
  72831. k(g.children, function(R) {
  72832. !isNaN(R.getValue()) && b++;
  72833. });
  72834. 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) {
  72835. if (R) {
  72836. var V = N;
  72837. if (R !== v) {
  72838. var z = R.getValue(), W = _ === 0 && w ? O : z * O;
  72839. W < p && (W = p), V = N + P * W;
  72840. var F = R.depth - m - (S ? -1 : 1), Q = f + C * F, Z = f + C * (F + 1), ne = r.getLevelModel(R);
  72841. if (ne) {
  72842. var ee = ne.get("r0", !0), oe = ne.get("r", !0), K = ne.get("radius", !0);
  72843. K != null && (ee = K[0], oe = K[1]), ee != null && (Q = _e(ee, l / 2)), oe != null && (Z = _e(oe, l / 2));
  72844. }
  72845. R.setLayout({
  72846. angle: W,
  72847. startAngle: N,
  72848. endAngle: V,
  72849. clockwise: T,
  72850. cx: u,
  72851. cy: c,
  72852. r0: Q,
  72853. r: Z
  72854. });
  72855. }
  72856. if (R.children && R.children.length) {
  72857. var ie = 0;
  72858. k(R.children, function(X) {
  72859. ie += $(X, N + ie);
  72860. });
  72861. }
  72862. return V - N;
  72863. }
  72864. };
  72865. if (S) {
  72866. var A = f, D = f + C, E = Math.PI * 2;
  72867. v.setLayout({
  72868. angle: E,
  72869. startAngle: h,
  72870. endAngle: h + E,
  72871. clockwise: T,
  72872. cx: u,
  72873. cy: c,
  72874. r0: A,
  72875. r: D
  72876. });
  72877. }
  72878. $(g, h);
  72879. });
  72880. }
  72881. function mre(t, e) {
  72882. var n = t.children || [];
  72883. t.children = T7e(n, e), n.length && k(t.children, function(r) {
  72884. mre(r, e);
  72885. });
  72886. }
  72887. function T7e(t, e) {
  72888. if (Me(e)) {
  72889. var n = ce(t, function(i, a) {
  72890. var o = i.getValue();
  72891. return {
  72892. params: {
  72893. depth: i.depth,
  72894. height: i.height,
  72895. dataIndex: i.dataIndex,
  72896. getValue: function() {
  72897. return o;
  72898. }
  72899. },
  72900. index: a
  72901. };
  72902. });
  72903. return n.sort(function(i, a) {
  72904. return e(i.params, a.params);
  72905. }), ce(n, function(i) {
  72906. return t[i.index];
  72907. });
  72908. } else {
  72909. var r = e === "asc";
  72910. return t.sort(function(i, a) {
  72911. var o = (i.getValue() - a.getValue()) * (r ? 1 : -1);
  72912. return o === 0 ? (i.dataIndex - a.dataIndex) * (r ? -1 : 1) : o;
  72913. });
  72914. }
  72915. }
  72916. function P7e(t) {
  72917. var e = {};
  72918. function n(r, i, a) {
  72919. for (var o = r; o && o.depth > 1; )
  72920. o = o.parentNode;
  72921. var s = i.getColorFromPalette(o.name || o.dataIndex + "", e);
  72922. return r.depth > 1 && Oe(s) && (s = J1(s, (r.depth - 1) / (a - 1) * 0.5)), s;
  72923. }
  72924. t.eachSeriesByType("sunburst", function(r) {
  72925. var i = r.getData(), a = i.tree;
  72926. a.eachNode(function(o) {
  72927. var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
  72928. l.fill || (l.fill = n(o, r, a.root.height));
  72929. var u = i.ensureUniqueItemVisual(o.dataIndex, "style");
  72930. le(u, l);
  72931. });
  72932. });
  72933. }
  72934. function $7e(t) {
  72935. t.registerChartView(x7e), t.registerSeriesModel(w7e), t.registerLayout(Ue(C7e, "sunburst")), t.registerProcessor(Ue(Y0, "sunburst")), t.registerVisual(P7e), S7e(t);
  72936. }
  72937. var MW = {
  72938. color: "fill",
  72939. borderColor: "stroke"
  72940. }, A7e = {
  72941. symbol: 1,
  72942. symbolSize: 1,
  72943. symbolKeepAspect: 1,
  72944. legendIcon: 1,
  72945. visualMeta: 1,
  72946. liftZ: 1,
  72947. decal: 1
  72948. }, Rs = bt(), E7e = (
  72949. /** @class */
  72950. function(t) {
  72951. q(e, t);
  72952. function e() {
  72953. var n = t !== null && t.apply(this, arguments) || this;
  72954. return n.type = e.type, n;
  72955. }
  72956. return e.prototype.optionUpdated = function() {
  72957. this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
  72958. }, e.prototype.getInitialData = function(n, r) {
  72959. return us(null, this);
  72960. }, e.prototype.getDataParams = function(n, r, i) {
  72961. var a = t.prototype.getDataParams.call(this, n, r);
  72962. return i && (a.info = Rs(i).info), a;
  72963. }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  72964. coordinateSystem: "cartesian2d",
  72965. // zlevel: 0,
  72966. z: 2,
  72967. legendHoverLink: !0,
  72968. // Custom series will not clip by default.
  72969. // Some case will use custom series to draw label
  72970. // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
  72971. clip: !1
  72972. // Cartesian coordinate system
  72973. // xAxisIndex: 0,
  72974. // yAxisIndex: 0,
  72975. // Polar coordinate system
  72976. // polarIndex: 0,
  72977. // Geo coordinate system
  72978. // geoIndex: 0,
  72979. }, e;
  72980. }(Ht)
  72981. );
  72982. function M7e(t, e) {
  72983. return e = e || [0, 0], ce(["x", "y"], function(n, r) {
  72984. var i = this.getAxis(n), a = e[r], o = t[r] / 2;
  72985. return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o));
  72986. }, this);
  72987. }
  72988. function I7e(t) {
  72989. var e = t.master.getRect();
  72990. return {
  72991. coordSys: {
  72992. // The name exposed to user is always 'cartesian2d' but not 'grid'.
  72993. type: "cartesian2d",
  72994. x: e.x,
  72995. y: e.y,
  72996. width: e.width,
  72997. height: e.height
  72998. },
  72999. api: {
  73000. coord: function(n) {
  73001. return t.dataToPoint(n);
  73002. },
  73003. size: xe(M7e, t)
  73004. }
  73005. };
  73006. }
  73007. function D7e(t, e) {
  73008. return e = e || [0, 0], ce([0, 1], function(n) {
  73009. var r = e[n], i = t[n] / 2, a = [], o = [];
  73010. 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]);
  73011. }, this);
  73012. }
  73013. function R7e(t) {
  73014. var e = t.getBoundingRect();
  73015. return {
  73016. coordSys: {
  73017. type: "geo",
  73018. x: e.x,
  73019. y: e.y,
  73020. width: e.width,
  73021. height: e.height,
  73022. zoom: t.getZoom()
  73023. },
  73024. api: {
  73025. coord: function(n) {
  73026. return t.dataToPoint(n);
  73027. },
  73028. size: xe(D7e, t)
  73029. }
  73030. };
  73031. }
  73032. function k7e(t, e) {
  73033. var n = this.getAxis(), r = e instanceof Array ? e[0] : e, i = (t instanceof Array ? t[0] : t) / 2;
  73034. return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(r - i) - n.dataToCoord(r + i));
  73035. }
  73036. function L7e(t) {
  73037. var e = t.getRect();
  73038. return {
  73039. coordSys: {
  73040. type: "singleAxis",
  73041. x: e.x,
  73042. y: e.y,
  73043. width: e.width,
  73044. height: e.height
  73045. },
  73046. api: {
  73047. coord: function(n) {
  73048. return t.dataToPoint(n);
  73049. },
  73050. size: xe(k7e, t)
  73051. }
  73052. };
  73053. }
  73054. function N7e(t, e) {
  73055. return e = e || [0, 0], ce(["Radius", "Angle"], function(n, r) {
  73056. 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));
  73057. return n === "Angle" && (l = l * Math.PI / 180), l;
  73058. }, this);
  73059. }
  73060. function B7e(t) {
  73061. var e = t.getRadiusAxis(), n = t.getAngleAxis(), r = e.getExtent();
  73062. return r[0] > r[1] && r.reverse(), {
  73063. coordSys: {
  73064. type: "polar",
  73065. cx: t.cx,
  73066. cy: t.cy,
  73067. r: r[1],
  73068. r0: r[0]
  73069. },
  73070. api: {
  73071. coord: function(i) {
  73072. var a = e.dataToRadius(i[0]), o = n.dataToAngle(i[1]), s = t.coordToPoint([a, o]);
  73073. return s.push(a, o * Math.PI / 180), s;
  73074. },
  73075. size: xe(N7e, t)
  73076. }
  73077. };
  73078. }
  73079. function z7e(t) {
  73080. var e = t.getRect(), n = t.getRangeInfo();
  73081. return {
  73082. coordSys: {
  73083. type: "calendar",
  73084. x: e.x,
  73085. y: e.y,
  73086. width: e.width,
  73087. height: e.height,
  73088. cellWidth: t.getCellWidth(),
  73089. cellHeight: t.getCellHeight(),
  73090. rangeInfo: {
  73091. start: n.start,
  73092. end: n.end,
  73093. weeks: n.weeks,
  73094. dayCount: n.allDay
  73095. }
  73096. },
  73097. api: {
  73098. coord: function(r, i) {
  73099. return t.dataToPoint(r, i);
  73100. }
  73101. }
  73102. };
  73103. }
  73104. var IW = {};
  73105. function yre(t, e, n, r) {
  73106. return t && (t.legacy || t.legacy !== !1 && !n && !r && e !== "tspan" && (e === "text" || Ce(t, "text")));
  73107. }
  73108. function bre(t, e, n) {
  73109. var r = t, i, a, o;
  73110. if (e === "text")
  73111. o = r;
  73112. else {
  73113. 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 = {
  73114. type: "text",
  73115. style: o,
  73116. // ec4 does not support rectText trigger.
  73117. // And when text position is different in normal and emphasis
  73118. // => hover text trigger emphasis;
  73119. // => text position changed, leave mouse pointer immediately;
  73120. // That might cause incorrect state.
  73121. silent: !0
  73122. }, i = {};
  73123. var s = Ce(r, "textPosition");
  73124. 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);
  73125. }
  73126. return DW(o, t), k(o.rich, function(l) {
  73127. DW(l, l);
  73128. }), {
  73129. textConfig: i,
  73130. textContent: a
  73131. };
  73132. }
  73133. function DW(t, e) {
  73134. 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));
  73135. }
  73136. function RW(t, e, n) {
  73137. var r = t;
  73138. 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);
  73139. var i = r.textPosition.indexOf("inside") >= 0, a = t.fill || "#000";
  73140. kW(r, e);
  73141. var o = r.textFill == null;
  73142. 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) {
  73143. kW(s, s);
  73144. }), r;
  73145. }
  73146. function kW(t, e) {
  73147. 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));
  73148. }
  73149. function LW(t, e) {
  73150. if (process.env.NODE_ENV !== "production") {
  73151. var n = t + "^_^" + e;
  73152. IW[n] || (console.warn('[ECharts] DEPRECATED: "' + t + '" has been deprecated. ' + e), IW[n] = !0);
  73153. }
  73154. }
  73155. var _re = {
  73156. position: ["x", "y"],
  73157. scale: ["scaleX", "scaleY"],
  73158. origin: ["originX", "originY"]
  73159. }, NW = st(_re), LO = Aa(rs, function(t, e) {
  73160. return t[e] = 1, t;
  73161. }, {}), BW = rs.join(", "), NO = ["", "style", "shape", "extra"], Gh = bt();
  73162. function sL(t, e, n, r, i) {
  73163. var a = t + "Animation", o = pp(t, r, i) || {}, s = Gh(e).userDuring;
  73164. return o.duration > 0 && (o.during = s ? xe(H7e, {
  73165. el: e,
  73166. userDuring: s
  73167. }) : null, o.setToFinal = !0, o.scope = t), le(o, n[a]), o;
  73168. }
  73169. function U_(t, e, n, r) {
  73170. r = r || {};
  73171. var i = r.dataIndex, a = r.isInit, o = r.clearStyle, s = n.isAnimationEnabled(), l = Gh(t), u = e.style;
  73172. l.userDuring = e.during;
  73173. var c = {}, f = {};
  73174. if (j7e(t, e, f), VW("shape", e, f), VW("extra", e, f), !a && s && (G7e(t, e, c), zW("shape", t, e, c), zW("extra", t, e, c), Z7e(t, e, u, c)), f.style = u, V7e(t, f, o), W7e(t, e), s)
  73175. if (a) {
  73176. var d = {};
  73177. k(NO, function(p) {
  73178. var v = p ? e[p] : e;
  73179. v && v.enterFrom && (p && (d[p] = d[p] || {}), le(p ? d[p] : d, v.enterFrom));
  73180. });
  73181. var h = sL("enter", t, e, n, i);
  73182. h.duration > 0 && t.animateFrom(d, h);
  73183. } else
  73184. F7e(t, e, i || 0, n, c);
  73185. Ore(t, e), u ? t.dirty() : t.markRedraw();
  73186. }
  73187. function Ore(t, e) {
  73188. for (var n = Gh(t).leaveToProps, r = 0; r < NO.length; r++) {
  73189. var i = NO[r], a = i ? e[i] : e;
  73190. a && a.leaveTo && (n || (n = Gh(t).leaveToProps = {}), i && (n[i] = n[i] || {}), le(i ? n[i] : n, a.leaveTo));
  73191. }
  73192. }
  73193. function Sw(t, e, n, r) {
  73194. if (t) {
  73195. var i = t.parent, a = Gh(t).leaveToProps;
  73196. if (a) {
  73197. var o = sL("update", t, e, n, 0);
  73198. o.done = function() {
  73199. i.remove(t);
  73200. }, t.animateTo(a, o);
  73201. } else
  73202. i.remove(t);
  73203. }
  73204. }
  73205. function rf(t) {
  73206. return t === "all";
  73207. }
  73208. function V7e(t, e, n) {
  73209. var r = e.style;
  73210. if (!t.isGroup && r) {
  73211. if (n) {
  73212. t.useStyle({});
  73213. for (var i = t.animators, a = 0; a < i.length; a++) {
  73214. var o = i[a];
  73215. o.targetName === "style" && o.changeTarget(t.style);
  73216. }
  73217. }
  73218. t.setStyle(r);
  73219. }
  73220. e && (e.style = null, e && t.attr(e), e.style = r);
  73221. }
  73222. function F7e(t, e, n, r, i) {
  73223. if (i) {
  73224. var a = sL("update", t, e, r, n);
  73225. a.duration > 0 && t.animateFrom(i, a);
  73226. }
  73227. }
  73228. function W7e(t, e) {
  73229. Ce(e, "silent") && (t.silent = e.silent), Ce(e, "ignore") && (t.ignore = e.ignore), t instanceof Ma && Ce(e, "invisible") && (t.invisible = e.invisible), t instanceof ot && Ce(e, "autoBatch") && (t.autoBatch = e.autoBatch);
  73230. }
  73231. var $o = {}, Q7e = {
  73232. // Usually other props do not need to be changed in animation during.
  73233. setTransform: function(t, e) {
  73234. return process.env.NODE_ENV !== "production" && ke(Ce(LO, t), "Only " + BW + " available in `setTransform`."), $o.el[t] = e, this;
  73235. },
  73236. getTransform: function(t) {
  73237. return process.env.NODE_ENV !== "production" && ke(Ce(LO, t), "Only " + BW + " available in `getTransform`."), $o.el[t];
  73238. },
  73239. setShape: function(t, e) {
  73240. process.env.NODE_ENV !== "production" && yd(t);
  73241. var n = $o.el, r = n.shape || (n.shape = {});
  73242. return r[t] = e, n.dirtyShape && n.dirtyShape(), this;
  73243. },
  73244. getShape: function(t) {
  73245. process.env.NODE_ENV !== "production" && yd(t);
  73246. var e = $o.el.shape;
  73247. if (e)
  73248. return e[t];
  73249. },
  73250. setStyle: function(t, e) {
  73251. process.env.NODE_ENV !== "production" && yd(t);
  73252. var n = $o.el, r = n.style;
  73253. 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;
  73254. },
  73255. getStyle: function(t) {
  73256. process.env.NODE_ENV !== "production" && yd(t);
  73257. var e = $o.el.style;
  73258. if (e)
  73259. return e[t];
  73260. },
  73261. setExtra: function(t, e) {
  73262. process.env.NODE_ENV !== "production" && yd(t);
  73263. var n = $o.el.extra || ($o.el.extra = {});
  73264. return n[t] = e, this;
  73265. },
  73266. getExtra: function(t) {
  73267. process.env.NODE_ENV !== "production" && yd(t);
  73268. var e = $o.el.extra;
  73269. if (e)
  73270. return e[t];
  73271. }
  73272. };
  73273. function yd(t) {
  73274. if (process.env.NODE_ENV !== "production" && (t === "transition" || t === "enterFrom" || t === "leaveTo"))
  73275. throw new Error('key must not be "' + t + '"');
  73276. }
  73277. function H7e() {
  73278. var t = this, e = t.el;
  73279. if (e) {
  73280. var n = Gh(e).userDuring, r = t.userDuring;
  73281. if (n !== r) {
  73282. t.el = t.userDuring = null;
  73283. return;
  73284. }
  73285. $o.el = e, r(Q7e);
  73286. }
  73287. }
  73288. function zW(t, e, n, r) {
  73289. var i = n[t];
  73290. if (i) {
  73291. var a = e[t], o;
  73292. if (a) {
  73293. var s = n.transition, l = i.transition;
  73294. if (l)
  73295. if (!o && (o = r[t] = {}), rf(l))
  73296. le(o, a);
  73297. else
  73298. for (var u = Qt(l), c = 0; c < u.length; c++) {
  73299. var f = u[c], d = a[f];
  73300. o[f] = d;
  73301. }
  73302. else if (rf(s) || et(s, t) >= 0) {
  73303. !o && (o = r[t] = {});
  73304. for (var h = st(a), c = 0; c < h.length; c++) {
  73305. var f = h[c], d = a[f];
  73306. U7e(i[f], d) && (o[f] = d);
  73307. }
  73308. }
  73309. }
  73310. }
  73311. }
  73312. function VW(t, e, n) {
  73313. var r = e[t];
  73314. if (r)
  73315. for (var i = n[t] = {}, a = st(r), o = 0; o < a.length; o++) {
  73316. var s = a[o];
  73317. i[s] = Tg(r[s]);
  73318. }
  73319. }
  73320. function G7e(t, e, n) {
  73321. for (var r = e.transition, i = rf(r) ? rs : Qt(r || []), a = 0; a < i.length; a++) {
  73322. var o = i[a];
  73323. if (!(o === "style" || o === "shape" || o === "extra")) {
  73324. var s = t[o];
  73325. process.env.NODE_ENV !== "production" && Sre(o, "el.transition"), n[o] = s;
  73326. }
  73327. }
  73328. }
  73329. function j7e(t, e, n) {
  73330. for (var r = 0; r < NW.length; r++) {
  73331. var i = NW[r], a = _re[i], o = e[i];
  73332. o && (n[a[0]] = o[0], n[a[1]] = o[1]);
  73333. }
  73334. for (var r = 0; r < rs.length; r++) {
  73335. var s = rs[r];
  73336. e[s] != null && (n[s] = e[s]);
  73337. }
  73338. }
  73339. function Z7e(t, e, n, r) {
  73340. if (n) {
  73341. var i = t.style, a;
  73342. if (i) {
  73343. var o = n.transition, s = e.transition;
  73344. if (o && !rf(o)) {
  73345. var l = Qt(o);
  73346. !a && (a = r.style = {});
  73347. for (var u = 0; u < l.length; u++) {
  73348. var c = l[u], f = i[c];
  73349. a[c] = f;
  73350. }
  73351. } else if (t.getAnimationStyleProps && (rf(s) || rf(o) || et(s, "style") >= 0)) {
  73352. var d = t.getAnimationStyleProps(), h = d ? d.style : null;
  73353. if (h) {
  73354. !a && (a = r.style = {});
  73355. for (var p = st(n), u = 0; u < p.length; u++) {
  73356. var c = p[u];
  73357. if (h[c]) {
  73358. var f = i[c];
  73359. a[c] = f;
  73360. }
  73361. }
  73362. }
  73363. }
  73364. }
  73365. }
  73366. }
  73367. function U7e(t, e) {
  73368. return wr(t) ? t !== e : t != null && isFinite(t);
  73369. }
  73370. var Sre;
  73371. process.env.NODE_ENV !== "production" && (Sre = function(t, e) {
  73372. Ce(LO, t) || dn("Prop `" + t + "` is not a permitted in `" + e + "`. Only `" + st(LO).join("`, `") + "` are permitted.");
  73373. });
  73374. var xre = bt(), X7e = ["percent", "easing", "shape", "style", "extra"];
  73375. function wre(t) {
  73376. t.stopAnimation("keyframe"), t.attr(xre(t));
  73377. }
  73378. function BO(t, e, n) {
  73379. if (!(!n.isAnimationEnabled() || !e)) {
  73380. if (ue(e)) {
  73381. k(e, function(s) {
  73382. BO(t, s, n);
  73383. });
  73384. return;
  73385. }
  73386. var r = e.keyframes, i = e.duration;
  73387. if (n && i == null) {
  73388. var a = pp("enter", n, 0);
  73389. i = a && a.duration;
  73390. }
  73391. if (!(!r || !i)) {
  73392. var o = xre(t);
  73393. k(NO, function(s) {
  73394. if (!(s && !t[s])) {
  73395. var l, u = !1;
  73396. r.sort(function(c, f) {
  73397. return c.percent - f.percent;
  73398. }), k(r, function(c) {
  73399. var f = t.animators, d = s ? c[s] : c;
  73400. if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (u = !0), !!d) {
  73401. var h = st(d);
  73402. if (s || (h = Nt(h, function(g) {
  73403. return et(X7e, g) < 0;
  73404. })), !!h.length) {
  73405. l || (l = t.animate(s, e.loop, !0), l.scope = "keyframe");
  73406. for (var p = 0; p < f.length; p++)
  73407. f[p] !== l && f[p].targetName === l.targetName && f[p].stopTracks(h);
  73408. s && (o[s] = o[s] || {});
  73409. var v = s ? o[s] : o;
  73410. k(h, function(g) {
  73411. v[g] = ((s ? t[s] : t) || {})[g];
  73412. }), l.whenWithKeys(i * c.percent, d, h, c.easing);
  73413. }
  73414. }
  73415. }), 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));
  73416. }
  73417. });
  73418. }
  73419. }
  73420. }
  73421. var ks = "emphasis", Vl = "normal", lL = "blur", uL = "select", du = [Vl, ks, lL, uL], FP = {
  73422. normal: ["itemStyle"],
  73423. emphasis: [ks, "itemStyle"],
  73424. blur: [lL, "itemStyle"],
  73425. select: [uL, "itemStyle"]
  73426. }, WP = {
  73427. normal: ["label"],
  73428. emphasis: [ks, "label"],
  73429. blur: [lL, "label"],
  73430. select: [uL, "label"]
  73431. }, Y7e = ["x", "y"], q7e = "e\0\0", ia = {
  73432. normal: {},
  73433. emphasis: {},
  73434. blur: {},
  73435. select: {}
  73436. }, FW = {
  73437. cartesian2d: I7e,
  73438. geo: R7e,
  73439. single: L7e,
  73440. polar: B7e,
  73441. calendar: z7e
  73442. };
  73443. function zO(t) {
  73444. return t instanceof ot;
  73445. }
  73446. function AE(t) {
  73447. return t instanceof Ma;
  73448. }
  73449. function K7e(t, e) {
  73450. e.copyTransform(t), AE(e) && AE(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, zO(e) && zO(t) && e.setShape(t.shape));
  73451. }
  73452. var J7e = (
  73453. /** @class */
  73454. function(t) {
  73455. q(e, t);
  73456. function e() {
  73457. var n = t !== null && t.apply(this, arguments) || this;
  73458. return n.type = e.type, n;
  73459. }
  73460. return e.prototype.render = function(n, r, i, a) {
  73461. this._progressiveEls = null;
  73462. var o = this._data, s = n.getData(), l = this.group, u = WW(n, s, r, i);
  73463. o || l.removeAll(), s.diff(o).add(function(f) {
  73464. QP(i, null, f, u(f, a), n, l, s);
  73465. }).remove(function(f) {
  73466. var d = o.getItemGraphicEl(f);
  73467. d && Sw(d, Rs(d).option, n);
  73468. }).update(function(f, d) {
  73469. var h = o.getItemGraphicEl(d);
  73470. QP(i, h, f, u(f, a), n, l, s);
  73471. }).execute();
  73472. var c = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
  73473. c ? l.setClipPath(c) : l.removeClipPath(), this._data = s;
  73474. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  73475. this.group.removeAll(), this._data = null;
  73476. }, e.prototype.incrementalRender = function(n, r, i, a, o) {
  73477. var s = r.getData(), l = WW(r, s, i, a), u = this._progressiveEls = [];
  73478. function c(h) {
  73479. h.isGroup || (h.incremental = !0, h.ensureState("emphasis").hoverLayer = !0);
  73480. }
  73481. for (var f = n.start; f < n.end; f++) {
  73482. var d = QP(null, null, f, l(f, o), r, this.group, s);
  73483. d && (d.traverse(c), u.push(d));
  73484. }
  73485. }, e.prototype.eachRendered = function(n) {
  73486. Tu(this._progressiveEls || this.group, n);
  73487. }, e.prototype.filterForExposedEvent = function(n, r, i, a) {
  73488. var o = r.element;
  73489. if (o == null || i.name === o)
  73490. return !0;
  73491. for (; (i = i.__hostTarget || i.parent) && i !== this.group; )
  73492. if (i.name === o)
  73493. return !0;
  73494. return !1;
  73495. }, e.type = "custom", e;
  73496. }(zt)
  73497. );
  73498. function cL(t) {
  73499. var e = t.type, n;
  73500. if (e === "path") {
  73501. var r = t.shape, i = r.width != null && r.height != null ? {
  73502. x: r.x || 0,
  73503. y: r.y || 0,
  73504. width: r.width,
  73505. height: r.height
  73506. } : null, a = Pre(r);
  73507. n = F0(a, null, i, r.layout || "center"), Rs(n).customPathData = a;
  73508. } else if (e === "image")
  73509. n = new lr({}), Rs(n).customImagePath = t.style.image;
  73510. else if (e === "text")
  73511. n = new gt({});
  73512. else if (e === "group")
  73513. n = new Ve();
  73514. else {
  73515. if (e === "compoundPath")
  73516. throw new Error('"compoundPath" is not supported yet.');
  73517. var o = Kx(e);
  73518. if (!o) {
  73519. var s = "";
  73520. process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), Et(s);
  73521. }
  73522. n = new o();
  73523. }
  73524. return Rs(n).customGraphicType = e, n.name = t.name, n.z2EmphasisLift = 1, n.z2SelectLift = 1, n;
  73525. }
  73526. function fL(t, e, n, r, i, a, o) {
  73527. wre(e);
  73528. var s = i && i.normal.cfg;
  73529. s && e.setTextConfig(s), r && r.transition == null && (r.transition = Y7e);
  73530. var l = r && r.style;
  73531. if (l) {
  73532. if (e.type === "text") {
  73533. var u = l;
  73534. Ce(u, "textFill") && (u.fill = u.textFill), Ce(u, "textStroke") && (u.stroke = u.textStroke);
  73535. }
  73536. var c = void 0, f = zO(e) ? l.decal : null;
  73537. t && f && (f.dirty = !0, c = Fh(f, t)), l.__decalPattern = c;
  73538. }
  73539. if (AE(e) && l) {
  73540. var c = l.__decalPattern;
  73541. c && (l.decal = c);
  73542. }
  73543. U_(e, r, a, {
  73544. dataIndex: n,
  73545. isInit: o,
  73546. clearStyle: !0
  73547. }), BO(e, r.keyframeAnimation, a);
  73548. }
  73549. function Cre(t, e, n, r, i) {
  73550. var a = e.isGroup ? null : e, o = i && i[t].cfg;
  73551. if (a) {
  73552. var s = a.ensureState(t);
  73553. if (r === !1) {
  73554. var l = a.getState(t);
  73555. l && (l.style = null);
  73556. } else
  73557. s.style = r || null;
  73558. o && (s.textConfig = o), bf(a);
  73559. }
  73560. }
  73561. function eQe(t, e, n) {
  73562. if (!t.isGroup) {
  73563. var r = t, i = n.currentZ, a = n.currentZLevel;
  73564. r.z = i, r.zlevel = a;
  73565. var o = e.z2;
  73566. o != null && (r.z2 = o || 0);
  73567. for (var s = 0; s < du.length; s++)
  73568. tQe(r, e, du[s]);
  73569. }
  73570. }
  73571. function tQe(t, e, n) {
  73572. var r = n === Vl, i = r ? e : VO(e, n), a = i ? i.z2 : null, o;
  73573. a != null && (o = r ? t : t.ensureState(n), o.z2 = a || 0);
  73574. }
  73575. function WW(t, e, n, r) {
  73576. var i = t.get("renderItem"), a = t.coordinateSystem, o = {};
  73577. a && (process.env.NODE_ENV !== "production" && (ke(i, "series.render is required."), ke(a.prepareCustoms || FW[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : FW[a.type](a));
  73578. for (var s = Re({
  73579. getWidth: r.getWidth,
  73580. getHeight: r.getHeight,
  73581. getZr: r.getZr,
  73582. getDevicePixelRatio: r.getDevicePixelRatio,
  73583. value: _,
  73584. style: S,
  73585. ordinalRawValue: O,
  73586. styleEmphasis: x,
  73587. visual: w,
  73588. barLayout: P,
  73589. currentSeriesIndices: $,
  73590. font: A
  73591. }, o.api || {}), l = {
  73592. // The life cycle of context: current round of rendering.
  73593. // The global life cycle is probably not necessary, because
  73594. // user can store global status by themselves.
  73595. context: {},
  73596. seriesId: t.id,
  73597. seriesName: t.name,
  73598. seriesIndex: t.seriesIndex,
  73599. coordSys: o.coordSys,
  73600. dataInsideLength: e.count(),
  73601. encode: nQe(t.getData())
  73602. }, u, c, f = {}, d = {}, h = {}, p = {}, v = 0; v < du.length; v++) {
  73603. var g = du[v];
  73604. h[g] = t.getModel(FP[g]), p[g] = t.getModel(WP[g]);
  73605. }
  73606. function m(D) {
  73607. return D === u ? c || (c = e.getItemModel(D)) : e.getItemModel(D);
  73608. }
  73609. function y(D, E) {
  73610. return e.hasItemOption ? D === u ? f[E] || (f[E] = m(D).getModel(FP[E])) : m(D).getModel(FP[E]) : h[E];
  73611. }
  73612. function b(D, E) {
  73613. return e.hasItemOption ? D === u ? d[E] || (d[E] = m(D).getModel(WP[E])) : m(D).getModel(WP[E]) : p[E];
  73614. }
  73615. return function(D, E) {
  73616. return u = D, c = null, f = {}, d = {}, i && i(Re({
  73617. dataIndexInside: D,
  73618. dataIndex: e.getRawIndex(D),
  73619. // Can be used for optimization when zoom or roam.
  73620. actionType: E ? E.type : null
  73621. }, l), s);
  73622. };
  73623. function _(D, E) {
  73624. return E == null && (E = u), e.getStore().get(e.getDimensionIndex(D || 0), E);
  73625. }
  73626. function O(D, E) {
  73627. E == null && (E = u), D = D || 0;
  73628. var R = e.getDimensionInfo(D);
  73629. if (!R) {
  73630. var N = e.getDimensionIndex(D);
  73631. return N >= 0 ? e.getStore().get(N, E) : void 0;
  73632. }
  73633. var V = e.get(R.name, E), z = R && R.ordinalMeta;
  73634. return z ? z.categories[V] : V;
  73635. }
  73636. function S(D, E) {
  73637. process.env.NODE_ENV !== "production" && LW("api.style", "Please write literal style directly instead."), E == null && (E = u);
  73638. var R = e.getItemVisual(E, "style"), N = R && R.fill, V = R && R.opacity, z = y(E, Vl).getItemStyle();
  73639. N != null && (z.fill = N), V != null && (z.opacity = V);
  73640. var W = {
  73641. inheritColor: Oe(N) ? N : "#000"
  73642. }, F = b(E, Vl), Q = Zt(F, null, W, !1, !0);
  73643. Q.text = F.getShallow("show") ? We(t.getFormattedLabel(E, Vl), Wh(e, E)) : null;
  73644. var Z = cO(F, W, !1);
  73645. return T(D, z), z = RW(z, Q, Z), D && C(z, D), z.legacy = !0, z;
  73646. }
  73647. function x(D, E) {
  73648. process.env.NODE_ENV !== "production" && LW("api.styleEmphasis", "Please write literal style directly instead."), E == null && (E = u);
  73649. var R = y(E, ks).getItemStyle(), N = b(E, ks), V = Zt(N, null, null, !0, !0);
  73650. V.text = N.getShallow("show") ? ji(t.getFormattedLabel(E, ks), t.getFormattedLabel(E, Vl), Wh(e, E)) : null;
  73651. var z = cO(N, null, !0);
  73652. return T(D, R), R = RW(R, V, z), D && C(R, D), R.legacy = !0, R;
  73653. }
  73654. function C(D, E) {
  73655. for (var R in E)
  73656. Ce(E, R) && (D[R] = E[R]);
  73657. }
  73658. function T(D, E) {
  73659. D && (D.textFill && (E.textFill = D.textFill), D.textPosition && (E.textPosition = D.textPosition));
  73660. }
  73661. function w(D, E) {
  73662. if (E == null && (E = u), Ce(MW, D)) {
  73663. var R = e.getItemVisual(E, "style");
  73664. return R ? R[MW[D]] : null;
  73665. }
  73666. if (Ce(A7e, D))
  73667. return e.getItemVisual(E, D);
  73668. }
  73669. function P(D) {
  73670. if (a.type === "cartesian2d") {
  73671. var E = a.getBaseAxis();
  73672. return MNe(Re({
  73673. axis: E
  73674. }, D));
  73675. }
  73676. }
  73677. function $() {
  73678. return n.getCurrentSeriesIndices();
  73679. }
  73680. function A(D) {
  73681. return GR(D, n);
  73682. }
  73683. }
  73684. function nQe(t) {
  73685. var e = {};
  73686. return k(t.dimensions, function(n) {
  73687. var r = t.getDimensionInfo(n);
  73688. if (!r.isExtraCoord) {
  73689. var i = r.coordDim, a = e[i] = e[i] || [];
  73690. a[r.coordDimIndex] = t.getDimensionIndex(n);
  73691. }
  73692. }), e;
  73693. }
  73694. function QP(t, e, n, r, i, a, o) {
  73695. if (!r) {
  73696. a.remove(e);
  73697. return;
  73698. }
  73699. var s = dL(t, e, n, r, i, a);
  73700. return s && o.setItemGraphicEl(n, s), s && bn(s, r.focus, r.blurScope, r.emphasisDisabled), s;
  73701. }
  73702. function dL(t, e, n, r, i, a) {
  73703. process.env.NODE_ENV !== "production" && ke(r, "should not have an null/undefined element setting");
  73704. var o = -1, s = e;
  73705. e && Tre(e, r, i) && (o = et(a.childrenRef(), e), e = null);
  73706. var l = !e, u = e;
  73707. u ? u.clearStates() : (u = cL(r), s && K7e(s, u)), r.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), ia.normal.cfg = ia.normal.conOpt = ia.emphasis.cfg = ia.emphasis.conOpt = ia.blur.cfg = ia.blur.conOpt = ia.select.cfg = ia.select.conOpt = null, ia.isLegacy = !1, iQe(u, n, r, i, l, ia), rQe(u, n, r, i, l), fL(t, u, n, r, ia, i, l), Ce(r, "info") && (Rs(u).info = r.info);
  73708. for (var c = 0; c < du.length; c++) {
  73709. var f = du[c];
  73710. if (f !== Vl) {
  73711. var d = VO(r, f), h = hL(r, d, f);
  73712. Cre(f, u, d, h, ia);
  73713. }
  73714. }
  73715. return eQe(u, r, i), r.type === "group" && aQe(t, u, n, r, i), o >= 0 ? a.replaceAt(u, o) : a.add(u), u;
  73716. }
  73717. function Tre(t, e, n) {
  73718. var r = Rs(t), i = e.type, a = e.shape, o = e.style;
  73719. return (
  73720. // Always create new if universal transition is enabled.
  73721. // Because we do transition after render. It needs to know what old element is. Replacement will loose it.
  73722. n.isUniversalTransitionEnabled() || i != null && i !== r.customGraphicType || i === "path" && uQe(a) && Pre(a) !== r.customPathData || i === "image" && Ce(o, "image") && o.image !== r.customImagePath
  73723. );
  73724. }
  73725. function rQe(t, e, n, r, i) {
  73726. var a = n.clipPath;
  73727. if (a === !1)
  73728. t && t.getClipPath() && t.removeClipPath();
  73729. else if (a) {
  73730. var o = t.getClipPath();
  73731. o && Tre(o, a, r) && (o = null), o || (o = cL(a), process.env.NODE_ENV !== "production" && ke(zO(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), t.setClipPath(o)), fL(null, o, e, a, null, r, i);
  73732. }
  73733. }
  73734. function iQe(t, e, n, r, i, a) {
  73735. if (!t.isGroup) {
  73736. QW(n, null, a), QW(n, ks, a);
  73737. var o = a.normal.conOpt, s = a.emphasis.conOpt, l = a.blur.conOpt, u = a.select.conOpt;
  73738. if (o != null || s != null || u != null || l != null) {
  73739. var c = t.getTextContent();
  73740. if (o === !1)
  73741. c && t.removeTextContent();
  73742. else {
  73743. o = a.normal.conOpt = o || {
  73744. type: "text"
  73745. }, c ? c.clearStates() : (c = cL(o), t.setTextContent(c)), fL(null, c, e, o, null, r, i);
  73746. for (var f = o && o.style, d = 0; d < du.length; d++) {
  73747. var h = du[d];
  73748. if (h !== Vl) {
  73749. var p = a[h].conOpt;
  73750. Cre(h, c, p, hL(o, p, h), null);
  73751. }
  73752. }
  73753. f ? c.dirty() : c.markRedraw();
  73754. }
  73755. }
  73756. }
  73757. }
  73758. function QW(t, e, n) {
  73759. var r = e ? VO(t, e) : t, i = e ? hL(t, r, ks) : t.style, a = t.type, o = r ? r.textConfig : null, s = t.textContent, l = s ? e ? VO(s, e) : s : null;
  73760. if (i && // Because emphasis style has little info to detect legacy,
  73761. // if normal is legacy, emphasis is trade as legacy.
  73762. (n.isLegacy || yre(i, a, !!o, !!l))) {
  73763. n.isLegacy = !0;
  73764. var u = bre(i, a, !e);
  73765. !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
  73766. }
  73767. if (!e && l) {
  73768. var c = l;
  73769. !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && ke(c.type === "text", 'textContent.type must be "text"');
  73770. }
  73771. var f = e ? n[e] : n.normal;
  73772. f.cfg = o, f.conOpt = l;
  73773. }
  73774. function VO(t, e) {
  73775. return e ? t ? t[e] : null : t;
  73776. }
  73777. function hL(t, e, n) {
  73778. var r = e && e.style;
  73779. return r == null && n === ks && t && (r = t.styleEmphasis), r;
  73780. }
  73781. function aQe(t, e, n, r, i) {
  73782. var a = r.children, o = a ? a.length : 0, s = r.$mergeChildren, l = s === "byName" || r.diffChildrenByName, u = s === !1;
  73783. if (!(!o && !l && !u)) {
  73784. if (l) {
  73785. sQe({
  73786. api: t,
  73787. oldChildren: e.children() || [],
  73788. newChildren: a || [],
  73789. dataIndex: n,
  73790. seriesModel: i,
  73791. group: e
  73792. });
  73793. return;
  73794. }
  73795. u && e.removeAll();
  73796. for (var c = 0; c < o; c++) {
  73797. var f = a[c], d = e.childAt(c);
  73798. f ? (f.ignore == null && (f.ignore = !1), dL(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);
  73799. }
  73800. for (var h = e.childCount() - 1; h >= c; h--) {
  73801. var p = e.childAt(h);
  73802. oQe(e, p, i);
  73803. }
  73804. }
  73805. }
  73806. function oQe(t, e, n) {
  73807. e && Sw(e, Rs(t).option, n);
  73808. }
  73809. function sQe(t) {
  73810. new Us(t.oldChildren, t.newChildren, HW, HW, t).add(GW).update(GW).remove(lQe).execute();
  73811. }
  73812. function HW(t, e) {
  73813. var n = t && t.name;
  73814. return n ?? q7e + e;
  73815. }
  73816. function GW(t, e) {
  73817. var n = this.context, r = t != null ? n.newChildren[t] : null, i = e != null ? n.oldChildren[e] : null;
  73818. dL(n.api, i, n.dataIndex, r, n.seriesModel, n.group);
  73819. }
  73820. function lQe(t) {
  73821. var e = this.context, n = e.oldChildren[t];
  73822. n && Sw(n, Rs(n).option, e.seriesModel);
  73823. }
  73824. function Pre(t) {
  73825. return t && (t.pathData || t.d);
  73826. }
  73827. function uQe(t) {
  73828. return t && (Ce(t, "pathData") || Ce(t, "d"));
  73829. }
  73830. function cQe(t) {
  73831. t.registerChartView(J7e), t.registerSeriesModel(E7e);
  73832. }
  73833. var wc = bt(), jW = Le, HP = xe, pL = (
  73834. /** @class */
  73835. function() {
  73836. function t() {
  73837. this._dragging = !1, this.animationThreshold = 15;
  73838. }
  73839. return t.prototype.render = function(e, n, r, i) {
  73840. var a = n.get("value"), o = n.get("status");
  73841. if (this._axisModel = e, this._axisPointerModel = n, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
  73842. this._lastValue = a, this._lastStatus = o;
  73843. var s = this._group, l = this._handle;
  73844. if (!o || o === "hide") {
  73845. s && s.hide(), l && l.hide();
  73846. return;
  73847. }
  73848. s && s.show(), l && l.show();
  73849. var u = {};
  73850. this.makeElOption(u, a, e, n, r);
  73851. var c = u.graphicKey;
  73852. c !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = c;
  73853. var f = this._moveAnimation = this.determineAnimation(e, n);
  73854. if (!s)
  73855. s = this._group = new Ve(), this.createPointerEl(s, u, e, n), this.createLabelEl(s, u, e, n), r.getZr().add(s);
  73856. else {
  73857. var d = Ue(ZW, n, f);
  73858. this.updatePointerEl(s, u, d), this.updateLabelEl(s, u, d, n);
  73859. }
  73860. XW(s, n, !0), this._renderHandle(a);
  73861. }
  73862. }, t.prototype.remove = function(e) {
  73863. this.clear(e);
  73864. }, t.prototype.dispose = function(e) {
  73865. this.clear(e);
  73866. }, t.prototype.determineAnimation = function(e, n) {
  73867. var r = n.get("animation"), i = e.axis, a = i.type === "category", o = n.get("snap");
  73868. if (!o && !a)
  73869. return !1;
  73870. if (r === "auto" || r == null) {
  73871. var s = this.animationThreshold;
  73872. if (a && i.getBandWidth() > s)
  73873. return !0;
  73874. if (o) {
  73875. var l = Bk(e).seriesDataCount, u = i.getExtent();
  73876. return Math.abs(u[0] - u[1]) / l > s;
  73877. }
  73878. return !1;
  73879. }
  73880. return r === !0;
  73881. }, t.prototype.makeElOption = function(e, n, r, i, a) {
  73882. }, t.prototype.createPointerEl = function(e, n, r, i) {
  73883. var a = n.pointer;
  73884. if (a) {
  73885. var o = wc(e).pointerEl = new Lf[a.type](jW(n.pointer));
  73886. e.add(o);
  73887. }
  73888. }, t.prototype.createLabelEl = function(e, n, r, i) {
  73889. if (n.label) {
  73890. var a = wc(e).labelEl = new gt(jW(n.label));
  73891. e.add(a), UW(a, i);
  73892. }
  73893. }, t.prototype.updatePointerEl = function(e, n, r) {
  73894. var i = wc(e).pointerEl;
  73895. i && n.pointer && (i.setStyle(n.pointer.style), r(i, {
  73896. shape: n.pointer.shape
  73897. }));
  73898. }, t.prototype.updateLabelEl = function(e, n, r, i) {
  73899. var a = wc(e).labelEl;
  73900. a && (a.setStyle(n.label.style), r(a, {
  73901. // Consider text length change in vertical axis, animation should
  73902. // be used on shape, otherwise the effect will be weird.
  73903. // TODOTODO
  73904. // shape: elOption.label.shape,
  73905. x: n.label.x,
  73906. y: n.label.y
  73907. }), UW(a, i));
  73908. }, t.prototype._renderHandle = function(e) {
  73909. if (!(this._dragging || !this.updateHandleTransform)) {
  73910. var n = this._axisPointerModel, r = this._api.getZr(), i = this._handle, a = n.getModel("handle"), o = n.get("status");
  73911. if (!a.get("show") || !o || o === "hide") {
  73912. i && r.remove(i), this._handle = null;
  73913. return;
  73914. }
  73915. var s;
  73916. this._handle || (s = !0, i = this._handle = vp(a.get("icon"), {
  73917. cursor: "move",
  73918. draggable: !0,
  73919. onmousemove: function(u) {
  73920. Gs(u.event);
  73921. },
  73922. onmousedown: HP(this._onHandleDragMove, this, 0, 0),
  73923. drift: HP(this._onHandleDragMove, this),
  73924. ondragend: HP(this._onHandleDragEnd, this)
  73925. }), r.add(i)), XW(i, n, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
  73926. var l = a.get("size");
  73927. ue(l) || (l = [l, l]), i.scaleX = l[0] / 2, i.scaleY = l[1] / 2, Sp(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
  73928. }
  73929. }, t.prototype._moveHandleToValue = function(e, n) {
  73930. ZW(this._axisPointerModel, !n && this._moveAnimation, this._handle, GP(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
  73931. }, t.prototype._onHandleDragMove = function(e, n) {
  73932. var r = this._handle;
  73933. if (r) {
  73934. this._dragging = !0;
  73935. var i = this.updateHandleTransform(GP(r), [e, n], this._axisModel, this._axisPointerModel);
  73936. this._payloadInfo = i, r.stopAnimation(), r.attr(GP(i)), wc(r).lastProp = null, this._doDispatchAxisPointer();
  73937. }
  73938. }, t.prototype._doDispatchAxisPointer = function() {
  73939. var e = this._handle;
  73940. if (e) {
  73941. var n = this._payloadInfo, r = this._axisModel;
  73942. this._api.dispatchAction({
  73943. type: "updateAxisPointer",
  73944. x: n.cursorPoint[0],
  73945. y: n.cursorPoint[1],
  73946. tooltipOption: n.tooltipOption,
  73947. axesInfo: [{
  73948. axisDim: r.axis.dim,
  73949. axisIndex: r.componentIndex
  73950. }]
  73951. });
  73952. }
  73953. }, t.prototype._onHandleDragEnd = function() {
  73954. this._dragging = !1;
  73955. var e = this._handle;
  73956. if (e) {
  73957. var n = this._axisPointerModel.get("value");
  73958. this._moveHandleToValue(n), this._api.dispatchAction({
  73959. type: "hideTip"
  73960. });
  73961. }
  73962. }, t.prototype.clear = function(e) {
  73963. this._lastValue = null, this._lastStatus = null;
  73964. var n = e.getZr(), r = this._group, i = this._handle;
  73965. n && r && (this._lastGraphicKey = null, r && n.remove(r), i && n.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), $m(this, "_doDispatchAxisPointer");
  73966. }, t.prototype.doClear = function() {
  73967. }, t.prototype.buildLabel = function(e, n, r) {
  73968. return r = r || 0, {
  73969. x: e[r],
  73970. y: e[1 - r],
  73971. width: n[r],
  73972. height: n[1 - r]
  73973. };
  73974. }, t;
  73975. }()
  73976. );
  73977. function ZW(t, e, n, r) {
  73978. $re(wc(n).lastProp, r) || (wc(n).lastProp = r, e ? Ct(n, r, t) : (n.stopAnimation(), n.attr(r)));
  73979. }
  73980. function $re(t, e) {
  73981. if (Ie(t) && Ie(e)) {
  73982. var n = !0;
  73983. return k(e, function(r, i) {
  73984. n = n && $re(t[i], r);
  73985. }), !!n;
  73986. } else
  73987. return t === e;
  73988. }
  73989. function UW(t, e) {
  73990. t[e.get(["label", "show"]) ? "show" : "hide"]();
  73991. }
  73992. function GP(t) {
  73993. return {
  73994. x: t.x || 0,
  73995. y: t.y || 0,
  73996. rotation: t.rotation || 0
  73997. };
  73998. }
  73999. function XW(t, e, n) {
  74000. var r = e.get("z"), i = e.get("zlevel");
  74001. t && t.traverse(function(a) {
  74002. a.type !== "group" && (r != null && (a.z = r), i != null && (a.zlevel = i), a.silent = n);
  74003. });
  74004. }
  74005. function vL(t) {
  74006. var e = t.get("type"), n = t.getModel(e + "Style"), r;
  74007. return e === "line" ? (r = n.getLineStyle(), r.fill = null) : e === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
  74008. }
  74009. function Are(t, e, n, r, i) {
  74010. var a = n.get("value"), o = Ere(a, e.axis, e.ecModel, n.get("seriesDataIndices"), {
  74011. precision: n.get(["label", "precision"]),
  74012. formatter: n.get(["label", "formatter"])
  74013. }), s = n.getModel("label"), l = Bf(s.get("padding") || 0), u = s.getFont(), c = k0(o, u), f = i.position, d = c.width + l[1] + l[3], h = c.height + l[0] + l[2], p = i.align;
  74014. p === "right" && (f[0] -= d), p === "center" && (f[0] -= d / 2);
  74015. var v = i.verticalAlign;
  74016. v === "bottom" && (f[1] -= h), v === "middle" && (f[1] -= h / 2), fQe(f, d, h, r);
  74017. var g = s.get("backgroundColor");
  74018. (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
  74019. // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
  74020. x: f[0],
  74021. y: f[1],
  74022. style: Zt(s, {
  74023. text: o,
  74024. font: u,
  74025. fill: s.getTextColor(),
  74026. padding: l,
  74027. backgroundColor: g
  74028. }),
  74029. // Label should be over axisPointer.
  74030. z2: 10
  74031. };
  74032. }
  74033. function fQe(t, e, n, r) {
  74034. var i = r.getWidth(), a = r.getHeight();
  74035. 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);
  74036. }
  74037. function Ere(t, e, n, r, i) {
  74038. t = e.scale.parse(t);
  74039. var a = e.scale.getLabel({
  74040. value: t
  74041. }, {
  74042. // If `precision` is set, width can be fixed (like '12.00500'), which
  74043. // helps to debounce when when moving label.
  74044. precision: i.precision
  74045. }), o = i.formatter;
  74046. if (o) {
  74047. var s = {
  74048. value: Pk(e, {
  74049. value: t
  74050. }),
  74051. axisDimension: e.dim,
  74052. axisIndex: e.index,
  74053. seriesData: []
  74054. };
  74055. k(r, function(l) {
  74056. var u = n.getSeriesByIndex(l.seriesIndex), c = l.dataIndexInside, f = u && u.getDataParams(c);
  74057. f && s.seriesData.push(f);
  74058. }), Oe(o) ? a = o.replace("{value}", a) : Me(o) && (a = o(s));
  74059. }
  74060. return a;
  74061. }
  74062. function gL(t, e, n) {
  74063. var r = Si();
  74064. return Cu(r, r, n.rotation), ao(r, r, n.position), to([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
  74065. }
  74066. function Mre(t, e, n, r, i, a) {
  74067. var o = Kr.innerTextLayout(n.rotation, 0, n.labelDirection);
  74068. n.labelMargin = i.get(["label", "margin"]), Are(e, r, i, a, {
  74069. position: gL(r.axis, t, n),
  74070. align: o.textAlign,
  74071. verticalAlign: o.textVerticalAlign
  74072. });
  74073. }
  74074. function mL(t, e, n) {
  74075. return n = n || 0, {
  74076. x1: t[n],
  74077. y1: t[1 - n],
  74078. x2: e[n],
  74079. y2: e[1 - n]
  74080. };
  74081. }
  74082. function Ire(t, e, n) {
  74083. return n = n || 0, {
  74084. x: t[n],
  74085. y: t[1 - n],
  74086. width: e[n],
  74087. height: e[1 - n]
  74088. };
  74089. }
  74090. function YW(t, e, n, r, i, a) {
  74091. return {
  74092. cx: t,
  74093. cy: e,
  74094. r0: n,
  74095. r,
  74096. startAngle: i,
  74097. endAngle: a,
  74098. clockwise: !0
  74099. };
  74100. }
  74101. var dQe = (
  74102. /** @class */
  74103. function(t) {
  74104. q(e, t);
  74105. function e() {
  74106. return t !== null && t.apply(this, arguments) || this;
  74107. }
  74108. return e.prototype.makeElOption = function(n, r, i, a, o) {
  74109. var s = i.axis, l = s.grid, u = a.get("type"), c = qW(l, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(r, !0));
  74110. if (u && u !== "none") {
  74111. var d = vL(a), h = hQe[u](s, f, c);
  74112. h.style = d, n.graphicKey = h.type, n.pointer = h;
  74113. }
  74114. var p = fE(l.model, i);
  74115. Mre(
  74116. // @ts-ignore
  74117. r,
  74118. n,
  74119. p,
  74120. i,
  74121. a,
  74122. o
  74123. );
  74124. }, e.prototype.getHandleTransform = function(n, r, i) {
  74125. var a = fE(r.axis.grid.model, r, {
  74126. labelInside: !1
  74127. });
  74128. a.labelMargin = i.get(["handle", "margin"]);
  74129. var o = gL(r.axis, n, a);
  74130. return {
  74131. x: o[0],
  74132. y: o[1],
  74133. rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
  74134. };
  74135. }, e.prototype.updateHandleTransform = function(n, r, i, a) {
  74136. var o = i.axis, s = o.grid, l = o.getGlobalExtent(!0), u = qW(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [n.x, n.y];
  74137. f[c] += r[c], f[c] = Math.min(l[1], f[c]), f[c] = Math.max(l[0], f[c]);
  74138. var d = (u[1] + u[0]) / 2, h = [d, d];
  74139. h[c] = f[c];
  74140. var p = [{
  74141. verticalAlign: "middle"
  74142. }, {
  74143. align: "center"
  74144. }];
  74145. return {
  74146. x: f[0],
  74147. y: f[1],
  74148. rotation: n.rotation,
  74149. cursorPoint: h,
  74150. tooltipOption: p[c]
  74151. };
  74152. }, e;
  74153. }(pL)
  74154. );
  74155. function qW(t, e) {
  74156. var n = {};
  74157. return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n);
  74158. }
  74159. var hQe = {
  74160. line: function(t, e, n) {
  74161. var r = mL([e, n[0]], [e, n[1]], KW(t));
  74162. return {
  74163. type: "Line",
  74164. subPixelOptimize: !0,
  74165. shape: r
  74166. };
  74167. },
  74168. shadow: function(t, e, n) {
  74169. var r = Math.max(1, t.getBandWidth()), i = n[1] - n[0];
  74170. return {
  74171. type: "Rect",
  74172. shape: Ire([e - r / 2, n[0]], [r, i], KW(t))
  74173. };
  74174. }
  74175. };
  74176. function KW(t) {
  74177. return t.dim === "x" ? 0 : 1;
  74178. }
  74179. var pQe = (
  74180. /** @class */
  74181. function(t) {
  74182. q(e, t);
  74183. function e() {
  74184. var n = t !== null && t.apply(this, arguments) || this;
  74185. return n.type = e.type, n;
  74186. }
  74187. return e.type = "axisPointer", e.defaultOption = {
  74188. // 'auto' means that show when triggered by tooltip or handle.
  74189. show: "auto",
  74190. // zlevel: 0,
  74191. z: 50,
  74192. type: "line",
  74193. // axispointer triggered by tootip determine snap automatically,
  74194. // see `modelHelper`.
  74195. snap: !1,
  74196. triggerTooltip: !0,
  74197. triggerEmphasis: !0,
  74198. value: null,
  74199. status: null,
  74200. link: [],
  74201. // Do not set 'auto' here, otherwise global animation: false
  74202. // will not effect at this axispointer.
  74203. animation: null,
  74204. animationDurationUpdate: 200,
  74205. lineStyle: {
  74206. color: "#B9BEC9",
  74207. width: 1,
  74208. type: "dashed"
  74209. },
  74210. shadowStyle: {
  74211. color: "rgba(210,219,238,0.2)"
  74212. },
  74213. label: {
  74214. show: !0,
  74215. formatter: null,
  74216. precision: "auto",
  74217. margin: 3,
  74218. color: "#fff",
  74219. padding: [5, 7, 5, 7],
  74220. backgroundColor: "auto",
  74221. borderColor: null,
  74222. borderWidth: 0,
  74223. borderRadius: 3
  74224. },
  74225. handle: {
  74226. show: !1,
  74227. // eslint-disable-next-line
  74228. 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",
  74229. size: 45,
  74230. // handle margin is from symbol center to axis, which is stable when circular move.
  74231. margin: 50,
  74232. // color: '#1b8bbd'
  74233. // color: '#2f4554'
  74234. color: "#333",
  74235. shadowBlur: 3,
  74236. shadowColor: "#aaa",
  74237. shadowOffsetX: 0,
  74238. shadowOffsetY: 2,
  74239. // For mobile performance
  74240. throttle: 40
  74241. }
  74242. }, e;
  74243. }(rt)
  74244. ), Es = bt(), vQe = k;
  74245. function Dre(t, e, n) {
  74246. if (!vt.node) {
  74247. var r = e.getZr();
  74248. Es(r).records || (Es(r).records = {}), gQe(r, e);
  74249. var i = Es(r).records[t] || (Es(r).records[t] = {});
  74250. i.handler = n;
  74251. }
  74252. }
  74253. function gQe(t, e) {
  74254. if (Es(t).initialized)
  74255. return;
  74256. Es(t).initialized = !0, n("click", Ue(JW, "click")), n("mousemove", Ue(JW, "mousemove")), n("globalout", yQe);
  74257. function n(r, i) {
  74258. t.on(r, function(a) {
  74259. var o = bQe(e);
  74260. vQe(Es(t).records, function(s) {
  74261. s && i(s, a, o.dispatchAction);
  74262. }), mQe(o.pendings, e);
  74263. });
  74264. }
  74265. }
  74266. function mQe(t, e) {
  74267. var n = t.showTip.length, r = t.hideTip.length, i;
  74268. n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
  74269. }
  74270. function yQe(t, e, n) {
  74271. t.handler("leave", null, n);
  74272. }
  74273. function JW(t, e, n, r) {
  74274. e.handler(t, n, r);
  74275. }
  74276. function bQe(t) {
  74277. var e = {
  74278. showTip: [],
  74279. hideTip: []
  74280. }, n = function(r) {
  74281. var i = e[r.type];
  74282. i ? i.push(r) : (r.dispatchAction = n, t.dispatchAction(r));
  74283. };
  74284. return {
  74285. dispatchAction: n,
  74286. pendings: e
  74287. };
  74288. }
  74289. function EE(t, e) {
  74290. if (!vt.node) {
  74291. var n = e.getZr(), r = (Es(n).records || {})[t];
  74292. r && (Es(n).records[t] = null);
  74293. }
  74294. }
  74295. var _Qe = (
  74296. /** @class */
  74297. function(t) {
  74298. q(e, t);
  74299. function e() {
  74300. var n = t !== null && t.apply(this, arguments) || this;
  74301. return n.type = e.type, n;
  74302. }
  74303. return e.prototype.render = function(n, r, i) {
  74304. var a = r.getComponent("tooltip"), o = n.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click";
  74305. Dre("axisPointer", i, function(s, l, u) {
  74306. o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
  74307. type: "updateAxisPointer",
  74308. currTrigger: s,
  74309. x: l && l.offsetX,
  74310. y: l && l.offsetY
  74311. });
  74312. });
  74313. }, e.prototype.remove = function(n, r) {
  74314. EE("axisPointer", r);
  74315. }, e.prototype.dispose = function(n, r) {
  74316. EE("axisPointer", r);
  74317. }, e.type = "axisPointer", e;
  74318. }(Xt)
  74319. );
  74320. function Rre(t, e) {
  74321. var n = [], r = t.seriesIndex, i;
  74322. if (r == null || !(i = e.getSeriesByIndex(r)))
  74323. return {
  74324. point: []
  74325. };
  74326. var a = i.getData(), o = mf(a, t);
  74327. if (o == null || o < 0 || ue(o))
  74328. return {
  74329. point: []
  74330. };
  74331. var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
  74332. if (i.getTooltipPosition)
  74333. n = i.getTooltipPosition(o) || [];
  74334. else if (l && l.dataToPoint)
  74335. if (t.isStacked) {
  74336. 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 = [];
  74337. v[h] = a.get(p, o), v[1 - h] = a.get(a.getCalculationInfo("stackResultDimension"), o), n = l.dataToPoint(v) || [];
  74338. } else
  74339. n = l.dataToPoint(a.getValues(ce(l.dimensions, function(m) {
  74340. return a.mapDimension(m);
  74341. }), o)) || [];
  74342. else if (s) {
  74343. var g = s.getBoundingRect().clone();
  74344. g.applyTransform(s.transform), n = [g.x + g.width / 2, g.y + g.height / 2];
  74345. }
  74346. return {
  74347. point: n,
  74348. el: s
  74349. };
  74350. }
  74351. var e7 = bt();
  74352. function OQe(t, e, n) {
  74353. var r = t.currTrigger, i = [t.x, t.y], a = t, o = t.dispatchAction || xe(n.dispatchAction, n), s = e.getComponent("axisPointer").coordSysAxesInfo;
  74354. if (s) {
  74355. X_(i) && (i = Rre({
  74356. seriesIndex: a.seriesIndex,
  74357. // Do not use dataIndexInside from other ec instance.
  74358. // FIXME: auto detect it?
  74359. dataIndex: a.dataIndex
  74360. }, e).point);
  74361. var l = X_(i), u = a.axesInfo, c = s.axesInfo, f = r === "leave" || X_(i), d = {}, h = {}, p = {
  74362. list: [],
  74363. map: {}
  74364. }, v = {
  74365. showPointer: Ue(xQe, h),
  74366. showTooltip: Ue(wQe, p)
  74367. };
  74368. k(s.coordSysMap, function(m, y) {
  74369. var b = l || m.containPoint(i);
  74370. k(s.coordSysAxesInfo[y], function(_, O) {
  74371. var S = _.axis, x = $Qe(u, _);
  74372. if (!f && b && (!u || x)) {
  74373. var C = x && x.value;
  74374. C == null && !l && (C = S.pointToData(i)), C != null && t7(_, C, v, !1, d);
  74375. }
  74376. });
  74377. });
  74378. var g = {};
  74379. return k(c, function(m, y) {
  74380. var b = m.linkGroup;
  74381. b && !h[y] && k(b.axesInfo, function(_, O) {
  74382. var S = h[O];
  74383. if (_ !== m && S) {
  74384. var x = S.value;
  74385. b.mapper && (x = m.axis.scale.parse(b.mapper(x, n7(_), n7(m)))), g[m.key] = x;
  74386. }
  74387. });
  74388. }), k(g, function(m, y) {
  74389. t7(c[y], m, v, !0, d);
  74390. }), CQe(h, c, d), TQe(p, i, t, o), PQe(c, o, n), d;
  74391. }
  74392. }
  74393. function t7(t, e, n, r, i) {
  74394. var a = t.axis;
  74395. if (!(a.scale.isBlank() || !a.containData(e))) {
  74396. if (!t.involveSeries) {
  74397. n.showPointer(t, e);
  74398. return;
  74399. }
  74400. var o = SQe(e, t), s = o.payloadBatch, l = o.snapToValue;
  74401. 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);
  74402. }
  74403. }
  74404. function SQe(t, e) {
  74405. var n = e.axis, r = n.dim, i = t, a = [], o = Number.MAX_VALUE, s = -1;
  74406. return k(e.seriesModels, function(l, u) {
  74407. var c = l.getData().mapDimensionsAll(r), f, d;
  74408. if (l.getAxisTooltipData) {
  74409. var h = l.getAxisTooltipData(c, t, n);
  74410. d = h.dataIndices, f = h.nestestValue;
  74411. } else {
  74412. if (d = l.getData().indicesOfNearest(
  74413. c[0],
  74414. t,
  74415. // Add a threshold to avoid find the wrong dataIndex
  74416. // when data length is not same.
  74417. // false,
  74418. n.type === "category" ? 0.5 : null
  74419. ), !d.length)
  74420. return;
  74421. f = l.getData().get(c[0], d[0]);
  74422. }
  74423. if (!(f == null || !isFinite(f))) {
  74424. var p = t - f, v = Math.abs(p);
  74425. v <= o && ((v < o || p >= 0 && s < 0) && (o = v, s = p, i = f, a.length = 0), k(d, function(g) {
  74426. a.push({
  74427. seriesIndex: l.seriesIndex,
  74428. dataIndexInside: g,
  74429. dataIndex: l.getData().getRawIndex(g)
  74430. });
  74431. }));
  74432. }
  74433. }), {
  74434. payloadBatch: a,
  74435. snapToValue: i
  74436. };
  74437. }
  74438. function xQe(t, e, n, r) {
  74439. t[e.key] = {
  74440. value: n,
  74441. payloadBatch: r
  74442. };
  74443. }
  74444. function wQe(t, e, n, r) {
  74445. var i = n.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
  74446. if (!(!e.triggerTooltip || !i.length)) {
  74447. var l = e.coordSys.model, u = km(l), c = t.map[u];
  74448. c || (c = t.map[u] = {
  74449. coordSysId: l.id,
  74450. coordSysIndex: l.componentIndex,
  74451. coordSysType: l.type,
  74452. coordSysMainType: l.mainType,
  74453. dataByAxis: []
  74454. }, t.list.push(c)), c.dataByAxis.push({
  74455. axisDim: a.dim,
  74456. axisIndex: o.componentIndex,
  74457. axisType: o.type,
  74458. axisId: o.id,
  74459. value: r,
  74460. // Caustion: viewHelper.getValueLabel is actually on "view stage", which
  74461. // depends that all models have been updated. So it should not be performed
  74462. // here. Considering axisPointerModel used here is volatile, which is hard
  74463. // to be retrieve in TooltipView, we prepare parameters here.
  74464. valueLabelOpt: {
  74465. precision: s.get(["label", "precision"]),
  74466. formatter: s.get(["label", "formatter"])
  74467. },
  74468. seriesDataIndices: i.slice()
  74469. });
  74470. }
  74471. }
  74472. function CQe(t, e, n) {
  74473. var r = n.axesInfo = [];
  74474. k(e, function(i, a) {
  74475. var o = i.axisPointerModel.option, s = t[a];
  74476. 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({
  74477. axisDim: i.axis.dim,
  74478. axisIndex: i.axis.model.componentIndex,
  74479. value: o.value
  74480. });
  74481. });
  74482. }
  74483. function TQe(t, e, n, r) {
  74484. if (X_(e) || !t.list.length) {
  74485. r({
  74486. type: "hideTip"
  74487. });
  74488. return;
  74489. }
  74490. var i = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  74491. r({
  74492. type: "showTip",
  74493. escapeConnect: !0,
  74494. x: e[0],
  74495. y: e[1],
  74496. tooltipOption: n.tooltipOption,
  74497. position: n.position,
  74498. dataIndexInside: i.dataIndexInside,
  74499. dataIndex: i.dataIndex,
  74500. seriesIndex: i.seriesIndex,
  74501. dataByCoordSys: t.list
  74502. });
  74503. }
  74504. function PQe(t, e, n) {
  74505. var r = n.getZr(), i = "axisPointerLastHighlights", a = e7(r)[i] || {}, o = e7(r)[i] = {};
  74506. k(t, function(u, c) {
  74507. var f = u.axisPointerModel.option;
  74508. f.status === "show" && u.triggerEmphasis && k(f.seriesDataIndices, function(d) {
  74509. var h = d.seriesIndex + " | " + d.dataIndex;
  74510. o[h] = d;
  74511. });
  74512. });
  74513. var s = [], l = [];
  74514. k(a, function(u, c) {
  74515. !o[c] && l.push(u);
  74516. }), k(o, function(u, c) {
  74517. !a[c] && s.push(u);
  74518. }), l.length && n.dispatchAction({
  74519. type: "downplay",
  74520. escapeConnect: !0,
  74521. // Not blur others when highlight in axisPointer.
  74522. notBlur: !0,
  74523. batch: l
  74524. }), s.length && n.dispatchAction({
  74525. type: "highlight",
  74526. escapeConnect: !0,
  74527. // Not blur others when highlight in axisPointer.
  74528. notBlur: !0,
  74529. batch: s
  74530. });
  74531. }
  74532. function $Qe(t, e) {
  74533. for (var n = 0; n < (t || []).length; n++) {
  74534. var r = t[n];
  74535. if (e.axis.dim === r.axisDim && e.axis.model.componentIndex === r.axisIndex)
  74536. return r;
  74537. }
  74538. }
  74539. function n7(t) {
  74540. var e = t.axis.model, n = {}, r = n.axisDim = t.axis.dim;
  74541. return n.axisIndex = n[r + "AxisIndex"] = e.componentIndex, n.axisName = n[r + "AxisName"] = e.name, n.axisId = n[r + "AxisId"] = e.id, n;
  74542. }
  74543. function X_(t) {
  74544. return !t || t[0] == null || isNaN(t[0]) || t[1] == null || isNaN(t[1]);
  74545. }
  74546. function ey(t) {
  74547. Wf.registerAxisPointerClass("CartesianAxisPointer", dQe), t.registerComponentModel(pQe), t.registerComponentView(_Qe), t.registerPreprocessor(function(e) {
  74548. if (e) {
  74549. (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
  74550. var n = e.axisPointer.link;
  74551. n && !ue(n) && (e.axisPointer.link = [n]);
  74552. }
  74553. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, function(e, n) {
  74554. e.getComponent("axisPointer").coordSysAxesInfo = z6e(e, n);
  74555. }), t.registerAction({
  74556. type: "updateAxisPointer",
  74557. event: "updateAxisPointer",
  74558. update: ":updateAxisPointer"
  74559. }, OQe);
  74560. }
  74561. function AQe(t) {
  74562. at(one), at(ey);
  74563. }
  74564. var EQe = (
  74565. /** @class */
  74566. function(t) {
  74567. q(e, t);
  74568. function e() {
  74569. return t !== null && t.apply(this, arguments) || this;
  74570. }
  74571. return e.prototype.makeElOption = function(n, r, i, a, o) {
  74572. var s = i.axis;
  74573. s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
  74574. var l = s.polar, u = l.getOtherAxis(s), c = u.getExtent(), f = s.dataToCoord(r), d = a.get("type");
  74575. if (d && d !== "none") {
  74576. var h = vL(a), p = IQe[d](s, l, f, c);
  74577. p.style = h, n.graphicKey = p.type, n.pointer = p;
  74578. }
  74579. var v = a.get(["label", "margin"]), g = MQe(r, i, a, l, v);
  74580. Are(n, i, a, o, g);
  74581. }, e;
  74582. }(pL)
  74583. );
  74584. function MQe(t, e, n, r, i) {
  74585. var a = e.axis, o = a.dataToCoord(t), s = r.getAngleAxis().getExtent()[0];
  74586. s = s / 180 * Math.PI;
  74587. var l = r.getRadiusAxis().getExtent(), u, c, f;
  74588. if (a.dim === "radius") {
  74589. var d = Si();
  74590. Cu(d, d, s), ao(d, d, [r.cx, r.cy]), u = to([o, -i], d);
  74591. var h = e.getModel("axisLabel").get("rotate") || 0, p = Kr.innerTextLayout(s, h * Math.PI / 180, -1);
  74592. c = p.textAlign, f = p.textVerticalAlign;
  74593. } else {
  74594. var v = l[1];
  74595. u = r.coordToPoint([v + i, o]);
  74596. var g = r.cx, m = r.cy;
  74597. 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";
  74598. }
  74599. return {
  74600. position: u,
  74601. align: c,
  74602. verticalAlign: f
  74603. };
  74604. }
  74605. var IQe = {
  74606. line: function(t, e, n, r) {
  74607. return t.dim === "angle" ? {
  74608. type: "Line",
  74609. shape: mL(e.coordToPoint([r[0], n]), e.coordToPoint([r[1], n]))
  74610. } : {
  74611. type: "Circle",
  74612. shape: {
  74613. cx: e.cx,
  74614. cy: e.cy,
  74615. r: n
  74616. }
  74617. };
  74618. },
  74619. shadow: function(t, e, n, r) {
  74620. var i = Math.max(1, t.getBandWidth()), a = Math.PI / 180;
  74621. return t.dim === "angle" ? {
  74622. type: "Sector",
  74623. shape: YW(
  74624. e.cx,
  74625. e.cy,
  74626. r[0],
  74627. r[1],
  74628. // In ECharts y is negative if angle is positive
  74629. (-n - i / 2) * a,
  74630. (-n + i / 2) * a
  74631. )
  74632. } : {
  74633. type: "Sector",
  74634. shape: YW(e.cx, e.cy, n - i / 2, n + i / 2, 0, Math.PI * 2)
  74635. };
  74636. }
  74637. }, DQe = (
  74638. /** @class */
  74639. function(t) {
  74640. q(e, t);
  74641. function e() {
  74642. var n = t !== null && t.apply(this, arguments) || this;
  74643. return n.type = e.type, n;
  74644. }
  74645. return e.prototype.findAxisModel = function(n) {
  74646. var r, i = this.ecModel;
  74647. return i.eachComponent(n, function(a) {
  74648. a.getCoordSysModel() === this && (r = a);
  74649. }, this), r;
  74650. }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
  74651. // zlevel: 0,
  74652. z: 0,
  74653. center: ["50%", "50%"],
  74654. radius: "80%"
  74655. }, e;
  74656. }(rt)
  74657. ), yL = (
  74658. /** @class */
  74659. function(t) {
  74660. q(e, t);
  74661. function e() {
  74662. return t !== null && t.apply(this, arguments) || this;
  74663. }
  74664. return e.prototype.getCoordSysModel = function() {
  74665. return this.getReferringComponents("polar", Dn).models[0];
  74666. }, e.type = "polarAxis", e;
  74667. }(rt)
  74668. );
  74669. xn(yL, Tp);
  74670. var RQe = (
  74671. /** @class */
  74672. function(t) {
  74673. q(e, t);
  74674. function e() {
  74675. var n = t !== null && t.apply(this, arguments) || this;
  74676. return n.type = e.type, n;
  74677. }
  74678. return e.type = "angleAxis", e;
  74679. }(yL)
  74680. ), kQe = (
  74681. /** @class */
  74682. function(t) {
  74683. q(e, t);
  74684. function e() {
  74685. var n = t !== null && t.apply(this, arguments) || this;
  74686. return n.type = e.type, n;
  74687. }
  74688. return e.type = "radiusAxis", e;
  74689. }(yL)
  74690. ), bL = (
  74691. /** @class */
  74692. function(t) {
  74693. q(e, t);
  74694. function e(n, r) {
  74695. return t.call(this, "radius", n, r) || this;
  74696. }
  74697. return e.prototype.pointToData = function(n, r) {
  74698. return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
  74699. }, e;
  74700. }(Ba)
  74701. );
  74702. bL.prototype.dataToRadius = Ba.prototype.dataToCoord;
  74703. bL.prototype.radiusToData = Ba.prototype.coordToData;
  74704. var LQe = bt(), _L = (
  74705. /** @class */
  74706. function(t) {
  74707. q(e, t);
  74708. function e(n, r) {
  74709. return t.call(this, "angle", n, r || [0, 360]) || this;
  74710. }
  74711. return e.prototype.pointToData = function(n, r) {
  74712. return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
  74713. }, e.prototype.calculateCategoryInterval = function() {
  74714. var n = this, r = n.getLabelModel(), i = n.scale, a = i.getExtent(), o = i.count();
  74715. if (a[1] - a[0] < 1)
  74716. return 0;
  74717. var s = a[0], l = n.dataToCoord(s + 1) - n.dataToCoord(s), u = Math.abs(l), c = k0(s == null ? "" : s + "", r.getFont(), "center", "top"), f = Math.max(c.height, 7), d = f / u;
  74718. isNaN(d) && (d = 1 / 0);
  74719. var h = Math.max(0, Math.floor(d)), p = LQe(n.model), v = p.lastAutoInterval, g = p.lastTickCount;
  74720. 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;
  74721. }, e;
  74722. }(Ba)
  74723. );
  74724. _L.prototype.dataToAngle = Ba.prototype.dataToCoord;
  74725. _L.prototype.angleToData = Ba.prototype.coordToData;
  74726. var kre = ["radius", "angle"], NQe = (
  74727. /** @class */
  74728. function() {
  74729. function t(e) {
  74730. this.dimensions = kre, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new bL(), this._angleAxis = new _L(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
  74731. }
  74732. return t.prototype.containPoint = function(e) {
  74733. var n = this.pointToCoord(e);
  74734. return this._radiusAxis.contain(n[0]) && this._angleAxis.contain(n[1]);
  74735. }, t.prototype.containData = function(e) {
  74736. return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
  74737. }, t.prototype.getAxis = function(e) {
  74738. var n = "_" + e + "Axis";
  74739. return this[n];
  74740. }, t.prototype.getAxes = function() {
  74741. return [this._radiusAxis, this._angleAxis];
  74742. }, t.prototype.getAxesByScale = function(e) {
  74743. var n = [], r = this._angleAxis, i = this._radiusAxis;
  74744. return r.scale.type === e && n.push(r), i.scale.type === e && n.push(i), n;
  74745. }, t.prototype.getAngleAxis = function() {
  74746. return this._angleAxis;
  74747. }, t.prototype.getRadiusAxis = function() {
  74748. return this._radiusAxis;
  74749. }, t.prototype.getOtherAxis = function(e) {
  74750. var n = this._angleAxis;
  74751. return e === n ? this._radiusAxis : n;
  74752. }, t.prototype.getBaseAxis = function() {
  74753. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
  74754. }, t.prototype.getTooltipAxes = function(e) {
  74755. var n = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
  74756. return {
  74757. baseAxes: [n],
  74758. otherAxes: [this.getOtherAxis(n)]
  74759. };
  74760. }, t.prototype.dataToPoint = function(e, n) {
  74761. return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], n), this._angleAxis.dataToAngle(e[1], n)]);
  74762. }, t.prototype.pointToData = function(e, n) {
  74763. var r = this.pointToCoord(e);
  74764. return [this._radiusAxis.radiusToData(r[0], n), this._angleAxis.angleToData(r[1], n)];
  74765. }, t.prototype.pointToCoord = function(e) {
  74766. 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]);
  74767. i.inverse ? o = s - 360 : s = o + 360;
  74768. var l = Math.sqrt(n * n + r * r);
  74769. n /= l, r /= l;
  74770. for (var u = Math.atan2(-r, n) / Math.PI * 180, c = u < o ? 1 : -1; u < o || u > s; )
  74771. u += c * 360;
  74772. return [l, u];
  74773. }, t.prototype.coordToPoint = function(e) {
  74774. var n = e[0], r = e[1] / 180 * Math.PI, i = Math.cos(r) * n + this.cx, a = -Math.sin(r) * n + this.cy;
  74775. return [i, a];
  74776. }, t.prototype.getArea = function() {
  74777. var e = this.getAngleAxis(), n = this.getRadiusAxis(), r = n.getExtent().slice();
  74778. r[0] > r[1] && r.reverse();
  74779. var i = e.getExtent(), a = Math.PI / 180;
  74780. return {
  74781. cx: this.cx,
  74782. cy: this.cy,
  74783. r0: r[0],
  74784. r: r[1],
  74785. startAngle: -i[0] * a,
  74786. endAngle: -i[1] * a,
  74787. clockwise: e.inverse,
  74788. contain: function(o, s) {
  74789. var l = o - this.cx, u = s - this.cy, c = l * l + u * u - 1e-4, f = this.r, d = this.r0;
  74790. return c <= f * f && c >= d * d;
  74791. }
  74792. };
  74793. }, t.prototype.convertToPixel = function(e, n, r) {
  74794. var i = r7(n);
  74795. return i === this ? this.dataToPoint(r) : null;
  74796. }, t.prototype.convertFromPixel = function(e, n, r) {
  74797. var i = r7(n);
  74798. return i === this ? this.pointToData(r) : null;
  74799. }, t;
  74800. }()
  74801. );
  74802. function r7(t) {
  74803. var e = t.seriesModel, n = t.polarModel;
  74804. return n && n.coordinateSystem || e && e.coordinateSystem;
  74805. }
  74806. const BQe = NQe;
  74807. function zQe(t, e, n) {
  74808. var r = e.get("center"), i = n.getWidth(), a = n.getHeight();
  74809. t.cx = _e(r[0], i), t.cy = _e(r[1], a);
  74810. var o = t.getRadiusAxis(), s = Math.min(i, a) / 2, l = e.get("radius");
  74811. l == null ? l = [0, "100%"] : ue(l) || (l = [0, l]);
  74812. var u = [_e(l[0], s), _e(l[1], s)];
  74813. o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
  74814. }
  74815. function VQe(t, e) {
  74816. var n = this, r = n.getAngleAxis(), i = n.getRadiusAxis();
  74817. if (r.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(s) {
  74818. if (s.coordinateSystem === n) {
  74819. var l = s.getData();
  74820. k(CO(l, "radius"), function(u) {
  74821. i.scale.unionExtentFromData(l, u);
  74822. }), k(CO(l, "angle"), function(u) {
  74823. r.scale.unionExtentFromData(l, u);
  74824. });
  74825. }
  74826. }), Of(r.scale, r.model), Of(i.scale, i.model), r.type === "category" && !r.onBand) {
  74827. var a = r.getExtent(), o = 360 / r.scale.count();
  74828. r.inverse ? a[1] += o : a[1] -= o, r.setExtent(a[0], a[1]);
  74829. }
  74830. }
  74831. function FQe(t) {
  74832. return t.mainType === "angleAxis";
  74833. }
  74834. function i7(t, e) {
  74835. var n;
  74836. if (t.type = e.get("type"), t.scale = G0(e), t.onBand = e.get("boundaryGap") && t.type === "category", t.inverse = e.get("inverse"), FQe(e)) {
  74837. t.inverse = t.inverse !== e.get("clockwise");
  74838. var r = e.get("startAngle"), i = (n = e.get("endAngle")) !== null && n !== void 0 ? n : r + (t.inverse ? -360 : 360);
  74839. t.setExtent(r, i);
  74840. }
  74841. e.axis = t, t.model = e;
  74842. }
  74843. var WQe = {
  74844. dimensions: kre,
  74845. create: function(t, e) {
  74846. var n = [];
  74847. return t.eachComponent("polar", function(r, i) {
  74848. var a = new BQe(i + "");
  74849. a.update = VQe;
  74850. var o = a.getRadiusAxis(), s = a.getAngleAxis(), l = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis");
  74851. i7(o, l), i7(s, u), zQe(a, r, e), n.push(a), r.coordinateSystem = a, a.model = r;
  74852. }), t.eachSeries(function(r) {
  74853. if (r.get("coordinateSystem") === "polar") {
  74854. var i = r.getReferringComponents("polar", Dn).models[0];
  74855. if (process.env.NODE_ENV !== "production" && !i)
  74856. throw new Error('Polar "' + Tn(r.get("polarIndex"), r.get("polarId"), 0) + '" not found');
  74857. r.coordinateSystem = i.coordinateSystem;
  74858. }
  74859. }), n;
  74860. }
  74861. }, QQe = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
  74862. function Ib(t, e, n) {
  74863. e[1] > e[0] && (e = e.slice().reverse());
  74864. var r = t.coordToPoint([e[0], n]), i = t.coordToPoint([e[1], n]);
  74865. return {
  74866. x1: r[0],
  74867. y1: r[1],
  74868. x2: i[0],
  74869. y2: i[1]
  74870. };
  74871. }
  74872. function Db(t) {
  74873. var e = t.getRadiusAxis();
  74874. return e.inverse ? 0 : 1;
  74875. }
  74876. function a7(t) {
  74877. var e = t[0], n = t[t.length - 1];
  74878. e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop();
  74879. }
  74880. var HQe = (
  74881. /** @class */
  74882. function(t) {
  74883. q(e, t);
  74884. function e() {
  74885. var n = t !== null && t.apply(this, arguments) || this;
  74886. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
  74887. }
  74888. return e.prototype.render = function(n, r) {
  74889. if (this.group.removeAll(), !!n.get("show")) {
  74890. var i = n.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), l = i.getMinorTicksCoords(), u = ce(i.getViewLabels(), function(c) {
  74891. c = Le(c);
  74892. var f = i.scale, d = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue;
  74893. return c.coord = i.dataToCoord(d), c;
  74894. });
  74895. a7(u), a7(s), k(QQe, function(c) {
  74896. n.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && GQe[c](this.group, n, a, s, l, o, u);
  74897. }, this);
  74898. }
  74899. }, e.type = "angleAxis", e;
  74900. }(Wf)
  74901. ), GQe = {
  74902. axisLine: function(t, e, n, r, i, a) {
  74903. var o = e.getModel(["axisLine", "lineStyle"]), s = n.getAngleAxis(), l = Math.PI / 180, u = s.getExtent(), c = Db(n), f = c ? 0 : 1, d, h = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc";
  74904. a[f] === 0 ? d = new Lf[h]({
  74905. shape: {
  74906. cx: n.cx,
  74907. cy: n.cy,
  74908. r: a[c],
  74909. startAngle: -u[0] * l,
  74910. endAngle: -u[1] * l,
  74911. clockwise: s.inverse
  74912. },
  74913. style: o.getLineStyle(),
  74914. z2: 1,
  74915. silent: !0
  74916. }) : d = new z0({
  74917. shape: {
  74918. cx: n.cx,
  74919. cy: n.cy,
  74920. r: a[c],
  74921. r0: a[f]
  74922. },
  74923. style: o.getLineStyle(),
  74924. z2: 1,
  74925. silent: !0
  74926. }), d.style.fill = null, t.add(d);
  74927. },
  74928. axisTick: function(t, e, n, r, i, a) {
  74929. var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = a[Db(n)], u = ce(r, function(c) {
  74930. return new Un({
  74931. shape: Ib(n, [l, l + s], c.coord)
  74932. });
  74933. });
  74934. t.add(Li(u, {
  74935. style: Re(o.getModel("lineStyle").getLineStyle(), {
  74936. stroke: e.get(["axisLine", "lineStyle", "color"])
  74937. })
  74938. }));
  74939. },
  74940. minorTick: function(t, e, n, r, i, a) {
  74941. if (i.length) {
  74942. for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = a[Db(n)], c = [], f = 0; f < i.length; f++)
  74943. for (var d = 0; d < i[f].length; d++)
  74944. c.push(new Un({
  74945. shape: Ib(n, [u, u + l], i[f][d].coord)
  74946. }));
  74947. t.add(Li(c, {
  74948. style: Re(s.getModel("lineStyle").getLineStyle(), Re(o.getLineStyle(), {
  74949. stroke: e.get(["axisLine", "lineStyle", "color"])
  74950. }))
  74951. }));
  74952. }
  74953. },
  74954. axisLabel: function(t, e, n, r, i, a, o) {
  74955. var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), c = e.get("triggerEvent");
  74956. k(o, function(f, d) {
  74957. var h = l, p = f.tickValue, v = a[Db(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";
  74958. if (s && s[p]) {
  74959. var O = s[p];
  74960. Ie(O) && O.textStyle && (h = new Wt(O.textStyle, l, l.ecModel));
  74961. }
  74962. var S = new gt({
  74963. silent: Kr.isLabelSilent(e),
  74964. style: Zt(h, {
  74965. x: g[0],
  74966. y: g[1],
  74967. fill: h.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  74968. text: f.formattedLabel,
  74969. align: b,
  74970. verticalAlign: _
  74971. })
  74972. });
  74973. if (t.add(S), c) {
  74974. var x = Kr.makeAxisEventDataBase(e);
  74975. x.targetType = "axisLabel", x.value = f.rawLabel, Fe(S).eventData = x;
  74976. }
  74977. }, this);
  74978. },
  74979. splitLine: function(t, e, n, r, i, a) {
  74980. var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
  74981. l = l instanceof Array ? l : [l];
  74982. for (var c = [], f = 0; f < r.length; f++) {
  74983. var d = u++ % l.length;
  74984. c[d] = c[d] || [], c[d].push(new Un({
  74985. shape: Ib(n, a, r[f].coord)
  74986. }));
  74987. }
  74988. for (var f = 0; f < c.length; f++)
  74989. t.add(Li(c[f], {
  74990. style: Re({
  74991. stroke: l[f % l.length]
  74992. }, s.getLineStyle()),
  74993. silent: !0,
  74994. z: e.get("z")
  74995. }));
  74996. },
  74997. minorSplitLine: function(t, e, n, r, i, a) {
  74998. if (i.length) {
  74999. for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < i.length; u++)
  75000. for (var c = 0; c < i[u].length; c++)
  75001. l.push(new Un({
  75002. shape: Ib(n, a, i[u][c].coord)
  75003. }));
  75004. t.add(Li(l, {
  75005. style: s.getLineStyle(),
  75006. silent: !0,
  75007. z: e.get("z")
  75008. }));
  75009. }
  75010. },
  75011. splitArea: function(t, e, n, r, i, a) {
  75012. if (r.length) {
  75013. var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
  75014. l = l instanceof Array ? l : [l];
  75015. 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++) {
  75016. var y = g === m ? r[0].coord : r[g].coord, b = u++ % l.length;
  75017. c[b] = c[b] || [], c[b].push(new ri({
  75018. shape: {
  75019. cx: n.cx,
  75020. cy: n.cy,
  75021. r0: h,
  75022. r: p,
  75023. startAngle: d,
  75024. endAngle: -y * f,
  75025. clockwise: v
  75026. },
  75027. silent: !0
  75028. })), d = -y * f;
  75029. }
  75030. for (var g = 0; g < c.length; g++)
  75031. t.add(Li(c[g], {
  75032. style: Re({
  75033. fill: l[g % l.length]
  75034. }, s.getAreaStyle()),
  75035. silent: !0
  75036. }));
  75037. }
  75038. }
  75039. }, jQe = ["axisLine", "axisTickLabel", "axisName"], ZQe = ["splitLine", "splitArea", "minorSplitLine"], UQe = (
  75040. /** @class */
  75041. function(t) {
  75042. q(e, t);
  75043. function e() {
  75044. var n = t !== null && t.apply(this, arguments) || this;
  75045. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
  75046. }
  75047. return e.prototype.render = function(n, r) {
  75048. if (this.group.removeAll(), !!n.get("show")) {
  75049. var i = this._axisGroup, a = this._axisGroup = new Ve();
  75050. this.group.add(a);
  75051. var o = n.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = l.getExtent()[0], d = o.getExtent(), h = YQe(s, n, f), p = new Kr(n, h);
  75052. k(jQe, p.add, p), a.add(p.getGroup()), W0(i, a, n), k(ZQe, function(v) {
  75053. n.get([v, "show"]) && !o.scale.isBlank() && XQe[v](this.group, n, s, f, d, u, c);
  75054. }, this);
  75055. }
  75056. }, e.type = "radiusAxis", e;
  75057. }(Wf)
  75058. ), XQe = {
  75059. splitLine: function(t, e, n, r, i, a) {
  75060. 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";
  75061. l = l instanceof Array ? l : [l];
  75062. for (var p = [], v = 0; v < a.length; v++) {
  75063. var g = u++ % l.length;
  75064. p[g] = p[g] || [], p[g].push(new Lf[h]({
  75065. shape: {
  75066. cx: n.cx,
  75067. cy: n.cy,
  75068. // ensure circle radius >= 0
  75069. r: Math.max(a[v].coord, 0),
  75070. startAngle: -d[0] * f,
  75071. endAngle: -d[1] * f,
  75072. clockwise: c.inverse
  75073. }
  75074. }));
  75075. }
  75076. for (var v = 0; v < p.length; v++)
  75077. t.add(Li(p[v], {
  75078. style: Re({
  75079. stroke: l[v % l.length],
  75080. fill: null
  75081. }, s.getLineStyle()),
  75082. silent: !0
  75083. }));
  75084. },
  75085. minorSplitLine: function(t, e, n, r, i, a, o) {
  75086. if (o.length) {
  75087. for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], c = 0; c < o.length; c++)
  75088. for (var f = 0; f < o[c].length; f++)
  75089. u.push(new ll({
  75090. shape: {
  75091. cx: n.cx,
  75092. cy: n.cy,
  75093. r: o[c][f].coord
  75094. }
  75095. }));
  75096. t.add(Li(u, {
  75097. style: Re({
  75098. fill: null
  75099. }, l.getLineStyle()),
  75100. silent: !0
  75101. }));
  75102. }
  75103. },
  75104. splitArea: function(t, e, n, r, i, a) {
  75105. if (a.length) {
  75106. var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
  75107. l = l instanceof Array ? l : [l];
  75108. for (var c = [], f = a[0].coord, d = 1; d < a.length; d++) {
  75109. var h = u++ % l.length;
  75110. c[h] = c[h] || [], c[h].push(new ri({
  75111. shape: {
  75112. cx: n.cx,
  75113. cy: n.cy,
  75114. r0: f,
  75115. r: a[d].coord,
  75116. startAngle: 0,
  75117. endAngle: Math.PI * 2
  75118. },
  75119. silent: !0
  75120. })), f = a[d].coord;
  75121. }
  75122. for (var d = 0; d < c.length; d++)
  75123. t.add(Li(c[d], {
  75124. style: Re({
  75125. fill: l[d % l.length]
  75126. }, s.getAreaStyle()),
  75127. silent: !0
  75128. }));
  75129. }
  75130. }
  75131. };
  75132. function YQe(t, e, n) {
  75133. return {
  75134. position: [t.cx, t.cy],
  75135. rotation: n / 180 * Math.PI,
  75136. labelDirection: -1,
  75137. tickDirection: -1,
  75138. nameDirection: 1,
  75139. labelRotate: e.getModel("axisLabel").get("rotate"),
  75140. // Over splitLine and splitArea
  75141. z2: 1
  75142. };
  75143. }
  75144. function Lre(t) {
  75145. return t.get("stack") || "__ec_stack_" + t.seriesIndex;
  75146. }
  75147. function Nre(t, e) {
  75148. return e.dim + t.model.componentIndex;
  75149. }
  75150. function qQe(t, e, n) {
  75151. var r = {}, i = KQe(Nt(e.getSeriesByType(t), function(a) {
  75152. return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar";
  75153. }));
  75154. e.eachSeriesByType(t, function(a) {
  75155. if (a.coordinateSystem.type === "polar") {
  75156. var o = a.getData(), s = a.coordinateSystem, l = s.getBaseAxis(), u = Nre(s, l), c = Lre(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;
  75157. r[c] = r[c] || [];
  75158. for (var b = o.mapDimension(p.dim), _ = o.mapDimension(l.dim), O = Xs(
  75159. o,
  75160. b
  75161. /* , baseDim */
  75162. ), 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++) {
  75163. var $ = o.get(b, w), A = o.get(_, w), D = $ >= 0 ? "p" : "n", E = T;
  75164. O && (r[c][A] || (r[c][A] = {
  75165. p: T,
  75166. n: T
  75167. // Negative stack
  75168. }), E = r[c][A][D]);
  75169. var R = void 0, N = void 0, V = void 0, z = void 0;
  75170. if (p.dim === "radius") {
  75171. var W = p.dataToCoord($) - T, F = l.dataToCoord(A);
  75172. Math.abs(W) < m && (W = (W < 0 ? -1 : 1) * m), R = E, N = E + W, V = F - d, z = V - h, O && (r[c][A][D] = N);
  75173. } else {
  75174. var Q = p.dataToCoord($, S) - T, Z = l.dataToCoord(A);
  75175. Math.abs(Q) < y && (Q = (Q < 0 ? -1 : 1) * y), R = Z + d, N = R + h, V = E, z = E + Q, O && (r[c][A][D] = z);
  75176. }
  75177. o.setItemLayout(w, {
  75178. cx: v,
  75179. cy: g,
  75180. r0: R,
  75181. r: N,
  75182. // Consider that positive angle is anti-clockwise,
  75183. // while positive radian of sector is clockwise
  75184. startAngle: -V * Math.PI / 180,
  75185. endAngle: -z * Math.PI / 180,
  75186. /**
  75187. * Keep the same logic with bar in catesion: use end value to
  75188. * control direction. Notice that if clockwise is true (by
  75189. * default), the sector will always draw clockwisely, no matter
  75190. * whether endAngle is greater or less than startAngle.
  75191. */
  75192. clockwise: V >= z
  75193. });
  75194. }
  75195. }
  75196. });
  75197. }
  75198. function KQe(t) {
  75199. var e = {};
  75200. k(t, function(r, i) {
  75201. var a = r.getData(), o = r.coordinateSystem, s = o.getBaseAxis(), l = Nre(o, s), u = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / a.count(), f = e[l] || {
  75202. bandWidth: c,
  75203. remainedWidth: c,
  75204. autoWidthCount: 0,
  75205. categoryGap: "20%",
  75206. gap: "30%",
  75207. stacks: {}
  75208. }, d = f.stacks;
  75209. e[l] = f;
  75210. var h = Lre(r);
  75211. d[h] || f.autoWidthCount++, d[h] = d[h] || {
  75212. width: 0,
  75213. maxWidth: 0
  75214. };
  75215. var p = _e(r.get("barWidth"), c), v = _e(r.get("barMaxWidth"), c), g = r.get("barGap"), m = r.get("barCategoryGap");
  75216. 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);
  75217. });
  75218. var n = {};
  75219. return k(e, function(r, i) {
  75220. n[i] = {};
  75221. 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);
  75222. f = Math.max(f, 0), k(a, function(v, g) {
  75223. var m = v.maxWidth;
  75224. m && m < f && (m = Math.min(m, u), v.width && (m = Math.min(m, v.width)), u -= m, v.width = m, c--);
  75225. }), f = (u - s) / (c + (c - 1) * l), f = Math.max(f, 0);
  75226. var d = 0, h;
  75227. k(a, function(v, g) {
  75228. v.width || (v.width = f), h = v, d += v.width * (1 + l);
  75229. }), h && (d -= h.width * l);
  75230. var p = -d / 2;
  75231. k(a, function(v, g) {
  75232. n[i][g] = n[i][g] || {
  75233. offset: p,
  75234. width: v.width
  75235. }, p += v.width * (1 + l);
  75236. });
  75237. }), n;
  75238. }
  75239. var JQe = {
  75240. startAngle: 90,
  75241. clockwise: !0,
  75242. splitNumber: 12,
  75243. axisLabel: {
  75244. rotate: 0
  75245. }
  75246. }, eHe = {
  75247. splitNumber: 5
  75248. }, tHe = (
  75249. /** @class */
  75250. function(t) {
  75251. q(e, t);
  75252. function e() {
  75253. var n = t !== null && t.apply(this, arguments) || this;
  75254. return n.type = e.type, n;
  75255. }
  75256. return e.type = "polar", e;
  75257. }(Xt)
  75258. );
  75259. function nHe(t) {
  75260. at(ey), Wf.registerAxisPointerClass("PolarAxisPointer", EQe), t.registerCoordinateSystem("polar", WQe), t.registerComponentModel(DQe), t.registerComponentView(tHe), Qh(t, "angle", RQe, JQe), Qh(t, "radius", kQe, eHe), t.registerComponentView(HQe), t.registerComponentView(UQe), t.registerLayout(Ue(qQe, "bar"));
  75261. }
  75262. function ME(t, e) {
  75263. e = e || {};
  75264. 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 = {
  75265. horizontal: {
  75266. top: l[2],
  75267. bottom: l[3]
  75268. },
  75269. vertical: {
  75270. left: l[0],
  75271. right: l[1]
  75272. }
  75273. };
  75274. i.position = [o === "vertical" ? u.vertical[a] : l[0], o === "horizontal" ? u.horizontal[a] : l[3]];
  75275. var c = {
  75276. horizontal: 0,
  75277. vertical: 1
  75278. };
  75279. i.rotation = Math.PI / 2 * c[o];
  75280. var f = {
  75281. top: -1,
  75282. bottom: 1,
  75283. right: 1,
  75284. left: -1
  75285. };
  75286. 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);
  75287. var d = e.rotate;
  75288. return d == null && (d = t.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -d : d, i.z2 = 1, i;
  75289. }
  75290. var rHe = ["axisLine", "axisTickLabel", "axisName"], iHe = ["splitArea", "splitLine"], aHe = (
  75291. /** @class */
  75292. function(t) {
  75293. q(e, t);
  75294. function e() {
  75295. var n = t !== null && t.apply(this, arguments) || this;
  75296. return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n;
  75297. }
  75298. return e.prototype.render = function(n, r, i, a) {
  75299. var o = this.group;
  75300. o.removeAll();
  75301. var s = this._axisGroup;
  75302. this._axisGroup = new Ve();
  75303. var l = ME(n), u = new Kr(n, l);
  75304. k(rHe, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), k(iHe, function(c) {
  75305. n.get([c, "show"]) && oHe[c](this, this.group, this._axisGroup, n);
  75306. }, this), W0(s, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
  75307. }, e.prototype.remove = function() {
  75308. rne(this);
  75309. }, e.type = "singleAxis", e;
  75310. }(Wf)
  75311. ), oHe = {
  75312. splitLine: function(t, e, n, r) {
  75313. var i = r.axis;
  75314. if (!i.scale.isBlank()) {
  75315. var a = r.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
  75316. s = s instanceof Array ? s : [s];
  75317. for (var l = o.get("width"), u = r.coordinateSystem.getRect(), c = i.isHorizontal(), f = [], d = 0, h = i.getTicksCoords({
  75318. tickModel: a
  75319. }), p = [], v = [], g = 0; g < h.length; ++g) {
  75320. var m = i.toGlobalCoord(h[g].coord);
  75321. 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);
  75322. var y = new Un({
  75323. shape: {
  75324. x1: p[0],
  75325. y1: p[1],
  75326. x2: v[0],
  75327. y2: v[1]
  75328. },
  75329. silent: !0
  75330. });
  75331. zh(y.shape, l);
  75332. var b = d++ % s.length;
  75333. f[b] = f[b] || [], f[b].push(y);
  75334. }
  75335. for (var _ = o.getLineStyle(["color"]), g = 0; g < f.length; ++g)
  75336. e.add(Li(f[g], {
  75337. style: Re({
  75338. stroke: s[g % s.length]
  75339. }, _),
  75340. silent: !0
  75341. }));
  75342. }
  75343. },
  75344. splitArea: function(t, e, n, r) {
  75345. nne(t, n, r, r);
  75346. }
  75347. }, Y_ = (
  75348. /** @class */
  75349. function(t) {
  75350. q(e, t);
  75351. function e() {
  75352. var n = t !== null && t.apply(this, arguments) || this;
  75353. return n.type = e.type, n;
  75354. }
  75355. return e.prototype.getCoordSysModel = function() {
  75356. return this;
  75357. }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
  75358. left: "5%",
  75359. top: "5%",
  75360. right: "5%",
  75361. bottom: "5%",
  75362. type: "value",
  75363. position: "bottom",
  75364. orient: "horizontal",
  75365. axisLine: {
  75366. show: !0,
  75367. lineStyle: {
  75368. width: 1,
  75369. type: "solid"
  75370. }
  75371. },
  75372. // Single coordinate system and single axis is the,
  75373. // which is used as the parent tooltip model.
  75374. // same model, so we set default tooltip show as true.
  75375. tooltip: {
  75376. show: !0
  75377. },
  75378. axisTick: {
  75379. show: !0,
  75380. length: 6,
  75381. lineStyle: {
  75382. width: 1
  75383. }
  75384. },
  75385. axisLabel: {
  75386. show: !0,
  75387. interval: "auto"
  75388. },
  75389. splitLine: {
  75390. show: !0,
  75391. lineStyle: {
  75392. type: "dashed",
  75393. opacity: 0.2
  75394. }
  75395. }
  75396. }, e;
  75397. }(rt)
  75398. );
  75399. xn(Y_, Tp.prototype);
  75400. var sHe = (
  75401. /** @class */
  75402. function(t) {
  75403. q(e, t);
  75404. function e(n, r, i, a, o) {
  75405. var s = t.call(this, n, r, i) || this;
  75406. return s.type = a || "value", s.position = o || "bottom", s;
  75407. }
  75408. return e.prototype.isHorizontal = function() {
  75409. var n = this.position;
  75410. return n === "top" || n === "bottom";
  75411. }, e.prototype.pointToData = function(n, r) {
  75412. return this.coordinateSystem.pointToData(n)[0];
  75413. }, e;
  75414. }(Ba)
  75415. ), Bre = ["single"], lHe = (
  75416. /** @class */
  75417. function() {
  75418. function t(e, n, r) {
  75419. this.type = "single", this.dimension = "single", this.dimensions = Bre, this.axisPointerEnabled = !0, this.model = e, this._init(e, n, r);
  75420. }
  75421. return t.prototype._init = function(e, n, r) {
  75422. var i = this.dimension, a = new sHe(i, G0(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category";
  75423. 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;
  75424. }, t.prototype.update = function(e, n) {
  75425. e.eachSeries(function(r) {
  75426. if (r.coordinateSystem === this) {
  75427. var i = r.getData();
  75428. k(i.mapDimensionsAll(this.dimension), function(a) {
  75429. this._axis.scale.unionExtentFromData(i, a);
  75430. }, this), Of(this._axis.scale, this._axis.model);
  75431. }
  75432. }, this);
  75433. }, t.prototype.resize = function(e, n) {
  75434. this._rect = Rn({
  75435. left: e.get("left"),
  75436. top: e.get("top"),
  75437. right: e.get("right"),
  75438. bottom: e.get("bottom"),
  75439. width: e.get("width"),
  75440. height: e.get("height")
  75441. }, {
  75442. width: n.getWidth(),
  75443. height: n.getHeight()
  75444. }), this._adjustAxis();
  75445. }, t.prototype.getRect = function() {
  75446. return this._rect;
  75447. }, t.prototype._adjustAxis = function() {
  75448. var e = this._rect, n = this._axis, r = n.isHorizontal(), i = r ? [0, e.width] : [0, e.height], a = n.inverse ? 1 : 0;
  75449. n.setExtent(i[a], i[1 - a]), this._updateAxisTransform(n, r ? e.x : e.y);
  75450. }, t.prototype._updateAxisTransform = function(e, n) {
  75451. var r = e.getExtent(), i = r[0] + r[1], a = e.isHorizontal();
  75452. e.toGlobalCoord = a ? function(o) {
  75453. return o + n;
  75454. } : function(o) {
  75455. return i - o + n;
  75456. }, e.toLocalCoord = a ? function(o) {
  75457. return o - n;
  75458. } : function(o) {
  75459. return i - o + n;
  75460. };
  75461. }, t.prototype.getAxis = function() {
  75462. return this._axis;
  75463. }, t.prototype.getBaseAxis = function() {
  75464. return this._axis;
  75465. }, t.prototype.getAxes = function() {
  75466. return [this._axis];
  75467. }, t.prototype.getTooltipAxes = function() {
  75468. return {
  75469. baseAxes: [this.getAxis()],
  75470. // Empty otherAxes
  75471. otherAxes: []
  75472. };
  75473. }, t.prototype.containPoint = function(e) {
  75474. var n = this.getRect(), r = this.getAxis(), i = r.orient;
  75475. 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;
  75476. }, t.prototype.pointToData = function(e) {
  75477. var n = this.getAxis();
  75478. return [n.coordToData(n.toLocalCoord(e[n.orient === "horizontal" ? 0 : 1]))];
  75479. }, t.prototype.dataToPoint = function(e) {
  75480. var n = this.getAxis(), r = this.getRect(), i = [], a = n.orient === "horizontal" ? 0 : 1;
  75481. 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;
  75482. }, t.prototype.convertToPixel = function(e, n, r) {
  75483. var i = o7(n);
  75484. return i === this ? this.dataToPoint(r) : null;
  75485. }, t.prototype.convertFromPixel = function(e, n, r) {
  75486. var i = o7(n);
  75487. return i === this ? this.pointToData(r) : null;
  75488. }, t;
  75489. }()
  75490. );
  75491. function o7(t) {
  75492. var e = t.seriesModel, n = t.singleAxisModel;
  75493. return n && n.coordinateSystem || e && e.coordinateSystem;
  75494. }
  75495. function uHe(t, e) {
  75496. var n = [];
  75497. return t.eachComponent("singleAxis", function(r, i) {
  75498. var a = new lHe(r, t, e);
  75499. a.name = "single_" + i, a.resize(r, e), r.coordinateSystem = a, n.push(a);
  75500. }), t.eachSeries(function(r) {
  75501. if (r.get("coordinateSystem") === "singleAxis") {
  75502. var i = r.getReferringComponents("singleAxis", Dn).models[0];
  75503. r.coordinateSystem = i && i.coordinateSystem;
  75504. }
  75505. }), n;
  75506. }
  75507. var cHe = {
  75508. create: uHe,
  75509. dimensions: Bre
  75510. }, s7 = ["x", "y"], fHe = ["width", "height"], dHe = (
  75511. /** @class */
  75512. function(t) {
  75513. q(e, t);
  75514. function e() {
  75515. return t !== null && t.apply(this, arguments) || this;
  75516. }
  75517. return e.prototype.makeElOption = function(n, r, i, a, o) {
  75518. var s = i.axis, l = s.coordinateSystem, u = jP(l, 1 - FO(s)), c = l.dataToPoint(r)[0], f = a.get("type");
  75519. if (f && f !== "none") {
  75520. var d = vL(a), h = hHe[f](s, c, u);
  75521. h.style = d, n.graphicKey = h.type, n.pointer = h;
  75522. }
  75523. var p = ME(i);
  75524. Mre(
  75525. // @ts-ignore
  75526. r,
  75527. n,
  75528. p,
  75529. i,
  75530. a,
  75531. o
  75532. );
  75533. }, e.prototype.getHandleTransform = function(n, r, i) {
  75534. var a = ME(r, {
  75535. labelInside: !1
  75536. });
  75537. a.labelMargin = i.get(["handle", "margin"]);
  75538. var o = gL(r.axis, n, a);
  75539. return {
  75540. x: o[0],
  75541. y: o[1],
  75542. rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
  75543. };
  75544. }, e.prototype.updateHandleTransform = function(n, r, i, a) {
  75545. var o = i.axis, s = o.coordinateSystem, l = FO(o), u = jP(s, l), c = [n.x, n.y];
  75546. c[l] += r[l], c[l] = Math.min(u[1], c[l]), c[l] = Math.max(u[0], c[l]);
  75547. var f = jP(s, 1 - l), d = (f[1] + f[0]) / 2, h = [d, d];
  75548. return h[l] = c[l], {
  75549. x: c[0],
  75550. y: c[1],
  75551. rotation: n.rotation,
  75552. cursorPoint: h,
  75553. tooltipOption: {
  75554. verticalAlign: "middle"
  75555. }
  75556. };
  75557. }, e;
  75558. }(pL)
  75559. ), hHe = {
  75560. line: function(t, e, n) {
  75561. var r = mL([e, n[0]], [e, n[1]], FO(t));
  75562. return {
  75563. type: "Line",
  75564. subPixelOptimize: !0,
  75565. shape: r
  75566. };
  75567. },
  75568. shadow: function(t, e, n) {
  75569. var r = t.getBandWidth(), i = n[1] - n[0];
  75570. return {
  75571. type: "Rect",
  75572. shape: Ire([e - r / 2, n[0]], [r, i], FO(t))
  75573. };
  75574. }
  75575. };
  75576. function FO(t) {
  75577. return t.isHorizontal() ? 0 : 1;
  75578. }
  75579. function jP(t, e) {
  75580. var n = t.getRect();
  75581. return [n[s7[e]], n[s7[e]] + n[fHe[e]]];
  75582. }
  75583. var pHe = (
  75584. /** @class */
  75585. function(t) {
  75586. q(e, t);
  75587. function e() {
  75588. var n = t !== null && t.apply(this, arguments) || this;
  75589. return n.type = e.type, n;
  75590. }
  75591. return e.type = "single", e;
  75592. }(Xt)
  75593. );
  75594. function vHe(t) {
  75595. at(ey), Wf.registerAxisPointerClass("SingleAxisPointer", dHe), t.registerComponentView(pHe), t.registerComponentView(aHe), t.registerComponentModel(Y_), Qh(t, "single", Y_, Y_.defaultOption), t.registerCoordinateSystem("single", cHe);
  75596. }
  75597. var gHe = (
  75598. /** @class */
  75599. function(t) {
  75600. q(e, t);
  75601. function e() {
  75602. var n = t !== null && t.apply(this, arguments) || this;
  75603. return n.type = e.type, n;
  75604. }
  75605. return e.prototype.init = function(n, r, i) {
  75606. var a = bp(n);
  75607. t.prototype.init.apply(this, arguments), l7(n, a);
  75608. }, e.prototype.mergeOption = function(n) {
  75609. t.prototype.mergeOption.apply(this, arguments), l7(this.option, n);
  75610. }, e.prototype.getCellSize = function() {
  75611. return this.option.cellSize;
  75612. }, e.type = "calendar", e.defaultOption = {
  75613. // zlevel: 0,
  75614. z: 2,
  75615. left: 80,
  75616. top: 60,
  75617. cellSize: 20,
  75618. // horizontal vertical
  75619. orient: "horizontal",
  75620. // month separate line style
  75621. splitLine: {
  75622. show: !0,
  75623. lineStyle: {
  75624. color: "#000",
  75625. width: 1,
  75626. type: "solid"
  75627. }
  75628. },
  75629. // rect style temporarily unused emphasis
  75630. itemStyle: {
  75631. color: "#fff",
  75632. borderWidth: 1,
  75633. borderColor: "#ccc"
  75634. },
  75635. // week text style
  75636. dayLabel: {
  75637. show: !0,
  75638. firstDay: 0,
  75639. // start end
  75640. position: "start",
  75641. margin: "50%",
  75642. color: "#000"
  75643. },
  75644. // month text style
  75645. monthLabel: {
  75646. show: !0,
  75647. // start end
  75648. position: "start",
  75649. margin: 5,
  75650. // center or left
  75651. align: "center",
  75652. formatter: null,
  75653. color: "#000"
  75654. },
  75655. // year text style
  75656. yearLabel: {
  75657. show: !0,
  75658. // top bottom left right
  75659. position: null,
  75660. margin: 30,
  75661. formatter: null,
  75662. color: "#ccc",
  75663. fontFamily: "sans-serif",
  75664. fontWeight: "bolder",
  75665. fontSize: 20
  75666. }
  75667. }, e;
  75668. }(rt)
  75669. );
  75670. function l7(t, e) {
  75671. var n = t.cellSize, r;
  75672. ue(n) ? r = n : r = t.cellSize = [n, n], r.length === 1 && (r[1] = r[0]);
  75673. var i = ce([0, 1], function(a) {
  75674. return mLe(e, a) && (r[a] = "auto"), r[a] != null && r[a] !== "auto";
  75675. });
  75676. cu(t, e, {
  75677. type: "box",
  75678. ignoreSize: i
  75679. });
  75680. }
  75681. var mHe = (
  75682. /** @class */
  75683. function(t) {
  75684. q(e, t);
  75685. function e() {
  75686. var n = t !== null && t.apply(this, arguments) || this;
  75687. return n.type = e.type, n;
  75688. }
  75689. return e.prototype.render = function(n, r, i) {
  75690. var a = this.group;
  75691. a.removeAll();
  75692. var o = n.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = r.getLocaleModel();
  75693. 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);
  75694. }, e.prototype._renderDayRect = function(n, r, i) {
  75695. 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) {
  75696. var c = a.dataToRect([u], !1).tl, f = new mt({
  75697. shape: {
  75698. x: c[0],
  75699. y: c[1],
  75700. width: s,
  75701. height: l
  75702. },
  75703. cursor: "default",
  75704. style: o
  75705. });
  75706. i.add(f);
  75707. }
  75708. }, e.prototype._renderLines = function(n, r, i, a) {
  75709. var o = this, s = n.coordinateSystem, l = n.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = n.get(["splitLine", "show"]), c = l.lineWidth;
  75710. this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
  75711. for (var f = r.start, d = 0; f.time <= r.end.time; d++) {
  75712. p(f.formatedDate), d === 0 && (f = s.getDateInfo(r.start.y + "-" + r.start.m));
  75713. var h = f.date;
  75714. h.setMonth(h.getMonth() + 1), f = s.getDateInfo(h);
  75715. }
  75716. p(s.getNextNDay(r.end.time, 1).formatedDate);
  75717. function p(v) {
  75718. o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl);
  75719. var g = o._getLinePointsOfOneWeek(n, v, i);
  75720. o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, a);
  75721. }
  75722. u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), l, a), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), l, a);
  75723. }, e.prototype._getEdgesPoints = function(n, r, i) {
  75724. var a = [n[0].slice(), n[n.length - 1].slice()], o = i === "horizontal" ? 0 : 1;
  75725. return a[0][o] = a[0][o] - r / 2, a[1][o] = a[1][o] + r / 2, a;
  75726. }, e.prototype._drawSplitline = function(n, r, i) {
  75727. var a = new ai({
  75728. z2: 20,
  75729. shape: {
  75730. points: n
  75731. },
  75732. style: r
  75733. });
  75734. i.add(a);
  75735. }, e.prototype._getLinePointsOfOneWeek = function(n, r, i) {
  75736. for (var a = n.coordinateSystem, o = a.getDateInfo(r), s = [], l = 0; l < 7; l++) {
  75737. var u = a.getNextNDay(o.time, l), c = a.dataToRect([u.time], !1);
  75738. s[2 * u.day] = c.tl, s[2 * u.day + 1] = c[i === "horizontal" ? "bl" : "tr"];
  75739. }
  75740. return s;
  75741. }, e.prototype._formatterLabel = function(n, r) {
  75742. return Oe(n) && n ? hLe(n, r) : Me(n) ? n(r) : r.nameMap;
  75743. }, e.prototype._yearTextPositionControl = function(n, r, i, a, o) {
  75744. var s = r[0], l = r[1], u = ["center", "bottom"];
  75745. a === "bottom" ? (l += o, u = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, u = ["center", "top"]) : l -= o;
  75746. var c = 0;
  75747. return (a === "left" || a === "right") && (c = Math.PI / 2), {
  75748. rotation: c,
  75749. x: s,
  75750. y: l,
  75751. style: {
  75752. align: u[0],
  75753. verticalAlign: u[1]
  75754. }
  75755. };
  75756. }, e.prototype._renderYearText = function(n, r, i, a) {
  75757. var o = n.getModel("yearLabel");
  75758. if (o.get("show")) {
  75759. var s = o.get("margin"), l = o.get("position");
  75760. l || (l = i !== "horizontal" ? "top" : "left");
  75761. 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 = {
  75762. top: [c, u[d][1]],
  75763. bottom: [c, u[1 - d][1]],
  75764. left: [u[1 - d][0], f],
  75765. right: [u[d][0], f]
  75766. }, p = r.start.y;
  75767. +r.end.y > +r.start.y && (p = p + "-" + r.end.y);
  75768. var v = o.get("formatter"), g = {
  75769. start: r.start.y,
  75770. end: r.end.y,
  75771. nameMap: p
  75772. }, m = this._formatterLabel(v, g), y = new gt({
  75773. z2: 30,
  75774. style: Zt(o, {
  75775. text: m
  75776. })
  75777. });
  75778. y.attr(this._yearTextPositionControl(y, h[l], i, l, s)), a.add(y);
  75779. }
  75780. }, e.prototype._monthTextPositionControl = function(n, r, i, a, o) {
  75781. var s = "left", l = "top", u = n[0], c = n[1];
  75782. return i === "horizontal" ? (c = c + o, r && (s = "center"), a === "start" && (l = "bottom")) : (u = u + o, r && (l = "middle"), a === "start" && (s = "right")), {
  75783. x: u,
  75784. y: c,
  75785. align: s,
  75786. verticalAlign: l
  75787. };
  75788. }, e.prototype._renderMonthText = function(n, r, i, a) {
  75789. var o = n.getModel("monthLabel");
  75790. if (o.get("show")) {
  75791. var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints];
  75792. (!s || Oe(s)) && (s && (r = zA(s) || r), s = r.get(["time", "monthAbbr"]) || []);
  75793. var d = u === "start" ? 0 : 1, h = i === "horizontal" ? 0 : 1;
  75794. l = u === "start" ? -l : l;
  75795. for (var p = c === "center", v = 0; v < f[d].length - 1; v++) {
  75796. var g = f[d][v].slice(), m = this._firstDayOfMonth[v];
  75797. if (p) {
  75798. var y = this._firstDayPoints[v];
  75799. g[h] = (y[h] + f[0][v + 1][h]) / 2;
  75800. }
  75801. var b = o.get("formatter"), _ = s[+m.m - 1], O = {
  75802. yyyy: m.y,
  75803. yy: (m.y + "").slice(2),
  75804. MM: m.m,
  75805. M: +m.m,
  75806. nameMap: _
  75807. }, S = this._formatterLabel(b, O), x = new gt({
  75808. z2: 30,
  75809. style: le(Zt(o, {
  75810. text: S
  75811. }), this._monthTextPositionControl(g, p, i, u, l))
  75812. });
  75813. a.add(x);
  75814. }
  75815. }
  75816. }, e.prototype._weekTextPositionControl = function(n, r, i, a, o) {
  75817. var s = "center", l = "middle", u = n[0], c = n[1], f = i === "start";
  75818. 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"), {
  75819. x: u,
  75820. y: c,
  75821. align: s,
  75822. verticalAlign: l
  75823. };
  75824. }, e.prototype._renderWeekText = function(n, r, i, a, o) {
  75825. var s = n.getModel("dayLabel");
  75826. if (s.get("show")) {
  75827. var l = n.coordinateSystem, u = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), d = l.getFirstDayOfWeek();
  75828. if (!c || Oe(c)) {
  75829. c && (r = zA(c) || r);
  75830. var h = r.get(["time", "dayOfWeekShort"]);
  75831. c = h || ce(r.get(["time", "dayOfWeekAbbr"]), function(O) {
  75832. return O[0];
  75833. });
  75834. }
  75835. var p = l.getNextNDay(i.end.time, 7 - i.lweek).time, v = [l.getCellWidth(), l.getCellHeight()];
  75836. f = _e(f, Math.min(v[1], v[0])), u === "start" && (p = l.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f);
  75837. for (var g = 0; g < 7; g++) {
  75838. var m = l.getNextNDay(p, g), y = l.dataToRect([m.time], !1).center, b = g;
  75839. b = Math.abs((g + d) % 7);
  75840. var _ = new gt({
  75841. z2: 30,
  75842. style: le(Zt(s, {
  75843. text: c[b]
  75844. }), this._weekTextPositionControl(y, a, u, f, v))
  75845. });
  75846. o.add(_);
  75847. }
  75848. }
  75849. }, e.type = "calendar", e;
  75850. }(Xt)
  75851. ), ZP = 864e5, yHe = (
  75852. /** @class */
  75853. function() {
  75854. function t(e, n, r) {
  75855. this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e;
  75856. }
  75857. return t.getDimensionsInfo = function() {
  75858. return [{
  75859. name: "time",
  75860. type: "time"
  75861. }, "value"];
  75862. }, t.prototype.getRangeInfo = function() {
  75863. return this._rangeInfo;
  75864. }, t.prototype.getModel = function() {
  75865. return this._model;
  75866. }, t.prototype.getRect = function() {
  75867. return this._rect;
  75868. }, t.prototype.getCellWidth = function() {
  75869. return this._sw;
  75870. }, t.prototype.getCellHeight = function() {
  75871. return this._sh;
  75872. }, t.prototype.getOrient = function() {
  75873. return this._orient;
  75874. }, t.prototype.getFirstDayOfWeek = function() {
  75875. return this._firstDayOfWeek;
  75876. }, t.prototype.getDateInfo = function(e) {
  75877. e = Yi(e);
  75878. 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();
  75879. return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
  75880. y: n + "",
  75881. m: i,
  75882. d: o,
  75883. day: s,
  75884. time: e.getTime(),
  75885. formatedDate: n + "-" + i + "-" + o,
  75886. date: e
  75887. };
  75888. }, t.prototype.getNextNDay = function(e, n) {
  75889. return n = n || 0, n === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + n), this.getDateInfo(e));
  75890. }, t.prototype.update = function(e, n) {
  75891. 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());
  75892. 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];
  75893. k([0, 1], function(f) {
  75894. c(a, f) && (o[i[f]] = a[f] * s[f]);
  75895. });
  75896. var l = {
  75897. width: n.getWidth(),
  75898. height: n.getHeight()
  75899. }, u = this._rect = Rn(o, l);
  75900. k([0, 1], function(f) {
  75901. c(a, f) || (a[f] = u[i[f]] / s[f]);
  75902. });
  75903. function c(f, d) {
  75904. return f[d] != null && f[d] !== "auto";
  75905. }
  75906. this._sw = a[0], this._sh = a[1];
  75907. }, t.prototype.dataToPoint = function(e, n) {
  75908. ue(e) && (e = e[0]), n == null && (n = !0);
  75909. var r = this.getDateInfo(e), i = this._rangeInfo, a = r.formatedDate;
  75910. if (n && !(r.time >= i.start.time && r.time < i.end.time + ZP))
  75911. return [NaN, NaN];
  75912. var o = r.day, s = this._getRangeInfo([i.start.time, a]).nthWeek;
  75913. 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];
  75914. }, t.prototype.pointToData = function(e) {
  75915. var n = this.pointToDate(e);
  75916. return n && n.time;
  75917. }, t.prototype.dataToRect = function(e, n) {
  75918. var r = this.dataToPoint(e, n);
  75919. return {
  75920. contentShape: {
  75921. x: r[0] - (this._sw - this._lineWidth) / 2,
  75922. y: r[1] - (this._sh - this._lineWidth) / 2,
  75923. width: this._sw - this._lineWidth,
  75924. height: this._sh - this._lineWidth
  75925. },
  75926. center: r,
  75927. tl: [r[0] - this._sw / 2, r[1] - this._sh / 2],
  75928. tr: [r[0] + this._sw / 2, r[1] - this._sh / 2],
  75929. br: [r[0] + this._sw / 2, r[1] + this._sh / 2],
  75930. bl: [r[0] - this._sw / 2, r[1] + this._sh / 2]
  75931. };
  75932. }, t.prototype.pointToDate = function(e) {
  75933. 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;
  75934. return this._orient === "vertical" ? this._getDateByWeeksAndDay(r, n - 1, i) : this._getDateByWeeksAndDay(n, r - 1, i);
  75935. }, t.prototype.convertToPixel = function(e, n, r) {
  75936. var i = u7(n);
  75937. return i === this ? i.dataToPoint(r) : null;
  75938. }, t.prototype.convertFromPixel = function(e, n, r) {
  75939. var i = u7(n);
  75940. return i === this ? i.pointToData(r) : null;
  75941. }, t.prototype.containPoint = function(e) {
  75942. return console.warn("Not implemented."), !1;
  75943. }, t.prototype._initRangeOption = function() {
  75944. var e = this._model.get("range"), n;
  75945. if (ue(e) && e.length === 1 && (e = e[0]), ue(e))
  75946. n = e;
  75947. else {
  75948. var r = e.toString();
  75949. if (/^\d{4}$/.test(r) && (n = [r + "-01-01", r + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(r)) {
  75950. var i = this.getDateInfo(r), a = i.date;
  75951. a.setMonth(a.getMonth() + 1);
  75952. var o = this.getNextNDay(a, -1);
  75953. n = [i.formatedDate, o.formatedDate];
  75954. }
  75955. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r) && (n = [r, r]);
  75956. }
  75957. if (!n)
  75958. return process.env.NODE_ENV !== "production" && Oa("Invalid date range."), e;
  75959. var s = this._getRangeInfo(n);
  75960. return s.start.time > s.end.time && n.reverse(), n;
  75961. }, t.prototype._getRangeInfo = function(e) {
  75962. var n = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], r;
  75963. n[0].time > n[1].time && (r = !0, n.reverse());
  75964. var i = Math.floor(n[1].time / ZP) - Math.floor(n[0].time / ZP) + 1, a = new Date(n[0].time), o = a.getDate(), s = n[1].date.getDate();
  75965. a.setDate(o + i - 1);
  75966. var l = a.getDate();
  75967. if (l !== s)
  75968. for (var u = a.getTime() - n[1].time > 0 ? 1 : -1; (l = a.getDate()) !== s && (a.getTime() - n[1].time) * u > 0; )
  75969. i -= u, a.setDate(l - u);
  75970. var c = Math.floor((i + n[0].day + 6) / 7), f = r ? -c + 1 : c - 1;
  75971. return r && n.reverse(), {
  75972. range: [n[0].formatedDate, n[1].formatedDate],
  75973. start: n[0],
  75974. end: n[1],
  75975. allDay: i,
  75976. weeks: c,
  75977. // From 0.
  75978. nthWeek: f,
  75979. fweek: n[0].day,
  75980. lweek: n[1].day
  75981. };
  75982. }, t.prototype._getDateByWeeksAndDay = function(e, n, r) {
  75983. var i = this._getRangeInfo(r);
  75984. if (e > i.weeks || e === 0 && n < i.fweek || e === i.weeks && n > i.lweek)
  75985. return null;
  75986. var a = (e - 1) * 7 - i.fweek + n, o = new Date(i.start.time);
  75987. return o.setDate(+i.start.d + a), this.getDateInfo(o);
  75988. }, t.create = function(e, n) {
  75989. var r = [];
  75990. return e.eachComponent("calendar", function(i) {
  75991. var a = new t(i);
  75992. r.push(a), i.coordinateSystem = a;
  75993. }), e.eachSeries(function(i) {
  75994. i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = r[i.get("calendarIndex") || 0]);
  75995. }), r;
  75996. }, t.dimensions = ["time", "value"], t;
  75997. }()
  75998. );
  75999. function u7(t) {
  76000. var e = t.calendarModel, n = t.seriesModel, r = e ? e.coordinateSystem : n ? n.coordinateSystem : null;
  76001. return r;
  76002. }
  76003. function bHe(t) {
  76004. t.registerComponentModel(gHe), t.registerComponentView(mHe), t.registerCoordinateSystem("calendar", yHe);
  76005. }
  76006. function _He(t, e) {
  76007. var n = t.existing;
  76008. if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), e.parentId == null) {
  76009. var r = e.parentOption;
  76010. r ? e.parentId = r.id : n && (e.parentId = n.parentId);
  76011. }
  76012. e.parentOption = null;
  76013. }
  76014. function c7(t, e) {
  76015. var n;
  76016. return k(e, function(r) {
  76017. t[r] != null && t[r] !== "auto" && (n = !0);
  76018. }), n;
  76019. }
  76020. function OHe(t, e, n) {
  76021. var r = le({}, n), i = t[e], a = n.$action || "merge";
  76022. if (a === "merge")
  76023. if (i) {
  76024. if (process.env.NODE_ENV !== "production") {
  76025. var o = n.type;
  76026. ke(!o || i.type === o, 'Please set $action: "replace" to change `type`');
  76027. }
  76028. qe(i, r, !0), cu(i, r, {
  76029. ignoreSize: !0
  76030. }), PJ(n, i), Rb(n, i), Rb(n, i, "shape"), Rb(n, i, "style"), Rb(n, i, "extra"), n.clipPath = i.clipPath;
  76031. } else
  76032. t[e] = r;
  76033. else a === "replace" ? t[e] = r : a === "remove" && i && (t[e] = null);
  76034. }
  76035. var zre = ["transition", "enterFrom", "leaveTo"], SHe = zre.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
  76036. function Rb(t, e, n) {
  76037. if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), !(!t || !e))
  76038. for (var r = n ? zre : SHe, i = 0; i < r.length; i++) {
  76039. var a = r[i];
  76040. t[a] == null && e[a] != null && (t[a] = e[a]);
  76041. }
  76042. }
  76043. function xHe(t, e) {
  76044. if (t && (t.hv = e.hv = [
  76045. // Rigid body, don't care about `width`.
  76046. c7(e, ["left", "right"]),
  76047. // Rigid body, don't care about `height`.
  76048. c7(e, ["top", "bottom"])
  76049. ], t.type === "group")) {
  76050. var n = t, r = e;
  76051. n.width == null && (n.width = r.width = 0), n.height == null && (n.height = r.height = 0);
  76052. }
  76053. }
  76054. var wHe = (
  76055. /** @class */
  76056. function(t) {
  76057. q(e, t);
  76058. function e() {
  76059. var n = t !== null && t.apply(this, arguments) || this;
  76060. return n.type = e.type, n.preventAutoZ = !0, n;
  76061. }
  76062. return e.prototype.mergeOption = function(n, r) {
  76063. var i = this.option.elements;
  76064. this.option.elements = null, t.prototype.mergeOption.call(this, n, r), this.option.elements = i;
  76065. }, e.prototype.optionUpdated = function(n, r) {
  76066. var i = this.option, a = (r ? i : n).elements, o = i.elements = r ? [] : i.elements, s = [];
  76067. this._flatten(a, s, null);
  76068. var l = hK(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
  76069. k(l, function(c, f) {
  76070. var d = c.newOption;
  76071. process.env.NODE_ENV !== "production" && ke(Ie(d) || c.existing, "Empty graphic option definition"), d && (u.push(d), _He(c, d), OHe(o, f, d), xHe(o[f], d));
  76072. }, this), i.elements = Nt(o, function(c) {
  76073. return c && delete c.$action, c != null;
  76074. });
  76075. }, e.prototype._flatten = function(n, r, i) {
  76076. k(n, function(a) {
  76077. if (a) {
  76078. i && (a.parentOption = i), r.push(a);
  76079. var o = a.children;
  76080. o && o.length && this._flatten(o, r, a), delete a.children;
  76081. }
  76082. }, this);
  76083. }, e.prototype.useElOptionsToUpdate = function() {
  76084. var n = this._elOptionsToUpdate;
  76085. return this._elOptionsToUpdate = null, n;
  76086. }, e.type = "graphic", e.defaultOption = {
  76087. elements: []
  76088. // parentId: null
  76089. }, e;
  76090. }(rt)
  76091. ), f7 = {
  76092. // Reserved but not supported in graphic component.
  76093. path: null,
  76094. compoundPath: null,
  76095. // Supported in graphic component.
  76096. group: Ve,
  76097. image: lr,
  76098. text: gt
  76099. }, ca = bt(), CHe = (
  76100. /** @class */
  76101. function(t) {
  76102. q(e, t);
  76103. function e() {
  76104. var n = t !== null && t.apply(this, arguments) || this;
  76105. return n.type = e.type, n;
  76106. }
  76107. return e.prototype.init = function() {
  76108. this._elMap = Pe();
  76109. }, e.prototype.render = function(n, r, i) {
  76110. n !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = n, this._updateElements(n), this._relocate(n, i);
  76111. }, e.prototype._updateElements = function(n) {
  76112. var r = n.useElOptionsToUpdate();
  76113. if (r) {
  76114. var i = this._elMap, a = this.group, o = n.get("z"), s = n.get("zlevel");
  76115. k(r, function(l) {
  76116. 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;
  76117. h === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
  76118. var v = l.textContent, g = l.textConfig;
  76119. if (p && yre(p, h, !!g, !!v)) {
  76120. var m = bre(p, h, !0);
  76121. !g && m.textConfig && (g = l.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent);
  76122. }
  76123. var y = THe(l);
  76124. process.env.NODE_ENV !== "production" && c && ke(d === c.parent, "Changing parent is not supported.");
  76125. var b = l.$action || "merge", _ = b === "merge", O = b === "replace";
  76126. if (_) {
  76127. var S = !c, x = c;
  76128. S ? x = d7(u, d, l.type, i) : (x && (ca(x).isNew = !1), wre(x)), x && (U_(x, y, n, {
  76129. isInit: S
  76130. }), h7(x, l, o, s));
  76131. } else if (O) {
  76132. q_(c, l, i, n);
  76133. var C = d7(u, d, l.type, i);
  76134. C && (U_(C, y, n, {
  76135. isInit: !0
  76136. }), h7(C, l, o, s));
  76137. } else b === "remove" && (Ore(c, l), q_(c, l, i, n));
  76138. var T = i.get(u);
  76139. if (T && v)
  76140. if (_) {
  76141. var w = T.getTextContent();
  76142. w ? w.attr(v) : T.setTextContent(new gt(v));
  76143. } else O && T.setTextContent(new gt(v));
  76144. if (T) {
  76145. var P = l.clipPath;
  76146. if (P) {
  76147. var $ = P.type, A = void 0, S = !1;
  76148. if (_) {
  76149. var D = T.getClipPath();
  76150. S = !D || ca(D).type !== $, A = S ? IE($) : D;
  76151. } else O && (S = !0, A = IE($));
  76152. T.setClipPath(A), U_(A, P, n, {
  76153. isInit: S
  76154. }), BO(A, P.keyframeAnimation, n);
  76155. }
  76156. var E = ca(T);
  76157. T.setTextConfig(g), E.option = l, PHe(T, n, l), gp({
  76158. el: T,
  76159. componentModel: n,
  76160. itemName: T.name,
  76161. itemTooltipOption: l.tooltip
  76162. }), BO(T, l.keyframeAnimation, n);
  76163. }
  76164. });
  76165. }
  76166. }, e.prototype._relocate = function(n, r) {
  76167. 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++) {
  76168. var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
  76169. if (!(!h || !h.isGroup)) {
  76170. var p = h.parent, v = p === a, g = ca(h), m = ca(p);
  76171. g.width = _e(g.option.width, v ? s : m.width) || 0, g.height = _e(g.option.height, v ? l : m.height) || 0;
  76172. }
  76173. }
  76174. for (var c = i.length - 1; c >= 0; c--) {
  76175. var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
  76176. if (h) {
  76177. var p = h.parent, m = ca(p), y = p === a ? {
  76178. width: s,
  76179. height: l
  76180. } : {
  76181. width: m.width,
  76182. height: m.height
  76183. }, b = {}, _ = aw(h, f, y, null, {
  76184. hv: f.hv,
  76185. boundingMode: f.bounding
  76186. }, b);
  76187. if (!ca(h).isNew && _) {
  76188. for (var O = f.transition, S = {}, x = 0; x < u.length; x++) {
  76189. var C = u[x], T = b[C];
  76190. O && (rf(O) || et(O, C) >= 0) ? S[C] = T : h[C] = T;
  76191. }
  76192. Ct(h, S, n, 0);
  76193. } else
  76194. h.attr(b);
  76195. }
  76196. }
  76197. }, e.prototype._clear = function() {
  76198. var n = this, r = this._elMap;
  76199. r.each(function(i) {
  76200. q_(i, ca(i).option, r, n._lastGraphicModel);
  76201. }), this._elMap = Pe();
  76202. }, e.prototype.dispose = function() {
  76203. this._clear();
  76204. }, e.type = "graphic", e;
  76205. }(Xt)
  76206. );
  76207. function IE(t) {
  76208. process.env.NODE_ENV !== "production" && ke(t, "graphic type MUST be set");
  76209. var e = Ce(f7, t) ? f7[t] : Kx(t);
  76210. process.env.NODE_ENV !== "production" && ke(e, "graphic type " + t + " can not be found");
  76211. var n = new e({});
  76212. return ca(n).type = t, n;
  76213. }
  76214. function d7(t, e, n, r) {
  76215. var i = IE(n);
  76216. return e.add(i), r.set(t, i), ca(i).id = t, ca(i).isNew = !0, i;
  76217. }
  76218. function q_(t, e, n, r) {
  76219. var i = t && t.parent;
  76220. i && (t.type === "group" && t.traverse(function(a) {
  76221. q_(a, e, n, r);
  76222. }), Sw(t, e, r), n.removeKey(ca(t).id));
  76223. }
  76224. function h7(t, e, n, r) {
  76225. t.isGroup || k([
  76226. ["cursor", Ma.prototype.cursor],
  76227. // We should not support configure z and zlevel in the element level.
  76228. // But seems we didn't limit it previously. So here still use it to avoid breaking.
  76229. ["zlevel", r || 0],
  76230. ["z", n || 0],
  76231. // z2 must not be null/undefined, otherwise sort error may occur.
  76232. ["z2", 0]
  76233. ], function(i) {
  76234. var a = i[0];
  76235. Ce(e, a) ? t[a] = We(e[a], i[1]) : t[a] == null && (t[a] = i[1]);
  76236. }), k(st(e), function(i) {
  76237. if (i.indexOf("on") === 0) {
  76238. var a = e[i];
  76239. t[i] = Me(a) ? a : null;
  76240. }
  76241. }), Ce(e, "draggable") && (t.draggable = e.draggable), e.name != null && (t.name = e.name), e.id != null && (t.id = e.id);
  76242. }
  76243. function THe(t) {
  76244. return t = le({}, t), k(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(TJ), function(e) {
  76245. delete t[e];
  76246. }), t;
  76247. }
  76248. function PHe(t, e, n) {
  76249. var r = Fe(t).eventData;
  76250. !t.silent && !t.ignore && !r && (r = Fe(t).eventData = {
  76251. componentType: "graphic",
  76252. componentIndex: e.componentIndex,
  76253. name: t.name
  76254. }), r && (r.info = n.info);
  76255. }
  76256. function $He(t) {
  76257. t.registerComponentModel(wHe), t.registerComponentView(CHe), t.registerPreprocessor(function(e) {
  76258. var n = e.graphic;
  76259. ue(n) ? !n[0] || !n[0].elements ? e.graphic = [{
  76260. elements: n
  76261. }] : e.graphic = [e.graphic[0]] : n && !n.elements && (e.graphic = [{
  76262. elements: [n]
  76263. }]);
  76264. });
  76265. }
  76266. var p7 = ["x", "y", "radius", "angle", "single"], AHe = ["cartesian2d", "polar", "singleAxis"];
  76267. function EHe(t) {
  76268. var e = t.get("coordinateSystem");
  76269. return et(AHe, e) >= 0;
  76270. }
  76271. function Fl(t) {
  76272. return process.env.NODE_ENV !== "production" && ke(t), t + "Axis";
  76273. }
  76274. function MHe(t, e) {
  76275. var n = Pe(), r = [], i = Pe();
  76276. t.eachComponent({
  76277. mainType: "dataZoom",
  76278. query: e
  76279. }, function(c) {
  76280. i.get(c.uid) || s(c);
  76281. });
  76282. var a;
  76283. do
  76284. a = !1, t.eachComponent("dataZoom", o);
  76285. while (a);
  76286. function o(c) {
  76287. !i.get(c.uid) && l(c) && (s(c), a = !0);
  76288. }
  76289. function s(c) {
  76290. i.set(c.uid, !0), r.push(c), u(c);
  76291. }
  76292. function l(c) {
  76293. var f = !1;
  76294. return c.eachTargetAxis(function(d, h) {
  76295. var p = n.get(d);
  76296. p && p[h] && (f = !0);
  76297. }), f;
  76298. }
  76299. function u(c) {
  76300. c.eachTargetAxis(function(f, d) {
  76301. (n.get(f) || n.set(f, []))[d] = !0;
  76302. });
  76303. }
  76304. return r;
  76305. }
  76306. function Vre(t) {
  76307. var e = t.ecModel, n = {
  76308. infoList: [],
  76309. infoMap: Pe()
  76310. };
  76311. return t.eachTargetAxis(function(r, i) {
  76312. var a = e.getComponent(Fl(r), i);
  76313. if (a) {
  76314. var o = a.getCoordSysModel();
  76315. if (o) {
  76316. var s = o.uid, l = n.infoMap.get(s);
  76317. l || (l = {
  76318. model: o,
  76319. axisModels: []
  76320. }, n.infoList.push(l), n.infoMap.set(s, l)), l.axisModels.push(a);
  76321. }
  76322. }
  76323. }), n;
  76324. }
  76325. var UP = (
  76326. /** @class */
  76327. function() {
  76328. function t() {
  76329. this.indexList = [], this.indexMap = [];
  76330. }
  76331. return t.prototype.add = function(e) {
  76332. this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
  76333. }, t;
  76334. }()
  76335. ), Fm = (
  76336. /** @class */
  76337. function(t) {
  76338. q(e, t);
  76339. function e() {
  76340. var n = t !== null && t.apply(this, arguments) || this;
  76341. return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n;
  76342. }
  76343. return e.prototype.init = function(n, r, i) {
  76344. var a = v7(n);
  76345. this.settledOption = a, this.mergeDefaultAndTheme(n, i), this._doInit(a);
  76346. }, e.prototype.mergeOption = function(n) {
  76347. var r = v7(n);
  76348. qe(this.option, n, !0), qe(this.settledOption, r, !0), this._doInit(r);
  76349. }, e.prototype._doInit = function(n) {
  76350. var r = this.option;
  76351. this._setDefaultThrottle(n), this._updateRangeUse(n);
  76352. var i = this.settledOption;
  76353. k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
  76354. this._rangePropMode[o] === "value" && (r[a[0]] = i[a[0]] = null);
  76355. }, this), this._resetTarget();
  76356. }, e.prototype._resetTarget = function() {
  76357. var n = this.get("orient", !0), r = this._targetAxisInfoMap = Pe(), i = this._fillSpecifiedTargetAxis(r);
  76358. i ? this._orient = n || this._makeAutoOrientByTargetAxis() : (this._orient = n || "horizontal", this._fillAutoTargetAxisByOrient(r, this._orient)), this._noTarget = !0, r.each(function(a) {
  76359. a.indexList.length && (this._noTarget = !1);
  76360. }, this);
  76361. }, e.prototype._fillSpecifiedTargetAxis = function(n) {
  76362. var r = !1;
  76363. return k(p7, function(i) {
  76364. var a = this.getReferringComponents(Fl(i), eRe);
  76365. if (a.specified) {
  76366. r = !0;
  76367. var o = new UP();
  76368. k(a.models, function(s) {
  76369. o.add(s.componentIndex);
  76370. }), n.set(i, o);
  76371. }
  76372. }, this), r;
  76373. }, e.prototype._fillAutoTargetAxisByOrient = function(n, r) {
  76374. var i = this.ecModel, a = !0;
  76375. if (a) {
  76376. var o = r === "vertical" ? "y" : "x", s = i.findComponents({
  76377. mainType: o + "Axis"
  76378. });
  76379. l(s, o);
  76380. }
  76381. if (a) {
  76382. var s = i.findComponents({
  76383. mainType: "singleAxis",
  76384. filter: function(c) {
  76385. return c.get("orient", !0) === r;
  76386. }
  76387. });
  76388. l(s, "single");
  76389. }
  76390. function l(u, c) {
  76391. var f = u[0];
  76392. if (f) {
  76393. var d = new UP();
  76394. if (d.add(f.componentIndex), n.set(c, d), a = !1, c === "x" || c === "y") {
  76395. var h = f.getReferringComponents("grid", Dn).models[0];
  76396. h && k(u, function(p) {
  76397. f.componentIndex !== p.componentIndex && h === p.getReferringComponents("grid", Dn).models[0] && d.add(p.componentIndex);
  76398. });
  76399. }
  76400. }
  76401. }
  76402. a && k(p7, function(u) {
  76403. if (a) {
  76404. var c = i.findComponents({
  76405. mainType: Fl(u),
  76406. filter: function(d) {
  76407. return d.get("type", !0) === "category";
  76408. }
  76409. });
  76410. if (c[0]) {
  76411. var f = new UP();
  76412. f.add(c[0].componentIndex), n.set(u, f), a = !1;
  76413. }
  76414. }
  76415. }, this);
  76416. }, e.prototype._makeAutoOrientByTargetAxis = function() {
  76417. var n;
  76418. return this.eachTargetAxis(function(r) {
  76419. !n && (n = r);
  76420. }, this), n === "y" ? "vertical" : "horizontal";
  76421. }, e.prototype._setDefaultThrottle = function(n) {
  76422. if (n.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
  76423. var r = this.ecModel.option;
  76424. this.option.throttle = r.animation && r.animationDurationUpdate > 0 ? 100 : 20;
  76425. }
  76426. }, e.prototype._updateRangeUse = function(n) {
  76427. var r = this._rangePropMode, i = this.get("rangeMode");
  76428. k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
  76429. var s = n[a[0]] != null, l = n[a[1]] != null;
  76430. s && !l ? r[o] = "percent" : !s && l ? r[o] = "value" : i ? r[o] = i[o] : s && (r[o] = "percent");
  76431. });
  76432. }, e.prototype.noTarget = function() {
  76433. return this._noTarget;
  76434. }, e.prototype.getFirstTargetAxisModel = function() {
  76435. var n;
  76436. return this.eachTargetAxis(function(r, i) {
  76437. n == null && (n = this.ecModel.getComponent(Fl(r), i));
  76438. }, this), n;
  76439. }, e.prototype.eachTargetAxis = function(n, r) {
  76440. this._targetAxisInfoMap.each(function(i, a) {
  76441. k(i.indexList, function(o) {
  76442. n.call(r, a, o);
  76443. });
  76444. });
  76445. }, e.prototype.getAxisProxy = function(n, r) {
  76446. var i = this.getAxisModel(n, r);
  76447. if (i)
  76448. return i.__dzAxisProxy;
  76449. }, e.prototype.getAxisModel = function(n, r) {
  76450. process.env.NODE_ENV !== "production" && ke(n && r != null);
  76451. var i = this._targetAxisInfoMap.get(n);
  76452. if (i && i.indexMap[r])
  76453. return this.ecModel.getComponent(Fl(n), r);
  76454. }, e.prototype.setRawRange = function(n) {
  76455. var r = this.option, i = this.settledOption;
  76456. k([["start", "startValue"], ["end", "endValue"]], function(a) {
  76457. (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]]);
  76458. }, this), this._updateRangeUse(n);
  76459. }, e.prototype.setCalculatedRange = function(n) {
  76460. var r = this.option;
  76461. k(["start", "startValue", "end", "endValue"], function(i) {
  76462. r[i] = n[i];
  76463. });
  76464. }, e.prototype.getPercentRange = function() {
  76465. var n = this.findRepresentativeAxisProxy();
  76466. if (n)
  76467. return n.getDataPercentWindow();
  76468. }, e.prototype.getValueRange = function(n, r) {
  76469. if (n == null && r == null) {
  76470. var i = this.findRepresentativeAxisProxy();
  76471. if (i)
  76472. return i.getDataValueWindow();
  76473. } else
  76474. return this.getAxisProxy(n, r).getDataValueWindow();
  76475. }, e.prototype.findRepresentativeAxisProxy = function(n) {
  76476. if (n)
  76477. return n.__dzAxisProxy;
  76478. for (var r, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++)
  76479. for (var o = i[a], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
  76480. var u = this.getAxisProxy(o, s.indexList[l]);
  76481. if (u.hostedBy(this))
  76482. return u;
  76483. r || (r = u);
  76484. }
  76485. return r;
  76486. }, e.prototype.getRangePropMode = function() {
  76487. return this._rangePropMode.slice();
  76488. }, e.prototype.getOrient = function() {
  76489. return process.env.NODE_ENV !== "production" && ke(this._orient), this._orient;
  76490. }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
  76491. // zlevel: 0,
  76492. z: 4,
  76493. filterMode: "filter",
  76494. start: 0,
  76495. end: 100
  76496. }, e;
  76497. }(rt)
  76498. );
  76499. function v7(t) {
  76500. var e = {};
  76501. return k(["start", "end", "startValue", "endValue", "throttle"], function(n) {
  76502. t.hasOwnProperty(n) && (e[n] = t[n]);
  76503. }), e;
  76504. }
  76505. var IHe = (
  76506. /** @class */
  76507. function(t) {
  76508. q(e, t);
  76509. function e() {
  76510. var n = t !== null && t.apply(this, arguments) || this;
  76511. return n.type = e.type, n;
  76512. }
  76513. return e.type = "dataZoom.select", e;
  76514. }(Fm)
  76515. ), OL = (
  76516. /** @class */
  76517. function(t) {
  76518. q(e, t);
  76519. function e() {
  76520. var n = t !== null && t.apply(this, arguments) || this;
  76521. return n.type = e.type, n;
  76522. }
  76523. return e.prototype.render = function(n, r, i, a) {
  76524. this.dataZoomModel = n, this.ecModel = r, this.api = i;
  76525. }, e.type = "dataZoom", e;
  76526. }(Xt)
  76527. ), DHe = (
  76528. /** @class */
  76529. function(t) {
  76530. q(e, t);
  76531. function e() {
  76532. var n = t !== null && t.apply(this, arguments) || this;
  76533. return n.type = e.type, n;
  76534. }
  76535. return e.type = "dataZoom.select", e;
  76536. }(OL)
  76537. ), Md = k, g7 = Vi, RHe = (
  76538. /** @class */
  76539. function() {
  76540. function t(e, n, r, i) {
  76541. this._dimName = e, this._axisIndex = n, this.ecModel = i, this._dataZoomModel = r;
  76542. }
  76543. return t.prototype.hostedBy = function(e) {
  76544. return this._dataZoomModel === e;
  76545. }, t.prototype.getDataValueWindow = function() {
  76546. return this._valueWindow.slice();
  76547. }, t.prototype.getDataPercentWindow = function() {
  76548. return this._percentWindow.slice();
  76549. }, t.prototype.getTargetSeriesModels = function() {
  76550. var e = [];
  76551. return this.ecModel.eachSeries(function(n) {
  76552. if (EHe(n)) {
  76553. var r = Fl(this._dimName), i = n.getReferringComponents(r, Dn).models[0];
  76554. i && this._axisIndex === i.componentIndex && e.push(n);
  76555. }
  76556. }, this), e;
  76557. }, t.prototype.getAxisModel = function() {
  76558. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
  76559. }, t.prototype.getMinMaxSpan = function() {
  76560. return Le(this._minMaxSpan);
  76561. }, t.prototype.calculateDataWindow = function(e) {
  76562. var n = this._dataExtent, r = this.getAxisModel(), i = r.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
  76563. Md(["start", "end"], function(d, h) {
  76564. var p = e[d], v = e[d + "Value"];
  76565. 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;
  76566. }), g7(l), g7(s);
  76567. var c = this._minMaxSpan;
  76568. u ? f(l, s, n, o, !1) : f(s, l, o, n, !0);
  76569. function f(d, h, p, v, g) {
  76570. var m = g ? "Span" : "ValueSpan";
  76571. Qf(0, d, p, "all", c["min" + m], c["max" + m]);
  76572. for (var y = 0; y < 2; y++)
  76573. h[y] = Lt(d[y], p, v, !0), g && (h[y] = i.parse(h[y]));
  76574. }
  76575. return {
  76576. valueWindow: l,
  76577. percentWindow: s
  76578. };
  76579. }, t.prototype.reset = function(e) {
  76580. if (e === this._dataZoomModel) {
  76581. var n = this.getTargetSeriesModels();
  76582. this._dataExtent = kHe(this, this._dimName, n), this._updateMinMaxSpan();
  76583. var r = this.calculateDataWindow(e.settledOption);
  76584. this._valueWindow = r.valueWindow, this._percentWindow = r.percentWindow, this._setAxisModel();
  76585. }
  76586. }, t.prototype.filterData = function(e, n) {
  76587. if (e !== this._dataZoomModel)
  76588. return;
  76589. var r = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow;
  76590. if (a === "none")
  76591. return;
  76592. Md(i, function(l) {
  76593. var u = l.getData(), c = u.mapDimensionsAll(r);
  76594. if (c.length) {
  76595. if (a === "weakFilter") {
  76596. var f = u.getStore(), d = ce(c, function(h) {
  76597. return u.getDimensionIndex(h);
  76598. }, u);
  76599. u.filterSelf(function(h) {
  76600. for (var p, v, g, m = 0; m < c.length; m++) {
  76601. var y = f.get(d[m], h), b = !isNaN(y), _ = y < o[0], O = y > o[1];
  76602. if (b && !_ && !O)
  76603. return !0;
  76604. b && (g = !0), _ && (p = !0), O && (v = !0);
  76605. }
  76606. return g && p && v;
  76607. });
  76608. } else
  76609. Md(c, function(h) {
  76610. if (a === "empty")
  76611. l.setData(u = u.map(h, function(v) {
  76612. return s(v) ? v : NaN;
  76613. }));
  76614. else {
  76615. var p = {};
  76616. p[h] = o, u.selectRange(p);
  76617. }
  76618. });
  76619. Md(c, function(h) {
  76620. u.setApproximateExtent(o, h);
  76621. });
  76622. }
  76623. });
  76624. function s(l) {
  76625. return l >= o[0] && l <= o[1];
  76626. }
  76627. }, t.prototype._updateMinMaxSpan = function() {
  76628. var e = this._minMaxSpan = {}, n = this._dataZoomModel, r = this._dataExtent;
  76629. Md(["min", "max"], function(i) {
  76630. var a = n.get(i + "Span"), o = n.get(i + "ValueSpan");
  76631. 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;
  76632. }, this);
  76633. }, t.prototype._setAxisModel = function() {
  76634. var e = this.getAxisModel(), n = this._percentWindow, r = this._valueWindow;
  76635. if (n) {
  76636. var i = TR(r, [0, 500]);
  76637. i = Math.min(i, 20);
  76638. var a = e.axis.scale.rawExtentInfo;
  76639. n[0] !== 0 && a.setDeterminedMinMax("min", +r[0].toFixed(i)), n[1] !== 100 && a.setDeterminedMinMax("max", +r[1].toFixed(i)), a.freeze();
  76640. }
  76641. }, t;
  76642. }()
  76643. );
  76644. function kHe(t, e, n) {
  76645. var r = [1 / 0, -1 / 0];
  76646. Md(n, function(o) {
  76647. JNe(r, o.getData(), e);
  76648. });
  76649. var i = t.getAxisModel(), a = nte(i.axis.scale, i, r).calculate();
  76650. return [a.min, a.max];
  76651. }
  76652. var LHe = {
  76653. // `dataZoomProcessor` will only be performed in needed series. Consider if
  76654. // there is a line series and a pie series, it is better not to update the
  76655. // line series if only pie series is needed to be updated.
  76656. getTargetSeries: function(t) {
  76657. function e(i) {
  76658. t.eachComponent("dataZoom", function(a) {
  76659. a.eachTargetAxis(function(o, s) {
  76660. var l = t.getComponent(Fl(o), s);
  76661. i(o, s, l, a);
  76662. });
  76663. });
  76664. }
  76665. e(function(i, a, o, s) {
  76666. o.__dzAxisProxy = null;
  76667. });
  76668. var n = [];
  76669. e(function(i, a, o, s) {
  76670. o.__dzAxisProxy || (o.__dzAxisProxy = new RHe(i, a, s, t), n.push(o.__dzAxisProxy));
  76671. });
  76672. var r = Pe();
  76673. return k(n, function(i) {
  76674. k(i.getTargetSeriesModels(), function(a) {
  76675. r.set(a.uid, a);
  76676. });
  76677. }), r;
  76678. },
  76679. // Consider appendData, where filter should be performed. Because data process is
  76680. // in block mode currently, it is not need to worry about that the overallProgress
  76681. // execute every frame.
  76682. overallReset: function(t, e) {
  76683. t.eachComponent("dataZoom", function(n) {
  76684. n.eachTargetAxis(function(r, i) {
  76685. n.getAxisProxy(r, i).reset(n);
  76686. }), n.eachTargetAxis(function(r, i) {
  76687. n.getAxisProxy(r, i).filterData(n, e);
  76688. });
  76689. }), t.eachComponent("dataZoom", function(n) {
  76690. var r = n.findRepresentativeAxisProxy();
  76691. if (r) {
  76692. var i = r.getDataPercentWindow(), a = r.getDataValueWindow();
  76693. n.setCalculatedRange({
  76694. start: i[0],
  76695. end: i[1],
  76696. startValue: a[0],
  76697. endValue: a[1]
  76698. });
  76699. }
  76700. });
  76701. }
  76702. };
  76703. function NHe(t) {
  76704. t.registerAction("dataZoom", function(e, n) {
  76705. var r = MHe(n, e);
  76706. k(r, function(i) {
  76707. i.setRawRange({
  76708. start: e.start,
  76709. end: e.end,
  76710. startValue: e.startValue,
  76711. endValue: e.endValue
  76712. });
  76713. });
  76714. });
  76715. }
  76716. var m7 = !1;
  76717. function SL(t) {
  76718. m7 || (m7 = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, LHe), NHe(t), t.registerSubTypeDefaulter("dataZoom", function() {
  76719. return "slider";
  76720. }));
  76721. }
  76722. function BHe(t) {
  76723. t.registerComponentModel(IHe), t.registerComponentView(DHe), SL(t);
  76724. }
  76725. var pa = (
  76726. /** @class */
  76727. /* @__PURE__ */ function() {
  76728. function t() {
  76729. }
  76730. return t;
  76731. }()
  76732. ), Fre = {};
  76733. function Id(t, e) {
  76734. Fre[t] = e;
  76735. }
  76736. function Wre(t) {
  76737. return Fre[t];
  76738. }
  76739. var zHe = (
  76740. /** @class */
  76741. function(t) {
  76742. q(e, t);
  76743. function e() {
  76744. var n = t !== null && t.apply(this, arguments) || this;
  76745. return n.type = e.type, n;
  76746. }
  76747. return e.prototype.optionUpdated = function() {
  76748. t.prototype.optionUpdated.apply(this, arguments);
  76749. var n = this.ecModel;
  76750. k(this.option.feature, function(r, i) {
  76751. var a = Wre(i);
  76752. a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(n)), qe(r, a.defaultOption));
  76753. });
  76754. }, e.type = "toolbox", e.layoutMode = {
  76755. type: "box",
  76756. ignoreSize: !0
  76757. }, e.defaultOption = {
  76758. show: !0,
  76759. z: 6,
  76760. // zlevel: 0,
  76761. orient: "horizontal",
  76762. left: "right",
  76763. top: "top",
  76764. // right
  76765. // bottom
  76766. backgroundColor: "transparent",
  76767. borderColor: "#ccc",
  76768. borderRadius: 0,
  76769. borderWidth: 0,
  76770. padding: 5,
  76771. itemSize: 15,
  76772. itemGap: 8,
  76773. showTitle: !0,
  76774. iconStyle: {
  76775. borderColor: "#666",
  76776. color: "none"
  76777. },
  76778. emphasis: {
  76779. iconStyle: {
  76780. borderColor: "#3E98C5"
  76781. }
  76782. },
  76783. // textStyle: {},
  76784. // feature
  76785. tooltip: {
  76786. show: !1,
  76787. position: "bottom"
  76788. }
  76789. }, e;
  76790. }(rt)
  76791. );
  76792. function VHe(t, e, n) {
  76793. var r = e.getBoxLayoutParams(), i = e.get("padding"), a = {
  76794. width: n.getWidth(),
  76795. height: n.getHeight()
  76796. }, o = Rn(r, a, i);
  76797. ef(e.get("orient"), t, e.get("itemGap"), o.width, o.height), aw(t, r, a, i);
  76798. }
  76799. function Qre(t, e) {
  76800. var n = Bf(e.get("padding")), r = e.getItemStyle(["color", "opacity"]);
  76801. return r.fill = e.get("backgroundColor"), t = new mt({
  76802. shape: {
  76803. x: t.x - n[3],
  76804. y: t.y - n[0],
  76805. width: t.width + n[1] + n[3],
  76806. height: t.height + n[0] + n[2],
  76807. r: e.get("borderRadius")
  76808. },
  76809. style: r,
  76810. silent: !0,
  76811. z2: -1
  76812. }), t;
  76813. }
  76814. var FHe = (
  76815. /** @class */
  76816. function(t) {
  76817. q(e, t);
  76818. function e() {
  76819. return t !== null && t.apply(this, arguments) || this;
  76820. }
  76821. return e.prototype.render = function(n, r, i, a) {
  76822. var o = this.group;
  76823. if (o.removeAll(), !n.get("show"))
  76824. return;
  76825. var s = +n.get("itemSize"), l = n.get("orient") === "vertical", u = n.get("feature") || {}, c = this._features || (this._features = {}), f = [];
  76826. k(u, function(p, v) {
  76827. f.push(v);
  76828. }), new Us(this._featureNames || [], f).add(d).update(d).remove(Ue(d, null)).execute(), this._featureNames = f;
  76829. function d(p, v) {
  76830. var g = f[p], m = f[v], y = u[g], b = new Wt(y, n, n.ecModel), _;
  76831. if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) {
  76832. if (WHe(g))
  76833. _ = {
  76834. onclick: b.option.onclick,
  76835. featureName: g
  76836. };
  76837. else {
  76838. var O = Wre(g);
  76839. if (!O)
  76840. return;
  76841. _ = new O();
  76842. }
  76843. c[g] = _;
  76844. } else if (_ = c[m], !_)
  76845. return;
  76846. _.uid = yp("toolbox-feature"), _.model = b, _.ecModel = r, _.api = i;
  76847. var S = _ instanceof pa;
  76848. if (!g && m) {
  76849. S && _.dispose && _.dispose(r, i);
  76850. return;
  76851. }
  76852. if (!b.get("show") || S && _.unusable) {
  76853. S && _.remove && _.remove(r, i);
  76854. return;
  76855. }
  76856. h(b, _, g), b.setIconStatus = function(x, C) {
  76857. var T = this.option, w = this.iconPaths;
  76858. T.iconStatus = T.iconStatus || {}, T.iconStatus[x] = C, w[x] && (C === "emphasis" ? js : Zs)(w[x]);
  76859. }, _ instanceof pa && _.render && _.render(b, r, i, a);
  76860. }
  76861. function h(p, v, g) {
  76862. var m = p.getModel("iconStyle"), y = p.getModel(["emphasis", "iconStyle"]), b = v instanceof pa && v.getIcons ? v.getIcons() : p.get("icon"), _ = p.get("title") || {}, O, S;
  76863. Oe(b) ? (O = {}, O[g] = b) : O = b, Oe(_) ? (S = {}, S[g] = _) : S = _;
  76864. var x = p.iconPaths = {};
  76865. k(O, function(C, T) {
  76866. var w = vp(C, {}, {
  76867. x: -s / 2,
  76868. y: -s / 2,
  76869. width: s,
  76870. height: s
  76871. });
  76872. w.setStyle(m.getItemStyle());
  76873. var P = w.ensureState("emphasis");
  76874. P.style = y.getItemStyle();
  76875. var $ = new gt({
  76876. style: {
  76877. text: S[T],
  76878. align: y.get("textAlign"),
  76879. borderRadius: y.get("textBorderRadius"),
  76880. padding: y.get("textPadding"),
  76881. fill: null,
  76882. font: GR({
  76883. fontStyle: y.get("textFontStyle"),
  76884. fontFamily: y.get("textFontFamily"),
  76885. fontSize: y.get("textFontSize"),
  76886. fontWeight: y.get("textFontWeight")
  76887. }, r)
  76888. },
  76889. ignore: !0
  76890. });
  76891. w.setTextContent($), gp({
  76892. el: w,
  76893. componentModel: n,
  76894. itemName: T,
  76895. formatterParamsExtra: {
  76896. title: S[T]
  76897. }
  76898. }), w.__title = S[T], w.on("mouseover", function() {
  76899. 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";
  76900. $.setStyle({
  76901. fill: y.get("textFill") || A.fill || A.stroke || "#000",
  76902. backgroundColor: y.get("textBackgroundColor")
  76903. }), w.setTextConfig({
  76904. position: y.get("textPosition") || D
  76905. }), $.ignore = !n.get("showTitle"), i.enterEmphasis(this);
  76906. }).on("mouseout", function() {
  76907. p.get(["iconStatus", T]) !== "emphasis" && i.leaveEmphasis(this), $.hide();
  76908. }), (p.get(["iconStatus", T]) === "emphasis" ? js : Zs)(w), o.add(w), w.on("click", xe(v.onclick, v, r, i, T)), x[T] = w;
  76909. });
  76910. }
  76911. VHe(o, n, i), o.add(Qre(o.getBoundingRect(), n)), l || o.eachChild(function(p) {
  76912. var v = p.__title, g = p.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = p.getTextContent(), b = y && y.ensureState("emphasis");
  76913. if (b && !Me(b) && v) {
  76914. var _ = b.style || (b.style = {}), O = k0(v, gt.makeFont(_)), S = p.x + o.x, x = p.y + o.y + s, C = !1;
  76915. x + O.height > i.getHeight() && (m.position = "top", C = !0);
  76916. var T = C ? -5 - O.height : s + 10;
  76917. S + O.width / 2 > i.getWidth() ? (m.position = ["100%", T], _.align = "right") : S - O.width / 2 < 0 && (m.position = [0, T], _.align = "left");
  76918. }
  76919. });
  76920. }, e.prototype.updateView = function(n, r, i, a) {
  76921. k(this._features, function(o) {
  76922. o instanceof pa && o.updateView && o.updateView(o.model, r, i, a);
  76923. });
  76924. }, e.prototype.remove = function(n, r) {
  76925. k(this._features, function(i) {
  76926. i instanceof pa && i.remove && i.remove(n, r);
  76927. }), this.group.removeAll();
  76928. }, e.prototype.dispose = function(n, r) {
  76929. k(this._features, function(i) {
  76930. i instanceof pa && i.dispose && i.dispose(n, r);
  76931. });
  76932. }, e.type = "toolbox", e;
  76933. }(Xt)
  76934. );
  76935. function WHe(t) {
  76936. return t.indexOf("my") === 0;
  76937. }
  76938. var QHe = (
  76939. /** @class */
  76940. function(t) {
  76941. q(e, t);
  76942. function e() {
  76943. return t !== null && t.apply(this, arguments) || this;
  76944. }
  76945. return e.prototype.onclick = function(n, r) {
  76946. 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({
  76947. type: s,
  76948. backgroundColor: i.get("backgroundColor", !0) || n.get("backgroundColor") || "#fff",
  76949. connectedBackgroundColor: i.get("connectedBackgroundColor"),
  76950. excludeComponents: i.get("excludeComponents"),
  76951. pixelRatio: i.get("pixelRatio")
  76952. }), u = vt.browser;
  76953. if (typeof MouseEvent == "function" && (u.newEdge || !u.ie && !u.edge)) {
  76954. var c = document.createElement("a");
  76955. c.download = a + "." + s, c.target = "_blank", c.href = l;
  76956. var f = new MouseEvent("click", {
  76957. // some micro front-end framework, window maybe is a Proxy
  76958. view: document.defaultView,
  76959. bubbles: !0,
  76960. cancelable: !1
  76961. });
  76962. c.dispatchEvent(f);
  76963. } else if (window.navigator.msSaveOrOpenBlob || o) {
  76964. var d = l.split(","), h = d[0].indexOf("base64") > -1, p = o ? decodeURIComponent(d[1]) : d[1];
  76965. h && (p = window.atob(p));
  76966. var v = a + "." + s;
  76967. if (window.navigator.msSaveOrOpenBlob) {
  76968. for (var g = p.length, m = new Uint8Array(g); g--; )
  76969. m[g] = p.charCodeAt(g);
  76970. var y = new Blob([m]);
  76971. window.navigator.msSaveOrOpenBlob(y, v);
  76972. } else {
  76973. var b = document.createElement("iframe");
  76974. document.body.appendChild(b);
  76975. var _ = b.contentWindow, O = _.document;
  76976. O.open("image/svg+xml", "replace"), O.write(p), O.close(), _.focus(), O.execCommand("SaveAs", !0, v), document.body.removeChild(b);
  76977. }
  76978. } else {
  76979. 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();
  76980. C.document.write(x), C.document.title = a;
  76981. }
  76982. }, e.getDefaultOption = function(n) {
  76983. var r = {
  76984. show: !0,
  76985. 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",
  76986. title: n.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
  76987. type: "png",
  76988. // Default use option.backgroundColor
  76989. // backgroundColor: '#fff',
  76990. connectedBackgroundColor: "#fff",
  76991. name: "",
  76992. excludeComponents: ["toolbox"],
  76993. // use current pixel ratio of device by default
  76994. // pixelRatio: 1,
  76995. lang: n.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
  76996. };
  76997. return r;
  76998. }, e;
  76999. }(pa)
  77000. ), y7 = "__ec_magicType_stack__", HHe = [["line", "bar"], ["stack"]], GHe = (
  77001. /** @class */
  77002. function(t) {
  77003. q(e, t);
  77004. function e() {
  77005. return t !== null && t.apply(this, arguments) || this;
  77006. }
  77007. return e.prototype.getIcons = function() {
  77008. var n = this.model, r = n.get("icon"), i = {};
  77009. return k(n.get("type"), function(a) {
  77010. r[a] && (i[a] = r[a]);
  77011. }), i;
  77012. }, e.getDefaultOption = function(n) {
  77013. var r = {
  77014. show: !0,
  77015. type: [],
  77016. // Icon group
  77017. icon: {
  77018. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  77019. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  77020. // eslint-disable-next-line
  77021. 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"
  77022. // jshint ignore:line
  77023. },
  77024. // `line`, `bar`, `stack`, `tiled`
  77025. title: n.getLocaleModel().get(["toolbox", "magicType", "title"]),
  77026. option: {},
  77027. seriesIndex: {}
  77028. };
  77029. return r;
  77030. }, e.prototype.onclick = function(n, r, i) {
  77031. var a = this.model, o = a.get(["seriesIndex", i]);
  77032. if (b7[i]) {
  77033. var s = {
  77034. series: []
  77035. }, l = function(f) {
  77036. var d = f.subType, h = f.id, p = b7[i](d, h, f, a);
  77037. p && (Re(p, f.option), s.series.push(p));
  77038. var v = f.coordinateSystem;
  77039. if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) {
  77040. var g = v.getAxesByScale("ordinal")[0];
  77041. if (g) {
  77042. var m = g.dim, y = m + "Axis", b = f.getReferringComponents(y, Dn).models[0], _ = b.componentIndex;
  77043. s[y] = s[y] || [];
  77044. for (var O = 0; O <= _; O++)
  77045. s[y][_] = s[y][_] || {};
  77046. s[y][_].boundaryGap = i === "bar";
  77047. }
  77048. }
  77049. };
  77050. k(HHe, function(f) {
  77051. et(f, i) >= 0 && k(f, function(d) {
  77052. a.setIconStatus(d, "normal");
  77053. });
  77054. }), a.setIconStatus(i, "emphasis"), n.eachComponent({
  77055. mainType: "series",
  77056. query: o == null ? null : {
  77057. seriesIndex: o
  77058. }
  77059. }, l);
  77060. var u, c = i;
  77061. i === "stack" && (u = qe({
  77062. stack: a.option.title.tiled,
  77063. tiled: a.option.title.stack
  77064. }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), r.dispatchAction({
  77065. type: "changeMagicType",
  77066. currentType: c,
  77067. newOption: s,
  77068. newTitle: u,
  77069. featureName: "magicType"
  77070. });
  77071. }
  77072. }, e;
  77073. }(pa)
  77074. ), b7 = {
  77075. line: function(t, e, n, r) {
  77076. if (t === "bar")
  77077. return qe({
  77078. id: e,
  77079. type: "line",
  77080. // Preserve data related option
  77081. data: n.get("data"),
  77082. stack: n.get("stack"),
  77083. markPoint: n.get("markPoint"),
  77084. markLine: n.get("markLine")
  77085. }, r.get(["option", "line"]) || {}, !0);
  77086. },
  77087. bar: function(t, e, n, r) {
  77088. if (t === "line")
  77089. return qe({
  77090. id: e,
  77091. type: "bar",
  77092. // Preserve data related option
  77093. data: n.get("data"),
  77094. stack: n.get("stack"),
  77095. markPoint: n.get("markPoint"),
  77096. markLine: n.get("markLine")
  77097. }, r.get(["option", "bar"]) || {}, !0);
  77098. },
  77099. stack: function(t, e, n, r) {
  77100. var i = n.get("stack") === y7;
  77101. if (t === "line" || t === "bar")
  77102. return r.setIconStatus("stack", i ? "normal" : "emphasis"), qe({
  77103. id: e,
  77104. stack: i ? "" : y7
  77105. }, r.get(["option", "stack"]) || {}, !0);
  77106. }
  77107. };
  77108. vo({
  77109. type: "changeMagicType",
  77110. event: "magicTypeChanged",
  77111. update: "prepareAndUpdate"
  77112. }, function(t, e) {
  77113. e.mergeOption(t.newOption);
  77114. });
  77115. var xw = new Array(60).join("-"), jh = " ";
  77116. function jHe(t) {
  77117. var e = {}, n = [], r = [];
  77118. return t.eachRawSeries(function(i) {
  77119. var a = i.coordinateSystem;
  77120. if (a && (a.type === "cartesian2d" || a.type === "polar")) {
  77121. var o = a.getBaseAxis();
  77122. if (o.type === "category") {
  77123. var s = o.dim + "_" + o.index;
  77124. e[s] || (e[s] = {
  77125. categoryAxis: o,
  77126. valueAxis: a.getOtherAxis(o),
  77127. series: []
  77128. }, r.push({
  77129. axisDim: o.dim,
  77130. axisIndex: o.index
  77131. })), e[s].series.push(i);
  77132. } else
  77133. n.push(i);
  77134. } else
  77135. n.push(i);
  77136. }), {
  77137. seriesGroupByCategoryAxis: e,
  77138. other: n,
  77139. meta: r
  77140. };
  77141. }
  77142. function ZHe(t) {
  77143. var e = [];
  77144. return k(t, function(n, r) {
  77145. var i = n.categoryAxis, a = n.valueAxis, o = a.dim, s = [" "].concat(ce(n.series, function(h) {
  77146. return h.name;
  77147. })), l = [i.model.getCategories()];
  77148. k(n.series, function(h) {
  77149. var p = h.getRawData();
  77150. l.push(h.getRawData().mapArray(p.mapDimension(o), function(v) {
  77151. return v;
  77152. }));
  77153. });
  77154. for (var u = [s.join(jh)], c = 0; c < l[0].length; c++) {
  77155. for (var f = [], d = 0; d < l.length; d++)
  77156. f.push(l[d][c]);
  77157. u.push(f.join(jh));
  77158. }
  77159. e.push(u.join(`
  77160. `));
  77161. }), e.join(`
  77162. ` + xw + `
  77163. `);
  77164. }
  77165. function UHe(t) {
  77166. return ce(t, function(e) {
  77167. var n = e.getRawData(), r = [e.name], i = [];
  77168. return n.each(n.dimensions, function() {
  77169. for (var a = arguments.length, o = arguments[a - 1], s = n.getName(o), l = 0; l < a - 1; l++)
  77170. i[l] = arguments[l];
  77171. r.push((s ? s + jh : "") + i.join(jh));
  77172. }), r.join(`
  77173. `);
  77174. }).join(`
  77175. ` + xw + `
  77176. `);
  77177. }
  77178. function XHe(t) {
  77179. var e = jHe(t);
  77180. return {
  77181. value: Nt([ZHe(e.seriesGroupByCategoryAxis), UHe(e.other)], function(n) {
  77182. return !!n.replace(/[\n\t\s]/g, "");
  77183. }).join(`
  77184. ` + xw + `
  77185. `),
  77186. meta: e.meta
  77187. };
  77188. }
  77189. function WO(t) {
  77190. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
  77191. }
  77192. function YHe(t) {
  77193. var e = t.slice(0, t.indexOf(`
  77194. `));
  77195. if (e.indexOf(jh) >= 0)
  77196. return !0;
  77197. }
  77198. var DE = new RegExp("[" + jh + "]+", "g");
  77199. function qHe(t) {
  77200. for (var e = t.split(/\n+/g), n = WO(e.shift()).split(DE), r = [], i = ce(n, function(l) {
  77201. return {
  77202. name: l,
  77203. data: []
  77204. };
  77205. }), a = 0; a < e.length; a++) {
  77206. var o = WO(e[a]).split(DE);
  77207. r.push(o.shift());
  77208. for (var s = 0; s < o.length; s++)
  77209. i[s] && (i[s].data[a] = o[s]);
  77210. }
  77211. return {
  77212. series: i,
  77213. categories: r
  77214. };
  77215. }
  77216. function KHe(t) {
  77217. for (var e = t.split(/\n+/g), n = WO(e.shift()), r = [], i = 0; i < e.length; i++) {
  77218. var a = WO(e[i]);
  77219. if (a) {
  77220. var o = a.split(DE), s = "", l = void 0, u = !1;
  77221. isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), r[i] = {
  77222. name: s,
  77223. value: []
  77224. }, l = r[i].value) : l = r[i] = [];
  77225. for (var c = 0; c < o.length; c++)
  77226. l.push(+o[c]);
  77227. l.length === 1 && (u ? r[i].value = l[0] : r[i] = l[0]);
  77228. }
  77229. }
  77230. return {
  77231. name: n,
  77232. data: r
  77233. };
  77234. }
  77235. function JHe(t, e) {
  77236. var n = t.split(new RegExp(`
  77237. *` + xw + `
  77238. *`, "g")), r = {
  77239. series: []
  77240. };
  77241. return k(n, function(i, a) {
  77242. if (YHe(i)) {
  77243. var o = qHe(i), s = e[a], l = s.axisDim + "Axis";
  77244. s && (r[l] = r[l] || [], r[l][s.axisIndex] = {
  77245. data: o.categories
  77246. }, r.series = r.series.concat(o.series));
  77247. } else {
  77248. var o = KHe(i);
  77249. r.series.push(o);
  77250. }
  77251. }), r;
  77252. }
  77253. var eGe = (
  77254. /** @class */
  77255. function(t) {
  77256. q(e, t);
  77257. function e() {
  77258. return t !== null && t.apply(this, arguments) || this;
  77259. }
  77260. return e.prototype.onclick = function(n, r) {
  77261. setTimeout(function() {
  77262. r.dispatchAction({
  77263. type: "hideTip"
  77264. });
  77265. });
  77266. var i = r.getDom(), a = this.model;
  77267. this._dom && i.removeChild(this._dom);
  77268. var o = document.createElement("div");
  77269. o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff";
  77270. var s = document.createElement("h4"), l = a.get("lang") || [];
  77271. s.innerHTML = l[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor");
  77272. var u = document.createElement("div"), c = document.createElement("textarea");
  77273. u.style.cssText = "overflow:auto";
  77274. var f = a.get("optionToContent"), d = a.get("contentToOption"), h = XHe(n);
  77275. if (Me(f)) {
  77276. var p = f(r.getOption());
  77277. Oe(p) ? u.innerHTML = p : au(p) && u.appendChild(p);
  77278. } else {
  77279. c.readOnly = a.get("readOnly");
  77280. var v = c.style;
  77281. 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);
  77282. }
  77283. var g = h.meta, m = document.createElement("div");
  77284. m.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
  77285. 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");
  77286. y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor");
  77287. var O = this;
  77288. function S() {
  77289. i.removeChild(o), O._dom = null;
  77290. }
  77291. cA(b, "click", S), cA(_, "click", function() {
  77292. if (d == null && f != null || d != null && f == null) {
  77293. 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();
  77294. return;
  77295. }
  77296. var x;
  77297. try {
  77298. Me(d) ? x = d(u, r.getOption()) : x = JHe(c.value, g);
  77299. } catch (C) {
  77300. throw S(), new Error("Data view format error " + C);
  77301. }
  77302. x && r.dispatchAction({
  77303. type: "changeDataView",
  77304. newOption: x
  77305. }), S();
  77306. }), 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;
  77307. }, e.prototype.remove = function(n, r) {
  77308. this._dom && r.getDom().removeChild(this._dom);
  77309. }, e.prototype.dispose = function(n, r) {
  77310. this.remove(n, r);
  77311. }, e.getDefaultOption = function(n) {
  77312. var r = {
  77313. show: !0,
  77314. readOnly: !1,
  77315. optionToContent: null,
  77316. contentToOption: null,
  77317. // eslint-disable-next-line
  77318. 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",
  77319. title: n.getLocaleModel().get(["toolbox", "dataView", "title"]),
  77320. lang: n.getLocaleModel().get(["toolbox", "dataView", "lang"]),
  77321. backgroundColor: "#fff",
  77322. textColor: "#000",
  77323. textareaColor: "#fff",
  77324. textareaBorderColor: "#333",
  77325. buttonColor: "#c23531",
  77326. buttonTextColor: "#fff"
  77327. };
  77328. return r;
  77329. }, e;
  77330. }(pa)
  77331. );
  77332. function tGe(t, e) {
  77333. return ce(t, function(n, r) {
  77334. var i = e && e[r];
  77335. if (Ie(i) && !ue(i)) {
  77336. var a = Ie(n) && !ue(n);
  77337. a || (n = {
  77338. value: n
  77339. });
  77340. var o = i.name != null && n.name == null;
  77341. return n = Re(n, i), o && delete n.name, n;
  77342. } else
  77343. return n;
  77344. });
  77345. }
  77346. vo({
  77347. type: "changeDataView",
  77348. event: "dataViewChanged",
  77349. update: "prepareAndUpdate"
  77350. }, function(t, e) {
  77351. var n = [];
  77352. k(t.newOption.series, function(r) {
  77353. var i = e.getSeriesByName(r.name)[0];
  77354. if (!i)
  77355. n.push(le({
  77356. // Default is scatter
  77357. type: "scatter"
  77358. }, r));
  77359. else {
  77360. var a = i.get("data");
  77361. n.push({
  77362. name: r.name,
  77363. data: tGe(r.data, a)
  77364. });
  77365. }
  77366. }), e.mergeOption(Re({
  77367. series: n
  77368. }, t.newOption));
  77369. });
  77370. var Hre = k, Gre = bt();
  77371. function nGe(t, e) {
  77372. var n = xL(t);
  77373. Hre(e, function(r, i) {
  77374. for (var a = n.length - 1; a >= 0; a--) {
  77375. var o = n[a];
  77376. if (o[i])
  77377. break;
  77378. }
  77379. if (a < 0) {
  77380. var s = t.queryComponents({
  77381. mainType: "dataZoom",
  77382. subType: "select",
  77383. id: i
  77384. })[0];
  77385. if (s) {
  77386. var l = s.getPercentRange();
  77387. n[0][i] = {
  77388. dataZoomId: i,
  77389. start: l[0],
  77390. end: l[1]
  77391. };
  77392. }
  77393. }
  77394. }), n.push(e);
  77395. }
  77396. function rGe(t) {
  77397. var e = xL(t), n = e[e.length - 1];
  77398. e.length > 1 && e.pop();
  77399. var r = {};
  77400. return Hre(n, function(i, a) {
  77401. for (var o = e.length - 1; o >= 0; o--)
  77402. if (i = e[o][a], i) {
  77403. r[a] = i;
  77404. break;
  77405. }
  77406. }), r;
  77407. }
  77408. function iGe(t) {
  77409. Gre(t).snapshots = null;
  77410. }
  77411. function aGe(t) {
  77412. return xL(t).length;
  77413. }
  77414. function xL(t) {
  77415. var e = Gre(t);
  77416. return e.snapshots || (e.snapshots = [{}]), e.snapshots;
  77417. }
  77418. var oGe = (
  77419. /** @class */
  77420. function(t) {
  77421. q(e, t);
  77422. function e() {
  77423. return t !== null && t.apply(this, arguments) || this;
  77424. }
  77425. return e.prototype.onclick = function(n, r) {
  77426. iGe(n), r.dispatchAction({
  77427. type: "restore",
  77428. from: this.uid
  77429. });
  77430. }, e.getDefaultOption = function(n) {
  77431. var r = {
  77432. show: !0,
  77433. // eslint-disable-next-line
  77434. 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",
  77435. title: n.getLocaleModel().get(["toolbox", "restore", "title"])
  77436. };
  77437. return r;
  77438. }, e;
  77439. }(pa)
  77440. );
  77441. vo({
  77442. type: "restore",
  77443. event: "restore",
  77444. update: "prepareAndUpdate"
  77445. }, function(t, e) {
  77446. e.resetOption("recreate");
  77447. });
  77448. var sGe = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], wL = (
  77449. /** @class */
  77450. function() {
  77451. function t(e, n, r) {
  77452. var i = this;
  77453. this._targetInfoList = [];
  77454. var a = _7(n, e);
  77455. k(lGe, function(o, s) {
  77456. (!r || !r.include || et(r.include, s) >= 0) && o(a, i._targetInfoList);
  77457. });
  77458. }
  77459. return t.prototype.setOutputRanges = function(e, n) {
  77460. return this.matchOutputRanges(e, n, function(r, i, a) {
  77461. if ((r.coordRanges || (r.coordRanges = [])).push(i), !r.coordRange) {
  77462. r.coordRange = i;
  77463. var o = XP[r.brushType](0, a, i);
  77464. r.__rangeOffset = {
  77465. offset: w7[r.brushType](o.values, r.range, [1, 1]),
  77466. xyMinMax: o.xyMinMax
  77467. };
  77468. }
  77469. }), e;
  77470. }, t.prototype.matchOutputRanges = function(e, n, r) {
  77471. k(e, function(i) {
  77472. var a = this.findTargetInfo(i, n);
  77473. a && a !== !0 && k(a.coordSyses, function(o) {
  77474. var s = XP[i.brushType](1, o, i.range, !0);
  77475. r(i, s.values, o, n);
  77476. });
  77477. }, this);
  77478. }, t.prototype.setInputRanges = function(e, n) {
  77479. k(e, function(r) {
  77480. var i = this.findTargetInfo(r, n);
  77481. 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) {
  77482. r.panelId = i.panelId;
  77483. var a = XP[r.brushType](0, i.coordSys, r.coordRange), o = r.__rangeOffset;
  77484. r.range = o ? w7[r.brushType](a.values, o.offset, uGe(a.xyMinMax, o.xyMinMax)) : a.values;
  77485. }
  77486. }, this);
  77487. }, t.prototype.makePanelOpts = function(e, n) {
  77488. return ce(this._targetInfoList, function(r) {
  77489. var i = r.getPanelRect();
  77490. return {
  77491. panelId: r.panelId,
  77492. defaultBrushType: n ? n(r) : null,
  77493. clipPath: Kne(i),
  77494. isTargetByCursor: ere(i, e, r.coordSysModel),
  77495. getLinearBrushOtherExtent: Jne(i)
  77496. };
  77497. });
  77498. }, t.prototype.controlSeries = function(e, n, r) {
  77499. var i = this.findTargetInfo(e, r);
  77500. return i === !0 || i && et(i.coordSyses, n.coordinateSystem) >= 0;
  77501. }, t.prototype.findTargetInfo = function(e, n) {
  77502. for (var r = this._targetInfoList, i = _7(n, e), a = 0; a < r.length; a++) {
  77503. var o = r[a], s = e.panelId;
  77504. if (s) {
  77505. if (o.panelId === s)
  77506. return o;
  77507. } else
  77508. for (var l = 0; l < O7.length; l++)
  77509. if (O7[l](i, o))
  77510. return o;
  77511. }
  77512. return !0;
  77513. }, t;
  77514. }()
  77515. );
  77516. function RE(t) {
  77517. return t[0] > t[1] && t.reverse(), t;
  77518. }
  77519. function _7(t, e) {
  77520. return $g(t, e, {
  77521. includeMainTypes: sGe
  77522. });
  77523. }
  77524. var lGe = {
  77525. grid: function(t, e) {
  77526. var n = t.xAxisModels, r = t.yAxisModels, i = t.gridModels, a = Pe(), o = {}, s = {};
  77527. !n && !r && !i || (k(n, function(l) {
  77528. var u = l.axis.grid.model;
  77529. a.set(u.id, u), o[u.id] = !0;
  77530. }), k(r, function(l) {
  77531. var u = l.axis.grid.model;
  77532. a.set(u.id, u), s[u.id] = !0;
  77533. }), k(i, function(l) {
  77534. a.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
  77535. }), a.each(function(l) {
  77536. var u = l.coordinateSystem, c = [];
  77537. k(u.getCartesians(), function(f, d) {
  77538. (et(n, f.getAxis("x").model) >= 0 || et(r, f.getAxis("y").model) >= 0) && c.push(f);
  77539. }), e.push({
  77540. panelId: "grid--" + l.id,
  77541. gridModel: l,
  77542. coordSysModel: l,
  77543. // Use the first one as the representitive coordSys.
  77544. coordSys: c[0],
  77545. coordSyses: c,
  77546. getPanelRect: S7.grid,
  77547. xAxisDeclared: o[l.id],
  77548. yAxisDeclared: s[l.id]
  77549. });
  77550. }));
  77551. },
  77552. geo: function(t, e) {
  77553. k(t.geoModels, function(n) {
  77554. var r = n.coordinateSystem;
  77555. e.push({
  77556. panelId: "geo--" + n.id,
  77557. geoModel: n,
  77558. coordSysModel: n,
  77559. coordSys: r,
  77560. coordSyses: [r],
  77561. getPanelRect: S7.geo
  77562. });
  77563. });
  77564. }
  77565. }, O7 = [
  77566. // grid
  77567. function(t, e) {
  77568. var n = t.xAxisModel, r = t.yAxisModel, i = t.gridModel;
  77569. return !i && n && (i = n.axis.grid.model), !i && r && (i = r.axis.grid.model), i && i === e.gridModel;
  77570. },
  77571. // geo
  77572. function(t, e) {
  77573. var n = t.geoModel;
  77574. return n && n === e.geoModel;
  77575. }
  77576. ], S7 = {
  77577. grid: function() {
  77578. return this.coordSys.master.getRect().clone();
  77579. },
  77580. geo: function() {
  77581. var t = this.coordSys, e = t.getBoundingRect().clone();
  77582. return e.applyTransform(ql(t)), e;
  77583. }
  77584. }, XP = {
  77585. lineX: Ue(x7, 0),
  77586. lineY: Ue(x7, 1),
  77587. rect: function(t, e, n, r) {
  77588. 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 = [RE([i[0], a[0]]), RE([i[1], a[1]])];
  77589. return {
  77590. values: o,
  77591. xyMinMax: o
  77592. };
  77593. },
  77594. polygon: function(t, e, n, r) {
  77595. var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = ce(n, function(o) {
  77596. var s = t ? e.pointToData(o, r) : e.dataToPoint(o, r);
  77597. 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;
  77598. });
  77599. return {
  77600. values: a,
  77601. xyMinMax: i
  77602. };
  77603. }
  77604. };
  77605. function x7(t, e, n, r) {
  77606. process.env.NODE_ENV !== "production" && ke(n.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
  77607. var i = n.getAxis(["x", "y"][t]), a = RE(ce([0, 1], function(s) {
  77608. return e ? i.coordToData(i.toLocalCoord(r[s]), !0) : i.toGlobalCoord(i.dataToCoord(r[s]));
  77609. })), o = [];
  77610. return o[t] = a, o[1 - t] = [NaN, NaN], {
  77611. values: a,
  77612. xyMinMax: o
  77613. };
  77614. }
  77615. var w7 = {
  77616. lineX: Ue(C7, 0),
  77617. lineY: Ue(C7, 1),
  77618. rect: function(t, e, n) {
  77619. 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]]];
  77620. },
  77621. polygon: function(t, e, n) {
  77622. return ce(t, function(r, i) {
  77623. return [r[0] - n[0] * e[i][0], r[1] - n[1] * e[i][1]];
  77624. });
  77625. }
  77626. };
  77627. function C7(t, e, n, r) {
  77628. return [e[0] - r[t] * n[0], e[1] - r[t] * n[1]];
  77629. }
  77630. function uGe(t, e) {
  77631. var n = T7(t), r = T7(e), i = [n[0] / r[0], n[1] / r[1]];
  77632. return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i;
  77633. }
  77634. function T7(t) {
  77635. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN];
  77636. }
  77637. var kE = k, cGe = XDe("toolbox-dataZoom_"), fGe = (
  77638. /** @class */
  77639. function(t) {
  77640. q(e, t);
  77641. function e() {
  77642. return t !== null && t.apply(this, arguments) || this;
  77643. }
  77644. return e.prototype.render = function(n, r, i, a) {
  77645. this._brushController || (this._brushController = new Jk(i.getZr()), this._brushController.on("brush", xe(this._onBrush, this)).mount()), pGe(n, r, this, a, i), hGe(n, r);
  77646. }, e.prototype.onclick = function(n, r, i) {
  77647. dGe[i].call(this);
  77648. }, e.prototype.remove = function(n, r) {
  77649. this._brushController && this._brushController.unmount();
  77650. }, e.prototype.dispose = function(n, r) {
  77651. this._brushController && this._brushController.dispose();
  77652. }, e.prototype._onBrush = function(n) {
  77653. var r = n.areas;
  77654. if (!n.isEnd || !r.length)
  77655. return;
  77656. var i = {}, a = this.ecModel;
  77657. this._brushController.updateCovers([]);
  77658. var o = new wL(CL(this.model), a, {
  77659. include: ["grid"]
  77660. });
  77661. o.matchOutputRanges(r, a, function(u, c, f) {
  77662. if (f.type === "cartesian2d") {
  77663. var d = u.brushType;
  77664. d === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({
  77665. lineX: "x",
  77666. lineY: "y"
  77667. }[d], f, c);
  77668. }
  77669. }), nGe(a, i), this._dispatchZoomAction(i);
  77670. function s(u, c, f) {
  77671. var d = c.getAxis(u), h = d.model, p = l(u, h, a), v = p.findRepresentativeAxisProxy(h).getMinMaxSpan();
  77672. (v.minValueSpan != null || v.maxValueSpan != null) && (f = Qf(0, f.slice(), d.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), p && (i[p.id] = {
  77673. dataZoomId: p.id,
  77674. startValue: f[0],
  77675. endValue: f[1]
  77676. });
  77677. }
  77678. function l(u, c, f) {
  77679. var d;
  77680. return f.eachComponent({
  77681. mainType: "dataZoom",
  77682. subType: "select"
  77683. }, function(h) {
  77684. var p = h.getAxisModel(u, c.componentIndex);
  77685. p && (d = h);
  77686. }), d;
  77687. }
  77688. }, e.prototype._dispatchZoomAction = function(n) {
  77689. var r = [];
  77690. kE(n, function(i, a) {
  77691. r.push(Le(i));
  77692. }), r.length && this.api.dispatchAction({
  77693. type: "dataZoom",
  77694. from: this.uid,
  77695. batch: r
  77696. });
  77697. }, e.getDefaultOption = function(n) {
  77698. var r = {
  77699. show: !0,
  77700. filterMode: "filter",
  77701. // Icon group
  77702. icon: {
  77703. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  77704. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  77705. },
  77706. // `zoom`, `back`
  77707. title: n.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
  77708. brushStyle: {
  77709. borderWidth: 0,
  77710. color: "rgba(210,219,238,0.2)"
  77711. }
  77712. };
  77713. return r;
  77714. }, e;
  77715. }(pa)
  77716. ), dGe = {
  77717. zoom: function() {
  77718. var t = !this._isZoomActive;
  77719. this.api.dispatchAction({
  77720. type: "takeGlobalCursor",
  77721. key: "dataZoomSelect",
  77722. dataZoomSelectActive: t
  77723. });
  77724. },
  77725. back: function() {
  77726. this._dispatchZoomAction(rGe(this.ecModel));
  77727. }
  77728. };
  77729. function CL(t) {
  77730. var e = {
  77731. xAxisIndex: t.get("xAxisIndex", !0),
  77732. yAxisIndex: t.get("yAxisIndex", !0),
  77733. xAxisId: t.get("xAxisId", !0),
  77734. yAxisId: t.get("yAxisId", !0)
  77735. };
  77736. return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
  77737. }
  77738. function hGe(t, e) {
  77739. t.setIconStatus("back", aGe(e) > 1 ? "emphasis" : "normal");
  77740. }
  77741. function pGe(t, e, n, r, i) {
  77742. var a = n._isZoomActive;
  77743. r && r.type === "takeGlobalCursor" && (a = r.key === "dataZoomSelect" ? r.dataZoomSelectActive : !1), n._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
  77744. var o = new wL(CL(t), e, {
  77745. include: ["grid"]
  77746. }), s = o.makePanelOpts(i, function(l) {
  77747. return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
  77748. });
  77749. n._brushController.setPanels(s).enableBrush(a && s.length ? {
  77750. brushType: "auto",
  77751. brushStyle: t.getModel("brushStyle").getItemStyle()
  77752. } : !1);
  77753. }
  77754. xLe("dataZoom", function(t) {
  77755. var e = t.getComponent("toolbox", 0), n = ["feature", "dataZoom"];
  77756. if (!e || e.get(n) == null)
  77757. return;
  77758. var r = e.getModel(n), i = [], a = CL(r), o = $g(t, a);
  77759. kE(o.xAxisModels, function(l) {
  77760. return s(l, "xAxis", "xAxisIndex");
  77761. }), kE(o.yAxisModels, function(l) {
  77762. return s(l, "yAxis", "yAxisIndex");
  77763. });
  77764. function s(l, u, c) {
  77765. var f = l.componentIndex, d = {
  77766. type: "select",
  77767. $fromToolbox: !0,
  77768. // Default to be filter
  77769. filterMode: r.get("filterMode", !0) || "filter",
  77770. // Id for merge mapping.
  77771. id: cGe + u + f
  77772. };
  77773. d[c] = f, i.push(d);
  77774. }
  77775. return i;
  77776. });
  77777. function vGe(t) {
  77778. t.registerComponentModel(zHe), t.registerComponentView(FHe), Id("saveAsImage", QHe), Id("magicType", GHe), Id("dataView", eGe), Id("dataZoom", fGe), Id("restore", oGe), at(BHe);
  77779. }
  77780. var gGe = (
  77781. /** @class */
  77782. function(t) {
  77783. q(e, t);
  77784. function e() {
  77785. var n = t !== null && t.apply(this, arguments) || this;
  77786. return n.type = e.type, n;
  77787. }
  77788. return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
  77789. // zlevel: 0,
  77790. z: 60,
  77791. show: !0,
  77792. // tooltip main content
  77793. showContent: !0,
  77794. // 'trigger' only works on coordinate system.
  77795. // 'item' | 'axis' | 'none'
  77796. trigger: "item",
  77797. // 'click' | 'mousemove' | 'none'
  77798. triggerOn: "mousemove|click",
  77799. alwaysShowContent: !1,
  77800. displayMode: "single",
  77801. renderMode: "auto",
  77802. // whether restraint content inside viewRect.
  77803. // If renderMode: 'richText', default true.
  77804. // If renderMode: 'html', defaut false (for backward compat).
  77805. confine: null,
  77806. showDelay: 0,
  77807. hideDelay: 100,
  77808. // Animation transition time, unit is second
  77809. transitionDuration: 0.4,
  77810. enterable: !1,
  77811. backgroundColor: "#fff",
  77812. // box shadow
  77813. shadowBlur: 10,
  77814. shadowColor: "rgba(0, 0, 0, .2)",
  77815. shadowOffsetX: 1,
  77816. shadowOffsetY: 2,
  77817. // tooltip border radius, unit is px, default is 4
  77818. borderRadius: 4,
  77819. // tooltip border width, unit is px, default is 0 (no border)
  77820. borderWidth: 1,
  77821. // Tooltip inside padding, default is 5 for all direction
  77822. // Array is allowed to set up, right, bottom, left, same with css
  77823. // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
  77824. padding: null,
  77825. // Extra css text
  77826. extraCssText: "",
  77827. // axis indicator, trigger by axis
  77828. axisPointer: {
  77829. // default is line
  77830. // legal values: 'line' | 'shadow' | 'cross'
  77831. type: "line",
  77832. // Valid when type is line, appoint tooltip line locate on which line. Optional
  77833. // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
  77834. // default is 'auto', chose the axis which type is category.
  77835. // for multiply y axis, cartesian coord chose x axis, polar chose angle axis
  77836. axis: "auto",
  77837. animation: "auto",
  77838. animationDurationUpdate: 200,
  77839. animationEasingUpdate: "exponentialOut",
  77840. crossStyle: {
  77841. color: "#999",
  77842. width: 1,
  77843. type: "dashed",
  77844. // TODO formatter
  77845. textStyle: {}
  77846. }
  77847. // lineStyle and shadowStyle should not be specified here,
  77848. // otherwise it will always override those styles on option.axisPointer.
  77849. },
  77850. textStyle: {
  77851. color: "#666",
  77852. fontSize: 14
  77853. }
  77854. }, e;
  77855. }(rt)
  77856. );
  77857. function jre(t) {
  77858. var e = t.get("confine");
  77859. return e != null ? !!e : t.get("renderMode") === "richText";
  77860. }
  77861. function Zre(t) {
  77862. if (vt.domSupported) {
  77863. for (var e = document.documentElement.style, n = 0, r = t.length; n < r; n++)
  77864. if (t[n] in e)
  77865. return t[n];
  77866. }
  77867. }
  77868. var Ure = Zre(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), mGe = Zre(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
  77869. function Xre(t, e) {
  77870. if (!t)
  77871. return e;
  77872. e = JR(e, !0);
  77873. var n = t.indexOf(e);
  77874. return t = n === -1 ? e : "-" + t.slice(0, n) + "-" + e, t.toLowerCase();
  77875. }
  77876. function yGe(t, e) {
  77877. var n = t.currentStyle || document.defaultView && document.defaultView.getComputedStyle(t);
  77878. return n ? n[e] : null;
  77879. }
  77880. var bGe = Xre(mGe, "transition"), TL = Xre(Ure, "transform"), _Ge = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (vt.transform3dSupported ? "will-change:transform;" : "");
  77881. function OGe(t) {
  77882. return t = t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", t;
  77883. }
  77884. function SGe(t, e, n) {
  77885. if (!Oe(n) || n === "inside")
  77886. return "";
  77887. var r = t.get("backgroundColor"), i = t.get("borderWidth");
  77888. e = _f(e);
  77889. var a = OGe(n), o = Math.max(Math.round(i) * 1.5, 6), s = "", l = TL + ":", u;
  77890. 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)");
  77891. 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;
  77892. s += ";" + a + ":-" + h + "px";
  77893. 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 + ";"];
  77894. return '<div style="' + v.join("") + '"></div>';
  77895. }
  77896. function xGe(t, e) {
  77897. var n = "cubic-bezier(0.23,1,0.32,1)", r = " " + t / 2 + "s " + n, i = "opacity" + r + ",visibility" + r;
  77898. return e || (r = " " + t + "s " + n, i += vt.transformSupported ? "," + TL + r : ",left" + r + ",top" + r), bGe + ":" + i;
  77899. }
  77900. function P7(t, e, n) {
  77901. var r = t.toFixed(0) + "px", i = e.toFixed(0) + "px";
  77902. if (!vt.transformSupported)
  77903. return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
  77904. var a = vt.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
  77905. return n ? "top:0;left:0;" + TL + ":" + o + ";" : [["top", 0], ["left", 0], [Ure, o]];
  77906. }
  77907. function wGe(t) {
  77908. var e = [], n = t.get("fontSize"), r = t.getTextColor();
  77909. r && e.push("color:" + r), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(n * 3 / 2) + "px");
  77910. var i = t.get("textShadowColor"), a = t.get("textShadowBlur") || 0, o = t.get("textShadowOffsetX") || 0, s = t.get("textShadowOffsetY") || 0;
  77911. return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), k(["decoration", "align"], function(l) {
  77912. var u = t.get(l);
  77913. u && e.push("text-" + l + ":" + u);
  77914. }), e.join(";");
  77915. }
  77916. function CGe(t, e, n) {
  77917. 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 = ree(t, "html"), d = l + "px " + u + "px " + o + "px " + s;
  77918. return r.push("box-shadow:" + d), e && i && r.push(xGe(i, n)), a && r.push("background-color:" + a), k(["width", "color", "radius"], function(h) {
  77919. var p = "border-" + h, v = JR(p), g = t.get(v);
  77920. g != null && r.push(p + ":" + g + (h === "color" ? "" : "px"));
  77921. }), r.push(wGe(c)), f != null && r.push("padding:" + Bf(f).join("px ") + "px"), r.join(";") + ";";
  77922. }
  77923. function $7(t, e, n, r, i) {
  77924. var a = e && e.painter;
  77925. if (n) {
  77926. var o = a && a.getViewportRoot();
  77927. o && yIe(t, o, n, r, i);
  77928. } else {
  77929. t[0] = r, t[1] = i;
  77930. var s = a && a.getViewportRootOffset();
  77931. s && (t[0] += s.offsetLeft, t[1] += s.offsetTop);
  77932. }
  77933. t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
  77934. }
  77935. var TGe = (
  77936. /** @class */
  77937. function() {
  77938. function t(e, n) {
  77939. if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, vt.wxa)
  77940. return null;
  77941. var r = document.createElement("div");
  77942. r.domBelongToZr = !0, this.el = r;
  77943. var i = this._zr = e.getZr(), a = n.appendTo, o = a && (Oe(a) ? document.querySelector(a) : au(a) ? a : Me(a) && a(e.getDom()));
  77944. $7(this._styleCoord, i, o, e.getWidth() / 2, e.getHeight() / 2), (o || e.getDom()).appendChild(r), this._api = e, this._container = o;
  77945. var s = this;
  77946. r.onmouseenter = function() {
  77947. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
  77948. }, r.onmousemove = function(l) {
  77949. if (l = l || window.event, !s._enterable) {
  77950. var u = i.handler, c = i.painter.getViewportRoot();
  77951. sa(c, l, !0), u.dispatch("mousemove", l);
  77952. }
  77953. }, r.onmouseleave = function() {
  77954. s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
  77955. };
  77956. }
  77957. return t.prototype.update = function(e) {
  77958. if (!this._container) {
  77959. var n = this._api.getDom(), r = yGe(n, "position"), i = n.style;
  77960. i.position !== "absolute" && r !== "absolute" && (i.position = "relative");
  77961. }
  77962. var a = e.get("alwaysShowContent");
  77963. a && this._moveIfResized(), this._alwaysShowContent = a, this.el.className = e.get("className") || "";
  77964. }, t.prototype.show = function(e, n) {
  77965. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  77966. var r = this.el, i = r.style, a = this._styleCoord;
  77967. r.innerHTML ? i.cssText = _Ge + CGe(e, !this._firstShow, this._longHide) + P7(a[0], a[1], !0) + ("border-color:" + _f(n) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
  77968. }, t.prototype.setContent = function(e, n, r, i, a) {
  77969. var o = this.el;
  77970. if (e == null) {
  77971. o.innerHTML = "";
  77972. return;
  77973. }
  77974. var s = "";
  77975. if (Oe(a) && r.get("trigger") === "item" && !jre(r) && (s = SGe(r, i, a)), Oe(e))
  77976. o.innerHTML = e + s;
  77977. else if (e) {
  77978. o.innerHTML = "", ue(e) || (e = [e]);
  77979. for (var l = 0; l < e.length; l++)
  77980. au(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
  77981. if (s && o.childNodes.length) {
  77982. var u = document.createElement("div");
  77983. u.innerHTML = s, o.appendChild(u);
  77984. }
  77985. }
  77986. }, t.prototype.setEnterable = function(e) {
  77987. this._enterable = e;
  77988. }, t.prototype.getSize = function() {
  77989. var e = this.el;
  77990. return [e.offsetWidth, e.offsetHeight];
  77991. }, t.prototype.moveTo = function(e, n) {
  77992. var r = this._styleCoord;
  77993. if ($7(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
  77994. var i = this.el.style, a = P7(r[0], r[1]);
  77995. k(a, function(o) {
  77996. i[o[0]] = o[1];
  77997. });
  77998. }
  77999. }, t.prototype._moveIfResized = function() {
  78000. var e = this._styleCoord[2], n = this._styleCoord[3];
  78001. this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
  78002. }, t.prototype.hide = function() {
  78003. var e = this, n = this.el.style;
  78004. n.visibility = "hidden", n.opacity = "0", vt.transform3dSupported && (n.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
  78005. return e._longHide = !0;
  78006. }, 500);
  78007. }, t.prototype.hideLater = function(e) {
  78008. 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());
  78009. }, t.prototype.isShow = function() {
  78010. return this._show;
  78011. }, t.prototype.dispose = function() {
  78012. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  78013. var e = this.el.parentNode;
  78014. e && e.removeChild(this.el), this.el = this._container = null;
  78015. }, t;
  78016. }()
  78017. ), PGe = (
  78018. /** @class */
  78019. function() {
  78020. function t(e) {
  78021. this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), E7(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
  78022. }
  78023. return t.prototype.update = function(e) {
  78024. var n = e.get("alwaysShowContent");
  78025. n && this._moveIfResized(), this._alwaysShowContent = n;
  78026. }, t.prototype.show = function() {
  78027. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
  78028. }, t.prototype.setContent = function(e, n, r, i, a) {
  78029. var o = this;
  78030. 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);
  78031. var s = r.getModel("textStyle");
  78032. this.el = new gt({
  78033. style: {
  78034. rich: n.richTextStyles,
  78035. text: e,
  78036. lineHeight: 22,
  78037. borderWidth: 1,
  78038. borderColor: i,
  78039. textShadowColor: s.get("textShadowColor"),
  78040. fill: r.get(["textStyle", "color"]),
  78041. padding: ree(r, "richText"),
  78042. verticalAlign: "top",
  78043. align: "left"
  78044. },
  78045. z: r.get("z")
  78046. }), k(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
  78047. o.el.style[u] = r.get(u);
  78048. }), k(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
  78049. o.el.style[u] = s.get(u) || 0;
  78050. }), this._zr.add(this.el);
  78051. var l = this;
  78052. this.el.on("mouseover", function() {
  78053. l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
  78054. }), this.el.on("mouseout", function() {
  78055. l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
  78056. });
  78057. }, t.prototype.setEnterable = function(e) {
  78058. this._enterable = e;
  78059. }, t.prototype.getSize = function() {
  78060. var e = this.el, n = this.el.getBoundingRect(), r = A7(e.style);
  78061. return [n.width + r.left + r.right, n.height + r.top + r.bottom];
  78062. }, t.prototype.moveTo = function(e, n) {
  78063. var r = this.el;
  78064. if (r) {
  78065. var i = this._styleCoord;
  78066. E7(i, this._zr, e, n), e = i[0], n = i[1];
  78067. var a = r.style, o = xl(a.borderWidth || 0), s = A7(a);
  78068. r.x = e + o + s.left, r.y = n + o + s.top, r.markRedraw();
  78069. }
  78070. }, t.prototype._moveIfResized = function() {
  78071. var e = this._styleCoord[2], n = this._styleCoord[3];
  78072. this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
  78073. }, t.prototype.hide = function() {
  78074. this.el && this.el.hide(), this._show = !1;
  78075. }, t.prototype.hideLater = function(e) {
  78076. 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());
  78077. }, t.prototype.isShow = function() {
  78078. return this._show;
  78079. }, t.prototype.dispose = function() {
  78080. this._zr.remove(this.el);
  78081. }, t;
  78082. }()
  78083. );
  78084. function xl(t) {
  78085. return Math.max(0, t);
  78086. }
  78087. function A7(t) {
  78088. var e = xl(t.shadowBlur || 0), n = xl(t.shadowOffsetX || 0), r = xl(t.shadowOffsetY || 0);
  78089. return {
  78090. left: xl(e - n),
  78091. right: xl(e + n),
  78092. top: xl(e - r),
  78093. bottom: xl(e + r)
  78094. };
  78095. }
  78096. function E7(t, e, n, r) {
  78097. t[0] = n, t[1] = r, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
  78098. }
  78099. var $Ge = new mt({
  78100. shape: {
  78101. x: -1,
  78102. y: -1,
  78103. width: 2,
  78104. height: 2
  78105. }
  78106. }), AGe = (
  78107. /** @class */
  78108. function(t) {
  78109. q(e, t);
  78110. function e() {
  78111. var n = t !== null && t.apply(this, arguments) || this;
  78112. return n.type = e.type, n;
  78113. }
  78114. return e.prototype.init = function(n, r) {
  78115. if (!(vt.node || !r.getDom())) {
  78116. var i = n.getComponent("tooltip"), a = this._renderMode = nRe(i.get("renderMode"));
  78117. this._tooltipContent = a === "richText" ? new PGe(r) : new TGe(r, {
  78118. appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
  78119. });
  78120. }
  78121. }, e.prototype.render = function(n, r, i) {
  78122. if (!(vt.node || !i.getDom())) {
  78123. this.group.removeAll(), this._tooltipModel = n, this._ecModel = r, this._api = i;
  78124. var a = this._tooltipContent;
  78125. a.update(n), a.setEnterable(n.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && n.get("transitionDuration") ? Sp(this, "_updatePosition", 50, "fixRate") : $m(this, "_updatePosition");
  78126. }
  78127. }, e.prototype._initGlobalListener = function() {
  78128. var n = this._tooltipModel, r = n.get("triggerOn");
  78129. Dre("itemTooltip", this._api, xe(function(i, a, o) {
  78130. r !== "none" && (r.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o));
  78131. }, this));
  78132. }, e.prototype._keepShow = function() {
  78133. var n = this._tooltipModel, r = this._ecModel, i = this._api, a = n.get("triggerOn");
  78134. if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") {
  78135. var o = this;
  78136. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
  78137. !i.isDisposed() && o.manuallyShowTip(n, r, i, {
  78138. x: o._lastX,
  78139. y: o._lastY,
  78140. dataByCoordSys: o._lastDataByCoordSys
  78141. });
  78142. });
  78143. }
  78144. }, e.prototype.manuallyShowTip = function(n, r, i, a) {
  78145. if (!(a.from === this.uid || vt.node || !i.getDom())) {
  78146. var o = M7(a, i);
  78147. this._ticket = "";
  78148. var s = a.dataByCoordSys, l = DGe(a, r, i);
  78149. if (l) {
  78150. var u = l.el.getBoundingRect().clone();
  78151. u.applyTransform(l.el.transform), this._tryShow({
  78152. offsetX: u.x + u.width / 2,
  78153. offsetY: u.y + u.height / 2,
  78154. target: l.el,
  78155. position: a.position,
  78156. // When manully trigger, the mouse is not on the el, so we'd better to
  78157. // position tooltip on the bottom of the el and display arrow is possible.
  78158. positionDefault: "bottom"
  78159. }, o);
  78160. } else if (a.tooltip && a.x != null && a.y != null) {
  78161. var c = $Ge;
  78162. c.x = a.x, c.y = a.y, c.update(), Fe(c).tooltipConfig = {
  78163. name: null,
  78164. option: a.tooltip
  78165. }, this._tryShow({
  78166. offsetX: a.x,
  78167. offsetY: a.y,
  78168. target: c
  78169. }, o);
  78170. } else if (s)
  78171. this._tryShow({
  78172. offsetX: a.x,
  78173. offsetY: a.y,
  78174. position: a.position,
  78175. dataByCoordSys: s,
  78176. tooltipOption: a.tooltipOption
  78177. }, o);
  78178. else if (a.seriesIndex != null) {
  78179. if (this._manuallyAxisShowTip(n, r, i, a))
  78180. return;
  78181. var f = Rre(a, r), d = f.point[0], h = f.point[1];
  78182. d != null && h != null && this._tryShow({
  78183. offsetX: d,
  78184. offsetY: h,
  78185. target: f.el,
  78186. position: a.position,
  78187. // When manully trigger, the mouse is not on the el, so we'd better to
  78188. // position tooltip on the bottom of the el and display arrow is possible.
  78189. positionDefault: "bottom"
  78190. }, o);
  78191. } else a.x != null && a.y != null && (i.dispatchAction({
  78192. type: "updateAxisPointer",
  78193. x: a.x,
  78194. y: a.y
  78195. }), this._tryShow({
  78196. offsetX: a.x,
  78197. offsetY: a.y,
  78198. position: a.position,
  78199. target: i.getZr().findHover(a.x, a.y).target
  78200. }, o));
  78201. }
  78202. }, e.prototype.manuallyHideTip = function(n, r, i, a) {
  78203. var o = this._tooltipContent;
  78204. this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(M7(a, i));
  78205. }, e.prototype._manuallyAxisShowTip = function(n, r, i, a) {
  78206. var o = a.seriesIndex, s = a.dataIndex, l = r.getComponent("axisPointer").coordSysAxesInfo;
  78207. if (!(o == null || s == null || l == null)) {
  78208. var u = r.getSeriesByIndex(o);
  78209. if (u) {
  78210. var c = u.getData(), f = Ov([c.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
  78211. if (f.get("trigger") === "axis")
  78212. return i.dispatchAction({
  78213. type: "updateAxisPointer",
  78214. seriesIndex: o,
  78215. dataIndex: s,
  78216. position: a.position
  78217. }), !0;
  78218. }
  78219. }
  78220. }, e.prototype._tryShow = function(n, r) {
  78221. var i = n.target, a = this._tooltipModel;
  78222. if (a) {
  78223. this._lastX = n.offsetX, this._lastY = n.offsetY;
  78224. var o = n.dataByCoordSys;
  78225. if (o && o.length)
  78226. this._showAxisTooltip(o, n);
  78227. else if (i) {
  78228. var s = Fe(i);
  78229. if (s.ssrType === "legend")
  78230. return;
  78231. this._lastDataByCoordSys = null;
  78232. var l, u;
  78233. Bc(i, function(c) {
  78234. if (Fe(c).dataIndex != null)
  78235. return l = c, !0;
  78236. if (Fe(c).tooltipConfig != null)
  78237. return u = c, !0;
  78238. }, !0), l ? this._showSeriesItemTooltip(n, l, r) : u ? this._showComponentItemTooltip(n, u, r) : this._hide(r);
  78239. } else
  78240. this._lastDataByCoordSys = null, this._hide(r);
  78241. }
  78242. }, e.prototype._showOrMove = function(n, r) {
  78243. var i = n.get("showDelay");
  78244. r = xe(r, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(r, i) : r();
  78245. }, e.prototype._showAxisTooltip = function(n, r) {
  78246. var i = this._ecModel, a = this._tooltipModel, o = [r.offsetX, r.offsetY], s = Ov([r.tooltipOption], a), l = this._renderMode, u = [], c = tr("section", {
  78247. blocks: [],
  78248. noHeader: !0
  78249. }), f = [], d = new DT();
  78250. k(n, function(y) {
  78251. k(y.dataByAxis, function(b) {
  78252. var _ = i.getComponent(b.axisDim + "Axis", b.axisIndex), O = b.value;
  78253. if (!(!_ || O == null)) {
  78254. var S = Ere(O, _.axis, i, b.seriesDataIndices, b.valueLabelOpt), x = tr("section", {
  78255. header: S,
  78256. noHeader: !ma(S),
  78257. sortBlocks: !0,
  78258. blocks: []
  78259. });
  78260. c.blocks.push(x), k(b.seriesDataIndices, function(C) {
  78261. var T = i.getSeriesByIndex(C.seriesIndex), w = C.dataIndexInside, P = T.getDataParams(w);
  78262. if (!(P.dataIndex < 0)) {
  78263. P.axisDim = b.axisDim, P.axisIndex = b.axisIndex, P.axisType = b.axisType, P.axisId = b.axisId, P.axisValue = Pk(_.axis, {
  78264. value: O
  78265. }), P.axisValueLabel = S, P.marker = d.makeTooltipMarker("item", _f(P.color), l);
  78266. var $ = pz(T.formatTooltip(w, !0, null)), A = $.frag;
  78267. if (A) {
  78268. var D = Ov([T], a).get("valueFormatter");
  78269. x.blocks.push(D ? le({
  78270. valueFormatter: D
  78271. }, A) : A);
  78272. }
  78273. $.text && f.push($.text), u.push(P);
  78274. }
  78275. });
  78276. }
  78277. });
  78278. }), c.blocks.reverse(), f.reverse();
  78279. var h = r.position, p = s.get("order"), v = _z(c, d, l, p, i.get("useUTC"), s.get("textStyle"));
  78280. v && f.unshift(v);
  78281. var g = l === "richText" ? `
  78282. ` : "<br/>", m = f.join(g);
  78283. this._showOrMove(s, function() {
  78284. 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);
  78285. });
  78286. }, e.prototype._showSeriesItemTooltip = function(n, r, i) {
  78287. 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 = Ov([d.getItemModel(c), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
  78288. position: p
  78289. } : null), g = v.get("trigger");
  78290. if (!(g != null && g !== "item")) {
  78291. var m = u.getDataParams(c, f), y = new DT();
  78292. m.marker = y.makeTooltipMarker("item", _f(m.color), h);
  78293. var b = pz(u.formatTooltip(c, !1, f)), _ = v.get("order"), O = v.get("valueFormatter"), S = b.frag, x = S ? _z(O ? le({
  78294. valueFormatter: O
  78295. }, S) : S, y, h, _, a.get("useUTC"), v.get("textStyle")) : b.text, C = "item_" + u.name + "_" + c;
  78296. this._showOrMove(v, function() {
  78297. this._showTooltipContent(v, x, m, C, n.offsetX, n.offsetY, n.position, n.target, y);
  78298. }), i({
  78299. type: "showTip",
  78300. dataIndexInside: c,
  78301. dataIndex: d.getRawIndex(c),
  78302. seriesIndex: s,
  78303. from: this.uid
  78304. });
  78305. }
  78306. }, e.prototype._showComponentItemTooltip = function(n, r, i) {
  78307. var a = this._renderMode === "html", o = Fe(r), s = o.tooltipConfig, l = s.option || {}, u = l.encodeHTMLContent;
  78308. if (Oe(l)) {
  78309. var c = l;
  78310. l = {
  78311. content: c,
  78312. // Fixed formatter
  78313. formatter: c
  78314. }, u = !0;
  78315. }
  78316. u && a && l.content && (l = Le(l), l.content = Gr(l.content));
  78317. var f = [l], d = this._ecModel.getComponent(o.componentMainType, o.componentIndex);
  78318. d && f.push(d), f.push({
  78319. formatter: l.content
  78320. });
  78321. var h = n.positionDefault, p = Ov(f, this._tooltipModel, h ? {
  78322. position: h
  78323. } : null), v = p.get("content"), g = Math.random() + "", m = new DT();
  78324. this._showOrMove(p, function() {
  78325. var y = Le(p.get("formatterParams") || {});
  78326. this._showTooltipContent(p, v, y, g, n.offsetX, n.offsetY, n.position, r, m);
  78327. }), i({
  78328. type: "showTip",
  78329. from: this.uid
  78330. });
  78331. }, e.prototype._showTooltipContent = function(n, r, i, a, o, s, l, u, c) {
  78332. if (this._ticket = "", !(!n.get("showContent") || !n.get("show"))) {
  78333. var f = this._tooltipContent;
  78334. f.setEnterable(n.get("enterable"));
  78335. var d = n.get("formatter");
  78336. l = l || n.get("position");
  78337. var h = r, p = this._getNearestPoint([o, s], i, n.get("trigger"), n.get("borderColor")), v = p.color;
  78338. if (d)
  78339. if (Oe(d)) {
  78340. var g = n.ecModel.get("useUTC"), m = ue(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0;
  78341. h = d, y && (h = Q0(m.axisValue, h, g)), h = ek(h, i, !0);
  78342. } else if (Me(d)) {
  78343. var b = xe(function(_, O) {
  78344. _ === this._ticket && (f.setContent(O, c, n, v, l), this._updatePosition(n, l, o, s, f, i, u));
  78345. }, this);
  78346. this._ticket = a, h = d(i, a, b);
  78347. } else
  78348. h = d;
  78349. f.setContent(h, c, n, v, l), f.show(n, v), this._updatePosition(n, l, o, s, f, i, u);
  78350. }
  78351. }, e.prototype._getNearestPoint = function(n, r, i, a) {
  78352. if (i === "axis" || ue(r))
  78353. return {
  78354. color: a || (this._renderMode === "html" ? "#fff" : "none")
  78355. };
  78356. if (!ue(r))
  78357. return {
  78358. color: a || r.color || r.borderColor
  78359. };
  78360. }, e.prototype._updatePosition = function(n, r, i, a, o, s, l) {
  78361. var u = this._api.getWidth(), c = this._api.getHeight();
  78362. r = r || n.get("position");
  78363. var f = o.getSize(), d = n.get("align"), h = n.get("verticalAlign"), p = l && l.getBoundingRect().clone();
  78364. if (l && p.applyTransform(l.transform), Me(r) && (r = r([i, a], s, o.el, p, {
  78365. viewSize: [u, c],
  78366. contentSize: f.slice()
  78367. })), ue(r))
  78368. i = _e(r[0], u), a = _e(r[1], c);
  78369. else if (Ie(r)) {
  78370. var v = r;
  78371. v.width = f[0], v.height = f[1];
  78372. var g = Rn(v, {
  78373. width: u,
  78374. height: c
  78375. });
  78376. i = g.x, a = g.y, d = null, h = null;
  78377. } else if (Oe(r) && l) {
  78378. var m = IGe(r, p, f, n.get("borderWidth"));
  78379. i = m[0], a = m[1];
  78380. } else {
  78381. var m = EGe(i, a, o, u, c, d ? null : 20, h ? null : 20);
  78382. i = m[0], a = m[1];
  78383. }
  78384. if (d && (i -= I7(d) ? f[0] / 2 : d === "right" ? f[0] : 0), h && (a -= I7(h) ? f[1] / 2 : h === "bottom" ? f[1] : 0), jre(n)) {
  78385. var m = MGe(i, a, o, u, c);
  78386. i = m[0], a = m[1];
  78387. }
  78388. o.moveTo(i, a);
  78389. }, e.prototype._updateContentNotChangedOnAxis = function(n, r) {
  78390. var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === n.length;
  78391. return o && k(i, function(s, l) {
  78392. var u = s.dataByAxis || [], c = n[l] || {}, f = c.dataByAxis || [];
  78393. o = o && u.length === f.length, o && k(u, function(d, h) {
  78394. var p = f[h] || {}, v = d.seriesDataIndices || [], g = p.seriesDataIndices || [];
  78395. o = o && d.value === p.value && d.axisType === p.axisType && d.axisId === p.axisId && v.length === g.length, o && k(v, function(m, y) {
  78396. var b = g[y];
  78397. o = o && m.seriesIndex === b.seriesIndex && m.dataIndex === b.dataIndex;
  78398. }), a && k(d.seriesDataIndices, function(m) {
  78399. var y = m.seriesIndex, b = r[y], _ = a[y];
  78400. b && _ && _.data !== b.data && (o = !1);
  78401. });
  78402. });
  78403. }), this._lastDataByCoordSys = n, this._cbParamsList = r, !!o;
  78404. }, e.prototype._hide = function(n) {
  78405. this._lastDataByCoordSys = null, n({
  78406. type: "hideTip",
  78407. from: this.uid
  78408. });
  78409. }, e.prototype.dispose = function(n, r) {
  78410. vt.node || !r.getDom() || ($m(this, "_updatePosition"), this._tooltipContent.dispose(), EE("itemTooltip", r));
  78411. }, e.type = "tooltip", e;
  78412. }(Xt)
  78413. );
  78414. function Ov(t, e, n) {
  78415. var r = e.ecModel, i;
  78416. n ? (i = new Wt(n, r, r), i = new Wt(e.option, i, r)) : i = e;
  78417. for (var a = t.length - 1; a >= 0; a--) {
  78418. var o = t[a];
  78419. o && (o instanceof Wt && (o = o.get("tooltip", !0)), Oe(o) && (o = {
  78420. formatter: o
  78421. }), o && (i = new Wt(o, i, r)));
  78422. }
  78423. return i;
  78424. }
  78425. function M7(t, e) {
  78426. return t.dispatchAction || xe(e.dispatchAction, e);
  78427. }
  78428. function EGe(t, e, n, r, i, a, o) {
  78429. var s = n.getSize(), l = s[0], u = s[1];
  78430. 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];
  78431. }
  78432. function MGe(t, e, n, r, i) {
  78433. var a = n.getSize(), o = a[0], s = a[1];
  78434. 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];
  78435. }
  78436. function IGe(t, e, n, r) {
  78437. var i = n[0], a = n[1], o = Math.ceil(Math.SQRT2 * r) + 8, s = 0, l = 0, u = e.width, c = e.height;
  78438. switch (t) {
  78439. case "inside":
  78440. s = e.x + u / 2 - i / 2, l = e.y + c / 2 - a / 2;
  78441. break;
  78442. case "top":
  78443. s = e.x + u / 2 - i / 2, l = e.y - a - o;
  78444. break;
  78445. case "bottom":
  78446. s = e.x + u / 2 - i / 2, l = e.y + c + o;
  78447. break;
  78448. case "left":
  78449. s = e.x - i - o, l = e.y + c / 2 - a / 2;
  78450. break;
  78451. case "right":
  78452. s = e.x + u + o, l = e.y + c / 2 - a / 2;
  78453. }
  78454. return [s, l];
  78455. }
  78456. function I7(t) {
  78457. return t === "center" || t === "middle";
  78458. }
  78459. function DGe(t, e, n) {
  78460. var r = ER(t).queryOptionMap, i = r.keys()[0];
  78461. if (!(!i || i === "series")) {
  78462. var a = N0(e, i, r.get(i), {
  78463. useDefault: !1,
  78464. enableAll: !1,
  78465. enableNone: !1
  78466. }), o = a.models[0];
  78467. if (o) {
  78468. var s = n.getViewOfComponentModel(o), l;
  78469. if (s.group.traverse(function(u) {
  78470. var c = Fe(u).tooltipConfig;
  78471. if (c && c.name === t.name)
  78472. return l = u, !0;
  78473. }), l)
  78474. return {
  78475. componentMainType: i,
  78476. componentIndex: o.componentIndex,
  78477. el: l
  78478. };
  78479. }
  78480. }
  78481. }
  78482. function RGe(t) {
  78483. at(ey), t.registerComponentModel(gGe), t.registerComponentView(AGe), t.registerAction({
  78484. type: "showTip",
  78485. event: "showTip",
  78486. update: "tooltip:manuallyShowTip"
  78487. }, On), t.registerAction({
  78488. type: "hideTip",
  78489. event: "hideTip",
  78490. update: "tooltip:manuallyHideTip"
  78491. }, On);
  78492. }
  78493. var kGe = ["rect", "polygon", "keep", "clear"];
  78494. function LGe(t, e) {
  78495. var n = Qt(t ? t.brush : []);
  78496. if (n.length) {
  78497. var r = [];
  78498. k(n, function(l) {
  78499. var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
  78500. u instanceof Array && (r = r.concat(u));
  78501. });
  78502. var i = t && t.toolbox;
  78503. ue(i) && (i = i[0]), i || (i = {
  78504. feature: {}
  78505. }, t.toolbox = [i]);
  78506. var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []);
  78507. s.push.apply(s, r), NGe(s), e && !s.length && s.push.apply(s, kGe);
  78508. }
  78509. }
  78510. function NGe(t) {
  78511. var e = {};
  78512. k(t, function(n) {
  78513. e[n] = 1;
  78514. }), t.length = 0, k(e, function(n, r) {
  78515. t.push(r);
  78516. });
  78517. }
  78518. var D7 = k;
  78519. function R7(t) {
  78520. if (t) {
  78521. for (var e in t)
  78522. if (t.hasOwnProperty(e))
  78523. return !0;
  78524. }
  78525. }
  78526. function LE(t, e, n) {
  78527. var r = {};
  78528. return D7(e, function(a) {
  78529. var o = r[a] = i();
  78530. D7(t[a], function(s, l) {
  78531. if (qn.isValidType(l)) {
  78532. var u = {
  78533. type: l,
  78534. visual: s
  78535. };
  78536. n && n(u, a), o[l] = new qn(u), l === "opacity" && (u = Le(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new qn(u));
  78537. }
  78538. });
  78539. }), r;
  78540. function i() {
  78541. var a = function() {
  78542. };
  78543. a.prototype.__hidden = a.prototype;
  78544. var o = new a();
  78545. return o;
  78546. }
  78547. }
  78548. function Yre(t, e, n) {
  78549. var r;
  78550. k(n, function(i) {
  78551. e.hasOwnProperty(i) && R7(e[i]) && (r = !0);
  78552. }), r && k(n, function(i) {
  78553. e.hasOwnProperty(i) && R7(e[i]) ? t[i] = Le(e[i]) : delete t[i];
  78554. });
  78555. }
  78556. function BGe(t, e, n, r, i, a) {
  78557. var o = {};
  78558. k(t, function(f) {
  78559. var d = qn.prepareVisualTypes(e[f]);
  78560. o[f] = d;
  78561. });
  78562. var s;
  78563. function l(f) {
  78564. return ck(n, s, f);
  78565. }
  78566. function u(f, d) {
  78567. hee(n, s, f, d);
  78568. }
  78569. n.each(c);
  78570. function c(f, d) {
  78571. s = f;
  78572. var h = n.getRawDataItem(s);
  78573. if (!(h && h.visualMap === !1))
  78574. for (var p = r.call(i, f), v = e[p], g = o[p], m = 0, y = g.length; m < y; m++) {
  78575. var b = g[m];
  78576. v[b] && v[b].applyVisual(f, l, u);
  78577. }
  78578. }
  78579. }
  78580. function zGe(t, e, n, r) {
  78581. var i = {};
  78582. return k(t, function(a) {
  78583. var o = qn.prepareVisualTypes(e[a]);
  78584. i[a] = o;
  78585. }), {
  78586. progress: function(o, s) {
  78587. var l;
  78588. r != null && (l = s.getDimensionIndex(r));
  78589. function u(O) {
  78590. return ck(s, f, O);
  78591. }
  78592. function c(O, S) {
  78593. hee(s, f, O, S);
  78594. }
  78595. for (var f, d = s.getStore(); (f = o.next()) != null; ) {
  78596. var h = s.getRawDataItem(f);
  78597. if (!(h && h.visualMap === !1))
  78598. 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++) {
  78599. var _ = m[y];
  78600. g[_] && g[_].applyVisual(p, u, c);
  78601. }
  78602. }
  78603. }
  78604. };
  78605. }
  78606. function VGe(t) {
  78607. var e = t.brushType, n = {
  78608. point: function(r) {
  78609. return k7[e].point(r, n, t);
  78610. },
  78611. rect: function(r) {
  78612. return k7[e].rect(r, n, t);
  78613. }
  78614. };
  78615. return n;
  78616. }
  78617. var k7 = {
  78618. lineX: L7(0),
  78619. lineY: L7(1),
  78620. rect: {
  78621. point: function(t, e, n) {
  78622. return t && n.boundingRect.contain(t[0], t[1]);
  78623. },
  78624. rect: function(t, e, n) {
  78625. return t && n.boundingRect.intersect(t);
  78626. }
  78627. },
  78628. polygon: {
  78629. point: function(t, e, n) {
  78630. return t && n.boundingRect.contain(t[0], t[1]) && Sc(n.range, t[0], t[1]);
  78631. },
  78632. rect: function(t, e, n) {
  78633. var r = n.range;
  78634. if (!t || r.length <= 1)
  78635. return !1;
  78636. var i = t.x, a = t.y, o = t.width, s = t.height, l = r[0];
  78637. 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]) || Gv(i, a, i + o, a, r) || Gv(i, a, i, a + s, r) || Gv(i + o, a, i + o, a + s, r) || Gv(i, a + s, i + o, a + s, r))
  78638. return !0;
  78639. }
  78640. }
  78641. };
  78642. function L7(t) {
  78643. var e = ["x", "y"], n = ["width", "height"];
  78644. return {
  78645. point: function(r, i, a) {
  78646. if (r) {
  78647. var o = a.range, s = r[t];
  78648. return Sv(s, o);
  78649. }
  78650. },
  78651. rect: function(r, i, a) {
  78652. if (r) {
  78653. var o = a.range, s = [r[e[t]], r[e[t]] + r[n[t]]];
  78654. return s[1] < s[0] && s.reverse(), Sv(s[0], o) || Sv(s[1], o) || Sv(o[0], s) || Sv(o[1], s);
  78655. }
  78656. }
  78657. };
  78658. }
  78659. function Sv(t, e) {
  78660. return e[0] <= t && t <= e[1];
  78661. }
  78662. var N7 = ["inBrush", "outOfBrush"], YP = "__ecBrushSelect", NE = "__ecInBrushSelectEvent";
  78663. function qre(t) {
  78664. t.eachComponent({
  78665. mainType: "brush"
  78666. }, function(e) {
  78667. var n = e.brushTargetManager = new wL(e.option, t);
  78668. n.setInputRanges(e.areas, t);
  78669. });
  78670. }
  78671. function FGe(t, e, n) {
  78672. var r = [], i, a;
  78673. t.eachComponent({
  78674. mainType: "brush"
  78675. }, function(o) {
  78676. n && n.type === "takeGlobalCursor" && o.setBrushOption(n.key === "brush" ? n.brushOption : {
  78677. brushType: !1
  78678. });
  78679. }), qre(t), t.eachComponent({
  78680. mainType: "brush"
  78681. }, function(o, s) {
  78682. var l = {
  78683. brushId: o.id,
  78684. brushIndex: s,
  78685. brushName: o.name,
  78686. areas: Le(o.areas),
  78687. selected: []
  78688. };
  78689. r.push(l);
  78690. var u = o.option, c = u.brushLink, f = [], d = [], h = [], p = !1;
  78691. s || (i = u.throttleType, a = u.throttleDelay);
  78692. var v = ce(o.areas, function(O) {
  78693. var S = GGe[O.brushType], x = Re({
  78694. boundingRect: S ? S(O) : void 0
  78695. }, O);
  78696. return x.selectors = VGe(x), x;
  78697. }), g = LE(o.option, N7, function(O) {
  78698. O.mappingMethod = "fixed";
  78699. });
  78700. ue(c) && k(c, function(O) {
  78701. f[O] = 1;
  78702. });
  78703. function m(O) {
  78704. return c === "all" || !!f[O];
  78705. }
  78706. function y(O) {
  78707. return !!O.length;
  78708. }
  78709. t.eachSeries(function(O, S) {
  78710. var x = h[S] = [];
  78711. O.subType === "parallel" ? b(O, S) : _(O, S, x);
  78712. });
  78713. function b(O, S) {
  78714. var x = O.coordinateSystem;
  78715. p = p || x.hasAxisBrushed(), m(S) && x.eachActiveState(O.getData(), function(C, T) {
  78716. C === "active" && (d[T] = 1);
  78717. });
  78718. }
  78719. function _(O, S, x) {
  78720. if (!(!O.brushSelector || HGe(o, S)) && (k(v, function(T) {
  78721. o.brushTargetManager.controlSeries(T, O, t) && x.push(T), p = p || y(x);
  78722. }), m(S) && y(x))) {
  78723. var C = O.getData();
  78724. C.each(function(T) {
  78725. B7(O, x, C, T) && (d[T] = 1);
  78726. });
  78727. }
  78728. }
  78729. t.eachSeries(function(O, S) {
  78730. var x = {
  78731. seriesId: O.id,
  78732. seriesIndex: S,
  78733. seriesName: O.name,
  78734. dataIndex: []
  78735. };
  78736. l.selected.push(x);
  78737. var C = h[S], T = O.getData(), w = m(S) ? function(P) {
  78738. return d[P] ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
  78739. } : function(P) {
  78740. return B7(O, C, T, P) ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
  78741. };
  78742. (m(S) ? p : y(C)) && BGe(N7, g, T, w);
  78743. });
  78744. }), WGe(e, i, a, r, n);
  78745. }
  78746. function WGe(t, e, n, r, i) {
  78747. if (i) {
  78748. var a = t.getZr();
  78749. if (!a[NE]) {
  78750. a[YP] || (a[YP] = QGe);
  78751. var o = Sp(a, YP, n, e);
  78752. o(t, r);
  78753. }
  78754. }
  78755. }
  78756. function QGe(t, e) {
  78757. if (!t.isDisposed()) {
  78758. var n = t.getZr();
  78759. n[NE] = !0, t.dispatchAction({
  78760. type: "brushSelect",
  78761. batch: e
  78762. }), n[NE] = !1;
  78763. }
  78764. }
  78765. function B7(t, e, n, r) {
  78766. for (var i = 0, a = e.length; i < a; i++) {
  78767. var o = e[i];
  78768. if (t.brushSelector(r, n, o.selectors, o))
  78769. return !0;
  78770. }
  78771. }
  78772. function HGe(t, e) {
  78773. var n = t.option.seriesIndex;
  78774. return n != null && n !== "all" && (ue(n) ? et(n, e) < 0 : e !== n);
  78775. }
  78776. var GGe = {
  78777. rect: function(t) {
  78778. return z7(t.range);
  78779. },
  78780. polygon: function(t) {
  78781. for (var e, n = t.range, r = 0, i = n.length; r < i; r++) {
  78782. e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  78783. var a = n[r];
  78784. 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]);
  78785. }
  78786. return e && z7(e);
  78787. }
  78788. };
  78789. function z7(t) {
  78790. return new Je(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]);
  78791. }
  78792. var jGe = (
  78793. /** @class */
  78794. function(t) {
  78795. q(e, t);
  78796. function e() {
  78797. var n = t !== null && t.apply(this, arguments) || this;
  78798. return n.type = e.type, n;
  78799. }
  78800. return e.prototype.init = function(n, r) {
  78801. this.ecModel = n, this.api = r, this.model, (this._brushController = new Jk(r.getZr())).on("brush", xe(this._onBrush, this)).mount();
  78802. }, e.prototype.render = function(n, r, i, a) {
  78803. this.model = n, this._updateController(n, r, i, a);
  78804. }, e.prototype.updateTransform = function(n, r, i, a) {
  78805. qre(r), this._updateController(n, r, i, a);
  78806. }, e.prototype.updateVisual = function(n, r, i, a) {
  78807. this.updateTransform(n, r, i, a);
  78808. }, e.prototype.updateView = function(n, r, i, a) {
  78809. this._updateController(n, r, i, a);
  78810. }, e.prototype._updateController = function(n, r, i, a) {
  78811. (!a || a.$from !== n.id) && this._brushController.setPanels(n.brushTargetManager.makePanelOpts(i)).enableBrush(n.brushOption).updateCovers(n.areas.slice());
  78812. }, e.prototype.dispose = function() {
  78813. this._brushController.dispose();
  78814. }, e.prototype._onBrush = function(n) {
  78815. var r = this.model.id, i = this.model.brushTargetManager.setOutputRanges(n.areas, this.ecModel);
  78816. (!n.isEnd || n.removeOnClick) && this.api.dispatchAction({
  78817. type: "brush",
  78818. brushId: r,
  78819. areas: Le(i),
  78820. $from: r
  78821. }), n.isEnd && this.api.dispatchAction({
  78822. type: "brushEnd",
  78823. brushId: r,
  78824. areas: Le(i),
  78825. $from: r
  78826. });
  78827. }, e.type = "brush", e;
  78828. }(Xt)
  78829. ), ZGe = "#ddd", UGe = (
  78830. /** @class */
  78831. function(t) {
  78832. q(e, t);
  78833. function e() {
  78834. var n = t !== null && t.apply(this, arguments) || this;
  78835. return n.type = e.type, n.areas = [], n.brushOption = {}, n;
  78836. }
  78837. return e.prototype.optionUpdated = function(n, r) {
  78838. var i = this.option;
  78839. !r && Yre(i, n, ["inBrush", "outOfBrush"]);
  78840. var a = i.inBrush = i.inBrush || {};
  78841. i.outOfBrush = i.outOfBrush || {
  78842. color: ZGe
  78843. }, a.hasOwnProperty("liftZ") || (a.liftZ = 5);
  78844. }, e.prototype.setAreas = function(n) {
  78845. process.env.NODE_ENV !== "production" && (ke(ue(n)), k(n, function(r) {
  78846. ke(r.brushType, "Illegal areas");
  78847. })), n && (this.areas = ce(n, function(r) {
  78848. return V7(this.option, r);
  78849. }, this));
  78850. }, e.prototype.setBrushOption = function(n) {
  78851. this.brushOption = V7(this.option, n), this.brushType = this.brushOption.brushType;
  78852. }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
  78853. seriesIndex: "all",
  78854. brushType: "rect",
  78855. brushMode: "single",
  78856. transformable: !0,
  78857. brushStyle: {
  78858. borderWidth: 1,
  78859. color: "rgba(210,219,238,0.3)",
  78860. borderColor: "#D2DBEE"
  78861. },
  78862. throttleType: "fixRate",
  78863. throttleDelay: 0,
  78864. removeOnClick: !0,
  78865. z: 1e4
  78866. }, e;
  78867. }(rt)
  78868. );
  78869. function V7(t, e) {
  78870. return qe({
  78871. brushType: t.brushType,
  78872. brushMode: t.brushMode,
  78873. transformable: t.transformable,
  78874. brushStyle: new Wt(t.brushStyle).getItemStyle(),
  78875. removeOnClick: t.removeOnClick,
  78876. z: t.z
  78877. }, e, !0);
  78878. }
  78879. var XGe = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], YGe = (
  78880. /** @class */
  78881. function(t) {
  78882. q(e, t);
  78883. function e() {
  78884. return t !== null && t.apply(this, arguments) || this;
  78885. }
  78886. return e.prototype.render = function(n, r, i) {
  78887. var a, o, s;
  78888. r.eachComponent({
  78889. mainType: "brush"
  78890. }, function(l) {
  78891. a = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
  78892. }), this._brushType = a, this._brushMode = o, k(n.get("type", !0), function(l) {
  78893. n.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === a) ? "emphasis" : "normal");
  78894. });
  78895. }, e.prototype.updateView = function(n, r, i) {
  78896. this.render(n, r, i);
  78897. }, e.prototype.getIcons = function() {
  78898. var n = this.model, r = n.get("icon", !0), i = {};
  78899. return k(n.get("type", !0), function(a) {
  78900. r[a] && (i[a] = r[a]);
  78901. }), i;
  78902. }, e.prototype.onclick = function(n, r, i) {
  78903. var a = this._brushType, o = this._brushMode;
  78904. i === "clear" ? (r.dispatchAction({
  78905. type: "axisAreaSelect",
  78906. intervals: []
  78907. }), r.dispatchAction({
  78908. type: "brush",
  78909. command: "clear",
  78910. // Clear all areas of all brush components.
  78911. areas: []
  78912. })) : r.dispatchAction({
  78913. type: "takeGlobalCursor",
  78914. key: "brush",
  78915. brushOption: {
  78916. brushType: i === "keep" ? a : a === i ? !1 : i,
  78917. brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o
  78918. }
  78919. });
  78920. }, e.getDefaultOption = function(n) {
  78921. var r = {
  78922. show: !0,
  78923. type: XGe.slice(),
  78924. icon: {
  78925. /* eslint-disable */
  78926. 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",
  78927. 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",
  78928. 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",
  78929. 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",
  78930. 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",
  78931. 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"
  78932. // jshint ignore:line
  78933. /* eslint-enable */
  78934. },
  78935. // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
  78936. title: n.getLocaleModel().get(["toolbox", "brush", "title"])
  78937. };
  78938. return r;
  78939. }, e;
  78940. }(pa)
  78941. );
  78942. function qGe(t) {
  78943. t.registerComponentView(jGe), t.registerComponentModel(UGe), t.registerPreprocessor(LGe), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, FGe), t.registerAction({
  78944. type: "brush",
  78945. event: "brush",
  78946. update: "updateVisual"
  78947. }, function(e, n) {
  78948. n.eachComponent({
  78949. mainType: "brush",
  78950. query: e
  78951. }, function(r) {
  78952. r.setAreas(e.areas);
  78953. });
  78954. }), t.registerAction({
  78955. type: "brushSelect",
  78956. event: "brushSelected",
  78957. update: "none"
  78958. }, On), t.registerAction({
  78959. type: "brushEnd",
  78960. event: "brushEnd",
  78961. update: "none"
  78962. }, On), Id("brush", YGe);
  78963. }
  78964. var KGe = (
  78965. /** @class */
  78966. function(t) {
  78967. q(e, t);
  78968. function e() {
  78969. var n = t !== null && t.apply(this, arguments) || this;
  78970. return n.type = e.type, n.layoutMode = {
  78971. type: "box",
  78972. ignoreSize: !0
  78973. }, n;
  78974. }
  78975. return e.type = "title", e.defaultOption = {
  78976. // zlevel: 0,
  78977. z: 6,
  78978. show: !0,
  78979. text: "",
  78980. target: "blank",
  78981. subtext: "",
  78982. subtarget: "blank",
  78983. left: 0,
  78984. top: 0,
  78985. backgroundColor: "rgba(0,0,0,0)",
  78986. borderColor: "#ccc",
  78987. borderWidth: 0,
  78988. padding: 5,
  78989. itemGap: 10,
  78990. textStyle: {
  78991. fontSize: 18,
  78992. fontWeight: "bold",
  78993. color: "#464646"
  78994. },
  78995. subtextStyle: {
  78996. fontSize: 12,
  78997. color: "#6E7079"
  78998. }
  78999. }, e;
  79000. }(rt)
  79001. ), JGe = (
  79002. /** @class */
  79003. function(t) {
  79004. q(e, t);
  79005. function e() {
  79006. var n = t !== null && t.apply(this, arguments) || this;
  79007. return n.type = e.type, n;
  79008. }
  79009. return e.prototype.render = function(n, r, i) {
  79010. if (this.group.removeAll(), !!n.get("show")) {
  79011. 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({
  79012. style: Zt(o, {
  79013. text: n.get("text"),
  79014. fill: o.getTextColor()
  79015. }, {
  79016. disableBox: !0
  79017. }),
  79018. z2: 10
  79019. }), f = c.getBoundingRect(), d = n.get("subtext"), h = new gt({
  79020. style: Zt(s, {
  79021. text: d,
  79022. fill: s.getTextColor(),
  79023. y: f.height + n.get("itemGap"),
  79024. verticalAlign: "top"
  79025. }, {
  79026. disableBox: !0
  79027. }),
  79028. z2: 10
  79029. }), p = n.get("link"), v = n.get("sublink"), g = n.get("triggerEvent", !0);
  79030. c.silent = !p && !g, h.silent = !v && !g, p && c.on("click", function() {
  79031. dO(p, "_" + n.get("target"));
  79032. }), v && h.on("click", function() {
  79033. dO(v, "_" + n.get("subtarget"));
  79034. }), Fe(c).eventData = Fe(h).eventData = g ? {
  79035. componentType: "title",
  79036. componentIndex: n.componentIndex
  79037. } : null, a.add(c), d && a.add(h);
  79038. var m = a.getBoundingRect(), y = n.getBoxLayoutParams();
  79039. y.width = m.width, y.height = m.height;
  79040. var b = Rn(y, {
  79041. width: i.getWidth(),
  79042. height: i.getHeight()
  79043. }, n.get("padding"));
  79044. 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();
  79045. var _ = {
  79046. align: l,
  79047. verticalAlign: u
  79048. };
  79049. c.setStyle(_), h.setStyle(_), m = a.getBoundingRect();
  79050. var O = b.margin, S = n.getItemStyle(["color", "opacity"]);
  79051. S.fill = n.get("backgroundColor");
  79052. var x = new mt({
  79053. shape: {
  79054. x: m.x - O[3],
  79055. y: m.y - O[0],
  79056. width: m.width + O[1] + O[3],
  79057. height: m.height + O[0] + O[2],
  79058. r: n.get("borderRadius")
  79059. },
  79060. style: S,
  79061. subPixelOptimize: !0,
  79062. silent: !0
  79063. });
  79064. a.add(x);
  79065. }
  79066. }, e.type = "title", e;
  79067. }(Xt)
  79068. );
  79069. function e9e(t) {
  79070. t.registerComponentModel(KGe), t.registerComponentView(JGe);
  79071. }
  79072. var F7 = (
  79073. /** @class */
  79074. function(t) {
  79075. q(e, t);
  79076. function e() {
  79077. var n = t !== null && t.apply(this, arguments) || this;
  79078. return n.type = e.type, n.layoutMode = "box", n;
  79079. }
  79080. return e.prototype.init = function(n, r, i) {
  79081. this.mergeDefaultAndTheme(n, i), this._initData();
  79082. }, e.prototype.mergeOption = function(n) {
  79083. t.prototype.mergeOption.apply(this, arguments), this._initData();
  79084. }, e.prototype.setCurrentIndex = function(n) {
  79085. n == null && (n = this.option.currentIndex);
  79086. var r = this._data.count();
  79087. this.option.loop ? n = (n % r + r) % r : (n >= r && (n = r - 1), n < 0 && (n = 0)), this.option.currentIndex = n;
  79088. }, e.prototype.getCurrentIndex = function() {
  79089. return this.option.currentIndex;
  79090. }, e.prototype.isIndexMax = function() {
  79091. return this.getCurrentIndex() >= this._data.count() - 1;
  79092. }, e.prototype.setPlayState = function(n) {
  79093. this.option.autoPlay = !!n;
  79094. }, e.prototype.getPlayState = function() {
  79095. return !!this.option.autoPlay;
  79096. }, e.prototype._initData = function() {
  79097. var n = this.option, r = n.data || [], i = n.axisType, a = this._names = [], o;
  79098. i === "category" ? (o = [], k(r, function(u, c) {
  79099. var f = Vn(fp(u), ""), d;
  79100. Ie(u) ? (d = Le(u), d.value = c) : d = c, o.push(d), a.push(f);
  79101. })) : o = r;
  79102. var s = {
  79103. category: "ordinal",
  79104. time: "time",
  79105. value: "number"
  79106. }[i] || "number", l = this._data = new Lr([{
  79107. name: "value",
  79108. type: s
  79109. }], this);
  79110. l.initData(o, a);
  79111. }, e.prototype.getData = function() {
  79112. return this._data;
  79113. }, e.prototype.getCategories = function() {
  79114. if (this.get("axisType") === "category")
  79115. return this._names.slice();
  79116. }, e.type = "timeline", e.defaultOption = {
  79117. // zlevel: 0, // 一级层叠
  79118. z: 4,
  79119. show: !0,
  79120. axisType: "time",
  79121. realtime: !0,
  79122. left: "20%",
  79123. top: null,
  79124. right: "20%",
  79125. bottom: 0,
  79126. width: null,
  79127. height: 40,
  79128. padding: 5,
  79129. controlPosition: "left",
  79130. autoPlay: !1,
  79131. rewind: !1,
  79132. loop: !0,
  79133. playInterval: 2e3,
  79134. currentIndex: 0,
  79135. itemStyle: {},
  79136. label: {
  79137. color: "#000"
  79138. },
  79139. data: []
  79140. }, e;
  79141. }(rt)
  79142. ), Kre = (
  79143. /** @class */
  79144. function(t) {
  79145. q(e, t);
  79146. function e() {
  79147. var n = t !== null && t.apply(this, arguments) || this;
  79148. return n.type = e.type, n;
  79149. }
  79150. return e.type = "timeline.slider", e.defaultOption = Pu(F7.defaultOption, {
  79151. backgroundColor: "rgba(0,0,0,0)",
  79152. borderColor: "#ccc",
  79153. borderWidth: 0,
  79154. orient: "horizontal",
  79155. inverse: !1,
  79156. tooltip: {
  79157. trigger: "item"
  79158. // data item may also have tootip attr.
  79159. },
  79160. symbol: "circle",
  79161. symbolSize: 12,
  79162. lineStyle: {
  79163. show: !0,
  79164. width: 2,
  79165. color: "#DAE1F5"
  79166. },
  79167. label: {
  79168. position: "auto",
  79169. // When using number, label position is not
  79170. // restricted by viewRect.
  79171. // positive: right/bottom, negative: left/top
  79172. show: !0,
  79173. interval: "auto",
  79174. rotate: 0,
  79175. // formatter: null,
  79176. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79177. color: "#A4B1D7"
  79178. },
  79179. itemStyle: {
  79180. color: "#A4B1D7",
  79181. borderWidth: 1
  79182. },
  79183. checkpointStyle: {
  79184. symbol: "circle",
  79185. symbolSize: 15,
  79186. color: "#316bf3",
  79187. borderColor: "#fff",
  79188. borderWidth: 2,
  79189. shadowBlur: 2,
  79190. shadowOffsetX: 1,
  79191. shadowOffsetY: 1,
  79192. shadowColor: "rgba(0, 0, 0, 0.3)",
  79193. // borderColor: 'rgba(194,53,49, 0.5)',
  79194. animation: !0,
  79195. animationDuration: 300,
  79196. animationEasing: "quinticInOut"
  79197. },
  79198. controlStyle: {
  79199. show: !0,
  79200. showPlayBtn: !0,
  79201. showPrevBtn: !0,
  79202. showNextBtn: !0,
  79203. itemSize: 24,
  79204. itemGap: 12,
  79205. position: "left",
  79206. 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",
  79207. 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",
  79208. // eslint-disable-next-line max-len
  79209. 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",
  79210. // eslint-disable-next-line max-len
  79211. 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",
  79212. prevBtnSize: 18,
  79213. nextBtnSize: 18,
  79214. color: "#A4B1D7",
  79215. borderColor: "#A4B1D7",
  79216. borderWidth: 1
  79217. },
  79218. emphasis: {
  79219. label: {
  79220. show: !0,
  79221. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79222. color: "#6f778d"
  79223. },
  79224. itemStyle: {
  79225. color: "#316BF3"
  79226. },
  79227. controlStyle: {
  79228. color: "#316BF3",
  79229. borderColor: "#316BF3",
  79230. borderWidth: 2
  79231. }
  79232. },
  79233. progress: {
  79234. lineStyle: {
  79235. color: "#316BF3"
  79236. },
  79237. itemStyle: {
  79238. color: "#316BF3"
  79239. },
  79240. label: {
  79241. color: "#6f778d"
  79242. }
  79243. },
  79244. data: []
  79245. }), e;
  79246. }(F7)
  79247. );
  79248. xn(Kre, sw.prototype);
  79249. var t9e = (
  79250. /** @class */
  79251. function(t) {
  79252. q(e, t);
  79253. function e() {
  79254. var n = t !== null && t.apply(this, arguments) || this;
  79255. return n.type = e.type, n;
  79256. }
  79257. return e.type = "timeline", e;
  79258. }(Xt)
  79259. ), n9e = (
  79260. /** @class */
  79261. function(t) {
  79262. q(e, t);
  79263. function e(n, r, i, a) {
  79264. var o = t.call(this, n, r, i) || this;
  79265. return o.type = a || "value", o;
  79266. }
  79267. return e.prototype.getLabelModel = function() {
  79268. return this.model.getModel("label");
  79269. }, e.prototype.isHorizontal = function() {
  79270. return this.model.get("orient") === "horizontal";
  79271. }, e;
  79272. }(Ba)
  79273. ), qP = Math.PI, W7 = bt(), r9e = (
  79274. /** @class */
  79275. function(t) {
  79276. q(e, t);
  79277. function e() {
  79278. var n = t !== null && t.apply(this, arguments) || this;
  79279. return n.type = e.type, n;
  79280. }
  79281. return e.prototype.init = function(n, r) {
  79282. this.api = r;
  79283. }, e.prototype.render = function(n, r, i) {
  79284. if (this.model = n, this.api = i, this.ecModel = r, this.group.removeAll(), n.get("show", !0)) {
  79285. var a = this._layout(n, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(a, n);
  79286. n.formatTooltip = function(u) {
  79287. var c = l.scale.getLabel({
  79288. value: u
  79289. });
  79290. return tr("nameValue", {
  79291. noName: !0,
  79292. value: c
  79293. });
  79294. }, k(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
  79295. this["_render" + u](a, o, l, n);
  79296. }, this), this._renderAxisLabel(a, s, l, n), this._position(a, n);
  79297. }
  79298. this._doPlayStop(), this._updateTicksStatus();
  79299. }, e.prototype.remove = function() {
  79300. this._clearTimer(), this.group.removeAll();
  79301. }, e.prototype.dispose = function() {
  79302. this._clearTimer();
  79303. }, e.prototype._layout = function(n, r) {
  79304. var i = n.get(["label", "position"]), a = n.get("orient"), o = a9e(n, r), s;
  79305. 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 = {
  79306. horizontal: {
  79307. top: "-",
  79308. bottom: "+"
  79309. },
  79310. vertical: {
  79311. left: "-",
  79312. right: "+"
  79313. }
  79314. }[a][i] : s = i;
  79315. var l = {
  79316. horizontal: "center",
  79317. vertical: s >= 0 || s === "+" ? "left" : "right"
  79318. }, u = {
  79319. horizontal: s >= 0 || s === "+" ? "top" : "bottom",
  79320. vertical: "middle"
  79321. }, c = {
  79322. horizontal: 0,
  79323. vertical: qP / 2
  79324. }, 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;
  79325. m = m * qP / 180;
  79326. 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;
  79327. 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));
  79328. var P = [T, w];
  79329. return n.get("inverse") && P.reverse(), {
  79330. viewRect: o,
  79331. mainLength: f,
  79332. orient: a,
  79333. rotation: c[a],
  79334. labelRotation: m,
  79335. labelPosOpt: s,
  79336. labelAlign: n.get(["label", "align"]) || l[a],
  79337. labelBaseline: n.get(["label", "verticalAlign"]) || n.get(["label", "baseline"]) || u[a],
  79338. // Based on mainGroup.
  79339. playPosition: y,
  79340. prevBtnPosition: b,
  79341. nextBtnPosition: _,
  79342. axisExtent: P,
  79343. controlSize: p,
  79344. controlGap: v
  79345. };
  79346. }, e.prototype._position = function(n, r) {
  79347. var i = this._mainGroup, a = this._labelGroup, o = n.viewRect;
  79348. if (n.orient === "vertical") {
  79349. var s = Si(), l = o.x, u = o.y + o.height;
  79350. ao(s, s, [-l, -u]), Cu(s, s, -qP / 2), ao(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
  79351. }
  79352. var c = y(o), f = y(i.getBoundingRect()), d = y(a.getBoundingRect()), h = [i.x, i.y], p = [a.x, a.y];
  79353. p[0] = h[0] = c[0][0];
  79354. var v = n.labelPosOpt;
  79355. if (v == null || Oe(v)) {
  79356. var g = v === "+" ? 0 : 1;
  79357. b(h, f, c, 1, g), b(p, d, c, 1, 1 - g);
  79358. } else {
  79359. var g = v >= 0 ? 0 : 1;
  79360. b(h, f, c, 1, g), p[1] = h[1] + v;
  79361. }
  79362. i.setPosition(h), a.setPosition(p), i.rotation = a.rotation = n.rotation, m(i), m(a);
  79363. function m(_) {
  79364. _.originX = c[0][0] - _.x, _.originY = c[1][0] - _.y;
  79365. }
  79366. function y(_) {
  79367. return [[_.x, _.x + _.width], [_.y, _.y + _.height]];
  79368. }
  79369. function b(_, O, S, x, C) {
  79370. _[x] += S[x][C] - O[x][C];
  79371. }
  79372. }, e.prototype._createAxis = function(n, r) {
  79373. var i = r.getData(), a = r.get("axisType"), o = i9e(r, a);
  79374. o.getTicks = function() {
  79375. return i.mapArray(["value"], function(u) {
  79376. return {
  79377. value: u
  79378. };
  79379. });
  79380. };
  79381. var s = i.getDataExtent("value");
  79382. o.setExtent(s[0], s[1]), o.calcNiceTicks();
  79383. var l = new n9e("value", o, n.axisExtent, a);
  79384. return l.model = r, l;
  79385. }, e.prototype._createGroup = function(n) {
  79386. var r = this[n] = new Ve();
  79387. return this.group.add(r), r;
  79388. }, e.prototype._renderAxisLine = function(n, r, i, a) {
  79389. var o = i.getExtent();
  79390. if (a.get(["lineStyle", "show"])) {
  79391. var s = new Un({
  79392. shape: {
  79393. x1: o[0],
  79394. y1: 0,
  79395. x2: o[1],
  79396. y2: 0
  79397. },
  79398. style: le({
  79399. lineCap: "round"
  79400. }, a.getModel("lineStyle").getLineStyle()),
  79401. silent: !0,
  79402. z2: 1
  79403. });
  79404. r.add(s);
  79405. var l = this._progressLine = new Un({
  79406. shape: {
  79407. x1: o[0],
  79408. x2: this._currentPointer ? this._currentPointer.x : o[0],
  79409. y1: 0,
  79410. y2: 0
  79411. },
  79412. style: Re({
  79413. lineCap: "round",
  79414. lineWidth: s.style.lineWidth
  79415. }, a.getModel(["progress", "lineStyle"]).getLineStyle()),
  79416. silent: !0,
  79417. z2: 1
  79418. });
  79419. r.add(l);
  79420. }
  79421. }, e.prototype._renderAxisTick = function(n, r, i, a) {
  79422. var o = this, s = a.getData(), l = i.scale.getTicks();
  79423. this._tickSymbols = [], k(l, function(u) {
  79424. 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 = {
  79425. x: c,
  79426. y: 0,
  79427. onclick: xe(o._changeTimeline, o, u.value)
  79428. }, g = Q7(f, d, r, v);
  79429. g.ensureState("emphasis").style = h.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), Yl(g);
  79430. var m = Fe(g);
  79431. f.get("tooltip") ? (m.dataIndex = u.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g);
  79432. });
  79433. }, e.prototype._renderAxisLabel = function(n, r, i, a) {
  79434. var o = this, s = i.getLabelModel();
  79435. if (s.get("show")) {
  79436. var l = a.getData(), u = i.getViewLabels();
  79437. this._tickLabels = [], k(u, function(c) {
  79438. 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({
  79439. x: g,
  79440. y: 0,
  79441. rotation: n.labelRotation - n.rotation,
  79442. onclick: xe(o._changeTimeline, o, f),
  79443. silent: !1,
  79444. style: Zt(h, {
  79445. text: c.formattedLabel,
  79446. align: n.labelAlign,
  79447. verticalAlign: n.labelBaseline
  79448. })
  79449. });
  79450. m.ensureState("emphasis").style = Zt(p), m.ensureState("progress").style = Zt(v), r.add(m), Yl(m), W7(m).dataIndex = f, o._tickLabels.push(m);
  79451. });
  79452. }
  79453. }, e.prototype._renderControl = function(n, r, i, a) {
  79454. 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);
  79455. 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);
  79456. function d(h, p, v, g) {
  79457. if (h) {
  79458. var m = oo(We(a.get(["controlStyle", p + "BtnSize"]), o), o), y = [0, -m / 2, m, m], b = o9e(a, p + "Icon", y, {
  79459. x: h[0],
  79460. y: h[1],
  79461. originX: o / 2,
  79462. originY: 0,
  79463. rotation: g ? -s : 0,
  79464. rectHover: !0,
  79465. style: l,
  79466. onclick: v
  79467. });
  79468. b.ensureState("emphasis").style = u, r.add(b), Yl(b);
  79469. }
  79470. }
  79471. }, e.prototype._renderCurrentPointer = function(n, r, i, a) {
  79472. var o = a.getData(), s = a.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, c = {
  79473. onCreate: function(f) {
  79474. f.draggable = !0, f.drift = xe(u._handlePointerDrag, u), f.ondragend = xe(u._handlePointerDragend, u), H7(f, u._progressLine, s, i, a, !0);
  79475. },
  79476. onUpdate: function(f) {
  79477. H7(f, u._progressLine, s, i, a);
  79478. }
  79479. };
  79480. this._currentPointer = Q7(l, l, this._mainGroup, {}, this._currentPointer, c);
  79481. }, e.prototype._handlePlayClick = function(n) {
  79482. this._clearTimer(), this.api.dispatchAction({
  79483. type: "timelinePlayChange",
  79484. playState: n,
  79485. from: this.uid
  79486. });
  79487. }, e.prototype._handlePointerDrag = function(n, r, i) {
  79488. this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]);
  79489. }, e.prototype._handlePointerDragend = function(n) {
  79490. this._pointerChangeTimeline([n.offsetX, n.offsetY], !0);
  79491. }, e.prototype._pointerChangeTimeline = function(n, r) {
  79492. var i = this._toAxisCoord(n)[0], a = this._axis, o = Vi(a.getExtent().slice());
  79493. i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw();
  79494. var s = this._progressLine;
  79495. s && (s.shape.x2 = i, s.dirty());
  79496. var l = this._findNearestTick(i), u = this.model;
  79497. (r || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
  79498. }, e.prototype._doPlayStop = function() {
  79499. var n = this;
  79500. this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
  79501. var r = n.model;
  79502. n._changeTimeline(r.getCurrentIndex() + (r.get("rewind", !0) ? -1 : 1));
  79503. }, this.model.get("playInterval")));
  79504. }, e.prototype._toAxisCoord = function(n) {
  79505. var r = this._mainGroup.getLocalTransform();
  79506. return to(n, r, !0);
  79507. }, e.prototype._findNearestTick = function(n) {
  79508. var r = this.model.getData(), i = 1 / 0, a, o = this._axis;
  79509. return r.each(["value"], function(s, l) {
  79510. var u = o.dataToCoord(s), c = Math.abs(u - n);
  79511. c < i && (i = c, a = l);
  79512. }), a;
  79513. }, e.prototype._clearTimer = function() {
  79514. this._timer && (clearTimeout(this._timer), this._timer = null);
  79515. }, e.prototype._changeTimeline = function(n) {
  79516. var r = this.model.getCurrentIndex();
  79517. n === "+" ? n = r + 1 : n === "-" && (n = r - 1), this.api.dispatchAction({
  79518. type: "timelineChange",
  79519. currentIndex: n,
  79520. from: this.uid
  79521. });
  79522. }, e.prototype._updateTicksStatus = function() {
  79523. var n = this.model.getCurrentIndex(), r = this._tickSymbols, i = this._tickLabels;
  79524. if (r)
  79525. for (var a = 0; a < r.length; a++)
  79526. r && r[a] && r[a].toggleState("progress", a < n);
  79527. if (i)
  79528. for (var a = 0; a < i.length; a++)
  79529. i && i[a] && i[a].toggleState("progress", W7(i[a]).dataIndex <= n);
  79530. }, e.type = "timeline.slider", e;
  79531. }(t9e)
  79532. );
  79533. function i9e(t, e) {
  79534. if (e = e || t.get("type"), e)
  79535. switch (e) {
  79536. case "category":
  79537. return new vw({
  79538. ordinalMeta: t.getCategories(),
  79539. extent: [1 / 0, -1 / 0]
  79540. });
  79541. case "time":
  79542. return new Ck({
  79543. locale: t.ecModel.getLocaleModel(),
  79544. useUTC: t.ecModel.get("useUTC")
  79545. });
  79546. default:
  79547. return new Ys();
  79548. }
  79549. }
  79550. function a9e(t, e) {
  79551. return Rn(t.getBoxLayoutParams(), {
  79552. width: e.getWidth(),
  79553. height: e.getHeight()
  79554. }, t.get("padding"));
  79555. }
  79556. function o9e(t, e, n, r) {
  79557. var i = r.style, a = vp(t.get(["controlStyle", e]), r || {}, new Je(n[0], n[1], n[2], n[3]));
  79558. return i && a.setStyle(i), a;
  79559. }
  79560. function Q7(t, e, n, r, i, a) {
  79561. var o = e.get("color");
  79562. if (i)
  79563. i.setColor(o), n.add(i), a && a.onUpdate(i);
  79564. else {
  79565. var s = t.get("symbol");
  79566. i = $n(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), n.add(i), a && a.onCreate(i);
  79567. }
  79568. var l = e.getItemStyle(["color"]);
  79569. i.setStyle(l), r = qe({
  79570. rectHover: !0,
  79571. z2: 100
  79572. }, r, !0);
  79573. var u = xp(t.get("symbolSize"));
  79574. r.scaleX = u[0] / 2, r.scaleY = u[1] / 2;
  79575. var c = Vf(t.get("symbolOffset"), u);
  79576. c && (r.x = (r.x || 0) + c[0], r.y = (r.y || 0) + c[1]);
  79577. var f = t.get("symbolRotate");
  79578. return r.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(r), i.updateTransform(), i;
  79579. }
  79580. function H7(t, e, n, r, i, a) {
  79581. if (!t.dragging) {
  79582. var o = i.getModel("checkpointStyle"), s = r.dataToCoord(i.getData().get("value", n));
  79583. if (a || !o.get("animation", !0))
  79584. t.attr({
  79585. x: s,
  79586. y: 0
  79587. }), e && e.attr({
  79588. shape: {
  79589. x2: s
  79590. }
  79591. });
  79592. else {
  79593. var l = {
  79594. duration: o.get("animationDuration", !0),
  79595. easing: o.get("animationEasing", !0)
  79596. };
  79597. t.stopAnimation(null, !0), t.animateTo({
  79598. x: s,
  79599. y: 0
  79600. }, l), e && e.animateTo({
  79601. shape: {
  79602. x2: s
  79603. }
  79604. }, l);
  79605. }
  79606. }
  79607. }
  79608. function s9e(t) {
  79609. t.registerAction({
  79610. type: "timelineChange",
  79611. event: "timelineChanged",
  79612. update: "prepareAndUpdate"
  79613. }, function(e, n, r) {
  79614. var i = n.getComponent("timeline");
  79615. return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), r.dispatchAction({
  79616. type: "timelinePlayChange",
  79617. playState: !1,
  79618. from: e.from
  79619. }))), n.resetOption("timeline", {
  79620. replaceMerge: i.get("replaceMerge", !0)
  79621. }), Re({
  79622. currentIndex: i.option.currentIndex
  79623. }, e);
  79624. }), t.registerAction({
  79625. type: "timelinePlayChange",
  79626. event: "timelinePlayChanged",
  79627. update: "update"
  79628. }, function(e, n) {
  79629. var r = n.getComponent("timeline");
  79630. r && e.playState != null && r.setPlayState(e.playState);
  79631. });
  79632. }
  79633. function l9e(t) {
  79634. var e = t && t.timeline;
  79635. ue(e) || (e = e ? [e] : []), k(e, function(n) {
  79636. n && u9e(n);
  79637. });
  79638. }
  79639. function u9e(t) {
  79640. var e = t.type, n = {
  79641. number: "value",
  79642. time: "time"
  79643. };
  79644. if (n[e] && (t.axisType = n[e], delete t.type), G7(t), Cc(t, "controlPosition")) {
  79645. var r = t.controlStyle || (t.controlStyle = {});
  79646. Cc(r, "position") || (r.position = t.controlPosition), r.position === "none" && !Cc(r, "show") && (r.show = !1, delete r.position), delete t.controlPosition;
  79647. }
  79648. k(t.data || [], function(i) {
  79649. Ie(i) && !ue(i) && (!Cc(i, "value") && Cc(i, "name") && (i.value = i.name), G7(i));
  79650. });
  79651. }
  79652. function G7(t) {
  79653. var e = t.itemStyle || (t.itemStyle = {}), n = e.emphasis || (e.emphasis = {}), r = t.label || t.label || {}, i = r.normal || (r.normal = {}), a = {
  79654. normal: 1,
  79655. emphasis: 1
  79656. };
  79657. k(r, function(o, s) {
  79658. !a[s] && !Cc(i, s) && (i[s] = o);
  79659. }), n.label && !Cc(r, "emphasis") && (r.emphasis = n.label, delete n.label);
  79660. }
  79661. function Cc(t, e) {
  79662. return t.hasOwnProperty(e);
  79663. }
  79664. function c9e(t) {
  79665. t.registerComponentModel(Kre), t.registerComponentView(r9e), t.registerSubTypeDefaulter("timeline", function() {
  79666. return "slider";
  79667. }), s9e(t), t.registerPreprocessor(l9e);
  79668. }
  79669. function PL(t, e) {
  79670. if (!t)
  79671. return !1;
  79672. for (var n = ue(t) ? t : [t], r = 0; r < n.length; r++)
  79673. if (n[r] && n[r][e])
  79674. return !0;
  79675. return !1;
  79676. }
  79677. function kb(t) {
  79678. gf(t, "label", ["show"]);
  79679. }
  79680. var Lb = bt(), Ks = (
  79681. /** @class */
  79682. function(t) {
  79683. q(e, t);
  79684. function e() {
  79685. var n = t !== null && t.apply(this, arguments) || this;
  79686. return n.type = e.type, n.createdBySelf = !1, n;
  79687. }
  79688. return e.prototype.init = function(n, r, i) {
  79689. if (process.env.NODE_ENV !== "production" && this.type === "marker")
  79690. throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
  79691. this.mergeDefaultAndTheme(n, i), this._mergeOption(n, i, !1, !0);
  79692. }, e.prototype.isAnimationEnabled = function() {
  79693. if (vt.node)
  79694. return !1;
  79695. var n = this.__hostSeries;
  79696. return this.getShallow("animation") && n && n.isAnimationEnabled();
  79697. }, e.prototype.mergeOption = function(n, r) {
  79698. this._mergeOption(n, r, !1, !1);
  79699. }, e.prototype._mergeOption = function(n, r, i, a) {
  79700. var o = this.mainType;
  79701. i || r.eachSeries(function(s) {
  79702. var l = s.get(this.mainType, !0), u = Lb(s)[o];
  79703. if (!l || !l.data) {
  79704. Lb(s)[o] = null;
  79705. return;
  79706. }
  79707. u ? u._mergeOption(l, r, !0) : (a && kb(l), k(l.data, function(c) {
  79708. c instanceof Array ? (kb(c[0]), kb(c[1])) : kb(c);
  79709. }), u = this.createMarkerModelFromSeries(l, this, r), le(u, {
  79710. mainType: this.mainType,
  79711. // Use the same series index and name
  79712. seriesIndex: s.seriesIndex,
  79713. name: s.name,
  79714. createdBySelf: !0
  79715. }), u.__hostSeries = s), Lb(s)[o] = u;
  79716. }, this);
  79717. }, e.prototype.formatTooltip = function(n, r, i) {
  79718. var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
  79719. return tr("section", {
  79720. header: this.name,
  79721. blocks: [tr("nameValue", {
  79722. name: s,
  79723. value: o,
  79724. noName: !s,
  79725. noValue: o == null
  79726. })]
  79727. });
  79728. }, e.prototype.getData = function() {
  79729. return this._data;
  79730. }, e.prototype.setData = function(n) {
  79731. this._data = n;
  79732. }, e.prototype.getDataParams = function(n, r) {
  79733. var i = sw.prototype.getDataParams.call(this, n, r), a = this.__hostSeries;
  79734. return a && (i.seriesId = a.id, i.seriesName = a.name, i.seriesType = a.subType), i;
  79735. }, e.getMarkerModelFromSeries = function(n, r) {
  79736. return Lb(n)[r];
  79737. }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
  79738. }(rt)
  79739. );
  79740. xn(Ks, sw.prototype);
  79741. var f9e = (
  79742. /** @class */
  79743. function(t) {
  79744. q(e, t);
  79745. function e() {
  79746. var n = t !== null && t.apply(this, arguments) || this;
  79747. return n.type = e.type, n;
  79748. }
  79749. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  79750. return new e(n, r, i);
  79751. }, e.type = "markPoint", e.defaultOption = {
  79752. // zlevel: 0,
  79753. z: 5,
  79754. symbol: "pin",
  79755. symbolSize: 50,
  79756. // symbolRotate: 0,
  79757. // symbolOffset: [0, 0]
  79758. tooltip: {
  79759. trigger: "item"
  79760. },
  79761. label: {
  79762. show: !0,
  79763. position: "inside"
  79764. },
  79765. itemStyle: {
  79766. borderWidth: 2
  79767. },
  79768. emphasis: {
  79769. label: {
  79770. show: !0
  79771. }
  79772. }
  79773. }, e;
  79774. }(Ks)
  79775. );
  79776. function BE(t) {
  79777. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
  79778. }
  79779. function d9e(t) {
  79780. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
  79781. }
  79782. function Nb(t, e, n, r, i, a) {
  79783. var o = [], s = Xs(
  79784. e,
  79785. r
  79786. /* , otherDataDim */
  79787. ), l = s ? e.getCalculationInfo("stackResultDimension") : r, u = $L(e, l, t), c = e.indicesOfNearest(l, u)[0];
  79788. o[i] = e.get(n, c), o[a] = e.get(l, c);
  79789. var f = e.get(r, c), d = Ua(e.get(r, c));
  79790. return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, f];
  79791. }
  79792. var KP = {
  79793. min: Ue(Nb, "min"),
  79794. max: Ue(Nb, "max"),
  79795. average: Ue(Nb, "average"),
  79796. median: Ue(Nb, "median")
  79797. };
  79798. function Wm(t, e) {
  79799. if (e) {
  79800. var n = t.getData(), r = t.coordinateSystem, i = r && r.dimensions;
  79801. if (!d9e(e) && !ue(e.coord) && ue(i)) {
  79802. var a = Jre(e, n, r, t);
  79803. if (e = Le(e), e.type && KP[e.type] && a.baseAxis && a.valueAxis) {
  79804. var o = et(i, a.baseAxis.dim), s = et(i, a.valueAxis.dim), l = KP[e.type](n, a.baseDataDim, a.valueDataDim, o, s);
  79805. e.coord = l[0], e.value = l[1];
  79806. } else
  79807. e.coord = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis];
  79808. }
  79809. if (e.coord == null || !ue(i))
  79810. e.coord = [];
  79811. else
  79812. for (var u = e.coord, c = 0; c < 2; c++)
  79813. KP[u[c]] && (u[c] = $L(n, n.mapDimension(i[c]), u[c]));
  79814. return e;
  79815. }
  79816. }
  79817. function Jre(t, e, n, r) {
  79818. var i = {};
  79819. return t.valueIndex != null || t.valueDim != null ? (i.valueDataDim = t.valueIndex != null ? e.getDimension(t.valueIndex) : t.valueDim, i.valueAxis = n.getAxis(h9e(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;
  79820. }
  79821. function h9e(t, e) {
  79822. var n = t.getData().getDimensionInfo(e);
  79823. return n && n.coordDim;
  79824. }
  79825. function Qm(t, e) {
  79826. return t && t.containData && e.coord && !BE(e) ? t.containData(e.coord) : !0;
  79827. }
  79828. function p9e(t, e, n) {
  79829. return t && t.containZone && e.coord && n.coord && !BE(e) && !BE(n) ? t.containZone(e.coord, n.coord) : !0;
  79830. }
  79831. function eie(t, e) {
  79832. return t ? function(n, r, i, a) {
  79833. var o = a < 2 ? n.coord && n.coord[a] : n.value;
  79834. return Kl(o, e[a]);
  79835. } : function(n, r, i, a) {
  79836. return Kl(n.value, e[a]);
  79837. };
  79838. }
  79839. function $L(t, e, n) {
  79840. if (n === "average") {
  79841. var r = 0, i = 0;
  79842. return t.each(e, function(a, o) {
  79843. isNaN(a) || (r += a, i++);
  79844. }), r / i;
  79845. } else return n === "median" ? t.getMedian(e) : t.getDataExtent(e)[n === "max" ? 1 : 0];
  79846. }
  79847. var JP = bt(), AL = (
  79848. /** @class */
  79849. function(t) {
  79850. q(e, t);
  79851. function e() {
  79852. var n = t !== null && t.apply(this, arguments) || this;
  79853. return n.type = e.type, n;
  79854. }
  79855. return e.prototype.init = function() {
  79856. this.markerGroupMap = Pe();
  79857. }, e.prototype.render = function(n, r, i) {
  79858. var a = this, o = this.markerGroupMap;
  79859. o.each(function(s) {
  79860. JP(s).keep = !1;
  79861. }), r.eachSeries(function(s) {
  79862. var l = Ks.getMarkerModelFromSeries(s, a.type);
  79863. l && a.renderSeries(s, l, r, i);
  79864. }), o.each(function(s) {
  79865. !JP(s).keep && a.group.remove(s.group);
  79866. });
  79867. }, e.prototype.markKeep = function(n) {
  79868. JP(n).keep = !0;
  79869. }, e.prototype.toggleBlurSeries = function(n, r) {
  79870. var i = this;
  79871. k(n, function(a) {
  79872. var o = Ks.getMarkerModelFromSeries(a, i.type);
  79873. if (o) {
  79874. var s = o.getData();
  79875. s.eachItemGraphicEl(function(l) {
  79876. l && (r ? LK(l) : NR(l));
  79877. });
  79878. }
  79879. });
  79880. }, e.type = "marker", e;
  79881. }(Xt)
  79882. );
  79883. function j7(t, e, n) {
  79884. var r = e.coordinateSystem;
  79885. t.each(function(i) {
  79886. var a = t.getItemModel(i), o, s = _e(a.get("x"), n.getWidth()), l = _e(a.get("y"), n.getHeight());
  79887. if (!isNaN(s) && !isNaN(l))
  79888. o = [s, l];
  79889. else if (e.getMarkerPosition)
  79890. o = e.getMarkerPosition(t.getValues(t.dimensions, i));
  79891. else if (r) {
  79892. var u = t.get(r.dimensions[0], i), c = t.get(r.dimensions[1], i);
  79893. o = r.dataToPoint([u, c]);
  79894. }
  79895. isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(i, o);
  79896. });
  79897. }
  79898. var v9e = (
  79899. /** @class */
  79900. function(t) {
  79901. q(e, t);
  79902. function e() {
  79903. var n = t !== null && t.apply(this, arguments) || this;
  79904. return n.type = e.type, n;
  79905. }
  79906. return e.prototype.updateTransform = function(n, r, i) {
  79907. r.eachSeries(function(a) {
  79908. var o = Ks.getMarkerModelFromSeries(a, "markPoint");
  79909. o && (j7(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout());
  79910. }, this);
  79911. }, e.prototype.renderSeries = function(n, r, i, a) {
  79912. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Z0()), f = g9e(o, n, r);
  79913. r.setData(f), j7(r.getData(), n, a), f.each(function(d) {
  79914. 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");
  79915. if (Me(p) || Me(v) || Me(g) || Me(m)) {
  79916. var b = r.getRawValue(d), _ = r.getDataParams(d);
  79917. Me(p) && (p = p(b, _)), Me(v) && (v = v(b, _)), Me(g) && (g = g(b, _)), Me(m) && (m = m(b, _));
  79918. }
  79919. var O = h.getModel("itemStyle").getItemStyle(), S = H0(l, "color");
  79920. O.fill || (O.fill = S), f.setItemVisual(d, {
  79921. symbol: p,
  79922. symbolSize: v,
  79923. symbolRotate: g,
  79924. symbolOffset: m,
  79925. symbolKeepAspect: y,
  79926. style: O
  79927. });
  79928. }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(d) {
  79929. d.traverse(function(h) {
  79930. Fe(h).dataModel = r;
  79931. });
  79932. }), this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
  79933. }, e.type = "markPoint", e;
  79934. }(AL)
  79935. );
  79936. function g9e(t, e, n) {
  79937. var r;
  79938. t ? r = ce(t && t.dimensions, function(s) {
  79939. var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
  79940. return le(le({}, l), {
  79941. name: s,
  79942. // DON'T use ordinalMeta to parse and collect ordinal.
  79943. ordinalMeta: null
  79944. });
  79945. }) : r = [{
  79946. name: "value",
  79947. type: "float"
  79948. }];
  79949. var i = new Lr(r, n), a = ce(n.get("data"), Ue(Wm, e));
  79950. t && (a = Nt(a, Ue(Qm, t)));
  79951. var o = eie(!!t, r);
  79952. return i.initData(a, null, o), i;
  79953. }
  79954. function m9e(t) {
  79955. t.registerComponentModel(f9e), t.registerComponentView(v9e), t.registerPreprocessor(function(e) {
  79956. PL(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
  79957. });
  79958. }
  79959. var y9e = (
  79960. /** @class */
  79961. function(t) {
  79962. q(e, t);
  79963. function e() {
  79964. var n = t !== null && t.apply(this, arguments) || this;
  79965. return n.type = e.type, n;
  79966. }
  79967. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  79968. return new e(n, r, i);
  79969. }, e.type = "markLine", e.defaultOption = {
  79970. // zlevel: 0,
  79971. z: 5,
  79972. symbol: ["circle", "arrow"],
  79973. symbolSize: [8, 16],
  79974. // symbolRotate: 0,
  79975. symbolOffset: 0,
  79976. precision: 2,
  79977. tooltip: {
  79978. trigger: "item"
  79979. },
  79980. label: {
  79981. show: !0,
  79982. position: "end",
  79983. distance: 5
  79984. },
  79985. lineStyle: {
  79986. type: "dashed"
  79987. },
  79988. emphasis: {
  79989. label: {
  79990. show: !0
  79991. },
  79992. lineStyle: {
  79993. width: 3
  79994. }
  79995. },
  79996. animationEasing: "linear"
  79997. }, e;
  79998. }(Ks)
  79999. ), Bb = bt(), b9e = function(t, e, n, r) {
  80000. var i = t.getData(), a;
  80001. if (ue(r))
  80002. a = r;
  80003. else {
  80004. var o = r.type;
  80005. if (o === "min" || o === "max" || o === "average" || o === "median" || r.xAxis != null || r.yAxis != null) {
  80006. var s = void 0, l = void 0;
  80007. if (r.yAxis != null || r.xAxis != null)
  80008. s = e.getAxis(r.yAxis != null ? "y" : "x"), l = Tn(r.yAxis, r.xAxis);
  80009. else {
  80010. var u = Jre(r, i, e, t);
  80011. s = u.valueAxis;
  80012. var c = Sk(i, u.valueDataDim);
  80013. l = $L(i, c, o);
  80014. }
  80015. var f = s.dim === "x" ? 0 : 1, d = 1 - f, h = Le(r), p = {
  80016. coord: []
  80017. };
  80018. h.type = null, h.coord = [], h.coord[d] = -1 / 0, p.coord[d] = 1 / 0;
  80019. var v = n.get("precision");
  80020. v >= 0 && St(l) && (l = +l.toFixed(Math.min(v, 20))), h.coord[f] = p.coord[f] = l, a = [h, p, {
  80021. type: o,
  80022. valueIndex: r.valueIndex,
  80023. // Force to use the value of calculated value.
  80024. value: l
  80025. }];
  80026. } else
  80027. process.env.NODE_ENV !== "production" && Oa("Invalid markLine data."), a = [];
  80028. }
  80029. var g = [Wm(t, a[0]), Wm(t, a[1]), le({}, a[2])];
  80030. return g[2].type = g[2].type || null, qe(g[2], g[0]), qe(g[2], g[1]), g;
  80031. };
  80032. function QO(t) {
  80033. return !isNaN(t) && !isFinite(t);
  80034. }
  80035. function Z7(t, e, n, r) {
  80036. var i = 1 - t, a = r.dimensions[t];
  80037. return QO(e[i]) && QO(n[i]) && e[t] === n[t] && r.getAxis(a).containData(e[t]);
  80038. }
  80039. function _9e(t, e) {
  80040. if (t.type === "cartesian2d") {
  80041. var n = e[0].coord, r = e[1].coord;
  80042. if (n && r && (Z7(1, n, r, t) || Z7(0, n, r, t)))
  80043. return !0;
  80044. }
  80045. return Qm(t, e[0]) && Qm(t, e[1]);
  80046. }
  80047. function e$(t, e, n, r, i) {
  80048. var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get("x"), i.getWidth()), u = _e(o.get("y"), i.getHeight());
  80049. if (!isNaN(l) && !isNaN(u))
  80050. s = [l, u];
  80051. else {
  80052. if (r.getMarkerPosition)
  80053. s = r.getMarkerPosition(t.getValues(t.dimensions, e));
  80054. else {
  80055. var c = a.dimensions, f = t.get(c[0], e), d = t.get(c[1], e);
  80056. s = a.dataToPoint([f, d]);
  80057. }
  80058. if (Ff(a, "cartesian2d")) {
  80059. var h = a.getAxis("x"), p = a.getAxis("y"), c = a.dimensions;
  80060. QO(t.get(c[0], e)) ? s[0] = h.toGlobalCoord(h.getExtent()[n ? 0 : 1]) : QO(t.get(c[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[n ? 0 : 1]));
  80061. }
  80062. isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  80063. }
  80064. t.setItemLayout(e, s);
  80065. }
  80066. var O9e = (
  80067. /** @class */
  80068. function(t) {
  80069. q(e, t);
  80070. function e() {
  80071. var n = t !== null && t.apply(this, arguments) || this;
  80072. return n.type = e.type, n;
  80073. }
  80074. return e.prototype.updateTransform = function(n, r, i) {
  80075. r.eachSeries(function(a) {
  80076. var o = Ks.getMarkerModelFromSeries(a, "markLine");
  80077. if (o) {
  80078. var s = o.getData(), l = Bb(o).from, u = Bb(o).to;
  80079. l.each(function(c) {
  80080. e$(l, c, !0, a, i), e$(u, c, !1, a, i);
  80081. }), s.each(function(c) {
  80082. s.setItemLayout(c, [l.getItemLayout(c), u.getItemLayout(c)]);
  80083. }), this.markerGroupMap.get(a.id).updateLayout();
  80084. }
  80085. }, this);
  80086. }, e.prototype.renderSeries = function(n, r, i, a) {
  80087. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Kk());
  80088. this.group.add(c.group);
  80089. var f = S9e(o, n, r), d = f.from, h = f.to, p = f.line;
  80090. Bb(r).from = d, Bb(r).to = h, r.setData(p);
  80091. var v = r.get("symbol"), g = r.get("symbolSize"), m = r.get("symbolRotate"), y = r.get("symbolOffset");
  80092. ue(v) || (v = [v, v]), ue(g) || (g = [g, g]), ue(m) || (m = [m, m]), ue(y) || (y = [y, y]), f.from.each(function(_) {
  80093. b(d, _, !0), b(h, _, !1);
  80094. }), p.each(function(_) {
  80095. var O = p.getItemModel(_).getModel("lineStyle").getLineStyle();
  80096. p.setItemLayout(_, [d.getItemLayout(_), h.getItemLayout(_)]), O.stroke == null && (O.stroke = d.getItemVisual(_, "style").fill), p.setItemVisual(_, {
  80097. fromSymbolKeepAspect: d.getItemVisual(_, "symbolKeepAspect"),
  80098. fromSymbolOffset: d.getItemVisual(_, "symbolOffset"),
  80099. fromSymbolRotate: d.getItemVisual(_, "symbolRotate"),
  80100. fromSymbolSize: d.getItemVisual(_, "symbolSize"),
  80101. fromSymbol: d.getItemVisual(_, "symbol"),
  80102. toSymbolKeepAspect: h.getItemVisual(_, "symbolKeepAspect"),
  80103. toSymbolOffset: h.getItemVisual(_, "symbolOffset"),
  80104. toSymbolRotate: h.getItemVisual(_, "symbolRotate"),
  80105. toSymbolSize: h.getItemVisual(_, "symbolSize"),
  80106. toSymbol: h.getItemVisual(_, "symbol"),
  80107. style: O
  80108. });
  80109. }), c.updateData(p), f.line.eachItemGraphicEl(function(_) {
  80110. Fe(_).dataModel = r, _.traverse(function(O) {
  80111. Fe(O).dataModel = r;
  80112. });
  80113. });
  80114. function b(_, O, S) {
  80115. var x = _.getItemModel(O);
  80116. e$(_, O, S, n, a);
  80117. var C = x.getModel("itemStyle").getItemStyle();
  80118. C.fill == null && (C.fill = H0(l, "color")), _.setItemVisual(O, {
  80119. symbolKeepAspect: x.get("symbolKeepAspect"),
  80120. // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
  80121. symbolOffset: We(x.get("symbolOffset", !0), y[S ? 0 : 1]),
  80122. symbolRotate: We(x.get("symbolRotate", !0), m[S ? 0 : 1]),
  80123. // TODO: when 2d array is supported, it should ignore parent
  80124. symbolSize: We(x.get("symbolSize"), g[S ? 0 : 1]),
  80125. symbol: We(x.get("symbol", !0), v[S ? 0 : 1]),
  80126. style: C
  80127. });
  80128. }
  80129. this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
  80130. }, e.type = "markLine", e;
  80131. }(AL)
  80132. );
  80133. function S9e(t, e, n) {
  80134. var r;
  80135. t ? r = ce(t && t.dimensions, function(u) {
  80136. var c = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
  80137. return le(le({}, c), {
  80138. name: u,
  80139. // DON'T use ordinalMeta to parse and collect ordinal.
  80140. ordinalMeta: null
  80141. });
  80142. }) : r = [{
  80143. name: "value",
  80144. type: "float"
  80145. }];
  80146. var i = new Lr(r, n), a = new Lr(r, n), o = new Lr([], n), s = ce(n.get("data"), Ue(b9e, e, t, n));
  80147. t && (s = Nt(s, Ue(_9e, t)));
  80148. var l = eie(!!t, r);
  80149. return i.initData(ce(s, function(u) {
  80150. return u[0];
  80151. }), null, l), a.initData(ce(s, function(u) {
  80152. return u[1];
  80153. }), null, l), o.initData(ce(s, function(u) {
  80154. return u[2];
  80155. })), o.hasItemOption = !0, {
  80156. from: i,
  80157. to: a,
  80158. line: o
  80159. };
  80160. }
  80161. function x9e(t) {
  80162. t.registerComponentModel(y9e), t.registerComponentView(O9e), t.registerPreprocessor(function(e) {
  80163. PL(e.series, "markLine") && (e.markLine = e.markLine || {});
  80164. });
  80165. }
  80166. var w9e = (
  80167. /** @class */
  80168. function(t) {
  80169. q(e, t);
  80170. function e() {
  80171. var n = t !== null && t.apply(this, arguments) || this;
  80172. return n.type = e.type, n;
  80173. }
  80174. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  80175. return new e(n, r, i);
  80176. }, e.type = "markArea", e.defaultOption = {
  80177. // zlevel: 0,
  80178. // PENDING
  80179. z: 1,
  80180. tooltip: {
  80181. trigger: "item"
  80182. },
  80183. // markArea should fixed on the coordinate system
  80184. animation: !1,
  80185. label: {
  80186. show: !0,
  80187. position: "top"
  80188. },
  80189. itemStyle: {
  80190. // color and borderColor default to use color from series
  80191. // color: 'auto'
  80192. // borderColor: 'auto'
  80193. borderWidth: 0
  80194. },
  80195. emphasis: {
  80196. label: {
  80197. show: !0,
  80198. position: "top"
  80199. }
  80200. }
  80201. }, e;
  80202. }(Ks)
  80203. ), zb = bt(), C9e = function(t, e, n, r) {
  80204. var i = r[0], a = r[1];
  80205. if (!(!i || !a)) {
  80206. var o = Wm(t, i), s = Wm(t, a), l = o.coord, u = s.coord;
  80207. 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);
  80208. var c = Dx([{}, o, s]);
  80209. return c.coord = [o.coord, s.coord], c.x0 = o.x, c.y0 = o.y, c.x1 = s.x, c.y1 = s.y, c;
  80210. }
  80211. };
  80212. function HO(t) {
  80213. return !isNaN(t) && !isFinite(t);
  80214. }
  80215. function U7(t, e, n, r) {
  80216. var i = 1 - t;
  80217. return HO(e[i]) && HO(n[i]);
  80218. }
  80219. function T9e(t, e) {
  80220. var n = e.coord[0], r = e.coord[1], i = {
  80221. coord: n,
  80222. x: e.x0,
  80223. y: e.y0
  80224. }, a = {
  80225. coord: r,
  80226. x: e.x1,
  80227. y: e.y1
  80228. };
  80229. return Ff(t, "cartesian2d") ? n && r && (U7(1, n, r) || U7(0, n, r)) ? !0 : p9e(t, i, a) : Qm(t, i) || Qm(t, a);
  80230. }
  80231. function X7(t, e, n, r, i) {
  80232. 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());
  80233. if (!isNaN(l) && !isNaN(u))
  80234. s = [l, u];
  80235. else {
  80236. if (r.getMarkerPosition) {
  80237. var c = t.getValues(["x0", "y0"], e), f = t.getValues(["x1", "y1"], e), d = a.clampData(c), h = a.clampData(f), p = [];
  80238. 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);
  80239. } else {
  80240. var v = t.get(n[0], e), g = t.get(n[1], e), m = [v, g];
  80241. a.clampData && a.clampData(m, m), s = a.dataToPoint(m, !0);
  80242. }
  80243. if (Ff(a, "cartesian2d")) {
  80244. var y = a.getAxis("x"), b = a.getAxis("y"), v = t.get(n[0], e), g = t.get(n[1], e);
  80245. HO(v) ? s[0] = y.toGlobalCoord(y.getExtent()[n[0] === "x0" ? 0 : 1]) : HO(g) && (s[1] = b.toGlobalCoord(b.getExtent()[n[1] === "y0" ? 0 : 1]));
  80246. }
  80247. isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  80248. }
  80249. return s;
  80250. }
  80251. var Y7 = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], P9e = (
  80252. /** @class */
  80253. function(t) {
  80254. q(e, t);
  80255. function e() {
  80256. var n = t !== null && t.apply(this, arguments) || this;
  80257. return n.type = e.type, n;
  80258. }
  80259. return e.prototype.updateTransform = function(n, r, i) {
  80260. r.eachSeries(function(a) {
  80261. var o = Ks.getMarkerModelFromSeries(a, "markArea");
  80262. if (o) {
  80263. var s = o.getData();
  80264. s.each(function(l) {
  80265. var u = ce(Y7, function(f) {
  80266. return X7(s, l, f, a, i);
  80267. });
  80268. s.setItemLayout(l, u);
  80269. var c = s.getItemGraphicEl(l);
  80270. c.setShape("points", u);
  80271. });
  80272. }
  80273. }, this);
  80274. }, e.prototype.renderSeries = function(n, r, i, a) {
  80275. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, {
  80276. group: new Ve()
  80277. });
  80278. this.group.add(c.group), this.markKeep(c);
  80279. var f = $9e(o, n, r);
  80280. r.setData(f), f.each(function(d) {
  80281. var h = ce(Y7, function(C) {
  80282. return X7(f, d, C, n, a);
  80283. }), 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))];
  80284. Vi(y), Vi(b);
  80285. var _ = !(g[0] > y[1] || g[1] < y[0] || m[0] > b[1] || m[1] < b[0]), O = !_;
  80286. f.setItemLayout(d, {
  80287. points: h,
  80288. allClipped: O
  80289. });
  80290. var S = f.getItemModel(d).getModel("itemStyle").getItemStyle(), x = H0(l, "color");
  80291. S.fill || (S.fill = x, Oe(S.fill) && (S.fill = _m(S.fill, 0.4))), S.stroke || (S.stroke = x), f.setItemVisual(d, "style", S);
  80292. }), f.diff(zb(c).data).add(function(d) {
  80293. var h = f.getItemLayout(d);
  80294. if (!h.allClipped) {
  80295. var p = new ii({
  80296. shape: {
  80297. points: h.points
  80298. }
  80299. });
  80300. f.setItemGraphicEl(d, p), c.group.add(p);
  80301. }
  80302. }).update(function(d, h) {
  80303. var p = zb(c).data.getItemGraphicEl(h), v = f.getItemLayout(d);
  80304. v.allClipped ? p && c.group.remove(p) : (p ? Ct(p, {
  80305. shape: {
  80306. points: v.points
  80307. }
  80308. }, r, d) : p = new ii({
  80309. shape: {
  80310. points: v.points
  80311. }
  80312. }), f.setItemGraphicEl(d, p), c.group.add(p));
  80313. }).remove(function(d) {
  80314. var h = zb(c).data.getItemGraphicEl(d);
  80315. c.group.remove(h);
  80316. }).execute(), f.eachItemGraphicEl(function(d, h) {
  80317. var p = f.getItemModel(h), v = f.getItemVisual(h, "style");
  80318. d.useStyle(f.getItemVisual(h, "style")), Pr(d, er(p), {
  80319. labelFetcher: r,
  80320. labelDataIndex: h,
  80321. defaultText: f.getName(h) || "",
  80322. inheritColor: Oe(v.fill) ? _m(v.fill, 1) : "#000"
  80323. }), Tr(d, p), bn(d, null, null, p.get(["emphasis", "disabled"])), Fe(d).dataModel = r;
  80324. }), zb(c).data = f, c.group.silent = r.get("silent") || n.get("silent");
  80325. }, e.type = "markArea", e;
  80326. }(AL)
  80327. );
  80328. function $9e(t, e, n) {
  80329. var r, i, a = ["x0", "y0", "x1", "y1"];
  80330. if (t) {
  80331. var o = ce(t && t.dimensions, function(u) {
  80332. var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(u)) || {};
  80333. return le(le({}, f), {
  80334. name: u,
  80335. // DON'T use ordinalMeta to parse and collect ordinal.
  80336. ordinalMeta: null
  80337. });
  80338. });
  80339. i = ce(a, function(u, c) {
  80340. return {
  80341. name: u,
  80342. type: o[c % 2].type
  80343. };
  80344. }), r = new Lr(i, n);
  80345. } else
  80346. i = [{
  80347. name: "value",
  80348. type: "float"
  80349. }], r = new Lr(i, n);
  80350. var s = ce(n.get("data"), Ue(C9e, e, t, n));
  80351. t && (s = Nt(s, Ue(T9e, t)));
  80352. var l = t ? function(u, c, f, d) {
  80353. var h = u.coord[Math.floor(d / 2)][d % 2];
  80354. return Kl(h, i[d]);
  80355. } : function(u, c, f, d) {
  80356. return Kl(u.value, i[d]);
  80357. };
  80358. return r.initData(s, null, l), r.hasItemOption = !0, r;
  80359. }
  80360. function A9e(t) {
  80361. t.registerComponentModel(w9e), t.registerComponentView(P9e), t.registerPreprocessor(function(e) {
  80362. PL(e.series, "markArea") && (e.markArea = e.markArea || {});
  80363. });
  80364. }
  80365. var E9e = function(t, e) {
  80366. if (e === "all")
  80367. return {
  80368. type: "all",
  80369. title: t.getLocaleModel().get(["legend", "selector", "all"])
  80370. };
  80371. if (e === "inverse")
  80372. return {
  80373. type: "inverse",
  80374. title: t.getLocaleModel().get(["legend", "selector", "inverse"])
  80375. };
  80376. }, zE = (
  80377. /** @class */
  80378. function(t) {
  80379. q(e, t);
  80380. function e() {
  80381. var n = t !== null && t.apply(this, arguments) || this;
  80382. return n.type = e.type, n.layoutMode = {
  80383. type: "box",
  80384. // legend.width/height are maxWidth/maxHeight actually,
  80385. // whereas real width/height is calculated by its content.
  80386. // (Setting {left: 10, right: 10} does not make sense).
  80387. // So consider the case:
  80388. // `setOption({legend: {left: 10});`
  80389. // then `setOption({legend: {right: 10});`
  80390. // The previous `left` should be cleared by setting `ignoreSize`.
  80391. ignoreSize: !0
  80392. }, n;
  80393. }
  80394. return e.prototype.init = function(n, r, i) {
  80395. this.mergeDefaultAndTheme(n, i), n.selected = n.selected || {}, this._updateSelector(n);
  80396. }, e.prototype.mergeOption = function(n, r) {
  80397. t.prototype.mergeOption.call(this, n, r), this._updateSelector(n);
  80398. }, e.prototype._updateSelector = function(n) {
  80399. var r = n.selector, i = this.ecModel;
  80400. r === !0 && (r = n.selector = ["all", "inverse"]), ue(r) && k(r, function(a, o) {
  80401. Oe(a) && (a = {
  80402. type: a
  80403. }), r[o] = qe(a, E9e(i, a.type));
  80404. });
  80405. }, e.prototype.optionUpdated = function() {
  80406. this._updateData(this.ecModel);
  80407. var n = this._data;
  80408. if (n[0] && this.get("selectedMode") === "single") {
  80409. for (var r = !1, i = 0; i < n.length; i++) {
  80410. var a = n[i].get("name");
  80411. if (this.isSelected(a)) {
  80412. this.select(a), r = !0;
  80413. break;
  80414. }
  80415. }
  80416. !r && this.select(n[0].get("name"));
  80417. }
  80418. }, e.prototype._updateData = function(n) {
  80419. var r = [], i = [];
  80420. n.eachRawSeries(function(l) {
  80421. var u = l.name;
  80422. i.push(u);
  80423. var c;
  80424. if (l.legendVisualProvider) {
  80425. var f = l.legendVisualProvider, d = f.getAllNames();
  80426. n.isSeriesFiltered(l) || (i = i.concat(d)), d.length ? r = r.concat(d) : c = !0;
  80427. } else
  80428. c = !0;
  80429. c && AR(l) && r.push(l.name);
  80430. }), this._availableNames = i;
  80431. var a = this.get("data") || r, o = Pe(), s = ce(a, function(l) {
  80432. return (Oe(l) || St(l)) && (l = {
  80433. name: l
  80434. }), o.get(l.name) ? null : (o.set(l.name, !0), new Wt(l, this, this.ecModel));
  80435. }, this);
  80436. this._data = Nt(s, function(l) {
  80437. return !!l;
  80438. });
  80439. }, e.prototype.getData = function() {
  80440. return this._data;
  80441. }, e.prototype.select = function(n) {
  80442. var r = this.option.selected, i = this.get("selectedMode");
  80443. if (i === "single") {
  80444. var a = this._data;
  80445. k(a, function(o) {
  80446. r[o.get("name")] = !1;
  80447. });
  80448. }
  80449. r[n] = !0;
  80450. }, e.prototype.unSelect = function(n) {
  80451. this.get("selectedMode") !== "single" && (this.option.selected[n] = !1);
  80452. }, e.prototype.toggleSelected = function(n) {
  80453. var r = this.option.selected;
  80454. r.hasOwnProperty(n) || (r[n] = !0), this[r[n] ? "unSelect" : "select"](n);
  80455. }, e.prototype.allSelect = function() {
  80456. var n = this._data, r = this.option.selected;
  80457. k(n, function(i) {
  80458. r[i.get("name", !0)] = !0;
  80459. });
  80460. }, e.prototype.inverseSelect = function() {
  80461. var n = this._data, r = this.option.selected;
  80462. k(n, function(i) {
  80463. var a = i.get("name", !0);
  80464. r.hasOwnProperty(a) || (r[a] = !0), r[a] = !r[a];
  80465. });
  80466. }, e.prototype.isSelected = function(n) {
  80467. var r = this.option.selected;
  80468. return !(r.hasOwnProperty(n) && !r[n]) && et(this._availableNames, n) >= 0;
  80469. }, e.prototype.getOrient = function() {
  80470. return this.get("orient") === "vertical" ? {
  80471. index: 1,
  80472. name: "vertical"
  80473. } : {
  80474. index: 0,
  80475. name: "horizontal"
  80476. };
  80477. }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
  80478. // zlevel: 0,
  80479. z: 4,
  80480. show: !0,
  80481. orient: "horizontal",
  80482. left: "center",
  80483. // right: 'center',
  80484. top: 0,
  80485. // bottom: null,
  80486. align: "auto",
  80487. backgroundColor: "rgba(0,0,0,0)",
  80488. borderColor: "#ccc",
  80489. borderRadius: 0,
  80490. borderWidth: 0,
  80491. padding: 5,
  80492. itemGap: 10,
  80493. itemWidth: 25,
  80494. itemHeight: 14,
  80495. symbolRotate: "inherit",
  80496. symbolKeepAspect: !0,
  80497. inactiveColor: "#ccc",
  80498. inactiveBorderColor: "#ccc",
  80499. inactiveBorderWidth: "auto",
  80500. itemStyle: {
  80501. color: "inherit",
  80502. opacity: "inherit",
  80503. borderColor: "inherit",
  80504. borderWidth: "auto",
  80505. borderCap: "inherit",
  80506. borderJoin: "inherit",
  80507. borderDashOffset: "inherit",
  80508. borderMiterLimit: "inherit"
  80509. },
  80510. lineStyle: {
  80511. width: "auto",
  80512. color: "inherit",
  80513. inactiveColor: "#ccc",
  80514. inactiveWidth: 2,
  80515. opacity: "inherit",
  80516. type: "inherit",
  80517. cap: "inherit",
  80518. join: "inherit",
  80519. dashOffset: "inherit",
  80520. miterLimit: "inherit"
  80521. },
  80522. textStyle: {
  80523. color: "#333"
  80524. },
  80525. selectedMode: !0,
  80526. selector: !1,
  80527. selectorLabel: {
  80528. show: !0,
  80529. borderRadius: 10,
  80530. padding: [3, 5, 3, 5],
  80531. fontSize: 12,
  80532. fontFamily: "sans-serif",
  80533. color: "#666",
  80534. borderWidth: 1,
  80535. borderColor: "#666"
  80536. },
  80537. emphasis: {
  80538. selectorLabel: {
  80539. show: !0,
  80540. color: "#eee",
  80541. backgroundColor: "#666"
  80542. }
  80543. },
  80544. selectorPosition: "auto",
  80545. selectorItemGap: 7,
  80546. selectorButtonGap: 10,
  80547. tooltip: {
  80548. show: !1
  80549. }
  80550. }, e;
  80551. }(rt)
  80552. ), bd = Ue, VE = k, Vb = Ve, tie = (
  80553. /** @class */
  80554. function(t) {
  80555. q(e, t);
  80556. function e() {
  80557. var n = t !== null && t.apply(this, arguments) || this;
  80558. return n.type = e.type, n.newlineDisabled = !1, n;
  80559. }
  80560. return e.prototype.init = function() {
  80561. this.group.add(this._contentGroup = new Vb()), this.group.add(this._selectorGroup = new Vb()), this._isFirstRender = !0;
  80562. }, e.prototype.getContentGroup = function() {
  80563. return this._contentGroup;
  80564. }, e.prototype.getSelectorGroup = function() {
  80565. return this._selectorGroup;
  80566. }, e.prototype.render = function(n, r, i) {
  80567. var a = this._isFirstRender;
  80568. if (this._isFirstRender = !1, this.resetInner(), !!n.get("show", !0)) {
  80569. var o = n.get("align"), s = n.get("orient");
  80570. (!o || o === "auto") && (o = n.get("left") === "right" && s === "vertical" ? "right" : "left");
  80571. var l = n.get("selector", !0), u = n.get("selectorPosition", !0);
  80572. l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, n, r, i, l, s, u);
  80573. var c = n.getBoxLayoutParams(), f = {
  80574. width: i.getWidth(),
  80575. height: i.getHeight()
  80576. }, d = n.get("padding"), h = Rn(c, f, d), p = this.layoutInner(n, o, h, a, l, u), v = Rn(Re({
  80577. width: p.width,
  80578. height: p.height
  80579. }, c), f, d);
  80580. this.group.x = v.x - p.x, this.group.y = v.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = Qre(p, n));
  80581. }
  80582. }, e.prototype.resetInner = function() {
  80583. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
  80584. }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
  80585. var u = this.getContentGroup(), c = Pe(), f = r.get("selectedMode"), d = [];
  80586. i.eachRawSeries(function(h) {
  80587. !h.get("legendHoverLink") && d.push(h.id);
  80588. }), VE(r.getData(), function(h, p) {
  80589. var v = h.get("name");
  80590. if (!this.newlineDisabled && (v === "" || v === `
  80591. `)) {
  80592. var g = new Vb();
  80593. g.newline = !0, u.add(g);
  80594. return;
  80595. }
  80596. var m = i.getSeriesByName(v)[0];
  80597. if (!c.get(v)) {
  80598. if (m) {
  80599. 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);
  80600. S.on("click", bd(q7, v, null, a, d)).on("mouseover", bd(FE, m.name, null, a, d)).on("mouseout", bd(WE, m.name, null, a, d)), i.ssr && S.eachChild(function(x) {
  80601. var C = Fe(x);
  80602. C.seriesIndex = m.seriesIndex, C.dataIndex = p, C.ssrType = "legend";
  80603. }), c.set(v, !0);
  80604. } else
  80605. i.eachRawSeries(function(x) {
  80606. if (!c.get(v) && x.legendVisualProvider) {
  80607. var C = x.legendVisualProvider;
  80608. if (!C.containName(v))
  80609. return;
  80610. var T = C.indexOfName(v), w = C.getItemVisual(T, "style"), P = C.getItemVisual(T, "legendIcon"), $ = qr(w.fill);
  80611. $ && $[3] === 0 && ($[3] = 0.2, w = le(le({}, w), {
  80612. fill: eo($, "rgba")
  80613. }));
  80614. var A = this._createItem(x, v, p, h, r, n, {}, w, P, f, a);
  80615. A.on("click", bd(q7, null, v, a, d)).on("mouseover", bd(FE, null, v, a, d)).on("mouseout", bd(WE, null, v, a, d)), i.ssr && A.eachChild(function(D) {
  80616. var E = Fe(D);
  80617. E.seriesIndex = x.seriesIndex, E.dataIndex = p, E.ssrType = "legend";
  80618. }), c.set(v, !0);
  80619. }
  80620. }, this);
  80621. 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."));
  80622. }
  80623. }, this), o && this._createSelector(o, r, a, s, l);
  80624. }, e.prototype._createSelector = function(n, r, i, a, o) {
  80625. var s = this.getSelectorGroup();
  80626. VE(n, function(u) {
  80627. var c = u.type, f = new gt({
  80628. style: {
  80629. x: 0,
  80630. y: 0,
  80631. align: "center",
  80632. verticalAlign: "middle"
  80633. },
  80634. onclick: function() {
  80635. i.dispatchAction({
  80636. type: c === "all" ? "legendAllSelect" : "legendInverseSelect"
  80637. });
  80638. }
  80639. });
  80640. s.add(f);
  80641. var d = r.getModel("selectorLabel"), h = r.getModel(["emphasis", "selectorLabel"]);
  80642. Pr(f, {
  80643. normal: d,
  80644. emphasis: h
  80645. }, {
  80646. defaultText: u.title
  80647. }), Yl(f);
  80648. });
  80649. }, e.prototype._createItem = function(n, r, i, a, o, s, l, u, c, f, d) {
  80650. 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");
  80651. c = b || c || "roundRect";
  80652. var _ = M9e(c, a, l, u, h, g, d), O = new Vb(), S = a.getModel("textStyle");
  80653. if (Me(n.getLegendIcon) && (!b || b === "inherit"))
  80654. O.add(n.getLegendIcon({
  80655. itemWidth: p,
  80656. itemHeight: v,
  80657. icon: c,
  80658. iconRotate: m,
  80659. itemStyle: _.itemStyle,
  80660. lineStyle: _.lineStyle,
  80661. symbolKeepAspect: y
  80662. }));
  80663. else {
  80664. var x = b === "inherit" && n.getData().getVisual("symbol") ? m === "inherit" ? n.getData().getVisual("symbolRotate") : m : 0;
  80665. O.add(I9e({
  80666. itemWidth: p,
  80667. itemHeight: v,
  80668. icon: c,
  80669. iconRotate: x,
  80670. itemStyle: _.itemStyle,
  80671. lineStyle: _.lineStyle,
  80672. symbolKeepAspect: y
  80673. }));
  80674. }
  80675. var C = s === "left" ? p + 5 : -5, T = s, w = o.get("formatter"), P = r;
  80676. Oe(w) && w ? P = w.replace("{name}", r ?? "") : Me(w) && (P = w(r));
  80677. var $ = g ? S.getTextColor() : a.get("inactiveColor");
  80678. O.add(new gt({
  80679. style: Zt(S, {
  80680. text: P,
  80681. x: C,
  80682. y: v / 2,
  80683. fill: $,
  80684. align: T,
  80685. verticalAlign: "middle"
  80686. }, {
  80687. inheritColor: $
  80688. })
  80689. }));
  80690. var A = new mt({
  80691. shape: O.getBoundingRect(),
  80692. style: {
  80693. // Cannot use 'invisible' because SVG SSR will miss the node
  80694. fill: "transparent"
  80695. }
  80696. }), D = a.getModel("tooltip");
  80697. return D.get("show") && gp({
  80698. el: A,
  80699. componentModel: o,
  80700. itemName: r,
  80701. itemTooltipOption: D.option
  80702. }), O.add(A), O.eachChild(function(E) {
  80703. E.silent = !0;
  80704. }), A.silent = !f, this.getContentGroup().add(O), Yl(O), O.__legendDataIndex = i, O;
  80705. }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
  80706. var l = this.getContentGroup(), u = this.getSelectorGroup();
  80707. ef(n.get("orient"), l, n.get("itemGap"), i.width, i.height);
  80708. var c = l.getBoundingRect(), f = [-c.x, -c.y];
  80709. if (u.markRedraw(), l.markRedraw(), o) {
  80710. ef(
  80711. // Buttons in selectorGroup always layout horizontally
  80712. "horizontal",
  80713. u,
  80714. n.get("selectorItemGap", !0)
  80715. );
  80716. 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";
  80717. 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];
  80718. var b = {
  80719. x: 0,
  80720. y: 0
  80721. };
  80722. 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;
  80723. } else
  80724. return l.x = f[0], l.y = f[1], this.group.getBoundingRect();
  80725. }, e.prototype.remove = function() {
  80726. this.getContentGroup().removeAll(), this._isFirstRender = !0;
  80727. }, e.type = "legend.plain", e;
  80728. }(Xt)
  80729. );
  80730. function M9e(t, e, n, r, i, a, o) {
  80731. function s(g, m) {
  80732. g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), VE(g, function(y, b) {
  80733. g[b] === "inherit" && (g[b] = m[b]);
  80734. });
  80735. }
  80736. var l = e.getModel("itemStyle"), u = l.getItemStyle(), c = t.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = l.getShallow("decal");
  80737. u.decal = !f || f === "inherit" ? r.decal : Fh(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);
  80738. var d = e.getModel("lineStyle"), h = d.getLineStyle();
  80739. 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) {
  80740. var p = e.get("inactiveBorderWidth"), v = u[c];
  80741. 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");
  80742. }
  80743. return {
  80744. itemStyle: u,
  80745. lineStyle: h
  80746. };
  80747. }
  80748. function I9e(t) {
  80749. var e = t.icon || "roundRect", n = $n(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  80750. 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;
  80751. }
  80752. function q7(t, e, n, r) {
  80753. WE(t, e, n, r), n.dispatchAction({
  80754. type: "legendToggleSelect",
  80755. name: t ?? e
  80756. }), FE(t, e, n, r);
  80757. }
  80758. function nie(t) {
  80759. for (var e = t.getZr().storage.getDisplayList(), n, r = 0, i = e.length; r < i && !(n = e[r].states.emphasis); )
  80760. r++;
  80761. return n && n.hoverLayer;
  80762. }
  80763. function FE(t, e, n, r) {
  80764. nie(n) || n.dispatchAction({
  80765. type: "highlight",
  80766. seriesName: t,
  80767. name: e,
  80768. excludeSeriesId: r
  80769. });
  80770. }
  80771. function WE(t, e, n, r) {
  80772. nie(n) || n.dispatchAction({
  80773. type: "downplay",
  80774. seriesName: t,
  80775. name: e,
  80776. excludeSeriesId: r
  80777. });
  80778. }
  80779. function D9e(t) {
  80780. var e = t.findComponents({
  80781. mainType: "legend"
  80782. });
  80783. e && e.length && t.filterSeries(function(n) {
  80784. for (var r = 0; r < e.length; r++)
  80785. if (!e[r].isSelected(n.name))
  80786. return !1;
  80787. return !0;
  80788. });
  80789. }
  80790. function xv(t, e, n) {
  80791. var r = {}, i = t === "toggleSelected", a;
  80792. return n.eachComponent("legend", function(o) {
  80793. i && a != null ? o[a ? "select" : "unSelect"](e.name) : t === "allSelect" || t === "inverseSelect" ? o[t]() : (o[t](e.name), a = o.isSelected(e.name));
  80794. var s = o.getData();
  80795. k(s, function(l) {
  80796. var u = l.get("name");
  80797. if (!(u === `
  80798. ` || u === "")) {
  80799. var c = o.isSelected(u);
  80800. r.hasOwnProperty(u) ? r[u] = r[u] && c : r[u] = c;
  80801. }
  80802. });
  80803. }), t === "allSelect" || t === "inverseSelect" ? {
  80804. selected: r
  80805. } : {
  80806. name: e.name,
  80807. selected: r
  80808. };
  80809. }
  80810. function R9e(t) {
  80811. t.registerAction("legendToggleSelect", "legendselectchanged", Ue(xv, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", Ue(xv, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", Ue(xv, "inverseSelect")), t.registerAction("legendSelect", "legendselected", Ue(xv, "select")), t.registerAction("legendUnSelect", "legendunselected", Ue(xv, "unSelect"));
  80812. }
  80813. function rie(t) {
  80814. t.registerComponentModel(zE), t.registerComponentView(tie), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, D9e), t.registerSubTypeDefaulter("legend", function() {
  80815. return "plain";
  80816. }), R9e(t);
  80817. }
  80818. var k9e = (
  80819. /** @class */
  80820. function(t) {
  80821. q(e, t);
  80822. function e() {
  80823. var n = t !== null && t.apply(this, arguments) || this;
  80824. return n.type = e.type, n;
  80825. }
  80826. return e.prototype.setScrollDataIndex = function(n) {
  80827. this.option.scrollDataIndex = n;
  80828. }, e.prototype.init = function(n, r, i) {
  80829. var a = bp(n);
  80830. t.prototype.init.call(this, n, r, i), K7(this, n, a);
  80831. }, e.prototype.mergeOption = function(n, r) {
  80832. t.prototype.mergeOption.call(this, n, r), K7(this, this.option, n);
  80833. }, e.type = "legend.scroll", e.defaultOption = Pu(zE.defaultOption, {
  80834. scrollDataIndex: 0,
  80835. pageButtonItemGap: 5,
  80836. pageButtonGap: null,
  80837. pageButtonPosition: "end",
  80838. pageFormatter: "{current}/{total}",
  80839. pageIcons: {
  80840. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  80841. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  80842. },
  80843. pageIconColor: "#2f4554",
  80844. pageIconInactiveColor: "#aaa",
  80845. pageIconSize: 15,
  80846. pageTextStyle: {
  80847. color: "#333"
  80848. },
  80849. animationDurationUpdate: 800
  80850. }), e;
  80851. }(zE)
  80852. );
  80853. function K7(t, e, n) {
  80854. var r = t.getOrient(), i = [1, 1];
  80855. i[r.index] = 0, cu(e, n, {
  80856. type: "box",
  80857. ignoreSize: !!i
  80858. });
  80859. }
  80860. var J7 = Ve, t$ = ["width", "height"], n$ = ["x", "y"], L9e = (
  80861. /** @class */
  80862. function(t) {
  80863. q(e, t);
  80864. function e() {
  80865. var n = t !== null && t.apply(this, arguments) || this;
  80866. return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n;
  80867. }
  80868. return e.prototype.init = function() {
  80869. t.prototype.init.call(this), this.group.add(this._containerGroup = new J7()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new J7());
  80870. }, e.prototype.resetInner = function() {
  80871. t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
  80872. }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
  80873. var u = this;
  80874. t.prototype.renderInner.call(this, n, r, i, a, o, s, l);
  80875. var c = this._controllerGroup, f = r.get("pageIconSize", !0), d = ue(f) ? f : [f, f];
  80876. p("pagePrev", 0);
  80877. var h = r.getModel("pageTextStyle");
  80878. c.add(new gt({
  80879. name: "pageText",
  80880. style: {
  80881. // Placeholder to calculate a proper layout.
  80882. text: "xx/xx",
  80883. fill: h.getTextColor(),
  80884. font: h.getFont(),
  80885. verticalAlign: "middle",
  80886. align: "center"
  80887. },
  80888. silent: !0
  80889. })), p("pageNext", 1);
  80890. function p(v, g) {
  80891. var m = v + "DataIndex", y = vp(r.get("pageIcons", !0)[r.getOrient().name][g], {
  80892. // Buttons will be created in each render, so we do not need
  80893. // to worry about avoiding using legendModel kept in scope.
  80894. onclick: xe(u._pageGo, u, m, r, a)
  80895. }, {
  80896. x: -d[0] / 2,
  80897. y: -d[1] / 2,
  80898. width: d[0],
  80899. height: d[1]
  80900. });
  80901. y.name = v, c.add(y);
  80902. }
  80903. }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
  80904. var l = this.getSelectorGroup(), u = n.getOrient().index, c = t$[u], f = n$[u], d = t$[1 - u], h = n$[1 - u];
  80905. o && ef(
  80906. // Buttons in selectorGroup always layout horizontally
  80907. "horizontal",
  80908. l,
  80909. n.get("selectorItemGap", !0)
  80910. );
  80911. var p = n.get("selectorButtonGap", !0), v = l.getBoundingRect(), g = [-v.x, -v.y], m = Le(i);
  80912. o && (m[c] = i[c] - v[c] - p);
  80913. var y = this._layoutContentAndController(n, a, m, u, c, d, h, f);
  80914. if (o) {
  80915. if (s === "end")
  80916. g[u] += y[c] + p;
  80917. else {
  80918. var b = v[c] + p;
  80919. g[u] -= b, y[f] -= b;
  80920. }
  80921. 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();
  80922. }
  80923. return y;
  80924. }, e.prototype._layoutContentAndController = function(n, r, i, a, o, s, l, u) {
  80925. var c = this.getContentGroup(), f = this._containerGroup, d = this._controllerGroup;
  80926. ef(n.get("orient"), c, n.get("itemGap"), a ? i.width : null, a ? null : i.height), ef(
  80927. // Buttons in controller are layout always horizontally.
  80928. "horizontal",
  80929. d,
  80930. n.get("pageButtonItemGap", !0)
  80931. );
  80932. var h = c.getBoundingRect(), p = d.getBoundingRect(), v = this._showController = h[o] > i[o], g = [-h.x, -h.y];
  80933. r || (g[a] = c[u]);
  80934. var m = [0, 0], y = [-p.x, -p.y], b = We(n.get("pageButtonGap", !0), n.get("itemGap", !0));
  80935. if (v) {
  80936. var _ = n.get("pageButtonPosition", !0);
  80937. _ === "end" ? y[a] += i[o] - p[o] : m[a] += p[o] + b;
  80938. }
  80939. y[1 - a] += h[s] / 2 - p[s] / 2, c.setPosition(g), f.setPosition(m), d.setPosition(y);
  80940. var O = {
  80941. x: 0,
  80942. y: 0
  80943. };
  80944. 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) {
  80945. var S = {
  80946. x: 0,
  80947. y: 0
  80948. };
  80949. S[o] = Math.max(i[o] - p[o] - b, 0), S[s] = O[s], f.setClipPath(new mt({
  80950. shape: S
  80951. })), f.__rectSize = S[o];
  80952. } else
  80953. d.eachChild(function(C) {
  80954. C.attr({
  80955. invisible: !0,
  80956. silent: !0
  80957. });
  80958. });
  80959. var x = this._getPageInfo(n);
  80960. return x.pageIndex != null && Ct(
  80961. c,
  80962. {
  80963. x: x.contentPosition[0],
  80964. y: x.contentPosition[1]
  80965. },
  80966. // When switch from "show controller" to "not show controller", view should be
  80967. // updated immediately without animation, otherwise causes weird effect.
  80968. v ? n : null
  80969. ), this._updatePageInfoView(n, x), O;
  80970. }, e.prototype._pageGo = function(n, r, i) {
  80971. var a = this._getPageInfo(r)[n];
  80972. a != null && i.dispatchAction({
  80973. type: "legendScroll",
  80974. scrollDataIndex: a,
  80975. legendId: r.id
  80976. });
  80977. }, e.prototype._updatePageInfoView = function(n, r) {
  80978. var i = this._controllerGroup;
  80979. k(["pagePrev", "pageNext"], function(c) {
  80980. var f = c + "DataIndex", d = r[f] != null, h = i.childOfName(c);
  80981. h && (h.setStyle("fill", d ? n.get("pageIconColor", !0) : n.get("pageIconInactiveColor", !0)), h.cursor = d ? "pointer" : "default");
  80982. });
  80983. var a = i.childOfName("pageText"), o = n.get("pageFormatter"), s = r.pageIndex, l = s != null ? s + 1 : 0, u = r.pageCount;
  80984. a && o && a.setStyle("text", Oe(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
  80985. current: l,
  80986. total: u
  80987. }));
  80988. }, e.prototype._getPageInfo = function(n) {
  80989. var r = n.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = n.getOrient().index, s = t$[o], l = n$[o], u = this._findTargetItemIndex(r), c = i.children(), f = c[u], d = c.length, h = d ? 1 : 0, p = {
  80990. contentPosition: [i.x, i.y],
  80991. pageCount: h,
  80992. pageIndex: h - 1,
  80993. pagePrevDataIndex: null,
  80994. pageNextDataIndex: null
  80995. };
  80996. if (!f)
  80997. return p;
  80998. var v = _(f);
  80999. p.contentPosition[o] = -v.s;
  81000. for (var g = u + 1, m = v, y = v, b = null; g <= d; ++g)
  81001. b = _(c[g]), // Half of the last item is out of the window.
  81002. (!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;
  81003. for (var g = u - 1, m = v, y = v, b = null; g >= -1; --g)
  81004. b = _(c[g]), // If the the end item does not intersect with the window started
  81005. // from the current item, a page can be settled.
  81006. (!b || !O(y, b.s)) && m.i < y.i && (y = m, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = m.i), ++p.pageCount, ++p.pageIndex), m = b;
  81007. return p;
  81008. function _(S) {
  81009. if (S) {
  81010. var x = S.getBoundingRect(), C = x[l] + S[l];
  81011. return {
  81012. s: C,
  81013. e: C + x[s],
  81014. i: S.__legendDataIndex
  81015. };
  81016. }
  81017. }
  81018. function O(S, x) {
  81019. return S.e >= x && S.s <= x + a;
  81020. }
  81021. }, e.prototype._findTargetItemIndex = function(n) {
  81022. if (!this._showController)
  81023. return 0;
  81024. var r, i = this.getContentGroup(), a;
  81025. return i.eachChild(function(o, s) {
  81026. var l = o.__legendDataIndex;
  81027. a == null && l != null && (a = s), l === n && (r = s);
  81028. }), r ?? a;
  81029. }, e.type = "legend.scroll", e;
  81030. }(tie)
  81031. );
  81032. function N9e(t) {
  81033. t.registerAction("legendScroll", "legendscroll", function(e, n) {
  81034. var r = e.scrollDataIndex;
  81035. r != null && n.eachComponent({
  81036. mainType: "legend",
  81037. subType: "scroll",
  81038. query: e
  81039. }, function(i) {
  81040. i.setScrollDataIndex(r);
  81041. });
  81042. });
  81043. }
  81044. function B9e(t) {
  81045. at(rie), t.registerComponentModel(k9e), t.registerComponentView(L9e), N9e(t);
  81046. }
  81047. function z9e(t) {
  81048. at(rie), at(B9e);
  81049. }
  81050. var V9e = (
  81051. /** @class */
  81052. function(t) {
  81053. q(e, t);
  81054. function e() {
  81055. var n = t !== null && t.apply(this, arguments) || this;
  81056. return n.type = e.type, n;
  81057. }
  81058. return e.type = "dataZoom.inside", e.defaultOption = Pu(Fm.defaultOption, {
  81059. disabled: !1,
  81060. zoomLock: !1,
  81061. zoomOnMouseWheel: !0,
  81062. moveOnMouseMove: !0,
  81063. moveOnMouseWheel: !1,
  81064. preventDefaultMouseMove: !0
  81065. }), e;
  81066. }(Fm)
  81067. ), EL = bt();
  81068. function F9e(t, e, n) {
  81069. EL(t).coordSysRecordMap.each(function(r) {
  81070. var i = r.dataZoomInfoMap.get(e.uid);
  81071. i && (i.getRange = n);
  81072. });
  81073. }
  81074. function W9e(t, e) {
  81075. for (var n = EL(t).coordSysRecordMap, r = n.keys(), i = 0; i < r.length; i++) {
  81076. var a = r[i], o = n.get(a), s = o.dataZoomInfoMap;
  81077. if (s) {
  81078. var l = e.uid, u = s.get(l);
  81079. u && (s.removeKey(l), s.keys().length || iie(n, o));
  81080. }
  81081. }
  81082. }
  81083. function iie(t, e) {
  81084. if (e) {
  81085. t.removeKey(e.model.uid);
  81086. var n = e.controller;
  81087. n && n.dispose();
  81088. }
  81089. }
  81090. function Q9e(t, e) {
  81091. var n = {
  81092. model: e,
  81093. containsPoint: Ue(G9e, e),
  81094. dispatchAction: Ue(H9e, t),
  81095. dataZoomInfoMap: null,
  81096. controller: null
  81097. }, r = n.controller = new K0(t.getZr());
  81098. return k(["pan", "zoom", "scrollMove"], function(i) {
  81099. r.on(i, function(a) {
  81100. var o = [];
  81101. n.dataZoomInfoMap.each(function(s) {
  81102. if (a.isAvailableBehavior(s.model.option)) {
  81103. var l = (s.getRange || {})[i], u = l && l(s.dzReferCoordSysInfo, n.model.mainType, n.controller, a);
  81104. !s.model.get("disabled", !0) && u && o.push({
  81105. dataZoomId: s.model.id,
  81106. start: u[0],
  81107. end: u[1]
  81108. });
  81109. }
  81110. }), o.length && n.dispatchAction(o);
  81111. });
  81112. }), n;
  81113. }
  81114. function H9e(t, e) {
  81115. t.isDisposed() || t.dispatchAction({
  81116. type: "dataZoom",
  81117. animation: {
  81118. easing: "cubicOut",
  81119. duration: 100
  81120. },
  81121. batch: e
  81122. });
  81123. }
  81124. function G9e(t, e, n, r) {
  81125. return t.coordinateSystem.containPoint([n, r]);
  81126. }
  81127. function j9e(t) {
  81128. var e, n = "type_", r = {
  81129. type_true: 2,
  81130. type_move: 1,
  81131. type_false: 0,
  81132. type_undefined: -1
  81133. }, i = !0;
  81134. return t.each(function(a) {
  81135. var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
  81136. r[n + s] > r[n + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0);
  81137. }), {
  81138. controlType: e,
  81139. opt: {
  81140. // RoamController will enable all of these functionalities,
  81141. // and the final behavior is determined by its event listener
  81142. // provided by each inside zoom.
  81143. zoomOnMouseWheel: !0,
  81144. moveOnMouseMove: !0,
  81145. moveOnMouseWheel: !0,
  81146. preventDefaultMouseMove: !!i
  81147. }
  81148. };
  81149. }
  81150. function Z9e(t) {
  81151. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, function(e, n) {
  81152. var r = EL(n), i = r.coordSysRecordMap || (r.coordSysRecordMap = Pe());
  81153. i.each(function(a) {
  81154. a.dataZoomInfoMap = null;
  81155. }), e.eachComponent({
  81156. mainType: "dataZoom",
  81157. subType: "inside"
  81158. }, function(a) {
  81159. var o = Vre(a);
  81160. k(o.infoList, function(s) {
  81161. var l = s.model.uid, u = i.get(l) || i.set(l, Q9e(n, s.model)), c = u.dataZoomInfoMap || (u.dataZoomInfoMap = Pe());
  81162. c.set(a.uid, {
  81163. dzReferCoordSysInfo: s,
  81164. model: a,
  81165. getRange: null
  81166. });
  81167. });
  81168. }), i.each(function(a) {
  81169. var o = a.controller, s, l = a.dataZoomInfoMap;
  81170. if (l) {
  81171. var u = l.keys()[0];
  81172. u != null && (s = l.get(u));
  81173. }
  81174. if (!s) {
  81175. iie(i, a);
  81176. return;
  81177. }
  81178. var c = j9e(l);
  81179. o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), Sp(a, "dispatchAction", s.model.get("throttle", !0), "fixRate");
  81180. });
  81181. });
  81182. }
  81183. var U9e = (
  81184. /** @class */
  81185. function(t) {
  81186. q(e, t);
  81187. function e() {
  81188. var n = t !== null && t.apply(this, arguments) || this;
  81189. return n.type = "dataZoom.inside", n;
  81190. }
  81191. return e.prototype.render = function(n, r, i) {
  81192. if (t.prototype.render.apply(this, arguments), n.noTarget()) {
  81193. this._clear();
  81194. return;
  81195. }
  81196. this.range = n.getPercentRange(), F9e(i, n, {
  81197. pan: xe(r$.pan, this),
  81198. zoom: xe(r$.zoom, this),
  81199. scrollMove: xe(r$.scrollMove, this)
  81200. });
  81201. }, e.prototype.dispose = function() {
  81202. this._clear(), t.prototype.dispose.apply(this, arguments);
  81203. }, e.prototype._clear = function() {
  81204. W9e(this.api, this.dataZoomModel), this.range = null;
  81205. }, e.type = "dataZoom.inside", e;
  81206. }(OL)
  81207. ), r$ = {
  81208. zoom: function(t, e, n, r) {
  81209. var i = this.range, a = i.slice(), o = t.axisModels[0];
  81210. if (o) {
  81211. var s = i$[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);
  81212. a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
  81213. var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  81214. if (Qf(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1])
  81215. return a;
  81216. }
  81217. },
  81218. pan: eQ(function(t, e, n, r, i, a) {
  81219. var o = i$[r]([a.oldX, a.oldY], [a.newX, a.newY], e, i, n);
  81220. return o.signal * (t[1] - t[0]) * o.pixel / o.pixelLength;
  81221. }),
  81222. scrollMove: eQ(function(t, e, n, r, i, a) {
  81223. var o = i$[r]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, n);
  81224. return o.signal * (t[1] - t[0]) * a.scrollDelta;
  81225. })
  81226. };
  81227. function eQ(t) {
  81228. return function(e, n, r, i) {
  81229. var a = this.range, o = a.slice(), s = e.axisModels[0];
  81230. if (s) {
  81231. var l = t(o, s, e, n, r, i);
  81232. if (Qf(l, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1])
  81233. return o;
  81234. }
  81235. };
  81236. }
  81237. var i$ = {
  81238. grid: function(t, e, n, r, i) {
  81239. var a = n.axis, o = {}, s = i.model.coordinateSystem.getRect();
  81240. 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;
  81241. },
  81242. polar: function(t, e, n, r, i) {
  81243. var a = n.axis, o = {}, s = i.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
  81244. 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;
  81245. },
  81246. singleAxis: function(t, e, n, r, i) {
  81247. var a = n.axis, o = i.model.coordinateSystem.getRect(), s = {};
  81248. 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;
  81249. }
  81250. };
  81251. function aie(t) {
  81252. SL(t), t.registerComponentModel(V9e), t.registerComponentView(U9e), Z9e(t);
  81253. }
  81254. var X9e = (
  81255. /** @class */
  81256. function(t) {
  81257. q(e, t);
  81258. function e() {
  81259. var n = t !== null && t.apply(this, arguments) || this;
  81260. return n.type = e.type, n;
  81261. }
  81262. return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Pu(Fm.defaultOption, {
  81263. show: !0,
  81264. // deault value can only be drived in view stage.
  81265. right: "ph",
  81266. top: "ph",
  81267. width: "ph",
  81268. height: "ph",
  81269. left: null,
  81270. bottom: null,
  81271. borderColor: "#d2dbee",
  81272. borderRadius: 3,
  81273. backgroundColor: "rgba(47,69,84,0)",
  81274. // dataBackgroundColor: '#ddd',
  81275. dataBackground: {
  81276. lineStyle: {
  81277. color: "#d2dbee",
  81278. width: 0.5
  81279. },
  81280. areaStyle: {
  81281. color: "#d2dbee",
  81282. opacity: 0.2
  81283. }
  81284. },
  81285. selectedDataBackground: {
  81286. lineStyle: {
  81287. color: "#8fb0f7",
  81288. width: 0.5
  81289. },
  81290. areaStyle: {
  81291. color: "#8fb0f7",
  81292. opacity: 0.2
  81293. }
  81294. },
  81295. // Color of selected window.
  81296. fillerColor: "rgba(135,175,274,0.2)",
  81297. 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",
  81298. // Percent of the slider height
  81299. handleSize: "100%",
  81300. handleStyle: {
  81301. color: "#fff",
  81302. borderColor: "#ACB8D1"
  81303. },
  81304. moveHandleSize: 7,
  81305. 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",
  81306. moveHandleStyle: {
  81307. color: "#D2DBEE",
  81308. opacity: 0.7
  81309. },
  81310. showDetail: !0,
  81311. showDataShadow: "auto",
  81312. realtime: !0,
  81313. zoomLock: !1,
  81314. textStyle: {
  81315. color: "#6E7079"
  81316. },
  81317. brushSelect: !0,
  81318. brushStyle: {
  81319. color: "rgba(135,175,274,0.15)"
  81320. },
  81321. emphasis: {
  81322. handleStyle: {
  81323. borderColor: "#8FB0F7"
  81324. },
  81325. moveHandleStyle: {
  81326. color: "#8FB0F7"
  81327. }
  81328. }
  81329. }), e;
  81330. }(Fm)
  81331. ), wv = mt, tQ = 7, Y9e = 1, a$ = 30, q9e = 7, Cv = "horizontal", nQ = "vertical", K9e = 5, J9e = ["line", "bar", "candlestick", "scatter"], eje = {
  81332. easing: "cubicOut",
  81333. duration: 100,
  81334. delay: 0
  81335. }, tje = (
  81336. /** @class */
  81337. function(t) {
  81338. q(e, t);
  81339. function e() {
  81340. var n = t !== null && t.apply(this, arguments) || this;
  81341. return n.type = e.type, n._displayables = {}, n;
  81342. }
  81343. return e.prototype.init = function(n, r) {
  81344. this.api = r, this._onBrush = xe(this._onBrush, this), this._onBrushEnd = xe(this._onBrushEnd, this);
  81345. }, e.prototype.render = function(n, r, i, a) {
  81346. if (t.prototype.render.apply(this, arguments), Sp(this, "_dispatchZoomAction", n.get("throttle"), "fixRate"), this._orient = n.getOrient(), n.get("show") === !1) {
  81347. this.group.removeAll();
  81348. return;
  81349. }
  81350. if (n.noTarget()) {
  81351. this._clear(), this.group.removeAll();
  81352. return;
  81353. }
  81354. (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView();
  81355. }, e.prototype.dispose = function() {
  81356. this._clear(), t.prototype.dispose.apply(this, arguments);
  81357. }, e.prototype._clear = function() {
  81358. $m(this, "_dispatchZoomAction");
  81359. var n = this.api.getZr();
  81360. n.off("mousemove", this._onBrush), n.off("mouseup", this._onBrushEnd);
  81361. }, e.prototype._buildView = function() {
  81362. var n = this.group;
  81363. n.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
  81364. var r = this._displayables.sliderGroup = new Ve();
  81365. this._renderBackground(), this._renderHandle(), this._renderDataShadow(), n.add(r), this._positionGroup();
  81366. }, e.prototype._resetLocation = function() {
  81367. var n = this.dataZoomModel, r = this.api, i = n.get("brushSelect"), a = i ? q9e : 0, o = this._findCoordRect(), s = {
  81368. width: r.getWidth(),
  81369. height: r.getHeight()
  81370. }, l = this._orient === Cv ? {
  81371. // Why using 'right', because right should be used in vertical,
  81372. // and it is better to be consistent for dealing with position param merge.
  81373. right: s.width - o.x - o.width,
  81374. top: s.height - a$ - tQ - a,
  81375. width: o.width,
  81376. height: a$
  81377. } : {
  81378. right: tQ,
  81379. top: o.y,
  81380. width: a$,
  81381. height: o.height
  81382. }, u = bp(n.option);
  81383. k(["right", "top", "width", "height"], function(f) {
  81384. u[f] === "ph" && (u[f] = l[f]);
  81385. });
  81386. var c = Rn(u, s);
  81387. this._location = {
  81388. x: c.x,
  81389. y: c.y
  81390. }, this._size = [c.width, c.height], this._orient === nQ && this._size.reverse();
  81391. }, e.prototype._positionGroup = function() {
  81392. 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;
  81393. s.attr(i === Cv && !o ? {
  81394. scaleY: l ? 1 : -1,
  81395. scaleX: 1
  81396. } : i === Cv && o ? {
  81397. scaleY: l ? 1 : -1,
  81398. scaleX: -1
  81399. } : i === nQ && !o ? {
  81400. scaleY: l ? -1 : 1,
  81401. scaleX: 1,
  81402. rotation: Math.PI / 2
  81403. } : {
  81404. scaleY: l ? -1 : 1,
  81405. scaleX: -1,
  81406. rotation: Math.PI / 2
  81407. });
  81408. var u = n.getBoundingRect([s]);
  81409. n.x = r.x - u.x, n.y = r.y - u.y, n.markRedraw();
  81410. }, e.prototype._getViewExtent = function() {
  81411. return [0, this._size[0]];
  81412. }, e.prototype._renderBackground = function() {
  81413. var n = this.dataZoomModel, r = this._size, i = this._displayables.sliderGroup, a = n.get("brushSelect");
  81414. i.add(new wv({
  81415. silent: !0,
  81416. shape: {
  81417. x: 0,
  81418. y: 0,
  81419. width: r[0],
  81420. height: r[1]
  81421. },
  81422. style: {
  81423. fill: n.get("backgroundColor")
  81424. },
  81425. z2: -40
  81426. }));
  81427. var o = new wv({
  81428. shape: {
  81429. x: 0,
  81430. y: 0,
  81431. width: r[0],
  81432. height: r[1]
  81433. },
  81434. style: {
  81435. fill: "transparent"
  81436. },
  81437. z2: 0,
  81438. onclick: xe(this._onClickPanel, this)
  81439. }), s = this.api.getZr();
  81440. 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);
  81441. }, e.prototype._renderDataShadow = function() {
  81442. var n = this._dataShadowInfo = this._prepareDataShadowInfo();
  81443. if (this._displayables.dataShadowSegs = [], !n)
  81444. return;
  81445. 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;
  81446. if (l == null)
  81447. return;
  81448. var u = this._shadowPolygonPts, c = this._shadowPolylinePts;
  81449. if (o !== this._shadowData || l !== this._shadowDim || r[0] !== i[0] || r[1] !== i[1]) {
  81450. var f = o.getDataExtent(l), d = (f[1] - f[0]) * 0.3;
  81451. f = [f[0] - d, f[1] + d];
  81452. 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]), _;
  81453. o.each([l], function(T, w) {
  81454. if (b > 0 && w % b) {
  81455. y += m;
  81456. return;
  81457. }
  81458. var P = T == null || isNaN(T) || T === "", $ = P ? 0 : Lt(T, f, h, !0);
  81459. 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;
  81460. }), u = this._shadowPolygonPts = v, c = this._shadowPolylinePts = g;
  81461. }
  81462. this._shadowData = o, this._shadowDim = l, this._shadowSize = [r[0], r[1]];
  81463. var O = this.dataZoomModel;
  81464. function S(T) {
  81465. var w = O.getModel(T ? "selectedDataBackground" : "dataBackground"), P = new Ve(), $ = new ii({
  81466. shape: {
  81467. points: u
  81468. },
  81469. segmentIgnoreThreshold: 1,
  81470. style: w.getModel("areaStyle").getAreaStyle(),
  81471. silent: !0,
  81472. z2: -20
  81473. }), A = new ai({
  81474. shape: {
  81475. points: c
  81476. },
  81477. segmentIgnoreThreshold: 1,
  81478. style: w.getModel("lineStyle").getLineStyle(),
  81479. silent: !0,
  81480. z2: -19
  81481. });
  81482. return P.add($), P.add(A), P;
  81483. }
  81484. for (var x = 0; x < 3; x++) {
  81485. var C = S(x === 1);
  81486. this._displayables.sliderGroup.add(C), this._displayables.dataShadowSegs.push(C);
  81487. }
  81488. }, e.prototype._prepareDataShadowInfo = function() {
  81489. var n = this.dataZoomModel, r = n.get("showDataShadow");
  81490. if (r !== !1) {
  81491. var i, a = this.ecModel;
  81492. return n.eachTargetAxis(function(o, s) {
  81493. var l = n.getAxisProxy(o, s).getTargetSeriesModels();
  81494. k(l, function(u) {
  81495. if (!i && !(r !== !0 && et(J9e, u.get("type")) < 0)) {
  81496. var c = a.getComponent(Fl(o), s).axis, f = nje(o), d, h = u.coordinateSystem;
  81497. f != null && h.getOtherAxis && (d = h.getOtherAxis(c).inverse), f = u.getData().mapDimension(f), i = {
  81498. thisAxis: c,
  81499. series: u,
  81500. thisDim: o,
  81501. otherDim: f,
  81502. otherAxisInverse: d
  81503. };
  81504. }
  81505. }, this);
  81506. }, this), i;
  81507. }
  81508. }, e.prototype._renderHandle = function() {
  81509. 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 wv({
  81510. silent: f,
  81511. style: {
  81512. fill: l.get("fillerColor")
  81513. },
  81514. textConfig: {
  81515. position: "inside"
  81516. }
  81517. });
  81518. o.add(d), o.add(new wv({
  81519. silent: !0,
  81520. subPixelOptimize: !0,
  81521. shape: {
  81522. x: 0,
  81523. y: 0,
  81524. width: s[0],
  81525. height: s[1],
  81526. r: c
  81527. },
  81528. style: {
  81529. // deprecated option
  81530. stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
  81531. lineWidth: Y9e,
  81532. fill: "rgba(0,0,0,0)"
  81533. }
  81534. })), k([0, 1], function(b) {
  81535. var _ = l.get("handleIcon");
  81536. !gO[_] && _.indexOf("path://") < 0 && _.indexOf("image://") < 0 && (_ = "path://" + _, process.env.NODE_ENV !== "production" && Ea("handleIcon now needs 'path://' prefix when using a path string"));
  81537. var O = $n(_, -1, 0, 2, 2, null, !0);
  81538. O.attr({
  81539. cursor: rQ(this._orient),
  81540. draggable: !0,
  81541. drift: xe(this._onDragMove, this, b),
  81542. ondragend: xe(this._onDragEnd, this),
  81543. onmouseover: xe(this._showDataInfo, this, !0),
  81544. onmouseout: xe(this._showDataInfo, this, !1),
  81545. z2: 5
  81546. });
  81547. var S = O.getBoundingRect(), x = l.get("handleSize");
  81548. 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);
  81549. var C = l.get("handleColor");
  81550. C != null && (O.style.fill = C), o.add(i[b] = O);
  81551. var T = l.getModel("textStyle");
  81552. n.add(a[b] = new gt({
  81553. silent: !0,
  81554. invisible: !0,
  81555. style: Zt(T, {
  81556. x: 0,
  81557. y: 0,
  81558. text: "",
  81559. verticalAlign: "middle",
  81560. align: "center",
  81561. fill: T.getTextColor(),
  81562. font: T.getFont()
  81563. }),
  81564. z2: 10
  81565. }));
  81566. }, this);
  81567. var h = d;
  81568. if (f) {
  81569. var p = _e(l.get("moveHandleSize"), s[1]), v = r.moveHandle = new mt({
  81570. style: l.getModel("moveHandleStyle").getItemStyle(),
  81571. silent: !0,
  81572. shape: {
  81573. r: [0, 0, 2, 2],
  81574. y: s[1] - 0.5,
  81575. height: p
  81576. }
  81577. }), g = p * 0.8, m = r.moveHandleIcon = $n(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
  81578. m.silent = !0, m.y = s[1] + p / 2 - 0.5, v.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
  81579. var y = Math.min(s[1] / 2, Math.max(p, 10));
  81580. h = r.moveZone = new mt({
  81581. invisible: !0,
  81582. shape: {
  81583. y: s[1] - y,
  81584. height: p + y
  81585. }
  81586. }), h.on("mouseover", function() {
  81587. u.enterEmphasis(v);
  81588. }).on("mouseout", function() {
  81589. u.leaveEmphasis(v);
  81590. }), o.add(v), o.add(m), o.add(h);
  81591. }
  81592. h.attr({
  81593. draggable: !0,
  81594. cursor: rQ(this._orient),
  81595. drift: xe(this._onDragMove, this, "all"),
  81596. ondragstart: xe(this._showDataInfo, this, !0),
  81597. ondragend: xe(this._onDragEnd, this),
  81598. onmouseover: xe(this._showDataInfo, this, !0),
  81599. onmouseout: xe(this._showDataInfo, this, !1)
  81600. });
  81601. }, e.prototype._resetInterval = function() {
  81602. var n = this._range = this.dataZoomModel.getPercentRange(), r = this._getViewExtent();
  81603. this._handleEnds = [Lt(n[0], [0, 100], r, !0), Lt(n[1], [0, 100], r, !0)];
  81604. }, e.prototype._updateInterval = function(n, r) {
  81605. var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
  81606. Qf(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);
  81607. var u = this._range, c = this._range = Vi([Lt(a[0], o, l, !0), Lt(a[1], o, l, !0)]);
  81608. return !u || u[0] !== c[0] || u[1] !== c[1];
  81609. }, e.prototype._updateView = function(n) {
  81610. var r = this._displayables, i = this._handleEnds, a = Vi(i.slice()), o = this._size;
  81611. k([0, 1], function(h) {
  81612. var p = r.handles[h], v = this._handleHeight;
  81613. p.attr({
  81614. scaleX: v / 2,
  81615. scaleY: v / 2,
  81616. // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
  81617. // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
  81618. x: i[h] + (h ? -1 : 1),
  81619. y: o[1] / 2 - v / 2
  81620. });
  81621. }, this), r.filler.setShape({
  81622. x: a[0],
  81623. y: 0,
  81624. width: a[1] - a[0],
  81625. height: o[1]
  81626. });
  81627. var s = {
  81628. x: a[0],
  81629. width: a[1] - a[0]
  81630. };
  81631. r.moveHandle && (r.moveHandle.setShape(s), r.moveZone.setShape(s), r.moveZone.getBoundingRect(), r.moveHandleIcon && r.moveHandleIcon.attr("x", s.x + s.width / 2));
  81632. for (var l = r.dataShadowSegs, u = [0, a[0], a[1], o[0]], c = 0; c < l.length; c++) {
  81633. var f = l[c], d = f.getClipPath();
  81634. d || (d = new mt(), f.setClipPath(d)), d.setShape({
  81635. x: u[c],
  81636. y: 0,
  81637. width: u[c + 1] - u[c],
  81638. height: o[1]
  81639. });
  81640. }
  81641. this._updateDataInfo(n);
  81642. }, e.prototype._updateDataInfo = function(n) {
  81643. var r = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""];
  81644. if (r.get("showDetail")) {
  81645. var l = r.findRepresentativeAxisProxy();
  81646. if (l) {
  81647. var u = l.getAxisModel().axis, c = this._range, f = n ? l.calculateDataWindow({
  81648. start: c[0],
  81649. end: c[1]
  81650. }).valueWindow : l.getDataValueWindow();
  81651. s = [this._formatLabel(f[0], u), this._formatLabel(f[1], u)];
  81652. }
  81653. }
  81654. var d = Vi(this._handleEnds.slice());
  81655. h.call(this, 0), h.call(this, 1);
  81656. function h(p) {
  81657. var v = ql(i.handles[p].parent, this.group), g = Jx(p === 0 ? "right" : "left", v), m = this._handleWidth / 2 + K9e, y = to([d[p] + (p === 0 ? -m : m), this._size[1] / 2], v);
  81658. a[p].setStyle({
  81659. x: y[0],
  81660. y: y[1],
  81661. verticalAlign: o === Cv ? "middle" : g,
  81662. align: o === Cv ? g : "center",
  81663. text: s[p]
  81664. });
  81665. }
  81666. }, e.prototype._formatLabel = function(n, r) {
  81667. var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision");
  81668. (o == null || o === "auto") && (o = r.getPixelPrecision());
  81669. var s = n == null || isNaN(n) ? "" : r.type === "category" || r.type === "time" ? r.scale.getLabel({
  81670. value: Math.round(n)
  81671. }) : n.toFixed(Math.min(o, 20));
  81672. return Me(a) ? a(n, s) : Oe(a) ? a.replace("{value}", s) : s;
  81673. }, e.prototype._showDataInfo = function(n) {
  81674. n = this._dragging || n;
  81675. var r = this._displayables, i = r.handleLabels;
  81676. i[0].attr("invisible", !n), i[1].attr("invisible", !n), r.moveHandle && this.api[n ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1);
  81677. }, e.prototype._onDragMove = function(n, r, i, a) {
  81678. this._dragging = !0, Gs(a.event);
  81679. var o = this._displayables.sliderGroup.getLocalTransform(), s = to([r, i], o, !0), l = this._updateInterval(n, s[0]), u = this.dataZoomModel.get("realtime");
  81680. this._updateView(!u), l && u && this._dispatchZoomAction(!0);
  81681. }, e.prototype._onDragEnd = function() {
  81682. this._dragging = !1, this._showDataInfo(!1);
  81683. var n = this.dataZoomModel.get("realtime");
  81684. !n && this._dispatchZoomAction(!1);
  81685. }, e.prototype._onClickPanel = function(n) {
  81686. var r = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(n.offsetX, n.offsetY);
  81687. if (!(i[0] < 0 || i[0] > r[0] || i[1] < 0 || i[1] > r[1])) {
  81688. var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o);
  81689. this._updateView(), s && this._dispatchZoomAction(!1);
  81690. }
  81691. }, e.prototype._onBrushStart = function(n) {
  81692. var r = n.offsetX, i = n.offsetY;
  81693. this._brushStart = new Ke(r, i), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
  81694. }, e.prototype._onBrushEnd = function(n) {
  81695. if (this._brushing) {
  81696. var r = this._displayables.brushRect;
  81697. if (this._brushing = !1, !!r) {
  81698. r.attr("ignore", !0);
  81699. var i = r.shape, a = +/* @__PURE__ */ new Date();
  81700. if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) {
  81701. var o = this._getViewExtent(), s = [0, 100];
  81702. this._range = Vi([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);
  81703. }
  81704. }
  81705. }
  81706. }, e.prototype._onBrush = function(n) {
  81707. this._brushing && (Gs(n.event), this._updateBrushRect(n.offsetX, n.offsetY));
  81708. }, e.prototype._updateBrushRect = function(n, r) {
  81709. var i = this._displayables, a = this.dataZoomModel, o = i.brushRect;
  81710. o || (o = i.brushRect = new wv({
  81711. silent: !0,
  81712. style: a.getModel("brushStyle").getItemStyle()
  81713. }), i.sliderGroup.add(o)), o.attr("ignore", !1);
  81714. var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(n, r), c = l.transformCoordToLocal(s.x, s.y), f = this._size;
  81715. u[0] = Math.max(Math.min(f[0], u[0]), 0), o.setShape({
  81716. x: c[0],
  81717. y: 0,
  81718. width: u[0] - c[0],
  81719. height: f[1]
  81720. });
  81721. }, e.prototype._dispatchZoomAction = function(n) {
  81722. var r = this._range;
  81723. this.api.dispatchAction({
  81724. type: "dataZoom",
  81725. from: this.uid,
  81726. dataZoomId: this.dataZoomModel.id,
  81727. animation: n ? eje : null,
  81728. start: r[0],
  81729. end: r[1]
  81730. });
  81731. }, e.prototype._findCoordRect = function() {
  81732. var n, r = Vre(this.dataZoomModel).infoList;
  81733. if (!n && r.length) {
  81734. var i = r[0].model.coordinateSystem;
  81735. n = i.getRect && i.getRect();
  81736. }
  81737. if (!n) {
  81738. var a = this.api.getWidth(), o = this.api.getHeight();
  81739. n = {
  81740. x: a * 0.2,
  81741. y: o * 0.2,
  81742. width: a * 0.6,
  81743. height: o * 0.6
  81744. };
  81745. }
  81746. return n;
  81747. }, e.type = "dataZoom.slider", e;
  81748. }(OL)
  81749. );
  81750. function nje(t) {
  81751. var e = {
  81752. x: "y",
  81753. y: "x",
  81754. radius: "angle",
  81755. angle: "radius"
  81756. };
  81757. return e[t];
  81758. }
  81759. function rQ(t) {
  81760. return t === "vertical" ? "ns-resize" : "ew-resize";
  81761. }
  81762. function oie(t) {
  81763. t.registerComponentModel(X9e), t.registerComponentView(tje), SL(t);
  81764. }
  81765. function rje(t) {
  81766. at(aie), at(oie);
  81767. }
  81768. var sie = {
  81769. /**
  81770. * @public
  81771. */
  81772. get: function(t, e, n) {
  81773. var r = Le((ije[t] || {})[e]);
  81774. return n && ue(r) ? r[r.length - 1] : r;
  81775. }
  81776. }, ije = {
  81777. color: {
  81778. active: ["#006edd", "#e0ffff"],
  81779. inactive: ["rgba(0,0,0,0)"]
  81780. },
  81781. colorHue: {
  81782. active: [0, 360],
  81783. inactive: [0, 0]
  81784. },
  81785. colorSaturation: {
  81786. active: [0.3, 1],
  81787. inactive: [0, 0]
  81788. },
  81789. colorLightness: {
  81790. active: [0.9, 0.5],
  81791. inactive: [0, 0]
  81792. },
  81793. colorAlpha: {
  81794. active: [0.3, 1],
  81795. inactive: [0, 0]
  81796. },
  81797. opacity: {
  81798. active: [0.3, 1],
  81799. inactive: [0, 0]
  81800. },
  81801. symbol: {
  81802. active: ["circle", "roundRect", "diamond"],
  81803. inactive: ["none"]
  81804. },
  81805. symbolSize: {
  81806. active: [10, 50],
  81807. inactive: [0, 0]
  81808. }
  81809. }, iQ = qn.mapVisual, aje = qn.eachVisual, oje = ue, aQ = k, sje = Vi, lje = Lt, GO = (
  81810. /** @class */
  81811. function(t) {
  81812. q(e, t);
  81813. function e() {
  81814. var n = t !== null && t.apply(this, arguments) || this;
  81815. return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
  81816. type: "box",
  81817. ignoreSize: !0
  81818. }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n;
  81819. }
  81820. return e.prototype.init = function(n, r, i) {
  81821. this.mergeDefaultAndTheme(n, i);
  81822. }, e.prototype.optionUpdated = function(n, r) {
  81823. var i = this.option;
  81824. !r && Yre(i, n, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
  81825. }, e.prototype.resetVisual = function(n) {
  81826. var r = this.stateList;
  81827. n = xe(n, this), this.controllerVisuals = LE(this.option.controller, r, n), this.targetVisuals = LE(this.option.target, r, n);
  81828. }, e.prototype.getItemSymbol = function() {
  81829. return null;
  81830. }, e.prototype.getTargetSeriesIndices = function() {
  81831. var n = this.option.seriesIndex, r = [];
  81832. return n == null || n === "all" ? this.ecModel.eachSeries(function(i, a) {
  81833. r.push(a);
  81834. }) : r = Qt(n), r;
  81835. }, e.prototype.eachTargetSeries = function(n, r) {
  81836. k(this.getTargetSeriesIndices(), function(i) {
  81837. var a = this.ecModel.getSeriesByIndex(i);
  81838. a && n.call(r, a);
  81839. }, this);
  81840. }, e.prototype.isTargetSeries = function(n) {
  81841. var r = !1;
  81842. return this.eachTargetSeries(function(i) {
  81843. i === n && (r = !0);
  81844. }), r;
  81845. }, e.prototype.formatValueText = function(n, r, i) {
  81846. var a = this.option, o = a.precision, s = this.dataBound, l = a.formatter, u;
  81847. i = i || ["<", ">"], ue(n) && (n = n.slice(), u = !0);
  81848. var c = r ? n : u ? [f(n[0]), f(n[1])] : f(n);
  81849. if (Oe(l))
  81850. return l.replace("{value}", u ? c[0] : c).replace("{value2}", u ? c[1] : c);
  81851. if (Me(l))
  81852. return u ? l(n[0], n[1]) : l(n);
  81853. if (u)
  81854. return n[0] === s[0] ? i[0] + " " + c[1] : n[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1];
  81855. return c;
  81856. function f(d) {
  81857. return d === s[0] ? "min" : d === s[1] ? "max" : (+d).toFixed(Math.min(o, 20));
  81858. }
  81859. }, e.prototype.resetExtent = function() {
  81860. var n = this.option, r = sje([n.min, n.max]);
  81861. this._dataExtent = r;
  81862. }, e.prototype.getDataDimensionIndex = function(n) {
  81863. var r = this.option.dimension;
  81864. if (r != null)
  81865. return n.getDimensionIndex(r);
  81866. for (var i = n.dimensions, a = i.length - 1; a >= 0; a--) {
  81867. var o = i[a], s = n.getDimensionInfo(o);
  81868. if (!s.isCalculationCoord)
  81869. return s.storeDimIndex;
  81870. }
  81871. }, e.prototype.getExtent = function() {
  81872. return this._dataExtent.slice();
  81873. }, e.prototype.completeVisualOption = function() {
  81874. var n = this.ecModel, r = this.option, i = {
  81875. inRange: r.inRange,
  81876. outOfRange: r.outOfRange
  81877. }, a = r.target || (r.target = {}), o = r.controller || (r.controller = {});
  81878. qe(a, i), qe(o, i);
  81879. var s = this.isCategory();
  81880. l.call(this, a), l.call(this, o), u.call(this, a, "inRange", "outOfRange"), c.call(this, o);
  81881. function l(f) {
  81882. oje(r.color) && !f.inRange && (f.inRange = {
  81883. color: r.color.slice().reverse()
  81884. }), f.inRange = f.inRange || {
  81885. color: n.get("gradientColor")
  81886. };
  81887. }
  81888. function u(f, d, h) {
  81889. var p = f[d], v = f[h];
  81890. p && !v && (v = f[h] = {}, aQ(p, function(g, m) {
  81891. if (qn.isValidType(m)) {
  81892. var y = sie.get(m, "inactive", s);
  81893. y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0]));
  81894. }
  81895. }));
  81896. }
  81897. function c(f) {
  81898. 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";
  81899. aQ(this.stateList, function(m) {
  81900. var y = this.itemSize, b = f[m];
  81901. b || (b = f[m] = {
  81902. color: s ? p : [p]
  81903. }), 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 = iQ(b.symbol, function(S) {
  81904. return S === "none" ? g : S;
  81905. });
  81906. var _ = b.symbolSize;
  81907. if (_ != null) {
  81908. var O = -1 / 0;
  81909. aje(_, function(S) {
  81910. S > O && (O = S);
  81911. }), b.symbolSize = iQ(_, function(S) {
  81912. return lje(S, [0, O], [0, y[0]], !0);
  81913. });
  81914. }
  81915. }, this);
  81916. }
  81917. }, e.prototype.resetItemSize = function() {
  81918. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
  81919. }, e.prototype.isCategory = function() {
  81920. return !!this.option.categories;
  81921. }, e.prototype.setSelected = function(n) {
  81922. }, e.prototype.getSelected = function() {
  81923. return null;
  81924. }, e.prototype.getValueState = function(n) {
  81925. return null;
  81926. }, e.prototype.getVisualMeta = function(n) {
  81927. return null;
  81928. }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
  81929. show: !0,
  81930. // zlevel: 0,
  81931. z: 4,
  81932. seriesIndex: "all",
  81933. min: 0,
  81934. max: 200,
  81935. left: 0,
  81936. right: null,
  81937. top: null,
  81938. bottom: 0,
  81939. itemWidth: null,
  81940. itemHeight: null,
  81941. inverse: !1,
  81942. orient: "vertical",
  81943. backgroundColor: "rgba(0,0,0,0)",
  81944. borderColor: "#ccc",
  81945. contentColor: "#5793f3",
  81946. inactiveColor: "#aaa",
  81947. borderWidth: 0,
  81948. padding: 5,
  81949. // 接受数组分别设定上右下左边距,同css
  81950. textGap: 10,
  81951. precision: 0,
  81952. textStyle: {
  81953. color: "#333"
  81954. // 值域文字颜色
  81955. }
  81956. }, e;
  81957. }(rt)
  81958. ), oQ = [20, 140], uje = (
  81959. /** @class */
  81960. function(t) {
  81961. q(e, t);
  81962. function e() {
  81963. var n = t !== null && t.apply(this, arguments) || this;
  81964. return n.type = e.type, n;
  81965. }
  81966. return e.prototype.optionUpdated = function(n, r) {
  81967. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) {
  81968. i.mappingMethod = "linear", i.dataExtent = this.getExtent();
  81969. }), this._resetRange();
  81970. }, e.prototype.resetItemSize = function() {
  81971. t.prototype.resetItemSize.apply(this, arguments);
  81972. var n = this.itemSize;
  81973. (n[0] == null || isNaN(n[0])) && (n[0] = oQ[0]), (n[1] == null || isNaN(n[1])) && (n[1] = oQ[1]);
  81974. }, e.prototype._resetRange = function() {
  81975. var n = this.getExtent(), r = this.option.range;
  81976. !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]));
  81977. }, e.prototype.completeVisualOption = function() {
  81978. t.prototype.completeVisualOption.apply(this, arguments), k(this.stateList, function(n) {
  81979. var r = this.option.controller[n].symbolSize;
  81980. r && r[0] !== r[1] && (r[0] = r[1] / 3);
  81981. }, this);
  81982. }, e.prototype.setSelected = function(n) {
  81983. this.option.range = n.slice(), this._resetRange();
  81984. }, e.prototype.getSelected = function() {
  81985. var n = this.getExtent(), r = Vi((this.get("range") || []).slice());
  81986. 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;
  81987. }, e.prototype.getValueState = function(n) {
  81988. var r = this.option.range, i = this.getExtent();
  81989. return (r[0] <= i[0] || r[0] <= n) && (r[1] >= i[1] || n <= r[1]) ? "inRange" : "outOfRange";
  81990. }, e.prototype.findTargetDataIndices = function(n) {
  81991. var r = [];
  81992. return this.eachTargetSeries(function(i) {
  81993. var a = [], o = i.getData();
  81994. o.each(this.getDataDimensionIndex(o), function(s, l) {
  81995. n[0] <= s && s <= n[1] && a.push(l);
  81996. }, this), r.push({
  81997. seriesId: i.id,
  81998. dataIndex: a
  81999. });
  82000. }, this), r;
  82001. }, e.prototype.getVisualMeta = function(n) {
  82002. var r = sQ(this, "outOfRange", this.getExtent()), i = sQ(this, "inRange", this.option.range.slice()), a = [];
  82003. function o(h, p) {
  82004. a.push({
  82005. value: h,
  82006. color: n(h, p)
  82007. });
  82008. }
  82009. for (var s = 0, l = 0, u = i.length, c = r.length; l < c && (!i.length || r[l] <= i[0]); l++)
  82010. r[l] < i[s] && o(r[l], "outOfRange");
  82011. for (var f = 1; s < u; s++, f = 0)
  82012. f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange");
  82013. for (var f = 1; l < c; l++)
  82014. (!i.length || i[i.length - 1] < r[l]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(r[l], "outOfRange"));
  82015. var d = a.length;
  82016. return {
  82017. stops: a,
  82018. outerColors: [d ? a[0].color : "transparent", d ? a[d - 1].color : "transparent"]
  82019. };
  82020. }, e.type = "visualMap.continuous", e.defaultOption = Pu(GO.defaultOption, {
  82021. align: "auto",
  82022. calculable: !1,
  82023. hoverLink: !0,
  82024. realtime: !0,
  82025. 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",
  82026. handleSize: "120%",
  82027. handleStyle: {
  82028. borderColor: "#fff",
  82029. borderWidth: 1
  82030. },
  82031. indicatorIcon: "circle",
  82032. indicatorSize: "50%",
  82033. indicatorStyle: {
  82034. borderColor: "#fff",
  82035. borderWidth: 2,
  82036. shadowBlur: 2,
  82037. shadowOffsetX: 1,
  82038. shadowOffsetY: 1,
  82039. shadowColor: "rgba(0,0,0,0.2)"
  82040. }
  82041. // emphasis: {
  82042. // handleStyle: {
  82043. // shadowBlur: 3,
  82044. // shadowOffsetX: 1,
  82045. // shadowOffsetY: 1,
  82046. // shadowColor: 'rgba(0,0,0,0.2)'
  82047. // }
  82048. // }
  82049. }), e;
  82050. }(GO)
  82051. );
  82052. function sQ(t, e, n) {
  82053. if (n[0] === n[1])
  82054. return n.slice();
  82055. for (var r = 200, i = (n[1] - n[0]) / r, a = n[0], o = [], s = 0; s <= r && a < n[1]; s++)
  82056. o.push(a), a += i;
  82057. return o.push(n[1]), o;
  82058. }
  82059. var lie = (
  82060. /** @class */
  82061. function(t) {
  82062. q(e, t);
  82063. function e() {
  82064. var n = t !== null && t.apply(this, arguments) || this;
  82065. return n.type = e.type, n.autoPositionValues = {
  82066. left: 1,
  82067. right: 1,
  82068. top: 1,
  82069. bottom: 1
  82070. }, n;
  82071. }
  82072. return e.prototype.init = function(n, r) {
  82073. this.ecModel = n, this.api = r;
  82074. }, e.prototype.render = function(n, r, i, a) {
  82075. if (this.visualMapModel = n, n.get("show") === !1) {
  82076. this.group.removeAll();
  82077. return;
  82078. }
  82079. this.doRender(n, r, i, a);
  82080. }, e.prototype.renderBackground = function(n) {
  82081. var r = this.visualMapModel, i = Bf(r.get("padding") || 0), a = n.getBoundingRect();
  82082. n.add(new mt({
  82083. z2: -1,
  82084. silent: !0,
  82085. shape: {
  82086. x: a.x - i[3],
  82087. y: a.y - i[0],
  82088. width: a.width + i[3] + i[1],
  82089. height: a.height + i[0] + i[2]
  82090. },
  82091. style: {
  82092. fill: r.get("backgroundColor"),
  82093. stroke: r.get("borderColor"),
  82094. lineWidth: r.get("borderWidth")
  82095. }
  82096. }));
  82097. }, e.prototype.getControllerVisual = function(n, r, i) {
  82098. i = i || {};
  82099. var a = i.forceState, o = this.visualMapModel, s = {};
  82100. if (r === "color") {
  82101. var l = o.get("contentColor");
  82102. s.color = l;
  82103. }
  82104. function u(h) {
  82105. return s[h];
  82106. }
  82107. function c(h, p) {
  82108. s[h] = p;
  82109. }
  82110. var f = o.controllerVisuals[a || o.getValueState(n)], d = qn.prepareVisualTypes(f);
  82111. return k(d, function(h) {
  82112. var p = f[h];
  82113. i.convertOpacityToAlpha && h === "opacity" && (h = "colorAlpha", p = f.__alphaForOpacity), qn.dependsOn(h, r) && p && p.applyVisual(n, u, c);
  82114. }), s[r];
  82115. }, e.prototype.positionGroup = function(n) {
  82116. var r = this.visualMapModel, i = this.api;
  82117. aw(n, r.getBoxLayoutParams(), {
  82118. width: i.getWidth(),
  82119. height: i.getHeight()
  82120. });
  82121. }, e.prototype.doRender = function(n, r, i, a) {
  82122. }, e.type = "visualMap", e;
  82123. }(Xt)
  82124. ), lQ = [["left", "right", "width"], ["top", "bottom", "height"]];
  82125. function uie(t, e, n) {
  82126. var r = t.option, i = r.align;
  82127. if (i != null && i !== "auto")
  82128. return i;
  82129. for (var a = {
  82130. width: e.getWidth(),
  82131. height: e.getHeight()
  82132. }, o = r.orient === "horizontal" ? 1 : 0, s = lQ[o], l = [0, null, 10], u = {}, c = 0; c < 3; c++)
  82133. u[lQ[1 - o][c]] = l[c], u[s[c]] = c === 2 ? n[0] : r[s[c]];
  82134. var f = [["x", "width", 3], ["y", "height", 0]][o], d = Rn(u, a, r.padding);
  82135. return s[(d.margin[f[2]] || 0) + d[f[0]] + d[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1];
  82136. }
  82137. function K_(t, e) {
  82138. return k(t || [], function(n) {
  82139. n.dataIndex != null && (n.dataIndexInside = n.dataIndex, n.dataIndex = null), n.highlightKey = "visualMap" + (e ? e.componentIndex : "");
  82140. }), t;
  82141. }
  82142. var Ao = Lt, cje = k, uQ = Math.min, o$ = Math.max, fje = 12, dje = 6, hje = (
  82143. /** @class */
  82144. function(t) {
  82145. q(e, t);
  82146. function e() {
  82147. var n = t !== null && t.apply(this, arguments) || this;
  82148. return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n;
  82149. }
  82150. return e.prototype.init = function(n, r) {
  82151. t.prototype.init.call(this, n, r), this._hoverLinkFromSeriesMouseOver = xe(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = xe(this._hideIndicator, this);
  82152. }, e.prototype.doRender = function(n, r, i, a) {
  82153. (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView();
  82154. }, e.prototype._buildView = function() {
  82155. this.group.removeAll();
  82156. var n = this.visualMapModel, r = this.group;
  82157. this._orient = n.get("orient"), this._useHandle = n.get("calculable"), this._resetInterval(), this._renderBar(r);
  82158. var i = n.get("text");
  82159. 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);
  82160. }, e.prototype._renderEndsText = function(n, r, i) {
  82161. if (r) {
  82162. var a = r[1 - i];
  82163. a = a != null ? a + "" : "";
  82164. 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;
  82165. this.group.add(new gt({
  82166. style: Zt(h, {
  82167. x: c[0],
  82168. y: c[1],
  82169. verticalAlign: d === "horizontal" ? "middle" : f,
  82170. align: d === "horizontal" ? f : "center",
  82171. text: a
  82172. })
  82173. }));
  82174. }
  82175. }, e.prototype._renderBar = function(n) {
  82176. var r = this.visualMapModel, i = this._shapes, a = r.itemSize, o = this._orient, s = this._useHandle, l = uie(r, this.api, a), u = i.mainGroup = this._createBarGroup(l), c = new Ve();
  82177. u.add(c), c.add(i.outOfRange = cQ()), c.add(i.inRange = cQ(null, s ? dQ(this._orient) : null, xe(this._dragHandle, this, "all", !1), xe(this._dragHandle, this, "all", !0))), c.setClipPath(new mt({
  82178. shape: {
  82179. x: 0,
  82180. y: 0,
  82181. width: a[0],
  82182. height: a[1],
  82183. r: 3
  82184. }
  82185. }));
  82186. var f = r.textStyleModel.getTextRect("国"), d = o$(f.width, f.height);
  82187. 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);
  82188. }, e.prototype._createHandle = function(n, r, i, a, o, s) {
  82189. var l = xe(this._dragHandle, this, i, !1), u = xe(this._dragHandle, this, i, !0), c = oo(n.get("handleSize"), a[0]), f = $n(n.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), d = dQ(this._orient);
  82190. f.attr({
  82191. cursor: d,
  82192. draggable: !0,
  82193. drift: l,
  82194. ondragend: u,
  82195. onmousemove: function(m) {
  82196. Gs(m.event);
  82197. }
  82198. }), f.x = a[0] / 2, f.useStyle(n.getModel("handleStyle").getItemStyle()), f.setStyle({
  82199. strokeNoScale: !0,
  82200. strokeFirst: !0
  82201. }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = n.getModel(["emphasis", "handleStyle"]).getItemStyle(), Lc(f, !0), r.add(f);
  82202. var h = this.visualMapModel.textStyleModel, p = new gt({
  82203. cursor: d,
  82204. draggable: !0,
  82205. drift: l,
  82206. onmousemove: function(m) {
  82207. Gs(m.event);
  82208. },
  82209. ondragend: u,
  82210. style: Zt(h, {
  82211. x: 0,
  82212. y: 0,
  82213. text: ""
  82214. })
  82215. });
  82216. p.ensureState("blur").style = {
  82217. opacity: 0.1
  82218. }, p.stateTransition = {
  82219. duration: 200
  82220. }, this.group.add(p);
  82221. var v = [c, 0], g = this._shapes;
  82222. g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = p;
  82223. }, e.prototype._createIndicator = function(n, r, i, a, o) {
  82224. var s = oo(n.get("indicatorSize"), i[0]), l = $n(n.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
  82225. l.attr({
  82226. cursor: "move",
  82227. invisible: !0,
  82228. silent: !0,
  82229. x: i[0] / 2
  82230. });
  82231. var u = n.getModel("indicatorStyle").getItemStyle();
  82232. if (l instanceof lr) {
  82233. var c = l.style;
  82234. l.useStyle(le({
  82235. // TODO other properties like x, y ?
  82236. image: c.image,
  82237. x: c.x,
  82238. y: c.y,
  82239. width: c.width,
  82240. height: c.height
  82241. }, u));
  82242. } else
  82243. l.useStyle(u);
  82244. r.add(l);
  82245. var f = this.visualMapModel.textStyleModel, d = new gt({
  82246. silent: !0,
  82247. invisible: !0,
  82248. style: Zt(f, {
  82249. x: 0,
  82250. y: 0,
  82251. text: ""
  82252. })
  82253. });
  82254. this.group.add(d);
  82255. var h = [(o === "horizontal" ? a / 2 : dje) + i[0] / 2, 0], p = this._shapes;
  82256. p.indicator = l, p.indicatorLabel = d, p.indicatorLabelPoint = h, this._firstShowIndicator = !0;
  82257. }, e.prototype._dragHandle = function(n, r, i, a) {
  82258. if (this._useHandle) {
  82259. if (this._dragging = !r, !r) {
  82260. var o = this._applyTransform([i, a], this._shapes.mainGroup, !0);
  82261. this._updateInterval(n, o[1]), this._hideIndicator(), this._updateView();
  82262. }
  82263. r === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  82264. type: "selectDataRange",
  82265. from: this.uid,
  82266. visualMapId: this.visualMapModel.id,
  82267. selected: this._dataInterval.slice()
  82268. }), r ? !this._hovering && this._clearHoverLinkToSeries() : fQ(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[n], !1);
  82269. }
  82270. }, e.prototype._resetInterval = function() {
  82271. var n = this.visualMapModel, r = this._dataInterval = n.getSelected(), i = n.getExtent(), a = [0, n.itemSize[1]];
  82272. this._handleEnds = [Ao(r[0], i, a, !0), Ao(r[1], i, a, !0)];
  82273. }, e.prototype._updateInterval = function(n, r) {
  82274. r = r || 0;
  82275. var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]];
  82276. Qf(
  82277. r,
  82278. a,
  82279. o,
  82280. n,
  82281. // cross is forbidden
  82282. 0
  82283. );
  82284. var s = i.getExtent();
  82285. this._dataInterval = [Ao(a[0], o, s, !0), Ao(a[1], o, s, !0)];
  82286. }, e.prototype._updateView = function(n) {
  82287. 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");
  82288. a.inRange.setStyle({
  82289. fill: l.barColor
  82290. // opacity: visualInRange.opacity
  82291. }).setShape("points", l.barPoints), a.outOfRange.setStyle({
  82292. fill: u.barColor
  82293. // opacity: visualOutOfRange.opacity
  82294. }).setShape("points", u.barPoints), this._updateHandle(s, l);
  82295. }, e.prototype._createBarVisual = function(n, r, i, a) {
  82296. var o = {
  82297. forceState: a,
  82298. convertOpacityToAlpha: !0
  82299. }, s = this._makeColorGradient(n, o), l = [this.getControllerVisual(n[0], "symbolSize", o), this.getControllerVisual(n[1], "symbolSize", o)], u = this._createBarPoints(i, l);
  82300. return {
  82301. barColor: new hp(0, 0, 0, 1, s),
  82302. barPoints: u,
  82303. handlesColor: [s[0].color, s[s.length - 1].color]
  82304. };
  82305. }, e.prototype._makeColorGradient = function(n, r) {
  82306. var i = 100, a = [], o = (n[1] - n[0]) / i;
  82307. a.push({
  82308. color: this.getControllerVisual(n[0], "color", r),
  82309. offset: 0
  82310. });
  82311. for (var s = 1; s < i; s++) {
  82312. var l = n[0] + o * s;
  82313. if (l > n[1])
  82314. break;
  82315. a.push({
  82316. color: this.getControllerVisual(l, "color", r),
  82317. offset: s / i
  82318. });
  82319. }
  82320. return a.push({
  82321. color: this.getControllerVisual(n[1], "color", r),
  82322. offset: 1
  82323. }), a;
  82324. }, e.prototype._createBarPoints = function(n, r) {
  82325. var i = this.visualMapModel.itemSize;
  82326. return [[i[0] - r[0], n[0]], [i[0], n[0]], [i[0], n[1]], [i[0] - r[1], n[1]]];
  82327. }, e.prototype._createBarGroup = function(n) {
  82328. var r = this._orient, i = this.visualMapModel.get("inverse");
  82329. return new Ve(r === "horizontal" && !i ? {
  82330. scaleX: n === "bottom" ? 1 : -1,
  82331. rotation: Math.PI / 2
  82332. } : r === "horizontal" && i ? {
  82333. scaleX: n === "bottom" ? -1 : 1,
  82334. rotation: -Math.PI / 2
  82335. } : r === "vertical" && !i ? {
  82336. scaleX: n === "left" ? 1 : -1,
  82337. scaleY: -1
  82338. } : {
  82339. scaleX: n === "left" ? 1 : -1
  82340. });
  82341. }, e.prototype._updateHandle = function(n, r) {
  82342. if (this._useHandle) {
  82343. var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, l = a.itemSize, u = a.getExtent();
  82344. cje([0, 1], function(c) {
  82345. var f = o[c];
  82346. f.setStyle("fill", r.handlesColor[c]), f.y = n[c];
  82347. var d = Ao(n[c], [0, l[1]], u, !0), h = this.getControllerVisual(d, "symbolSize");
  82348. f.scaleX = f.scaleY = h / l[0], f.x = l[0] - h / 2;
  82349. var p = to(i.handleLabelPoints[c], ql(f, this.group));
  82350. s[c].setStyle({
  82351. x: p[0],
  82352. y: p[1],
  82353. text: a.formatValueText(this._dataInterval[c]),
  82354. verticalAlign: "middle",
  82355. align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center"
  82356. });
  82357. }, this);
  82358. }
  82359. }, e.prototype._showIndicator = function(n, r, i, a) {
  82360. var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], c = this._shapes, f = c.indicator;
  82361. if (f) {
  82362. f.attr("invisible", !1);
  82363. var d = {
  82364. convertOpacityToAlpha: !0
  82365. }, h = this.getControllerVisual(n, "color", d), p = this.getControllerVisual(n, "symbolSize"), v = Ao(n, s, u, !0), g = l[0] - p / 2, m = {
  82366. x: f.x,
  82367. y: f.y
  82368. };
  82369. f.y = v, f.x = g;
  82370. var y = to(c.indicatorLabelPoint, ql(f, this.group)), b = c.indicatorLabel;
  82371. b.attr("invisible", !1);
  82372. var _ = this._applyTransform("left", c.mainGroup), O = this._orient, S = O === "horizontal";
  82373. b.setStyle({
  82374. text: (i || "") + o.formatValueText(r),
  82375. verticalAlign: S ? _ : "middle",
  82376. align: S ? "center" : _
  82377. });
  82378. var x = {
  82379. x: g,
  82380. y: v,
  82381. style: {
  82382. fill: h
  82383. }
  82384. }, C = {
  82385. style: {
  82386. x: y[0],
  82387. y: y[1]
  82388. }
  82389. };
  82390. if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
  82391. var T = {
  82392. duration: 100,
  82393. easing: "cubicInOut",
  82394. additive: !0
  82395. };
  82396. f.x = m.x, f.y = m.y, f.animateTo(x, T), b.animateTo(C, T);
  82397. } else
  82398. f.attr(x), b.attr(C);
  82399. this._firstShowIndicator = !1;
  82400. var w = this._shapes.handleLabels;
  82401. if (w)
  82402. for (var P = 0; P < w.length; P++)
  82403. this.api.enterBlur(w[P]);
  82404. }
  82405. }, e.prototype._enableHoverLinkToSeries = function() {
  82406. var n = this;
  82407. this._shapes.mainGroup.on("mousemove", function(r) {
  82408. if (n._hovering = !0, !n._dragging) {
  82409. var i = n.visualMapModel.itemSize, a = n._applyTransform([r.offsetX, r.offsetY], n._shapes.mainGroup, !0, !0);
  82410. a[1] = uQ(o$(0, a[1]), i[1]), n._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]);
  82411. }
  82412. }).on("mouseout", function() {
  82413. n._hovering = !1, !n._dragging && n._clearHoverLinkToSeries();
  82414. });
  82415. }, e.prototype._enableHoverLinkFromSeries = function() {
  82416. var n = this.api.getZr();
  82417. this.visualMapModel.option.hoverLink ? (n.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), n.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
  82418. }, e.prototype._doHoverLinkToSeries = function(n, r) {
  82419. var i = this.visualMapModel, a = i.itemSize;
  82420. if (i.option.hoverLink) {
  82421. var o = [0, a[1]], s = i.getExtent();
  82422. n = uQ(o$(o[0], n), o[1]);
  82423. var l = pje(i, s, o), u = [n - l, n + l], c = Ao(n, o, s, !0), f = [Ao(u[0], o, s, !0), Ao(u[1], o, s, !0)];
  82424. 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));
  82425. var d = this._hoverLinkDataIndices, h = [];
  82426. (r || fQ(i)) && (h = this._hoverLinkDataIndices = i.findTargetDataIndices(f));
  82427. var p = KDe(d, h);
  82428. this._dispatchHighDown("downplay", K_(p[0], i)), this._dispatchHighDown("highlight", K_(p[1], i));
  82429. }
  82430. }, e.prototype._hoverLinkFromSeriesMouseOver = function(n) {
  82431. var r;
  82432. if (Bc(n.target, function(l) {
  82433. var u = Fe(l);
  82434. if (u.dataIndex != null)
  82435. return r = u, !0;
  82436. }, !0), !!r) {
  82437. var i = this.ecModel.getSeriesByIndex(r.seriesIndex), a = this.visualMapModel;
  82438. if (a.isTargetSeries(i)) {
  82439. var o = i.getData(r.dataType), s = o.getStore().get(a.getDataDimensionIndex(o), r.dataIndex);
  82440. isNaN(s) || this._showIndicator(s, s);
  82441. }
  82442. }
  82443. }, e.prototype._hideIndicator = function() {
  82444. var n = this._shapes;
  82445. n.indicator && n.indicator.attr("invisible", !0), n.indicatorLabel && n.indicatorLabel.attr("invisible", !0);
  82446. var r = this._shapes.handleLabels;
  82447. if (r)
  82448. for (var i = 0; i < r.length; i++)
  82449. this.api.leaveBlur(r[i]);
  82450. }, e.prototype._clearHoverLinkToSeries = function() {
  82451. this._hideIndicator();
  82452. var n = this._hoverLinkDataIndices;
  82453. this._dispatchHighDown("downplay", K_(n, this.visualMapModel)), n.length = 0;
  82454. }, e.prototype._clearHoverLinkFromSeries = function() {
  82455. this._hideIndicator();
  82456. var n = this.api.getZr();
  82457. n.off("mouseover", this._hoverLinkFromSeriesMouseOver), n.off("mouseout", this._hideIndicator);
  82458. }, e.prototype._applyTransform = function(n, r, i, a) {
  82459. var o = ql(r, a ? null : this.group);
  82460. return ue(n) ? to(n, o, i) : Jx(n, o, i);
  82461. }, e.prototype._dispatchHighDown = function(n, r) {
  82462. r && r.length && this.api.dispatchAction({
  82463. type: n,
  82464. batch: r
  82465. });
  82466. }, e.prototype.dispose = function() {
  82467. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
  82468. }, e.type = "visualMap.continuous", e;
  82469. }(lie)
  82470. );
  82471. function cQ(t, e, n, r) {
  82472. return new ii({
  82473. shape: {
  82474. points: t
  82475. },
  82476. draggable: !!n,
  82477. cursor: e,
  82478. drift: n,
  82479. onmousemove: function(i) {
  82480. Gs(i.event);
  82481. },
  82482. ondragend: r
  82483. });
  82484. }
  82485. function pje(t, e, n) {
  82486. var r = fje / 2, i = t.get("hoverLinkDataSize");
  82487. return i && (r = Ao(i, e, n, !0) / 2), r;
  82488. }
  82489. function fQ(t) {
  82490. var e = t.get("hoverLinkOnHandle");
  82491. return !!(e ?? t.get("realtime"));
  82492. }
  82493. function dQ(t) {
  82494. return t === "vertical" ? "ns-resize" : "ew-resize";
  82495. }
  82496. var vje = {
  82497. type: "selectDataRange",
  82498. event: "dataRangeSelected",
  82499. // FIXME use updateView appears wrong
  82500. update: "update"
  82501. }, gje = function(t, e) {
  82502. e.eachComponent({
  82503. mainType: "visualMap",
  82504. query: t
  82505. }, function(n) {
  82506. n.setSelected(t.selected);
  82507. });
  82508. }, mje = [
  82509. {
  82510. createOnAllSeries: !0,
  82511. reset: function(t, e) {
  82512. var n = [];
  82513. return e.eachComponent("visualMap", function(r) {
  82514. var i = t.pipelineContext;
  82515. !r.isTargetSeries(t) || i && i.large || n.push(zGe(r.stateList, r.targetVisuals, xe(r.getValueState, r), r.getDataDimensionIndex(t.getData())));
  82516. }), n;
  82517. }
  82518. },
  82519. // Only support color.
  82520. {
  82521. createOnAllSeries: !0,
  82522. reset: function(t, e) {
  82523. var n = t.getData(), r = [];
  82524. e.eachComponent("visualMap", function(i) {
  82525. if (i.isTargetSeries(t)) {
  82526. var a = i.getVisualMeta(xe(yje, null, t, i)) || {
  82527. stops: [],
  82528. outerColors: []
  82529. }, o = i.getDataDimensionIndex(n);
  82530. o >= 0 && (a.dimension = o, r.push(a));
  82531. }
  82532. }), t.getData().setVisual("visualMeta", r);
  82533. }
  82534. }
  82535. ];
  82536. function yje(t, e, n, r) {
  82537. for (var i = e.targetVisuals[r], a = qn.prepareVisualTypes(i), o = {
  82538. color: H0(t.getData(), "color")
  82539. // default color.
  82540. }, s = 0, l = a.length; s < l; s++) {
  82541. var u = a[s], c = i[u === "opacity" ? "__alphaForOpacity" : u];
  82542. c && c.applyVisual(n, f, d);
  82543. }
  82544. return o.color;
  82545. function f(h) {
  82546. return o[h];
  82547. }
  82548. function d(h, p) {
  82549. o[h] = p;
  82550. }
  82551. }
  82552. var hQ = k;
  82553. function bje(t) {
  82554. var e = t && t.visualMap;
  82555. ue(e) || (e = e ? [e] : []), hQ(e, function(n) {
  82556. if (n) {
  82557. _d(n, "splitList") && !_d(n, "pieces") && (n.pieces = n.splitList, delete n.splitList);
  82558. var r = n.pieces;
  82559. r && ue(r) && hQ(r, function(i) {
  82560. Ie(i) && (_d(i, "start") && !_d(i, "min") && (i.min = i.start), _d(i, "end") && !_d(i, "max") && (i.max = i.end));
  82561. });
  82562. }
  82563. });
  82564. }
  82565. function _d(t, e) {
  82566. return t && t.hasOwnProperty && t.hasOwnProperty(e);
  82567. }
  82568. var pQ = !1;
  82569. function cie(t) {
  82570. pQ || (pQ = !0, t.registerSubTypeDefaulter("visualMap", function(e) {
  82571. return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
  82572. }), t.registerAction(vje, gje), k(mje, function(e) {
  82573. t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e);
  82574. }), t.registerPreprocessor(bje));
  82575. }
  82576. function fie(t) {
  82577. t.registerComponentModel(uje), t.registerComponentView(hje), cie(t);
  82578. }
  82579. var _je = (
  82580. /** @class */
  82581. function(t) {
  82582. q(e, t);
  82583. function e() {
  82584. var n = t !== null && t.apply(this, arguments) || this;
  82585. return n.type = e.type, n._pieceList = [], n;
  82586. }
  82587. return e.prototype.optionUpdated = function(n, r) {
  82588. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
  82589. var i = this._mode = this._determineMode();
  82590. this._pieceList = [], Oje[this._mode].call(this, this._pieceList), this._resetSelected(n, r);
  82591. var a = this.option.categories;
  82592. this.resetVisual(function(o, s) {
  82593. i === "categories" ? (o.mappingMethod = "category", o.categories = Le(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = ce(this._pieceList, function(l) {
  82594. return l = Le(l), s !== "inRange" && (l.visual = null), l;
  82595. }));
  82596. });
  82597. }, e.prototype.completeVisualOption = function() {
  82598. var n = this.option, r = {}, i = qn.listVisualTypes(), a = this.isCategory();
  82599. k(n.pieces, function(s) {
  82600. k(i, function(l) {
  82601. s.hasOwnProperty(l) && (r[l] = 1);
  82602. });
  82603. }), k(r, function(s, l) {
  82604. var u = !1;
  82605. k(this.stateList, function(c) {
  82606. u = u || o(n, c, l) || o(n.target, c, l);
  82607. }, this), !u && k(this.stateList, function(c) {
  82608. (n[c] || (n[c] = {}))[l] = sie.get(l, c === "inRange" ? "active" : "inactive", a);
  82609. });
  82610. }, this);
  82611. function o(s, l, u) {
  82612. return s && s[l] && s[l].hasOwnProperty(u);
  82613. }
  82614. t.prototype.completeVisualOption.apply(this, arguments);
  82615. }, e.prototype._resetSelected = function(n, r) {
  82616. var i = this.option, a = this._pieceList, o = (r ? i : n).selected || {};
  82617. if (i.selected = o, k(a, function(l, u) {
  82618. var c = this.getSelectedMapKey(l);
  82619. o.hasOwnProperty(c) || (o[c] = !0);
  82620. }, this), i.selectedMode === "single") {
  82621. var s = !1;
  82622. k(a, function(l, u) {
  82623. var c = this.getSelectedMapKey(l);
  82624. o[c] && (s ? o[c] = !1 : s = !0);
  82625. }, this);
  82626. }
  82627. }, e.prototype.getItemSymbol = function() {
  82628. return this.get("itemSymbol");
  82629. }, e.prototype.getSelectedMapKey = function(n) {
  82630. return this._mode === "categories" ? n.value + "" : n.index + "";
  82631. }, e.prototype.getPieceList = function() {
  82632. return this._pieceList;
  82633. }, e.prototype._determineMode = function() {
  82634. var n = this.option;
  82635. return n.pieces && n.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
  82636. }, e.prototype.setSelected = function(n) {
  82637. this.option.selected = Le(n);
  82638. }, e.prototype.getValueState = function(n) {
  82639. var r = qn.findPieceIndex(n, this._pieceList);
  82640. return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
  82641. }, e.prototype.findTargetDataIndices = function(n) {
  82642. var r = [], i = this._pieceList;
  82643. return this.eachTargetSeries(function(a) {
  82644. var o = [], s = a.getData();
  82645. s.each(this.getDataDimensionIndex(s), function(l, u) {
  82646. var c = qn.findPieceIndex(l, i);
  82647. c === n && o.push(u);
  82648. }, this), r.push({
  82649. seriesId: a.id,
  82650. dataIndex: o
  82651. });
  82652. }, this), r;
  82653. }, e.prototype.getRepresentValue = function(n) {
  82654. var r;
  82655. if (this.isCategory())
  82656. r = n.value;
  82657. else if (n.value != null)
  82658. r = n.value;
  82659. else {
  82660. var i = n.interval || [];
  82661. r = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2;
  82662. }
  82663. return r;
  82664. }, e.prototype.getVisualMeta = function(n) {
  82665. if (this.isCategory())
  82666. return;
  82667. var r = [], i = ["", ""], a = this;
  82668. function o(c, f) {
  82669. var d = a.getRepresentValue({
  82670. interval: c
  82671. });
  82672. f || (f = a.getValueState(d));
  82673. var h = n(d, f);
  82674. c[0] === -1 / 0 ? i[0] = h : c[1] === 1 / 0 ? i[1] = h : r.push({
  82675. value: c[0],
  82676. color: h
  82677. }, {
  82678. value: c[1],
  82679. color: h
  82680. });
  82681. }
  82682. var s = this._pieceList.slice();
  82683. if (!s.length)
  82684. s.push({
  82685. interval: [-1 / 0, 1 / 0]
  82686. });
  82687. else {
  82688. var l = s[0].interval[0];
  82689. l !== -1 / 0 && s.unshift({
  82690. interval: [-1 / 0, l]
  82691. }), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
  82692. interval: [l, 1 / 0]
  82693. });
  82694. }
  82695. var u = -1 / 0;
  82696. return k(s, function(c) {
  82697. var f = c.interval;
  82698. f && (f[0] > u && o([u, f[0]], "outOfRange"), o(f.slice()), u = f[1]);
  82699. }, this), {
  82700. stops: r,
  82701. outerColors: i
  82702. };
  82703. }, e.type = "visualMap.piecewise", e.defaultOption = Pu(GO.defaultOption, {
  82704. selected: null,
  82705. minOpen: !1,
  82706. maxOpen: !1,
  82707. align: "auto",
  82708. itemWidth: 20,
  82709. itemHeight: 14,
  82710. itemSymbol: "roundRect",
  82711. pieces: null,
  82712. categories: null,
  82713. splitNumber: 5,
  82714. selectedMode: "multiple",
  82715. itemGap: 10,
  82716. hoverLink: !0
  82717. // Enable hover highlight.
  82718. }), e;
  82719. }(GO)
  82720. ), Oje = {
  82721. splitNumber: function(t) {
  82722. var e = this.option, n = Math.min(e.precision, 20), r = this.getExtent(), i = e.splitNumber;
  82723. i = Math.max(parseInt(i, 10), 1), e.splitNumber = i;
  82724. for (var a = (r[1] - r[0]) / i; +a.toFixed(n) !== a && n < 5; )
  82725. n++;
  82726. e.precision = n, a = +a.toFixed(n), e.minOpen && t.push({
  82727. interval: [-1 / 0, r[0]],
  82728. close: [0, 0]
  82729. });
  82730. for (var o = 0, s = r[0]; o < i; s += a, o++) {
  82731. var l = o === i - 1 ? r[1] : s + a;
  82732. t.push({
  82733. interval: [s, l],
  82734. close: [1, 1]
  82735. });
  82736. }
  82737. e.maxOpen && t.push({
  82738. interval: [r[1], 1 / 0],
  82739. close: [0, 0]
  82740. }), TA(t), k(t, function(u, c) {
  82741. u.index = c, u.text = this.formatValueText(u.interval);
  82742. }, this);
  82743. },
  82744. categories: function(t) {
  82745. var e = this.option;
  82746. k(e.categories, function(n) {
  82747. t.push({
  82748. text: this.formatValueText(n, !0),
  82749. value: n
  82750. });
  82751. }, this), vQ(e, t);
  82752. },
  82753. pieces: function(t) {
  82754. var e = this.option;
  82755. k(e.pieces, function(n, r) {
  82756. Ie(n) || (n = {
  82757. value: n
  82758. });
  82759. var i = {
  82760. text: "",
  82761. index: r
  82762. };
  82763. if (n.label != null && (i.text = n.label), n.hasOwnProperty("value")) {
  82764. var a = i.value = n.value;
  82765. i.interval = [a, a], i.close = [1, 1];
  82766. } else {
  82767. 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++) {
  82768. for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], h = 0; h < 3 && o[f] == null; h++)
  82769. o[f] = n[d[h]], s[f] = l[h], c[f] = h === 2;
  82770. o[f] == null && (o[f] = u[f]);
  82771. }
  82772. 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]);
  82773. }
  82774. i.visual = qn.retrieveVisuals(n), t.push(i);
  82775. }, this), vQ(e, t), TA(t), k(t, function(n) {
  82776. var r = n.close, i = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
  82777. n.text = n.text || this.formatValueText(n.value != null ? n.value : n.interval, !1, i);
  82778. }, this);
  82779. }
  82780. };
  82781. function vQ(t, e) {
  82782. var n = t.inverse;
  82783. (t.orient === "vertical" ? !n : n) && e.reverse();
  82784. }
  82785. var Sje = (
  82786. /** @class */
  82787. function(t) {
  82788. q(e, t);
  82789. function e() {
  82790. var n = t !== null && t.apply(this, arguments) || this;
  82791. return n.type = e.type, n;
  82792. }
  82793. return e.prototype.doRender = function() {
  82794. var n = this.group;
  82795. n.removeAll();
  82796. 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);
  82797. f && this._renderEndsText(n, f[0], u, d, l), k(c.viewPieceList, function(h) {
  82798. var p = h.piece, v = new Ve();
  82799. v.onclick = xe(this._onItemClick, this, p), this._enableHoverLink(v, h.indexInModelPieceList);
  82800. var g = r.getRepresentValue(p);
  82801. if (this._createItemSymbol(v, g, [0, 0, u[0], u[1]]), d) {
  82802. var m = this.visualMapModel.getValueState(g);
  82803. v.add(new gt({
  82804. style: {
  82805. x: l === "right" ? -i : u[0] + i,
  82806. y: u[1] / 2,
  82807. text: p.text,
  82808. verticalAlign: "middle",
  82809. align: l,
  82810. font: o,
  82811. fill: s,
  82812. opacity: m === "outOfRange" ? 0.5 : 1
  82813. }
  82814. }));
  82815. }
  82816. n.add(v);
  82817. }, this), f && this._renderEndsText(n, f[1], u, d, l), ef(r.get("orient"), n, r.get("itemGap")), this.renderBackground(n), this.positionGroup(n);
  82818. }, e.prototype._enableHoverLink = function(n, r) {
  82819. var i = this;
  82820. n.on("mouseover", function() {
  82821. return a("highlight");
  82822. }).on("mouseout", function() {
  82823. return a("downplay");
  82824. });
  82825. var a = function(o) {
  82826. var s = i.visualMapModel;
  82827. s.option.hoverLink && i.api.dispatchAction({
  82828. type: o,
  82829. batch: K_(s.findTargetDataIndices(r), s)
  82830. });
  82831. };
  82832. }, e.prototype._getItemAlign = function() {
  82833. var n = this.visualMapModel, r = n.option;
  82834. if (r.orient === "vertical")
  82835. return uie(n, this.api, n.itemSize);
  82836. var i = r.align;
  82837. return (!i || i === "auto") && (i = "left"), i;
  82838. }, e.prototype._renderEndsText = function(n, r, i, a, o) {
  82839. if (r) {
  82840. var s = new Ve(), l = this.visualMapModel.textStyleModel;
  82841. s.add(new gt({
  82842. style: Zt(l, {
  82843. x: a ? o === "right" ? i[0] : 0 : i[0] / 2,
  82844. y: i[1] / 2,
  82845. verticalAlign: "middle",
  82846. align: a ? o : "center",
  82847. text: r
  82848. })
  82849. })), n.add(s);
  82850. }
  82851. }, e.prototype._getViewData = function() {
  82852. var n = this.visualMapModel, r = ce(n.getPieceList(), function(s, l) {
  82853. return {
  82854. piece: s,
  82855. indexInModelPieceList: l
  82856. };
  82857. }), i = n.get("text"), a = n.get("orient"), o = n.get("inverse");
  82858. return (a === "horizontal" ? o : !o) ? r.reverse() : i && (i = i.slice().reverse()), {
  82859. viewPieceList: r,
  82860. endsText: i
  82861. };
  82862. }, e.prototype._createItemSymbol = function(n, r, i) {
  82863. n.add($n(
  82864. // symbol will be string
  82865. this.getControllerVisual(r, "symbol"),
  82866. i[0],
  82867. i[1],
  82868. i[2],
  82869. i[3],
  82870. // color will be string
  82871. this.getControllerVisual(r, "color")
  82872. ));
  82873. }, e.prototype._onItemClick = function(n) {
  82874. var r = this.visualMapModel, i = r.option, a = i.selectedMode;
  82875. if (a) {
  82876. var o = Le(i.selected), s = r.getSelectedMapKey(n);
  82877. a === "single" || a === !0 ? (o[s] = !0, k(o, function(l, u) {
  82878. o[u] = u === s;
  82879. })) : o[s] = !o[s], this.api.dispatchAction({
  82880. type: "selectDataRange",
  82881. from: this.uid,
  82882. visualMapId: this.visualMapModel.id,
  82883. selected: o
  82884. });
  82885. }
  82886. }, e.type = "visualMap.piecewise", e;
  82887. }(lie)
  82888. );
  82889. function die(t) {
  82890. t.registerComponentModel(_je), t.registerComponentView(Sje), cie(t);
  82891. }
  82892. function xje(t) {
  82893. at(fie), at(die);
  82894. }
  82895. var wje = {
  82896. label: {
  82897. enabled: !0
  82898. },
  82899. decal: {
  82900. show: !1
  82901. }
  82902. }, gQ = bt(), Cje = {};
  82903. function Tje(t, e) {
  82904. var n = t.getModel("aria");
  82905. if (!n.get("enabled"))
  82906. return;
  82907. var r = Le(wje);
  82908. qe(r.label, t.getLocaleModel().get("aria"), !1), qe(n.option, r, !1), i(), a();
  82909. function i() {
  82910. var u = n.getModel("decal"), c = u.get("show");
  82911. if (c) {
  82912. var f = Pe();
  82913. t.eachSeries(function(d) {
  82914. if (!d.isColorBySeries()) {
  82915. var h = f.get(d.type);
  82916. h || (h = {}, f.set(d.type, h)), gQ(d).scope = h;
  82917. }
  82918. }), t.eachRawSeries(function(d) {
  82919. if (t.isSeriesFiltered(d))
  82920. return;
  82921. if (Me(d.enableAriaDecal)) {
  82922. d.enableAriaDecal();
  82923. return;
  82924. }
  82925. var h = d.getData();
  82926. if (d.isColorBySeries()) {
  82927. var y = QA(d.ecModel, d.name, Cje, t.getSeriesCount()), b = h.getVisual("decal");
  82928. h.setVisual("decal", _(b, y));
  82929. } else {
  82930. var p = d.getRawData(), v = {}, g = gQ(d).scope;
  82931. h.each(function(O) {
  82932. var S = h.getRawIndex(O);
  82933. v[S] = O;
  82934. });
  82935. var m = p.count();
  82936. p.each(function(O) {
  82937. var S = v[O], x = p.getName(O) || O + "", C = QA(d.ecModel, x, g, m), T = h.getItemVisual(S, "decal");
  82938. h.setItemVisual(S, "decal", _(T, C));
  82939. });
  82940. }
  82941. function _(O, S) {
  82942. var x = O ? le(le({}, S), O) : S;
  82943. return x.dirty = !0, x;
  82944. }
  82945. });
  82946. }
  82947. }
  82948. function a() {
  82949. var u = e.getZr().dom;
  82950. if (u) {
  82951. var c = t.getLocaleModel().get("aria"), f = n.getModel("label");
  82952. if (f.option = Re(f.option, c), !!f.get("enabled")) {
  82953. if (f.get("description")) {
  82954. u.setAttribute("aria-label", f.get("description"));
  82955. return;
  82956. }
  82957. var d = t.getSeriesCount(), h = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, v = Math.min(d, p), g;
  82958. if (!(d < 1)) {
  82959. var m = s();
  82960. if (m) {
  82961. var y = f.get(["general", "withTitle"]);
  82962. g = o(y, {
  82963. title: m
  82964. });
  82965. } else
  82966. g = f.get(["general", "withoutTitle"]);
  82967. var b = [], _ = d > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
  82968. g += o(_, {
  82969. seriesCount: d
  82970. }), t.eachSeries(function(C, T) {
  82971. if (T < v) {
  82972. var w = void 0, P = C.get("name"), $ = P ? "withName" : "withoutName";
  82973. w = d > 1 ? f.get(["series", "multiple", $]) : f.get(["series", "single", $]), w = o(w, {
  82974. seriesId: C.seriesIndex,
  82975. seriesName: C.get("name"),
  82976. seriesType: l(C.subType)
  82977. });
  82978. var A = C.getData();
  82979. if (A.count() > h) {
  82980. var D = f.get(["data", "partialData"]);
  82981. w += o(D, {
  82982. displayCnt: h
  82983. });
  82984. } else
  82985. w += f.get(["data", "allData"]);
  82986. for (var E = f.get(["data", "separator", "middle"]), R = f.get(["data", "separator", "end"]), N = [], V = 0; V < A.count(); V++)
  82987. if (V < h) {
  82988. var z = A.getName(V), W = A.getValues(V), F = f.get(["data", z ? "withName" : "withoutName"]);
  82989. N.push(o(F, {
  82990. name: z,
  82991. value: W.join(E)
  82992. }));
  82993. }
  82994. w += N.join(E) + R, b.push(w);
  82995. }
  82996. });
  82997. var O = f.getModel(["series", "multiple", "separator"]), S = O.get("middle"), x = O.get("end");
  82998. g += b.join(S) + x, u.setAttribute("aria-label", g);
  82999. }
  83000. }
  83001. }
  83002. }
  83003. function o(u, c) {
  83004. if (!Oe(u))
  83005. return u;
  83006. var f = u;
  83007. return k(c, function(d, h) {
  83008. f = f.replace(new RegExp("\\{\\s*" + h + "\\s*\\}", "g"), d);
  83009. }), f;
  83010. }
  83011. function s() {
  83012. var u = t.get("title");
  83013. return u && u.length && (u = u[0]), u && u.text;
  83014. }
  83015. function l(u) {
  83016. var c = t.getLocaleModel().get(["series", "typeNames"]);
  83017. return c[u] || c.chart;
  83018. }
  83019. }
  83020. function Pje(t) {
  83021. if (!(!t || !t.aria)) {
  83022. var e = t.aria;
  83023. e.show != null && (e.enabled = e.show), e.label = e.label || {}, k(["description", "general", "series", "data"], function(n) {
  83024. e[n] != null && (e.label[n] = e[n]);
  83025. });
  83026. }
  83027. }
  83028. function $je(t) {
  83029. t.registerPreprocessor(Pje), t.registerVisual(t.PRIORITY.VISUAL.ARIA, Tje);
  83030. }
  83031. var mQ = {
  83032. value: "eq",
  83033. // PENDING: not good for literal semantic?
  83034. "<": "lt",
  83035. "<=": "lte",
  83036. ">": "gt",
  83037. ">=": "gte",
  83038. "=": "eq",
  83039. "!=": "ne",
  83040. "<>": "ne"
  83041. // Might be misleading for sake of the difference between '==' and '===',
  83042. // so don't support them.
  83043. // '==': 'eq',
  83044. // '===': 'seq',
  83045. // '!==': 'sne'
  83046. // PENDING: Whether support some common alias "ge", "le", "neq"?
  83047. // ge: 'gte',
  83048. // le: 'lte',
  83049. // neq: 'ne',
  83050. }, Aje = (
  83051. /** @class */
  83052. function() {
  83053. function t(e) {
  83054. var n = this._condVal = Oe(e) ? new RegExp(e) : yR(e) ? e : null;
  83055. if (n == null) {
  83056. var r = "";
  83057. process.env.NODE_ENV !== "production" && (r = ti("Illegal regexp", e, "in")), Et(r);
  83058. }
  83059. }
  83060. return t.prototype.evaluate = function(e) {
  83061. var n = typeof e;
  83062. return Oe(n) ? this._condVal.test(e) : St(n) ? this._condVal.test(e + "") : !1;
  83063. }, t;
  83064. }()
  83065. ), Eje = (
  83066. /** @class */
  83067. function() {
  83068. function t() {
  83069. }
  83070. return t.prototype.evaluate = function() {
  83071. return this.value;
  83072. }, t;
  83073. }()
  83074. ), Mje = (
  83075. /** @class */
  83076. function() {
  83077. function t() {
  83078. }
  83079. return t.prototype.evaluate = function() {
  83080. for (var e = this.children, n = 0; n < e.length; n++)
  83081. if (!e[n].evaluate())
  83082. return !1;
  83083. return !0;
  83084. }, t;
  83085. }()
  83086. ), Ije = (
  83087. /** @class */
  83088. function() {
  83089. function t() {
  83090. }
  83091. return t.prototype.evaluate = function() {
  83092. for (var e = this.children, n = 0; n < e.length; n++)
  83093. if (e[n].evaluate())
  83094. return !0;
  83095. return !1;
  83096. }, t;
  83097. }()
  83098. ), Dje = (
  83099. /** @class */
  83100. function() {
  83101. function t() {
  83102. }
  83103. return t.prototype.evaluate = function() {
  83104. return !this.child.evaluate();
  83105. }, t;
  83106. }()
  83107. ), Rje = (
  83108. /** @class */
  83109. function() {
  83110. function t() {
  83111. }
  83112. return t.prototype.evaluate = function() {
  83113. 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++)
  83114. if (!this.subCondList[a].evaluate(e ? i : r))
  83115. return !1;
  83116. return !0;
  83117. }, t;
  83118. }()
  83119. );
  83120. function ML(t, e) {
  83121. if (t === !0 || t === !1) {
  83122. var n = new Eje();
  83123. return n.value = t, n;
  83124. }
  83125. var r = "";
  83126. return hie(t) || (process.env.NODE_ENV !== "production" && (r = ti("Illegal config. Expect a plain object but actually", t)), Et(r)), t.and ? yQ("and", t, e) : t.or ? yQ("or", t, e) : t.not ? kje(t, e) : Lje(t, e);
  83127. }
  83128. function yQ(t, e, n) {
  83129. var r = e[t], i = "";
  83130. process.env.NODE_ENV !== "production" && (i = ti('"and"/"or" condition should only be `' + t + ": [...]` and must not be empty array.", "Illegal condition:", e)), ue(r) || Et(i), r.length || Et(i);
  83131. var a = t === "and" ? new Mje() : new Ije();
  83132. return a.children = ce(r, function(o) {
  83133. return ML(o, n);
  83134. }), a.children.length || Et(i), a;
  83135. }
  83136. function kje(t, e) {
  83137. var n = t.not, r = "";
  83138. process.env.NODE_ENV !== "production" && (r = ti('"not" condition should only be `not: {}`.', "Illegal condition:", t)), hie(n) || Et(r);
  83139. var i = new Dje();
  83140. return i.child = ML(n, e), i.child || Et(r), i;
  83141. }
  83142. function Lje(t, e) {
  83143. for (var n = "", r = e.prepareGetValue(t), i = [], a = st(t), o = t.parser, s = o ? HJ(o) : null, l = 0; l < a.length; l++) {
  83144. var u = a[l];
  83145. if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
  83146. var c = Ce(mQ, u) ? mQ[u] : u, f = t[u], d = s ? s(f) : f, h = o4e(c, d) || c === "reg" && new Aje(d);
  83147. h || (process.env.NODE_ENV !== "production" && (n = ti('Illegal relational operation: "' + u + '" in condition:', t)), Et(n)), i.push(h);
  83148. }
  83149. }
  83150. i.length || (process.env.NODE_ENV !== "production" && (n = ti("Relational condition must have at least one operator.", "Illegal condition:", t)), Et(n));
  83151. var p = new Rje();
  83152. return p.valueGetterParam = r, p.valueParser = s, p.getValue = e.getValue, p.subCondList = i, p;
  83153. }
  83154. function hie(t) {
  83155. return Ie(t) && !wr(t);
  83156. }
  83157. var Nje = (
  83158. /** @class */
  83159. function() {
  83160. function t(e, n) {
  83161. this._cond = ML(e, n);
  83162. }
  83163. return t.prototype.evaluate = function() {
  83164. return this._cond.evaluate();
  83165. }, t;
  83166. }()
  83167. );
  83168. function Bje(t, e) {
  83169. return new Nje(t, e);
  83170. }
  83171. var zje = {
  83172. type: "echarts:filter",
  83173. // PENDING: enhance to filter by index rather than create new data
  83174. transform: function(t) {
  83175. for (var e = t.upstream, n, r = Bje(t.config, {
  83176. valueGetterAttrMap: Pe({
  83177. dimension: !0
  83178. }),
  83179. prepareGetValue: function(s) {
  83180. var l = "", u = s.dimension;
  83181. Ce(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = ti('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), Et(l));
  83182. var c = e.getDimensionInfo(u);
  83183. return c || (process.env.NODE_ENV !== "production" && (l = ti("Can not find dimension info via: " + u + `.
  83184. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
  83185. `, "Illegal condition:", s, `.
  83186. `)), Et(l)), {
  83187. dimIdx: c.index
  83188. };
  83189. },
  83190. getValue: function(s) {
  83191. return e.retrieveValueFromItem(n, s.dimIdx);
  83192. }
  83193. }), i = [], a = 0, o = e.count(); a < o; a++)
  83194. n = e.getRawDataItem(a), r.evaluate() && i.push(n);
  83195. return {
  83196. data: i
  83197. };
  83198. }
  83199. }, QE = "";
  83200. process.env.NODE_ENV !== "production" && (QE = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
  83201. var Vje = {
  83202. type: "echarts:sort",
  83203. transform: function(t) {
  83204. var e = t.upstream, n = t.config, r = "", i = Qt(n);
  83205. i.length || (process.env.NODE_ENV !== "production" && (r = "Empty `config` in sort transform."), Et(r));
  83206. var a = [];
  83207. k(i, function(c) {
  83208. var f = c.dimension, d = c.order, h = c.parser, p = c.incomparable;
  83209. if (f == null && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "dimension" specified.' + QE), Et(r)), d !== "asc" && d !== "desc" && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "order" specified.' + QE), Et(r)), p && p !== "min" && p !== "max") {
  83210. var v = "";
  83211. process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + p + '".'), Et(v);
  83212. }
  83213. if (d !== "asc" && d !== "desc") {
  83214. var g = "";
  83215. process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + d + '".'), Et(g);
  83216. }
  83217. var m = e.getDimensionInfo(f);
  83218. m || (process.env.NODE_ENV !== "production" && (r = ti("Can not find dimension info via: " + f + `.
  83219. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
  83220. `, "Illegal config:", c, `.
  83221. `)), Et(r));
  83222. var y = h ? HJ(h) : null;
  83223. h && !y && (process.env.NODE_ENV !== "production" && (r = ti("Invalid parser name " + h + `.
  83224. `, "Illegal config:", c, `.
  83225. `)), Et(r)), a.push({
  83226. dimIdx: m.index,
  83227. parser: y,
  83228. comparator: new jJ(d, p)
  83229. });
  83230. });
  83231. var o = e.sourceFormat;
  83232. o !== Br && o !== Na && (process.env.NODE_ENV !== "production" && (r = 'sourceFormat "' + o + '" is not supported yet'), Et(r));
  83233. for (var s = [], l = 0, u = e.count(); l < u; l++)
  83234. s.push(e.getRawDataItem(l));
  83235. return s.sort(function(c, f) {
  83236. for (var d = 0; d < a.length; d++) {
  83237. var h = a[d], p = e.retrieveValueFromItem(c, h.dimIdx), v = e.retrieveValueFromItem(f, h.dimIdx);
  83238. h.parser && (p = h.parser(p), v = h.parser(v));
  83239. var g = h.comparator.evaluate(p, v);
  83240. if (g !== 0)
  83241. return g;
  83242. }
  83243. return 0;
  83244. }), {
  83245. data: s
  83246. };
  83247. }
  83248. };
  83249. function Fje(t) {
  83250. t.registerTransform(zje), t.registerTransform(Vje);
  83251. }
  83252. var Wje = (
  83253. /** @class */
  83254. function(t) {
  83255. q(e, t);
  83256. function e() {
  83257. var n = t !== null && t.apply(this, arguments) || this;
  83258. return n.type = "dataset", n;
  83259. }
  83260. return e.prototype.init = function(n, r, i) {
  83261. t.prototype.init.call(this, n, r, i), this._sourceManager = new YJ(this), yz(this);
  83262. }, e.prototype.mergeOption = function(n, r) {
  83263. t.prototype.mergeOption.call(this, n, r), yz(this);
  83264. }, e.prototype.optionUpdated = function() {
  83265. this._sourceManager.dirty();
  83266. }, e.prototype.getSourceManager = function() {
  83267. return this._sourceManager;
  83268. }, e.type = "dataset", e.defaultOption = {
  83269. seriesLayoutBy: Xo
  83270. }, e;
  83271. }(rt)
  83272. ), Qje = (
  83273. /** @class */
  83274. function(t) {
  83275. q(e, t);
  83276. function e() {
  83277. var n = t !== null && t.apply(this, arguments) || this;
  83278. return n.type = "dataset", n;
  83279. }
  83280. return e.type = "dataset", e;
  83281. }(Xt)
  83282. );
  83283. function Hje(t) {
  83284. t.registerComponentModel(Wje), t.registerComponentView(Qje);
  83285. }
  83286. var xo = as.CMD;
  83287. function Wd(t, e) {
  83288. return Math.abs(t - e) < 1e-5;
  83289. }
  83290. function HE(t) {
  83291. var e = t.data, n = t.len(), r = [], i, a = 0, o = 0, s = 0, l = 0;
  83292. function u(A, D) {
  83293. i && i.length > 2 && r.push(i), i = [A, D];
  83294. }
  83295. function c(A, D, E, R) {
  83296. Wd(A, E) && Wd(D, R) || i.push(A, D, E, R, E, R);
  83297. }
  83298. function f(A, D, E, R, N, V) {
  83299. var z = Math.abs(D - A), W = Math.tan(z / 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;
  83300. i.push(oe - H * Z, K + G * Q, ie + H * ee, X - G * ne, ie, X);
  83301. }
  83302. for (var d, h, p, v, g = 0; g < n; ) {
  83303. var m = e[g++], y = g === 1;
  83304. switch (y && (a = e[g], o = e[g + 1], s = a, l = o, (m === xo.L || m === xo.C || m === xo.Q) && (i = [s, l])), m) {
  83305. case xo.M:
  83306. a = s = e[g++], o = l = e[g++], u(s, l);
  83307. break;
  83308. case xo.L:
  83309. d = e[g++], h = e[g++], c(a, o, d, h), a = d, o = h;
  83310. break;
  83311. case xo.C:
  83312. i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]);
  83313. break;
  83314. case xo.Q:
  83315. 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;
  83316. break;
  83317. case xo.A:
  83318. var b = e[g++], _ = e[g++], O = e[g++], S = e[g++], x = e[g++], C = e[g++] + x;
  83319. g += 1;
  83320. var T = !e[g++];
  83321. 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 + _;
  83322. for (var w = (T ? -1 : 1) * Math.PI / 2, P = x; T ? P > C : P < C; P += w) {
  83323. var $ = T ? Math.max(P + w, C) : Math.min(P + w, C);
  83324. f(P, $, b, _, O, S);
  83325. }
  83326. break;
  83327. case xo.R:
  83328. 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);
  83329. break;
  83330. case xo.Z:
  83331. i && c(a, o, s, l), a = s, o = l;
  83332. break;
  83333. }
  83334. }
  83335. return i && i.length > 2 && r.push(i), r;
  83336. }
  83337. function GE(t, e, n, r, i, a, o, s, l, u) {
  83338. if (Wd(t, n) && Wd(e, r) && Wd(i, o) && Wd(a, s)) {
  83339. l.push(o, s);
  83340. return;
  83341. }
  83342. var c = 2 / u, f = c * c, d = o - t, h = s - e, p = Math.sqrt(d * d + h * h);
  83343. d /= p, h /= p;
  83344. var v = n - t, g = r - e, m = i - o, y = a - s, b = v * v + g * g, _ = m * m + y * y;
  83345. if (b < f && _ < f) {
  83346. l.push(o, s);
  83347. return;
  83348. }
  83349. var O = d * v + h * g, S = -d * m - h * y, x = b - O * O, C = _ - S * S;
  83350. if (x < f && O >= 0 && C < f && S >= 0) {
  83351. l.push(o, s);
  83352. return;
  83353. }
  83354. var T = [], w = [];
  83355. su(t, n, i, o, 0.5, T), su(e, r, a, s, 0.5, w), GE(T[0], w[0], T[1], w[1], T[2], w[2], T[3], w[3], l, u), GE(T[4], w[4], T[5], w[5], T[6], w[6], T[7], w[7], l, u);
  83356. }
  83357. function Gje(t, e) {
  83358. var n = HE(t), r = [];
  83359. e = e || 1;
  83360. for (var i = 0; i < n.length; i++) {
  83361. var a = n[i], o = [], s = a[0], l = a[1];
  83362. o.push(s, l);
  83363. for (var u = 2; u < a.length; ) {
  83364. var c = a[u++], f = a[u++], d = a[u++], h = a[u++], p = a[u++], v = a[u++];
  83365. GE(s, l, c, f, d, h, p, v, o, e), s = p, l = v;
  83366. }
  83367. r.push(o);
  83368. }
  83369. return r;
  83370. }
  83371. function pie(t, e, n) {
  83372. 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);
  83373. s === 0 && (s = 1, o = n);
  83374. for (var l = [], u = 0; u < o; u++)
  83375. l.push(s);
  83376. var c = o * s, f = n - c;
  83377. if (f > 0)
  83378. for (var u = 0; u < f; u++)
  83379. l[u % o] += 1;
  83380. return l;
  83381. }
  83382. function bQ(t, e, n) {
  83383. 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 = pie([l, u], c ? 0 : 1, e), d = (c ? s : u) / f.length, h = 0; h < f.length; h++)
  83384. for (var p = (c ? u : s) / f[h], v = 0; v < f[h]; v++) {
  83385. var g = {};
  83386. 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);
  83387. }
  83388. }
  83389. function jje(t, e, n) {
  83390. for (var r = t.width, i = t.height, a = r > i, o = pie([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++)
  83391. for (var h = t[l] / o[d], p = 0; p < o[d]; p++) {
  83392. var v = {};
  83393. 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);
  83394. }
  83395. }
  83396. function _Q(t, e, n, r) {
  83397. return t * r - n * e;
  83398. }
  83399. function Zje(t, e, n, r, i, a, o, s) {
  83400. var l = n - t, u = r - e, c = o - i, f = s - a, d = _Q(c, f, l, u);
  83401. if (Math.abs(d) < 1e-6)
  83402. return null;
  83403. var h = t - i, p = e - a, v = _Q(h, p, c, f) / d;
  83404. return v < 0 || v > 1 ? null : new Ke(v * l + t, v * u + e);
  83405. }
  83406. function Uje(t, e, n) {
  83407. var r = new Ke();
  83408. Ke.sub(r, n, e), r.normalize();
  83409. var i = new Ke();
  83410. Ke.sub(i, t, e);
  83411. var a = i.dot(r);
  83412. return a;
  83413. }
  83414. function Od(t, e) {
  83415. var n = t[t.length - 1];
  83416. n && n[0] === e[0] && n[1] === e[1] || t.push(e);
  83417. }
  83418. function Xje(t, e, n) {
  83419. for (var r = t.length, i = [], a = 0; a < r; a++) {
  83420. var o = t[a], s = t[(a + 1) % r], l = Zje(o[0], o[1], s[0], s[1], e.x, e.y, n.x, n.y);
  83421. l && i.push({
  83422. projPt: Uje(l, e, n),
  83423. pt: l,
  83424. idx: a
  83425. });
  83426. }
  83427. if (i.length < 2)
  83428. return [{ points: t }, { points: t }];
  83429. i.sort(function(g, m) {
  83430. return g.projPt - m.projPt;
  83431. });
  83432. var u = i[0], c = i[i.length - 1];
  83433. if (c.idx < u.idx) {
  83434. var f = u;
  83435. u = c, c = f;
  83436. }
  83437. 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++)
  83438. Od(p, t[a].slice());
  83439. Od(p, h), Od(p, d);
  83440. for (var a = c.idx + 1; a <= u.idx + r; a++)
  83441. Od(v, t[a % r].slice());
  83442. return Od(v, d), Od(v, h), [{
  83443. points: p
  83444. }, {
  83445. points: v
  83446. }];
  83447. }
  83448. function OQ(t) {
  83449. var e = t.points, n = [], r = [];
  83450. jx(e, n, r);
  83451. 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();
  83452. 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), Xje(e, u, c);
  83453. }
  83454. function jO(t, e, n, r) {
  83455. if (n === 1)
  83456. r.push(e);
  83457. else {
  83458. var i = Math.floor(n / 2), a = t(e);
  83459. jO(t, a[0], i, r), jO(t, a[1], n - i, r);
  83460. }
  83461. return r;
  83462. }
  83463. function Yje(t, e) {
  83464. for (var n = [], r = 0; r < e; r++)
  83465. n.push(zR(t));
  83466. return n;
  83467. }
  83468. function qje(t, e) {
  83469. e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel;
  83470. }
  83471. function Kje(t) {
  83472. for (var e = [], n = 0; n < t.length; )
  83473. e.push([t[n++], t[n++]]);
  83474. return e;
  83475. }
  83476. function Jje(t, e) {
  83477. var n = [], r = t.shape, i;
  83478. switch (t.type) {
  83479. case "rect":
  83480. jje(r, e, n), i = mt;
  83481. break;
  83482. case "sector":
  83483. bQ(r, e, n), i = ri;
  83484. break;
  83485. case "circle":
  83486. bQ({
  83487. r0: 0,
  83488. r: r.r,
  83489. startAngle: 0,
  83490. endAngle: Math.PI * 2,
  83491. cx: r.cx,
  83492. cy: r.cy
  83493. }, e, n), i = ri;
  83494. break;
  83495. default:
  83496. 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(Gje(t.getUpdatedPathProxy(), o), function(m) {
  83497. return Kje(m);
  83498. }), l = s.length;
  83499. if (l === 0)
  83500. jO(OQ, {
  83501. points: s[0]
  83502. }, e, n);
  83503. else if (l === e)
  83504. for (var u = 0; u < l; u++)
  83505. n.push({
  83506. points: s[u]
  83507. });
  83508. else {
  83509. var c = 0, f = ce(s, function(m) {
  83510. var y = [], b = [];
  83511. jx(m, y, b);
  83512. var _ = (b[1] - y[1]) * (b[0] - y[0]);
  83513. return c += _, { poly: m, area: _ };
  83514. });
  83515. f.sort(function(m, y) {
  83516. return y.area - m.area;
  83517. });
  83518. for (var d = e, u = 0; u < l; u++) {
  83519. var h = f[u];
  83520. if (d <= 0)
  83521. break;
  83522. var p = u === l - 1 ? d : Math.ceil(h.area / c * e);
  83523. p < 0 || (jO(OQ, {
  83524. points: h.poly
  83525. }, p, n), d -= p);
  83526. }
  83527. }
  83528. i = ii;
  83529. break;
  83530. }
  83531. if (!i)
  83532. return Yje(t, e);
  83533. for (var v = [], u = 0; u < n.length; u++) {
  83534. var g = new i();
  83535. g.setShape(n[u]), qje(t, g), v.push(g);
  83536. }
  83537. return v;
  83538. }
  83539. function eZe(t, e) {
  83540. var n = t.length, r = e.length;
  83541. if (n === r)
  83542. return [t, e];
  83543. 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; ) {
  83544. 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++];
  83545. if (d <= 0) {
  83546. f.push(g, m, y, b, _, O);
  83547. continue;
  83548. }
  83549. for (var S = Math.min(d, c - 1) + 1, x = 1; x <= S; x++) {
  83550. var C = x / S;
  83551. 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];
  83552. }
  83553. d -= S - 1;
  83554. }
  83555. return o === t ? [f, e] : [t, f];
  83556. }
  83557. function SQ(t, e) {
  83558. for (var n = t.length, r = t[n - 2], i = t[n - 1], a = [], o = 0; o < e.length; )
  83559. a[o++] = r, a[o++] = i;
  83560. return a;
  83561. }
  83562. function tZe(t, e) {
  83563. for (var n, r, i, a = [], o = [], s = 0; s < Math.max(t.length, e.length); s++) {
  83564. var l = t[s], u = e[s], c = void 0, f = void 0;
  83565. l ? u ? (n = eZe(l, u), c = n[0], f = n[1], r = c, i = f) : (f = SQ(i || l, l), c = l) : (c = SQ(r || u, u), f = u), a.push(c), o.push(f);
  83566. }
  83567. return [a, o];
  83568. }
  83569. function xQ(t) {
  83570. for (var e = 0, n = 0, r = 0, i = t.length, a = 0, o = i - 2; a < i; o = a, a += 2) {
  83571. var s = t[o], l = t[o + 1], u = t[a], c = t[a + 1], f = s * c - u * l;
  83572. e += f, n += (s + u) * f, r += (l + c) * f;
  83573. }
  83574. return e === 0 ? [t[0] || 0, t[1] || 0] : [n / e / 3, r / e / 3, e];
  83575. }
  83576. function nZe(t, e, n, r) {
  83577. for (var i = (t.length - 2) / 6, a = 1 / 0, o = 0, s = t.length, l = s - 2, u = 0; u < i; u++) {
  83578. for (var c = u * 6, f = 0, d = 0; d < s; d += 2) {
  83579. 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;
  83580. f += y * y + b * b;
  83581. }
  83582. f < a && (a = f, o = u);
  83583. }
  83584. return o;
  83585. }
  83586. function rZe(t) {
  83587. for (var e = [], n = t.length, r = 0; r < n; r += 2)
  83588. e[r] = t[n - r - 2], e[r + 1] = t[n - r - 1];
  83589. return e;
  83590. }
  83591. function iZe(t, e, n, r) {
  83592. for (var i = [], a, o = 0; o < t.length; o++) {
  83593. var s = t[o], l = e[o], u = xQ(s), c = xQ(l);
  83594. a == null && (a = u[2] < 0 != c[2] < 0);
  83595. var f = [], d = [], h = 0, p = 1 / 0, v = [], g = s.length;
  83596. a && (s = rZe(s));
  83597. for (var m = nZe(s, l, u, c) * 6, y = g - 2, b = 0; b < y; b += 2) {
  83598. var _ = (m + b) % y + 2;
  83599. f[b + 2] = s[_] - u[0], f[b + 3] = s[_ + 1] - u[1];
  83600. }
  83601. f[0] = s[m] - u[0], f[1] = s[m + 1] - u[1];
  83602. for (var O = r / n, S = -r / 2; S <= r / 2; S += O) {
  83603. for (var x = Math.sin(S), C = Math.cos(S), T = 0, b = 0; b < s.length; b += 2) {
  83604. 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;
  83605. v[b] = D, v[b + 1] = E;
  83606. var R = D - w, N = E - P;
  83607. T += R * R + N * N;
  83608. }
  83609. if (T < p) {
  83610. p = T, h = S;
  83611. for (var V = 0; V < v.length; V++)
  83612. d[V] = v[V];
  83613. }
  83614. }
  83615. i.push({
  83616. from: f,
  83617. to: d,
  83618. fromCp: u,
  83619. toCp: c,
  83620. rotation: -h
  83621. });
  83622. }
  83623. return i;
  83624. }
  83625. function ZO(t) {
  83626. return t.__isCombineMorphing;
  83627. }
  83628. var vie = "__mOriginal_";
  83629. function UO(t, e, n) {
  83630. var r = vie + e, i = t[r] || t[e];
  83631. t[r] || (t[r] = t[e]);
  83632. var a = n.replace, o = n.after, s = n.before;
  83633. t[e] = function() {
  83634. var l = arguments, u;
  83635. return s && s.apply(this, l), a ? u = a.apply(this, l) : u = i.apply(this, l), o && o.apply(this, l), u;
  83636. };
  83637. }
  83638. function Ng(t, e) {
  83639. var n = vie + e;
  83640. t[n] && (t[e] = t[n], t[n] = null);
  83641. }
  83642. function wQ(t, e) {
  83643. for (var n = 0; n < t.length; n++)
  83644. for (var r = t[n], i = 0; i < r.length; ) {
  83645. var a = r[i], o = r[i + 1];
  83646. r[i++] = e[0] * a + e[2] * o + e[4], r[i++] = e[1] * a + e[3] * o + e[5];
  83647. }
  83648. }
  83649. function gie(t, e) {
  83650. var n = t.getUpdatedPathProxy(), r = e.getUpdatedPathProxy(), i = tZe(HE(n), HE(r)), a = i[0], o = i[1], s = t.getComputedTransform(), l = e.getComputedTransform();
  83651. function u() {
  83652. this.transform = null;
  83653. }
  83654. s && wQ(a, s), l && wQ(o, l), UO(e, "updateTransform", { replace: u }), e.transform = null;
  83655. var c = iZe(a, o, 10, Math.PI), f = [];
  83656. UO(e, "buildPath", { replace: function(d) {
  83657. for (var h = e.__morphT, p = 1 - h, v = [], g = 0; g < c.length; g++) {
  83658. 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(_);
  83659. xg(v, O, S, h);
  83660. for (var T = 0; T < y.length; T += 2) {
  83661. var w = y[T], P = y[T + 1], $ = b[T], A = b[T + 1], D = w * p + $ * h, E = P * p + A * h;
  83662. f[T] = D * C - E * x + v[0], f[T + 1] = D * x + E * C + v[1];
  83663. }
  83664. var R = f[0], N = f[1];
  83665. d.moveTo(R, N);
  83666. for (var T = 2; T < y.length; ) {
  83667. var $ = f[T++], A = f[T++], V = f[T++], z = f[T++], W = f[T++], F = f[T++];
  83668. R === $ && N === A && V === W && z === F ? d.lineTo(W, F) : d.bezierCurveTo($, A, V, z, W, F), R = W, N = F;
  83669. }
  83670. }
  83671. } });
  83672. }
  83673. function IL(t, e, n) {
  83674. if (!t || !e)
  83675. return e;
  83676. var r = n.done, i = n.during;
  83677. gie(t, e), e.__morphT = 0;
  83678. function a() {
  83679. Ng(e, "buildPath"), Ng(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
  83680. }
  83681. return e.animateTo({
  83682. __morphT: 1
  83683. }, Re({
  83684. during: function(o) {
  83685. e.dirtyShape(), i && i(o);
  83686. },
  83687. done: function() {
  83688. a(), r && r();
  83689. }
  83690. }, n)), e;
  83691. }
  83692. function aZe(t, e, n, r, i, a) {
  83693. var o = 16;
  83694. t = i === n ? 0 : Math.round(32767 * (t - n) / (i - n)), e = a === r ? 0 : Math.round(32767 * (e - r) / (a - r));
  83695. for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
  83696. var c = 0, f = 0;
  83697. (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);
  83698. }
  83699. return s;
  83700. }
  83701. function XO(t) {
  83702. var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = ce(t, function(s) {
  83703. 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);
  83704. return e = Math.min(c, e), n = Math.min(f, n), r = Math.max(c, r), i = Math.max(f, i), [c, f];
  83705. }), o = ce(a, function(s, l) {
  83706. return {
  83707. cp: s,
  83708. z: aZe(s[0], s[1], e, n, r, i),
  83709. path: t[l]
  83710. };
  83711. });
  83712. return o.sort(function(s, l) {
  83713. return s.z - l.z;
  83714. }).map(function(s) {
  83715. return s.path;
  83716. });
  83717. }
  83718. function mie(t) {
  83719. return Jje(t.path, t.count);
  83720. }
  83721. function jE() {
  83722. return {
  83723. fromIndividuals: [],
  83724. toIndividuals: [],
  83725. count: 0
  83726. };
  83727. }
  83728. function oZe(t, e, n) {
  83729. var r = [];
  83730. function i(O) {
  83731. for (var S = 0; S < O.length; S++) {
  83732. var x = O[S];
  83733. ZO(x) ? i(x.childrenRef()) : x instanceof ot && r.push(x);
  83734. }
  83735. }
  83736. i(t);
  83737. var a = r.length;
  83738. if (!a)
  83739. return jE();
  83740. var o = n.dividePath || mie, s = o({
  83741. path: e,
  83742. count: a
  83743. });
  83744. if (s.length !== a)
  83745. return console.error("Invalid morphing: unmatched splitted path"), jE();
  83746. r = XO(r), s = XO(s);
  83747. for (var l = n.done, u = n.during, c = n.individualDelay, f = new As(), d = 0; d < a; d++) {
  83748. var h = r[d], p = s[d];
  83749. p.parent = e, p.copyTransform(f), c || gie(h, p);
  83750. }
  83751. e.__isCombineMorphing = !0, e.childrenRef = function() {
  83752. return s;
  83753. };
  83754. function v(O) {
  83755. for (var S = 0; S < s.length; S++)
  83756. s[S].addSelfToZr(O);
  83757. }
  83758. UO(e, "addSelfToZr", {
  83759. after: function(O) {
  83760. v(O);
  83761. }
  83762. }), UO(e, "removeSelfFromZr", {
  83763. after: function(O) {
  83764. for (var S = 0; S < s.length; S++)
  83765. s[S].removeSelfFromZr(O);
  83766. }
  83767. });
  83768. function g() {
  83769. e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, Ng(e, "addSelfToZr"), Ng(e, "removeSelfFromZr");
  83770. }
  83771. var m = s.length;
  83772. if (c)
  83773. for (var y = m, b = function() {
  83774. y--, y === 0 && (g(), l && l());
  83775. }, d = 0; d < m; d++) {
  83776. var _ = c ? Re({
  83777. delay: (n.delay || 0) + c(d, m, r[d], s[d]),
  83778. done: b
  83779. }, n) : n;
  83780. IL(r[d], s[d], _);
  83781. }
  83782. else
  83783. e.__morphT = 0, e.animateTo({
  83784. __morphT: 1
  83785. }, Re({
  83786. during: function(O) {
  83787. for (var S = 0; S < m; S++) {
  83788. var x = s[S];
  83789. x.__morphT = e.__morphT, x.dirtyShape();
  83790. }
  83791. u && u(O);
  83792. },
  83793. done: function() {
  83794. g();
  83795. for (var O = 0; O < t.length; O++)
  83796. Ng(t[O], "updateTransform");
  83797. l && l();
  83798. }
  83799. }, n));
  83800. return e.__zr && v(e.__zr), {
  83801. fromIndividuals: r,
  83802. toIndividuals: s,
  83803. count: m
  83804. };
  83805. }
  83806. function sZe(t, e, n) {
  83807. var r = e.length, i = [], a = n.dividePath || mie;
  83808. function o(h) {
  83809. for (var p = 0; p < h.length; p++) {
  83810. var v = h[p];
  83811. ZO(v) ? o(v.childrenRef()) : v instanceof ot && i.push(v);
  83812. }
  83813. }
  83814. if (ZO(t)) {
  83815. o(t.childrenRef());
  83816. var s = i.length;
  83817. if (s < r)
  83818. for (var l = 0, u = s; u < r; u++)
  83819. i.push(zR(i[l++ % s]));
  83820. i.length = r;
  83821. } else {
  83822. i = a({ path: t, count: r });
  83823. for (var c = t.getComputedTransform(), u = 0; u < i.length; u++)
  83824. i[u].setLocalTransform(c);
  83825. if (i.length !== r)
  83826. return console.error("Invalid morphing: unmatched splitted path"), jE();
  83827. }
  83828. i = XO(i), e = XO(e);
  83829. for (var f = n.individualDelay, u = 0; u < r; u++) {
  83830. var d = f ? Re({
  83831. delay: (n.delay || 0) + f(u, r, i[u], e[u])
  83832. }, n) : n;
  83833. IL(i[u], e[u], d);
  83834. }
  83835. return {
  83836. fromIndividuals: i,
  83837. toIndividuals: e,
  83838. count: e.length
  83839. };
  83840. }
  83841. function CQ(t) {
  83842. return ue(t[0]);
  83843. }
  83844. function TQ(t, e) {
  83845. for (var n = [], r = t.length, i = 0; i < r; i++)
  83846. n.push({
  83847. one: t[i],
  83848. many: []
  83849. });
  83850. for (var i = 0; i < e.length; i++) {
  83851. var a = e[i].length, o = void 0;
  83852. for (o = 0; o < a; o++)
  83853. n[o % r].many.push(e[i][o]);
  83854. }
  83855. for (var s = 0, i = r - 1; i >= 0; i--)
  83856. if (!n[i].many.length) {
  83857. var l = n[s].many;
  83858. if (l.length <= 1)
  83859. if (s)
  83860. s = 0;
  83861. else
  83862. return n;
  83863. var a = l.length, u = Math.ceil(a / 2);
  83864. n[i].many = l.slice(u, a), n[s].many = l.slice(0, u), s++;
  83865. }
  83866. return n;
  83867. }
  83868. var lZe = {
  83869. clone: function(t) {
  83870. for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), r = 0; r < t.count; r++) {
  83871. var i = zR(t.path);
  83872. i.setStyle("opacity", n), e.push(i);
  83873. }
  83874. return e;
  83875. },
  83876. // Use the default divider
  83877. split: null
  83878. };
  83879. function s$(t, e, n, r, i, a) {
  83880. if (!t.length || !e.length)
  83881. return;
  83882. var o = pp("update", r, i);
  83883. if (!(o && o.duration > 0))
  83884. return;
  83885. var s = r.getModel("universalTransition").get("delay"), l = Object.assign({
  83886. // Need to setToFinal so the further calculation based on the style can be correct.
  83887. // Like emphasis color.
  83888. setToFinal: !0
  83889. }, o), u, c;
  83890. CQ(t) && (u = t, c = e), CQ(e) && (u = e, c = t);
  83891. function f(m, y, b, _, O) {
  83892. var S = m.many, x = m.one;
  83893. if (S.length === 1 && !O) {
  83894. var C = y ? S[0] : x, T = y ? x : S[0];
  83895. if (ZO(C))
  83896. f({
  83897. many: [C],
  83898. one: T
  83899. }, !0, b, _, !0);
  83900. else {
  83901. var w = s ? Re({
  83902. delay: s(b, _)
  83903. }, l) : l;
  83904. IL(C, T, w), a(C, T, C, T, w);
  83905. }
  83906. } else
  83907. for (var P = Re({
  83908. dividePath: lZe[n],
  83909. individualDelay: s && function(N, V, z, W) {
  83910. return s(N + b, _);
  83911. }
  83912. }, l), $ = y ? oZe(S, x, P) : sZe(x, S, P), A = $.fromIndividuals, D = $.toIndividuals, E = A.length, R = 0; R < E; R++) {
  83913. var w = s ? Re({
  83914. delay: s(R, E)
  83915. }, l) : l;
  83916. a(A[R], D[R], y ? S[R] : m.one, y ? m.one : S[R], w);
  83917. }
  83918. }
  83919. for (var d = u ? u === t : t.length > e.length, h = u ? TQ(c, u) : TQ(d ? e : t, [d ? t : e]), p = 0, v = 0; v < h.length; v++)
  83920. p += h[v].many.length;
  83921. for (var g = 0, v = 0; v < h.length; v++)
  83922. f(h[v], d, g, p), g += h[v].many.length;
  83923. }
  83924. function mc(t) {
  83925. if (!t)
  83926. return [];
  83927. if (ue(t)) {
  83928. for (var e = [], n = 0; n < t.length; n++)
  83929. e.push(mc(t[n]));
  83930. return e;
  83931. }
  83932. var r = [];
  83933. return t.traverse(function(i) {
  83934. i instanceof ot && !i.disableMorphing && !i.invisible && !i.ignore && r.push(i);
  83935. }), r;
  83936. }
  83937. var yie = 1e4, uZe = 0, PQ = 1, $Q = 2, cZe = bt();
  83938. function fZe(t, e) {
  83939. for (var n = t.dimensions, r = 0; r < n.length; r++) {
  83940. var i = t.getDimensionInfo(n[r]);
  83941. if (i && i.otherDims[e] === 0)
  83942. return n[r];
  83943. }
  83944. }
  83945. function dZe(t, e, n) {
  83946. var r = t.getDimensionInfo(n), i = r && r.ordinalMeta;
  83947. if (r) {
  83948. var a = t.get(r.name, e);
  83949. return i && i.categories[a] || a + "";
  83950. }
  83951. }
  83952. function AQ(t, e, n, r) {
  83953. var i = r ? "itemChildGroupId" : "itemGroupId", a = fZe(t, i);
  83954. if (a) {
  83955. var o = dZe(t, e, a);
  83956. return o;
  83957. }
  83958. var s = t.getRawDataItem(e), l = r ? "childGroupId" : "groupId";
  83959. if (s && s[l])
  83960. return s[l] + "";
  83961. if (!r)
  83962. return n || t.getId(e);
  83963. }
  83964. function EQ(t) {
  83965. var e = [];
  83966. return k(t, function(n) {
  83967. var r = n.data, i = n.dataGroupId;
  83968. if (r.count() > yie) {
  83969. process.env.NODE_ENV !== "production" && dn("Universal transition is disabled on large data > 10k.");
  83970. return;
  83971. }
  83972. for (var a = r.getIndices(), o = 0; o < a.length; o++)
  83973. e.push({
  83974. data: r,
  83975. groupId: AQ(r, o, i, !1),
  83976. childGroupId: AQ(r, o, i, !0),
  83977. divide: n.divide,
  83978. dataIndex: o
  83979. });
  83980. }), e;
  83981. }
  83982. function l$(t, e, n) {
  83983. t.traverse(function(r) {
  83984. r instanceof ot && Yt(r, {
  83985. style: {
  83986. opacity: 0
  83987. }
  83988. }, e, {
  83989. dataIndex: n,
  83990. isFrom: !0
  83991. });
  83992. });
  83993. }
  83994. function u$(t) {
  83995. if (t.parent) {
  83996. var e = t.getComputedTransform();
  83997. t.setLocalTransform(e), t.parent.remove(t);
  83998. }
  83999. }
  84000. function Sd(t) {
  84001. t.stopAnimation(), t.isGroup && t.traverse(function(e) {
  84002. e.stopAnimation();
  84003. });
  84004. }
  84005. function hZe(t, e, n) {
  84006. var r = pp("update", n, e);
  84007. r && t.traverse(function(i) {
  84008. if (i instanceof Ma) {
  84009. var a = Wke(i);
  84010. a && i.animateFrom({
  84011. style: a
  84012. }, r);
  84013. }
  84014. });
  84015. }
  84016. function pZe(t, e) {
  84017. var n = t.length;
  84018. if (n !== e.length)
  84019. return !1;
  84020. for (var r = 0; r < n; r++) {
  84021. var i = t[r], a = e[r];
  84022. if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex))
  84023. return !1;
  84024. }
  84025. return !0;
  84026. }
  84027. function bie(t, e, n) {
  84028. var r = EQ(t), i = EQ(e);
  84029. function a(b, _, O, S, x) {
  84030. (O || b) && _.animateFrom({
  84031. style: O && O !== b ? le(le({}, O.style), b.style) : b.style
  84032. }, x);
  84033. }
  84034. var o = !1, s = uZe, l = Pe(), u = Pe();
  84035. r.forEach(function(b) {
  84036. b.groupId && l.set(b.groupId, !0), b.childGroupId && u.set(b.childGroupId, !0);
  84037. });
  84038. for (var c = 0; c < i.length; c++) {
  84039. var f = i[c].groupId;
  84040. if (u.get(f)) {
  84041. s = PQ;
  84042. break;
  84043. }
  84044. var d = i[c].childGroupId;
  84045. if (d && l.get(d)) {
  84046. s = $Q;
  84047. break;
  84048. }
  84049. }
  84050. function h(b, _) {
  84051. return function(O) {
  84052. var S = O.data, x = O.dataIndex;
  84053. return _ ? S.getId(x) : b ? s === PQ ? O.childGroupId : O.groupId : s === $Q ? O.childGroupId : O.groupId;
  84054. };
  84055. }
  84056. var p = pZe(r, i), v = {};
  84057. if (!p)
  84058. for (var c = 0; c < i.length; c++) {
  84059. var g = i[c], m = g.data.getItemGraphicEl(g.dataIndex);
  84060. m && (v[m.id] = !0);
  84061. }
  84062. function y(b, _) {
  84063. var O = r[_], S = i[b], x = S.data.hostModel, C = O.data.getItemGraphicEl(O.dataIndex), T = S.data.getItemGraphicEl(S.dataIndex);
  84064. if (C === T) {
  84065. T && hZe(T, S.dataIndex, x);
  84066. return;
  84067. }
  84068. // We can't use the elements that already being morphed
  84069. C && v[C.id] || T && (Sd(T), C ? (Sd(C), u$(C), o = !0, s$(mc(C), mc(T), S.divide, x, b, a)) : l$(T, x, b));
  84070. }
  84071. new Us(r, i, h(!0, p), h(!1, p), null, "multiple").update(y).updateManyToOne(function(b, _) {
  84072. var O = i[b], S = O.data, x = S.hostModel, C = S.getItemGraphicEl(O.dataIndex), T = Nt(ce(_, function(w) {
  84073. return r[w].data.getItemGraphicEl(r[w].dataIndex);
  84074. }), function(w) {
  84075. return w && w !== C && !v[w.id];
  84076. });
  84077. C && (Sd(C), T.length ? (k(T, function(w) {
  84078. Sd(w), u$(w);
  84079. }), o = !0, s$(mc(T), mc(C), O.divide, x, b, a)) : l$(C, x, O.dataIndex));
  84080. }).updateOneToMany(function(b, _) {
  84081. var O = r[_], S = O.data.getItemGraphicEl(O.dataIndex);
  84082. if (!(S && v[S.id])) {
  84083. var x = Nt(ce(b, function(T) {
  84084. return i[T].data.getItemGraphicEl(i[T].dataIndex);
  84085. }), function(T) {
  84086. return T && T !== S;
  84087. }), C = i[b[0]].data.hostModel;
  84088. x.length && (k(x, function(T) {
  84089. return Sd(T);
  84090. }), S ? (Sd(S), u$(S), o = !0, s$(
  84091. mc(S),
  84092. mc(x),
  84093. O.divide,
  84094. // Use divide on old.
  84095. C,
  84096. b[0],
  84097. a
  84098. )) : k(x, function(T) {
  84099. return l$(T, C, b[0]);
  84100. }));
  84101. }
  84102. }).updateManyToMany(function(b, _) {
  84103. new Us(_, b, function(O) {
  84104. return r[O].data.getId(r[O].dataIndex);
  84105. }, function(O) {
  84106. return i[O].data.getId(i[O].dataIndex);
  84107. }).update(function(O, S) {
  84108. y(b[O], _[S]);
  84109. }).execute();
  84110. }).execute(), o && k(e, function(b) {
  84111. var _ = b.data, O = _.hostModel, S = O && n.getViewOfSeriesModel(O), x = pp("update", O, 0);
  84112. S && O.isAnimationEnabled() && x && x.duration > 0 && S.group.traverse(function(C) {
  84113. C instanceof ot && !C.animators.length && C.animateFrom({
  84114. style: {
  84115. opacity: 0
  84116. }
  84117. }, x);
  84118. });
  84119. });
  84120. }
  84121. function MQ(t) {
  84122. var e = t.getModel("universalTransition").get("seriesKey");
  84123. return e || t.id;
  84124. }
  84125. function IQ(t) {
  84126. return ue(t) ? t.sort().join(",") : t;
  84127. }
  84128. function Cl(t) {
  84129. if (t.hostModel)
  84130. return t.hostModel.getModel("universalTransition").get("divideShape");
  84131. }
  84132. function vZe(t, e) {
  84133. var n = Pe(), r = Pe(), i = Pe();
  84134. k(t.oldSeries, function(o, s) {
  84135. var l = t.oldDataGroupIds[s], u = t.oldData[s], c = MQ(o), f = IQ(c);
  84136. r.set(f, {
  84137. dataGroupId: l,
  84138. data: u
  84139. }), ue(c) && k(c, function(d) {
  84140. i.set(d, {
  84141. key: f,
  84142. dataGroupId: l,
  84143. data: u
  84144. });
  84145. });
  84146. });
  84147. function a(o) {
  84148. n.get(o) && dn("Duplicated seriesKey in universalTransition " + o);
  84149. }
  84150. return k(e.updatedSeries, function(o) {
  84151. if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
  84152. var s = o.get("dataGroupId"), l = o.getData(), u = MQ(o), c = IQ(u), f = r.get(c);
  84153. if (f)
  84154. process.env.NODE_ENV !== "production" && a(c), n.set(c, {
  84155. oldSeries: [{
  84156. dataGroupId: f.dataGroupId,
  84157. divide: Cl(f.data),
  84158. data: f.data
  84159. }],
  84160. newSeries: [{
  84161. dataGroupId: s,
  84162. divide: Cl(l),
  84163. data: l
  84164. }]
  84165. });
  84166. else if (ue(u)) {
  84167. process.env.NODE_ENV !== "production" && a(c);
  84168. var d = [];
  84169. k(u, function(v) {
  84170. var g = r.get(v);
  84171. g.data && d.push({
  84172. dataGroupId: g.dataGroupId,
  84173. divide: Cl(g.data),
  84174. data: g.data
  84175. });
  84176. }), d.length && n.set(c, {
  84177. oldSeries: d,
  84178. newSeries: [{
  84179. dataGroupId: s,
  84180. data: l,
  84181. divide: Cl(l)
  84182. }]
  84183. });
  84184. } else {
  84185. var h = i.get(u);
  84186. if (h) {
  84187. var p = n.get(h.key);
  84188. p || (p = {
  84189. oldSeries: [{
  84190. dataGroupId: h.dataGroupId,
  84191. data: h.data,
  84192. divide: Cl(h.data)
  84193. }],
  84194. newSeries: []
  84195. }, n.set(h.key, p)), p.newSeries.push({
  84196. dataGroupId: s,
  84197. data: l,
  84198. divide: Cl(l)
  84199. });
  84200. }
  84201. }
  84202. }
  84203. }), n;
  84204. }
  84205. function DQ(t, e) {
  84206. for (var n = 0; n < t.length; n++) {
  84207. var r = e.seriesIndex != null && e.seriesIndex === t[n].seriesIndex || e.seriesId != null && e.seriesId === t[n].id;
  84208. if (r)
  84209. return n;
  84210. }
  84211. }
  84212. function gZe(t, e, n, r) {
  84213. var i = [], a = [];
  84214. k(Qt(t.from), function(o) {
  84215. var s = DQ(e.oldSeries, o);
  84216. s >= 0 && i.push({
  84217. dataGroupId: e.oldDataGroupIds[s],
  84218. data: e.oldData[s],
  84219. // TODO can specify divideShape in transition.
  84220. divide: Cl(e.oldData[s]),
  84221. groupIdDim: o.dimension
  84222. });
  84223. }), k(Qt(t.to), function(o) {
  84224. var s = DQ(n.updatedSeries, o);
  84225. if (s >= 0) {
  84226. var l = n.updatedSeries[s].getData();
  84227. a.push({
  84228. dataGroupId: e.oldDataGroupIds[s],
  84229. data: l,
  84230. divide: Cl(l),
  84231. groupIdDim: o.dimension
  84232. });
  84233. }
  84234. }), i.length > 0 && a.length > 0 && bie(i, a, r);
  84235. }
  84236. function mZe(t) {
  84237. t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
  84238. k(Qt(r.seriesTransition), function(i) {
  84239. k(Qt(i.to), function(a) {
  84240. for (var o = r.updatedSeries, s = 0; s < o.length; s++)
  84241. (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][G_] = !0);
  84242. });
  84243. });
  84244. }), t.registerUpdateLifecycle("series:transition", function(e, n, r) {
  84245. var i = cZe(n);
  84246. if (i.oldSeries && r.updatedSeries && r.optionChanged) {
  84247. var a = r.seriesTransition;
  84248. if (a)
  84249. k(Qt(a), function(h) {
  84250. gZe(h, i, r, n);
  84251. });
  84252. else {
  84253. var o = vZe(i, r);
  84254. k(o.keys(), function(h) {
  84255. var p = o.get(h);
  84256. bie(p.oldSeries, p.newSeries, n);
  84257. });
  84258. }
  84259. k(r.updatedSeries, function(h) {
  84260. h[G_] && (h[G_] = !1);
  84261. });
  84262. }
  84263. for (var s = e.getSeries(), l = i.oldSeries = [], u = i.oldDataGroupIds = [], c = i.oldData = [], f = 0; f < s.length; f++) {
  84264. var d = s[f].getData();
  84265. d.count() < yie && (l.push(s[f]), u.push(s[f].get("dataGroupId")), c.push(d));
  84266. }
  84267. });
  84268. }
  84269. at([P3e]);
  84270. at([S3e]);
  84271. at([Z3e, l6e, y6e, q6e, lBe, UBe, Sze, aVe, PVe, DVe, WVe, LFe, sWe, yWe, RWe, BWe, UWe, t7e, d7e, y7e, $7e, cQe]);
  84272. at(AQe);
  84273. at(nHe);
  84274. at(gne);
  84275. at(vHe);
  84276. at(tre);
  84277. at(bHe);
  84278. at($He);
  84279. at(vGe);
  84280. at(RGe);
  84281. at(ey);
  84282. at(qGe);
  84283. at(e9e);
  84284. at(c9e);
  84285. at(m9e);
  84286. at(x9e);
  84287. at(A9e);
  84288. at(z9e);
  84289. at(rje);
  84290. at(aie);
  84291. at(oie);
  84292. at(xje);
  84293. at(fie);
  84294. at(die);
  84295. at($je);
  84296. at(Fje);
  84297. at(Hje);
  84298. at(mZe);
  84299. at(W5e);
  84300. const yZe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  84301. __proto__: null,
  84302. Axis: Ba,
  84303. ChartView: zt,
  84304. ComponentModel: rt,
  84305. ComponentView: Xt,
  84306. List: Lr,
  84307. Model: Wt,
  84308. PRIORITY: wee,
  84309. SeriesModel: Ht,
  84310. color: KIe,
  84311. connect: U8e,
  84312. dataTool: tNe,
  84313. dependencies: M8e,
  84314. disConnect: X8e,
  84315. disconnect: Dee,
  84316. dispose: Y8e,
  84317. env: vt,
  84318. extendChartView: A5e,
  84319. extendComponentModel: T5e,
  84320. extendComponentView: P5e,
  84321. extendSeriesModel: $5e,
  84322. format: p5e,
  84323. getCoordinateSystemDimensions: K8e,
  84324. getInstanceByDom: gk,
  84325. getInstanceById: q8e,
  84326. getMap: eNe,
  84327. graphic: h5e,
  84328. helper: a5e,
  84329. init: Iee,
  84330. innerDrawElementOnCanvas: dk,
  84331. matrix: AIe,
  84332. number: f5e,
  84333. parseGeoJSON: iE,
  84334. parseGeoJson: iE,
  84335. registerAction: vo,
  84336. registerCoordinateSystem: Lee,
  84337. registerLayout: Nee,
  84338. registerLoading: Ok,
  84339. registerLocale: UR,
  84340. registerMap: Bee,
  84341. registerPostInit: Ree,
  84342. registerPostUpdate: kee,
  84343. registerPreprocessor: yk,
  84344. registerProcessor: bk,
  84345. registerTheme: mk,
  84346. registerTransform: zee,
  84347. registerUpdateLifecycle: fw,
  84348. registerVisual: $u,
  84349. setCanvasCreator: J8e,
  84350. setPlatformAPI: Oq,
  84351. throttle: uw,
  84352. time: d5e,
  84353. use: at,
  84354. util: v5e,
  84355. vector: vIe,
  84356. version: E8e,
  84357. zrUtil: lIe,
  84358. zrender: RDe
  84359. }, Symbol.toStringTag, { value: "Module" }));
  84360. function bZe(t) {
  84361. return j9() ? (f0(t), !0) : !1;
  84362. }
  84363. function YO(t) {
  84364. return typeof t == "function" ? t() : B(t);
  84365. }
  84366. const _Ze = typeof window < "u" && typeof document < "u";
  84367. typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
  84368. const OZe = Object.prototype.toString, SZe = (t) => OZe.call(t) === "[object Object]", ZE = () => {
  84369. };
  84370. function xZe(t, e) {
  84371. function n(...r) {
  84372. return new Promise((i, a) => {
  84373. Promise.resolve(t(() => e.apply(this, r), { fn: e, thisArg: this, args: r })).then(i).catch(a);
  84374. });
  84375. }
  84376. return n;
  84377. }
  84378. function wZe(t, e = {}) {
  84379. let n, r, i = ZE;
  84380. const a = (s) => {
  84381. clearTimeout(s), i(), i = ZE;
  84382. };
  84383. return (s) => {
  84384. const l = YO(t), u = YO(e.maxWait);
  84385. return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r && (a(r), r = null), Promise.resolve(s())) : new Promise((c, f) => {
  84386. i = e.rejectOnCancel ? f : c, u && !r && (r = setTimeout(() => {
  84387. n && a(n), r = null, c(s());
  84388. }, u)), n = setTimeout(() => {
  84389. r && a(r), r = null, c(s());
  84390. }, l);
  84391. });
  84392. };
  84393. }
  84394. function CZe(t) {
  84395. return vn();
  84396. }
  84397. function TZe(t, e = 200, n = {}) {
  84398. return xZe(
  84399. wZe(e, n),
  84400. t
  84401. );
  84402. }
  84403. function PZe(t, e) {
  84404. CZe() && nl(t, e);
  84405. }
  84406. function $Ze(t) {
  84407. var e;
  84408. const n = YO(t);
  84409. return (e = n == null ? void 0 : n.$el) != null ? e : n;
  84410. }
  84411. const AZe = _Ze ? window : void 0;
  84412. function EZe(...t) {
  84413. let e, n, r, i;
  84414. if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, r, i] = t, e = AZe) : [e, n, r, i] = t, !e)
  84415. return ZE;
  84416. Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  84417. const a = [], o = () => {
  84418. a.forEach((c) => c()), a.length = 0;
  84419. }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(
  84420. () => [$Ze(e), YO(i)],
  84421. ([c, f]) => {
  84422. if (o(), !c)
  84423. return;
  84424. const d = SZe(f) ? { ...f } : f;
  84425. a.push(
  84426. ...n.flatMap((h) => r.map((p) => s(c, h, p, d)))
  84427. );
  84428. },
  84429. { immediate: !0, flush: "post" }
  84430. ), u = () => {
  84431. l(), o();
  84432. };
  84433. return bZe(u), u;
  84434. }
  84435. function MZe(t, e = "default") {
  84436. let n = null, r = s;
  84437. const i = U({});
  84438. let a;
  84439. const o = L(() => i.value);
  84440. r = TZe(s, 200);
  84441. function s() {
  84442. n == null || n.resize({
  84443. animation: {
  84444. duration: 300,
  84445. easing: "quadraticIn"
  84446. }
  84447. });
  84448. }
  84449. function l(f = e) {
  84450. const d = B(t);
  84451. if (!d || !B(d))
  84452. return;
  84453. n = Iee(d, f), a = EZe(window, "resize", r);
  84454. }
  84455. function u(f, d = !1) {
  84456. return i.value = f, new Promise((h) => {
  84457. var p;
  84458. ((p = B(t)) == null ? void 0 : p.offsetHeight) === 0 && setTimeout(() => {
  84459. u(B(o)), h(null);
  84460. }, 30), Tt(() => {
  84461. setTimeout(() => {
  84462. !n && (l("default"), !n) || (d && (n == null || n.clear()), n == null || n.setOption(B(o)), h(null));
  84463. }, 30);
  84464. });
  84465. });
  84466. }
  84467. se(
  84468. () => e,
  84469. (f) => {
  84470. n && (n.dispose(), l(f), u(i.value));
  84471. }
  84472. ), PZe(() => {
  84473. n && (a(), n.dispose(), n = null);
  84474. });
  84475. function c() {
  84476. return n || l("default"), n;
  84477. }
  84478. return {
  84479. setOptions: u,
  84480. resize: s,
  84481. echarts: yZe,
  84482. getInstance: c
  84483. };
  84484. }
  84485. const DL = /* @__PURE__ */ te({
  84486. __name: "Charts",
  84487. props: {
  84488. echartsOptions: {},
  84489. width: {},
  84490. height: {},
  84491. loading: { type: Boolean }
  84492. },
  84493. setup(t) {
  84494. const e = t, n = U(null), { setOptions: r, resize: i } = MZe(n), a = jg(ts, {
  84495. style: {
  84496. fontSize: "24px"
  84497. }
  84498. });
  84499. return se(
  84500. () => [e.width, e.height],
  84501. Bbe(async () => {
  84502. i();
  84503. }, 200)
  84504. ), se(
  84505. () => e,
  84506. async () => {
  84507. await Tt();
  84508. const { echartsOptions: o } = e;
  84509. r(o);
  84510. },
  84511. {
  84512. immediate: !0,
  84513. deep: !0
  84514. }
  84515. ), (o, s) => (pe(), je(B(gg), {
  84516. spinning: o.loading,
  84517. indicator: B(a)
  84518. }, {
  84519. default: we(() => [
  84520. He("div", {
  84521. ref_key: "chartRef",
  84522. ref: n,
  84523. style: Sr({ width: o.width + "px", height: o.height + "px" })
  84524. }, null, 4)
  84525. ]),
  84526. _: 1
  84527. }, 8, ["spinning", "indicator"]));
  84528. }
  84529. });
  84530. function RL(t) {
  84531. return SU(t, xMe);
  84532. }
  84533. const kL = {
  84534. type: Object,
  84535. default: () => ({
  84536. sourceType: Ri.STATIC,
  84537. data: [],
  84538. url: "",
  84539. method: "GET",
  84540. params: {},
  84541. headers: {},
  84542. refreshTime: 0,
  84543. dataProcess: () => []
  84544. })
  84545. }, IZe = (t, e) => new Promise((n, r) => {
  84546. const i = new Blob([`
  84547. self.onmessage = function(e) {
  84548. self.postMessage((${t}).call(null, e.data));
  84549. }
  84550. `], { type: "application/javascript" }), a = new Worker(URL.createObjectURL(i));
  84551. a.postMessage(JSON.parse(e)), a.onmessage = (o) => {
  84552. a.terminate(), n(o.data);
  84553. }, a.onerror = (o) => {
  84554. a.terminate(), r(o);
  84555. };
  84556. }), LL = {
  84557. width: {
  84558. type: Number,
  84559. default: 400
  84560. },
  84561. height: {
  84562. type: Number,
  84563. default: 260
  84564. },
  84565. dataSource: kL,
  84566. // 标题
  84567. title: {
  84568. type: Object
  84569. },
  84570. // 图例
  84571. legend: {
  84572. type: Object
  84573. },
  84574. // 背景
  84575. backgroundColor: {
  84576. type: String
  84577. },
  84578. // 边框
  84579. grid: {
  84580. type: Object
  84581. },
  84582. // 提示框
  84583. tooltip: {
  84584. type: Object
  84585. },
  84586. // x轴数据
  84587. xAxis: {
  84588. type: Object
  84589. },
  84590. // y轴数据
  84591. yAxis: {
  84592. type: Object
  84593. },
  84594. // 折线
  84595. series: {
  84596. type: Array
  84597. },
  84598. // 数据集
  84599. dataset: {
  84600. type: Object
  84601. }
  84602. }, _ie = [];
  84603. _ie.line = {
  84604. lineStyle: {
  84605. type: "solid",
  84606. width: 1
  84607. },
  84608. symbol: "rect",
  84609. symbolSize: 4,
  84610. symbolRotate: 0,
  84611. smooth: !1,
  84612. step: !1
  84613. };
  84614. const DZe = RL({
  84615. title: {
  84616. text: "折线图标题"
  84617. },
  84618. xAxis: {
  84619. data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  84620. },
  84621. series: _ie
  84622. }), RZe = {
  84623. container: {
  84624. props: {
  84625. width: 400,
  84626. height: 260
  84627. }
  84628. },
  84629. props: {
  84630. // 数据源
  84631. dataSource: {
  84632. sourceType: Ri.STATIC,
  84633. data: {
  84634. xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
  84635. series: [
  84636. {
  84637. type: "line",
  84638. name: "系列1",
  84639. data: [89.3, 92.1, 94.4, 85.4]
  84640. },
  84641. {
  84642. type: "line",
  84643. name: "系列2",
  84644. data: [95.8, 89.4, 91.2, 76.9]
  84645. }
  84646. ]
  84647. },
  84648. url: location.origin + "/mock/api/get/example/line",
  84649. method: "POST",
  84650. params: {},
  84651. headers: {},
  84652. refreshTime: 0,
  84653. dataProcess: `
  84654. (res) => {
  84655. // 取出列表
  84656. const data = res.data;
  84657. // x轴数据
  84658. const xData = data.map((item) => item.name);
  84659. // 系列数据
  84660. const series = [
  84661. { type: 'line', name: '苹果', data: data.map(item => item.apple) },
  84662. { type: 'line', name: 'VIVO', data: data.map(item => item.vivo) },
  84663. { type: 'line', name: '小米', data: data.map(item => item.mi) },
  84664. ];
  84665. // 返回图表数据
  84666. return { xData, series };
  84667. }
  84668. `
  84669. },
  84670. ...DZe
  84671. }
  84672. }, Oie = (t, { manual: e, ready: n = !0, refreshDeps: r = [], refreshDepsAction: i }) => {
  84673. const a = U(!1);
  84674. return ht(() => {
  84675. !e && t.options.refreshDeps !== !0 && (a.value = B(n));
  84676. }), r instanceof Array ? se(
  84677. [a, ...r],
  84678. ([o]) => {
  84679. o && !e && o && (i ? i() : t.refresh());
  84680. },
  84681. {
  84682. deep: !0,
  84683. immediate: !1
  84684. }
  84685. ) : se(a, (o) => {
  84686. !e && o && (i ? i() : t.refresh());
  84687. }), {
  84688. name: "autoRunPlugin",
  84689. onBefore: () => {
  84690. if (!B(n))
  84691. return {
  84692. stopNow: !0
  84693. };
  84694. }
  84695. };
  84696. };
  84697. Oie.onInit = ({ ready: t = !0, manual: e }) => ({
  84698. loading: !e && B(t)
  84699. });
  84700. const J_ = /* @__PURE__ */ new Map(), kZe = (t, e, n) => {
  84701. const r = J_.get(t);
  84702. r != null && r.timer && clearTimeout(r.timer);
  84703. let i;
  84704. e > -1 && (i = setTimeout(() => {
  84705. J_.delete(t);
  84706. }, e)), J_.set(t, {
  84707. ...n,
  84708. timer: i
  84709. });
  84710. }, LZe = (t) => J_.get(t), e1 = /* @__PURE__ */ new Map(), NZe = (t) => e1.get(t), BZe = (t, e) => {
  84711. e1.set(t, e), e.then((n) => (e1.delete(t), n)).catch((n) => {
  84712. throw e1.delete(t), n;
  84713. });
  84714. }, Tc = {}, zZe = [], VZe = (t, e) => {
  84715. Tc[t] && (Tc[t].forEach((n) => n(e)), zZe.forEach((n) => n({
  84716. type: t,
  84717. data: e
  84718. })));
  84719. }, c$ = (t, e) => (Tc[t] || (Tc[t] = []), Tc[t].push(e), function() {
  84720. const r = Tc[t].indexOf(e);
  84721. Tc[t].splice(r, 1);
  84722. }), FZe = (t, {
  84723. cacheKey: e,
  84724. cacheTime: n = 5 * 60 * 1e3,
  84725. staleTime: r = 0,
  84726. setCache: i,
  84727. getCache: a
  84728. }) => {
  84729. const o = U(), s = U(), l = (c, f) => {
  84730. i ? i(f) : kZe(c, n, f), VZe(c, f.data);
  84731. }, u = (c, f = []) => a ? a(f) : LZe(c);
  84732. return ht(() => {
  84733. if (!e)
  84734. return;
  84735. const c = u(e);
  84736. 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 = c$(e, (f) => {
  84737. t.setState({ data: f });
  84738. });
  84739. }), f0(() => {
  84740. var c;
  84741. (c = o.value) == null || c.call(o);
  84742. }), e ? {
  84743. name: "cachePlugin",
  84744. onBefore: (c) => {
  84745. const f = u(e, c);
  84746. return !f || !Object.hasOwnProperty.call(f, "data") ? {} : r === -1 || (/* @__PURE__ */ new Date()).getTime() - f.time <= r ? {
  84747. loading: !1,
  84748. data: f == null ? void 0 : f.data,
  84749. returnNow: !0
  84750. } : {
  84751. data: f == null ? void 0 : f.data
  84752. };
  84753. },
  84754. onRequest: (c, f) => {
  84755. let d = NZe(e);
  84756. return d && d !== s.value ? { servicePromise: d } : (d = c(...f), s.value = d, BZe(e, d), { servicePromise: d });
  84757. },
  84758. onSuccess: (c, f) => {
  84759. var d;
  84760. e && ((d = o.value) == null || d.call(o), l(e, {
  84761. data: c,
  84762. params: f,
  84763. time: (/* @__PURE__ */ new Date()).getTime()
  84764. }), o.value = c$(e, (h) => {
  84765. t.setState({ data: h });
  84766. }));
  84767. },
  84768. onMutate: (c) => {
  84769. var f;
  84770. e && ((f = o.value) == null || f.call(o), l(e, {
  84771. data: c,
  84772. params: t.state.params,
  84773. time: (/* @__PURE__ */ new Date()).getTime()
  84774. }), o.value = c$(e, (d) => {
  84775. t.setState({ data: d });
  84776. }));
  84777. }
  84778. } : {};
  84779. };
  84780. function WZe(t) {
  84781. var e = typeof t;
  84782. return t != null && (e == "object" || e == "function");
  84783. }
  84784. var go = WZe, QZe = typeof Iy == "object" && Iy && Iy.Object === Object && Iy, Sie = QZe, HZe = Sie, GZe = typeof self == "object" && self && self.Object === Object && self, jZe = HZe || GZe || Function("return this")(), mo = jZe, ZZe = mo, UZe = function() {
  84785. return ZZe.Date.now();
  84786. }, XZe = UZe, YZe = /\s/;
  84787. function qZe(t) {
  84788. for (var e = t.length; e-- && YZe.test(t.charAt(e)); )
  84789. ;
  84790. return e;
  84791. }
  84792. var KZe = qZe, JZe = KZe, eUe = /^\s+/;
  84793. function tUe(t) {
  84794. return t && t.slice(0, JZe(t) + 1).replace(eUe, "");
  84795. }
  84796. var nUe = tUe, rUe = mo, iUe = rUe.Symbol, ww = iUe, RQ = ww, xie = Object.prototype, aUe = xie.hasOwnProperty, oUe = xie.toString, Tv = RQ ? RQ.toStringTag : void 0;
  84797. function sUe(t) {
  84798. var e = aUe.call(t, Tv), n = t[Tv];
  84799. try {
  84800. t[Tv] = void 0;
  84801. var r = !0;
  84802. } catch {
  84803. }
  84804. var i = oUe.call(t);
  84805. return r && (e ? t[Tv] = n : delete t[Tv]), i;
  84806. }
  84807. var lUe = sUe, uUe = Object.prototype, cUe = uUe.toString;
  84808. function fUe(t) {
  84809. return cUe.call(t);
  84810. }
  84811. var dUe = fUe, kQ = ww, hUe = lUe, pUe = dUe, vUe = "[object Null]", gUe = "[object Undefined]", LQ = kQ ? kQ.toStringTag : void 0;
  84812. function mUe(t) {
  84813. return t == null ? t === void 0 ? gUe : vUe : LQ && LQ in Object(t) ? hUe(t) : pUe(t);
  84814. }
  84815. var $p = mUe;
  84816. function yUe(t) {
  84817. return t != null && typeof t == "object";
  84818. }
  84819. var Au = yUe, bUe = $p, _Ue = Au, OUe = "[object Symbol]";
  84820. function SUe(t) {
  84821. return typeof t == "symbol" || _Ue(t) && bUe(t) == OUe;
  84822. }
  84823. var xUe = SUe, wUe = nUe, NQ = go, CUe = xUe, BQ = NaN, TUe = /^[-+]0x[0-9a-f]+$/i, PUe = /^0b[01]+$/i, $Ue = /^0o[0-7]+$/i, AUe = parseInt;
  84824. function EUe(t) {
  84825. if (typeof t == "number")
  84826. return t;
  84827. if (CUe(t))
  84828. return BQ;
  84829. if (NQ(t)) {
  84830. var e = typeof t.valueOf == "function" ? t.valueOf() : t;
  84831. t = NQ(e) ? e + "" : e;
  84832. }
  84833. if (typeof t != "string")
  84834. return t === 0 ? t : +t;
  84835. t = wUe(t);
  84836. var n = PUe.test(t);
  84837. return n || $Ue.test(t) ? AUe(t.slice(2), n ? 2 : 8) : TUe.test(t) ? BQ : +t;
  84838. }
  84839. var MUe = EUe, IUe = go, f$ = XZe, zQ = MUe, DUe = "Expected a function", RUe = Math.max, kUe = Math.min;
  84840. function LUe(t, e, n) {
  84841. var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  84842. if (typeof t != "function")
  84843. throw new TypeError(DUe);
  84844. e = zQ(e) || 0, IUe(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? RUe(zQ(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  84845. function h(S) {
  84846. var x = r, C = i;
  84847. return r = i = void 0, u = S, o = t.apply(C, x), o;
  84848. }
  84849. function p(S) {
  84850. return u = S, s = setTimeout(m, e), c ? h(S) : o;
  84851. }
  84852. function v(S) {
  84853. var x = S - l, C = S - u, T = e - x;
  84854. return f ? kUe(T, a - C) : T;
  84855. }
  84856. function g(S) {
  84857. var x = S - l, C = S - u;
  84858. return l === void 0 || x >= e || x < 0 || f && C >= a;
  84859. }
  84860. function m() {
  84861. var S = f$();
  84862. if (g(S))
  84863. return y(S);
  84864. s = setTimeout(m, v(S));
  84865. }
  84866. function y(S) {
  84867. return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  84868. }
  84869. function b() {
  84870. s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  84871. }
  84872. function _() {
  84873. return s === void 0 ? o : y(f$());
  84874. }
  84875. function O() {
  84876. var S = f$(), x = g(S);
  84877. if (r = arguments, i = this, l = S, x) {
  84878. if (s === void 0)
  84879. return p(l);
  84880. if (f)
  84881. return clearTimeout(s), s = setTimeout(m, e), h(l);
  84882. }
  84883. return s === void 0 && (s = setTimeout(m, e)), o;
  84884. }
  84885. return O.cancel = b, O.flush = _, O;
  84886. }
  84887. var wie = LUe;
  84888. const NUe = /* @__PURE__ */ vx(wie), BUe = (t, { debounceWait: e, debounceLeading: n, debounceTrailing: r, debounceMaxWait: i }) => {
  84889. const a = U(), o = L(() => {
  84890. const s = {}, l = B(n), u = B(r), c = B(i);
  84891. return l !== void 0 && (s.leading = l), u !== void 0 && (s.trailing = u), c !== void 0 && (s.maxWait = c), s;
  84892. });
  84893. return ht((s) => {
  84894. if (B(e)) {
  84895. const l = t.runAsync.bind(t);
  84896. a.value = NUe(
  84897. (u) => {
  84898. u();
  84899. },
  84900. B(e),
  84901. o.value
  84902. ), t.runAsync = (...u) => new Promise((c, f) => {
  84903. var d;
  84904. (d = a.value) == null || d.call(a, () => {
  84905. l(...u).then(c).catch(f);
  84906. });
  84907. }), s(() => {
  84908. var u;
  84909. (u = a.value) == null || u.cancel(), t.runAsync = l;
  84910. });
  84911. }
  84912. }), B(e) ? {
  84913. name: "debouncePlugin",
  84914. onCancel: () => {
  84915. var s;
  84916. (s = a.value) == null || s.cancel();
  84917. }
  84918. } : {};
  84919. };
  84920. var zUe = Object.defineProperty, VUe = (t, e, n) => e in t ? zUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, VQ = (t, e, n) => (VUe(t, typeof e != "symbol" ? e + "" : e, n), n);
  84921. class FUe {
  84922. constructor() {
  84923. VQ(this, "table", {}), VQ(this, "hashTable", {});
  84924. }
  84925. insert(e) {
  84926. const n = Symbol(e);
  84927. return this.table[e] = !0, this.hashTable[n] = e, n;
  84928. }
  84929. find(e) {
  84930. return this.hashTable[e];
  84931. }
  84932. }
  84933. new FUe();
  84934. function WUe(t) {
  84935. const n = t.toString().match(/^function\s+([^\s(]+)/);
  84936. return n ? n[1] : "";
  84937. }
  84938. function QUe(t) {
  84939. const e = t.toString(), n = /([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/, r = e.match(n);
  84940. return r ? r[1].trim() : "";
  84941. }
  84942. var HUe = Object.defineProperty, GUe = (t, e, n) => e in t ? HUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, FQ = (t, e, n) => (GUe(t, typeof e != "symbol" ? e + "" : e, n), n);
  84943. class jUe {
  84944. constructor() {
  84945. FQ(this, "requestInstances", /* @__PURE__ */ new Map()), FQ(this, "listeners", []);
  84946. }
  84947. emit(e) {
  84948. this.listeners.forEach((n) => n(e));
  84949. }
  84950. subscribe(e) {
  84951. return this.listeners.push(e), () => {
  84952. const n = this.listeners.indexOf(e);
  84953. this.listeners.splice(n, 1);
  84954. };
  84955. }
  84956. insert(e, n) {
  84957. this.requestInstances.set(e, { ...n }), this.emit({
  84958. key: e,
  84959. ...n
  84960. });
  84961. }
  84962. update(e, n) {
  84963. this.has(e) && this.requestInstances.set(e, { ...this.requestInstances.get(e), ...n });
  84964. }
  84965. has(e) {
  84966. return this.requestInstances.has(e);
  84967. }
  84968. reset(e) {
  84969. if (this.requestInstances.has(e)) {
  84970. const n = this.requestInstances.get(e);
  84971. this.requestInstances.clear(), this.insert(e, n);
  84972. } else
  84973. this.requestInstances.clear();
  84974. }
  84975. getAll() {
  84976. return this.requestInstances;
  84977. }
  84978. }
  84979. const li = new jUe(), ZUe = (t, { ready: e = !0, debugKey: n, ...r }) => {
  84980. const i = () => {
  84981. if (n && !li.has(n)) {
  84982. const o = t.serviceRef.value.toString().includes("function") ? WUe(t.serviceRef.value.toString()) : QUe(t.serviceRef.value.toString());
  84983. li.insert(n, {
  84984. instance: t,
  84985. requestName: o,
  84986. time: Date.now()
  84987. });
  84988. }
  84989. }, a = L(
  84990. () => Object.fromEntries(
  84991. Object.entries({ ready: e, ...r }).map(([o, s]) => [o, B(s)])
  84992. )
  84993. );
  84994. return ht(() => {
  84995. n && li.has(n) && li.emit({
  84996. ...t,
  84997. options: { ...t.options, ...a.value }
  84998. });
  84999. }), {
  85000. name: "devtoolsPlugin",
  85001. onBefore: (o) => {
  85002. i(), n && li.has(n) && li.emit({
  85003. ...t.state,
  85004. key: n,
  85005. params: o,
  85006. loading: !0,
  85007. time: Date.now(),
  85008. type: "pending"
  85009. });
  85010. },
  85011. onSuccess(o, s) {
  85012. i(), n && li.has(n) && li.emit({
  85013. ...t.state,
  85014. key: n,
  85015. data: o,
  85016. params: s,
  85017. loading: !1,
  85018. time: Date.now(),
  85019. type: "done"
  85020. });
  85021. },
  85022. onCancel() {
  85023. i(), n && li.has(n) && li.emit({
  85024. ...t.state,
  85025. key: n,
  85026. loading: !1,
  85027. time: Date.now(),
  85028. type: "cancel"
  85029. });
  85030. },
  85031. onError(o, s) {
  85032. i(), n && li.has(n) && li.emit({
  85033. ...t.state,
  85034. key: n,
  85035. params: s,
  85036. loading: !1,
  85037. error: o,
  85038. time: Date.now(),
  85039. type: "error"
  85040. });
  85041. },
  85042. onMutate(o) {
  85043. i(), n && li.has(n) && li.emit({
  85044. ...t.state,
  85045. key: n,
  85046. data: o,
  85047. loading: !1,
  85048. time: Date.now(),
  85049. type: "mutate"
  85050. });
  85051. }
  85052. };
  85053. }, UUe = (t, { loadingDelay: e }) => {
  85054. const n = U(), r = () => {
  85055. n.value && (clearTimeout(B(n.value)), n.value = void 0);
  85056. };
  85057. return {
  85058. name: "loadingDelayPlugin",
  85059. onFinally: () => {
  85060. r();
  85061. const i = B(e);
  85062. i && (t.setState({
  85063. loading: !0
  85064. }), n.value = setTimeout(() => {
  85065. t.setState({
  85066. loading: !1
  85067. });
  85068. }, i));
  85069. },
  85070. onError: () => {
  85071. r();
  85072. }
  85073. };
  85074. };
  85075. function NL() {
  85076. return !!(typeof window < "u" && window.document && window.document.createElement);
  85077. }
  85078. const XUe = !!(typeof window < "u" && window.document && window.document.createElement);
  85079. function BL() {
  85080. return NL() ? document.visibilityState !== "hidden" : !0;
  85081. }
  85082. const Bg = [];
  85083. function YUe(t) {
  85084. return Bg.push(t), function() {
  85085. const n = Bg.indexOf(t);
  85086. Bg.splice(n, 1);
  85087. };
  85088. }
  85089. if (NL()) {
  85090. const t = () => {
  85091. if (BL())
  85092. for (let e = 0; e < Bg.length; e++) {
  85093. const n = Bg[e];
  85094. n();
  85095. }
  85096. };
  85097. window.addEventListener("visibilitychange", t, !1);
  85098. }
  85099. const qUe = (t, { pollingInterval: e, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
  85100. let i;
  85101. const a = U(), o = U(0), s = () => {
  85102. var l;
  85103. i && clearTimeout(i), (l = a.value) == null || l.call(a);
  85104. };
  85105. return ht(() => {
  85106. B(e) || s();
  85107. }), B(e) ? {
  85108. name: "pollingPlugin",
  85109. onBefore: () => {
  85110. s();
  85111. },
  85112. onError: () => {
  85113. o.value += 1;
  85114. },
  85115. onSuccess: () => {
  85116. o.value = 0;
  85117. },
  85118. onFinally: () => {
  85119. r === -1 || r !== -1 && o.value <= r ? i = setTimeout(() => {
  85120. !n && !BL() ? a.value = YUe(() => {
  85121. t.refresh();
  85122. }) : t.refresh();
  85123. }, B(e)) : o.value = 0;
  85124. },
  85125. onCancel: () => {
  85126. s();
  85127. }
  85128. } : {};
  85129. };
  85130. function KUe(t, e) {
  85131. let n = !1;
  85132. return (...r) => {
  85133. n || (n = !0, t(...r), setTimeout(() => {
  85134. n = !1;
  85135. }, e));
  85136. };
  85137. }
  85138. function JUe() {
  85139. return NL() && typeof navigator.onLine < "u" ? navigator.onLine : !0;
  85140. }
  85141. const zg = [];
  85142. function eXe(t) {
  85143. return zg.push(t), function() {
  85144. const n = zg.indexOf(t);
  85145. n > -1 && zg.splice(n, 1);
  85146. };
  85147. }
  85148. if (XUe) {
  85149. const t = () => {
  85150. if (!(!BL() || !JUe()))
  85151. for (let e = 0; e < zg.length; e++) {
  85152. const n = zg[e];
  85153. n();
  85154. }
  85155. };
  85156. window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1);
  85157. }
  85158. const tXe = (t, { refreshOnWindowFocus: e, focusTimespan: n = 5e3 }) => {
  85159. const r = U(), i = () => {
  85160. var a;
  85161. (a = r.value) == null || a.call(r);
  85162. };
  85163. return ht((a) => {
  85164. if (B(e)) {
  85165. const o = KUe(
  85166. t.refresh.bind(t),
  85167. B(n)
  85168. );
  85169. r.value = eXe(() => {
  85170. o();
  85171. });
  85172. }
  85173. a(() => {
  85174. i();
  85175. });
  85176. }), f0(() => {
  85177. i();
  85178. }), {
  85179. name: "refreshOnWindowFocusPlugin"
  85180. };
  85181. }, nXe = (t, { retryInterval: e, retryCount: n }) => {
  85182. const r = U(), i = U(0), a = U(!1);
  85183. return n ? {
  85184. name: "retryPlugin",
  85185. onBefore: () => {
  85186. a.value || (i.value = 0), a.value = !1, r.value && clearTimeout(r.value);
  85187. },
  85188. onSuccess: () => {
  85189. i.value = 0;
  85190. },
  85191. onError: () => {
  85192. if (i.value += 1, n === -1 || i.value <= n) {
  85193. const o = e ?? Math.min(1e3 * 2 ** i.value, 3e4);
  85194. r.value = setTimeout(() => {
  85195. a.value = !0, t.refresh();
  85196. }, o);
  85197. } else
  85198. i.value = 0;
  85199. },
  85200. onCancel: () => {
  85201. i.value = 0, r.value && clearTimeout(r.value);
  85202. }
  85203. } : {};
  85204. };
  85205. var rXe = wie, iXe = go, aXe = "Expected a function";
  85206. function oXe(t, e, n) {
  85207. var r = !0, i = !0;
  85208. if (typeof t != "function")
  85209. throw new TypeError(aXe);
  85210. return iXe(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), rXe(t, e, {
  85211. leading: r,
  85212. maxWait: e,
  85213. trailing: i
  85214. });
  85215. }
  85216. var sXe = oXe;
  85217. const lXe = /* @__PURE__ */ vx(sXe), uXe = (t, { throttleWait: e, throttleLeading: n, throttleTrailing: r }) => {
  85218. const i = L(() => {
  85219. const o = {};
  85220. return B(n) !== void 0 && (o.leading = B(n)), B(r) !== void 0 && (o.trailing = B(r)), o;
  85221. }), a = L(
  85222. () => lXe(
  85223. (o) => {
  85224. o();
  85225. },
  85226. B(e),
  85227. i.value
  85228. )
  85229. );
  85230. return ht((o) => {
  85231. if (B(e)) {
  85232. const s = t.runAsync.bind(t);
  85233. t.runAsync = (...l) => new Promise((u, c) => {
  85234. var f;
  85235. (f = a.value) == null || f.call(a, () => {
  85236. s(...l).then(u).catch(c);
  85237. });
  85238. }), o(() => {
  85239. var l;
  85240. t.runAsync = s, (l = a.value) == null || l.cancel();
  85241. });
  85242. }
  85243. }), B(e) ? {
  85244. name: "throttlePlugin",
  85245. onCancel: () => {
  85246. var o;
  85247. (o = a.value) == null || o.cancel();
  85248. }
  85249. } : {};
  85250. }, WQ = (t) => typeof t == "function", cXe = (t) => typeof t == "boolean";
  85251. var fXe = Object.defineProperty, dXe = (t, e, n) => e in t ? fXe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Fb = (t, e, n) => (dXe(t, typeof e != "symbol" ? e + "" : e, n), n);
  85252. class hXe {
  85253. constructor(e, n, r, i = {}) {
  85254. Fb(this, "pluginImpls"), Fb(this, "count", 0), Fb(this, "state", {
  85255. loading: !1,
  85256. params: void 0,
  85257. data: void 0,
  85258. error: void 0
  85259. }), Fb(this, "previousValidData"), this.serviceRef = e, this.options = n, this.setUpdateData = r, this.initState = i, this.state = {
  85260. ...this.state,
  85261. loading: !n.manual,
  85262. ...i
  85263. };
  85264. }
  85265. setState(e = {}) {
  85266. this.state = {
  85267. ...this.state,
  85268. ...e
  85269. }, this.setUpdateData(this.state);
  85270. }
  85271. setData(e, n) {
  85272. console.warn("Please use 'setFetchState' instead of 'setData'"), n instanceof Array ? n.forEach((r) => {
  85273. this.state[r] = e, this.setUpdateData(e, r);
  85274. }) : (this.state[n] = e, this.setUpdateData(e, n));
  85275. }
  85276. setFetchState(e, n) {
  85277. n instanceof Array ? n.forEach((r) => {
  85278. this.state[r] = e, this.setUpdateData(e, r);
  85279. }) : (this.state[n] = e, this.setUpdateData(e, n));
  85280. }
  85281. runPluginHandler(e, ...n) {
  85282. var r, i, a;
  85283. const o = (a = (i = (r = this.pluginImpls) == null ? void 0 : r.map((s) => {
  85284. var l;
  85285. return (l = s[e]) == null ? void 0 : l.call(s, ...n);
  85286. })) != null ? i : []) == null ? void 0 : a.filter(Boolean);
  85287. return Object.assign({}, ...o);
  85288. }
  85289. async runAsync(...e) {
  85290. var n, r, i, a, o, s, l, u, c, f, d;
  85291. this.count += 1;
  85292. const h = this.count, { stopNow: p = !1, returnNow: v = !1, ...g } = this.runPluginHandler(
  85293. "onBefore",
  85294. e
  85295. );
  85296. if (p)
  85297. return new Promise(() => {
  85298. });
  85299. if (this.setState({
  85300. loading: !0,
  85301. params: e,
  85302. ...g
  85303. }), v)
  85304. return Promise.resolve(g.data);
  85305. try {
  85306. (r = (n = this.options).onBefore) == null || r.call(n, e);
  85307. } catch (m) {
  85308. return this.setState({
  85309. error: m,
  85310. loading: !1
  85311. }), (a = (i = this.options).onError) == null || a.call(i, m, e), this.runPluginHandler("onError", m, e), new Promise(() => {
  85312. });
  85313. }
  85314. try {
  85315. let { servicePromise: m } = this.runPluginHandler("onRequest", this.serviceRef.value, e);
  85316. const y = (_) => {
  85317. var O, S, x, C;
  85318. if (h !== this.count)
  85319. return new Promise(() => {
  85320. });
  85321. const T = this.options.formatResult ? this.options.formatResult(_) : _;
  85322. return this.setState({
  85323. data: T,
  85324. error: void 0,
  85325. loading: !1
  85326. }), (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;
  85327. };
  85328. m || (m = this.serviceRef.value(...e));
  85329. const b = await m;
  85330. return y(b);
  85331. } catch (m) {
  85332. if (h !== this.count)
  85333. return new Promise(() => {
  85334. });
  85335. throw this.setState({
  85336. error: m,
  85337. loading: !1
  85338. }), (s = (o = this.options).onError) == null || s.call(o, m, e), this.runPluginHandler("onError", m, e), (WQ((l = this.options) == null ? void 0 : l.rollbackOnError) && ((u = this.options) != null && u.rollbackOnError(e)) || cXe((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
  85339. data: this.previousValidData
  85340. }), (d = (f = this.options).onFinally) == null || d.call(f, e, void 0, m), h === this.count && this.runPluginHandler("onFinally", e, void 0, m), m;
  85341. }
  85342. }
  85343. run(...e) {
  85344. this.runAsync(...e).catch((n) => {
  85345. this.options.onError || console.error(n);
  85346. });
  85347. }
  85348. cancel() {
  85349. this.count += 1, this.setState({
  85350. loading: !1
  85351. }), this.runPluginHandler("onCancel");
  85352. }
  85353. refresh() {
  85354. this.run(...this.state.params || []);
  85355. }
  85356. refreshAsync() {
  85357. return this.runAsync(...this.state.params || []);
  85358. }
  85359. mutate(e) {
  85360. const n = WQ(e) ? e(this.state.data) : e;
  85361. this.runPluginHandler("onMutate", n), this.setState({
  85362. data: n
  85363. });
  85364. }
  85365. }
  85366. const pXe = Symbol(
  85367. "USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY"
  85368. );
  85369. function vXe(t) {
  85370. return Object.keys(t).filter((n) => ["data", "loading", "params", "error"].includes(n)).length === 4;
  85371. }
  85372. function gXe(t, e = {}, n = []) {
  85373. const r = Ge(
  85374. pXe,
  85375. {}
  85376. ), { initialData: i = void 0, manual: a = !1, ready: o = !0, ...s } = {
  85377. ...r ?? {},
  85378. ...e ?? {}
  85379. }, l = {
  85380. manual: a,
  85381. ready: o,
  85382. initialData: i,
  85383. ...s
  85384. }, u = U(t), c = tn({
  85385. data: i,
  85386. loading: !1,
  85387. params: void 0,
  85388. error: void 0
  85389. }), f = (v, g) => {
  85390. g ? c[g] = v : vXe(v) && (c.data = v.data, c.loading = v.loading, c.error = v.error, c.params = v.params);
  85391. }, d = n.map((v) => {
  85392. var g;
  85393. return (g = v == null ? void 0 : v.onInit) == null ? void 0 : g.call(v, l);
  85394. }).filter(Boolean), h = new hXe(
  85395. u,
  85396. l,
  85397. f,
  85398. Object.assign({}, ...d, c)
  85399. );
  85400. h.options = l, h.pluginImpls = n.map((v) => v(h, l));
  85401. const p = L(() => tp(o) ? o.value : o);
  85402. if (ht(() => {
  85403. if (!a) {
  85404. const v = h.state.params || e.defaultParams || [];
  85405. p.value && h.options.refreshDeps === !0 && u.value && h.run(...v);
  85406. }
  85407. }), !a && h.options.refreshDeps !== !0) {
  85408. const v = h.state.params || e.defaultParams || [];
  85409. B(o) && h.run(...v);
  85410. }
  85411. return f0(() => {
  85412. h.cancel();
  85413. }), {
  85414. ...$S(c),
  85415. cancel: h.cancel.bind(h),
  85416. refresh: h.refresh.bind(h),
  85417. refreshAsync: h.refreshAsync.bind(h),
  85418. run: h.run.bind(h),
  85419. runAsync: h.runAsync.bind(h),
  85420. mutate: h.mutate.bind(h)
  85421. };
  85422. }
  85423. const mXe = (t, e) => function(r, i = {}, a = []) {
  85424. let o = t;
  85425. const s = e || [];
  85426. for (let l = s.length; l--; )
  85427. o = s[l](o);
  85428. return o(r, i, a);
  85429. };
  85430. function yXe(t, e, n) {
  85431. var r;
  85432. const i = (r = [
  85433. process.env.NODE_ENV === "development" ? ZUe : null,
  85434. BUe,
  85435. UUe,
  85436. qUe,
  85437. tXe,
  85438. uXe,
  85439. Oie,
  85440. FZe,
  85441. nXe
  85442. ]) == null ? void 0 : r.filter(Boolean);
  85443. return mXe(gXe, e == null ? void 0 : e.use)(t, e, [
  85444. ...i
  85445. ]);
  85446. }
  85447. /*! js-cookie v3.0.5 | MIT */
  85448. function Wb(t) {
  85449. for (var e = 1; e < arguments.length; e++) {
  85450. var n = arguments[e];
  85451. for (var r in n)
  85452. t[r] = n[r];
  85453. }
  85454. return t;
  85455. }
  85456. var bXe = {
  85457. read: function(t) {
  85458. return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
  85459. },
  85460. write: function(t) {
  85461. return encodeURIComponent(t).replace(
  85462. /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
  85463. decodeURIComponent
  85464. );
  85465. }
  85466. };
  85467. function UE(t, e) {
  85468. function n(i, a, o) {
  85469. if (!(typeof document > "u")) {
  85470. o = Wb({}, 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);
  85471. var s = "";
  85472. for (var l in o)
  85473. o[l] && (s += "; " + l, o[l] !== !0 && (s += "=" + o[l].split(";")[0]));
  85474. return document.cookie = i + "=" + t.write(a, i) + s;
  85475. }
  85476. }
  85477. function r(i) {
  85478. if (!(typeof document > "u" || arguments.length && !i)) {
  85479. for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
  85480. var l = a[s].split("="), u = l.slice(1).join("=");
  85481. try {
  85482. var c = decodeURIComponent(l[0]);
  85483. if (o[c] = t.read(u, c), i === c)
  85484. break;
  85485. } catch {
  85486. }
  85487. }
  85488. return i ? o[i] : o;
  85489. }
  85490. }
  85491. return Object.create(
  85492. {
  85493. set: n,
  85494. get: r,
  85495. remove: function(i, a) {
  85496. n(
  85497. i,
  85498. "",
  85499. Wb({}, a, {
  85500. expires: -1
  85501. })
  85502. );
  85503. },
  85504. withAttributes: function(i) {
  85505. return UE(this.converter, Wb({}, this.attributes, i));
  85506. },
  85507. withConverter: function(i) {
  85508. return UE(Wb({}, this.converter, i), this.attributes);
  85509. }
  85510. },
  85511. {
  85512. attributes: { value: Object.freeze(e) },
  85513. converter: { value: Object.freeze(t) }
  85514. }
  85515. );
  85516. }
  85517. UE(bXe, { path: "/" });
  85518. function _Xe() {
  85519. this.__data__ = [], this.size = 0;
  85520. }
  85521. var OXe = _Xe;
  85522. function SXe(t, e) {
  85523. return t === e || t !== t && e !== e;
  85524. }
  85525. var Cw = SXe, xXe = Cw;
  85526. function wXe(t, e) {
  85527. for (var n = t.length; n--; )
  85528. if (xXe(t[n][0], e))
  85529. return n;
  85530. return -1;
  85531. }
  85532. var Tw = wXe, CXe = Tw, TXe = Array.prototype, PXe = TXe.splice;
  85533. function $Xe(t) {
  85534. var e = this.__data__, n = CXe(e, t);
  85535. if (n < 0)
  85536. return !1;
  85537. var r = e.length - 1;
  85538. return n == r ? e.pop() : PXe.call(e, n, 1), --this.size, !0;
  85539. }
  85540. var AXe = $Xe, EXe = Tw;
  85541. function MXe(t) {
  85542. var e = this.__data__, n = EXe(e, t);
  85543. return n < 0 ? void 0 : e[n][1];
  85544. }
  85545. var IXe = MXe, DXe = Tw;
  85546. function RXe(t) {
  85547. return DXe(this.__data__, t) > -1;
  85548. }
  85549. var kXe = RXe, LXe = Tw;
  85550. function NXe(t, e) {
  85551. var n = this.__data__, r = LXe(n, t);
  85552. return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
  85553. }
  85554. var BXe = NXe, zXe = OXe, VXe = AXe, FXe = IXe, WXe = kXe, QXe = BXe;
  85555. function Ap(t) {
  85556. var e = -1, n = t == null ? 0 : t.length;
  85557. for (this.clear(); ++e < n; ) {
  85558. var r = t[e];
  85559. this.set(r[0], r[1]);
  85560. }
  85561. }
  85562. Ap.prototype.clear = zXe;
  85563. Ap.prototype.delete = VXe;
  85564. Ap.prototype.get = FXe;
  85565. Ap.prototype.has = WXe;
  85566. Ap.prototype.set = QXe;
  85567. var Pw = Ap, HXe = Pw;
  85568. function GXe() {
  85569. this.__data__ = new HXe(), this.size = 0;
  85570. }
  85571. var jXe = GXe;
  85572. function ZXe(t) {
  85573. var e = this.__data__, n = e.delete(t);
  85574. return this.size = e.size, n;
  85575. }
  85576. var UXe = ZXe;
  85577. function XXe(t) {
  85578. return this.__data__.get(t);
  85579. }
  85580. var YXe = XXe;
  85581. function qXe(t) {
  85582. return this.__data__.has(t);
  85583. }
  85584. var KXe = qXe, JXe = $p, eYe = go, tYe = "[object AsyncFunction]", nYe = "[object Function]", rYe = "[object GeneratorFunction]", iYe = "[object Proxy]";
  85585. function aYe(t) {
  85586. if (!eYe(t))
  85587. return !1;
  85588. var e = JXe(t);
  85589. return e == nYe || e == rYe || e == tYe || e == iYe;
  85590. }
  85591. var zL = aYe, oYe = mo, sYe = oYe["__core-js_shared__"], lYe = sYe, d$ = lYe, QQ = function() {
  85592. var t = /[^.]+$/.exec(d$ && d$.keys && d$.keys.IE_PROTO || "");
  85593. return t ? "Symbol(src)_1." + t : "";
  85594. }();
  85595. function uYe(t) {
  85596. return !!QQ && QQ in t;
  85597. }
  85598. var cYe = uYe, fYe = Function.prototype, dYe = fYe.toString;
  85599. function hYe(t) {
  85600. if (t != null) {
  85601. try {
  85602. return dYe.call(t);
  85603. } catch {
  85604. }
  85605. try {
  85606. return t + "";
  85607. } catch {
  85608. }
  85609. }
  85610. return "";
  85611. }
  85612. var Cie = hYe, pYe = zL, vYe = cYe, gYe = go, mYe = Cie, yYe = /[\\^$.*+?()[\]{}|]/g, bYe = /^\[object .+?Constructor\]$/, _Ye = Function.prototype, OYe = Object.prototype, SYe = _Ye.toString, xYe = OYe.hasOwnProperty, wYe = RegExp(
  85613. "^" + SYe.call(xYe).replace(yYe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  85614. );
  85615. function CYe(t) {
  85616. if (!gYe(t) || vYe(t))
  85617. return !1;
  85618. var e = pYe(t) ? wYe : bYe;
  85619. return e.test(mYe(t));
  85620. }
  85621. var TYe = CYe;
  85622. function PYe(t, e) {
  85623. return t == null ? void 0 : t[e];
  85624. }
  85625. var $Ye = PYe, AYe = TYe, EYe = $Ye;
  85626. function MYe(t, e) {
  85627. var n = EYe(t, e);
  85628. return AYe(n) ? n : void 0;
  85629. }
  85630. var Hf = MYe, IYe = Hf, DYe = mo, RYe = IYe(DYe, "Map"), VL = RYe, kYe = Hf, LYe = kYe(Object, "create"), $w = LYe, HQ = $w;
  85631. function NYe() {
  85632. this.__data__ = HQ ? HQ(null) : {}, this.size = 0;
  85633. }
  85634. var BYe = NYe;
  85635. function zYe(t) {
  85636. var e = this.has(t) && delete this.__data__[t];
  85637. return this.size -= e ? 1 : 0, e;
  85638. }
  85639. var VYe = zYe, FYe = $w, WYe = "__lodash_hash_undefined__", QYe = Object.prototype, HYe = QYe.hasOwnProperty;
  85640. function GYe(t) {
  85641. var e = this.__data__;
  85642. if (FYe) {
  85643. var n = e[t];
  85644. return n === WYe ? void 0 : n;
  85645. }
  85646. return HYe.call(e, t) ? e[t] : void 0;
  85647. }
  85648. var jYe = GYe, ZYe = $w, UYe = Object.prototype, XYe = UYe.hasOwnProperty;
  85649. function YYe(t) {
  85650. var e = this.__data__;
  85651. return ZYe ? e[t] !== void 0 : XYe.call(e, t);
  85652. }
  85653. var qYe = YYe, KYe = $w, JYe = "__lodash_hash_undefined__";
  85654. function eqe(t, e) {
  85655. var n = this.__data__;
  85656. return this.size += this.has(t) ? 0 : 1, n[t] = KYe && e === void 0 ? JYe : e, this;
  85657. }
  85658. var tqe = eqe, nqe = BYe, rqe = VYe, iqe = jYe, aqe = qYe, oqe = tqe;
  85659. function Ep(t) {
  85660. var e = -1, n = t == null ? 0 : t.length;
  85661. for (this.clear(); ++e < n; ) {
  85662. var r = t[e];
  85663. this.set(r[0], r[1]);
  85664. }
  85665. }
  85666. Ep.prototype.clear = nqe;
  85667. Ep.prototype.delete = rqe;
  85668. Ep.prototype.get = iqe;
  85669. Ep.prototype.has = aqe;
  85670. Ep.prototype.set = oqe;
  85671. var sqe = Ep, GQ = sqe, lqe = Pw, uqe = VL;
  85672. function cqe() {
  85673. this.size = 0, this.__data__ = {
  85674. hash: new GQ(),
  85675. map: new (uqe || lqe)(),
  85676. string: new GQ()
  85677. };
  85678. }
  85679. var fqe = cqe;
  85680. function dqe(t) {
  85681. var e = typeof t;
  85682. return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
  85683. }
  85684. var hqe = dqe, pqe = hqe;
  85685. function vqe(t, e) {
  85686. var n = t.__data__;
  85687. return pqe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
  85688. }
  85689. var Aw = vqe, gqe = Aw;
  85690. function mqe(t) {
  85691. var e = gqe(this, t).delete(t);
  85692. return this.size -= e ? 1 : 0, e;
  85693. }
  85694. var yqe = mqe, bqe = Aw;
  85695. function _qe(t) {
  85696. return bqe(this, t).get(t);
  85697. }
  85698. var Oqe = _qe, Sqe = Aw;
  85699. function xqe(t) {
  85700. return Sqe(this, t).has(t);
  85701. }
  85702. var wqe = xqe, Cqe = Aw;
  85703. function Tqe(t, e) {
  85704. var n = Cqe(this, t), r = n.size;
  85705. return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
  85706. }
  85707. var Pqe = Tqe, $qe = fqe, Aqe = yqe, Eqe = Oqe, Mqe = wqe, Iqe = Pqe;
  85708. function Mp(t) {
  85709. var e = -1, n = t == null ? 0 : t.length;
  85710. for (this.clear(); ++e < n; ) {
  85711. var r = t[e];
  85712. this.set(r[0], r[1]);
  85713. }
  85714. }
  85715. Mp.prototype.clear = $qe;
  85716. Mp.prototype.delete = Aqe;
  85717. Mp.prototype.get = Eqe;
  85718. Mp.prototype.has = Mqe;
  85719. Mp.prototype.set = Iqe;
  85720. var Tie = Mp, Dqe = Pw, Rqe = VL, kqe = Tie, Lqe = 200;
  85721. function Nqe(t, e) {
  85722. var n = this.__data__;
  85723. if (n instanceof Dqe) {
  85724. var r = n.__data__;
  85725. if (!Rqe || r.length < Lqe - 1)
  85726. return r.push([t, e]), this.size = ++n.size, this;
  85727. n = this.__data__ = new kqe(r);
  85728. }
  85729. return n.set(t, e), this.size = n.size, this;
  85730. }
  85731. var Bqe = Nqe, zqe = Pw, Vqe = jXe, Fqe = UXe, Wqe = YXe, Qqe = KXe, Hqe = Bqe;
  85732. function Ip(t) {
  85733. var e = this.__data__ = new zqe(t);
  85734. this.size = e.size;
  85735. }
  85736. Ip.prototype.clear = Vqe;
  85737. Ip.prototype.delete = Fqe;
  85738. Ip.prototype.get = Wqe;
  85739. Ip.prototype.has = Qqe;
  85740. Ip.prototype.set = Hqe;
  85741. var Pie = Ip;
  85742. function Gqe(t, e) {
  85743. for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
  85744. ;
  85745. return t;
  85746. }
  85747. var jqe = Gqe, Zqe = Hf, Uqe = function() {
  85748. try {
  85749. var t = Zqe(Object, "defineProperty");
  85750. return t({}, "", {}), t;
  85751. } catch {
  85752. }
  85753. }(), $ie = Uqe, jQ = $ie;
  85754. function Xqe(t, e, n) {
  85755. e == "__proto__" && jQ ? jQ(t, e, {
  85756. configurable: !0,
  85757. enumerable: !0,
  85758. value: n,
  85759. writable: !0
  85760. }) : t[e] = n;
  85761. }
  85762. var FL = Xqe, Yqe = FL, qqe = Cw, Kqe = Object.prototype, Jqe = Kqe.hasOwnProperty;
  85763. function eKe(t, e, n) {
  85764. var r = t[e];
  85765. (!(Jqe.call(t, e) && qqe(r, n)) || n === void 0 && !(e in t)) && Yqe(t, e, n);
  85766. }
  85767. var Aie = eKe, tKe = Aie, nKe = FL;
  85768. function rKe(t, e, n, r) {
  85769. var i = !n;
  85770. n || (n = {});
  85771. for (var a = -1, o = e.length; ++a < o; ) {
  85772. var s = e[a], l = r ? r(n[s], t[s], s, n, t) : void 0;
  85773. l === void 0 && (l = t[s]), i ? nKe(n, s, l) : tKe(n, s, l);
  85774. }
  85775. return n;
  85776. }
  85777. var ty = rKe;
  85778. function iKe(t, e) {
  85779. for (var n = -1, r = Array(t); ++n < t; )
  85780. r[n] = e(n);
  85781. return r;
  85782. }
  85783. var aKe = iKe, oKe = $p, sKe = Au, lKe = "[object Arguments]";
  85784. function uKe(t) {
  85785. return sKe(t) && oKe(t) == lKe;
  85786. }
  85787. var cKe = uKe, ZQ = cKe, fKe = Au, Eie = Object.prototype, dKe = Eie.hasOwnProperty, hKe = Eie.propertyIsEnumerable, pKe = ZQ(/* @__PURE__ */ function() {
  85788. return arguments;
  85789. }()) ? ZQ : function(t) {
  85790. return fKe(t) && dKe.call(t, "callee") && !hKe.call(t, "callee");
  85791. }, Mie = pKe, vKe = Array.isArray, Ew = vKe, qO = { exports: {} };
  85792. function gKe() {
  85793. return !1;
  85794. }
  85795. var mKe = gKe;
  85796. qO.exports;
  85797. (function(t, e) {
  85798. var n = mo, r = mKe, 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;
  85799. t.exports = u;
  85800. })(qO, qO.exports);
  85801. var WL = qO.exports, yKe = 9007199254740991, bKe = /^(?:0|[1-9]\d*)$/;
  85802. function _Ke(t, e) {
  85803. var n = typeof t;
  85804. return e = e ?? yKe, !!e && (n == "number" || n != "symbol" && bKe.test(t)) && t > -1 && t % 1 == 0 && t < e;
  85805. }
  85806. var Iie = _Ke, OKe = 9007199254740991;
  85807. function SKe(t) {
  85808. return typeof t == "number" && t > -1 && t % 1 == 0 && t <= OKe;
  85809. }
  85810. var Die = SKe, xKe = $p, wKe = Die, CKe = Au, TKe = "[object Arguments]", PKe = "[object Array]", $Ke = "[object Boolean]", AKe = "[object Date]", EKe = "[object Error]", MKe = "[object Function]", IKe = "[object Map]", DKe = "[object Number]", RKe = "[object Object]", kKe = "[object RegExp]", LKe = "[object Set]", NKe = "[object String]", BKe = "[object WeakMap]", zKe = "[object ArrayBuffer]", VKe = "[object DataView]", FKe = "[object Float32Array]", WKe = "[object Float64Array]", QKe = "[object Int8Array]", HKe = "[object Int16Array]", GKe = "[object Int32Array]", jKe = "[object Uint8Array]", ZKe = "[object Uint8ClampedArray]", UKe = "[object Uint16Array]", XKe = "[object Uint32Array]", un = {};
  85811. un[FKe] = un[WKe] = un[QKe] = un[HKe] = un[GKe] = un[jKe] = un[ZKe] = un[UKe] = un[XKe] = !0;
  85812. un[TKe] = un[PKe] = un[zKe] = un[$Ke] = un[VKe] = un[AKe] = un[EKe] = un[MKe] = un[IKe] = un[DKe] = un[RKe] = un[kKe] = un[LKe] = un[NKe] = un[BKe] = !1;
  85813. function YKe(t) {
  85814. return CKe(t) && wKe(t.length) && !!un[xKe(t)];
  85815. }
  85816. var qKe = YKe;
  85817. function KKe(t) {
  85818. return function(e) {
  85819. return t(e);
  85820. };
  85821. }
  85822. var QL = KKe, KO = { exports: {} };
  85823. KO.exports;
  85824. (function(t, e) {
  85825. var n = Sie, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a && n.process, s = function() {
  85826. try {
  85827. var l = i && i.require && i.require("util").types;
  85828. return l || o && o.binding && o.binding("util");
  85829. } catch {
  85830. }
  85831. }();
  85832. t.exports = s;
  85833. })(KO, KO.exports);
  85834. var HL = KO.exports, JKe = qKe, eJe = QL, UQ = HL, XQ = UQ && UQ.isTypedArray, tJe = XQ ? eJe(XQ) : JKe, Rie = tJe, nJe = aKe, rJe = Mie, iJe = Ew, aJe = WL, oJe = Iie, sJe = Rie, lJe = Object.prototype, uJe = lJe.hasOwnProperty;
  85835. function cJe(t, e) {
  85836. var n = iJe(t), r = !n && rJe(t), i = !n && !r && aJe(t), a = !n && !r && !i && sJe(t), o = n || r || i || a, s = o ? nJe(t.length, String) : [], l = s.length;
  85837. for (var u in t)
  85838. (e || uJe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
  85839. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  85840. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  85841. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
  85842. oJe(u, l))) && s.push(u);
  85843. return s;
  85844. }
  85845. var kie = cJe, fJe = Object.prototype;
  85846. function dJe(t) {
  85847. var e = t && t.constructor, n = typeof e == "function" && e.prototype || fJe;
  85848. return t === n;
  85849. }
  85850. var GL = dJe;
  85851. function hJe(t, e) {
  85852. return function(n) {
  85853. return t(e(n));
  85854. };
  85855. }
  85856. var Lie = hJe, pJe = Lie, vJe = pJe(Object.keys, Object), gJe = vJe, mJe = GL, yJe = gJe, bJe = Object.prototype, _Je = bJe.hasOwnProperty;
  85857. function OJe(t) {
  85858. if (!mJe(t))
  85859. return yJe(t);
  85860. var e = [];
  85861. for (var n in Object(t))
  85862. _Je.call(t, n) && n != "constructor" && e.push(n);
  85863. return e;
  85864. }
  85865. var SJe = OJe, xJe = zL, wJe = Die;
  85866. function CJe(t) {
  85867. return t != null && wJe(t.length) && !xJe(t);
  85868. }
  85869. var Mw = CJe, TJe = kie, PJe = SJe, $Je = Mw;
  85870. function AJe(t) {
  85871. return $Je(t) ? TJe(t) : PJe(t);
  85872. }
  85873. var jL = AJe, EJe = ty, MJe = jL;
  85874. function IJe(t, e) {
  85875. return t && EJe(e, MJe(e), t);
  85876. }
  85877. var DJe = IJe;
  85878. function RJe(t) {
  85879. var e = [];
  85880. if (t != null)
  85881. for (var n in Object(t))
  85882. e.push(n);
  85883. return e;
  85884. }
  85885. var kJe = RJe, LJe = go, NJe = GL, BJe = kJe, zJe = Object.prototype, VJe = zJe.hasOwnProperty;
  85886. function FJe(t) {
  85887. if (!LJe(t))
  85888. return BJe(t);
  85889. var e = NJe(t), n = [];
  85890. for (var r in t)
  85891. r == "constructor" && (e || !VJe.call(t, r)) || n.push(r);
  85892. return n;
  85893. }
  85894. var WJe = FJe, QJe = kie, HJe = WJe, GJe = Mw;
  85895. function jJe(t) {
  85896. return GJe(t) ? QJe(t, !0) : HJe(t);
  85897. }
  85898. var ny = jJe, ZJe = ty, UJe = ny;
  85899. function XJe(t, e) {
  85900. return t && ZJe(e, UJe(e), t);
  85901. }
  85902. var YJe = XJe, JO = { exports: {} };
  85903. JO.exports;
  85904. (function(t, e) {
  85905. var n = mo, 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;
  85906. function l(u, c) {
  85907. if (c)
  85908. return u.slice();
  85909. var f = u.length, d = s ? s(f) : new u.constructor(f);
  85910. return u.copy(d), d;
  85911. }
  85912. t.exports = l;
  85913. })(JO, JO.exports);
  85914. var Nie = JO.exports;
  85915. function qJe(t, e) {
  85916. var n = -1, r = t.length;
  85917. for (e || (e = Array(r)); ++n < r; )
  85918. e[n] = t[n];
  85919. return e;
  85920. }
  85921. var Bie = qJe;
  85922. function KJe(t, e) {
  85923. for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
  85924. var o = t[n];
  85925. e(o, n, t) && (a[i++] = o);
  85926. }
  85927. return a;
  85928. }
  85929. var JJe = KJe;
  85930. function eet() {
  85931. return [];
  85932. }
  85933. var zie = eet, tet = JJe, net = zie, ret = Object.prototype, iet = ret.propertyIsEnumerable, YQ = Object.getOwnPropertySymbols, aet = YQ ? function(t) {
  85934. return t == null ? [] : (t = Object(t), tet(YQ(t), function(e) {
  85935. return iet.call(t, e);
  85936. }));
  85937. } : net, ZL = aet, oet = ty, set = ZL;
  85938. function uet(t, e) {
  85939. return oet(t, set(t), e);
  85940. }
  85941. var cet = uet;
  85942. function fet(t, e) {
  85943. for (var n = -1, r = e.length, i = t.length; ++n < r; )
  85944. t[i + n] = e[n];
  85945. return t;
  85946. }
  85947. var Vie = fet, det = Lie, het = det(Object.getPrototypeOf, Object), UL = het, pet = Vie, vet = UL, get = ZL, met = zie, yet = Object.getOwnPropertySymbols, bet = yet ? function(t) {
  85948. for (var e = []; t; )
  85949. pet(e, get(t)), t = vet(t);
  85950. return e;
  85951. } : met, Fie = bet, _et = ty, Oet = Fie;
  85952. function xet(t, e) {
  85953. return _et(t, Oet(t), e);
  85954. }
  85955. var wet = xet, Cet = Vie, Tet = Ew;
  85956. function Pet(t, e, n) {
  85957. var r = e(t);
  85958. return Tet(t) ? r : Cet(r, n(t));
  85959. }
  85960. var Wie = Pet, $et = Wie, Aet = ZL, Eet = jL;
  85961. function Met(t) {
  85962. return $et(t, Eet, Aet);
  85963. }
  85964. var Iet = Met, Det = Wie, Ret = Fie, ket = ny;
  85965. function Let(t) {
  85966. return Det(t, ket, Ret);
  85967. }
  85968. var Net = Let, Bet = Hf, zet = mo, Vet = Bet(zet, "DataView"), Fet = Vet, Wet = Hf, Qet = mo, Het = Wet(Qet, "Promise"), Get = Het, jet = Hf, Zet = mo, Uet = jet(Zet, "Set"), Xet = Uet, Yet = Hf, qet = mo, Ket = Yet(qet, "WeakMap"), Jet = Ket, XE = Fet, YE = VL, qE = Get, KE = Xet, JE = Jet, Qie = $p, Dp = Cie, qQ = "[object Map]", ett = "[object Object]", KQ = "[object Promise]", JQ = "[object Set]", eH = "[object WeakMap]", tH = "[object DataView]", ttt = Dp(XE), ntt = Dp(YE), rtt = Dp(qE), itt = Dp(KE), att = Dp(JE), yc = Qie;
  85969. (XE && yc(new XE(new ArrayBuffer(1))) != tH || YE && yc(new YE()) != qQ || qE && yc(qE.resolve()) != KQ || KE && yc(new KE()) != JQ || JE && yc(new JE()) != eH) && (yc = function(t) {
  85970. var e = Qie(t), n = e == ett ? t.constructor : void 0, r = n ? Dp(n) : "";
  85971. if (r)
  85972. switch (r) {
  85973. case ttt:
  85974. return tH;
  85975. case ntt:
  85976. return qQ;
  85977. case rtt:
  85978. return KQ;
  85979. case itt:
  85980. return JQ;
  85981. case att:
  85982. return eH;
  85983. }
  85984. return e;
  85985. });
  85986. var XL = yc, ott = Object.prototype, stt = ott.hasOwnProperty;
  85987. function ltt(t) {
  85988. var e = t.length, n = new t.constructor(e);
  85989. return e && typeof t[0] == "string" && stt.call(t, "index") && (n.index = t.index, n.input = t.input), n;
  85990. }
  85991. var utt = ltt, ctt = mo, ftt = ctt.Uint8Array, dtt = ftt, nH = dtt;
  85992. function htt(t) {
  85993. var e = new t.constructor(t.byteLength);
  85994. return new nH(e).set(new nH(t)), e;
  85995. }
  85996. var YL = htt, ptt = YL;
  85997. function vtt(t, e) {
  85998. var n = e ? ptt(t.buffer) : t.buffer;
  85999. return new t.constructor(n, t.byteOffset, t.byteLength);
  86000. }
  86001. var gtt = vtt, mtt = /\w*$/;
  86002. function ytt(t) {
  86003. var e = new t.constructor(t.source, mtt.exec(t));
  86004. return e.lastIndex = t.lastIndex, e;
  86005. }
  86006. var btt = ytt, rH = ww, iH = rH ? rH.prototype : void 0, aH = iH ? iH.valueOf : void 0;
  86007. function _tt(t) {
  86008. return aH ? Object(aH.call(t)) : {};
  86009. }
  86010. var Ott = _tt, Stt = YL;
  86011. function xtt(t, e) {
  86012. var n = e ? Stt(t.buffer) : t.buffer;
  86013. return new t.constructor(n, t.byteOffset, t.length);
  86014. }
  86015. var Hie = xtt, wtt = YL, Ctt = gtt, Ttt = btt, Ptt = Ott, $tt = Hie, Att = "[object Boolean]", Ett = "[object Date]", Mtt = "[object Map]", Itt = "[object Number]", Dtt = "[object RegExp]", Rtt = "[object Set]", ktt = "[object String]", Ltt = "[object Symbol]", Ntt = "[object ArrayBuffer]", Btt = "[object DataView]", ztt = "[object Float32Array]", Vtt = "[object Float64Array]", Ftt = "[object Int8Array]", Wtt = "[object Int16Array]", Qtt = "[object Int32Array]", Htt = "[object Uint8Array]", Gtt = "[object Uint8ClampedArray]", jtt = "[object Uint16Array]", Ztt = "[object Uint32Array]";
  86016. function Utt(t, e, n) {
  86017. var r = t.constructor;
  86018. switch (e) {
  86019. case Ntt:
  86020. return wtt(t);
  86021. case Att:
  86022. case Ett:
  86023. return new r(+t);
  86024. case Btt:
  86025. return Ctt(t, n);
  86026. case ztt:
  86027. case Vtt:
  86028. case Ftt:
  86029. case Wtt:
  86030. case Qtt:
  86031. case Htt:
  86032. case Gtt:
  86033. case jtt:
  86034. case Ztt:
  86035. return $tt(t, n);
  86036. case Mtt:
  86037. return new r();
  86038. case Itt:
  86039. case ktt:
  86040. return new r(t);
  86041. case Dtt:
  86042. return Ttt(t);
  86043. case Rtt:
  86044. return new r();
  86045. case Ltt:
  86046. return Ptt(t);
  86047. }
  86048. }
  86049. var Xtt = Utt, Ytt = go, oH = Object.create, qtt = /* @__PURE__ */ function() {
  86050. function t() {
  86051. }
  86052. return function(e) {
  86053. if (!Ytt(e))
  86054. return {};
  86055. if (oH)
  86056. return oH(e);
  86057. t.prototype = e;
  86058. var n = new t();
  86059. return t.prototype = void 0, n;
  86060. };
  86061. }(), Ktt = qtt, Jtt = Ktt, ent = UL, tnt = GL;
  86062. function nnt(t) {
  86063. return typeof t.constructor == "function" && !tnt(t) ? Jtt(ent(t)) : {};
  86064. }
  86065. var Gie = nnt, rnt = XL, int = Au, ant = "[object Map]";
  86066. function ont(t) {
  86067. return int(t) && rnt(t) == ant;
  86068. }
  86069. var snt = ont, lnt = snt, unt = QL, sH = HL, lH = sH && sH.isMap, cnt = lH ? unt(lH) : lnt, fnt = cnt, dnt = XL, hnt = Au, pnt = "[object Set]";
  86070. function vnt(t) {
  86071. return hnt(t) && dnt(t) == pnt;
  86072. }
  86073. var gnt = vnt, mnt = gnt, ynt = QL, uH = HL, cH = uH && uH.isSet, bnt = cH ? ynt(cH) : mnt, _nt = bnt, Ont = Pie, Snt = jqe, xnt = Aie, wnt = DJe, Cnt = YJe, Tnt = Nie, Pnt = Bie, $nt = cet, Ant = wet, Ent = Iet, Mnt = Net, Int = XL, Dnt = utt, Rnt = Xtt, knt = Gie, Lnt = Ew, Nnt = WL, Bnt = fnt, znt = go, Vnt = _nt, Fnt = jL, Wnt = ny, Qnt = 1, Hnt = 2, Gnt = 4, jie = "[object Arguments]", jnt = "[object Array]", Znt = "[object Boolean]", Unt = "[object Date]", Xnt = "[object Error]", Zie = "[object Function]", Ynt = "[object GeneratorFunction]", qnt = "[object Map]", Knt = "[object Number]", Uie = "[object Object]", Jnt = "[object RegExp]", ert = "[object Set]", trt = "[object String]", nrt = "[object Symbol]", rrt = "[object WeakMap]", irt = "[object ArrayBuffer]", art = "[object DataView]", ort = "[object Float32Array]", srt = "[object Float64Array]", lrt = "[object Int8Array]", urt = "[object Int16Array]", crt = "[object Int32Array]", frt = "[object Uint8Array]", drt = "[object Uint8ClampedArray]", hrt = "[object Uint16Array]", prt = "[object Uint32Array]", an = {};
  86074. an[jie] = an[jnt] = an[irt] = an[art] = an[Znt] = an[Unt] = an[ort] = an[srt] = an[lrt] = an[urt] = an[crt] = an[qnt] = an[Knt] = an[Uie] = an[Jnt] = an[ert] = an[trt] = an[nrt] = an[frt] = an[drt] = an[hrt] = an[prt] = !0;
  86075. an[Xnt] = an[Zie] = an[rrt] = !1;
  86076. function t1(t, e, n, r, i, a) {
  86077. var o, s = e & Qnt, l = e & Hnt, u = e & Gnt;
  86078. if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
  86079. return o;
  86080. if (!znt(t))
  86081. return t;
  86082. var c = Lnt(t);
  86083. if (c) {
  86084. if (o = Dnt(t), !s)
  86085. return Pnt(t, o);
  86086. } else {
  86087. var f = Int(t), d = f == Zie || f == Ynt;
  86088. if (Nnt(t))
  86089. return Tnt(t, s);
  86090. if (f == Uie || f == jie || d && !i) {
  86091. if (o = l || d ? {} : knt(t), !s)
  86092. return l ? Ant(t, Cnt(o, t)) : $nt(t, wnt(o, t));
  86093. } else {
  86094. if (!an[f])
  86095. return i ? t : {};
  86096. o = Rnt(t, f, s);
  86097. }
  86098. }
  86099. a || (a = new Ont());
  86100. var h = a.get(t);
  86101. if (h)
  86102. return h;
  86103. a.set(t, o), Vnt(t) ? t.forEach(function(g) {
  86104. o.add(t1(g, e, n, g, t, a));
  86105. }) : Bnt(t) && t.forEach(function(g, m) {
  86106. o.set(m, t1(g, e, n, m, t, a));
  86107. });
  86108. var p = u ? l ? Mnt : Ent : l ? Wnt : Fnt, v = c ? void 0 : p(t);
  86109. return Snt(v || t, function(g, m) {
  86110. v && (m = g, g = t[m]), xnt(o, m, t1(g, e, n, m, t, a));
  86111. }), o;
  86112. }
  86113. var vrt = t1, grt = vrt, mrt = 1, yrt = 4;
  86114. function brt(t) {
  86115. return grt(t, mrt | yrt);
  86116. }
  86117. var _rt = brt;
  86118. const fH = /* @__PURE__ */ vx(_rt);
  86119. var Ort = Object.defineProperty, Srt = (t, e, n) => e in t ? Ort(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, uc = (t, e, n) => (Srt(t, typeof e != "symbol" ? e + "" : e, n), n);
  86120. class xrt {
  86121. constructor() {
  86122. uc(this, "subscriptions", /* @__PURE__ */ new Map()), uc(this, "emitEffectCache", /* @__PURE__ */ new Map()), uc(this, "useSubscription", (e, n) => {
  86123. const r = U();
  86124. ht((i) => {
  86125. var a, o;
  86126. r.value = n;
  86127. function s(u) {
  86128. r.value && r.value(u);
  86129. }
  86130. const l = (o = (a = this.subscriptions) == null ? void 0 : a.get(e)) != null ? o : [];
  86131. l.push(s), this.subscriptions.set(e, l), this.emitEffect(e), i(() => {
  86132. this.subscriptions.delete(e);
  86133. });
  86134. });
  86135. }), uc(this, "emit", (e, ...n) => {
  86136. if (typeof e == "string" || typeof e == "number") {
  86137. const r = this.subscriptions.get(e);
  86138. r == null || r.forEach((i) => {
  86139. i == null || i({
  86140. params: fH(n),
  86141. event: e
  86142. });
  86143. }), this.emitEffectCache.set(e, {
  86144. params: fH(n),
  86145. event: e
  86146. });
  86147. } else
  86148. throw new TypeError("event must be string or number !");
  86149. }), uc(this, "emitEffect", (e) => {
  86150. const n = this.emitEffectCache.get(e), r = this.subscriptions.get(e);
  86151. n && (r == null || r.forEach((i) => {
  86152. i == null || i({
  86153. ...n
  86154. });
  86155. }));
  86156. }), uc(this, "removeListener", (e) => {
  86157. this.subscriptions.delete(e);
  86158. }), uc(this, "clear", () => {
  86159. this.subscriptions.clear();
  86160. }), this.clear();
  86161. }
  86162. }
  86163. new xrt();
  86164. var wrt = { exports: {} };
  86165. /*!
  86166. * screenfull
  86167. * v5.2.0 - 2021-11-03
  86168. * (c) Sindre Sorhus; MIT License
  86169. */
  86170. (function(t) {
  86171. (function() {
  86172. var e = typeof window < "u" && typeof window.document < "u" ? window.document : {}, n = t.exports, r = function() {
  86173. for (var o, s = [
  86174. [
  86175. "requestFullscreen",
  86176. "exitFullscreen",
  86177. "fullscreenElement",
  86178. "fullscreenEnabled",
  86179. "fullscreenchange",
  86180. "fullscreenerror"
  86181. ],
  86182. // New WebKit
  86183. [
  86184. "webkitRequestFullscreen",
  86185. "webkitExitFullscreen",
  86186. "webkitFullscreenElement",
  86187. "webkitFullscreenEnabled",
  86188. "webkitfullscreenchange",
  86189. "webkitfullscreenerror"
  86190. ],
  86191. // Old WebKit
  86192. [
  86193. "webkitRequestFullScreen",
  86194. "webkitCancelFullScreen",
  86195. "webkitCurrentFullScreenElement",
  86196. "webkitCancelFullScreen",
  86197. "webkitfullscreenchange",
  86198. "webkitfullscreenerror"
  86199. ],
  86200. [
  86201. "mozRequestFullScreen",
  86202. "mozCancelFullScreen",
  86203. "mozFullScreenElement",
  86204. "mozFullScreenEnabled",
  86205. "mozfullscreenchange",
  86206. "mozfullscreenerror"
  86207. ],
  86208. [
  86209. "msRequestFullscreen",
  86210. "msExitFullscreen",
  86211. "msFullscreenElement",
  86212. "msFullscreenEnabled",
  86213. "MSFullscreenChange",
  86214. "MSFullscreenError"
  86215. ]
  86216. ], l = 0, u = s.length, c = {}; l < u; l++)
  86217. if (o = s[l], o && o[1] in e) {
  86218. for (l = 0; l < o.length; l++)
  86219. c[s[0][l]] = o[l];
  86220. return c;
  86221. }
  86222. return !1;
  86223. }(), i = {
  86224. change: r.fullscreenchange,
  86225. error: r.fullscreenerror
  86226. }, a = {
  86227. request: function(o, s) {
  86228. return new Promise((function(l, u) {
  86229. var c = (function() {
  86230. this.off("change", c), l();
  86231. }).bind(this);
  86232. this.on("change", c), o = o || e.documentElement;
  86233. var f = o[r.requestFullscreen](s);
  86234. f instanceof Promise && f.then(c).catch(u);
  86235. }).bind(this));
  86236. },
  86237. exit: function() {
  86238. return new Promise((function(o, s) {
  86239. if (!this.isFullscreen) {
  86240. o();
  86241. return;
  86242. }
  86243. var l = (function() {
  86244. this.off("change", l), o();
  86245. }).bind(this);
  86246. this.on("change", l);
  86247. var u = e[r.exitFullscreen]();
  86248. u instanceof Promise && u.then(l).catch(s);
  86249. }).bind(this));
  86250. },
  86251. toggle: function(o, s) {
  86252. return this.isFullscreen ? this.exit() : this.request(o, s);
  86253. },
  86254. onchange: function(o) {
  86255. this.on("change", o);
  86256. },
  86257. onerror: function(o) {
  86258. this.on("error", o);
  86259. },
  86260. on: function(o, s) {
  86261. var l = i[o];
  86262. l && e.addEventListener(l, s, !1);
  86263. },
  86264. off: function(o, s) {
  86265. var l = i[o];
  86266. l && e.removeEventListener(l, s, !1);
  86267. },
  86268. raw: r
  86269. };
  86270. if (!r) {
  86271. n ? t.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 };
  86272. return;
  86273. }
  86274. Object.defineProperties(a, {
  86275. isFullscreen: {
  86276. get: function() {
  86277. return !!e[r.fullscreenElement];
  86278. }
  86279. },
  86280. element: {
  86281. enumerable: !0,
  86282. get: function() {
  86283. return e[r.fullscreenElement];
  86284. }
  86285. },
  86286. isEnabled: {
  86287. enumerable: !0,
  86288. get: function() {
  86289. return !!e[r.fullscreenEnabled];
  86290. }
  86291. }
  86292. }), n ? t.exports = a : window.screenfull = a;
  86293. })();
  86294. })(wrt);
  86295. var Crt = "__lodash_hash_undefined__";
  86296. function Trt(t) {
  86297. return this.__data__.set(t, Crt), this;
  86298. }
  86299. var Prt = Trt;
  86300. function $rt(t) {
  86301. return this.__data__.has(t);
  86302. }
  86303. var Art = $rt, Ert = Tie, Mrt = Prt, Irt = Art;
  86304. function eM(t) {
  86305. var e = -1, n = t == null ? 0 : t.length;
  86306. for (this.__data__ = new Ert(); ++e < n; )
  86307. this.add(t[e]);
  86308. }
  86309. eM.prototype.add = eM.prototype.push = Mrt;
  86310. eM.prototype.has = Irt;
  86311. var dH = ww, hH = dH ? dH.prototype : void 0;
  86312. hH && hH.valueOf;
  86313. var Drt = FL, Rrt = Cw;
  86314. function krt(t, e, n) {
  86315. (n !== void 0 && !Rrt(t[e], n) || n === void 0 && !(e in t)) && Drt(t, e, n);
  86316. }
  86317. var Xie = krt;
  86318. function Lrt(t) {
  86319. return function(e, n, r) {
  86320. for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
  86321. var l = o[t ? s : ++i];
  86322. if (n(a[l], l, a) === !1)
  86323. break;
  86324. }
  86325. return e;
  86326. };
  86327. }
  86328. var Nrt = Lrt, Brt = Nrt, zrt = Brt(), Vrt = zrt, Frt = Mw, Wrt = Au;
  86329. function Qrt(t) {
  86330. return Wrt(t) && Frt(t);
  86331. }
  86332. var Hrt = Qrt, Grt = $p, jrt = UL, Zrt = Au, Urt = "[object Object]", Xrt = Function.prototype, Yrt = Object.prototype, Yie = Xrt.toString, qrt = Yrt.hasOwnProperty, Krt = Yie.call(Object);
  86333. function Jrt(t) {
  86334. if (!Zrt(t) || Grt(t) != Urt)
  86335. return !1;
  86336. var e = jrt(t);
  86337. if (e === null)
  86338. return !0;
  86339. var n = qrt.call(e, "constructor") && e.constructor;
  86340. return typeof n == "function" && n instanceof n && Yie.call(n) == Krt;
  86341. }
  86342. var eit = Jrt;
  86343. function tit(t, e) {
  86344. if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
  86345. return t[e];
  86346. }
  86347. var qie = tit, nit = ty, rit = ny;
  86348. function iit(t) {
  86349. return nit(t, rit(t));
  86350. }
  86351. var ait = iit, pH = Xie, oit = Nie, sit = Hie, lit = Bie, uit = Gie, vH = Mie, gH = Ew, cit = Hrt, fit = WL, dit = zL, hit = go, pit = eit, vit = Rie, mH = qie, git = ait;
  86352. function mit(t, e, n, r, i, a, o) {
  86353. var s = mH(t, n), l = mH(e, n), u = o.get(l);
  86354. if (u) {
  86355. pH(t, n, u);
  86356. return;
  86357. }
  86358. var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  86359. if (f) {
  86360. var d = gH(l), h = !d && fit(l), p = !d && !h && vit(l);
  86361. c = l, d || h || p ? gH(s) ? c = s : cit(s) ? c = lit(s) : h ? (f = !1, c = oit(l, !0)) : p ? (f = !1, c = sit(l, !0)) : c = [] : pit(l) || vH(l) ? (c = s, vH(s) ? c = git(s) : (!hit(s) || dit(s)) && (c = uit(l))) : f = !1;
  86362. }
  86363. f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), pH(t, n, c);
  86364. }
  86365. var yit = mit, bit = Pie, _it = Xie, Oit = Vrt, Sit = yit, xit = go, wit = ny, Cit = qie;
  86366. function Kie(t, e, n, r, i) {
  86367. t !== e && Oit(e, function(a, o) {
  86368. if (i || (i = new bit()), xit(a))
  86369. Sit(t, e, o, n, Kie, r, i);
  86370. else {
  86371. var s = r ? r(Cit(t, o), a, o + "", t, e, i) : void 0;
  86372. s === void 0 && (s = a), _it(t, o, s);
  86373. }
  86374. }, wit);
  86375. }
  86376. var Tit = Kie;
  86377. function Pit(t) {
  86378. return t;
  86379. }
  86380. var Jie = Pit;
  86381. function $it(t, e, n) {
  86382. switch (n.length) {
  86383. case 0:
  86384. return t.call(e);
  86385. case 1:
  86386. return t.call(e, n[0]);
  86387. case 2:
  86388. return t.call(e, n[0], n[1]);
  86389. case 3:
  86390. return t.call(e, n[0], n[1], n[2]);
  86391. }
  86392. return t.apply(e, n);
  86393. }
  86394. var Ait = $it, Eit = Ait, yH = Math.max;
  86395. function Mit(t, e, n) {
  86396. return e = yH(e === void 0 ? t.length - 1 : e, 0), function() {
  86397. for (var r = arguments, i = -1, a = yH(r.length - e, 0), o = Array(a); ++i < a; )
  86398. o[i] = r[e + i];
  86399. i = -1;
  86400. for (var s = Array(e + 1); ++i < e; )
  86401. s[i] = r[i];
  86402. return s[e] = n(o), Eit(t, this, s);
  86403. };
  86404. }
  86405. var Iit = Mit;
  86406. function Dit(t) {
  86407. return function() {
  86408. return t;
  86409. };
  86410. }
  86411. var Rit = Dit, kit = Rit, bH = $ie, Lit = Jie, Nit = bH ? function(t, e) {
  86412. return bH(t, "toString", {
  86413. configurable: !0,
  86414. enumerable: !1,
  86415. value: kit(e),
  86416. writable: !0
  86417. });
  86418. } : Lit, Bit = Nit, zit = 800, Vit = 16, Fit = Date.now;
  86419. function Wit(t) {
  86420. var e = 0, n = 0;
  86421. return function() {
  86422. var r = Fit(), i = Vit - (r - n);
  86423. if (n = r, i > 0) {
  86424. if (++e >= zit)
  86425. return arguments[0];
  86426. } else
  86427. e = 0;
  86428. return t.apply(void 0, arguments);
  86429. };
  86430. }
  86431. var Qit = Wit, Hit = Bit, Git = Qit, jit = Git(Hit), Zit = jit, Uit = Jie, Xit = Iit, Yit = Zit;
  86432. function qit(t, e) {
  86433. return Yit(Xit(t, e, Uit), t + "");
  86434. }
  86435. var Kit = qit, Jit = Cw, eat = Mw, tat = Iie, nat = go;
  86436. function rat(t, e, n) {
  86437. if (!nat(n))
  86438. return !1;
  86439. var r = typeof e;
  86440. return (r == "number" ? eat(n) && tat(e, n.length) : r == "string" && e in n) ? Jit(n[e], t) : !1;
  86441. }
  86442. var iat = rat, aat = Kit, oat = iat;
  86443. function sat(t) {
  86444. return aat(function(e, n) {
  86445. var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
  86446. for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && oat(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
  86447. var s = n[r];
  86448. s && t(e, s, r, a);
  86449. }
  86450. return e;
  86451. });
  86452. }
  86453. var lat = sat, uat = Tit, cat = lat;
  86454. cat(function(t, e, n) {
  86455. uat(t, e, n);
  86456. });
  86457. const qL = (t) => {
  86458. var h, p, v;
  86459. 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, {
  86460. method: t.dataSource.method
  86461. }).then((g) => g.json())), { run: o, refresh: s, cancel: l, data: u, loading: c } = yXe(a.value, {
  86462. defaultParams: t.dataSource.params,
  86463. manual: !0,
  86464. cacheKey: t.dataSource.url,
  86465. cacheTime: (((p = t.dataSource) == null ? void 0 : p.refreshTime) || 0) * 1e3,
  86466. pollingInterval: (((v = t.dataSource) == null ? void 0 : v.refreshTime) || 0) * 1e3,
  86467. // 刷新时间
  86468. onError: (g) => {
  86469. console.error(g), $h.error(t.dataSource.url + "请求失败");
  86470. }
  86471. });
  86472. t.dataSource.sourceType === Ri.API && o(), se(
  86473. () => u.value,
  86474. async (g) => {
  86475. if (g && t.dataSource.sourceType === Ri.API) {
  86476. let m = g;
  86477. t.dataSource.dataProcess && (m = await IZe(t.dataSource.dataProcess, JSON.stringify(g))), n.value = m.xAxis || { data: m.xData }, r.value = m.yAxis || { data: m.yData }, i.value = m.series;
  86478. }
  86479. },
  86480. {
  86481. deep: !0
  86482. }
  86483. ), se(
  86484. () => [
  86485. t.dataSource.sourceType,
  86486. t.dataSource.method
  86487. ],
  86488. () => {
  86489. if (t.dataSource.sourceType === Ri.API)
  86490. s();
  86491. else {
  86492. l();
  86493. const g = t.dataSource || {}, { xData: m, yData: y, series: b } = (g == null ? void 0 : g.data) || {};
  86494. m && (n.value = { data: m }), y && (r.value = { data: y }), b.value = b;
  86495. }
  86496. },
  86497. {
  86498. deep: !0
  86499. }
  86500. );
  86501. const f = (g) => {
  86502. var O, S, x, C;
  86503. let m = 34, y = 20, b = 30, _ = 20;
  86504. 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), {
  86505. bottom: m,
  86506. left: b,
  86507. right: y,
  86508. top: _
  86509. };
  86510. };
  86511. return {
  86512. options: L(() => {
  86513. var b, _;
  86514. const g = wU(t, [
  86515. "width",
  86516. "height",
  86517. "dataSource"
  86518. ]);
  86519. !Array.isArray(g.title) && !((b = g.title) != null && b.show) && !Array.isArray(g.legend) && g.legend && (g.legend.top = 12);
  86520. const m = (g == null ? void 0 : g.label) || {}, y = SU(
  86521. {
  86522. xAxis: n.value,
  86523. yAxis: r.value,
  86524. series: (_ = i.value) == null ? void 0 : _.map((O) => {
  86525. var x;
  86526. const S = ((x = g.series) == null ? void 0 : x[O.type]) || {};
  86527. return {
  86528. ...m,
  86529. ...O,
  86530. ...S
  86531. };
  86532. }),
  86533. grid: f(g)
  86534. },
  86535. g
  86536. );
  86537. return console.log("option result:", y), y;
  86538. }),
  86539. loading: c
  86540. };
  86541. }, Hm = /* @__PURE__ */ te({
  86542. __name: "BasicLine",
  86543. props: LL,
  86544. setup(t) {
  86545. const e = t, { options: n, loading: r } = qL(e);
  86546. return (i, a) => (pe(), je(DL, {
  86547. width: i.width,
  86548. height: i.height,
  86549. "echarts-options": B(n),
  86550. loading: B(r)
  86551. }, null, 8, ["width", "height", "echarts-options", "loading"]));
  86552. }
  86553. });
  86554. class Ft {
  86555. /**
  86556. Get the line description around the given position.
  86557. */
  86558. lineAt(e) {
  86559. if (e < 0 || e > this.length)
  86560. throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
  86561. return this.lineInner(e, !1, 1, 0);
  86562. }
  86563. /**
  86564. Get the description for the given (1-based) line number.
  86565. */
  86566. line(e) {
  86567. if (e < 1 || e > this.lines)
  86568. throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
  86569. return this.lineInner(e, !0, 1, 0);
  86570. }
  86571. /**
  86572. Replace a range of the text with the given content.
  86573. */
  86574. replace(e, n, r) {
  86575. [e, n] = Zh(this, e, n);
  86576. let i = [];
  86577. return this.decompose(
  86578. 0,
  86579. e,
  86580. i,
  86581. 2
  86582. /* Open.To */
  86583. ), r.length && r.decompose(
  86584. 0,
  86585. r.length,
  86586. i,
  86587. 3
  86588. /* Open.To */
  86589. ), this.decompose(
  86590. n,
  86591. this.length,
  86592. i,
  86593. 1
  86594. /* Open.From */
  86595. ), No.from(i, this.length - (n - e) + r.length);
  86596. }
  86597. /**
  86598. Append another document to this one.
  86599. */
  86600. append(e) {
  86601. return this.replace(this.length, this.length, e);
  86602. }
  86603. /**
  86604. Retrieve the text between the given points.
  86605. */
  86606. slice(e, n = this.length) {
  86607. [e, n] = Zh(this, e, n);
  86608. let r = [];
  86609. return this.decompose(e, n, r, 0), No.from(r, n - e);
  86610. }
  86611. /**
  86612. Test whether this text is equal to another instance.
  86613. */
  86614. eq(e) {
  86615. if (e == this)
  86616. return !0;
  86617. if (e.length != this.length || e.lines != this.lines)
  86618. return !1;
  86619. let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), i = new Vg(this), a = new Vg(e);
  86620. for (let o = n, s = n; ; ) {
  86621. if (i.next(o), a.next(o), o = 0, i.lineBreak != a.lineBreak || i.done != a.done || i.value != a.value)
  86622. return !1;
  86623. if (s += i.value.length, i.done || s >= r)
  86624. return !0;
  86625. }
  86626. }
  86627. /**
  86628. Iterate over the text. When `dir` is `-1`, iteration happens
  86629. from end to start. This will return lines and the breaks between
  86630. them as separate strings.
  86631. */
  86632. iter(e = 1) {
  86633. return new Vg(this, e);
  86634. }
  86635. /**
  86636. Iterate over a range of the text. When `from` > `to`, the
  86637. iterator will run in reverse.
  86638. */
  86639. iterRange(e, n = this.length) {
  86640. return new eae(this, e, n);
  86641. }
  86642. /**
  86643. Return a cursor that iterates over the given range of lines,
  86644. _without_ returning the line breaks between, and yielding empty
  86645. strings for empty lines.
  86646. When `from` and `to` are given, they should be 1-based line numbers.
  86647. */
  86648. iterLines(e, n) {
  86649. let r;
  86650. if (e == null)
  86651. r = this.iter();
  86652. else {
  86653. n == null && (n = this.lines + 1);
  86654. let i = this.line(e).from;
  86655. r = this.iterRange(i, Math.max(i, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
  86656. }
  86657. return new tae(r);
  86658. }
  86659. /**
  86660. Return the document as a string, using newline characters to
  86661. separate lines.
  86662. */
  86663. toString() {
  86664. return this.sliceString(0);
  86665. }
  86666. /**
  86667. Convert the document to an array of lines (which can be
  86668. deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
  86669. */
  86670. toJSON() {
  86671. let e = [];
  86672. return this.flatten(e), e;
  86673. }
  86674. /**
  86675. @internal
  86676. */
  86677. constructor() {
  86678. }
  86679. /**
  86680. Create a `Text` instance for the given array of lines.
  86681. */
  86682. static of(e) {
  86683. if (e.length == 0)
  86684. throw new RangeError("A document must have at least one line");
  86685. return e.length == 1 && !e[0] ? Ft.empty : e.length <= 32 ? new Mn(e) : No.from(Mn.split(e, []));
  86686. }
  86687. }
  86688. class Mn extends Ft {
  86689. constructor(e, n = fat(e)) {
  86690. super(), this.text = e, this.length = n;
  86691. }
  86692. get lines() {
  86693. return this.text.length;
  86694. }
  86695. get children() {
  86696. return null;
  86697. }
  86698. lineInner(e, n, r, i) {
  86699. for (let a = 0; ; a++) {
  86700. let o = this.text[a], s = i + o.length;
  86701. if ((n ? r : s) >= e)
  86702. return new dat(i, s, r, o);
  86703. i = s + 1, r++;
  86704. }
  86705. }
  86706. decompose(e, n, r, i) {
  86707. let a = e <= 0 && n >= this.length ? this : new Mn(_H(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
  86708. if (i & 1) {
  86709. let o = r.pop(), s = n1(a.text, o.text.slice(), 0, a.length);
  86710. if (s.length <= 32)
  86711. r.push(new Mn(s, o.length + a.length));
  86712. else {
  86713. let l = s.length >> 1;
  86714. r.push(new Mn(s.slice(0, l)), new Mn(s.slice(l)));
  86715. }
  86716. } else
  86717. r.push(a);
  86718. }
  86719. replace(e, n, r) {
  86720. if (!(r instanceof Mn))
  86721. return super.replace(e, n, r);
  86722. [e, n] = Zh(this, e, n);
  86723. let i = n1(this.text, n1(r.text, _H(this.text, 0, e)), n), a = this.length + r.length - (n - e);
  86724. return i.length <= 32 ? new Mn(i, a) : No.from(Mn.split(i, []), a);
  86725. }
  86726. sliceString(e, n = this.length, r = `
  86727. `) {
  86728. [e, n] = Zh(this, e, n);
  86729. let i = "";
  86730. for (let a = 0, o = 0; a <= n && o < this.text.length; o++) {
  86731. let s = this.text[o], l = a + s.length;
  86732. a > e && o && (i += r), e < l && n > a && (i += s.slice(Math.max(0, e - a), n - a)), a = l + 1;
  86733. }
  86734. return i;
  86735. }
  86736. flatten(e) {
  86737. for (let n of this.text)
  86738. e.push(n);
  86739. }
  86740. scanIdentical() {
  86741. return 0;
  86742. }
  86743. static split(e, n) {
  86744. let r = [], i = -1;
  86745. for (let a of e)
  86746. r.push(a), i += a.length + 1, r.length == 32 && (n.push(new Mn(r, i)), r = [], i = -1);
  86747. return i > -1 && n.push(new Mn(r, i)), n;
  86748. }
  86749. }
  86750. class No extends Ft {
  86751. constructor(e, n) {
  86752. super(), this.children = e, this.length = n, this.lines = 0;
  86753. for (let r of e)
  86754. this.lines += r.lines;
  86755. }
  86756. lineInner(e, n, r, i) {
  86757. for (let a = 0; ; a++) {
  86758. let o = this.children[a], s = i + o.length, l = r + o.lines - 1;
  86759. if ((n ? l : s) >= e)
  86760. return o.lineInner(e, n, r, i);
  86761. i = s + 1, r = l + 1;
  86762. }
  86763. }
  86764. decompose(e, n, r, i) {
  86765. for (let a = 0, o = 0; o <= n && a < this.children.length; a++) {
  86766. let s = this.children[a], l = o + s.length;
  86767. if (e <= l && n >= o) {
  86768. let u = i & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
  86769. o >= e && l <= n && !u ? r.push(s) : s.decompose(e - o, n - o, r, u);
  86770. }
  86771. o = l + 1;
  86772. }
  86773. }
  86774. replace(e, n, r) {
  86775. if ([e, n] = Zh(this, e, n), r.lines < this.lines)
  86776. for (let i = 0, a = 0; i < this.children.length; i++) {
  86777. let o = this.children[i], s = a + o.length;
  86778. if (e >= a && n <= s) {
  86779. let l = o.replace(e - a, n - a, r), u = this.lines - o.lines + l.lines;
  86780. if (l.lines < u >> 4 && l.lines > u >> 6) {
  86781. let c = this.children.slice();
  86782. return c[i] = l, new No(c, this.length - (n - e) + r.length);
  86783. }
  86784. return super.replace(a, s, l);
  86785. }
  86786. a = s + 1;
  86787. }
  86788. return super.replace(e, n, r);
  86789. }
  86790. sliceString(e, n = this.length, r = `
  86791. `) {
  86792. [e, n] = Zh(this, e, n);
  86793. let i = "";
  86794. for (let a = 0, o = 0; a < this.children.length && o <= n; a++) {
  86795. let s = this.children[a], l = o + s.length;
  86796. o > e && a && (i += r), e < l && n > o && (i += s.sliceString(e - o, n - o, r)), o = l + 1;
  86797. }
  86798. return i;
  86799. }
  86800. flatten(e) {
  86801. for (let n of this.children)
  86802. n.flatten(e);
  86803. }
  86804. scanIdentical(e, n) {
  86805. if (!(e instanceof No))
  86806. return 0;
  86807. 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];
  86808. for (; ; i += n, a += n) {
  86809. if (i == o || a == s)
  86810. return r;
  86811. let l = this.children[i], u = e.children[a];
  86812. if (l != u)
  86813. return r + l.scanIdentical(u, n);
  86814. r += l.length + 1;
  86815. }
  86816. }
  86817. static from(e, n = e.reduce((r, i) => r + i.length + 1, -1)) {
  86818. let r = 0;
  86819. for (let h of e)
  86820. r += h.lines;
  86821. if (r < 32) {
  86822. let h = [];
  86823. for (let p of e)
  86824. p.flatten(h);
  86825. return new Mn(h, n);
  86826. }
  86827. let i = Math.max(
  86828. 32,
  86829. r >> 5
  86830. /* Tree.BranchShift */
  86831. ), a = i << 1, o = i >> 1, s = [], l = 0, u = -1, c = [];
  86832. function f(h) {
  86833. let p;
  86834. if (h.lines > a && h instanceof No)
  86835. for (let v of h.children)
  86836. f(v);
  86837. 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));
  86838. }
  86839. function d() {
  86840. l != 0 && (s.push(c.length == 1 ? c[0] : No.from(c, u)), u = -1, l = c.length = 0);
  86841. }
  86842. for (let h of e)
  86843. f(h);
  86844. return d(), s.length == 1 ? s[0] : new No(s, n);
  86845. }
  86846. }
  86847. Ft.empty = /* @__PURE__ */ new Mn([""], 0);
  86848. function fat(t) {
  86849. let e = -1;
  86850. for (let n of t)
  86851. e += n.length + 1;
  86852. return e;
  86853. }
  86854. function n1(t, e, n = 0, r = 1e9) {
  86855. for (let i = 0, a = 0, o = !0; a < t.length && i <= r; a++) {
  86856. let s = t[a], l = i + s.length;
  86857. 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;
  86858. }
  86859. return e;
  86860. }
  86861. function _H(t, e, n) {
  86862. return n1(t, [""], e, n);
  86863. }
  86864. class Vg {
  86865. constructor(e, n = 1) {
  86866. 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];
  86867. }
  86868. nextInner(e, n) {
  86869. for (this.done = this.lineBreak = !1; ; ) {
  86870. 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;
  86871. if (o == (n > 0 ? s : 0)) {
  86872. if (r == 0)
  86873. return this.done = !0, this.value = "", this;
  86874. n > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop();
  86875. } else if ((a & 1) == (n > 0 ? 0 : 1)) {
  86876. if (this.offsets[r] += n, e == 0)
  86877. return this.lineBreak = !0, this.value = `
  86878. `, this;
  86879. e--;
  86880. } else if (i instanceof Mn) {
  86881. let l = i.text[o + (n < 0 ? -1 : 0)];
  86882. if (this.offsets[r] += n, l.length > Math.max(0, e))
  86883. return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
  86884. e -= l.length;
  86885. } else {
  86886. let l = i.children[o + (n < 0 ? -1 : 0)];
  86887. 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));
  86888. }
  86889. }
  86890. }
  86891. next(e = 0) {
  86892. return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
  86893. }
  86894. }
  86895. class eae {
  86896. constructor(e, n, r) {
  86897. this.value = "", this.done = !1, this.cursor = new Vg(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
  86898. }
  86899. nextInner(e, n) {
  86900. if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
  86901. return this.value = "", this.done = !0, this;
  86902. e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
  86903. let r = n < 0 ? this.pos - this.from : this.to - this.pos;
  86904. e > r && (e = r), r -= e;
  86905. let { value: i } = this.cursor.next(e);
  86906. 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;
  86907. }
  86908. next(e = 0) {
  86909. 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);
  86910. }
  86911. get lineBreak() {
  86912. return this.cursor.lineBreak && this.value != "";
  86913. }
  86914. }
  86915. class tae {
  86916. constructor(e) {
  86917. this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
  86918. }
  86919. next(e = 0) {
  86920. let { done: n, lineBreak: r, value: i } = this.inner.next(e);
  86921. 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;
  86922. }
  86923. get lineBreak() {
  86924. return !1;
  86925. }
  86926. }
  86927. typeof Symbol < "u" && (Ft.prototype[Symbol.iterator] = function() {
  86928. return this.iter();
  86929. }, Vg.prototype[Symbol.iterator] = eae.prototype[Symbol.iterator] = tae.prototype[Symbol.iterator] = function() {
  86930. return this;
  86931. });
  86932. class dat {
  86933. /**
  86934. @internal
  86935. */
  86936. constructor(e, n, r, i) {
  86937. this.from = e, this.to = n, this.number = r, this.text = i;
  86938. }
  86939. /**
  86940. The length of the line (not including any line break after it).
  86941. */
  86942. get length() {
  86943. return this.to - this.from;
  86944. }
  86945. }
  86946. function Zh(t, e, n) {
  86947. return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
  86948. }
  86949. let oh = /* @__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);
  86950. for (let t = 1; t < oh.length; t++)
  86951. oh[t] += oh[t - 1];
  86952. function hat(t) {
  86953. for (let e = 1; e < oh.length; e += 2)
  86954. if (oh[e] > t)
  86955. return oh[e - 1] <= t;
  86956. return !1;
  86957. }
  86958. function OH(t) {
  86959. return t >= 127462 && t <= 127487;
  86960. }
  86961. const SH = 8205;
  86962. function _r(t, e, n = !0, r = !0) {
  86963. return (n ? nae : pat)(t, e, r);
  86964. }
  86965. function nae(t, e, n) {
  86966. if (e == t.length)
  86967. return e;
  86968. e && rae(t.charCodeAt(e)) && iae(t.charCodeAt(e - 1)) && e--;
  86969. let r = gr(t, e);
  86970. for (e += ga(r); e < t.length; ) {
  86971. let i = gr(t, e);
  86972. if (r == SH || i == SH || n && hat(i))
  86973. e += ga(i), r = i;
  86974. else if (OH(i)) {
  86975. let a = 0, o = e - 2;
  86976. for (; o >= 0 && OH(gr(t, o)); )
  86977. a++, o -= 2;
  86978. if (a % 2 == 0)
  86979. break;
  86980. e += 2;
  86981. } else
  86982. break;
  86983. }
  86984. return e;
  86985. }
  86986. function pat(t, e, n) {
  86987. for (; e > 0; ) {
  86988. let r = nae(t, e - 2, n);
  86989. if (r < e)
  86990. return r;
  86991. e--;
  86992. }
  86993. return 0;
  86994. }
  86995. function rae(t) {
  86996. return t >= 56320 && t < 57344;
  86997. }
  86998. function iae(t) {
  86999. return t >= 55296 && t < 56320;
  87000. }
  87001. function gr(t, e) {
  87002. let n = t.charCodeAt(e);
  87003. if (!iae(n) || e + 1 == t.length)
  87004. return n;
  87005. let r = t.charCodeAt(e + 1);
  87006. return rae(r) ? (n - 55296 << 10) + (r - 56320) + 65536 : n;
  87007. }
  87008. function KL(t) {
  87009. return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
  87010. }
  87011. function ga(t) {
  87012. return t < 65536 ? 1 : 2;
  87013. }
  87014. const tM = /\r\n?|\n/;
  87015. var yr = /* @__PURE__ */ function(t) {
  87016. return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
  87017. }(yr || (yr = {}));
  87018. class Yo {
  87019. // Sections are encoded as pairs of integers. The first is the
  87020. // length in the current document, and the second is -1 for
  87021. // unaffected sections, and the length of the replacement content
  87022. // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
  87023. // 0), and a replacement two positive numbers.
  87024. /**
  87025. @internal
  87026. */
  87027. constructor(e) {
  87028. this.sections = e;
  87029. }
  87030. /**
  87031. The length of the document before the change.
  87032. */
  87033. get length() {
  87034. let e = 0;
  87035. for (let n = 0; n < this.sections.length; n += 2)
  87036. e += this.sections[n];
  87037. return e;
  87038. }
  87039. /**
  87040. The length of the document after the change.
  87041. */
  87042. get newLength() {
  87043. let e = 0;
  87044. for (let n = 0; n < this.sections.length; n += 2) {
  87045. let r = this.sections[n + 1];
  87046. e += r < 0 ? this.sections[n] : r;
  87047. }
  87048. return e;
  87049. }
  87050. /**
  87051. False when there are actual changes in this set.
  87052. */
  87053. get empty() {
  87054. return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
  87055. }
  87056. /**
  87057. Iterate over the unchanged parts left by these changes. `posA`
  87058. provides the position of the range in the old document, `posB`
  87059. the new position in the changed document.
  87060. */
  87061. iterGaps(e) {
  87062. for (let n = 0, r = 0, i = 0; n < this.sections.length; ) {
  87063. let a = this.sections[n++], o = this.sections[n++];
  87064. o < 0 ? (e(r, i, a), i += a) : i += o, r += a;
  87065. }
  87066. }
  87067. /**
  87068. Iterate over the ranges changed by these changes. (See
  87069. [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
  87070. variant that also provides you with the inserted text.)
  87071. `fromA`/`toA` provides the extent of the change in the starting
  87072. document, `fromB`/`toB` the extent of the replacement in the
  87073. changed document.
  87074. When `individual` is true, adjacent changes (which are kept
  87075. separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
  87076. reported separately.
  87077. */
  87078. iterChangedRanges(e, n = !1) {
  87079. nM(this, e, n);
  87080. }
  87081. /**
  87082. Get a description of the inverted form of these changes.
  87083. */
  87084. get invertedDesc() {
  87085. let e = [];
  87086. for (let n = 0; n < this.sections.length; ) {
  87087. let r = this.sections[n++], i = this.sections[n++];
  87088. i < 0 ? e.push(r, i) : e.push(i, r);
  87089. }
  87090. return new Yo(e);
  87091. }
  87092. /**
  87093. Compute the combined effect of applying another set of changes
  87094. after this one. The length of the document after this set should
  87095. match the length before `other`.
  87096. */
  87097. composeDesc(e) {
  87098. return this.empty ? e : e.empty ? this : aae(this, e);
  87099. }
  87100. /**
  87101. Map this description, which should start with the same document
  87102. as `other`, over another set of changes, so that it can be
  87103. applied after it. When `before` is true, map as if the changes
  87104. in `other` happened before the ones in `this`.
  87105. */
  87106. mapDesc(e, n = !1) {
  87107. return e.empty ? this : rM(this, e, n);
  87108. }
  87109. mapPos(e, n = -1, r = yr.Simple) {
  87110. let i = 0, a = 0;
  87111. for (let o = 0; o < this.sections.length; ) {
  87112. let s = this.sections[o++], l = this.sections[o++], u = i + s;
  87113. if (l < 0) {
  87114. if (u > e)
  87115. return a + (e - i);
  87116. a += s;
  87117. } else {
  87118. if (r != yr.Simple && u >= e && (r == yr.TrackDel && i < e && u > e || r == yr.TrackBefore && i < e || r == yr.TrackAfter && u > e))
  87119. return null;
  87120. if (u > e || u == e && n < 0 && !s)
  87121. return e == i || n < 0 ? a : a + l;
  87122. a += l;
  87123. }
  87124. i = u;
  87125. }
  87126. if (e > i)
  87127. throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
  87128. return a;
  87129. }
  87130. /**
  87131. Check whether these changes touch a given range. When one of the
  87132. changes entirely covers the range, the string `"cover"` is
  87133. returned.
  87134. */
  87135. touchesRange(e, n = e) {
  87136. for (let r = 0, i = 0; r < this.sections.length && i <= n; ) {
  87137. let a = this.sections[r++], o = this.sections[r++], s = i + a;
  87138. if (o >= 0 && i <= n && s >= e)
  87139. return i < e && s > n ? "cover" : !0;
  87140. i = s;
  87141. }
  87142. return !1;
  87143. }
  87144. /**
  87145. @internal
  87146. */
  87147. toString() {
  87148. let e = "";
  87149. for (let n = 0; n < this.sections.length; ) {
  87150. let r = this.sections[n++], i = this.sections[n++];
  87151. e += (e ? " " : "") + r + (i >= 0 ? ":" + i : "");
  87152. }
  87153. return e;
  87154. }
  87155. /**
  87156. Serialize this change desc to a JSON-representable value.
  87157. */
  87158. toJSON() {
  87159. return this.sections;
  87160. }
  87161. /**
  87162. Create a change desc from its JSON representation (as produced
  87163. by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
  87164. */
  87165. static fromJSON(e) {
  87166. if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
  87167. throw new RangeError("Invalid JSON representation of ChangeDesc");
  87168. return new Yo(e);
  87169. }
  87170. /**
  87171. @internal
  87172. */
  87173. static create(e) {
  87174. return new Yo(e);
  87175. }
  87176. }
  87177. class jn extends Yo {
  87178. constructor(e, n) {
  87179. super(e), this.inserted = n;
  87180. }
  87181. /**
  87182. Apply the changes to a document, returning the modified
  87183. document.
  87184. */
  87185. apply(e) {
  87186. if (this.length != e.length)
  87187. throw new RangeError("Applying change set to a document with the wrong length");
  87188. return nM(this, (n, r, i, a, o) => e = e.replace(i, i + (r - n), o), !1), e;
  87189. }
  87190. mapDesc(e, n = !1) {
  87191. return rM(this, e, n, !0);
  87192. }
  87193. /**
  87194. Given the document as it existed _before_ the changes, return a
  87195. change set that represents the inverse of this set, which could
  87196. be used to go from the document created by the changes back to
  87197. the document as it existed before the changes.
  87198. */
  87199. invert(e) {
  87200. let n = this.sections.slice(), r = [];
  87201. for (let i = 0, a = 0; i < n.length; i += 2) {
  87202. let o = n[i], s = n[i + 1];
  87203. if (s >= 0) {
  87204. n[i] = s, n[i + 1] = o;
  87205. let l = i >> 1;
  87206. for (; r.length < l; )
  87207. r.push(Ft.empty);
  87208. r.push(o ? e.slice(a, a + o) : Ft.empty);
  87209. }
  87210. a += o;
  87211. }
  87212. return new jn(n, r);
  87213. }
  87214. /**
  87215. Combine two subsequent change sets into a single set. `other`
  87216. must start in the document produced by `this`. If `this` goes
  87217. `docA` → `docB` and `other` represents `docB` → `docC`, the
  87218. returned value will represent the change `docA` → `docC`.
  87219. */
  87220. compose(e) {
  87221. return this.empty ? e : e.empty ? this : aae(this, e, !0);
  87222. }
  87223. /**
  87224. Given another change set starting in the same document, maps this
  87225. change set over the other, producing a new change set that can be
  87226. applied to the document produced by applying `other`. When
  87227. `before` is `true`, order changes as if `this` comes before
  87228. `other`, otherwise (the default) treat `other` as coming first.
  87229. Given two changes `A` and `B`, `A.compose(B.map(A))` and
  87230. `B.compose(A.map(B, true))` will produce the same document. This
  87231. provides a basic form of [operational
  87232. transformation](https://en.wikipedia.org/wiki/Operational_transformation),
  87233. and can be used for collaborative editing.
  87234. */
  87235. map(e, n = !1) {
  87236. return e.empty ? this : rM(this, e, n, !0);
  87237. }
  87238. /**
  87239. Iterate over the changed ranges in the document, calling `f` for
  87240. each, with the range in the original document (`fromA`-`toA`)
  87241. and the range that replaces it in the new document
  87242. (`fromB`-`toB`).
  87243. When `individual` is true, adjacent changes are reported
  87244. separately.
  87245. */
  87246. iterChanges(e, n = !1) {
  87247. nM(this, e, n);
  87248. }
  87249. /**
  87250. Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
  87251. set.
  87252. */
  87253. get desc() {
  87254. return Yo.create(this.sections);
  87255. }
  87256. /**
  87257. @internal
  87258. */
  87259. filter(e) {
  87260. let n = [], r = [], i = [], a = new Gm(this);
  87261. e: for (let o = 0, s = 0; ; ) {
  87262. let l = o == e.length ? 1e9 : e[o++];
  87263. for (; s < l || s == l && a.len == 0; ) {
  87264. if (a.done)
  87265. break e;
  87266. let c = Math.min(a.len, l - s);
  87267. Dr(i, c, -1);
  87268. let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
  87269. Dr(n, c, f), f > 0 && Wl(r, n, a.text), a.forward(c), s += c;
  87270. }
  87271. let u = e[o++];
  87272. for (; s < u; ) {
  87273. if (a.done)
  87274. break e;
  87275. let c = Math.min(a.len, u - s);
  87276. Dr(n, c, -1), Dr(i, c, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(c), s += c;
  87277. }
  87278. }
  87279. return {
  87280. changes: new jn(n, r),
  87281. filtered: Yo.create(i)
  87282. };
  87283. }
  87284. /**
  87285. Serialize this change set to a JSON-representable value.
  87286. */
  87287. toJSON() {
  87288. let e = [];
  87289. for (let n = 0; n < this.sections.length; n += 2) {
  87290. let r = this.sections[n], i = this.sections[n + 1];
  87291. i < 0 ? e.push(r) : i == 0 ? e.push([r]) : e.push([r].concat(this.inserted[n >> 1].toJSON()));
  87292. }
  87293. return e;
  87294. }
  87295. /**
  87296. Create a change set for the given changes, for a document of the
  87297. given length, using `lineSep` as line separator.
  87298. */
  87299. static of(e, n, r) {
  87300. let i = [], a = [], o = 0, s = null;
  87301. function l(c = !1) {
  87302. if (!c && !i.length)
  87303. return;
  87304. o < n && Dr(i, n - o, -1);
  87305. let f = new jn(i, a);
  87306. s = s ? s.compose(f.map(s)) : f, i = [], a = [], o = 0;
  87307. }
  87308. function u(c) {
  87309. if (Array.isArray(c))
  87310. for (let f of c)
  87311. u(f);
  87312. else if (c instanceof jn) {
  87313. if (c.length != n)
  87314. throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);
  87315. l(), s = s ? s.compose(c.map(s)) : c;
  87316. } else {
  87317. let { from: f, to: d = f, insert: h } = c;
  87318. if (f > d || f < 0 || d > n)
  87319. throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);
  87320. let p = h ? typeof h == "string" ? Ft.of(h.split(r || tM)) : h : Ft.empty, v = p.length;
  87321. if (f == d && v == 0)
  87322. return;
  87323. f < o && l(), f > o && Dr(i, f - o, -1), Dr(i, d - f, v), Wl(a, i, p), o = d;
  87324. }
  87325. }
  87326. return u(e), l(!s), s;
  87327. }
  87328. /**
  87329. Create an empty changeset of the given length.
  87330. */
  87331. static empty(e) {
  87332. return new jn(e ? [e, -1] : [], []);
  87333. }
  87334. /**
  87335. Create a changeset from its JSON representation (as produced by
  87336. [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
  87337. */
  87338. static fromJSON(e) {
  87339. if (!Array.isArray(e))
  87340. throw new RangeError("Invalid JSON representation of ChangeSet");
  87341. let n = [], r = [];
  87342. for (let i = 0; i < e.length; i++) {
  87343. let a = e[i];
  87344. if (typeof a == "number")
  87345. n.push(a, -1);
  87346. else {
  87347. if (!Array.isArray(a) || typeof a[0] != "number" || a.some((o, s) => s && typeof o != "string"))
  87348. throw new RangeError("Invalid JSON representation of ChangeSet");
  87349. if (a.length == 1)
  87350. n.push(a[0], 0);
  87351. else {
  87352. for (; r.length < i; )
  87353. r.push(Ft.empty);
  87354. r[i] = Ft.of(a.slice(1)), n.push(a[0], r[i].length);
  87355. }
  87356. }
  87357. }
  87358. return new jn(n, r);
  87359. }
  87360. /**
  87361. @internal
  87362. */
  87363. static createSet(e, n) {
  87364. return new jn(e, n);
  87365. }
  87366. }
  87367. function Dr(t, e, n, r = !1) {
  87368. if (e == 0 && n <= 0)
  87369. return;
  87370. let i = t.length - 2;
  87371. 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);
  87372. }
  87373. function Wl(t, e, n) {
  87374. if (n.length == 0)
  87375. return;
  87376. let r = e.length - 2 >> 1;
  87377. if (r < t.length)
  87378. t[t.length - 1] = t[t.length - 1].append(n);
  87379. else {
  87380. for (; t.length < r; )
  87381. t.push(Ft.empty);
  87382. t.push(n);
  87383. }
  87384. }
  87385. function nM(t, e, n) {
  87386. let r = t.inserted;
  87387. for (let i = 0, a = 0, o = 0; o < t.sections.length; ) {
  87388. let s = t.sections[o++], l = t.sections[o++];
  87389. if (l < 0)
  87390. i += s, a += s;
  87391. else {
  87392. let u = i, c = a, f = Ft.empty;
  87393. for (; u += s, c += l, l && r && (f = f.append(r[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
  87394. s = t.sections[o++], l = t.sections[o++];
  87395. e(i, u, a, c, f), i = u, a = c;
  87396. }
  87397. }
  87398. }
  87399. function rM(t, e, n, r = !1) {
  87400. let i = [], a = r ? [] : null, o = new Gm(t), s = new Gm(e);
  87401. for (let l = -1; ; )
  87402. if (o.ins == -1 && s.ins == -1) {
  87403. let u = Math.min(o.len, s.len);
  87404. Dr(i, u, -1), o.forward(u), s.forward(u);
  87405. } else if (s.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
  87406. let u = s.len;
  87407. for (Dr(i, s.ins, -1); u; ) {
  87408. let c = Math.min(o.len, u);
  87409. o.ins >= 0 && l < o.i && o.len <= c && (Dr(i, 0, o.ins), a && Wl(a, i, o.text), l = o.i), o.forward(c), u -= c;
  87410. }
  87411. s.next();
  87412. } else if (o.ins >= 0) {
  87413. let u = 0, c = o.len;
  87414. for (; c; )
  87415. if (s.ins == -1) {
  87416. let f = Math.min(c, s.len);
  87417. u += f, c -= f, s.forward(f);
  87418. } else if (s.ins == 0 && s.len < c)
  87419. c -= s.len, s.next();
  87420. else
  87421. break;
  87422. Dr(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);
  87423. } else {
  87424. if (o.done && s.done)
  87425. return a ? jn.createSet(i, a) : Yo.create(i);
  87426. throw new Error("Mismatched change set lengths");
  87427. }
  87428. }
  87429. function aae(t, e, n = !1) {
  87430. let r = [], i = n ? [] : null, a = new Gm(t), o = new Gm(e);
  87431. for (let s = !1; ; ) {
  87432. if (a.done && o.done)
  87433. return i ? jn.createSet(r, i) : Yo.create(r);
  87434. if (a.ins == 0)
  87435. Dr(r, a.len, 0, s), a.next();
  87436. else if (o.len == 0 && !o.done)
  87437. Dr(r, 0, o.ins, s), i && Wl(i, r, o.text), o.next();
  87438. else {
  87439. if (a.done || o.done)
  87440. throw new Error("Mismatched change set lengths");
  87441. {
  87442. let l = Math.min(a.len2, o.len), u = r.length;
  87443. if (a.ins == -1) {
  87444. let c = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
  87445. Dr(r, l, c, s), i && c && Wl(i, r, o.text);
  87446. } else o.ins == -1 ? (Dr(r, a.off ? 0 : a.len, l, s), i && Wl(i, r, a.textBit(l))) : (Dr(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, s), i && !o.off && Wl(i, r, o.text));
  87447. s = (a.ins > l || o.ins >= 0 && o.len > l) && (s || r.length > u), a.forward2(l), o.forward(l);
  87448. }
  87449. }
  87450. }
  87451. }
  87452. class Gm {
  87453. constructor(e) {
  87454. this.set = e, this.i = 0, this.next();
  87455. }
  87456. next() {
  87457. let { sections: e } = this.set;
  87458. this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
  87459. }
  87460. get done() {
  87461. return this.ins == -2;
  87462. }
  87463. get len2() {
  87464. return this.ins < 0 ? this.len : this.ins;
  87465. }
  87466. get text() {
  87467. let { inserted: e } = this.set, n = this.i - 2 >> 1;
  87468. return n >= e.length ? Ft.empty : e[n];
  87469. }
  87470. textBit(e) {
  87471. let { inserted: n } = this.set, r = this.i - 2 >> 1;
  87472. return r >= n.length && !e ? Ft.empty : n[r].slice(this.off, e == null ? void 0 : this.off + e);
  87473. }
  87474. forward(e) {
  87475. e == this.len ? this.next() : (this.len -= e, this.off += e);
  87476. }
  87477. forward2(e) {
  87478. this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
  87479. }
  87480. }
  87481. class Wc {
  87482. constructor(e, n, r) {
  87483. this.from = e, this.to = n, this.flags = r;
  87484. }
  87485. /**
  87486. The anchor of the range—the side that doesn't move when you
  87487. extend it.
  87488. */
  87489. get anchor() {
  87490. return this.flags & 32 ? this.to : this.from;
  87491. }
  87492. /**
  87493. The head of the range, which is moved when the range is
  87494. [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
  87495. */
  87496. get head() {
  87497. return this.flags & 32 ? this.from : this.to;
  87498. }
  87499. /**
  87500. True when `anchor` and `head` are at the same position.
  87501. */
  87502. get empty() {
  87503. return this.from == this.to;
  87504. }
  87505. /**
  87506. If this is a cursor that is explicitly associated with the
  87507. character on one of its sides, this returns the side. -1 means
  87508. the character before its position, 1 the character after, and 0
  87509. means no association.
  87510. */
  87511. get assoc() {
  87512. return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
  87513. }
  87514. /**
  87515. The bidirectional text level associated with this cursor, if
  87516. any.
  87517. */
  87518. get bidiLevel() {
  87519. let e = this.flags & 7;
  87520. return e == 7 ? null : e;
  87521. }
  87522. /**
  87523. The goal column (stored vertical offset) associated with a
  87524. cursor. This is used to preserve the vertical position when
  87525. [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
  87526. lines of different length.
  87527. */
  87528. get goalColumn() {
  87529. let e = this.flags >> 6;
  87530. return e == 16777215 ? void 0 : e;
  87531. }
  87532. /**
  87533. Map this range through a change, producing a valid range in the
  87534. updated document.
  87535. */
  87536. map(e, n = -1) {
  87537. let r, i;
  87538. 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);
  87539. }
  87540. /**
  87541. Extend this range to cover at least `from` to `to`.
  87542. */
  87543. extend(e, n = e) {
  87544. if (e <= this.anchor && n >= this.anchor)
  87545. return me.range(e, n);
  87546. let r = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
  87547. return me.range(this.anchor, r);
  87548. }
  87549. /**
  87550. Compare this range to another range.
  87551. */
  87552. eq(e, n = !1) {
  87553. return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
  87554. }
  87555. /**
  87556. Return a JSON-serializable object representing the range.
  87557. */
  87558. toJSON() {
  87559. return { anchor: this.anchor, head: this.head };
  87560. }
  87561. /**
  87562. Convert a JSON representation of a range to a `SelectionRange`
  87563. instance.
  87564. */
  87565. static fromJSON(e) {
  87566. if (!e || typeof e.anchor != "number" || typeof e.head != "number")
  87567. throw new RangeError("Invalid JSON representation for SelectionRange");
  87568. return me.range(e.anchor, e.head);
  87569. }
  87570. /**
  87571. @internal
  87572. */
  87573. static create(e, n, r) {
  87574. return new Wc(e, n, r);
  87575. }
  87576. }
  87577. class me {
  87578. constructor(e, n) {
  87579. this.ranges = e, this.mainIndex = n;
  87580. }
  87581. /**
  87582. Map a selection through a change. Used to adjust the selection
  87583. position for changes.
  87584. */
  87585. map(e, n = -1) {
  87586. return e.empty ? this : me.create(this.ranges.map((r) => r.map(e, n)), this.mainIndex);
  87587. }
  87588. /**
  87589. Compare this selection to another selection. By default, ranges
  87590. are compared only by position. When `includeAssoc` is true,
  87591. cursor ranges must also have the same
  87592. [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
  87593. */
  87594. eq(e, n = !1) {
  87595. if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
  87596. return !1;
  87597. for (let r = 0; r < this.ranges.length; r++)
  87598. if (!this.ranges[r].eq(e.ranges[r], n))
  87599. return !1;
  87600. return !0;
  87601. }
  87602. /**
  87603. Get the primary selection range. Usually, you should make sure
  87604. your code applies to _all_ ranges, by using methods like
  87605. [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
  87606. */
  87607. get main() {
  87608. return this.ranges[this.mainIndex];
  87609. }
  87610. /**
  87611. Make sure the selection only has one range. Returns a selection
  87612. holding only the main range from this selection.
  87613. */
  87614. asSingle() {
  87615. return this.ranges.length == 1 ? this : new me([this.main], 0);
  87616. }
  87617. /**
  87618. Extend this selection with an extra range.
  87619. */
  87620. addRange(e, n = !0) {
  87621. return me.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
  87622. }
  87623. /**
  87624. Replace a given range with another range, and then normalize the
  87625. selection to merge and sort ranges if necessary.
  87626. */
  87627. replaceRange(e, n = this.mainIndex) {
  87628. let r = this.ranges.slice();
  87629. return r[n] = e, me.create(r, this.mainIndex);
  87630. }
  87631. /**
  87632. Convert this selection to an object that can be serialized to
  87633. JSON.
  87634. */
  87635. toJSON() {
  87636. return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
  87637. }
  87638. /**
  87639. Create a selection from a JSON representation.
  87640. */
  87641. static fromJSON(e) {
  87642. if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
  87643. throw new RangeError("Invalid JSON representation for EditorSelection");
  87644. return new me(e.ranges.map((n) => Wc.fromJSON(n)), e.main);
  87645. }
  87646. /**
  87647. Create a selection holding a single range.
  87648. */
  87649. static single(e, n = e) {
  87650. return new me([me.range(e, n)], 0);
  87651. }
  87652. /**
  87653. Sort and merge the given set of ranges, creating a valid
  87654. selection.
  87655. */
  87656. static create(e, n = 0) {
  87657. if (e.length == 0)
  87658. throw new RangeError("A selection needs at least one range");
  87659. for (let r = 0, i = 0; i < e.length; i++) {
  87660. let a = e[i];
  87661. if (a.empty ? a.from <= r : a.from < r)
  87662. return me.normalized(e.slice(), n);
  87663. r = a.to;
  87664. }
  87665. return new me(e, n);
  87666. }
  87667. /**
  87668. Create a cursor selection range at the given position. You can
  87669. safely ignore the optional arguments in most situations.
  87670. */
  87671. static cursor(e, n = 0, r, i) {
  87672. return Wc.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (r == null ? 7 : Math.min(6, r)) | (i ?? 16777215) << 6);
  87673. }
  87674. /**
  87675. Create a selection range.
  87676. */
  87677. static range(e, n, r, i) {
  87678. let a = (r ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
  87679. return n < e ? Wc.create(n, e, 48 | a) : Wc.create(e, n, (n > e ? 8 : 0) | a);
  87680. }
  87681. /**
  87682. @internal
  87683. */
  87684. static normalized(e, n = 0) {
  87685. let r = e[n];
  87686. e.sort((i, a) => i.from - a.from), n = e.indexOf(r);
  87687. for (let i = 1; i < e.length; i++) {
  87688. let a = e[i], o = e[i - 1];
  87689. if (a.empty ? a.from <= o.to : a.from < o.to) {
  87690. let s = o.from, l = Math.max(a.to, o.to);
  87691. i <= n && n--, e.splice(--i, 2, a.anchor > a.head ? me.range(l, s) : me.range(s, l));
  87692. }
  87693. }
  87694. return new me(e, n);
  87695. }
  87696. }
  87697. function oae(t, e) {
  87698. for (let n of t.ranges)
  87699. if (n.to > e)
  87700. throw new RangeError("Selection points outside of document");
  87701. }
  87702. let JL = 0;
  87703. class Be {
  87704. constructor(e, n, r, i, a) {
  87705. this.combine = e, this.compareInput = n, this.compare = r, this.isStatic = i, this.id = JL++, this.default = e([]), this.extensions = typeof a == "function" ? a(this) : a;
  87706. }
  87707. /**
  87708. Returns a facet reader for this facet, which can be used to
  87709. [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
  87710. */
  87711. get reader() {
  87712. return this;
  87713. }
  87714. /**
  87715. Define a new facet.
  87716. */
  87717. static define(e = {}) {
  87718. return new Be(e.combine || ((n) => n), e.compareInput || ((n, r) => n === r), e.compare || (e.combine ? (n, r) => n === r : e4), !!e.static, e.enables);
  87719. }
  87720. /**
  87721. Returns an extension that adds the given value to this facet.
  87722. */
  87723. of(e) {
  87724. return new r1([], this, 0, e);
  87725. }
  87726. /**
  87727. Create an extension that computes a value for the facet from a
  87728. state. You must take care to declare the parts of the state that
  87729. this value depends on, since your function is only called again
  87730. for a new state when one of those parts changed.
  87731. In cases where your value depends only on a single field, you'll
  87732. want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
  87733. */
  87734. compute(e, n) {
  87735. if (this.isStatic)
  87736. throw new Error("Can't compute a static facet");
  87737. return new r1(e, this, 1, n);
  87738. }
  87739. /**
  87740. Create an extension that computes zero or more values for this
  87741. facet from a state.
  87742. */
  87743. computeN(e, n) {
  87744. if (this.isStatic)
  87745. throw new Error("Can't compute a static facet");
  87746. return new r1(e, this, 2, n);
  87747. }
  87748. from(e, n) {
  87749. return n || (n = (r) => r), this.compute([e], (r) => n(r.field(e)));
  87750. }
  87751. }
  87752. function e4(t, e) {
  87753. return t == e || t.length == e.length && t.every((n, r) => n === e[r]);
  87754. }
  87755. class r1 {
  87756. constructor(e, n, r, i) {
  87757. this.dependencies = e, this.facet = n, this.type = r, this.value = i, this.id = JL++;
  87758. }
  87759. dynamicSlot(e) {
  87760. var n;
  87761. let r = this.value, i = this.facet.compareInput, a = this.id, o = e[a] >> 1, s = this.type == 2, l = !1, u = !1, c = [];
  87762. for (let f of this.dependencies)
  87763. f == "doc" ? l = !0 : f == "selection" ? u = !0 : ((n = e[f.id]) !== null && n !== void 0 ? n : 1) & 1 || c.push(e[f.id]);
  87764. return {
  87765. create(f) {
  87766. return f.values[o] = r(f), 1;
  87767. },
  87768. update(f, d) {
  87769. if (l && d.docChanged || u && (d.docChanged || d.selection) || iM(f, c)) {
  87770. let h = r(f);
  87771. if (s ? !xH(h, f.values[o], i) : !i(h, f.values[o]))
  87772. return f.values[o] = h, 1;
  87773. }
  87774. return 0;
  87775. },
  87776. reconfigure: (f, d) => {
  87777. let h, p = d.config.address[a];
  87778. if (p != null) {
  87779. let v = tS(d, p);
  87780. 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 ? xH(h = r(f), v, i) : i(h = r(f), v)))
  87781. return f.values[o] = v, 0;
  87782. } else
  87783. h = r(f);
  87784. return f.values[o] = h, 1;
  87785. }
  87786. };
  87787. }
  87788. }
  87789. function xH(t, e, n) {
  87790. if (t.length != e.length)
  87791. return !1;
  87792. for (let r = 0; r < t.length; r++)
  87793. if (!n(t[r], e[r]))
  87794. return !1;
  87795. return !0;
  87796. }
  87797. function iM(t, e) {
  87798. let n = !1;
  87799. for (let r of e)
  87800. Fg(t, r) & 1 && (n = !0);
  87801. return n;
  87802. }
  87803. function vat(t, e, n) {
  87804. 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;
  87805. function s(l) {
  87806. let u = [];
  87807. for (let c = 0; c < r.length; c++) {
  87808. let f = tS(l, r[c]);
  87809. if (i[c] == 2)
  87810. for (let d of f)
  87811. u.push(d);
  87812. else
  87813. u.push(f);
  87814. }
  87815. return e.combine(u);
  87816. }
  87817. return {
  87818. create(l) {
  87819. for (let u of r)
  87820. Fg(l, u);
  87821. return l.values[o] = s(l), 1;
  87822. },
  87823. update(l, u) {
  87824. if (!iM(l, a))
  87825. return 0;
  87826. let c = s(l);
  87827. return e.compare(c, l.values[o]) ? 0 : (l.values[o] = c, 1);
  87828. },
  87829. reconfigure(l, u) {
  87830. let c = iM(l, r), f = u.config.facets[e.id], d = u.facet(e);
  87831. if (f && !c && e4(n, f))
  87832. return l.values[o] = d, 0;
  87833. let h = s(l);
  87834. return e.compare(h, d) ? (l.values[o] = d, 0) : (l.values[o] = h, 1);
  87835. }
  87836. };
  87837. }
  87838. const wH = /* @__PURE__ */ Be.define({ static: !0 });
  87839. class ur {
  87840. constructor(e, n, r, i, a) {
  87841. this.id = e, this.createF = n, this.updateF = r, this.compareF = i, this.spec = a, this.provides = void 0;
  87842. }
  87843. /**
  87844. Define a state field.
  87845. */
  87846. static define(e) {
  87847. let n = new ur(JL++, e.create, e.update, e.compare || ((r, i) => r === i), e);
  87848. return e.provide && (n.provides = e.provide(n)), n;
  87849. }
  87850. create(e) {
  87851. let n = e.facet(wH).find((r) => r.field == this);
  87852. return ((n == null ? void 0 : n.create) || this.createF)(e);
  87853. }
  87854. /**
  87855. @internal
  87856. */
  87857. slot(e) {
  87858. let n = e[this.id] >> 1;
  87859. return {
  87860. create: (r) => (r.values[n] = this.create(r), 1),
  87861. update: (r, i) => {
  87862. let a = r.values[n], o = this.updateF(a, i);
  87863. return this.compareF(a, o) ? 0 : (r.values[n] = o, 1);
  87864. },
  87865. reconfigure: (r, i) => i.config.address[this.id] != null ? (r.values[n] = i.field(this), 0) : (r.values[n] = this.create(r), 1)
  87866. };
  87867. }
  87868. /**
  87869. Returns an extension that enables this field and overrides the
  87870. way it is initialized. Can be useful when you need to provide a
  87871. non-default starting value for the field.
  87872. */
  87873. init(e) {
  87874. return [this, wH.of({ field: this, create: e })];
  87875. }
  87876. /**
  87877. State field instances can be used as
  87878. [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
  87879. given state.
  87880. */
  87881. get extension() {
  87882. return this;
  87883. }
  87884. }
  87885. const Pc = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
  87886. function Pv(t) {
  87887. return (e) => new sae(e, t);
  87888. }
  87889. const Eu = {
  87890. /**
  87891. The highest precedence level, for extensions that should end up
  87892. near the start of the precedence ordering.
  87893. */
  87894. highest: /* @__PURE__ */ Pv(Pc.highest),
  87895. /**
  87896. A higher-than-default precedence, for extensions that should
  87897. come before those with default precedence.
  87898. */
  87899. high: /* @__PURE__ */ Pv(Pc.high),
  87900. /**
  87901. The default precedence, which is also used for extensions
  87902. without an explicit precedence.
  87903. */
  87904. default: /* @__PURE__ */ Pv(Pc.default),
  87905. /**
  87906. A lower-than-default precedence.
  87907. */
  87908. low: /* @__PURE__ */ Pv(Pc.low),
  87909. /**
  87910. The lowest precedence level. Meant for things that should end up
  87911. near the end of the extension order.
  87912. */
  87913. lowest: /* @__PURE__ */ Pv(Pc.lowest)
  87914. };
  87915. class sae {
  87916. constructor(e, n) {
  87917. this.inner = e, this.prec = n;
  87918. }
  87919. }
  87920. class ry {
  87921. /**
  87922. Create an instance of this compartment to add to your [state
  87923. configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
  87924. */
  87925. of(e) {
  87926. return new aM(this, e);
  87927. }
  87928. /**
  87929. Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
  87930. reconfigures this compartment.
  87931. */
  87932. reconfigure(e) {
  87933. return ry.reconfigure.of({ compartment: this, extension: e });
  87934. }
  87935. /**
  87936. Get the current content of the compartment in the state, or
  87937. `undefined` if it isn't present.
  87938. */
  87939. get(e) {
  87940. return e.config.compartments.get(this);
  87941. }
  87942. }
  87943. class aM {
  87944. constructor(e, n) {
  87945. this.compartment = e, this.inner = n;
  87946. }
  87947. }
  87948. class eS {
  87949. constructor(e, n, r, i, a, o) {
  87950. 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; )
  87951. this.statusTemplate.push(
  87952. 0
  87953. /* SlotStatus.Unresolved */
  87954. );
  87955. }
  87956. staticFacet(e) {
  87957. let n = this.address[e.id];
  87958. return n == null ? e.default : this.staticValues[n >> 1];
  87959. }
  87960. static resolve(e, n, r) {
  87961. let i = [], a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
  87962. for (let d of gat(e, n, o))
  87963. d instanceof ur ? i.push(d) : (a[d.facet.id] || (a[d.facet.id] = [])).push(d);
  87964. let s = /* @__PURE__ */ Object.create(null), l = [], u = [];
  87965. for (let d of i)
  87966. s[d.id] = u.length << 1, u.push((h) => d.slot(h));
  87967. let c = r == null ? void 0 : r.config.facets;
  87968. for (let d in a) {
  87969. let h = a[d], p = h[0].facet, v = c && c[d] || [];
  87970. if (h.every(
  87971. (g) => g.type == 0
  87972. /* Provider.Static */
  87973. ))
  87974. if (s[p.id] = l.length << 1 | 1, e4(v, h))
  87975. l.push(r.facet(p));
  87976. else {
  87977. let g = p.combine(h.map((m) => m.value));
  87978. l.push(r && p.compare(g, r.facet(p)) ? r.facet(p) : g);
  87979. }
  87980. else {
  87981. for (let g of h)
  87982. 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)));
  87983. s[p.id] = u.length << 1, u.push((g) => vat(g, p, h));
  87984. }
  87985. }
  87986. let f = u.map((d) => d(s));
  87987. return new eS(e, o, f, s, l, a);
  87988. }
  87989. }
  87990. function gat(t, e, n) {
  87991. let r = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
  87992. function a(o, s) {
  87993. let l = i.get(o);
  87994. if (l != null) {
  87995. if (l <= s)
  87996. return;
  87997. let u = r[l].indexOf(o);
  87998. u > -1 && r[l].splice(u, 1), o instanceof aM && n.delete(o.compartment);
  87999. }
  88000. if (i.set(o, s), Array.isArray(o))
  88001. for (let u of o)
  88002. a(u, s);
  88003. else if (o instanceof aM) {
  88004. if (n.has(o.compartment))
  88005. throw new RangeError("Duplicate use of compartment in extensions");
  88006. let u = e.get(o.compartment) || o.inner;
  88007. n.set(o.compartment, u), a(u, s);
  88008. } else if (o instanceof sae)
  88009. a(o.inner, o.prec);
  88010. else if (o instanceof ur)
  88011. r[s].push(o), o.provides && a(o.provides, s);
  88012. else if (o instanceof r1)
  88013. r[s].push(o), o.facet.extensions && a(o.facet.extensions, Pc.default);
  88014. else {
  88015. let u = o.extension;
  88016. if (!u)
  88017. throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
  88018. a(u, s);
  88019. }
  88020. }
  88021. return a(t, Pc.default), r.reduce((o, s) => o.concat(s));
  88022. }
  88023. function Fg(t, e) {
  88024. if (e & 1)
  88025. return 2;
  88026. let n = e >> 1, r = t.status[n];
  88027. if (r == 4)
  88028. throw new Error("Cyclic dependency between fields and/or facets");
  88029. if (r & 2)
  88030. return r;
  88031. t.status[n] = 4;
  88032. let i = t.computeSlot(t, t.config.dynamicSlots[n]);
  88033. return t.status[n] = 2 | i;
  88034. }
  88035. function tS(t, e) {
  88036. return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
  88037. }
  88038. const lae = /* @__PURE__ */ Be.define(), oM = /* @__PURE__ */ Be.define({
  88039. combine: (t) => t.some((e) => e),
  88040. static: !0
  88041. }), uae = /* @__PURE__ */ Be.define({
  88042. combine: (t) => t.length ? t[0] : void 0,
  88043. static: !0
  88044. }), cae = /* @__PURE__ */ Be.define(), fae = /* @__PURE__ */ Be.define(), dae = /* @__PURE__ */ Be.define(), hae = /* @__PURE__ */ Be.define({
  88045. combine: (t) => t.length ? t[0] : !1
  88046. });
  88047. class ul {
  88048. /**
  88049. @internal
  88050. */
  88051. constructor(e, n) {
  88052. this.type = e, this.value = n;
  88053. }
  88054. /**
  88055. Define a new type of annotation.
  88056. */
  88057. static define() {
  88058. return new mat();
  88059. }
  88060. }
  88061. class mat {
  88062. /**
  88063. Create an instance of this annotation.
  88064. */
  88065. of(e) {
  88066. return new ul(this, e);
  88067. }
  88068. }
  88069. class yat {
  88070. /**
  88071. @internal
  88072. */
  88073. constructor(e) {
  88074. this.map = e;
  88075. }
  88076. /**
  88077. Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
  88078. type.
  88079. */
  88080. of(e) {
  88081. return new dt(this, e);
  88082. }
  88083. }
  88084. class dt {
  88085. /**
  88086. @internal
  88087. */
  88088. constructor(e, n) {
  88089. this.type = e, this.value = n;
  88090. }
  88091. /**
  88092. Map this effect through a position mapping. Will return
  88093. `undefined` when that ends up deleting the effect.
  88094. */
  88095. map(e) {
  88096. let n = this.type.map(this.value, e);
  88097. return n === void 0 ? void 0 : n == this.value ? this : new dt(this.type, n);
  88098. }
  88099. /**
  88100. Tells you whether this effect object is of a given
  88101. [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
  88102. */
  88103. is(e) {
  88104. return this.type == e;
  88105. }
  88106. /**
  88107. Define a new effect type. The type parameter indicates the type
  88108. of values that his effect holds. It should be a type that
  88109. doesn't include `undefined`, since that is used in
  88110. [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
  88111. removed.
  88112. */
  88113. static define(e = {}) {
  88114. return new yat(e.map || ((n) => n));
  88115. }
  88116. /**
  88117. Map an array of effects through a change set.
  88118. */
  88119. static mapEffects(e, n) {
  88120. if (!e.length)
  88121. return e;
  88122. let r = [];
  88123. for (let i of e) {
  88124. let a = i.map(n);
  88125. a && r.push(a);
  88126. }
  88127. return r;
  88128. }
  88129. }
  88130. dt.reconfigure = /* @__PURE__ */ dt.define();
  88131. dt.appendConfig = /* @__PURE__ */ dt.define();
  88132. class Fn {
  88133. constructor(e, n, r, i, a, o) {
  88134. 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 && oae(r, n.newLength), a.some((s) => s.type == Fn.time) || (this.annotations = a.concat(Fn.time.of(Date.now())));
  88135. }
  88136. /**
  88137. @internal
  88138. */
  88139. static create(e, n, r, i, a, o) {
  88140. return new Fn(e, n, r, i, a, o);
  88141. }
  88142. /**
  88143. The new document produced by the transaction. Contrary to
  88144. [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
  88145. force the entire new state to be computed right away, so it is
  88146. recommended that [transaction
  88147. filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
  88148. when they need to look at the new document.
  88149. */
  88150. get newDoc() {
  88151. return this._doc || (this._doc = this.changes.apply(this.startState.doc));
  88152. }
  88153. /**
  88154. The new selection produced by the transaction. If
  88155. [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
  88156. this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
  88157. current selection through the changes made by the transaction.
  88158. */
  88159. get newSelection() {
  88160. return this.selection || this.startState.selection.map(this.changes);
  88161. }
  88162. /**
  88163. The new state created by the transaction. Computed on demand
  88164. (but retained for subsequent access), so it is recommended not to
  88165. access it in [transaction
  88166. filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
  88167. */
  88168. get state() {
  88169. return this._state || this.startState.applyTransaction(this), this._state;
  88170. }
  88171. /**
  88172. Get the value of the given annotation type, if any.
  88173. */
  88174. annotation(e) {
  88175. for (let n of this.annotations)
  88176. if (n.type == e)
  88177. return n.value;
  88178. }
  88179. /**
  88180. Indicates whether the transaction changed the document.
  88181. */
  88182. get docChanged() {
  88183. return !this.changes.empty;
  88184. }
  88185. /**
  88186. Indicates whether this transaction reconfigures the state
  88187. (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
  88188. with a top-level configuration
  88189. [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
  88190. */
  88191. get reconfigured() {
  88192. return this.startState.config != this.state.config;
  88193. }
  88194. /**
  88195. Returns true if the transaction has a [user
  88196. event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
  88197. or more specific than `event`. For example, if the transaction
  88198. has `"select.pointer"` as user event, `"select"` and
  88199. `"select.pointer"` will match it.
  88200. */
  88201. isUserEvent(e) {
  88202. let n = this.annotation(Fn.userEvent);
  88203. return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
  88204. }
  88205. }
  88206. Fn.time = /* @__PURE__ */ ul.define();
  88207. Fn.userEvent = /* @__PURE__ */ ul.define();
  88208. Fn.addToHistory = /* @__PURE__ */ ul.define();
  88209. Fn.remote = /* @__PURE__ */ ul.define();
  88210. function bat(t, e) {
  88211. let n = [];
  88212. for (let r = 0, i = 0; ; ) {
  88213. let a, o;
  88214. if (r < t.length && (i == e.length || e[i] >= t[r]))
  88215. a = t[r++], o = t[r++];
  88216. else if (i < e.length)
  88217. a = e[i++], o = e[i++];
  88218. else
  88219. return n;
  88220. !n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
  88221. }
  88222. }
  88223. function pae(t, e, n) {
  88224. var r;
  88225. let i, a, o;
  88226. 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)), {
  88227. changes: o,
  88228. selection: e.selection ? e.selection.map(a) : (r = t.selection) === null || r === void 0 ? void 0 : r.map(i),
  88229. effects: dt.mapEffects(t.effects, i).concat(dt.mapEffects(e.effects, a)),
  88230. annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
  88231. scrollIntoView: t.scrollIntoView || e.scrollIntoView
  88232. };
  88233. }
  88234. function sM(t, e, n) {
  88235. let r = e.selection, i = sh(e.annotations);
  88236. return e.userEvent && (i = i.concat(Fn.userEvent.of(e.userEvent))), {
  88237. changes: e.changes instanceof jn ? e.changes : jn.of(e.changes || [], n, t.facet(uae)),
  88238. selection: r && (r instanceof me ? r : me.single(r.anchor, r.head)),
  88239. effects: sh(e.effects),
  88240. annotations: i,
  88241. scrollIntoView: !!e.scrollIntoView
  88242. };
  88243. }
  88244. function vae(t, e, n) {
  88245. let r = sM(t, e.length ? e[0] : {}, t.doc.length);
  88246. e.length && e[0].filter === !1 && (n = !1);
  88247. for (let a = 1; a < e.length; a++) {
  88248. e[a].filter === !1 && (n = !1);
  88249. let o = !!e[a].sequential;
  88250. r = pae(r, sM(t, e[a], o ? r.changes.newLength : t.doc.length), o);
  88251. }
  88252. let i = Fn.create(t, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
  88253. return Oat(n ? _at(i) : i);
  88254. }
  88255. function _at(t) {
  88256. let e = t.startState, n = !0;
  88257. for (let i of e.facet(cae)) {
  88258. let a = i(t);
  88259. if (a === !1) {
  88260. n = !1;
  88261. break;
  88262. }
  88263. Array.isArray(a) && (n = n === !0 ? a : bat(n, a));
  88264. }
  88265. if (n !== !0) {
  88266. let i, a;
  88267. if (n === !1)
  88268. a = t.changes.invertedDesc, i = jn.empty(e.doc.length);
  88269. else {
  88270. let o = t.changes.filter(n);
  88271. i = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
  88272. }
  88273. t = Fn.create(e, i, t.selection && t.selection.map(a), dt.mapEffects(t.effects, a), t.annotations, t.scrollIntoView);
  88274. }
  88275. let r = e.facet(fae);
  88276. for (let i = r.length - 1; i >= 0; i--) {
  88277. let a = r[i](t);
  88278. a instanceof Fn ? t = a : Array.isArray(a) && a.length == 1 && a[0] instanceof Fn ? t = a[0] : t = vae(e, sh(a), !1);
  88279. }
  88280. return t;
  88281. }
  88282. function Oat(t) {
  88283. let e = t.startState, n = e.facet(dae), r = t;
  88284. for (let i = n.length - 1; i >= 0; i--) {
  88285. let a = n[i](t);
  88286. a && Object.keys(a).length && (r = pae(r, sM(e, a, t.changes.newLength), !0));
  88287. }
  88288. return r == t ? t : Fn.create(e, t.changes, t.selection, r.effects, r.annotations, r.scrollIntoView);
  88289. }
  88290. const Sat = [];
  88291. function sh(t) {
  88292. return t == null ? Sat : Array.isArray(t) ? t : [t];
  88293. }
  88294. var yn = /* @__PURE__ */ function(t) {
  88295. return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
  88296. }(yn || (yn = {}));
  88297. const xat = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
  88298. let lM;
  88299. try {
  88300. lM = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
  88301. } catch {
  88302. }
  88303. function wat(t) {
  88304. if (lM)
  88305. return lM.test(t);
  88306. for (let e = 0; e < t.length; e++) {
  88307. let n = t[e];
  88308. if (/\w/.test(n) || n > "€" && (n.toUpperCase() != n.toLowerCase() || xat.test(n)))
  88309. return !0;
  88310. }
  88311. return !1;
  88312. }
  88313. function Cat(t) {
  88314. return (e) => {
  88315. if (!/\S/.test(e))
  88316. return yn.Space;
  88317. if (wat(e))
  88318. return yn.Word;
  88319. for (let n = 0; n < t.length; n++)
  88320. if (e.indexOf(t[n]) > -1)
  88321. return yn.Word;
  88322. return yn.Other;
  88323. };
  88324. }
  88325. class At {
  88326. constructor(e, n, r, i, a, o) {
  88327. this.config = e, this.doc = n, this.selection = r, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = a, o && (o._state = this);
  88328. for (let s = 0; s < this.config.dynamicSlots.length; s++)
  88329. Fg(this, s << 1);
  88330. this.computeSlot = null;
  88331. }
  88332. field(e, n = !0) {
  88333. let r = this.config.address[e.id];
  88334. if (r == null) {
  88335. if (n)
  88336. throw new RangeError("Field is not present in this state");
  88337. return;
  88338. }
  88339. return Fg(this, r), tS(this, r);
  88340. }
  88341. /**
  88342. Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
  88343. state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
  88344. can be passed. Unless
  88345. [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
  88346. [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
  88347. are assumed to start in the _current_ document (not the document
  88348. produced by previous specs), and its
  88349. [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
  88350. [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
  88351. to the document created by its _own_ changes. The resulting
  88352. transaction contains the combined effect of all the different
  88353. specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
  88354. specs take precedence over earlier ones.
  88355. */
  88356. update(...e) {
  88357. return vae(this, e, !0);
  88358. }
  88359. /**
  88360. @internal
  88361. */
  88362. applyTransaction(e) {
  88363. let n = this.config, { base: r, compartments: i } = n;
  88364. for (let s of e.effects)
  88365. s.is(ry.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 = sh(r).concat(s.value));
  88366. let a;
  88367. n ? a = e.startState.values.slice() : (n = eS.resolve(r, i, this), a = new At(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
  88368. let o = e.startState.facet(oM) ? e.newSelection : e.newSelection.asSingle();
  88369. new At(n, e.newDoc, o, a, (s, l) => l.update(s, e), e);
  88370. }
  88371. /**
  88372. Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
  88373. replaces every selection range with the given content.
  88374. */
  88375. replaceSelection(e) {
  88376. return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
  88377. changes: { from: n.from, to: n.to, insert: e },
  88378. range: me.cursor(n.from + e.length)
  88379. }));
  88380. }
  88381. /**
  88382. Create a set of changes and a new selection by running the given
  88383. function for each range in the active selection. The function
  88384. can return an optional set of changes (in the coordinate space
  88385. of the start document), plus an updated range (in the coordinate
  88386. space of the document produced by the call's own changes). This
  88387. method will merge all the changes and ranges into a single
  88388. changeset and selection, and return it as a [transaction
  88389. spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
  88390. [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
  88391. */
  88392. changeByRange(e) {
  88393. let n = this.selection, r = e(n.ranges[0]), i = this.changes(r.changes), a = [r.range], o = sh(r.effects);
  88394. for (let s = 1; s < n.ranges.length; s++) {
  88395. let l = e(n.ranges[s]), u = this.changes(l.changes), c = u.map(i);
  88396. for (let d = 0; d < s; d++)
  88397. a[d] = a[d].map(c);
  88398. let f = i.mapDesc(u, !0);
  88399. a.push(l.range.map(f)), i = i.compose(c), o = dt.mapEffects(o, c).concat(dt.mapEffects(sh(l.effects), f));
  88400. }
  88401. return {
  88402. changes: i,
  88403. selection: me.create(a, n.mainIndex),
  88404. effects: o
  88405. };
  88406. }
  88407. /**
  88408. Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
  88409. description, taking the state's document length and line
  88410. separator into account.
  88411. */
  88412. changes(e = []) {
  88413. return e instanceof jn ? e : jn.of(e, this.doc.length, this.facet(At.lineSeparator));
  88414. }
  88415. /**
  88416. Using the state's [line
  88417. separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
  88418. [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
  88419. */
  88420. toText(e) {
  88421. return Ft.of(e.split(this.facet(At.lineSeparator) || tM));
  88422. }
  88423. /**
  88424. Return the given range of the document as a string.
  88425. */
  88426. sliceDoc(e = 0, n = this.doc.length) {
  88427. return this.doc.sliceString(e, n, this.lineBreak);
  88428. }
  88429. /**
  88430. Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
  88431. */
  88432. facet(e) {
  88433. let n = this.config.address[e.id];
  88434. return n == null ? e.default : (Fg(this, n), tS(this, n));
  88435. }
  88436. /**
  88437. Convert this state to a JSON-serializable object. When custom
  88438. fields should be serialized, you can pass them in as an object
  88439. mapping property names (in the resulting object, which should
  88440. not use `doc` or `selection`) to fields.
  88441. */
  88442. toJSON(e) {
  88443. let n = {
  88444. doc: this.sliceDoc(),
  88445. selection: this.selection.toJSON()
  88446. };
  88447. if (e)
  88448. for (let r in e) {
  88449. let i = e[r];
  88450. i instanceof ur && this.config.address[i.id] != null && (n[r] = i.spec.toJSON(this.field(e[r]), this));
  88451. }
  88452. return n;
  88453. }
  88454. /**
  88455. Deserialize a state from its JSON representation. When custom
  88456. fields should be deserialized, pass the same object you passed
  88457. to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
  88458. third argument.
  88459. */
  88460. static fromJSON(e, n = {}, r) {
  88461. if (!e || typeof e.doc != "string")
  88462. throw new RangeError("Invalid JSON representation for EditorState");
  88463. let i = [];
  88464. if (r) {
  88465. for (let a in r)
  88466. if (Object.prototype.hasOwnProperty.call(e, a)) {
  88467. let o = r[a], s = e[a];
  88468. i.push(o.init((l) => o.spec.fromJSON(s, l)));
  88469. }
  88470. }
  88471. return At.create({
  88472. doc: e.doc,
  88473. selection: me.fromJSON(e.selection),
  88474. extensions: n.extensions ? i.concat([n.extensions]) : i
  88475. });
  88476. }
  88477. /**
  88478. Create a new state. You'll usually only need this when
  88479. initializing an editor—updated states are created by applying
  88480. transactions.
  88481. */
  88482. static create(e = {}) {
  88483. let n = eS.resolve(e.extensions || [], /* @__PURE__ */ new Map()), r = e.doc instanceof Ft ? e.doc : Ft.of((e.doc || "").split(n.staticFacet(At.lineSeparator) || tM)), i = e.selection ? e.selection instanceof me ? e.selection : me.single(e.selection.anchor, e.selection.head) : me.single(0);
  88484. return oae(i, r.length), n.staticFacet(oM) || (i = i.asSingle()), new At(n, r, i, n.dynamicSlots.map(() => null), (a, o) => o.create(a), null);
  88485. }
  88486. /**
  88487. The size (in columns) of a tab in the document, determined by
  88488. the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
  88489. */
  88490. get tabSize() {
  88491. return this.facet(At.tabSize);
  88492. }
  88493. /**
  88494. Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
  88495. string for this state.
  88496. */
  88497. get lineBreak() {
  88498. return this.facet(At.lineSeparator) || `
  88499. `;
  88500. }
  88501. /**
  88502. Returns true when the editor is
  88503. [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
  88504. */
  88505. get readOnly() {
  88506. return this.facet(hae);
  88507. }
  88508. /**
  88509. Look up a translation for the given phrase (via the
  88510. [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
  88511. original string if no translation is found.
  88512. If additional arguments are passed, they will be inserted in
  88513. place of markers like `$1` (for the first value) and `$2`, etc.
  88514. A single `$` is equivalent to `$1`, and `$$` will produce a
  88515. literal dollar sign.
  88516. */
  88517. phrase(e, ...n) {
  88518. for (let r of this.facet(At.phrases))
  88519. if (Object.prototype.hasOwnProperty.call(r, e)) {
  88520. e = r[e];
  88521. break;
  88522. }
  88523. return n.length && (e = e.replace(/\$(\$|\d*)/g, (r, i) => {
  88524. if (i == "$")
  88525. return "$";
  88526. let a = +(i || 1);
  88527. return !a || a > n.length ? r : n[a - 1];
  88528. })), e;
  88529. }
  88530. /**
  88531. Find the values for a given language data field, provided by the
  88532. the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
  88533. Examples of language data fields are...
  88534. - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
  88535. comment syntax.
  88536. - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
  88537. for providing language-specific completion sources.
  88538. - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
  88539. characters that should be considered part of words in this
  88540. language.
  88541. - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
  88542. bracket closing behavior.
  88543. */
  88544. languageDataAt(e, n, r = -1) {
  88545. let i = [];
  88546. for (let a of this.facet(lae))
  88547. for (let o of a(this, n, r))
  88548. Object.prototype.hasOwnProperty.call(o, e) && i.push(o[e]);
  88549. return i;
  88550. }
  88551. /**
  88552. Return a function that can categorize strings (expected to
  88553. represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
  88554. into one of:
  88555. - Word (contains an alphanumeric character or a character
  88556. explicitly listed in the local language's `"wordChars"`
  88557. language data, which should be a string)
  88558. - Space (contains only whitespace)
  88559. - Other (anything else)
  88560. */
  88561. charCategorizer(e) {
  88562. return Cat(this.languageDataAt("wordChars", e).join(""));
  88563. }
  88564. /**
  88565. Find the word at the given position, meaning the range
  88566. containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
  88567. around it. If no word characters are adjacent to the position,
  88568. this returns null.
  88569. */
  88570. wordAt(e) {
  88571. let { text: n, from: r, length: i } = this.doc.lineAt(e), a = this.charCategorizer(e), o = e - r, s = e - r;
  88572. for (; o > 0; ) {
  88573. let l = _r(n, o, !1);
  88574. if (a(n.slice(l, o)) != yn.Word)
  88575. break;
  88576. o = l;
  88577. }
  88578. for (; s < i; ) {
  88579. let l = _r(n, s);
  88580. if (a(n.slice(s, l)) != yn.Word)
  88581. break;
  88582. s = l;
  88583. }
  88584. return o == s ? null : me.range(o + r, s + r);
  88585. }
  88586. }
  88587. At.allowMultipleSelections = oM;
  88588. At.tabSize = /* @__PURE__ */ Be.define({
  88589. combine: (t) => t.length ? t[0] : 4
  88590. });
  88591. At.lineSeparator = uae;
  88592. At.readOnly = hae;
  88593. At.phrases = /* @__PURE__ */ Be.define({
  88594. compare(t, e) {
  88595. let n = Object.keys(t), r = Object.keys(e);
  88596. return n.length == r.length && n.every((i) => t[i] == e[i]);
  88597. }
  88598. });
  88599. At.languageData = lae;
  88600. At.changeFilter = cae;
  88601. At.transactionFilter = fae;
  88602. At.transactionExtender = dae;
  88603. ry.reconfigure = /* @__PURE__ */ dt.define();
  88604. function fs(t, e, n = {}) {
  88605. let r = {};
  88606. for (let i of t)
  88607. for (let a of Object.keys(i)) {
  88608. let o = i[a], s = r[a];
  88609. if (s === void 0)
  88610. r[a] = o;
  88611. else if (!(s === o || o === void 0)) if (Object.hasOwnProperty.call(n, a))
  88612. r[a] = n[a](s, o);
  88613. else
  88614. throw new Error("Config merge conflict for field " + a);
  88615. }
  88616. for (let i in e)
  88617. r[i] === void 0 && (r[i] = e[i]);
  88618. return r;
  88619. }
  88620. class wf {
  88621. /**
  88622. Compare this value with another value. Used when comparing
  88623. rangesets. The default implementation compares by identity.
  88624. Unless you are only creating a fixed number of unique instances
  88625. of your value type, it is a good idea to implement this
  88626. properly.
  88627. */
  88628. eq(e) {
  88629. return this == e;
  88630. }
  88631. /**
  88632. Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
  88633. */
  88634. range(e, n = e) {
  88635. return uM.create(e, n, this);
  88636. }
  88637. }
  88638. wf.prototype.startSide = wf.prototype.endSide = 0;
  88639. wf.prototype.point = !1;
  88640. wf.prototype.mapMode = yr.TrackDel;
  88641. let uM = class gae {
  88642. constructor(e, n, r) {
  88643. this.from = e, this.to = n, this.value = r;
  88644. }
  88645. /**
  88646. @internal
  88647. */
  88648. static create(e, n, r) {
  88649. return new gae(e, n, r);
  88650. }
  88651. };
  88652. function cM(t, e) {
  88653. return t.from - e.from || t.value.startSide - e.value.startSide;
  88654. }
  88655. class t4 {
  88656. constructor(e, n, r, i) {
  88657. this.from = e, this.to = n, this.value = r, this.maxPoint = i;
  88658. }
  88659. get length() {
  88660. return this.to[this.to.length - 1];
  88661. }
  88662. // Find the index of the given position and side. Use the ranges'
  88663. // `from` pos when `end == false`, `to` when `end == true`.
  88664. findIndex(e, n, r, i = 0) {
  88665. let a = r ? this.to : this.from;
  88666. for (let o = i, s = a.length; ; ) {
  88667. if (o == s)
  88668. return o;
  88669. let l = o + s >> 1, u = a[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - n;
  88670. if (l == o)
  88671. return u >= 0 ? o : s;
  88672. u >= 0 ? s = l : o = l + 1;
  88673. }
  88674. }
  88675. between(e, n, r, i) {
  88676. for (let a = this.findIndex(n, -1e9, !0), o = this.findIndex(r, 1e9, !1, a); a < o; a++)
  88677. if (i(this.from[a] + e, this.to[a] + e, this.value[a]) === !1)
  88678. return !1;
  88679. }
  88680. map(e, n) {
  88681. let r = [], i = [], a = [], o = -1, s = -1;
  88682. for (let l = 0; l < this.value.length; l++) {
  88683. let u = this.value[l], c = this.from[l] + e, f = this.to[l] + e, d, h;
  88684. if (c == f) {
  88685. let p = n.mapPos(c, u.startSide, u.mapMode);
  88686. if (p == null || (d = h = p, u.startSide != u.endSide && (h = n.mapPos(c, u.endSide), h < d)))
  88687. continue;
  88688. } else if (d = n.mapPos(c, u.startSide), h = n.mapPos(f, u.endSide), d > h || d == h && u.startSide > 0 && u.endSide <= 0)
  88689. continue;
  88690. (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));
  88691. }
  88692. return { mapped: r.length ? new t4(i, a, r, s) : null, pos: o };
  88693. }
  88694. }
  88695. class Vt {
  88696. constructor(e, n, r, i) {
  88697. this.chunkPos = e, this.chunk = n, this.nextLayer = r, this.maxPoint = i;
  88698. }
  88699. /**
  88700. @internal
  88701. */
  88702. static create(e, n, r, i) {
  88703. return new Vt(e, n, r, i);
  88704. }
  88705. /**
  88706. @internal
  88707. */
  88708. get length() {
  88709. let e = this.chunk.length - 1;
  88710. return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
  88711. }
  88712. /**
  88713. The number of ranges in the set.
  88714. */
  88715. get size() {
  88716. if (this.isEmpty)
  88717. return 0;
  88718. let e = this.nextLayer.size;
  88719. for (let n of this.chunk)
  88720. e += n.value.length;
  88721. return e;
  88722. }
  88723. /**
  88724. @internal
  88725. */
  88726. chunkEnd(e) {
  88727. return this.chunkPos[e] + this.chunk[e].length;
  88728. }
  88729. /**
  88730. Update the range set, optionally adding new ranges or filtering
  88731. out existing ones.
  88732. (Note: The type parameter is just there as a kludge to work
  88733. around TypeScript variance issues that prevented `RangeSet<X>`
  88734. from being a subtype of `RangeSet<Y>` when `X` is a subtype of
  88735. `Y`.)
  88736. */
  88737. update(e) {
  88738. let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = e, o = e.filter;
  88739. if (n.length == 0 && !o)
  88740. return this;
  88741. if (r && (n = n.slice().sort(cM)), this.isEmpty)
  88742. return n.length ? Vt.of(n) : this;
  88743. let s = new mae(this, null, -1).goto(0), l = 0, u = [], c = new hu();
  88744. for (; s.value || l < n.length; )
  88745. if (l < n.length && (s.from - n[l].from || s.startSide - n[l].value.startSide) >= 0) {
  88746. let f = n[l++];
  88747. c.addInner(f.from, f.to, f.value) || u.push(f);
  88748. } 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(uM.create(s.from, s.to, s.value))), s.next());
  88749. return c.finishInner(this.nextLayer.isEmpty && !u.length ? Vt.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: i, filterTo: a }));
  88750. }
  88751. /**
  88752. Map this range set through a set of changes, return the new set.
  88753. */
  88754. map(e) {
  88755. if (e.empty || this.isEmpty)
  88756. return this;
  88757. let n = [], r = [], i = -1;
  88758. for (let o = 0; o < this.chunk.length; o++) {
  88759. let s = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(s, s + l.length);
  88760. if (u === !1)
  88761. i = Math.max(i, l.maxPoint), n.push(l), r.push(e.mapPos(s));
  88762. else if (u === !0) {
  88763. let { mapped: c, pos: f } = l.map(s, e);
  88764. c && (i = Math.max(i, c.maxPoint), n.push(c), r.push(f));
  88765. }
  88766. }
  88767. let a = this.nextLayer.map(e);
  88768. return n.length == 0 ? a : new Vt(r, n, a || Vt.empty, i);
  88769. }
  88770. /**
  88771. Iterate over the ranges that touch the region `from` to `to`,
  88772. calling `f` for each. There is no guarantee that the ranges will
  88773. be reported in any specific order. When the callback returns
  88774. `false`, iteration stops.
  88775. */
  88776. between(e, n, r) {
  88777. if (!this.isEmpty) {
  88778. for (let i = 0; i < this.chunk.length; i++) {
  88779. let a = this.chunkPos[i], o = this.chunk[i];
  88780. if (n >= a && e <= a + o.length && o.between(a, e - a, n - a, r) === !1)
  88781. return;
  88782. }
  88783. this.nextLayer.between(e, n, r);
  88784. }
  88785. }
  88786. /**
  88787. Iterate over the ranges in this set, in order, including all
  88788. ranges that end at or after `from`.
  88789. */
  88790. iter(e = 0) {
  88791. return jm.from([this]).goto(e);
  88792. }
  88793. /**
  88794. @internal
  88795. */
  88796. get isEmpty() {
  88797. return this.nextLayer == this;
  88798. }
  88799. /**
  88800. Iterate over the ranges in a collection of sets, in order,
  88801. starting from `from`.
  88802. */
  88803. static iter(e, n = 0) {
  88804. return jm.from(e).goto(n);
  88805. }
  88806. /**
  88807. Iterate over two groups of sets, calling methods on `comparator`
  88808. to notify it of possible differences.
  88809. */
  88810. static compare(e, n, r, i, a = -1) {
  88811. 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 = CH(o, s, r), u = new $v(o, l, a), c = new $v(s, l, a);
  88812. r.iterGaps((f, d, h) => TH(u, f, c, d, h, i)), r.empty && r.length == 0 && TH(u, 0, c, 0, 0, i);
  88813. }
  88814. /**
  88815. Compare the contents of two groups of range sets, returning true
  88816. if they are equivalent in the given range.
  88817. */
  88818. static eq(e, n, r = 0, i) {
  88819. i == null && (i = 999999999);
  88820. let a = e.filter((c) => !c.isEmpty && n.indexOf(c) < 0), o = n.filter((c) => !c.isEmpty && e.indexOf(c) < 0);
  88821. if (a.length != o.length)
  88822. return !1;
  88823. if (!a.length)
  88824. return !0;
  88825. let s = CH(a, o), l = new $v(a, s, 0).goto(r), u = new $v(o, s, 0).goto(r);
  88826. for (; ; ) {
  88827. if (l.to != u.to || !fM(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
  88828. return !1;
  88829. if (l.to > i)
  88830. return !0;
  88831. l.next(), u.next();
  88832. }
  88833. }
  88834. /**
  88835. Iterate over a group of range sets at the same time, notifying
  88836. the iterator about the ranges covering every given piece of
  88837. content. Returns the open count (see
  88838. [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
  88839. of the iteration.
  88840. */
  88841. static spans(e, n, r, i, a = -1) {
  88842. let o = new $v(e, null, a).goto(n), s = n, l = o.openStart;
  88843. for (; ; ) {
  88844. let u = Math.min(o.to, r);
  88845. if (o.point) {
  88846. let c = o.activeForPoint(o.to), f = o.pointFrom < n ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, l);
  88847. i.point(s, u, o.point, c, f, o.pointRank), l = Math.min(o.openEnd(u), c.length);
  88848. } else u > s && (i.span(s, u, o.active, l), l = o.openEnd(u));
  88849. if (o.to > r)
  88850. return l + (o.point && o.to > r ? 1 : 0);
  88851. s = o.to, o.next();
  88852. }
  88853. }
  88854. /**
  88855. Create a range set for the given range or array of ranges. By
  88856. default, this expects the ranges to be _sorted_ (by start
  88857. position and, if two start at the same position,
  88858. `value.startSide`). You can pass `true` as second argument to
  88859. cause the method to sort them.
  88860. */
  88861. static of(e, n = !1) {
  88862. let r = new hu();
  88863. for (let i of e instanceof uM ? [e] : n ? Tat(e) : e)
  88864. r.add(i.from, i.to, i.value);
  88865. return r.finish();
  88866. }
  88867. /**
  88868. Join an array of range sets into a single set.
  88869. */
  88870. static join(e) {
  88871. if (!e.length)
  88872. return Vt.empty;
  88873. let n = e[e.length - 1];
  88874. for (let r = e.length - 2; r >= 0; r--)
  88875. for (let i = e[r]; i != Vt.empty; i = i.nextLayer)
  88876. n = new Vt(i.chunkPos, i.chunk, n, Math.max(i.maxPoint, n.maxPoint));
  88877. return n;
  88878. }
  88879. }
  88880. Vt.empty = /* @__PURE__ */ new Vt([], [], null, -1);
  88881. function Tat(t) {
  88882. if (t.length > 1)
  88883. for (let e = t[0], n = 1; n < t.length; n++) {
  88884. let r = t[n];
  88885. if (cM(e, r) > 0)
  88886. return t.slice().sort(cM);
  88887. e = r;
  88888. }
  88889. return t;
  88890. }
  88891. Vt.empty.nextLayer = Vt.empty;
  88892. class hu {
  88893. finishChunk(e) {
  88894. this.chunks.push(new t4(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 = []);
  88895. }
  88896. /**
  88897. Create an empty builder.
  88898. */
  88899. constructor() {
  88900. 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;
  88901. }
  88902. /**
  88903. Add a range. Ranges should be added in sorted (by `from` and
  88904. `value.startSide`) order.
  88905. */
  88906. add(e, n, r) {
  88907. this.addInner(e, n, r) || (this.nextLayer || (this.nextLayer = new hu())).add(e, n, r);
  88908. }
  88909. /**
  88910. @internal
  88911. */
  88912. addInner(e, n, r) {
  88913. let i = e - this.lastTo || r.startSide - this.last.endSide;
  88914. if (i <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0)
  88915. throw new Error("Ranges must be added sorted by `from` position and `startSide`");
  88916. 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);
  88917. }
  88918. /**
  88919. @internal
  88920. */
  88921. addChunk(e, n) {
  88922. if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
  88923. return !1;
  88924. this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
  88925. let r = n.value.length - 1;
  88926. return this.last = n.value[r], this.lastFrom = n.from[r] + e, this.lastTo = n.to[r] + e, !0;
  88927. }
  88928. /**
  88929. Finish the range set. Returns the new set. The builder can't be
  88930. used anymore after this has been called.
  88931. */
  88932. finish() {
  88933. return this.finishInner(Vt.empty);
  88934. }
  88935. /**
  88936. @internal
  88937. */
  88938. finishInner(e) {
  88939. if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
  88940. return e;
  88941. let n = Vt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
  88942. return this.from = null, n;
  88943. }
  88944. }
  88945. function CH(t, e, n) {
  88946. let r = /* @__PURE__ */ new Map();
  88947. for (let a of t)
  88948. for (let o = 0; o < a.chunk.length; o++)
  88949. a.chunk[o].maxPoint <= 0 && r.set(a.chunk[o], a.chunkPos[o]);
  88950. let i = /* @__PURE__ */ new Set();
  88951. for (let a of e)
  88952. for (let o = 0; o < a.chunk.length; o++) {
  88953. let s = r.get(a.chunk[o]);
  88954. 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]);
  88955. }
  88956. return i;
  88957. }
  88958. class mae {
  88959. constructor(e, n, r, i = 0) {
  88960. this.layer = e, this.skip = n, this.minPoint = r, this.rank = i;
  88961. }
  88962. get startSide() {
  88963. return this.value ? this.value.startSide : 0;
  88964. }
  88965. get endSide() {
  88966. return this.value ? this.value.endSide : 0;
  88967. }
  88968. goto(e, n = -1e9) {
  88969. return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
  88970. }
  88971. gotoInner(e, n, r) {
  88972. for (; this.chunkIndex < this.layer.chunk.length; ) {
  88973. let i = this.layer.chunk[this.chunkIndex];
  88974. if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
  88975. break;
  88976. this.chunkIndex++, r = !1;
  88977. }
  88978. if (this.chunkIndex < this.layer.chunk.length) {
  88979. let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
  88980. (!r || this.rangeIndex < i) && this.setRangeIndex(i);
  88981. }
  88982. this.next();
  88983. }
  88984. forward(e, n) {
  88985. (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
  88986. }
  88987. next() {
  88988. for (; ; )
  88989. if (this.chunkIndex == this.layer.chunk.length) {
  88990. this.from = this.to = 1e9, this.value = null;
  88991. break;
  88992. } else {
  88993. let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], r = e + n.from[this.rangeIndex];
  88994. 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)
  88995. break;
  88996. }
  88997. }
  88998. setRangeIndex(e) {
  88999. if (e == this.layer.chunk[this.chunkIndex].value.length) {
  89000. if (this.chunkIndex++, this.skip)
  89001. for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
  89002. this.chunkIndex++;
  89003. this.rangeIndex = 0;
  89004. } else
  89005. this.rangeIndex = e;
  89006. }
  89007. nextChunk() {
  89008. this.chunkIndex++, this.rangeIndex = 0, this.next();
  89009. }
  89010. compare(e) {
  89011. return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
  89012. }
  89013. }
  89014. class jm {
  89015. constructor(e) {
  89016. this.heap = e;
  89017. }
  89018. static from(e, n = null, r = -1) {
  89019. let i = [];
  89020. for (let a = 0; a < e.length; a++)
  89021. for (let o = e[a]; !o.isEmpty; o = o.nextLayer)
  89022. o.maxPoint >= r && i.push(new mae(o, n, r, a));
  89023. return i.length == 1 ? i[0] : new jm(i);
  89024. }
  89025. get startSide() {
  89026. return this.value ? this.value.startSide : 0;
  89027. }
  89028. goto(e, n = -1e9) {
  89029. for (let r of this.heap)
  89030. r.goto(e, n);
  89031. for (let r = this.heap.length >> 1; r >= 0; r--)
  89032. h$(this.heap, r);
  89033. return this.next(), this;
  89034. }
  89035. forward(e, n) {
  89036. for (let r of this.heap)
  89037. r.forward(e, n);
  89038. for (let r = this.heap.length >> 1; r >= 0; r--)
  89039. h$(this.heap, r);
  89040. (this.to - e || this.value.endSide - n) < 0 && this.next();
  89041. }
  89042. next() {
  89043. if (this.heap.length == 0)
  89044. this.from = this.to = 1e9, this.value = null, this.rank = -1;
  89045. else {
  89046. let e = this.heap[0];
  89047. this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), h$(this.heap, 0);
  89048. }
  89049. }
  89050. }
  89051. function h$(t, e) {
  89052. for (let n = t[e]; ; ) {
  89053. let r = (e << 1) + 1;
  89054. if (r >= t.length)
  89055. break;
  89056. let i = t[r];
  89057. if (r + 1 < t.length && i.compare(t[r + 1]) >= 0 && (i = t[r + 1], r++), n.compare(i) < 0)
  89058. break;
  89059. t[r] = n, t[e] = i, e = r;
  89060. }
  89061. }
  89062. class $v {
  89063. constructor(e, n, r) {
  89064. 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 = jm.from(e, n, r);
  89065. }
  89066. goto(e, n = -1e9) {
  89067. 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;
  89068. }
  89069. forward(e, n) {
  89070. for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
  89071. this.removeActive(this.minActive);
  89072. this.cursor.forward(e, n);
  89073. }
  89074. removeActive(e) {
  89075. Qb(this.active, e), Qb(this.activeTo, e), Qb(this.activeRank, e), this.minActive = PH(this.active, this.activeTo);
  89076. }
  89077. addActive(e) {
  89078. let n = 0, { value: r, to: i, rank: a } = this.cursor;
  89079. for (; n < this.activeRank.length && (a - this.activeRank[n] || i - this.activeTo[n]) > 0; )
  89080. n++;
  89081. Hb(this.active, n, r), Hb(this.activeTo, n, i), Hb(this.activeRank, n, a), e && Hb(e, n, this.cursor.from), this.minActive = PH(this.active, this.activeTo);
  89082. }
  89083. // After calling this, if `this.point` != null, the next range is a
  89084. // point. Otherwise, it's a regular range, covered by `this.active`.
  89085. next() {
  89086. let e = this.to, n = this.point;
  89087. this.point = null;
  89088. let r = this.openStart < 0 ? [] : null;
  89089. for (; ; ) {
  89090. let i = this.minActive;
  89091. if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
  89092. if (this.activeTo[i] > e) {
  89093. this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
  89094. break;
  89095. }
  89096. this.removeActive(i), r && Qb(r, i);
  89097. } else if (this.cursor.value)
  89098. if (this.cursor.from > e) {
  89099. this.to = this.cursor.from, this.endSide = this.cursor.startSide;
  89100. break;
  89101. } else {
  89102. let a = this.cursor.value;
  89103. if (!a.point)
  89104. this.addActive(r), this.cursor.next();
  89105. else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
  89106. this.cursor.next();
  89107. else {
  89108. 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);
  89109. break;
  89110. }
  89111. }
  89112. else {
  89113. this.to = this.endSide = 1e9;
  89114. break;
  89115. }
  89116. }
  89117. if (r) {
  89118. this.openStart = 0;
  89119. for (let i = r.length - 1; i >= 0 && r[i] < e; i--)
  89120. this.openStart++;
  89121. }
  89122. }
  89123. activeForPoint(e) {
  89124. if (!this.active.length)
  89125. return this.active;
  89126. let n = [];
  89127. for (let r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--)
  89128. (this.activeTo[r] > e || this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide) && n.push(this.active[r]);
  89129. return n.reverse();
  89130. }
  89131. openEnd(e) {
  89132. let n = 0;
  89133. for (let r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--)
  89134. n++;
  89135. return n;
  89136. }
  89137. }
  89138. function TH(t, e, n, r, i, a) {
  89139. t.goto(e), n.goto(r);
  89140. let o = r + i, s = r, l = r - e;
  89141. for (; ; ) {
  89142. let u = t.to + l - n.to || t.endSide - n.endSide, c = u < 0 ? t.to + l : n.to, f = Math.min(c, o);
  89143. if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && fM(t.activeForPoint(t.to), n.activeForPoint(n.to)) || a.comparePoint(s, f, t.point, n.point) : f > s && !fM(t.active, n.active) && a.compareRange(s, f, t.active, n.active), c > o)
  89144. break;
  89145. s = c, u <= 0 && t.next(), u >= 0 && n.next();
  89146. }
  89147. }
  89148. function fM(t, e) {
  89149. if (t.length != e.length)
  89150. return !1;
  89151. for (let n = 0; n < t.length; n++)
  89152. if (t[n] != e[n] && !t[n].eq(e[n]))
  89153. return !1;
  89154. return !0;
  89155. }
  89156. function Qb(t, e) {
  89157. for (let n = e, r = t.length - 1; n < r; n++)
  89158. t[n] = t[n + 1];
  89159. t.pop();
  89160. }
  89161. function Hb(t, e, n) {
  89162. for (let r = t.length - 1; r >= e; r--)
  89163. t[r + 1] = t[r];
  89164. t[e] = n;
  89165. }
  89166. function PH(t, e) {
  89167. let n = -1, r = 1e9;
  89168. for (let i = 0; i < e.length; i++)
  89169. (e[i] - r || t[i].endSide - t[n].endSide) < 0 && (n = i, r = e[i]);
  89170. return n;
  89171. }
  89172. function Rp(t, e, n = t.length) {
  89173. let r = 0;
  89174. for (let i = 0; i < n; )
  89175. t.charCodeAt(i) == 9 ? (r += e - r % e, i++) : (r++, i = _r(t, i));
  89176. return r;
  89177. }
  89178. function dM(t, e, n, r) {
  89179. for (let i = 0, a = 0; ; ) {
  89180. if (a >= e)
  89181. return i;
  89182. if (i == t.length)
  89183. break;
  89184. a += t.charCodeAt(i) == 9 ? n - a % n : 1, i = _r(t, i);
  89185. }
  89186. return r === !0 ? -1 : t.length;
  89187. }
  89188. const hM = "ͼ", $H = typeof Symbol > "u" ? "__" + hM : Symbol.for(hM), pM = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), AH = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
  89189. class pu {
  89190. // :: (Object<Style>, ?{finish: ?(string) → string})
  89191. // Create a style module from the given spec.
  89192. //
  89193. // When `finish` is given, it is called on regular (non-`@`)
  89194. // selectors (after `&` expansion) to compute the final selector.
  89195. constructor(e, n) {
  89196. this.rules = [];
  89197. let { finish: r } = n || {};
  89198. function i(o) {
  89199. return /^@/.test(o) ? [o] : o.split(/,\s*/);
  89200. }
  89201. function a(o, s, l, u) {
  89202. let c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes";
  89203. if (f && s == null) return l.push(o[0] + ";");
  89204. for (let h in s) {
  89205. let p = s[h];
  89206. if (/&/.test(h))
  89207. a(
  89208. h.split(/,\s*/).map((v) => o.map((g) => v.replace(/&/, g))).reduce((v, g) => v.concat(g)),
  89209. p,
  89210. l
  89211. );
  89212. else if (p && typeof p == "object") {
  89213. if (!f) throw new RangeError("The value of a property (" + h + ") should be a primitive value.");
  89214. a(i(h), p, c, d);
  89215. } else p != null && c.push(h.replace(/_.*/, "").replace(/[A-Z]/g, (v) => "-" + v.toLowerCase()) + ": " + p + ";");
  89216. }
  89217. (c.length || d) && l.push((r && !f && !u ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}");
  89218. }
  89219. for (let o in e) a(i(o), e[o], this.rules);
  89220. }
  89221. // :: () → string
  89222. // Returns a string containing the module's CSS rules.
  89223. getRules() {
  89224. return this.rules.join(`
  89225. `);
  89226. }
  89227. // :: () → string
  89228. // Generate a new unique CSS class name.
  89229. static newName() {
  89230. let e = AH[$H] || 1;
  89231. return AH[$H] = e + 1, hM + e.toString(36);
  89232. }
  89233. // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
  89234. //
  89235. // Mount the given set of modules in the given DOM root, which ensures
  89236. // that the CSS rules defined by the module are available in that
  89237. // context.
  89238. //
  89239. // Rules are only added to the document once per root.
  89240. //
  89241. // Rule order will follow the order of the modules, so that rules from
  89242. // modules later in the array take precedence of those from earlier
  89243. // modules. If you call this function multiple times for the same root
  89244. // in a way that changes the order of already mounted modules, the old
  89245. // order will be changed.
  89246. //
  89247. // If a Content Security Policy nonce is provided, it is added to
  89248. // the `<style>` tag generated by the library.
  89249. static mount(e, n, r) {
  89250. let i = e[pM], a = r && r.nonce;
  89251. i ? a && i.setNonce(a) : i = new Pat(e, a), i.mount(Array.isArray(n) ? n : [n], e);
  89252. }
  89253. }
  89254. let EH = /* @__PURE__ */ new Map();
  89255. class Pat {
  89256. constructor(e, n) {
  89257. let r = e.ownerDocument || e, i = r.defaultView;
  89258. if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) {
  89259. let a = EH.get(r);
  89260. if (a) return e[pM] = a;
  89261. this.sheet = new i.CSSStyleSheet(), EH.set(r, this);
  89262. } else
  89263. this.styleTag = r.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
  89264. this.modules = [], e[pM] = this;
  89265. }
  89266. mount(e, n) {
  89267. let r = this.sheet, i = 0, a = 0;
  89268. for (let o = 0; o < e.length; o++) {
  89269. let s = e[o], l = this.modules.indexOf(s);
  89270. if (l < a && l > -1 && (this.modules.splice(l, 1), a--, l = -1), l == -1) {
  89271. if (this.modules.splice(a++, 0, s), r) for (let u = 0; u < s.rules.length; u++)
  89272. r.insertRule(s.rules[u], i++);
  89273. } else {
  89274. for (; a < l; ) i += this.modules[a++].rules.length;
  89275. i += s.rules.length, a++;
  89276. }
  89277. }
  89278. if (r)
  89279. n.adoptedStyleSheets.indexOf(this.sheet) < 0 && (n.adoptedStyleSheets = [this.sheet, ...n.adoptedStyleSheets]);
  89280. else {
  89281. let o = "";
  89282. for (let l = 0; l < this.modules.length; l++)
  89283. o += this.modules[l].getRules() + `
  89284. `;
  89285. this.styleTag.textContent = o;
  89286. let s = n.head || n;
  89287. this.styleTag.parentNode != s && s.insertBefore(this.styleTag, s.firstChild);
  89288. }
  89289. }
  89290. setNonce(e) {
  89291. this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
  89292. }
  89293. }
  89294. var vu = {
  89295. 8: "Backspace",
  89296. 9: "Tab",
  89297. 10: "Enter",
  89298. 12: "NumLock",
  89299. 13: "Enter",
  89300. 16: "Shift",
  89301. 17: "Control",
  89302. 18: "Alt",
  89303. 20: "CapsLock",
  89304. 27: "Escape",
  89305. 32: " ",
  89306. 33: "PageUp",
  89307. 34: "PageDown",
  89308. 35: "End",
  89309. 36: "Home",
  89310. 37: "ArrowLeft",
  89311. 38: "ArrowUp",
  89312. 39: "ArrowRight",
  89313. 40: "ArrowDown",
  89314. 44: "PrintScreen",
  89315. 45: "Insert",
  89316. 46: "Delete",
  89317. 59: ";",
  89318. 61: "=",
  89319. 91: "Meta",
  89320. 92: "Meta",
  89321. 106: "*",
  89322. 107: "+",
  89323. 108: ",",
  89324. 109: "-",
  89325. 110: ".",
  89326. 111: "/",
  89327. 144: "NumLock",
  89328. 145: "ScrollLock",
  89329. 160: "Shift",
  89330. 161: "Shift",
  89331. 162: "Control",
  89332. 163: "Control",
  89333. 164: "Alt",
  89334. 165: "Alt",
  89335. 173: "-",
  89336. 186: ";",
  89337. 187: "=",
  89338. 188: ",",
  89339. 189: "-",
  89340. 190: ".",
  89341. 191: "/",
  89342. 192: "`",
  89343. 219: "[",
  89344. 220: "\\",
  89345. 221: "]",
  89346. 222: "'"
  89347. }, Zm = {
  89348. 48: ")",
  89349. 49: "!",
  89350. 50: "@",
  89351. 51: "#",
  89352. 52: "$",
  89353. 53: "%",
  89354. 54: "^",
  89355. 55: "&",
  89356. 56: "*",
  89357. 57: "(",
  89358. 59: ":",
  89359. 61: "+",
  89360. 173: "_",
  89361. 186: ":",
  89362. 187: "+",
  89363. 188: "<",
  89364. 189: "_",
  89365. 190: ">",
  89366. 191: "?",
  89367. 192: "~",
  89368. 219: "{",
  89369. 220: "|",
  89370. 221: "}",
  89371. 222: '"'
  89372. }, $at = typeof navigator < "u" && /Mac/.test(navigator.platform), Aat = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
  89373. for (var mr = 0; mr < 10; mr++) vu[48 + mr] = vu[96 + mr] = String(mr);
  89374. for (var mr = 1; mr <= 24; mr++) vu[mr + 111] = "F" + mr;
  89375. for (var mr = 65; mr <= 90; mr++)
  89376. vu[mr] = String.fromCharCode(mr + 32), Zm[mr] = String.fromCharCode(mr);
  89377. for (var p$ in vu) Zm.hasOwnProperty(p$) || (Zm[p$] = vu[p$]);
  89378. function Eat(t) {
  89379. var e = $at && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Aat && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Zm : vu)[t.keyCode] || t.key || "Unidentified";
  89380. 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;
  89381. }
  89382. function Um(t) {
  89383. let e;
  89384. return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
  89385. }
  89386. function vM(t, e) {
  89387. return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
  89388. }
  89389. function Mat(t) {
  89390. let e = t.activeElement;
  89391. for (; e && e.shadowRoot; )
  89392. e = e.shadowRoot.activeElement;
  89393. return e;
  89394. }
  89395. function i1(t, e) {
  89396. if (!e.anchorNode)
  89397. return !1;
  89398. try {
  89399. return vM(t, e.anchorNode);
  89400. } catch {
  89401. return !1;
  89402. }
  89403. }
  89404. function Uh(t) {
  89405. return t.nodeType == 3 ? Tf(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
  89406. }
  89407. function Wg(t, e, n, r) {
  89408. return n ? MH(t, e, n, r, -1) || MH(t, e, n, r, 1) : !1;
  89409. }
  89410. function Cf(t) {
  89411. for (var e = 0; ; e++)
  89412. if (t = t.previousSibling, !t)
  89413. return e;
  89414. }
  89415. function nS(t) {
  89416. return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
  89417. }
  89418. function MH(t, e, n, r, i) {
  89419. for (; ; ) {
  89420. if (t == n && e == r)
  89421. return !0;
  89422. if (e == (i < 0 ? 0 : Js(t))) {
  89423. if (t.nodeName == "DIV")
  89424. return !1;
  89425. let a = t.parentNode;
  89426. if (!a || a.nodeType != 1)
  89427. return !1;
  89428. e = Cf(t) + (i < 0 ? 0 : 1), t = a;
  89429. } else if (t.nodeType == 1) {
  89430. if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
  89431. return !1;
  89432. e = i < 0 ? Js(t) : 0;
  89433. } else
  89434. return !1;
  89435. }
  89436. }
  89437. function Js(t) {
  89438. return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
  89439. }
  89440. function Iw(t, e) {
  89441. let n = e ? t.left : t.right;
  89442. return { left: n, right: n, top: t.top, bottom: t.bottom };
  89443. }
  89444. function Iat(t) {
  89445. let e = t.visualViewport;
  89446. return e ? {
  89447. left: 0,
  89448. right: e.width,
  89449. top: 0,
  89450. bottom: e.height
  89451. } : {
  89452. left: 0,
  89453. right: t.innerWidth,
  89454. top: 0,
  89455. bottom: t.innerHeight
  89456. };
  89457. }
  89458. function yae(t, e) {
  89459. let n = e.width / t.offsetWidth, r = e.height / t.offsetHeight;
  89460. 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 };
  89461. }
  89462. function Dat(t, e, n, r, i, a, o, s) {
  89463. let l = t.ownerDocument, u = l.defaultView || window;
  89464. for (let c = t, f = !1; c && !f; )
  89465. if (c.nodeType == 1) {
  89466. let d, h = c == l.body, p = 1, v = 1;
  89467. if (h)
  89468. d = Iat(u);
  89469. else {
  89470. if (/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) {
  89471. c = c.assignedSlot || c.parentNode;
  89472. continue;
  89473. }
  89474. let y = c.getBoundingClientRect();
  89475. ({ scaleX: p, scaleY: v } = yae(c, y)), d = {
  89476. left: y.left,
  89477. right: y.left + c.clientWidth * p,
  89478. top: y.top,
  89479. bottom: y.top + c.clientHeight * v
  89480. };
  89481. }
  89482. let g = 0, m = 0;
  89483. if (i == "nearest")
  89484. 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)));
  89485. else {
  89486. let y = e.bottom - e.top, b = d.bottom - d.top;
  89487. 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;
  89488. }
  89489. 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)
  89490. if (h)
  89491. u.scrollBy(g, m);
  89492. else {
  89493. let y = 0, b = 0;
  89494. if (m) {
  89495. let _ = c.scrollTop;
  89496. c.scrollTop += m / v, b = (c.scrollTop - _) * v;
  89497. }
  89498. if (g) {
  89499. let _ = c.scrollLeft;
  89500. c.scrollLeft += g / p, y = (c.scrollLeft - _) * p;
  89501. }
  89502. e = {
  89503. left: e.left - y,
  89504. top: e.top - b,
  89505. right: e.right - y,
  89506. bottom: e.bottom - b
  89507. }, y && Math.abs(y - g) < 1 && (r = "nearest"), b && Math.abs(b - m) < 1 && (i = "nearest");
  89508. }
  89509. if (h)
  89510. break;
  89511. c = c.assignedSlot || c.parentNode;
  89512. } else if (c.nodeType == 11)
  89513. c = c.host;
  89514. else
  89515. break;
  89516. }
  89517. function Rat(t) {
  89518. let e = t.ownerDocument;
  89519. for (let n = t.parentNode; n && n != e.body; )
  89520. if (n.nodeType == 1) {
  89521. if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
  89522. return n;
  89523. n = n.assignedSlot || n.parentNode;
  89524. } else if (n.nodeType == 11)
  89525. n = n.host;
  89526. else
  89527. break;
  89528. return null;
  89529. }
  89530. class kat {
  89531. constructor() {
  89532. this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
  89533. }
  89534. eq(e) {
  89535. return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
  89536. }
  89537. setRange(e) {
  89538. let { anchorNode: n, focusNode: r } = e;
  89539. this.set(n, Math.min(e.anchorOffset, n ? Js(n) : 0), r, Math.min(e.focusOffset, r ? Js(r) : 0));
  89540. }
  89541. set(e, n, r, i) {
  89542. this.anchorNode = e, this.anchorOffset = n, this.focusNode = r, this.focusOffset = i;
  89543. }
  89544. }
  89545. let xd = null;
  89546. function bae(t) {
  89547. if (t.setActive)
  89548. return t.setActive();
  89549. if (xd)
  89550. return t.focus(xd);
  89551. let e = [];
  89552. for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
  89553. ;
  89554. if (t.focus(xd == null ? {
  89555. get preventScroll() {
  89556. return xd = { preventScroll: !0 }, !0;
  89557. }
  89558. } : void 0), !xd) {
  89559. xd = !1;
  89560. for (let n = 0; n < e.length; ) {
  89561. let r = e[n++], i = e[n++], a = e[n++];
  89562. r.scrollTop != i && (r.scrollTop = i), r.scrollLeft != a && (r.scrollLeft = a);
  89563. }
  89564. }
  89565. }
  89566. let IH;
  89567. function Tf(t, e, n = e) {
  89568. let r = IH || (IH = document.createRange());
  89569. return r.setEnd(t, n), r.setStart(t, e), r;
  89570. }
  89571. function lh(t, e, n, r) {
  89572. let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 };
  89573. r && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = r);
  89574. let a = new KeyboardEvent("keydown", i);
  89575. a.synthetic = !0, t.dispatchEvent(a);
  89576. let o = new KeyboardEvent("keyup", i);
  89577. return o.synthetic = !0, t.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented;
  89578. }
  89579. function Lat(t) {
  89580. for (; t; ) {
  89581. if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
  89582. return t;
  89583. t = t.assignedSlot || t.parentNode;
  89584. }
  89585. return null;
  89586. }
  89587. function _ae(t) {
  89588. for (; t.attributes.length; )
  89589. t.removeAttributeNode(t.attributes[0]);
  89590. }
  89591. function Nat(t, e) {
  89592. let n = e.focusNode, r = e.focusOffset;
  89593. if (!n || e.anchorNode != n || e.anchorOffset != r)
  89594. return !1;
  89595. for (r = Math.min(r, Js(n)); ; )
  89596. if (r) {
  89597. if (n.nodeType != 1)
  89598. return !1;
  89599. let i = n.childNodes[r - 1];
  89600. i.contentEditable == "false" ? r-- : (n = i, r = Js(n));
  89601. } else {
  89602. if (n == t)
  89603. return !0;
  89604. r = Cf(n), n = n.parentNode;
  89605. }
  89606. }
  89607. function Oae(t) {
  89608. return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
  89609. }
  89610. function Sae(t, e) {
  89611. for (let n = t, r = e; ; ) {
  89612. if (n.nodeType == 3 && r > 0)
  89613. return { node: n, offset: r };
  89614. if (n.nodeType == 1 && r > 0) {
  89615. if (n.contentEditable == "false")
  89616. return null;
  89617. n = n.childNodes[r - 1], r = Js(n);
  89618. } else if (n.parentNode && !nS(n))
  89619. r = Cf(n), n = n.parentNode;
  89620. else
  89621. return null;
  89622. }
  89623. }
  89624. function xae(t, e) {
  89625. for (let n = t, r = e; ; ) {
  89626. if (n.nodeType == 3 && r < n.nodeValue.length)
  89627. return { node: n, offset: r };
  89628. if (n.nodeType == 1 && r < n.childNodes.length) {
  89629. if (n.contentEditable == "false")
  89630. return null;
  89631. n = n.childNodes[r], r = 0;
  89632. } else if (n.parentNode && !nS(n))
  89633. r = Cf(n) + 1, n = n.parentNode;
  89634. else
  89635. return null;
  89636. }
  89637. }
  89638. class kr {
  89639. constructor(e, n, r = !0) {
  89640. this.node = e, this.offset = n, this.precise = r;
  89641. }
  89642. static before(e, n) {
  89643. return new kr(e.parentNode, Cf(e), n);
  89644. }
  89645. static after(e, n) {
  89646. return new kr(e.parentNode, Cf(e) + 1, n);
  89647. }
  89648. }
  89649. const n4 = [];
  89650. class Jt {
  89651. constructor() {
  89652. this.parent = null, this.dom = null, this.flags = 2;
  89653. }
  89654. get overrideDOMText() {
  89655. return null;
  89656. }
  89657. get posAtStart() {
  89658. return this.parent ? this.parent.posBefore(this) : 0;
  89659. }
  89660. get posAtEnd() {
  89661. return this.posAtStart + this.length;
  89662. }
  89663. posBefore(e) {
  89664. let n = this.posAtStart;
  89665. for (let r of this.children) {
  89666. if (r == e)
  89667. return n;
  89668. n += r.length + r.breakAfter;
  89669. }
  89670. throw new RangeError("Invalid child in posBefore");
  89671. }
  89672. posAfter(e) {
  89673. return this.posBefore(e) + e.length;
  89674. }
  89675. sync(e, n) {
  89676. if (this.flags & 2) {
  89677. let r = this.dom, i = null, a;
  89678. for (let o of this.children) {
  89679. if (o.flags & 7) {
  89680. if (!o.dom && (a = i ? i.nextSibling : r.firstChild)) {
  89681. let s = Jt.get(a);
  89682. (!s || !s.parent && s.canReuseDOM(o)) && o.reuseDOM(a);
  89683. }
  89684. o.sync(e, n), o.flags &= -8;
  89685. }
  89686. if (a = i ? i.nextSibling : r.firstChild, n && !n.written && n.node == r && a != o.dom && (n.written = !0), o.dom.parentNode == r)
  89687. for (; a && a != o.dom; )
  89688. a = DH(a);
  89689. else
  89690. r.insertBefore(o.dom, a);
  89691. i = o.dom;
  89692. }
  89693. for (a = i ? i.nextSibling : r.firstChild, a && n && n.node == r && (n.written = !0); a; )
  89694. a = DH(a);
  89695. } else if (this.flags & 1)
  89696. for (let r of this.children)
  89697. r.flags & 7 && (r.sync(e, n), r.flags &= -8);
  89698. }
  89699. reuseDOM(e) {
  89700. }
  89701. localPosFromDOM(e, n) {
  89702. let r;
  89703. if (e == this.dom)
  89704. r = this.dom.childNodes[n];
  89705. else {
  89706. let i = Js(e) == 0 ? 0 : n == 0 ? -1 : 1;
  89707. for (; ; ) {
  89708. let a = e.parentNode;
  89709. if (a == this.dom)
  89710. break;
  89711. i == 0 && a.firstChild != a.lastChild && (e == a.firstChild ? i = -1 : i = 1), e = a;
  89712. }
  89713. i < 0 ? r = e : r = e.nextSibling;
  89714. }
  89715. if (r == this.dom.firstChild)
  89716. return 0;
  89717. for (; r && !Jt.get(r); )
  89718. r = r.nextSibling;
  89719. if (!r)
  89720. return this.length;
  89721. for (let i = 0, a = 0; ; i++) {
  89722. let o = this.children[i];
  89723. if (o.dom == r)
  89724. return a;
  89725. a += o.length + o.breakAfter;
  89726. }
  89727. }
  89728. domBoundsAround(e, n, r = 0) {
  89729. let i = -1, a = -1, o = -1, s = -1;
  89730. for (let l = 0, u = r, c = r; l < this.children.length; l++) {
  89731. let f = this.children[l], d = u + f.length;
  89732. if (u < e && d > n)
  89733. return f.domBoundsAround(e, n, u);
  89734. if (d >= e && i == -1 && (i = l, a = u), u > n && f.dom.parentNode == this.dom) {
  89735. o = l, s = c;
  89736. break;
  89737. }
  89738. c = d, u = d + f.breakAfter;
  89739. }
  89740. return {
  89741. from: a,
  89742. to: s < 0 ? r + this.length : s,
  89743. startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild,
  89744. endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
  89745. };
  89746. }
  89747. markDirty(e = !1) {
  89748. this.flags |= 2, this.markParentsDirty(e);
  89749. }
  89750. markParentsDirty(e) {
  89751. for (let n = this.parent; n; n = n.parent) {
  89752. if (e && (n.flags |= 2), n.flags & 1)
  89753. return;
  89754. n.flags |= 1, e = !1;
  89755. }
  89756. }
  89757. setParent(e) {
  89758. this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
  89759. }
  89760. setDOM(e) {
  89761. this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
  89762. }
  89763. get rootView() {
  89764. for (let e = this; ; ) {
  89765. let n = e.parent;
  89766. if (!n)
  89767. return e;
  89768. e = n;
  89769. }
  89770. }
  89771. replaceChildren(e, n, r = n4) {
  89772. this.markDirty();
  89773. for (let i = e; i < n; i++) {
  89774. let a = this.children[i];
  89775. a.parent == this && r.indexOf(a) < 0 && a.destroy();
  89776. }
  89777. this.children.splice(e, n - e, ...r);
  89778. for (let i = 0; i < r.length; i++)
  89779. r[i].setParent(this);
  89780. }
  89781. ignoreMutation(e) {
  89782. return !1;
  89783. }
  89784. ignoreEvent(e) {
  89785. return !1;
  89786. }
  89787. childCursor(e = this.length) {
  89788. return new wae(this.children, e, this.children.length);
  89789. }
  89790. childPos(e, n = 1) {
  89791. return this.childCursor().findPos(e, n);
  89792. }
  89793. toString() {
  89794. let e = this.constructor.name.replace("View", "");
  89795. return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
  89796. }
  89797. static get(e) {
  89798. return e.cmView;
  89799. }
  89800. get isEditable() {
  89801. return !0;
  89802. }
  89803. get isWidget() {
  89804. return !1;
  89805. }
  89806. get isHidden() {
  89807. return !1;
  89808. }
  89809. merge(e, n, r, i, a, o) {
  89810. return !1;
  89811. }
  89812. become(e) {
  89813. return !1;
  89814. }
  89815. canReuseDOM(e) {
  89816. return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
  89817. }
  89818. // When this is a zero-length view with a side, this should return a
  89819. // number <= 0 to indicate it is before its position, or a
  89820. // number > 0 when after its position.
  89821. getSide() {
  89822. return 0;
  89823. }
  89824. destroy() {
  89825. for (let e of this.children)
  89826. e.parent == this && e.destroy();
  89827. this.parent = null;
  89828. }
  89829. }
  89830. Jt.prototype.breakAfter = 0;
  89831. function DH(t) {
  89832. let e = t.nextSibling;
  89833. return t.parentNode.removeChild(t), e;
  89834. }
  89835. class wae {
  89836. constructor(e, n, r) {
  89837. this.children = e, this.pos = n, this.i = r, this.off = 0;
  89838. }
  89839. findPos(e, n = 1) {
  89840. for (; ; ) {
  89841. if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
  89842. return this.off = e - this.pos, this;
  89843. let r = this.children[--this.i];
  89844. this.pos -= r.length + r.breakAfter;
  89845. }
  89846. }
  89847. }
  89848. function Cae(t, e, n, r, i, a, o, s, l) {
  89849. let { children: u } = t, c = u.length ? u[e] : null, f = a.length ? a[a.length - 1] : null, d = f ? f.breakAfter : o;
  89850. if (!(e == r && c && !o && !d && a.length < 2 && c.merge(n, i, a.length ? f : null, n == 0, s, l))) {
  89851. if (r < u.length) {
  89852. let h = u[r];
  89853. 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++;
  89854. }
  89855. 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; )
  89856. if (u[r - 1].become(a[a.length - 1]))
  89857. r--, a.pop(), l = a.length ? 0 : s;
  89858. else if (u[e].become(a[0]))
  89859. e++, a.shift(), s = a.length ? 0 : l;
  89860. else
  89861. break;
  89862. !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);
  89863. }
  89864. }
  89865. function Tae(t, e, n, r, i, a) {
  89866. let o = t.childCursor(), { i: s, off: l } = o.findPos(n, 1), { i: u, off: c } = o.findPos(e, -1), f = e - n;
  89867. for (let d of r)
  89868. f += d.length;
  89869. t.length += f, Cae(t, u, c, s, l, r, 0, i, a);
  89870. }
  89871. let pi = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, gM = typeof document < "u" ? document : { documentElement: { style: {} } };
  89872. const mM = /* @__PURE__ */ /Edge\/(\d+)/.exec(pi.userAgent), Pae = /* @__PURE__ */ /MSIE \d/.test(pi.userAgent), yM = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pi.userAgent), Dw = !!(Pae || yM || mM), RH = !Dw && /* @__PURE__ */ /gecko\/(\d+)/i.test(pi.userAgent), v$ = !Dw && /* @__PURE__ */ /Chrome\/(\d+)/.exec(pi.userAgent), kH = "webkitFontSmoothing" in gM.documentElement.style, $ae = !Dw && /* @__PURE__ */ /Apple Computer/.test(pi.vendor), LH = $ae && (/* @__PURE__ */ /Mobile\/\w+/.test(pi.userAgent) || pi.maxTouchPoints > 2);
  89873. var Ne = {
  89874. mac: LH || /* @__PURE__ */ /Mac/.test(pi.platform),
  89875. windows: /* @__PURE__ */ /Win/.test(pi.platform),
  89876. linux: /* @__PURE__ */ /Linux|X11/.test(pi.platform),
  89877. ie: Dw,
  89878. ie_version: Pae ? gM.documentMode || 6 : yM ? +yM[1] : mM ? +mM[1] : 0,
  89879. gecko: RH,
  89880. gecko_version: RH ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(pi.userAgent) || [0, 0])[1] : 0,
  89881. chrome: !!v$,
  89882. chrome_version: v$ ? +v$[1] : 0,
  89883. ios: LH,
  89884. android: /* @__PURE__ */ /Android\b/.test(pi.userAgent),
  89885. webkit: kH,
  89886. safari: $ae,
  89887. webkit_version: kH ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(pi.userAgent) || [0, 0])[1] : 0,
  89888. tabSize: gM.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
  89889. };
  89890. const Bat = 256;
  89891. class lo extends Jt {
  89892. constructor(e) {
  89893. super(), this.text = e;
  89894. }
  89895. get length() {
  89896. return this.text.length;
  89897. }
  89898. createDOM(e) {
  89899. this.setDOM(e || document.createTextNode(this.text));
  89900. }
  89901. sync(e, n) {
  89902. this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
  89903. }
  89904. reuseDOM(e) {
  89905. e.nodeType == 3 && this.createDOM(e);
  89906. }
  89907. merge(e, n, r) {
  89908. return this.flags & 8 || r && (!(r instanceof lo) || this.length - (n - e) + r.length > Bat || r.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(n), this.markDirty(), !0);
  89909. }
  89910. split(e) {
  89911. let n = new lo(this.text.slice(e));
  89912. return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
  89913. }
  89914. localPosFromDOM(e, n) {
  89915. return e == this.dom ? n : n ? this.text.length : 0;
  89916. }
  89917. domAtPos(e) {
  89918. return new kr(this.dom, e);
  89919. }
  89920. domBoundsAround(e, n, r) {
  89921. return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
  89922. }
  89923. coordsAt(e, n) {
  89924. return zat(this.dom, e, n);
  89925. }
  89926. }
  89927. class el extends Jt {
  89928. constructor(e, n = [], r = 0) {
  89929. super(), this.mark = e, this.children = n, this.length = r;
  89930. for (let i of n)
  89931. i.setParent(this);
  89932. }
  89933. setAttrs(e) {
  89934. if (_ae(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
  89935. for (let n in this.mark.attrs)
  89936. e.setAttribute(n, this.mark.attrs[n]);
  89937. return e;
  89938. }
  89939. canReuseDOM(e) {
  89940. return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
  89941. }
  89942. reuseDOM(e) {
  89943. e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
  89944. }
  89945. sync(e, n) {
  89946. this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
  89947. }
  89948. merge(e, n, r, i, a, o) {
  89949. return r && (!(r instanceof el && r.mark.eq(this.mark)) || e && a <= 0 || n < this.length && o <= 0) ? !1 : (Tae(this, e, n, r ? r.children.slice() : [], a - 1, o - 1), this.markDirty(), !0);
  89950. }
  89951. split(e) {
  89952. let n = [], r = 0, i = -1, a = 0;
  89953. for (let s of this.children) {
  89954. let l = r + s.length;
  89955. l > e && n.push(r < e ? s.split(e - r) : s), i < 0 && r >= e && (i = a), r = l, a++;
  89956. }
  89957. let o = this.length - e;
  89958. return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new el(this.mark, n, o);
  89959. }
  89960. domAtPos(e) {
  89961. return Aae(this, e);
  89962. }
  89963. coordsAt(e, n) {
  89964. return Mae(this, e, n);
  89965. }
  89966. }
  89967. function zat(t, e, n) {
  89968. let r = t.nodeValue.length;
  89969. e > r && (e = r);
  89970. let i = e, a = e, o = 0;
  89971. 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++;
  89972. let s = Tf(t, i, a).getClientRects();
  89973. if (!s.length)
  89974. return null;
  89975. let l = s[(o ? o < 0 : n >= 0) ? 0 : s.length - 1];
  89976. return Ne.safari && !o && l.width == 0 && (l = Array.prototype.find.call(s, (u) => u.width) || l), o ? Iw(l, o < 0) : l || null;
  89977. }
  89978. class Ql extends Jt {
  89979. static create(e, n, r) {
  89980. return new Ql(e, n, r);
  89981. }
  89982. constructor(e, n, r) {
  89983. super(), this.widget = e, this.length = n, this.side = r, this.prevWidget = null;
  89984. }
  89985. split(e) {
  89986. let n = Ql.create(this.widget, this.length - e, this.side);
  89987. return this.length -= e, n;
  89988. }
  89989. sync(e) {
  89990. (!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"));
  89991. }
  89992. getSide() {
  89993. return this.side;
  89994. }
  89995. merge(e, n, r, i, a, o) {
  89996. 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);
  89997. }
  89998. become(e) {
  89999. 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;
  90000. }
  90001. ignoreMutation() {
  90002. return !0;
  90003. }
  90004. ignoreEvent(e) {
  90005. return this.widget.ignoreEvent(e);
  90006. }
  90007. get overrideDOMText() {
  90008. if (this.length == 0)
  90009. return Ft.empty;
  90010. let e = this;
  90011. for (; e.parent; )
  90012. e = e.parent;
  90013. let { view: n } = e, r = n && n.state.doc, i = this.posAtStart;
  90014. return r ? r.slice(i, i + this.length) : Ft.empty;
  90015. }
  90016. domAtPos(e) {
  90017. return (this.length ? e == 0 : this.side > 0) ? kr.before(this.dom) : kr.after(this.dom, e == this.length);
  90018. }
  90019. domBoundsAround() {
  90020. return null;
  90021. }
  90022. coordsAt(e, n) {
  90023. let r = this.widget.coordsAt(this.dom, e, n);
  90024. if (r)
  90025. return r;
  90026. let i = this.dom.getClientRects(), a = null;
  90027. if (!i.length)
  90028. return null;
  90029. let o = this.side ? this.side < 0 : e > 0;
  90030. 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)
  90031. ;
  90032. return Iw(a, !o);
  90033. }
  90034. get isEditable() {
  90035. return !1;
  90036. }
  90037. get isWidget() {
  90038. return !0;
  90039. }
  90040. get isHidden() {
  90041. return this.widget.isHidden;
  90042. }
  90043. destroy() {
  90044. super.destroy(), this.dom && this.widget.destroy(this.dom);
  90045. }
  90046. }
  90047. class Xh extends Jt {
  90048. constructor(e) {
  90049. super(), this.side = e;
  90050. }
  90051. get length() {
  90052. return 0;
  90053. }
  90054. merge() {
  90055. return !1;
  90056. }
  90057. become(e) {
  90058. return e instanceof Xh && e.side == this.side;
  90059. }
  90060. split() {
  90061. return new Xh(this.side);
  90062. }
  90063. sync() {
  90064. if (!this.dom) {
  90065. let e = document.createElement("img");
  90066. e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
  90067. }
  90068. }
  90069. getSide() {
  90070. return this.side;
  90071. }
  90072. domAtPos(e) {
  90073. return this.side > 0 ? kr.before(this.dom) : kr.after(this.dom);
  90074. }
  90075. localPosFromDOM() {
  90076. return 0;
  90077. }
  90078. domBoundsAround() {
  90079. return null;
  90080. }
  90081. coordsAt(e) {
  90082. return this.dom.getBoundingClientRect();
  90083. }
  90084. get overrideDOMText() {
  90085. return Ft.empty;
  90086. }
  90087. get isHidden() {
  90088. return !0;
  90089. }
  90090. }
  90091. lo.prototype.children = Ql.prototype.children = Xh.prototype.children = n4;
  90092. function Aae(t, e) {
  90093. let n = t.dom, { children: r } = t, i = 0;
  90094. for (let a = 0; i < r.length; i++) {
  90095. let o = r[i], s = a + o.length;
  90096. if (!(s == a && o.getSide() <= 0)) {
  90097. if (e > a && e < s && o.dom.parentNode == n)
  90098. return o.domAtPos(e - a);
  90099. if (e <= a)
  90100. break;
  90101. a = s;
  90102. }
  90103. }
  90104. for (let a = i; a > 0; a--) {
  90105. let o = r[a - 1];
  90106. if (o.dom.parentNode == n)
  90107. return o.domAtPos(o.length);
  90108. }
  90109. for (let a = i; a < r.length; a++) {
  90110. let o = r[a];
  90111. if (o.dom.parentNode == n)
  90112. return o.domAtPos(0);
  90113. }
  90114. return new kr(n, 0);
  90115. }
  90116. function Eae(t, e, n) {
  90117. let r, { children: i } = t;
  90118. n > 0 && e instanceof el && i.length && (r = i[i.length - 1]) instanceof el && r.mark.eq(e.mark) ? Eae(r, e.children[0], n - 1) : (i.push(e), e.setParent(t)), t.length += e.length;
  90119. }
  90120. function Mae(t, e, n) {
  90121. let r = null, i = -1, a = null, o = -1;
  90122. function s(u, c) {
  90123. for (let f = 0, d = 0; f < u.children.length && d <= c; f++) {
  90124. let h = u.children[f], p = d + h.length;
  90125. 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;
  90126. }
  90127. }
  90128. s(t, e);
  90129. let l = (n < 0 ? r : a) || r || a;
  90130. return l ? l.coordsAt(Math.max(0, l == r ? i : o), n) : Vat(t);
  90131. }
  90132. function Vat(t) {
  90133. let e = t.dom.lastChild;
  90134. if (!e)
  90135. return t.dom.getBoundingClientRect();
  90136. let n = Uh(e);
  90137. return n[n.length - 1] || null;
  90138. }
  90139. function bM(t, e) {
  90140. for (let n in t)
  90141. n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
  90142. return e;
  90143. }
  90144. const NH = /* @__PURE__ */ Object.create(null);
  90145. function rS(t, e, n) {
  90146. if (t == e)
  90147. return !0;
  90148. t || (t = NH), e || (e = NH);
  90149. let r = Object.keys(t), i = Object.keys(e);
  90150. if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0))
  90151. return !1;
  90152. for (let a of r)
  90153. if (a != n && (i.indexOf(a) == -1 || t[a] !== e[a]))
  90154. return !1;
  90155. return !0;
  90156. }
  90157. function _M(t, e, n) {
  90158. let r = !1;
  90159. if (e)
  90160. for (let i in e)
  90161. n && i in n || (r = !0, i == "style" ? t.style.cssText = "" : t.removeAttribute(i));
  90162. if (n)
  90163. for (let i in n)
  90164. e && e[i] == n[i] || (r = !0, i == "style" ? t.style.cssText = n[i] : t.setAttribute(i, n[i]));
  90165. return r;
  90166. }
  90167. function Fat(t) {
  90168. let e = /* @__PURE__ */ Object.create(null);
  90169. for (let n = 0; n < t.attributes.length; n++) {
  90170. let r = t.attributes[n];
  90171. e[r.name] = r.value;
  90172. }
  90173. return e;
  90174. }
  90175. class Ln extends Jt {
  90176. constructor() {
  90177. super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
  90178. }
  90179. // Consumes source
  90180. merge(e, n, r, i, a, o) {
  90181. if (r) {
  90182. if (!(r instanceof Ln))
  90183. return !1;
  90184. this.dom || r.transferDOM(this);
  90185. }
  90186. return i && this.setDeco(r ? r.attrs : null), Tae(this, e, n, r ? r.children.slice() : [], a, o), !0;
  90187. }
  90188. split(e) {
  90189. let n = new Ln();
  90190. if (n.breakAfter = this.breakAfter, this.length == 0)
  90191. return n;
  90192. let { i: r, off: i } = this.childPos(e);
  90193. i && (n.append(this.children[r].split(i), 0), this.children[r].merge(i, this.children[r].length, null, !1, 0, 0), r++);
  90194. for (let a = r; a < this.children.length; a++)
  90195. n.append(this.children[a], 0);
  90196. for (; r > 0 && this.children[r - 1].length == 0; )
  90197. this.children[--r].destroy();
  90198. return this.children.length = r, this.markDirty(), this.length = e, n;
  90199. }
  90200. transferDOM(e) {
  90201. 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);
  90202. }
  90203. setDeco(e) {
  90204. rS(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
  90205. }
  90206. append(e, n) {
  90207. Eae(this, e, n);
  90208. }
  90209. // Only called when building a line view in ContentBuilder
  90210. addLineDeco(e) {
  90211. let n = e.spec.attributes, r = e.spec.class;
  90212. n && (this.attrs = bM(n, this.attrs || {})), r && (this.attrs = bM({ class: r }, this.attrs || {}));
  90213. }
  90214. domAtPos(e) {
  90215. return Aae(this, e);
  90216. }
  90217. reuseDOM(e) {
  90218. e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
  90219. }
  90220. sync(e, n) {
  90221. var r;
  90222. this.dom ? this.flags & 4 && (_ae(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 && (_M(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
  90223. let i = this.dom.lastChild;
  90224. for (; i && Jt.get(i) instanceof el; )
  90225. i = i.lastChild;
  90226. 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 lo))) {
  90227. let a = document.createElement("BR");
  90228. a.cmIgnore = !0, this.dom.appendChild(a);
  90229. }
  90230. }
  90231. measureTextSize() {
  90232. if (this.children.length == 0 || this.length > 20)
  90233. return null;
  90234. let e = 0, n;
  90235. for (let r of this.children) {
  90236. if (!(r instanceof lo) || /[^ -~]/.test(r.text))
  90237. return null;
  90238. let i = Uh(r.dom);
  90239. if (i.length != 1)
  90240. return null;
  90241. e += i[0].width, n = i[0].height;
  90242. }
  90243. return e ? {
  90244. lineHeight: this.dom.getBoundingClientRect().height,
  90245. charWidth: e / this.length,
  90246. textHeight: n
  90247. } : null;
  90248. }
  90249. coordsAt(e, n) {
  90250. let r = Mae(this, e, n);
  90251. if (!this.children.length && r && this.parent) {
  90252. let { heightOracle: i } = this.parent.view.viewState, a = r.bottom - r.top;
  90253. if (Math.abs(a - i.lineHeight) < 2 && i.textHeight < a) {
  90254. let o = (a - i.textHeight) / 2;
  90255. return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left };
  90256. }
  90257. }
  90258. return r;
  90259. }
  90260. become(e) {
  90261. return e instanceof Ln && this.children.length == 0 && e.children.length == 0 && rS(this.attrs, e.attrs) && this.breakAfter == e.breakAfter;
  90262. }
  90263. covers() {
  90264. return !0;
  90265. }
  90266. static find(e, n) {
  90267. for (let r = 0, i = 0; r < e.children.length; r++) {
  90268. let a = e.children[r], o = i + a.length;
  90269. if (o >= n) {
  90270. if (a instanceof Ln)
  90271. return a;
  90272. if (o > n)
  90273. break;
  90274. }
  90275. i = o + a.breakAfter;
  90276. }
  90277. return null;
  90278. }
  90279. }
  90280. class Ls extends Jt {
  90281. constructor(e, n, r) {
  90282. super(), this.widget = e, this.length = n, this.deco = r, this.breakAfter = 0, this.prevWidget = null;
  90283. }
  90284. merge(e, n, r, i, a, o) {
  90285. return r && (!(r instanceof Ls) || !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);
  90286. }
  90287. domAtPos(e) {
  90288. return e == 0 ? kr.before(this.dom) : kr.after(this.dom, e == this.length);
  90289. }
  90290. split(e) {
  90291. let n = this.length - e;
  90292. this.length = e;
  90293. let r = new Ls(this.widget, n, this.deco);
  90294. return r.breakAfter = this.breakAfter, r;
  90295. }
  90296. get children() {
  90297. return n4;
  90298. }
  90299. sync(e) {
  90300. (!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"));
  90301. }
  90302. get overrideDOMText() {
  90303. return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : Ft.empty;
  90304. }
  90305. domBoundsAround() {
  90306. return null;
  90307. }
  90308. become(e) {
  90309. return e instanceof Ls && 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;
  90310. }
  90311. ignoreMutation() {
  90312. return !0;
  90313. }
  90314. ignoreEvent(e) {
  90315. return this.widget.ignoreEvent(e);
  90316. }
  90317. get isEditable() {
  90318. return !1;
  90319. }
  90320. get isWidget() {
  90321. return !0;
  90322. }
  90323. coordsAt(e, n) {
  90324. return this.widget.coordsAt(this.dom, e, n);
  90325. }
  90326. destroy() {
  90327. super.destroy(), this.dom && this.widget.destroy(this.dom);
  90328. }
  90329. covers(e) {
  90330. let { startSide: n, endSide: r } = this.deco;
  90331. return n == r ? !1 : e < 0 ? n < 0 : r > 0;
  90332. }
  90333. }
  90334. class ds {
  90335. /**
  90336. Compare this instance to another instance of the same type.
  90337. (TypeScript can't express this, but only instances of the same
  90338. specific class will be passed to this method.) This is used to
  90339. avoid redrawing widgets when they are replaced by a new
  90340. decoration of the same type. The default implementation just
  90341. returns `false`, which will cause new instances of the widget to
  90342. always be redrawn.
  90343. */
  90344. eq(e) {
  90345. return !1;
  90346. }
  90347. /**
  90348. Update a DOM element created by a widget of the same type (but
  90349. different, non-`eq` content) to reflect this widget. May return
  90350. true to indicate that it could update, false to indicate it
  90351. couldn't (in which case the widget will be redrawn). The default
  90352. implementation just returns false.
  90353. */
  90354. updateDOM(e, n) {
  90355. return !1;
  90356. }
  90357. /**
  90358. @internal
  90359. */
  90360. compare(e) {
  90361. return this == e || this.constructor == e.constructor && this.eq(e);
  90362. }
  90363. /**
  90364. The estimated height this widget will have, to be used when
  90365. estimating the height of content that hasn't been drawn. May
  90366. return -1 to indicate you don't know. The default implementation
  90367. returns -1.
  90368. */
  90369. get estimatedHeight() {
  90370. return -1;
  90371. }
  90372. /**
  90373. For inline widgets that are displayed inline (as opposed to
  90374. `inline-block`) and introduce line breaks (through `<br>` tags
  90375. or textual newlines), this must indicate the amount of line
  90376. breaks they introduce. Defaults to 0.
  90377. */
  90378. get lineBreaks() {
  90379. return 0;
  90380. }
  90381. /**
  90382. Can be used to configure which kinds of events inside the widget
  90383. should be ignored by the editor. The default is to ignore all
  90384. events.
  90385. */
  90386. ignoreEvent(e) {
  90387. return !0;
  90388. }
  90389. /**
  90390. Override the way screen coordinates for positions at/in the
  90391. widget are found. `pos` will be the offset into the widget, and
  90392. `side` the side of the position that is being queried—less than
  90393. zero for before, greater than zero for after, and zero for
  90394. directly at that position.
  90395. */
  90396. coordsAt(e, n, r) {
  90397. return null;
  90398. }
  90399. /**
  90400. @internal
  90401. */
  90402. get isHidden() {
  90403. return !1;
  90404. }
  90405. /**
  90406. @internal
  90407. */
  90408. get editable() {
  90409. return !1;
  90410. }
  90411. /**
  90412. This is called when the an instance of the widget is removed
  90413. from the editor view.
  90414. */
  90415. destroy(e) {
  90416. }
  90417. }
  90418. var Jr = /* @__PURE__ */ function(t) {
  90419. return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
  90420. }(Jr || (Jr = {}));
  90421. class Ze extends wf {
  90422. constructor(e, n, r, i) {
  90423. super(), this.startSide = e, this.endSide = n, this.widget = r, this.spec = i;
  90424. }
  90425. /**
  90426. @internal
  90427. */
  90428. get heightRelevant() {
  90429. return !1;
  90430. }
  90431. /**
  90432. Create a mark decoration, which influences the styling of the
  90433. content in its range. Nested mark decorations will cause nested
  90434. DOM elements to be created. Nesting order is determined by
  90435. precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
  90436. the higher-precedence decorations creating the inner DOM nodes.
  90437. Such elements are split on line boundaries and on the boundaries
  90438. of lower-precedence decorations.
  90439. */
  90440. static mark(e) {
  90441. return new iy(e);
  90442. }
  90443. /**
  90444. Create a widget decoration, which displays a DOM element at the
  90445. given position.
  90446. */
  90447. static widget(e) {
  90448. let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), r = !!e.block;
  90449. return n += r && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new gu(e, n, n, r, e.widget || null, !1);
  90450. }
  90451. /**
  90452. Create a replace decoration which replaces the given range with
  90453. a widget, or simply hides it.
  90454. */
  90455. static replace(e) {
  90456. let n = !!e.block, r, i;
  90457. if (e.isBlockGap)
  90458. r = -5e8, i = 4e8;
  90459. else {
  90460. let { start: a, end: o } = Iae(e, n);
  90461. r = (a ? n ? -3e8 : -1 : 5e8) - 1, i = (o ? n ? 2e8 : 1 : -6e8) + 1;
  90462. }
  90463. return new gu(e, r, i, n, e.widget || null, !0);
  90464. }
  90465. /**
  90466. Create a line decoration, which can add DOM attributes to the
  90467. line starting at the given position.
  90468. */
  90469. static line(e) {
  90470. return new ay(e);
  90471. }
  90472. /**
  90473. Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
  90474. decorated range or ranges. If the ranges aren't already sorted,
  90475. pass `true` for `sort` to make the library sort them for you.
  90476. */
  90477. static set(e, n = !1) {
  90478. return Vt.of(e, n);
  90479. }
  90480. /**
  90481. @internal
  90482. */
  90483. hasHeight() {
  90484. return this.widget ? this.widget.estimatedHeight > -1 : !1;
  90485. }
  90486. }
  90487. Ze.none = Vt.empty;
  90488. class iy extends Ze {
  90489. constructor(e) {
  90490. let { start: n, end: r } = Iae(e);
  90491. super(n ? -1 : 5e8, r ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
  90492. }
  90493. eq(e) {
  90494. var n, r;
  90495. return this == e || e instanceof iy && 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)) && rS(this.attrs, e.attrs, "class");
  90496. }
  90497. range(e, n = e) {
  90498. if (e >= n)
  90499. throw new RangeError("Mark decorations may not be empty");
  90500. return super.range(e, n);
  90501. }
  90502. }
  90503. iy.prototype.point = !1;
  90504. class ay extends Ze {
  90505. constructor(e) {
  90506. super(-2e8, -2e8, null, e);
  90507. }
  90508. eq(e) {
  90509. return e instanceof ay && this.spec.class == e.spec.class && rS(this.spec.attributes, e.spec.attributes);
  90510. }
  90511. range(e, n = e) {
  90512. if (n != e)
  90513. throw new RangeError("Line decoration ranges must be zero-length");
  90514. return super.range(e, n);
  90515. }
  90516. }
  90517. ay.prototype.mapMode = yr.TrackBefore;
  90518. ay.prototype.point = !0;
  90519. class gu extends Ze {
  90520. constructor(e, n, r, i, a, o) {
  90521. super(n, r, a, e), this.block = i, this.isReplace = o, this.mapMode = i ? n <= 0 ? yr.TrackBefore : yr.TrackAfter : yr.TrackDel;
  90522. }
  90523. // Only relevant when this.block == true
  90524. get type() {
  90525. return this.startSide != this.endSide ? Jr.WidgetRange : this.startSide <= 0 ? Jr.WidgetBefore : Jr.WidgetAfter;
  90526. }
  90527. get heightRelevant() {
  90528. return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
  90529. }
  90530. eq(e) {
  90531. return e instanceof gu && Wat(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
  90532. }
  90533. range(e, n = e) {
  90534. if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
  90535. throw new RangeError("Invalid range for replacement decoration");
  90536. if (!this.isReplace && n != e)
  90537. throw new RangeError("Widget decorations can only have zero-length ranges");
  90538. return super.range(e, n);
  90539. }
  90540. }
  90541. gu.prototype.point = !0;
  90542. function Iae(t, e = !1) {
  90543. let { inclusiveStart: n, inclusiveEnd: r } = t;
  90544. return n == null && (n = t.inclusive), r == null && (r = t.inclusive), { start: n ?? e, end: r ?? e };
  90545. }
  90546. function Wat(t, e) {
  90547. return t == e || !!(t && e && t.compare(e));
  90548. }
  90549. function OM(t, e, n, r = 0) {
  90550. let i = n.length - 1;
  90551. i >= 0 && n[i] + r >= t ? n[i] = Math.max(n[i], e) : n.push(t, e);
  90552. }
  90553. class Qg {
  90554. constructor(e, n, r, i) {
  90555. 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;
  90556. }
  90557. posCovered() {
  90558. if (this.content.length == 0)
  90559. return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
  90560. let e = this.content[this.content.length - 1];
  90561. return !(e.breakAfter || e instanceof Ls && e.deco.endSide < 0);
  90562. }
  90563. getLine() {
  90564. return this.curLine || (this.content.push(this.curLine = new Ln()), this.atCursorPos = !0), this.curLine;
  90565. }
  90566. flushBuffer(e = this.bufferMarks) {
  90567. this.pendingBuffer && (this.curLine.append(Gb(new Xh(-1), e), e.length), this.pendingBuffer = 0);
  90568. }
  90569. addBlockWidget(e) {
  90570. this.flushBuffer(), this.curLine = null, this.content.push(e);
  90571. }
  90572. finish(e) {
  90573. this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Ls) && this.getLine();
  90574. }
  90575. buildText(e, n, r) {
  90576. for (; e > 0; ) {
  90577. if (this.textOff == this.text.length) {
  90578. let { value: a, lineBreak: o, done: s } = this.cursor.next(this.skip);
  90579. if (this.skip = 0, s)
  90580. throw new Error("Ran out of text content when drawing inline views");
  90581. if (o) {
  90582. 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--;
  90583. continue;
  90584. } else
  90585. this.text = a, this.textOff = 0;
  90586. }
  90587. let i = Math.min(
  90588. this.text.length - this.textOff,
  90589. e,
  90590. 512
  90591. /* T.Chunk */
  90592. );
  90593. this.flushBuffer(n.slice(n.length - r)), this.getLine().append(Gb(new lo(this.text.slice(this.textOff, this.textOff + i)), n), r), this.atCursorPos = !0, this.textOff += i, e -= i, r = 0;
  90594. }
  90595. }
  90596. span(e, n, r, i) {
  90597. this.buildText(n - e, r, i), this.pos = n, this.openStart < 0 && (this.openStart = i);
  90598. }
  90599. point(e, n, r, i, a, o) {
  90600. if (this.disallowBlockEffectsFor[o] && r instanceof gu) {
  90601. if (r.block)
  90602. throw new RangeError("Block decorations may not be specified via plugins");
  90603. if (n > this.doc.lineAt(this.pos).to)
  90604. throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
  90605. }
  90606. let s = n - e;
  90607. if (r instanceof gu)
  90608. if (r.block)
  90609. r.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Ls(r.widget || Yh.block, s, r));
  90610. else {
  90611. let l = Ql.create(r.widget || Yh.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();
  90612. this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(Gb(new Xh(1), i), a), a = i.length + Math.max(0, a - i.length)), f.append(Gb(l, i), a), this.atCursorPos = c, this.pendingBuffer = c ? e < n || a > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice());
  90613. }
  90614. else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r);
  90615. 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);
  90616. }
  90617. static build(e, n, r, i, a) {
  90618. let o = new Qg(e, n, r, a);
  90619. return o.openEnd = Vt.spans(i, n, r, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
  90620. }
  90621. }
  90622. function Gb(t, e) {
  90623. for (let n of e)
  90624. t = new el(n, [t], t.length);
  90625. return t;
  90626. }
  90627. class Yh extends ds {
  90628. constructor(e) {
  90629. super(), this.tag = e;
  90630. }
  90631. eq(e) {
  90632. return e.tag == this.tag;
  90633. }
  90634. toDOM() {
  90635. return document.createElement(this.tag);
  90636. }
  90637. updateDOM(e) {
  90638. return e.nodeName.toLowerCase() == this.tag;
  90639. }
  90640. get isHidden() {
  90641. return !0;
  90642. }
  90643. }
  90644. Yh.inline = /* @__PURE__ */ new Yh("span");
  90645. Yh.block = /* @__PURE__ */ new Yh("div");
  90646. var pn = /* @__PURE__ */ function(t) {
  90647. return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
  90648. }(pn || (pn = {}));
  90649. const Pf = pn.LTR, r4 = pn.RTL;
  90650. function Dae(t) {
  90651. let e = [];
  90652. for (let n = 0; n < t.length; n++)
  90653. e.push(1 << +t[n]);
  90654. return e;
  90655. }
  90656. const Qat = /* @__PURE__ */ Dae("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Hat = /* @__PURE__ */ Dae("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), SM = /* @__PURE__ */ Object.create(null), wo = [];
  90657. for (let t of ["()", "[]", "{}"]) {
  90658. let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
  90659. SM[e] = n, SM[n] = -e;
  90660. }
  90661. function Rae(t) {
  90662. return t <= 247 ? Qat[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Hat[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
  90663. }
  90664. const Gat = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
  90665. class Hl {
  90666. /**
  90667. The direction of this span.
  90668. */
  90669. get dir() {
  90670. return this.level % 2 ? r4 : Pf;
  90671. }
  90672. /**
  90673. @internal
  90674. */
  90675. constructor(e, n, r) {
  90676. this.from = e, this.to = n, this.level = r;
  90677. }
  90678. /**
  90679. @internal
  90680. */
  90681. side(e, n) {
  90682. return this.dir == n == e ? this.to : this.from;
  90683. }
  90684. /**
  90685. @internal
  90686. */
  90687. forward(e, n) {
  90688. return e == (this.dir == n);
  90689. }
  90690. /**
  90691. @internal
  90692. */
  90693. static find(e, n, r, i) {
  90694. let a = -1;
  90695. for (let o = 0; o < e.length; o++) {
  90696. let s = e[o];
  90697. if (s.from <= n && s.to >= n) {
  90698. if (s.level == r)
  90699. return o;
  90700. (a < 0 || (i != 0 ? i < 0 ? s.from < n : s.to > n : e[a].level > s.level)) && (a = o);
  90701. }
  90702. }
  90703. if (a < 0)
  90704. throw new RangeError("Index out of range");
  90705. return a;
  90706. }
  90707. }
  90708. function kae(t, e) {
  90709. if (t.length != e.length)
  90710. return !1;
  90711. for (let n = 0; n < t.length; n++) {
  90712. let r = t[n], i = e[n];
  90713. if (r.from != i.from || r.to != i.to || r.direction != i.direction || !kae(r.inner, i.inner))
  90714. return !1;
  90715. }
  90716. return !0;
  90717. }
  90718. const qt = [];
  90719. function jat(t, e, n, r, i) {
  90720. for (let a = 0; a <= r.length; a++) {
  90721. let o = a ? r[a - 1].to : e, s = a < r.length ? r[a].from : n, l = a ? 256 : i;
  90722. for (let u = o, c = l, f = l; u < s; u++) {
  90723. let d = Rae(t.charCodeAt(u));
  90724. d == 512 ? d = c : d == 8 && f == 4 && (d = 16), qt[u] = d == 4 ? 2 : d, d & 7 && (f = d), c = d;
  90725. }
  90726. for (let u = o, c = l, f = l; u < s; u++) {
  90727. let d = qt[u];
  90728. if (d == 128)
  90729. u < s - 1 && c == qt[u + 1] && c & 24 ? d = qt[u] = c : qt[u] = 256;
  90730. else if (d == 64) {
  90731. let h = u + 1;
  90732. for (; h < s && qt[h] == 64; )
  90733. h++;
  90734. let p = u && c == 8 || h < n && qt[h] == 8 ? f == 1 ? 1 : 8 : 256;
  90735. for (let v = u; v < h; v++)
  90736. qt[v] = p;
  90737. u = h - 1;
  90738. } else d == 8 && f == 1 && (qt[u] = 1);
  90739. c = d, d & 7 && (f = d);
  90740. }
  90741. }
  90742. }
  90743. function Zat(t, e, n, r, i) {
  90744. let a = i == 1 ? 2 : 1;
  90745. for (let o = 0, s = 0, l = 0; o <= r.length; o++) {
  90746. let u = o ? r[o - 1].to : e, c = o < r.length ? r[o].from : n;
  90747. for (let f = u, d, h, p; f < c; f++)
  90748. if (h = SM[d = t.charCodeAt(f)])
  90749. if (h < 0) {
  90750. for (let v = s - 3; v >= 0; v -= 3)
  90751. if (wo[v + 1] == -h) {
  90752. let g = wo[v + 2], m = g & 2 ? i : g & 4 ? g & 1 ? a : i : 0;
  90753. m && (qt[f] = qt[wo[v]] = m), s = v;
  90754. break;
  90755. }
  90756. } else {
  90757. if (wo.length == 189)
  90758. break;
  90759. wo[s++] = f, wo[s++] = d, wo[s++] = l;
  90760. }
  90761. else if ((p = qt[f]) == 2 || p == 1) {
  90762. let v = p == i;
  90763. l = v ? 0 : 1;
  90764. for (let g = s - 3; g >= 0; g -= 3) {
  90765. let m = wo[g + 2];
  90766. if (m & 2)
  90767. break;
  90768. if (v)
  90769. wo[g + 2] |= 2;
  90770. else {
  90771. if (m & 4)
  90772. break;
  90773. wo[g + 2] |= 4;
  90774. }
  90775. }
  90776. }
  90777. }
  90778. }
  90779. function Uat(t, e, n, r) {
  90780. for (let i = 0, a = r; i <= n.length; i++) {
  90781. let o = i ? n[i - 1].to : t, s = i < n.length ? n[i].from : e;
  90782. for (let l = o; l < s; ) {
  90783. let u = qt[l];
  90784. if (u == 256) {
  90785. let c = l + 1;
  90786. for (; ; )
  90787. if (c == s) {
  90788. if (i == n.length)
  90789. break;
  90790. c = n[i++].to, s = i < n.length ? n[i].from : e;
  90791. } else if (qt[c] == 256)
  90792. c++;
  90793. else
  90794. break;
  90795. let f = a == 1, d = (c < e ? qt[c] : r) == 1, h = f == d ? f ? 1 : 2 : r;
  90796. for (let p = c, v = i, g = v ? n[v - 1].to : t; p > l; )
  90797. p == g && (p = n[--v].from, g = v ? n[v - 1].to : t), qt[--p] = h;
  90798. l = c;
  90799. } else
  90800. a = u, l++;
  90801. }
  90802. }
  90803. }
  90804. function xM(t, e, n, r, i, a, o) {
  90805. let s = r % 2 ? 2 : 1;
  90806. if (r % 2 == i % 2)
  90807. for (let l = e, u = 0; l < n; ) {
  90808. let c = !0, f = !1;
  90809. if (u == a.length || l < a[u].from) {
  90810. let v = qt[l];
  90811. v != s && (c = !1, f = v == 16);
  90812. }
  90813. let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
  90814. e: for (; ; )
  90815. if (u < a.length && p == a[u].from) {
  90816. if (f)
  90817. break e;
  90818. let v = a[u];
  90819. if (!c)
  90820. for (let g = v.to, m = u + 1; ; ) {
  90821. if (g == n)
  90822. break e;
  90823. if (m < a.length && a[m].from == g)
  90824. g = a[m++].to;
  90825. else {
  90826. if (qt[g] == s)
  90827. break e;
  90828. break;
  90829. }
  90830. }
  90831. if (u++, d)
  90832. d.push(v);
  90833. else {
  90834. v.from > l && o.push(new Hl(l, v.from, h));
  90835. let g = v.direction == Pf != !(h % 2);
  90836. wM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.to;
  90837. }
  90838. p = v.to;
  90839. } else {
  90840. if (p == n || (c ? qt[p] != s : qt[p] == s))
  90841. break;
  90842. p++;
  90843. }
  90844. d ? xM(t, l, p, r + 1, i, d, o) : l < p && o.push(new Hl(l, p, h)), l = p;
  90845. }
  90846. else
  90847. for (let l = n, u = a.length; l > e; ) {
  90848. let c = !0, f = !1;
  90849. if (!u || l > a[u - 1].to) {
  90850. let v = qt[l - 1];
  90851. v != s && (c = !1, f = v == 16);
  90852. }
  90853. let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
  90854. e: for (; ; )
  90855. if (u && p == a[u - 1].to) {
  90856. if (f)
  90857. break e;
  90858. let v = a[--u];
  90859. if (!c)
  90860. for (let g = v.from, m = u; ; ) {
  90861. if (g == e)
  90862. break e;
  90863. if (m && a[m - 1].to == g)
  90864. g = a[--m].from;
  90865. else {
  90866. if (qt[g - 1] == s)
  90867. break e;
  90868. break;
  90869. }
  90870. }
  90871. if (d)
  90872. d.push(v);
  90873. else {
  90874. v.to < l && o.push(new Hl(v.to, l, h));
  90875. let g = v.direction == Pf != !(h % 2);
  90876. wM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.from;
  90877. }
  90878. p = v.from;
  90879. } else {
  90880. if (p == e || (c ? qt[p - 1] != s : qt[p - 1] == s))
  90881. break;
  90882. p--;
  90883. }
  90884. d ? xM(t, p, l, r + 1, i, d, o) : p < l && o.push(new Hl(p, l, h)), l = p;
  90885. }
  90886. }
  90887. function wM(t, e, n, r, i, a, o) {
  90888. let s = e % 2 ? 2 : 1;
  90889. jat(t, i, a, r, s), Zat(t, i, a, r, s), Uat(i, a, r, s), xM(t, i, a, e, n, r, o);
  90890. }
  90891. function Xat(t, e, n) {
  90892. if (!t)
  90893. return [new Hl(0, 0, e == r4 ? 1 : 0)];
  90894. if (e == Pf && !n.length && !Gat.test(t))
  90895. return Lae(t.length);
  90896. if (n.length)
  90897. for (; t.length > qt.length; )
  90898. qt[qt.length] = 256;
  90899. let r = [], i = e == Pf ? 0 : 1;
  90900. return wM(t, i, i, n, 0, t.length, r), r;
  90901. }
  90902. function Lae(t) {
  90903. return [new Hl(0, t, 0)];
  90904. }
  90905. let Nae = "";
  90906. function Yat(t, e, n, r, i) {
  90907. var a;
  90908. 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);
  90909. if (o == u) {
  90910. let d = s += i ? 1 : -1;
  90911. if (d < 0 || d >= e.length)
  90912. return null;
  90913. l = e[s = d], o = l.side(!i, n), u = l.side(i, n);
  90914. }
  90915. let c = _r(t.text, o, l.forward(i, n));
  90916. (c < l.from || c > l.to) && (c = u), Nae = t.text.slice(Math.min(o, c), Math.max(o, c));
  90917. let f = s == (i ? e.length - 1 : 0) ? null : e[s + (i ? 1 : -1)];
  90918. 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);
  90919. }
  90920. function qat(t, e, n) {
  90921. for (let r = e; r < n; r++) {
  90922. let i = Rae(t.charCodeAt(r));
  90923. if (i == 1)
  90924. return Pf;
  90925. if (i == 2 || i == 4)
  90926. return r4;
  90927. }
  90928. return Pf;
  90929. }
  90930. const Bae = /* @__PURE__ */ Be.define(), zae = /* @__PURE__ */ Be.define(), Vae = /* @__PURE__ */ Be.define(), Fae = /* @__PURE__ */ Be.define(), CM = /* @__PURE__ */ Be.define(), Wae = /* @__PURE__ */ Be.define(), Qae = /* @__PURE__ */ Be.define(), Hae = /* @__PURE__ */ Be.define({
  90931. combine: (t) => t.some((e) => e)
  90932. }), Gae = /* @__PURE__ */ Be.define({
  90933. combine: (t) => t.some((e) => e)
  90934. }), jae = /* @__PURE__ */ Be.define();
  90935. class uh {
  90936. constructor(e, n = "nearest", r = "nearest", i = 5, a = 5, o = !1) {
  90937. this.range = e, this.y = n, this.x = r, this.yMargin = i, this.xMargin = a, this.isSnapshot = o;
  90938. }
  90939. map(e) {
  90940. return e.empty ? this : new uh(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  90941. }
  90942. clip(e) {
  90943. return this.range.to <= e.doc.length ? this : new uh(me.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  90944. }
  90945. }
  90946. const jb = /* @__PURE__ */ dt.define({ map: (t, e) => t.map(e) }), Zae = /* @__PURE__ */ dt.define();
  90947. function mi(t, e, n) {
  90948. let r = t.facet(Fae);
  90949. 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);
  90950. }
  90951. const El = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : !0 });
  90952. let Kat = 0;
  90953. const Jv = /* @__PURE__ */ Be.define();
  90954. class kn {
  90955. constructor(e, n, r, i, a) {
  90956. this.id = e, this.create = n, this.domEventHandlers = r, this.domEventObservers = i, this.extension = a(this);
  90957. }
  90958. /**
  90959. Define a plugin from a constructor function that creates the
  90960. plugin's value, given an editor view.
  90961. */
  90962. static define(e, n) {
  90963. const { eventHandlers: r, eventObservers: i, provide: a, decorations: o } = n || {};
  90964. return new kn(Kat++, e, r, i, (s) => {
  90965. let l = [Jv.of(s)];
  90966. return o && l.push(Xm.of((u) => {
  90967. let c = u.plugin(s);
  90968. return c ? o(c) : Ze.none;
  90969. })), a && l.push(a(s)), l;
  90970. });
  90971. }
  90972. /**
  90973. Create a plugin for a class whose constructor takes a single
  90974. editor view as argument.
  90975. */
  90976. static fromClass(e, n) {
  90977. return kn.define((r) => new e(r), n);
  90978. }
  90979. }
  90980. class g$ {
  90981. constructor(e) {
  90982. this.spec = e, this.mustUpdate = null, this.value = null;
  90983. }
  90984. update(e) {
  90985. if (this.value) {
  90986. if (this.mustUpdate) {
  90987. let n = this.mustUpdate;
  90988. if (this.mustUpdate = null, this.value.update)
  90989. try {
  90990. this.value.update(n);
  90991. } catch (r) {
  90992. if (mi(n.state, r, "CodeMirror plugin crashed"), this.value.destroy)
  90993. try {
  90994. this.value.destroy();
  90995. } catch {
  90996. }
  90997. this.deactivate();
  90998. }
  90999. }
  91000. } else if (this.spec)
  91001. try {
  91002. this.value = this.spec.create(e);
  91003. } catch (n) {
  91004. mi(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
  91005. }
  91006. return this;
  91007. }
  91008. destroy(e) {
  91009. var n;
  91010. if (!((n = this.value) === null || n === void 0) && n.destroy)
  91011. try {
  91012. this.value.destroy();
  91013. } catch (r) {
  91014. mi(e.state, r, "CodeMirror plugin crashed");
  91015. }
  91016. }
  91017. deactivate() {
  91018. this.spec = this.value = null;
  91019. }
  91020. }
  91021. const Uae = /* @__PURE__ */ Be.define(), i4 = /* @__PURE__ */ Be.define(), Xm = /* @__PURE__ */ Be.define(), Xae = /* @__PURE__ */ Be.define(), a4 = /* @__PURE__ */ Be.define(), Yae = /* @__PURE__ */ Be.define();
  91022. function BH(t, e) {
  91023. let n = t.state.facet(Yae);
  91024. if (!n.length)
  91025. return n;
  91026. let r = n.map((a) => a instanceof Function ? a(t) : a), i = [];
  91027. return Vt.spans(r, e.from, e.to, {
  91028. point() {
  91029. },
  91030. span(a, o, s, l) {
  91031. let u = a - e.from, c = o - e.from, f = i;
  91032. for (let d = s.length - 1; d >= 0; d--, l--) {
  91033. let h = s[d].spec.bidiIsolate, p;
  91034. if (h == null && (h = qat(e.text, u, c)), l > 0 && f.length && (p = f[f.length - 1]).to == u && p.direction == h)
  91035. p.to = c, f = p.inner;
  91036. else {
  91037. let v = { from: u, to: c, direction: h, inner: [] };
  91038. f.push(v), f = v.inner;
  91039. }
  91040. }
  91041. }
  91042. }), i;
  91043. }
  91044. const qae = /* @__PURE__ */ Be.define();
  91045. function Kae(t) {
  91046. let e = 0, n = 0, r = 0, i = 0;
  91047. for (let a of t.state.facet(qae)) {
  91048. let o = a(t);
  91049. 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)));
  91050. }
  91051. return { left: e, right: n, top: r, bottom: i };
  91052. }
  91053. const eg = /* @__PURE__ */ Be.define();
  91054. class xa {
  91055. constructor(e, n, r, i) {
  91056. this.fromA = e, this.toA = n, this.fromB = r, this.toB = i;
  91057. }
  91058. join(e) {
  91059. return new xa(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
  91060. }
  91061. addToSet(e) {
  91062. let n = e.length, r = this;
  91063. for (; n > 0; n--) {
  91064. let i = e[n - 1];
  91065. if (!(i.fromA > r.toA)) {
  91066. if (i.toA < r.fromA)
  91067. break;
  91068. r = r.join(i), e.splice(n - 1, 1);
  91069. }
  91070. }
  91071. return e.splice(n, 0, r), e;
  91072. }
  91073. static extendWithRanges(e, n) {
  91074. if (n.length == 0)
  91075. return e;
  91076. let r = [];
  91077. for (let i = 0, a = 0, o = 0, s = 0; ; i++) {
  91078. let l = i == e.length ? null : e[i], u = o - s, c = l ? l.fromB : 1e9;
  91079. for (; a < n.length && n[a] < c; ) {
  91080. let f = n[a], d = n[a + 1], h = Math.max(s, f), p = Math.min(c, d);
  91081. if (h <= p && new xa(h + u, p + u, h, p).addToSet(r), d > c)
  91082. break;
  91083. a += 2;
  91084. }
  91085. if (!l)
  91086. return r;
  91087. new xa(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), o = l.toA, s = l.toB;
  91088. }
  91089. }
  91090. }
  91091. class iS {
  91092. constructor(e, n, r) {
  91093. this.view = e, this.state = n, this.transactions = r, this.flags = 0, this.startState = e.state, this.changes = jn.empty(this.startState.doc.length);
  91094. for (let a of r)
  91095. this.changes = this.changes.compose(a.changes);
  91096. let i = [];
  91097. this.changes.iterChangedRanges((a, o, s, l) => i.push(new xa(a, o, s, l))), this.changedRanges = i;
  91098. }
  91099. /**
  91100. @internal
  91101. */
  91102. static create(e, n, r) {
  91103. return new iS(e, n, r);
  91104. }
  91105. /**
  91106. Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
  91107. [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
  91108. update.
  91109. */
  91110. get viewportChanged() {
  91111. return (this.flags & 4) > 0;
  91112. }
  91113. /**
  91114. Indicates whether the height of a block element in the editor
  91115. changed in this update.
  91116. */
  91117. get heightChanged() {
  91118. return (this.flags & 2) > 0;
  91119. }
  91120. /**
  91121. Returns true when the document was modified or the size of the
  91122. editor, or elements within the editor, changed.
  91123. */
  91124. get geometryChanged() {
  91125. return this.docChanged || (this.flags & 10) > 0;
  91126. }
  91127. /**
  91128. True when this update indicates a focus change.
  91129. */
  91130. get focusChanged() {
  91131. return (this.flags & 1) > 0;
  91132. }
  91133. /**
  91134. Whether the document changed in this update.
  91135. */
  91136. get docChanged() {
  91137. return !this.changes.empty;
  91138. }
  91139. /**
  91140. Whether the selection was explicitly set in this update.
  91141. */
  91142. get selectionSet() {
  91143. return this.transactions.some((e) => e.selection);
  91144. }
  91145. /**
  91146. @internal
  91147. */
  91148. get empty() {
  91149. return this.flags == 0 && this.transactions.length == 0;
  91150. }
  91151. }
  91152. class zH extends Jt {
  91153. get length() {
  91154. return this.view.state.doc.length;
  91155. }
  91156. constructor(e) {
  91157. 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 xa(0, 0, 0, e.state.doc.length)], 0, null);
  91158. }
  91159. // Update the document view to a given state.
  91160. update(e) {
  91161. var n;
  91162. let r = e.changedRanges;
  91163. 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);
  91164. let i = -1;
  91165. this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? i = this.domChanged.newSel.head : !aot(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head));
  91166. let a = i > -1 ? eot(this.view, e.changes, i) : null;
  91167. if (this.domChanged = null, this.hasComposition) {
  91168. this.markedForComposition.clear();
  91169. let { from: u, to: c } = this.hasComposition;
  91170. r = new xa(u, c, e.changes.mapPos(u, -1), e.changes.mapPos(c, 1)).addToSet(r.slice());
  91171. }
  91172. 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);
  91173. let o = this.decorations, s = this.updateDeco(), l = rot(o, s, e.changes);
  91174. return r = xa.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);
  91175. }
  91176. // Used by update and the constructor do perform the actual DOM
  91177. // update
  91178. updateInner(e, n, r) {
  91179. this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, r);
  91180. let { observer: i } = this.view;
  91181. i.ignore(() => {
  91182. this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
  91183. let o = Ne.chrome || Ne.ios ? { node: i.selectionRange.focusNode, written: !1 } : void 0;
  91184. this.sync(this.view, o), this.flags &= -8, o && (o.written || i.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
  91185. }), this.markedForComposition.forEach(
  91186. (o) => o.flags &= -9
  91187. /* ViewFlag.Composition */
  91188. );
  91189. let a = [];
  91190. if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
  91191. for (let o of this.children)
  91192. o instanceof Ls && o.widget instanceof VH && a.push(o.dom);
  91193. i.updateGaps(a);
  91194. }
  91195. updateChildren(e, n, r) {
  91196. let i = r ? r.range.addToSet(e.slice()) : e, a = this.childCursor(n);
  91197. for (let o = i.length - 1; ; o--) {
  91198. let s = o >= 0 ? i[o] : null;
  91199. if (!s)
  91200. break;
  91201. let { fromA: l, toA: u, fromB: c, toB: f } = s, d, h, p, v;
  91202. if (r && r.range.fromB < f && r.range.toB > c) {
  91203. let _ = Qg.build(this.view.state.doc, c, r.range.fromB, this.decorations, this.dynamicDecorationMap), O = Qg.build(this.view.state.doc, r.range.toB, f, this.decorations, this.dynamicDecorationMap);
  91204. h = _.breakAtStart, p = _.openStart, v = O.openEnd;
  91205. let S = this.compositionView(r);
  91206. 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);
  91207. } else
  91208. ({ content: d, breakAtStart: h, openStart: p, openEnd: v } = Qg.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap));
  91209. let { i: g, off: m } = a.findPos(u, 1), { i: y, off: b } = a.findPos(l, -1);
  91210. Cae(this, y, b, g, m, d, h, p, v);
  91211. }
  91212. r && this.fixCompositionDOM(r);
  91213. }
  91214. updateEditContextFormatting(e) {
  91215. this.editContextFormatting = this.editContextFormatting.map(e.changes);
  91216. for (let n of e.transactions)
  91217. for (let r of n.effects)
  91218. r.is(Zae) && (this.editContextFormatting = r.value);
  91219. }
  91220. compositionView(e) {
  91221. let n = new lo(e.text.nodeValue);
  91222. n.flags |= 8;
  91223. for (let { deco: i } of e.marks)
  91224. n = new el(i, [n], n.length);
  91225. let r = new Ln();
  91226. return r.append(n, 0), r;
  91227. }
  91228. fixCompositionDOM(e) {
  91229. let n = (a, o) => {
  91230. o.flags |= 8 | (o.children.some(
  91231. (l) => l.flags & 7
  91232. /* ViewFlag.Dirty */
  91233. ) ? 1 : 0), this.markedForComposition.add(o);
  91234. let s = Jt.get(a);
  91235. s && s != o && (s.dom = null), o.setDOM(a);
  91236. }, r = this.childPos(e.range.fromB, 1), i = this.children[r.i];
  91237. n(e.line, i);
  91238. for (let a = e.marks.length - 1; a >= -1; a--)
  91239. r = i.childPos(r.off, 1), i = i.children[r.i], n(a >= 0 ? e.marks[a].node : e.text, i);
  91240. }
  91241. // Sync the DOM selection to this.state.selection
  91242. updateSelection(e = !1, n = !1) {
  91243. (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
  91244. let r = this.view.root.activeElement, i = r == this.dom, a = !i && i1(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r));
  91245. if (!(i || n || a))
  91246. return;
  91247. let o = this.forceSelection;
  91248. this.forceSelection = !1;
  91249. let s = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(s.anchor)), u = s.empty ? l : this.moveToLine(this.domAtPos(s.head));
  91250. if (Ne.gecko && s.empty && !this.hasComposition && Jat(l)) {
  91251. let f = document.createTextNode("");
  91252. this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new kr(f, 0), o = !0;
  91253. }
  91254. let c = this.view.observer.selectionRange;
  91255. (o || !c.focusNode || (!Wg(l.node, l.offset, c.anchorNode, c.anchorOffset) || !Wg(u.node, u.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, s)) && (this.view.observer.ignore(() => {
  91256. Ne.android && Ne.chrome && this.dom.contains(c.focusNode) && iot(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
  91257. let f = Um(this.view.root);
  91258. if (f) if (s.empty) {
  91259. if (Ne.gecko) {
  91260. let d = tot(l.node, l.offset);
  91261. if (d && d != 3) {
  91262. let h = (d == 1 ? Sae : xae)(l.node, l.offset);
  91263. h && (l = new kr(h.node, h.offset));
  91264. }
  91265. }
  91266. f.collapse(l.node, l.offset), s.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = s.bidiLevel);
  91267. } else if (f.extend) {
  91268. f.collapse(l.node, l.offset);
  91269. try {
  91270. f.extend(u.node, u.offset);
  91271. } catch {
  91272. }
  91273. } else {
  91274. let d = document.createRange();
  91275. 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);
  91276. }
  91277. a && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus());
  91278. }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new kr(c.anchorNode, c.anchorOffset), this.impreciseHead = u.precise ? null : new kr(c.focusNode, c.focusOffset);
  91279. }
  91280. // If a zero-length widget is inserted next to the cursor during
  91281. // composition, avoid moving it across it and disrupting the
  91282. // composition.
  91283. suppressWidgetCursorChange(e, n) {
  91284. return this.hasComposition && n.empty && Wg(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
  91285. }
  91286. enforceCursorAssoc() {
  91287. if (this.hasComposition)
  91288. return;
  91289. let { view: e } = this, n = e.state.selection.main, r = Um(e.root), { anchorNode: i, anchorOffset: a } = e.observer.selectionRange;
  91290. if (!r || !n.empty || !n.assoc || !r.modify)
  91291. return;
  91292. let o = Ln.find(this, n.head);
  91293. if (!o)
  91294. return;
  91295. let s = o.posAtStart;
  91296. if (n.head == s || n.head == s + o.length)
  91297. return;
  91298. let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
  91299. if (!l || !u || l.bottom > u.top)
  91300. return;
  91301. let c = this.domAtPos(n.head + n.assoc);
  91302. r.collapse(c.node, c.offset), r.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
  91303. let f = e.observer.selectionRange;
  91304. e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != n.from && r.collapse(i, a);
  91305. }
  91306. // If a position is in/near a block widget, move it to a nearby text
  91307. // line, since we don't want the cursor inside a block widget.
  91308. moveToLine(e) {
  91309. let n = this.dom, r;
  91310. if (e.node != n)
  91311. return e;
  91312. for (let i = e.offset; !r && i < n.childNodes.length; i++) {
  91313. let a = Jt.get(n.childNodes[i]);
  91314. a instanceof Ln && (r = a.domAtPos(0));
  91315. }
  91316. for (let i = e.offset - 1; !r && i >= 0; i--) {
  91317. let a = Jt.get(n.childNodes[i]);
  91318. a instanceof Ln && (r = a.domAtPos(a.length));
  91319. }
  91320. return r ? new kr(r.node, r.offset, !0) : e;
  91321. }
  91322. nearest(e) {
  91323. for (let n = e; n; ) {
  91324. let r = Jt.get(n);
  91325. if (r && r.rootView == this)
  91326. return r;
  91327. n = n.parentNode;
  91328. }
  91329. return null;
  91330. }
  91331. posFromDOM(e, n) {
  91332. let r = this.nearest(e);
  91333. if (!r)
  91334. throw new RangeError("Trying to find position for a DOM position outside of the document");
  91335. return r.localPosFromDOM(e, n) + r.posAtStart;
  91336. }
  91337. domAtPos(e) {
  91338. let { i: n, off: r } = this.childCursor().findPos(e, -1);
  91339. for (; n < this.children.length - 1; ) {
  91340. let i = this.children[n];
  91341. if (r < i.length || i instanceof Ln)
  91342. break;
  91343. n++, r = 0;
  91344. }
  91345. return this.children[n].domAtPos(r);
  91346. }
  91347. coordsAt(e, n) {
  91348. let r = null, i = 0;
  91349. for (let a = this.length, o = this.children.length - 1; o >= 0; o--) {
  91350. let s = this.children[o], l = a - s.breakAfter, u = l - s.length;
  91351. if (l < e)
  91352. break;
  91353. if (u <= e && (u < e || s.covers(-1)) && (l > e || s.covers(1)) && (!r || s instanceof Ln && !(r instanceof Ln && n >= 0)))
  91354. r = s, i = u;
  91355. else if (r && u == e && l == e && s instanceof Ls && Math.abs(n) < 2) {
  91356. if (s.deco.startSide < 0)
  91357. break;
  91358. o && (r = null);
  91359. }
  91360. a = u;
  91361. }
  91362. return r ? r.coordsAt(e - i, n) : null;
  91363. }
  91364. coordsForChar(e) {
  91365. let { i: n, off: r } = this.childPos(e, 1), i = this.children[n];
  91366. if (!(i instanceof Ln))
  91367. return null;
  91368. for (; i.children.length; ) {
  91369. let { i: s, off: l } = i.childPos(r, 1);
  91370. for (; ; s++) {
  91371. if (s == i.children.length)
  91372. return null;
  91373. if ((i = i.children[s]).length)
  91374. break;
  91375. }
  91376. r = l;
  91377. }
  91378. if (!(i instanceof lo))
  91379. return null;
  91380. let a = _r(i.text, r);
  91381. if (a == r)
  91382. return null;
  91383. let o = Tf(i.dom, r, a).getClientRects();
  91384. for (let s = 0; s < o.length; s++) {
  91385. let l = o[s];
  91386. if (s == o.length - 1 || l.top < l.bottom && l.left < l.right)
  91387. return l;
  91388. }
  91389. return null;
  91390. }
  91391. measureVisibleLineHeights(e) {
  91392. 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;
  91393. for (let u = 0, c = 0; c < this.children.length; c++) {
  91394. let f = this.children[c], d = u + f.length;
  91395. if (d > i)
  91396. break;
  91397. if (u >= r) {
  91398. let h = f.dom.getBoundingClientRect();
  91399. if (n.push(h.height), o) {
  91400. let p = f.dom.lastChild, v = p ? Uh(p) : [];
  91401. if (v.length) {
  91402. let g = v[v.length - 1], m = l ? g.right - h.left : h.right - g.left;
  91403. m > s && (s = m, this.minWidth = a, this.minWidthFrom = u, this.minWidthTo = d);
  91404. }
  91405. }
  91406. }
  91407. u = d + f.breakAfter;
  91408. }
  91409. return n;
  91410. }
  91411. textDirectionAt(e) {
  91412. let { i: n } = this.childPos(e, 1);
  91413. return getComputedStyle(this.children[n].dom).direction == "rtl" ? pn.RTL : pn.LTR;
  91414. }
  91415. measureTextSize() {
  91416. for (let a of this.children)
  91417. if (a instanceof Ln) {
  91418. let o = a.measureTextSize();
  91419. if (o)
  91420. return o;
  91421. }
  91422. let e = document.createElement("div"), n, r, i;
  91423. 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(() => {
  91424. this.dom.appendChild(e);
  91425. let a = Uh(e.firstChild)[0];
  91426. n = e.getBoundingClientRect().height, r = a ? a.width / 27 : 7, i = a ? a.height : n, e.remove();
  91427. }), { lineHeight: n, charWidth: r, textHeight: i };
  91428. }
  91429. childCursor(e = this.length) {
  91430. let n = this.children.length;
  91431. return n && (e -= this.children[--n].length), new wae(this.children, e, n);
  91432. }
  91433. computeBlockGapDeco() {
  91434. let e = [], n = this.view.viewState;
  91435. for (let r = 0, i = 0; ; i++) {
  91436. let a = i == n.viewports.length ? null : n.viewports[i], o = a ? a.from - 1 : this.length;
  91437. if (o > r) {
  91438. let s = (n.lineBlockAt(o).bottom - n.lineBlockAt(r).top) / this.view.scaleY;
  91439. e.push(Ze.replace({
  91440. widget: new VH(s),
  91441. block: !0,
  91442. inclusive: !0,
  91443. isBlockGap: !0
  91444. }).range(r, o));
  91445. }
  91446. if (!a)
  91447. break;
  91448. r = a.to + 1;
  91449. }
  91450. return Ze.set(e);
  91451. }
  91452. updateDeco() {
  91453. let e = 1, n = this.view.state.facet(Xm).map((a) => (this.dynamicDecorationMap[e++] = typeof a == "function") ? a(this.view) : a), r = !1, i = this.view.state.facet(Xae).map((a, o) => {
  91454. let s = typeof a == "function";
  91455. return s && (r = !0), s ? a(this.view) : a;
  91456. });
  91457. for (i.length && (this.dynamicDecorationMap[e++] = r, n.push(Vt.join(i))), this.decorations = [
  91458. this.editContextFormatting,
  91459. ...n,
  91460. this.computeBlockGapDeco(),
  91461. this.view.viewState.lineGapDeco
  91462. ]; e < this.decorations.length; )
  91463. this.dynamicDecorationMap[e++] = !1;
  91464. return this.decorations;
  91465. }
  91466. scrollIntoView(e) {
  91467. if (e.isSnapshot) {
  91468. let u = this.view.viewState.lineBlockAt(e.range.head);
  91469. this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
  91470. return;
  91471. }
  91472. for (let u of this.view.state.facet(jae))
  91473. try {
  91474. if (u(this.view, e.range, e))
  91475. return !0;
  91476. } catch (c) {
  91477. mi(this.view.state, c, "scroll handler");
  91478. }
  91479. let { range: n } = e, r = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), i;
  91480. if (!r)
  91481. return;
  91482. !n.empty && (i = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (r = {
  91483. left: Math.min(r.left, i.left),
  91484. top: Math.min(r.top, i.top),
  91485. right: Math.max(r.right, i.right),
  91486. bottom: Math.max(r.bottom, i.bottom)
  91487. });
  91488. let a = Kae(this.view), o = {
  91489. left: r.left - a.left,
  91490. top: r.top - a.top,
  91491. right: r.right + a.right,
  91492. bottom: r.bottom + a.bottom
  91493. }, { offsetWidth: s, offsetHeight: l } = this.view.scrollDOM;
  91494. Dat(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);
  91495. }
  91496. }
  91497. function Jat(t) {
  91498. 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");
  91499. }
  91500. class VH extends ds {
  91501. constructor(e) {
  91502. super(), this.height = e;
  91503. }
  91504. toDOM() {
  91505. let e = document.createElement("div");
  91506. return e.className = "cm-gap", this.updateDOM(e), e;
  91507. }
  91508. eq(e) {
  91509. return e.height == this.height;
  91510. }
  91511. updateDOM(e) {
  91512. return e.style.height = this.height + "px", !0;
  91513. }
  91514. get editable() {
  91515. return !0;
  91516. }
  91517. get estimatedHeight() {
  91518. return this.height;
  91519. }
  91520. ignoreEvent() {
  91521. return !1;
  91522. }
  91523. }
  91524. function Jae(t, e) {
  91525. let n = t.observer.selectionRange;
  91526. if (!n.focusNode)
  91527. return null;
  91528. let r = Sae(n.focusNode, n.focusOffset), i = xae(n.focusNode, n.focusOffset), a = r || i;
  91529. if (i && r && i.node != r.node) {
  91530. let s = Jt.get(i.node);
  91531. if (!s || s instanceof lo && s.text != i.node.nodeValue)
  91532. a = i;
  91533. else if (t.docView.lastCompositionAfterCursor) {
  91534. let l = Jt.get(r.node);
  91535. !l || l instanceof lo && l.text != r.node.nodeValue || (a = i);
  91536. }
  91537. }
  91538. if (t.docView.lastCompositionAfterCursor = a != r, !a)
  91539. return null;
  91540. let o = e - a.offset;
  91541. return { from: o, to: o + a.node.nodeValue.length, node: a.node };
  91542. }
  91543. function eot(t, e, n) {
  91544. let r = Jae(t, n);
  91545. if (!r)
  91546. return null;
  91547. let { node: i, from: a, to: o } = r, s = i.nodeValue;
  91548. if (/[\n\r]/.test(s) || t.state.doc.sliceString(r.from, r.to) != s)
  91549. return null;
  91550. let l = e.invertedDesc, u = new xa(l.mapPos(a), l.mapPos(o), a, o), c = [];
  91551. for (let f = i.parentNode; ; f = f.parentNode) {
  91552. let d = Jt.get(f);
  91553. if (d instanceof el)
  91554. c.push({ node: f, deco: d.mark });
  91555. else {
  91556. if (d instanceof Ln || f.nodeName == "DIV" && f.parentNode == t.contentDOM)
  91557. return { range: u, text: i, marks: c, line: f };
  91558. if (f != t.contentDOM)
  91559. c.push({ node: f, deco: new iy({
  91560. inclusive: !0,
  91561. attributes: Fat(f),
  91562. tagName: f.tagName.toLowerCase()
  91563. }) });
  91564. else
  91565. return null;
  91566. }
  91567. }
  91568. }
  91569. function tot(t, e) {
  91570. 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);
  91571. }
  91572. let not = class {
  91573. constructor() {
  91574. this.changes = [];
  91575. }
  91576. compareRange(e, n) {
  91577. OM(e, n, this.changes);
  91578. }
  91579. comparePoint(e, n) {
  91580. OM(e, n, this.changes);
  91581. }
  91582. };
  91583. function rot(t, e, n) {
  91584. let r = new not();
  91585. return Vt.compare(t, e, n, r), r.changes;
  91586. }
  91587. function iot(t, e) {
  91588. for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
  91589. if (n.nodeType == 1 && n.contentEditable == "false")
  91590. return !0;
  91591. return !1;
  91592. }
  91593. function aot(t, e) {
  91594. let n = !1;
  91595. return e && t.iterChangedRanges((r, i) => {
  91596. r < e.to && i > e.from && (n = !0);
  91597. }), n;
  91598. }
  91599. function oot(t, e, n = 1) {
  91600. let r = t.charCategorizer(e), i = t.doc.lineAt(e), a = e - i.from;
  91601. if (i.length == 0)
  91602. return me.cursor(e);
  91603. a == 0 ? n = 1 : a == i.length && (n = -1);
  91604. let o = a, s = a;
  91605. n < 0 ? o = _r(i.text, a, !1) : s = _r(i.text, a);
  91606. let l = r(i.text.slice(o, s));
  91607. for (; o > 0; ) {
  91608. let u = _r(i.text, o, !1);
  91609. if (r(i.text.slice(u, o)) != l)
  91610. break;
  91611. o = u;
  91612. }
  91613. for (; s < i.length; ) {
  91614. let u = _r(i.text, s);
  91615. if (r(i.text.slice(s, u)) != l)
  91616. break;
  91617. s = u;
  91618. }
  91619. return me.range(o + i.from, s + i.from);
  91620. }
  91621. function sot(t, e) {
  91622. return e.left > t ? e.left - t : Math.max(0, t - e.right);
  91623. }
  91624. function lot(t, e) {
  91625. return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
  91626. }
  91627. function m$(t, e) {
  91628. return t.top < e.bottom - 1 && t.bottom > e.top + 1;
  91629. }
  91630. function FH(t, e) {
  91631. return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
  91632. }
  91633. function WH(t, e) {
  91634. return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
  91635. }
  91636. function TM(t, e, n) {
  91637. let r, i, a, o, s = !1, l, u, c, f;
  91638. for (let p = t.firstChild; p; p = p.nextSibling) {
  91639. let v = Uh(p);
  91640. for (let g = 0; g < v.length; g++) {
  91641. let m = v[g];
  91642. i && m$(i, m) && (m = FH(WH(m, i.bottom), i.top));
  91643. let y = sot(e, m), b = lot(n, m);
  91644. if (y == 0 && b == 0)
  91645. return p.nodeType == 3 ? QH(p, e, n) : TM(p, e, n);
  91646. if (!r || o > b || o == b && a > y) {
  91647. r = p, i = m, a = y, o = b;
  91648. let _ = b ? n < m.top ? -1 : 1 : y ? e < m.left ? -1 : 1 : 0;
  91649. s = !_ || (_ > 0 ? g < v.length - 1 : g > 0);
  91650. }
  91651. 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 && m$(c, m) ? c = WH(c, m.bottom) : f && m$(f, m) && (f = FH(f, m.top));
  91652. }
  91653. }
  91654. if (c && c.bottom >= n ? (r = l, i = c) : f && f.top <= n && (r = u, i = f), !r)
  91655. return { node: t, offset: 0 };
  91656. let d = Math.max(i.left, Math.min(i.right, e));
  91657. if (r.nodeType == 3)
  91658. return QH(r, d, n);
  91659. if (s && r.contentEditable != "false")
  91660. return TM(r, d, n);
  91661. let h = Array.prototype.indexOf.call(t.childNodes, r) + (e >= (i.left + i.right) / 2 ? 1 : 0);
  91662. return { node: t, offset: h };
  91663. }
  91664. function QH(t, e, n) {
  91665. let r = t.nodeValue.length, i = -1, a = 1e9, o = 0;
  91666. for (let s = 0; s < r; s++) {
  91667. let l = Tf(t, s, s + 1).getClientRects();
  91668. for (let u = 0; u < l.length; u++) {
  91669. let c = l[u];
  91670. if (c.top == c.bottom)
  91671. continue;
  91672. o || (o = e - c.left);
  91673. let f = (c.top > n ? c.top - n : n - c.bottom) - 1;
  91674. if (c.left - 1 <= e && c.right + 1 >= e && f < a) {
  91675. let d = e >= (c.left + c.right) / 2, h = d;
  91676. if ((Ne.chrome || Ne.gecko) && Tf(t, s).getBoundingClientRect().left == c.right && (h = !d), f <= 0)
  91677. return { node: t, offset: s + (h ? 1 : 0) };
  91678. i = s + (h ? 1 : 0), a = f;
  91679. }
  91680. }
  91681. }
  91682. return { node: t, offset: i > -1 ? i : o > 0 ? t.nodeValue.length : 0 };
  91683. }
  91684. function eoe(t, e, n, r = -1) {
  91685. var i, a;
  91686. let o = t.contentDOM.getBoundingClientRect(), s = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: c, y: f } = e, d = f - s;
  91687. if (d < 0)
  91688. return 0;
  91689. if (d > u)
  91690. return t.state.doc.length;
  91691. for (let _ = t.viewState.heightOracle.textHeight / 2, O = !1; l = t.elementAtHeight(d), l.type != Jr.Text; )
  91692. for (; d = r > 0 ? l.bottom + _ : l.top - _, !(d >= 0 && d <= u); ) {
  91693. if (O)
  91694. return n ? null : 0;
  91695. O = !0, r = -r;
  91696. }
  91697. f = s + d;
  91698. let h = l.from;
  91699. if (h < t.viewport.from)
  91700. return t.viewport.from == 0 ? 0 : n ? null : HH(t, o, l, c, f);
  91701. if (h > t.viewport.to)
  91702. return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : HH(t, o, l, c, f);
  91703. let p = t.dom.ownerDocument, v = t.root.elementFromPoint ? t.root : p, g = v.elementFromPoint(c, f);
  91704. 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));
  91705. let m, y = -1;
  91706. if (g && ((i = t.docView.nearest(g)) === null || i === void 0 ? void 0 : i.isEditable) != !1) {
  91707. if (p.caretPositionFromPoint) {
  91708. let _ = p.caretPositionFromPoint(c, f);
  91709. _ && ({ offsetNode: m, offset: y } = _);
  91710. } else if (p.caretRangeFromPoint) {
  91711. let _ = p.caretRangeFromPoint(c, f);
  91712. _ && ({ startContainer: m, startOffset: y } = _, (!t.contentDOM.contains(m) || Ne.safari && uot(m, y, c) || Ne.chrome && cot(m, y, c)) && (m = void 0));
  91713. }
  91714. }
  91715. if (!m || !t.docView.dom.contains(m)) {
  91716. let _ = Ln.find(t.docView, h);
  91717. if (!_)
  91718. return d > l.top + l.height / 2 ? l.to : l.from;
  91719. ({ node: m, offset: y } = TM(_.dom, c, f));
  91720. }
  91721. let b = t.docView.nearest(m);
  91722. if (!b)
  91723. return null;
  91724. if (b.isWidget && ((a = b.dom) === null || a === void 0 ? void 0 : a.nodeType) == 1) {
  91725. let _ = b.dom.getBoundingClientRect();
  91726. return e.y < _.top || e.y <= _.bottom && e.x <= (_.left + _.right) / 2 ? b.posAtStart : b.posAtEnd;
  91727. } else
  91728. return b.localPosFromDOM(m, y) + b.posAtStart;
  91729. }
  91730. function HH(t, e, n, r, i) {
  91731. let a = Math.round((r - e.left) * t.defaultCharacterWidth);
  91732. if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
  91733. let s = t.viewState.heightOracle.textHeight, l = Math.floor((i - n.top - (t.defaultLineHeight - s) * 0.5) / s);
  91734. a += l * t.viewState.heightOracle.lineLength;
  91735. }
  91736. let o = t.state.sliceDoc(n.from, n.to);
  91737. return n.from + dM(o, a, t.state.tabSize);
  91738. }
  91739. function uot(t, e, n) {
  91740. let r;
  91741. if (t.nodeType != 3 || e != (r = t.nodeValue.length))
  91742. return !1;
  91743. for (let i = t.nextSibling; i; i = i.nextSibling)
  91744. if (i.nodeType != 1 || i.nodeName != "BR")
  91745. return !1;
  91746. return Tf(t, r - 1, r).getBoundingClientRect().left > n;
  91747. }
  91748. function cot(t, e, n) {
  91749. if (e != 0)
  91750. return !1;
  91751. for (let i = t; ; ) {
  91752. let a = i.parentNode;
  91753. if (!a || a.nodeType != 1 || a.firstChild != i)
  91754. return !1;
  91755. if (a.classList.contains("cm-line"))
  91756. break;
  91757. i = a;
  91758. }
  91759. let r = t.nodeType == 1 ? t.getBoundingClientRect() : Tf(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
  91760. return n - r.left > 5;
  91761. }
  91762. function PM(t, e) {
  91763. let n = t.lineBlockAt(e);
  91764. if (Array.isArray(n.type)) {
  91765. for (let r of n.type)
  91766. if (r.to > e || r.to == e && (r.to == n.to || r.type == Jr.Text))
  91767. return r;
  91768. }
  91769. return n;
  91770. }
  91771. function fot(t, e, n, r) {
  91772. let i = PM(t, e.head), a = !r || i.type != Jr.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head);
  91773. if (a) {
  91774. let o = t.dom.getBoundingClientRect(), s = t.textDirectionAt(i.from), l = t.posAtCoords({
  91775. x: n == (s == pn.LTR) ? o.right - 1 : o.left + 1,
  91776. y: (a.top + a.bottom) / 2
  91777. });
  91778. if (l != null)
  91779. return me.cursor(l, n ? -1 : 1);
  91780. }
  91781. return me.cursor(n ? i.to : i.from, n ? -1 : 1);
  91782. }
  91783. function GH(t, e, n, r) {
  91784. let i = t.state.doc.lineAt(e.head), a = t.bidiSpans(i), o = t.textDirectionAt(i.from);
  91785. for (let s = e, l = null; ; ) {
  91786. let u = Yat(i, a, o, s, n), c = Nae;
  91787. if (!u) {
  91788. if (i.number == (n ? t.state.doc.lines : 1))
  91789. return s;
  91790. c = `
  91791. `, i = t.state.doc.line(i.number + (n ? 1 : -1)), a = t.bidiSpans(i), u = t.visualLineSide(i, !n);
  91792. }
  91793. if (l) {
  91794. if (!l(c))
  91795. return s;
  91796. } else {
  91797. if (!r)
  91798. return u;
  91799. l = r(c);
  91800. }
  91801. s = u;
  91802. }
  91803. }
  91804. function dot(t, e, n) {
  91805. let r = t.state.charCategorizer(e), i = r(n);
  91806. return (a) => {
  91807. let o = r(a);
  91808. return i == yn.Space && (i = o), i == o;
  91809. };
  91810. }
  91811. function hot(t, e, n, r) {
  91812. let i = e.head, a = n ? 1 : -1;
  91813. if (i == (n ? t.state.doc.length : 0))
  91814. return me.cursor(i, e.assoc);
  91815. let o = e.goalColumn, s, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), c = t.documentTop;
  91816. if (u)
  91817. o == null && (o = u.left - l.left), s = a < 0 ? u.top : u.bottom;
  91818. else {
  91819. let h = t.viewState.lineBlockAt(i);
  91820. o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (i - h.from))), s = (a < 0 ? h.top : h.bottom) + c;
  91821. }
  91822. let f = l.left + o, d = r ?? t.viewState.heightOracle.textHeight >> 1;
  91823. for (let h = 0; ; h += 10) {
  91824. let p = s + (d + h) * a, v = eoe(t, { x: f, y: p }, !1, a);
  91825. if (p < l.top || p > l.bottom || (a < 0 ? v < i : v > i)) {
  91826. let g = t.docView.coordsForChar(v), m = !g || p < g.top ? -1 : 1;
  91827. return me.cursor(v, m, void 0, o);
  91828. }
  91829. }
  91830. }
  91831. function a1(t, e, n) {
  91832. for (; ; ) {
  91833. let r = 0;
  91834. for (let i of t)
  91835. i.between(e - 1, e + 1, (a, o, s) => {
  91836. if (e > a && e < o) {
  91837. let l = r || n || (e - a < o - e ? -1 : 1);
  91838. e = l < 0 ? a : o, r = l;
  91839. }
  91840. });
  91841. if (!r)
  91842. return e;
  91843. }
  91844. }
  91845. function y$(t, e, n) {
  91846. let r = a1(t.state.facet(a4).map((i) => i(t)), n.from, e.head > n.from ? -1 : 1);
  91847. return r == n.from ? n : me.cursor(r, r < n.from ? 1 : -1);
  91848. }
  91849. class pot {
  91850. setSelectionOrigin(e) {
  91851. this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
  91852. }
  91853. constructor(e) {
  91854. 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 && Eot(e.contentDOM.ownerDocument);
  91855. }
  91856. handleEvent(e) {
  91857. !Sot(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
  91858. }
  91859. runHandlers(e, n) {
  91860. let r = this.handlers[e];
  91861. if (r) {
  91862. for (let i of r.observers)
  91863. i(this.view, n);
  91864. for (let i of r.handlers) {
  91865. if (n.defaultPrevented)
  91866. break;
  91867. if (i(this.view, n)) {
  91868. n.preventDefault();
  91869. break;
  91870. }
  91871. }
  91872. }
  91873. }
  91874. ensureHandlers(e) {
  91875. let n = vot(e), r = this.handlers, i = this.view.contentDOM;
  91876. for (let a in n)
  91877. if (a != "scroll") {
  91878. let o = !n[a].handlers.length, s = r[a];
  91879. s && o != !s.handlers.length && (i.removeEventListener(a, this.handleEvent), s = null), s || i.addEventListener(a, this.handleEvent, { passive: o });
  91880. }
  91881. for (let a in r)
  91882. a != "scroll" && !n[a] && i.removeEventListener(a, this.handleEvent);
  91883. this.handlers = n;
  91884. }
  91885. keydown(e) {
  91886. if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode))
  91887. return !0;
  91888. if (this.tabFocusMode > 0 && e.keyCode != 27 && noe.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), Ne.android && Ne.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
  91889. return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
  91890. let n;
  91891. return Ne.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = toe.find((r) => r.keyCode == e.keyCode)) && !e.ctrlKey || got.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);
  91892. }
  91893. flushIOSKey(e) {
  91894. let n = this.pendingIOSKey;
  91895. return !n || n.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, lh(this.view.contentDOM, n.key, n.keyCode, n instanceof KeyboardEvent ? n : void 0));
  91896. }
  91897. ignoreDuringComposition(e) {
  91898. 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;
  91899. }
  91900. startMouseSelection(e) {
  91901. this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
  91902. }
  91903. update(e) {
  91904. 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);
  91905. }
  91906. destroy() {
  91907. this.mouseSelection && this.mouseSelection.destroy();
  91908. }
  91909. }
  91910. function jH(t, e) {
  91911. return (n, r) => {
  91912. try {
  91913. return e.call(t, r, n);
  91914. } catch (i) {
  91915. mi(n.state, i);
  91916. }
  91917. };
  91918. }
  91919. function vot(t) {
  91920. let e = /* @__PURE__ */ Object.create(null);
  91921. function n(r) {
  91922. return e[r] || (e[r] = { observers: [], handlers: [] });
  91923. }
  91924. for (let r of t) {
  91925. let i = r.spec;
  91926. if (i && i.domEventHandlers)
  91927. for (let a in i.domEventHandlers) {
  91928. let o = i.domEventHandlers[a];
  91929. o && n(a).handlers.push(jH(r.value, o));
  91930. }
  91931. if (i && i.domEventObservers)
  91932. for (let a in i.domEventObservers) {
  91933. let o = i.domEventObservers[a];
  91934. o && n(a).observers.push(jH(r.value, o));
  91935. }
  91936. }
  91937. for (let r in uo)
  91938. n(r).handlers.push(uo[r]);
  91939. for (let r in Ia)
  91940. n(r).observers.push(Ia[r]);
  91941. return e;
  91942. }
  91943. const toe = [
  91944. { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
  91945. { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
  91946. { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
  91947. { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
  91948. ], got = "dthko", noe = [16, 17, 18, 20, 91, 92, 224, 225], Zb = 6;
  91949. function Ub(t) {
  91950. return Math.max(0, t) * 0.7 + 8;
  91951. }
  91952. function mot(t, e) {
  91953. return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
  91954. }
  91955. class yot {
  91956. constructor(e, n, r, i) {
  91957. 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 = Rat(e.contentDOM), this.atoms = e.state.facet(a4).map((o) => o(e));
  91958. let a = e.contentDOM.ownerDocument;
  91959. 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) && bot(e, n), this.dragging = Oot(e, n) && ooe(n) == 1 ? null : !1;
  91960. }
  91961. start(e) {
  91962. this.dragging === !1 && this.select(e);
  91963. }
  91964. move(e) {
  91965. var n;
  91966. if (e.buttons == 0)
  91967. return this.destroy();
  91968. if (this.dragging || this.dragging == null && mot(this.startEvent, e) < 10)
  91969. return;
  91970. this.select(this.lastEvent = e);
  91971. 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 = Kae(this.view);
  91972. e.clientX - o.left <= a.left + Zb ? r = -Ub(a.left - e.clientX) : e.clientX + o.right >= a.right - Zb && (r = Ub(e.clientX - a.right)), e.clientY - o.top <= a.top + Zb ? i = -Ub(a.top - e.clientY) : e.clientY + o.bottom >= a.bottom - Zb && (i = Ub(e.clientY - a.bottom)), this.setScrollSpeed(r, i);
  91973. }
  91974. up(e) {
  91975. this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
  91976. }
  91977. destroy() {
  91978. this.setScrollSpeed(0, 0);
  91979. let e = this.view.contentDOM.ownerDocument;
  91980. e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
  91981. }
  91982. setScrollSpeed(e, n) {
  91983. 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);
  91984. }
  91985. scroll() {
  91986. 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);
  91987. }
  91988. skipAtoms(e) {
  91989. let n = null;
  91990. for (let r = 0; r < e.ranges.length; r++) {
  91991. let i = e.ranges[r], a = null;
  91992. if (i.empty) {
  91993. let o = a1(this.atoms, i.from, 0);
  91994. o != i.from && (a = me.cursor(o, -1));
  91995. } else {
  91996. let o = a1(this.atoms, i.from, -1), s = a1(this.atoms, i.to, 1);
  91997. (o != i.from || s != i.to) && (a = me.range(i.from == i.anchor ? o : s, i.from == i.head ? o : s));
  91998. }
  91999. a && (n || (n = e.ranges.slice()), n[r] = a);
  92000. }
  92001. return n ? me.create(n, e.mainIndex) : e;
  92002. }
  92003. select(e) {
  92004. let { view: n } = this, r = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
  92005. (this.mustSelect || !r.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
  92006. selection: r,
  92007. userEvent: "select.pointer"
  92008. }), this.mustSelect = !1;
  92009. }
  92010. update(e) {
  92011. e.transactions.some((n) => n.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
  92012. }
  92013. }
  92014. function bot(t, e) {
  92015. let n = t.state.facet(Bae);
  92016. return n.length ? n[0](e) : Ne.mac ? e.metaKey : e.ctrlKey;
  92017. }
  92018. function _ot(t, e) {
  92019. let n = t.state.facet(zae);
  92020. return n.length ? n[0](e) : Ne.mac ? !e.altKey : !e.ctrlKey;
  92021. }
  92022. function Oot(t, e) {
  92023. let { main: n } = t.state.selection;
  92024. if (n.empty)
  92025. return !1;
  92026. let r = Um(t.root);
  92027. if (!r || r.rangeCount == 0)
  92028. return !0;
  92029. let i = r.getRangeAt(0).getClientRects();
  92030. for (let a = 0; a < i.length; a++) {
  92031. let o = i[a];
  92032. if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
  92033. return !0;
  92034. }
  92035. return !1;
  92036. }
  92037. function Sot(t, e) {
  92038. if (!e.bubbles)
  92039. return !0;
  92040. if (e.defaultPrevented)
  92041. return !1;
  92042. for (let n = e.target, r; n != t.contentDOM; n = n.parentNode)
  92043. if (!n || n.nodeType == 11 || (r = Jt.get(n)) && r.ignoreEvent(e))
  92044. return !1;
  92045. return !0;
  92046. }
  92047. const uo = /* @__PURE__ */ Object.create(null), Ia = /* @__PURE__ */ Object.create(null), roe = Ne.ie && Ne.ie_version < 15 || Ne.ios && Ne.webkit_version < 604;
  92048. function xot(t) {
  92049. let e = t.dom.parentNode;
  92050. if (!e)
  92051. return;
  92052. let n = e.appendChild(document.createElement("textarea"));
  92053. n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
  92054. t.focus(), n.remove(), ioe(t, n.value);
  92055. }, 50);
  92056. }
  92057. function ioe(t, e) {
  92058. let { state: n } = t, r, i = 1, a = n.toText(e), o = a.lines == n.selection.ranges.length;
  92059. if ($M != null && n.selection.ranges.every((l) => l.empty) && $M == a.toString()) {
  92060. let l = -1;
  92061. r = n.changeByRange((u) => {
  92062. let c = n.doc.lineAt(u.from);
  92063. if (c.from == l)
  92064. return { range: u };
  92065. l = c.from;
  92066. let f = n.toText((o ? a.line(i++).text : e) + n.lineBreak);
  92067. return {
  92068. changes: { from: c.from, insert: f },
  92069. range: me.cursor(u.from + f.length)
  92070. };
  92071. });
  92072. } else o ? r = n.changeByRange((l) => {
  92073. let u = a.line(i++);
  92074. return {
  92075. changes: { from: l.from, to: l.to, insert: u.text },
  92076. range: me.cursor(l.from + u.length)
  92077. };
  92078. }) : r = n.replaceSelection(a);
  92079. t.dispatch(r, {
  92080. userEvent: "input.paste",
  92081. scrollIntoView: !0
  92082. });
  92083. }
  92084. Ia.scroll = (t) => {
  92085. t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
  92086. };
  92087. uo.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1);
  92088. Ia.touchstart = (t, e) => {
  92089. t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
  92090. };
  92091. Ia.touchmove = (t) => {
  92092. t.inputState.setSelectionOrigin("select.pointer");
  92093. };
  92094. uo.mousedown = (t, e) => {
  92095. if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
  92096. return !1;
  92097. let n = null;
  92098. for (let r of t.state.facet(Vae))
  92099. if (n = r(t, e), n)
  92100. break;
  92101. if (!n && e.button == 0 && (n = Tot(t, e)), n) {
  92102. let r = !t.hasFocus;
  92103. t.inputState.startMouseSelection(new yot(t, e, n, r)), r && t.observer.ignore(() => {
  92104. bae(t.contentDOM);
  92105. let a = t.root.activeElement;
  92106. a && !a.contains(t.contentDOM) && a.blur();
  92107. });
  92108. let i = t.inputState.mouseSelection;
  92109. if (i)
  92110. return i.start(e), i.dragging === !1;
  92111. }
  92112. return !1;
  92113. };
  92114. function ZH(t, e, n, r) {
  92115. if (r == 1)
  92116. return me.cursor(e, n);
  92117. if (r == 2)
  92118. return oot(t.state, e, n);
  92119. {
  92120. 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;
  92121. return s < t.state.doc.length && s == a.to && s++, me.range(o, s);
  92122. }
  92123. }
  92124. let aoe = (t, e) => t >= e.top && t <= e.bottom, UH = (t, e, n) => aoe(e, n) && t >= n.left && t <= n.right;
  92125. function wot(t, e, n, r) {
  92126. let i = Ln.find(t.docView, e);
  92127. if (!i)
  92128. return 1;
  92129. let a = e - i.posAtStart;
  92130. if (a == 0)
  92131. return 1;
  92132. if (a == i.length)
  92133. return -1;
  92134. let o = i.coordsAt(a, -1);
  92135. if (o && UH(n, r, o))
  92136. return -1;
  92137. let s = i.coordsAt(a, 1);
  92138. return s && UH(n, r, s) ? 1 : o && aoe(r, o) ? -1 : 1;
  92139. }
  92140. function XH(t, e) {
  92141. let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
  92142. return { pos: n, bias: wot(t, n, e.clientX, e.clientY) };
  92143. }
  92144. const Cot = Ne.ie && Ne.ie_version <= 11;
  92145. let YH = null, qH = 0, KH = 0;
  92146. function ooe(t) {
  92147. if (!Cot)
  92148. return t.detail;
  92149. let e = YH, n = KH;
  92150. return YH = t, KH = Date.now(), qH = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (qH + 1) % 3 : 1;
  92151. }
  92152. function Tot(t, e) {
  92153. let n = XH(t, e), r = ooe(e), i = t.state.selection;
  92154. return {
  92155. update(a) {
  92156. a.docChanged && (n.pos = a.changes.mapPos(n.pos), i = i.map(a.changes));
  92157. },
  92158. get(a, o, s) {
  92159. let l = XH(t, a), u, c = ZH(t, l.pos, l.bias, r);
  92160. if (n.pos != l.pos && !o) {
  92161. let f = ZH(t, n.pos, n.bias, r), d = Math.min(f.from, c.from), h = Math.max(f.to, c.to);
  92162. c = d < c.from ? me.range(d, h) : me.range(h, d);
  92163. }
  92164. return o ? i.replaceRange(i.main.extend(c.from, c.to)) : s && r == 1 && i.ranges.length > 1 && (u = Pot(i, l.pos)) ? u : s ? i.addRange(c) : me.create([c]);
  92165. }
  92166. };
  92167. }
  92168. function Pot(t, e) {
  92169. for (let n = 0; n < t.ranges.length; n++) {
  92170. let { from: r, to: i } = t.ranges[n];
  92171. if (r <= e && i >= e)
  92172. 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));
  92173. }
  92174. return null;
  92175. }
  92176. uo.dragstart = (t, e) => {
  92177. let { selection: { main: n } } = t.state;
  92178. if (e.target.draggable) {
  92179. let i = t.docView.nearest(e.target);
  92180. if (i && i.isWidget) {
  92181. let a = i.posAtStart, o = a + i.length;
  92182. (a >= n.to || o <= n.from) && (n = me.range(a, o));
  92183. }
  92184. }
  92185. let { inputState: r } = t;
  92186. 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;
  92187. };
  92188. uo.dragend = (t) => (t.inputState.draggedContent = null, !1);
  92189. function JH(t, e, n, r) {
  92190. if (!n)
  92191. return;
  92192. let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: a } = t.inputState, o = r && a && _ot(t, e) ? { from: a.from, to: a.to } : null, s = { from: i, insert: n }, l = t.state.changes(o ? [o, s] : s);
  92193. t.focus(), t.dispatch({
  92194. changes: l,
  92195. selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) },
  92196. userEvent: o ? "move.drop" : "input.drop"
  92197. }), t.inputState.draggedContent = null;
  92198. }
  92199. uo.drop = (t, e) => {
  92200. if (!e.dataTransfer)
  92201. return !1;
  92202. if (t.state.readOnly)
  92203. return !0;
  92204. let n = e.dataTransfer.files;
  92205. if (n && n.length) {
  92206. let r = Array(n.length), i = 0, a = () => {
  92207. ++i == n.length && JH(t, e, r.filter((o) => o != null).join(t.state.lineBreak), !1);
  92208. };
  92209. for (let o = 0; o < n.length; o++) {
  92210. let s = new FileReader();
  92211. s.onerror = a, s.onload = () => {
  92212. /[\x00-\x08\x0e-\x1f]{2}/.test(s.result) || (r[o] = s.result), a();
  92213. }, s.readAsText(n[o]);
  92214. }
  92215. return !0;
  92216. } else {
  92217. let r = e.dataTransfer.getData("Text");
  92218. if (r)
  92219. return JH(t, e, r, !0), !0;
  92220. }
  92221. return !1;
  92222. };
  92223. uo.paste = (t, e) => {
  92224. if (t.state.readOnly)
  92225. return !0;
  92226. t.observer.flush();
  92227. let n = roe ? null : e.clipboardData;
  92228. return n ? (ioe(t, n.getData("text/plain") || n.getData("text/uri-list")), !0) : (xot(t), !1);
  92229. };
  92230. function $ot(t, e) {
  92231. let n = t.dom.parentNode;
  92232. if (!n)
  92233. return;
  92234. let r = n.appendChild(document.createElement("textarea"));
  92235. r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.value = e, r.focus(), r.selectionEnd = e.length, r.selectionStart = 0, setTimeout(() => {
  92236. r.remove(), t.focus();
  92237. }, 50);
  92238. }
  92239. function Aot(t) {
  92240. let e = [], n = [], r = !1;
  92241. for (let i of t.selection.ranges)
  92242. i.empty || (e.push(t.sliceDoc(i.from, i.to)), n.push(i));
  92243. if (!e.length) {
  92244. let i = -1;
  92245. for (let { from: a } of t.selection.ranges) {
  92246. let o = t.doc.lineAt(a);
  92247. o.number > i && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), i = o.number;
  92248. }
  92249. r = !0;
  92250. }
  92251. return { text: e.join(t.lineBreak), ranges: n, linewise: r };
  92252. }
  92253. let $M = null;
  92254. uo.copy = uo.cut = (t, e) => {
  92255. let { text: n, ranges: r, linewise: i } = Aot(t.state);
  92256. if (!n && !i)
  92257. return !1;
  92258. $M = i ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
  92259. changes: r,
  92260. scrollIntoView: !0,
  92261. userEvent: "delete.cut"
  92262. });
  92263. let a = roe ? null : e.clipboardData;
  92264. return a ? (a.clearData(), a.setData("text/plain", n), !0) : ($ot(t, n), !1);
  92265. };
  92266. const soe = /* @__PURE__ */ ul.define();
  92267. function loe(t, e) {
  92268. let n = [];
  92269. for (let r of t.facet(Qae)) {
  92270. let i = r(t, e);
  92271. i && n.push(i);
  92272. }
  92273. return n ? t.update({ effects: n, annotations: soe.of(!0) }) : null;
  92274. }
  92275. function uoe(t) {
  92276. setTimeout(() => {
  92277. let e = t.hasFocus;
  92278. if (e != t.inputState.notifiedFocused) {
  92279. let n = loe(t.state, e);
  92280. n ? t.dispatch(n) : t.update([]);
  92281. }
  92282. }, 10);
  92283. }
  92284. Ia.focus = (t) => {
  92285. 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), uoe(t);
  92286. };
  92287. Ia.blur = (t) => {
  92288. t.observer.clearSelectionRange(), uoe(t);
  92289. };
  92290. Ia.compositionstart = Ia.compositionupdate = (t) => {
  92291. t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0));
  92292. };
  92293. Ia.compositionend = (t) => {
  92294. 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(() => {
  92295. t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
  92296. }, 50));
  92297. };
  92298. Ia.contextmenu = (t) => {
  92299. t.inputState.lastContextMenu = Date.now();
  92300. };
  92301. uo.beforeinput = (t, e) => {
  92302. var n;
  92303. let r;
  92304. if (Ne.chrome && Ne.android && (r = toe.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) {
  92305. let i = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
  92306. setTimeout(() => {
  92307. var a;
  92308. (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > i + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
  92309. }, 100);
  92310. }
  92311. return Ne.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), Ne.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => Ia.compositionend(t, e), 20), !1;
  92312. };
  92313. const eG = /* @__PURE__ */ new Set();
  92314. function Eot(t) {
  92315. eG.has(t) || (eG.add(t), t.addEventListener("copy", () => {
  92316. }), t.addEventListener("cut", () => {
  92317. }));
  92318. }
  92319. const tG = ["pre-wrap", "normal", "pre-line", "break-spaces"];
  92320. class Mot {
  92321. constructor(e) {
  92322. this.lineWrapping = e, this.doc = Ft.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
  92323. }
  92324. heightForGap(e, n) {
  92325. let r = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
  92326. return this.lineWrapping && (r += Math.max(0, Math.ceil((n - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r;
  92327. }
  92328. heightForLine(e) {
  92329. return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
  92330. }
  92331. setDoc(e) {
  92332. return this.doc = e, this;
  92333. }
  92334. mustRefreshForWrapping(e) {
  92335. return tG.indexOf(e) > -1 != this.lineWrapping;
  92336. }
  92337. mustRefreshForHeights(e) {
  92338. let n = !1;
  92339. for (let r = 0; r < e.length; r++) {
  92340. let i = e[r];
  92341. i < 0 ? r++ : this.heightSamples[Math.floor(i * 10)] || (n = !0, this.heightSamples[Math.floor(i * 10)] = !0);
  92342. }
  92343. return n;
  92344. }
  92345. refresh(e, n, r, i, a, o) {
  92346. let s = tG.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != s;
  92347. if (this.lineWrapping = s, this.lineHeight = n, this.charWidth = r, this.textHeight = i, this.lineLength = a, l) {
  92348. this.heightSamples = {};
  92349. for (let u = 0; u < o.length; u++) {
  92350. let c = o[u];
  92351. c < 0 ? u++ : this.heightSamples[Math.floor(c * 10)] = !0;
  92352. }
  92353. }
  92354. return l;
  92355. }
  92356. }
  92357. class Iot {
  92358. constructor(e, n) {
  92359. this.from = e, this.heights = n, this.index = 0;
  92360. }
  92361. get more() {
  92362. return this.index < this.heights.length;
  92363. }
  92364. }
  92365. class Bo {
  92366. /**
  92367. @internal
  92368. */
  92369. constructor(e, n, r, i, a) {
  92370. this.from = e, this.length = n, this.top = r, this.height = i, this._content = a;
  92371. }
  92372. /**
  92373. The type of element this is. When querying lines, this may be
  92374. an array of all the blocks that make up the line.
  92375. */
  92376. get type() {
  92377. return typeof this._content == "number" ? Jr.Text : Array.isArray(this._content) ? this._content : this._content.type;
  92378. }
  92379. /**
  92380. The end of the element as a document position.
  92381. */
  92382. get to() {
  92383. return this.from + this.length;
  92384. }
  92385. /**
  92386. The bottom position of the element.
  92387. */
  92388. get bottom() {
  92389. return this.top + this.height;
  92390. }
  92391. /**
  92392. If this is a widget block, this will return the widget
  92393. associated with it.
  92394. */
  92395. get widget() {
  92396. return this._content instanceof gu ? this._content.widget : null;
  92397. }
  92398. /**
  92399. If this is a textblock, this holds the number of line breaks
  92400. that appear in widgets inside the block.
  92401. */
  92402. get widgetLineBreaks() {
  92403. return typeof this._content == "number" ? this._content : 0;
  92404. }
  92405. /**
  92406. @internal
  92407. */
  92408. join(e) {
  92409. let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
  92410. return new Bo(this.from, this.length + e.length, this.top, this.height + e.height, n);
  92411. }
  92412. }
  92413. var cn = /* @__PURE__ */ function(t) {
  92414. return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
  92415. }(cn || (cn = {}));
  92416. const o1 = 1e-3;
  92417. class ei {
  92418. constructor(e, n, r = 2) {
  92419. this.length = e, this.height = n, this.flags = r;
  92420. }
  92421. get outdated() {
  92422. return (this.flags & 2) > 0;
  92423. }
  92424. set outdated(e) {
  92425. this.flags = (e ? 2 : 0) | this.flags & -3;
  92426. }
  92427. setHeight(e, n) {
  92428. this.height != n && (Math.abs(this.height - n) > o1 && (e.heightChanged = !0), this.height = n);
  92429. }
  92430. // Base case is to replace a leaf node, which simply builds a tree
  92431. // from the new nodes and returns that (HeightMapBranch and
  92432. // HeightMapGap override this to actually use from/to)
  92433. replace(e, n, r) {
  92434. return ei.of(r);
  92435. }
  92436. // Again, these are base cases, and are overridden for branch and gap nodes.
  92437. decomposeLeft(e, n) {
  92438. n.push(this);
  92439. }
  92440. decomposeRight(e, n) {
  92441. n.push(this);
  92442. }
  92443. applyChanges(e, n, r, i) {
  92444. let a = this, o = r.doc;
  92445. for (let s = i.length - 1; s >= 0; s--) {
  92446. 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);
  92447. for (f += h.to - u, u = h.to; s > 0 && d.from <= i[s - 1].toA; )
  92448. l = i[s - 1].fromA, c = i[s - 1].fromB, s--, l < d.from && (d = a.lineAt(l, cn.ByPosNoHeight, r, 0, 0));
  92449. c += d.from - l, l = d.from;
  92450. let p = o4.build(r.setDoc(o), e, c, f);
  92451. a = a.replace(l, u, p);
  92452. }
  92453. return a.updateHeight(r, 0);
  92454. }
  92455. static empty() {
  92456. return new Di(0, 0);
  92457. }
  92458. // nodes uses null values to indicate the position of line breaks.
  92459. // There are never line breaks at the start or end of the array, or
  92460. // two line breaks next to each other, and the array isn't allowed
  92461. // to be empty (same restrictions as return value from the builder).
  92462. static of(e) {
  92463. if (e.length == 1)
  92464. return e[0];
  92465. let n = 0, r = e.length, i = 0, a = 0;
  92466. for (; ; )
  92467. if (n == r)
  92468. if (i > a * 2) {
  92469. let s = e[n - 1];
  92470. 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;
  92471. } else if (a > i * 2) {
  92472. let s = e[r];
  92473. 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;
  92474. } else
  92475. break;
  92476. else if (i < a) {
  92477. let s = e[n++];
  92478. s && (i += s.size);
  92479. } else {
  92480. let s = e[--r];
  92481. s && (a += s.size);
  92482. }
  92483. let o = 0;
  92484. return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, r++), new Dot(ei.of(e.slice(0, n)), o, ei.of(e.slice(r)));
  92485. }
  92486. }
  92487. ei.prototype.size = 1;
  92488. class coe extends ei {
  92489. constructor(e, n, r) {
  92490. super(e, n), this.deco = r;
  92491. }
  92492. blockAt(e, n, r, i) {
  92493. return new Bo(i, this.length, r, this.height, this.deco || 0);
  92494. }
  92495. lineAt(e, n, r, i, a) {
  92496. return this.blockAt(0, r, i, a);
  92497. }
  92498. forEachLine(e, n, r, i, a, o) {
  92499. e <= a + this.length && n >= a && o(this.blockAt(0, r, i, a));
  92500. }
  92501. updateHeight(e, n = 0, r = !1, i) {
  92502. return i && i.from <= n && i.more && this.setHeight(e, i.heights[i.index++]), this.outdated = !1, this;
  92503. }
  92504. toString() {
  92505. return `block(${this.length})`;
  92506. }
  92507. }
  92508. class Di extends coe {
  92509. constructor(e, n) {
  92510. super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
  92511. }
  92512. blockAt(e, n, r, i) {
  92513. return new Bo(i, this.length, r, this.height, this.breaks);
  92514. }
  92515. replace(e, n, r) {
  92516. let i = r[0];
  92517. return r.length == 1 && (i instanceof Di || i instanceof fr && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof fr ? i = new Di(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ei.of(r);
  92518. }
  92519. updateHeight(e, n = 0, r = !1, i) {
  92520. 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;
  92521. }
  92522. toString() {
  92523. return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
  92524. }
  92525. }
  92526. class fr extends ei {
  92527. constructor(e) {
  92528. super(e, 0);
  92529. }
  92530. heightMetrics(e, n) {
  92531. let r = e.doc.lineAt(n).number, i = e.doc.lineAt(n + this.length).number, a = i - r + 1, o, s = 0;
  92532. if (e.lineWrapping) {
  92533. let l = Math.min(this.height, e.lineHeight * a);
  92534. o = l / a, this.length > a + 1 && (s = (this.height - l) / (this.length - a - 1));
  92535. } else
  92536. o = this.height / a;
  92537. return { firstLine: r, lastLine: i, perLine: o, perChar: s };
  92538. }
  92539. blockAt(e, n, r, i) {
  92540. let { firstLine: a, lastLine: o, perLine: s, perChar: l } = this.heightMetrics(n, i);
  92541. if (n.lineWrapping) {
  92542. 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);
  92543. return new Bo(c.from, c.length, d, f, 0);
  92544. } else {
  92545. let u = Math.max(0, Math.min(o - a, Math.floor((e - r) / s))), { from: c, length: f } = n.doc.line(a + u);
  92546. return new Bo(c, f, r + s * u, s, 0);
  92547. }
  92548. }
  92549. lineAt(e, n, r, i, a) {
  92550. if (n == cn.ByHeight)
  92551. return this.blockAt(e, r, i, a);
  92552. if (n == cn.ByPosNoHeight) {
  92553. let { from: h, to: p } = r.doc.lineAt(e);
  92554. return new Bo(h, p - h, 0, 0, 0);
  92555. }
  92556. 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);
  92557. return new Bo(u.from, u.length, Math.max(i, Math.min(d, i + this.height - c)), c, 0);
  92558. }
  92559. forEachLine(e, n, r, i, a, o) {
  92560. e = Math.max(e, a), n = Math.min(n, a + this.length);
  92561. let { firstLine: s, perLine: l, perChar: u } = this.heightMetrics(r, a);
  92562. for (let c = e, f = i; c <= n; ) {
  92563. let d = r.doc.lineAt(c);
  92564. if (c == e) {
  92565. let p = d.number - s;
  92566. f += l * p + u * (e - a - p);
  92567. }
  92568. let h = l + u * d.length;
  92569. o(new Bo(d.from, d.length, f, h, 0)), f += h, c = d.to + 1;
  92570. }
  92571. }
  92572. replace(e, n, r) {
  92573. let i = this.length - n;
  92574. if (i > 0) {
  92575. let a = r[r.length - 1];
  92576. a instanceof fr ? r[r.length - 1] = new fr(a.length + i) : r.push(null, new fr(i - 1));
  92577. }
  92578. if (e > 0) {
  92579. let a = r[0];
  92580. a instanceof fr ? r[0] = new fr(e + a.length) : r.unshift(new fr(e - 1), null);
  92581. }
  92582. return ei.of(r);
  92583. }
  92584. decomposeLeft(e, n) {
  92585. n.push(new fr(e - 1), null);
  92586. }
  92587. decomposeRight(e, n) {
  92588. n.push(null, new fr(this.length - e - 1));
  92589. }
  92590. updateHeight(e, n = 0, r = !1, i) {
  92591. let a = n + this.length;
  92592. if (i && i.from <= n + this.length && i.more) {
  92593. let o = [], s = Math.max(n, i.from), l = -1;
  92594. for (i.from > n && o.push(new fr(i.from - n - 1).updateHeight(e, n)); s <= a && i.more; ) {
  92595. let c = e.doc.lineAt(s).length;
  92596. o.length && o.push(null);
  92597. let f = i.heights[i.index++];
  92598. l == -1 ? l = f : Math.abs(f - l) >= o1 && (l = -2);
  92599. let d = new Di(c, f);
  92600. d.outdated = !1, o.push(d), s += c + 1;
  92601. }
  92602. s <= a && o.push(null, new fr(a - s).updateHeight(e, s));
  92603. let u = ei.of(o);
  92604. return (l < 0 || Math.abs(u.height - this.height) >= o1 || Math.abs(l - this.heightMetrics(e, n).perLine) >= o1) && (e.heightChanged = !0), u;
  92605. } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
  92606. return this;
  92607. }
  92608. toString() {
  92609. return `gap(${this.length})`;
  92610. }
  92611. }
  92612. class Dot extends ei {
  92613. constructor(e, n, r) {
  92614. 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;
  92615. }
  92616. get break() {
  92617. return this.flags & 1;
  92618. }
  92619. blockAt(e, n, r, i) {
  92620. let a = r + this.left.height;
  92621. return e < a ? this.left.blockAt(e, n, r, i) : this.right.blockAt(e, n, a, i + this.left.length + this.break);
  92622. }
  92623. lineAt(e, n, r, i, a) {
  92624. 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);
  92625. if (this.break || (l ? u.to < s : u.from > s))
  92626. return u;
  92627. let c = n == cn.ByPosNoHeight ? cn.ByPosNoHeight : cn.ByPos;
  92628. return l ? u.join(this.right.lineAt(s, c, r, o, s)) : this.left.lineAt(s, c, r, i, a).join(u);
  92629. }
  92630. forEachLine(e, n, r, i, a, o) {
  92631. let s = i + this.left.height, l = a + this.left.length + this.break;
  92632. if (this.break)
  92633. e < l && this.left.forEachLine(e, n, r, i, a, o), n >= l && this.right.forEachLine(e, n, r, s, l, o);
  92634. else {
  92635. let u = this.lineAt(l, cn.ByPos, r, i, a);
  92636. 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);
  92637. }
  92638. }
  92639. replace(e, n, r) {
  92640. let i = this.left.length + this.break;
  92641. if (n < i)
  92642. return this.balanced(this.left.replace(e, n, r), this.right);
  92643. if (e > this.left.length)
  92644. return this.balanced(this.left, this.right.replace(e - i, n - i, r));
  92645. let a = [];
  92646. e > 0 && this.decomposeLeft(e, a);
  92647. let o = a.length;
  92648. for (let s of r)
  92649. a.push(s);
  92650. if (e > 0 && nG(a, o - 1), n < this.length) {
  92651. let s = a.length;
  92652. this.decomposeRight(n, a), nG(a, s);
  92653. }
  92654. return ei.of(a);
  92655. }
  92656. decomposeLeft(e, n) {
  92657. let r = this.left.length;
  92658. if (e <= r)
  92659. return this.left.decomposeLeft(e, n);
  92660. n.push(this.left), this.break && (r++, e >= r && n.push(null)), e > r && this.right.decomposeLeft(e - r, n);
  92661. }
  92662. decomposeRight(e, n) {
  92663. let r = this.left.length, i = r + this.break;
  92664. if (e >= i)
  92665. return this.right.decomposeRight(e - i, n);
  92666. e < r && this.left.decomposeRight(e, n), this.break && e < i && n.push(null), n.push(this.right);
  92667. }
  92668. balanced(e, n) {
  92669. return e.size > 2 * n.size || n.size > 2 * e.size ? ei.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);
  92670. }
  92671. updateHeight(e, n = 0, r = !1, i) {
  92672. let { left: a, right: o } = this, s = n + a.length + this.break, l = null;
  92673. 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);
  92674. }
  92675. toString() {
  92676. return this.left + (this.break ? " " : "-") + this.right;
  92677. }
  92678. }
  92679. function nG(t, e) {
  92680. let n, r;
  92681. 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));
  92682. }
  92683. const Rot = 5;
  92684. class o4 {
  92685. constructor(e, n) {
  92686. this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
  92687. }
  92688. get isCovered() {
  92689. return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
  92690. }
  92691. span(e, n) {
  92692. if (this.lineStart > -1) {
  92693. let r = Math.min(n, this.lineEnd), i = this.nodes[this.nodes.length - 1];
  92694. i instanceof Di ? i.length += r - this.pos : (r > this.pos || !this.isCovered) && this.nodes.push(new Di(r - this.pos, -1)), this.writtenTo = r, n > r && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
  92695. }
  92696. this.pos = n;
  92697. }
  92698. point(e, n, r) {
  92699. if (e < n || r.heightRelevant) {
  92700. let i = r.widget ? r.widget.estimatedHeight : 0, a = r.widget ? r.widget.lineBreaks : 0;
  92701. i < 0 && (i = this.oracle.lineHeight);
  92702. let o = n - e;
  92703. r.block ? this.addBlock(new coe(o, i, r)) : (o || a || i >= Rot) && this.addLineDeco(i, a, o);
  92704. } else n > e && this.span(e, n);
  92705. this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
  92706. }
  92707. enterLine() {
  92708. if (this.lineStart > -1)
  92709. return;
  92710. let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
  92711. 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 Di(this.pos - e, -1)), this.writtenTo = this.pos;
  92712. }
  92713. blankContent(e, n) {
  92714. let r = new fr(n - e);
  92715. return this.oracle.doc.lineAt(e).to == n && (r.flags |= 4), r;
  92716. }
  92717. ensureLine() {
  92718. this.enterLine();
  92719. let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
  92720. if (e instanceof Di)
  92721. return e;
  92722. let n = new Di(0, -1);
  92723. return this.nodes.push(n), n;
  92724. }
  92725. addBlock(e) {
  92726. this.enterLine();
  92727. let n = e.deco;
  92728. 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);
  92729. }
  92730. addLineDeco(e, n, r) {
  92731. let i = this.ensureLine();
  92732. i.length += r, i.collapsed += r, i.widgetHeight = Math.max(i.widgetHeight, e), i.breaks += n, this.writtenTo = this.pos = this.pos + r;
  92733. }
  92734. finish(e) {
  92735. let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
  92736. this.lineStart > -1 && !(n instanceof Di) && !this.isCovered ? this.nodes.push(new Di(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
  92737. let r = e;
  92738. for (let i of this.nodes)
  92739. i instanceof Di && i.updateHeight(this.oracle, r), r += i ? i.length : 1;
  92740. return this.nodes;
  92741. }
  92742. // Always called with a region that on both sides either stretches
  92743. // to a line break or the end of the document.
  92744. // The returned array uses null to indicate line breaks, but never
  92745. // starts or ends in a line break, or has multiple line breaks next
  92746. // to each other.
  92747. static build(e, n, r, i) {
  92748. let a = new o4(r, e);
  92749. return Vt.spans(n, r, i, a, 0), a.finish(r);
  92750. }
  92751. }
  92752. function kot(t, e, n) {
  92753. let r = new Lot();
  92754. return Vt.compare(t, e, n, r, 0), r.changes;
  92755. }
  92756. class Lot {
  92757. constructor() {
  92758. this.changes = [];
  92759. }
  92760. compareRange() {
  92761. }
  92762. comparePoint(e, n, r, i) {
  92763. (e < n || r && r.heightRelevant || i && i.heightRelevant) && OM(e, n, this.changes, 5);
  92764. }
  92765. }
  92766. function Not(t, e) {
  92767. 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);
  92768. for (let u = t.parentNode; u && u != r.body; )
  92769. if (u.nodeType == 1) {
  92770. let c = u, f = window.getComputedStyle(c);
  92771. if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") {
  92772. let d = c.getBoundingClientRect();
  92773. 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);
  92774. }
  92775. u = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode;
  92776. } else if (u.nodeType == 11)
  92777. u = u.host;
  92778. else
  92779. break;
  92780. return {
  92781. left: a - n.left,
  92782. right: Math.max(a, o) - n.left,
  92783. top: s - (n.top + e),
  92784. bottom: Math.max(s, l) - (n.top + e)
  92785. };
  92786. }
  92787. function Bot(t, e) {
  92788. let n = t.getBoundingClientRect();
  92789. return {
  92790. left: 0,
  92791. right: n.right - n.left,
  92792. top: e,
  92793. bottom: n.bottom - (n.top + e)
  92794. };
  92795. }
  92796. class b$ {
  92797. constructor(e, n, r) {
  92798. this.from = e, this.to = n, this.size = r;
  92799. }
  92800. static same(e, n) {
  92801. if (e.length != n.length)
  92802. return !1;
  92803. for (let r = 0; r < e.length; r++) {
  92804. let i = e[r], a = n[r];
  92805. if (i.from != a.from || i.to != a.to || i.size != a.size)
  92806. return !1;
  92807. }
  92808. return !0;
  92809. }
  92810. draw(e, n) {
  92811. return Ze.replace({
  92812. widget: new zot(this.size * (n ? e.scaleY : e.scaleX), n)
  92813. }).range(this.from, this.to);
  92814. }
  92815. }
  92816. class zot extends ds {
  92817. constructor(e, n) {
  92818. super(), this.size = e, this.vertical = n;
  92819. }
  92820. eq(e) {
  92821. return e.size == this.size && e.vertical == this.vertical;
  92822. }
  92823. toDOM() {
  92824. let e = document.createElement("div");
  92825. 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;
  92826. }
  92827. get estimatedHeight() {
  92828. return this.vertical ? this.size : -1;
  92829. }
  92830. }
  92831. class rG {
  92832. constructor(e) {
  92833. 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 = iG, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = pn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
  92834. let n = e.facet(i4).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
  92835. this.heightOracle = new Mot(n), this.stateDeco = e.facet(Xm).filter((r) => typeof r != "function"), this.heightMap = ei.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle.setDoc(e.doc), [new xa(0, 0, 0, e.doc.length)]);
  92836. for (let r = 0; r < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); r++)
  92837. ;
  92838. this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Ze.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
  92839. }
  92840. updateForViewport() {
  92841. let e = [this.viewport], { main: n } = this.state.selection;
  92842. for (let r = 0; r <= 1; r++) {
  92843. let i = r ? n.head : n.anchor;
  92844. if (!e.some(({ from: a, to: o }) => i >= a && i <= o)) {
  92845. let { from: a, to: o } = this.lineBlockAt(i);
  92846. e.push(new Xb(a, o));
  92847. }
  92848. }
  92849. return this.viewports = e.sort((r, i) => r.from - i.from), this.updateScaler();
  92850. }
  92851. updateScaler() {
  92852. let e = this.scaler;
  92853. return this.scaler = this.heightMap.height <= 7e6 ? iG : new s4(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2;
  92854. }
  92855. updateViewportLines() {
  92856. this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
  92857. this.viewportLines.push(tg(e, this.scaler));
  92858. });
  92859. }
  92860. update(e, n = null) {
  92861. this.state = e.state;
  92862. let r = this.stateDeco;
  92863. this.stateDeco = this.state.facet(Xm).filter((c) => typeof c != "function");
  92864. let i = e.changedRanges, a = xa.extendWithRanges(i, kot(r, this.stateDeco, e ? e.changes : jn.empty(this.state.doc.length))), o = this.heightMap.height, s = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
  92865. 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);
  92866. let l = a.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
  92867. (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
  92868. let u = l.from != this.viewport.from || l.to != this.viewport.to;
  92869. 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(Gae) && (this.mustEnforceCursorAssoc = !0);
  92870. }
  92871. measure(e) {
  92872. let n = e.contentDOM, r = window.getComputedStyle(n), i = this.heightOracle, a = r.whiteSpace;
  92873. this.defaultTextDirection = r.direction == "rtl" ? pn.RTL : pn.LTR;
  92874. let o = this.heightOracle.mustRefreshForWrapping(a), s = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != s.height;
  92875. this.contentDOMHeight = s.height, this.mustMeasureContent = !1;
  92876. let u = 0, c = 0;
  92877. if (s.width && s.height) {
  92878. let { scaleX: _, scaleY: O } = yae(n, s);
  92879. (_ > 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);
  92880. }
  92881. let f = (parseInt(r.paddingTop) || 0) * this.scaleY, d = (parseInt(r.paddingBottom) || 0) * this.scaleY;
  92882. (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);
  92883. let h = e.scrollDOM.scrollTop * this.scaleY;
  92884. this.scrollTop != h && (this.scrollAnchorHeight = -1, this.scrollTop = h), this.scrolledToBottom = Oae(e.scrollDOM);
  92885. let p = (this.printing ? Bot : Not)(n, this.paddingTop), v = p.top - this.pixelViewport.top, g = p.bottom - this.pixelViewport.bottom;
  92886. this.pixelViewport = p;
  92887. let m = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
  92888. if (m != this.inView && (this.inView = m, m && (l = !0)), !this.inView && !this.scrollTarget)
  92889. return 0;
  92890. let y = s.width;
  92891. if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = s.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
  92892. let _ = e.docView.measureVisibleLineHeights(this.viewport);
  92893. if (i.mustRefreshForHeights(_) && (o = !0), o || i.lineWrapping && Math.abs(y - this.contentDOMWidth) > i.charWidth) {
  92894. let { lineHeight: O, charWidth: S, textHeight: x } = e.docView.measureTextSize();
  92895. o = O > 0 && i.refresh(a, O, S, x, y / S, _), o && (e.docView.minWidth = 0, u |= 8);
  92896. }
  92897. v > 0 && g > 0 ? c = Math.max(v, g) : v < 0 && g < 0 && (c = Math.min(v, g)), i.heightChanged = !1;
  92898. for (let O of this.viewports) {
  92899. let S = O.from == this.viewport.from ? _ : e.docView.measureVisibleLineHeights(O);
  92900. this.heightMap = (o ? ei.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle, [new xa(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new Iot(O.from, S));
  92901. }
  92902. i.heightChanged && (u |= 2);
  92903. }
  92904. let b = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
  92905. 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;
  92906. }
  92907. get visibleTop() {
  92908. return this.scaler.fromDOM(this.pixelViewport.top);
  92909. }
  92910. get visibleBottom() {
  92911. return this.scaler.fromDOM(this.pixelViewport.bottom);
  92912. }
  92913. getViewport(e, n) {
  92914. 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 Xb(i.lineAt(o - r * 1e3, cn.ByHeight, a, 0, 0).from, i.lineAt(s + (1 - r) * 1e3, cn.ByHeight, a, 0, 0).to);
  92915. if (n) {
  92916. let { head: u } = n.range;
  92917. if (u < l.from || u > l.to) {
  92918. let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, cn.ByPos, a, 0, 0), d;
  92919. 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 Xb(i.lineAt(d - 1e3 / 2, cn.ByHeight, a, 0, 0).from, i.lineAt(d + c + 1e3 / 2, cn.ByHeight, a, 0, 0).to);
  92920. }
  92921. }
  92922. return l;
  92923. }
  92924. mapViewport(e, n) {
  92925. let r = n.mapPos(e.from, -1), i = n.mapPos(e.to, 1);
  92926. return new Xb(this.heightMap.lineAt(r, cn.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, cn.ByPos, this.heightOracle, 0, 0).to);
  92927. }
  92928. // Checks if a given viewport covers the visible part of the
  92929. // document and not too much beyond that.
  92930. viewportIsAppropriate({ from: e, to: n }, r = 0) {
  92931. if (!this.inView)
  92932. return !0;
  92933. 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;
  92934. return (e == 0 || i <= o - Math.max(10, Math.min(
  92935. -r,
  92936. 250
  92937. /* VP.MaxCoverMargin */
  92938. ))) && (n == this.state.doc.length || a >= s + Math.max(10, Math.min(
  92939. r,
  92940. 250
  92941. /* VP.MaxCoverMargin */
  92942. ))) && i > o - 2 * 1e3 && a < s + 2 * 1e3;
  92943. }
  92944. mapLineGaps(e, n) {
  92945. if (!e.length || n.empty)
  92946. return e;
  92947. let r = [];
  92948. for (let i of e)
  92949. n.touchesRange(i.from, i.to) || r.push(new b$(n.mapPos(i.from), n.mapPos(i.to), i.size));
  92950. return r;
  92951. }
  92952. // Computes positions in the viewport where the start or end of a
  92953. // line should be hidden, trying to reuse existing line gaps when
  92954. // appropriate to avoid unneccesary redraws.
  92955. // Uses crude character-counting for the positioning and sizing,
  92956. // since actual DOM coordinates aren't always available and
  92957. // predictable. Relies on generous margins (see LG.Margin) to hide
  92958. // the artifacts this might produce from the user.
  92959. ensureLineGaps(e, n) {
  92960. let r = this.heightOracle.lineWrapping, i = r ? 1e4 : 2e3, a = i >> 1, o = i << 1;
  92961. if (this.defaultTextDirection != pn.LTR && !r)
  92962. return [];
  92963. let s = [], l = (c, f, d, h) => {
  92964. if (f - c < a)
  92965. return;
  92966. let p = this.state.selection.main, v = [p.from];
  92967. p.empty || v.push(p.to);
  92968. for (let m of v)
  92969. if (m > c && m < f) {
  92970. l(c, m - 10, d, h), l(m + 10, f, d, h);
  92971. return;
  92972. }
  92973. let g = Fot(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));
  92974. if (!g) {
  92975. if (f < d.to && n && r && n.visibleRanges.some((m) => m.from <= f && m.to >= f)) {
  92976. let m = n.moveToLineBoundary(me.cursor(f), !1, !0).head;
  92977. m > c && (f = m);
  92978. }
  92979. g = new b$(c, f, this.gapSize(d, c, f, h));
  92980. }
  92981. s.push(g);
  92982. }, u = (c) => {
  92983. if (c.length < o || c.type != Jr.Text)
  92984. return;
  92985. let f = Vot(c.from, c.to, this.stateDeco);
  92986. if (f.total < o)
  92987. return;
  92988. let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, p;
  92989. if (r) {
  92990. let v = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, g, m;
  92991. if (d != null) {
  92992. let y = qb(f, d), b = ((this.visibleBottom - this.visibleTop) / 2 + v) / c.height;
  92993. g = y - b, m = y + b;
  92994. } else
  92995. g = (this.visibleTop - c.top - v) / c.height, m = (this.visibleBottom - c.top + v) / c.height;
  92996. h = Yb(f, g), p = Yb(f, m);
  92997. } else {
  92998. let v = f.total * this.heightOracle.charWidth, g = i * this.heightOracle.charWidth, m, y;
  92999. if (d != null) {
  93000. let b = qb(f, d), _ = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + g) / v;
  93001. m = b - _, y = b + _;
  93002. } else
  93003. m = (this.pixelViewport.left - g) / v, y = (this.pixelViewport.right + g) / v;
  93004. h = Yb(f, m), p = Yb(f, y);
  93005. }
  93006. h > c.from && l(c.from, h, c, f), p < c.to && l(p, c.to, c, f);
  93007. };
  93008. for (let c of this.viewportLines)
  93009. Array.isArray(c.type) ? c.type.forEach(u) : u(c);
  93010. return s;
  93011. }
  93012. gapSize(e, n, r, i) {
  93013. let a = qb(i, r) - qb(i, n);
  93014. return this.heightOracle.lineWrapping ? e.height * a : i.total * this.heightOracle.charWidth * a;
  93015. }
  93016. updateLineGaps(e) {
  93017. b$.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Ze.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
  93018. }
  93019. computeVisibleRanges() {
  93020. let e = this.stateDeco;
  93021. this.lineGaps.length && (e = e.concat(this.lineGapDeco));
  93022. let n = [];
  93023. Vt.spans(e, this.viewport.from, this.viewport.to, {
  93024. span(i, a) {
  93025. n.push({ from: i, to: a });
  93026. },
  93027. point() {
  93028. }
  93029. }, 20);
  93030. let r = n.length != this.visibleRanges.length || this.visibleRanges.some((i, a) => i.from != n[a].from || i.to != n[a].to);
  93031. return this.visibleRanges = n, r ? 4 : 0;
  93032. }
  93033. lineBlockAt(e) {
  93034. return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || tg(this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), this.scaler);
  93035. }
  93036. lineBlockAtHeight(e) {
  93037. return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || tg(this.heightMap.lineAt(this.scaler.fromDOM(e), cn.ByHeight, this.heightOracle, 0, 0), this.scaler);
  93038. }
  93039. scrollAnchorAt(e) {
  93040. let n = this.lineBlockAtHeight(e + 8);
  93041. return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
  93042. }
  93043. elementAtHeight(e) {
  93044. return tg(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
  93045. }
  93046. get docHeight() {
  93047. return this.scaler.toDOM(this.heightMap.height);
  93048. }
  93049. get contentHeight() {
  93050. return this.docHeight + this.paddingTop + this.paddingBottom;
  93051. }
  93052. }
  93053. class Xb {
  93054. constructor(e, n) {
  93055. this.from = e, this.to = n;
  93056. }
  93057. }
  93058. function Vot(t, e, n) {
  93059. let r = [], i = t, a = 0;
  93060. return Vt.spans(n, t, e, {
  93061. span() {
  93062. },
  93063. point(o, s) {
  93064. o > i && (r.push({ from: i, to: o }), a += o - i), i = s;
  93065. }
  93066. }, 20), i < e && (r.push({ from: i, to: e }), a += e - i), { total: a, ranges: r };
  93067. }
  93068. function Yb({ total: t, ranges: e }, n) {
  93069. if (n <= 0)
  93070. return e[0].from;
  93071. if (n >= 1)
  93072. return e[e.length - 1].to;
  93073. let r = Math.floor(t * n);
  93074. for (let i = 0; ; i++) {
  93075. let { from: a, to: o } = e[i], s = o - a;
  93076. if (r <= s)
  93077. return a + r;
  93078. r -= s;
  93079. }
  93080. }
  93081. function qb(t, e) {
  93082. let n = 0;
  93083. for (let { from: r, to: i } of t.ranges) {
  93084. if (e <= i) {
  93085. n += e - r;
  93086. break;
  93087. }
  93088. n += i - r;
  93089. }
  93090. return n / t.total;
  93091. }
  93092. function Fot(t, e) {
  93093. for (let n of t)
  93094. if (e(n))
  93095. return n;
  93096. }
  93097. const iG = {
  93098. toDOM(t) {
  93099. return t;
  93100. },
  93101. fromDOM(t) {
  93102. return t;
  93103. },
  93104. scale: 1,
  93105. eq(t) {
  93106. return t == this;
  93107. }
  93108. };
  93109. class s4 {
  93110. constructor(e, n, r) {
  93111. let i = 0, a = 0, o = 0;
  93112. this.viewports = r.map(({ from: s, to: l }) => {
  93113. let u = n.lineAt(s, cn.ByPos, e, 0, 0).top, c = n.lineAt(l, cn.ByPos, e, 0, 0).bottom;
  93114. return i += c - u, { from: s, to: l, top: u, bottom: c, domTop: 0, domBottom: 0 };
  93115. }), this.scale = (7e6 - i) / (n.height - i);
  93116. for (let s of this.viewports)
  93117. s.domTop = o + (s.top - a) * this.scale, o = s.domBottom = s.domTop + (s.bottom - s.top), a = s.bottom;
  93118. }
  93119. toDOM(e) {
  93120. for (let n = 0, r = 0, i = 0; ; n++) {
  93121. let a = n < this.viewports.length ? this.viewports[n] : null;
  93122. if (!a || e < a.top)
  93123. return i + (e - r) * this.scale;
  93124. if (e <= a.bottom)
  93125. return a.domTop + (e - a.top);
  93126. r = a.bottom, i = a.domBottom;
  93127. }
  93128. }
  93129. fromDOM(e) {
  93130. for (let n = 0, r = 0, i = 0; ; n++) {
  93131. let a = n < this.viewports.length ? this.viewports[n] : null;
  93132. if (!a || e < a.domTop)
  93133. return r + (e - i) / this.scale;
  93134. if (e <= a.domBottom)
  93135. return a.top + (e - a.domTop);
  93136. r = a.bottom, i = a.domBottom;
  93137. }
  93138. }
  93139. eq(e) {
  93140. return e instanceof s4 ? 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;
  93141. }
  93142. }
  93143. function tg(t, e) {
  93144. if (e.scale == 1)
  93145. return t;
  93146. let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
  93147. return new Bo(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((i) => tg(i, e)) : t._content);
  93148. }
  93149. const Kb = /* @__PURE__ */ Be.define({ combine: (t) => t.join(" ") }), AM = /* @__PURE__ */ Be.define({ combine: (t) => t.indexOf(!0) > -1 }), EM = /* @__PURE__ */ pu.newName(), foe = /* @__PURE__ */ pu.newName(), doe = /* @__PURE__ */ pu.newName(), hoe = { "&light": "." + foe, "&dark": "." + doe };
  93150. function MM(t, e, n) {
  93151. return new pu(e, {
  93152. finish(r) {
  93153. return /&/.test(r) ? r.replace(/&\w*/, (i) => {
  93154. if (i == "&")
  93155. return t;
  93156. if (!n || !n[i])
  93157. throw new RangeError(`Unsupported selector: ${i}`);
  93158. return n[i];
  93159. }) : t + " " + r;
  93160. }
  93161. });
  93162. }
  93163. const Wot = /* @__PURE__ */ MM("." + EM, {
  93164. "&": {
  93165. position: "relative !important",
  93166. boxSizing: "border-box",
  93167. "&.cm-focused": {
  93168. // Provide a simple default outline to make sure a focused
  93169. // editor is visually distinct. Can't leave the default behavior
  93170. // because that will apply to the content element, which is
  93171. // inside the scrollable container and doesn't include the
  93172. // gutters. We also can't use an 'auto' outline, since those
  93173. // are, for some reason, drawn behind the element content, which
  93174. // will cause things like the active line background to cover
  93175. // the outline (#297).
  93176. outline: "1px dotted #212121"
  93177. },
  93178. display: "flex !important",
  93179. flexDirection: "column"
  93180. },
  93181. ".cm-scroller": {
  93182. display: "flex !important",
  93183. alignItems: "flex-start !important",
  93184. fontFamily: "monospace",
  93185. lineHeight: 1.4,
  93186. height: "100%",
  93187. overflowX: "auto",
  93188. position: "relative",
  93189. zIndex: 0
  93190. },
  93191. ".cm-content": {
  93192. margin: 0,
  93193. flexGrow: 2,
  93194. flexShrink: 0,
  93195. display: "block",
  93196. whiteSpace: "pre",
  93197. wordWrap: "normal",
  93198. // https://github.com/codemirror/dev/issues/456
  93199. boxSizing: "border-box",
  93200. minHeight: "100%",
  93201. padding: "4px 0",
  93202. outline: "none",
  93203. "&[contenteditable=true]": {
  93204. WebkitUserModify: "read-write-plaintext-only"
  93205. }
  93206. },
  93207. ".cm-lineWrapping": {
  93208. whiteSpace_fallback: "pre-wrap",
  93209. // For IE
  93210. whiteSpace: "break-spaces",
  93211. wordBreak: "break-word",
  93212. // For Safari, which doesn't support overflow-wrap: anywhere
  93213. overflowWrap: "anywhere",
  93214. flexShrink: 1
  93215. },
  93216. "&light .cm-content": { caretColor: "black" },
  93217. "&dark .cm-content": { caretColor: "white" },
  93218. ".cm-line": {
  93219. display: "block",
  93220. padding: "0 2px 0 6px"
  93221. },
  93222. ".cm-layer": {
  93223. position: "absolute",
  93224. left: 0,
  93225. top: 0,
  93226. contain: "size style",
  93227. "& > *": {
  93228. position: "absolute"
  93229. }
  93230. },
  93231. "&light .cm-selectionBackground": {
  93232. background: "#d9d9d9"
  93233. },
  93234. "&dark .cm-selectionBackground": {
  93235. background: "#222"
  93236. },
  93237. "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
  93238. background: "#d7d4f0"
  93239. },
  93240. "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
  93241. background: "#233"
  93242. },
  93243. ".cm-cursorLayer": {
  93244. pointerEvents: "none"
  93245. },
  93246. "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
  93247. animation: "steps(1) cm-blink 1.2s infinite"
  93248. },
  93249. // Two animations defined so that we can switch between them to
  93250. // restart the animation without forcing another style
  93251. // recomputation.
  93252. "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  93253. "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  93254. ".cm-cursor, .cm-dropCursor": {
  93255. borderLeft: "1.2px solid black",
  93256. marginLeft: "-0.6px",
  93257. pointerEvents: "none"
  93258. },
  93259. ".cm-cursor": {
  93260. display: "none"
  93261. },
  93262. "&dark .cm-cursor": {
  93263. borderLeftColor: "#444"
  93264. },
  93265. ".cm-dropCursor": {
  93266. position: "absolute"
  93267. },
  93268. "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
  93269. display: "block"
  93270. },
  93271. ".cm-iso": {
  93272. unicodeBidi: "isolate"
  93273. },
  93274. ".cm-announced": {
  93275. position: "fixed",
  93276. top: "-10000px"
  93277. },
  93278. "@media print": {
  93279. ".cm-announced": { display: "none" }
  93280. },
  93281. "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
  93282. "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
  93283. "&light .cm-specialChar": { color: "red" },
  93284. "&dark .cm-specialChar": { color: "#f78" },
  93285. ".cm-gutters": {
  93286. flexShrink: 0,
  93287. display: "flex",
  93288. height: "100%",
  93289. boxSizing: "border-box",
  93290. insetInlineStart: 0,
  93291. zIndex: 200
  93292. },
  93293. "&light .cm-gutters": {
  93294. backgroundColor: "#f5f5f5",
  93295. color: "#6c6c6c",
  93296. borderRight: "1px solid #ddd"
  93297. },
  93298. "&dark .cm-gutters": {
  93299. backgroundColor: "#333338",
  93300. color: "#ccc"
  93301. },
  93302. ".cm-gutter": {
  93303. display: "flex !important",
  93304. // Necessary -- prevents margin collapsing
  93305. flexDirection: "column",
  93306. flexShrink: 0,
  93307. boxSizing: "border-box",
  93308. minHeight: "100%",
  93309. overflow: "hidden"
  93310. },
  93311. ".cm-gutterElement": {
  93312. boxSizing: "border-box"
  93313. },
  93314. ".cm-lineNumbers .cm-gutterElement": {
  93315. padding: "0 3px 0 5px",
  93316. minWidth: "20px",
  93317. textAlign: "right",
  93318. whiteSpace: "nowrap"
  93319. },
  93320. "&light .cm-activeLineGutter": {
  93321. backgroundColor: "#e2f2ff"
  93322. },
  93323. "&dark .cm-activeLineGutter": {
  93324. backgroundColor: "#222227"
  93325. },
  93326. ".cm-panels": {
  93327. boxSizing: "border-box",
  93328. position: "sticky",
  93329. left: 0,
  93330. right: 0
  93331. },
  93332. "&light .cm-panels": {
  93333. backgroundColor: "#f5f5f5",
  93334. color: "black"
  93335. },
  93336. "&light .cm-panels-top": {
  93337. borderBottom: "1px solid #ddd"
  93338. },
  93339. "&light .cm-panels-bottom": {
  93340. borderTop: "1px solid #ddd"
  93341. },
  93342. "&dark .cm-panels": {
  93343. backgroundColor: "#333338",
  93344. color: "white"
  93345. },
  93346. ".cm-tab": {
  93347. display: "inline-block",
  93348. overflow: "hidden",
  93349. verticalAlign: "bottom"
  93350. },
  93351. ".cm-widgetBuffer": {
  93352. verticalAlign: "text-top",
  93353. height: "1em",
  93354. width: 0,
  93355. display: "inline"
  93356. },
  93357. ".cm-placeholder": {
  93358. color: "#888",
  93359. display: "inline-block",
  93360. verticalAlign: "top"
  93361. },
  93362. ".cm-highlightSpace:before": {
  93363. content: "attr(data-display)",
  93364. position: "absolute",
  93365. pointerEvents: "none",
  93366. color: "#888"
  93367. },
  93368. ".cm-highlightTab": {
  93369. 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>')`,
  93370. backgroundSize: "auto 100%",
  93371. backgroundPosition: "right 90%",
  93372. backgroundRepeat: "no-repeat"
  93373. },
  93374. ".cm-trailingSpace": {
  93375. backgroundColor: "#ff332255"
  93376. },
  93377. ".cm-button": {
  93378. verticalAlign: "middle",
  93379. color: "inherit",
  93380. fontSize: "70%",
  93381. padding: ".2em 1em",
  93382. borderRadius: "1px"
  93383. },
  93384. "&light .cm-button": {
  93385. backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
  93386. border: "1px solid #888",
  93387. "&:active": {
  93388. backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
  93389. }
  93390. },
  93391. "&dark .cm-button": {
  93392. backgroundImage: "linear-gradient(#393939, #111)",
  93393. border: "1px solid #888",
  93394. "&:active": {
  93395. backgroundImage: "linear-gradient(#111, #333)"
  93396. }
  93397. },
  93398. ".cm-textfield": {
  93399. verticalAlign: "middle",
  93400. color: "inherit",
  93401. fontSize: "70%",
  93402. border: "1px solid silver",
  93403. padding: ".2em .5em"
  93404. },
  93405. "&light .cm-textfield": {
  93406. backgroundColor: "white"
  93407. },
  93408. "&dark .cm-textfield": {
  93409. border: "1px solid #555",
  93410. backgroundColor: "inherit"
  93411. }
  93412. }, hoe), ng = "￿";
  93413. class Qot {
  93414. constructor(e, n) {
  93415. this.points = e, this.text = "", this.lineSeparator = n.facet(At.lineSeparator);
  93416. }
  93417. append(e) {
  93418. this.text += e;
  93419. }
  93420. lineBreak() {
  93421. this.text += ng;
  93422. }
  93423. readRange(e, n) {
  93424. if (!e)
  93425. return this;
  93426. let r = e.parentNode;
  93427. for (let i = e; ; ) {
  93428. this.findPointBefore(r, i);
  93429. let a = this.text.length;
  93430. this.readNode(i);
  93431. let o = i.nextSibling;
  93432. if (o == n)
  93433. break;
  93434. let s = Jt.get(i), l = Jt.get(o);
  93435. (s && l ? s.breakAfter : (s ? s.breakAfter : nS(i)) || nS(o) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > a) && this.lineBreak(), i = o;
  93436. }
  93437. return this.findPointBefore(r, n), this;
  93438. }
  93439. readTextNode(e) {
  93440. let n = e.nodeValue;
  93441. for (let r of this.points)
  93442. r.node == e && (r.pos = this.text.length + Math.min(r.offset, n.length));
  93443. for (let r = 0, i = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
  93444. let a = -1, o = 1, s;
  93445. 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)
  93446. break;
  93447. if (this.lineBreak(), o > 1)
  93448. for (let l of this.points)
  93449. l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
  93450. r = a + o;
  93451. }
  93452. }
  93453. readNode(e) {
  93454. if (e.cmIgnore)
  93455. return;
  93456. let n = Jt.get(e), r = n && n.overrideDOMText;
  93457. if (r != null) {
  93458. this.findPointInside(e, r.length);
  93459. for (let i = r.iter(); !i.next().done; )
  93460. i.lineBreak ? this.lineBreak() : this.append(i.value);
  93461. } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
  93462. }
  93463. findPointBefore(e, n) {
  93464. for (let r of this.points)
  93465. r.node == e && e.childNodes[r.offset] == n && (r.pos = this.text.length);
  93466. }
  93467. findPointInside(e, n) {
  93468. for (let r of this.points)
  93469. (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (Hot(e, r.node, r.offset) ? n : 0));
  93470. }
  93471. }
  93472. function Hot(t, e, n) {
  93473. for (; ; ) {
  93474. if (!e || n < Js(e))
  93475. return !1;
  93476. if (e == t)
  93477. return !0;
  93478. n = Cf(e) + 1, e = e.parentNode;
  93479. }
  93480. }
  93481. class aG {
  93482. constructor(e, n) {
  93483. this.node = e, this.offset = n, this.pos = -1;
  93484. }
  93485. }
  93486. class Got {
  93487. constructor(e, n, r, i) {
  93488. this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = n > -1;
  93489. let { impreciseHead: a, impreciseAnchor: o } = e.docView;
  93490. if (e.state.readOnly && n > -1)
  93491. this.newSel = null;
  93492. else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, r, 0))) {
  93493. let s = a || o ? [] : Uot(e), l = new Qot(s, e.state);
  93494. l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = Xot(s, this.bounds.from);
  93495. } else {
  93496. let s = e.observer.selectionRange, l = a && a.node == s.focusNode && a.offset == s.focusOffset || !vM(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 || !vM(e.contentDOM, s.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(s.anchorNode, s.anchorOffset), c = e.viewport;
  93497. if ((Ne.ios || Ne.chrome) && e.state.selection.main.empty && l != u && (c.from > 0 || c.to < e.state.doc.length)) {
  93498. let f = Math.min(l, u), d = Math.max(l, u), h = c.from - f, p = c.to - d;
  93499. (h == 0 || h == 1 || f == 0) && (p == 0 || p == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length);
  93500. }
  93501. this.newSel = me.single(u, l);
  93502. }
  93503. }
  93504. }
  93505. function poe(t, e) {
  93506. let n, { newSel: r } = e, i = t.state.selection.main, a = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
  93507. if (e.bounds) {
  93508. let { from: o, to: s } = e.bounds, l = i.from, u = null;
  93509. (a === 8 || Ne.android && e.text.length < s - o) && (l = i.to, u = "end");
  93510. let c = Zot(t.state.doc.sliceString(o, s, ng), e.text, l - o, u);
  93511. c && (Ne.chrome && a == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == ng + ng && c.toB--, n = {
  93512. from: o + c.from,
  93513. to: o + c.toA,
  93514. insert: Ft.of(e.text.slice(c.from, c.toB).split(ng))
  93515. });
  93516. } else r && (!t.hasFocus && t.state.facet(El) || r.main.eq(i)) && (r = null);
  93517. if (!n && !r)
  93518. return !1;
  93519. 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 = {
  93520. from: i.from,
  93521. to: i.to,
  93522. insert: t.state.doc.slice(i.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, i.to))
  93523. } : (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() == `
  93524. ` && 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)
  93525. return voe(t, n, r, a);
  93526. if (r && !r.main.eq(i)) {
  93527. let o = !1, s = "select";
  93528. 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;
  93529. } else
  93530. return !1;
  93531. }
  93532. function voe(t, e, n, r = -1) {
  93533. if (Ne.ios && t.inputState.flushIOSKey(e))
  93534. return !0;
  93535. let i = t.state.selection.main;
  93536. if (Ne.android && (e.to == i.to && // GBoard will sometimes remove a space it just inserted
  93537. // after a completion when you press enter
  93538. (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && lh(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) && lh(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && lh(t.contentDOM, "Delete", 46)))
  93539. return !0;
  93540. let a = e.insert.toString();
  93541. t.inputState.composing >= 0 && t.inputState.composing++;
  93542. let o, s = () => o || (o = jot(t, e, n));
  93543. return t.state.facet(Wae).some((l) => l(t, e.from, e.to, a, s)) || t.dispatch(s()), !0;
  93544. }
  93545. function jot(t, e, n) {
  93546. let r, i = t.state, a = i.selection.main;
  93547. 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) {
  93548. let s = a.from < e.from ? i.sliceDoc(a.from, e.from) : "", l = a.to > e.to ? i.sliceDoc(e.to, a.to) : "";
  93549. r = i.replaceSelection(t.state.toText(s + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
  93550. } else {
  93551. let s = i.changes(e), l = n && n.main.to <= s.newLength ? n.main : void 0;
  93552. if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= a.to && e.to >= a.to - 10) {
  93553. let u = t.state.sliceDoc(e.from, e.to), c, f = n && Jae(t, n.main.head);
  93554. if (f) {
  93555. let p = e.insert.length - (e.to - e.from);
  93556. c = { from: f.from, to: f.to - p };
  93557. } else
  93558. c = t.state.doc.lineAt(a.head);
  93559. let d = a.to - e.to, h = a.to - a.from;
  93560. r = i.changeByRange((p) => {
  93561. if (p.from == a.from && p.to == a.to)
  93562. return { changes: s, range: l || p.map(s) };
  93563. let v = p.to - d, g = v - u.length;
  93564. if (p.to - p.from != h || t.state.sliceDoc(g, v) != u || // Unfortunately, there's no way to make multiple
  93565. // changes in the same node work without aborting
  93566. // composition, so cursors in the composition range are
  93567. // ignored.
  93568. p.to >= c.from && p.from <= c.to)
  93569. return { range: p };
  93570. let m = i.changes({ from: g, to: v, insert: e.insert }), y = p.to - a.to;
  93571. return {
  93572. changes: m,
  93573. range: l ? me.range(Math.max(0, l.anchor + y), Math.max(0, l.head + y)) : p.map(m)
  93574. };
  93575. });
  93576. } else
  93577. r = {
  93578. changes: s,
  93579. selection: l && i.selection.replaceRange(l)
  93580. };
  93581. }
  93582. let o = "input.type";
  93583. 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 });
  93584. }
  93585. function Zot(t, e, n, r) {
  93586. let i = Math.min(t.length, e.length), a = 0;
  93587. for (; a < i && t.charCodeAt(a) == e.charCodeAt(a); )
  93588. a++;
  93589. if (a == i && t.length == e.length)
  93590. return null;
  93591. let o = t.length, s = e.length;
  93592. for (; o > 0 && s > 0 && t.charCodeAt(o - 1) == e.charCodeAt(s - 1); )
  93593. o--, s--;
  93594. if (r == "end") {
  93595. let l = Math.max(0, a - Math.min(o, s));
  93596. n -= o + l - a;
  93597. }
  93598. if (o < a && t.length < e.length) {
  93599. let l = n <= a && n >= o ? a - n : 0;
  93600. a -= l, s = a + (s - o), o = a;
  93601. } else if (s < a) {
  93602. let l = n <= a && n >= s ? a - n : 0;
  93603. a -= l, o = a + (o - s), s = a;
  93604. }
  93605. return { from: a, toA: o, toB: s };
  93606. }
  93607. function Uot(t) {
  93608. let e = [];
  93609. if (t.root.activeElement != t.contentDOM)
  93610. return e;
  93611. let { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a } = t.observer.selectionRange;
  93612. return n && (e.push(new aG(n, r)), (i != n || a != r) && e.push(new aG(i, a))), e;
  93613. }
  93614. function Xot(t, e) {
  93615. if (t.length == 0)
  93616. return null;
  93617. let n = t[0].pos, r = t.length == 2 ? t[1].pos : n;
  93618. return n > -1 && r > -1 ? me.single(n + e, r + e) : null;
  93619. }
  93620. const Yot = {
  93621. childList: !0,
  93622. characterData: !0,
  93623. subtree: !0,
  93624. attributes: !0,
  93625. characterDataOldValue: !0
  93626. }, _$ = Ne.ie && Ne.ie_version <= 11;
  93627. class qot {
  93628. constructor(e) {
  93629. this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new kat(), 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) => {
  93630. for (let r of n)
  93631. this.queue.push(r);
  93632. (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();
  93633. }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && // Chrome <126 doesn't support inverted selections in edit context (#1392)
  93634. !(Ne.chrome && Ne.chrome_version < 126) && (this.editContext = new Jot(e), e.state.facet(El) && (e.contentDOM.editContext = this.editContext.editContext)), _$ && (this.onCharData = (n) => {
  93635. this.queue.push({
  93636. target: n.target,
  93637. type: "characterData",
  93638. oldValue: n.prevValue
  93639. }), this.flushSoon();
  93640. }), 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(() => {
  93641. var n;
  93642. ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
  93643. }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
  93644. 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")));
  93645. }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
  93646. n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
  93647. }, {})), this.listenForScroll(), this.readSelectionRange();
  93648. }
  93649. onScrollChanged(e) {
  93650. this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
  93651. }
  93652. onScroll(e) {
  93653. this.intersecting && this.flush(!1), this.editContext && this.view.requestMeasure(this.editContext.measureReq), this.onScrollChanged(e);
  93654. }
  93655. onResize() {
  93656. this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
  93657. this.resizeTimeout = -1, this.view.requestMeasure();
  93658. }, 50));
  93659. }
  93660. onPrint(e) {
  93661. e.type == "change" && !e.matches || (this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
  93662. this.view.viewState.printing = !1, this.view.requestMeasure();
  93663. }, 500));
  93664. }
  93665. updateGaps(e) {
  93666. if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, r) => n != e[r]))) {
  93667. this.gapIntersection.disconnect();
  93668. for (let n of e)
  93669. this.gapIntersection.observe(n);
  93670. this.gaps = e;
  93671. }
  93672. }
  93673. onSelectionChange(e) {
  93674. let n = this.selectionChanged;
  93675. if (!this.readSelectionRange() || this.delayedAndroidKey)
  93676. return;
  93677. let { view: r } = this, i = this.selectionRange;
  93678. if (r.state.facet(El) ? r.root.activeElement != this.dom : !i1(r.dom, i))
  93679. return;
  93680. let a = i.anchorNode && r.docView.nearest(i.anchorNode);
  93681. if (a && a.ignoreEvent(e)) {
  93682. n || (this.selectionChanged = !1);
  93683. return;
  93684. }
  93685. (Ne.ie && Ne.ie_version <= 11 || Ne.android && Ne.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
  93686. i.focusNode && Wg(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1);
  93687. }
  93688. readSelectionRange() {
  93689. let { view: e } = this, n = Um(e.root);
  93690. if (!n)
  93691. return !1;
  93692. let r = Ne.safari && e.root.nodeType == 11 && Mat(this.dom.ownerDocument) == this.dom && Kot(this.view, n) || n;
  93693. if (!r || this.selectionRange.eq(r))
  93694. return !1;
  93695. let i = i1(this.dom, r);
  93696. return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Nat(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), i && (this.selectionChanged = !0), !0);
  93697. }
  93698. setSelectionRange(e, n) {
  93699. this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
  93700. }
  93701. clearSelectionRange() {
  93702. this.selectionRange.set(null, 0, null, 0);
  93703. }
  93704. listenForScroll() {
  93705. this.parentCheck = -1;
  93706. let e = 0, n = null;
  93707. for (let r = this.dom; r; )
  93708. if (r.nodeType == 1)
  93709. !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;
  93710. else if (r.nodeType == 11)
  93711. r = r.host;
  93712. else
  93713. break;
  93714. if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
  93715. for (let r of this.scrollTargets)
  93716. r.removeEventListener("scroll", this.onScroll);
  93717. for (let r of this.scrollTargets = n)
  93718. r.addEventListener("scroll", this.onScroll);
  93719. }
  93720. }
  93721. ignore(e) {
  93722. if (!this.active)
  93723. return e();
  93724. try {
  93725. return this.stop(), e();
  93726. } finally {
  93727. this.start(), this.clear();
  93728. }
  93729. }
  93730. start() {
  93731. this.active || (this.observer.observe(this.dom, Yot), _$ && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
  93732. }
  93733. stop() {
  93734. this.active && (this.active = !1, this.observer.disconnect(), _$ && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
  93735. }
  93736. // Throw away any pending changes
  93737. clear() {
  93738. this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
  93739. }
  93740. // Chrome Android, especially in combination with GBoard, not only
  93741. // doesn't reliably fire regular key events, but also often
  93742. // surrounds the effect of enter or backspace with a bunch of
  93743. // composition events that, when interrupted, cause text duplication
  93744. // or other kinds of corruption. This hack makes the editor back off
  93745. // from handling DOM changes for a moment when such a key is
  93746. // detected (via beforeinput or keydown), and then tries to flush
  93747. // them or, if that has no effect, dispatches the given key.
  93748. delayAndroidKey(e, n) {
  93749. var r;
  93750. if (!this.delayedAndroidKey) {
  93751. let i = () => {
  93752. let a = this.delayedAndroidKey;
  93753. a && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = a.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && a.force && lh(this.dom, a.key, a.keyCode));
  93754. };
  93755. this.flushingAndroidKey = this.view.win.requestAnimationFrame(i);
  93756. }
  93757. (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
  93758. key: e,
  93759. keyCode: n,
  93760. // Only run the key handler when no changes are detected if
  93761. // this isn't coming right after another change, in which case
  93762. // it is probably part of a weird chain of updates, and should
  93763. // be ignored if it returns the DOM to its previous state.
  93764. force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force)
  93765. });
  93766. }
  93767. clearDelayedAndroidKey() {
  93768. this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
  93769. }
  93770. flushSoon() {
  93771. this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
  93772. this.delayedFlush = -1, this.flush();
  93773. }));
  93774. }
  93775. forceFlush() {
  93776. this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
  93777. }
  93778. pendingRecords() {
  93779. for (let e of this.observer.takeRecords())
  93780. this.queue.push(e);
  93781. return this.queue;
  93782. }
  93783. processRecords() {
  93784. let e = this.pendingRecords();
  93785. e.length && (this.queue = []);
  93786. let n = -1, r = -1, i = !1;
  93787. for (let a of e) {
  93788. let o = this.readMutation(a);
  93789. o && (o.typeOver && (i = !0), n == -1 ? { from: n, to: r } = o : (n = Math.min(o.from, n), r = Math.max(o.to, r)));
  93790. }
  93791. return { from: n, to: r, typeOver: i };
  93792. }
  93793. readChange() {
  93794. let { from: e, to: n, typeOver: r } = this.processRecords(), i = this.selectionChanged && i1(this.dom, this.selectionRange);
  93795. if (e < 0 && !i)
  93796. return null;
  93797. e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
  93798. let a = new Got(this.view, e, n, r);
  93799. return this.view.docView.domChanged = { newSel: a.newSel ? a.newSel.main : null }, a;
  93800. }
  93801. // Apply pending changes, if any
  93802. flush(e = !0) {
  93803. if (this.delayedFlush >= 0 || this.delayedAndroidKey)
  93804. return !1;
  93805. e && this.readSelectionRange();
  93806. let n = this.readChange();
  93807. if (!n)
  93808. return this.view.requestMeasure(), !1;
  93809. let r = this.view.state, i = poe(this.view, n);
  93810. return this.view.state == r && (n.domChanged || n.newSel && !n.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i;
  93811. }
  93812. readMutation(e) {
  93813. let n = this.view.docView.nearest(e.target);
  93814. if (!n || n.ignoreMutation(e))
  93815. return null;
  93816. if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
  93817. let r = oG(n, e.previousSibling || e.target.previousSibling, -1), i = oG(n, e.nextSibling || e.target.nextSibling, 1);
  93818. return {
  93819. from: r ? n.posAfter(r) : n.posAtStart,
  93820. to: i ? n.posBefore(i) : n.posAtEnd,
  93821. typeOver: !1
  93822. };
  93823. } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
  93824. }
  93825. setWindow(e) {
  93826. e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
  93827. }
  93828. addWindowListeners(e) {
  93829. 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);
  93830. }
  93831. removeWindowListeners(e) {
  93832. 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);
  93833. }
  93834. update(e) {
  93835. 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));
  93836. }
  93837. destroy() {
  93838. var e, n, r;
  93839. 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();
  93840. for (let i of this.scrollTargets)
  93841. i.removeEventListener("scroll", this.onScroll);
  93842. this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
  93843. }
  93844. }
  93845. function oG(t, e, n) {
  93846. for (; e; ) {
  93847. let r = Jt.get(e);
  93848. if (r && r.parent == t)
  93849. return r;
  93850. let i = e.parentNode;
  93851. e = i != t.dom ? i : n > 0 ? e.nextSibling : e.previousSibling;
  93852. }
  93853. return null;
  93854. }
  93855. function sG(t, e) {
  93856. let n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor);
  93857. return Wg(o.node, o.offset, i, a) && ([n, r, i, a] = [i, a, n, r]), { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a };
  93858. }
  93859. function Kot(t, e) {
  93860. if (e.getComposedRanges) {
  93861. let i = e.getComposedRanges(t.root)[0];
  93862. if (i)
  93863. return sG(t, i);
  93864. }
  93865. let n = null;
  93866. function r(i) {
  93867. i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
  93868. }
  93869. return t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), n ? sG(t, n) : null;
  93870. }
  93871. class Jot {
  93872. constructor(e) {
  93873. this.from = 0, this.to = 0, this.pendingContextChange = null, this.resetRange(e.state);
  93874. let n = this.editContext = new window.EditContext({
  93875. text: e.state.doc.sliceString(this.from, this.to),
  93876. selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, e.state.selection.main.anchor))),
  93877. selectionEnd: this.toContextPos(e.state.selection.main.head)
  93878. });
  93879. n.addEventListener("textupdate", (r) => {
  93880. let { anchor: i } = e.state.selection.main, a = {
  93881. from: this.toEditorPos(r.updateRangeStart),
  93882. to: this.toEditorPos(r.updateRangeEnd),
  93883. insert: Ft.of(r.text.split(`
  93884. `))
  93885. };
  93886. 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, voe(e, a, me.single(this.toEditorPos(r.selectionStart), this.toEditorPos(r.selectionEnd))), this.pendingContextChange && this.revertPending(e.state));
  93887. }), n.addEventListener("characterboundsupdate", (r) => {
  93888. let i = [], a = null;
  93889. for (let o = this.toEditorPos(r.rangeStart), s = this.toEditorPos(r.rangeEnd); o < s; o++) {
  93890. let l = e.coordsForChar(o);
  93891. a = l && new DOMRect(l.left, l.top, l.right - l.left, l.bottom - l.top) || a || new DOMRect(), i.push(a);
  93892. }
  93893. n.updateCharacterBounds(r.rangeStart, i);
  93894. }), n.addEventListener("textformatupdate", (r) => {
  93895. let i = [];
  93896. for (let a of r.getTextFormats()) {
  93897. let o = a.underlineStyle, s = a.underlineThickness;
  93898. if (o != "None" && s != "None") {
  93899. let l = `text-decoration: underline ${o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${s == "Thin" ? 1 : 2}px`;
  93900. i.push(Ze.mark({ attributes: { style: l } }).range(this.toEditorPos(a.rangeStart), this.toEditorPos(a.rangeEnd)));
  93901. }
  93902. }
  93903. e.dispatch({ effects: Zae.of(Ze.set(i)) });
  93904. }), n.addEventListener("compositionstart", () => {
  93905. e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0);
  93906. }), n.addEventListener("compositionend", () => {
  93907. e.inputState.composing = -1, e.inputState.compositionFirstChange = null;
  93908. }), this.measureReq = { read: (r) => {
  93909. this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());
  93910. let i = Um(r.root);
  93911. i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect());
  93912. } };
  93913. }
  93914. applyEdits(e) {
  93915. let n = 0, r = !1, i = this.pendingContextChange;
  93916. return e.changes.iterChanges((a, o, s, l, u) => {
  93917. if (r)
  93918. return;
  93919. let c = u.length - (o - a);
  93920. if (i && o >= i.to)
  93921. if (i.from == a && i.to == o && i.insert.eq(u)) {
  93922. i = this.pendingContextChange = null, n += c, this.to += c;
  93923. return;
  93924. } else
  93925. i = null, this.revertPending(e.state);
  93926. if (a += n, o += n, o <= this.from)
  93927. this.from += c, this.to += c;
  93928. else if (a < this.to) {
  93929. if (a < this.from || o > this.to || this.to - this.from + u.length > 3e4) {
  93930. r = !0;
  93931. return;
  93932. }
  93933. this.editContext.updateText(this.toContextPos(a), this.toContextPos(o), u.toString()), this.to += c;
  93934. }
  93935. n += c;
  93936. }), i && !r && this.revertPending(e.state), !r;
  93937. }
  93938. update(e) {
  93939. !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);
  93940. }
  93941. resetRange(e) {
  93942. let { head: n } = e.selection.main;
  93943. this.from = Math.max(
  93944. 0,
  93945. n - 1e4
  93946. /* CxVp.Margin */
  93947. ), this.to = Math.min(
  93948. e.doc.length,
  93949. n + 1e4
  93950. /* CxVp.Margin */
  93951. );
  93952. }
  93953. revertPending(e) {
  93954. let n = this.pendingContextChange;
  93955. this.pendingContextChange = null, this.editContext.updateText(this.toContextPos(n.from), this.toContextPos(n.to + n.insert.length), e.doc.sliceString(n.from, n.to));
  93956. }
  93957. setSelection(e) {
  93958. let { main: n } = e.selection, r = this.toContextPos(Math.max(this.from, Math.min(this.to, n.anchor))), i = this.toContextPos(n.head);
  93959. (this.editContext.selectionStart != r || this.editContext.selectionEnd != i) && this.editContext.updateSelection(r, i);
  93960. }
  93961. rangeIsValid(e) {
  93962. let { head: n } = e.selection.main;
  93963. return !(this.from > 0 && n - this.from < 500 || this.to < e.doc.length && this.to - n < 500 || this.to - this.from > 1e4 * 3);
  93964. }
  93965. toEditorPos(e) {
  93966. return e + this.from;
  93967. }
  93968. toContextPos(e) {
  93969. return e - this.from;
  93970. }
  93971. }
  93972. class De {
  93973. /**
  93974. The current editor state.
  93975. */
  93976. get state() {
  93977. return this.viewState.state;
  93978. }
  93979. /**
  93980. To be able to display large documents without consuming too much
  93981. memory or overloading the browser, CodeMirror only draws the
  93982. code that is visible (plus a margin around it) to the DOM. This
  93983. property tells you the extent of the current drawn viewport, in
  93984. document positions.
  93985. */
  93986. get viewport() {
  93987. return this.viewState.viewport;
  93988. }
  93989. /**
  93990. When there are, for example, large collapsed ranges in the
  93991. viewport, its size can be a lot bigger than the actual visible
  93992. content. Thus, if you are doing something like styling the
  93993. content in the viewport, it is preferable to only do so for
  93994. these ranges, which are the subset of the viewport that is
  93995. actually drawn.
  93996. */
  93997. get visibleRanges() {
  93998. return this.viewState.visibleRanges;
  93999. }
  94000. /**
  94001. Returns false when the editor is entirely scrolled out of view
  94002. or otherwise hidden.
  94003. */
  94004. get inView() {
  94005. return this.viewState.inView;
  94006. }
  94007. /**
  94008. Indicates whether the user is currently composing text via
  94009. [IME](https://en.wikipedia.org/wiki/Input_method), and at least
  94010. one change has been made in the current composition.
  94011. */
  94012. get composing() {
  94013. return this.inputState.composing > 0;
  94014. }
  94015. /**
  94016. Indicates whether the user is currently in composing state. Note
  94017. that on some platforms, like Android, this will be the case a
  94018. lot, since just putting the cursor on a word starts a
  94019. composition there.
  94020. */
  94021. get compositionStarted() {
  94022. return this.inputState.composing >= 0;
  94023. }
  94024. /**
  94025. The document or shadow root that the view lives in.
  94026. */
  94027. get root() {
  94028. return this._root;
  94029. }
  94030. /**
  94031. @internal
  94032. */
  94033. get win() {
  94034. return this.dom.ownerDocument.defaultView || window;
  94035. }
  94036. /**
  94037. Construct a new view. You'll want to either provide a `parent`
  94038. option, or put `view.dom` into your document after creating a
  94039. view, so that the user can see the editor.
  94040. */
  94041. constructor(e = {}) {
  94042. 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);
  94043. let { dispatch: n } = e;
  94044. 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 || Lat(e.parent) || document, this.viewState = new rG(e.state || At.create(e)), e.scrollTo && e.scrollTo.is(jb) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(Jv).map((r) => new g$(r));
  94045. for (let r of this.plugins)
  94046. r.update(this);
  94047. this.observer = new qot(this), this.inputState = new pot(this), this.inputState.ensureHandlers(this.plugins), this.docView = new zH(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
  94048. }
  94049. dispatch(...e) {
  94050. let n = e.length == 1 && e[0] instanceof Fn ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
  94051. this.dispatchTransactions(n, this);
  94052. }
  94053. /**
  94054. Update the view for the given array of transactions. This will
  94055. update the visible document and selection to match the state
  94056. produced by the transactions, and notify view plugins of the
  94057. change. You should usually call
  94058. [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
  94059. as a primitive.
  94060. */
  94061. update(e) {
  94062. if (this.updateState != 0)
  94063. throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
  94064. let n = !1, r = !1, i, a = this.state;
  94065. for (let d of e) {
  94066. if (d.startState != a)
  94067. throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
  94068. a = d.state;
  94069. }
  94070. if (this.destroyed) {
  94071. this.viewState.state = a;
  94072. return;
  94073. }
  94074. let o = this.hasFocus, s = 0, l = null;
  94075. e.some((d) => d.annotation(soe)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = loe(a, o), l || (s = 1));
  94076. let u = this.observer.delayedAndroidKey, c = null;
  94077. 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))
  94078. return this.setState(a);
  94079. i = iS.create(this, a, e), i.flags |= s;
  94080. let f = this.viewState.scrollTarget;
  94081. try {
  94082. this.updateState = 2;
  94083. for (let d of e) {
  94084. if (f && (f = f.map(d.changes)), d.scrollIntoView) {
  94085. let { main: h } = d.state.selection;
  94086. f = new uh(h.empty ? h : me.cursor(h.head, h.head > h.anchor ? -1 : 1));
  94087. }
  94088. for (let h of d.effects)
  94089. h.is(jb) && (f = h.value.clip(this.state));
  94090. }
  94091. this.viewState.update(i, f), this.bidiCache = aS.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), n = this.docView.update(i), this.state.facet(eg) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((d) => d.isUserEvent("select.pointer")));
  94092. } finally {
  94093. this.updateState = 0;
  94094. }
  94095. if (i.startState.facet(Kb) != i.state.facet(Kb) && (this.viewState.mustMeasureContent = !0), (n || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), n && this.docViewUpdate(), !i.empty)
  94096. for (let d of this.state.facet(CM))
  94097. try {
  94098. d(i);
  94099. } catch (h) {
  94100. mi(this.state, h, "update listener");
  94101. }
  94102. (l || c) && Promise.resolve().then(() => {
  94103. l && this.state == l.startState && this.dispatch(l), c && !poe(this, c) && u.force && lh(this.contentDOM, u.key, u.keyCode);
  94104. });
  94105. }
  94106. /**
  94107. Reset the view to the given state. (This will cause the entire
  94108. document to be redrawn and all view plugins to be reinitialized,
  94109. so you should probably only use it when the new state isn't
  94110. derived from the old state. Otherwise, use
  94111. [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
  94112. */
  94113. setState(e) {
  94114. if (this.updateState != 0)
  94115. throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
  94116. if (this.destroyed) {
  94117. this.viewState.state = e;
  94118. return;
  94119. }
  94120. this.updateState = 2;
  94121. let n = this.hasFocus;
  94122. try {
  94123. for (let r of this.plugins)
  94124. r.destroy(this);
  94125. this.viewState = new rG(e), this.plugins = e.facet(Jv).map((r) => new g$(r)), this.pluginMap.clear();
  94126. for (let r of this.plugins)
  94127. r.update(this);
  94128. this.docView.destroy(), this.docView = new zH(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
  94129. } finally {
  94130. this.updateState = 0;
  94131. }
  94132. n && this.focus(), this.requestMeasure();
  94133. }
  94134. updatePlugins(e) {
  94135. let n = e.startState.facet(Jv), r = e.state.facet(Jv);
  94136. if (n != r) {
  94137. let i = [];
  94138. for (let a of r) {
  94139. let o = n.indexOf(a);
  94140. if (o < 0)
  94141. i.push(new g$(a));
  94142. else {
  94143. let s = this.plugins[o];
  94144. s.mustUpdate = e, i.push(s);
  94145. }
  94146. }
  94147. for (let a of this.plugins)
  94148. a.mustUpdate != e && a.destroy(this);
  94149. this.plugins = i, this.pluginMap.clear();
  94150. } else
  94151. for (let i of this.plugins)
  94152. i.mustUpdate = e;
  94153. for (let i = 0; i < this.plugins.length; i++)
  94154. this.plugins[i].update(this);
  94155. n != r && this.inputState.ensureHandlers(this.plugins);
  94156. }
  94157. docViewUpdate() {
  94158. for (let e of this.plugins) {
  94159. let n = e.value;
  94160. if (n && n.docViewUpdate)
  94161. try {
  94162. n.docViewUpdate(this);
  94163. } catch (r) {
  94164. mi(this.state, r, "doc view update listener");
  94165. }
  94166. }
  94167. }
  94168. /**
  94169. @internal
  94170. */
  94171. measure(e = !0) {
  94172. if (this.destroyed)
  94173. return;
  94174. if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
  94175. this.measureScheduled = -1, this.requestMeasure();
  94176. return;
  94177. }
  94178. this.measureScheduled = 0, e && this.observer.forceFlush();
  94179. let n = null, r = this.scrollDOM, i = r.scrollTop * this.scaleY, { scrollAnchorPos: a, scrollAnchorHeight: o } = this.viewState;
  94180. Math.abs(i - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
  94181. try {
  94182. for (let s = 0; ; s++) {
  94183. if (o < 0)
  94184. if (Oae(r))
  94185. a = -1, o = this.viewState.heightMap.height;
  94186. else {
  94187. let h = this.viewState.scrollAnchorAt(i);
  94188. a = h.from, o = h.top;
  94189. }
  94190. this.updateState = 1;
  94191. let l = this.viewState.measure(this);
  94192. if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
  94193. break;
  94194. if (s > 5) {
  94195. console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
  94196. break;
  94197. }
  94198. let u = [];
  94199. l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
  94200. let c = u.map((h) => {
  94201. try {
  94202. return h.read(this);
  94203. } catch (p) {
  94204. return mi(this.state, p), lG;
  94205. }
  94206. }), f = iS.create(this, this.state, []), d = !1;
  94207. 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());
  94208. for (let h = 0; h < u.length; h++)
  94209. if (c[h] != lG)
  94210. try {
  94211. let p = u[h];
  94212. p.write && p.write(c[h], this);
  94213. } catch (p) {
  94214. mi(this.state, p);
  94215. }
  94216. if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) {
  94217. if (this.viewState.editorHeight)
  94218. if (this.viewState.scrollTarget) {
  94219. this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
  94220. continue;
  94221. } else {
  94222. let p = (a < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(a).top) - o;
  94223. if (p > 1 || p < -1) {
  94224. i = i + p, r.scrollTop = i / this.scaleY, o = -1;
  94225. continue;
  94226. }
  94227. }
  94228. break;
  94229. }
  94230. }
  94231. } finally {
  94232. this.updateState = 0, this.measureScheduled = -1;
  94233. }
  94234. if (n && !n.empty)
  94235. for (let s of this.state.facet(CM))
  94236. s(n);
  94237. }
  94238. /**
  94239. Get the CSS classes for the currently active editor themes.
  94240. */
  94241. get themeClasses() {
  94242. return EM + " " + (this.state.facet(AM) ? doe : foe) + " " + this.state.facet(Kb);
  94243. }
  94244. updateAttrs() {
  94245. let e = uG(this, Uae, {
  94246. class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
  94247. }), n = {
  94248. spellcheck: "false",
  94249. autocorrect: "off",
  94250. autocapitalize: "off",
  94251. translate: "no",
  94252. contenteditable: this.state.facet(El) ? "true" : "false",
  94253. class: "cm-content",
  94254. style: `${Ne.tabSize}: ${this.state.tabSize}`,
  94255. role: "textbox",
  94256. "aria-multiline": "true"
  94257. };
  94258. this.state.readOnly && (n["aria-readonly"] = "true"), uG(this, i4, n);
  94259. let r = this.observer.ignore(() => {
  94260. let i = _M(this.contentDOM, this.contentAttrs, n), a = _M(this.dom, this.editorAttrs, e);
  94261. return i || a;
  94262. });
  94263. return this.editorAttrs = e, this.contentAttrs = n, r;
  94264. }
  94265. showAnnouncements(e) {
  94266. let n = !0;
  94267. for (let r of e)
  94268. for (let i of r.effects)
  94269. if (i.is(De.announce)) {
  94270. n && (this.announceDOM.textContent = ""), n = !1;
  94271. let a = this.announceDOM.appendChild(document.createElement("div"));
  94272. a.textContent = i.value;
  94273. }
  94274. }
  94275. mountStyles() {
  94276. this.styleModules = this.state.facet(eg);
  94277. let e = this.state.facet(De.cspNonce);
  94278. pu.mount(this.root, this.styleModules.concat(Wot).reverse(), e ? { nonce: e } : void 0);
  94279. }
  94280. readMeasured() {
  94281. if (this.updateState == 2)
  94282. throw new Error("Reading the editor layout isn't allowed during an update");
  94283. this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
  94284. }
  94285. /**
  94286. Schedule a layout measurement, optionally providing callbacks to
  94287. do custom DOM measuring followed by a DOM write phase. Using
  94288. this is preferable reading DOM layout directly from, for
  94289. example, an event handler, because it'll make sure measuring and
  94290. drawing done by other components is synchronized, avoiding
  94291. unnecessary DOM layout computations.
  94292. */
  94293. requestMeasure(e) {
  94294. if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
  94295. if (this.measureRequests.indexOf(e) > -1)
  94296. return;
  94297. if (e.key != null) {
  94298. for (let n = 0; n < this.measureRequests.length; n++)
  94299. if (this.measureRequests[n].key === e.key) {
  94300. this.measureRequests[n] = e;
  94301. return;
  94302. }
  94303. }
  94304. this.measureRequests.push(e);
  94305. }
  94306. }
  94307. /**
  94308. Get the value of a specific plugin, if present. Note that
  94309. plugins that crash can be dropped from a view, so even when you
  94310. know you registered a given plugin, it is recommended to check
  94311. the return value of this method.
  94312. */
  94313. plugin(e) {
  94314. let n = this.pluginMap.get(e);
  94315. 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;
  94316. }
  94317. /**
  94318. The top position of the document, in screen coordinates. This
  94319. may be negative when the editor is scrolled down. Points
  94320. directly to the top of the first line, not above the padding.
  94321. */
  94322. get documentTop() {
  94323. return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
  94324. }
  94325. /**
  94326. Reports the padding above and below the document.
  94327. */
  94328. get documentPadding() {
  94329. return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
  94330. }
  94331. /**
  94332. If the editor is transformed with CSS, this provides the scale
  94333. along the X axis. Otherwise, it will just be 1. Note that
  94334. transforms other than translation and scaling are not supported.
  94335. */
  94336. get scaleX() {
  94337. return this.viewState.scaleX;
  94338. }
  94339. /**
  94340. Provide the CSS transformed scale along the Y axis.
  94341. */
  94342. get scaleY() {
  94343. return this.viewState.scaleY;
  94344. }
  94345. /**
  94346. Find the text line or block widget at the given vertical
  94347. position (which is interpreted as relative to the [top of the
  94348. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
  94349. */
  94350. elementAtHeight(e) {
  94351. return this.readMeasured(), this.viewState.elementAtHeight(e);
  94352. }
  94353. /**
  94354. Find the line block (see
  94355. [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
  94356. height, again interpreted relative to the [top of the
  94357. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
  94358. */
  94359. lineBlockAtHeight(e) {
  94360. return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
  94361. }
  94362. /**
  94363. Get the extent and vertical position of all [line
  94364. blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
  94365. are relative to the [top of the
  94366. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
  94367. */
  94368. get viewportLineBlocks() {
  94369. return this.viewState.viewportLines;
  94370. }
  94371. /**
  94372. Find the line block around the given document position. A line
  94373. block is a range delimited on both sides by either a
  94374. non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
  94375. start/end of the document. It will usually just hold a line of
  94376. text, but may be broken into multiple textblocks by block
  94377. widgets.
  94378. */
  94379. lineBlockAt(e) {
  94380. return this.viewState.lineBlockAt(e);
  94381. }
  94382. /**
  94383. The editor's total content height.
  94384. */
  94385. get contentHeight() {
  94386. return this.viewState.contentHeight;
  94387. }
  94388. /**
  94389. Move a cursor position by [grapheme
  94390. cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
  94391. the motion is away from the line start, or towards it. In
  94392. bidirectional text, the line is traversed in visual order, using
  94393. the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
  94394. When the start position was the last one on the line, the
  94395. returned position will be across the line break. If there is no
  94396. further line, the original position is returned.
  94397. By default, this method moves over a single cluster. The
  94398. optional `by` argument can be used to move across more. It will
  94399. be called with the first cluster as argument, and should return
  94400. a predicate that determines, for each subsequent cluster,
  94401. whether it should also be moved over.
  94402. */
  94403. moveByChar(e, n, r) {
  94404. return y$(this, e, GH(this, e, n, r));
  94405. }
  94406. /**
  94407. Move a cursor position across the next group of either
  94408. [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
  94409. non-whitespace characters.
  94410. */
  94411. moveByGroup(e, n) {
  94412. return y$(this, e, GH(this, e, n, (r) => dot(this, e.head, r)));
  94413. }
  94414. /**
  94415. Get the cursor position visually at the start or end of a line.
  94416. Note that this may differ from the _logical_ position at its
  94417. start or end (which is simply at `line.from`/`line.to`) if text
  94418. at the start or end goes against the line's base text direction.
  94419. */
  94420. visualLineSide(e, n) {
  94421. let r = this.bidiSpans(e), i = this.textDirectionAt(e.from), a = r[n ? r.length - 1 : 0];
  94422. return me.cursor(a.side(n, i) + e.from, a.forward(!n, i) ? 1 : -1);
  94423. }
  94424. /**
  94425. Move to the next line boundary in the given direction. If
  94426. `includeWrap` is true, line wrapping is on, and there is a
  94427. further wrap point on the current line, the wrap point will be
  94428. returned. Otherwise this function will return the start or end
  94429. of the line.
  94430. */
  94431. moveToLineBoundary(e, n, r = !0) {
  94432. return fot(this, e, n, r);
  94433. }
  94434. /**
  94435. Move a cursor position vertically. When `distance` isn't given,
  94436. it defaults to moving to the next line (including wrapped
  94437. lines). Otherwise, `distance` should provide a positive distance
  94438. in pixels.
  94439. When `start` has a
  94440. [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
  94441. motion will use that as a target horizontal position. Otherwise,
  94442. the cursor's own horizontal position is used. The returned
  94443. cursor will have its goal column set to whichever column was
  94444. used.
  94445. */
  94446. moveVertically(e, n, r) {
  94447. return y$(this, e, hot(this, e, n, r));
  94448. }
  94449. /**
  94450. Find the DOM parent node and offset (child offset if `node` is
  94451. an element, character offset when it is a text node) at the
  94452. given document position.
  94453. Note that for positions that aren't currently in
  94454. `visibleRanges`, the resulting DOM position isn't necessarily
  94455. meaningful (it may just point before or after a placeholder
  94456. element).
  94457. */
  94458. domAtPos(e) {
  94459. return this.docView.domAtPos(e);
  94460. }
  94461. /**
  94462. Find the document position at the given DOM node. Can be useful
  94463. for associating positions with DOM events. Will raise an error
  94464. when `node` isn't part of the editor content.
  94465. */
  94466. posAtDOM(e, n = 0) {
  94467. return this.docView.posFromDOM(e, n);
  94468. }
  94469. posAtCoords(e, n = !0) {
  94470. return this.readMeasured(), eoe(this, e, n);
  94471. }
  94472. /**
  94473. Get the screen coordinates at the given document position.
  94474. `side` determines whether the coordinates are based on the
  94475. element before (-1) or after (1) the position (if no element is
  94476. available on the given side, the method will transparently use
  94477. another strategy to get reasonable coordinates).
  94478. */
  94479. coordsAtPos(e, n = 1) {
  94480. this.readMeasured();
  94481. let r = this.docView.coordsAt(e, n);
  94482. if (!r || r.left == r.right)
  94483. return r;
  94484. let i = this.state.doc.lineAt(e), a = this.bidiSpans(i), o = a[Hl.find(a, e - i.from, -1, n)];
  94485. return Iw(r, o.dir == pn.LTR == n > 0);
  94486. }
  94487. /**
  94488. Return the rectangle around a given character. If `pos` does not
  94489. point in front of a character that is in the viewport and
  94490. rendered (i.e. not replaced, not a line break), this will return
  94491. null. For space characters that are a line wrap point, this will
  94492. return the position before the line break.
  94493. */
  94494. coordsForChar(e) {
  94495. return this.readMeasured(), this.docView.coordsForChar(e);
  94496. }
  94497. /**
  94498. The default width of a character in the editor. May not
  94499. accurately reflect the width of all characters (given variable
  94500. width fonts or styling of invididual ranges).
  94501. */
  94502. get defaultCharacterWidth() {
  94503. return this.viewState.heightOracle.charWidth;
  94504. }
  94505. /**
  94506. The default height of a line in the editor. May not be accurate
  94507. for all lines.
  94508. */
  94509. get defaultLineHeight() {
  94510. return this.viewState.heightOracle.lineHeight;
  94511. }
  94512. /**
  94513. The text direction
  94514. ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
  94515. CSS property) of the editor's content element.
  94516. */
  94517. get textDirection() {
  94518. return this.viewState.defaultTextDirection;
  94519. }
  94520. /**
  94521. Find the text direction of the block at the given position, as
  94522. assigned by CSS. If
  94523. [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
  94524. isn't enabled, or the given position is outside of the viewport,
  94525. this will always return the same as
  94526. [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
  94527. this may trigger a DOM layout.
  94528. */
  94529. textDirectionAt(e) {
  94530. return !this.state.facet(Hae) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
  94531. }
  94532. /**
  94533. Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
  94534. (as determined by the
  94535. [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
  94536. CSS property of its content element).
  94537. */
  94538. get lineWrapping() {
  94539. return this.viewState.heightOracle.lineWrapping;
  94540. }
  94541. /**
  94542. Returns the bidirectional text structure of the given line
  94543. (which should be in the current document) as an array of span
  94544. objects. The order of these spans matches the [text
  94545. direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
  94546. left-to-right, the leftmost spans come first, otherwise the
  94547. rightmost spans come first.
  94548. */
  94549. bidiSpans(e) {
  94550. if (e.length > est)
  94551. return Lae(e.length);
  94552. let n = this.textDirectionAt(e.from), r;
  94553. for (let a of this.bidiCache)
  94554. if (a.from == e.from && a.dir == n && (a.fresh || kae(a.isolates, r = BH(this, e))))
  94555. return a.order;
  94556. r || (r = BH(this, e));
  94557. let i = Xat(e.text, n, r);
  94558. return this.bidiCache.push(new aS(e.from, e.to, n, r, !0, i)), i;
  94559. }
  94560. /**
  94561. Check whether the editor has focus.
  94562. */
  94563. get hasFocus() {
  94564. var e;
  94565. 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;
  94566. }
  94567. /**
  94568. Put focus on the editor.
  94569. */
  94570. focus() {
  94571. this.observer.ignore(() => {
  94572. bae(this.contentDOM), this.docView.updateSelection();
  94573. });
  94574. }
  94575. /**
  94576. Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
  94577. necessary when moving the editor's existing DOM to a new window or shadow root.
  94578. */
  94579. setRoot(e) {
  94580. this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
  94581. }
  94582. /**
  94583. Clean up this editor view, removing its element from the
  94584. document, unregistering event handlers, and notifying
  94585. plugins. The view instance can no longer be used after
  94586. calling this.
  94587. */
  94588. destroy() {
  94589. this.root.activeElement == this.contentDOM && this.contentDOM.blur();
  94590. for (let e of this.plugins)
  94591. e.destroy(this);
  94592. 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;
  94593. }
  94594. /**
  94595. Returns an effect that can be
  94596. [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
  94597. cause it to scroll the given position or range into view.
  94598. */
  94599. static scrollIntoView(e, n = {}) {
  94600. return jb.of(new uh(typeof e == "number" ? me.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
  94601. }
  94602. /**
  94603. Return an effect that resets the editor to its current (at the
  94604. time this method was called) scroll position. Note that this
  94605. only affects the editor's own scrollable element, not parents.
  94606. See also
  94607. [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
  94608. The effect should be used with a document identical to the one
  94609. it was created for. Failing to do so is not an error, but may
  94610. not scroll to the expected position. You can
  94611. [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
  94612. */
  94613. scrollSnapshot() {
  94614. let { scrollTop: e, scrollLeft: n } = this.scrollDOM, r = this.viewState.scrollAnchorAt(e);
  94615. return jb.of(new uh(me.cursor(r.from), "start", "start", r.top - e, n, !0));
  94616. }
  94617. /**
  94618. Enable or disable tab-focus mode, which disables key bindings
  94619. for Tab and Shift-Tab, letting the browser's default
  94620. focus-changing behavior go through instead. This is useful to
  94621. prevent trapping keyboard users in your editor.
  94622. Without argument, this toggles the mode. With a boolean, it
  94623. enables (true) or disables it (false). Given a number, it
  94624. temporarily enables the mode until that number of milliseconds
  94625. have passed or another non-Tab key is pressed.
  94626. */
  94627. setTabFocusMode(e) {
  94628. 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);
  94629. }
  94630. /**
  94631. Returns an extension that can be used to add DOM event handlers.
  94632. The value should be an object mapping event names to handler
  94633. functions. For any given event, such functions are ordered by
  94634. extension precedence, and the first handler to return true will
  94635. be assumed to have handled that event, and no other handlers or
  94636. built-in behavior will be activated for it. These are registered
  94637. on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
  94638. for `scroll` handlers, which will be called any time the
  94639. editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
  94640. its parent nodes is scrolled.
  94641. */
  94642. static domEventHandlers(e) {
  94643. return kn.define(() => ({}), { eventHandlers: e });
  94644. }
  94645. /**
  94646. Create an extension that registers DOM event observers. Contrary
  94647. to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
  94648. observers can't be prevented from running by a higher-precedence
  94649. handler returning true. They also don't prevent other handlers
  94650. and observers from running when they return true, and should not
  94651. call `preventDefault`.
  94652. */
  94653. static domEventObservers(e) {
  94654. return kn.define(() => ({}), { eventObservers: e });
  94655. }
  94656. /**
  94657. Create a theme extension. The first argument can be a
  94658. [`style-mod`](https://github.com/marijnh/style-mod#documentation)
  94659. style spec providing the styles for the theme. These will be
  94660. prefixed with a generated class for the style.
  94661. Because the selectors will be prefixed with a scope class, rule
  94662. that directly match the editor's [wrapper
  94663. element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
  94664. added—need to be explicitly differentiated by adding an `&` to
  94665. the selector for that element—for example
  94666. `&.cm-focused`.
  94667. When `dark` is set to true, the theme will be marked as dark,
  94668. which will cause the `&dark` rules from [base
  94669. themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
  94670. `&light` when a light theme is active).
  94671. */
  94672. static theme(e, n) {
  94673. let r = pu.newName(), i = [Kb.of(r), eg.of(MM(`.${r}`, e))];
  94674. return n && n.dark && i.push(AM.of(!0)), i;
  94675. }
  94676. /**
  94677. Create an extension that adds styles to the base theme. Like
  94678. with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
  94679. place of the editor wrapper element when directly targeting
  94680. that. You can also use `&dark` or `&light` instead to only
  94681. target editors with a dark or light theme.
  94682. */
  94683. static baseTheme(e) {
  94684. return Eu.lowest(eg.of(MM("." + EM, e, hoe)));
  94685. }
  94686. /**
  94687. Retrieve an editor view instance from the view's DOM
  94688. representation.
  94689. */
  94690. static findFromDOM(e) {
  94691. var n;
  94692. let r = e.querySelector(".cm-content"), i = r && Jt.get(r) || Jt.get(e);
  94693. return ((n = i == null ? void 0 : i.rootView) === null || n === void 0 ? void 0 : n.view) || null;
  94694. }
  94695. }
  94696. De.styleModule = eg;
  94697. De.inputHandler = Wae;
  94698. De.scrollHandler = jae;
  94699. De.focusChangeEffect = Qae;
  94700. De.perLineTextDirection = Hae;
  94701. De.exceptionSink = Fae;
  94702. De.updateListener = CM;
  94703. De.editable = El;
  94704. De.mouseSelectionStyle = Vae;
  94705. De.dragMovesSelection = zae;
  94706. De.clickAddsSelectionRange = Bae;
  94707. De.decorations = Xm;
  94708. De.outerDecorations = Xae;
  94709. De.atomicRanges = a4;
  94710. De.bidiIsolatedRanges = Yae;
  94711. De.scrollMargins = qae;
  94712. De.darkTheme = AM;
  94713. De.cspNonce = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : "" });
  94714. De.contentAttributes = i4;
  94715. De.editorAttributes = Uae;
  94716. De.lineWrapping = /* @__PURE__ */ De.contentAttributes.of({ class: "cm-lineWrapping" });
  94717. De.announce = /* @__PURE__ */ dt.define();
  94718. const est = 4096, lG = {};
  94719. class aS {
  94720. constructor(e, n, r, i, a, o) {
  94721. this.from = e, this.to = n, this.dir = r, this.isolates = i, this.fresh = a, this.order = o;
  94722. }
  94723. static update(e, n) {
  94724. if (n.empty && !e.some((a) => a.fresh))
  94725. return e;
  94726. let r = [], i = e.length ? e[e.length - 1].dir : pn.LTR;
  94727. for (let a = Math.max(0, e.length - 10); a < e.length; a++) {
  94728. let o = e[a];
  94729. o.dir == i && !n.touchesRange(o.from, o.to) && r.push(new aS(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
  94730. }
  94731. return r;
  94732. }
  94733. }
  94734. function uG(t, e, n) {
  94735. for (let r = t.state.facet(e), i = r.length - 1; i >= 0; i--) {
  94736. let a = r[i], o = typeof a == "function" ? a(t) : a;
  94737. o && bM(o, n);
  94738. }
  94739. return n;
  94740. }
  94741. const tst = Ne.mac ? "mac" : Ne.windows ? "win" : Ne.linux ? "linux" : "key";
  94742. function nst(t, e) {
  94743. const n = t.split(/-(?!$)/);
  94744. let r = n[n.length - 1];
  94745. r == "Space" && (r = " ");
  94746. let i, a, o, s;
  94747. for (let l = 0; l < n.length - 1; ++l) {
  94748. const u = n[l];
  94749. if (/^(cmd|meta|m)$/i.test(u))
  94750. s = !0;
  94751. else if (/^a(lt)?$/i.test(u))
  94752. i = !0;
  94753. else if (/^(c|ctrl|control)$/i.test(u))
  94754. a = !0;
  94755. else if (/^s(hift)?$/i.test(u))
  94756. o = !0;
  94757. else if (/^mod$/i.test(u))
  94758. e == "mac" ? s = !0 : a = !0;
  94759. else
  94760. throw new Error("Unrecognized modifier name: " + u);
  94761. }
  94762. return i && (r = "Alt-" + r), a && (r = "Ctrl-" + r), s && (r = "Meta-" + r), o && (r = "Shift-" + r), r;
  94763. }
  94764. function Jb(t, e, n) {
  94765. return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
  94766. }
  94767. const rst = /* @__PURE__ */ Eu.default(/* @__PURE__ */ De.domEventHandlers({
  94768. keydown(t, e) {
  94769. return moe(goe(e.state), t, e, "editor");
  94770. }
  94771. })), oy = /* @__PURE__ */ Be.define({ enables: rst }), cG = /* @__PURE__ */ new WeakMap();
  94772. function goe(t) {
  94773. let e = t.facet(oy), n = cG.get(e);
  94774. return n || cG.set(e, n = ost(e.reduce((r, i) => r.concat(i), []))), n;
  94775. }
  94776. function ist(t, e, n) {
  94777. return moe(goe(t.state), e, t, n);
  94778. }
  94779. let Ml = null;
  94780. const ast = 4e3;
  94781. function ost(t, e = tst) {
  94782. let n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), i = (o, s) => {
  94783. let l = r[o];
  94784. if (l == null)
  94785. r[o] = s;
  94786. else if (l != s)
  94787. throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
  94788. }, a = (o, s, l, u, c) => {
  94789. var f, d;
  94790. let h = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), p = s.split(/ (?!$)/).map((m) => nst(m, e));
  94791. for (let m = 1; m < p.length; m++) {
  94792. let y = p.slice(0, m).join(" ");
  94793. i(y, !0), h[y] || (h[y] = {
  94794. preventDefault: !0,
  94795. stopPropagation: !1,
  94796. run: [(b) => {
  94797. let _ = Ml = { view: b, prefix: y, scope: o };
  94798. return setTimeout(() => {
  94799. Ml == _ && (Ml = null);
  94800. }, ast), !0;
  94801. }]
  94802. });
  94803. }
  94804. let v = p.join(" ");
  94805. i(v, !1);
  94806. let g = h[v] || (h[v] = {
  94807. preventDefault: !1,
  94808. stopPropagation: !1,
  94809. run: ((d = (f = h._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || []
  94810. });
  94811. l && g.run.push(l), u && (g.preventDefault = !0), c && (g.stopPropagation = !0);
  94812. };
  94813. for (let o of t) {
  94814. let s = o.scope ? o.scope.split(" ") : ["editor"];
  94815. if (o.any)
  94816. for (let u of s) {
  94817. let c = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
  94818. c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] });
  94819. let { any: f } = o;
  94820. for (let d in c)
  94821. c[d].run.push((h) => f(h, IM));
  94822. }
  94823. let l = o[e] || o.key;
  94824. if (l)
  94825. for (let u of s)
  94826. a(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && a(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
  94827. }
  94828. return n;
  94829. }
  94830. let IM = null;
  94831. function moe(t, e, n, r) {
  94832. IM = e;
  94833. let i = Eat(e), a = gr(i, 0), o = ga(a) == i.length && i != " ", s = "", l = !1, u = !1, c = !1;
  94834. Ml && Ml.view == n && Ml.scope == r && (s = Ml.prefix + " ", noe.indexOf(e.keyCode) < 0 && (u = !0, Ml = null));
  94835. let f = /* @__PURE__ */ new Set(), d = (g) => {
  94836. if (g) {
  94837. for (let m of g.run)
  94838. if (!f.has(m) && (f.add(m), m(n)))
  94839. return g.stopPropagation && (c = !0), !0;
  94840. g.preventDefault && (g.stopPropagation && (c = !0), u = !0);
  94841. }
  94842. return !1;
  94843. }, h = t[r], p, v;
  94844. return h && (d(h[s + Jb(i, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
  94845. !(Ne.windows && e.ctrlKey && e.altKey) && (p = vu[e.keyCode]) && p != i ? (d(h[s + Jb(p, e, !0)]) || e.shiftKey && (v = Zm[e.keyCode]) != i && v != p && d(h[s + Jb(v, e, !1)])) && (l = !0) : o && e.shiftKey && d(h[s + Jb(i, e, !0)]) && (l = !0), !l && d(h._any) && (l = !0)), u && (l = !0), l && c && e.stopPropagation(), IM = null, l;
  94846. }
  94847. class sy {
  94848. /**
  94849. Create a marker with the given class and dimensions. If `width`
  94850. is null, the DOM element will get no width style.
  94851. */
  94852. constructor(e, n, r, i, a) {
  94853. this.className = e, this.left = n, this.top = r, this.width = i, this.height = a;
  94854. }
  94855. draw() {
  94856. let e = document.createElement("div");
  94857. return e.className = this.className, this.adjust(e), e;
  94858. }
  94859. update(e, n) {
  94860. return n.className != this.className ? !1 : (this.adjust(e), !0);
  94861. }
  94862. adjust(e) {
  94863. 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";
  94864. }
  94865. eq(e) {
  94866. return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
  94867. }
  94868. /**
  94869. Create a set of rectangles for the given selection range,
  94870. assigning them theclass`className`. Will create a single
  94871. rectangle for empty ranges, and a set of selection-style
  94872. rectangles covering the range's content (in a bidi-aware
  94873. way) for non-empty ones.
  94874. */
  94875. static forRange(e, n, r) {
  94876. if (r.empty) {
  94877. let i = e.coordsAtPos(r.head, r.assoc || 1);
  94878. if (!i)
  94879. return [];
  94880. let a = yoe(e);
  94881. return [new sy(n, i.left - a.left, i.top - a.top, null, i.bottom - i.top)];
  94882. } else
  94883. return sst(e, n, r);
  94884. }
  94885. }
  94886. function yoe(t) {
  94887. let e = t.scrollDOM.getBoundingClientRect();
  94888. 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 };
  94889. }
  94890. function fG(t, e, n, r) {
  94891. let i = t.coordsAtPos(e, n * 2);
  94892. if (!i)
  94893. return r;
  94894. 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 });
  94895. return s == null || l == null ? r : { from: Math.max(r.from, Math.min(s, l)), to: Math.min(r.to, Math.max(s, l)) };
  94896. }
  94897. function sst(t, e, n) {
  94898. if (n.to <= t.viewport.from || n.from >= t.viewport.to)
  94899. return [];
  94900. 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 = yoe(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 = PM(t, r), p = PM(t, i), v = h.type == Jr.Text ? h : null, g = p.type == Jr.Text ? p : null;
  94901. if (v && (t.lineWrapping || h.widgetLineBreaks) && (v = fG(t, r, 1, v)), g && (t.lineWrapping || p.widgetLineBreaks) && (g = fG(t, i, -1, g)), v && g && v.from == g.from && v.to == g.to)
  94902. return y(b(n.from, n.to, v));
  94903. {
  94904. let O = v ? b(n.from, null, v) : _(h, !1), S = g ? b(null, n.to, g) : _(p, !0), x = [];
  94905. 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 == Jr.Text && (O.bottom = S.top = (O.bottom + S.top) / 2), y(O).concat(x).concat(y(S));
  94906. }
  94907. function m(O, S, x, C) {
  94908. return new sy(
  94909. e,
  94910. O - l.left,
  94911. S - l.top - 0.01,
  94912. x - O,
  94913. C - S + 0.01
  94914. /* C.Epsilon */
  94915. );
  94916. }
  94917. function y({ top: O, bottom: S, horizontal: x }) {
  94918. let C = [];
  94919. for (let T = 0; T < x.length; T += 2)
  94920. C.push(m(x[T], O, x[T + 1], S));
  94921. return C;
  94922. }
  94923. function b(O, S, x) {
  94924. let C = 1e9, T = -1e9, w = [];
  94925. function P(D, E, R, N, V) {
  94926. let z = t.coordsAtPos(D, D == x.to ? -2 : 2), W = t.coordsAtPos(R, R == x.from ? 2 : -2);
  94927. !z || !W || (C = Math.min(z.top, W.top, C), T = Math.max(z.bottom, W.bottom, T), V == pn.LTR ? w.push(a && E ? f : z.left, a && N ? d : W.right) : w.push(!a && N ? f : W.left, !a && E ? d : z.right));
  94928. }
  94929. let $ = O ?? x.from, A = S ?? x.to;
  94930. for (let D of t.visibleRanges)
  94931. if (D.to > $ && D.from < A)
  94932. for (let E = Math.max(D.from, $), R = Math.min(D.to, A); ; ) {
  94933. let N = t.state.doc.lineAt(E);
  94934. for (let V of t.bidiSpans(N)) {
  94935. let z = V.from + N.from, W = V.to + N.from;
  94936. if (z >= R)
  94937. break;
  94938. W > E && P(Math.max(z, E), O == null && z <= $, Math.min(W, R), S == null && W >= A, V.dir);
  94939. }
  94940. if (E = N.to + 1, E >= R)
  94941. break;
  94942. }
  94943. return w.length == 0 && P($, O == null, A, S == null, t.textDirection), { top: C, bottom: T, horizontal: w };
  94944. }
  94945. function _(O, S) {
  94946. let x = s.top + (S ? O.top : O.bottom);
  94947. return { top: x, bottom: x, horizontal: [] };
  94948. }
  94949. }
  94950. function lst(t, e) {
  94951. return t.constructor == e.constructor && t.eq(e);
  94952. }
  94953. class ust {
  94954. constructor(e, n) {
  94955. 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);
  94956. }
  94957. update(e) {
  94958. e.startState.facet(s1) != e.state.facet(s1) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
  94959. }
  94960. docViewUpdate(e) {
  94961. this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq);
  94962. }
  94963. setOrder(e) {
  94964. let n = 0, r = e.facet(s1);
  94965. for (; n < r.length && r[n] != this.layer; )
  94966. n++;
  94967. this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
  94968. }
  94969. measure() {
  94970. return this.layer.markers(this.view);
  94971. }
  94972. scale() {
  94973. let { scaleX: e, scaleY: n } = this.view;
  94974. (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
  94975. }
  94976. draw(e) {
  94977. if (e.length != this.drawn.length || e.some((n, r) => !lst(n, this.drawn[r]))) {
  94978. let n = this.dom.firstChild, r = 0;
  94979. for (let i of e)
  94980. 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);
  94981. for (; n; ) {
  94982. let i = n.nextSibling;
  94983. n.remove(), n = i;
  94984. }
  94985. this.drawn = e;
  94986. }
  94987. }
  94988. destroy() {
  94989. this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
  94990. }
  94991. }
  94992. const s1 = /* @__PURE__ */ Be.define();
  94993. function boe(t) {
  94994. return [
  94995. kn.define((e) => new ust(e, t)),
  94996. s1.of(t)
  94997. ];
  94998. }
  94999. const _oe = !Ne.ios, Ym = /* @__PURE__ */ Be.define({
  95000. combine(t) {
  95001. return fs(t, {
  95002. cursorBlinkRate: 1200,
  95003. drawRangeCursor: !0
  95004. }, {
  95005. cursorBlinkRate: (e, n) => Math.min(e, n),
  95006. drawRangeCursor: (e, n) => e || n
  95007. });
  95008. }
  95009. });
  95010. function cst(t = {}) {
  95011. return [
  95012. Ym.of(t),
  95013. fst,
  95014. dst,
  95015. hst,
  95016. Gae.of(!0)
  95017. ];
  95018. }
  95019. function Ooe(t) {
  95020. return t.startState.facet(Ym) != t.state.facet(Ym);
  95021. }
  95022. const fst = /* @__PURE__ */ boe({
  95023. above: !0,
  95024. markers(t) {
  95025. let { state: e } = t, n = e.facet(Ym), r = [];
  95026. for (let i of e.selection.ranges) {
  95027. let a = i == e.selection.main;
  95028. if (i.empty ? !a || _oe : n.drawRangeCursor) {
  95029. 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);
  95030. for (let l of sy.forRange(t, o, s))
  95031. r.push(l);
  95032. }
  95033. }
  95034. return r;
  95035. },
  95036. update(t, e) {
  95037. t.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
  95038. let n = Ooe(t);
  95039. return n && dG(t.state, e), t.docChanged || t.selectionSet || n;
  95040. },
  95041. mount(t, e) {
  95042. dG(e.state, t);
  95043. },
  95044. class: "cm-cursorLayer"
  95045. });
  95046. function dG(t, e) {
  95047. e.style.animationDuration = t.facet(Ym).cursorBlinkRate + "ms";
  95048. }
  95049. const dst = /* @__PURE__ */ boe({
  95050. above: !1,
  95051. markers(t) {
  95052. return t.state.selection.ranges.map((e) => e.empty ? [] : sy.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
  95053. },
  95054. update(t, e) {
  95055. return t.docChanged || t.selectionSet || t.viewportChanged || Ooe(t);
  95056. },
  95057. class: "cm-selectionLayer"
  95058. }), DM = {
  95059. ".cm-line": {
  95060. "& ::selection, &::selection": { backgroundColor: "transparent !important" }
  95061. },
  95062. ".cm-content": {
  95063. "& :focus": {
  95064. caretColor: "initial !important",
  95065. "&::selection, & ::selection": {
  95066. backgroundColor: "Highlight !important"
  95067. }
  95068. }
  95069. }
  95070. };
  95071. _oe && (DM[".cm-line"].caretColor = DM[".cm-content"].caretColor = "transparent !important");
  95072. const hst = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.theme(DM)), Soe = /* @__PURE__ */ dt.define({
  95073. map(t, e) {
  95074. return t == null ? null : e.mapPos(t);
  95075. }
  95076. }), rg = /* @__PURE__ */ ur.define({
  95077. create() {
  95078. return null;
  95079. },
  95080. update(t, e) {
  95081. return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, r) => r.is(Soe) ? r.value : n, t);
  95082. }
  95083. }), pst = /* @__PURE__ */ kn.fromClass(class {
  95084. constructor(t) {
  95085. this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
  95086. }
  95087. update(t) {
  95088. var e;
  95089. let n = t.state.field(rg);
  95090. 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(rg) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
  95091. }
  95092. readPos() {
  95093. let { view: t } = this, e = t.state.field(rg), n = e != null && t.coordsAtPos(e);
  95094. if (!n)
  95095. return null;
  95096. let r = t.scrollDOM.getBoundingClientRect();
  95097. return {
  95098. left: n.left - r.left + t.scrollDOM.scrollLeft * t.scaleX,
  95099. top: n.top - r.top + t.scrollDOM.scrollTop * t.scaleY,
  95100. height: n.bottom - n.top
  95101. };
  95102. }
  95103. drawCursor(t) {
  95104. if (this.cursor) {
  95105. let { scaleX: e, scaleY: n } = this.view;
  95106. 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";
  95107. }
  95108. }
  95109. destroy() {
  95110. this.cursor && this.cursor.remove();
  95111. }
  95112. setDropPos(t) {
  95113. this.view.state.field(rg) != t && this.view.dispatch({ effects: Soe.of(t) });
  95114. }
  95115. }, {
  95116. eventObservers: {
  95117. dragover(t) {
  95118. this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
  95119. },
  95120. dragleave(t) {
  95121. (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
  95122. },
  95123. dragend() {
  95124. this.setDropPos(null);
  95125. },
  95126. drop() {
  95127. this.setDropPos(null);
  95128. }
  95129. }
  95130. });
  95131. function vst() {
  95132. return [rg, pst];
  95133. }
  95134. function hG(t, e, n, r, i) {
  95135. e.lastIndex = 0;
  95136. for (let a = t.iterRange(n, r), o = n, s; !a.next().done; o += a.value.length)
  95137. if (!a.lineBreak)
  95138. for (; s = e.exec(a.value); )
  95139. i(o + s.index, s);
  95140. }
  95141. function gst(t, e) {
  95142. let n = t.visibleRanges;
  95143. if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
  95144. return n;
  95145. let r = [];
  95146. for (let { from: i, to: a } of n)
  95147. 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 });
  95148. return r;
  95149. }
  95150. class mst {
  95151. /**
  95152. Create a decorator.
  95153. */
  95154. constructor(e) {
  95155. const { regexp: n, decoration: r, decorate: i, boundary: a, maxLength: o = 1e3 } = e;
  95156. if (!n.global)
  95157. throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
  95158. if (this.regexp = n, i)
  95159. this.addMatch = (s, l, u, c) => i(c, u, u + s[0].length, s, l);
  95160. else if (typeof r == "function")
  95161. this.addMatch = (s, l, u, c) => {
  95162. let f = r(s, l, u);
  95163. f && c(u, u + s[0].length, f);
  95164. };
  95165. else if (r)
  95166. this.addMatch = (s, l, u, c) => c(u, u + s[0].length, r);
  95167. else
  95168. throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
  95169. this.boundary = a, this.maxLength = o;
  95170. }
  95171. /**
  95172. Compute the full set of decorations for matches in the given
  95173. view's viewport. You'll want to call this when initializing your
  95174. plugin.
  95175. */
  95176. createDeco(e) {
  95177. let n = new hu(), r = n.add.bind(n);
  95178. for (let { from: i, to: a } of gst(e, this.maxLength))
  95179. hG(e.state.doc, this.regexp, i, a, (o, s) => this.addMatch(s, e, o, r));
  95180. return n.finish();
  95181. }
  95182. /**
  95183. Update a set of decorations for a view update. `deco` _must_ be
  95184. the set of decorations produced by _this_ `MatchDecorator` for
  95185. the view state before the update.
  95186. */
  95187. updateDeco(e, n) {
  95188. let r = 1e9, i = -1;
  95189. return e.docChanged && e.changes.iterChanges((a, o, s, l) => {
  95190. l > e.view.viewport.from && s < e.view.viewport.to && (r = Math.min(s, r), i = Math.max(l, i));
  95191. }), e.viewportChanged || i - r > 1e3 ? this.createDeco(e.view) : i > -1 ? this.updateRange(e.view, n.map(e.changes), r, i) : n;
  95192. }
  95193. updateRange(e, n, r, i) {
  95194. for (let a of e.visibleRanges) {
  95195. let o = Math.max(a.from, r), s = Math.min(a.to, i);
  95196. if (s > o) {
  95197. 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);
  95198. if (this.boundary) {
  95199. for (; o > l.from; o--)
  95200. if (this.boundary.test(l.text[o - 1 - l.from])) {
  95201. c = o;
  95202. break;
  95203. }
  95204. for (; s < u.to; s++)
  95205. if (this.boundary.test(u.text[s - u.from])) {
  95206. f = s;
  95207. break;
  95208. }
  95209. }
  95210. let d = [], h, p = (v, g, m) => d.push(m.range(v, g));
  95211. if (l == u)
  95212. for (this.regexp.lastIndex = c - l.from; (h = this.regexp.exec(l.text)) && h.index < f - l.from; )
  95213. this.addMatch(h, e, h.index + l.from, p);
  95214. else
  95215. hG(e.state.doc, this.regexp, c, f, (v, g) => this.addMatch(g, e, v, p));
  95216. n = n.update({ filterFrom: c, filterTo: f, filter: (v, g) => v < c || g > f, add: d });
  95217. }
  95218. }
  95219. return n;
  95220. }
  95221. }
  95222. const RM = /x/.unicode != null ? "gu" : "g", yst = /* @__PURE__ */ new RegExp(`[\0-\b
  95223. --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`, RM), bst = {
  95224. 0: "null",
  95225. 7: "bell",
  95226. 8: "backspace",
  95227. 10: "newline",
  95228. 11: "vertical tab",
  95229. 13: "carriage return",
  95230. 27: "escape",
  95231. 8203: "zero width space",
  95232. 8204: "zero width non-joiner",
  95233. 8205: "zero width joiner",
  95234. 8206: "left-to-right mark",
  95235. 8207: "right-to-left mark",
  95236. 8232: "line separator",
  95237. 8237: "left-to-right override",
  95238. 8238: "right-to-left override",
  95239. 8294: "left-to-right isolate",
  95240. 8295: "right-to-left isolate",
  95241. 8297: "pop directional isolate",
  95242. 8233: "paragraph separator",
  95243. 65279: "zero width no-break space",
  95244. 65532: "object replacement"
  95245. };
  95246. let O$ = null;
  95247. function _st() {
  95248. var t;
  95249. if (O$ == null && typeof document < "u" && document.body) {
  95250. let e = document.body.style;
  95251. O$ = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
  95252. }
  95253. return O$ || !1;
  95254. }
  95255. const l1 = /* @__PURE__ */ Be.define({
  95256. combine(t) {
  95257. let e = fs(t, {
  95258. render: null,
  95259. specialChars: yst,
  95260. addSpecialChars: null
  95261. });
  95262. return (e.replaceTabs = !_st()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, RM)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, RM)), e;
  95263. }
  95264. });
  95265. function Ost(t = {}) {
  95266. return [l1.of(t), Sst()];
  95267. }
  95268. let pG = null;
  95269. function Sst() {
  95270. return pG || (pG = kn.fromClass(class {
  95271. constructor(t) {
  95272. this.view = t, this.decorations = Ze.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(l1)), this.decorations = this.decorator.createDeco(t);
  95273. }
  95274. makeDecorator(t) {
  95275. return new mst({
  95276. regexp: t.specialChars,
  95277. decoration: (e, n, r) => {
  95278. let { doc: i } = n.state, a = gr(e[0], 0);
  95279. if (a == 9) {
  95280. let o = i.lineAt(r), s = n.state.tabSize, l = Rp(o.text, s, r - o.from);
  95281. return Ze.replace({
  95282. widget: new Tst((s - l % s) * this.view.defaultCharacterWidth / this.view.scaleX)
  95283. });
  95284. }
  95285. return this.decorationCache[a] || (this.decorationCache[a] = Ze.replace({ widget: new Cst(t, a) }));
  95286. },
  95287. boundary: t.replaceTabs ? void 0 : /[^]/
  95288. });
  95289. }
  95290. update(t) {
  95291. let e = t.state.facet(l1);
  95292. t.startState.facet(l1) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
  95293. }
  95294. }, {
  95295. decorations: (t) => t.decorations
  95296. }));
  95297. }
  95298. const xst = "•";
  95299. function wst(t) {
  95300. return t >= 32 ? xst : t == 10 ? "␤" : String.fromCharCode(9216 + t);
  95301. }
  95302. class Cst extends ds {
  95303. constructor(e, n) {
  95304. super(), this.options = e, this.code = n;
  95305. }
  95306. eq(e) {
  95307. return e.code == this.code;
  95308. }
  95309. toDOM(e) {
  95310. let n = wst(this.code), r = e.state.phrase("Control character") + " " + (bst[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, r, n);
  95311. if (i)
  95312. return i;
  95313. let a = document.createElement("span");
  95314. return a.textContent = n, a.title = r, a.setAttribute("aria-label", r), a.className = "cm-specialChar", a;
  95315. }
  95316. ignoreEvent() {
  95317. return !1;
  95318. }
  95319. }
  95320. class Tst extends ds {
  95321. constructor(e) {
  95322. super(), this.width = e;
  95323. }
  95324. eq(e) {
  95325. return e.width == this.width;
  95326. }
  95327. toDOM() {
  95328. let e = document.createElement("span");
  95329. return e.textContent = " ", e.className = "cm-tab", e.style.width = this.width + "px", e;
  95330. }
  95331. ignoreEvent() {
  95332. return !1;
  95333. }
  95334. }
  95335. function Pst() {
  95336. return Ast;
  95337. }
  95338. const $st = /* @__PURE__ */ Ze.line({ class: "cm-activeLine" }), Ast = /* @__PURE__ */ kn.fromClass(class {
  95339. constructor(t) {
  95340. this.decorations = this.getDeco(t);
  95341. }
  95342. update(t) {
  95343. (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
  95344. }
  95345. getDeco(t) {
  95346. let e = -1, n = [];
  95347. for (let r of t.state.selection.ranges) {
  95348. let i = t.lineBlockAt(r.head);
  95349. i.from > e && (n.push($st.range(i.from)), e = i.from);
  95350. }
  95351. return Ze.set(n);
  95352. }
  95353. }, {
  95354. decorations: (t) => t.decorations
  95355. });
  95356. class Est extends ds {
  95357. constructor(e) {
  95358. super(), this.content = e;
  95359. }
  95360. toDOM() {
  95361. let e = document.createElement("span");
  95362. 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;
  95363. }
  95364. coordsAt(e) {
  95365. let n = e.firstChild ? Uh(e.firstChild) : [];
  95366. if (!n.length)
  95367. return null;
  95368. let r = window.getComputedStyle(e.parentNode), i = Iw(n[0], r.direction != "rtl"), a = parseInt(r.lineHeight);
  95369. return i.bottom - i.top > a * 1.5 ? { left: i.left, right: i.right, top: i.top, bottom: i.top + a } : i;
  95370. }
  95371. ignoreEvent() {
  95372. return !1;
  95373. }
  95374. }
  95375. function Mst(t) {
  95376. return kn.fromClass(class {
  95377. constructor(e) {
  95378. this.view = e, this.placeholder = t ? Ze.set([Ze.widget({ widget: new Est(t), side: 1 }).range(0)]) : Ze.none;
  95379. }
  95380. get decorations() {
  95381. return this.view.state.doc.length ? Ze.none : this.placeholder;
  95382. }
  95383. }, { decorations: (e) => e.decorations });
  95384. }
  95385. const kM = 2e3;
  95386. function Ist(t, e, n) {
  95387. let r = Math.min(e.line, n.line), i = Math.max(e.line, n.line), a = [];
  95388. if (e.off > kM || n.off > kM || e.col < 0 || n.col < 0) {
  95389. let o = Math.min(e.off, n.off), s = Math.max(e.off, n.off);
  95390. for (let l = r; l <= i; l++) {
  95391. let u = t.doc.line(l);
  95392. u.length <= s && a.push(me.range(u.from + o, u.to + s));
  95393. }
  95394. } else {
  95395. let o = Math.min(e.col, n.col), s = Math.max(e.col, n.col);
  95396. for (let l = r; l <= i; l++) {
  95397. let u = t.doc.line(l), c = dM(u.text, o, t.tabSize, !0);
  95398. if (c < 0)
  95399. a.push(me.cursor(u.to));
  95400. else {
  95401. let f = dM(u.text, s, t.tabSize);
  95402. a.push(me.range(u.from + c, u.from + f));
  95403. }
  95404. }
  95405. }
  95406. return a;
  95407. }
  95408. function Dst(t, e) {
  95409. let n = t.coordsAtPos(t.viewport.from);
  95410. return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
  95411. }
  95412. function vG(t, e) {
  95413. let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), i = n - r.from, a = i > kM ? -1 : i == r.length ? Dst(t, e.clientX) : Rp(r.text, t.state.tabSize, n - r.from);
  95414. return { line: r.number, col: a, off: i };
  95415. }
  95416. function Rst(t, e) {
  95417. let n = vG(t, e), r = t.state.selection;
  95418. return n ? {
  95419. update(i) {
  95420. if (i.docChanged) {
  95421. let a = i.changes.mapPos(i.startState.doc.line(n.line).from), o = i.state.doc.lineAt(a);
  95422. n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, r = r.map(i.changes);
  95423. }
  95424. },
  95425. get(i, a, o) {
  95426. let s = vG(t, i);
  95427. if (!s)
  95428. return r;
  95429. let l = Ist(t.state, n, s);
  95430. return l.length ? o ? me.create(l.concat(r.ranges)) : me.create(l) : r;
  95431. }
  95432. } : null;
  95433. }
  95434. function kst(t) {
  95435. let e = (n) => n.altKey && n.button == 0;
  95436. return De.mouseSelectionStyle.of((n, r) => e(r) ? Rst(n, r) : null);
  95437. }
  95438. const Lst = {
  95439. Alt: [18, (t) => !!t.altKey],
  95440. Control: [17, (t) => !!t.ctrlKey],
  95441. Shift: [16, (t) => !!t.shiftKey],
  95442. Meta: [91, (t) => !!t.metaKey]
  95443. }, Nst = { style: "cursor: crosshair" };
  95444. function Bst(t = {}) {
  95445. let [e, n] = Lst[t.key || "Alt"], r = kn.fromClass(class {
  95446. constructor(i) {
  95447. this.view = i, this.isDown = !1;
  95448. }
  95449. set(i) {
  95450. this.isDown != i && (this.isDown = i, this.view.update([]));
  95451. }
  95452. }, {
  95453. eventObservers: {
  95454. keydown(i) {
  95455. this.set(i.keyCode == e || n(i));
  95456. },
  95457. keyup(i) {
  95458. (i.keyCode == e || !n(i)) && this.set(!1);
  95459. },
  95460. mousemove(i) {
  95461. this.set(n(i));
  95462. }
  95463. }
  95464. });
  95465. return [
  95466. r,
  95467. De.contentAttributes.of((i) => {
  95468. var a;
  95469. return !((a = i.plugin(r)) === null || a === void 0) && a.isDown ? Nst : null;
  95470. })
  95471. ];
  95472. }
  95473. const Av = "-10000px";
  95474. class xoe {
  95475. constructor(e, n, r, i) {
  95476. this.facet = n, this.createTooltipView = r, this.removeTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((o) => o);
  95477. let a = null;
  95478. this.tooltipViews = this.tooltips.map((o) => a = r(o, a));
  95479. }
  95480. update(e, n) {
  95481. var r;
  95482. let i = e.state.facet(this.facet), a = i.filter((l) => l);
  95483. if (i === this.input) {
  95484. for (let l of this.tooltipViews)
  95485. l.update && l.update(e);
  95486. return !1;
  95487. }
  95488. let o = [], s = n ? [] : null;
  95489. for (let l = 0; l < a.length; l++) {
  95490. let u = a[l], c = -1;
  95491. if (u) {
  95492. for (let f = 0; f < this.tooltips.length; f++) {
  95493. let d = this.tooltips[f];
  95494. d && d.create == u.create && (c = f);
  95495. }
  95496. if (c < 0)
  95497. o[l] = this.createTooltipView(u, l ? o[l - 1] : null), s && (s[l] = !!u.above);
  95498. else {
  95499. let f = o[l] = this.tooltipViews[c];
  95500. s && (s[l] = n[c]), f.update && f.update(e);
  95501. }
  95502. }
  95503. }
  95504. for (let l of this.tooltipViews)
  95505. o.indexOf(l) < 0 && (this.removeTooltipView(l), (r = l.destroy) === null || r === void 0 || r.call(l));
  95506. return n && (s.forEach((l, u) => n[u] = l), n.length = s.length), this.input = i, this.tooltips = a, this.tooltipViews = o, !0;
  95507. }
  95508. }
  95509. function zst(t) {
  95510. let { win: e } = t;
  95511. return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
  95512. }
  95513. const S$ = /* @__PURE__ */ Be.define({
  95514. combine: (t) => {
  95515. var e, n, r;
  95516. return {
  95517. position: Ne.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
  95518. parent: ((n = t.find((i) => i.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
  95519. tooltipSpace: ((r = t.find((i) => i.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || zst
  95520. };
  95521. }
  95522. }), gG = /* @__PURE__ */ new WeakMap(), l4 = /* @__PURE__ */ kn.fromClass(class {
  95523. constructor(t) {
  95524. this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
  95525. let e = t.state.facet(S$);
  95526. 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 xoe(t, u4, (n, r) => this.createTooltip(n, r), (n) => {
  95527. this.resizeObserver && this.resizeObserver.unobserve(n.dom), n.dom.remove();
  95528. }), this.above = this.manager.tooltips.map((n) => !!n.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
  95529. Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
  95530. }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
  95531. }
  95532. createContainer() {
  95533. 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;
  95534. }
  95535. observeIntersection() {
  95536. if (this.intersectionObserver) {
  95537. this.intersectionObserver.disconnect();
  95538. for (let t of this.manager.tooltipViews)
  95539. this.intersectionObserver.observe(t.dom);
  95540. }
  95541. }
  95542. measureSoon() {
  95543. this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
  95544. this.measureTimeout = -1, this.maybeMeasure();
  95545. }, 50));
  95546. }
  95547. update(t) {
  95548. t.transactions.length && (this.lastTransaction = Date.now());
  95549. let e = this.manager.update(t, this.above);
  95550. e && this.observeIntersection();
  95551. let n = e || t.geometryChanged, r = t.state.facet(S$);
  95552. if (r.position != this.position && !this.madeAbsolute) {
  95553. this.position = r.position;
  95554. for (let i of this.manager.tooltipViews)
  95555. i.dom.style.position = this.position;
  95556. n = !0;
  95557. }
  95558. if (r.parent != this.parent) {
  95559. this.parent && this.container.remove(), this.parent = r.parent, this.createContainer();
  95560. for (let i of this.manager.tooltipViews)
  95561. this.container.appendChild(i.dom);
  95562. n = !0;
  95563. } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
  95564. n && this.maybeMeasure();
  95565. }
  95566. createTooltip(t, e) {
  95567. let n = t.create(this.view), r = e ? e.dom : null;
  95568. if (n.dom.classList.add("cm-tooltip"), t.arrow && !n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
  95569. let i = document.createElement("div");
  95570. i.className = "cm-tooltip-arrow", n.dom.appendChild(i);
  95571. }
  95572. return n.dom.style.position = this.position, n.dom.style.top = Av, 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;
  95573. }
  95574. destroy() {
  95575. var t, e, n;
  95576. this.view.win.removeEventListener("resize", this.measureSoon);
  95577. for (let r of this.manager.tooltipViews)
  95578. r.dom.remove(), (t = r.destroy) === null || t === void 0 || t.call(r);
  95579. 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);
  95580. }
  95581. readMeasure() {
  95582. let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, r = !1;
  95583. if (this.position == "fixed" && this.manager.tooltipViews.length) {
  95584. let { dom: i } = this.manager.tooltipViews[0];
  95585. if (Ne.gecko)
  95586. r = i.offsetParent != this.container.ownerDocument.body;
  95587. else if (i.style.top == Av && i.style.left == "0px") {
  95588. let a = i.getBoundingClientRect();
  95589. r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1;
  95590. }
  95591. }
  95592. if (r || this.position == "absolute")
  95593. if (this.parent) {
  95594. let i = this.parent.getBoundingClientRect();
  95595. i.width && i.height && (e = i.width / this.parent.offsetWidth, n = i.height / this.parent.offsetHeight);
  95596. } else
  95597. ({ scaleX: e, scaleY: n } = this.view.viewState);
  95598. return {
  95599. editor: t,
  95600. parent: this.parent ? this.container.getBoundingClientRect() : t,
  95601. pos: this.manager.tooltips.map((i, a) => {
  95602. let o = this.manager.tooltipViews[a];
  95603. return o.getCoords ? o.getCoords(i.pos) : this.view.coordsAtPos(i.pos);
  95604. }),
  95605. size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()),
  95606. space: this.view.state.facet(S$).tooltipSpace(this.view),
  95607. scaleX: e,
  95608. scaleY: n,
  95609. makeAbsolute: r
  95610. };
  95611. }
  95612. writeMeasure(t) {
  95613. var e;
  95614. if (t.makeAbsolute) {
  95615. this.madeAbsolute = !0, this.position = "absolute";
  95616. for (let s of this.manager.tooltipViews)
  95617. s.dom.style.position = "absolute";
  95618. }
  95619. let { editor: n, space: r, scaleX: i, scaleY: a } = t, o = [];
  95620. for (let s = 0; s < this.manager.tooltips.length; s++) {
  95621. let l = this.manager.tooltips[s], u = this.manager.tooltipViews[s], { dom: c } = u, f = t.pos[s], d = t.size[s];
  95622. 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) {
  95623. c.style.top = Av;
  95624. continue;
  95625. }
  95626. let h = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, p = h ? 7 : 0, v = d.right - d.left, g = (e = gG.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, m = u.offset || Fst, 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];
  95627. !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] = !_);
  95628. let O = (_ ? f.top - r.top : r.bottom - f.bottom) - p;
  95629. if (O < g && u.resize !== !1) {
  95630. if (O < this.view.defaultLineHeight) {
  95631. c.style.top = Av;
  95632. continue;
  95633. }
  95634. gG.set(u, g), c.style.height = (g = O) / a + "px";
  95635. } else c.style.height && (c.style.height = "");
  95636. let S = _ ? f.top - g - p - m.y : f.bottom + p + m.y, x = b + v;
  95637. if (u.overlap !== !0)
  95638. for (let C of o)
  95639. C.left < x && C.right > b && C.top < S + g && C.bottom > S && (S = _ ? C.top - g - 2 - p : C.bottom + p + 2);
  95640. 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) {
  95641. let C = f.left + (y ? m.x : -m.x) - (b + 14 - 7);
  95642. h.style.left = C / i + "px";
  95643. }
  95644. 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);
  95645. }
  95646. }
  95647. maybeMeasure() {
  95648. 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)))
  95649. for (let t of this.manager.tooltipViews)
  95650. t.dom.style.top = Av;
  95651. }
  95652. }, {
  95653. eventObservers: {
  95654. scroll() {
  95655. this.maybeMeasure();
  95656. }
  95657. }
  95658. }), Vst = /* @__PURE__ */ De.baseTheme({
  95659. ".cm-tooltip": {
  95660. zIndex: 100,
  95661. boxSizing: "border-box"
  95662. },
  95663. "&light .cm-tooltip": {
  95664. border: "1px solid #bbb",
  95665. backgroundColor: "#f5f5f5"
  95666. },
  95667. "&light .cm-tooltip-section:not(:first-child)": {
  95668. borderTop: "1px solid #bbb"
  95669. },
  95670. "&dark .cm-tooltip": {
  95671. backgroundColor: "#333338",
  95672. color: "white"
  95673. },
  95674. ".cm-tooltip-arrow": {
  95675. height: "7px",
  95676. width: `${7 * 2}px`,
  95677. position: "absolute",
  95678. zIndex: -1,
  95679. overflow: "hidden",
  95680. "&:before, &:after": {
  95681. content: "''",
  95682. position: "absolute",
  95683. width: 0,
  95684. height: 0,
  95685. borderLeft: "7px solid transparent",
  95686. borderRight: "7px solid transparent"
  95687. },
  95688. ".cm-tooltip-above &": {
  95689. bottom: "-7px",
  95690. "&:before": {
  95691. borderTop: "7px solid #bbb"
  95692. },
  95693. "&:after": {
  95694. borderTop: "7px solid #f5f5f5",
  95695. bottom: "1px"
  95696. }
  95697. },
  95698. ".cm-tooltip-below &": {
  95699. top: "-7px",
  95700. "&:before": {
  95701. borderBottom: "7px solid #bbb"
  95702. },
  95703. "&:after": {
  95704. borderBottom: "7px solid #f5f5f5",
  95705. top: "1px"
  95706. }
  95707. }
  95708. },
  95709. "&dark .cm-tooltip .cm-tooltip-arrow": {
  95710. "&:before": {
  95711. borderTopColor: "#333338",
  95712. borderBottomColor: "#333338"
  95713. },
  95714. "&:after": {
  95715. borderTopColor: "transparent",
  95716. borderBottomColor: "transparent"
  95717. }
  95718. }
  95719. }), Fst = { x: 0, y: 0 }, u4 = /* @__PURE__ */ Be.define({
  95720. enables: [l4, Vst]
  95721. }), oS = /* @__PURE__ */ Be.define({
  95722. combine: (t) => t.reduce((e, n) => e.concat(n), [])
  95723. });
  95724. class Rw {
  95725. // Needs to be static so that host tooltip instances always match
  95726. static create(e) {
  95727. return new Rw(e);
  95728. }
  95729. constructor(e) {
  95730. this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new xoe(e, oS, (n, r) => this.createHostedView(n, r), (n) => n.dom.remove());
  95731. }
  95732. createHostedView(e, n) {
  95733. let r = e.create(this.view);
  95734. 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;
  95735. }
  95736. mount(e) {
  95737. for (let n of this.manager.tooltipViews)
  95738. n.mount && n.mount(e);
  95739. this.mounted = !0;
  95740. }
  95741. positioned(e) {
  95742. for (let n of this.manager.tooltipViews)
  95743. n.positioned && n.positioned(e);
  95744. }
  95745. update(e) {
  95746. this.manager.update(e);
  95747. }
  95748. destroy() {
  95749. var e;
  95750. for (let n of this.manager.tooltipViews)
  95751. (e = n.destroy) === null || e === void 0 || e.call(n);
  95752. }
  95753. passProp(e) {
  95754. let n;
  95755. for (let r of this.manager.tooltipViews) {
  95756. let i = r[e];
  95757. if (i !== void 0) {
  95758. if (n === void 0)
  95759. n = i;
  95760. else if (n !== i)
  95761. return;
  95762. }
  95763. }
  95764. return n;
  95765. }
  95766. get offset() {
  95767. return this.passProp("offset");
  95768. }
  95769. get getCoords() {
  95770. return this.passProp("getCoords");
  95771. }
  95772. get overlap() {
  95773. return this.passProp("overlap");
  95774. }
  95775. get resize() {
  95776. return this.passProp("resize");
  95777. }
  95778. }
  95779. const Wst = /* @__PURE__ */ u4.compute([oS], (t) => {
  95780. let e = t.facet(oS);
  95781. return e.length === 0 ? null : {
  95782. pos: Math.min(...e.map((n) => n.pos)),
  95783. end: Math.max(...e.map((n) => {
  95784. var r;
  95785. return (r = n.end) !== null && r !== void 0 ? r : n.pos;
  95786. })),
  95787. create: Rw.create,
  95788. above: e[0].above,
  95789. arrow: e.some((n) => n.arrow)
  95790. };
  95791. });
  95792. class Qst {
  95793. constructor(e, n, r, i, a) {
  95794. 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));
  95795. }
  95796. update() {
  95797. this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
  95798. }
  95799. get active() {
  95800. return this.view.state.field(this.field);
  95801. }
  95802. checkHover() {
  95803. if (this.hoverTimeout = -1, this.active.length)
  95804. return;
  95805. let e = Date.now() - this.lastMove.time;
  95806. e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
  95807. }
  95808. startHover() {
  95809. clearTimeout(this.restartTimeout);
  95810. let { view: e, lastMove: n } = this, r = e.docView.nearest(n.target);
  95811. if (!r)
  95812. return;
  95813. let i, a = 1;
  95814. if (r instanceof Ql)
  95815. i = r.posAtStart;
  95816. else {
  95817. if (i = e.posAtCoords(n), i == null)
  95818. return;
  95819. let s = e.coordsAtPos(i);
  95820. if (!s || n.y < s.top || n.y > s.bottom || n.x < s.left - e.defaultCharacterWidth || n.x > s.right + e.defaultCharacterWidth)
  95821. return;
  95822. 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;
  95823. a = n.x < s.left ? -u : u;
  95824. }
  95825. let o = this.source(e, i, a);
  95826. if (o != null && o.then) {
  95827. let s = this.pending = { pos: i };
  95828. o.then((l) => {
  95829. this.pending == s && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) }));
  95830. }, (l) => mi(e.state, l, "hover tooltip"));
  95831. } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) });
  95832. }
  95833. get tooltip() {
  95834. let e = this.view.plugin(l4), n = e ? e.manager.tooltips.findIndex((r) => r.create == Rw.create) : -1;
  95835. return n > -1 ? e.manager.tooltipViews[n] : null;
  95836. }
  95837. mousemove(e) {
  95838. var n, r;
  95839. this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
  95840. let { active: i, tooltip: a } = this;
  95841. if (i.length && a && !Hst(a.dom, e) || this.pending) {
  95842. 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;
  95843. (o == s ? this.view.posAtCoords(this.lastMove) != o : !Gst(this.view, o, s, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null);
  95844. }
  95845. }
  95846. mouseleave(e) {
  95847. clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
  95848. let { active: n } = this;
  95849. if (n.length) {
  95850. let { tooltip: r } = this;
  95851. r && r.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(r.dom) : this.view.dispatch({ effects: this.setHover.of([]) });
  95852. }
  95853. }
  95854. watchTooltipLeave(e) {
  95855. let n = (r) => {
  95856. e.removeEventListener("mouseleave", n), this.active.length && !this.view.dom.contains(r.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) });
  95857. };
  95858. e.addEventListener("mouseleave", n);
  95859. }
  95860. destroy() {
  95861. clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
  95862. }
  95863. }
  95864. const e_ = 4;
  95865. function Hst(t, e) {
  95866. let n = t.getBoundingClientRect();
  95867. return e.clientX >= n.left - e_ && e.clientX <= n.right + e_ && e.clientY >= n.top - e_ && e.clientY <= n.bottom + e_;
  95868. }
  95869. function Gst(t, e, n, r, i, a) {
  95870. let o = t.scrollDOM.getBoundingClientRect(), s = t.documentTop + t.documentPadding.top + t.contentHeight;
  95871. if (o.left > r || o.right < r || o.top > i || Math.min(o.bottom, s) < i)
  95872. return !1;
  95873. let l = t.posAtCoords({ x: r, y: i }, !1);
  95874. return l >= e && l <= n;
  95875. }
  95876. function jst(t, e = {}) {
  95877. let n = dt.define(), r = ur.define({
  95878. create() {
  95879. return [];
  95880. },
  95881. update(i, a) {
  95882. if (i.length && (e.hideOnChange && (a.docChanged || a.selection) ? i = [] : e.hideOn && (i = i.filter((o) => !e.hideOn(a, o))), a.docChanged)) {
  95883. let o = [];
  95884. for (let s of i) {
  95885. let l = a.changes.mapPos(s.pos, -1, yr.TrackDel);
  95886. if (l != null) {
  95887. let u = Object.assign(/* @__PURE__ */ Object.create(null), s);
  95888. u.pos = l, u.end != null && (u.end = a.changes.mapPos(u.end)), o.push(u);
  95889. }
  95890. }
  95891. i = o;
  95892. }
  95893. for (let o of a.effects)
  95894. o.is(n) && (i = o.value), o.is(Zst) && (i = []);
  95895. return i;
  95896. },
  95897. provide: (i) => oS.from(i)
  95898. });
  95899. return [
  95900. r,
  95901. kn.define((i) => new Qst(
  95902. i,
  95903. t,
  95904. r,
  95905. n,
  95906. e.hoverTime || 300
  95907. /* Hover.Time */
  95908. )),
  95909. Wst
  95910. ];
  95911. }
  95912. function woe(t, e) {
  95913. let n = t.plugin(l4);
  95914. if (!n)
  95915. return null;
  95916. let r = n.manager.tooltips.indexOf(e);
  95917. return r < 0 ? null : n.manager.tooltipViews[r];
  95918. }
  95919. const Zst = /* @__PURE__ */ dt.define(), mG = /* @__PURE__ */ Be.define({
  95920. combine(t) {
  95921. let e, n;
  95922. for (let r of t)
  95923. e = e || r.topContainer, n = n || r.bottomContainer;
  95924. return { topContainer: e, bottomContainer: n };
  95925. }
  95926. });
  95927. function qm(t, e) {
  95928. let n = t.plugin(Coe), r = n ? n.specs.indexOf(e) : -1;
  95929. return r > -1 ? n.panels[r] : null;
  95930. }
  95931. const Coe = /* @__PURE__ */ kn.fromClass(class {
  95932. constructor(t) {
  95933. this.input = t.state.facet(Km), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
  95934. let e = t.state.facet(mG);
  95935. this.top = new t_(t, !0, e.topContainer), this.bottom = new t_(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
  95936. for (let n of this.panels)
  95937. n.dom.classList.add("cm-panel"), n.mount && n.mount();
  95938. }
  95939. update(t) {
  95940. let e = t.state.facet(mG);
  95941. this.top.container != e.topContainer && (this.top.sync([]), this.top = new t_(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new t_(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
  95942. let n = t.state.facet(Km);
  95943. if (n != this.input) {
  95944. let r = n.filter((l) => l), i = [], a = [], o = [], s = [];
  95945. for (let l of r) {
  95946. let u = this.specs.indexOf(l), c;
  95947. 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);
  95948. }
  95949. this.specs = r, this.panels = i, this.top.sync(a), this.bottom.sync(o);
  95950. for (let l of s)
  95951. l.dom.classList.add("cm-panel"), l.mount && l.mount();
  95952. } else
  95953. for (let r of this.panels)
  95954. r.update && r.update(t);
  95955. }
  95956. destroy() {
  95957. this.top.sync([]), this.bottom.sync([]);
  95958. }
  95959. }, {
  95960. provide: (t) => De.scrollMargins.of((e) => {
  95961. let n = e.plugin(t);
  95962. return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
  95963. })
  95964. });
  95965. class t_ {
  95966. constructor(e, n, r) {
  95967. this.view = e, this.top = n, this.container = r, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
  95968. }
  95969. sync(e) {
  95970. for (let n of this.panels)
  95971. n.destroy && e.indexOf(n) < 0 && n.destroy();
  95972. this.panels = e, this.syncDOM();
  95973. }
  95974. syncDOM() {
  95975. if (this.panels.length == 0) {
  95976. this.dom && (this.dom.remove(), this.dom = void 0);
  95977. return;
  95978. }
  95979. if (!this.dom) {
  95980. 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";
  95981. let n = this.container || this.view.dom;
  95982. n.insertBefore(this.dom, this.top ? n.firstChild : null);
  95983. }
  95984. let e = this.dom.firstChild;
  95985. for (let n of this.panels)
  95986. if (n.dom.parentNode == this.dom) {
  95987. for (; e != n.dom; )
  95988. e = yG(e);
  95989. e = e.nextSibling;
  95990. } else
  95991. this.dom.insertBefore(n.dom, e);
  95992. for (; e; )
  95993. e = yG(e);
  95994. }
  95995. scrollMargin() {
  95996. 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);
  95997. }
  95998. syncClasses() {
  95999. if (!(!this.container || this.classes == this.view.themeClasses)) {
  96000. for (let e of this.classes.split(" "))
  96001. e && this.container.classList.remove(e);
  96002. for (let e of (this.classes = this.view.themeClasses).split(" "))
  96003. e && this.container.classList.add(e);
  96004. }
  96005. }
  96006. }
  96007. function yG(t) {
  96008. let e = t.nextSibling;
  96009. return t.remove(), e;
  96010. }
  96011. const Km = /* @__PURE__ */ Be.define({
  96012. enables: Coe
  96013. });
  96014. class tl extends wf {
  96015. /**
  96016. @internal
  96017. */
  96018. compare(e) {
  96019. return this == e || this.constructor == e.constructor && this.eq(e);
  96020. }
  96021. /**
  96022. Compare this marker to another marker of the same type.
  96023. */
  96024. eq(e) {
  96025. return !1;
  96026. }
  96027. /**
  96028. Called if the marker has a `toDOM` method and its representation
  96029. was removed from a gutter.
  96030. */
  96031. destroy(e) {
  96032. }
  96033. }
  96034. tl.prototype.elementClass = "";
  96035. tl.prototype.toDOM = void 0;
  96036. tl.prototype.mapMode = yr.TrackBefore;
  96037. tl.prototype.startSide = tl.prototype.endSide = -1;
  96038. tl.prototype.point = !0;
  96039. const u1 = /* @__PURE__ */ Be.define(), Ust = {
  96040. class: "",
  96041. renderEmptyElements: !1,
  96042. elementStyle: "",
  96043. markers: () => Vt.empty,
  96044. lineMarker: () => null,
  96045. widgetMarker: () => null,
  96046. lineMarkerChange: null,
  96047. initialSpacer: null,
  96048. updateSpacer: null,
  96049. domEventHandlers: {}
  96050. }, Hg = /* @__PURE__ */ Be.define();
  96051. function Xst(t) {
  96052. return [Toe(), Hg.of(Object.assign(Object.assign({}, Ust), t))];
  96053. }
  96054. const bG = /* @__PURE__ */ Be.define({
  96055. combine: (t) => t.some((e) => e)
  96056. });
  96057. function Toe(t) {
  96058. return [
  96059. Yst
  96060. ];
  96061. }
  96062. const Yst = /* @__PURE__ */ kn.fromClass(class {
  96063. constructor(t) {
  96064. 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(Hg).map((e) => new OG(t, e));
  96065. for (let e of this.gutters)
  96066. this.dom.appendChild(e.dom);
  96067. this.fixed = !t.state.facet(bG), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
  96068. }
  96069. update(t) {
  96070. if (this.updateGutters(t)) {
  96071. let e = this.prevViewport, n = t.view.viewport, r = Math.min(e.to, n.to) - Math.max(e.from, n.from);
  96072. this.syncGutters(r < (n.to - n.from) * 0.8);
  96073. }
  96074. t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(bG) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
  96075. }
  96076. syncGutters(t) {
  96077. let e = this.dom.nextSibling;
  96078. t && this.dom.remove();
  96079. let n = Vt.iter(this.view.state.facet(u1), this.view.viewport.from), r = [], i = this.gutters.map((a) => new qst(a, this.view.viewport, -this.view.documentPadding.top));
  96080. for (let a of this.view.viewportLineBlocks)
  96081. if (r.length && (r = []), Array.isArray(a.type)) {
  96082. let o = !0;
  96083. for (let s of a.type)
  96084. if (s.type == Jr.Text && o) {
  96085. LM(n, r, s.from);
  96086. for (let l of i)
  96087. l.line(this.view, s, r);
  96088. o = !1;
  96089. } else if (s.widget)
  96090. for (let l of i)
  96091. l.widget(this.view, s);
  96092. } else if (a.type == Jr.Text) {
  96093. LM(n, r, a.from);
  96094. for (let o of i)
  96095. o.line(this.view, a, r);
  96096. } else if (a.widget)
  96097. for (let o of i)
  96098. o.widget(this.view, a);
  96099. for (let a of i)
  96100. a.finish();
  96101. t && this.view.scrollDOM.insertBefore(this.dom, e);
  96102. }
  96103. updateGutters(t) {
  96104. let e = t.startState.facet(Hg), n = t.state.facet(Hg), r = t.docChanged || t.heightChanged || t.viewportChanged || !Vt.eq(t.startState.facet(u1), t.state.facet(u1), t.view.viewport.from, t.view.viewport.to);
  96105. if (e == n)
  96106. for (let i of this.gutters)
  96107. i.update(t) && (r = !0);
  96108. else {
  96109. r = !0;
  96110. let i = [];
  96111. for (let a of n) {
  96112. let o = e.indexOf(a);
  96113. o < 0 ? i.push(new OG(this.view, a)) : (this.gutters[o].update(t), i.push(this.gutters[o]));
  96114. }
  96115. for (let a of this.gutters)
  96116. a.dom.remove(), i.indexOf(a) < 0 && a.destroy();
  96117. for (let a of i)
  96118. this.dom.appendChild(a.dom);
  96119. this.gutters = i;
  96120. }
  96121. return r;
  96122. }
  96123. destroy() {
  96124. for (let t of this.gutters)
  96125. t.destroy();
  96126. this.dom.remove();
  96127. }
  96128. }, {
  96129. provide: (t) => De.scrollMargins.of((e) => {
  96130. let n = e.plugin(t);
  96131. 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 };
  96132. })
  96133. });
  96134. function _G(t) {
  96135. return Array.isArray(t) ? t : [t];
  96136. }
  96137. function LM(t, e, n) {
  96138. for (; t.value && t.from <= n; )
  96139. t.from == n && e.push(t.value), t.next();
  96140. }
  96141. class qst {
  96142. constructor(e, n, r) {
  96143. this.gutter = e, this.height = r, this.i = 0, this.cursor = Vt.iter(e.markers, n.from);
  96144. }
  96145. addElement(e, n, r) {
  96146. let { gutter: i } = this, a = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
  96147. if (this.i == i.elements.length) {
  96148. let s = new Poe(e, o, a, r);
  96149. i.elements.push(s), i.dom.appendChild(s.dom);
  96150. } else
  96151. i.elements[this.i].update(e, o, a, r);
  96152. this.height = n.bottom, this.i++;
  96153. }
  96154. line(e, n, r) {
  96155. let i = [];
  96156. LM(this.cursor, i, n.from), r.length && (i = i.concat(r));
  96157. let a = this.gutter.config.lineMarker(e, n, i);
  96158. a && i.unshift(a);
  96159. let o = this.gutter;
  96160. i.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, i);
  96161. }
  96162. widget(e, n) {
  96163. let r = this.gutter.config.widgetMarker(e, n.widget, n);
  96164. r && this.addElement(e, n, [r]);
  96165. }
  96166. finish() {
  96167. let e = this.gutter;
  96168. for (; e.elements.length > this.i; ) {
  96169. let n = e.elements.pop();
  96170. e.dom.removeChild(n.dom), n.destroy();
  96171. }
  96172. }
  96173. }
  96174. class OG {
  96175. constructor(e, n) {
  96176. 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 : "");
  96177. for (let r in n.domEventHandlers)
  96178. this.dom.addEventListener(r, (i) => {
  96179. let a = i.target, o;
  96180. if (a != this.dom && this.dom.contains(a)) {
  96181. for (; a.parentNode != this.dom; )
  96182. a = a.parentNode;
  96183. let l = a.getBoundingClientRect();
  96184. o = (l.top + l.bottom) / 2;
  96185. } else
  96186. o = i.clientY;
  96187. let s = e.lineBlockAtHeight(o - e.documentTop);
  96188. n.domEventHandlers[r](e, s, i) && i.preventDefault();
  96189. });
  96190. this.markers = _G(n.markers(e)), n.initialSpacer && (this.spacer = new Poe(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
  96191. }
  96192. update(e) {
  96193. let n = this.markers;
  96194. if (this.markers = _G(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
  96195. let i = this.config.updateSpacer(this.spacer.markers[0], e);
  96196. i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]);
  96197. }
  96198. let r = e.view.viewport;
  96199. return !Vt.eq(this.markers, n, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
  96200. }
  96201. destroy() {
  96202. for (let e of this.elements)
  96203. e.destroy();
  96204. }
  96205. }
  96206. class Poe {
  96207. constructor(e, n, r, i) {
  96208. this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, r, i);
  96209. }
  96210. update(e, n, r, i) {
  96211. this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), Kst(this.markers, i) || this.setMarkers(e, i);
  96212. }
  96213. setMarkers(e, n) {
  96214. let r = "cm-gutterElement", i = this.dom.firstChild;
  96215. for (let a = 0, o = 0; ; ) {
  96216. let s = o, l = a < n.length ? n[a++] : null, u = !1;
  96217. if (l) {
  96218. let c = l.elementClass;
  96219. c && (r += " " + c);
  96220. for (let f = o; f < this.markers.length; f++)
  96221. if (this.markers[f].compare(l)) {
  96222. s = f, u = !0;
  96223. break;
  96224. }
  96225. } else
  96226. s = this.markers.length;
  96227. for (; o < s; ) {
  96228. let c = this.markers[o++];
  96229. if (c.toDOM) {
  96230. c.destroy(i);
  96231. let f = i.nextSibling;
  96232. i.remove(), i = f;
  96233. }
  96234. }
  96235. if (!l)
  96236. break;
  96237. l.toDOM && (u ? i = i.nextSibling : this.dom.insertBefore(l.toDOM(e), i)), u && o++;
  96238. }
  96239. this.dom.className = r, this.markers = n;
  96240. }
  96241. destroy() {
  96242. this.setMarkers(null, []);
  96243. }
  96244. }
  96245. function Kst(t, e) {
  96246. if (t.length != e.length)
  96247. return !1;
  96248. for (let n = 0; n < t.length; n++)
  96249. if (!t[n].compare(e[n]))
  96250. return !1;
  96251. return !0;
  96252. }
  96253. const Jst = /* @__PURE__ */ Be.define(), Qd = /* @__PURE__ */ Be.define({
  96254. combine(t) {
  96255. return fs(t, { formatNumber: String, domEventHandlers: {} }, {
  96256. domEventHandlers(e, n) {
  96257. let r = Object.assign({}, e);
  96258. for (let i in n) {
  96259. let a = r[i], o = n[i];
  96260. r[i] = a ? (s, l, u) => a(s, l, u) || o(s, l, u) : o;
  96261. }
  96262. return r;
  96263. }
  96264. });
  96265. }
  96266. });
  96267. class x$ extends tl {
  96268. constructor(e) {
  96269. super(), this.number = e;
  96270. }
  96271. eq(e) {
  96272. return this.number == e.number;
  96273. }
  96274. toDOM() {
  96275. return document.createTextNode(this.number);
  96276. }
  96277. }
  96278. function w$(t, e) {
  96279. return t.state.facet(Qd).formatNumber(e, t.state);
  96280. }
  96281. const elt = /* @__PURE__ */ Hg.compute([Qd], (t) => ({
  96282. class: "cm-lineNumbers",
  96283. renderEmptyElements: !1,
  96284. markers(e) {
  96285. return e.state.facet(Jst);
  96286. },
  96287. lineMarker(e, n, r) {
  96288. return r.some((i) => i.toDOM) ? null : new x$(w$(e, e.state.doc.lineAt(n.from).number));
  96289. },
  96290. widgetMarker: () => null,
  96291. lineMarkerChange: (e) => e.startState.facet(Qd) != e.state.facet(Qd),
  96292. initialSpacer(e) {
  96293. return new x$(w$(e, SG(e.state.doc.lines)));
  96294. },
  96295. updateSpacer(e, n) {
  96296. let r = w$(n.view, SG(n.view.state.doc.lines));
  96297. return r == e.number ? e : new x$(r);
  96298. },
  96299. domEventHandlers: t.facet(Qd).domEventHandlers
  96300. }));
  96301. function tlt(t = {}) {
  96302. return [
  96303. Qd.of(t),
  96304. Toe(),
  96305. elt
  96306. ];
  96307. }
  96308. function SG(t) {
  96309. let e = 9;
  96310. for (; e < t; )
  96311. e = e * 10 + 9;
  96312. return e;
  96313. }
  96314. const nlt = /* @__PURE__ */ new class extends tl {
  96315. constructor() {
  96316. super(...arguments), this.elementClass = "cm-activeLineGutter";
  96317. }
  96318. }(), rlt = /* @__PURE__ */ u1.compute(["selection"], (t) => {
  96319. let e = [], n = -1;
  96320. for (let r of t.selection.ranges) {
  96321. let i = t.doc.lineAt(r.head).from;
  96322. i > n && (n = i, e.push(nlt.range(i)));
  96323. }
  96324. return Vt.of(e);
  96325. });
  96326. function ilt() {
  96327. return rlt;
  96328. }
  96329. const $oe = 1024;
  96330. let alt = 0;
  96331. class C$ {
  96332. constructor(e, n) {
  96333. this.from = e, this.to = n;
  96334. }
  96335. }
  96336. class Pt {
  96337. /**
  96338. Create a new node prop type.
  96339. */
  96340. constructor(e = {}) {
  96341. this.id = alt++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
  96342. throw new Error("This node type doesn't define a deserialize function");
  96343. });
  96344. }
  96345. /**
  96346. This is meant to be used with
  96347. [`NodeSet.extend`](#common.NodeSet.extend) or
  96348. [`LRParser.configure`](#lr.ParserConfig.props) to compute
  96349. prop values for each node type in the set. Takes a [match
  96350. object](#common.NodeType^match) or function that returns undefined
  96351. if the node type doesn't get this prop, and the prop's value if
  96352. it does.
  96353. */
  96354. add(e) {
  96355. if (this.perNode)
  96356. throw new RangeError("Can't add per-node props to node types");
  96357. return typeof e != "function" && (e = Ci.match(e)), (n) => {
  96358. let r = e(n);
  96359. return r === void 0 ? null : [this, r];
  96360. };
  96361. }
  96362. }
  96363. Pt.closedBy = new Pt({ deserialize: (t) => t.split(" ") });
  96364. Pt.openedBy = new Pt({ deserialize: (t) => t.split(" ") });
  96365. Pt.group = new Pt({ deserialize: (t) => t.split(" ") });
  96366. Pt.isolate = new Pt({ deserialize: (t) => {
  96367. if (t && t != "rtl" && t != "ltr" && t != "auto")
  96368. throw new RangeError("Invalid value for isolate: " + t);
  96369. return t || "auto";
  96370. } });
  96371. Pt.contextHash = new Pt({ perNode: !0 });
  96372. Pt.lookAhead = new Pt({ perNode: !0 });
  96373. Pt.mounted = new Pt({ perNode: !0 });
  96374. class sS {
  96375. constructor(e, n, r) {
  96376. this.tree = e, this.overlay = n, this.parser = r;
  96377. }
  96378. /**
  96379. @internal
  96380. */
  96381. static get(e) {
  96382. return e && e.props && e.props[Pt.mounted.id];
  96383. }
  96384. }
  96385. const olt = /* @__PURE__ */ Object.create(null);
  96386. class Ci {
  96387. /**
  96388. @internal
  96389. */
  96390. constructor(e, n, r, i = 0) {
  96391. this.name = e, this.props = n, this.id = r, this.flags = i;
  96392. }
  96393. /**
  96394. Define a node type.
  96395. */
  96396. static define(e) {
  96397. let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : olt, r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Ci(e.name || "", n, e.id, r);
  96398. if (e.props) {
  96399. for (let a of e.props)
  96400. if (Array.isArray(a) || (a = a(i)), a) {
  96401. if (a[0].perNode)
  96402. throw new RangeError("Can't store a per-node prop on a node type");
  96403. n[a[0].id] = a[1];
  96404. }
  96405. }
  96406. return i;
  96407. }
  96408. /**
  96409. Retrieves a node prop for this type. Will return `undefined` if
  96410. the prop isn't present on this node.
  96411. */
  96412. prop(e) {
  96413. return this.props[e.id];
  96414. }
  96415. /**
  96416. True when this is the top node of a grammar.
  96417. */
  96418. get isTop() {
  96419. return (this.flags & 1) > 0;
  96420. }
  96421. /**
  96422. True when this node is produced by a skip rule.
  96423. */
  96424. get isSkipped() {
  96425. return (this.flags & 2) > 0;
  96426. }
  96427. /**
  96428. Indicates whether this is an error node.
  96429. */
  96430. get isError() {
  96431. return (this.flags & 4) > 0;
  96432. }
  96433. /**
  96434. When true, this node type doesn't correspond to a user-declared
  96435. named node, for example because it is used to cache repetition.
  96436. */
  96437. get isAnonymous() {
  96438. return (this.flags & 8) > 0;
  96439. }
  96440. /**
  96441. Returns true when this node's name or one of its
  96442. [groups](#common.NodeProp^group) matches the given string.
  96443. */
  96444. is(e) {
  96445. if (typeof e == "string") {
  96446. if (this.name == e)
  96447. return !0;
  96448. let n = this.prop(Pt.group);
  96449. return n ? n.indexOf(e) > -1 : !1;
  96450. }
  96451. return this.id == e;
  96452. }
  96453. /**
  96454. Create a function from node types to arbitrary values by
  96455. specifying an object whose property names are node or
  96456. [group](#common.NodeProp^group) names. Often useful with
  96457. [`NodeProp.add`](#common.NodeProp.add). You can put multiple
  96458. names, separated by spaces, in a single property name to map
  96459. multiple node names to a single value.
  96460. */
  96461. static match(e) {
  96462. let n = /* @__PURE__ */ Object.create(null);
  96463. for (let r in e)
  96464. for (let i of r.split(" "))
  96465. n[i] = e[r];
  96466. return (r) => {
  96467. for (let i = r.prop(Pt.group), a = -1; a < (i ? i.length : 0); a++) {
  96468. let o = n[a < 0 ? r.name : i[a]];
  96469. if (o)
  96470. return o;
  96471. }
  96472. };
  96473. }
  96474. }
  96475. Ci.none = new Ci(
  96476. "",
  96477. /* @__PURE__ */ Object.create(null),
  96478. 0,
  96479. 8
  96480. /* NodeFlag.Anonymous */
  96481. );
  96482. class c4 {
  96483. /**
  96484. Create a set with the given types. The `id` property of each
  96485. type should correspond to its position within the array.
  96486. */
  96487. constructor(e) {
  96488. this.types = e;
  96489. for (let n = 0; n < e.length; n++)
  96490. if (e[n].id != n)
  96491. throw new RangeError("Node type ids should correspond to array positions when creating a node set");
  96492. }
  96493. /**
  96494. Create a copy of this set with some node properties added. The
  96495. arguments to this method can be created with
  96496. [`NodeProp.add`](#common.NodeProp.add).
  96497. */
  96498. extend(...e) {
  96499. let n = [];
  96500. for (let r of this.types) {
  96501. let i = null;
  96502. for (let a of e) {
  96503. let o = a(r);
  96504. o && (i || (i = Object.assign({}, r.props)), i[o[0].id] = o[1]);
  96505. }
  96506. n.push(i ? new Ci(r.name, i, r.id, r.flags) : r);
  96507. }
  96508. return new c4(n);
  96509. }
  96510. }
  96511. const n_ = /* @__PURE__ */ new WeakMap(), xG = /* @__PURE__ */ new WeakMap();
  96512. var Zn;
  96513. (function(t) {
  96514. t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
  96515. })(Zn || (Zn = {}));
  96516. class Wn {
  96517. /**
  96518. Construct a new tree. See also [`Tree.build`](#common.Tree^build).
  96519. */
  96520. constructor(e, n, r, i, a) {
  96521. if (this.type = e, this.children = n, this.positions = r, this.length = i, this.props = null, a && a.length) {
  96522. this.props = /* @__PURE__ */ Object.create(null);
  96523. for (let [o, s] of a)
  96524. this.props[typeof o == "number" ? o : o.id] = s;
  96525. }
  96526. }
  96527. /**
  96528. @internal
  96529. */
  96530. toString() {
  96531. let e = sS.get(this);
  96532. if (e && !e.overlay)
  96533. return e.tree.toString();
  96534. let n = "";
  96535. for (let r of this.children) {
  96536. let i = r.toString();
  96537. i && (n && (n += ","), n += i);
  96538. }
  96539. return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
  96540. }
  96541. /**
  96542. Get a [tree cursor](#common.TreeCursor) positioned at the top of
  96543. the tree. Mode can be used to [control](#common.IterMode) which
  96544. nodes the cursor visits.
  96545. */
  96546. cursor(e = 0) {
  96547. return new BM(this.topNode, e);
  96548. }
  96549. /**
  96550. Get a [tree cursor](#common.TreeCursor) pointing into this tree
  96551. at the given position and side (see
  96552. [`moveTo`](#common.TreeCursor.moveTo).
  96553. */
  96554. cursorAt(e, n = 0, r = 0) {
  96555. let i = n_.get(this) || this.topNode, a = new BM(i);
  96556. return a.moveTo(e, n), n_.set(this, a._tree), a;
  96557. }
  96558. /**
  96559. Get a [syntax node](#common.SyntaxNode) object for the top of the
  96560. tree.
  96561. */
  96562. get topNode() {
  96563. return new xi(this, 0, 0, null);
  96564. }
  96565. /**
  96566. Get the [syntax node](#common.SyntaxNode) at the given position.
  96567. If `side` is -1, this will move into nodes that end at the
  96568. position. If 1, it'll move into nodes that start at the
  96569. position. With 0, it'll only enter nodes that cover the position
  96570. from both sides.
  96571. Note that this will not enter
  96572. [overlays](#common.MountedTree.overlay), and you often want
  96573. [`resolveInner`](#common.Tree.resolveInner) instead.
  96574. */
  96575. resolve(e, n = 0) {
  96576. let r = Jm(n_.get(this) || this.topNode, e, n, !1);
  96577. return n_.set(this, r), r;
  96578. }
  96579. /**
  96580. Like [`resolve`](#common.Tree.resolve), but will enter
  96581. [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
  96582. pointing into the innermost overlaid tree at the given position
  96583. (with parent links going through all parent structure, including
  96584. the host trees).
  96585. */
  96586. resolveInner(e, n = 0) {
  96587. let r = Jm(xG.get(this) || this.topNode, e, n, !0);
  96588. return xG.set(this, r), r;
  96589. }
  96590. /**
  96591. In some situations, it can be useful to iterate through all
  96592. nodes around a position, including those in overlays that don't
  96593. directly cover the position. This method gives you an iterator
  96594. that will produce all nodes, from small to big, around the given
  96595. position.
  96596. */
  96597. resolveStack(e, n = 0) {
  96598. return ult(this, e, n);
  96599. }
  96600. /**
  96601. Iterate over the tree and its children, calling `enter` for any
  96602. node that touches the `from`/`to` region (if given) before
  96603. running over such a node's children, and `leave` (if given) when
  96604. leaving the node. When `enter` returns `false`, that node will
  96605. not have its children iterated over (or `leave` called).
  96606. */
  96607. iterate(e) {
  96608. let { enter: n, leave: r, from: i = 0, to: a = this.length } = e, o = e.mode || 0, s = (o & Zn.IncludeAnonymous) > 0;
  96609. for (let l = this.cursor(o | Zn.IncludeAnonymous); ; ) {
  96610. let u = !1;
  96611. if (l.from <= a && l.to >= i && (!s && l.type.isAnonymous || n(l) !== !1)) {
  96612. if (l.firstChild())
  96613. continue;
  96614. u = !0;
  96615. }
  96616. for (; u && r && (s || !l.type.isAnonymous) && r(l), !l.nextSibling(); ) {
  96617. if (!l.parent())
  96618. return;
  96619. u = !0;
  96620. }
  96621. }
  96622. }
  96623. /**
  96624. Get the value of the given [node prop](#common.NodeProp) for this
  96625. node. Works with both per-node and per-type props.
  96626. */
  96627. prop(e) {
  96628. return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
  96629. }
  96630. /**
  96631. Returns the node's [per-node props](#common.NodeProp.perNode) in a
  96632. format that can be passed to the [`Tree`](#common.Tree)
  96633. constructor.
  96634. */
  96635. get propValues() {
  96636. let e = [];
  96637. if (this.props)
  96638. for (let n in this.props)
  96639. e.push([+n, this.props[n]]);
  96640. return e;
  96641. }
  96642. /**
  96643. Balance the direct children of this tree, producing a copy of
  96644. which may have children grouped into subtrees with type
  96645. [`NodeType.none`](#common.NodeType^none).
  96646. */
  96647. balance(e = {}) {
  96648. return this.children.length <= 8 ? this : h4(Ci.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(Ci.none, n, r, i)));
  96649. }
  96650. /**
  96651. Build a tree from a postfix-ordered buffer of node information,
  96652. or a cursor over such a buffer.
  96653. */
  96654. static build(e) {
  96655. return clt(e);
  96656. }
  96657. }
  96658. Wn.empty = new Wn(Ci.none, [], [], 0);
  96659. class f4 {
  96660. constructor(e, n) {
  96661. this.buffer = e, this.index = n;
  96662. }
  96663. get id() {
  96664. return this.buffer[this.index - 4];
  96665. }
  96666. get start() {
  96667. return this.buffer[this.index - 3];
  96668. }
  96669. get end() {
  96670. return this.buffer[this.index - 2];
  96671. }
  96672. get size() {
  96673. return this.buffer[this.index - 1];
  96674. }
  96675. get pos() {
  96676. return this.index;
  96677. }
  96678. next() {
  96679. this.index -= 4;
  96680. }
  96681. fork() {
  96682. return new f4(this.buffer, this.index);
  96683. }
  96684. }
  96685. class mu {
  96686. /**
  96687. Create a tree buffer.
  96688. */
  96689. constructor(e, n, r) {
  96690. this.buffer = e, this.length = n, this.set = r;
  96691. }
  96692. /**
  96693. @internal
  96694. */
  96695. get type() {
  96696. return Ci.none;
  96697. }
  96698. /**
  96699. @internal
  96700. */
  96701. toString() {
  96702. let e = [];
  96703. for (let n = 0; n < this.buffer.length; )
  96704. e.push(this.childString(n)), n = this.buffer[n + 3];
  96705. return e.join(",");
  96706. }
  96707. /**
  96708. @internal
  96709. */
  96710. childString(e) {
  96711. let n = this.buffer[e], r = this.buffer[e + 3], i = this.set.types[n], a = i.name;
  96712. if (/\W/.test(a) && !i.isError && (a = JSON.stringify(a)), e += 4, r == e)
  96713. return a;
  96714. let o = [];
  96715. for (; e < r; )
  96716. o.push(this.childString(e)), e = this.buffer[e + 3];
  96717. return a + "(" + o.join(",") + ")";
  96718. }
  96719. /**
  96720. @internal
  96721. */
  96722. findChild(e, n, r, i, a) {
  96723. let { buffer: o } = this, s = -1;
  96724. for (let l = e; l != n && !(Aoe(a, i, o[l + 1], o[l + 2]) && (s = l, r > 0)); l = o[l + 3])
  96725. ;
  96726. return s;
  96727. }
  96728. /**
  96729. @internal
  96730. */
  96731. slice(e, n, r) {
  96732. let i = this.buffer, a = new Uint16Array(n - e), o = 0;
  96733. for (let s = e, l = 0; s < n; ) {
  96734. a[l++] = i[s++], a[l++] = i[s++] - r;
  96735. let u = a[l++] = i[s++] - r;
  96736. a[l++] = i[s++] - e, o = Math.max(o, u);
  96737. }
  96738. return new mu(a, o, this.set);
  96739. }
  96740. }
  96741. function Aoe(t, e, n, r) {
  96742. switch (t) {
  96743. case -2:
  96744. return n < e;
  96745. case -1:
  96746. return r >= e && n < e;
  96747. case 0:
  96748. return n < e && r > e;
  96749. case 1:
  96750. return n <= e && r > e;
  96751. case 2:
  96752. return r > e;
  96753. case 4:
  96754. return !0;
  96755. }
  96756. }
  96757. function Jm(t, e, n, r) {
  96758. for (var i; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
  96759. let o = !r && t instanceof xi && t.index < 0 ? null : t.parent;
  96760. if (!o)
  96761. return t;
  96762. t = o;
  96763. }
  96764. let a = r ? 0 : Zn.IgnoreOverlays;
  96765. if (r)
  96766. for (let o = t, s = o.parent; s; o = s, s = o.parent)
  96767. o instanceof xi && o.index < 0 && ((i = s.enter(e, n, a)) === null || i === void 0 ? void 0 : i.from) != o.from && (t = s);
  96768. for (; ; ) {
  96769. let o = t.enter(e, n, a);
  96770. if (!o)
  96771. return t;
  96772. t = o;
  96773. }
  96774. }
  96775. class Eoe {
  96776. cursor(e = 0) {
  96777. return new BM(this, e);
  96778. }
  96779. getChild(e, n = null, r = null) {
  96780. let i = wG(this, e, n, r);
  96781. return i.length ? i[0] : null;
  96782. }
  96783. getChildren(e, n = null, r = null) {
  96784. return wG(this, e, n, r);
  96785. }
  96786. resolve(e, n = 0) {
  96787. return Jm(this, e, n, !1);
  96788. }
  96789. resolveInner(e, n = 0) {
  96790. return Jm(this, e, n, !0);
  96791. }
  96792. matchContext(e) {
  96793. return NM(this, e);
  96794. }
  96795. enterUnfinishedNodesBefore(e) {
  96796. let n = this.childBefore(e), r = this;
  96797. for (; n; ) {
  96798. let i = n.lastChild;
  96799. if (!i || i.to != n.to)
  96800. break;
  96801. i.type.isError && i.from == i.to ? (r = n, n = i.prevSibling) : n = i;
  96802. }
  96803. return r;
  96804. }
  96805. get node() {
  96806. return this;
  96807. }
  96808. get next() {
  96809. return this.parent;
  96810. }
  96811. }
  96812. class xi extends Eoe {
  96813. constructor(e, n, r, i) {
  96814. super(), this._tree = e, this.from = n, this.index = r, this._parent = i;
  96815. }
  96816. get type() {
  96817. return this._tree.type;
  96818. }
  96819. get name() {
  96820. return this._tree.type.name;
  96821. }
  96822. get to() {
  96823. return this.from + this._tree.length;
  96824. }
  96825. nextChild(e, n, r, i, a = 0) {
  96826. for (let o = this; ; ) {
  96827. for (let { children: s, positions: l } = o._tree, u = n > 0 ? s.length : -1; e != u; e += n) {
  96828. let c = s[e], f = l[e] + o.from;
  96829. if (Aoe(i, r, f, f + c.length)) {
  96830. if (c instanceof mu) {
  96831. if (a & Zn.ExcludeBuffers)
  96832. continue;
  96833. let d = c.findChild(0, c.buffer.length, n, r - f, i);
  96834. if (d > -1)
  96835. return new Qo(new slt(o, c, e, f), null, d);
  96836. } else if (a & Zn.IncludeAnonymous || !c.type.isAnonymous || d4(c)) {
  96837. let d;
  96838. if (!(a & Zn.IgnoreMounts) && (d = sS.get(c)) && !d.overlay)
  96839. return new xi(d.tree, f, e, o);
  96840. let h = new xi(c, f, e, o);
  96841. return a & Zn.IncludeAnonymous || !h.type.isAnonymous ? h : h.nextChild(n < 0 ? c.children.length - 1 : 0, n, r, i);
  96842. }
  96843. }
  96844. }
  96845. 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))
  96846. return null;
  96847. }
  96848. }
  96849. get firstChild() {
  96850. return this.nextChild(
  96851. 0,
  96852. 1,
  96853. 0,
  96854. 4
  96855. /* Side.DontCare */
  96856. );
  96857. }
  96858. get lastChild() {
  96859. return this.nextChild(
  96860. this._tree.children.length - 1,
  96861. -1,
  96862. 0,
  96863. 4
  96864. /* Side.DontCare */
  96865. );
  96866. }
  96867. childAfter(e) {
  96868. return this.nextChild(
  96869. 0,
  96870. 1,
  96871. e,
  96872. 2
  96873. /* Side.After */
  96874. );
  96875. }
  96876. childBefore(e) {
  96877. return this.nextChild(
  96878. this._tree.children.length - 1,
  96879. -1,
  96880. e,
  96881. -2
  96882. /* Side.Before */
  96883. );
  96884. }
  96885. enter(e, n, r = 0) {
  96886. let i;
  96887. if (!(r & Zn.IgnoreOverlays) && (i = sS.get(this._tree)) && i.overlay) {
  96888. let a = e - this.from;
  96889. for (let { from: o, to: s } of i.overlay)
  96890. if ((n > 0 ? o <= a : o < a) && (n < 0 ? s >= a : s > a))
  96891. return new xi(i.tree, i.overlay[0].from + this.from, -1, this);
  96892. }
  96893. return this.nextChild(0, 1, e, n, r);
  96894. }
  96895. nextSignificantParent() {
  96896. let e = this;
  96897. for (; e.type.isAnonymous && e._parent; )
  96898. e = e._parent;
  96899. return e;
  96900. }
  96901. get parent() {
  96902. return this._parent ? this._parent.nextSignificantParent() : null;
  96903. }
  96904. get nextSibling() {
  96905. return this._parent && this.index >= 0 ? this._parent.nextChild(
  96906. this.index + 1,
  96907. 1,
  96908. 0,
  96909. 4
  96910. /* Side.DontCare */
  96911. ) : null;
  96912. }
  96913. get prevSibling() {
  96914. return this._parent && this.index >= 0 ? this._parent.nextChild(
  96915. this.index - 1,
  96916. -1,
  96917. 0,
  96918. 4
  96919. /* Side.DontCare */
  96920. ) : null;
  96921. }
  96922. get tree() {
  96923. return this._tree;
  96924. }
  96925. toTree() {
  96926. return this._tree;
  96927. }
  96928. /**
  96929. @internal
  96930. */
  96931. toString() {
  96932. return this._tree.toString();
  96933. }
  96934. }
  96935. function wG(t, e, n, r) {
  96936. let i = t.cursor(), a = [];
  96937. if (!i.firstChild())
  96938. return a;
  96939. if (n != null) {
  96940. for (let o = !1; !o; )
  96941. if (o = i.type.is(n), !i.nextSibling())
  96942. return a;
  96943. }
  96944. for (; ; ) {
  96945. if (r != null && i.type.is(r))
  96946. return a;
  96947. if (i.type.is(e) && a.push(i.node), !i.nextSibling())
  96948. return r == null ? a : [];
  96949. }
  96950. }
  96951. function NM(t, e, n = e.length - 1) {
  96952. for (let r = t.parent; n >= 0; r = r.parent) {
  96953. if (!r)
  96954. return !1;
  96955. if (!r.type.isAnonymous) {
  96956. if (e[n] && e[n] != r.name)
  96957. return !1;
  96958. n--;
  96959. }
  96960. }
  96961. return !0;
  96962. }
  96963. class slt {
  96964. constructor(e, n, r, i) {
  96965. this.parent = e, this.buffer = n, this.index = r, this.start = i;
  96966. }
  96967. }
  96968. class Qo extends Eoe {
  96969. get name() {
  96970. return this.type.name;
  96971. }
  96972. get from() {
  96973. return this.context.start + this.context.buffer.buffer[this.index + 1];
  96974. }
  96975. get to() {
  96976. return this.context.start + this.context.buffer.buffer[this.index + 2];
  96977. }
  96978. constructor(e, n, r) {
  96979. super(), this.context = e, this._parent = n, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
  96980. }
  96981. child(e, n, r) {
  96982. let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.context.start, r);
  96983. return a < 0 ? null : new Qo(this.context, this, a);
  96984. }
  96985. get firstChild() {
  96986. return this.child(
  96987. 1,
  96988. 0,
  96989. 4
  96990. /* Side.DontCare */
  96991. );
  96992. }
  96993. get lastChild() {
  96994. return this.child(
  96995. -1,
  96996. 0,
  96997. 4
  96998. /* Side.DontCare */
  96999. );
  97000. }
  97001. childAfter(e) {
  97002. return this.child(
  97003. 1,
  97004. e,
  97005. 2
  97006. /* Side.After */
  97007. );
  97008. }
  97009. childBefore(e) {
  97010. return this.child(
  97011. -1,
  97012. e,
  97013. -2
  97014. /* Side.Before */
  97015. );
  97016. }
  97017. enter(e, n, r = 0) {
  97018. if (r & Zn.ExcludeBuffers)
  97019. return null;
  97020. 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);
  97021. return a < 0 ? null : new Qo(this.context, this, a);
  97022. }
  97023. get parent() {
  97024. return this._parent || this.context.parent.nextSignificantParent();
  97025. }
  97026. externalSibling(e) {
  97027. return this._parent ? null : this.context.parent.nextChild(
  97028. this.context.index + e,
  97029. e,
  97030. 0,
  97031. 4
  97032. /* Side.DontCare */
  97033. );
  97034. }
  97035. get nextSibling() {
  97036. let { buffer: e } = this.context, n = e.buffer[this.index + 3];
  97037. return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Qo(this.context, this._parent, n) : this.externalSibling(1);
  97038. }
  97039. get prevSibling() {
  97040. let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
  97041. return this.index == n ? this.externalSibling(-1) : new Qo(this.context, this._parent, e.findChild(
  97042. n,
  97043. this.index,
  97044. -1,
  97045. 0,
  97046. 4
  97047. /* Side.DontCare */
  97048. ));
  97049. }
  97050. get tree() {
  97051. return null;
  97052. }
  97053. toTree() {
  97054. let e = [], n = [], { buffer: r } = this.context, i = this.index + 4, a = r.buffer[this.index + 3];
  97055. if (a > i) {
  97056. let o = r.buffer[this.index + 1];
  97057. e.push(r.slice(i, a, o)), n.push(0);
  97058. }
  97059. return new Wn(this.type, e, n, this.to - this.from);
  97060. }
  97061. /**
  97062. @internal
  97063. */
  97064. toString() {
  97065. return this.context.buffer.childString(this.index);
  97066. }
  97067. }
  97068. function Moe(t) {
  97069. if (!t.length)
  97070. return null;
  97071. let e = 0, n = t[0];
  97072. for (let a = 1; a < t.length; a++) {
  97073. let o = t[a];
  97074. (o.from > n.from || o.to < n.to) && (n = o, e = a);
  97075. }
  97076. let r = n instanceof xi && n.index < 0 ? null : n.parent, i = t.slice();
  97077. return r ? i[e] = r : i.splice(e, 1), new llt(i, n);
  97078. }
  97079. class llt {
  97080. constructor(e, n) {
  97081. this.heads = e, this.node = n;
  97082. }
  97083. get next() {
  97084. return Moe(this.heads);
  97085. }
  97086. }
  97087. function ult(t, e, n) {
  97088. let r = t.resolveInner(e, n), i = null;
  97089. for (let a = r instanceof xi ? r : r.context.parent; a; a = a.parent)
  97090. if (a.index < 0) {
  97091. let o = a.parent;
  97092. (i || (i = [r])).push(o.resolve(e, n)), a = o;
  97093. } else {
  97094. let o = sS.get(a.tree);
  97095. if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
  97096. let s = new xi(o.tree, o.overlay[0].from + a.from, -1, a);
  97097. (i || (i = [r])).push(Jm(s, e, n, !1));
  97098. }
  97099. }
  97100. return i ? Moe(i) : r;
  97101. }
  97102. class BM {
  97103. /**
  97104. Shorthand for `.type.name`.
  97105. */
  97106. get name() {
  97107. return this.type.name;
  97108. }
  97109. /**
  97110. @internal
  97111. */
  97112. constructor(e, n = 0) {
  97113. if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof xi)
  97114. this.yieldNode(e);
  97115. else {
  97116. this._tree = e.context.parent, this.buffer = e.context;
  97117. for (let r = e._parent; r; r = r._parent)
  97118. this.stack.unshift(r.index);
  97119. this.bufferNode = e, this.yieldBuf(e.index);
  97120. }
  97121. }
  97122. yieldNode(e) {
  97123. return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
  97124. }
  97125. yieldBuf(e, n) {
  97126. this.index = e;
  97127. let { start: r, buffer: i } = this.buffer;
  97128. 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;
  97129. }
  97130. /**
  97131. @internal
  97132. */
  97133. yield(e) {
  97134. return e ? e instanceof xi ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
  97135. }
  97136. /**
  97137. @internal
  97138. */
  97139. toString() {
  97140. return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
  97141. }
  97142. /**
  97143. @internal
  97144. */
  97145. enterChild(e, n, r) {
  97146. if (!this.buffer)
  97147. return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, r, this.mode));
  97148. let { buffer: i } = this.buffer, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.buffer.start, r);
  97149. return a < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(a));
  97150. }
  97151. /**
  97152. Move the cursor to this node's first child. When this returns
  97153. false, the node has no child, and the cursor has not been moved.
  97154. */
  97155. firstChild() {
  97156. return this.enterChild(
  97157. 1,
  97158. 0,
  97159. 4
  97160. /* Side.DontCare */
  97161. );
  97162. }
  97163. /**
  97164. Move the cursor to this node's last child.
  97165. */
  97166. lastChild() {
  97167. return this.enterChild(
  97168. -1,
  97169. 0,
  97170. 4
  97171. /* Side.DontCare */
  97172. );
  97173. }
  97174. /**
  97175. Move the cursor to the first child that ends after `pos`.
  97176. */
  97177. childAfter(e) {
  97178. return this.enterChild(
  97179. 1,
  97180. e,
  97181. 2
  97182. /* Side.After */
  97183. );
  97184. }
  97185. /**
  97186. Move to the last child that starts before `pos`.
  97187. */
  97188. childBefore(e) {
  97189. return this.enterChild(
  97190. -1,
  97191. e,
  97192. -2
  97193. /* Side.Before */
  97194. );
  97195. }
  97196. /**
  97197. Move the cursor to the child around `pos`. If side is -1 the
  97198. child may end at that position, when 1 it may start there. This
  97199. will also enter [overlaid](#common.MountedTree.overlay)
  97200. [mounted](#common.NodeProp^mounted) trees unless `overlays` is
  97201. set to false.
  97202. */
  97203. enter(e, n, r = this.mode) {
  97204. return this.buffer ? r & Zn.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, r));
  97205. }
  97206. /**
  97207. Move to the node's parent node, if this isn't the top node.
  97208. */
  97209. parent() {
  97210. if (!this.buffer)
  97211. return this.yieldNode(this.mode & Zn.IncludeAnonymous ? this._tree._parent : this._tree.parent);
  97212. if (this.stack.length)
  97213. return this.yieldBuf(this.stack.pop());
  97214. let e = this.mode & Zn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
  97215. return this.buffer = null, this.yieldNode(e);
  97216. }
  97217. /**
  97218. @internal
  97219. */
  97220. sibling(e) {
  97221. if (!this.buffer)
  97222. 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;
  97223. let { buffer: n } = this.buffer, r = this.stack.length - 1;
  97224. if (e < 0) {
  97225. let i = r < 0 ? 0 : this.stack[r] + 4;
  97226. if (this.index != i)
  97227. return this.yieldBuf(n.findChild(
  97228. i,
  97229. this.index,
  97230. -1,
  97231. 0,
  97232. 4
  97233. /* Side.DontCare */
  97234. ));
  97235. } else {
  97236. let i = n.buffer[this.index + 3];
  97237. if (i < (r < 0 ? n.buffer.length : n.buffer[this.stack[r] + 3]))
  97238. return this.yieldBuf(i);
  97239. }
  97240. return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
  97241. }
  97242. /**
  97243. Move to this node's next sibling, if any.
  97244. */
  97245. nextSibling() {
  97246. return this.sibling(1);
  97247. }
  97248. /**
  97249. Move to this node's previous sibling, if any.
  97250. */
  97251. prevSibling() {
  97252. return this.sibling(-1);
  97253. }
  97254. atLastNode(e) {
  97255. let n, r, { buffer: i } = this;
  97256. if (i) {
  97257. if (e > 0) {
  97258. if (this.index < i.buffer.buffer.length)
  97259. return !1;
  97260. } else
  97261. for (let a = 0; a < this.index; a++)
  97262. if (i.buffer.buffer[a + 3] < this.index)
  97263. return !1;
  97264. ({ index: n, parent: r } = i);
  97265. } else
  97266. ({ index: n, _parent: r } = this._tree);
  97267. for (; r; { index: n, _parent: r } = r)
  97268. if (n > -1)
  97269. for (let a = n + e, o = e < 0 ? -1 : r._tree.children.length; a != o; a += e) {
  97270. let s = r._tree.children[a];
  97271. if (this.mode & Zn.IncludeAnonymous || s instanceof mu || !s.type.isAnonymous || d4(s))
  97272. return !1;
  97273. }
  97274. return !0;
  97275. }
  97276. move(e, n) {
  97277. if (n && this.enterChild(
  97278. e,
  97279. 0,
  97280. 4
  97281. /* Side.DontCare */
  97282. ))
  97283. return !0;
  97284. for (; ; ) {
  97285. if (this.sibling(e))
  97286. return !0;
  97287. if (this.atLastNode(e) || !this.parent())
  97288. return !1;
  97289. }
  97290. }
  97291. /**
  97292. Move to the next node in a
  97293. [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
  97294. traversal, going from a node to its first child or, if the
  97295. current node is empty or `enter` is false, its next sibling or
  97296. the next sibling of the first parent node that has one.
  97297. */
  97298. next(e = !0) {
  97299. return this.move(1, e);
  97300. }
  97301. /**
  97302. Move to the next node in a last-to-first pre-order traveral. A
  97303. node is followed by its last child or, if it has none, its
  97304. previous sibling or the previous sibling of the first parent
  97305. node that has one.
  97306. */
  97307. prev(e = !0) {
  97308. return this.move(-1, e);
  97309. }
  97310. /**
  97311. Move the cursor to the innermost node that covers `pos`. If
  97312. `side` is -1, it will enter nodes that end at `pos`. If it is 1,
  97313. it will enter nodes that start at `pos`.
  97314. */
  97315. moveTo(e, n = 0) {
  97316. for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
  97317. ;
  97318. for (; this.enterChild(1, e, n); )
  97319. ;
  97320. return this;
  97321. }
  97322. /**
  97323. Get a [syntax node](#common.SyntaxNode) at the cursor's current
  97324. position.
  97325. */
  97326. get node() {
  97327. if (!this.buffer)
  97328. return this._tree;
  97329. let e = this.bufferNode, n = null, r = 0;
  97330. if (e && e.context == this.buffer)
  97331. e: for (let i = this.index, a = this.stack.length; a >= 0; ) {
  97332. for (let o = e; o; o = o._parent)
  97333. if (o.index == i) {
  97334. if (i == this.index)
  97335. return o;
  97336. n = o, r = a + 1;
  97337. break e;
  97338. }
  97339. i = this.stack[--a];
  97340. }
  97341. for (let i = r; i < this.stack.length; i++)
  97342. n = new Qo(this.buffer, n, this.stack[i]);
  97343. return this.bufferNode = new Qo(this.buffer, n, this.index);
  97344. }
  97345. /**
  97346. Get the [tree](#common.Tree) that represents the current node, if
  97347. any. Will return null when the node is in a [tree
  97348. buffer](#common.TreeBuffer).
  97349. */
  97350. get tree() {
  97351. return this.buffer ? null : this._tree._tree;
  97352. }
  97353. /**
  97354. Iterate over the current node and all its descendants, calling
  97355. `enter` when entering a node and `leave`, if given, when leaving
  97356. one. When `enter` returns `false`, any children of that node are
  97357. skipped, and `leave` isn't called for it.
  97358. */
  97359. iterate(e, n) {
  97360. for (let r = 0; ; ) {
  97361. let i = !1;
  97362. if (this.type.isAnonymous || e(this) !== !1) {
  97363. if (this.firstChild()) {
  97364. r++;
  97365. continue;
  97366. }
  97367. this.type.isAnonymous || (i = !0);
  97368. }
  97369. for (; i && n && n(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
  97370. if (!r)
  97371. return;
  97372. this.parent(), r--, i = !0;
  97373. }
  97374. }
  97375. }
  97376. /**
  97377. Test whether the current node matches a given context—a sequence
  97378. of direct parent node names. Empty strings in the context array
  97379. are treated as wildcards.
  97380. */
  97381. matchContext(e) {
  97382. if (!this.buffer)
  97383. return NM(this.node, e);
  97384. let { buffer: n } = this.buffer, { types: r } = n.set;
  97385. for (let i = e.length - 1, a = this.stack.length - 1; i >= 0; a--) {
  97386. if (a < 0)
  97387. return NM(this.node, e, i);
  97388. let o = r[n.buffer[this.stack[a]]];
  97389. if (!o.isAnonymous) {
  97390. if (e[i] && e[i] != o.name)
  97391. return !1;
  97392. i--;
  97393. }
  97394. }
  97395. return !0;
  97396. }
  97397. }
  97398. function d4(t) {
  97399. return t.children.some((e) => e instanceof mu || !e.type.isAnonymous || d4(e));
  97400. }
  97401. function clt(t) {
  97402. var e;
  97403. let { buffer: n, nodeSet: r, maxBufferLength: i = $oe, reused: a = [], minRepeatType: o = r.types.length } = t, s = Array.isArray(n) ? new f4(n, n.length) : n, l = r.types, u = 0, c = 0;
  97404. function f(O, S, x, C, T, w) {
  97405. let { id: P, start: $, end: A, size: D } = s, E = c;
  97406. for (; D < 0; )
  97407. if (s.next(), D == -1) {
  97408. let W = a[P];
  97409. x.push(W), C.push($ - O);
  97410. return;
  97411. } else if (D == -3) {
  97412. u = P;
  97413. return;
  97414. } else if (D == -4) {
  97415. c = P;
  97416. return;
  97417. } else
  97418. throw new RangeError(`Unrecognized record size: ${D}`);
  97419. let R = l[P], N, V, z = $ - O;
  97420. if (A - $ <= i && (V = g(s.pos - S, T))) {
  97421. let W = new Uint16Array(V.size - V.skip), F = s.pos - V.size, Q = W.length;
  97422. for (; s.pos > F; )
  97423. Q = m(V.start, W, Q);
  97424. N = new mu(W, A - V.start, r), z = V.start - O;
  97425. } else {
  97426. let W = s.pos - D;
  97427. s.next();
  97428. let F = [], Q = [], Z = P >= o ? P : -1, ne = 0, ee = A;
  97429. for (; s.pos > W; )
  97430. 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);
  97431. if (Z >= 0 && ne > 0 && ne < F.length && p(F, Q, $, ne, $, ee, Z, E), F.reverse(), Q.reverse(), Z > -1 && ne > 0) {
  97432. let oe = h(R);
  97433. N = h4(R, F, Q, 0, F.length, 0, A - $, oe, oe);
  97434. } else
  97435. N = v(R, F, Q, A - $, E - A);
  97436. }
  97437. x.push(N), C.push(z);
  97438. }
  97439. function d(O, S, x, C) {
  97440. let T = [], w = 0, P = -1;
  97441. for (; s.pos > S; ) {
  97442. let { id: $, start: A, end: D, size: E } = s;
  97443. if (E > 4)
  97444. s.next();
  97445. else {
  97446. if (P > -1 && A < P)
  97447. break;
  97448. P < 0 && (P = D - i), T.push($, A, D), w++, s.next();
  97449. }
  97450. }
  97451. if (w) {
  97452. let $ = new Uint16Array(w * 4), A = T[T.length - 2];
  97453. for (let D = T.length - 3, E = 0; D >= 0; D -= 3)
  97454. $[E++] = T[D], $[E++] = T[D + 1] - A, $[E++] = T[D + 2] - A, $[E++] = E;
  97455. x.push(new mu($, T[2] - A, r)), C.push(A - O);
  97456. }
  97457. }
  97458. function h(O) {
  97459. return (S, x, C) => {
  97460. let T = 0, w = S.length - 1, P, $;
  97461. if (w >= 0 && (P = S[w]) instanceof Wn) {
  97462. if (!w && P.type == O && P.length == C)
  97463. return P;
  97464. ($ = P.prop(Pt.lookAhead)) && (T = x[w] + P.length + $);
  97465. }
  97466. return v(O, S, x, C, T);
  97467. };
  97468. }
  97469. function p(O, S, x, C, T, w, P, $) {
  97470. let A = [], D = [];
  97471. for (; O.length > C; )
  97472. A.push(O.pop()), D.push(S.pop() + x - T);
  97473. O.push(v(r.types[P], A, D, w - T, $ - w)), S.push(T - x);
  97474. }
  97475. function v(O, S, x, C, T = 0, w) {
  97476. if (u) {
  97477. let P = [Pt.contextHash, u];
  97478. w = w ? [P].concat(w) : [P];
  97479. }
  97480. if (T > 25) {
  97481. let P = [Pt.lookAhead, T];
  97482. w = w ? [P].concat(w) : [P];
  97483. }
  97484. return new Wn(O, S, x, C, w);
  97485. }
  97486. function g(O, S) {
  97487. let x = s.fork(), C = 0, T = 0, w = 0, P = x.end - i, $ = { size: 0, start: 0, skip: 0 };
  97488. e: for (let A = x.pos - O; x.pos > A; ) {
  97489. let D = x.size;
  97490. if (x.id == S && D >= 0) {
  97491. $.size = C, $.start = T, $.skip = w, w += 4, C += 4, x.next();
  97492. continue;
  97493. }
  97494. let E = x.pos - D;
  97495. if (D < 0 || E < A || x.start < P)
  97496. break;
  97497. let R = x.id >= o ? 4 : 0, N = x.start;
  97498. for (x.next(); x.pos > E; ) {
  97499. if (x.size < 0)
  97500. if (x.size == -3)
  97501. R += 4;
  97502. else
  97503. break e;
  97504. else x.id >= o && (R += 4);
  97505. x.next();
  97506. }
  97507. T = N, C += D, w += R;
  97508. }
  97509. return (S < 0 || C == O) && ($.size = C, $.start = T, $.skip = w), $.size > 4 ? $ : void 0;
  97510. }
  97511. function m(O, S, x) {
  97512. let { id: C, start: T, end: w, size: P } = s;
  97513. if (s.next(), P >= 0 && C < o) {
  97514. let $ = x;
  97515. if (P > 4) {
  97516. let A = s.pos - (P - 4);
  97517. for (; s.pos > A; )
  97518. x = m(O, S, x);
  97519. }
  97520. S[--x] = $, S[--x] = w - O, S[--x] = T - O, S[--x] = C;
  97521. } else P == -3 ? u = C : P == -4 && (c = C);
  97522. return x;
  97523. }
  97524. let y = [], b = [];
  97525. for (; s.pos > 0; )
  97526. f(t.start || 0, t.bufferStart || 0, y, b, -1, 0);
  97527. let _ = (e = t.length) !== null && e !== void 0 ? e : y.length ? b[0] + y[0].length : 0;
  97528. return new Wn(l[t.topID], y.reverse(), b.reverse(), _);
  97529. }
  97530. const CG = /* @__PURE__ */ new WeakMap();
  97531. function c1(t, e) {
  97532. if (!t.isAnonymous || e instanceof mu || e.type != t)
  97533. return 1;
  97534. let n = CG.get(e);
  97535. if (n == null) {
  97536. n = 1;
  97537. for (let r of e.children) {
  97538. if (r.type != t || !(r instanceof Wn)) {
  97539. n = 1;
  97540. break;
  97541. }
  97542. n += c1(t, r);
  97543. }
  97544. CG.set(e, n);
  97545. }
  97546. return n;
  97547. }
  97548. function h4(t, e, n, r, i, a, o, s, l) {
  97549. let u = 0;
  97550. for (let p = r; p < i; p++)
  97551. u += c1(t, e[p]);
  97552. let c = Math.ceil(
  97553. u * 1.5 / 8
  97554. /* Balance.BranchFactor */
  97555. ), f = [], d = [];
  97556. function h(p, v, g, m, y) {
  97557. for (let b = g; b < m; ) {
  97558. let _ = b, O = v[b], S = c1(t, p[b]);
  97559. for (b++; b < m; b++) {
  97560. let x = c1(t, p[b]);
  97561. if (S + x >= c)
  97562. break;
  97563. S += x;
  97564. }
  97565. if (b == _ + 1) {
  97566. if (S > c) {
  97567. let x = p[_];
  97568. h(x.children, x.positions, 0, x.children.length, v[_] + y);
  97569. continue;
  97570. }
  97571. f.push(p[_]);
  97572. } else {
  97573. let x = v[b - 1] + p[b - 1].length - O;
  97574. f.push(h4(t, p, v, _, b, O, x, null, l));
  97575. }
  97576. d.push(O + y - a);
  97577. }
  97578. }
  97579. return h(e, n, r, i, 0), (s || l)(f, d, o);
  97580. }
  97581. class flt {
  97582. constructor() {
  97583. this.map = /* @__PURE__ */ new WeakMap();
  97584. }
  97585. setBuffer(e, n, r) {
  97586. let i = this.map.get(e);
  97587. i || this.map.set(e, i = /* @__PURE__ */ new Map()), i.set(n, r);
  97588. }
  97589. getBuffer(e, n) {
  97590. let r = this.map.get(e);
  97591. return r && r.get(n);
  97592. }
  97593. /**
  97594. Set the value for this syntax node.
  97595. */
  97596. set(e, n) {
  97597. e instanceof Qo ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof xi && this.map.set(e.tree, n);
  97598. }
  97599. /**
  97600. Retrieve value for this syntax node, if it exists in the map.
  97601. */
  97602. get(e) {
  97603. return e instanceof Qo ? this.getBuffer(e.context.buffer, e.index) : e instanceof xi ? this.map.get(e.tree) : void 0;
  97604. }
  97605. /**
  97606. Set the value for the node that a cursor currently points to.
  97607. */
  97608. cursorSet(e, n) {
  97609. e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
  97610. }
  97611. /**
  97612. Retrieve the value for the node that a cursor currently points
  97613. to.
  97614. */
  97615. cursorGet(e) {
  97616. return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
  97617. }
  97618. }
  97619. class af {
  97620. /**
  97621. Construct a tree fragment. You'll usually want to use
  97622. [`addTree`](#common.TreeFragment^addTree) and
  97623. [`applyChanges`](#common.TreeFragment^applyChanges) instead of
  97624. calling this directly.
  97625. */
  97626. constructor(e, n, r, i, a = !1, o = !1) {
  97627. this.from = e, this.to = n, this.tree = r, this.offset = i, this.open = (a ? 1 : 0) | (o ? 2 : 0);
  97628. }
  97629. /**
  97630. Whether the start of the fragment represents the start of a
  97631. parse, or the end of a change. (In the second case, it may not
  97632. be safe to reuse some nodes at the start, depending on the
  97633. parsing algorithm.)
  97634. */
  97635. get openStart() {
  97636. return (this.open & 1) > 0;
  97637. }
  97638. /**
  97639. Whether the end of the fragment represents the end of a
  97640. full-document parse, or the start of a change.
  97641. */
  97642. get openEnd() {
  97643. return (this.open & 2) > 0;
  97644. }
  97645. /**
  97646. Create a set of fragments from a freshly parsed tree, or update
  97647. an existing set of fragments by replacing the ones that overlap
  97648. with a tree with content from the new tree. When `partial` is
  97649. true, the parse is treated as incomplete, and the resulting
  97650. fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
  97651. true.
  97652. */
  97653. static addTree(e, n = [], r = !1) {
  97654. let i = [new af(0, e.length, e, 0, !1, r)];
  97655. for (let a of n)
  97656. a.to > e.length && i.push(a);
  97657. return i;
  97658. }
  97659. /**
  97660. Apply a set of edits to an array of fragments, removing or
  97661. splitting fragments as necessary to remove edited ranges, and
  97662. adjusting offsets for fragments that moved.
  97663. */
  97664. static applyChanges(e, n, r = 128) {
  97665. if (!n.length)
  97666. return e;
  97667. let i = [], a = 1, o = e.length ? e[0] : null;
  97668. for (let s = 0, l = 0, u = 0; ; s++) {
  97669. let c = s < n.length ? n[s] : null, f = c ? c.fromA : 1e9;
  97670. if (f - l >= r)
  97671. for (; o && o.from < f; ) {
  97672. let d = o;
  97673. if (l >= d.from || f <= d.to || u) {
  97674. let h = Math.max(d.from, l) - u, p = Math.min(d.to, f) - u;
  97675. d = h >= p ? null : new af(h, p, d.tree, d.offset + u, s > 0, !!c);
  97676. }
  97677. if (d && i.push(d), o.to > f)
  97678. break;
  97679. o = a < e.length ? e[a++] : null;
  97680. }
  97681. if (!c)
  97682. break;
  97683. l = c.toA, u = c.toA - c.toB;
  97684. }
  97685. return i;
  97686. }
  97687. }
  97688. class Ioe {
  97689. /**
  97690. Start a parse, returning a [partial parse](#common.PartialParse)
  97691. object. [`fragments`](#common.TreeFragment) can be passed in to
  97692. make the parse incremental.
  97693. By default, the entire input is parsed. You can pass `ranges`,
  97694. which should be a sorted array of non-empty, non-overlapping
  97695. ranges, to parse only those ranges. The tree returned in that
  97696. case will start at `ranges[0].from`.
  97697. */
  97698. startParse(e, n, r) {
  97699. return typeof e == "string" && (e = new dlt(e)), r = r ? r.length ? r.map((i) => new C$(i.from, i.to)) : [new C$(0, 0)] : [new C$(0, e.length)], this.createParse(e, n || [], r);
  97700. }
  97701. /**
  97702. Run a full parse, returning the resulting tree.
  97703. */
  97704. parse(e, n, r) {
  97705. let i = this.startParse(e, n, r);
  97706. for (; ; ) {
  97707. let a = i.advance();
  97708. if (a)
  97709. return a;
  97710. }
  97711. }
  97712. }
  97713. class dlt {
  97714. constructor(e) {
  97715. this.string = e;
  97716. }
  97717. get length() {
  97718. return this.string.length;
  97719. }
  97720. chunk(e) {
  97721. return this.string.slice(e);
  97722. }
  97723. get lineChunks() {
  97724. return !1;
  97725. }
  97726. read(e, n) {
  97727. return this.string.slice(e, n);
  97728. }
  97729. }
  97730. new Pt({ perNode: !0 });
  97731. let hlt = 0;
  97732. class Ro {
  97733. /**
  97734. @internal
  97735. */
  97736. constructor(e, n, r) {
  97737. this.set = e, this.base = n, this.modified = r, this.id = hlt++;
  97738. }
  97739. /**
  97740. Define a new tag. If `parent` is given, the tag is treated as a
  97741. sub-tag of that parent, and
  97742. [highlighters](#highlight.tagHighlighter) that don't mention
  97743. this tag will try to fall back to the parent tag (or grandparent
  97744. tag, etc).
  97745. */
  97746. static define(e) {
  97747. if (e != null && e.base)
  97748. throw new Error("Can not derive from a modified tag");
  97749. let n = new Ro([], null, []);
  97750. if (n.set.push(n), e)
  97751. for (let r of e.set)
  97752. n.set.push(r);
  97753. return n;
  97754. }
  97755. /**
  97756. Define a tag _modifier_, which is a function that, given a tag,
  97757. will return a tag that is a subtag of the original. Applying the
  97758. same modifier to a twice tag will return the same value (`m1(t1)
  97759. == m1(t1)`) and applying multiple modifiers will, regardless or
  97760. order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
  97761. When multiple modifiers are applied to a given base tag, each
  97762. smaller set of modifiers is registered as a parent, so that for
  97763. example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
  97764. `m1(m3(t1)`, and so on.
  97765. */
  97766. static defineModifier() {
  97767. let e = new lS();
  97768. return (n) => n.modified.indexOf(e) > -1 ? n : lS.get(n.base || n, n.modified.concat(e).sort((r, i) => r.id - i.id));
  97769. }
  97770. }
  97771. let plt = 0;
  97772. class lS {
  97773. constructor() {
  97774. this.instances = [], this.id = plt++;
  97775. }
  97776. static get(e, n) {
  97777. if (!n.length)
  97778. return e;
  97779. let r = n[0].instances.find((s) => s.base == e && vlt(n, s.modified));
  97780. if (r)
  97781. return r;
  97782. let i = [], a = new Ro(i, e, n);
  97783. for (let s of n)
  97784. s.instances.push(a);
  97785. let o = glt(n);
  97786. for (let s of e.set)
  97787. if (!s.modified.length)
  97788. for (let l of o)
  97789. i.push(lS.get(s, l));
  97790. return a;
  97791. }
  97792. }
  97793. function vlt(t, e) {
  97794. return t.length == e.length && t.every((n, r) => n == e[r]);
  97795. }
  97796. function glt(t) {
  97797. let e = [[]];
  97798. for (let n = 0; n < t.length; n++)
  97799. for (let r = 0, i = e.length; r < i; r++)
  97800. e.push(e[r].concat(t[n]));
  97801. return e.sort((n, r) => r.length - n.length);
  97802. }
  97803. function p4(t) {
  97804. let e = /* @__PURE__ */ Object.create(null);
  97805. for (let n in t) {
  97806. let r = t[n];
  97807. Array.isArray(r) || (r = [r]);
  97808. for (let i of n.split(" "))
  97809. if (i) {
  97810. let a = [], o = 2, s = i;
  97811. for (let f = 0; ; ) {
  97812. if (s == "..." && f > 0 && f + 3 == i.length) {
  97813. o = 1;
  97814. break;
  97815. }
  97816. let d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);
  97817. if (!d)
  97818. throw new RangeError("Invalid path: " + i);
  97819. if (a.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), f += d[0].length, f == i.length)
  97820. break;
  97821. let h = i[f++];
  97822. if (f == i.length && h == "!") {
  97823. o = 0;
  97824. break;
  97825. }
  97826. if (h != "/")
  97827. throw new RangeError("Invalid path: " + i);
  97828. s = i.slice(f);
  97829. }
  97830. let l = a.length - 1, u = a[l];
  97831. if (!u)
  97832. throw new RangeError("Invalid path: " + i);
  97833. let c = new uS(r, o, l > 0 ? a.slice(0, l) : null);
  97834. e[u] = c.sort(e[u]);
  97835. }
  97836. }
  97837. return Doe.add(e);
  97838. }
  97839. const Doe = new Pt();
  97840. class uS {
  97841. constructor(e, n, r, i) {
  97842. this.tags = e, this.mode = n, this.context = r, this.next = i;
  97843. }
  97844. get opaque() {
  97845. return this.mode == 0;
  97846. }
  97847. get inherit() {
  97848. return this.mode == 1;
  97849. }
  97850. sort(e) {
  97851. return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
  97852. }
  97853. get depth() {
  97854. return this.context ? this.context.length : 0;
  97855. }
  97856. }
  97857. uS.empty = new uS([], 2, null);
  97858. function Roe(t, e) {
  97859. let n = /* @__PURE__ */ Object.create(null);
  97860. for (let a of t)
  97861. if (!Array.isArray(a.tag))
  97862. n[a.tag.id] = a.class;
  97863. else
  97864. for (let o of a.tag)
  97865. n[o.id] = a.class;
  97866. let { scope: r, all: i = null } = e || {};
  97867. return {
  97868. style: (a) => {
  97869. let o = i;
  97870. for (let s of a)
  97871. for (let l of s.set) {
  97872. let u = n[l.id];
  97873. if (u) {
  97874. o = o ? o + " " + u : u;
  97875. break;
  97876. }
  97877. }
  97878. return o;
  97879. },
  97880. scope: r
  97881. };
  97882. }
  97883. function mlt(t, e) {
  97884. let n = null;
  97885. for (let r of t) {
  97886. let i = r.style(e);
  97887. i && (n = n ? n + " " + i : i);
  97888. }
  97889. return n;
  97890. }
  97891. function ylt(t, e, n, r = 0, i = t.length) {
  97892. let a = new blt(r, Array.isArray(e) ? e : [e], n);
  97893. a.highlightRange(t.cursor(), r, i, "", a.highlighters), a.flush(i);
  97894. }
  97895. class blt {
  97896. constructor(e, n, r) {
  97897. this.at = e, this.highlighters = n, this.span = r, this.class = "";
  97898. }
  97899. startSpan(e, n) {
  97900. n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
  97901. }
  97902. flush(e) {
  97903. e > this.at && this.class && this.span(this.at, e, this.class);
  97904. }
  97905. highlightRange(e, n, r, i, a) {
  97906. let { type: o, from: s, to: l } = e;
  97907. if (s >= r || l <= n)
  97908. return;
  97909. o.isTop && (a = this.highlighters.filter((h) => !h.scope || h.scope(o)));
  97910. let u = i, c = _lt(e) || uS.empty, f = mlt(a, c.tags);
  97911. if (f && (u && (u += " "), u += f, c.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(n, s), u), c.opaque)
  97912. return;
  97913. let d = e.tree && e.tree.prop(Pt.mounted);
  97914. if (d && d.overlay) {
  97915. 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();
  97916. for (let g = 0, m = s; ; g++) {
  97917. 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);
  97918. if (_ < O && v)
  97919. for (; e.from < O && (this.highlightRange(e, _, O, i, a), this.startSpan(Math.min(O, e.to), u), !(e.to >= b || !e.nextSibling())); )
  97920. ;
  97921. if (!y || b > r)
  97922. break;
  97923. 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));
  97924. }
  97925. v && e.parent();
  97926. } else if (e.firstChild()) {
  97927. d && (i = "");
  97928. do
  97929. if (!(e.to <= n)) {
  97930. if (e.from >= r)
  97931. break;
  97932. this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), u);
  97933. }
  97934. while (e.nextSibling());
  97935. e.parent();
  97936. }
  97937. }
  97938. }
  97939. function _lt(t) {
  97940. let e = t.type.prop(Doe);
  97941. for (; e && e.context && !t.matchContext(e.context); )
  97942. e = e.next;
  97943. return e || null;
  97944. }
  97945. const Ae = Ro.define, r_ = Ae(), Tl = Ae(), TG = Ae(Tl), PG = Ae(Tl), Pl = Ae(), i_ = Ae(Pl), T$ = Ae(Pl), Eo = Ae(), cc = Ae(Eo), Co = Ae(), To = Ae(), zM = Ae(), Ev = Ae(zM), a_ = Ae(), J = {
  97946. /**
  97947. A comment.
  97948. */
  97949. comment: r_,
  97950. /**
  97951. A line [comment](#highlight.tags.comment).
  97952. */
  97953. lineComment: Ae(r_),
  97954. /**
  97955. A block [comment](#highlight.tags.comment).
  97956. */
  97957. blockComment: Ae(r_),
  97958. /**
  97959. A documentation [comment](#highlight.tags.comment).
  97960. */
  97961. docComment: Ae(r_),
  97962. /**
  97963. Any kind of identifier.
  97964. */
  97965. name: Tl,
  97966. /**
  97967. The [name](#highlight.tags.name) of a variable.
  97968. */
  97969. variableName: Ae(Tl),
  97970. /**
  97971. A type [name](#highlight.tags.name).
  97972. */
  97973. typeName: TG,
  97974. /**
  97975. A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
  97976. */
  97977. tagName: Ae(TG),
  97978. /**
  97979. A property or field [name](#highlight.tags.name).
  97980. */
  97981. propertyName: PG,
  97982. /**
  97983. An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
  97984. */
  97985. attributeName: Ae(PG),
  97986. /**
  97987. The [name](#highlight.tags.name) of a class.
  97988. */
  97989. className: Ae(Tl),
  97990. /**
  97991. A label [name](#highlight.tags.name).
  97992. */
  97993. labelName: Ae(Tl),
  97994. /**
  97995. A namespace [name](#highlight.tags.name).
  97996. */
  97997. namespace: Ae(Tl),
  97998. /**
  97999. The [name](#highlight.tags.name) of a macro.
  98000. */
  98001. macroName: Ae(Tl),
  98002. /**
  98003. A literal value.
  98004. */
  98005. literal: Pl,
  98006. /**
  98007. A string [literal](#highlight.tags.literal).
  98008. */
  98009. string: i_,
  98010. /**
  98011. A documentation [string](#highlight.tags.string).
  98012. */
  98013. docString: Ae(i_),
  98014. /**
  98015. A character literal (subtag of [string](#highlight.tags.string)).
  98016. */
  98017. character: Ae(i_),
  98018. /**
  98019. An attribute value (subtag of [string](#highlight.tags.string)).
  98020. */
  98021. attributeValue: Ae(i_),
  98022. /**
  98023. A number [literal](#highlight.tags.literal).
  98024. */
  98025. number: T$,
  98026. /**
  98027. An integer [number](#highlight.tags.number) literal.
  98028. */
  98029. integer: Ae(T$),
  98030. /**
  98031. A floating-point [number](#highlight.tags.number) literal.
  98032. */
  98033. float: Ae(T$),
  98034. /**
  98035. A boolean [literal](#highlight.tags.literal).
  98036. */
  98037. bool: Ae(Pl),
  98038. /**
  98039. Regular expression [literal](#highlight.tags.literal).
  98040. */
  98041. regexp: Ae(Pl),
  98042. /**
  98043. An escape [literal](#highlight.tags.literal), for example a
  98044. backslash escape in a string.
  98045. */
  98046. escape: Ae(Pl),
  98047. /**
  98048. A color [literal](#highlight.tags.literal).
  98049. */
  98050. color: Ae(Pl),
  98051. /**
  98052. A URL [literal](#highlight.tags.literal).
  98053. */
  98054. url: Ae(Pl),
  98055. /**
  98056. A language keyword.
  98057. */
  98058. keyword: Co,
  98059. /**
  98060. The [keyword](#highlight.tags.keyword) for the self or this
  98061. object.
  98062. */
  98063. self: Ae(Co),
  98064. /**
  98065. The [keyword](#highlight.tags.keyword) for null.
  98066. */
  98067. null: Ae(Co),
  98068. /**
  98069. A [keyword](#highlight.tags.keyword) denoting some atomic value.
  98070. */
  98071. atom: Ae(Co),
  98072. /**
  98073. A [keyword](#highlight.tags.keyword) that represents a unit.
  98074. */
  98075. unit: Ae(Co),
  98076. /**
  98077. A modifier [keyword](#highlight.tags.keyword).
  98078. */
  98079. modifier: Ae(Co),
  98080. /**
  98081. A [keyword](#highlight.tags.keyword) that acts as an operator.
  98082. */
  98083. operatorKeyword: Ae(Co),
  98084. /**
  98085. A control-flow related [keyword](#highlight.tags.keyword).
  98086. */
  98087. controlKeyword: Ae(Co),
  98088. /**
  98089. A [keyword](#highlight.tags.keyword) that defines something.
  98090. */
  98091. definitionKeyword: Ae(Co),
  98092. /**
  98093. A [keyword](#highlight.tags.keyword) related to defining or
  98094. interfacing with modules.
  98095. */
  98096. moduleKeyword: Ae(Co),
  98097. /**
  98098. An operator.
  98099. */
  98100. operator: To,
  98101. /**
  98102. An [operator](#highlight.tags.operator) that dereferences something.
  98103. */
  98104. derefOperator: Ae(To),
  98105. /**
  98106. Arithmetic-related [operator](#highlight.tags.operator).
  98107. */
  98108. arithmeticOperator: Ae(To),
  98109. /**
  98110. Logical [operator](#highlight.tags.operator).
  98111. */
  98112. logicOperator: Ae(To),
  98113. /**
  98114. Bit [operator](#highlight.tags.operator).
  98115. */
  98116. bitwiseOperator: Ae(To),
  98117. /**
  98118. Comparison [operator](#highlight.tags.operator).
  98119. */
  98120. compareOperator: Ae(To),
  98121. /**
  98122. [Operator](#highlight.tags.operator) that updates its operand.
  98123. */
  98124. updateOperator: Ae(To),
  98125. /**
  98126. [Operator](#highlight.tags.operator) that defines something.
  98127. */
  98128. definitionOperator: Ae(To),
  98129. /**
  98130. Type-related [operator](#highlight.tags.operator).
  98131. */
  98132. typeOperator: Ae(To),
  98133. /**
  98134. Control-flow [operator](#highlight.tags.operator).
  98135. */
  98136. controlOperator: Ae(To),
  98137. /**
  98138. Program or markup punctuation.
  98139. */
  98140. punctuation: zM,
  98141. /**
  98142. [Punctuation](#highlight.tags.punctuation) that separates
  98143. things.
  98144. */
  98145. separator: Ae(zM),
  98146. /**
  98147. Bracket-style [punctuation](#highlight.tags.punctuation).
  98148. */
  98149. bracket: Ev,
  98150. /**
  98151. Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
  98152. tokens).
  98153. */
  98154. angleBracket: Ae(Ev),
  98155. /**
  98156. Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
  98157. tokens).
  98158. */
  98159. squareBracket: Ae(Ev),
  98160. /**
  98161. Parentheses (usually `(` and `)` tokens). Subtag of
  98162. [bracket](#highlight.tags.bracket).
  98163. */
  98164. paren: Ae(Ev),
  98165. /**
  98166. Braces (usually `{` and `}` tokens). Subtag of
  98167. [bracket](#highlight.tags.bracket).
  98168. */
  98169. brace: Ae(Ev),
  98170. /**
  98171. Content, for example plain text in XML or markup documents.
  98172. */
  98173. content: Eo,
  98174. /**
  98175. [Content](#highlight.tags.content) that represents a heading.
  98176. */
  98177. heading: cc,
  98178. /**
  98179. A level 1 [heading](#highlight.tags.heading).
  98180. */
  98181. heading1: Ae(cc),
  98182. /**
  98183. A level 2 [heading](#highlight.tags.heading).
  98184. */
  98185. heading2: Ae(cc),
  98186. /**
  98187. A level 3 [heading](#highlight.tags.heading).
  98188. */
  98189. heading3: Ae(cc),
  98190. /**
  98191. A level 4 [heading](#highlight.tags.heading).
  98192. */
  98193. heading4: Ae(cc),
  98194. /**
  98195. A level 5 [heading](#highlight.tags.heading).
  98196. */
  98197. heading5: Ae(cc),
  98198. /**
  98199. A level 6 [heading](#highlight.tags.heading).
  98200. */
  98201. heading6: Ae(cc),
  98202. /**
  98203. A prose separator (such as a horizontal rule).
  98204. */
  98205. contentSeparator: Ae(Eo),
  98206. /**
  98207. [Content](#highlight.tags.content) that represents a list.
  98208. */
  98209. list: Ae(Eo),
  98210. /**
  98211. [Content](#highlight.tags.content) that represents a quote.
  98212. */
  98213. quote: Ae(Eo),
  98214. /**
  98215. [Content](#highlight.tags.content) that is emphasized.
  98216. */
  98217. emphasis: Ae(Eo),
  98218. /**
  98219. [Content](#highlight.tags.content) that is styled strong.
  98220. */
  98221. strong: Ae(Eo),
  98222. /**
  98223. [Content](#highlight.tags.content) that is part of a link.
  98224. */
  98225. link: Ae(Eo),
  98226. /**
  98227. [Content](#highlight.tags.content) that is styled as code or
  98228. monospace.
  98229. */
  98230. monospace: Ae(Eo),
  98231. /**
  98232. [Content](#highlight.tags.content) that has a strike-through
  98233. style.
  98234. */
  98235. strikethrough: Ae(Eo),
  98236. /**
  98237. Inserted text in a change-tracking format.
  98238. */
  98239. inserted: Ae(),
  98240. /**
  98241. Deleted text.
  98242. */
  98243. deleted: Ae(),
  98244. /**
  98245. Changed text.
  98246. */
  98247. changed: Ae(),
  98248. /**
  98249. An invalid or unsyntactic element.
  98250. */
  98251. invalid: Ae(),
  98252. /**
  98253. Metadata or meta-instruction.
  98254. */
  98255. meta: a_,
  98256. /**
  98257. [Metadata](#highlight.tags.meta) that applies to the entire
  98258. document.
  98259. */
  98260. documentMeta: Ae(a_),
  98261. /**
  98262. [Metadata](#highlight.tags.meta) that annotates or adds
  98263. attributes to a given syntactic element.
  98264. */
  98265. annotation: Ae(a_),
  98266. /**
  98267. Processing instruction or preprocessor directive. Subtag of
  98268. [meta](#highlight.tags.meta).
  98269. */
  98270. processingInstruction: Ae(a_),
  98271. /**
  98272. [Modifier](#highlight.Tag^defineModifier) that indicates that a
  98273. given element is being defined. Expected to be used with the
  98274. various [name](#highlight.tags.name) tags.
  98275. */
  98276. definition: Ro.defineModifier(),
  98277. /**
  98278. [Modifier](#highlight.Tag^defineModifier) that indicates that
  98279. something is constant. Mostly expected to be used with
  98280. [variable names](#highlight.tags.variableName).
  98281. */
  98282. constant: Ro.defineModifier(),
  98283. /**
  98284. [Modifier](#highlight.Tag^defineModifier) used to indicate that
  98285. a [variable](#highlight.tags.variableName) or [property
  98286. name](#highlight.tags.propertyName) is being called or defined
  98287. as a function.
  98288. */
  98289. function: Ro.defineModifier(),
  98290. /**
  98291. [Modifier](#highlight.Tag^defineModifier) that can be applied to
  98292. [names](#highlight.tags.name) to indicate that they belong to
  98293. the language's standard environment.
  98294. */
  98295. standard: Ro.defineModifier(),
  98296. /**
  98297. [Modifier](#highlight.Tag^defineModifier) that indicates a given
  98298. [names](#highlight.tags.name) is local to some scope.
  98299. */
  98300. local: Ro.defineModifier(),
  98301. /**
  98302. A generic variant [modifier](#highlight.Tag^defineModifier) that
  98303. can be used to tag language-specific alternative variants of
  98304. some common tag. It is recommended for themes to define special
  98305. forms of at least the [string](#highlight.tags.string) and
  98306. [variable name](#highlight.tags.variableName) tags, since those
  98307. come up a lot.
  98308. */
  98309. special: Ro.defineModifier()
  98310. };
  98311. Roe([
  98312. { tag: J.link, class: "tok-link" },
  98313. { tag: J.heading, class: "tok-heading" },
  98314. { tag: J.emphasis, class: "tok-emphasis" },
  98315. { tag: J.strong, class: "tok-strong" },
  98316. { tag: J.keyword, class: "tok-keyword" },
  98317. { tag: J.atom, class: "tok-atom" },
  98318. { tag: J.bool, class: "tok-bool" },
  98319. { tag: J.url, class: "tok-url" },
  98320. { tag: J.labelName, class: "tok-labelName" },
  98321. { tag: J.inserted, class: "tok-inserted" },
  98322. { tag: J.deleted, class: "tok-deleted" },
  98323. { tag: J.literal, class: "tok-literal" },
  98324. { tag: J.string, class: "tok-string" },
  98325. { tag: J.number, class: "tok-number" },
  98326. { tag: [J.regexp, J.escape, J.special(J.string)], class: "tok-string2" },
  98327. { tag: J.variableName, class: "tok-variableName" },
  98328. { tag: J.local(J.variableName), class: "tok-variableName tok-local" },
  98329. { tag: J.definition(J.variableName), class: "tok-variableName tok-definition" },
  98330. { tag: J.special(J.variableName), class: "tok-variableName2" },
  98331. { tag: J.definition(J.propertyName), class: "tok-propertyName tok-definition" },
  98332. { tag: J.typeName, class: "tok-typeName" },
  98333. { tag: J.namespace, class: "tok-namespace" },
  98334. { tag: J.className, class: "tok-className" },
  98335. { tag: J.macroName, class: "tok-macroName" },
  98336. { tag: J.propertyName, class: "tok-propertyName" },
  98337. { tag: J.operator, class: "tok-operator" },
  98338. { tag: J.comment, class: "tok-comment" },
  98339. { tag: J.meta, class: "tok-meta" },
  98340. { tag: J.invalid, class: "tok-invalid" },
  98341. { tag: J.punctuation, class: "tok-punctuation" }
  98342. ]);
  98343. var P$;
  98344. const Hd = /* @__PURE__ */ new Pt();
  98345. function koe(t) {
  98346. return Be.define({
  98347. combine: t ? (e) => e.concat(t) : void 0
  98348. });
  98349. }
  98350. const v4 = /* @__PURE__ */ new Pt();
  98351. class Ya {
  98352. /**
  98353. Construct a language object. If you need to invoke this
  98354. directly, first define a data facet with
  98355. [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
  98356. configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
  98357. to the language's outer syntax node.
  98358. */
  98359. constructor(e, n, r = [], i = "") {
  98360. this.data = e, this.name = i, At.prototype.hasOwnProperty("tree") || Object.defineProperty(At.prototype, "tree", { get() {
  98361. return nr(this);
  98362. } }), this.parser = n, this.extension = [
  98363. yu.of(this),
  98364. At.languageData.of((a, o, s) => {
  98365. let l = $G(a, o, s), u = l.type.prop(Hd);
  98366. if (!u)
  98367. return [];
  98368. let c = a.facet(u), f = l.type.prop(v4);
  98369. if (f) {
  98370. let d = l.resolve(o - l.from, s);
  98371. for (let h of f)
  98372. if (h.test(d, a)) {
  98373. let p = a.facet(h.facet);
  98374. return h.type == "replace" ? p : p.concat(c);
  98375. }
  98376. }
  98377. return c;
  98378. })
  98379. ].concat(r);
  98380. }
  98381. /**
  98382. Query whether this language is active at the given position.
  98383. */
  98384. isActiveAt(e, n, r = -1) {
  98385. return $G(e, n, r).type.prop(Hd) == this.data;
  98386. }
  98387. /**
  98388. Find the document regions that were parsed using this language.
  98389. The returned regions will _include_ any nested languages rooted
  98390. in this language, when those exist.
  98391. */
  98392. findRegions(e) {
  98393. let n = e.facet(yu);
  98394. if ((n == null ? void 0 : n.data) == this.data)
  98395. return [{ from: 0, to: e.doc.length }];
  98396. if (!n || !n.allowsNesting)
  98397. return [];
  98398. let r = [], i = (a, o) => {
  98399. if (a.prop(Hd) == this.data) {
  98400. r.push({ from: o, to: o + a.length });
  98401. return;
  98402. }
  98403. let s = a.prop(Pt.mounted);
  98404. if (s) {
  98405. if (s.tree.prop(Hd) == this.data) {
  98406. if (s.overlay)
  98407. for (let l of s.overlay)
  98408. r.push({ from: l.from + o, to: l.to + o });
  98409. else
  98410. r.push({ from: o, to: o + a.length });
  98411. return;
  98412. } else if (s.overlay) {
  98413. let l = r.length;
  98414. if (i(s.tree, s.overlay[0].from + o), r.length > l)
  98415. return;
  98416. }
  98417. }
  98418. for (let l = 0; l < a.children.length; l++) {
  98419. let u = a.children[l];
  98420. u instanceof Wn && i(u, a.positions[l] + o);
  98421. }
  98422. };
  98423. return i(nr(e), 0), r;
  98424. }
  98425. /**
  98426. Indicates whether this language allows nested languages. The
  98427. default implementation returns true.
  98428. */
  98429. get allowsNesting() {
  98430. return !0;
  98431. }
  98432. }
  98433. Ya.setState = /* @__PURE__ */ dt.define();
  98434. function $G(t, e, n) {
  98435. let r = t.facet(yu), i = nr(t).topNode;
  98436. if (!r || r.allowsNesting)
  98437. for (let a = i; a; a = a.enter(e, n, Zn.ExcludeBuffers))
  98438. a.type.isTop && (i = a);
  98439. return i;
  98440. }
  98441. class e0 extends Ya {
  98442. constructor(e, n, r) {
  98443. super(e, n, [], r), this.parser = n;
  98444. }
  98445. /**
  98446. Define a language from a parser.
  98447. */
  98448. static define(e) {
  98449. let n = koe(e.languageData);
  98450. return new e0(n, e.parser.configure({
  98451. props: [Hd.add((r) => r.isTop ? n : void 0)]
  98452. }), e.name);
  98453. }
  98454. /**
  98455. Create a new instance of this language with a reconfigured
  98456. version of its parser and optionally a new name.
  98457. */
  98458. configure(e, n) {
  98459. return new e0(this.data, this.parser.configure(e), n || this.name);
  98460. }
  98461. get allowsNesting() {
  98462. return this.parser.hasWrappers();
  98463. }
  98464. }
  98465. function nr(t) {
  98466. let e = t.field(Ya.state, !1);
  98467. return e ? e.tree : Wn.empty;
  98468. }
  98469. class Olt {
  98470. /**
  98471. Create an input object for the given document.
  98472. */
  98473. constructor(e) {
  98474. this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
  98475. }
  98476. get length() {
  98477. return this.doc.length;
  98478. }
  98479. syncTo(e) {
  98480. return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
  98481. }
  98482. chunk(e) {
  98483. return this.syncTo(e), this.string;
  98484. }
  98485. get lineChunks() {
  98486. return !0;
  98487. }
  98488. read(e, n) {
  98489. let r = this.cursorPos - this.string.length;
  98490. return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
  98491. }
  98492. }
  98493. let Mv = null;
  98494. class cS {
  98495. constructor(e, n, r = [], i, a, o, s, l) {
  98496. 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 = [];
  98497. }
  98498. /**
  98499. @internal
  98500. */
  98501. static create(e, n, r) {
  98502. return new cS(e, n, [], Wn.empty, 0, r, [], null);
  98503. }
  98504. startParse() {
  98505. return this.parser.startParse(new Olt(this.state.doc), this.fragments);
  98506. }
  98507. /**
  98508. @internal
  98509. */
  98510. work(e, n) {
  98511. 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(() => {
  98512. var r;
  98513. if (typeof e == "number") {
  98514. let i = Date.now() + e;
  98515. e = () => Date.now() > i;
  98516. }
  98517. 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); ; ) {
  98518. let i = this.parse.advance();
  98519. if (i)
  98520. if (this.fragments = this.withoutTempSkipped(af.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))
  98521. this.parse = this.startParse();
  98522. else
  98523. return !0;
  98524. if (e())
  98525. return !1;
  98526. }
  98527. });
  98528. }
  98529. /**
  98530. @internal
  98531. */
  98532. takeTree() {
  98533. let e, n;
  98534. this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
  98535. for (; !(n = this.parse.advance()); )
  98536. ;
  98537. }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(af.addTree(this.tree, this.fragments, !0)), this.parse = null);
  98538. }
  98539. withContext(e) {
  98540. let n = Mv;
  98541. Mv = this;
  98542. try {
  98543. return e();
  98544. } finally {
  98545. Mv = n;
  98546. }
  98547. }
  98548. withoutTempSkipped(e) {
  98549. for (let n; n = this.tempSkipped.pop(); )
  98550. e = AG(e, n.from, n.to);
  98551. return e;
  98552. }
  98553. /**
  98554. @internal
  98555. */
  98556. changes(e, n) {
  98557. let { fragments: r, tree: i, treeLen: a, viewport: o, skipped: s } = this;
  98558. if (this.takeTree(), !e.empty) {
  98559. let l = [];
  98560. if (e.iterChangedRanges((u, c, f, d) => l.push({ fromA: u, toA: c, fromB: f, toB: d })), r = af.applyChanges(r, l), i = Wn.empty, a = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
  98561. s = [];
  98562. for (let u of this.skipped) {
  98563. let c = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1);
  98564. c < f && s.push({ from: c, to: f });
  98565. }
  98566. }
  98567. }
  98568. return new cS(this.parser, n, r, i, a, o, s, this.scheduleOn);
  98569. }
  98570. /**
  98571. @internal
  98572. */
  98573. updateViewport(e) {
  98574. if (this.viewport.from == e.from && this.viewport.to == e.to)
  98575. return !1;
  98576. this.viewport = e;
  98577. let n = this.skipped.length;
  98578. for (let r = 0; r < this.skipped.length; r++) {
  98579. let { from: i, to: a } = this.skipped[r];
  98580. i < e.to && a > e.from && (this.fragments = AG(this.fragments, i, a), this.skipped.splice(r--, 1));
  98581. }
  98582. return this.skipped.length >= n ? !1 : (this.reset(), !0);
  98583. }
  98584. /**
  98585. @internal
  98586. */
  98587. reset() {
  98588. this.parse && (this.takeTree(), this.parse = null);
  98589. }
  98590. /**
  98591. Notify the parse scheduler that the given region was skipped
  98592. because it wasn't in view, and the parse should be restarted
  98593. when it comes into view.
  98594. */
  98595. skipUntilInView(e, n) {
  98596. this.skipped.push({ from: e, to: n });
  98597. }
  98598. /**
  98599. Returns a parser intended to be used as placeholder when
  98600. asynchronously loading a nested parser. It'll skip its input and
  98601. mark it as not-really-parsed, so that the next update will parse
  98602. it again.
  98603. When `until` is given, a reparse will be scheduled when that
  98604. promise resolves.
  98605. */
  98606. static getSkippingParser(e) {
  98607. return new class extends Ioe {
  98608. createParse(n, r, i) {
  98609. let a = i[0].from, o = i[i.length - 1].to;
  98610. return {
  98611. parsedPos: a,
  98612. advance() {
  98613. let l = Mv;
  98614. if (l) {
  98615. for (let u of i)
  98616. l.tempSkipped.push(u);
  98617. e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
  98618. }
  98619. return this.parsedPos = o, new Wn(Ci.none, [], [], o - a);
  98620. },
  98621. stoppedAt: null,
  98622. stopAt() {
  98623. }
  98624. };
  98625. }
  98626. }();
  98627. }
  98628. /**
  98629. @internal
  98630. */
  98631. isDone(e) {
  98632. e = Math.min(e, this.state.doc.length);
  98633. let n = this.fragments;
  98634. return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
  98635. }
  98636. /**
  98637. Get the context for the current parse, or `null` if no editor
  98638. parse is in progress.
  98639. */
  98640. static get() {
  98641. return Mv;
  98642. }
  98643. }
  98644. function AG(t, e, n) {
  98645. return af.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
  98646. }
  98647. class qh {
  98648. constructor(e) {
  98649. this.context = e, this.tree = e.tree;
  98650. }
  98651. apply(e) {
  98652. if (!e.docChanged && this.tree == this.context.tree)
  98653. return this;
  98654. 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);
  98655. return n.work(20, r) || n.takeTree(), new qh(n);
  98656. }
  98657. static init(e) {
  98658. let n = Math.min(3e3, e.doc.length), r = cS.create(e.facet(yu).parser, e, { from: 0, to: n });
  98659. return r.work(20, n) || r.takeTree(), new qh(r);
  98660. }
  98661. }
  98662. Ya.state = /* @__PURE__ */ ur.define({
  98663. create: qh.init,
  98664. update(t, e) {
  98665. for (let n of e.effects)
  98666. if (n.is(Ya.setState))
  98667. return n.value;
  98668. return e.startState.facet(yu) != e.state.facet(yu) ? qh.init(e.state) : t.apply(e);
  98669. }
  98670. });
  98671. let Loe = (t) => {
  98672. let e = setTimeout(
  98673. () => t(),
  98674. 500
  98675. /* Work.MaxPause */
  98676. );
  98677. return () => clearTimeout(e);
  98678. };
  98679. typeof requestIdleCallback < "u" && (Loe = (t) => {
  98680. let e = -1, n = setTimeout(
  98681. () => {
  98682. e = requestIdleCallback(t, {
  98683. timeout: 400
  98684. /* Work.MinPause */
  98685. });
  98686. },
  98687. 100
  98688. /* Work.MinPause */
  98689. );
  98690. return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
  98691. });
  98692. const $$ = typeof navigator < "u" && (!((P$ = navigator.scheduling) === null || P$ === void 0) && P$.isInputPending) ? () => navigator.scheduling.isInputPending() : null, Slt = /* @__PURE__ */ kn.fromClass(class {
  98693. constructor(e) {
  98694. this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
  98695. }
  98696. update(e) {
  98697. let n = this.view.state.field(Ya.state).context;
  98698. (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);
  98699. }
  98700. scheduleWork() {
  98701. if (this.working)
  98702. return;
  98703. let { state: e } = this.view, n = e.field(Ya.state);
  98704. (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = Loe(this.work));
  98705. }
  98706. work(e) {
  98707. this.working = null;
  98708. let n = Date.now();
  98709. if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
  98710. return;
  98711. let { state: r, viewport: { to: i } } = this.view, a = r.field(Ya.state);
  98712. if (a.tree == a.context.tree && a.context.isDone(
  98713. i + 1e5
  98714. /* Work.MaxParseAhead */
  98715. ))
  98716. return;
  98717. let o = Date.now() + Math.min(this.chunkBudget, 100, e && !$$ ? Math.max(25, e.timeRemaining() - 5) : 1e9), s = a.context.treeLen < i && r.doc.length > i + 1e3, l = a.context.work(() => $$ && $$() || Date.now() > o, i + (s ? 0 : 1e5));
  98718. this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (a.context.takeTree(), this.view.dispatch({ effects: Ya.setState.of(new qh(a.context)) })), this.chunkBudget > 0 && !(l && !s) && this.scheduleWork(), this.checkAsyncSchedule(a.context);
  98719. }
  98720. checkAsyncSchedule(e) {
  98721. e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => mi(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
  98722. }
  98723. destroy() {
  98724. this.working && this.working();
  98725. }
  98726. isWorking() {
  98727. return !!(this.working || this.workScheduled > 0);
  98728. }
  98729. }, {
  98730. eventHandlers: { focus() {
  98731. this.scheduleWork();
  98732. } }
  98733. }), yu = /* @__PURE__ */ Be.define({
  98734. combine(t) {
  98735. return t.length ? t[0] : null;
  98736. },
  98737. enables: (t) => [
  98738. Ya.state,
  98739. Slt,
  98740. De.contentAttributes.compute([t], (e) => {
  98741. let n = e.facet(t);
  98742. return n && n.name ? { "data-language": n.name } : {};
  98743. })
  98744. ]
  98745. });
  98746. class Noe {
  98747. /**
  98748. Create a language support object.
  98749. */
  98750. constructor(e, n = []) {
  98751. this.language = e, this.support = n, this.extension = [e, n];
  98752. }
  98753. }
  98754. const xlt = /* @__PURE__ */ Be.define(), ly = /* @__PURE__ */ Be.define({
  98755. combine: (t) => {
  98756. if (!t.length)
  98757. return " ";
  98758. let e = t[0];
  98759. if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
  98760. throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
  98761. return e;
  98762. }
  98763. });
  98764. function fS(t) {
  98765. let e = t.facet(ly);
  98766. return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
  98767. }
  98768. function t0(t, e) {
  98769. let n = "", r = t.tabSize, i = t.facet(ly)[0];
  98770. if (i == " ") {
  98771. for (; e >= r; )
  98772. n += " ", e -= r;
  98773. i = " ";
  98774. }
  98775. for (let a = 0; a < e; a++)
  98776. n += i;
  98777. return n;
  98778. }
  98779. function g4(t, e) {
  98780. t instanceof At && (t = new kw(t));
  98781. for (let r of t.state.facet(xlt)) {
  98782. let i = r(t, e);
  98783. if (i !== void 0)
  98784. return i;
  98785. }
  98786. let n = nr(t.state);
  98787. return n.length >= e ? wlt(t, n, e) : null;
  98788. }
  98789. class kw {
  98790. /**
  98791. Create an indent context.
  98792. */
  98793. constructor(e, n = {}) {
  98794. this.state = e, this.options = n, this.unit = fS(e);
  98795. }
  98796. /**
  98797. Get a description of the line at the given position, taking
  98798. [simulated line
  98799. breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  98800. into account. If there is such a break at `pos`, the `bias`
  98801. argument determines whether the part of the line line before or
  98802. after the break is used.
  98803. */
  98804. lineAt(e, n = 1) {
  98805. let r = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: a } = this.options;
  98806. 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;
  98807. }
  98808. /**
  98809. Get the text directly after `pos`, either the entire line
  98810. or the next 100 characters, whichever is shorter.
  98811. */
  98812. textAfterPos(e, n = 1) {
  98813. if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
  98814. return "";
  98815. let { text: r, from: i } = this.lineAt(e, n);
  98816. return r.slice(e - i, Math.min(r.length, e + 100 - i));
  98817. }
  98818. /**
  98819. Find the column for the given position.
  98820. */
  98821. column(e, n = 1) {
  98822. let { text: r, from: i } = this.lineAt(e, n), a = this.countColumn(r, e - i), o = this.options.overrideIndentation ? this.options.overrideIndentation(i) : -1;
  98823. return o > -1 && (a += o - this.countColumn(r, r.search(/\S|$/))), a;
  98824. }
  98825. /**
  98826. Find the column position (taking tabs into account) of the given
  98827. position in the given string.
  98828. */
  98829. countColumn(e, n = e.length) {
  98830. return Rp(e, this.state.tabSize, n);
  98831. }
  98832. /**
  98833. Find the indentation column of the line at the given point.
  98834. */
  98835. lineIndent(e, n = 1) {
  98836. let { text: r, from: i } = this.lineAt(e, n), a = this.options.overrideIndentation;
  98837. if (a) {
  98838. let o = a(i);
  98839. if (o > -1)
  98840. return o;
  98841. }
  98842. return this.countColumn(r, r.search(/\S|$/));
  98843. }
  98844. /**
  98845. Returns the [simulated line
  98846. break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  98847. for this context, if any.
  98848. */
  98849. get simulatedBreak() {
  98850. return this.options.simulateBreak || null;
  98851. }
  98852. }
  98853. const m4 = /* @__PURE__ */ new Pt();
  98854. function wlt(t, e, n) {
  98855. let r = e.resolveStack(n), i = r.node.enterUnfinishedNodesBefore(n);
  98856. if (i != r.node) {
  98857. let a = [];
  98858. for (let o = i; o != r.node; o = o.parent)
  98859. a.push(o);
  98860. for (let o = a.length - 1; o >= 0; o--)
  98861. r = { node: a[o], next: r };
  98862. }
  98863. return Boe(r, t, n);
  98864. }
  98865. function Boe(t, e, n) {
  98866. for (let r = t; r; r = r.next) {
  98867. let i = Tlt(r.node);
  98868. if (i)
  98869. return i(y4.create(e, n, r));
  98870. }
  98871. return 0;
  98872. }
  98873. function Clt(t) {
  98874. return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
  98875. }
  98876. function Tlt(t) {
  98877. let e = t.type.prop(m4);
  98878. if (e)
  98879. return e;
  98880. let n = t.firstChild, r;
  98881. if (n && (r = n.type.prop(Pt.closedBy))) {
  98882. let i = t.lastChild, a = i && r.indexOf(i.name) > -1;
  98883. return (o) => zoe(o, !0, 1, void 0, a && !Clt(o) ? i.from : void 0);
  98884. }
  98885. return t.parent == null ? Plt : null;
  98886. }
  98887. function Plt() {
  98888. return 0;
  98889. }
  98890. class y4 extends kw {
  98891. constructor(e, n, r) {
  98892. super(e.state, e.options), this.base = e, this.pos = n, this.context = r;
  98893. }
  98894. /**
  98895. The syntax tree node to which the indentation strategy
  98896. applies.
  98897. */
  98898. get node() {
  98899. return this.context.node;
  98900. }
  98901. /**
  98902. @internal
  98903. */
  98904. static create(e, n, r) {
  98905. return new y4(e, n, r);
  98906. }
  98907. /**
  98908. Get the text directly after `this.pos`, either the entire line
  98909. or the next 100 characters, whichever is shorter.
  98910. */
  98911. get textAfter() {
  98912. return this.textAfterPos(this.pos);
  98913. }
  98914. /**
  98915. Get the indentation at the reference line for `this.node`, which
  98916. is the line on which it starts, unless there is a node that is
  98917. _not_ a parent of this node covering the start of that line. If
  98918. so, the line at the start of that node is tried, again skipping
  98919. on if it is covered by another such node.
  98920. */
  98921. get baseIndent() {
  98922. return this.baseIndentFor(this.node);
  98923. }
  98924. /**
  98925. Get the indentation for the reference line of the given node
  98926. (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
  98927. */
  98928. baseIndentFor(e) {
  98929. let n = this.state.doc.lineAt(e.from);
  98930. for (; ; ) {
  98931. let r = e.resolve(n.from);
  98932. for (; r.parent && r.parent.from == r.from; )
  98933. r = r.parent;
  98934. if ($lt(r, e))
  98935. break;
  98936. n = this.state.doc.lineAt(r.from);
  98937. }
  98938. return this.lineIndent(n.from);
  98939. }
  98940. /**
  98941. Continue looking for indentations in the node's parent nodes,
  98942. and return the result of that.
  98943. */
  98944. continue() {
  98945. return Boe(this.context.next, this.base, this.pos);
  98946. }
  98947. }
  98948. function $lt(t, e) {
  98949. for (let n = e; n; n = n.parent)
  98950. if (t == n)
  98951. return !0;
  98952. return !1;
  98953. }
  98954. function Alt(t) {
  98955. let e = t.node, n = e.childAfter(e.from), r = e.lastChild;
  98956. if (!n)
  98957. return null;
  98958. 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);
  98959. for (let s = n.to; ; ) {
  98960. let l = e.childAfter(s);
  98961. if (!l || l == r)
  98962. return null;
  98963. if (!l.type.isSkipped)
  98964. return l.from < o ? n : null;
  98965. s = l.to;
  98966. }
  98967. }
  98968. function Elt({ closing: t, align: e = !0, units: n = 1 }) {
  98969. return (r) => zoe(r, e, n, t);
  98970. }
  98971. function zoe(t, e, n, r, i) {
  98972. 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 ? Alt(t) : null;
  98973. return l ? s ? t.column(l.from) : t.column(l.to) : t.baseIndent + (s ? 0 : t.unit * n);
  98974. }
  98975. const Mlt = (t) => t.baseIndent;
  98976. function Gg({ except: t, units: e = 1 } = {}) {
  98977. return (n) => {
  98978. let r = t && t.test(n.textAfter);
  98979. return n.baseIndent + (r ? 0 : e * n.unit);
  98980. };
  98981. }
  98982. const Ilt = 200;
  98983. function Dlt() {
  98984. return At.transactionFilter.of((t) => {
  98985. if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
  98986. return t;
  98987. let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
  98988. if (!e.length)
  98989. return t;
  98990. let n = t.newDoc, { head: r } = t.newSelection.main, i = n.lineAt(r);
  98991. if (r > i.from + Ilt)
  98992. return t;
  98993. let a = n.sliceString(i.from, r);
  98994. if (!e.some((u) => u.test(a)))
  98995. return t;
  98996. let { state: o } = t, s = -1, l = [];
  98997. for (let { head: u } of o.selection.ranges) {
  98998. let c = o.doc.lineAt(u);
  98999. if (c.from == s)
  99000. continue;
  99001. s = c.from;
  99002. let f = g4(o, c.from);
  99003. if (f == null)
  99004. continue;
  99005. let d = /^\s*/.exec(c.text)[0], h = t0(o, f);
  99006. d != h && l.push({ from: c.from, to: c.from + d.length, insert: h });
  99007. }
  99008. return l.length ? [t, { changes: l, sequential: !0 }] : t;
  99009. });
  99010. }
  99011. const Rlt = /* @__PURE__ */ Be.define(), b4 = /* @__PURE__ */ new Pt();
  99012. function Voe(t) {
  99013. let e = t.firstChild, n = t.lastChild;
  99014. return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
  99015. }
  99016. function klt(t, e, n) {
  99017. let r = nr(t);
  99018. if (r.length < n)
  99019. return null;
  99020. let i = r.resolveStack(n, 1), a = null;
  99021. for (let o = i; o; o = o.next) {
  99022. let s = o.node;
  99023. if (s.to <= n || s.from > n)
  99024. continue;
  99025. if (a && s.from < e)
  99026. break;
  99027. let l = s.type.prop(b4);
  99028. if (l && (s.to < r.length - 50 || r.length == t.doc.length || !Llt(s))) {
  99029. let u = l(s, t);
  99030. u && u.from <= n && u.from >= e && u.to > n && (a = u);
  99031. }
  99032. }
  99033. return a;
  99034. }
  99035. function Llt(t) {
  99036. let e = t.lastChild;
  99037. return e && e.to == t.to && e.type.isError;
  99038. }
  99039. function dS(t, e, n) {
  99040. for (let r of t.facet(Rlt)) {
  99041. let i = r(t, e, n);
  99042. if (i)
  99043. return i;
  99044. }
  99045. return klt(t, e, n);
  99046. }
  99047. function Foe(t, e) {
  99048. let n = e.mapPos(t.from, 1), r = e.mapPos(t.to, -1);
  99049. return n >= r ? void 0 : { from: n, to: r };
  99050. }
  99051. const Lw = /* @__PURE__ */ dt.define({ map: Foe }), uy = /* @__PURE__ */ dt.define({ map: Foe });
  99052. function Woe(t) {
  99053. let e = [];
  99054. for (let { head: n } of t.state.selection.ranges)
  99055. e.some((r) => r.from <= n && r.to >= n) || e.push(t.lineBlockAt(n));
  99056. return e;
  99057. }
  99058. const $f = /* @__PURE__ */ ur.define({
  99059. create() {
  99060. return Ze.none;
  99061. },
  99062. update(t, e) {
  99063. t = t.map(e.changes);
  99064. for (let n of e.effects)
  99065. if (n.is(Lw) && !Nlt(t, n.value.from, n.value.to)) {
  99066. let { preparePlaceholder: r } = e.state.facet(Goe), i = r ? Ze.replace({ widget: new Hlt(r(e.state, n.value)) }) : EG;
  99067. t = t.update({ add: [i.range(n.value.from, n.value.to)] });
  99068. } else n.is(uy) && (t = t.update({
  99069. filter: (r, i) => n.value.from != r || n.value.to != i,
  99070. filterFrom: n.value.from,
  99071. filterTo: n.value.to
  99072. }));
  99073. if (e.selection) {
  99074. let n = !1, { head: r } = e.selection.main;
  99075. t.between(r, r, (i, a) => {
  99076. i < r && a > r && (n = !0);
  99077. }), n && (t = t.update({
  99078. filterFrom: r,
  99079. filterTo: r,
  99080. filter: (i, a) => a <= r || i >= r
  99081. }));
  99082. }
  99083. return t;
  99084. },
  99085. provide: (t) => De.decorations.from(t),
  99086. toJSON(t, e) {
  99087. let n = [];
  99088. return t.between(0, e.doc.length, (r, i) => {
  99089. n.push(r, i);
  99090. }), n;
  99091. },
  99092. fromJSON(t) {
  99093. if (!Array.isArray(t) || t.length % 2)
  99094. throw new RangeError("Invalid JSON for fold state");
  99095. let e = [];
  99096. for (let n = 0; n < t.length; ) {
  99097. let r = t[n++], i = t[n++];
  99098. if (typeof r != "number" || typeof i != "number")
  99099. throw new RangeError("Invalid JSON for fold state");
  99100. e.push(EG.range(r, i));
  99101. }
  99102. return Ze.set(e, !0);
  99103. }
  99104. });
  99105. function hS(t, e, n) {
  99106. var r;
  99107. let i = null;
  99108. return (r = t.field($f, !1)) === null || r === void 0 || r.between(e, n, (a, o) => {
  99109. (!i || i.from > a) && (i = { from: a, to: o });
  99110. }), i;
  99111. }
  99112. function Nlt(t, e, n) {
  99113. let r = !1;
  99114. return t.between(e, e, (i, a) => {
  99115. i == e && a == n && (r = !0);
  99116. }), r;
  99117. }
  99118. function Qoe(t, e) {
  99119. return t.field($f, !1) ? e : e.concat(dt.appendConfig.of(joe()));
  99120. }
  99121. const Blt = (t) => {
  99122. for (let e of Woe(t)) {
  99123. let n = dS(t.state, e.from, e.to);
  99124. if (n)
  99125. return t.dispatch({ effects: Qoe(t.state, [Lw.of(n), Hoe(t, n)]) }), !0;
  99126. }
  99127. return !1;
  99128. }, zlt = (t) => {
  99129. if (!t.state.field($f, !1))
  99130. return !1;
  99131. let e = [];
  99132. for (let n of Woe(t)) {
  99133. let r = hS(t.state, n.from, n.to);
  99134. r && e.push(uy.of(r), Hoe(t, r, !1));
  99135. }
  99136. return e.length && t.dispatch({ effects: e }), e.length > 0;
  99137. };
  99138. function Hoe(t, e, n = !0) {
  99139. let r = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number;
  99140. return De.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`);
  99141. }
  99142. const Vlt = (t) => {
  99143. let { state: e } = t, n = [];
  99144. for (let r = 0; r < e.doc.length; ) {
  99145. let i = t.lineBlockAt(r), a = dS(e, i.from, i.to);
  99146. a && n.push(Lw.of(a)), r = (a ? t.lineBlockAt(a.to) : i).to + 1;
  99147. }
  99148. return n.length && t.dispatch({ effects: Qoe(t.state, n) }), !!n.length;
  99149. }, Flt = (t) => {
  99150. let e = t.state.field($f, !1);
  99151. if (!e || !e.size)
  99152. return !1;
  99153. let n = [];
  99154. return e.between(0, t.state.doc.length, (r, i) => {
  99155. n.push(uy.of({ from: r, to: i }));
  99156. }), t.dispatch({ effects: n }), !0;
  99157. }, Wlt = [
  99158. { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: Blt },
  99159. { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: zlt },
  99160. { key: "Ctrl-Alt-[", run: Vlt },
  99161. { key: "Ctrl-Alt-]", run: Flt }
  99162. ], Qlt = {
  99163. placeholderDOM: null,
  99164. preparePlaceholder: null,
  99165. placeholderText: "…"
  99166. }, Goe = /* @__PURE__ */ Be.define({
  99167. combine(t) {
  99168. return fs(t, Qlt);
  99169. }
  99170. });
  99171. function joe(t) {
  99172. return [$f, Zlt];
  99173. }
  99174. function Zoe(t, e) {
  99175. let { state: n } = t, r = n.facet(Goe), i = (o) => {
  99176. let s = t.lineBlockAt(t.posAtDOM(o.target)), l = hS(t.state, s.from, s.to);
  99177. l && t.dispatch({ effects: uy.of(l) }), o.preventDefault();
  99178. };
  99179. if (r.placeholderDOM)
  99180. return r.placeholderDOM(t, i, e);
  99181. let a = document.createElement("span");
  99182. 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;
  99183. }
  99184. const EG = /* @__PURE__ */ Ze.replace({ widget: /* @__PURE__ */ new class extends ds {
  99185. toDOM(t) {
  99186. return Zoe(t, null);
  99187. }
  99188. }() });
  99189. class Hlt extends ds {
  99190. constructor(e) {
  99191. super(), this.value = e;
  99192. }
  99193. eq(e) {
  99194. return this.value == e.value;
  99195. }
  99196. toDOM(e) {
  99197. return Zoe(e, this.value);
  99198. }
  99199. }
  99200. const Glt = {
  99201. openText: "⌄",
  99202. closedText: "›",
  99203. markerDOM: null,
  99204. domEventHandlers: {},
  99205. foldingChanged: () => !1
  99206. };
  99207. class A$ extends tl {
  99208. constructor(e, n) {
  99209. super(), this.config = e, this.open = n;
  99210. }
  99211. eq(e) {
  99212. return this.config == e.config && this.open == e.open;
  99213. }
  99214. toDOM(e) {
  99215. if (this.config.markerDOM)
  99216. return this.config.markerDOM(this.open);
  99217. let n = document.createElement("span");
  99218. return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
  99219. }
  99220. }
  99221. function jlt(t = {}) {
  99222. let e = Object.assign(Object.assign({}, Glt), t), n = new A$(e, !0), r = new A$(e, !1), i = kn.fromClass(class {
  99223. constructor(o) {
  99224. this.from = o.viewport.from, this.markers = this.buildMarkers(o);
  99225. }
  99226. update(o) {
  99227. (o.docChanged || o.viewportChanged || o.startState.facet(yu) != o.state.facet(yu) || o.startState.field($f, !1) != o.state.field($f, !1) || nr(o.startState) != nr(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
  99228. }
  99229. buildMarkers(o) {
  99230. let s = new hu();
  99231. for (let l of o.viewportLineBlocks) {
  99232. let u = hS(o.state, l.from, l.to) ? r : dS(o.state, l.from, l.to) ? n : null;
  99233. u && s.add(l.from, l.from, u);
  99234. }
  99235. return s.finish();
  99236. }
  99237. }), { domEventHandlers: a } = e;
  99238. return [
  99239. i,
  99240. Xst({
  99241. class: "cm-foldGutter",
  99242. markers(o) {
  99243. var s;
  99244. return ((s = o.plugin(i)) === null || s === void 0 ? void 0 : s.markers) || Vt.empty;
  99245. },
  99246. initialSpacer() {
  99247. return new A$(e, !1);
  99248. },
  99249. domEventHandlers: Object.assign(Object.assign({}, a), { click: (o, s, l) => {
  99250. if (a.click && a.click(o, s, l))
  99251. return !0;
  99252. let u = hS(o.state, s.from, s.to);
  99253. if (u)
  99254. return o.dispatch({ effects: uy.of(u) }), !0;
  99255. let c = dS(o.state, s.from, s.to);
  99256. return c ? (o.dispatch({ effects: Lw.of(c) }), !0) : !1;
  99257. } })
  99258. }),
  99259. joe()
  99260. ];
  99261. }
  99262. const Zlt = /* @__PURE__ */ De.baseTheme({
  99263. ".cm-foldPlaceholder": {
  99264. backgroundColor: "#eee",
  99265. border: "1px solid #ddd",
  99266. color: "#888",
  99267. borderRadius: ".2em",
  99268. margin: "0 1px",
  99269. padding: "0 1px",
  99270. cursor: "pointer"
  99271. },
  99272. ".cm-foldGutter span": {
  99273. padding: "0 1px",
  99274. cursor: "pointer"
  99275. }
  99276. });
  99277. class cy {
  99278. constructor(e, n) {
  99279. this.specs = e;
  99280. let r;
  99281. function i(s) {
  99282. let l = pu.newName();
  99283. return (r || (r = /* @__PURE__ */ Object.create(null)))["." + l] = s, l;
  99284. }
  99285. const a = typeof n.all == "string" ? n.all : n.all ? i(n.all) : void 0, o = n.scope;
  99286. this.scope = o instanceof Ya ? (s) => s.prop(Hd) == o.data : o ? (s) => s == o : void 0, this.style = Roe(e.map((s) => ({
  99287. tag: s.tag,
  99288. class: s.class || i(Object.assign({}, s, { tag: null }))
  99289. })), {
  99290. all: a
  99291. }).style, this.module = r ? new pu(r) : null, this.themeType = n.themeType;
  99292. }
  99293. /**
  99294. Create a highlighter style that associates the given styles to
  99295. the given tags. The specs must be objects that hold a style tag
  99296. or array of tags in their `tag` property, and either a single
  99297. `class` property providing a static CSS class (for highlighter
  99298. that rely on external styling), or a
  99299. [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
  99300. set of CSS properties (which define the styling for those tags).
  99301. The CSS rules created for a highlighter will be emitted in the
  99302. order of the spec's properties. That means that for elements that
  99303. have multiple tags associated with them, styles defined further
  99304. down in the list will have a higher CSS precedence than styles
  99305. defined earlier.
  99306. */
  99307. static define(e, n) {
  99308. return new cy(e, n || {});
  99309. }
  99310. }
  99311. const VM = /* @__PURE__ */ Be.define(), Uoe = /* @__PURE__ */ Be.define({
  99312. combine(t) {
  99313. return t.length ? [t[0]] : null;
  99314. }
  99315. });
  99316. function E$(t) {
  99317. let e = t.facet(VM);
  99318. return e.length ? e : t.facet(Uoe);
  99319. }
  99320. function Xoe(t, e) {
  99321. let n = [Xlt], r;
  99322. return t instanceof cy && (t.module && n.push(De.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(Uoe.of(t)) : r ? n.push(VM.computeN([De.darkTheme], (i) => i.facet(De.darkTheme) == (r == "dark") ? [t] : [])) : n.push(VM.of(t)), n;
  99323. }
  99324. class Ult {
  99325. constructor(e) {
  99326. this.markCache = /* @__PURE__ */ Object.create(null), this.tree = nr(e.state), this.decorations = this.buildDeco(e, E$(e.state)), this.decoratedTo = e.viewport.to;
  99327. }
  99328. update(e) {
  99329. let n = nr(e.state), r = E$(e.state), i = r != E$(e.startState), { viewport: a } = e.view, o = e.changes.mapPos(this.decoratedTo, 1);
  99330. 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);
  99331. }
  99332. buildDeco(e, n) {
  99333. if (!n || !this.tree.length)
  99334. return Ze.none;
  99335. let r = new hu();
  99336. for (let { from: i, to: a } of e.visibleRanges)
  99337. ylt(this.tree, n, (o, s, l) => {
  99338. r.add(o, s, this.markCache[l] || (this.markCache[l] = Ze.mark({ class: l })));
  99339. }, i, a);
  99340. return r.finish();
  99341. }
  99342. }
  99343. const Xlt = /* @__PURE__ */ Eu.high(/* @__PURE__ */ kn.fromClass(Ult, {
  99344. decorations: (t) => t.decorations
  99345. })), Ylt = /* @__PURE__ */ cy.define([
  99346. {
  99347. tag: J.meta,
  99348. color: "#404740"
  99349. },
  99350. {
  99351. tag: J.link,
  99352. textDecoration: "underline"
  99353. },
  99354. {
  99355. tag: J.heading,
  99356. textDecoration: "underline",
  99357. fontWeight: "bold"
  99358. },
  99359. {
  99360. tag: J.emphasis,
  99361. fontStyle: "italic"
  99362. },
  99363. {
  99364. tag: J.strong,
  99365. fontWeight: "bold"
  99366. },
  99367. {
  99368. tag: J.strikethrough,
  99369. textDecoration: "line-through"
  99370. },
  99371. {
  99372. tag: J.keyword,
  99373. color: "#708"
  99374. },
  99375. {
  99376. tag: [J.atom, J.bool, J.url, J.contentSeparator, J.labelName],
  99377. color: "#219"
  99378. },
  99379. {
  99380. tag: [J.literal, J.inserted],
  99381. color: "#164"
  99382. },
  99383. {
  99384. tag: [J.string, J.deleted],
  99385. color: "#a11"
  99386. },
  99387. {
  99388. tag: [J.regexp, J.escape, /* @__PURE__ */ J.special(J.string)],
  99389. color: "#e40"
  99390. },
  99391. {
  99392. tag: /* @__PURE__ */ J.definition(J.variableName),
  99393. color: "#00f"
  99394. },
  99395. {
  99396. tag: /* @__PURE__ */ J.local(J.variableName),
  99397. color: "#30a"
  99398. },
  99399. {
  99400. tag: [J.typeName, J.namespace],
  99401. color: "#085"
  99402. },
  99403. {
  99404. tag: J.className,
  99405. color: "#167"
  99406. },
  99407. {
  99408. tag: [/* @__PURE__ */ J.special(J.variableName), J.macroName],
  99409. color: "#256"
  99410. },
  99411. {
  99412. tag: /* @__PURE__ */ J.definition(J.propertyName),
  99413. color: "#00c"
  99414. },
  99415. {
  99416. tag: J.comment,
  99417. color: "#940"
  99418. },
  99419. {
  99420. tag: J.invalid,
  99421. color: "#f00"
  99422. }
  99423. ]), qlt = /* @__PURE__ */ De.baseTheme({
  99424. "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
  99425. "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
  99426. }), Yoe = 1e4, qoe = "()[]{}", Koe = /* @__PURE__ */ Be.define({
  99427. combine(t) {
  99428. return fs(t, {
  99429. afterCursor: !0,
  99430. brackets: qoe,
  99431. maxScanDistance: Yoe,
  99432. renderMatch: eut
  99433. });
  99434. }
  99435. }), Klt = /* @__PURE__ */ Ze.mark({ class: "cm-matchingBracket" }), Jlt = /* @__PURE__ */ Ze.mark({ class: "cm-nonmatchingBracket" });
  99436. function eut(t) {
  99437. let e = [], n = t.matched ? Klt : Jlt;
  99438. return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
  99439. }
  99440. const tut = /* @__PURE__ */ ur.define({
  99441. create() {
  99442. return Ze.none;
  99443. },
  99444. update(t, e) {
  99445. if (!e.docChanged && !e.selection)
  99446. return t;
  99447. let n = [], r = e.state.facet(Koe);
  99448. for (let i of e.state.selection.ranges) {
  99449. if (!i.empty)
  99450. continue;
  99451. let a = Ho(e.state, i.head, -1, r) || i.head > 0 && Ho(e.state, i.head - 1, 1, r) || r.afterCursor && (Ho(e.state, i.head, 1, r) || i.head < e.state.doc.length && Ho(e.state, i.head + 1, -1, r));
  99452. a && (n = n.concat(r.renderMatch(a, e.state)));
  99453. }
  99454. return Ze.set(n, !0);
  99455. },
  99456. provide: (t) => De.decorations.from(t)
  99457. }), nut = [
  99458. tut,
  99459. qlt
  99460. ];
  99461. function rut(t = {}) {
  99462. return [Koe.of(t), nut];
  99463. }
  99464. const iut = /* @__PURE__ */ new Pt();
  99465. function FM(t, e, n) {
  99466. let r = t.prop(e < 0 ? Pt.openedBy : Pt.closedBy);
  99467. if (r)
  99468. return r;
  99469. if (t.name.length == 1) {
  99470. let i = n.indexOf(t.name);
  99471. if (i > -1 && i % 2 == (e < 0 ? 1 : 0))
  99472. return [n[i + e]];
  99473. }
  99474. return null;
  99475. }
  99476. function WM(t) {
  99477. let e = t.type.prop(iut);
  99478. return e ? e(t.node) : t;
  99479. }
  99480. function Ho(t, e, n, r = {}) {
  99481. let i = r.maxScanDistance || Yoe, a = r.brackets || qoe, o = nr(t), s = o.resolveInner(e, n);
  99482. for (let l = s; l; l = l.parent) {
  99483. let u = FM(l.type, n, a);
  99484. if (u && l.from < l.to) {
  99485. let c = WM(l);
  99486. if (c && (n > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to))
  99487. return aut(t, e, n, l, c, u, a);
  99488. }
  99489. }
  99490. return out(t, e, n, o, s.type, i, a);
  99491. }
  99492. function aut(t, e, n, r, i, a, o) {
  99493. let s = r.parent, l = { from: i.from, to: i.to }, u = 0, c = s == null ? void 0 : s.cursor();
  99494. if (c && (n < 0 ? c.childBefore(r.from) : c.childAfter(r.to)))
  99495. do
  99496. if (n < 0 ? c.to <= r.from : c.from >= r.to) {
  99497. if (u == 0 && a.indexOf(c.type.name) > -1 && c.from < c.to) {
  99498. let f = WM(c);
  99499. return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
  99500. } else if (FM(c.type, n, o))
  99501. u++;
  99502. else if (FM(c.type, -n, o)) {
  99503. if (u == 0) {
  99504. let f = WM(c);
  99505. return {
  99506. start: l,
  99507. end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0,
  99508. matched: !1
  99509. };
  99510. }
  99511. u--;
  99512. }
  99513. }
  99514. while (n < 0 ? c.prevSibling() : c.nextSibling());
  99515. return { start: l, matched: !1 };
  99516. }
  99517. function out(t, e, n, r, i, a, o) {
  99518. let s = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(s);
  99519. if (l < 0 || l % 2 == 0 != n > 0)
  99520. return null;
  99521. 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;
  99522. for (let d = 0; !c.next().done && d <= a; ) {
  99523. let h = c.value;
  99524. n < 0 && (d += h.length);
  99525. let p = e + d * n;
  99526. for (let v = n > 0 ? 0 : h.length - 1, g = n > 0 ? h.length : -1; v != g; v += n) {
  99527. let m = o.indexOf(h[v]);
  99528. if (!(m < 0 || r.resolveInner(p + v, 1).type != i))
  99529. if (m % 2 == 0 == n > 0)
  99530. f++;
  99531. else {
  99532. if (f == 1)
  99533. return { start: u, end: { from: p + v, to: p + v + 1 }, matched: m >> 1 == l >> 1 };
  99534. f--;
  99535. }
  99536. }
  99537. n > 0 && (d += h.length);
  99538. }
  99539. return c.done ? { start: u, matched: !1 } : null;
  99540. }
  99541. const sut = /* @__PURE__ */ Object.create(null), MG = [Ci.none], IG = [], DG = /* @__PURE__ */ Object.create(null), lut = /* @__PURE__ */ Object.create(null);
  99542. for (let [t, e] of [
  99543. ["variable", "variableName"],
  99544. ["variable-2", "variableName.special"],
  99545. ["string-2", "string.special"],
  99546. ["def", "variableName.definition"],
  99547. ["tag", "tagName"],
  99548. ["attribute", "attributeName"],
  99549. ["type", "typeName"],
  99550. ["builtin", "variableName.standard"],
  99551. ["qualifier", "modifier"],
  99552. ["error", "invalid"],
  99553. ["header", "heading"],
  99554. ["property", "propertyName"]
  99555. ])
  99556. lut[t] = /* @__PURE__ */ uut(sut, e);
  99557. function M$(t, e) {
  99558. IG.indexOf(t) > -1 || (IG.push(t), console.warn(e));
  99559. }
  99560. function uut(t, e) {
  99561. let n = [];
  99562. for (let s of e.split(" ")) {
  99563. let l = [];
  99564. for (let u of s.split(".")) {
  99565. let c = t[u] || J[u];
  99566. c ? typeof c == "function" ? l.length ? l = l.map(c) : M$(u, `Modifier ${u} used at start of tag`) : l.length ? M$(u, `Tag ${u} used as modifier`) : l = Array.isArray(c) ? c : [c] : M$(u, `Unknown highlighting tag ${u}`);
  99567. }
  99568. for (let u of l)
  99569. n.push(u);
  99570. }
  99571. if (!n.length)
  99572. return 0;
  99573. let r = e.replace(/ /g, "_"), i = r + " " + n.map((s) => s.id), a = DG[i];
  99574. if (a)
  99575. return a.id;
  99576. let o = DG[i] = Ci.define({
  99577. id: MG.length,
  99578. name: r,
  99579. props: [p4({ [r]: n })]
  99580. });
  99581. return MG.push(o), o.id;
  99582. }
  99583. pn.RTL, pn.LTR;
  99584. const cut = (t) => {
  99585. let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), r = O4(t.state, n.from);
  99586. return r.line ? fut(t) : r.block ? hut(t) : !1;
  99587. };
  99588. function _4(t, e) {
  99589. return ({ state: n, dispatch: r }) => {
  99590. if (n.readOnly)
  99591. return !1;
  99592. let i = t(e, n);
  99593. return i ? (r(n.update(i)), !0) : !1;
  99594. };
  99595. }
  99596. const fut = /* @__PURE__ */ _4(
  99597. gut,
  99598. 0
  99599. /* CommentOption.Toggle */
  99600. ), dut = /* @__PURE__ */ _4(
  99601. Joe,
  99602. 0
  99603. /* CommentOption.Toggle */
  99604. ), hut = /* @__PURE__ */ _4(
  99605. (t, e) => Joe(t, e, vut(e)),
  99606. 0
  99607. /* CommentOption.Toggle */
  99608. );
  99609. function O4(t, e) {
  99610. let n = t.languageDataAt("commentTokens", e);
  99611. return n.length ? n[0] : {};
  99612. }
  99613. const Iv = 50;
  99614. function put(t, { open: e, close: n }, r, i) {
  99615. let a = t.sliceDoc(r - Iv, r), o = t.sliceDoc(i, i + Iv), s = /\s*$/.exec(a)[0].length, l = /^\s*/.exec(o)[0].length, u = a.length - s;
  99616. if (a.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
  99617. return {
  99618. open: { pos: r - s, margin: s && 1 },
  99619. close: { pos: i + l, margin: l && 1 }
  99620. };
  99621. let c, f;
  99622. i - r <= 2 * Iv ? c = f = t.sliceDoc(r, i) : (c = t.sliceDoc(r, r + Iv), f = t.sliceDoc(i - Iv, i));
  99623. let d = /^\s*/.exec(c)[0].length, h = /\s*$/.exec(f)[0].length, p = f.length - h - n.length;
  99624. return c.slice(d, d + e.length) == e && f.slice(p, p + n.length) == n ? {
  99625. open: {
  99626. pos: r + d + e.length,
  99627. margin: /\s/.test(c.charAt(d + e.length)) ? 1 : 0
  99628. },
  99629. close: {
  99630. pos: i - h - n.length,
  99631. margin: /\s/.test(f.charAt(p - 1)) ? 1 : 0
  99632. }
  99633. } : null;
  99634. }
  99635. function vut(t) {
  99636. let e = [];
  99637. for (let n of t.selection.ranges) {
  99638. let r = t.doc.lineAt(n.from), i = n.to <= r.to ? r : t.doc.lineAt(n.to), a = e.length - 1;
  99639. 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 });
  99640. }
  99641. return e;
  99642. }
  99643. function Joe(t, e, n = e.selection.ranges) {
  99644. let r = n.map((a) => O4(e, a.from).block);
  99645. if (!r.every((a) => a))
  99646. return null;
  99647. let i = n.map((a, o) => put(e, r[o], a.from, a.to));
  99648. if (t != 2 && !i.every((a) => a))
  99649. return { changes: e.changes(n.map((a, o) => i[o] ? [] : [{ from: a.from, insert: r[o].open + " " }, { from: a.to, insert: " " + r[o].close }])) };
  99650. if (t != 1 && i.some((a) => a)) {
  99651. let a = [];
  99652. for (let o = 0, s; o < i.length; o++)
  99653. if (s = i[o]) {
  99654. let l = r[o], { open: u, close: c } = s;
  99655. a.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: c.pos - c.margin, to: c.pos + l.close.length });
  99656. }
  99657. return { changes: a };
  99658. }
  99659. return null;
  99660. }
  99661. function gut(t, e, n = e.selection.ranges) {
  99662. let r = [], i = -1;
  99663. for (let { from: a, to: o } of n) {
  99664. let s = r.length, l = 1e9, u = O4(e, a).line;
  99665. if (u) {
  99666. for (let c = a; c <= o; ) {
  99667. let f = e.doc.lineAt(c);
  99668. if (f.from > i && (a == o || o > f.from)) {
  99669. i = f.from;
  99670. let d = /^\s*/.exec(f.text)[0].length, h = d == f.length, p = f.text.slice(d, d + u.length) == u ? d : -1;
  99671. d < f.text.length && d < l && (l = d), r.push({ line: f, comment: p, token: u, indent: d, empty: h, single: !1 });
  99672. }
  99673. c = f.to + 1;
  99674. }
  99675. if (l < 1e9)
  99676. for (let c = s; c < r.length; c++)
  99677. r[c].indent < r[c].line.text.length && (r[c].indent = l);
  99678. r.length == s + 1 && (r[s].single = !0);
  99679. }
  99680. }
  99681. if (t != 2 && r.some((a) => a.comment < 0 && (!a.empty || a.single))) {
  99682. let a = [];
  99683. for (let { line: s, token: l, indent: u, empty: c, single: f } of r)
  99684. (f || !c) && a.push({ from: s.from + u, insert: l + " " });
  99685. let o = e.changes(a);
  99686. return { changes: o, selection: e.selection.map(o, 1) };
  99687. } else if (t != 1 && r.some((a) => a.comment >= 0)) {
  99688. let a = [];
  99689. for (let { line: o, comment: s, token: l } of r)
  99690. if (s >= 0) {
  99691. let u = o.from + s, c = u + l.length;
  99692. o.text[c - o.from] == " " && c++, a.push({ from: u, to: c });
  99693. }
  99694. return { changes: a };
  99695. }
  99696. return null;
  99697. }
  99698. const QM = /* @__PURE__ */ ul.define(), mut = /* @__PURE__ */ ul.define(), yut = /* @__PURE__ */ Be.define(), ese = /* @__PURE__ */ Be.define({
  99699. combine(t) {
  99700. return fs(t, {
  99701. minDepth: 100,
  99702. newGroupDelay: 500,
  99703. joinToEvent: (e, n) => n
  99704. }, {
  99705. minDepth: Math.max,
  99706. newGroupDelay: Math.min,
  99707. joinToEvent: (e, n) => (r, i) => e(r, i) || n(r, i)
  99708. });
  99709. }
  99710. }), tse = /* @__PURE__ */ ur.define({
  99711. create() {
  99712. return Go.empty;
  99713. },
  99714. update(t, e) {
  99715. let n = e.state.facet(ese), r = e.annotation(QM);
  99716. if (r) {
  99717. let l = yi.fromTransaction(e, r.selection), u = r.side, c = u == 0 ? t.undone : t.done;
  99718. return l ? c = pS(c, c.length, n.minDepth, l) : c = ise(c, e.startState.selection), new Go(u == 0 ? r.rest : c, u == 0 ? c : r.rest);
  99719. }
  99720. let i = e.annotation(mut);
  99721. if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Fn.addToHistory) === !1)
  99722. return e.changes.empty ? t : t.addMapping(e.changes.desc);
  99723. let a = yi.fromTransaction(e), o = e.annotation(Fn.time), s = e.annotation(Fn.userEvent);
  99724. 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;
  99725. },
  99726. toJSON(t) {
  99727. return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
  99728. },
  99729. fromJSON(t) {
  99730. return new Go(t.done.map(yi.fromJSON), t.undone.map(yi.fromJSON));
  99731. }
  99732. });
  99733. function but(t = {}) {
  99734. return [
  99735. tse,
  99736. ese.of(t),
  99737. De.domEventHandlers({
  99738. beforeinput(e, n) {
  99739. let r = e.inputType == "historyUndo" ? nse : e.inputType == "historyRedo" ? HM : null;
  99740. return r ? (e.preventDefault(), r(n)) : !1;
  99741. }
  99742. })
  99743. ];
  99744. }
  99745. function Nw(t, e) {
  99746. return function({ state: n, dispatch: r }) {
  99747. if (!e && n.readOnly)
  99748. return !1;
  99749. let i = n.field(tse, !1);
  99750. if (!i)
  99751. return !1;
  99752. let a = i.pop(t, n, e);
  99753. return a ? (r(a), !0) : !1;
  99754. };
  99755. }
  99756. const nse = /* @__PURE__ */ Nw(0, !1), HM = /* @__PURE__ */ Nw(1, !1), _ut = /* @__PURE__ */ Nw(0, !0), Out = /* @__PURE__ */ Nw(1, !0);
  99757. class yi {
  99758. constructor(e, n, r, i, a) {
  99759. this.changes = e, this.effects = n, this.mapped = r, this.startSelection = i, this.selectionsAfter = a;
  99760. }
  99761. setSelAfter(e) {
  99762. return new yi(this.changes, this.effects, this.mapped, this.startSelection, e);
  99763. }
  99764. toJSON() {
  99765. var e, n, r;
  99766. return {
  99767. changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
  99768. mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
  99769. startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(),
  99770. selectionsAfter: this.selectionsAfter.map((i) => i.toJSON())
  99771. };
  99772. }
  99773. static fromJSON(e) {
  99774. return new yi(e.changes && jn.fromJSON(e.changes), [], e.mapped && Yo.fromJSON(e.mapped), e.startSelection && me.fromJSON(e.startSelection), e.selectionsAfter.map(me.fromJSON));
  99775. }
  99776. // This does not check `addToHistory` and such, it assumes the
  99777. // transaction needs to be converted to an item. Returns null when
  99778. // there are no changes or effects in the transaction.
  99779. static fromTransaction(e, n) {
  99780. let r = ya;
  99781. for (let i of e.startState.facet(yut)) {
  99782. let a = i(e);
  99783. a.length && (r = r.concat(a));
  99784. }
  99785. return !r.length && e.changes.empty ? null : new yi(e.changes.invert(e.startState.doc), r, void 0, n || e.startState.selection, ya);
  99786. }
  99787. static selection(e) {
  99788. return new yi(void 0, ya, void 0, void 0, e);
  99789. }
  99790. }
  99791. function pS(t, e, n, r) {
  99792. let i = e + 1 > n + 20 ? e - n - 1 : 0, a = t.slice(i, e);
  99793. return a.push(r), a;
  99794. }
  99795. function Sut(t, e) {
  99796. let n = [], r = !1;
  99797. return t.iterChangedRanges((i, a) => n.push(i, a)), e.iterChangedRanges((i, a, o, s) => {
  99798. for (let l = 0; l < n.length; ) {
  99799. let u = n[l++], c = n[l++];
  99800. s >= u && o <= c && (r = !0);
  99801. }
  99802. }), r;
  99803. }
  99804. function xut(t, e) {
  99805. return t.ranges.length == e.ranges.length && t.ranges.filter((n, r) => n.empty != e.ranges[r].empty).length === 0;
  99806. }
  99807. function rse(t, e) {
  99808. return t.length ? e.length ? t.concat(e) : t : e;
  99809. }
  99810. const ya = [], wut = 200;
  99811. function ise(t, e) {
  99812. if (t.length) {
  99813. let n = t[t.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - wut));
  99814. return r.length && r[r.length - 1].eq(e) ? t : (r.push(e), pS(t, t.length - 1, 1e9, n.setSelAfter(r)));
  99815. } else
  99816. return [yi.selection([e])];
  99817. }
  99818. function Cut(t) {
  99819. let e = t[t.length - 1], n = t.slice();
  99820. return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
  99821. }
  99822. function I$(t, e) {
  99823. if (!t.length)
  99824. return t;
  99825. let n = t.length, r = ya;
  99826. for (; n; ) {
  99827. let i = Tut(t[n - 1], e, r);
  99828. if (i.changes && !i.changes.empty || i.effects.length) {
  99829. let a = t.slice(0, n);
  99830. return a[n - 1] = i, a;
  99831. } else
  99832. e = i.mapped, n--, r = i.selectionsAfter;
  99833. }
  99834. return r.length ? [yi.selection(r)] : ya;
  99835. }
  99836. function Tut(t, e, n) {
  99837. let r = rse(t.selectionsAfter.length ? t.selectionsAfter.map((s) => s.map(e)) : ya, n);
  99838. if (!t.changes)
  99839. return yi.selection(r);
  99840. let i = t.changes.map(e), a = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(a) : a;
  99841. return new yi(i, dt.mapEffects(t.effects, e), o, t.startSelection.map(a), r);
  99842. }
  99843. const Put = /^(input\.type|delete)($|\.)/;
  99844. class Go {
  99845. constructor(e, n, r = 0, i = void 0) {
  99846. this.done = e, this.undone = n, this.prevTime = r, this.prevUserEvent = i;
  99847. }
  99848. isolate() {
  99849. return this.prevTime ? new Go(this.done, this.undone) : this;
  99850. }
  99851. addChanges(e, n, r, i, a) {
  99852. let o = this.done, s = o[o.length - 1];
  99853. return s && s.changes && !s.changes.empty && e.changes && (!r || Put.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, Sut(s.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
  99854. r == "input.type.compose") ? o = pS(o, o.length - 1, i.minDepth, new yi(e.changes.compose(s.changes), rse(e.effects, s.effects), s.mapped, s.startSelection, ya)) : o = pS(o, o.length, i.minDepth, e), new Go(o, ya, n, r);
  99855. }
  99856. addSelection(e, n, r, i) {
  99857. let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : ya;
  99858. return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && xut(a[a.length - 1], e) ? this : new Go(ise(this.done, e), this.undone, n, r);
  99859. }
  99860. addMapping(e) {
  99861. return new Go(I$(this.done, e), I$(this.undone, e), this.prevTime, this.prevUserEvent);
  99862. }
  99863. pop(e, n, r) {
  99864. let i = e == 0 ? this.done : this.undone;
  99865. if (i.length == 0)
  99866. return null;
  99867. let a = i[i.length - 1], o = a.selectionsAfter[0] || n.selection;
  99868. if (r && a.selectionsAfter.length)
  99869. return n.update({
  99870. selection: a.selectionsAfter[a.selectionsAfter.length - 1],
  99871. annotations: QM.of({ side: e, rest: Cut(i), selection: o }),
  99872. userEvent: e == 0 ? "select.undo" : "select.redo",
  99873. scrollIntoView: !0
  99874. });
  99875. if (a.changes) {
  99876. let s = i.length == 1 ? ya : i.slice(0, i.length - 1);
  99877. return a.mapped && (s = I$(s, a.mapped)), n.update({
  99878. changes: a.changes,
  99879. selection: a.startSelection,
  99880. effects: a.effects,
  99881. annotations: QM.of({ side: e, rest: s, selection: o }),
  99882. filter: !1,
  99883. userEvent: e == 0 ? "undo" : "redo",
  99884. scrollIntoView: !0
  99885. });
  99886. } else
  99887. return null;
  99888. }
  99889. }
  99890. Go.empty = /* @__PURE__ */ new Go(ya, ya);
  99891. const $ut = [
  99892. { key: "Mod-z", run: nse, preventDefault: !0 },
  99893. { key: "Mod-y", mac: "Mod-Shift-z", run: HM, preventDefault: !0 },
  99894. { linux: "Ctrl-Shift-z", run: HM, preventDefault: !0 },
  99895. { key: "Mod-u", run: _ut, preventDefault: !0 },
  99896. { key: "Alt-u", mac: "Mod-Shift-u", run: Out, preventDefault: !0 }
  99897. ];
  99898. function kp(t, e) {
  99899. return me.create(t.ranges.map(e), t.mainIndex);
  99900. }
  99901. function hs(t, e) {
  99902. return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
  99903. }
  99904. function yo({ state: t, dispatch: e }, n) {
  99905. let r = kp(t.selection, n);
  99906. return r.eq(t.selection, !0) ? !1 : (e(hs(t, r)), !0);
  99907. }
  99908. function Bw(t, e) {
  99909. return me.cursor(e ? t.to : t.from);
  99910. }
  99911. function ase(t, e) {
  99912. return yo(t, (n) => n.empty ? t.moveByChar(n, e) : Bw(n, e));
  99913. }
  99914. function zr(t) {
  99915. return t.textDirectionAt(t.state.selection.main.head) == pn.LTR;
  99916. }
  99917. const ose = (t) => ase(t, !zr(t)), sse = (t) => ase(t, zr(t));
  99918. function lse(t, e) {
  99919. return yo(t, (n) => n.empty ? t.moveByGroup(n, e) : Bw(n, e));
  99920. }
  99921. const Aut = (t) => lse(t, !zr(t)), Eut = (t) => lse(t, zr(t));
  99922. function Mut(t, e, n) {
  99923. if (e.type.prop(n))
  99924. return !0;
  99925. let r = e.to - e.from;
  99926. return r && (r > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
  99927. }
  99928. function zw(t, e, n) {
  99929. let r = nr(t).resolveInner(e.head), i = n ? Pt.closedBy : Pt.openedBy;
  99930. for (let l = e.head; ; ) {
  99931. let u = n ? r.childAfter(l) : r.childBefore(l);
  99932. if (!u)
  99933. break;
  99934. Mut(t, u, i) ? r = u : l = n ? u.to : u.from;
  99935. }
  99936. let a = r.type.prop(i), o, s;
  99937. return a && (o = n ? Ho(t, r.from, 1) : Ho(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);
  99938. }
  99939. const Iut = (t) => yo(t, (e) => zw(t.state, e, !zr(t))), Dut = (t) => yo(t, (e) => zw(t.state, e, zr(t)));
  99940. function use(t, e) {
  99941. return yo(t, (n) => {
  99942. if (!n.empty)
  99943. return Bw(n, e);
  99944. let r = t.moveVertically(n, e);
  99945. return r.head != n.head ? r : t.moveToLineBoundary(n, e);
  99946. });
  99947. }
  99948. const cse = (t) => use(t, !1), fse = (t) => use(t, !0);
  99949. function dse(t) {
  99950. let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
  99951. if (e) {
  99952. for (let a of t.state.facet(De.scrollMargins)) {
  99953. let o = a(t);
  99954. 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));
  99955. }
  99956. i = t.scrollDOM.clientHeight - n - r;
  99957. } else
  99958. i = (t.dom.ownerDocument.defaultView || window).innerHeight;
  99959. return {
  99960. marginTop: n,
  99961. marginBottom: r,
  99962. selfScroll: e,
  99963. height: Math.max(t.defaultLineHeight, i - 5)
  99964. };
  99965. }
  99966. function hse(t, e) {
  99967. let n = dse(t), { state: r } = t, i = kp(r.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : Bw(o, e));
  99968. if (i.eq(r.selection))
  99969. return !1;
  99970. let a;
  99971. if (n.selfScroll) {
  99972. let o = t.coordsAtPos(r.selection.main.head), s = t.scrollDOM.getBoundingClientRect(), l = s.top + n.marginTop, u = s.bottom - n.marginBottom;
  99973. o && o.top > l && o.bottom < u && (a = De.scrollIntoView(i.main.head, { y: "start", yMargin: o.top - l }));
  99974. }
  99975. return t.dispatch(hs(r, i), { effects: a }), !0;
  99976. }
  99977. const RG = (t) => hse(t, !1), GM = (t) => hse(t, !0);
  99978. function Mu(t, e, n) {
  99979. let r = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, n);
  99980. 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) {
  99981. let a = /^\s*/.exec(t.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
  99982. a && e.head != r.from + a && (i = me.cursor(r.from + a));
  99983. }
  99984. return i;
  99985. }
  99986. const Rut = (t) => yo(t, (e) => Mu(t, e, !0)), kut = (t) => yo(t, (e) => Mu(t, e, !1)), Lut = (t) => yo(t, (e) => Mu(t, e, !zr(t))), Nut = (t) => yo(t, (e) => Mu(t, e, zr(t))), But = (t) => yo(t, (e) => me.cursor(t.lineBlockAt(e.head).from, 1)), zut = (t) => yo(t, (e) => me.cursor(t.lineBlockAt(e.head).to, -1));
  99987. function Vut(t, e, n) {
  99988. let r = !1, i = kp(t.selection, (a) => {
  99989. let o = Ho(t, a.head, -1) || Ho(t, a.head, 1) || a.head > 0 && Ho(t, a.head - 1, 1) || a.head < t.doc.length && Ho(t, a.head + 1, -1);
  99990. if (!o || !o.end)
  99991. return a;
  99992. r = !0;
  99993. let s = o.start.from == a.head ? o.end.to : o.end.from;
  99994. return me.cursor(s);
  99995. });
  99996. return r ? (e(hs(t, i)), !0) : !1;
  99997. }
  99998. const Fut = ({ state: t, dispatch: e }) => Vut(t, e);
  99999. function za(t, e) {
  100000. let n = kp(t.state.selection, (r) => {
  100001. let i = e(r);
  100002. return me.range(r.anchor, i.head, i.goalColumn, i.bidiLevel || void 0);
  100003. });
  100004. return n.eq(t.state.selection) ? !1 : (t.dispatch(hs(t.state, n)), !0);
  100005. }
  100006. function pse(t, e) {
  100007. return za(t, (n) => t.moveByChar(n, e));
  100008. }
  100009. const vse = (t) => pse(t, !zr(t)), gse = (t) => pse(t, zr(t));
  100010. function mse(t, e) {
  100011. return za(t, (n) => t.moveByGroup(n, e));
  100012. }
  100013. const Wut = (t) => mse(t, !zr(t)), Qut = (t) => mse(t, zr(t)), Hut = (t) => za(t, (e) => zw(t.state, e, !zr(t))), Gut = (t) => za(t, (e) => zw(t.state, e, zr(t)));
  100014. function yse(t, e) {
  100015. return za(t, (n) => t.moveVertically(n, e));
  100016. }
  100017. const bse = (t) => yse(t, !1), _se = (t) => yse(t, !0);
  100018. function Ose(t, e) {
  100019. return za(t, (n) => t.moveVertically(n, e, dse(t).height));
  100020. }
  100021. const kG = (t) => Ose(t, !1), LG = (t) => Ose(t, !0), jut = (t) => za(t, (e) => Mu(t, e, !0)), Zut = (t) => za(t, (e) => Mu(t, e, !1)), Uut = (t) => za(t, (e) => Mu(t, e, !zr(t))), Xut = (t) => za(t, (e) => Mu(t, e, zr(t))), Yut = (t) => za(t, (e) => me.cursor(t.lineBlockAt(e.head).from)), qut = (t) => za(t, (e) => me.cursor(t.lineBlockAt(e.head).to)), NG = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: 0 })), !0), BG = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.doc.length })), !0), zG = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.selection.main.anchor, head: 0 })), !0), VG = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), Kut = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), Jut = ({ state: t, dispatch: e }) => {
  100022. let n = Vw(t).map(({ from: r, to: i }) => me.range(r, Math.min(i + 1, t.doc.length)));
  100023. return e(t.update({ selection: me.create(n), userEvent: "select" })), !0;
  100024. }, ect = ({ state: t, dispatch: e }) => {
  100025. let n = kp(t.selection, (r) => {
  100026. var i;
  100027. let a = nr(t).resolveStack(r.from, 1);
  100028. for (let o = a; o; o = o.next) {
  100029. let { node: s } = o;
  100030. 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))
  100031. return me.range(s.to, s.from);
  100032. }
  100033. return r;
  100034. });
  100035. return e(hs(t, n)), !0;
  100036. }, tct = ({ state: t, dispatch: e }) => {
  100037. let n = t.selection, r = null;
  100038. return n.ranges.length > 1 ? r = me.create([n.main]) : n.main.empty || (r = me.create([me.cursor(n.main.head)])), r ? (e(hs(t, r)), !0) : !1;
  100039. };
  100040. function fy(t, e) {
  100041. if (t.state.readOnly)
  100042. return !1;
  100043. let n = "delete.selection", { state: r } = t, i = r.changeByRange((a) => {
  100044. let { from: o, to: s } = a;
  100045. if (o == s) {
  100046. let l = e(a);
  100047. l < o ? (n = "delete.backward", l = o_(t, l, !1)) : l > o && (n = "delete.forward", l = o_(t, l, !0)), o = Math.min(o, l), s = Math.max(s, l);
  100048. } else
  100049. o = o_(t, o, !1), s = o_(t, s, !0);
  100050. return o == s ? { range: a } : { changes: { from: o, to: s }, range: me.cursor(o, o < a.head ? -1 : 1) };
  100051. });
  100052. return i.changes.empty ? !1 : (t.dispatch(r.update(i, {
  100053. scrollIntoView: !0,
  100054. userEvent: n,
  100055. effects: n == "delete.selection" ? De.announce.of(r.phrase("Selection deleted")) : void 0
  100056. })), !0);
  100057. }
  100058. function o_(t, e, n) {
  100059. if (t instanceof De)
  100060. for (let r of t.state.facet(De.atomicRanges).map((i) => i(t)))
  100061. r.between(e, e, (i, a) => {
  100062. i < e && a > e && (e = n ? a : i);
  100063. });
  100064. return e;
  100065. }
  100066. const Sse = (t, e, n) => fy(t, (r) => {
  100067. let i = r.from, { state: a } = t, o = a.doc.lineAt(i), s, l;
  100068. if (n && !e && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
  100069. if (s[s.length - 1] == " ")
  100070. return i - 1;
  100071. let u = Rp(s, a.tabSize), c = u % fS(a) || fS(a);
  100072. for (let f = 0; f < c && s[s.length - 1 - f] == " "; f++)
  100073. i--;
  100074. l = i;
  100075. } else
  100076. 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);
  100077. return l;
  100078. }), jM = (t) => Sse(t, !1, !0), xse = (t) => Sse(t, !0, !1), wse = (t, e) => fy(t, (n) => {
  100079. let r = n.head, { state: i } = t, a = i.doc.lineAt(r), o = i.charCategorizer(r);
  100080. for (let s = null; ; ) {
  100081. if (r == (e ? a.to : a.from)) {
  100082. r == n.head && a.number != (e ? i.doc.lines : 1) && (r += e ? 1 : -1);
  100083. break;
  100084. }
  100085. 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);
  100086. if (s != null && c != s)
  100087. break;
  100088. (u != " " || r != n.head) && (s = c), r = l;
  100089. }
  100090. return r;
  100091. }), Cse = (t) => wse(t, !1), nct = (t) => wse(t, !0), rct = (t) => fy(t, (e) => {
  100092. let n = t.lineBlockAt(e.head).to;
  100093. return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
  100094. }), ict = (t) => fy(t, (e) => {
  100095. let n = t.moveToLineBoundary(e, !1).head;
  100096. return e.head > n ? n : Math.max(0, e.head - 1);
  100097. }), act = (t) => fy(t, (e) => {
  100098. let n = t.moveToLineBoundary(e, !0).head;
  100099. return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
  100100. }), oct = ({ state: t, dispatch: e }) => {
  100101. if (t.readOnly)
  100102. return !1;
  100103. let n = t.changeByRange((r) => ({
  100104. changes: { from: r.from, to: r.to, insert: Ft.of(["", ""]) },
  100105. range: me.cursor(r.from)
  100106. }));
  100107. return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
  100108. }, sct = ({ state: t, dispatch: e }) => {
  100109. if (t.readOnly)
  100110. return !1;
  100111. let n = t.changeByRange((r) => {
  100112. if (!r.empty || r.from == 0 || r.from == t.doc.length)
  100113. return { range: r };
  100114. 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;
  100115. return {
  100116. changes: { from: o, to: s, insert: t.doc.slice(i, s).append(t.doc.slice(o, i)) },
  100117. range: me.cursor(s)
  100118. };
  100119. });
  100120. return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
  100121. };
  100122. function Vw(t) {
  100123. let e = [], n = -1;
  100124. for (let r of t.selection.ranges) {
  100125. let i = t.doc.lineAt(r.from), a = t.doc.lineAt(r.to);
  100126. if (!r.empty && r.to == a.from && (a = t.doc.lineAt(r.to - 1)), n >= i.number) {
  100127. let o = e[e.length - 1];
  100128. o.to = a.to, o.ranges.push(r);
  100129. } else
  100130. e.push({ from: i.from, to: a.to, ranges: [r] });
  100131. n = a.number + 1;
  100132. }
  100133. return e;
  100134. }
  100135. function Tse(t, e, n) {
  100136. if (t.readOnly)
  100137. return !1;
  100138. let r = [], i = [];
  100139. for (let a of Vw(t)) {
  100140. if (n ? a.to == t.doc.length : a.from == 0)
  100141. continue;
  100142. let o = t.doc.lineAt(n ? a.to + 1 : a.from - 1), s = o.length + 1;
  100143. if (n) {
  100144. r.push({ from: a.to, to: o.to }, { from: a.from, insert: o.text + t.lineBreak });
  100145. for (let l of a.ranges)
  100146. i.push(me.range(Math.min(t.doc.length, l.anchor + s), Math.min(t.doc.length, l.head + s)));
  100147. } else {
  100148. r.push({ from: o.from, to: a.from }, { from: a.to, insert: t.lineBreak + o.text });
  100149. for (let l of a.ranges)
  100150. i.push(me.range(l.anchor - s, l.head - s));
  100151. }
  100152. }
  100153. return r.length ? (e(t.update({
  100154. changes: r,
  100155. scrollIntoView: !0,
  100156. selection: me.create(i, t.selection.mainIndex),
  100157. userEvent: "move.line"
  100158. })), !0) : !1;
  100159. }
  100160. const lct = ({ state: t, dispatch: e }) => Tse(t, e, !1), uct = ({ state: t, dispatch: e }) => Tse(t, e, !0);
  100161. function Pse(t, e, n) {
  100162. if (t.readOnly)
  100163. return !1;
  100164. let r = [];
  100165. for (let i of Vw(t))
  100166. 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) });
  100167. return e(t.update({ changes: r, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
  100168. }
  100169. const cct = ({ state: t, dispatch: e }) => Pse(t, e, !1), fct = ({ state: t, dispatch: e }) => Pse(t, e, !0), dct = (t) => {
  100170. if (t.state.readOnly)
  100171. return !1;
  100172. let { state: e } = t, n = e.changes(Vw(e).map(({ from: i, to: a }) => (i > 0 ? i-- : a < e.doc.length && a++, { from: i, to: a }))), r = kp(e.selection, (i) => {
  100173. let a;
  100174. if (t.lineWrapping) {
  100175. let o = t.lineBlockAt(i.head), s = t.coordsAtPos(i.head, i.assoc || 1);
  100176. s && (a = o.bottom + t.documentTop - s.bottom + t.defaultLineHeight / 2);
  100177. }
  100178. return t.moveVertically(i, !0, a);
  100179. }).map(n);
  100180. return t.dispatch({ changes: n, selection: r, scrollIntoView: !0, userEvent: "delete.line" }), !0;
  100181. };
  100182. function hct(t, e) {
  100183. if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
  100184. return { from: e, to: e };
  100185. let n = nr(t).resolveInner(e), r = n.childBefore(e), i = n.childAfter(e), a;
  100186. 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;
  100187. }
  100188. const pct = /* @__PURE__ */ $se(!1), vct = /* @__PURE__ */ $se(!0);
  100189. function $se(t) {
  100190. return ({ state: e, dispatch: n }) => {
  100191. if (e.readOnly)
  100192. return !1;
  100193. let r = e.changeByRange((i) => {
  100194. let { from: a, to: o } = i, s = e.doc.lineAt(a), l = !t && a == o && hct(e, a);
  100195. t && (a = o = (o <= s.to ? s : e.doc.lineAt(o)).to);
  100196. let u = new kw(e, { simulateBreak: a, simulateDoubleBreak: !!l }), c = g4(u, a);
  100197. for (c == null && (c = Rp(/^\s*/.exec(e.doc.lineAt(a).text)[0], e.tabSize)); o < s.to && /\s/.test(s.text[o - s.from]); )
  100198. o++;
  100199. l ? { from: a, to: o } = l : a > s.from && a < s.from + 100 && !/\S/.test(s.text.slice(0, a)) && (a = s.from);
  100200. let f = ["", t0(e, c)];
  100201. return l && f.push(t0(e, u.lineIndent(s.from, -1))), {
  100202. changes: { from: a, to: o, insert: Ft.of(f) },
  100203. range: me.cursor(a + 1 + f[1].length)
  100204. };
  100205. });
  100206. return n(e.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
  100207. };
  100208. }
  100209. function S4(t, e) {
  100210. let n = -1;
  100211. return t.changeByRange((r) => {
  100212. let i = [];
  100213. for (let o = r.from; o <= r.to; ) {
  100214. let s = t.doc.lineAt(o);
  100215. s.number > n && (r.empty || r.to > s.from) && (e(s, i, r), n = s.number), o = s.to + 1;
  100216. }
  100217. let a = t.changes(i);
  100218. return {
  100219. changes: i,
  100220. range: me.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
  100221. };
  100222. });
  100223. }
  100224. const gct = ({ state: t, dispatch: e }) => {
  100225. if (t.readOnly)
  100226. return !1;
  100227. let n = /* @__PURE__ */ Object.create(null), r = new kw(t, { overrideIndentation: (a) => {
  100228. let o = n[a];
  100229. return o ?? -1;
  100230. } }), i = S4(t, (a, o, s) => {
  100231. let l = g4(r, a.from);
  100232. if (l == null)
  100233. return;
  100234. /\S/.test(a.text) || (l = 0);
  100235. let u = /^\s*/.exec(a.text)[0], c = t0(t, l);
  100236. (u != c || s.from < a.from + u.length) && (n[a.from] = l, o.push({ from: a.from, to: a.from + u.length, insert: c }));
  100237. });
  100238. return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0;
  100239. }, Ase = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(S4(t, (n, r) => {
  100240. r.push({ from: n.from, insert: t.facet(ly) });
  100241. }), { userEvent: "input.indent" })), !0), Ese = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(S4(t, (n, r) => {
  100242. let i = /^\s*/.exec(n.text)[0];
  100243. if (!i)
  100244. return;
  100245. let a = Rp(i, t.tabSize), o = 0, s = t0(t, Math.max(0, a - fS(t)));
  100246. for (; o < i.length && o < s.length && i.charCodeAt(o) == s.charCodeAt(o); )
  100247. o++;
  100248. r.push({ from: n.from + o, to: n.from + i.length, insert: s.slice(o) });
  100249. }), { userEvent: "delete.dedent" })), !0), mct = (t) => (t.setTabFocusMode(), !0), yct = [
  100250. { key: "Ctrl-b", run: ose, shift: vse, preventDefault: !0 },
  100251. { key: "Ctrl-f", run: sse, shift: gse },
  100252. { key: "Ctrl-p", run: cse, shift: bse },
  100253. { key: "Ctrl-n", run: fse, shift: _se },
  100254. { key: "Ctrl-a", run: But, shift: Yut },
  100255. { key: "Ctrl-e", run: zut, shift: qut },
  100256. { key: "Ctrl-d", run: xse },
  100257. { key: "Ctrl-h", run: jM },
  100258. { key: "Ctrl-k", run: rct },
  100259. { key: "Ctrl-Alt-h", run: Cse },
  100260. { key: "Ctrl-o", run: oct },
  100261. { key: "Ctrl-t", run: sct },
  100262. { key: "Ctrl-v", run: GM }
  100263. ], bct = /* @__PURE__ */ [
  100264. { key: "ArrowLeft", run: ose, shift: vse, preventDefault: !0 },
  100265. { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: Aut, shift: Wut, preventDefault: !0 },
  100266. { mac: "Cmd-ArrowLeft", run: Lut, shift: Uut, preventDefault: !0 },
  100267. { key: "ArrowRight", run: sse, shift: gse, preventDefault: !0 },
  100268. { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Eut, shift: Qut, preventDefault: !0 },
  100269. { mac: "Cmd-ArrowRight", run: Nut, shift: Xut, preventDefault: !0 },
  100270. { key: "ArrowUp", run: cse, shift: bse, preventDefault: !0 },
  100271. { mac: "Cmd-ArrowUp", run: NG, shift: zG },
  100272. { mac: "Ctrl-ArrowUp", run: RG, shift: kG },
  100273. { key: "ArrowDown", run: fse, shift: _se, preventDefault: !0 },
  100274. { mac: "Cmd-ArrowDown", run: BG, shift: VG },
  100275. { mac: "Ctrl-ArrowDown", run: GM, shift: LG },
  100276. { key: "PageUp", run: RG, shift: kG },
  100277. { key: "PageDown", run: GM, shift: LG },
  100278. { key: "Home", run: kut, shift: Zut, preventDefault: !0 },
  100279. { key: "Mod-Home", run: NG, shift: zG },
  100280. { key: "End", run: Rut, shift: jut, preventDefault: !0 },
  100281. { key: "Mod-End", run: BG, shift: VG },
  100282. { key: "Enter", run: pct },
  100283. { key: "Mod-a", run: Kut },
  100284. { key: "Backspace", run: jM, shift: jM },
  100285. { key: "Delete", run: xse },
  100286. { key: "Mod-Backspace", mac: "Alt-Backspace", run: Cse },
  100287. { key: "Mod-Delete", mac: "Alt-Delete", run: nct },
  100288. { mac: "Mod-Backspace", run: ict },
  100289. { mac: "Mod-Delete", run: act }
  100290. ].concat(/* @__PURE__ */ yct.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), _ct = /* @__PURE__ */ [
  100291. { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: Iut, shift: Hut },
  100292. { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: Dut, shift: Gut },
  100293. { key: "Alt-ArrowUp", run: lct },
  100294. { key: "Shift-Alt-ArrowUp", run: cct },
  100295. { key: "Alt-ArrowDown", run: uct },
  100296. { key: "Shift-Alt-ArrowDown", run: fct },
  100297. { key: "Escape", run: tct },
  100298. { key: "Mod-Enter", run: vct },
  100299. { key: "Alt-l", mac: "Ctrl-l", run: Jut },
  100300. { key: "Mod-i", run: ect, preventDefault: !0 },
  100301. { key: "Mod-[", run: Ese },
  100302. { key: "Mod-]", run: Ase },
  100303. { key: "Mod-Alt-\\", run: gct },
  100304. { key: "Shift-Mod-k", run: dct },
  100305. { key: "Shift-Mod-\\", run: Fut },
  100306. { key: "Mod-/", run: cut },
  100307. { key: "Alt-A", run: dut },
  100308. { key: "Ctrl-m", mac: "Shift-Alt-m", run: mct }
  100309. ].concat(bct), Oct = { key: "Tab", run: Ase, shift: Ese };
  100310. function on() {
  100311. var t = arguments[0];
  100312. typeof t == "string" && (t = document.createElement(t));
  100313. var e = 1, n = arguments[1];
  100314. if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
  100315. for (var r in n) if (Object.prototype.hasOwnProperty.call(n, r)) {
  100316. var i = n[r];
  100317. typeof i == "string" ? t.setAttribute(r, i) : i != null && (t[r] = i);
  100318. }
  100319. e++;
  100320. }
  100321. for (; e < arguments.length; e++) Mse(t, arguments[e]);
  100322. return t;
  100323. }
  100324. function Mse(t, e) {
  100325. if (typeof e == "string")
  100326. t.appendChild(document.createTextNode(e));
  100327. else if (e != null) if (e.nodeType != null)
  100328. t.appendChild(e);
  100329. else if (Array.isArray(e))
  100330. for (var n = 0; n < e.length; n++) Mse(t, e[n]);
  100331. else
  100332. throw new RangeError("Unsupported child node: " + e);
  100333. }
  100334. const FG = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
  100335. class Kh {
  100336. /**
  100337. Create a text cursor. The query is the search string, `from` to
  100338. `to` provides the region to search.
  100339. When `normalize` is given, it will be called, on both the query
  100340. string and the content it is matched against, before comparing.
  100341. You can, for example, create a case-insensitive search by
  100342. passing `s => s.toLowerCase()`.
  100343. Text is always normalized with
  100344. [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
  100345. (when supported).
  100346. */
  100347. constructor(e, n, r = 0, i = e.length, a, o) {
  100348. 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(FG(s)) : FG, this.query = this.normalize(n);
  100349. }
  100350. peek() {
  100351. if (this.bufferPos == this.buffer.length) {
  100352. if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
  100353. return -1;
  100354. this.bufferPos = 0, this.buffer = this.iter.value;
  100355. }
  100356. return gr(this.buffer, this.bufferPos);
  100357. }
  100358. /**
  100359. Look for the next match. Updates the iterator's
  100360. [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
  100361. [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
  100362. at least once before using the cursor.
  100363. */
  100364. next() {
  100365. for (; this.matches.length; )
  100366. this.matches.pop();
  100367. return this.nextOverlapping();
  100368. }
  100369. /**
  100370. The `next` method will ignore matches that partially overlap a
  100371. previous match. This method behaves like `next`, but includes
  100372. such matches.
  100373. */
  100374. nextOverlapping() {
  100375. for (; ; ) {
  100376. let e = this.peek();
  100377. if (e < 0)
  100378. return this.done = !0, this;
  100379. let n = KL(e), r = this.bufferStart + this.bufferPos;
  100380. this.bufferPos += ga(e);
  100381. let i = this.normalize(n);
  100382. for (let a = 0, o = r; ; a++) {
  100383. let s = i.charCodeAt(a), l = this.match(s, o, this.bufferPos + this.bufferStart);
  100384. if (a == i.length - 1) {
  100385. if (l)
  100386. return this.value = l, this;
  100387. break;
  100388. }
  100389. o == r && a < n.length && n.charCodeAt(a) == s && o++;
  100390. }
  100391. }
  100392. }
  100393. match(e, n, r) {
  100394. let i = null;
  100395. for (let a = 0; a < this.matches.length; a += 2) {
  100396. let o = this.matches[a], s = !1;
  100397. 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);
  100398. }
  100399. 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;
  100400. }
  100401. }
  100402. typeof Symbol < "u" && (Kh.prototype[Symbol.iterator] = function() {
  100403. return this;
  100404. });
  100405. const Ise = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, x4 = "gm" + (/x/.unicode == null ? "" : "u");
  100406. class Dse {
  100407. /**
  100408. Create a cursor that will search the given range in the given
  100409. document. `query` should be the raw pattern (as you'd pass it to
  100410. `new RegExp`).
  100411. */
  100412. constructor(e, n, r, i = 0, a = e.length) {
  100413. if (this.text = e, this.to = a, this.curLine = "", this.done = !1, this.value = Ise, /\\[sWDnr]|\n|\r|\[\^/.test(n))
  100414. return new Rse(e, n, r, i, a);
  100415. this.re = new RegExp(n, x4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.iter = e.iter();
  100416. let o = e.lineAt(i);
  100417. this.curLineStart = o.from, this.matchPos = vS(e, i), this.getLine(this.curLineStart);
  100418. }
  100419. getLine(e) {
  100420. 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());
  100421. }
  100422. nextLine() {
  100423. this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
  100424. }
  100425. /**
  100426. Move to the next match, if there is one.
  100427. */
  100428. next() {
  100429. for (let e = this.matchPos - this.curLineStart; ; ) {
  100430. this.re.lastIndex = e;
  100431. let n = this.matchPos <= this.to && this.re.exec(this.curLine);
  100432. if (n) {
  100433. let r = this.curLineStart + n.index, i = r + n[0].length;
  100434. if (this.matchPos = vS(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)))
  100435. return this.value = { from: r, to: i, match: n }, this;
  100436. e = this.matchPos - this.curLineStart;
  100437. } else if (this.curLineStart + this.curLine.length < this.to)
  100438. this.nextLine(), e = 0;
  100439. else
  100440. return this.done = !0, this;
  100441. }
  100442. }
  100443. }
  100444. const D$ = /* @__PURE__ */ new WeakMap();
  100445. class ch {
  100446. constructor(e, n) {
  100447. this.from = e, this.text = n;
  100448. }
  100449. get to() {
  100450. return this.from + this.text.length;
  100451. }
  100452. static get(e, n, r) {
  100453. let i = D$.get(e);
  100454. if (!i || i.from >= r || i.to <= n) {
  100455. let s = new ch(n, e.sliceString(n, r));
  100456. return D$.set(e, s), s;
  100457. }
  100458. if (i.from == n && i.to == r)
  100459. return i;
  100460. let { text: a, from: o } = i;
  100461. return o > n && (a = e.sliceString(n, o) + a, o = n), i.to < r && (a += e.sliceString(i.to, r)), D$.set(e, new ch(o, a)), new ch(n, a.slice(n - o, r - o));
  100462. }
  100463. }
  100464. class Rse {
  100465. constructor(e, n, r, i, a) {
  100466. this.text = e, this.to = a, this.done = !1, this.value = Ise, this.matchPos = vS(e, i), this.re = new RegExp(n, x4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.flat = ch.get(e, i, this.chunkEnd(
  100467. i + 5e3
  100468. /* Chunk.Base */
  100469. ));
  100470. }
  100471. chunkEnd(e) {
  100472. return e >= this.to ? this.to : this.text.lineAt(e).to;
  100473. }
  100474. next() {
  100475. for (; ; ) {
  100476. let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
  100477. if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
  100478. let r = this.flat.from + n.index, i = r + n[0].length;
  100479. if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(r, i, n)))
  100480. return this.value = { from: r, to: i, match: n }, this.matchPos = vS(this.text, i + (r == i ? 1 : 0)), this;
  100481. }
  100482. if (this.flat.to == this.to)
  100483. return this.done = !0, this;
  100484. this.flat = ch.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
  100485. }
  100486. }
  100487. }
  100488. typeof Symbol < "u" && (Dse.prototype[Symbol.iterator] = Rse.prototype[Symbol.iterator] = function() {
  100489. return this;
  100490. });
  100491. function Sct(t) {
  100492. try {
  100493. return new RegExp(t, x4), !0;
  100494. } catch {
  100495. return !1;
  100496. }
  100497. }
  100498. function vS(t, e) {
  100499. if (e >= t.length)
  100500. return e;
  100501. let n = t.lineAt(e), r;
  100502. for (; e < n.to && (r = n.text.charCodeAt(e - n.from)) >= 56320 && r < 57344; )
  100503. e++;
  100504. return e;
  100505. }
  100506. function ZM(t) {
  100507. 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", {
  100508. class: "cm-gotoLine",
  100509. onkeydown: (a) => {
  100510. a.keyCode == 27 ? (a.preventDefault(), t.dispatch({ effects: gS.of(!1) }), t.focus()) : a.keyCode == 13 && (a.preventDefault(), i());
  100511. },
  100512. onsubmit: (a) => {
  100513. a.preventDefault(), i();
  100514. }
  100515. }, on("label", t.state.phrase("Go to line"), ": ", n), " ", on("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
  100516. function i() {
  100517. let a = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
  100518. if (!a)
  100519. return;
  100520. 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;
  100521. if (u && f) {
  100522. let g = h / 100;
  100523. l && (g = g * (l == "-" ? -1 : 1) + s.number / o.doc.lines), h = Math.round(o.doc.lines * g);
  100524. } else u && l && (h = h * (l == "-" ? -1 : 1) + s.number);
  100525. 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)));
  100526. t.dispatch({
  100527. effects: [gS.of(!1), De.scrollIntoView(v.from, { y: "center" })],
  100528. selection: v
  100529. }), t.focus();
  100530. }
  100531. return { dom: r };
  100532. }
  100533. const gS = /* @__PURE__ */ dt.define(), WG = /* @__PURE__ */ ur.define({
  100534. create() {
  100535. return !0;
  100536. },
  100537. update(t, e) {
  100538. for (let n of e.effects)
  100539. n.is(gS) && (t = n.value);
  100540. return t;
  100541. },
  100542. provide: (t) => Km.from(t, (e) => e ? ZM : null)
  100543. }), xct = (t) => {
  100544. let e = qm(t, ZM);
  100545. if (!e) {
  100546. let n = [gS.of(!0)];
  100547. t.state.field(WG, !1) == null && n.push(dt.appendConfig.of([WG, wct])), t.dispatch({ effects: n }), e = qm(t, ZM);
  100548. }
  100549. return e && e.dom.querySelector("input").select(), !0;
  100550. }, wct = /* @__PURE__ */ De.baseTheme({
  100551. ".cm-panel.cm-gotoLine": {
  100552. padding: "2px 6px 4px",
  100553. "& label": { fontSize: "80%" }
  100554. }
  100555. }), Cct = {
  100556. highlightWordAroundCursor: !1,
  100557. minSelectionLength: 1,
  100558. maxMatches: 100,
  100559. wholeWords: !1
  100560. }, Tct = /* @__PURE__ */ Be.define({
  100561. combine(t) {
  100562. return fs(t, Cct, {
  100563. highlightWordAroundCursor: (e, n) => e || n,
  100564. minSelectionLength: Math.min,
  100565. maxMatches: Math.min
  100566. });
  100567. }
  100568. });
  100569. function Pct(t) {
  100570. return [Ict, Mct];
  100571. }
  100572. const $ct = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch" }), Act = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
  100573. function QG(t, e, n, r) {
  100574. return (n == 0 || t(e.sliceDoc(n - 1, n)) != yn.Word) && (r == e.doc.length || t(e.sliceDoc(r, r + 1)) != yn.Word);
  100575. }
  100576. function Ect(t, e, n, r) {
  100577. return t(e.sliceDoc(n, n + 1)) == yn.Word && t(e.sliceDoc(r - 1, r)) == yn.Word;
  100578. }
  100579. const Mct = /* @__PURE__ */ kn.fromClass(class {
  100580. constructor(t) {
  100581. this.decorations = this.getDeco(t);
  100582. }
  100583. update(t) {
  100584. (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
  100585. }
  100586. getDeco(t) {
  100587. let e = t.state.facet(Tct), { state: n } = t, r = n.selection;
  100588. if (r.ranges.length > 1)
  100589. return Ze.none;
  100590. let i = r.main, a, o = null;
  100591. if (i.empty) {
  100592. if (!e.highlightWordAroundCursor)
  100593. return Ze.none;
  100594. let l = n.wordAt(i.head);
  100595. if (!l)
  100596. return Ze.none;
  100597. o = n.charCategorizer(i.head), a = n.sliceDoc(l.from, l.to);
  100598. } else {
  100599. let l = i.to - i.from;
  100600. if (l < e.minSelectionLength || l > 200)
  100601. return Ze.none;
  100602. if (e.wholeWords) {
  100603. if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(QG(o, n, i.from, i.to) && Ect(o, n, i.from, i.to)))
  100604. return Ze.none;
  100605. } else if (a = n.sliceDoc(i.from, i.to), !a)
  100606. return Ze.none;
  100607. }
  100608. let s = [];
  100609. for (let l of t.visibleRanges) {
  100610. let u = new Kh(n.doc, a, l.from, l.to);
  100611. for (; !u.next().done; ) {
  100612. let { from: c, to: f } = u.value;
  100613. if ((!o || QG(o, n, c, f)) && (i.empty && c <= i.from && f >= i.to ? s.push(Act.range(c, f)) : (c >= i.to || f <= i.from) && s.push($ct.range(c, f)), s.length > e.maxMatches))
  100614. return Ze.none;
  100615. }
  100616. }
  100617. return Ze.set(s);
  100618. }
  100619. }, {
  100620. decorations: (t) => t.decorations
  100621. }), Ict = /* @__PURE__ */ De.baseTheme({
  100622. ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
  100623. ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
  100624. }), Dct = ({ state: t, dispatch: e }) => {
  100625. let { selection: n } = t, r = me.create(n.ranges.map((i) => t.wordAt(i.head) || me.cursor(i.head)), n.mainIndex);
  100626. return r.eq(n) ? !1 : (e(t.update({ selection: r })), !0);
  100627. };
  100628. function Rct(t, e) {
  100629. let { main: n, ranges: r } = t.selection, i = t.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
  100630. for (let o = !1, s = new Kh(t.doc, e, r[r.length - 1].to); ; )
  100631. if (s.next(), s.done) {
  100632. if (o)
  100633. return null;
  100634. s = new Kh(t.doc, e, 0, Math.max(0, r[r.length - 1].from - 1)), o = !0;
  100635. } else {
  100636. if (o && r.some((l) => l.from == s.value.from))
  100637. continue;
  100638. if (a) {
  100639. let l = t.wordAt(s.value.from);
  100640. if (!l || l.from != s.value.from || l.to != s.value.to)
  100641. continue;
  100642. }
  100643. return s.value;
  100644. }
  100645. }
  100646. const kct = ({ state: t, dispatch: e }) => {
  100647. let { ranges: n } = t.selection;
  100648. if (n.some((a) => a.from === a.to))
  100649. return Dct({ state: t, dispatch: e });
  100650. let r = t.sliceDoc(n[0].from, n[0].to);
  100651. if (t.selection.ranges.some((a) => t.sliceDoc(a.from, a.to) != r))
  100652. return !1;
  100653. let i = Rct(t, r);
  100654. return i ? (e(t.update({
  100655. selection: t.selection.addRange(me.range(i.from, i.to), !1),
  100656. effects: De.scrollIntoView(i.to)
  100657. })), !0) : !1;
  100658. }, Lp = /* @__PURE__ */ Be.define({
  100659. combine(t) {
  100660. return fs(t, {
  100661. top: !1,
  100662. caseSensitive: !1,
  100663. literal: !1,
  100664. regexp: !1,
  100665. wholeWord: !1,
  100666. createPanel: (e) => new Zct(e),
  100667. scrollToMatch: (e) => De.scrollIntoView(e)
  100668. });
  100669. }
  100670. });
  100671. class kse {
  100672. /**
  100673. Create a query object.
  100674. */
  100675. constructor(e) {
  100676. 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 || Sct(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
  100677. }
  100678. /**
  100679. @internal
  100680. */
  100681. unquote(e) {
  100682. return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, r) => r == "n" ? `
  100683. ` : r == "r" ? "\r" : r == "t" ? " " : "\\");
  100684. }
  100685. /**
  100686. Compare this query to another query.
  100687. */
  100688. eq(e) {
  100689. return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
  100690. }
  100691. /**
  100692. @internal
  100693. */
  100694. create() {
  100695. return this.regexp ? new zct(this) : new Nct(this);
  100696. }
  100697. /**
  100698. Get a search cursor for this query, searching through the given
  100699. range in the given state.
  100700. */
  100701. getCursor(e, n = 0, r) {
  100702. let i = e.doc ? e : At.create({ doc: e });
  100703. return r == null && (r = i.doc.length), this.regexp ? Rd(this, i, n, r) : Dd(this, i, n, r);
  100704. }
  100705. }
  100706. class Lse {
  100707. constructor(e) {
  100708. this.spec = e;
  100709. }
  100710. }
  100711. function Dd(t, e, n, r) {
  100712. return new Kh(e.doc, t.unquoted, n, r, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? Lct(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
  100713. }
  100714. function Lct(t, e) {
  100715. 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(mS(i, n - a)) != yn.Word || e(yS(i, n - a)) != yn.Word) && (e(yS(i, r - a)) != yn.Word || e(mS(i, r - a)) != yn.Word));
  100716. }
  100717. class Nct extends Lse {
  100718. constructor(e) {
  100719. super(e);
  100720. }
  100721. nextMatch(e, n, r) {
  100722. let i = Dd(this.spec, e, r, e.doc.length).nextOverlapping();
  100723. return i.done && (i = Dd(this.spec, e, 0, n).nextOverlapping()), i.done ? null : i.value;
  100724. }
  100725. // Searching in reverse is, rather than implementing an inverted search
  100726. // cursor, done by scanning chunk after chunk forward.
  100727. prevMatchInRange(e, n, r) {
  100728. for (let i = r; ; ) {
  100729. let a = Math.max(n, i - 1e4 - this.spec.unquoted.length), o = Dd(this.spec, e, a, i), s = null;
  100730. for (; !o.nextOverlapping().done; )
  100731. s = o.value;
  100732. if (s)
  100733. return s;
  100734. if (a == n)
  100735. return null;
  100736. i -= 1e4;
  100737. }
  100738. }
  100739. prevMatch(e, n, r) {
  100740. return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  100741. }
  100742. getReplacement(e) {
  100743. return this.spec.unquote(this.spec.replace);
  100744. }
  100745. matchAll(e, n) {
  100746. let r = Dd(this.spec, e, 0, e.doc.length), i = [];
  100747. for (; !r.next().done; ) {
  100748. if (i.length >= n)
  100749. return null;
  100750. i.push(r.value);
  100751. }
  100752. return i;
  100753. }
  100754. highlight(e, n, r, i) {
  100755. let a = Dd(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(r + this.spec.unquoted.length, e.doc.length));
  100756. for (; !a.next().done; )
  100757. i(a.value.from, a.value.to);
  100758. }
  100759. }
  100760. function Rd(t, e, n, r) {
  100761. return new Dse(e.doc, t.search, {
  100762. ignoreCase: !t.caseSensitive,
  100763. test: t.wholeWord ? Bct(e.charCategorizer(e.selection.main.head)) : void 0
  100764. }, n, r);
  100765. }
  100766. function mS(t, e) {
  100767. return t.slice(_r(t, e, !1), e);
  100768. }
  100769. function yS(t, e) {
  100770. return t.slice(e, _r(t, e));
  100771. }
  100772. function Bct(t) {
  100773. return (e, n, r) => !r[0].length || (t(mS(r.input, r.index)) != yn.Word || t(yS(r.input, r.index)) != yn.Word) && (t(yS(r.input, r.index + r[0].length)) != yn.Word || t(mS(r.input, r.index + r[0].length)) != yn.Word);
  100774. }
  100775. class zct extends Lse {
  100776. nextMatch(e, n, r) {
  100777. let i = Rd(this.spec, e, r, e.doc.length).next();
  100778. return i.done && (i = Rd(this.spec, e, 0, n).next()), i.done ? null : i.value;
  100779. }
  100780. prevMatchInRange(e, n, r) {
  100781. for (let i = 1; ; i++) {
  100782. let a = Math.max(
  100783. n,
  100784. r - i * 1e4
  100785. /* FindPrev.ChunkSize */
  100786. ), o = Rd(this.spec, e, a, r), s = null;
  100787. for (; !o.next().done; )
  100788. s = o.value;
  100789. if (s && (a == n || s.from > a + 10))
  100790. return s;
  100791. if (a == n)
  100792. return null;
  100793. }
  100794. }
  100795. prevMatch(e, n, r) {
  100796. return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  100797. }
  100798. getReplacement(e) {
  100799. 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);
  100800. }
  100801. matchAll(e, n) {
  100802. let r = Rd(this.spec, e, 0, e.doc.length), i = [];
  100803. for (; !r.next().done; ) {
  100804. if (i.length >= n)
  100805. return null;
  100806. i.push(r.value);
  100807. }
  100808. return i;
  100809. }
  100810. highlight(e, n, r, i) {
  100811. let a = Rd(this.spec, e, Math.max(
  100812. 0,
  100813. n - 250
  100814. /* RegExp.HighlightMargin */
  100815. ), Math.min(r + 250, e.doc.length));
  100816. for (; !a.next().done; )
  100817. i(a.value.from, a.value.to);
  100818. }
  100819. }
  100820. const n0 = /* @__PURE__ */ dt.define(), w4 = /* @__PURE__ */ dt.define(), eu = /* @__PURE__ */ ur.define({
  100821. create(t) {
  100822. return new R$(UM(t).create(), null);
  100823. },
  100824. update(t, e) {
  100825. for (let n of e.effects)
  100826. n.is(n0) ? t = new R$(n.value.create(), t.panel) : n.is(w4) && (t = new R$(t.query, n.value ? C4 : null));
  100827. return t;
  100828. },
  100829. provide: (t) => Km.from(t, (e) => e.panel)
  100830. });
  100831. class R$ {
  100832. constructor(e, n) {
  100833. this.query = e, this.panel = n;
  100834. }
  100835. }
  100836. const Vct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch" }), Fct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Wct = /* @__PURE__ */ kn.fromClass(class {
  100837. constructor(t) {
  100838. this.view = t, this.decorations = this.highlight(t.state.field(eu));
  100839. }
  100840. update(t) {
  100841. let e = t.state.field(eu);
  100842. (e != t.startState.field(eu) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
  100843. }
  100844. highlight({ query: t, panel: e }) {
  100845. if (!e || !t.spec.valid)
  100846. return Ze.none;
  100847. let { view: n } = this, r = new hu();
  100848. for (let i = 0, a = n.visibleRanges, o = a.length; i < o; i++) {
  100849. let { from: s, to: l } = a[i];
  100850. for (; i < o - 1 && l > a[i + 1].from - 2 * 250; )
  100851. l = a[++i].to;
  100852. t.highlight(n.state, s, l, (u, c) => {
  100853. let f = n.state.selection.ranges.some((d) => d.from == u && d.to == c);
  100854. r.add(u, c, f ? Fct : Vct);
  100855. });
  100856. }
  100857. return r.finish();
  100858. }
  100859. }, {
  100860. decorations: (t) => t.decorations
  100861. });
  100862. function dy(t) {
  100863. return (e) => {
  100864. let n = e.state.field(eu, !1);
  100865. return n && n.query.spec.valid ? t(e, n) : zse(e);
  100866. };
  100867. }
  100868. const bS = /* @__PURE__ */ dy((t, { query: e }) => {
  100869. let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
  100870. if (!r)
  100871. return !1;
  100872. let i = me.single(r.from, r.to), a = t.state.facet(Lp);
  100873. return t.dispatch({
  100874. selection: i,
  100875. effects: [T4(t, r), a.scrollToMatch(i.main, t)],
  100876. userEvent: "select.search"
  100877. }), Bse(t), !0;
  100878. }), _S = /* @__PURE__ */ dy((t, { query: e }) => {
  100879. let { state: n } = t, { from: r } = n.selection.main, i = e.prevMatch(n, r, r);
  100880. if (!i)
  100881. return !1;
  100882. let a = me.single(i.from, i.to), o = t.state.facet(Lp);
  100883. return t.dispatch({
  100884. selection: a,
  100885. effects: [T4(t, i), o.scrollToMatch(a.main, t)],
  100886. userEvent: "select.search"
  100887. }), Bse(t), !0;
  100888. }), Qct = /* @__PURE__ */ dy((t, { query: e }) => {
  100889. let n = e.matchAll(t.state, 1e3);
  100890. return !n || !n.length ? !1 : (t.dispatch({
  100891. selection: me.create(n.map((r) => me.range(r.from, r.to))),
  100892. userEvent: "select.search.matches"
  100893. }), !0);
  100894. }), Hct = ({ state: t, dispatch: e }) => {
  100895. let n = t.selection;
  100896. if (n.ranges.length > 1 || n.main.empty)
  100897. return !1;
  100898. let { from: r, to: i } = n.main, a = [], o = 0;
  100899. for (let s = new Kh(t.doc, t.sliceDoc(r, i)); !s.next().done; ) {
  100900. if (a.length > 1e3)
  100901. return !1;
  100902. s.value.from == r && (o = a.length), a.push(me.range(s.value.from, s.value.to));
  100903. }
  100904. return e(t.update({
  100905. selection: me.create(a, o),
  100906. userEvent: "select.search.matches"
  100907. })), !0;
  100908. }, HG = /* @__PURE__ */ dy((t, { query: e }) => {
  100909. let { state: n } = t, { from: r, to: i } = n.selection.main;
  100910. if (n.readOnly)
  100911. return !1;
  100912. let a = e.nextMatch(n, r, r);
  100913. if (!a)
  100914. return !1;
  100915. let o = [], s, l, u = [];
  100916. 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) {
  100917. let c = o.length == 0 || o[0].from >= a.to ? 0 : a.to - a.from - l.length;
  100918. s = me.single(a.from - c, a.to - c), u.push(T4(t, a)), u.push(n.facet(Lp).scrollToMatch(s.main, t));
  100919. }
  100920. return t.dispatch({
  100921. changes: o,
  100922. selection: s,
  100923. effects: u,
  100924. userEvent: "input.replace"
  100925. }), !0;
  100926. }), Gct = /* @__PURE__ */ dy((t, { query: e }) => {
  100927. if (t.state.readOnly)
  100928. return !1;
  100929. let n = e.matchAll(t.state, 1e9).map((i) => {
  100930. let { from: a, to: o } = i;
  100931. return { from: a, to: o, insert: e.getReplacement(i) };
  100932. });
  100933. if (!n.length)
  100934. return !1;
  100935. let r = t.state.phrase("replaced $ matches", n.length) + ".";
  100936. return t.dispatch({
  100937. changes: n,
  100938. effects: De.announce.of(r),
  100939. userEvent: "input.replace.all"
  100940. }), !0;
  100941. });
  100942. function C4(t) {
  100943. return t.state.facet(Lp).createPanel(t);
  100944. }
  100945. function UM(t, e) {
  100946. var n, r, i, a, o;
  100947. let s = t.selection.main, l = s.empty || s.to > s.from + 100 ? "" : t.sliceDoc(s.from, s.to);
  100948. if (e && !l)
  100949. return e;
  100950. let u = t.facet(Lp);
  100951. return new kse({
  100952. search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
  100953. caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : u.caseSensitive,
  100954. literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal,
  100955. regexp: (a = e == null ? void 0 : e.regexp) !== null && a !== void 0 ? a : u.regexp,
  100956. wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
  100957. });
  100958. }
  100959. function Nse(t) {
  100960. let e = qm(t, C4);
  100961. return e && e.dom.querySelector("[main-field]");
  100962. }
  100963. function Bse(t) {
  100964. let e = Nse(t);
  100965. e && e == t.root.activeElement && e.select();
  100966. }
  100967. const zse = (t) => {
  100968. let e = t.state.field(eu, !1);
  100969. if (e && e.panel) {
  100970. let n = Nse(t);
  100971. if (n && n != t.root.activeElement) {
  100972. let r = UM(t.state, e.query.spec);
  100973. r.valid && t.dispatch({ effects: n0.of(r) }), n.focus(), n.select();
  100974. }
  100975. } else
  100976. t.dispatch({ effects: [
  100977. w4.of(!0),
  100978. e ? n0.of(UM(t.state, e.query.spec)) : dt.appendConfig.of(Xct)
  100979. ] });
  100980. return !0;
  100981. }, Vse = (t) => {
  100982. let e = t.state.field(eu, !1);
  100983. if (!e || !e.panel)
  100984. return !1;
  100985. let n = qm(t, C4);
  100986. return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: w4.of(!1) }), !0;
  100987. }, jct = [
  100988. { key: "Mod-f", run: zse, scope: "editor search-panel" },
  100989. { key: "F3", run: bS, shift: _S, scope: "editor search-panel", preventDefault: !0 },
  100990. { key: "Mod-g", run: bS, shift: _S, scope: "editor search-panel", preventDefault: !0 },
  100991. { key: "Escape", run: Vse, scope: "editor search-panel" },
  100992. { key: "Mod-Shift-l", run: Hct },
  100993. { key: "Mod-Alt-g", run: xct },
  100994. { key: "Mod-d", run: kct, preventDefault: !0 }
  100995. ];
  100996. class Zct {
  100997. constructor(e) {
  100998. this.view = e;
  100999. let n = this.query = e.state.field(eu).query.spec;
  101000. this.commit = this.commit.bind(this), this.searchField = on("input", {
  101001. value: n.search,
  101002. placeholder: Ai(e, "Find"),
  101003. "aria-label": Ai(e, "Find"),
  101004. class: "cm-textfield",
  101005. name: "search",
  101006. form: "",
  101007. "main-field": "true",
  101008. onchange: this.commit,
  101009. onkeyup: this.commit
  101010. }), this.replaceField = on("input", {
  101011. value: n.replace,
  101012. placeholder: Ai(e, "Replace"),
  101013. "aria-label": Ai(e, "Replace"),
  101014. class: "cm-textfield",
  101015. name: "replace",
  101016. form: "",
  101017. onchange: this.commit,
  101018. onkeyup: this.commit
  101019. }), this.caseField = on("input", {
  101020. type: "checkbox",
  101021. name: "case",
  101022. form: "",
  101023. checked: n.caseSensitive,
  101024. onchange: this.commit
  101025. }), this.reField = on("input", {
  101026. type: "checkbox",
  101027. name: "re",
  101028. form: "",
  101029. checked: n.regexp,
  101030. onchange: this.commit
  101031. }), this.wordField = on("input", {
  101032. type: "checkbox",
  101033. name: "word",
  101034. form: "",
  101035. checked: n.wholeWord,
  101036. onchange: this.commit
  101037. });
  101038. function r(i, a, o) {
  101039. return on("button", { class: "cm-button", name: i, onclick: a, type: "button" }, o);
  101040. }
  101041. this.dom = on("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [
  101042. this.searchField,
  101043. r("next", () => bS(e), [Ai(e, "next")]),
  101044. r("prev", () => _S(e), [Ai(e, "previous")]),
  101045. r("select", () => Qct(e), [Ai(e, "all")]),
  101046. on("label", null, [this.caseField, Ai(e, "match case")]),
  101047. on("label", null, [this.reField, Ai(e, "regexp")]),
  101048. on("label", null, [this.wordField, Ai(e, "by word")]),
  101049. ...e.state.readOnly ? [] : [
  101050. on("br"),
  101051. this.replaceField,
  101052. r("replace", () => HG(e), [Ai(e, "replace")]),
  101053. r("replaceAll", () => Gct(e), [Ai(e, "replace all")])
  101054. ],
  101055. on("button", {
  101056. name: "close",
  101057. onclick: () => Vse(e),
  101058. "aria-label": Ai(e, "close"),
  101059. type: "button"
  101060. }, ["×"])
  101061. ]);
  101062. }
  101063. commit() {
  101064. let e = new kse({
  101065. search: this.searchField.value,
  101066. caseSensitive: this.caseField.checked,
  101067. regexp: this.reField.checked,
  101068. wholeWord: this.wordField.checked,
  101069. replace: this.replaceField.value
  101070. });
  101071. e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: n0.of(e) }));
  101072. }
  101073. keydown(e) {
  101074. ist(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? _S : bS)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), HG(this.view));
  101075. }
  101076. update(e) {
  101077. for (let n of e.transactions)
  101078. for (let r of n.effects)
  101079. r.is(n0) && !r.value.eq(this.query) && this.setQuery(r.value);
  101080. }
  101081. setQuery(e) {
  101082. 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;
  101083. }
  101084. mount() {
  101085. this.searchField.select();
  101086. }
  101087. get pos() {
  101088. return 80;
  101089. }
  101090. get top() {
  101091. return this.view.state.facet(Lp).top;
  101092. }
  101093. }
  101094. function Ai(t, e) {
  101095. return t.state.phrase(e);
  101096. }
  101097. const s_ = 30, l_ = /[\s\.,:;?!]/;
  101098. function T4(t, { from: e, to: n }) {
  101099. let r = t.state.doc.lineAt(e), i = t.state.doc.lineAt(n).to, a = Math.max(r.from, e - s_), o = Math.min(i, n + s_), s = t.state.sliceDoc(a, o);
  101100. if (a != r.from) {
  101101. for (let l = 0; l < s_; l++)
  101102. if (!l_.test(s[l + 1]) && l_.test(s[l])) {
  101103. s = s.slice(l);
  101104. break;
  101105. }
  101106. }
  101107. if (o != i) {
  101108. for (let l = s.length - 1; l > s.length - s_; l--)
  101109. if (!l_.test(s[l - 1]) && l_.test(s[l])) {
  101110. s = s.slice(0, l);
  101111. break;
  101112. }
  101113. }
  101114. return De.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`);
  101115. }
  101116. const Uct = /* @__PURE__ */ De.baseTheme({
  101117. ".cm-panel.cm-search": {
  101118. padding: "2px 6px 4px",
  101119. position: "relative",
  101120. "& [name=close]": {
  101121. position: "absolute",
  101122. top: "0",
  101123. right: "4px",
  101124. backgroundColor: "inherit",
  101125. border: "none",
  101126. font: "inherit",
  101127. padding: 0,
  101128. margin: 0
  101129. },
  101130. "& input, & button, & label": {
  101131. margin: ".2em .6em .2em 0"
  101132. },
  101133. "& input[type=checkbox]": {
  101134. marginRight: ".2em"
  101135. },
  101136. "& label": {
  101137. fontSize: "80%",
  101138. whiteSpace: "pre"
  101139. }
  101140. },
  101141. "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
  101142. "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
  101143. "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
  101144. "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
  101145. }), Xct = [
  101146. eu,
  101147. /* @__PURE__ */ Eu.low(Wct),
  101148. Uct
  101149. ];
  101150. class Fse {
  101151. /**
  101152. Create a new completion context. (Mostly useful for testing
  101153. completion sources—in the editor, the extension will create
  101154. these for you.)
  101155. */
  101156. constructor(e, n, r, i) {
  101157. this.state = e, this.pos = n, this.explicit = r, this.view = i, this.abortListeners = [];
  101158. }
  101159. /**
  101160. Get the extent, content, and (if there is a token) type of the
  101161. token before `this.pos`.
  101162. */
  101163. tokenBefore(e) {
  101164. let n = nr(this.state).resolveInner(this.pos, -1);
  101165. for (; n && e.indexOf(n.name) < 0; )
  101166. n = n.parent;
  101167. return n ? {
  101168. from: n.from,
  101169. to: this.pos,
  101170. text: this.state.sliceDoc(n.from, this.pos),
  101171. type: n.type
  101172. } : null;
  101173. }
  101174. /**
  101175. Get the match of the given expression directly before the
  101176. cursor.
  101177. */
  101178. matchBefore(e) {
  101179. 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(Qse(e, !1));
  101180. return a < 0 ? null : { from: r + a, to: this.pos, text: i.slice(a) };
  101181. }
  101182. /**
  101183. Yields true when the query has been aborted. Can be useful in
  101184. asynchronous queries to avoid doing work that will be ignored.
  101185. */
  101186. get aborted() {
  101187. return this.abortListeners == null;
  101188. }
  101189. /**
  101190. Allows you to register abort handlers, which will be called when
  101191. the query is
  101192. [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
  101193. */
  101194. addEventListener(e, n) {
  101195. e == "abort" && this.abortListeners && this.abortListeners.push(n);
  101196. }
  101197. }
  101198. function GG(t) {
  101199. let e = Object.keys(t).join(""), n = /\w/.test(e);
  101200. return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
  101201. }
  101202. function Yct(t) {
  101203. let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
  101204. for (let { label: i } of t) {
  101205. e[i[0]] = !0;
  101206. for (let a = 1; a < i.length; a++)
  101207. n[i[a]] = !0;
  101208. }
  101209. let r = GG(e) + GG(n) + "*$";
  101210. return [new RegExp("^" + r), new RegExp(r)];
  101211. }
  101212. function Wse(t) {
  101213. let e = t.map((i) => typeof i == "string" ? { label: i } : i), [n, r] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : Yct(e);
  101214. return (i) => {
  101215. let a = i.matchBefore(r);
  101216. return a || i.explicit ? { from: a ? a.from : i.pos, options: e, validFor: n } : null;
  101217. };
  101218. }
  101219. function qct(t, e) {
  101220. return (n) => {
  101221. for (let r = nr(n.state).resolveInner(n.pos, -1); r; r = r.parent) {
  101222. if (t.indexOf(r.name) > -1)
  101223. return null;
  101224. if (r.type.isTop)
  101225. break;
  101226. }
  101227. return e(n);
  101228. };
  101229. }
  101230. class jG {
  101231. constructor(e, n, r, i) {
  101232. this.completion = e, this.source = n, this.match = r, this.score = i;
  101233. }
  101234. }
  101235. function tu(t) {
  101236. return t.selection.main.from;
  101237. }
  101238. function Qse(t, e) {
  101239. var n;
  101240. let { source: r } = t, i = e && r[0] != "^", a = r[r.length - 1] != "$";
  101241. return !i && !a ? t : new RegExp(`${i ? "^" : ""}(?:${r})${a ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
  101242. }
  101243. const P4 = /* @__PURE__ */ ul.define();
  101244. function Kct(t, e, n, r) {
  101245. let { main: i } = t.selection, a = n - i.from, o = r - i.from;
  101246. 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 } : {
  101247. changes: { from: s.from + a, to: r == i.from ? s.to : s.from + o, insert: e },
  101248. range: me.cursor(s.from + a + e.length)
  101249. })), { scrollIntoView: !0, userEvent: "input.complete" });
  101250. }
  101251. const ZG = /* @__PURE__ */ new WeakMap();
  101252. function Jct(t) {
  101253. if (!Array.isArray(t))
  101254. return t;
  101255. let e = ZG.get(t);
  101256. return e || ZG.set(t, e = Wse(t)), e;
  101257. }
  101258. const OS = /* @__PURE__ */ dt.define(), r0 = /* @__PURE__ */ dt.define();
  101259. class eft {
  101260. constructor(e) {
  101261. this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
  101262. for (let n = 0; n < e.length; ) {
  101263. let r = gr(e, n), i = ga(r);
  101264. this.chars.push(r);
  101265. let a = e.slice(n, n + i), o = a.toUpperCase();
  101266. this.folded.push(gr(o == a ? a.toLowerCase() : o, 0)), n += i;
  101267. }
  101268. this.astral = e.length != this.chars.length;
  101269. }
  101270. ret(e, n) {
  101271. return this.score = e, this.matched = n, this;
  101272. }
  101273. // Matches a given word (completion) against the pattern (input).
  101274. // Will return a boolean indicating whether there was a match and,
  101275. // on success, set `this.score` to the score, `this.matched` to an
  101276. // array of `from, to` pairs indicating the matched parts of `word`.
  101277. //
  101278. // The score is a number that is more negative the worse the match
  101279. // is. See `Penalty` above.
  101280. match(e) {
  101281. if (this.pattern.length == 0)
  101282. return this.ret(-100, []);
  101283. if (e.length < this.pattern.length)
  101284. return null;
  101285. let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
  101286. if (n.length == 1) {
  101287. let y = gr(e, 0), b = ga(y), _ = b == e.length ? 0 : -100;
  101288. if (y != n[0]) if (y == r[0])
  101289. _ += -200;
  101290. else
  101291. return null;
  101292. return this.ret(_, [0, b]);
  101293. }
  101294. let s = e.indexOf(this.pattern);
  101295. if (s == 0)
  101296. return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
  101297. let l = n.length, u = 0;
  101298. if (s < 0) {
  101299. for (let y = 0, b = Math.min(e.length, 200); y < b && u < l; ) {
  101300. let _ = gr(e, y);
  101301. (_ == n[u] || _ == r[u]) && (i[u++] = y), y += ga(_);
  101302. }
  101303. if (u < l)
  101304. return null;
  101305. }
  101306. let c = 0, f = 0, d = !1, h = 0, p = -1, v = -1, g = /[a-z]/.test(e), m = !0;
  101307. for (let y = 0, b = Math.min(e.length, 200), _ = 0; y < b && f < l; ) {
  101308. let O = gr(e, y);
  101309. 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));
  101310. let S, x = O < 255 ? O >= 48 && O <= 57 || O >= 97 && O <= 122 ? 2 : O >= 65 && O <= 90 ? 1 : 0 : (S = KL(O)) != S.toLowerCase() ? 1 : S != S.toUpperCase() ? 2 : 0;
  101311. (!y || x == 1 && g || _ == 0 && x != 0) && (n[f] == O || r[f] == O && (d = !0) ? o[f++] = y : o.length && (m = !1)), _ = x, y += ga(O);
  101312. }
  101313. 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);
  101314. }
  101315. result(e, n, r) {
  101316. let i = [], a = 0;
  101317. for (let o of n) {
  101318. let s = o + (this.astral ? ga(gr(r, o)) : 1);
  101319. a && i[a - 1] == o ? i[a - 1] = s : (i[a++] = o, i[a++] = s);
  101320. }
  101321. return this.ret(e - r.length, i);
  101322. }
  101323. }
  101324. class tft {
  101325. constructor(e) {
  101326. this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase();
  101327. }
  101328. match(e) {
  101329. if (e.length < this.pattern.length)
  101330. return null;
  101331. let n = e.slice(0, this.pattern.length), r = n == this.pattern ? 0 : n.toLowerCase() == this.folded ? -200 : null;
  101332. return r == null ? null : (this.matched = [0, n.length], this.score = r + (e.length == this.pattern.length ? 0 : -100), this);
  101333. }
  101334. }
  101335. const br = /* @__PURE__ */ Be.define({
  101336. combine(t) {
  101337. return fs(t, {
  101338. activateOnTyping: !0,
  101339. activateOnCompletion: () => !1,
  101340. activateOnTypingDelay: 100,
  101341. selectOnOpen: !0,
  101342. override: null,
  101343. closeOnBlur: !0,
  101344. maxRenderedOptions: 100,
  101345. defaultKeymap: !0,
  101346. tooltipClass: () => "",
  101347. optionClass: () => "",
  101348. aboveCursor: !1,
  101349. icons: !0,
  101350. addToOptions: [],
  101351. positionInfo: nft,
  101352. filterStrict: !1,
  101353. compareCompletions: (e, n) => e.label.localeCompare(n.label),
  101354. interactionDelay: 75,
  101355. updateSyncTime: 100
  101356. }, {
  101357. defaultKeymap: (e, n) => e && n,
  101358. closeOnBlur: (e, n) => e && n,
  101359. icons: (e, n) => e && n,
  101360. tooltipClass: (e, n) => (r) => UG(e(r), n(r)),
  101361. optionClass: (e, n) => (r) => UG(e(r), n(r)),
  101362. addToOptions: (e, n) => e.concat(n),
  101363. filterStrict: (e, n) => e || n
  101364. });
  101365. }
  101366. });
  101367. function UG(t, e) {
  101368. return t ? e ? t + " " + e : t : e;
  101369. }
  101370. function nft(t, e, n, r, i, a) {
  101371. 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;
  101372. if (s && d < Math.min(p, h) ? s = !1 : !s && h < Math.min(p, d) && (s = !0), p <= (s ? d : h))
  101373. c = Math.max(i.top, Math.min(n.top, i.bottom - v)) - e.top, f = Math.min(400, s ? d : h);
  101374. else {
  101375. l = !0, f = Math.min(
  101376. 400,
  101377. (o ? e.right : i.right - e.left) - 30
  101378. /* Info.Margin */
  101379. );
  101380. let y = i.bottom - e.bottom;
  101381. y >= v || y > e.top ? c = n.bottom - e.top : (u = "bottom", c = e.bottom - n.top);
  101382. }
  101383. let g = (e.bottom - e.top) / a.offsetHeight, m = (e.right - e.left) / a.offsetWidth;
  101384. return {
  101385. style: `${u}: ${c / g}px; max-width: ${f / m}px`,
  101386. class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
  101387. };
  101388. }
  101389. function rft(t) {
  101390. let e = t.addToOptions.slice();
  101391. return t.icons && e.push({
  101392. render(n) {
  101393. let r = document.createElement("div");
  101394. 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;
  101395. },
  101396. position: 20
  101397. }), e.push({
  101398. render(n, r, i, a) {
  101399. let o = document.createElement("span");
  101400. o.className = "cm-completionLabel";
  101401. let s = n.displayLabel || n.label, l = 0;
  101402. for (let u = 0; u < a.length; ) {
  101403. let c = a[u++], f = a[u++];
  101404. c > l && o.appendChild(document.createTextNode(s.slice(l, c)));
  101405. let d = o.appendChild(document.createElement("span"));
  101406. d.appendChild(document.createTextNode(s.slice(c, f))), d.className = "cm-completionMatchedText", l = f;
  101407. }
  101408. return l < s.length && o.appendChild(document.createTextNode(s.slice(l))), o;
  101409. },
  101410. position: 50
  101411. }, {
  101412. render(n) {
  101413. if (!n.detail)
  101414. return null;
  101415. let r = document.createElement("span");
  101416. return r.className = "cm-completionDetail", r.textContent = n.detail, r;
  101417. },
  101418. position: 80
  101419. }), e.sort((n, r) => n.position - r.position).map((n) => n.render);
  101420. }
  101421. function k$(t, e, n) {
  101422. if (t <= n)
  101423. return { from: 0, to: t };
  101424. if (e < 0 && (e = 0), e <= t >> 1) {
  101425. let i = Math.floor(e / n);
  101426. return { from: i * n, to: (i + 1) * n };
  101427. }
  101428. let r = Math.floor((t - e) / n);
  101429. return { from: t - (r + 1) * n, to: t - r * n };
  101430. }
  101431. class ift {
  101432. constructor(e, n, r) {
  101433. this.view = e, this.stateField = n, this.applyCompletion = r, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
  101434. read: () => this.measureInfo(),
  101435. write: (l) => this.placeInfo(l),
  101436. key: this
  101437. }, this.space = null, this.currentClass = "";
  101438. let i = e.state.field(n), { options: a, selected: o } = i.open, s = e.state.facet(br);
  101439. this.optionContent = rft(s), this.optionClass = s.optionClass, this.tooltipClass = s.tooltipClass, this.range = k$(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) => {
  101440. let { options: u } = e.state.field(n).open;
  101441. for (let c = l.target, f; c && c != this.dom; c = c.parentNode)
  101442. if (c.nodeName == "LI" && (f = /-(\d+)$/.exec(c.id)) && +f[1] < u.length) {
  101443. this.applyCompletion(e, u[+f[1]]), l.preventDefault();
  101444. return;
  101445. }
  101446. }), this.dom.addEventListener("focusout", (l) => {
  101447. let u = e.state.field(this.stateField, !1);
  101448. u && u.tooltip && e.state.facet(br).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: r0.of(null) });
  101449. }), this.showOptions(a, i.id);
  101450. }
  101451. mount() {
  101452. this.updateSel();
  101453. }
  101454. showOptions(e, n) {
  101455. this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
  101456. this.info && this.view.requestMeasure(this.placeInfoReq);
  101457. });
  101458. }
  101459. update(e) {
  101460. var n;
  101461. let r = e.state.field(this.stateField), i = e.startState.field(this.stateField);
  101462. if (this.updateTooltipClass(e.state), r != i) {
  101463. let { options: a, selected: o, disabled: s } = r.open;
  101464. (!i.open || i.open.options != a) && (this.range = k$(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);
  101465. }
  101466. }
  101467. updateTooltipClass(e) {
  101468. let n = this.tooltipClass(e);
  101469. if (n != this.currentClass) {
  101470. for (let r of this.currentClass.split(" "))
  101471. r && this.dom.classList.remove(r);
  101472. for (let r of n.split(" "))
  101473. r && this.dom.classList.add(r);
  101474. this.currentClass = n;
  101475. }
  101476. }
  101477. positioned(e) {
  101478. this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
  101479. }
  101480. updateSel() {
  101481. let e = this.view.state.field(this.stateField), n = e.open;
  101482. if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = k$(n.options.length, n.selected, this.view.state.facet(br).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
  101483. this.destroyInfo();
  101484. let { completion: r } = n.options[n.selected], { info: i } = r;
  101485. if (!i)
  101486. return;
  101487. let a = typeof i == "string" ? document.createTextNode(i) : i(r);
  101488. if (!a)
  101489. return;
  101490. "then" in a ? a.then((o) => {
  101491. o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, r);
  101492. }).catch((o) => mi(this.view.state, o, "completion info")) : this.addInfoPane(a, r);
  101493. }
  101494. }
  101495. addInfoPane(e, n) {
  101496. this.destroyInfo();
  101497. let r = this.info = document.createElement("div");
  101498. if (r.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
  101499. r.appendChild(e), this.infoDestroy = null;
  101500. else {
  101501. let { dom: i, destroy: a } = e;
  101502. r.appendChild(i), this.infoDestroy = a || null;
  101503. }
  101504. this.dom.appendChild(r), this.view.requestMeasure(this.placeInfoReq);
  101505. }
  101506. updateSelectedOption(e) {
  101507. let n = null;
  101508. for (let r = this.list.firstChild, i = this.range.from; r; r = r.nextSibling, i++)
  101509. 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");
  101510. return n && oft(this.list, n), n;
  101511. }
  101512. measureInfo() {
  101513. let e = this.dom.querySelector("[aria-selected]");
  101514. if (!e || !this.info)
  101515. return null;
  101516. let n = this.dom.getBoundingClientRect(), r = this.info.getBoundingClientRect(), i = e.getBoundingClientRect(), a = this.space;
  101517. if (!a) {
  101518. let o = this.dom.ownerDocument.defaultView || window;
  101519. a = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
  101520. }
  101521. 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);
  101522. }
  101523. placeInfo(e) {
  101524. 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");
  101525. }
  101526. createListBox(e, n, r) {
  101527. const i = document.createElement("ul");
  101528. i.id = n, i.setAttribute("role", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-label", this.view.state.phrase("Completions"));
  101529. let a = null;
  101530. for (let o = r.from; o < r.to; o++) {
  101531. let { completion: s, match: l } = e[o], { section: u } = s;
  101532. if (u) {
  101533. let d = typeof u == "string" ? u : u.name;
  101534. if (d != a && (o > r.from || r.from == 0))
  101535. if (a = d, typeof u != "string" && u.header)
  101536. i.appendChild(u.header(u));
  101537. else {
  101538. let h = i.appendChild(document.createElement("completion-section"));
  101539. h.textContent = d;
  101540. }
  101541. }
  101542. const c = i.appendChild(document.createElement("li"));
  101543. c.id = n + "-" + o, c.setAttribute("role", "option");
  101544. let f = this.optionClass(s);
  101545. f && (c.className = f);
  101546. for (let d of this.optionContent) {
  101547. let h = d(s, this.view.state, this.view, l);
  101548. h && c.appendChild(h);
  101549. }
  101550. }
  101551. return r.from && i.classList.add("cm-completionListIncompleteTop"), r.to < e.length && i.classList.add("cm-completionListIncompleteBottom"), i;
  101552. }
  101553. destroyInfo() {
  101554. this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
  101555. }
  101556. destroy() {
  101557. this.destroyInfo();
  101558. }
  101559. }
  101560. function aft(t, e) {
  101561. return (n) => new ift(n, t, e);
  101562. }
  101563. function oft(t, e) {
  101564. let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = n.height / t.offsetHeight;
  101565. r.top < n.top ? t.scrollTop -= (n.top - r.top) / i : r.bottom > n.bottom && (t.scrollTop += (r.bottom - n.bottom) / i);
  101566. }
  101567. function XG(t) {
  101568. return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
  101569. }
  101570. function sft(t, e) {
  101571. let n = [], r = null, i = (u) => {
  101572. n.push(u);
  101573. let { section: c } = u.completion;
  101574. if (c) {
  101575. r || (r = []);
  101576. let f = typeof c == "string" ? c : c.name;
  101577. r.some((d) => d.name == f) || r.push(typeof c == "string" ? { name: f } : c);
  101578. }
  101579. }, a = e.facet(br);
  101580. for (let u of t)
  101581. if (u.hasResult()) {
  101582. let c = u.result.getMatch;
  101583. if (u.result.filter === !1)
  101584. for (let f of u.result.options)
  101585. i(new jG(f, u.source, c ? c(f) : [], 1e9 - n.length));
  101586. else {
  101587. let f = e.sliceDoc(u.from, u.to), d, h = a.filterStrict ? new tft(f) : new eft(f);
  101588. for (let p of u.result.options)
  101589. if (d = h.match(p.label)) {
  101590. let v = p.displayLabel ? c ? c(p, d.matched) : [] : d.matched;
  101591. i(new jG(p, u.source, v, d.score + (p.boost || 0)));
  101592. }
  101593. }
  101594. }
  101595. if (r) {
  101596. let u = /* @__PURE__ */ Object.create(null), c = 0, f = (d, h) => {
  101597. var p, v;
  101598. 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);
  101599. };
  101600. for (let d of r.sort(f))
  101601. c -= 1e5, u[d.name] = c;
  101602. for (let d of n) {
  101603. let { section: h } = d.completion;
  101604. h && (d.score += u[typeof h == "string" ? h : h.name]);
  101605. }
  101606. }
  101607. let o = [], s = null, l = a.compareCompletions;
  101608. for (let u of n.sort((c, f) => f.score - c.score || l(c.completion, f.completion))) {
  101609. let c = u.completion;
  101610. !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) : XG(u.completion) > XG(s) && (o[o.length - 1] = u), s = u.completion;
  101611. }
  101612. return o;
  101613. }
  101614. class Gd {
  101615. constructor(e, n, r, i, a, o) {
  101616. this.options = e, this.attrs = n, this.tooltip = r, this.timestamp = i, this.selected = a, this.disabled = o;
  101617. }
  101618. setSelected(e, n) {
  101619. return e == this.selected || e >= this.options.length ? this : new Gd(this.options, YG(n, e), this.tooltip, this.timestamp, e, this.disabled);
  101620. }
  101621. static build(e, n, r, i, a) {
  101622. let o = sft(e, n);
  101623. if (!o.length)
  101624. return i && e.some(
  101625. (l) => l.state == 1
  101626. /* State.Pending */
  101627. ) ? new Gd(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null;
  101628. let s = n.facet(br).selectOnOpen ? 0 : -1;
  101629. if (i && i.selected != s && i.selected != -1) {
  101630. let l = i.options[i.selected].completion;
  101631. for (let u = 0; u < o.length; u++)
  101632. if (o[u].completion == l) {
  101633. s = u;
  101634. break;
  101635. }
  101636. }
  101637. return new Gd(o, YG(r, s), {
  101638. pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
  101639. create: hft,
  101640. above: a.aboveCursor
  101641. }, i ? i.timestamp : Date.now(), s, !1);
  101642. }
  101643. map(e) {
  101644. return new Gd(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
  101645. }
  101646. }
  101647. class SS {
  101648. constructor(e, n, r) {
  101649. this.active = e, this.id = n, this.open = r;
  101650. }
  101651. static start() {
  101652. return new SS(fft, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
  101653. }
  101654. update(e) {
  101655. let { state: n } = e, r = n.facet(br), a = (r.override || n.languageDataAt("autocomplete", tu(n)).map(Jct)).map((s) => (this.active.find((u) => u.source == s) || new Ni(
  101656. s,
  101657. this.active.some(
  101658. (u) => u.state != 0
  101659. /* State.Inactive */
  101660. ) ? 1 : 0
  101661. /* State.Inactive */
  101662. )).update(e, r));
  101663. a.length == this.active.length && a.every((s, l) => s == this.active[l]) && (a = this.active);
  101664. let o = this.open;
  101665. o && e.docChanged && (o = o.map(e.changes)), e.selection || a.some((s) => s.hasResult() && e.changes.touchesRange(s.from, s.to)) || !lft(a, this.active) ? o = Gd.build(a, n, this.id, o, r) : o && o.disabled && !a.some(
  101666. (s) => s.state == 1
  101667. /* State.Pending */
  101668. ) && (o = null), !o && a.every(
  101669. (s) => s.state != 1
  101670. /* State.Pending */
  101671. ) && a.some((s) => s.hasResult()) && (a = a.map((s) => s.hasResult() ? new Ni(
  101672. s.source,
  101673. 0
  101674. /* State.Inactive */
  101675. ) : s));
  101676. for (let s of e.effects)
  101677. s.is(jse) && (o = o && o.setSelected(s.value, this.id));
  101678. return a == this.active && o == this.open ? this : new SS(a, this.id, o);
  101679. }
  101680. get tooltip() {
  101681. return this.open ? this.open.tooltip : null;
  101682. }
  101683. get attrs() {
  101684. return this.open ? this.open.attrs : this.active.length ? uft : cft;
  101685. }
  101686. }
  101687. function lft(t, e) {
  101688. if (t == e)
  101689. return !0;
  101690. for (let n = 0, r = 0; ; ) {
  101691. for (; n < t.length && !t[n].hasResult; )
  101692. n++;
  101693. for (; r < e.length && !e[r].hasResult; )
  101694. r++;
  101695. let i = n == t.length, a = r == e.length;
  101696. if (i || a)
  101697. return i == a;
  101698. if (t[n++].result != e[r++].result)
  101699. return !1;
  101700. }
  101701. }
  101702. const uft = {
  101703. "aria-autocomplete": "list"
  101704. }, cft = {};
  101705. function YG(t, e) {
  101706. let n = {
  101707. "aria-autocomplete": "list",
  101708. "aria-haspopup": "listbox",
  101709. "aria-controls": t
  101710. };
  101711. return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
  101712. }
  101713. const fft = [];
  101714. function Hse(t, e) {
  101715. if (t.isUserEvent("input.complete")) {
  101716. let r = t.annotation(P4);
  101717. if (r && e.activateOnCompletion(r))
  101718. return 12;
  101719. }
  101720. let n = t.isUserEvent("input.type");
  101721. return n && e.activateOnTyping ? 5 : n ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0;
  101722. }
  101723. class Ni {
  101724. constructor(e, n, r = -1) {
  101725. this.source = e, this.state = n, this.explicitPos = r;
  101726. }
  101727. hasResult() {
  101728. return !1;
  101729. }
  101730. update(e, n) {
  101731. let r = Hse(e, n), i = this;
  101732. (r & 8 || r & 16 && this.touches(e)) && (i = new Ni(
  101733. i.source,
  101734. 0
  101735. /* State.Inactive */
  101736. )), r & 4 && i.state == 0 && (i = new Ni(
  101737. this.source,
  101738. 1
  101739. /* State.Pending */
  101740. )), i = i.updateFor(e, r);
  101741. for (let a of e.effects)
  101742. if (a.is(OS))
  101743. i = new Ni(i.source, 1, a.value ? tu(e.state) : -1);
  101744. else if (a.is(r0))
  101745. i = new Ni(
  101746. i.source,
  101747. 0
  101748. /* State.Inactive */
  101749. );
  101750. else if (a.is(Gse))
  101751. for (let o of a.value)
  101752. o.source == i.source && (i = o);
  101753. return i;
  101754. }
  101755. updateFor(e, n) {
  101756. return this.map(e.changes);
  101757. }
  101758. map(e) {
  101759. return e.empty || this.explicitPos < 0 ? this : new Ni(this.source, this.state, e.mapPos(this.explicitPos));
  101760. }
  101761. touches(e) {
  101762. return e.changes.touchesRange(tu(e.state));
  101763. }
  101764. }
  101765. class fh extends Ni {
  101766. constructor(e, n, r, i, a) {
  101767. super(e, 2, n), this.result = r, this.from = i, this.to = a;
  101768. }
  101769. hasResult() {
  101770. return !0;
  101771. }
  101772. updateFor(e, n) {
  101773. var r;
  101774. if (!(n & 3))
  101775. return this.map(e.changes);
  101776. let i = this.result;
  101777. i.map && !e.changes.empty && (i = i.map(i, e.changes));
  101778. let a = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), s = tu(e.state);
  101779. if ((this.explicitPos < 0 ? s <= a : s < this.from) || s > o || !i || n & 2 && tu(e.startState) == this.from)
  101780. return new Ni(
  101781. this.source,
  101782. n & 4 ? 1 : 0
  101783. /* State.Inactive */
  101784. );
  101785. let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos);
  101786. return dft(i.validFor, e.state, a, o) ? new fh(this.source, l, i, a, o) : i.update && (i = i.update(i, a, o, new Fse(e.state, s, l >= 0))) ? new fh(this.source, l, i, i.from, (r = i.to) !== null && r !== void 0 ? r : tu(e.state)) : new Ni(this.source, 1, l);
  101787. }
  101788. map(e) {
  101789. return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new fh(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new Ni(
  101790. this.source,
  101791. 0
  101792. /* State.Inactive */
  101793. );
  101794. }
  101795. touches(e) {
  101796. return e.changes.touchesRange(this.from, this.to);
  101797. }
  101798. }
  101799. function dft(t, e, n, r) {
  101800. if (!t)
  101801. return !1;
  101802. let i = e.sliceDoc(n, r);
  101803. return typeof t == "function" ? t(i, n, r, e) : Qse(t, !0).test(i);
  101804. }
  101805. const Gse = /* @__PURE__ */ dt.define({
  101806. map(t, e) {
  101807. return t.map((n) => n.map(e));
  101808. }
  101809. }), jse = /* @__PURE__ */ dt.define(), vi = /* @__PURE__ */ ur.define({
  101810. create() {
  101811. return SS.start();
  101812. },
  101813. update(t, e) {
  101814. return t.update(e);
  101815. },
  101816. provide: (t) => [
  101817. u4.from(t, (e) => e.tooltip),
  101818. De.contentAttributes.from(t, (e) => e.attrs)
  101819. ]
  101820. });
  101821. function $4(t, e) {
  101822. const n = e.completion.apply || e.completion.label;
  101823. let r = t.state.field(vi).active.find((i) => i.source == e.source);
  101824. return r instanceof fh ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, Kct(t.state, n, r.from, r.to)), { annotations: P4.of(e.completion) })) : n(t, e.completion, r.from, r.to), !0) : !1;
  101825. }
  101826. const hft = /* @__PURE__ */ aft(vi, $4);
  101827. function u_(t, e = "option") {
  101828. return (n) => {
  101829. let r = n.state.field(vi, !1);
  101830. if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(br).interactionDelay)
  101831. return !1;
  101832. let i = 1, a;
  101833. e == "page" && (a = woe(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
  101834. let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (t ? 1 : -1) : t ? 0 : o - 1;
  101835. return s < 0 ? s = e == "page" ? 0 : o - 1 : s >= o && (s = e == "page" ? o - 1 : 0), n.dispatch({ effects: jse.of(s) }), !0;
  101836. };
  101837. }
  101838. const pft = (t) => {
  101839. let e = t.state.field(vi, !1);
  101840. 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 : $4(t, e.open.options[e.open.selected]);
  101841. }, vft = (t) => t.state.field(vi, !1) ? (t.dispatch({ effects: OS.of(!0) }), !0) : !1, gft = (t) => {
  101842. let e = t.state.field(vi, !1);
  101843. return !e || !e.active.some(
  101844. (n) => n.state != 0
  101845. /* State.Inactive */
  101846. ) ? !1 : (t.dispatch({ effects: r0.of(null) }), !0);
  101847. };
  101848. class mft {
  101849. constructor(e, n) {
  101850. this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
  101851. }
  101852. }
  101853. const yft = 50, bft = 1e3, _ft = /* @__PURE__ */ kn.fromClass(class {
  101854. constructor(t) {
  101855. this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
  101856. for (let e of t.state.field(vi).active)
  101857. e.state == 1 && this.startQuery(e);
  101858. }
  101859. update(t) {
  101860. let e = t.state.field(vi), n = t.state.facet(br);
  101861. if (!t.selectionSet && !t.docChanged && t.startState.field(vi) == e)
  101862. return;
  101863. let r = t.transactions.some((a) => {
  101864. let o = Hse(a, n);
  101865. return o & 8 || (a.selection || a.docChanged) && !(o & 3);
  101866. });
  101867. for (let a = 0; a < this.running.length; a++) {
  101868. let o = this.running[a];
  101869. if (r || o.updates.length + t.transactions.length > yft && Date.now() - o.time > bft) {
  101870. for (let s of o.context.abortListeners)
  101871. try {
  101872. s();
  101873. } catch (l) {
  101874. mi(this.view.state, l);
  101875. }
  101876. o.context.abortListeners = null, this.running.splice(a--, 1);
  101877. } else
  101878. o.updates.push(...t.transactions);
  101879. }
  101880. this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((a) => a.effects.some((o) => o.is(OS))) && (this.pendingStart = !0);
  101881. let i = this.pendingStart ? 50 : n.activateOnTypingDelay;
  101882. 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)
  101883. for (let a of t.transactions)
  101884. a.isUserEvent("input.type") ? this.composing = 2 : this.composing == 2 && a.selection && (this.composing = 3);
  101885. }
  101886. startUpdate() {
  101887. this.debounceUpdate = -1, this.pendingStart = !1;
  101888. let { state: t } = this.view, e = t.field(vi);
  101889. for (let n of e.active)
  101890. n.state == 1 && !this.running.some((r) => r.active.source == n.source) && this.startQuery(n);
  101891. }
  101892. startQuery(t) {
  101893. let { state: e } = this.view, n = tu(e), r = new Fse(e, n, t.explicitPos == n, this.view), i = new mft(t, r);
  101894. this.running.push(i), Promise.resolve(t.source(r)).then((a) => {
  101895. i.context.aborted || (i.done = a || null, this.scheduleAccept());
  101896. }, (a) => {
  101897. this.view.dispatch({ effects: r0.of(null) }), mi(this.view.state, a);
  101898. });
  101899. }
  101900. scheduleAccept() {
  101901. this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(br).updateSyncTime));
  101902. }
  101903. // For each finished query in this.running, try to create a result
  101904. // or, if appropriate, restart the query.
  101905. accept() {
  101906. var t;
  101907. this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
  101908. let e = [], n = this.view.state.facet(br);
  101909. for (let r = 0; r < this.running.length; r++) {
  101910. let i = this.running[r];
  101911. if (i.done === void 0)
  101912. continue;
  101913. if (this.running.splice(r--, 1), i.done) {
  101914. let o = new fh(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));
  101915. for (let s of i.updates)
  101916. o = o.update(s, n);
  101917. if (o.hasResult()) {
  101918. e.push(o);
  101919. continue;
  101920. }
  101921. }
  101922. let a = this.view.state.field(vi).active.find((o) => o.source == i.active.source);
  101923. if (a && a.state == 1)
  101924. if (i.done == null) {
  101925. let o = new Ni(
  101926. i.active.source,
  101927. 0
  101928. /* State.Inactive */
  101929. );
  101930. for (let s of i.updates)
  101931. o = o.update(s, n);
  101932. o.state != 1 && e.push(o);
  101933. } else
  101934. this.startQuery(a);
  101935. }
  101936. e.length && this.view.dispatch({ effects: Gse.of(e) });
  101937. }
  101938. }, {
  101939. eventHandlers: {
  101940. blur(t) {
  101941. let e = this.view.state.field(vi, !1);
  101942. if (e && e.tooltip && this.view.state.facet(br).closeOnBlur) {
  101943. let n = e.open && woe(this.view, e.open.tooltip);
  101944. (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: r0.of(null) }), 10);
  101945. }
  101946. },
  101947. compositionstart() {
  101948. this.composing = 1;
  101949. },
  101950. compositionend() {
  101951. this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: OS.of(!1) }), 20), this.composing = 0;
  101952. }
  101953. }
  101954. }), Oft = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), Sft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.domEventHandlers({
  101955. keydown(t, e) {
  101956. let n = e.state.field(vi, !1);
  101957. if (!n || !n.open || n.open.disabled || n.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(Oft && t.altKey) || t.metaKey)
  101958. return !1;
  101959. let r = n.open.options[n.open.selected], i = n.active.find((o) => o.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
  101960. return a && a.indexOf(t.key) > -1 && $4(e, r), !1;
  101961. }
  101962. })), Zse = /* @__PURE__ */ De.baseTheme({
  101963. ".cm-tooltip.cm-tooltip-autocomplete": {
  101964. "& > ul": {
  101965. fontFamily: "monospace",
  101966. whiteSpace: "nowrap",
  101967. overflow: "hidden auto",
  101968. maxWidth_fallback: "700px",
  101969. maxWidth: "min(700px, 95vw)",
  101970. minWidth: "250px",
  101971. maxHeight: "10em",
  101972. height: "100%",
  101973. listStyle: "none",
  101974. margin: 0,
  101975. padding: 0,
  101976. "& > li, & > completion-section": {
  101977. padding: "1px 3px",
  101978. lineHeight: 1.2
  101979. },
  101980. "& > li": {
  101981. overflowX: "hidden",
  101982. textOverflow: "ellipsis",
  101983. cursor: "pointer"
  101984. },
  101985. "& > completion-section": {
  101986. display: "list-item",
  101987. borderBottom: "1px solid silver",
  101988. paddingLeft: "0.5em",
  101989. opacity: 0.7
  101990. }
  101991. }
  101992. },
  101993. "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
  101994. background: "#17c",
  101995. color: "white"
  101996. },
  101997. "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
  101998. background: "#777"
  101999. },
  102000. "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
  102001. background: "#347",
  102002. color: "white"
  102003. },
  102004. "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
  102005. background: "#444"
  102006. },
  102007. ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
  102008. content: '"···"',
  102009. opacity: 0.5,
  102010. display: "block",
  102011. textAlign: "center"
  102012. },
  102013. ".cm-tooltip.cm-completionInfo": {
  102014. position: "absolute",
  102015. padding: "3px 9px",
  102016. width: "max-content",
  102017. maxWidth: "400px",
  102018. boxSizing: "border-box"
  102019. },
  102020. ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
  102021. ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
  102022. ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
  102023. ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
  102024. "&light .cm-snippetField": { backgroundColor: "#00000022" },
  102025. "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
  102026. ".cm-snippetFieldPosition": {
  102027. verticalAlign: "text-top",
  102028. width: 0,
  102029. height: "1.15em",
  102030. display: "inline-block",
  102031. margin: "0 -0.7px -.7em",
  102032. borderLeft: "1.4px dotted #888"
  102033. },
  102034. ".cm-completionMatchedText": {
  102035. textDecoration: "underline"
  102036. },
  102037. ".cm-completionDetail": {
  102038. marginLeft: "0.5em",
  102039. fontStyle: "italic"
  102040. },
  102041. ".cm-completionIcon": {
  102042. fontSize: "90%",
  102043. width: ".8em",
  102044. display: "inline-block",
  102045. textAlign: "center",
  102046. paddingRight: ".6em",
  102047. opacity: "0.6",
  102048. boxSizing: "content-box"
  102049. },
  102050. ".cm-completionIcon-function, .cm-completionIcon-method": {
  102051. "&:after": { content: "'ƒ'" }
  102052. },
  102053. ".cm-completionIcon-class": {
  102054. "&:after": { content: "'○'" }
  102055. },
  102056. ".cm-completionIcon-interface": {
  102057. "&:after": { content: "'◌'" }
  102058. },
  102059. ".cm-completionIcon-variable": {
  102060. "&:after": { content: "'𝑥'" }
  102061. },
  102062. ".cm-completionIcon-constant": {
  102063. "&:after": { content: "'𝐶'" }
  102064. },
  102065. ".cm-completionIcon-type": {
  102066. "&:after": { content: "'𝑡'" }
  102067. },
  102068. ".cm-completionIcon-enum": {
  102069. "&:after": { content: "'∪'" }
  102070. },
  102071. ".cm-completionIcon-property": {
  102072. "&:after": { content: "'□'" }
  102073. },
  102074. ".cm-completionIcon-keyword": {
  102075. "&:after": { content: "'🔑︎'" }
  102076. // Disable emoji rendering
  102077. },
  102078. ".cm-completionIcon-namespace": {
  102079. "&:after": { content: "'▢'" }
  102080. },
  102081. ".cm-completionIcon-text": {
  102082. "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
  102083. }
  102084. });
  102085. class xft {
  102086. constructor(e, n, r, i) {
  102087. this.field = e, this.line = n, this.from = r, this.to = i;
  102088. }
  102089. }
  102090. class A4 {
  102091. constructor(e, n, r) {
  102092. this.field = e, this.from = n, this.to = r;
  102093. }
  102094. map(e) {
  102095. let n = e.mapPos(this.from, -1, yr.TrackDel), r = e.mapPos(this.to, 1, yr.TrackDel);
  102096. return n == null || r == null ? null : new A4(this.field, n, r);
  102097. }
  102098. }
  102099. class E4 {
  102100. constructor(e, n) {
  102101. this.lines = e, this.fieldPositions = n;
  102102. }
  102103. instantiate(e, n) {
  102104. let r = [], i = [n], a = e.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
  102105. for (let l of this.lines) {
  102106. if (r.length) {
  102107. let u = o, c = /^\t*/.exec(l)[0].length;
  102108. for (let f = 0; f < c; f++)
  102109. u += e.facet(ly);
  102110. i.push(n + u.length - c), l = u + l.slice(c);
  102111. }
  102112. r.push(l), n += l.length + 1;
  102113. }
  102114. let s = this.fieldPositions.map((l) => new A4(l.field, i[l.line] + l.from, i[l.line] + l.to));
  102115. return { text: r, ranges: s };
  102116. }
  102117. static parse(e) {
  102118. let n = [], r = [], i = [], a;
  102119. for (let o of e.split(/\r\n?|\n/)) {
  102120. for (; a = /[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o); ) {
  102121. let s = a[1] ? +a[1] : null, l = a[2] || a[3] || "", u = -1, c = l.replace(/\\[{}]/g, (f) => f[1]);
  102122. for (let f = 0; f < n.length; f++)
  102123. (s != null ? n[f].seq == s : c && n[f].name == c) && (u = f);
  102124. if (u < 0) {
  102125. let f = 0;
  102126. for (; f < n.length && (s == null || n[f].seq != null && n[f].seq < s); )
  102127. f++;
  102128. n.splice(f, 0, { seq: s, name: c }), u = f;
  102129. for (let d of i)
  102130. d.field >= u && d.field++;
  102131. }
  102132. i.push(new xft(u, r.length, a.index, a.index + c.length)), o = o.slice(0, a.index) + l + o.slice(a.index + a[0].length);
  102133. }
  102134. o = o.replace(/\\([{}])/g, (s, l, u) => {
  102135. for (let c of i)
  102136. c.line == r.length && c.from > u && (c.from--, c.to--);
  102137. return l;
  102138. }), r.push(o);
  102139. }
  102140. return new E4(r, i);
  102141. }
  102142. }
  102143. let wft = /* @__PURE__ */ Ze.widget({ widget: /* @__PURE__ */ new class extends ds {
  102144. toDOM() {
  102145. let t = document.createElement("span");
  102146. return t.className = "cm-snippetFieldPosition", t;
  102147. }
  102148. ignoreEvent() {
  102149. return !1;
  102150. }
  102151. }() }), Cft = /* @__PURE__ */ Ze.mark({ class: "cm-snippetField" });
  102152. class Np {
  102153. constructor(e, n) {
  102154. this.ranges = e, this.active = n, this.deco = Ze.set(e.map((r) => (r.from == r.to ? wft : Cft).range(r.from, r.to)));
  102155. }
  102156. map(e) {
  102157. let n = [];
  102158. for (let r of this.ranges) {
  102159. let i = r.map(e);
  102160. if (!i)
  102161. return null;
  102162. n.push(i);
  102163. }
  102164. return new Np(n, this.active);
  102165. }
  102166. selectionInsideField(e) {
  102167. return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
  102168. }
  102169. }
  102170. const hy = /* @__PURE__ */ dt.define({
  102171. map(t, e) {
  102172. return t && t.map(e);
  102173. }
  102174. }), Tft = /* @__PURE__ */ dt.define(), i0 = /* @__PURE__ */ ur.define({
  102175. create() {
  102176. return null;
  102177. },
  102178. update(t, e) {
  102179. for (let n of e.effects) {
  102180. if (n.is(hy))
  102181. return n.value;
  102182. if (n.is(Tft) && t)
  102183. return new Np(t.ranges, n.value);
  102184. }
  102185. return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
  102186. },
  102187. provide: (t) => De.decorations.from(t, (e) => e ? e.deco : Ze.none)
  102188. });
  102189. function M4(t, e) {
  102190. return me.create(t.filter((n) => n.field == e).map((n) => me.range(n.from, n.to)));
  102191. }
  102192. function Pft(t) {
  102193. let e = E4.parse(t);
  102194. return (n, r, i, a) => {
  102195. let { text: o, ranges: s } = e.instantiate(n.state, i), l = {
  102196. changes: { from: i, to: a, insert: Ft.of(o) },
  102197. scrollIntoView: !0,
  102198. annotations: r ? [P4.of(r), Fn.userEvent.of("input.complete")] : void 0
  102199. };
  102200. if (s.length && (l.selection = M4(s, 0)), s.some((u) => u.field > 0)) {
  102201. let u = new Np(s, 0), c = l.effects = [hy.of(u)];
  102202. n.state.field(i0, !1) === void 0 && c.push(dt.appendConfig.of([i0, Ift, Dft, Zse]));
  102203. }
  102204. n.dispatch(n.state.update(l));
  102205. };
  102206. }
  102207. function Use(t) {
  102208. return ({ state: e, dispatch: n }) => {
  102209. let r = e.field(i0, !1);
  102210. if (!r || t < 0 && r.active == 0)
  102211. return !1;
  102212. let i = r.active + t, a = t > 0 && !r.ranges.some((o) => o.field == i + t);
  102213. return n(e.update({
  102214. selection: M4(r.ranges, i),
  102215. effects: hy.of(a ? null : new Np(r.ranges, i)),
  102216. scrollIntoView: !0
  102217. })), !0;
  102218. };
  102219. }
  102220. const $ft = ({ state: t, dispatch: e }) => t.field(i0, !1) ? (e(t.update({ effects: hy.of(null) })), !0) : !1, Aft = /* @__PURE__ */ Use(1), Eft = /* @__PURE__ */ Use(-1), Mft = [
  102221. { key: "Tab", run: Aft, shift: Eft },
  102222. { key: "Escape", run: $ft }
  102223. ], qG = /* @__PURE__ */ Be.define({
  102224. combine(t) {
  102225. return t.length ? t[0] : Mft;
  102226. }
  102227. }), Ift = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ oy.compute([qG], (t) => t.facet(qG)));
  102228. function ui(t, e) {
  102229. return Object.assign(Object.assign({}, e), { apply: Pft(t) });
  102230. }
  102231. const Dft = /* @__PURE__ */ De.domEventHandlers({
  102232. mousedown(t, e) {
  102233. let n = e.state.field(i0, !1), r;
  102234. if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
  102235. return !1;
  102236. let i = n.ranges.find((a) => a.from <= r && a.to >= r);
  102237. return !i || i.field == n.active ? !1 : (e.dispatch({
  102238. selection: M4(n.ranges, i.field),
  102239. effects: hy.of(n.ranges.some((a) => a.field > i.field) ? new Np(n.ranges, i.field) : null),
  102240. scrollIntoView: !0
  102241. }), !0);
  102242. }
  102243. }), a0 = {
  102244. brackets: ["(", "[", "{", "'", '"'],
  102245. before: ")]}:;>",
  102246. stringPrefixes: []
  102247. }, Qc = /* @__PURE__ */ dt.define({
  102248. map(t, e) {
  102249. let n = e.mapPos(t, -1, yr.TrackAfter);
  102250. return n ?? void 0;
  102251. }
  102252. }), I4 = /* @__PURE__ */ new class extends wf {
  102253. }();
  102254. I4.startSide = 1;
  102255. I4.endSide = -1;
  102256. const Xse = /* @__PURE__ */ ur.define({
  102257. create() {
  102258. return Vt.empty;
  102259. },
  102260. update(t, e) {
  102261. if (t = t.map(e.changes), e.selection) {
  102262. let n = e.state.doc.lineAt(e.selection.main.head);
  102263. t = t.update({ filter: (r) => r >= n.from && r <= n.to });
  102264. }
  102265. for (let n of e.effects)
  102266. n.is(Qc) && (t = t.update({ add: [I4.range(n.value, n.value + 1)] }));
  102267. return t;
  102268. }
  102269. });
  102270. function Rft() {
  102271. return [Lft, Xse];
  102272. }
  102273. const L$ = "()[]{}<>";
  102274. function Yse(t) {
  102275. for (let e = 0; e < L$.length; e += 2)
  102276. if (L$.charCodeAt(e) == t)
  102277. return L$.charAt(e + 1);
  102278. return KL(t < 128 ? t : t + 1);
  102279. }
  102280. function qse(t, e) {
  102281. return t.languageDataAt("closeBrackets", e)[0] || a0;
  102282. }
  102283. const kft = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Lft = /* @__PURE__ */ De.inputHandler.of((t, e, n, r) => {
  102284. if ((kft ? t.composing : t.compositionStarted) || t.state.readOnly)
  102285. return !1;
  102286. let i = t.state.selection.main;
  102287. if (r.length > 2 || r.length == 2 && ga(gr(r, 0)) == 1 || e != i.from || n != i.to)
  102288. return !1;
  102289. let a = zft(t.state, r);
  102290. return a ? (t.dispatch(a), !0) : !1;
  102291. }), Nft = ({ state: t, dispatch: e }) => {
  102292. if (t.readOnly)
  102293. return !1;
  102294. let r = qse(t, t.selection.main.head).brackets || a0.brackets, i = null, a = t.changeByRange((o) => {
  102295. if (o.empty) {
  102296. let s = Vft(t.doc, o.head);
  102297. for (let l of r)
  102298. if (l == s && Fw(t.doc, o.head) == Yse(gr(l, 0)))
  102299. return {
  102300. changes: { from: o.head - l.length, to: o.head + l.length },
  102301. range: me.cursor(o.head - l.length)
  102302. };
  102303. }
  102304. return { range: i = o };
  102305. });
  102306. return i || e(t.update(a, { scrollIntoView: !0, userEvent: "delete.backward" })), !i;
  102307. }, Bft = [
  102308. { key: "Backspace", run: Nft }
  102309. ];
  102310. function zft(t, e) {
  102311. let n = qse(t, t.selection.main.head), r = n.brackets || a0.brackets;
  102312. for (let i of r) {
  102313. let a = Yse(gr(i, 0));
  102314. if (e == i)
  102315. return a == i ? Qft(t, i, r.indexOf(i + i + i) > -1, n) : Fft(t, i, a, n.before || a0.before);
  102316. if (e == a && Kse(t, t.selection.main.from))
  102317. return Wft(t, i, a);
  102318. }
  102319. return null;
  102320. }
  102321. function Kse(t, e) {
  102322. let n = !1;
  102323. return t.field(Xse).between(0, t.doc.length, (r) => {
  102324. r == e && (n = !0);
  102325. }), n;
  102326. }
  102327. function Fw(t, e) {
  102328. let n = t.sliceString(e, e + 2);
  102329. return n.slice(0, ga(gr(n, 0)));
  102330. }
  102331. function Vft(t, e) {
  102332. let n = t.sliceString(e - 2, e);
  102333. return ga(gr(n, 0)) == n.length ? n : n.slice(1);
  102334. }
  102335. function Fft(t, e, n, r) {
  102336. let i = null, a = t.changeByRange((o) => {
  102337. if (!o.empty)
  102338. return {
  102339. changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
  102340. effects: Qc.of(o.to + e.length),
  102341. range: me.range(o.anchor + e.length, o.head + e.length)
  102342. };
  102343. let s = Fw(t.doc, o.head);
  102344. return !s || /\s/.test(s) || r.indexOf(s) > -1 ? {
  102345. changes: { insert: e + n, from: o.head },
  102346. effects: Qc.of(o.head + e.length),
  102347. range: me.cursor(o.head + e.length)
  102348. } : { range: i = o };
  102349. });
  102350. return i ? null : t.update(a, {
  102351. scrollIntoView: !0,
  102352. userEvent: "input.type"
  102353. });
  102354. }
  102355. function Wft(t, e, n) {
  102356. let r = null, i = t.changeByRange((a) => a.empty && Fw(t.doc, a.head) == n ? {
  102357. changes: { from: a.head, to: a.head + n.length, insert: n },
  102358. range: me.cursor(a.head + n.length)
  102359. } : r = { range: a });
  102360. return r ? null : t.update(i, {
  102361. scrollIntoView: !0,
  102362. userEvent: "input.type"
  102363. });
  102364. }
  102365. function Qft(t, e, n, r) {
  102366. let i = r.stringPrefixes || a0.stringPrefixes, a = null, o = t.changeByRange((s) => {
  102367. if (!s.empty)
  102368. return {
  102369. changes: [{ insert: e, from: s.from }, { insert: e, from: s.to }],
  102370. effects: Qc.of(s.to + e.length),
  102371. range: me.range(s.anchor + e.length, s.head + e.length)
  102372. };
  102373. let l = s.head, u = Fw(t.doc, l), c;
  102374. if (u == e) {
  102375. if (KG(t, l))
  102376. return {
  102377. changes: { insert: e + e, from: l },
  102378. effects: Qc.of(l + e.length),
  102379. range: me.cursor(l + e.length)
  102380. };
  102381. if (Kse(t, l)) {
  102382. let d = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
  102383. return {
  102384. changes: { from: l, to: l + d.length, insert: d },
  102385. range: me.cursor(l + d.length)
  102386. };
  102387. }
  102388. } else {
  102389. if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (c = JG(t, l - 2 * e.length, i)) > -1 && KG(t, c))
  102390. return {
  102391. changes: { insert: e + e + e + e, from: l },
  102392. effects: Qc.of(l + e.length),
  102393. range: me.cursor(l + e.length)
  102394. };
  102395. if (t.charCategorizer(l)(u) != yn.Word && JG(t, l, i) > -1 && !Hft(t, l, e, i))
  102396. return {
  102397. changes: { insert: e + e, from: l },
  102398. effects: Qc.of(l + e.length),
  102399. range: me.cursor(l + e.length)
  102400. };
  102401. }
  102402. return { range: a = s };
  102403. });
  102404. return a ? null : t.update(o, {
  102405. scrollIntoView: !0,
  102406. userEvent: "input.type"
  102407. });
  102408. }
  102409. function KG(t, e) {
  102410. let n = nr(t).resolveInner(e + 1);
  102411. return n.parent && n.from == e;
  102412. }
  102413. function Hft(t, e, n, r) {
  102414. let i = nr(t).resolveInner(e, -1), a = r.reduce((o, s) => Math.max(o, s.length), 0);
  102415. for (let o = 0; o < 5; o++) {
  102416. let s = t.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), l = s.indexOf(n);
  102417. if (!l || l > -1 && r.indexOf(s.slice(0, l)) > -1) {
  102418. let c = i.firstChild;
  102419. for (; c && c.from == i.from && c.to - c.from > n.length + l; ) {
  102420. if (t.sliceDoc(c.to - n.length, c.to) == n)
  102421. return !1;
  102422. c = c.firstChild;
  102423. }
  102424. return !0;
  102425. }
  102426. let u = i.to == e && i.parent;
  102427. if (!u)
  102428. break;
  102429. i = u;
  102430. }
  102431. return !1;
  102432. }
  102433. function JG(t, e, n) {
  102434. let r = t.charCategorizer(e);
  102435. if (r(t.sliceDoc(e - 1, e)) != yn.Word)
  102436. return e;
  102437. for (let i of n) {
  102438. let a = e - i.length;
  102439. if (t.sliceDoc(a, e) == i && r(t.sliceDoc(a - 1, a)) != yn.Word)
  102440. return a;
  102441. }
  102442. return -1;
  102443. }
  102444. function Gft(t = {}) {
  102445. return [
  102446. Sft,
  102447. vi,
  102448. br.of(t),
  102449. _ft,
  102450. jft,
  102451. Zse
  102452. ];
  102453. }
  102454. const Jse = [
  102455. { key: "Ctrl-Space", run: vft },
  102456. { key: "Escape", run: gft },
  102457. { key: "ArrowDown", run: /* @__PURE__ */ u_(!0) },
  102458. { key: "ArrowUp", run: /* @__PURE__ */ u_(!1) },
  102459. { key: "PageDown", run: /* @__PURE__ */ u_(!0, "page") },
  102460. { key: "PageUp", run: /* @__PURE__ */ u_(!1, "page") },
  102461. { key: "Enter", run: pft }
  102462. ], jft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ oy.computeN([br], (t) => t.facet(br).defaultKeymap ? [Jse] : []));
  102463. class Zft {
  102464. constructor(e, n, r) {
  102465. this.from = e, this.to = n, this.diagnostic = r;
  102466. }
  102467. }
  102468. class $c {
  102469. constructor(e, n, r) {
  102470. this.diagnostics = e, this.panel = n, this.selected = r;
  102471. }
  102472. static init(e, n, r) {
  102473. let i = e, a = r.facet(o0).markerFilter;
  102474. a && (i = a(i, r));
  102475. 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({
  102476. widget: new ndt(s),
  102477. diagnostic: s
  102478. }).range(s.from) : Ze.mark({
  102479. attributes: { class: "cm-lintRange cm-lintRange-" + s.severity + (s.markClass ? " " + s.markClass : "") },
  102480. diagnostic: s
  102481. }).range(s.from, s.to)), !0);
  102482. return new $c(o, n, Jh(o));
  102483. }
  102484. }
  102485. function Jh(t, e = null, n = 0) {
  102486. let r = null;
  102487. return t.between(n, 1e9, (i, a, { spec: o }) => {
  102488. if (!(e && o.diagnostic != e))
  102489. return r = new Zft(i, a, o.diagnostic), !1;
  102490. }), r;
  102491. }
  102492. function Uft(t, e) {
  102493. let n = e.pos, r = e.end || n, i = t.state.facet(o0).hideOn(t, n, r);
  102494. if (i != null)
  102495. return i;
  102496. let a = t.startState.doc.lineAt(e.pos);
  102497. return !!(t.effects.some((o) => o.is(ele)) || t.changes.touchesRange(a.from, Math.max(a.to, r)));
  102498. }
  102499. function Xft(t, e) {
  102500. return t.field(Wi, !1) ? e : e.concat(dt.appendConfig.of(adt));
  102501. }
  102502. const ele = /* @__PURE__ */ dt.define(), D4 = /* @__PURE__ */ dt.define(), tle = /* @__PURE__ */ dt.define(), Wi = /* @__PURE__ */ ur.define({
  102503. create() {
  102504. return new $c(Ze.none, null, null);
  102505. },
  102506. update(t, e) {
  102507. if (e.docChanged && t.diagnostics.size) {
  102508. let n = t.diagnostics.map(e.changes), r = null, i = t.panel;
  102509. if (t.selected) {
  102510. let a = e.changes.mapPos(t.selected.from, 1);
  102511. r = Jh(n, t.selected.diagnostic, a) || Jh(n, null, a);
  102512. }
  102513. !n.size && i && e.state.facet(o0).autoPanel && (i = null), t = new $c(n, i, r);
  102514. }
  102515. for (let n of e.effects)
  102516. if (n.is(ele)) {
  102517. let r = e.state.facet(o0).autoPanel ? n.value.length ? s0.open : null : t.panel;
  102518. t = $c.init(n.value, r, e.state);
  102519. } else n.is(D4) ? t = new $c(t.diagnostics, n.value ? s0.open : null, t.selected) : n.is(tle) && (t = new $c(t.diagnostics, t.panel, n.value));
  102520. return t;
  102521. },
  102522. provide: (t) => [
  102523. Km.from(t, (e) => e.panel),
  102524. De.decorations.from(t, (e) => e.diagnostics)
  102525. ]
  102526. }), Yft = /* @__PURE__ */ Ze.mark({ class: "cm-lintRange cm-lintRange-active" });
  102527. function qft(t, e, n) {
  102528. let { diagnostics: r } = t.state.field(Wi), i = [], a = 2e8, o = 0;
  102529. r.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: c }) => {
  102530. 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));
  102531. });
  102532. let s = t.state.facet(o0).tooltipFilter;
  102533. return s && (i = s(i, t.state)), i.length ? {
  102534. pos: a,
  102535. end: o,
  102536. above: t.state.doc.lineAt(a).to < o,
  102537. create() {
  102538. return { dom: Kft(t, i) };
  102539. }
  102540. } : null;
  102541. }
  102542. function Kft(t, e) {
  102543. return on("ul", { class: "cm-tooltip-lint" }, e.map((n) => rle(t, n, !1)));
  102544. }
  102545. const Jft = (t) => {
  102546. let e = t.state.field(Wi, !1);
  102547. (!e || !e.panel) && t.dispatch({ effects: Xft(t.state, [D4.of(!0)]) });
  102548. let n = qm(t, s0.open);
  102549. return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
  102550. }, e9 = (t) => {
  102551. let e = t.state.field(Wi, !1);
  102552. return !e || !e.panel ? !1 : (t.dispatch({ effects: D4.of(!1) }), !0);
  102553. }, edt = (t) => {
  102554. let e = t.state.field(Wi, !1);
  102555. if (!e)
  102556. return !1;
  102557. let n = t.state.selection.main, r = e.diagnostics.iter(n.to + 1);
  102558. 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);
  102559. }, tdt = [
  102560. { key: "Mod-Shift-m", run: Jft, preventDefault: !0 },
  102561. { key: "F8", run: edt }
  102562. ], o0 = /* @__PURE__ */ Be.define({
  102563. combine(t) {
  102564. return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, fs(t.map((e) => e.config), {
  102565. delay: 750,
  102566. markerFilter: null,
  102567. tooltipFilter: null,
  102568. needsRefresh: null,
  102569. hideOn: () => null
  102570. }, {
  102571. needsRefresh: (e, n) => e ? n ? (r) => e(r) || n(r) : e : n
  102572. }));
  102573. }
  102574. });
  102575. function nle(t) {
  102576. let e = [];
  102577. if (t)
  102578. e: for (let { name: n } of t) {
  102579. for (let r = 0; r < n.length; r++) {
  102580. let i = n[r];
  102581. if (/[a-zA-Z]/.test(i) && !e.some((a) => a.toLowerCase() == i.toLowerCase())) {
  102582. e.push(i);
  102583. continue e;
  102584. }
  102585. }
  102586. e.push("");
  102587. }
  102588. return e;
  102589. }
  102590. function rle(t, e, n) {
  102591. var r;
  102592. let i = n ? nle(e.actions) : [];
  102593. 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) => {
  102594. let s = !1, l = (d) => {
  102595. if (d.preventDefault(), s)
  102596. return;
  102597. s = !0;
  102598. let h = Jh(t.state.field(Wi).diagnostics, e);
  102599. h && a.apply(t, h.from, h.to);
  102600. }, { name: u } = a, c = i[o] ? u.indexOf(i[o]) : -1, f = c < 0 ? u : [
  102601. u.slice(0, c),
  102602. on("u", u.slice(c, c + 1)),
  102603. u.slice(c + 1)
  102604. ];
  102605. return on("button", {
  102606. type: "button",
  102607. class: "cm-diagnosticAction",
  102608. onclick: l,
  102609. onmousedown: l,
  102610. "aria-label": ` Action: ${u}${c < 0 ? "" : ` (access key "${i[o]})"`}.`
  102611. }, f);
  102612. }), e.source && on("div", { class: "cm-diagnosticSource" }, e.source));
  102613. }
  102614. class ndt extends ds {
  102615. constructor(e) {
  102616. super(), this.diagnostic = e;
  102617. }
  102618. eq(e) {
  102619. return e.diagnostic == this.diagnostic;
  102620. }
  102621. toDOM() {
  102622. return on("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
  102623. }
  102624. }
  102625. class t9 {
  102626. constructor(e, n) {
  102627. this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = rle(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
  102628. }
  102629. }
  102630. class s0 {
  102631. constructor(e) {
  102632. this.view = e, this.items = [];
  102633. let n = (i) => {
  102634. if (i.keyCode == 27)
  102635. e9(this.view), this.view.focus();
  102636. else if (i.keyCode == 38 || i.keyCode == 33)
  102637. this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
  102638. else if (i.keyCode == 40 || i.keyCode == 34)
  102639. this.moveSelection((this.selectedIndex + 1) % this.items.length);
  102640. else if (i.keyCode == 36)
  102641. this.moveSelection(0);
  102642. else if (i.keyCode == 35)
  102643. this.moveSelection(this.items.length - 1);
  102644. else if (i.keyCode == 13)
  102645. this.view.focus();
  102646. else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) {
  102647. let { diagnostic: a } = this.items[this.selectedIndex], o = nle(a.actions);
  102648. for (let s = 0; s < o.length; s++)
  102649. if (o[s].toUpperCase().charCodeAt(0) == i.keyCode) {
  102650. let l = Jh(this.view.state.field(Wi).diagnostics, a);
  102651. l && a.actions[s].apply(e, l.from, l.to);
  102652. }
  102653. } else
  102654. return;
  102655. i.preventDefault();
  102656. }, r = (i) => {
  102657. for (let a = 0; a < this.items.length; a++)
  102658. this.items[a].dom.contains(i.target) && this.moveSelection(a);
  102659. };
  102660. this.list = on("ul", {
  102661. tabIndex: 0,
  102662. role: "listbox",
  102663. "aria-label": this.view.state.phrase("Diagnostics"),
  102664. onkeydown: n,
  102665. onclick: r
  102666. }), this.dom = on("div", { class: "cm-panel-lint" }, this.list, on("button", {
  102667. type: "button",
  102668. name: "close",
  102669. "aria-label": this.view.state.phrase("close"),
  102670. onclick: () => e9(this.view)
  102671. }, "×")), this.update();
  102672. }
  102673. get selectedIndex() {
  102674. let e = this.view.state.field(Wi).selected;
  102675. if (!e)
  102676. return -1;
  102677. for (let n = 0; n < this.items.length; n++)
  102678. if (this.items[n].diagnostic == e.diagnostic)
  102679. return n;
  102680. return -1;
  102681. }
  102682. update() {
  102683. let { diagnostics: e, selected: n } = this.view.state.field(Wi), r = 0, i = !1, a = null;
  102684. for (e.between(0, this.view.state.doc.length, (o, s, { spec: l }) => {
  102685. let u = -1, c;
  102686. for (let f = r; f < this.items.length; f++)
  102687. if (this.items[f].diagnostic == l.diagnostic) {
  102688. u = f;
  102689. break;
  102690. }
  102691. u < 0 ? (c = new t9(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++;
  102692. }); r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
  102693. i = !0, this.items.pop();
  102694. this.items.length == 0 && (this.items.push(new t9(this.view, {
  102695. from: -1,
  102696. to: -1,
  102697. severity: "info",
  102698. message: this.view.state.phrase("No diagnostics")
  102699. })), i = !0), a ? (this.list.setAttribute("aria-activedescendant", a.id), this.view.requestMeasure({
  102700. key: this,
  102701. read: () => ({ sel: a.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
  102702. write: ({ sel: o, panel: s }) => {
  102703. let l = s.height / this.list.offsetHeight;
  102704. o.top < s.top ? this.list.scrollTop -= (s.top - o.top) / l : o.bottom > s.bottom && (this.list.scrollTop += (o.bottom - s.bottom) / l);
  102705. }
  102706. })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), i && this.sync();
  102707. }
  102708. sync() {
  102709. let e = this.list.firstChild;
  102710. function n() {
  102711. let r = e;
  102712. e = r.nextSibling, r.remove();
  102713. }
  102714. for (let r of this.items)
  102715. if (r.dom.parentNode == this.list) {
  102716. for (; e != r.dom; )
  102717. n();
  102718. e = r.dom.nextSibling;
  102719. } else
  102720. this.list.insertBefore(r.dom, e);
  102721. for (; e; )
  102722. n();
  102723. }
  102724. moveSelection(e) {
  102725. if (this.selectedIndex < 0)
  102726. return;
  102727. let n = this.view.state.field(Wi), r = Jh(n.diagnostics, this.items[e].diagnostic);
  102728. r && this.view.dispatch({
  102729. selection: { anchor: r.from, head: r.to },
  102730. scrollIntoView: !0,
  102731. effects: tle.of(r)
  102732. });
  102733. }
  102734. static open(e) {
  102735. return new s0(e);
  102736. }
  102737. }
  102738. function rdt(t, e = 'viewBox="0 0 40 40"') {
  102739. return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
  102740. }
  102741. function c_(t) {
  102742. return rdt(`<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"');
  102743. }
  102744. const idt = /* @__PURE__ */ De.baseTheme({
  102745. ".cm-diagnostic": {
  102746. padding: "3px 6px 3px 8px",
  102747. marginLeft: "-1px",
  102748. display: "block",
  102749. whiteSpace: "pre-wrap"
  102750. },
  102751. ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
  102752. ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
  102753. ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
  102754. ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
  102755. ".cm-diagnosticAction": {
  102756. font: "inherit",
  102757. border: "none",
  102758. padding: "2px 4px",
  102759. backgroundColor: "#444",
  102760. color: "white",
  102761. borderRadius: "3px",
  102762. marginLeft: "8px",
  102763. cursor: "pointer"
  102764. },
  102765. ".cm-diagnosticSource": {
  102766. fontSize: "70%",
  102767. opacity: 0.7
  102768. },
  102769. ".cm-lintRange": {
  102770. backgroundPosition: "left bottom",
  102771. backgroundRepeat: "repeat-x",
  102772. paddingBottom: "0.7px"
  102773. },
  102774. ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ c_("#d11") },
  102775. ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ c_("orange") },
  102776. ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ c_("#999") },
  102777. ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ c_("#66d") },
  102778. ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
  102779. ".cm-tooltip-lint": {
  102780. padding: 0,
  102781. margin: 0
  102782. },
  102783. ".cm-lintPoint": {
  102784. position: "relative",
  102785. "&:after": {
  102786. content: '""',
  102787. position: "absolute",
  102788. bottom: 0,
  102789. left: "-2px",
  102790. borderLeft: "3px solid transparent",
  102791. borderRight: "3px solid transparent",
  102792. borderBottom: "4px solid #d11"
  102793. }
  102794. },
  102795. ".cm-lintPoint-warning": {
  102796. "&:after": { borderBottomColor: "orange" }
  102797. },
  102798. ".cm-lintPoint-info": {
  102799. "&:after": { borderBottomColor: "#999" }
  102800. },
  102801. ".cm-lintPoint-hint": {
  102802. "&:after": { borderBottomColor: "#66d" }
  102803. },
  102804. ".cm-panel.cm-panel-lint": {
  102805. position: "relative",
  102806. "& ul": {
  102807. maxHeight: "100px",
  102808. overflowY: "auto",
  102809. "& [aria-selected]": {
  102810. backgroundColor: "#ddd",
  102811. "& u": { textDecoration: "underline" }
  102812. },
  102813. "&:focus [aria-selected]": {
  102814. background_fallback: "#bdf",
  102815. backgroundColor: "Highlight",
  102816. color_fallback: "white",
  102817. color: "HighlightText"
  102818. },
  102819. "& u": { textDecoration: "none" },
  102820. padding: 0,
  102821. margin: 0
  102822. },
  102823. "& [name=close]": {
  102824. position: "absolute",
  102825. top: "0",
  102826. right: "2px",
  102827. background: "inherit",
  102828. border: "none",
  102829. font: "inherit",
  102830. padding: 0,
  102831. margin: 0
  102832. }
  102833. }
  102834. }), adt = [
  102835. Wi,
  102836. /* @__PURE__ */ De.decorations.compute([Wi], (t) => {
  102837. let { selected: e, panel: n } = t.field(Wi);
  102838. return !e || !n || e.from == e.to ? Ze.none : Ze.set([
  102839. Yft.range(e.from, e.to)
  102840. ]);
  102841. }),
  102842. /* @__PURE__ */ jst(qft, { hideOn: Uft }),
  102843. idt
  102844. ], odt = [
  102845. tlt(),
  102846. ilt(),
  102847. Ost(),
  102848. but(),
  102849. jlt(),
  102850. cst(),
  102851. vst(),
  102852. At.allowMultipleSelections.of(!0),
  102853. Dlt(),
  102854. Xoe(Ylt, { fallback: !0 }),
  102855. rut(),
  102856. Rft(),
  102857. Gft(),
  102858. kst(),
  102859. Bst(),
  102860. Pst(),
  102861. Pct(),
  102862. oy.of([
  102863. ...Bft,
  102864. ..._ct,
  102865. ...jct,
  102866. ...$ut,
  102867. ...Wlt,
  102868. ...Jse,
  102869. ...tdt
  102870. ])
  102871. ];
  102872. /*!
  102873. * VueCodemirror v6.1.1
  102874. * Copyright (c) Surmon. All rights reserved.
  102875. * Released under the MIT License.
  102876. * Surmon
  102877. */
  102878. var sdt = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [odt] }), ldt = Symbol("vue-codemirror-global-config"), jr, udt = function(t) {
  102879. var e = t.onUpdate, n = t.onChange, r = t.onFocus, i = t.onBlur, a = function(o, s) {
  102880. var l = {};
  102881. for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && s.indexOf(u) < 0 && (l[u] = o[u]);
  102882. if (o != null && typeof Object.getOwnPropertySymbols == "function") {
  102883. var c = 0;
  102884. 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]]);
  102885. }
  102886. return l;
  102887. }(t, ["onUpdate", "onChange", "onFocus", "onBlur"]);
  102888. return At.create({ doc: a.doc, selection: a.selection, extensions: (Array.isArray(a.extensions) ? a.extensions : [a.extensions]).concat([De.updateListener.of(function(o) {
  102889. e(o), o.docChanged && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? r(o) : i(o));
  102890. })]) });
  102891. }, kd = function(t) {
  102892. var e = new ry();
  102893. return { compartment: e, run: function(n) {
  102894. e.get(t.state) ? t.dispatch({ effects: e.reconfigure(n) }) : t.dispatch({ effects: dt.appendConfig.of(e.of(n)) });
  102895. } };
  102896. }, n9 = function(t, e) {
  102897. var n = kd(t), r = n.compartment, i = n.run;
  102898. return function(a) {
  102899. var o = r.get(t.state);
  102900. i(a ?? o !== e ? e : []);
  102901. };
  102902. }, f_ = { type: Boolean, default: void 0 }, cdt = { autofocus: f_, disabled: f_, indentWithTab: f_, tabSize: Number, placeholder: String, style: Object, autoDestroy: f_, phrases: Object, root: Object, extensions: Array, selection: Object }, fdt = { modelValue: { type: String, default: "" } }, ddt = Object.assign(Object.assign({}, cdt), fdt);
  102903. (function(t) {
  102904. t.Change = "change", t.Update = "update", t.Focus = "focus", t.Blur = "blur", t.Ready = "ready", t.ModelUpdate = "update:modelValue";
  102905. })(jr || (jr = {}));
  102906. var Ac = {};
  102907. Ac[jr.Change] = function(t, e) {
  102908. return !0;
  102909. }, Ac[jr.Update] = function(t) {
  102910. return !0;
  102911. }, Ac[jr.Focus] = function(t) {
  102912. return !0;
  102913. }, Ac[jr.Blur] = function(t) {
  102914. return !0;
  102915. }, Ac[jr.Ready] = function(t) {
  102916. return !0;
  102917. };
  102918. var ile = {};
  102919. ile[jr.ModelUpdate] = Ac[jr.Change];
  102920. var hdt = Object.assign(Object.assign({}, Ac), ile), pdt = te({ name: "VueCodemirror", props: Object.assign({}, ddt), emits: Object.assign({}, hdt), setup: function(t, e) {
  102921. var n = ae(), r = ae(), i = ae(), a = Object.assign(Object.assign({}, sdt), Ge(ldt, {})), o = L(function() {
  102922. var s = {};
  102923. return Object.keys(qo(t)).forEach(function(l) {
  102924. var u;
  102925. l !== "modelValue" && (s[l] = (u = t[l]) !== null && u !== void 0 ? u : a[l]);
  102926. }), s;
  102927. });
  102928. return it(function() {
  102929. var s;
  102930. r.value = udt({ doc: t.modelValue, selection: o.value.selection, extensions: (s = a.extensions) !== null && s !== void 0 ? s : [], onFocus: function(u) {
  102931. return e.emit(jr.Focus, u);
  102932. }, onBlur: function(u) {
  102933. return e.emit(jr.Blur, u);
  102934. }, onUpdate: function(u) {
  102935. return e.emit(jr.Update, u);
  102936. }, onChange: function(u, c) {
  102937. u !== t.modelValue && (e.emit(jr.Change, u, c), e.emit(jr.ModelUpdate, u, c));
  102938. } }), i.value = function(u) {
  102939. return new De(Object.assign({}, u));
  102940. }({ state: r.value, parent: n.value, root: o.value.root });
  102941. var l = function(u) {
  102942. var c = function() {
  102943. return u.state.doc.toString();
  102944. }, f = kd(u).run, d = n9(u, [De.editable.of(!1), At.readOnly.of(!0)]), h = n9(u, oy.of([Oct])), p = kd(u).run, v = kd(u).run, g = kd(u).run, m = kd(u).run;
  102945. return { focus: function() {
  102946. return u.focus();
  102947. }, getDoc: c, setDoc: function(y) {
  102948. y !== c() && u.dispatch({ changes: { from: 0, to: u.state.doc.length, insert: y } });
  102949. }, reExtensions: f, toggleDisabled: d, toggleIndentWithTab: h, setTabSize: function(y) {
  102950. p([At.tabSize.of(y), ly.of(" ".repeat(y))]);
  102951. }, setPhrases: function(y) {
  102952. v([At.phrases.of(y)]);
  102953. }, setPlaceholder: function(y) {
  102954. g(Mst(y));
  102955. }, setStyle: function(y) {
  102956. y === void 0 && (y = {}), m(De.theme({ "&": Object.assign({}, y) }));
  102957. } };
  102958. }(i.value);
  102959. se(function() {
  102960. return t.modelValue;
  102961. }, function(u) {
  102962. u !== l.getDoc() && l.setDoc(u);
  102963. }), se(function() {
  102964. return t.extensions;
  102965. }, function(u) {
  102966. return l.reExtensions(u || []);
  102967. }, { immediate: !0 }), se(function() {
  102968. return o.value.disabled;
  102969. }, function(u) {
  102970. return l.toggleDisabled(u);
  102971. }, { immediate: !0 }), se(function() {
  102972. return o.value.indentWithTab;
  102973. }, function(u) {
  102974. return l.toggleIndentWithTab(u);
  102975. }, { immediate: !0 }), se(function() {
  102976. return o.value.tabSize;
  102977. }, function(u) {
  102978. return l.setTabSize(u);
  102979. }, { immediate: !0 }), se(function() {
  102980. return o.value.phrases;
  102981. }, function(u) {
  102982. return l.setPhrases(u || {});
  102983. }, { immediate: !0 }), se(function() {
  102984. return o.value.placeholder;
  102985. }, function(u) {
  102986. return l.setPlaceholder(u);
  102987. }, { immediate: !0 }), se(function() {
  102988. return o.value.style;
  102989. }, function(u) {
  102990. return l.setStyle(u);
  102991. }, { immediate: !0 }), o.value.autofocus && l.focus(), e.emit(jr.Ready, { state: r.value, view: i.value, container: n.value });
  102992. }), yt(function() {
  102993. o.value.autoDestroy && i.value && function(s) {
  102994. s.destroy();
  102995. }(i.value);
  102996. }), function() {
  102997. return jg("div", { class: "v-codemirror", style: { display: "contents" }, ref: n });
  102998. };
  102999. } }), vdt = pdt;
  103000. const gdt = "#e5c07b", r9 = "#e06c75", mdt = "#56b6c2", ydt = "#ffffff", f1 = "#abb2bf", XM = "#7d8799", bdt = "#61afef", _dt = "#98c379", i9 = "#d19a66", Odt = "#c678dd", Sdt = "#21252b", a9 = "#2c313a", o9 = "#282c34", N$ = "#353a42", xdt = "#3E4451", s9 = "#528bff", wdt = /* @__PURE__ */ De.theme({
  103001. "&": {
  103002. color: f1,
  103003. backgroundColor: o9
  103004. },
  103005. ".cm-content": {
  103006. caretColor: s9
  103007. },
  103008. ".cm-cursor, .cm-dropCursor": { borderLeftColor: s9 },
  103009. "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: xdt },
  103010. ".cm-panels": { backgroundColor: Sdt, color: f1 },
  103011. ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
  103012. ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
  103013. ".cm-searchMatch": {
  103014. backgroundColor: "#72a1ff59",
  103015. outline: "1px solid #457dff"
  103016. },
  103017. ".cm-searchMatch.cm-searchMatch-selected": {
  103018. backgroundColor: "#6199ff2f"
  103019. },
  103020. ".cm-activeLine": { backgroundColor: "#6699ff0b" },
  103021. ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
  103022. "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
  103023. backgroundColor: "#bad0f847"
  103024. },
  103025. ".cm-gutters": {
  103026. backgroundColor: o9,
  103027. color: XM,
  103028. border: "none"
  103029. },
  103030. ".cm-activeLineGutter": {
  103031. backgroundColor: a9
  103032. },
  103033. ".cm-foldPlaceholder": {
  103034. backgroundColor: "transparent",
  103035. border: "none",
  103036. color: "#ddd"
  103037. },
  103038. ".cm-tooltip": {
  103039. border: "none",
  103040. backgroundColor: N$
  103041. },
  103042. ".cm-tooltip .cm-tooltip-arrow:before": {
  103043. borderTopColor: "transparent",
  103044. borderBottomColor: "transparent"
  103045. },
  103046. ".cm-tooltip .cm-tooltip-arrow:after": {
  103047. borderTopColor: N$,
  103048. borderBottomColor: N$
  103049. },
  103050. ".cm-tooltip-autocomplete": {
  103051. "& > ul > li[aria-selected]": {
  103052. backgroundColor: a9,
  103053. color: f1
  103054. }
  103055. }
  103056. }, { dark: !0 }), Cdt = /* @__PURE__ */ cy.define([
  103057. {
  103058. tag: J.keyword,
  103059. color: Odt
  103060. },
  103061. {
  103062. tag: [J.name, J.deleted, J.character, J.propertyName, J.macroName],
  103063. color: r9
  103064. },
  103065. {
  103066. tag: [/* @__PURE__ */ J.function(J.variableName), J.labelName],
  103067. color: bdt
  103068. },
  103069. {
  103070. tag: [J.color, /* @__PURE__ */ J.constant(J.name), /* @__PURE__ */ J.standard(J.name)],
  103071. color: i9
  103072. },
  103073. {
  103074. tag: [/* @__PURE__ */ J.definition(J.name), J.separator],
  103075. color: f1
  103076. },
  103077. {
  103078. tag: [J.typeName, J.className, J.number, J.changed, J.annotation, J.modifier, J.self, J.namespace],
  103079. color: gdt
  103080. },
  103081. {
  103082. tag: [J.operator, J.operatorKeyword, J.url, J.escape, J.regexp, J.link, /* @__PURE__ */ J.special(J.string)],
  103083. color: mdt
  103084. },
  103085. {
  103086. tag: [J.meta, J.comment],
  103087. color: XM
  103088. },
  103089. {
  103090. tag: J.strong,
  103091. fontWeight: "bold"
  103092. },
  103093. {
  103094. tag: J.emphasis,
  103095. fontStyle: "italic"
  103096. },
  103097. {
  103098. tag: J.strikethrough,
  103099. textDecoration: "line-through"
  103100. },
  103101. {
  103102. tag: J.link,
  103103. color: XM,
  103104. textDecoration: "underline"
  103105. },
  103106. {
  103107. tag: J.heading,
  103108. fontWeight: "bold",
  103109. color: r9
  103110. },
  103111. {
  103112. tag: [J.atom, J.bool, /* @__PURE__ */ J.special(J.variableName)],
  103113. color: i9
  103114. },
  103115. {
  103116. tag: [J.processingInstruction, J.string, J.inserted],
  103117. color: _dt
  103118. },
  103119. {
  103120. tag: J.invalid,
  103121. color: ydt
  103122. }
  103123. ]), Tdt = [wdt, /* @__PURE__ */ Xoe(Cdt)];
  103124. class xS {
  103125. /**
  103126. @internal
  103127. */
  103128. constructor(e, n, r, i, a, o, s, l, u, c = 0, f) {
  103129. 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;
  103130. }
  103131. /**
  103132. @internal
  103133. */
  103134. toString() {
  103135. return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
  103136. }
  103137. // Start an empty stack
  103138. /**
  103139. @internal
  103140. */
  103141. static start(e, n, r = 0) {
  103142. let i = e.parser.context;
  103143. return new xS(e, [], n, r, r, 0, [], 0, i ? new l9(i, i.start) : null, 0, null);
  103144. }
  103145. /**
  103146. The stack's current [context](#lr.ContextTracker) value, if
  103147. any. Its type will depend on the context tracker's type
  103148. parameter, or it will be `null` if there is no context
  103149. tracker.
  103150. */
  103151. get context() {
  103152. return this.curContext ? this.curContext.context : null;
  103153. }
  103154. // Push a state onto the stack, tracking its start position as well
  103155. // as the buffer base at that point.
  103156. /**
  103157. @internal
  103158. */
  103159. pushState(e, n) {
  103160. this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
  103161. }
  103162. // Apply a reduce action
  103163. /**
  103164. @internal
  103165. */
  103166. reduce(e) {
  103167. var n;
  103168. let r = e >> 19, i = e & 65535, { parser: a } = this.p;
  103169. this.reducePos < this.pos - 25 && this.setLookAhead(this.pos);
  103170. let o = a.dynamicPrecedence(i);
  103171. if (o && (this.score += o), r == 0) {
  103172. 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);
  103173. return;
  103174. }
  103175. 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;
  103176. 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));
  103177. let c = s ? this.stack[s - 1] : 0, f = this.bufferBase + this.buffer.length - c;
  103178. if (i < a.minRepeatTerm || e & 131072) {
  103179. let d = a.stateFlag(
  103180. this.state,
  103181. 1
  103182. /* StateFlag.Skipped */
  103183. ) ? this.pos : this.reducePos;
  103184. this.storeNode(i, l, d, f + 4, !0);
  103185. }
  103186. if (e & 262144)
  103187. this.state = this.stack[s];
  103188. else {
  103189. let d = this.stack[s - 3];
  103190. this.state = a.getGoto(d, i, !0);
  103191. }
  103192. for (; this.stack.length > s; )
  103193. this.stack.pop();
  103194. this.reduceContext(i, l);
  103195. }
  103196. // Shift a value into the buffer
  103197. /**
  103198. @internal
  103199. */
  103200. storeNode(e, n, r, i = 4, a = !1) {
  103201. if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
  103202. let o = this, s = this.buffer.length;
  103203. 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) {
  103204. if (n == r)
  103205. return;
  103206. if (o.buffer[s - 2] >= n) {
  103207. o.buffer[s - 2] = r;
  103208. return;
  103209. }
  103210. }
  103211. }
  103212. if (!a || this.pos == r)
  103213. this.buffer.push(e, n, r, i);
  103214. else {
  103215. let o = this.buffer.length;
  103216. if (o > 0 && this.buffer[o - 4] != 0)
  103217. for (; o > 0 && this.buffer[o - 2] > r; )
  103218. 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);
  103219. this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = r, this.buffer[o + 3] = i;
  103220. }
  103221. }
  103222. // Apply a shift action
  103223. /**
  103224. @internal
  103225. */
  103226. shift(e, n, r, i) {
  103227. if (e & 131072)
  103228. this.pushState(e & 65535, this.pos);
  103229. else if (e & 262144)
  103230. this.pos = i, this.shiftContext(n, r), n <= this.p.parser.maxNode && this.buffer.push(n, r, i, 4);
  103231. else {
  103232. let a = e, { parser: o } = this.p;
  103233. (i > this.pos || n <= o.maxNode) && (this.pos = i, o.stateFlag(
  103234. a,
  103235. 1
  103236. /* StateFlag.Skipped */
  103237. ) || (this.reducePos = i)), this.pushState(a, r), this.shiftContext(n, r), n <= o.maxNode && this.buffer.push(n, r, i, 4);
  103238. }
  103239. }
  103240. // Apply an action
  103241. /**
  103242. @internal
  103243. */
  103244. apply(e, n, r, i) {
  103245. e & 65536 ? this.reduce(e) : this.shift(e, n, r, i);
  103246. }
  103247. // Add a prebuilt (reused) node into the buffer.
  103248. /**
  103249. @internal
  103250. */
  103251. useNode(e, n) {
  103252. let r = this.p.reused.length - 1;
  103253. (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++);
  103254. let i = this.pos;
  103255. this.reducePos = this.pos = i + e.length, this.pushState(n, i), this.buffer.push(
  103256. r,
  103257. i,
  103258. this.reducePos,
  103259. -1
  103260. /* size == -1 means this is a reused value */
  103261. ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
  103262. }
  103263. // Split the stack. Due to the buffer sharing and the fact
  103264. // that `this.stack` tends to stay quite shallow, this isn't very
  103265. // expensive.
  103266. /**
  103267. @internal
  103268. */
  103269. split() {
  103270. let e = this, n = e.buffer.length;
  103271. for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
  103272. n -= 4;
  103273. let r = e.buffer.slice(n), i = e.bufferBase + n;
  103274. for (; e && i == e.bufferBase; )
  103275. e = e.parent;
  103276. return new xS(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, i, this.curContext, this.lookAhead, e);
  103277. }
  103278. // Try to recover from an error by 'deleting' (ignoring) one token.
  103279. /**
  103280. @internal
  103281. */
  103282. recoverByDelete(e, n) {
  103283. let r = e <= this.p.parser.maxNode;
  103284. 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;
  103285. }
  103286. /**
  103287. Check if the given term would be able to be shifted (optionally
  103288. after some reductions) on this stack. This can be useful for
  103289. external tokenizers that want to make sure they only provide a
  103290. given token when it applies.
  103291. */
  103292. canShift(e) {
  103293. for (let n = new Pdt(this); ; ) {
  103294. let r = this.p.parser.stateSlot(
  103295. n.state,
  103296. 4
  103297. /* ParseState.DefaultReduce */
  103298. ) || this.p.parser.hasAction(n.state, e);
  103299. if (r == 0)
  103300. return !1;
  103301. if (!(r & 65536))
  103302. return !0;
  103303. n.reduce(r);
  103304. }
  103305. }
  103306. // Apply up to Recover.MaxNext recovery actions that conceptually
  103307. // inserts some missing token or rule.
  103308. /**
  103309. @internal
  103310. */
  103311. recoverByInsert(e) {
  103312. if (this.stack.length >= 300)
  103313. return [];
  103314. let n = this.p.parser.nextStates(this.state);
  103315. if (n.length > 8 || this.stack.length >= 120) {
  103316. let i = [];
  103317. for (let a = 0, o; a < n.length; a += 2)
  103318. (o = n[a + 1]) != this.state && this.p.parser.hasAction(o, e) && i.push(n[a], o);
  103319. if (this.stack.length < 120)
  103320. for (let a = 0; i.length < 8 && a < n.length; a += 2) {
  103321. let o = n[a + 1];
  103322. i.some((s, l) => l & 1 && s == o) || i.push(n[a], o);
  103323. }
  103324. n = i;
  103325. }
  103326. let r = [];
  103327. for (let i = 0; i < n.length && r.length < 4; i += 2) {
  103328. let a = n[i + 1];
  103329. if (a == this.state)
  103330. continue;
  103331. let o = this.split();
  103332. 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);
  103333. }
  103334. return r;
  103335. }
  103336. // Force a reduce, if possible. Return false if that can't
  103337. // be done.
  103338. /**
  103339. @internal
  103340. */
  103341. forceReduce() {
  103342. let { parser: e } = this.p, n = e.stateSlot(
  103343. this.state,
  103344. 5
  103345. /* ParseState.ForcedReduce */
  103346. );
  103347. if (!(n & 65536))
  103348. return !1;
  103349. if (!e.validAction(this.state, n)) {
  103350. let r = n >> 19, i = n & 65535, a = this.stack.length - r * 3;
  103351. if (a < 0 || e.getGoto(this.stack[a], i, !1) < 0) {
  103352. let o = this.findForcedReduction();
  103353. if (o == null)
  103354. return !1;
  103355. n = o;
  103356. }
  103357. this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
  103358. }
  103359. return this.reducePos = this.pos, this.reduce(n), !0;
  103360. }
  103361. /**
  103362. Try to scan through the automaton to find some kind of reduction
  103363. that can be applied. Used when the regular ForcedReduce field
  103364. isn't a valid action. @internal
  103365. */
  103366. findForcedReduction() {
  103367. let { parser: e } = this.p, n = [], r = (i, a) => {
  103368. if (!n.includes(i))
  103369. return n.push(i), e.allActions(i, (o) => {
  103370. if (!(o & 393216)) if (o & 65536) {
  103371. let s = (o >> 19) - a;
  103372. if (s > 1) {
  103373. let l = o & 65535, u = this.stack.length - s * 3;
  103374. if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
  103375. return s << 19 | 65536 | l;
  103376. }
  103377. } else {
  103378. let s = r(o, a + 1);
  103379. if (s != null)
  103380. return s;
  103381. }
  103382. });
  103383. };
  103384. return r(this.state, 0);
  103385. }
  103386. /**
  103387. @internal
  103388. */
  103389. forceAll() {
  103390. for (; !this.p.parser.stateFlag(
  103391. this.state,
  103392. 2
  103393. /* StateFlag.Accepting */
  103394. ); )
  103395. if (!this.forceReduce()) {
  103396. this.storeNode(0, this.pos, this.pos, 4, !0);
  103397. break;
  103398. }
  103399. return this;
  103400. }
  103401. /**
  103402. Check whether this state has no further actions (assumed to be a direct descendant of the
  103403. top state, since any other states must be able to continue
  103404. somehow). @internal
  103405. */
  103406. get deadEnd() {
  103407. if (this.stack.length != 3)
  103408. return !1;
  103409. let { parser: e } = this.p;
  103410. return e.data[e.stateSlot(
  103411. this.state,
  103412. 1
  103413. /* ParseState.Actions */
  103414. )] == 65535 && !e.stateSlot(
  103415. this.state,
  103416. 4
  103417. /* ParseState.DefaultReduce */
  103418. );
  103419. }
  103420. /**
  103421. Restart the stack (put it back in its start state). Only safe
  103422. when this.stack.length == 3 (state is directly below the top
  103423. state). @internal
  103424. */
  103425. restart() {
  103426. this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
  103427. }
  103428. /**
  103429. @internal
  103430. */
  103431. sameState(e) {
  103432. if (this.state != e.state || this.stack.length != e.stack.length)
  103433. return !1;
  103434. for (let n = 0; n < this.stack.length; n += 3)
  103435. if (this.stack[n] != e.stack[n])
  103436. return !1;
  103437. return !0;
  103438. }
  103439. /**
  103440. Get the parser used by this stack.
  103441. */
  103442. get parser() {
  103443. return this.p.parser;
  103444. }
  103445. /**
  103446. Test whether a given dialect (by numeric ID, as exported from
  103447. the terms file) is enabled.
  103448. */
  103449. dialectEnabled(e) {
  103450. return this.p.parser.dialect.flags[e];
  103451. }
  103452. shiftContext(e, n) {
  103453. this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
  103454. }
  103455. reduceContext(e, n) {
  103456. this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
  103457. }
  103458. /**
  103459. @internal
  103460. */
  103461. emitContext() {
  103462. let e = this.buffer.length - 1;
  103463. (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
  103464. }
  103465. /**
  103466. @internal
  103467. */
  103468. emitLookAhead() {
  103469. let e = this.buffer.length - 1;
  103470. (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
  103471. }
  103472. updateContext(e) {
  103473. if (e != this.curContext.context) {
  103474. let n = new l9(this.curContext.tracker, e);
  103475. n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
  103476. }
  103477. }
  103478. /**
  103479. @internal
  103480. */
  103481. setLookAhead(e) {
  103482. e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
  103483. }
  103484. /**
  103485. @internal
  103486. */
  103487. close() {
  103488. this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
  103489. }
  103490. }
  103491. class l9 {
  103492. constructor(e, n) {
  103493. this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
  103494. }
  103495. }
  103496. class Pdt {
  103497. constructor(e) {
  103498. this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
  103499. }
  103500. reduce(e) {
  103501. let n = e & 65535, r = e >> 19;
  103502. 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;
  103503. let i = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
  103504. this.state = i;
  103505. }
  103506. }
  103507. class wS {
  103508. constructor(e, n, r) {
  103509. this.stack = e, this.pos = n, this.index = r, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
  103510. }
  103511. static create(e, n = e.bufferBase + e.buffer.length) {
  103512. return new wS(e, n, n - e.bufferBase);
  103513. }
  103514. maybeNext() {
  103515. let e = this.stack.parent;
  103516. e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
  103517. }
  103518. get id() {
  103519. return this.buffer[this.index - 4];
  103520. }
  103521. get start() {
  103522. return this.buffer[this.index - 3];
  103523. }
  103524. get end() {
  103525. return this.buffer[this.index - 2];
  103526. }
  103527. get size() {
  103528. return this.buffer[this.index - 1];
  103529. }
  103530. next() {
  103531. this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
  103532. }
  103533. fork() {
  103534. return new wS(this.stack, this.pos, this.index);
  103535. }
  103536. }
  103537. function ig(t, e = Uint16Array) {
  103538. if (typeof t != "string")
  103539. return t;
  103540. let n = null;
  103541. for (let r = 0, i = 0; r < t.length; ) {
  103542. let a = 0;
  103543. for (; ; ) {
  103544. let o = t.charCodeAt(r++), s = !1;
  103545. if (o == 126) {
  103546. a = 65535;
  103547. break;
  103548. }
  103549. o >= 92 && o--, o >= 34 && o--;
  103550. let l = o - 32;
  103551. if (l >= 46 && (l -= 46, s = !0), a += l, s)
  103552. break;
  103553. a *= 46;
  103554. }
  103555. n ? n[i++] = a : n = new e(a);
  103556. }
  103557. return n;
  103558. }
  103559. class d1 {
  103560. constructor() {
  103561. this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
  103562. }
  103563. }
  103564. const u9 = new d1();
  103565. class $dt {
  103566. /**
  103567. @internal
  103568. */
  103569. constructor(e, n) {
  103570. this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = u9, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
  103571. }
  103572. /**
  103573. @internal
  103574. */
  103575. resolveOffset(e, n) {
  103576. let r = this.range, i = this.rangeIndex, a = this.pos + e;
  103577. for (; a < r.from; ) {
  103578. if (!i)
  103579. return null;
  103580. let o = this.ranges[--i];
  103581. a -= r.from - o.to, r = o;
  103582. }
  103583. for (; n < 0 ? a > r.to : a >= r.to; ) {
  103584. if (i == this.ranges.length - 1)
  103585. return null;
  103586. let o = this.ranges[++i];
  103587. a += o.from - r.to, r = o;
  103588. }
  103589. return a;
  103590. }
  103591. /**
  103592. @internal
  103593. */
  103594. clipPos(e) {
  103595. if (e >= this.range.from && e < this.range.to)
  103596. return e;
  103597. for (let n of this.ranges)
  103598. if (n.to > e)
  103599. return Math.max(e, n.from);
  103600. return this.end;
  103601. }
  103602. /**
  103603. Look at a code unit near the stream position. `.peek(0)` equals
  103604. `.next`, `.peek(-1)` gives you the previous character, and so
  103605. on.
  103606. Note that looking around during tokenizing creates dependencies
  103607. on potentially far-away content, which may reduce the
  103608. effectiveness incremental parsing—when looking forward—or even
  103609. cause invalid reparses when looking backward more than 25 code
  103610. units, since the library does not track lookbehind.
  103611. */
  103612. peek(e) {
  103613. let n = this.chunkOff + e, r, i;
  103614. if (n >= 0 && n < this.chunk.length)
  103615. r = this.pos + e, i = this.chunk.charCodeAt(n);
  103616. else {
  103617. let a = this.resolveOffset(e, 1);
  103618. if (a == null)
  103619. return -1;
  103620. if (r = a, r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)
  103621. i = this.chunk2.charCodeAt(r - this.chunk2Pos);
  103622. else {
  103623. let o = this.rangeIndex, s = this.range;
  103624. for (; s.to <= r; )
  103625. s = this.ranges[++o];
  103626. 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);
  103627. }
  103628. }
  103629. return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), i;
  103630. }
  103631. /**
  103632. Accept a token. By default, the end of the token is set to the
  103633. current stream position, but you can pass an offset (relative to
  103634. the stream position) to change that.
  103635. */
  103636. acceptToken(e, n = 0) {
  103637. let r = n ? this.resolveOffset(n, -1) : this.pos;
  103638. if (r == null || r < this.token.start)
  103639. throw new RangeError("Token end out of bounds");
  103640. this.token.value = e, this.token.end = r;
  103641. }
  103642. /**
  103643. Accept a token ending at a specific given position.
  103644. */
  103645. acceptTokenTo(e, n) {
  103646. this.token.value = e, this.token.end = n;
  103647. }
  103648. getChunk() {
  103649. if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
  103650. let { chunk: e, chunkPos: n } = this;
  103651. this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
  103652. } else {
  103653. this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
  103654. let e = this.input.chunk(this.pos), n = this.pos + e.length;
  103655. this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
  103656. }
  103657. }
  103658. readNext() {
  103659. return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
  103660. }
  103661. /**
  103662. Move the stream forward N (defaults to 1) code units. Returns
  103663. the new value of [`next`](#lr.InputStream.next).
  103664. */
  103665. advance(e = 1) {
  103666. for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
  103667. if (this.rangeIndex == this.ranges.length - 1)
  103668. return this.setDone();
  103669. e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
  103670. }
  103671. return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
  103672. }
  103673. setDone() {
  103674. return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
  103675. }
  103676. /**
  103677. @internal
  103678. */
  103679. reset(e, n) {
  103680. if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = u9, this.pos != e) {
  103681. if (this.pos = e, e == this.end)
  103682. return this.setDone(), this;
  103683. for (; e < this.range.from; )
  103684. this.range = this.ranges[--this.rangeIndex];
  103685. for (; e >= this.range.to; )
  103686. this.range = this.ranges[++this.rangeIndex];
  103687. e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
  103688. }
  103689. return this;
  103690. }
  103691. /**
  103692. @internal
  103693. */
  103694. read(e, n) {
  103695. if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
  103696. return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
  103697. if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
  103698. return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
  103699. if (e >= this.range.from && n <= this.range.to)
  103700. return this.input.read(e, n);
  103701. let r = "";
  103702. for (let i of this.ranges) {
  103703. if (i.from >= n)
  103704. break;
  103705. i.to > e && (r += this.input.read(Math.max(i.from, e), Math.min(i.to, n)));
  103706. }
  103707. return r;
  103708. }
  103709. }
  103710. class dh {
  103711. constructor(e, n) {
  103712. this.data = e, this.id = n;
  103713. }
  103714. token(e, n) {
  103715. let { parser: r } = n.p;
  103716. ale(this.data, e, n, this.id, r.data, r.tokenPrecTable);
  103717. }
  103718. }
  103719. dh.prototype.contextual = dh.prototype.fallback = dh.prototype.extend = !1;
  103720. class YM {
  103721. constructor(e, n, r) {
  103722. this.precTable = n, this.elseToken = r, this.data = typeof e == "string" ? ig(e) : e;
  103723. }
  103724. token(e, n) {
  103725. let r = e.pos, i = 0;
  103726. for (; ; ) {
  103727. let a = e.next < 0, o = e.resolveOffset(1, 1);
  103728. if (ale(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
  103729. break;
  103730. if (this.elseToken == null)
  103731. return;
  103732. if (a || i++, o == null)
  103733. break;
  103734. e.reset(o, e.token);
  103735. }
  103736. i && (e.reset(r, e.token), e.acceptToken(this.elseToken, i));
  103737. }
  103738. }
  103739. YM.prototype.contextual = dh.prototype.fallback = dh.prototype.extend = !1;
  103740. class Ww {
  103741. /**
  103742. Create a tokenizer. The first argument is the function that,
  103743. given an input stream, scans for the types of tokens it
  103744. recognizes at the stream's position, and calls
  103745. [`acceptToken`](#lr.InputStream.acceptToken) when it finds
  103746. one.
  103747. */
  103748. constructor(e, n = {}) {
  103749. this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
  103750. }
  103751. }
  103752. function ale(t, e, n, r, i, a) {
  103753. let o = 0, s = 1 << r, { dialect: l } = n.p.parser;
  103754. e: for (; s & t[o]; ) {
  103755. let u = t[o + 1];
  103756. for (let h = o + 3; h < u; h += 2)
  103757. if ((t[h + 1] & s) > 0) {
  103758. let p = t[h];
  103759. if (l.allows(p) && (e.token.value == -1 || e.token.value == p || Adt(p, e.token.value, i, a))) {
  103760. e.acceptToken(p);
  103761. break;
  103762. }
  103763. }
  103764. let c = e.next, f = 0, d = t[o + 2];
  103765. if (e.next < 0 && d > f && t[u + d * 3 - 3] == 65535) {
  103766. o = t[u + d * 3 - 1];
  103767. continue e;
  103768. }
  103769. for (; f < d; ) {
  103770. let h = f + d >> 1, p = u + h + (h << 1), v = t[p], g = t[p + 1] || 65536;
  103771. if (c < v)
  103772. d = h;
  103773. else if (c >= g)
  103774. f = h + 1;
  103775. else {
  103776. o = t[p + 2], e.advance();
  103777. continue e;
  103778. }
  103779. }
  103780. break;
  103781. }
  103782. }
  103783. function c9(t, e, n) {
  103784. for (let r = e, i; (i = t[r]) != 65535; r++)
  103785. if (i == n)
  103786. return r - e;
  103787. return -1;
  103788. }
  103789. function Adt(t, e, n, r) {
  103790. let i = c9(n, r, e);
  103791. return i < 0 || c9(n, r, t) < i;
  103792. }
  103793. const Ei = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
  103794. let B$ = null;
  103795. function f9(t, e, n) {
  103796. let r = t.cursor(Zn.IncludeAnonymous);
  103797. for (r.moveTo(e); ; )
  103798. if (!(n < 0 ? r.childBefore(e) : r.childAfter(e)))
  103799. for (; ; ) {
  103800. if ((n < 0 ? r.to < e : r.from > e) && !r.type.isError)
  103801. return n < 0 ? Math.max(0, Math.min(
  103802. r.to - 1,
  103803. e - 25
  103804. /* Lookahead.Margin */
  103805. )) : Math.min(t.length, Math.max(
  103806. r.from + 1,
  103807. e + 25
  103808. /* Lookahead.Margin */
  103809. ));
  103810. if (n < 0 ? r.prevSibling() : r.nextSibling())
  103811. break;
  103812. if (!r.parent())
  103813. return n < 0 ? 0 : t.length;
  103814. }
  103815. }
  103816. class Edt {
  103817. constructor(e, n) {
  103818. 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();
  103819. }
  103820. nextFragment() {
  103821. let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
  103822. if (e) {
  103823. for (this.safeFrom = e.openStart ? f9(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? f9(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
  103824. this.trees.pop(), this.start.pop(), this.index.pop();
  103825. this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
  103826. } else
  103827. this.nextStart = 1e9;
  103828. }
  103829. // `pos` must be >= any previously given `pos` for this cursor
  103830. nodeAt(e) {
  103831. if (e < this.nextStart)
  103832. return null;
  103833. for (; this.fragment && this.safeTo <= e; )
  103834. this.nextFragment();
  103835. if (!this.fragment)
  103836. return null;
  103837. for (; ; ) {
  103838. let n = this.trees.length - 1;
  103839. if (n < 0)
  103840. return this.nextFragment(), null;
  103841. let r = this.trees[n], i = this.index[n];
  103842. if (i == r.children.length) {
  103843. this.trees.pop(), this.start.pop(), this.index.pop();
  103844. continue;
  103845. }
  103846. let a = r.children[i], o = this.start[n] + r.positions[i];
  103847. if (o > e)
  103848. return this.nextStart = o, null;
  103849. if (a instanceof Wn) {
  103850. if (o == e) {
  103851. if (o < this.safeFrom)
  103852. return null;
  103853. let s = o + a.length;
  103854. if (s <= this.safeTo) {
  103855. let l = a.prop(Pt.lookAhead);
  103856. if (!l || s + l < this.fragment.to)
  103857. return a;
  103858. }
  103859. }
  103860. this.index[n]++, o + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(o), this.index.push(0));
  103861. } else
  103862. this.index[n]++, this.nextStart = o + a.length;
  103863. }
  103864. }
  103865. }
  103866. class Mdt {
  103867. constructor(e, n) {
  103868. this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((r) => new d1());
  103869. }
  103870. getActions(e) {
  103871. let n = 0, r = null, { parser: i } = e.p, { tokenizers: a } = i, o = i.stateSlot(
  103872. e.state,
  103873. 3
  103874. /* ParseState.TokenizerMask */
  103875. ), s = e.curContext ? e.curContext.hash : 0, l = 0;
  103876. for (let u = 0; u < a.length; u++) {
  103877. if (!(1 << u & o))
  103878. continue;
  103879. let c = a[u], f = this.tokens[u];
  103880. 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)) {
  103881. let d = n;
  103882. 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))
  103883. break;
  103884. }
  103885. }
  103886. for (; this.actions.length > n; )
  103887. this.actions.pop();
  103888. return l && e.setLookAhead(l), !r && e.pos == this.stream.end && (r = new d1(), 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;
  103889. }
  103890. getMainToken(e) {
  103891. if (this.mainToken)
  103892. return this.mainToken;
  103893. let n = new d1(), { pos: r, p: i } = e;
  103894. return n.start = r, n.end = Math.min(r + 1, i.stream.end), n.value = r == i.stream.end ? i.parser.eofTerm : 0, n;
  103895. }
  103896. updateCachedToken(e, n, r) {
  103897. let i = this.stream.clipPos(r.pos);
  103898. if (n.token(this.stream.reset(i, e), r), e.value > -1) {
  103899. let { parser: a } = r.p;
  103900. for (let o = 0; o < a.specialized.length; o++)
  103901. if (a.specialized[o] == e.value) {
  103902. let s = a.specializers[o](this.stream.read(e.start, e.end), r);
  103903. if (s >= 0 && r.p.parser.dialect.allows(s >> 1)) {
  103904. s & 1 ? e.extended = s >> 1 : e.value = s >> 1;
  103905. break;
  103906. }
  103907. }
  103908. } else
  103909. e.value = 0, e.end = this.stream.clipPos(i + 1);
  103910. }
  103911. putAction(e, n, r, i) {
  103912. for (let a = 0; a < i; a += 3)
  103913. if (this.actions[a] == e)
  103914. return i;
  103915. return this.actions[i++] = e, this.actions[i++] = n, this.actions[i++] = r, i;
  103916. }
  103917. addActions(e, n, r, i) {
  103918. let { state: a } = e, { parser: o } = e.p, { data: s } = o;
  103919. for (let l = 0; l < 2; l++)
  103920. for (let u = o.stateSlot(
  103921. a,
  103922. l ? 2 : 1
  103923. /* ParseState.Actions */
  103924. ); ; u += 3) {
  103925. if (s[u] == 65535)
  103926. if (s[u + 1] == 1)
  103927. u = xs(s, u + 2);
  103928. else {
  103929. i == 0 && s[u + 1] == 2 && (i = this.putAction(xs(s, u + 2), n, r, i));
  103930. break;
  103931. }
  103932. s[u] == n && (i = this.putAction(xs(s, u + 1), n, r, i));
  103933. }
  103934. return i;
  103935. }
  103936. }
  103937. class Idt {
  103938. constructor(e, n, r, i) {
  103939. 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 $dt(n, i), this.tokens = new Mdt(e, this.stream), this.topTerm = e.top[1];
  103940. let { from: a } = i[0];
  103941. this.stacks = [xS.start(this, e.top[0], a)], this.fragments = r.length && this.stream.end - a > e.bufferLength * 4 ? new Edt(r, e.nodeSet) : null;
  103942. }
  103943. get parsedPos() {
  103944. return this.minStackPos;
  103945. }
  103946. // Move the parser forward. This will process all parse stacks at
  103947. // `this.pos` and try to advance them to a further position. If no
  103948. // stack for such a position is found, it'll start error-recovery.
  103949. //
  103950. // When the parse is finished, this will return a syntax tree. When
  103951. // not, it returns `null`.
  103952. advance() {
  103953. let e = this.stacks, n = this.minStackPos, r = this.stacks = [], i, a;
  103954. if (this.bigReductionCount > 300 && e.length == 1) {
  103955. let [o] = e;
  103956. for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
  103957. ;
  103958. this.bigReductionCount = this.lastBigReductionSize = 0;
  103959. }
  103960. for (let o = 0; o < e.length; o++) {
  103961. let s = e[o];
  103962. for (; ; ) {
  103963. if (this.tokens.mainToken = null, s.pos > n)
  103964. r.push(s);
  103965. else {
  103966. if (this.advanceStack(s, r, e))
  103967. continue;
  103968. {
  103969. i || (i = [], a = []), i.push(s);
  103970. let l = this.tokens.getMainToken(s);
  103971. a.push(l.value, l.end);
  103972. }
  103973. }
  103974. break;
  103975. }
  103976. }
  103977. if (!r.length) {
  103978. let o = i && kdt(i);
  103979. if (o)
  103980. return Ei && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
  103981. if (this.parser.strict)
  103982. throw Ei && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
  103983. this.recovering || (this.recovering = 5);
  103984. }
  103985. if (this.recovering && i) {
  103986. let o = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, a, r);
  103987. if (o)
  103988. return Ei && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
  103989. }
  103990. if (this.recovering) {
  103991. let o = this.recovering == 1 ? 1 : this.recovering * 3;
  103992. if (r.length > o)
  103993. for (r.sort((s, l) => l.score - s.score); r.length > o; )
  103994. r.pop();
  103995. r.some((s) => s.reducePos > n) && this.recovering--;
  103996. } else if (r.length > 1) {
  103997. e: for (let o = 0; o < r.length - 1; o++) {
  103998. let s = r[o];
  103999. for (let l = o + 1; l < r.length; l++) {
  104000. let u = r[l];
  104001. if (s.sameState(u) || s.buffer.length > 500 && u.buffer.length > 500)
  104002. if ((s.score - u.score || s.buffer.length - u.buffer.length) > 0)
  104003. r.splice(l--, 1);
  104004. else {
  104005. r.splice(o--, 1);
  104006. continue e;
  104007. }
  104008. }
  104009. }
  104010. r.length > 12 && r.splice(
  104011. 12,
  104012. r.length - 12
  104013. /* Rec.MaxStackCount */
  104014. );
  104015. }
  104016. this.minStackPos = r[0].pos;
  104017. for (let o = 1; o < r.length; o++)
  104018. r[o].pos < this.minStackPos && (this.minStackPos = r[o].pos);
  104019. return null;
  104020. }
  104021. stopAt(e) {
  104022. if (this.stoppedAt != null && this.stoppedAt < e)
  104023. throw new RangeError("Can't move stoppedAt forward");
  104024. this.stoppedAt = e;
  104025. }
  104026. // Returns an updated version of the given stack, or null if the
  104027. // stack can't advance normally. When `split` and `stacks` are
  104028. // given, stacks split off by ambiguous operations will be pushed to
  104029. // `split`, or added to `stacks` if they move `pos` forward.
  104030. advanceStack(e, n, r) {
  104031. let i = e.pos, { parser: a } = this, o = Ei ? this.stackID(e) + " -> " : "";
  104032. if (this.stoppedAt != null && i > this.stoppedAt)
  104033. return e.forceReduce() ? e : null;
  104034. if (this.fragments) {
  104035. let u = e.curContext && e.curContext.tracker.strict, c = u ? e.curContext.hash : 0;
  104036. for (let f = this.fragments.nodeAt(i); f; ) {
  104037. let d = this.parser.nodeSet.types[f.type.id] == f.type ? a.getGoto(e.state, f.type.id) : -1;
  104038. if (d > -1 && f.length && (!u || (f.prop(Pt.contextHash) || 0) == c))
  104039. return e.useNode(f, d), Ei && console.log(o + this.stackID(e) + ` (via reuse of ${a.getName(f.type.id)})`), !0;
  104040. if (!(f instanceof Wn) || f.children.length == 0 || f.positions[0] > 0)
  104041. break;
  104042. let h = f.children[0];
  104043. if (h instanceof Wn && f.positions[0] == 0)
  104044. f = h;
  104045. else
  104046. break;
  104047. }
  104048. }
  104049. let s = a.stateSlot(
  104050. e.state,
  104051. 4
  104052. /* ParseState.DefaultReduce */
  104053. );
  104054. if (s > 0)
  104055. return e.reduce(s), Ei && console.log(o + this.stackID(e) + ` (via always-reduce ${a.getName(
  104056. s & 65535
  104057. /* Action.ValueMask */
  104058. )})`), !0;
  104059. if (e.stack.length >= 8400)
  104060. for (; e.stack.length > 6e3 && e.forceReduce(); )
  104061. ;
  104062. let l = this.tokens.getActions(e);
  104063. for (let u = 0; u < l.length; ) {
  104064. let c = l[u++], f = l[u++], d = l[u++], h = u == l.length || !r, p = h ? e : e.split(), v = this.tokens.mainToken;
  104065. if (p.apply(c, f, v ? v.start : p.pos, d), Ei && console.log(o + this.stackID(p) + ` (via ${c & 65536 ? `reduce of ${a.getName(
  104066. c & 65535
  104067. /* Action.ValueMask */
  104068. )}` : "shift"} for ${a.getName(f)} @ ${i}${p == e ? "" : ", split"})`), h)
  104069. return !0;
  104070. p.pos > i ? n.push(p) : r.push(p);
  104071. }
  104072. return !1;
  104073. }
  104074. // Advance a given stack forward as far as it will go. Returns the
  104075. // (possibly updated) stack if it got stuck, or null if it moved
  104076. // forward and was given to `pushStackDedup`.
  104077. advanceFully(e, n) {
  104078. let r = e.pos;
  104079. for (; ; ) {
  104080. if (!this.advanceStack(e, null, null))
  104081. return !1;
  104082. if (e.pos > r)
  104083. return d9(e, n), !0;
  104084. }
  104085. }
  104086. runRecovery(e, n, r) {
  104087. let i = null, a = !1;
  104088. for (let o = 0; o < e.length; o++) {
  104089. let s = e[o], l = n[o << 1], u = n[(o << 1) + 1], c = Ei ? this.stackID(s) + " -> " : "";
  104090. if (s.deadEnd && (a || (a = !0, s.restart(), Ei && console.log(c + this.stackID(s) + " (restarted)"), this.advanceFully(s, r))))
  104091. continue;
  104092. let f = s.split(), d = c;
  104093. for (let h = 0; f.forceReduce() && h < 10 && (Ei && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); h++)
  104094. Ei && (d = this.stackID(f) + " -> ");
  104095. for (let h of s.recoverByInsert(l))
  104096. Ei && console.log(c + this.stackID(h) + " (via recover-insert)"), this.advanceFully(h, r);
  104097. this.stream.end > s.pos ? (u == s.pos && (u++, l = 0), s.recoverByDelete(l, u), Ei && console.log(c + this.stackID(s) + ` (via recover-delete ${this.parser.getName(l)})`), d9(s, r)) : (!i || i.score < s.score) && (i = s);
  104098. }
  104099. return i;
  104100. }
  104101. // Convert the stack's buffer to a syntax tree.
  104102. stackToTree(e) {
  104103. return e.close(), Wn.build({
  104104. buffer: wS.create(e),
  104105. nodeSet: this.parser.nodeSet,
  104106. topID: this.topTerm,
  104107. maxBufferLength: this.parser.bufferLength,
  104108. reused: this.reused,
  104109. start: this.ranges[0].from,
  104110. length: e.pos - this.ranges[0].from,
  104111. minRepeatType: this.parser.minRepeatTerm
  104112. });
  104113. }
  104114. stackID(e) {
  104115. let n = (B$ || (B$ = /* @__PURE__ */ new WeakMap())).get(e);
  104116. return n || B$.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
  104117. }
  104118. }
  104119. function d9(t, e) {
  104120. for (let n = 0; n < e.length; n++) {
  104121. let r = e[n];
  104122. if (r.pos == t.pos && r.sameState(t)) {
  104123. e[n].score < t.score && (e[n] = t);
  104124. return;
  104125. }
  104126. }
  104127. e.push(t);
  104128. }
  104129. class Ddt {
  104130. constructor(e, n, r) {
  104131. this.source = e, this.flags = n, this.disabled = r;
  104132. }
  104133. allows(e) {
  104134. return !this.disabled || this.disabled[e] == 0;
  104135. }
  104136. }
  104137. const z$ = (t) => t;
  104138. class Rdt {
  104139. /**
  104140. Define a context tracker.
  104141. */
  104142. constructor(e) {
  104143. this.start = e.start, this.shift = e.shift || z$, this.reduce = e.reduce || z$, this.reuse = e.reuse || z$, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
  104144. }
  104145. }
  104146. class l0 extends Ioe {
  104147. /**
  104148. @internal
  104149. */
  104150. constructor(e) {
  104151. if (super(), this.wrappers = [], e.version != 14)
  104152. throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
  104153. let n = e.nodeNames.split(" ");
  104154. this.minRepeatTerm = n.length;
  104155. for (let s = 0; s < e.repeatNodeCount; s++)
  104156. n.push("");
  104157. let r = Object.keys(e.topRules).map((s) => e.topRules[s][1]), i = [];
  104158. for (let s = 0; s < n.length; s++)
  104159. i.push([]);
  104160. function a(s, l, u) {
  104161. i[s].push([l, l.deserialize(String(u))]);
  104162. }
  104163. if (e.nodeProps)
  104164. for (let s of e.nodeProps) {
  104165. let l = s[0];
  104166. typeof l == "string" && (l = Pt[l]);
  104167. for (let u = 1; u < s.length; ) {
  104168. let c = s[u++];
  104169. if (c >= 0)
  104170. a(c, l, s[u++]);
  104171. else {
  104172. let f = s[u + -c];
  104173. for (let d = -c; d > 0; d--)
  104174. a(s[u++], l, f);
  104175. u++;
  104176. }
  104177. }
  104178. }
  104179. this.nodeSet = new c4(n.map((s, l) => Ci.define({
  104180. name: l >= this.minRepeatTerm ? void 0 : s,
  104181. id: l,
  104182. props: i[l],
  104183. top: r.indexOf(l) > -1,
  104184. error: l == 0,
  104185. skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
  104186. }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = $oe;
  104187. let o = ig(e.tokenData);
  104188. this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
  104189. for (let s = 0; s < this.specializerSpecs.length; s++)
  104190. this.specialized[s] = this.specializerSpecs[s].term;
  104191. this.specializers = this.specializerSpecs.map(h9), this.states = ig(e.states, Uint32Array), this.data = ig(e.stateData), this.goto = ig(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((s) => typeof s == "number" ? new dh(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]];
  104192. }
  104193. createParse(e, n, r) {
  104194. let i = new Idt(this, e, n, r);
  104195. for (let a of this.wrappers)
  104196. i = a(i, e, n, r);
  104197. return i;
  104198. }
  104199. /**
  104200. Get a goto table entry @internal
  104201. */
  104202. getGoto(e, n, r = !1) {
  104203. let i = this.goto;
  104204. if (n >= i[0])
  104205. return -1;
  104206. for (let a = i[n + 1]; ; ) {
  104207. let o = i[a++], s = o & 1, l = i[a++];
  104208. if (s && r)
  104209. return l;
  104210. for (let u = a + (o >> 1); a < u; a++)
  104211. if (i[a] == e)
  104212. return l;
  104213. if (s)
  104214. return -1;
  104215. }
  104216. }
  104217. /**
  104218. Check if this state has an action for a given terminal @internal
  104219. */
  104220. hasAction(e, n) {
  104221. let r = this.data;
  104222. for (let i = 0; i < 2; i++)
  104223. for (let a = this.stateSlot(
  104224. e,
  104225. i ? 2 : 1
  104226. /* ParseState.Actions */
  104227. ), o; ; a += 3) {
  104228. if ((o = r[a]) == 65535)
  104229. if (r[a + 1] == 1)
  104230. o = r[a = xs(r, a + 2)];
  104231. else {
  104232. if (r[a + 1] == 2)
  104233. return xs(r, a + 2);
  104234. break;
  104235. }
  104236. if (o == n || o == 0)
  104237. return xs(r, a + 1);
  104238. }
  104239. return 0;
  104240. }
  104241. /**
  104242. @internal
  104243. */
  104244. stateSlot(e, n) {
  104245. return this.states[e * 6 + n];
  104246. }
  104247. /**
  104248. @internal
  104249. */
  104250. stateFlag(e, n) {
  104251. return (this.stateSlot(
  104252. e,
  104253. 0
  104254. /* ParseState.Flags */
  104255. ) & n) > 0;
  104256. }
  104257. /**
  104258. @internal
  104259. */
  104260. validAction(e, n) {
  104261. return !!this.allActions(e, (r) => r == n ? !0 : null);
  104262. }
  104263. /**
  104264. @internal
  104265. */
  104266. allActions(e, n) {
  104267. let r = this.stateSlot(
  104268. e,
  104269. 4
  104270. /* ParseState.DefaultReduce */
  104271. ), i = r ? n(r) : void 0;
  104272. for (let a = this.stateSlot(
  104273. e,
  104274. 1
  104275. /* ParseState.Actions */
  104276. ); i == null; a += 3) {
  104277. if (this.data[a] == 65535)
  104278. if (this.data[a + 1] == 1)
  104279. a = xs(this.data, a + 2);
  104280. else
  104281. break;
  104282. i = n(xs(this.data, a + 1));
  104283. }
  104284. return i;
  104285. }
  104286. /**
  104287. Get the states that can follow this one through shift actions or
  104288. goto jumps. @internal
  104289. */
  104290. nextStates(e) {
  104291. let n = [];
  104292. for (let r = this.stateSlot(
  104293. e,
  104294. 1
  104295. /* ParseState.Actions */
  104296. ); ; r += 3) {
  104297. if (this.data[r] == 65535)
  104298. if (this.data[r + 1] == 1)
  104299. r = xs(this.data, r + 2);
  104300. else
  104301. break;
  104302. if (!(this.data[r + 2] & 1)) {
  104303. let i = this.data[r + 1];
  104304. n.some((a, o) => o & 1 && a == i) || n.push(this.data[r], i);
  104305. }
  104306. }
  104307. return n;
  104308. }
  104309. /**
  104310. Configure the parser. Returns a new parser instance that has the
  104311. given settings modified. Settings not provided in `config` are
  104312. kept from the original parser.
  104313. */
  104314. configure(e) {
  104315. let n = Object.assign(Object.create(l0.prototype), this);
  104316. if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
  104317. let r = this.topRules[e.top];
  104318. if (!r)
  104319. throw new RangeError(`Invalid top rule name ${e.top}`);
  104320. n.top = r;
  104321. }
  104322. return e.tokenizers && (n.tokenizers = this.tokenizers.map((r) => {
  104323. let i = e.tokenizers.find((a) => a.from == r);
  104324. return i ? i.to : r;
  104325. })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((r, i) => {
  104326. let a = e.specializers.find((s) => s.from == r.external);
  104327. if (!a)
  104328. return r;
  104329. let o = Object.assign(Object.assign({}, r), { external: a.to });
  104330. return n.specializers[i] = h9(o), o;
  104331. })), 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;
  104332. }
  104333. /**
  104334. Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
  104335. are registered for this parser.
  104336. */
  104337. hasWrappers() {
  104338. return this.wrappers.length > 0;
  104339. }
  104340. /**
  104341. Returns the name associated with a given term. This will only
  104342. work for all terms when the parser was generated with the
  104343. `--names` option. By default, only the names of tagged terms are
  104344. stored.
  104345. */
  104346. getName(e) {
  104347. return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
  104348. }
  104349. /**
  104350. The eof term id is always allocated directly after the node
  104351. types. @internal
  104352. */
  104353. get eofTerm() {
  104354. return this.maxNode + 1;
  104355. }
  104356. /**
  104357. The type of top node produced by the parser.
  104358. */
  104359. get topNode() {
  104360. return this.nodeSet.types[this.top[1]];
  104361. }
  104362. /**
  104363. @internal
  104364. */
  104365. dynamicPrecedence(e) {
  104366. let n = this.dynamicPrecedences;
  104367. return n == null ? 0 : n[e] || 0;
  104368. }
  104369. /**
  104370. @internal
  104371. */
  104372. parseDialect(e) {
  104373. let n = Object.keys(this.dialects), r = n.map(() => !1);
  104374. if (e)
  104375. for (let a of e.split(" ")) {
  104376. let o = n.indexOf(a);
  104377. o >= 0 && (r[o] = !0);
  104378. }
  104379. let i = null;
  104380. for (let a = 0; a < n.length; a++)
  104381. if (!r[a])
  104382. for (let o = this.dialects[n[a]], s; (s = this.data[o++]) != 65535; )
  104383. (i || (i = new Uint8Array(this.maxTerm + 1)))[s] = 1;
  104384. return new Ddt(e, r, i);
  104385. }
  104386. /**
  104387. Used by the output of the parser generator. Not available to
  104388. user code. @hide
  104389. */
  104390. static deserialize(e) {
  104391. return new l0(e);
  104392. }
  104393. }
  104394. function xs(t, e) {
  104395. return t[e] | t[e + 1] << 16;
  104396. }
  104397. function kdt(t) {
  104398. let e = null;
  104399. for (let n of t) {
  104400. let r = n.p.stoppedAt;
  104401. (n.pos == n.p.stream.end || r != null && n.pos > r) && n.p.parser.stateFlag(
  104402. n.state,
  104403. 2
  104404. /* StateFlag.Accepting */
  104405. ) && (!e || e.score < n.score) && (e = n);
  104406. }
  104407. return e;
  104408. }
  104409. function h9(t) {
  104410. if (t.external) {
  104411. let e = t.extend ? 1 : 0;
  104412. return (n, r) => t.external(n, r) << 1 | e;
  104413. }
  104414. return t.get;
  104415. }
  104416. const Ldt = 312, p9 = 1, Ndt = 2, Bdt = 3, zdt = 4, Vdt = 313, Fdt = 315, Wdt = 316, Qdt = 5, Hdt = 6, Gdt = 0, qM = [
  104417. 9,
  104418. 10,
  104419. 11,
  104420. 12,
  104421. 13,
  104422. 32,
  104423. 133,
  104424. 160,
  104425. 5760,
  104426. 8192,
  104427. 8193,
  104428. 8194,
  104429. 8195,
  104430. 8196,
  104431. 8197,
  104432. 8198,
  104433. 8199,
  104434. 8200,
  104435. 8201,
  104436. 8202,
  104437. 8232,
  104438. 8233,
  104439. 8239,
  104440. 8287,
  104441. 12288
  104442. ], ole = 125, jdt = 59, KM = 47, Zdt = 42, Udt = 43, Xdt = 45, Ydt = 60, qdt = 44, Kdt = 63, Jdt = 46, eht = new Rdt({
  104443. start: !1,
  104444. shift(t, e) {
  104445. return e == Qdt || e == Hdt || e == Fdt ? t : e == Wdt;
  104446. },
  104447. strict: !1
  104448. }), tht = new Ww((t, e) => {
  104449. let { next: n } = t;
  104450. (n == ole || n == -1 || e.context) && t.acceptToken(Vdt);
  104451. }, { contextual: !0, fallback: !0 }), nht = new Ww((t, e) => {
  104452. let { next: n } = t, r;
  104453. qM.indexOf(n) > -1 || n == KM && ((r = t.peek(1)) == KM || r == Zdt) || n != ole && n != jdt && n != -1 && !e.context && t.acceptToken(Ldt);
  104454. }, { contextual: !0 }), rht = new Ww((t, e) => {
  104455. let { next: n } = t;
  104456. if (n == Udt || n == Xdt) {
  104457. if (t.advance(), n == t.next) {
  104458. t.advance();
  104459. let r = !e.context && e.canShift(p9);
  104460. t.acceptToken(r ? p9 : Ndt);
  104461. }
  104462. } else n == Kdt && t.peek(1) == Jdt && (t.advance(), t.advance(), (t.next < 48 || t.next > 57) && t.acceptToken(Bdt));
  104463. }, { contextual: !0 });
  104464. function V$(t, e) {
  104465. return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
  104466. }
  104467. const iht = new Ww((t, e) => {
  104468. if (t.next != Ydt || !e.dialectEnabled(Gdt) || (t.advance(), t.next == KM)) return;
  104469. let n = 0;
  104470. for (; qM.indexOf(t.next) > -1; )
  104471. t.advance(), n++;
  104472. if (V$(t.next, !0)) {
  104473. for (t.advance(), n++; V$(t.next, !1); )
  104474. t.advance(), n++;
  104475. for (; qM.indexOf(t.next) > -1; )
  104476. t.advance(), n++;
  104477. if (t.next == qdt) return;
  104478. for (let r = 0; ; r++) {
  104479. if (r == 7) {
  104480. if (!V$(t.next, !0)) return;
  104481. break;
  104482. }
  104483. if (t.next != "extends".charCodeAt(r)) break;
  104484. t.advance(), n++;
  104485. }
  104486. }
  104487. t.acceptToken(zdt, -n);
  104488. }), aht = p4({
  104489. "get set async static": J.modifier,
  104490. "for while do if else switch try catch finally return throw break continue default case": J.controlKeyword,
  104491. "in of await yield void typeof delete instanceof": J.operatorKeyword,
  104492. "let var const using function class extends": J.definitionKeyword,
  104493. "import export from": J.moduleKeyword,
  104494. "with debugger as new": J.keyword,
  104495. TemplateString: J.special(J.string),
  104496. super: J.atom,
  104497. BooleanLiteral: J.bool,
  104498. this: J.self,
  104499. null: J.null,
  104500. Star: J.modifier,
  104501. VariableName: J.variableName,
  104502. "CallExpression/VariableName TaggedTemplateExpression/VariableName": J.function(J.variableName),
  104503. VariableDefinition: J.definition(J.variableName),
  104504. Label: J.labelName,
  104505. PropertyName: J.propertyName,
  104506. PrivatePropertyName: J.special(J.propertyName),
  104507. "CallExpression/MemberExpression/PropertyName": J.function(J.propertyName),
  104508. "FunctionDeclaration/VariableDefinition": J.function(J.definition(J.variableName)),
  104509. "ClassDeclaration/VariableDefinition": J.definition(J.className),
  104510. PropertyDefinition: J.definition(J.propertyName),
  104511. PrivatePropertyDefinition: J.definition(J.special(J.propertyName)),
  104512. UpdateOp: J.updateOperator,
  104513. "LineComment Hashbang": J.lineComment,
  104514. BlockComment: J.blockComment,
  104515. Number: J.number,
  104516. String: J.string,
  104517. Escape: J.escape,
  104518. ArithOp: J.arithmeticOperator,
  104519. LogicOp: J.logicOperator,
  104520. BitOp: J.bitwiseOperator,
  104521. CompareOp: J.compareOperator,
  104522. RegExp: J.regexp,
  104523. Equals: J.definitionOperator,
  104524. Arrow: J.function(J.punctuation),
  104525. ": Spread": J.punctuation,
  104526. "( )": J.paren,
  104527. "[ ]": J.squareBracket,
  104528. "{ }": J.brace,
  104529. "InterpolationStart InterpolationEnd": J.special(J.brace),
  104530. ".": J.derefOperator,
  104531. ", ;": J.separator,
  104532. "@": J.meta,
  104533. TypeName: J.typeName,
  104534. TypeDefinition: J.definition(J.typeName),
  104535. "type enum interface implements namespace module declare": J.definitionKeyword,
  104536. "abstract global Privacy readonly override": J.modifier,
  104537. "is keyof unique infer": J.operatorKeyword,
  104538. JSXAttributeValue: J.attributeValue,
  104539. JSXText: J.content,
  104540. "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": J.angleBracket,
  104541. "JSXIdentifier JSXNameSpacedName": J.tagName,
  104542. "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": J.attributeName,
  104543. "JSXBuiltin/JSXIdentifier": J.standard(J.tagName)
  104544. }), oht = { __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 }, sht = { __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 }, lht = { __proto__: null, "<": 187 }, uht = l0.deserialize({
  104545. version: 14,
  104546. 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",
  104547. 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$^(`~",
  104548. 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",
  104549. 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",
  104550. maxTerm: 376,
  104551. context: eht,
  104552. nodeProps: [
  104553. ["isolate", -8, 5, 6, 14, 34, 36, 48, 50, 52, ""],
  104554. ["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"],
  104555. ["openedBy", 23, "<", 35, "InterpolationStart", 53, "[", 57, "{", 70, "(", 159, "JSXStartCloseTag"],
  104556. ["closedBy", 24, ">", 37, "InterpolationEnd", 47, "]", 58, "}", 71, ")", 164, "JSXEndTag"]
  104557. ],
  104558. propSources: [aht],
  104559. skippedNodes: [0, 5, 6, 274],
  104560. repeatNodeCount: 37,
  104561. 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",
  104562. tokenizers: [nht, rht, iht, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, tht, new YM("$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 YM("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~", 25, 318)],
  104563. topRules: { Script: [0, 7], SingleExpression: [1, 272], SingleClassItem: [2, 273] },
  104564. dialects: { jsx: 0, ts: 14725 },
  104565. dynamicPrecedences: { 77: 1, 79: 1, 91: 1, 167: 1, 196: 1 },
  104566. specialized: [{ term: 322, get: (t) => oht[t] || -1 }, { term: 338, get: (t) => sht[t] || -1 }, { term: 92, get: (t) => lht[t] || -1 }],
  104567. tokenPrec: 14749
  104568. }), sle = [
  104569. /* @__PURE__ */ ui("function ${name}(${params}) {\n ${}\n}", {
  104570. label: "function",
  104571. detail: "definition",
  104572. type: "keyword"
  104573. }),
  104574. /* @__PURE__ */ ui("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", {
  104575. label: "for",
  104576. detail: "loop",
  104577. type: "keyword"
  104578. }),
  104579. /* @__PURE__ */ ui("for (let ${name} of ${collection}) {\n ${}\n}", {
  104580. label: "for",
  104581. detail: "of loop",
  104582. type: "keyword"
  104583. }),
  104584. /* @__PURE__ */ ui("do {\n ${}\n} while (${})", {
  104585. label: "do",
  104586. detail: "loop",
  104587. type: "keyword"
  104588. }),
  104589. /* @__PURE__ */ ui("while (${}) {\n ${}\n}", {
  104590. label: "while",
  104591. detail: "loop",
  104592. type: "keyword"
  104593. }),
  104594. /* @__PURE__ */ ui(`try {
  104595. \${}
  104596. } catch (\${error}) {
  104597. \${}
  104598. }`, {
  104599. label: "try",
  104600. detail: "/ catch block",
  104601. type: "keyword"
  104602. }),
  104603. /* @__PURE__ */ ui("if (${}) {\n ${}\n}", {
  104604. label: "if",
  104605. detail: "block",
  104606. type: "keyword"
  104607. }),
  104608. /* @__PURE__ */ ui(`if (\${}) {
  104609. \${}
  104610. } else {
  104611. \${}
  104612. }`, {
  104613. label: "if",
  104614. detail: "/ else block",
  104615. type: "keyword"
  104616. }),
  104617. /* @__PURE__ */ ui(`class \${name} {
  104618. constructor(\${params}) {
  104619. \${}
  104620. }
  104621. }`, {
  104622. label: "class",
  104623. detail: "definition",
  104624. type: "keyword"
  104625. }),
  104626. /* @__PURE__ */ ui('import {${names}} from "${module}"\n${}', {
  104627. label: "import",
  104628. detail: "named",
  104629. type: "keyword"
  104630. }),
  104631. /* @__PURE__ */ ui('import ${name} from "${module}"\n${}', {
  104632. label: "import",
  104633. detail: "default",
  104634. type: "keyword"
  104635. })
  104636. ], cht = /* @__PURE__ */ sle.concat([
  104637. /* @__PURE__ */ ui("interface ${name} {\n ${}\n}", {
  104638. label: "interface",
  104639. detail: "definition",
  104640. type: "keyword"
  104641. }),
  104642. /* @__PURE__ */ ui("type ${name} = ${type}", {
  104643. label: "type",
  104644. detail: "definition",
  104645. type: "keyword"
  104646. }),
  104647. /* @__PURE__ */ ui("enum ${name} {\n ${}\n}", {
  104648. label: "enum",
  104649. detail: "definition",
  104650. type: "keyword"
  104651. })
  104652. ]), v9 = /* @__PURE__ */ new flt(), lle = /* @__PURE__ */ new Set([
  104653. "Script",
  104654. "Block",
  104655. "FunctionExpression",
  104656. "FunctionDeclaration",
  104657. "ArrowFunction",
  104658. "MethodDeclaration",
  104659. "ForStatement"
  104660. ]);
  104661. function Dv(t) {
  104662. return (e, n) => {
  104663. let r = e.node.getChild("VariableDefinition");
  104664. return r && n(r, t), !0;
  104665. };
  104666. }
  104667. const fht = ["FunctionDeclaration"], dht = {
  104668. FunctionDeclaration: /* @__PURE__ */ Dv("function"),
  104669. ClassDeclaration: /* @__PURE__ */ Dv("class"),
  104670. ClassExpression: () => !0,
  104671. EnumDeclaration: /* @__PURE__ */ Dv("constant"),
  104672. TypeAliasDeclaration: /* @__PURE__ */ Dv("type"),
  104673. NamespaceDeclaration: /* @__PURE__ */ Dv("namespace"),
  104674. VariableDefinition(t, e) {
  104675. t.matchContext(fht) || e(t, "variable");
  104676. },
  104677. TypeDefinition(t, e) {
  104678. e(t, "type");
  104679. },
  104680. __proto__: null
  104681. };
  104682. function ule(t, e) {
  104683. let n = v9.get(e);
  104684. if (n)
  104685. return n;
  104686. let r = [], i = !0;
  104687. function a(o, s) {
  104688. let l = t.sliceString(o.from, o.to);
  104689. r.push({ label: l, type: s });
  104690. }
  104691. return e.cursor(Zn.IncludeAnonymous).iterate((o) => {
  104692. if (i)
  104693. i = !1;
  104694. else if (o.name) {
  104695. let s = dht[o.name];
  104696. if (s && s(o, a) || lle.has(o.name))
  104697. return !1;
  104698. } else if (o.to - o.from > 8192) {
  104699. for (let s of ule(t, o.node))
  104700. r.push(s);
  104701. return !1;
  104702. }
  104703. }), v9.set(e, r), r;
  104704. }
  104705. const g9 = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, cle = [
  104706. "TemplateString",
  104707. "String",
  104708. "RegExp",
  104709. "LineComment",
  104710. "BlockComment",
  104711. "VariableDefinition",
  104712. "TypeDefinition",
  104713. "Label",
  104714. "PropertyDefinition",
  104715. "PropertyName",
  104716. "PrivatePropertyDefinition",
  104717. "PrivatePropertyName",
  104718. ".",
  104719. "?."
  104720. ];
  104721. function hht(t) {
  104722. let e = nr(t.state).resolveInner(t.pos, -1);
  104723. if (cle.indexOf(e.name) > -1)
  104724. return null;
  104725. let n = e.name == "VariableName" || e.to - e.from < 20 && g9.test(t.state.sliceDoc(e.from, e.to));
  104726. if (!n && !t.explicit)
  104727. return null;
  104728. let r = [];
  104729. for (let i = e; i; i = i.parent)
  104730. lle.has(i.name) && (r = r.concat(ule(t.state.doc, i)));
  104731. return {
  104732. options: r,
  104733. from: n ? e.from : t.pos,
  104734. validFor: g9
  104735. };
  104736. }
  104737. const of = /* @__PURE__ */ e0.define({
  104738. name: "javascript",
  104739. parser: /* @__PURE__ */ uht.configure({
  104740. props: [
  104741. /* @__PURE__ */ m4.add({
  104742. IfStatement: /* @__PURE__ */ Gg({ except: /^\s*({|else\b)/ }),
  104743. TryStatement: /* @__PURE__ */ Gg({ except: /^\s*({|catch\b|finally\b)/ }),
  104744. LabeledStatement: Mlt,
  104745. SwitchBody: (t) => {
  104746. let e = t.textAfter, n = /^\s*\}/.test(e), r = /^\s*(case|default)\b/.test(e);
  104747. return t.baseIndent + (n ? 0 : r ? 1 : 2) * t.unit;
  104748. },
  104749. Block: /* @__PURE__ */ Elt({ closing: "}" }),
  104750. ArrowFunction: (t) => t.baseIndent + t.unit,
  104751. "TemplateString BlockComment": () => null,
  104752. "Statement Property": /* @__PURE__ */ Gg({ except: /^{/ }),
  104753. JSXElement(t) {
  104754. let e = /^\s*<\//.test(t.textAfter);
  104755. return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
  104756. },
  104757. JSXEscape(t) {
  104758. let e = /\s*\}/.test(t.textAfter);
  104759. return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
  104760. },
  104761. "JSXOpenTag JSXSelfClosingTag"(t) {
  104762. return t.column(t.node.from) + t.unit;
  104763. }
  104764. }),
  104765. /* @__PURE__ */ b4.add({
  104766. "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": Voe,
  104767. BlockComment(t) {
  104768. return { from: t.from + 2, to: t.to - 2 };
  104769. }
  104770. })
  104771. ]
  104772. }),
  104773. languageData: {
  104774. closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
  104775. commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
  104776. indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
  104777. wordChars: "$"
  104778. }
  104779. }), fle = {
  104780. test: (t) => /^JSX/.test(t.name),
  104781. facet: /* @__PURE__ */ koe({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
  104782. }, pht = /* @__PURE__ */ of.configure({ dialect: "ts" }, "typescript"), vht = /* @__PURE__ */ of.configure({
  104783. dialect: "jsx",
  104784. props: [/* @__PURE__ */ v4.add((t) => t.isTop ? [fle] : void 0)]
  104785. }), ght = /* @__PURE__ */ of.configure({
  104786. dialect: "jsx ts",
  104787. props: [/* @__PURE__ */ v4.add((t) => t.isTop ? [fle] : void 0)]
  104788. }, "typescript");
  104789. let dle = (t) => ({ label: t, type: "keyword" });
  104790. const hle = /* @__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(dle), mht = /* @__PURE__ */ hle.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(dle));
  104791. function yht(t = {}) {
  104792. let e = t.jsx ? t.typescript ? ght : vht : t.typescript ? pht : of, n = t.typescript ? cht.concat(mht) : sle.concat(hle);
  104793. return new Noe(e, [
  104794. of.data.of({
  104795. autocomplete: qct(cle, Wse(n))
  104796. }),
  104797. of.data.of({
  104798. autocomplete: hht
  104799. }),
  104800. t.jsx ? Oht : []
  104801. ]);
  104802. }
  104803. function bht(t) {
  104804. for (; ; ) {
  104805. if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
  104806. return t;
  104807. if (t.name == "JSXEscape" || !t.parent)
  104808. return null;
  104809. t = t.parent;
  104810. }
  104811. }
  104812. function m9(t, e, n = t.length) {
  104813. for (let r = e == null ? void 0 : e.firstChild; r; r = r.nextSibling)
  104814. if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression")
  104815. return t.sliceString(r.from, Math.min(r.to, n));
  104816. return "";
  104817. }
  104818. const _ht = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Oht = /* @__PURE__ */ De.inputHandler.of((t, e, n, r, i) => {
  104819. if ((_ht ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || r != ">" && r != "/" || !of.isActiveAt(t.state, e, -1))
  104820. return !1;
  104821. let a = i(), { state: o } = a, s = o.changeByRange((l) => {
  104822. var u;
  104823. let { head: c } = l, f = nr(o).resolveInner(c - 1, -1), d;
  104824. if (f.name == "JSXStartTag" && (f = f.parent), !(o.doc.sliceString(c - 1, c) != r || f.name == "JSXAttributeValue" && f.to > c)) {
  104825. if (r == ">" && f.name == "JSXFragmentTag")
  104826. return { range: l, changes: { from: c, insert: "</>" } };
  104827. if (r == "/" && f.name == "JSXStartCloseTag") {
  104828. let h = f.parent, p = h.parent;
  104829. if (p && h.from == c - 2 && ((d = m9(o.doc, p.firstChild, c)) || ((u = p.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
  104830. let v = `${d}>`;
  104831. return { range: me.cursor(c + v.length, -1), changes: { from: c, insert: v } };
  104832. }
  104833. } else if (r == ">") {
  104834. let h = bht(f);
  104835. if (h && h.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(c, c + 2)) && (d = m9(o.doc, h, c)))
  104836. return { range: l, changes: { from: c, insert: `</${d}>` } };
  104837. }
  104838. }
  104839. return { range: l };
  104840. });
  104841. return s.changes.empty ? !1 : (t.dispatch([
  104842. a,
  104843. o.update(s, { userEvent: "input.complete", scrollIntoView: !0 })
  104844. ]), !0);
  104845. }), Sht = p4({
  104846. String: J.string,
  104847. Number: J.number,
  104848. "True False": J.bool,
  104849. PropertyName: J.propertyName,
  104850. Null: J.null,
  104851. ",": J.separator,
  104852. "[ ]": J.squareBracket,
  104853. "{ }": J.brace
  104854. }), xht = l0.deserialize({
  104855. version: 14,
  104856. 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",
  104857. stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",
  104858. goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
  104859. nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",
  104860. maxTerm: 25,
  104861. nodeProps: [
  104862. ["isolate", -2, 6, 11, ""],
  104863. ["openedBy", 7, "{", 12, "["],
  104864. ["closedBy", 8, "}", 13, "]"]
  104865. ],
  104866. propSources: [Sht],
  104867. skippedNodes: [0],
  104868. repeatNodeCount: 2,
  104869. 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~",
  104870. tokenizers: [0],
  104871. topRules: { JsonText: [0, 1] },
  104872. tokenPrec: 0
  104873. }), wht = /* @__PURE__ */ e0.define({
  104874. name: "json",
  104875. parser: /* @__PURE__ */ xht.configure({
  104876. props: [
  104877. /* @__PURE__ */ m4.add({
  104878. Object: /* @__PURE__ */ Gg({ except: /^\s*\}/ }),
  104879. Array: /* @__PURE__ */ Gg({ except: /^\s*\]/ })
  104880. }),
  104881. /* @__PURE__ */ b4.add({
  104882. "Object Array": Voe
  104883. })
  104884. ]
  104885. }),
  104886. languageData: {
  104887. closeBrackets: { brackets: ["[", "{", '"'] },
  104888. indentOnInput: /^\s*[\}\]]$/
  104889. }
  104890. });
  104891. function Cht() {
  104892. return new Noe(wht);
  104893. }
  104894. var ple = { exports: {} }, Rv = {}, d_ = { exports: {} }, F$ = {}, W$ = {}, y9;
  104895. function R4() {
  104896. if (y9) return W$;
  104897. y9 = 1;
  104898. function t(r) {
  104899. 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 = [];
  104900. }
  104901. t.prototype.clone_empty = function() {
  104902. var r = new t(this.__parent);
  104903. return r.set_indent(this.__indent_count, this.__alignment_count), r;
  104904. }, t.prototype.item = function(r) {
  104905. return r < 0 ? this.__items[this.__items.length + r] : this.__items[r];
  104906. }, t.prototype.has_match = function(r) {
  104907. for (var i = this.__items.length - 1; i >= 0; i--)
  104908. if (this.__items[i].match(r))
  104909. return !0;
  104910. return !1;
  104911. }, t.prototype.set_indent = function(r, i) {
  104912. 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));
  104913. }, t.prototype._set_wrap_point = function() {
  104914. 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);
  104915. }, t.prototype._should_wrap = function() {
  104916. return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
  104917. }, t.prototype._allow_wrap = function() {
  104918. if (this._should_wrap()) {
  104919. this.__parent.add_new_line();
  104920. var r = this.__parent.current_line;
  104921. 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;
  104922. }
  104923. return !1;
  104924. }, t.prototype.is_empty = function() {
  104925. return this.__items.length === 0;
  104926. }, t.prototype.last = function() {
  104927. return this.is_empty() ? null : this.__items[this.__items.length - 1];
  104928. }, t.prototype.push = function(r) {
  104929. this.__items.push(r);
  104930. var i = r.lastIndexOf(`
  104931. `);
  104932. i !== -1 ? this.__character_count = r.length - i : this.__character_count += r.length;
  104933. }, t.prototype.pop = function() {
  104934. var r = null;
  104935. return this.is_empty() || (r = this.__items.pop(), this.__character_count -= r.length), r;
  104936. }, t.prototype._remove_indent = function() {
  104937. this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
  104938. }, t.prototype._remove_wrap_indent = function() {
  104939. this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
  104940. }, t.prototype.trim = function() {
  104941. for (; this.last() === " "; )
  104942. this.__items.pop(), this.__character_count -= 1;
  104943. }, t.prototype.toString = function() {
  104944. var r = "";
  104945. 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;
  104946. };
  104947. function e(r, i) {
  104948. 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;
  104949. }
  104950. e.prototype.get_indent_size = function(r, i) {
  104951. var a = this.__base_string_length;
  104952. return i = i || 0, r < 0 && (a = 0), a += r * this.__indent_size, a += i, a;
  104953. }, e.prototype.get_indent_string = function(r, i) {
  104954. var a = this.__base_string;
  104955. return i = i || 0, r < 0 && (r = 0, a = ""), i += r * this.__indent_size, this.__ensure_cache(i), a += this.__cache[i], a;
  104956. }, e.prototype.__ensure_cache = function(r) {
  104957. for (; r >= this.__cache.length; )
  104958. this.__add_column();
  104959. }, e.prototype.__add_column = function() {
  104960. var r = this.__cache.length, i = 0, a = "";
  104961. 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);
  104962. };
  104963. function n(r, i) {
  104964. 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();
  104965. }
  104966. return n.prototype.__add_outputline = function() {
  104967. this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
  104968. }, n.prototype.get_line_number = function() {
  104969. return this.__lines.length;
  104970. }, n.prototype.get_indent_string = function(r, i) {
  104971. return this.__indent_cache.get_indent_string(r, i);
  104972. }, n.prototype.get_indent_size = function(r, i) {
  104973. return this.__indent_cache.get_indent_size(r, i);
  104974. }, n.prototype.is_empty = function() {
  104975. return !this.previous_line && this.current_line.is_empty();
  104976. }, n.prototype.add_new_line = function(r) {
  104977. return this.is_empty() || !r && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
  104978. }, n.prototype.get_code = function(r) {
  104979. this.trim(!0);
  104980. var i = this.current_line.pop();
  104981. i && (i[i.length - 1] === `
  104982. ` && (i = i.replace(/\n+$/g, "")), this.current_line.push(i)), this._end_with_newline && this.__add_outputline();
  104983. var a = this.__lines.join(`
  104984. `);
  104985. return r !== `
  104986. ` && (a = a.replace(/[\n]/g, r)), a;
  104987. }, n.prototype.set_wrap_point = function() {
  104988. this.current_line._set_wrap_point();
  104989. }, n.prototype.set_indent = function(r, i) {
  104990. 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);
  104991. }, n.prototype.add_raw_token = function(r) {
  104992. for (var i = 0; i < r.newlines; i++)
  104993. this.__add_outputline();
  104994. 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;
  104995. }, n.prototype.add_token = function(r) {
  104996. 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();
  104997. }, n.prototype.__add_space_before_token = function() {
  104998. this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
  104999. }, n.prototype.remove_indent = function(r) {
  105000. for (var i = this.__lines.length; r < i; )
  105001. this.__lines[r]._remove_indent(), r++;
  105002. this.current_line._remove_wrap_indent();
  105003. }, n.prototype.trim = function(r) {
  105004. for (r = r === void 0 ? !1 : r, this.current_line.trim(); r && this.__lines.length > 1 && this.current_line.is_empty(); )
  105005. this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
  105006. this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
  105007. }, n.prototype.just_added_newline = function() {
  105008. return this.current_line.is_empty();
  105009. }, n.prototype.just_added_blankline = function() {
  105010. return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
  105011. }, n.prototype.ensure_empty_line_above = function(r, i) {
  105012. for (var a = this.__lines.length - 2; a >= 0; ) {
  105013. var o = this.__lines[a];
  105014. if (o.is_empty())
  105015. break;
  105016. if (o.item(0).indexOf(r) !== 0 && o.item(-1) !== i) {
  105017. this.__lines.splice(a + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
  105018. break;
  105019. }
  105020. a--;
  105021. }
  105022. }, W$.Output = n, W$;
  105023. }
  105024. var Q$ = {}, b9;
  105025. function vle() {
  105026. if (b9) return Q$;
  105027. b9 = 1;
  105028. function t(e, n, r, i) {
  105029. 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;
  105030. }
  105031. return Q$.Token = t, Q$;
  105032. }
  105033. var H$ = {}, _9;
  105034. function gle() {
  105035. return _9 || (_9 = 1, function(t) {
  105036. 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 + "])*";
  105037. 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
  105038. |` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
  105039. }(H$)), H$;
  105040. }
  105041. var G$ = {}, kv = {}, O9;
  105042. function k4() {
  105043. if (O9) return kv;
  105044. O9 = 1;
  105045. function t(r, i) {
  105046. 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"]);
  105047. }
  105048. t.prototype._get_array = function(r, i) {
  105049. var a = this.raw_options[r], o = i || [];
  105050. return typeof a == "object" ? a !== null && typeof a.concat == "function" && (o = a.concat()) : typeof a == "string" && (o = a.split(/[^a-zA-Z0-9_\/\-]+/)), o;
  105051. }, t.prototype._get_boolean = function(r, i) {
  105052. var a = this.raw_options[r], o = a === void 0 ? !!i : !!a;
  105053. return o;
  105054. }, t.prototype._get_characters = function(r, i) {
  105055. var a = this.raw_options[r], o = i || "";
  105056. return typeof a == "string" && (o = a.replace(/\\r/, "\r").replace(/\\n/, `
  105057. `).replace(/\\t/, " ")), o;
  105058. }, t.prototype._get_number = function(r, i) {
  105059. var a = this.raw_options[r];
  105060. i = parseInt(i, 10), isNaN(i) && (i = 0);
  105061. var o = parseInt(a, 10);
  105062. return isNaN(o) && (o = i), o;
  105063. }, t.prototype._get_selection = function(r, i, a) {
  105064. var o = this._get_selection_list(r, i, a);
  105065. if (o.length !== 1)
  105066. throw new Error(
  105067. "Invalid Option Value: The option '" + r + `' can only be one of the following values:
  105068. ` + i + `
  105069. You passed in: '` + this.raw_options[r] + "'"
  105070. );
  105071. return o[0];
  105072. }, t.prototype._get_selection_list = function(r, i, a) {
  105073. if (!i || i.length === 0)
  105074. throw new Error("Selection list cannot be empty.");
  105075. if (a = a || [i[0]], !this._is_valid_selection(a, i))
  105076. throw new Error("Invalid Default Value!");
  105077. var o = this._get_array(r, a);
  105078. if (!this._is_valid_selection(o, i))
  105079. throw new Error(
  105080. "Invalid Option Value: The option '" + r + `' can contain only the following values:
  105081. ` + i + `
  105082. You passed in: '` + this.raw_options[r] + "'"
  105083. );
  105084. return o;
  105085. }, t.prototype._is_valid_selection = function(r, i) {
  105086. return r.length && i.length && !r.some(function(a) {
  105087. return i.indexOf(a) === -1;
  105088. });
  105089. };
  105090. function e(r, i) {
  105091. var a = {};
  105092. r = n(r);
  105093. var o;
  105094. for (o in r)
  105095. o !== i && (a[o] = r[o]);
  105096. if (i && r[i])
  105097. for (o in r[i])
  105098. a[o] = r[i][o];
  105099. return a;
  105100. }
  105101. function n(r) {
  105102. var i = {}, a;
  105103. for (a in r) {
  105104. var o = a.replace(/-/g, "_");
  105105. i[o] = r[a];
  105106. }
  105107. return i;
  105108. }
  105109. return kv.Options = t, kv.normalizeOpts = n, kv.mergeOpts = e, kv;
  105110. }
  105111. var S9;
  105112. function mle() {
  105113. if (S9) return G$;
  105114. S9 = 1;
  105115. var t = k4().Options, e = ["before-newline", "after-newline", "preserve-newline"];
  105116. function n(r) {
  105117. t.call(this, r, "js");
  105118. var i = this.raw_options.brace_style || null;
  105119. 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");
  105120. var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
  105121. this.brace_preserve_inline = !1, this.brace_style = "collapse";
  105122. for (var o = 0; o < a.length; o++)
  105123. a[o] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[o];
  105124. 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);
  105125. }
  105126. return n.prototype = new t(), G$.Options = n, G$;
  105127. }
  105128. var wd = {}, j$ = {}, x9;
  105129. function L4() {
  105130. if (x9) return j$;
  105131. x9 = 1;
  105132. var t = RegExp.prototype.hasOwnProperty("sticky");
  105133. function e(n) {
  105134. this.__input = n || "", this.__input_length = this.__input.length, this.__position = 0;
  105135. }
  105136. return e.prototype.restart = function() {
  105137. this.__position = 0;
  105138. }, e.prototype.back = function() {
  105139. this.__position > 0 && (this.__position -= 1);
  105140. }, e.prototype.hasNext = function() {
  105141. return this.__position < this.__input_length;
  105142. }, e.prototype.next = function() {
  105143. var n = null;
  105144. return this.hasNext() && (n = this.__input.charAt(this.__position), this.__position += 1), n;
  105145. }, e.prototype.peek = function(n) {
  105146. var r = null;
  105147. return n = n || 0, n += this.__position, n >= 0 && n < this.__input_length && (r = this.__input.charAt(n)), r;
  105148. }, e.prototype.__match = function(n, r) {
  105149. n.lastIndex = r;
  105150. var i = n.exec(this.__input);
  105151. return i && !(t && n.sticky) && i.index !== r && (i = null), i;
  105152. }, e.prototype.test = function(n, r) {
  105153. return r = r || 0, r += this.__position, r >= 0 && r < this.__input_length ? !!this.__match(n, r) : !1;
  105154. }, e.prototype.testChar = function(n, r) {
  105155. var i = this.peek(r);
  105156. return n.lastIndex = 0, i !== null && n.test(i);
  105157. }, e.prototype.match = function(n) {
  105158. var r = this.__match(n, this.__position);
  105159. return r ? this.__position += r[0].length : r = null, r;
  105160. }, e.prototype.read = function(n, r, i) {
  105161. var a = "", o;
  105162. return n && (o = this.match(n), o && (a += o[0])), r && (o || !n) && (a += this.readUntil(r, i)), a;
  105163. }, e.prototype.readUntil = function(n, r) {
  105164. var i = "", a = this.__position;
  105165. n.lastIndex = this.__position;
  105166. var o = n.exec(this.__input);
  105167. 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;
  105168. }, e.prototype.readUntilAfter = function(n) {
  105169. return this.readUntil(n, !0);
  105170. }, e.prototype.get_regexp = function(n, r) {
  105171. var i = null, a = "g";
  105172. return r && t && (a = "y"), typeof n == "string" && n !== "" ? i = new RegExp(n, a) : n && (i = new RegExp(n.source, a)), i;
  105173. }, e.prototype.get_literal_regexp = function(n) {
  105174. return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
  105175. }, e.prototype.peekUntilAfter = function(n) {
  105176. var r = this.__position, i = this.readUntilAfter(n);
  105177. return this.__position = r, i;
  105178. }, e.prototype.lookBack = function(n) {
  105179. var r = this.__position - 1;
  105180. return r >= n.length && this.__input.substring(r - n.length, r).toLowerCase() === n;
  105181. }, j$.InputScanner = e, j$;
  105182. }
  105183. var h_ = {}, Z$ = {}, w9;
  105184. function Tht() {
  105185. if (w9) return Z$;
  105186. w9 = 1;
  105187. function t(e) {
  105188. this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = e;
  105189. }
  105190. return t.prototype.restart = function() {
  105191. this.__position = 0;
  105192. }, t.prototype.isEmpty = function() {
  105193. return this.__tokens_length === 0;
  105194. }, t.prototype.hasNext = function() {
  105195. return this.__position < this.__tokens_length;
  105196. }, t.prototype.next = function() {
  105197. var e = null;
  105198. return this.hasNext() && (e = this.__tokens[this.__position], this.__position += 1), e;
  105199. }, t.prototype.peek = function(e) {
  105200. var n = null;
  105201. return e = e || 0, e += this.__position, e >= 0 && e < this.__tokens_length && (n = this.__tokens[e]), n;
  105202. }, t.prototype.add = function(e) {
  105203. this.__parent_token && (e.parent = this.__parent_token), this.__tokens.push(e), this.__tokens_length += 1;
  105204. }, Z$.TokenStream = t, Z$;
  105205. }
  105206. var U$ = {}, X$ = {}, C9;
  105207. function Qw() {
  105208. if (C9) return X$;
  105209. C9 = 1;
  105210. function t(e, n) {
  105211. 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);
  105212. }
  105213. return t.prototype.read = function() {
  105214. var e = this._input.read(this._starting_pattern);
  105215. return (!this._starting_pattern || e) && (e += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), e;
  105216. }, t.prototype.read_match = function() {
  105217. return this._input.match(this._match_pattern);
  105218. }, t.prototype.until_after = function(e) {
  105219. var n = this._create();
  105220. return n._until_after = !0, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  105221. }, t.prototype.until = function(e) {
  105222. var n = this._create();
  105223. return n._until_after = !1, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  105224. }, t.prototype.starting_with = function(e) {
  105225. var n = this._create();
  105226. return n._starting_pattern = this._input.get_regexp(e, !0), n._update(), n;
  105227. }, t.prototype.matching = function(e) {
  105228. var n = this._create();
  105229. return n._match_pattern = this._input.get_regexp(e, !0), n._update(), n;
  105230. }, t.prototype._create = function() {
  105231. return new t(this._input, this);
  105232. }, t.prototype._update = function() {
  105233. }, X$.Pattern = t, X$;
  105234. }
  105235. var T9;
  105236. function Pht() {
  105237. if (T9) return U$;
  105238. T9 = 1;
  105239. var t = Qw().Pattern;
  105240. function e(n, r) {
  105241. 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 = "";
  105242. }
  105243. return e.prototype = new t(), e.prototype.__set_whitespace_patterns = function(n, r) {
  105244. n += "\\t ", r += "\\n\\r", this._match_pattern = this._input.get_regexp(
  105245. "[" + n + r + "]+",
  105246. !0
  105247. ), this._newline_regexp = this._input.get_regexp(
  105248. "\\r\\n|[" + r + "]"
  105249. );
  105250. }, e.prototype.read = function() {
  105251. this.newline_count = 0, this.whitespace_before_token = "";
  105252. var n = this._input.read(this._match_pattern);
  105253. if (n === " ")
  105254. this.whitespace_before_token = " ";
  105255. else if (n) {
  105256. var r = this.__split(this._newline_regexp, n);
  105257. this.newline_count = r.length - 1, this.whitespace_before_token = r[this.newline_count];
  105258. }
  105259. return n;
  105260. }, e.prototype.matching = function(n, r) {
  105261. var i = this._create();
  105262. return i.__set_whitespace_patterns(n, r), i._update(), i;
  105263. }, e.prototype._create = function() {
  105264. return new e(this._input, this);
  105265. }, e.prototype.__split = function(n, r) {
  105266. n.lastIndex = 0;
  105267. for (var i = 0, a = [], o = n.exec(r); o; )
  105268. a.push(r.substring(i, o.index)), i = o.index + o[0].length, o = n.exec(r);
  105269. return i < r.length ? a.push(r.substring(i, r.length)) : a.push(""), a;
  105270. }, U$.WhitespacePattern = e, U$;
  105271. }
  105272. var P9;
  105273. function CS() {
  105274. if (P9) return h_;
  105275. P9 = 1;
  105276. var t = L4().InputScanner, e = vle().Token, n = Tht().TokenStream, r = Pht().WhitespacePattern, i = {
  105277. START: "TK_START",
  105278. RAW: "TK_RAW",
  105279. EOF: "TK_EOF"
  105280. }, a = function(o, s) {
  105281. this._input = new t(o), this._options = s || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new r(this._input);
  105282. };
  105283. return a.prototype.tokenize = function() {
  105284. this._input.restart(), this.__tokens = new n(), this._reset();
  105285. for (var o, s = new e(i.START, ""), l = null, u = [], c = new n(); s.type !== i.EOF; ) {
  105286. for (o = this._get_next_token(s, l); this._is_comment(o); )
  105287. c.add(o), o = this._get_next_token(s, l);
  105288. 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;
  105289. }
  105290. return this.__tokens;
  105291. }, a.prototype._is_first_token = function() {
  105292. return this.__tokens.isEmpty();
  105293. }, a.prototype._reset = function() {
  105294. }, a.prototype._get_next_token = function(o, s) {
  105295. this._readWhitespace();
  105296. var l = this._input.read(/.+/g);
  105297. return l ? this._create_token(i.RAW, l) : this._create_token(i.EOF, "");
  105298. }, a.prototype._is_comment = function(o) {
  105299. return !1;
  105300. }, a.prototype._is_opening = function(o) {
  105301. return !1;
  105302. }, a.prototype._is_closing = function(o, s) {
  105303. return !1;
  105304. }, a.prototype._create_token = function(o, s) {
  105305. var l = new e(
  105306. o,
  105307. s,
  105308. this._patterns.whitespace.newline_count,
  105309. this._patterns.whitespace.whitespace_before_token
  105310. );
  105311. return l;
  105312. }, a.prototype._readWhitespace = function() {
  105313. return this._patterns.whitespace.read();
  105314. }, h_.Tokenizer = a, h_.TOKEN = i, h_;
  105315. }
  105316. var Y$ = {}, $9;
  105317. function N4() {
  105318. if ($9) return Y$;
  105319. $9 = 1;
  105320. function t(e, n) {
  105321. 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");
  105322. }
  105323. return t.prototype.get_directives = function(e) {
  105324. if (!e.match(this.__directives_block_pattern))
  105325. return null;
  105326. var n = {};
  105327. this.__directive_pattern.lastIndex = 0;
  105328. for (var r = this.__directive_pattern.exec(e); r; )
  105329. n[r[1]] = r[2], r = this.__directive_pattern.exec(e);
  105330. return n;
  105331. }, t.prototype.readIgnored = function(e) {
  105332. return e.readUntilAfter(this.__directives_end_ignore_pattern);
  105333. }, Y$.Directives = t, Y$;
  105334. }
  105335. var q$ = {}, A9;
  105336. function yle() {
  105337. if (A9) return q$;
  105338. A9 = 1;
  105339. var t = Qw().Pattern, e = {
  105340. django: !1,
  105341. erb: !1,
  105342. handlebars: !1,
  105343. php: !1,
  105344. smarty: !1,
  105345. angular: !1
  105346. };
  105347. function n(r, i) {
  105348. 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));
  105349. var a = new t(r);
  105350. this.__patterns = {
  105351. handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
  105352. handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
  105353. handlebars: a.starting_with(/{{/).until_after(/}}/),
  105354. php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
  105355. erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
  105356. // django coflicts with handlebars a bit.
  105357. django: a.starting_with(/{%/).until_after(/%}/),
  105358. django_value: a.starting_with(/{{/).until_after(/}}/),
  105359. django_comment: a.starting_with(/{#/).until_after(/#}/),
  105360. smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
  105361. smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
  105362. smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
  105363. };
  105364. }
  105365. return n.prototype = new t(), n.prototype._create = function() {
  105366. return new n(this._input, this);
  105367. }, n.prototype._update = function() {
  105368. this.__set_templated_pattern();
  105369. }, n.prototype.disable = function(r) {
  105370. var i = this._create();
  105371. return i._disabled[r] = !0, i._update(), i;
  105372. }, n.prototype.read_options = function(r) {
  105373. var i = this._create();
  105374. for (var a in e)
  105375. i._disabled[a] = r.templating.indexOf(a) === -1;
  105376. return i._update(), i;
  105377. }, n.prototype.exclude = function(r) {
  105378. var i = this._create();
  105379. return i._excluded[r] = !0, i._update(), i;
  105380. }, n.prototype.read = function() {
  105381. var r = "";
  105382. this._match_pattern ? r = this._input.read(this._starting_pattern) : r = this._input.read(this._starting_pattern, this.__template_pattern);
  105383. for (var i = this._read_template(); i; )
  105384. this._match_pattern ? i += this._input.read(this._match_pattern) : i += this._input.readUntil(this.__template_pattern), r += i, i = this._read_template();
  105385. return this._until_after && (r += this._input.readUntilAfter(this._until_pattern)), r;
  105386. }, n.prototype.__set_templated_pattern = function() {
  105387. var r = [];
  105388. 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("|") + ")");
  105389. }, n.prototype._read_template = function() {
  105390. var r = "", i = this._input.peek();
  105391. if (i === "<") {
  105392. var a = this._input.peek(1);
  105393. !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());
  105394. } 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()));
  105395. return r;
  105396. }, q$.TemplatablePattern = n, q$;
  105397. }
  105398. var E9;
  105399. function p_() {
  105400. if (E9) return wd;
  105401. E9 = 1;
  105402. var t = L4().InputScanner, e = CS().Tokenizer, n = CS().TOKEN, r = N4().Directives, i = gle(), a = Qw().Pattern, o = yle().TemplatablePattern;
  105403. function s(S, x) {
  105404. return x.indexOf(S) !== -1;
  105405. }
  105406. var l = {
  105407. START_EXPR: "TK_START_EXPR",
  105408. END_EXPR: "TK_END_EXPR",
  105409. START_BLOCK: "TK_START_BLOCK",
  105410. END_BLOCK: "TK_END_BLOCK",
  105411. WORD: "TK_WORD",
  105412. RESERVED: "TK_RESERVED",
  105413. SEMICOLON: "TK_SEMICOLON",
  105414. STRING: "TK_STRING",
  105415. EQUALS: "TK_EQUALS",
  105416. OPERATOR: "TK_OPERATOR",
  105417. COMMA: "TK_COMMA",
  105418. BLOCK_COMMENT: "TK_BLOCK_COMMENT",
  105419. COMMENT: "TK_COMMENT",
  105420. DOT: "TK_DOT",
  105421. UNKNOWN: "TK_UNKNOWN",
  105422. START: n.START,
  105423. RAW: n.RAW,
  105424. EOF: n.EOF
  105425. }, 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 = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
  105426. p = p.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), p = "\\?\\.(?!\\d) " + p, p = p.replace(/ /g, "|");
  105427. 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) {
  105428. e.call(this, S, x), this._patterns.whitespace = this._patterns.whitespace.matching(
  105429. /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
  105430. /\u2028\u2029/.source
  105431. );
  105432. var C = new a(this._input), T = new o(this._input).read_options(this._options);
  105433. this.__patterns = {
  105434. template: T,
  105435. identifier: T.starting_with(i.identifier).matching(i.identifierMatch),
  105436. number: C.matching(c),
  105437. punct: C.matching(v),
  105438. // comment ends just before nearest linefeed or end of file
  105439. comment: C.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
  105440. // /* ... */ comment ends with nearest */ or end of file
  105441. block_comment: C.starting_with(/\/\*/).until_after(/\*\//),
  105442. html_comment_start: C.matching(/<!--/),
  105443. html_comment_end: C.matching(/-->/),
  105444. include: C.starting_with(/#include/).until_after(i.lineBreak),
  105445. shebang: C.starting_with(/#!/).until_after(i.lineBreak),
  105446. 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*>/),
  105447. single_quote: T.until(/['\\\n\r\u2028\u2029]/),
  105448. double_quote: T.until(/["\\\n\r\u2028\u2029]/),
  105449. template_text: T.until(/[`\\$]/),
  105450. template_expression: T.until(/[`}\\]/)
  105451. };
  105452. };
  105453. _.prototype = new e(), _.prototype._is_comment = function(S) {
  105454. return S.type === l.COMMENT || S.type === l.BLOCK_COMMENT || S.type === l.UNKNOWN;
  105455. }, _.prototype._is_opening = function(S) {
  105456. return S.type === l.START_BLOCK || S.type === l.START_EXPR;
  105457. }, _.prototype._is_closing = function(S, x) {
  105458. return (S.type === l.END_BLOCK || S.type === l.END_EXPR) && x && (S.text === "]" && x.text === "[" || S.text === ")" && x.text === "(" || S.text === "}" && x.text === "{");
  105459. }, _.prototype._reset = function() {
  105460. b = !1;
  105461. }, _.prototype._get_next_token = function(S, x) {
  105462. var C = null;
  105463. this._readWhitespace();
  105464. var T = this._input.peek();
  105465. 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);
  105466. }, _.prototype._read_word = function(S) {
  105467. var x;
  105468. if (x = this.__patterns.identifier.read(), x !== "")
  105469. return x = x.replace(i.allLineBreaks, `
  105470. `), !(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);
  105471. if (x = this.__patterns.number.read(), x !== "")
  105472. return this._create_token(l.WORD, x);
  105473. }, _.prototype._read_singles = function(S) {
  105474. var x = null;
  105475. 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;
  105476. }, _.prototype._read_pair = function(S, x) {
  105477. var C = null;
  105478. return S === "#" && x === "{" && (C = this._create_token(l.START_BLOCK, S + x)), C && (this._input.next(), this._input.next()), C;
  105479. }, _.prototype._read_punctuation = function() {
  105480. var S = this.__patterns.punct.read();
  105481. if (S !== "")
  105482. return S === "=" ? this._create_token(l.EQUALS, S) : S === "?." ? this._create_token(l.DOT, S) : this._create_token(l.OPERATOR, S);
  105483. }, _.prototype._read_non_javascript = function(S) {
  105484. var x = "";
  105485. if (S === "#") {
  105486. if (this._is_first_token() && (x = this.__patterns.shebang.read(), x))
  105487. return this._create_token(l.UNKNOWN, x.trim() + `
  105488. `);
  105489. if (x = this.__patterns.include.read(), x)
  105490. return this._create_token(l.UNKNOWN, x.trim() + `
  105491. `);
  105492. S = this._input.next();
  105493. var C = "#";
  105494. if (this._input.hasNext() && this._input.testChar(f)) {
  105495. do
  105496. S = this._input.next(), C += S;
  105497. while (this._input.hasNext() && S !== "#" && S !== "=");
  105498. 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);
  105499. }
  105500. this._input.back();
  105501. } else if (S === "<" && this._is_first_token()) {
  105502. if (x = this.__patterns.html_comment_start.read(), x) {
  105503. for (; this._input.hasNext() && !this._input.testChar(i.newline); )
  105504. x += this._input.next();
  105505. return b = !0, this._create_token(l.COMMENT, x);
  105506. }
  105507. } else if (b && S === "-" && (x = this.__patterns.html_comment_end.read(), x))
  105508. return b = !1, this._create_token(l.COMMENT, x);
  105509. return null;
  105510. }, _.prototype._read_comment = function(S) {
  105511. var x = null;
  105512. if (S === "/") {
  105513. var C = "";
  105514. if (this._input.peek(1) === "*") {
  105515. C = this.__patterns.block_comment.read();
  105516. var T = u.get_directives(C);
  105517. T && T.ignore === "start" && (C += u.readIgnored(this._input)), C = C.replace(i.allLineBreaks, `
  105518. `), x = this._create_token(l.BLOCK_COMMENT, C), x.directives = T;
  105519. } else this._input.peek(1) === "/" && (C = this.__patterns.comment.read(), x = this._create_token(l.COMMENT, C));
  105520. }
  105521. return x;
  105522. }, _.prototype._read_string = function(S) {
  105523. if (S === "`" || S === "'" || S === '"') {
  105524. var x = this._input.next();
  105525. 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, `
  105526. `), this._create_token(l.STRING, x);
  105527. }
  105528. return null;
  105529. }, _.prototype._allow_regexp_or_xml = function(S) {
  105530. 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, [
  105531. l.COMMENT,
  105532. l.START_EXPR,
  105533. l.START_BLOCK,
  105534. l.START,
  105535. l.END_BLOCK,
  105536. l.OPERATOR,
  105537. l.EQUALS,
  105538. l.EOF,
  105539. l.SEMICOLON,
  105540. l.COMMA
  105541. ]);
  105542. }, _.prototype._read_regexp = function(S, x) {
  105543. if (S === "/" && this._allow_regexp_or_xml(x)) {
  105544. for (var C = this._input.next(), T = !1, w = !1; this._input.hasNext() && (T || w || this._input.peek() !== S) && !this._input.testChar(i.newline); )
  105545. C += this._input.peek(), T ? T = !1 : (T = this._input.peek() === "\\", this._input.peek() === "[" ? w = !0 : this._input.peek() === "]" && (w = !1)), this._input.next();
  105546. return this._input.peek() === S && (C += this._input.next(), C += this._input.read(i.identifier)), this._create_token(l.STRING, C);
  105547. }
  105548. return null;
  105549. }, _.prototype._read_xml = function(S, x) {
  105550. if (this._options.e4x && S === "<" && this._allow_regexp_or_xml(x)) {
  105551. var C = "", T = this.__patterns.xml.read_match();
  105552. if (T) {
  105553. for (var w = T[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), P = w.indexOf("{") === 0, $ = 0; T; ) {
  105554. var A = !!T[1], D = T[2], E = !!T[T.length - 1] || D.slice(0, 8) === "![CDATA[";
  105555. if (!E && (D === w || P && D.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (A ? --$ : ++$), C += T[0], $ <= 0)
  105556. break;
  105557. T = this.__patterns.xml.read_match();
  105558. }
  105559. return T || (C += this._input.match(/[\s\S]*/g)[0]), C = C.replace(i.allLineBreaks, `
  105560. `), this._create_token(l.STRING, C);
  105561. }
  105562. }
  105563. return null;
  105564. };
  105565. function O(S) {
  105566. for (var x = "", C = 0, T = new t(S), w = null; T.hasNext(); )
  105567. if (w = T.match(/([\s]|[^\\]|\\\\)+/g), w && (x += w[0]), T.peek() === "\\") {
  105568. if (T.next(), T.peek() === "x")
  105569. w = T.match(/x([0-9A-Fa-f]{2})/g);
  105570. else if (T.peek() === "u")
  105571. w = T.match(/u([0-9A-Fa-f]{4})/g), w || (w = T.match(/u\{([0-9A-Fa-f]+)\}/g));
  105572. else {
  105573. x += "\\", T.hasNext() && (x += T.next());
  105574. continue;
  105575. }
  105576. if (!w || (C = parseInt(w[1], 16), C > 126 && C <= 255 && w[0].indexOf("x") === 0))
  105577. return S;
  105578. C >= 0 && C < 32 || C > 1114111 ? x += "\\" + w[0] : C === 34 || C === 39 || C === 92 ? x += "\\" + String.fromCharCode(C) : x += String.fromCharCode(C);
  105579. }
  105580. return x;
  105581. }
  105582. return _.prototype._read_string_recursive = function(S, x, C) {
  105583. var T, w;
  105584. S === "'" ? w = this.__patterns.single_quote : S === '"' ? w = this.__patterns.double_quote : S === "`" ? w = this.__patterns.template_text : S === "}" && (w = this.__patterns.template_expression);
  105585. for (var P = w.read(), $ = ""; this._input.hasNext(); ) {
  105586. if ($ = this._input.next(), $ === S || !x && i.newline.test($)) {
  105587. this._input.back();
  105588. break;
  105589. } else $ === "\\" && this._input.hasNext() ? (T = this._input.peek(), T === "x" || T === "u" ? this.has_char_escapes = !0 : T === "\r" && this._input.peek(1) === `
  105590. ` && 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())));
  105591. $ += w.read(), P += $;
  105592. }
  105593. return P;
  105594. }, wd.Tokenizer = _, wd.TOKEN = l, wd.positionable_operators = h.slice(), wd.line_starters = g.slice(), wd;
  105595. }
  105596. var M9;
  105597. function $ht() {
  105598. if (M9) return F$;
  105599. M9 = 1;
  105600. var t = R4().Output, e = vle().Token, n = gle(), r = mle().Options, i = p_().Tokenizer, a = p_().line_starters, o = p_().positionable_operators, s = p_().TOKEN;
  105601. function l(w, P) {
  105602. return P.indexOf(w) !== -1;
  105603. }
  105604. function u(w) {
  105605. return w.replace(/^\s+/g, "");
  105606. }
  105607. function c(w) {
  105608. for (var P = {}, $ = 0; $ < w.length; $++)
  105609. P[w[$].replace(/-/g, "_")] = w[$];
  105610. return P;
  105611. }
  105612. function f(w, P) {
  105613. return w && w.type === s.RESERVED && w.text === P;
  105614. }
  105615. function d(w, P) {
  105616. return w && w.type === s.RESERVED && l(w.text, P);
  105617. }
  105618. 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 = {
  105619. BlockStatement: "BlockStatement",
  105620. // 'BLOCK'
  105621. Statement: "Statement",
  105622. // 'STATEMENT'
  105623. ObjectLiteral: "ObjectLiteral",
  105624. // 'OBJECT',
  105625. ArrayLiteral: "ArrayLiteral",
  105626. //'[EXPRESSION]',
  105627. ForInitializer: "ForInitializer",
  105628. //'(FOR-EXPRESSION)',
  105629. Conditional: "Conditional",
  105630. //'(COND-EXPRESSION)',
  105631. Expression: "Expression"
  105632. //'(EXPRESSION)'
  105633. };
  105634. function y(w, P) {
  105635. P.multiline_frame || P.mode === m.ForInitializer || P.mode === m.Conditional || w.remove_indent(P.start_line_index);
  105636. }
  105637. function b(w) {
  105638. w = w.replace(n.allLineBreaks, `
  105639. `);
  105640. for (var P = [], $ = w.indexOf(`
  105641. `); $ !== -1; )
  105642. P.push(w.substring(0, $)), w = w.substring($ + 1), $ = w.indexOf(`
  105643. `);
  105644. return w.length && P.push(w), P;
  105645. }
  105646. function _(w) {
  105647. return w === m.ArrayLiteral;
  105648. }
  105649. function O(w) {
  105650. return l(w, [m.Expression, m.ForInitializer, m.Conditional]);
  105651. }
  105652. function S(w, P) {
  105653. for (var $ = 0; $ < w.length; $++) {
  105654. var A = w[$].trim();
  105655. if (A.charAt(0) !== P)
  105656. return !1;
  105657. }
  105658. return !0;
  105659. }
  105660. function x(w, P) {
  105661. for (var $ = 0, A = w.length, D; $ < A; $++)
  105662. if (D = w[$], D && D.indexOf(P) !== 0)
  105663. return !1;
  105664. return !0;
  105665. }
  105666. function C(w, P) {
  105667. 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);
  105668. }
  105669. C.prototype.create_flags = function(w, P) {
  105670. var $ = 0;
  105671. w && ($ = w.indentation_level, !this._output.just_added_newline() && w.line_indent_level > $ && ($ = w.line_indent_level));
  105672. var A = {
  105673. mode: P,
  105674. parent: w,
  105675. last_token: w ? w.last_token : new e(s.START_BLOCK, ""),
  105676. // last token text
  105677. last_word: w ? w.last_word : "",
  105678. // last TOKEN.WORD passed
  105679. declaration_statement: !1,
  105680. declaration_assignment: !1,
  105681. multiline_frame: !1,
  105682. inline_frame: !1,
  105683. if_block: !1,
  105684. else_block: !1,
  105685. class_start_block: !1,
  105686. // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
  105687. do_block: !1,
  105688. do_while: !1,
  105689. import_block: !1,
  105690. in_case_statement: !1,
  105691. // switch(..){ INSIDE HERE }
  105692. in_case: !1,
  105693. // we're on the exact line with "case 0:"
  105694. case_body: !1,
  105695. // the indented case-action block
  105696. case_block: !1,
  105697. // the indented case-action block is wrapped with {}
  105698. indentation_level: $,
  105699. alignment: 0,
  105700. line_indent_level: w ? w.line_indent_level : $,
  105701. start_line_index: this._output.get_line_number(),
  105702. ternary_depth: 0
  105703. };
  105704. return A;
  105705. }, C.prototype._reset = function(w) {
  105706. var P = w.match(/^[\t ]*/)[0];
  105707. 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);
  105708. var $ = new i(w, this._options);
  105709. return this._tokens = $.tokenize(), w;
  105710. }, C.prototype.beautify = function() {
  105711. if (this._options.disabled)
  105712. return this._source_text;
  105713. var w, P = this._reset(this._source_text), $ = this._options.eol;
  105714. this._options.eol === "auto" && ($ = `
  105715. `, P && n.lineBreak.test(P || "") && ($ = P.match(n.lineBreak)[0]));
  105716. for (var A = this._tokens.next(); A; )
  105717. this.handle_token(A), this._last_last_text = this._flags.last_token.text, this._flags.last_token = A, A = this._tokens.next();
  105718. return w = this._output.get_code($), w;
  105719. }, C.prototype.handle_token = function(w, P) {
  105720. 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);
  105721. }, C.prototype.handle_whitespace_and_comments = function(w, P) {
  105722. var $ = w.newlines, A = this._options.keep_array_indentation && _(this._flags.mode);
  105723. if (w.comments_before)
  105724. for (var D = w.comments_before.next(); D; )
  105725. this.handle_whitespace_and_comments(D, P), this.handle_token(D, P), D = w.comments_before.next();
  105726. if (A)
  105727. for (var E = 0; E < $; E += 1)
  105728. this.print_newline(E > 0, P);
  105729. else if (this._options.max_preserve_newlines && $ > this._options.max_preserve_newlines && ($ = this._options.max_preserve_newlines), this._options.preserve_newlines && $ > 1) {
  105730. this.print_newline(!1, P);
  105731. for (var R = 1; R < $; R += 1)
  105732. this.print_newline(!0, P);
  105733. }
  105734. };
  105735. var T = ["async", "break", "continue", "return", "throw", "yield"];
  105736. return C.prototype.allow_wrap_or_preserved_newline = function(w, P) {
  105737. if (P = P === void 0 ? !1 : P, !this._output.just_added_newline()) {
  105738. var $ = this._options.preserve_newlines && w.newlines || P, A = l(this._flags.last_token.text, o) || l(w.text, o);
  105739. if (A) {
  105740. var D = l(this._flags.last_token.text, o) && l(this._options.operator_position, g) || l(w.text, o);
  105741. $ = $ && D;
  105742. }
  105743. if ($)
  105744. this.print_newline(!1, !0);
  105745. else if (this._options.wrap_line_length) {
  105746. if (d(this._flags.last_token, T))
  105747. return;
  105748. this._output.set_wrap_point();
  105749. }
  105750. }
  105751. }, C.prototype.print_newline = function(w, P) {
  105752. 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 === "++"))
  105753. for (var $ = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f($, "else")) && !this._flags.do_block; )
  105754. this.restore_mode();
  105755. this._output.add_new_line(w) && (this._flags.multiline_frame = !0);
  105756. }, C.prototype.print_token_line_indentation = function(w) {
  105757. 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));
  105758. }, C.prototype.print_token = function(w) {
  105759. if (this._output.raw) {
  105760. this._output.add_raw_token(w);
  105761. return;
  105762. }
  105763. if (this._options.comma_first && w.previous && w.previous.type === s.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
  105764. var P = this._output.previous_line.pop();
  105765. 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;
  105766. }
  105767. 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);
  105768. }, C.prototype.indent = function() {
  105769. this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  105770. }, C.prototype.deindent = function() {
  105771. 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));
  105772. }, C.prototype.set_mode = function(w) {
  105773. 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);
  105774. }, C.prototype.restore_mode = function() {
  105775. 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));
  105776. }, C.prototype.start_of_object_property = function() {
  105777. 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"]));
  105778. }, C.prototype.start_of_statement = function(w) {
  105779. var P = !1;
  105780. 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(
  105781. w,
  105782. d(w, ["do", "for", "if", "while"])
  105783. ), !0) : !1;
  105784. }, C.prototype.handle_start_expr = function(w) {
  105785. this.start_of_statement(w) || this.handle_whitespace_and_comments(w);
  105786. var P = m.Expression;
  105787. if (w.text === "[") {
  105788. if (this._flags.last_token.type === s.WORD || this._flags.last_token.text === ")") {
  105789. 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);
  105790. return;
  105791. }
  105792. 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);
  105793. } else {
  105794. if (this._flags.last_token.type === s.RESERVED)
  105795. 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);
  105796. else if (this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR)
  105797. this.start_of_object_property() || this.allow_wrap_or_preserved_newline(w);
  105798. else if (this._flags.last_token.type === s.WORD) {
  105799. this._output.space_before_token = !1;
  105800. var $ = this._tokens.peek(-3);
  105801. if (this._options.space_after_named_function && $) {
  105802. var A = this._tokens.peek(-4);
  105803. 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);
  105804. }
  105805. } else
  105806. this.allow_wrap_or_preserved_newline(w);
  105807. (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);
  105808. }
  105809. 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();
  105810. }, C.prototype.handle_end_expr = function(w) {
  105811. for (; this._flags.mode === m.Statement; )
  105812. this.restore_mode();
  105813. this.handle_whitespace_and_comments(w), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
  105814. w,
  105815. w.text === "]" && _(this._flags.mode) && !this._options.keep_array_indentation
  105816. ), 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);
  105817. }, C.prototype.handle_start_block = function(w) {
  105818. this.handle_whitespace_and_comments(w);
  105819. var P = this._tokens.peek(), $ = this._tokens.peek(1);
  105820. 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);
  105821. var A = !P.comments_before && P.text === "}", D = A && this._flags.last_word === "function" && this._flags.last_token.type === s.END_EXPR;
  105822. if (this._options.brace_preserve_inline) {
  105823. var E = 0, R = null;
  105824. this._flags.inline_frame = !0;
  105825. do
  105826. if (E += 1, R = this._tokens.peek(E - 1), R.newlines) {
  105827. this._flags.inline_frame = !1;
  105828. break;
  105829. }
  105830. while (R.type !== s.EOF && !(R.type === s.END_BLOCK && R.opened === w));
  105831. }
  105832. (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();
  105833. }, C.prototype.handle_end_block = function(w) {
  105834. for (this.handle_whitespace_and_comments(w); this._flags.mode === m.Statement; )
  105835. this.restore_mode();
  105836. var P = this._flags.last_token.type === s.START_BLOCK;
  105837. 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);
  105838. }, C.prototype.handle_word = function(w) {
  105839. if (w.type === s.RESERVED) {
  105840. if (l(w.text, ["set", "get"]) && this._flags.mode !== m.ObjectLiteral)
  105841. w.type = s.WORD;
  105842. else if (w.text === "import" && l(this._tokens.peek().text, ["(", "."]))
  105843. w.type = s.WORD;
  105844. else if (l(w.text, ["as", "from"]) && !this._flags.import_block)
  105845. w.type = s.WORD;
  105846. else if (this._flags.mode === m.ObjectLiteral) {
  105847. var P = this._tokens.peek();
  105848. P.text === ":" && (w.type = s.WORD);
  105849. }
  105850. }
  105851. 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)
  105852. if (f(w, "while")) {
  105853. this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0, this._flags.do_while = !0;
  105854. return;
  105855. } else
  105856. this.print_newline(), this._flags.do_block = !1;
  105857. if (this._flags.if_block)
  105858. if (!this._flags.else_block && f(w, "else"))
  105859. this._flags.else_block = !0;
  105860. else {
  105861. for (; this._flags.mode === m.Statement; )
  105862. this.restore_mode();
  105863. this._flags.if_block = !1, this._flags.else_block = !1;
  105864. }
  105865. if (this._flags.in_case_statement && d(w, ["case", "default"])) {
  105866. 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;
  105867. return;
  105868. }
  105869. 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
  105870. (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")) {
  105871. (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;
  105872. return;
  105873. }
  105874. var $ = "NONE";
  105875. 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"]))
  105876. 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)
  105877. this.print_newline();
  105878. else {
  105879. this._output.trim(!0);
  105880. var A = this._output.current_line;
  105881. A.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
  105882. }
  105883. 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);
  105884. 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));
  105885. }, C.prototype.handle_semicolon = function(w) {
  105886. this.start_of_statement(w) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(w);
  105887. for (var P = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(P, "else")) && !this._flags.do_block; )
  105888. this.restore_mode();
  105889. this._flags.import_block && (this._flags.import_block = !1), this.print_token(w);
  105890. }, C.prototype.handle_string = function(w) {
  105891. 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);
  105892. }, C.prototype.handle_equals = function(w) {
  105893. 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;
  105894. }, C.prototype.handle_comma = function(w) {
  105895. 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);
  105896. }, C.prototype.handle_operator = function(w) {
  105897. 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 === ",");
  105898. if (!this.start_of_statement(w)) {
  105899. var A = !P;
  105900. this.handle_whitespace_and_comments(w, A);
  105901. }
  105902. if (w.text === "*" && this._flags.last_token.type === s.DOT) {
  105903. this.print_token(w);
  105904. return;
  105905. }
  105906. if (w.text === "::") {
  105907. this.print_token(w);
  105908. return;
  105909. }
  105910. if (l(w.text, ["-", "+"]) && this.start_of_object_property()) {
  105911. this.print_token(w);
  105912. return;
  105913. }
  105914. 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) {
  105915. 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);
  105916. return;
  105917. }
  105918. var D = !0, E = !0, R = !1;
  105919. 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)) {
  105920. var N = w.text === ":", V = N && R, z = N && !R;
  105921. switch (this._options.operator_position) {
  105922. case v.before_newline:
  105923. this._output.space_before_token = !z, this.print_token(w), (!N || V) && this.allow_wrap_or_preserved_newline(w), this._output.space_before_token = !0;
  105924. return;
  105925. case v.after_newline:
  105926. 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;
  105927. return;
  105928. case v.preserve_newline:
  105929. z || this.allow_wrap_or_preserved_newline(w), D = !(this._output.just_added_newline() || z), this._output.space_before_token = D, this.print_token(w), this._output.space_before_token = !0;
  105930. return;
  105931. }
  105932. }
  105933. if (P) {
  105934. this.allow_wrap_or_preserved_newline(w), D = !1;
  105935. var W = this._tokens.peek();
  105936. E = W && l(W.type, [s.WORD, s.RESERVED]);
  105937. } else if (w.text === "...")
  105938. this.allow_wrap_or_preserved_newline(w), D = this._flags.last_token.type === s.START_BLOCK, E = !1;
  105939. else if (l(w.text, ["--", "++", "!", "~"]) || $) {
  105940. 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 === "~")) {
  105941. var F = d(this._flags.last_token, h) && w.newlines;
  105942. F && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(F, !0);
  105943. }
  105944. 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();
  105945. }
  105946. this._output.space_before_token = this._output.space_before_token || D, this.print_token(w), this._output.space_before_token = E;
  105947. }, C.prototype.handle_block_comment = function(w, P) {
  105948. if (this._output.raw) {
  105949. this._output.add_raw_token(w), w.directives && w.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
  105950. return;
  105951. }
  105952. if (w.directives) {
  105953. this.print_newline(!1, P), this.print_token(w), w.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
  105954. return;
  105955. }
  105956. if (!n.newline.test(w.text) && !w.newlines) {
  105957. this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
  105958. return;
  105959. } else
  105960. this.print_block_commment(w, P);
  105961. }, C.prototype.print_block_commment = function(w, P) {
  105962. var $ = b(w.text), A, D = !1, E = !1, R = w.whitespace_before, N = R.length;
  105963. if (this.print_newline(!1, P), this.print_token_line_indentation(w), this._output.add_token($[0]), this.print_newline(!1, P), $.length > 1) {
  105964. for ($ = $.slice(1), D = S($, "*"), E = x($, R), D && (this._flags.alignment = 1), A = 0; A < $.length; A++)
  105965. 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);
  105966. this._flags.alignment = 0;
  105967. }
  105968. }, C.prototype.handle_comment = function(w, P) {
  105969. 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);
  105970. }, C.prototype.handle_dot = function(w) {
  105971. 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(
  105972. w,
  105973. this._flags.last_token.text === ")" && this._options.break_chained_methods
  105974. ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(w);
  105975. }, C.prototype.handle_unknown = function(w, P) {
  105976. this.print_token(w), w.text[w.text.length - 1] === `
  105977. ` && this.print_newline(!1, P);
  105978. }, C.prototype.handle_eof = function(w) {
  105979. for (; this._flags.mode === m.Statement; )
  105980. this.restore_mode();
  105981. this.handle_whitespace_and_comments(w);
  105982. }, F$.Beautifier = C, F$;
  105983. }
  105984. var I9;
  105985. function Aht() {
  105986. if (I9) return d_.exports;
  105987. I9 = 1;
  105988. var t = $ht().Beautifier, e = mle().Options;
  105989. function n(r, i) {
  105990. var a = new t(r, i);
  105991. return a.beautify();
  105992. }
  105993. return d_.exports = n, d_.exports.defaultOptions = function() {
  105994. return new e();
  105995. }, d_.exports;
  105996. }
  105997. var v_ = { exports: {} }, K$ = {}, J$ = {}, D9;
  105998. function ble() {
  105999. if (D9) return J$;
  106000. D9 = 1;
  106001. var t = k4().Options;
  106002. function e(n) {
  106003. 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);
  106004. var r = this._get_boolean("space_around_selector_separator");
  106005. this.space_around_combinator = this._get_boolean("space_around_combinator") || r;
  106006. var i = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
  106007. this.brace_style = "collapse";
  106008. for (var a = 0; a < i.length; a++)
  106009. i[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = i[a];
  106010. }
  106011. return e.prototype = new t(), J$.Options = e, J$;
  106012. }
  106013. var R9;
  106014. function Eht() {
  106015. if (R9) return K$;
  106016. R9 = 1;
  106017. var t = ble().Options, e = R4().Output, n = L4().InputScanner, r = N4().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;
  106018. function f(d, h) {
  106019. this._source_text = d || "", this._options = new t(h), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
  106020. page: !0,
  106021. "font-face": !0,
  106022. keyframes: !0,
  106023. // also in CONDITIONAL_GROUP_RULE below
  106024. media: !0,
  106025. supports: !0,
  106026. document: !0
  106027. }, this.CONDITIONAL_GROUP_RULE = {
  106028. media: !0,
  106029. supports: !0,
  106030. document: !0
  106031. }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
  106032. "grid-template-areas",
  106033. "grid-template"
  106034. ];
  106035. }
  106036. return f.prototype.eatString = function(d) {
  106037. var h = "";
  106038. for (this._ch = this._input.next(); this._ch; ) {
  106039. if (h += this._ch, this._ch === "\\")
  106040. h += this._input.next();
  106041. else if (d.indexOf(this._ch) !== -1 || this._ch === `
  106042. `)
  106043. break;
  106044. this._ch = this._input.next();
  106045. }
  106046. return h;
  106047. }, f.prototype.eatWhitespace = function(d) {
  106048. for (var h = s.test(this._input.peek()), p = 0; s.test(this._input.peek()); )
  106049. this._ch = this._input.next(), d && this._ch === `
  106050. ` && (p === 0 || p < this._options.max_preserve_newlines) && (p++, this._output.add_new_line(!0));
  106051. return h;
  106052. }, f.prototype.foundNestedPseudoClass = function() {
  106053. for (var d = 0, h = 1, p = this._input.peek(h); p; ) {
  106054. if (p === "{")
  106055. return !0;
  106056. if (p === "(")
  106057. d += 1;
  106058. else if (p === ")") {
  106059. if (d === 0)
  106060. return !1;
  106061. d -= 1;
  106062. } else if (p === ";" || p === "}")
  106063. return !1;
  106064. h++, p = this._input.peek(h);
  106065. }
  106066. return !1;
  106067. }, f.prototype.print_string = function(d) {
  106068. this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(d);
  106069. }, f.prototype.preserveSingleSpace = function(d) {
  106070. d && (this._output.space_before_token = !0);
  106071. }, f.prototype.indent = function() {
  106072. this._indentLevel++;
  106073. }, f.prototype.outdent = function() {
  106074. this._indentLevel > 0 && this._indentLevel--;
  106075. }, f.prototype.beautify = function() {
  106076. if (this._options.disabled)
  106077. return this._source_text;
  106078. var d = this._source_text, h = this._options.eol;
  106079. h === "auto" && (h = `
  106080. `, d && a.test(d || "") && (h = d.match(a)[0])), d = d.replace(o, `
  106081. `);
  106082. var p = d.match(/^[\t ]*/)[0];
  106083. this._output = new e(this._options, p), this._input = new n(d), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
  106084. 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; )
  106085. if (this._ch === "/" && this._input.peek() === "*") {
  106086. this._output.add_new_line(), this._input.back();
  106087. var w = this._input.read(u), P = i.get_directives(w);
  106088. P && P.ignore === "start" && (w += i.readIgnored(this._input)), this.print_string(w), this.eatWhitespace(!0), this._output.add_new_line();
  106089. } else if (this._ch === "/" && this._input.peek() === "/")
  106090. this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(c)), this.eatWhitespace(!0);
  106091. else if (this._ch === "$") {
  106092. this.preserveSingleSpace(C), this.print_string(this._ch);
  106093. var $ = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
  106094. $.match(/[ :]$/) && ($ = this.eatString(": ").replace(/\s+$/, ""), this.print_string($), this._output.space_before_token = !0), v === 0 && $.indexOf(":") !== -1 && (m = !0, this.indent());
  106095. } else if (this._ch === "@")
  106096. if (this.preserveSingleSpace(C), this._input.peek() === "{")
  106097. this.print_string(this._ch + this.eatString("}"));
  106098. else {
  106099. this.print_string(this._ch);
  106100. var A = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
  106101. 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);
  106102. }
  106103. else if (this._ch === "#" && this._input.peek() === "{")
  106104. this.preserveSingleSpace(C), this.print_string(this._ch + this.eatString("}"));
  106105. else if (this._ch === "{")
  106106. 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();
  106107. else if (this._ch === "}")
  106108. 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));
  106109. else if (this._ch === ":") {
  106110. for (var D = 0; D < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; D++)
  106111. if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[D])) {
  106112. S = !0;
  106113. break;
  106114. }
  106115. (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(":"));
  106116. } else if (this._ch === '"' || this._ch === "'") {
  106117. var E = T === '"' || T === "'";
  106118. this.preserveSingleSpace(E || C), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
  106119. } else if (this._ch === ";")
  106120. 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);
  106121. else if (this._ch === "(")
  106122. if (this._input.lookBack("url"))
  106123. 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()));
  106124. else {
  106125. var R = !1;
  106126. 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());
  106127. }
  106128. else if (this._ch === ")")
  106129. 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);
  106130. else if (this._ch === ",")
  106131. 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;
  106132. else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !m && v === 0)
  106133. 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 = ""));
  106134. else if (this._ch === "]")
  106135. this.print_string(this._ch);
  106136. else if (this._ch === "[")
  106137. this.preserveSingleSpace(C), this.print_string(this._ch);
  106138. else if (this._ch === "=")
  106139. this.eatWhitespace(), this.print_string("="), s.test(this._ch) && (this._ch = "");
  106140. else if (this._ch === "!" && !this._input.lookBack("\\"))
  106141. this._output.space_before_token = !0, this.print_string(this._ch);
  106142. else {
  106143. var N = T === '"' || T === "'";
  106144. this.preserveSingleSpace(N || C), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
  106145. ` && S && this._output.add_new_line();
  106146. }
  106147. var V = this._output.get_code(h);
  106148. return V;
  106149. }, K$.Beautifier = f, K$;
  106150. }
  106151. var k9;
  106152. function Mht() {
  106153. if (k9) return v_.exports;
  106154. k9 = 1;
  106155. var t = Eht().Beautifier, e = ble().Options;
  106156. function n(r, i) {
  106157. var a = new t(r, i);
  106158. return a.beautify();
  106159. }
  106160. return v_.exports = n, v_.exports.defaultOptions = function() {
  106161. return new e();
  106162. }, v_.exports;
  106163. }
  106164. var g_ = { exports: {} }, e2 = {}, t2 = {}, L9;
  106165. function _le() {
  106166. if (L9) return t2;
  106167. L9 = 1;
  106168. var t = k4().Options;
  106169. function e(n) {
  106170. 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(
  106171. "wrap_attributes",
  106172. ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
  106173. ), 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", [
  106174. "a",
  106175. "abbr",
  106176. "area",
  106177. "audio",
  106178. "b",
  106179. "bdi",
  106180. "bdo",
  106181. "br",
  106182. "button",
  106183. "canvas",
  106184. "cite",
  106185. "code",
  106186. "data",
  106187. "datalist",
  106188. "del",
  106189. "dfn",
  106190. "em",
  106191. "embed",
  106192. "i",
  106193. "iframe",
  106194. "img",
  106195. "input",
  106196. "ins",
  106197. "kbd",
  106198. "keygen",
  106199. "label",
  106200. "map",
  106201. "mark",
  106202. "math",
  106203. "meter",
  106204. "noscript",
  106205. "object",
  106206. "output",
  106207. "progress",
  106208. "q",
  106209. "ruby",
  106210. "s",
  106211. "samp",
  106212. /* 'script', */
  106213. "select",
  106214. "small",
  106215. "span",
  106216. "strong",
  106217. "sub",
  106218. "sup",
  106219. "svg",
  106220. "template",
  106221. "textarea",
  106222. "time",
  106223. "u",
  106224. "var",
  106225. "video",
  106226. "wbr",
  106227. "text",
  106228. // obsolete inline tags
  106229. "acronym",
  106230. "big",
  106231. "strike",
  106232. "tt"
  106233. ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
  106234. // HTLM void elements - aka self-closing tags - aka singletons
  106235. // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
  106236. "area",
  106237. "base",
  106238. "br",
  106239. "col",
  106240. "embed",
  106241. "hr",
  106242. "img",
  106243. "input",
  106244. "keygen",
  106245. "link",
  106246. "menuitem",
  106247. "meta",
  106248. "param",
  106249. "source",
  106250. "track",
  106251. "wbr",
  106252. // NOTE: Optional tags are too complex for a simple list
  106253. // they are hard coded in _do_optional_end_element
  106254. // Doctype and xml elements
  106255. "!doctype",
  106256. "?xml",
  106257. // obsolete tags
  106258. // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
  106259. // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
  106260. "basefont",
  106261. "isindex"
  106262. ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
  106263. "pre",
  106264. "textarea"
  106265. ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
  106266. }
  106267. return e.prototype = new t(), t2.Options = e, t2;
  106268. }
  106269. var m_ = {}, N9;
  106270. function B9() {
  106271. if (N9) return m_;
  106272. N9 = 1;
  106273. var t = CS().Tokenizer, e = CS().TOKEN, n = N4().Directives, r = yle().TemplatablePattern, i = Qw().Pattern, a = {
  106274. TAG_OPEN: "TK_TAG_OPEN",
  106275. TAG_CLOSE: "TK_TAG_CLOSE",
  106276. CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
  106277. CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
  106278. ATTRIBUTE: "TK_ATTRIBUTE",
  106279. EQUALS: "TK_EQUALS",
  106280. VALUE: "TK_VALUE",
  106281. COMMENT: "TK_COMMENT",
  106282. TEXT: "TK_TEXT",
  106283. UNKNOWN: "TK_UNKNOWN",
  106284. START: e.START,
  106285. RAW: e.RAW,
  106286. EOF: e.EOF
  106287. }, o = new n(/<\!--/, /-->/), s = function(l, u) {
  106288. t.call(this, l, u), this._current_tag_name = "";
  106289. var c = new r(this._input).read_options(this._options), f = new i(this._input);
  106290. if (this.__patterns = {
  106291. word: c.until(/[\n\r\t <]/),
  106292. word_control_flow_close_excluded: c.until(/[\n\r\t <}]/),
  106293. single_quote: c.until_after(/'/),
  106294. double_quote: c.until_after(/"/),
  106295. attribute: c.until(/[\n\r\t =>]|\/>/),
  106296. element_name: c.until(/[\n\r\t >\/]/),
  106297. angular_control_flow_start: f.matching(/\@[a-zA-Z]+[^({]*[({]/),
  106298. handlebars_comment: f.starting_with(/{{!--/).until_after(/--}}/),
  106299. handlebars: f.starting_with(/{{/).until_after(/}}/),
  106300. handlebars_open: f.until(/[\n\r\t }]/),
  106301. handlebars_raw_close: f.until(/}}/),
  106302. comment: f.starting_with(/<!--/).until_after(/-->/),
  106303. cdata: f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
  106304. // https://en.wikipedia.org/wiki/Conditional_comment
  106305. conditional_comment: f.starting_with(/<!\[/).until_after(/]>/),
  106306. processing: f.starting_with(/<\?/).until_after(/\?>/)
  106307. }, 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) {
  106308. var d = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
  106309. this.__patterns.unformatted_content_delimiter = f.matching(d).until_after(d);
  106310. }
  106311. };
  106312. return s.prototype = new t(), s.prototype._is_comment = function(l) {
  106313. return !1;
  106314. }, s.prototype._is_opening = function(l) {
  106315. return l.type === a.TAG_OPEN || l.type === a.CONTROL_FLOW_OPEN;
  106316. }, s.prototype._is_closing = function(l, u) {
  106317. 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("{");
  106318. }, s.prototype._reset = function() {
  106319. this._current_tag_name = "";
  106320. }, s.prototype._get_next_token = function(l, u) {
  106321. var c = null;
  106322. this._readWhitespace();
  106323. var f = this._input.peek();
  106324. 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);
  106325. }, s.prototype._read_comment_or_cdata = function(l) {
  106326. var u = null, c = null, f = null;
  106327. if (l === "<") {
  106328. var d = this._input.peek(1);
  106329. 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);
  106330. }
  106331. return u;
  106332. }, s.prototype._read_processing = function(l) {
  106333. var u = null, c = null, f = null;
  106334. if (l === "<") {
  106335. var d = this._input.peek(1);
  106336. (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);
  106337. }
  106338. return u;
  106339. }, s.prototype._read_open = function(l, u) {
  106340. var c = null, f = null;
  106341. 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;
  106342. }, s.prototype._read_open_handlebars = function(l, u) {
  106343. var c = null, f = null;
  106344. 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;
  106345. }, s.prototype._read_control_flows = function(l, u) {
  106346. var c = "", f = null;
  106347. if (!this._options.templating.includes("angular") || !this._options.indent_handlebars)
  106348. return f;
  106349. if (l === "@") {
  106350. if (c = this.__patterns.angular_control_flow_start.read(), c === "")
  106351. return f;
  106352. for (var d = c.endsWith("(") ? 1 : 0, h = 0; !(c.endsWith("{") && d === h); ) {
  106353. var p = this._input.next();
  106354. if (p === null)
  106355. break;
  106356. p === "(" ? d++ : p === ")" && h++, c += p;
  106357. }
  106358. f = this._create_token(a.CONTROL_FLOW_OPEN, c);
  106359. } else l === "}" && u && u.type === a.CONTROL_FLOW_OPEN && (c = this._input.next(), f = this._create_token(a.CONTROL_FLOW_CLOSE, c));
  106360. return f;
  106361. }, s.prototype._read_close = function(l, u) {
  106362. var c = null, f = null;
  106363. 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;
  106364. }, s.prototype._read_attribute = function(l, u, c) {
  106365. var f = null, d = "";
  106366. if (c && c.text[0] === "<")
  106367. if (l === "=")
  106368. f = this._create_token(a.EQUALS, this._input.next());
  106369. else if (l === '"' || l === "'") {
  106370. var h = this._input.next();
  106371. l === '"' ? h += this.__patterns.double_quote.read() : h += this.__patterns.single_quote.read(), f = this._create_token(a.VALUE, h);
  106372. } else
  106373. d = this.__patterns.attribute.read(), d && (u.type === a.EQUALS ? f = this._create_token(a.VALUE, d) : f = this._create_token(a.ATTRIBUTE, d));
  106374. return f;
  106375. }, s.prototype._is_content_unformatted = function(l) {
  106376. return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
  106377. }, s.prototype._read_raw_content = function(l, u, c) {
  106378. var f = "";
  106379. if (c && c.text[0] === "{")
  106380. f = this.__patterns.handlebars_raw_close.read();
  106381. else if (u.type === a.TAG_CLOSE && u.opened.text[0] === "<" && u.text[0] !== "/") {
  106382. var d = u.opened.text.substr(1).toLowerCase();
  106383. if (d === "script" || d === "style") {
  106384. var h = this._read_comment_or_cdata(l);
  106385. if (h)
  106386. return h.type = a.TEXT, h;
  106387. f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig"));
  106388. } else this._is_content_unformatted(d) && (f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig")));
  106389. }
  106390. return f ? this._create_token(a.TEXT, f) : null;
  106391. }, s.prototype._read_content_word = function(l, u) {
  106392. var c = "";
  106393. 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)
  106394. return this._create_token(a.TEXT, c);
  106395. }, m_.Tokenizer = s, m_.TOKEN = a, m_;
  106396. }
  106397. var z9;
  106398. function Iht() {
  106399. if (z9) return e2;
  106400. z9 = 1;
  106401. var t = _le().Options, e = R4().Output, n = B9().Tokenizer, r = B9().TOKEN, i = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, o = function(g, m) {
  106402. 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);
  106403. };
  106404. o.prototype.current_line_has_match = function(g) {
  106405. return this._output.current_line.has_match(g);
  106406. }, o.prototype.set_space_before_token = function(g, m) {
  106407. this._output.space_before_token = g, this._output.non_breaking_space = m;
  106408. }, o.prototype.set_wrap_point = function() {
  106409. this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
  106410. }, o.prototype.add_raw_token = function(g) {
  106411. this._output.add_raw_token(g);
  106412. }, o.prototype.print_preserved_newlines = function(g) {
  106413. var m = 0;
  106414. 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);
  106415. for (var y = 0; y < m; y++)
  106416. this.print_newline(y > 0);
  106417. return m !== 0;
  106418. }, o.prototype.traverse_whitespace = function(g) {
  106419. return g.whitespace_before || g.newlines ? (this.print_preserved_newlines(g) || (this._output.space_before_token = !0), !0) : !1;
  106420. }, o.prototype.previous_token_wrapped = function() {
  106421. return this._output.previous_token_wrapped;
  106422. }, o.prototype.print_newline = function(g) {
  106423. this._output.add_new_line(g);
  106424. }, o.prototype.print_token = function(g) {
  106425. g.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(g.text));
  106426. }, o.prototype.indent = function() {
  106427. this.indent_level++;
  106428. }, o.prototype.deindent = function() {
  106429. this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
  106430. }, o.prototype.get_full_indent = function(g) {
  106431. return g = this.indent_level + (g || 0), g < 1 ? "" : this._output.get_indent_string(g);
  106432. };
  106433. var s = function(g) {
  106434. for (var m = null, y = g.next; y.type !== r.EOF && g.closed !== y; ) {
  106435. if (y.type === r.ATTRIBUTE && y.text === "type") {
  106436. y.next && y.next.type === r.EQUALS && y.next.next && y.next.next.type === r.VALUE && (m = y.next.next.text);
  106437. break;
  106438. }
  106439. y = y.next;
  106440. }
  106441. return m;
  106442. }, l = function(g, m) {
  106443. var y = null, b = null;
  106444. 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;
  106445. };
  106446. function u(g, m) {
  106447. return m.indexOf(g) !== -1;
  106448. }
  106449. function c(g, m, y) {
  106450. this.parent = g || null, this.tag = m ? m.tag_name : "", this.indent_level = y || 0, this.parser_token = m || null;
  106451. }
  106452. function f(g) {
  106453. this._printer = g, this._current_frame = null;
  106454. }
  106455. f.prototype.get_parser_token = function() {
  106456. return this._current_frame ? this._current_frame.parser_token : null;
  106457. }, f.prototype.record_tag = function(g) {
  106458. var m = new c(this._current_frame, g, this._printer.indent_level);
  106459. this._current_frame = m;
  106460. }, f.prototype._try_pop_frame = function(g) {
  106461. var m = null;
  106462. return g && (m = g.parser_token, this._printer.indent_level = g.indent_level, this._current_frame = g.parent), m;
  106463. }, f.prototype._get_frame = function(g, m) {
  106464. for (var y = this._current_frame; y && g.indexOf(y.tag) === -1; ) {
  106465. if (m && m.indexOf(y.tag) !== -1) {
  106466. y = null;
  106467. break;
  106468. }
  106469. y = y.parent;
  106470. }
  106471. return y;
  106472. }, f.prototype.try_pop = function(g, m) {
  106473. var y = this._get_frame([g], m);
  106474. return this._try_pop_frame(y);
  106475. }, f.prototype.indent_to_tag = function(g) {
  106476. var m = this._get_frame(g);
  106477. m && (this._printer.indent_level = m.indent_level);
  106478. };
  106479. function d(g, m, y, b) {
  106480. this._source_text = g || "", m = m || {}, this._js_beautify = y, this._css_beautify = b, this._tag_stack = null;
  106481. var _ = new t(m, "html");
  106482. 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";
  106483. }
  106484. d.prototype.beautify = function() {
  106485. if (this._options.disabled)
  106486. return this._source_text;
  106487. var g = this._source_text, m = this._options.eol;
  106488. this._options.eol === "auto" && (m = `
  106489. `, g && i.test(g) && (m = g.match(i)[0])), g = g.replace(a, `
  106490. `);
  106491. var y = g.match(/^[\t ]*/)[0], b = {
  106492. text: "",
  106493. type: ""
  106494. }, _ = new h(), O = new o(this._options, y), S = new n(g, this._options).tokenize();
  106495. this._tag_stack = new f(O);
  106496. for (var x = null, C = S.next(); C.type !== r.EOF; )
  106497. 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();
  106498. var T = O._output.get_code(m);
  106499. return T;
  106500. }, d.prototype._handle_control_flow_open = function(g, m) {
  106501. var y = {
  106502. text: m.text,
  106503. type: m.type
  106504. };
  106505. 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;
  106506. }, d.prototype._handle_control_flow_close = function(g, m) {
  106507. var y = {
  106508. text: m.text,
  106509. type: m.type
  106510. };
  106511. 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;
  106512. }, d.prototype._handle_tag_close = function(g, m, y) {
  106513. var b = {
  106514. text: m.text,
  106515. type: m.type
  106516. };
  106517. 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;
  106518. }, d.prototype._handle_inside_tag = function(g, m, y, b) {
  106519. var _ = y.has_wrapped_attrs, O = {
  106520. text: m.text,
  106521. type: m.type
  106522. };
  106523. 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
  106524. 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;
  106525. }, d.prototype._handle_text = function(g, m, y) {
  106526. var b = {
  106527. text: m.text,
  106528. type: "TK_CONTENT"
  106529. };
  106530. 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;
  106531. }, d.prototype._print_custom_beatifier_text = function(g, m, y) {
  106532. var b = this;
  106533. if (m.text !== "") {
  106534. var _ = m.text, O, S = 1, x = "", C = "";
  106535. 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) {
  106536. var R = new d(D, E, b._js_beautify, b._css_beautify);
  106537. return R.beautify();
  106538. }), this._options.indent_scripts === "keep" ? S = 0 : this._options.indent_scripts === "separate" && (S = -g.indent_level);
  106539. var T = g.get_full_indent(S);
  106540. if (_ = _.replace(/\n[ \t]*$/, ""), y.custom_beautifier_name !== "html" && _[0] === "<" && _.match(/^(<!--|<!\[CDATA\[)/)) {
  106541. var w = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(_);
  106542. if (!w) {
  106543. g.add_raw_token(m);
  106544. return;
  106545. }
  106546. x = T + w[1] + `
  106547. `, _ = w[4], w[5] && (C = T + w[5]), _ = _.replace(/\n[ \t]*$/, ""), (w[2] || w[3].indexOf(`
  106548. `) !== -1) && (w = w[3].match(/[ \t]+$/), w && (m.whitespace_before = w[0]));
  106549. }
  106550. if (_)
  106551. if (O) {
  106552. var P = function() {
  106553. this.eol = `
  106554. `;
  106555. };
  106556. P.prototype = this._options.raw_options;
  106557. var $ = new P();
  106558. _ = O(T + _, $);
  106559. } else {
  106560. var A = m.whitespace_before;
  106561. A && (_ = _.replace(new RegExp(`
  106562. (` + A + ")?", "g"), `
  106563. `)), _ = T + _.replace(/\n/g, `
  106564. ` + T);
  106565. }
  106566. x && (_ ? _ = x + _ + `
  106567. ` + C : _ = x + C), g.print_newline(!1), _ && (m.text = _, m.whitespace_before = "", m.newlines = 0, g.add_raw_token(m), g.print_newline(!0));
  106568. }
  106569. }, d.prototype._handle_tag_open = function(g, m, y, b, _) {
  106570. var O = this._get_tag_open_token(m);
  106571. 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) {
  106572. var S = 0, x;
  106573. do
  106574. x = _.peek(S), x.type === r.ATTRIBUTE && (O.attr_count += 1), S += 1;
  106575. while (x.type !== r.EOF && x.type !== r.TAG_CLOSE);
  106576. }
  106577. 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;
  106578. };
  106579. var h = function(g, m) {
  106580. 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)
  106581. this.tag_complete = !0;
  106582. else {
  106583. var y;
  106584. 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 === "/>";
  106585. var b = 2;
  106586. 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)));
  106587. }
  106588. };
  106589. d.prototype._get_tag_open_token = function(g) {
  106590. var m = new h(this._tag_stack.get_parser_token(), g);
  106591. 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;
  106592. }, d.prototype._set_tag_position = function(g, m, y, b, _) {
  106593. 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) {
  106594. if (y.tag_start_char === "{" && y.tag_check === "else") {
  106595. this._tag_stack.indent_to_tag(["if", "unless", "each"]), y.indent_content = !0;
  106596. var O = g.current_line_has_match(/{{#if/);
  106597. O || g.print_newline(!1);
  106598. }
  106599. y.tag_name === "!--" && _.type === r.TAG_CLOSE && b.is_end_tag && y.text.indexOf(`
  106600. `) === -1 || (y.is_inline_element || y.is_unformatted || g.print_newline(!1), this._calcluate_parent_multiline(g, y));
  106601. } else if (y.is_end_tag) {
  106602. var S = !1;
  106603. 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);
  106604. } else
  106605. 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);
  106606. }, d.prototype._calcluate_parent_multiline = function(g, m) {
  106607. m.parent && g._output.just_added_newline() && !((m.is_inline_element || m.is_unformatted) && m.parent.is_inline_element) && (m.parent.multiline_content = !0);
  106608. };
  106609. 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"];
  106610. return d.prototype._do_optional_end_element = function(g) {
  106611. var m = null;
  106612. if (!(g.is_empty_element || !g.is_start_tag || !g.parent)) {
  106613. if (g.tag_name === "body")
  106614. m = m || this._tag_stack.try_pop("head");
  106615. else if (g.tag_name === "li")
  106616. m = m || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
  106617. else if (g.tag_name === "dd" || g.tag_name === "dt")
  106618. m = m || this._tag_stack.try_pop("dt", ["dl"]), m = m || this._tag_stack.try_pop("dd", ["dl"]);
  106619. else if (g.parent.tag_name === "p" && p.indexOf(g.tag_name) !== -1) {
  106620. var y = g.parent.parent;
  106621. (!y || v.indexOf(y.tag_name) === -1) && (m = m || this._tag_stack.try_pop("p"));
  106622. } 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"]));
  106623. return g.parent = this._tag_stack.get_parser_token(), m;
  106624. }
  106625. }, e2.Beautifier = d, e2;
  106626. }
  106627. var V9;
  106628. function Dht() {
  106629. if (V9) return g_.exports;
  106630. V9 = 1;
  106631. var t = Iht().Beautifier, e = _le().Options;
  106632. function n(r, i, a, o) {
  106633. var s = new t(r, i, a, o);
  106634. return s.beautify();
  106635. }
  106636. return g_.exports = n, g_.exports.defaultOptions = function() {
  106637. return new e();
  106638. }, g_.exports;
  106639. }
  106640. var F9;
  106641. function Rht() {
  106642. if (F9) return Rv;
  106643. F9 = 1;
  106644. var t = Aht(), e = Mht(), n = Dht();
  106645. function r(i, a, o, s) {
  106646. return o = o || t, s = s || e, n(i, a, o, s);
  106647. }
  106648. return r.defaultOptions = n.defaultOptions, Rv.js = t, Rv.css = e, Rv.html = r, Rv;
  106649. }
  106650. (function(t) {
  106651. function e(n, r, i) {
  106652. var a = function(o, s) {
  106653. return n.js_beautify(o, s);
  106654. };
  106655. 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;
  106656. }
  106657. (function(n) {
  106658. var r = Rht();
  106659. r.js_beautify = r.js, r.css_beautify = r.css, r.html_beautify = r.html, n.exports = e(r, r, r);
  106660. })(t);
  106661. })(ple);
  106662. var kht = ple.exports;
  106663. const Lht = /* @__PURE__ */ vx(kht), Nht = /* @__PURE__ */ te({
  106664. __name: "Editor",
  106665. props: {
  106666. code: {
  106667. type: String,
  106668. default: ""
  106669. }
  106670. },
  106671. emits: ["update:code", "change"],
  106672. setup(t, { emit: e }) {
  106673. const n = t, r = e, i = U(null), a = U(n.code);
  106674. se(
  106675. () => n.code,
  106676. (s) => {
  106677. a.value = Lht.js(s, { indent_size: 2 });
  106678. },
  106679. { immediate: !0 }
  106680. );
  106681. const o = (s) => {
  106682. try {
  106683. r("update:code", s), r("change", s);
  106684. } catch (l) {
  106685. console.error(l);
  106686. return;
  106687. }
  106688. };
  106689. return (s, l) => (pe(), je(B(vdt), {
  106690. ref_key: "editorRef",
  106691. ref: i,
  106692. placeholder: "请输入",
  106693. style: { height: "500px" },
  106694. "model-value": a.value,
  106695. "tab-size": 2,
  106696. "auto-focus": !0,
  106697. "indent-with-tabs": !0,
  106698. extensions: [
  106699. B(Tdt),
  106700. B(yht)(),
  106701. B(Cht)()
  106702. ],
  106703. onChange: o
  106704. }, null, 8, ["model-value", "extensions"]));
  106705. }
  106706. }), Bht = /* @__PURE__ */ te({
  106707. __name: "index",
  106708. props: {
  106709. title: { default: "编辑" },
  106710. width: { default: 800 }
  106711. },
  106712. emits: ["ok"],
  106713. setup(t, { expose: e, emit: n }) {
  106714. const r = n, i = U(!1), a = U(""), o = () => {
  106715. r("ok", a.value), i.value = !1;
  106716. };
  106717. return e({
  106718. open: (s) => {
  106719. i.value = !0, a.value = s;
  106720. },
  106721. close: () => {
  106722. i.value = !1;
  106723. }
  106724. }), (s, l) => (pe(), je(B(Hi), {
  106725. open: i.value,
  106726. "onUpdate:open": l[1] || (l[1] = (u) => i.value = u),
  106727. title: s.title,
  106728. width: s.width,
  106729. onOk: o
  106730. }, {
  106731. default: we(() => [
  106732. M(Nht, {
  106733. code: a.value,
  106734. "onUpdate:code": l[0] || (l[0] = (u) => a.value = u)
  106735. }, null, 8, ["code"])
  106736. ]),
  106737. _: 1
  106738. }, 8, ["open", "title", "width"]));
  106739. }
  106740. }), zht = /* @__PURE__ */ He("span", { class: "text-gray-500" }, "秒", -1), B4 = /* @__PURE__ */ te({
  106741. __name: "DataConfig",
  106742. props: {
  106743. dataSource: {}
  106744. },
  106745. emits: ["change"],
  106746. setup(t, { emit: e }) {
  106747. const n = e, r = t, i = U({
  106748. sourceType: Ri.STATIC,
  106749. // 静态数据相关
  106750. data: "",
  106751. // 接口相关
  106752. url: "",
  106753. method: "",
  106754. params: {},
  106755. headers: {},
  106756. refreshTime: 0,
  106757. // 数据处理
  106758. dataProcess: ""
  106759. }), a = (c) => {
  106760. i.value.refreshTime = c === 0 || c >= 60 ? c : 60;
  106761. };
  106762. let o;
  106763. const s = U(null), l = (c) => {
  106764. var f;
  106765. o = c, (f = s.value) == null || f.open(JSON.stringify(i.value[c]));
  106766. }, u = (c) => {
  106767. i.value[o] = JSON.parse(c);
  106768. };
  106769. return se(
  106770. () => r.dataSource,
  106771. (c) => {
  106772. Object.assign(i.value, c || {});
  106773. },
  106774. { immediate: !0 }
  106775. ), se(
  106776. () => i.value,
  106777. (c) => {
  106778. n("change", c);
  106779. },
  106780. { deep: !0 }
  106781. ), (c, f) => (pe(), Qe(wt, null, [
  106782. M(B(dr), {
  106783. size: "small",
  106784. layout: "horizontal",
  106785. model: i.value,
  106786. "label-col": { span: 8 },
  106787. "wrapper-col": { span: 16 }
  106788. }, {
  106789. default: we(() => [
  106790. M(B(dr).Item, {
  106791. label: "类型",
  106792. name: "sourceType"
  106793. }, {
  106794. default: we(() => [
  106795. M(B(ci), {
  106796. value: i.value.sourceType,
  106797. "onUpdate:value": f[0] || (f[0] = (d) => i.value.sourceType = d)
  106798. }, {
  106799. default: we(() => [
  106800. M(B(M1), {
  106801. value: B(Ri).STATIC
  106802. }, {
  106803. default: we(() => [
  106804. Kt("静态数据")
  106805. ]),
  106806. _: 1
  106807. }, 8, ["value"]),
  106808. M(B(M1), {
  106809. value: B(Ri).API
  106810. }, {
  106811. default: we(() => [
  106812. Kt("动态数据")
  106813. ]),
  106814. _: 1
  106815. }, 8, ["value"])
  106816. ]),
  106817. _: 1
  106818. }, 8, ["value"])
  106819. ]),
  106820. _: 1
  106821. }),
  106822. i.value.sourceType === B(Ri).STATIC ? (pe(), je(B(dr).Item, {
  106823. key: 0,
  106824. label: "数据",
  106825. name: "data"
  106826. }, {
  106827. default: we(() => [
  106828. M(B(Ur), {
  106829. type: "default",
  106830. size: "small",
  106831. onClick: f[1] || (f[1] = (d) => l("data"))
  106832. }, {
  106833. default: we(() => [
  106834. Kt("编辑")
  106835. ]),
  106836. _: 1
  106837. })
  106838. ]),
  106839. _: 1
  106840. })) : i.value.sourceType === B(Ri).API ? (pe(), Qe(wt, { key: 1 }, [
  106841. M(B(dr).Item, {
  106842. label: "接口地址",
  106843. name: "url"
  106844. }, {
  106845. default: we(() => [
  106846. M(B(Hn).TextArea, {
  106847. "auto-size": { minRows: 5 },
  106848. placeholder: "请输入接口地址",
  106849. value: i.value.url,
  106850. "onUpdate:value": f[2] || (f[2] = (d) => i.value.url = d)
  106851. }, null, 8, ["value"])
  106852. ]),
  106853. _: 1
  106854. }),
  106855. M(B(dr).Item, {
  106856. label: "请求方式",
  106857. name: "method"
  106858. }, {
  106859. default: we(() => [
  106860. M(B(vf), {
  106861. value: i.value.method,
  106862. "onUpdate:value": f[3] || (f[3] = (d) => i.value.method = d)
  106863. }, {
  106864. default: we(() => [
  106865. M(B(fi), { value: "GET" }, {
  106866. default: we(() => [
  106867. Kt("GET")
  106868. ]),
  106869. _: 1
  106870. }),
  106871. M(B(fi), { value: "POST" }, {
  106872. default: we(() => [
  106873. Kt("POST")
  106874. ]),
  106875. _: 1
  106876. })
  106877. ]),
  106878. _: 1
  106879. }, 8, ["value"])
  106880. ]),
  106881. _: 1
  106882. }),
  106883. M(B(dr).Item, {
  106884. label: "刷新时间",
  106885. name: "refreshTime"
  106886. }, {
  106887. default: we(() => [
  106888. M(B(O0), {
  106889. value: i.value.refreshTime,
  106890. "onUpdate:value": f[4] || (f[4] = (d) => i.value.refreshTime = d),
  106891. step: 1,
  106892. style: { width: "100%" },
  106893. onChange: a
  106894. }, {
  106895. addonAfter: we(() => [
  106896. zht
  106897. ]),
  106898. _: 1
  106899. }, 8, ["value"])
  106900. ]),
  106901. _: 1
  106902. }),
  106903. M(B(dr).Item, {
  106904. label: "请求参数",
  106905. name: "params"
  106906. }, {
  106907. default: we(() => [
  106908. M(B(Ur), {
  106909. type: "default",
  106910. size: "small",
  106911. onClick: f[5] || (f[5] = (d) => l("params"))
  106912. }, {
  106913. default: we(() => [
  106914. Kt("编辑")
  106915. ]),
  106916. _: 1
  106917. })
  106918. ]),
  106919. _: 1
  106920. }),
  106921. M(B(dr).Item, {
  106922. label: "请求头",
  106923. name: "headers"
  106924. }, {
  106925. default: we(() => [
  106926. M(B(Ur), {
  106927. type: "default",
  106928. size: "small",
  106929. onClick: f[6] || (f[6] = (d) => l("headers"))
  106930. }, {
  106931. default: we(() => [
  106932. Kt("编辑")
  106933. ]),
  106934. _: 1
  106935. })
  106936. ]),
  106937. _: 1
  106938. }),
  106939. M(B(dr).Item, {
  106940. label: "数据处理",
  106941. name: "dataProcess"
  106942. }, {
  106943. default: we(() => [
  106944. M(B(Ur), {
  106945. type: "default",
  106946. size: "small",
  106947. onClick: f[7] || (f[7] = (d) => l("dataProcess"))
  106948. }, {
  106949. default: we(() => [
  106950. Kt("编辑")
  106951. ]),
  106952. _: 1
  106953. })
  106954. ]),
  106955. _: 1
  106956. })
  106957. ], 64)) : _t("", !0)
  106958. ]),
  106959. _: 1
  106960. }, 8, ["model"]),
  106961. M(B(Bht), {
  106962. ref_key: "codeEditorRef",
  106963. ref: s,
  106964. title: "编辑数据",
  106965. onOk: u
  106966. }, null, 512)
  106967. ], 64));
  106968. }
  106969. }), In = {
  106970. /* 标题 */
  106971. title: {
  106972. label: "标题",
  106973. prop: "title",
  106974. type: "group",
  106975. children: [
  106976. {
  106977. label: " ",
  106978. prop: "title.show",
  106979. type: "checkboxGroup",
  106980. fieldProps: {
  106981. options: [{ label: "标题可见", value: !0 }]
  106982. },
  106983. defaultValue: [],
  106984. format: (t, e) => {
  106985. t.value["title.show"] = !!(e != null && e.length);
  106986. },
  106987. valueToForm: (t) => t ? [!0] : []
  106988. },
  106989. {
  106990. type: "dependency",
  106991. label: "",
  106992. prop: "",
  106993. name: ["title.show"],
  106994. children: (t) => t["title.show"].length ? [
  106995. {
  106996. label: "文本",
  106997. prop: "title.text",
  106998. type: "input",
  106999. defaultValue: "图表标题"
  107000. },
  107001. {
  107002. label: "位置",
  107003. prop: "title.left",
  107004. type: "position",
  107005. defaultValue: "center"
  107006. },
  107007. {
  107008. label: "样式",
  107009. prop: "title.textStyle",
  107010. type: "fontStyle",
  107011. defaultValue: {
  107012. color: "#ffffffff",
  107013. size: 18,
  107014. bold: !0,
  107015. italic: !1
  107016. },
  107017. format: (e, n) => {
  107018. e.value["title.textStyle"] = {
  107019. color: n.color,
  107020. fontSize: n.size,
  107021. fontWeight: n.bold ? "bold" : "normal",
  107022. fontStyle: n.italic ? "italic" : "normal"
  107023. };
  107024. },
  107025. valueToForm: (e, n) => ({
  107026. color: kt(n, "title.textStyle.color", "#FFFFFF"),
  107027. size: kt(n, "title.textStyle.size", 16),
  107028. bold: kt(n, "title.textStyle.fontWeight") === "bold",
  107029. italic: kt(n, "title.textStyle.fontStyle") === "italic"
  107030. })
  107031. },
  107032. {
  107033. label: "背景",
  107034. prop: "",
  107035. type: "divider"
  107036. },
  107037. {
  107038. label: "填充",
  107039. prop: "title.backgroundColor",
  107040. type: "backgroundSelect",
  107041. fieldProps: {
  107042. filterOptions: ["image"]
  107043. },
  107044. defaultValue: {
  107045. type: "color",
  107046. color: "#FFFFFF00"
  107047. },
  107048. format: (e, n) => {
  107049. e.value["title.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107050. },
  107051. valueToForm: (e) => !e || e === "none" ? {
  107052. type: "none",
  107053. color: "#000000ff"
  107054. } : {
  107055. type: "color",
  107056. color: e.color
  107057. }
  107058. },
  107059. {
  107060. label: "圆角",
  107061. prop: "title.borderRadius",
  107062. type: "inputNumber",
  107063. fieldProps: {
  107064. addonAfter: "px"
  107065. },
  107066. defaultValue: 0
  107067. }
  107068. ] : []
  107069. }
  107070. ]
  107071. },
  107072. /* 图例 */
  107073. legend: {
  107074. label: "图例",
  107075. prop: "legend",
  107076. type: "group",
  107077. children: [
  107078. {
  107079. label: " ",
  107080. prop: "legend.show",
  107081. type: "checkboxGroup",
  107082. fieldProps: {
  107083. options: [{ label: "图例可见", value: !0 }]
  107084. },
  107085. defaultValue: [!0],
  107086. format: (t, e) => {
  107087. t.value["legend.show"] = !!(e != null && e.length);
  107088. },
  107089. valueToForm: (t) => t ? [!0] : []
  107090. },
  107091. {
  107092. type: "dependency",
  107093. label: "",
  107094. prop: "",
  107095. name: ["legend.show"],
  107096. children: (t) => t["legend.show"].length ? [
  107097. {
  107098. label: "位置",
  107099. prop: "legend.position",
  107100. type: "position",
  107101. fieldProps: {
  107102. type: "round"
  107103. },
  107104. defaultValue: "top",
  107105. format: (e, n) => {
  107106. switch (["left", "right"].includes(n) ? e.value["legend.orient"] = "vertical" : e.value["legend.orient"] = "horizontal", n) {
  107107. case "bottom":
  107108. e.value["legend.top"] = "auto", e.value["legend.right"] = "auto", e.value["legend.bottom"] = 8, e.value["legend.left"] = "center";
  107109. break;
  107110. case "left":
  107111. e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.left"] = 8, e.value["legend.top"] = "center";
  107112. break;
  107113. case "right":
  107114. e.value["legend.bottom"] = "auto", e.value["legend.left"] = "auto", e.value["legend.right"] = 8, e.value["legend.top"] = "center";
  107115. break;
  107116. default:
  107117. e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.top"] = 32, e.value["legend.left"] = "center";
  107118. }
  107119. },
  107120. 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"
  107121. },
  107122. {
  107123. label: "样式",
  107124. prop: "legend.textStyle",
  107125. type: "fontStyle",
  107126. defaultValue: {
  107127. color: "#000000ff",
  107128. size: 12,
  107129. bold: !1,
  107130. italic: !1
  107131. },
  107132. format: (e, n) => {
  107133. e.value["legend.textStyle"] = {
  107134. color: n.color,
  107135. fontSize: n.size,
  107136. fontWeight: n.bold ? "bold" : "normal",
  107137. fontStyle: n.italic ? "italic" : "normal"
  107138. };
  107139. },
  107140. valueToForm: (e, n) => ({
  107141. color: kt(n, "legend.textStyle.color", "#000000ff"),
  107142. size: kt(n, "legend.textStyle.fontSize", 12),
  107143. bold: kt(n, "legend.textStyle.fontWeight") === "bold",
  107144. italic: kt(n, "legend.textStyle.fontStyle") === "italic"
  107145. })
  107146. },
  107147. {
  107148. label: "边框",
  107149. prop: "",
  107150. type: "divider"
  107151. },
  107152. {
  107153. label: "线宽",
  107154. prop: "legend.borderWidth",
  107155. type: "inputNumber",
  107156. fieldProps: {
  107157. addonAfter: "px"
  107158. },
  107159. defaultValue: 0
  107160. },
  107161. {
  107162. label: "颜色",
  107163. prop: "legend.borderColor",
  107164. type: "colorSelect",
  107165. defaultValue: "#ccc"
  107166. },
  107167. {
  107168. label: "圆角",
  107169. prop: "legend.borderRadius",
  107170. type: "inputNumber",
  107171. fieldProps: {
  107172. addonAfter: "px"
  107173. },
  107174. defaultValue: 0
  107175. },
  107176. {
  107177. label: "背景",
  107178. prop: "",
  107179. type: "divider"
  107180. },
  107181. {
  107182. label: "背景",
  107183. prop: "legend.backgroundColor",
  107184. type: "backgroundSelect",
  107185. fieldProps: {
  107186. filterOptions: ["image"]
  107187. },
  107188. defaultValue: {
  107189. type: "color",
  107190. color: "#fff"
  107191. },
  107192. format: (e, n) => {
  107193. e.value["legend.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107194. },
  107195. valueToForm: (e) => !e || e === "none" ? {
  107196. type: "none"
  107197. } : {
  107198. type: "color",
  107199. color: e.color
  107200. }
  107201. },
  107202. {
  107203. label: "阴影",
  107204. prop: "legend.shadowBlur",
  107205. type: "radioGroup",
  107206. fieldProps: {
  107207. options: [
  107208. { label: "开启", value: !0 },
  107209. { label: "关闭", value: !1 }
  107210. ]
  107211. },
  107212. defaultValue: !1,
  107213. format: (e, n) => {
  107214. 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);
  107215. },
  107216. valueToForm: (e) => !!e
  107217. }
  107218. ] : []
  107219. }
  107220. ]
  107221. },
  107222. /* 系列 */
  107223. series: {
  107224. label: "系列",
  107225. prop: "series",
  107226. type: "group",
  107227. children: [
  107228. {
  107229. label: "配色",
  107230. prop: "color",
  107231. type: "colorScheme",
  107232. defaultValue: Z1[0].color
  107233. }
  107234. ]
  107235. },
  107236. /* X轴 */
  107237. xAxis: {
  107238. label: "X 轴",
  107239. prop: "xAxis",
  107240. type: "group",
  107241. children: [
  107242. {
  107243. label: "类型",
  107244. prop: "xAxis.type",
  107245. type: "select",
  107246. fieldProps: {
  107247. options: [
  107248. { label: "类目坐标轴", value: "category" },
  107249. { label: "数值坐标轴", value: "value" },
  107250. { label: "时间坐标轴", value: "time" }
  107251. ]
  107252. },
  107253. defaultValue: "category"
  107254. },
  107255. {
  107256. label: " ",
  107257. prop: "xAxis.showName",
  107258. type: "checkboxGroup",
  107259. fieldProps: {
  107260. options: [{ label: "显示轴标题", value: !0 }]
  107261. },
  107262. defaultValue: [!0],
  107263. format: (t, e) => {
  107264. 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);
  107265. },
  107266. valueToForm: (t) => t ? [!0] : []
  107267. },
  107268. {
  107269. label: "",
  107270. prop: "",
  107271. type: "dependency",
  107272. name: ["xAxis.showName"],
  107273. children: (t) => t["xAxis.showName"].length ? [
  107274. {
  107275. label: "标题内容",
  107276. prop: "xAxis.name",
  107277. type: "input",
  107278. defaultValue: "X 轴标题",
  107279. format: (e, n) => {
  107280. e.value["xAxis.showName"] && (e.value["xAxis.name"] = n, e.value["xAxis.nameGap"] = 25);
  107281. },
  107282. valueToForm: (e) => e || "X 轴标题"
  107283. },
  107284. {
  107285. label: "标题位置",
  107286. prop: "xAxis.nameLocation",
  107287. type: "position",
  107288. defaultValue: "center",
  107289. format: (e, n) => {
  107290. const r = {
  107291. left: "start",
  107292. center: "middle",
  107293. right: "end"
  107294. };
  107295. e.value["xAxis.nameLocation"] = n ? r[n] : "middle";
  107296. },
  107297. valueToForm: (e) => ({
  107298. start: "left",
  107299. middle: "center",
  107300. end: "right"
  107301. })[e] || "center"
  107302. },
  107303. {
  107304. label: "标题样式",
  107305. prop: "xAxis.nameTextStyle",
  107306. type: "fontStyle",
  107307. defaultValue: {
  107308. color: "#000000ff",
  107309. size: 12,
  107310. bold: !1,
  107311. italic: !1
  107312. },
  107313. format: (e, n) => {
  107314. e.value["xAxis.nameTextStyle"] = {
  107315. color: n.color,
  107316. fontSize: n.size,
  107317. fontWeight: n.bold ? "bold" : "normal",
  107318. fontStyle: n.italic ? "italic" : "normal"
  107319. };
  107320. },
  107321. valueToForm: (e) => ({
  107322. color: (e == null ? void 0 : e.color) || "#000000ff",
  107323. size: (e == null ? void 0 : e.fontSize) || 12,
  107324. bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
  107325. italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
  107326. })
  107327. }
  107328. ] : []
  107329. },
  107330. {
  107331. label: "轴线",
  107332. prop: "",
  107333. type: "divider"
  107334. },
  107335. {
  107336. label: "线宽",
  107337. prop: "xAxis.axisLine.lineStyle.width",
  107338. type: "inputNumber",
  107339. fieldProps: {
  107340. addonAfter: "px"
  107341. },
  107342. defaultValue: 1
  107343. },
  107344. {
  107345. label: "颜色",
  107346. prop: "xAxis.axisLine.lineStyle.color",
  107347. type: "colorSelect",
  107348. defaultValue: "#ccc"
  107349. },
  107350. {
  107351. label: "刻度",
  107352. prop: "",
  107353. type: "divider"
  107354. },
  107355. {
  107356. label: " ",
  107357. prop: "xAxis.axisTick.show",
  107358. type: "checkboxGroup",
  107359. fieldProps: {
  107360. options: [{ label: "显示刻度", value: !0 }]
  107361. },
  107362. defaultValue: [!0],
  107363. format: (t, e) => {
  107364. t.value["xAxis.axisTick.show"] = !!(e != null && e.length);
  107365. },
  107366. valueToForm: (t) => t ? [!0] : []
  107367. },
  107368. {
  107369. label: "",
  107370. prop: "",
  107371. type: "dependency",
  107372. name: ["xAxis.axisTick.show"],
  107373. children: (t) => t["xAxis.axisTick.show"].length ? [
  107374. {
  107375. label: "刻度宽度",
  107376. prop: "xAxis.axisTick.lineStyle.width",
  107377. type: "inputNumber",
  107378. fieldProps: {
  107379. addonAfter: "px"
  107380. },
  107381. defaultValue: 5
  107382. },
  107383. {
  107384. label: "刻度颜色",
  107385. prop: "xAxis.axisTick.lineStyle.color",
  107386. type: "colorSelect",
  107387. defaultValue: "#ccc"
  107388. }
  107389. ] : []
  107390. },
  107391. {
  107392. label: "标签",
  107393. prop: "",
  107394. type: "divider"
  107395. },
  107396. {
  107397. label: " ",
  107398. prop: "xAxis.axisLabel.show",
  107399. type: "checkboxGroup",
  107400. fieldProps: {
  107401. options: [{ label: "显示标签", value: !0 }]
  107402. },
  107403. defaultValue: [!0],
  107404. format: (t, e) => {
  107405. t.value["xAxis.axisLabel.show"] = !!(e != null && e.length);
  107406. },
  107407. valueToForm: (t) => t ? [!0] : []
  107408. },
  107409. {
  107410. label: "",
  107411. prop: "",
  107412. type: "dependency",
  107413. name: ["xAxis.axisLabel.show"],
  107414. children: (t) => t["xAxis.axisLabel.show"].length ? [
  107415. {
  107416. label: "样式",
  107417. prop: "xAxis.axisLabel",
  107418. type: "fontStyle",
  107419. defaultValue: {
  107420. color: "#000000ff",
  107421. size: 12,
  107422. bold: !1,
  107423. italic: !1
  107424. },
  107425. format: (e, n) => {
  107426. 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";
  107427. },
  107428. valueToForm: (e, n) => ({
  107429. color: kt(n, "xAxis.axisLabel.color", "#000000ff"),
  107430. size: kt(n, "xAxis.axisLabel.fontSize", 12),
  107431. bold: kt(n, "xAxis.axisLabel.fontWeight") === "bold",
  107432. italic: kt(n, "xAxis.axisLabel.fontStyle") === "italic"
  107433. })
  107434. }
  107435. ] : []
  107436. }
  107437. ]
  107438. },
  107439. /* Y 轴 */
  107440. yAxis: {
  107441. label: "Y 轴",
  107442. prop: "yAxis",
  107443. type: "group",
  107444. children: [
  107445. {
  107446. label: " ",
  107447. prop: "yAxis.showName",
  107448. type: "checkboxGroup",
  107449. fieldProps: {
  107450. options: [{ label: "显示轴标题", value: !0 }]
  107451. },
  107452. defaultValue: [],
  107453. format: (t, e) => {
  107454. 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);
  107455. },
  107456. valueToForm: (t) => t ? [!0] : []
  107457. },
  107458. {
  107459. label: "",
  107460. prop: "",
  107461. type: "dependency",
  107462. name: ["yAxis.showName"],
  107463. children: (t) => t["yAxis.showName"].length ? [
  107464. {
  107465. label: "标题内容",
  107466. prop: "yAxis.name",
  107467. type: "input",
  107468. defaultValue: "Y 轴标题",
  107469. format: (e, n) => {
  107470. e.value["yAxis.showName"] ? (e.value["yAxis.name"] = n, e.value["yAxis.nameGap"] = 25) : (e.value["yAxis.name"] = "", e.value["yAxis.nameGap"] = 15);
  107471. },
  107472. valueToForm: (e) => e || "Y 轴标题"
  107473. },
  107474. {
  107475. label: "标题位置",
  107476. prop: "yAxis.nameLocation",
  107477. type: "position",
  107478. defaultValue: "center",
  107479. format: (e, n) => {
  107480. const r = {
  107481. left: "start",
  107482. center: "middle",
  107483. right: "end"
  107484. };
  107485. e.value["yAxis.nameLocation"] = n ? r[n] : "middle";
  107486. },
  107487. valueToForm: (e) => ({
  107488. start: "left",
  107489. middle: "center",
  107490. end: "right"
  107491. })[e] || "center "
  107492. },
  107493. {
  107494. label: "标题样式",
  107495. prop: "yAxis.nameTextStyle",
  107496. type: "fontStyle",
  107497. defaultValue: {
  107498. color: "#FFFFFFFF",
  107499. size: 12,
  107500. bold: !1,
  107501. italic: !1
  107502. },
  107503. format: (e, n) => {
  107504. e.value["yAxis.nameTextStyle"] = {
  107505. color: n.color,
  107506. fontSize: n.size,
  107507. fontWeight: n.bold ? "bold" : "normal",
  107508. fontStyle: n.italic ? "italic" : "normal"
  107509. };
  107510. },
  107511. valueToForm: (e) => ({
  107512. color: (e == null ? void 0 : e.color) || "#000000ff",
  107513. size: (e == null ? void 0 : e.fontSize) || 12,
  107514. bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
  107515. italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
  107516. })
  107517. }
  107518. ] : []
  107519. },
  107520. {
  107521. label: "轴线",
  107522. prop: "",
  107523. type: "divider"
  107524. },
  107525. {
  107526. label: " ",
  107527. prop: "yAxis.axisLine.show",
  107528. type: "checkboxGroup",
  107529. fieldProps: {
  107530. options: [{ label: "显示轴线", value: !0 }]
  107531. },
  107532. defaultValue: [!0],
  107533. format: (t, e) => {
  107534. t.value["yAxis.axisLine.show"] = !!(e != null && e.length);
  107535. },
  107536. valueToForm: (t) => t ? [!0] : []
  107537. },
  107538. {
  107539. label: "",
  107540. prop: "",
  107541. type: "dependency",
  107542. name: ["yAxis.axisLine.show"],
  107543. children: (t) => t["yAxis.axisLine.show"].length ? [
  107544. {
  107545. label: "线宽",
  107546. prop: "yAxis.axisLine.lineStyle.width",
  107547. type: "inputNumber",
  107548. fieldProps: {
  107549. addonAfter: "px"
  107550. },
  107551. defaultValue: 1
  107552. },
  107553. {
  107554. label: "颜色",
  107555. prop: "yAxis.axisLine.lineStyle.color",
  107556. type: "colorSelect",
  107557. defaultValue: "#ccc"
  107558. }
  107559. ] : []
  107560. },
  107561. {
  107562. label: "刻度",
  107563. prop: "",
  107564. type: "divider"
  107565. },
  107566. {
  107567. label: " ",
  107568. prop: "yAxis.axisTick.show",
  107569. type: "checkboxGroup",
  107570. fieldProps: {
  107571. options: [{ label: "显示刻度", value: !0 }]
  107572. },
  107573. defaultValue: [!0],
  107574. format: (t, e) => {
  107575. t.value["yAxis.axisTick.show"] = !!(e != null && e.length);
  107576. },
  107577. valueToForm: (t) => t ? [!0] : []
  107578. },
  107579. {
  107580. label: "",
  107581. prop: "",
  107582. type: "dependency",
  107583. name: ["yAxis.axisTick.show"],
  107584. children: (t) => t["yAxis.axisTick.show"].length ? [
  107585. {
  107586. label: "刻度长度",
  107587. prop: "yAxis.axisTick.lineStyle.width",
  107588. type: "inputNumber",
  107589. fieldProps: {
  107590. addonAfter: "px"
  107591. },
  107592. defaultValue: 5
  107593. },
  107594. {
  107595. label: "刻度颜色",
  107596. prop: "yAxis.axisTick.lineStyle.color",
  107597. type: "colorSelect",
  107598. defaultValue: "#ccc"
  107599. }
  107600. ] : []
  107601. },
  107602. {
  107603. label: "标签",
  107604. prop: "",
  107605. type: "divider"
  107606. },
  107607. {
  107608. label: " ",
  107609. prop: "yAxis.axisLabel.show",
  107610. type: "checkboxGroup",
  107611. fieldProps: {
  107612. options: [{ label: "显示标签", value: !0 }]
  107613. },
  107614. defaultValue: [!0],
  107615. format: (t, e) => {
  107616. t.value["yAxis.axisLabel.show"] = !!(e != null && e.length);
  107617. },
  107618. valueToForm: (t) => t ? [!0] : []
  107619. },
  107620. {
  107621. label: "",
  107622. prop: "",
  107623. type: "dependency",
  107624. name: ["yAxis.axisLabel.show"],
  107625. children: (t) => t["yAxis.axisLabel.show"].length ? [
  107626. {
  107627. label: "样式",
  107628. prop: "yAxis.axisLabel",
  107629. type: "fontStyle",
  107630. defaultValue: {
  107631. color: "#000000ff",
  107632. size: 12,
  107633. bold: !1,
  107634. italic: !1
  107635. },
  107636. format: (e, n) => {
  107637. 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";
  107638. },
  107639. valueToForm: (e, n) => ({
  107640. color: kt(n, "yAxis.axisLabel.color", "#000000ff"),
  107641. size: kt(n, "yAxis.axisLabel.fontSize", 12),
  107642. bold: kt(n, "yAxis.axisLabel.fontWeight") === "bold",
  107643. italic: kt(n, "yAxis.axisLabel.fontStyle") === "italic"
  107644. })
  107645. },
  107646. {
  107647. label: "旋转角度",
  107648. prop: "yAxis.axisLabel.rotate",
  107649. type: "inputNumber",
  107650. fieldProps: {
  107651. addonAfter: "°",
  107652. min: -90,
  107653. max: 90,
  107654. step: 1
  107655. }
  107656. }
  107657. ] : []
  107658. }
  107659. ]
  107660. },
  107661. /* 提示 */
  107662. tooltip: {
  107663. label: "提示",
  107664. prop: "tooltip",
  107665. type: "group",
  107666. children: [
  107667. {
  107668. label: " ",
  107669. prop: "tooltip.show",
  107670. type: "checkboxGroup",
  107671. fieldProps: {
  107672. options: [{ label: "提示可见", value: !0 }]
  107673. },
  107674. defaultValue: [!0],
  107675. format: (t, e) => {
  107676. t.value["tooltip.show"] = !!(e != null && e.length);
  107677. },
  107678. valueToForm: (t) => t ? [!0] : []
  107679. },
  107680. {
  107681. label: "",
  107682. prop: "",
  107683. type: "dependency",
  107684. name: ["tooltip.show"],
  107685. children: (t) => t["tooltip.show"].length ? [
  107686. {
  107687. label: "文本",
  107688. prop: "tooltip.formatter",
  107689. type: "checkboxGroup",
  107690. fieldProps: {
  107691. options: [
  107692. { label: "分类名", value: "b" },
  107693. { label: "系列名", value: "a" },
  107694. { label: "数值", value: "c" }
  107695. ]
  107696. },
  107697. defaultValue: ["b"],
  107698. format: (e, n) => {
  107699. e.value["tooltip.formatter"] = n.map((r) => `{${r}}`).join(" ");
  107700. },
  107701. valueToForm: (e, n) => {
  107702. var r, i;
  107703. return (i = (r = kt(n, "tooltip.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
  107704. }
  107705. },
  107706. // {
  107707. // label: "格式化",
  107708. // prop: "tooltip.valueFormatter",
  107709. // type: "input",
  107710. // tip: "支持字符串模板和回调函数",
  107711. // defaultValue: "(value, dataIndex) => value",
  107712. // },
  107713. {
  107714. label: "样式",
  107715. prop: "tooltip.textStyle",
  107716. type: "fontStyle",
  107717. defaultValue: {
  107718. color: "#000000ff",
  107719. size: 12,
  107720. bold: !1,
  107721. italic: !1
  107722. },
  107723. format: (e, n) => {
  107724. e.value["tooltip.textStyle"] = {
  107725. color: n.color,
  107726. fontSize: n.size,
  107727. fontWeight: n.bold ? "bold" : "normal",
  107728. fontStyle: n.italic ? "italic" : "normal"
  107729. };
  107730. },
  107731. valueToForm: (e, n) => ({
  107732. color: kt(n, "tooltip.textStyle.color", "#000000ff"),
  107733. size: kt(n, "tooltip.textStyle.fontSize", 12),
  107734. bold: kt(n, "tooltip.textStyle.fontWeight") === "bold",
  107735. italic: kt(n, "tooltip.textStyle.fontStyle") === "italic"
  107736. })
  107737. },
  107738. {
  107739. label: "边框",
  107740. prop: "",
  107741. type: "divider"
  107742. },
  107743. {
  107744. label: "线宽",
  107745. prop: "tooltip.borderWidth",
  107746. type: "inputNumber",
  107747. fieldProps: {
  107748. addonAfter: "px"
  107749. },
  107750. defaultValue: 1
  107751. },
  107752. {
  107753. label: "颜色",
  107754. prop: "tooltip.borderColor",
  107755. type: "colorSelect",
  107756. defaultValue: "#ccc"
  107757. },
  107758. {
  107759. label: "圆角",
  107760. prop: "tooltip.borderRadius",
  107761. type: "inputNumber",
  107762. fieldProps: {
  107763. addonAfter: "px"
  107764. },
  107765. defaultValue: 4
  107766. },
  107767. {
  107768. label: "背景",
  107769. prop: "",
  107770. type: "divider"
  107771. },
  107772. {
  107773. label: "填充",
  107774. prop: "tooltip.backgroundColor",
  107775. type: "backgroundSelect",
  107776. fieldProps: {
  107777. filterOptions: ["image"]
  107778. },
  107779. defaultValue: {
  107780. type: "color",
  107781. color: "#fff"
  107782. },
  107783. format: (e, n) => {
  107784. e.value["tooltip.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107785. },
  107786. valueToForm: (e) => !e || e === "none" ? {
  107787. type: "none"
  107788. } : {
  107789. type: "color",
  107790. color: e
  107791. }
  107792. },
  107793. {
  107794. label: "阴影",
  107795. prop: "tooltip.extraCssText",
  107796. type: "radioGroup",
  107797. fieldProps: {
  107798. options: [
  107799. { label: "开启", value: !0 },
  107800. { label: "关闭", value: !1 }
  107801. ]
  107802. },
  107803. defaultValue: !1,
  107804. format: (e, n) => {
  107805. e.value["tooltip.extraCssText"] = n ? "box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);" : "";
  107806. },
  107807. valueToForm: (e, n) => !!kt(n, "tooltip.extraCssText")
  107808. }
  107809. ] : []
  107810. }
  107811. ]
  107812. },
  107813. /* 标签 */
  107814. label: {
  107815. label: "标签",
  107816. prop: "label",
  107817. type: "group",
  107818. children: [
  107819. {
  107820. label: " ",
  107821. prop: "label.show",
  107822. type: "checkboxGroup",
  107823. fieldProps: {
  107824. options: [{ label: "标签可见", value: !0 }]
  107825. },
  107826. defaultValue: [],
  107827. format: (t, e) => {
  107828. t.value["label.show"] = !!(e != null && e.length);
  107829. },
  107830. valueToForm: (t) => t ? [!0] : []
  107831. },
  107832. {
  107833. label: "",
  107834. prop: "",
  107835. type: "dependency",
  107836. name: ["label.show"],
  107837. children: (t) => t["label.show"].length ? [
  107838. {
  107839. label: "文本",
  107840. prop: "label.formatter",
  107841. type: "checkboxGroup",
  107842. fieldProps: {
  107843. options: [
  107844. { label: "分类名", value: "b" },
  107845. { label: "系列名", value: "a" },
  107846. { label: "数值", value: "c" }
  107847. // { label: "百分比", value: "percent" },
  107848. ]
  107849. },
  107850. defaultValue: ["a"],
  107851. format: (e, n) => {
  107852. e.value["label.formatter"] = `{${n}}`;
  107853. },
  107854. valueToForm: (e, n) => {
  107855. var r, i;
  107856. return (i = (r = kt(n, "label.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
  107857. }
  107858. },
  107859. {
  107860. label: "样式",
  107861. prop: "label.fontStyle",
  107862. type: "fontStyle",
  107863. defaultValue: {
  107864. color: "#000000ff",
  107865. size: 12,
  107866. bold: !1,
  107867. italic: !1
  107868. },
  107869. format: (e, n) => {
  107870. 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";
  107871. },
  107872. valueToForm: (e, n) => ({
  107873. color: kt(n, "label.color", "#000000ff"),
  107874. size: kt(n, "label.fontSize", 12),
  107875. bold: kt(n, "label.fontWeight") === "bold",
  107876. italic: kt(n, "label.fontStyle") === "italic"
  107877. })
  107878. },
  107879. {
  107880. label: "布局",
  107881. prop: "",
  107882. type: "divider"
  107883. },
  107884. {
  107885. label: "位置",
  107886. prop: "label.position",
  107887. type: "radioGroup",
  107888. fieldProps: {
  107889. options: [
  107890. { label: "顶部", value: "top" },
  107891. { label: "左侧", value: "left" },
  107892. { label: "右侧", value: "right" },
  107893. { label: "底部", value: "bottom" },
  107894. { label: "内部", value: "inside" },
  107895. { label: "内部左侧", value: "insideLeft" },
  107896. { label: "内部右侧", value: "insideRight" },
  107897. { label: "内部顶部", value: "insideTop" },
  107898. { label: "内部底部", value: "insideBottom" }
  107899. ]
  107900. },
  107901. defaultValue: "top"
  107902. },
  107903. {
  107904. label: "文本方向",
  107905. prop: "label.rotate",
  107906. type: "radioGroup",
  107907. fieldProps: {
  107908. options: [
  107909. { label: "水平", value: "horizontal" },
  107910. { label: "垂直", value: "vertical" }
  107911. ]
  107912. },
  107913. defaultValue: "horizontal",
  107914. format: (e, n) => {
  107915. e.value["label.rotate"] = n === "horizontal" ? 0 : 90;
  107916. },
  107917. valueToForm: (e) => e === 0 ? "horizontal" : "vertical"
  107918. },
  107919. {
  107920. label: "边框",
  107921. prop: "",
  107922. type: "divider"
  107923. },
  107924. {
  107925. label: "线宽",
  107926. prop: "label.borderWidth",
  107927. type: "inputNumber",
  107928. fieldProps: {
  107929. addonAfter: "px"
  107930. },
  107931. defaultValue: 0
  107932. },
  107933. {
  107934. label: "颜色",
  107935. prop: "label.borderColor",
  107936. type: "colorSelect",
  107937. defaultValue: "#ccc"
  107938. },
  107939. {
  107940. label: "圆角",
  107941. prop: "label.borderRadius",
  107942. type: "inputNumber",
  107943. fieldProps: {
  107944. addonAfter: "px"
  107945. },
  107946. defaultValue: 0
  107947. }
  107948. ] : []
  107949. }
  107950. ]
  107951. }
  107952. }, Ole = (t) => (AS("data-v-0b356b47"), t = t(), ES(), t), Vht = { class: "chart-config" }, Fht = { class: "config-tab" }, Wht = /* @__PURE__ */ Ole(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), Qht = /* @__PURE__ */ Ole(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), Hht = /* @__PURE__ */ te({
  107953. __name: "Config",
  107954. props: LL,
  107955. emits: ["change"],
  107956. setup(t, { emit: e }) {
  107957. const n = t, r = U("1"), i = e, a = [
  107958. {
  107959. label: "线",
  107960. prop: "",
  107961. type: "divider"
  107962. },
  107963. {
  107964. label: "线条样式",
  107965. prop: "series.line.lineStyle.type",
  107966. type: "select",
  107967. fieldProps: {
  107968. options: [
  107969. { label: "实线", value: "solid" },
  107970. { label: "虚线", value: "dashed" },
  107971. { label: "点线", value: "dotted" }
  107972. ]
  107973. }
  107974. },
  107975. {
  107976. label: "线宽",
  107977. prop: "series.line.lineStyle.width",
  107978. type: "inputNumber",
  107979. fieldProps: {
  107980. min: 0,
  107981. addonAfter: "px"
  107982. }
  107983. },
  107984. {
  107985. label: "形态",
  107986. prop: "series.line.lineType",
  107987. type: "radioGroupButton",
  107988. fieldProps: {
  107989. options: [
  107990. { label: "普通", value: "normal" },
  107991. { label: "平滑", value: "smooth" },
  107992. { label: "阶梯", value: "step" }
  107993. ]
  107994. },
  107995. format: (u, c) => {
  107996. switch (c) {
  107997. case "smooth":
  107998. u.value["series.line.smooth"] = !0, u.value["series.line.step"] = !1;
  107999. break;
  108000. case "step":
  108001. u.value["series.line.smooth"] = !1, u.value["series.line.step"] = "end";
  108002. break;
  108003. default:
  108004. u.value["series.line.smooth"] = !1, u.value["series.line.step"] = !1;
  108005. }
  108006. },
  108007. valueToForm: (u, c) => {
  108008. const f = kt(c, "series.line.step"), d = kt(c, "series.line.smooth");
  108009. return f ? "step" : d ? "smooth" : "normal";
  108010. }
  108011. },
  108012. {
  108013. label: "标记点",
  108014. prop: "",
  108015. type: "divider"
  108016. },
  108017. {
  108018. label: "图形",
  108019. prop: "series.line.symbol",
  108020. type: "select",
  108021. fieldProps: {
  108022. options: [
  108023. { label: "圆", value: "circle" },
  108024. { label: "方", value: "rect" },
  108025. { label: "三角", value: "triangle" },
  108026. { label: "菱形", value: "diamond" },
  108027. { label: "标记", value: "pin" },
  108028. { label: "箭头", value: "arrow" },
  108029. { label: "无", value: "none" }
  108030. ]
  108031. }
  108032. },
  108033. {
  108034. label: "大小",
  108035. prop: "series.line.symbolSize",
  108036. type: "inputNumber",
  108037. fieldProps: {
  108038. min: 0,
  108039. addonAfter: "px"
  108040. }
  108041. },
  108042. {
  108043. label: "旋转",
  108044. prop: "series.line.symbolRotate",
  108045. type: "inputNumber",
  108046. fieldProps: {
  108047. min: 0,
  108048. addonAfter: "°"
  108049. }
  108050. }
  108051. ], o = [
  108052. In.title,
  108053. In.legend,
  108054. In.label,
  108055. {
  108056. ...In.series,
  108057. children: In.series.children.concat(
  108058. a
  108059. )
  108060. },
  108061. In.tooltip,
  108062. In.background
  108063. ], s = (u) => {
  108064. i("change", {
  108065. ...n,
  108066. dataSource: u
  108067. });
  108068. }, l = (u) => {
  108069. const c = Zc(n);
  108070. Object.keys(u).forEach((f) => {
  108071. YI(c, f, u[f]);
  108072. }), i("change", c);
  108073. };
  108074. return (u, c) => (pe(), Qe("div", Vht, [
  108075. He("div", Fht, [
  108076. M(B(Uc), {
  108077. activeKey: r.value,
  108078. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108079. size: "small",
  108080. centered: ""
  108081. }, {
  108082. default: we(() => [
  108083. M(B(Fs), { key: "1" }, {
  108084. tab: we(() => [
  108085. M(B(x0)),
  108086. Wht
  108087. ]),
  108088. _: 1
  108089. }),
  108090. M(B(Fs), { key: "2" }, {
  108091. tab: we(() => [
  108092. M(B(w0)),
  108093. Qht
  108094. ]),
  108095. _: 1
  108096. })
  108097. ]),
  108098. _: 1
  108099. }, 8, ["activeKey"])
  108100. ]),
  108101. r.value === "1" ? (pe(), je(B4, {
  108102. key: 0,
  108103. dataSource: u.dataSource,
  108104. onChange: s
  108105. }, null, 8, ["dataSource"])) : _t("", !0),
  108106. r.value === "2" ? (pe(), je(B(Mx), {
  108107. key: 1,
  108108. columns: o,
  108109. formModel: n,
  108110. onChange: l
  108111. }, null, 8, ["formModel"])) : _t("", !0)
  108112. ]));
  108113. }
  108114. }), Sle = /* @__PURE__ */ po(Hht, [["__scopeId", "data-v-0b356b47"]]);
  108115. Hm.Config = Sle;
  108116. Hm.install = (t) => (t.component("FmBasicLine", Hm), t);
  108117. const Ght = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108118. __proto__: null,
  108119. Config: Sle,
  108120. basicLineProps: LL,
  108121. default: Hm,
  108122. defaultPropsValue: RZe
  108123. }, Symbol.toStringTag, { value: "Module" })), z4 = {
  108124. width: {
  108125. type: Number,
  108126. default: 400
  108127. },
  108128. height: {
  108129. type: Number,
  108130. default: 260
  108131. },
  108132. dataSource: kL,
  108133. // 标题
  108134. title: {
  108135. type: Object
  108136. },
  108137. // 图例
  108138. legend: {
  108139. type: Object
  108140. },
  108141. // 背景
  108142. backgroundColor: {
  108143. type: String
  108144. },
  108145. // 边框
  108146. grid: {
  108147. type: Object
  108148. },
  108149. // 提示框
  108150. tooltip: {
  108151. type: Object
  108152. },
  108153. // x轴数据
  108154. xAxis: {
  108155. type: Object
  108156. },
  108157. // y轴数据
  108158. yAxis: {
  108159. type: Object
  108160. },
  108161. // 折线
  108162. series: {
  108163. type: Array
  108164. },
  108165. // color
  108166. color: {
  108167. type: Object
  108168. }
  108169. }, xle = [];
  108170. xle.bar = {
  108171. // @ts-ignore
  108172. fixedBarWidth: !1,
  108173. barWidth: "auto",
  108174. barGap: "10%",
  108175. barCategoryGap: "20%",
  108176. itemStyle: {
  108177. borderColor: "#ccc",
  108178. borderRadius: 0,
  108179. borderWidth: 0
  108180. }
  108181. };
  108182. const jht = RL({
  108183. title: {
  108184. text: "柱状图标题"
  108185. },
  108186. xAxis: {
  108187. data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  108188. },
  108189. series: xle
  108190. }), Zht = {
  108191. // 组件容器默认属性
  108192. container: {
  108193. props: {
  108194. width: 400,
  108195. height: 260
  108196. }
  108197. },
  108198. // 图表默认属性
  108199. props: {
  108200. // 数据源
  108201. dataSource: {
  108202. sourceType: Ri.STATIC,
  108203. data: {
  108204. series: [
  108205. {
  108206. type: "bar",
  108207. name: "系列1",
  108208. data: [10, 30, 20, 40]
  108209. },
  108210. {
  108211. type: "bar",
  108212. name: "系列2",
  108213. data: [15, 35, 25, 45]
  108214. }
  108215. ]
  108216. },
  108217. url: location.origin + "/mock/api/get/example/bar",
  108218. method: "POST",
  108219. params: {},
  108220. headers: {},
  108221. refreshTime: 0,
  108222. dataProcess: `
  108223. (res) => {
  108224. // 取出列表
  108225. const data = res.data;
  108226. // x轴数据
  108227. const xData = data.map((item) => item.name);
  108228. // 系列数据
  108229. const series = [
  108230. { type: 'bar', name: '价格', data: data.map(item => item.price) },
  108231. { type: 'bar', name: '总量', data: data.map(item => item.count) },
  108232. ];
  108233. // 返回图表数据
  108234. return { xData, series };
  108235. }
  108236. `
  108237. },
  108238. ...jht
  108239. }
  108240. }, u0 = /* @__PURE__ */ te({
  108241. __name: "BasicBar",
  108242. props: z4,
  108243. setup(t) {
  108244. const e = t, { options: n, loading: r } = qL(e);
  108245. return (i, a) => (pe(), je(DL, {
  108246. width: i.width,
  108247. height: i.height,
  108248. "echarts-options": B(n),
  108249. loading: B(r)
  108250. }, null, 8, ["width", "height", "echarts-options", "loading"]));
  108251. }
  108252. }), wle = (t) => (AS("data-v-d6923dbc"), t = t(), ES(), t), Uht = { class: "chart-config" }, Xht = { class: "config-tab" }, Yht = /* @__PURE__ */ wle(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), qht = /* @__PURE__ */ wle(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), Kht = /* @__PURE__ */ te({
  108253. __name: "Config",
  108254. props: z4,
  108255. emits: ["change"],
  108256. setup(t, { emit: e }) {
  108257. const n = t, r = U("1"), i = e, a = [
  108258. {
  108259. label: "样式",
  108260. prop: "",
  108261. type: "divider"
  108262. },
  108263. {
  108264. label: "固定柱宽",
  108265. prop: "series.bar.fixedBarWidth",
  108266. type: "radioGroup",
  108267. fieldProps: {
  108268. options: [
  108269. { label: "是", value: !0 },
  108270. { label: "否", value: !1 }
  108271. ]
  108272. },
  108273. defaultValue: !1,
  108274. format: (u, c) => {
  108275. var f, d;
  108276. 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";
  108277. }
  108278. },
  108279. {
  108280. label: "",
  108281. prop: "",
  108282. type: "dependency",
  108283. name: ["series.bar.fixedBarWidth"],
  108284. children: (u) => u["series.bar.fixedBarWidth"] ? [
  108285. {
  108286. label: "柱宽",
  108287. prop: "series.bar.barWidth",
  108288. type: "inputNumber",
  108289. fieldProps: {
  108290. addonAfter: "px"
  108291. },
  108292. defaultValue: 20
  108293. }
  108294. ] : []
  108295. },
  108296. {
  108297. label: "系列间隔",
  108298. prop: "series.bar.barGap",
  108299. type: "slider",
  108300. defaultValue: 30,
  108301. format: (u, c) => {
  108302. u.value["series.bar.barGap"] = c + "%";
  108303. },
  108304. valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
  108305. },
  108306. {
  108307. label: "分类间隔",
  108308. prop: "series.bar.barCategoryGap",
  108309. type: "slider",
  108310. defaultValue: 20,
  108311. format: (u, c) => {
  108312. u.value["series.bar.barCategoryGap"] = c + "%";
  108313. },
  108314. valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
  108315. },
  108316. {
  108317. label: "边框",
  108318. prop: "",
  108319. type: "divider"
  108320. },
  108321. {
  108322. label: "线宽",
  108323. prop: "series.bar.itemStyle.borderWidth",
  108324. type: "inputNumber",
  108325. fieldProps: {
  108326. addonAfter: "px"
  108327. },
  108328. defaultValue: 0
  108329. },
  108330. {
  108331. label: "颜色",
  108332. prop: "series.bar.itemStyle.borderColor",
  108333. type: "colorSelect",
  108334. defaultValue: "#ccc"
  108335. },
  108336. {
  108337. label: "圆角",
  108338. prop: "series.bar.itemStyle.borderRadius",
  108339. type: "inputNumber",
  108340. fieldProps: {
  108341. addonAfter: "px"
  108342. },
  108343. defaultValue: 0
  108344. }
  108345. ], o = [
  108346. In.title,
  108347. In.legend,
  108348. In.label,
  108349. {
  108350. ...In.series,
  108351. children: In.series.children.concat(
  108352. a
  108353. )
  108354. },
  108355. In.xAxis,
  108356. In.yAxis,
  108357. In.tooltip
  108358. ], s = (u) => {
  108359. i("change", {
  108360. ...n,
  108361. dataSource: u
  108362. });
  108363. }, l = (u) => {
  108364. const c = Zc(n);
  108365. Object.keys(u).forEach((f) => {
  108366. YI(c, f, u[f]);
  108367. }), i("change", c);
  108368. };
  108369. return (u, c) => (pe(), Qe("div", Uht, [
  108370. He("div", Xht, [
  108371. M(B(Uc), {
  108372. activeKey: r.value,
  108373. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108374. size: "small",
  108375. centered: ""
  108376. }, {
  108377. default: we(() => [
  108378. M(B(Fs), { key: "1" }, {
  108379. tab: we(() => [
  108380. M(B(x0)),
  108381. Yht
  108382. ]),
  108383. _: 1
  108384. }),
  108385. M(B(Fs), { key: "2" }, {
  108386. tab: we(() => [
  108387. M(B(w0)),
  108388. qht
  108389. ]),
  108390. _: 1
  108391. })
  108392. ]),
  108393. _: 1
  108394. }, 8, ["activeKey"])
  108395. ]),
  108396. r.value === "1" ? (pe(), je(B4, {
  108397. key: 0,
  108398. dataSource: u.dataSource,
  108399. onChange: s
  108400. }, null, 8, ["dataSource"])) : _t("", !0),
  108401. r.value === "2" ? (pe(), je(B(Mx), {
  108402. key: 1,
  108403. columns: o,
  108404. formModel: n,
  108405. onChange: l
  108406. }, null, 8, ["formModel"])) : _t("", !0)
  108407. ]));
  108408. }
  108409. }), Cle = /* @__PURE__ */ po(Kht, [["__scopeId", "data-v-d6923dbc"]]);
  108410. u0.Config = Cle;
  108411. u0.install = (t) => (t.component("FmBasicBar", u0), t);
  108412. const Jht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108413. __proto__: null,
  108414. Config: Cle,
  108415. basicBarProps: z4,
  108416. default: u0,
  108417. defaultPropsValue: Zht
  108418. }, Symbol.toStringTag, { value: "Module" })), V4 = {
  108419. width: {
  108420. type: Number,
  108421. default: 400
  108422. },
  108423. height: {
  108424. type: Number,
  108425. default: 260
  108426. },
  108427. dataSource: kL,
  108428. // 标题
  108429. title: {
  108430. type: Object
  108431. },
  108432. // 图例
  108433. legend: {
  108434. type: Object
  108435. },
  108436. // 背景
  108437. backgroundColor: {
  108438. type: String
  108439. },
  108440. // 边框
  108441. grid: {
  108442. type: Object
  108443. },
  108444. // 提示框
  108445. tooltip: {
  108446. type: Object
  108447. },
  108448. // 饼图数据
  108449. series: {
  108450. type: Array
  108451. },
  108452. // color
  108453. color: {
  108454. type: Object
  108455. }
  108456. }, Tle = [];
  108457. Tle.pie = {
  108458. top: 70,
  108459. startAngle: 0,
  108460. endAngle: 360,
  108461. radius: ["0%", "75%"]
  108462. };
  108463. const ept = RL({
  108464. title: {
  108465. text: "饼图标题"
  108466. },
  108467. grid: {
  108468. show: !1
  108469. },
  108470. xAxis: {
  108471. show: !1
  108472. },
  108473. yAxis: {
  108474. show: !1
  108475. },
  108476. series: Tle
  108477. }), tpt = {
  108478. // 组件容器默认属性
  108479. container: {
  108480. props: {
  108481. width: 400,
  108482. height: 260
  108483. }
  108484. },
  108485. // 图表默认属性
  108486. props: {
  108487. // 数据源
  108488. dataSource: {
  108489. sourceType: Ri.STATIC,
  108490. data: {
  108491. series: [
  108492. {
  108493. type: "pie",
  108494. name: "系列1",
  108495. data: [
  108496. { value: 335, name: "直接访问" },
  108497. { value: 310, name: "邮件营销" },
  108498. { value: 234, name: "联盟广告" },
  108499. { value: 135, name: "视频广告" }
  108500. ]
  108501. }
  108502. ]
  108503. },
  108504. url: location.origin + "/mock/api/get/example/pie",
  108505. method: "POST",
  108506. params: {},
  108507. headers: {},
  108508. refreshTime: 0,
  108509. dataProcess: `
  108510. (res) => {
  108511. // 取出列表
  108512. const data = res.data;
  108513. // 系列数据
  108514. const series = [
  108515. { type: 'pie', name: '价格', data: data.map(item => item.price) },
  108516. ];
  108517. // 返回图表数据
  108518. return { series };
  108519. }
  108520. `
  108521. },
  108522. ...ept
  108523. }
  108524. }, c0 = /* @__PURE__ */ te({
  108525. __name: "BasicPie",
  108526. props: V4,
  108527. setup(t) {
  108528. const e = t, { options: n, loading: r } = qL(e);
  108529. return (i, a) => (pe(), je(DL, {
  108530. width: i.width,
  108531. height: i.height,
  108532. "echarts-options": B(n),
  108533. loading: B(r)
  108534. }, null, 8, ["width", "height", "echarts-options", "loading"]));
  108535. }
  108536. }), Ple = (t) => (AS("data-v-bd423688"), t = t(), ES(), t), npt = { class: "chart-config" }, rpt = { class: "config-tab" }, ipt = /* @__PURE__ */ Ple(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), apt = /* @__PURE__ */ Ple(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), opt = /* @__PURE__ */ te({
  108537. __name: "Config",
  108538. props: V4,
  108539. emits: ["change"],
  108540. setup(t, { emit: e }) {
  108541. const n = t, r = U("1"), i = e, a = [
  108542. {
  108543. label: "样式",
  108544. prop: "",
  108545. type: "divider"
  108546. },
  108547. {
  108548. label: "起始角度",
  108549. prop: "series.pie.startAngle",
  108550. type: "inputNumber",
  108551. fieldProps: {
  108552. min: 0,
  108553. max: 360,
  108554. addonAfter: "°"
  108555. }
  108556. },
  108557. {
  108558. label: "完结角度",
  108559. prop: "series.pie.endAngle",
  108560. type: "inputNumber",
  108561. fieldProps: {
  108562. min: 0,
  108563. max: 360,
  108564. addonAfter: "°"
  108565. }
  108566. },
  108567. {
  108568. label: "内径占比",
  108569. prop: "series.pie.radius",
  108570. type: "slider",
  108571. format: (u, c) => {
  108572. console.log("formatModel", u);
  108573. const f = c * 0.75;
  108574. return u.value["series.pie.radius"] = [f + "%", "75%"], c * 100;
  108575. },
  108576. valueToForm: (u) => (u || ["0%", "75%"])[0].replace("%", "") / 0.75
  108577. }
  108578. ], o = [
  108579. In.title,
  108580. In.legend,
  108581. In.label,
  108582. {
  108583. ...In.series,
  108584. children: In.series.children.concat(
  108585. a
  108586. )
  108587. },
  108588. In.tooltip
  108589. ], s = (u) => {
  108590. i("change", {
  108591. ...n,
  108592. dataSource: u
  108593. });
  108594. }, l = (u) => {
  108595. const c = Zc(n);
  108596. Object.keys(u).forEach((f) => {
  108597. YI(c, f, u[f]);
  108598. }), i("change", c);
  108599. };
  108600. return (u, c) => (pe(), Qe("div", npt, [
  108601. He("div", rpt, [
  108602. M(B(Uc), {
  108603. activeKey: r.value,
  108604. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108605. size: "small",
  108606. centered: ""
  108607. }, {
  108608. default: we(() => [
  108609. M(B(Fs), { key: "1" }, {
  108610. tab: we(() => [
  108611. M(B(x0)),
  108612. ipt
  108613. ]),
  108614. _: 1
  108615. }),
  108616. M(B(Fs), { key: "2" }, {
  108617. tab: we(() => [
  108618. M(B(w0)),
  108619. apt
  108620. ]),
  108621. _: 1
  108622. })
  108623. ]),
  108624. _: 1
  108625. }, 8, ["activeKey"])
  108626. ]),
  108627. r.value === "1" ? (pe(), je(B4, {
  108628. key: 0,
  108629. dataSource: u.dataSource,
  108630. onChange: s
  108631. }, null, 8, ["dataSource"])) : _t("", !0),
  108632. r.value === "2" ? (pe(), je(B(Mx), {
  108633. key: 1,
  108634. columns: o,
  108635. formModel: n,
  108636. onChange: l
  108637. }, null, 8, ["formModel"])) : _t("", !0)
  108638. ]));
  108639. }
  108640. }), $le = /* @__PURE__ */ po(opt, [["__scopeId", "data-v-bd423688"]]);
  108641. c0.Config = $le;
  108642. c0.install = (t) => (t.component("FmBasicPie", c0), t);
  108643. const spt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108644. __proto__: null,
  108645. Config: $le,
  108646. basicPieProps: V4,
  108647. default: c0,
  108648. defaultPropsValue: tpt
  108649. }, Symbol.toStringTag, { value: "Module" })), mpt = {
  108650. Title: () => Promise.resolve().then(() => GMe),
  108651. BasicLine: () => Promise.resolve().then(() => Ght),
  108652. BasicBar: () => Promise.resolve().then(() => Jht),
  108653. BasicPie: () => Promise.resolve().then(() => spt)
  108654. }, W9 = {
  108655. BasicLine: Hm,
  108656. BasicBar: u0,
  108657. Title: Zg,
  108658. BasicPie: c0
  108659. }, lpt = function(t) {
  108660. return Object.keys(W9).forEach((e) => {
  108661. const n = W9[e];
  108662. n != null && n.install && (console.log("注册组件:", e), t.use(n));
  108663. }), t;
  108664. }, ypt = {
  108665. version: "1.0.0",
  108666. install: lpt
  108667. };
  108668. export {
  108669. u0 as BasicBar,
  108670. Cle as BasicBarConfig,
  108671. Zht as BasicBarDefaultProps,
  108672. z4 as BasicBarProps,
  108673. Hm as BasicLine,
  108674. Sle as BasicLineConfig,
  108675. RZe as BasicLineDefaultProps,
  108676. LL as BasicLineProps,
  108677. c0 as BasicPie,
  108678. $le as BasicPieConfig,
  108679. tpt as BasicPieDefaultProps,
  108680. V4 as BasicPieProps,
  108681. Mx as CusForm,
  108682. Ri as DataSourceType,
  108683. Zg as Title,
  108684. mpt as asyncComponentAll,
  108685. W9 as components,
  108686. ypt as default,
  108687. lpt as install
  108688. };
  108689. //# sourceMappingURL=shalu-dashboard-ui.js.map