@visulima/vis 1.0.0-alpha.24 → 1.0.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/LICENSE.md +1154 -179
- package/README.md +5 -3
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +19 -0
- package/dist/packem_chunks/bin.js +299 -290
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/config.js +15 -15
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +2 -2
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +10 -10
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +2 -2
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +5 -5
- package/dist/packem_chunks/handler22.js +2 -2
- package/dist/packem_chunks/handler23.js +2 -2
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler31.js +1 -1
- package/dist/packem_chunks/handler32.js +3 -3
- package/dist/packem_chunks/handler34.js +5 -28
- package/dist/packem_chunks/handler35.js +22 -5
- package/dist/packem_chunks/handler36.js +60 -21
- package/dist/packem_chunks/handler37.js +6 -61
- package/dist/packem_chunks/handler38.js +24 -6
- package/dist/packem_chunks/handler39.js +152 -707
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler40.js +10 -24
- package/dist/packem_chunks/handler41.js +25 -286
- package/dist/packem_chunks/handler42.js +707 -152
- package/dist/packem_chunks/handler43.js +24 -10
- package/dist/packem_chunks/handler44.js +322 -25
- package/dist/packem_chunks/handler45.js +46 -24
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler47.js +7 -7
- package/dist/packem_chunks/handler48.js +66 -58
- package/dist/packem_chunks/handler5.js +3 -3
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +16 -16
- package/dist/packem_chunks/index.js +6 -6
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/prune.js +3 -3
- package/dist/packem_chunks/run.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{advisories-U1QKY_tg.js → advisories-DS8JEB_g.js} +1 -1
- package/dist/packem_shared/affected-shas-Dm7eqcI8.js +1 -0
- package/dist/packem_shared/{ai-analysis-B8pDCOuT.js → ai-analysis-Csn82p17.js} +1 -1
- package/dist/packem_shared/{ai-fix-DiGSrGKv.js → ai-fix-BlYyz5bI.js} +3 -3
- package/dist/packem_shared/{cyclonedx-DPEW0nwS.js → cyclonedx-ja1cbU69.js} +1 -1
- package/dist/packem_shared/dependency-scan-s2MD0vi-.js +1 -0
- package/dist/packem_shared/{docker-_pBC9Loj.js → docker-Bw9gKo69.js} +1 -1
- package/dist/packem_shared/{index-D_tAc2nS.js → index-88UK-tt_.js} +1 -1
- package/dist/packem_shared/index-CS6a2wFB.js +29 -0
- package/dist/packem_shared/lifecycle-ChCFTm5Q.js +2 -0
- package/dist/packem_shared/{lockfile-CQLFNyVa.js → lockfile-BG1HvBzH.js} +1 -1
- package/dist/packem_shared/{min-release-age-Cz6HbF-I.js → min-release-age-heJgeP7o.js} +1 -1
- package/dist/packem_shared/{osv-bloom-CyCDpXBl.js → osv-bloom-QSAn2Dcw.js} +2 -2
- package/dist/packem_shared/{pm-runner-Dnj9J3KF.js → pm-runner-BzGZmzYs.js} +1 -1
- package/dist/packem_shared/{provenance-yESbF7Vs.js → provenance-BsBn1f5S.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-BpxcFRuk.js → resolve-explicit-CBPr617N.js} +1 -1
- package/dist/packem_shared/{s1ngularity-B_xjP4lC.js → s1ngularity-j_ArCZAs.js} +1 -1
- package/dist/packem_shared/{signatures-DBwSnMBB.js → signatures-CaXzNuEn.js} +1 -1
- package/dist/packem_shared/{typosquats-Citu7BRY.js → typosquats-C1e6RNjF.js} +1 -1
- package/dist/packem_shared/vis-update-app-qhQPV97i.js +1 -0
- package/index.d.ts +201 -201
- package/index.js +52 -52
- package/package.json +14 -25
- package/schemas/project.schema.json +4 -0
- package/schemas/vis-config.schema.json +5 -0
- package/dist/packem_shared/dependency-scan-BbtivycX.js +0 -1
- package/dist/packem_shared/index-B8Ko8mwG.js +0 -29
- package/dist/packem_shared/lifecycle-DJDsjoic.js +0 -2
- package/dist/packem_shared/vis-update-app-BWA1kA1q.js +0 -1
|
@@ -1,153 +1,708 @@
|
|
|
1
|
-
var ge=Object.defineProperty;var g=(e,t)=>ge(e,"name",{value:t,configurable:!0});import{createRequire as he}from"node:module";import{E as d,j as k,q as x}from"../packem_shared/index.server-B7ETiT4C.js";import{b,B as m,n as ie}from"./config.js";import{i as O,C as _,Q as ve,z as W,M as c,y as be,a as we}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{p as a}from"./bin.js";import{B as ce,y as ke,A as xe}from"../packem_shared/pm-runner-Dnj9J3KF.js";import{g as Ce}from"../packem_shared/index-B8Ko8mwG.js";import{f as Se}from"../packem_shared/giget-CcEy_Elm.js";const fe=he(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=g(e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[t,r]=D.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return D.getBuiltinModule(e)}return fe(e)},"__cjs_getBuiltinModule"),{spawnSync:ye}=J("node:child_process"),{createInterface:$e}=J("node:readline"),{readdirSync:_e,chmodSync:je}=J("node:fs");var Oe=Object.defineProperty,L=g((e,t)=>Oe(e,"name",{value:t,configurable:!0}),"e");const Pe={"vis:app":"builtin:app","vis:application":"builtin:app","vis:generator":"builtin:generator","vis:lib":"builtin:library","vis:library":"builtin:library","vis:monorepo":"builtin:monorepo"},Ne=["https://github.com/","https://gitlab.com/","https://bitbucket.org/","https://raw.githubusercontent.com/","https://git.sr.ht/","git@github.com:","git@gitlab.com:","git@bitbucket.org:","git@git.sr.ht:","github:","gh:","gitlab:","bitbucket:","sourcehut:","git:","http://","https://"],qe=L(e=>{for(const t of Ne)if(e.startsWith(t))return!0;return!e.startsWith("@")&&/^[^/#@][^/#]*\/[^/#]+/.test(e)},"isGitUrl"),De=new Set(["sv"]),Ee=L(e=>{if(De.has(e)||e.startsWith("create-")||e.startsWith("@")&&e.includes("/create-"))return e;if(e.startsWith("@")){const t=e.indexOf("/");if(t!==-1){const r=e.slice(0,t),i=e.slice(t+1);return`${r}/create-${i}`}return e}return`create-${e}`},"expandCreateShorthand"),Te=L((e,t=[])=>{if(!e)throw new Error("No template specified.");const r=e.toLowerCase(),i=Pe[r];return i?{args:t,source:r,type:i}:qe(e)?{args:t,source:e,type:"remote:git"}:{args:t,source:Ee(e),type:"remote:npm"}},"discoverTemplate"),Ie=L(e=>{switch(e){case"builtin:app":return"apps";case"builtin:generator":case"builtin:library":return"packages";default:return"."}},"inferParentDir");var Re=Object.defineProperty,le=g((e,t)=>Re(e,"name",{value:t,configurable:!0}),"i$1");const ae=["ability","able","about","above","abroad","absence","absolute","absolutely","absorb","academic","accept","access","accompany","accomplish","according","account","accurate","achieve","achievement","acid","acknowledge","acquire","across","act","action","active","activist","activity","actor","actress","actual","actually","adapt","add","addition","additional","address","adequate","adjust","adjustment","administration","administrator","admire","admission","admit","adolescent","adopt","adult","advance","advanced","advantage","adventure","advertising","advice","advise","adviser","advocate","affair","affect","afford","after","afternoon","again","against","age","agency","agenda","agent","ago","agree","agreement","agricultural","ahead","aid","aide","aim","air","aircraft","airline","airport","album","alive","all","alliance","allow","ally","almost","alone","along","already","also","alter","alternative","although","always","amazing","among","amount","analysis","analyst","analyze","ancient","and","angle","animal","anniversary","announce","annual","another","answer","anticipate","any","anybody","anymore","anyone","anything","anyway","anywhere","apart","apartment","apparent","apparently","appeal","appear","appearance","apple","application","apply","appoint","appointment","appreciate","approach","appropriate","approval","approve","approximately","architect","area","argue","argument","arise","arm","armed","around","arrange","arrangement","arrival","arrive","art","article","artist","artistic","aside","ask","asleep","aspect","assert","assess","assessment","asset","assign","assignment","assist","assistance","assistant","associate","association","assume","assumption","assure","athlete","athletic","atmosphere","attach","attempt","attend","attention","attitude","attorney","attract","attractive","attribute","audience","author","authority","auto","available","average","avoid","award","aware","awareness","away","awesome","baby","back","background","bag","bake","balance","ball","ban","band","bank","bar","barely","barrel","base","baseball","basic","basically","basis","basket","basketball","bathroom","battery","beach","bean","bear","beat","beautiful","beauty","because","become","bed","bedroom","beer","before","begin","beginning","behavior","behind","being","belief","believe","bell","belong","below","belt","bench","bend","beneath","benefit","beside","besides","best","bet","better","between","beyond","big","bike","bill","billion","bind","biological","bird","birth","birthday","bit","bite","black","blade","blanket","blind","block","blow","blue","board","boat","body","bond","bone","book","boom","boot","border","born","borrow","boss","both","bother","bottle","bottom","boundary","bowl","box","boy","boyfriend","brain","branch","brand","bread","break","breakfast","breast","breath","breathe","brick","bridge","brief","briefly","bright","brilliant","bring","broad","brother","brown","brush","buck","budget","build","building","bullet","bunch","bury","bus","business","busy","but","butter","button","buy","buyer","cabin","cabinet","cable","cake","calculate","call","camera","camp","campaign","campus","can","candidate","cap","capability","capable","capacity","capital","captain","capture","car","carbon","card","care","career","careful","carefully","carrier","carry","case","cash","cast","cat","catch","category","cause","ceiling","celebrate","celebration","celebrity","cell","center","central","century","ceremony","certain","certainly","chain","chair","chairman","challenge","chamber","champion","championship","chance","change","changing","channel","chapter","character","characteristic","characterize","charge","charity","chart","chase","cheap","check","cheek","cheese","chef","chemical","chest","chicken","chief","child","childhood","chip","chocolate","choice","cholesterol","choose","church","cigarette","circle","circumstance","cite","citizen","city","civil","civilian","claim","class","classic","classroom","clean","clear","clearly","client","climate","climb","clinic","clinical","clock","close","closely","closer","clothes","clothing","cloud","club","clue","cluster","coach","coal","coalition","coast","coat","code","coffee","cognitive","cold","colleague","collect","collection","collective","college","colonial","color","column","combination","combine","come","comedy","comfort","comfortable","command","commander","comment","commercial","commission","commit","commitment","committee","common","communicate","communication","community","company","compare","comparison","compete","competition","competitive","competitor","complete","completely","complex","complicated","component","compose","composition","comprehensive","computer","concentrate","concentration","concept","concern","concerned","concert","conclude","conclusion","concrete","condition","conduct","conference","confidence","confident","confirm","confront","confusion","congressional","connect","connection","consciousness","consensus","consequence","conservative","consider","considerable","consideration","consist","consistent","constant","constantly","constitute","constitutional","construct","construction","consultant","consume","consumer","consumption","contact","contain","container","contemporary","content","contest","context","continue","continued","contract","contrast","contribute","contribution","control","convention","conventional","conversation","convert","conviction","convince","cook","cookie","cooking","cool","cooperation","cop","cope","copy","core","corn","corner","corporate","corporation","correct","correspondent","cost","cotton","couch","could","council","counselor","count","counter","country","county","couple","courage","course","court","cousin","cover","coverage","cow","crack","craft","cream","create","creation","creative","creature","credit","crew","criteria","crop","cross","crowd","crucial","cultural","culture","cup","curious","current","currently","curriculum","custom","customer","cut","cycle","dad","daily","dance","dare","dark","darkness","data","date","daughter","day","deal","dealer","dear","debate","decade","decide","decision","deck","declare","decrease","deep","deeply","deer","defend","defendant","defense","defensive","define","definitely","definition","degree","delay","deliver","delivery","demand","democracy","democratic","demonstrate","demonstration","deny","department","depend","dependent","depending","depict","depth","deputy","derive","describe","description","desert","deserve","design","designer","desire","desk","desperate","despite","detail","detailed","detect","determine","develop","developing","development","device","devote","dialogue","diet","differ","difference","different","differently","difficult","difficulty","dig","digital","dimension","dining","dinner","direct","direction","directly","director","disability","disagree","disappear","discipline","discourse","discover","discovery","discuss","discussion","dish","dismiss","display","distance","distant","distinct","distinction","distinguish","distribute","distribution","district","diverse","diversity","divide","division","doctor","document","dog","domestic","dominant","dominate","door","double","down","downtown","dozen","draft","drag","drama","dramatic","dramatically","draw","drawing","dream","dress","drink","drive","driver","drop","dry","due","during","dust","duty","each","eager","ear","early","earn","earnings","earth","ease","easily","east","eastern","easy","eat","economic","economics","economist","economy","edge","edition","editor","educate","education","educational","educator","effect","effective","effectively","efficiency","efficient","effort","egg","eight","either","elderly","elect","election","electric","electricity","electronic","element","elementary","eliminate","elite","else","elsewhere","embrace","emerge","emission","emotion","emotional","emphasis","emphasize","employ","employee","employer","employment","empty","enable","encounter","encourage","end","energy","enforcement","engage","engine","engineer","engineering","enhance","enjoy","enormous","enough","ensure","enter","enterprise","entertainment","entire","entirely","entrance","entry","environment","environmental","episode","equal","equally","equipment","era","escape","especially","essay","essential","essentially","establish","establishment","estate","estimate","etc","ethics","ethnic","evaluate","evaluation","even","evening","event","eventually","ever","every","everybody","everyday","everyone","everything","everywhere","evidence","evolution","evolve","exact","exactly","examination","examine","example","exceed","excellent","except","exception","exchange","exciting","executive","exercise","exhibit","exhibition","exist","existence","existing","expand","expansion","expect","expectation","expense","expensive","experience","experiment","expert","explain","explanation","explore","expose","express","expression","extend","extension","extensive","extent","external","extra","extraordinary","extreme","extremely","eye","fabric","face","facility","fact","factor","factory","faculty","fade","fair","fairly","faith","fall","false","familiar","family","famous","fan","fantasy","far","farm","farmer","fashion","fast","fate","father","favor","favorite","feature","federal","fee","feed","feel","feeling","fellow","female","fence","few","fewer","fiber","fiction","field","fifteen","fifth","fifty","figure","file","fill","film","final","finally","finance","financial","find","finding","fine","finger","finish","firm","first","fish","fishing","fit","fitness","five","fix","flag","flame","flat","flavor","flesh","flight","float","floor","flow","flower","fly","focus","folk","follow","following","food","foot","football","for","force","foreign","forest","forever","forget","form","formal","formation","former","formula","forth","fortune","forward","found","foundation","founder","four","fourth","frame","framework","free","freedom","freeze","frequency","frequent","frequently","fresh","friend","friendly","friendship","from","front","fruit","fuel","full","fully","fun","function","fund","fundamental","funding","funeral","funny","furniture","furthermore","future","gain","galaxy","gallery","game","gap","garage","garden","garlic","gas","gate","gather","gaze","gear","gender","gene","general","generally","generate","generation","genetic","gentleman","gently","gesture","get","ghost","giant","gift","gifted","girl","girlfriend","give","given","glad","glance","glass","global","glove","goal","gold","golden","golf","good","government","governor","grab","grade","gradually","graduate","grain","grand","grandfather","grandmother","grant","grass","grave","gray","great","greatest","green","grocery","ground","group","grow","growing","growth","guarantee","guard","guess","guest","guide","guideline","guy","habit","habitat","hair","half","hall","hand","handful","handle","hang","happen","happy","hard","hardly","hat","have","head","headline","headquarters","health","healthy","hear","hearing","heart","heat","heaven","heavily","heavy","heel","height","helicopter","hello","help","helpful","here","heritage","hero","herself","hey","hide","high","highlight","highly","highway","hill","himself","hip","hire","historian","historic","historical","history","hit","hold","hole","holiday","holy","home","honest","honey","honor","hope","horizon","horse","hospital","host","hot","hotel","hour","house","household","housing","how","however","huge","human","humor","hundred","hungry","hunter","hunting","husband","hypothesis","ice","idea","ideal","identification","identify","identity","ignore","illustrate","image","imagination","imagine","immediate","immediately","immigrant","immigration","impact","implement","implication","imply","importance","important","impose","impossible","impress","impression","impressive","improve","improvement","incentive","incident","include","including","income","incorporate","increase","increased","increasing","increasingly","incredible","indeed","independence","independent","index","indicate","indication","individual","industrial","industry","infant","inflation","influence","inform","information","ingredient","initial","initially","initiative","inner","innocent","inquiry","inside","insight","insist","inspire","install","instance","instead","institution","institutional","instruction","instructor","instrument","insurance","intellectual","intelligence","intend","intense","intensity","intention","interaction","interest","interested","interesting","internal","international","interpret","interpretation","intervention","interview","into","introduce","introduction","invest","investigate","investigation","investigator","investment","investor","invite","involve","involved","involvement","iron","island","issue","item","its","itself","jacket","jet","job","join","joint","joke","journal","journalist","journey","joy","judge","judgment","juice","jump","junior","jury","just","justice","justify","keep","key","kick","kid","kind","king","kiss","kitchen","knee","knife","knock","know","knowledge","lab","label","labor","laboratory","lady","lake","land","landscape","language","lap","large","largely","last","late","later","latter","laugh","launch","law","lawn","lawsuit","lawyer","lay","layer","lead","leader","leadership","leading","leaf","league","lean","learn","learning","least","leather","leave","left","leg","legacy","legal","legend","legislation","legitimate","lemon","length","less","lesson","let","letter","level","liberal","library","license","lie","life","lifestyle","lifetime","lift","light","like","likely","limit","limitation","limited","line","link","lip","list","listen","literally","literary","literature","little","live","living","load","loan","local","locate","location","lock","long","look","loose","lose","lost","lot","lots","loud","love","lovely","lover","low","lower","luck","lucky","lunch","lung","machine","magazine","mail","main","mainly","maintain","maintenance","major","majority","make","maker","makeup","male","mall","man","manage","management","manager","manner","manufacturer","manufacturing","many","map","margin","mark","market","marketing","marriage","married","marry","mask","mass","massive","master","match","material","math","matter","may","maybe","mayor","meal","mean","meaning","meanwhile","measure","measurement","meat","mechanism","media","medical","medication","medicine","medium","meet","meeting","member","membership","memory","mental","mention","menu","mere","merely","message","metal","meter","method","middle","might","military","milk","million","mind","mine","minister","minor","minority","minute","miracle","mirror","miss","missile","mission","mix","mixture","mode","model","moderate","modern","modest","mom","moment","money","monitor","month","mood","moon","moral","more","moreover","morning","mortgage","most","mostly","mother","motion","motivation","motor","mount","mountain","mouse","mouth","move","movement","movie","much","multiple","muscle","museum","music","musical","musician","must","mutual","myself","mystery","myth","naked","name","narrative","narrow","nation","national","native","natural","naturally","nature","near","nearby","nearly","necessarily","necessary","neck","need","negative","negotiate","negotiation","neighbor","neighborhood","neither","nerve","net","network","never","nevertheless","new","newly","news","newspaper","next","nice","night","nine","nobody","nod","nomination","none","nonetheless","nor","normal","normally","north","northern","nose","not","note","nothing","notice","notion","novel","now","nowhere","nuclear","number","numerous","nurse","nut","object","objective","obligation","observation","observe","observer","obtain","obvious","obviously","occasion","occasionally","occupation","occupy","occur","ocean","odd","odds","off","offer","office","officer","official","often","oil","okay","old","once","one","ongoing","onion","online","only","onto","open","opening","operate","operating","operation","operator","opinion","opponent","opportunity","oppose","opposite","opposition","option","orange","order","ordinary","organic","organization","organize","orientation","origin","original","originally","other","others","otherwise","ought","our","ourselves","out","outcome","outside","oven","over","overall","overcome","overlook","owe","own","owner","pace","pack","package","page","paint","painter","painting","pair","pale","palm","pan","panel","pant","paper","parent","park","parking","part","participant","participate","participation","particular","particularly","partly","partner","partnership","party","pass","passage","passenger","passion","past","patch","path","patient","pattern","pause","pay","payment","peace","peak","peer","people","pepper","per","perceive","percentage","perception","perfect","perfectly","perform","performance","perhaps","period","permanent","permission","permit","person","personal","personality","personally","personnel","perspective","persuade","pet","phase","phenomenon","philosophy","phone","photo","photograph","photographer","phrase","physical","physically","physician","piano","pick","picture","pie","piece","pile","pilot","pine","pink","pipe","pitch","place","plan","plane","planet","planning","plant","plastic","plate","platform","play","player","please","pleasure","plenty","plot","plus","pocket","poem","poet","poetry","point","pole","police","policy","political","politically","politician","politics","poll","pool","pop","popular","population","porch","port","portion","portrait","portray","pose","position","positive","possess","possibility","possible","possibly","post","pot","potato","potential","potentially","pound","pour","powder","power","powerful","practical","practice","pray","prayer","precisely","predict","prefer","preference","pregnancy","pregnant","preparation","prepare","prescription","presence","present","presentation","preserve","president","presidential","press","pretend","pretty","prevent","previous","previously","price","pride","priest","primarily","primary","prime","principal","principle","print","prior","priority","privacy","private","probably","procedure","proceed","process","produce","producer","product","production","profession","professional","professor","profile","profit","program","progress","project","prominent","promise","promote","prompt","proof","proper","properly","property","proportion","proposal","propose","proposed","prosecutor","prospect","protect","protection","protein","protest","proud","prove","provide","provider","province","provision","psychological","psychologist","psychology","public","publication","publicly","publish","publisher","pull","purchase","pure","purpose","pursue","push","put","qualify","quality","quarter","quarterback","question","quick","quickly","quiet","quietly","quit","quite","quote","race","racial","radical","radio","rail","rain","raise","range","rank","rapid","rapidly","rare","rarely","rate","rather","rating","ratio","raw","reach","react","reaction","read","reader","reading","ready","real","reality","realize","really","reason","reasonable","recall","receive","recent","recently","recipe","recognition","recognize","recommend","recommendation","record","recording","recover","recovery","recruit","red","reduce","reduction","refer","reference","reflect","reflection","reform","refugee","refuse","regard","regarding","regardless","regime","region","regional","register","regular","regularly","regulate","regulation","reinforce","relate","relation","relationship","relative","relatively","relax","release","relevant","relief","religion","religious","rely","remain","remaining","remarkable","remember","remind","remote","remove","repeat","repeatedly","replace","reply","report","reporter","represent","representation","representative","reputation","request","require","requirement","research","researcher","resemble","reservation","resident","resist","resolution","resolve","resort","resource","respect","respond","respondent","response","responsibility","responsible","rest","restaurant","restore","restriction","result","retain","retire","retirement","return","reveal","revenue","review","revolution","rhythm","rice","rich","rid","ride","rifle","right","ring","rise","river","road","rock","role","roll","romantic","roof","room","root","rope","rose","roughly","round","route","routine","row","rub","rule","run","running","rural","rush","sacred","safe","safety","sake","salad","salary","sale","sales","salt","same","sample","sanction","sand","satellite","satisfaction","satisfy","sauce","save","saving","say","scale","scenario","scene","schedule","scheme","scholar","scholarship","school","science","scientific","scientist","scope","score","screen","script","sea","search","season","seat","second","secret","secretary","section","sector","secure","security","see","seed","seek","seem","segment","seize","select","selection","self","sell","senator","send","senior","sense","sensitive","sentence","separate","sequence","series","serious","seriously","serve","service","session","set","setting","settle","settlement","seven","several","shade","shadow","shake","shall","shape","share","sharp","sheet","shelf","shell","shelter","shift","shine","ship","shirt","shoe","shop","shopping","shore","short","shortly","shot","should","shoulder","shout","show","shower","shrug","shut","side","sigh","sight","sign","signal","significance","significant","significantly","silence","silent","silver","similar","similarly","simple","simply","since","sing","singer","single","sink","sir","sister","sit","site","situation","six","size","ski","skill","skin","sky","sleep","slice","slide","slight","slightly","slip","slow","slowly","small","smart","smell","smile","smooth","snap","snow","soccer","social","society","soft","software","soil","solar","solid","solution","solve","some","somebody","somehow","someone","something","sometimes","somewhat","somewhere","son","song","soon","sophisticated","sorry","sort","soul","sound","soup","source","south","southern","space","speak","speaker","special","specialist","species","specific","specifically","speech","speed","spend","spending","spin","spirit","spiritual","split","spokesman","sport","spot","spread","spring","square","squeeze","stability","stable","staff","stage","stair","stake","stand","standard","standing","star","stare","start","state","statement","station","statistics","status","stay","steady","steal","steel","step","stick","still","stir","stock","stomach","stone","stop","storage","store","storm","story","straight","strange","stranger","strategic","strategy","stream","street","strength","strengthen","stretch","string","strip","strong","strongly","structure","student","studio","study","stuff","style","subject","submit","subsequent","substance","substantial","succeed","success","successful","successfully","such","sudden","suddenly","sue","sufficient","sugar","suggest","suggestion","suit","summer","summit","sun","super","supply","support","supporter","suppose","supposed","sure","surely","surface","surgery","surprise","surprised","surprising","surprisingly","surround","survey","survival","survive","survivor","sustain","swear","sweep","sweet","swim","swing","switch","symbol","system","table","tablespoon","tactic","tail","take","tale","talent","talk","tall","tank","tap","tape","target","task","taste","tax","taxpayer","tea","teach","teacher","teaching","team","tear","teaspoon","technical","technique","technology","teen","teenager","telephone","telescope","television","tell","temperature","temporary","ten","tend","tendency","tennis","tent","term","terms","territory","test","testify","testimony","testing","text","than","thank","thanks","that","the","theater","their","them","theme","themselves","then","theory","therapy","there","therefore","thick","thin","thing","think","thinking","third","thirty","though","thought","thousand","three","throat","through","throughout","throw","ticket","tie","tight","time","tiny","tip","tire","tired","tissue","title","today","toe","together","tomato","tomorrow","tone","tongue","tonight","too","tool","tooth","top","topic","toss","total","totally","touch","tough","tour","tourist","tournament","tower","town","toy","trace","track","trade","tradition","traditional","traffic","trail","train","training","transfer","transform","transformation","transition","translate","transportation","travel","treat","treatment","treaty","tree","tremendous","trend","trial","tribe","trip","troop","truck","true","truly","trust","truth","try","tube","tunnel","turn","twelve","twenty","twice","twin","two","type","typical","typically","ultimate","ultimately","unable","uncle","under","undergo","understand","understanding","unfortunately","uniform","union","unique","unit","universal","universe","university","unknown","unless","unlike","unlikely","until","unusual","upon","upper","urban","urge","use","used","useful","user","usual","usually","utility","vacation","valley","valuable","value","variable","variation","variety","various","vary","vast","vegetable","vehicle","venture","version","versus","very","vessel","veteran","via","victory","video","view","viewer","village","virtually","virtue","visible","vision","visit","visitor","visual","vital","voice","volume","volunteer","vote","voter","wage","wait","wake","walk","wall","wander","want","warm","warn","warning","wash","watch","water","wave","way","wealth","wealthy","wear","weather","wedding","week","weekend","weekly","weigh","weight","welcome","welfare","well","west","western","wet","what","whatever","wheel","when","whenever","where","whereas","whether","which","while","whisper","white","who","whole","whom","whose","why","wide","widely","widespread","wife","wild","will","willing","win","wind","window","wine","wing","winner","winter","wipe","wire","wisdom","wise","wish","with","withdraw","within","without","witness","woman","wonder","wonderful","wood","wooden","word","work","worker","working","works","workshop","world","worried","worth","would","wrap","write","writer","writing","yard","yeah","year","yell","yellow","yes","yesterday","yield","young","your","yours","yourself","youth","zone"],Me=le((e,t)=>Math.floor(e+Math.random()*(t-e+1)),"random");function F(){return ae[Me(0,ae.length-1)]}g(F,"getRandomWord");le(F,"getRandomWord");var ze=Object.defineProperty,Le=g((e,t)=>ze(e,"name",{value:t,configurable:!0}),"o$1");const Ae=Le(()=>`${F()}-${F()}`,"randomName");var U,ne;function Ge(){return ne||(ne=1,U=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib","node:sea","node:sqlite","node:test","node:test/reporters"]),U}g(Ge,"requireBuiltinModules");var B,oe;function Ue(){if(oe)return B;oe=1;var e=Object.defineProperty,t=g((o,l)=>e(o,"name",{value:l,configurable:!0}),"i");const r=Ge();var i=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),n=["node_modules","favicon.ico"];function u(o){var l=[],s=[];if(o===null)return s.push("name cannot be null"),p(l,s);if(o===void 0)return s.push("name cannot be undefined"),p(l,s);if(typeof o!="string")return s.push("name must be a string"),p(l,s);if(o.length||s.push("name length must be greater than zero"),o.startsWith(".")&&s.push("name cannot start with a period"),o.startsWith("-")&&s.push("name cannot start with a hyphen"),o.match(/^_/)&&s.push("name cannot start with an underscore"),o.trim()!==o&&s.push("name cannot contain leading or trailing spaces"),n.forEach(function(h){o.toLowerCase()===h&&s.push(h+" is not a valid package name")}),r.includes(o.toLowerCase())&&l.push(o+" is a core module name"),o.length>214&&l.push("name can no longer contain more than 214 characters"),o.toLowerCase()!==o&&l.push("name can no longer contain capital letters"),/[~'!()*]/.test(o.split("/").slice(-1)[0])&&l.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(o)!==o){var w=o.match(i);if(w){var $=w[1],y=w[2];if(y.startsWith(".")&&s.push("name cannot start with a period"),encodeURIComponent($)===$&&encodeURIComponent(y)===y)return p(l,s)}s.push("name can only contain URL-friendly characters")}return p(l,s)}g(u,"validate"),t(u,"validate");var p=t(function(o,l){var s={validForNewPackages:l.length===0&&o.length===0,validForOldPackages:l.length===0,warnings:o,errors:l};return s.warnings.length||delete s.warnings,s.errors.length||delete s.errors,s},"done");return B=u,B}g(Ue,"requireLib");var Be=Ue();const Ve=Ce(Be);var Fe=Object.defineProperty,I=g((e,t)=>Fe(e,"name",{value:t,configurable:!0}),"r$2");const pe=I(e=>e?Ve(e).validForNewPackages:!1,"isValidPackageName"),T=I(e=>e.toLowerCase().trim().replaceAll(/\s+/g,"-").replaceAll(/[^a-z\d\-~]/g,"-").replace(/^[._-]+/,"").replaceAll(/-{2,}/g,"-").replace(/-$/,""),"toValidPackageName"),Je=new Set([".DS_Store",".git",".gitkeep","Thumbs.db"]),ue=I(e=>O(e)?_e(e).every(t=>Je.has(t)):!0,"isEmptyDir"),We=I((e,t)=>{const r=_(t,e);return{packageName:T(ve(r)),targetDir:r}},"resolveTargetDir"),He=I(e=>ue(e),"canSafelyOverwrite");var Ye=Object.defineProperty,A=g((e,t)=>Ye(e,"name",{value:t,configurable:!0}),"l$4");const E=A((e,t)=>new Promise(r=>{e.question(t,i=>{r(i.trim())})}),"ask"),V=A(async(e,t,r=!0)=>{const i=await E(e,` ${t} ${d(r?"[Y/n]":"[y/N]")} `);return i===""?r:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),se=A(async(e,t,r)=>{process.stderr.write(` ${t}
|
|
2
|
-
`);for(const[i,n]of r.entries()){const u=k(x(` ${String(i+1)}.`)),p=n.hint?d(` — ${n.hint}`):"";process.stderr.write(`${u} ${n.label}${p}
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
var Br=Object.defineProperty;var m=(n,e)=>Br(n,"name",{value:e,configurable:!0});import{createRequire as Hr}from"node:module";import{E as ie,j as le,q as bt}from"../packem_shared/index.server-B7ETiT4C.js";import{projectGraphToDot as Yr}from"@visulima/task-runner";import{render as Qr}from"@visulima/tui";import{au as wt,C as Jr,S as Zr,s as ei}from"./bin.js";import ti,{useSyncExternalStore as ri,useState as et,useRef as yt,useMemo as tt,useCallback as vt,useEffect as ii}from"react";import{g as di}from"../packem_shared/index-CS6a2wFB.js";import{d as ci}from"../packem_shared/anolilab-text-CAM_E6uK.js";import{jsx as y,jsxs as E}from"react/jsx-runtime";import{Box as G}from"@visulima/tui/components/box";import{Dialog as li}from"@visulima/tui/components/dialog";import{Text as w}from"@visulima/tui/components/text";import{useApp as hi}from"@visulima/tui/hooks/use-app";import{useInput as pi}from"@visulima/tui/hooks/use-input";import{useWindowSize as ui}from"@visulima/tui/hooks/use-window-size";import{ScrollView as gi}from"@visulima/tui/components/scroll-view";import{ScrollBar as fi}from"@visulima/tui/components/scroll-bar";const Vr=Hr(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qe=m(n=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,t]=De.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return De.getBuiltinModule(n)}return Vr(n)},"__cjs_getBuiltinModule"),{readFileSync:Kr,writeFileSync:Xr}=qe("node:fs"),{createRequire:ni}=qe("node:module"),{join:oi,dirname:ai}=qe("node:path"),{EventEmitter:si}=qe("events");var mi=Object.defineProperty,b=m((n,e)=>mi(n,"name",{value:e,configurable:!0}),"h");function Tt(){const n=arguments[0];for(let e=1,t=arguments.length;e<t;e++)if(arguments[e])for(const r in arguments[e])n[r]=arguments[e][r];return n}m(Tt,"ft");b(Tt,"assignPolyfill");let V=Tt;typeof Object.assign=="function"&&(V=Object.assign);function ee(n,e,t,r){const i=n._nodes.get(e);let o=null;return i&&(r==="mixed"?o=i.out&&i.out[t]||i.undirected&&i.undirected[t]:r==="directed"?o=i.out&&i.out[t]:o=i.undirected&&i.undirected[t]),o}m(ee,"D$1");b(ee,"getMatchingEdge");function K(n){return typeof n=="object"&&n!==null}m(K,"G$1");b(K,"isPlainObject");function ct(n){let e;for(e in n)return!1;return!0}m(ct,"tt");b(ct,"isEmpty");function Z(n,e,t){Object.defineProperty(n,e,{enumerable:!1,configurable:!1,writable:!0,value:t})}m(Z,"x");b(Z,"privateProperty");function re(n,e,t){const r={enumerable:!0,configurable:!0};typeof t=="function"?r.get=t:(r.value=t,r.writable=!1),Object.defineProperty(n,e,r)}m(re,"A$1");b(re,"readOnlyProperty");function at(n){return!(!K(n)||n.attributes&&!Array.isArray(n.attributes))}m(at,"Q");b(at,"validateHints");function Ot(){let n=Math.floor(Math.random()*256)&255;return()=>n++}m(Ot,"pt");b(Ot,"incrementalIdStartingFromRandomByte");function oe(){const n=arguments;let e=null,t=-1;return{[Symbol.iterator](){return this},next(){let r=null;do{if(e===null){if(t++,t>=n.length)return{done:!0};e=n[t][Symbol.iterator]()}if(r=e.next(),r.done){e=null;continue}break}while(!0);return r}}}m(oe,"N$1");b(oe,"chain");function me(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}m(me,"L$2");b(me,"emptyIterator");let lt=class extends Error{static{m(this,"P")}static{b(this,"GraphError")}constructor(e){super(),this.name="GraphError",this.message=e}},$=class zt extends lt{static{m(this,"g")}static{b(this,"InvalidArgumentsGraphError")}constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,zt.prototype.constructor)}},x=class jt extends lt{static{m(this,"p")}static{b(this,"NotFoundGraphError")}constructor(e){super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,jt.prototype.constructor)}},D=class Ut extends lt{static{m(this,"y")}static{b(this,"UsageGraphError")}constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ut.prototype.constructor)}};function ht(n,e){this.key=n,this.attributes=e,this.clear()}m(ht,"et");b(ht,"MixedNodeData");ht.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function pt(n,e){this.key=n,this.attributes=e,this.clear()}m(pt,"it");b(pt,"DirectedNodeData");pt.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function ut(n,e){this.key=n,this.attributes=e,this.clear()}m(ut,"nt");b(ut,"UndirectedNodeData");ut.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function be(n,e,t,r,i){this.key=e,this.attributes=i,this.undirected=n,this.source=t,this.target=r}m(be,"M$1");b(be,"EdgeData");be.prototype.attach=function(){let n="out",e="in";this.undirected&&(n=e="undirected");const t=this.source.key,r=this.target.key;this.source[n][r]=this,!(this.undirected&&t===r)&&(this.target[e][t]=this)};be.prototype.attachMulti=function(){let n="out",e="in";const t=this.source.key,r=this.target.key;this.undirected&&(n=e="undirected");const i=this.source[n],o=i[r];if(typeof o>"u"){i[r]=this,this.undirected&&t===r||(this.target[e][t]=this);return}o.previous=this,this.next=o,i[r]=this,this.target[e][t]=this};be.prototype.detach=function(){const n=this.source.key,e=this.target.key;let t="out",r="in";this.undirected&&(t=r="undirected"),delete this.source[t][e],delete this.target[r][n]};be.prototype.detachMulti=function(){const n=this.source.key,e=this.target.key;let t="out",r="in";this.undirected&&(t=r="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][e],delete this.target[r][n]):(this.next.previous=void 0,this.source[t][e]=this.next,this.target[r][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Rt=0,Ft=1,bi=2,Pt=3;function ae(n,e,t,r,i,o,a){let s,d,c,p;if(r=""+r,t===Rt){if(s=n._nodes.get(r),!s)throw new x(`Graph.${e}: could not find the "${r}" node in the graph.`);c=i,p=o}else if(t===Pt){if(i=""+i,d=n._edges.get(i),!d)throw new x(`Graph.${e}: could not find the "${i}" edge in the graph.`);const l=d.source.key,u=d.target.key;if(r===l)s=d.target;else if(r===u)s=d.source;else throw new x(`Graph.${e}: the "${r}" node is not attached to the "${i}" edge (${l}, ${u}).`);c=o,p=a}else{if(d=n._edges.get(r),!d)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`);t===Ft?s=d.source:s=d.target,c=i,p=o}return[s,c,p]}m(ae,"S$2");b(ae,"findRelevantNodeData");function Wt(n,e,t){n.prototype[e]=function(r,i,o){const[a,s]=ae(this,e,t,r,i,o);return a.attributes[s]}}m(Wt,"gt");b(Wt,"attachNodeAttributeGetter");function qt(n,e,t){n.prototype[e]=function(r,i){const[o]=ae(this,e,t,r,i);return o.attributes}}m(qt,"yt");b(qt,"attachNodeAttributesGetter");function Bt(n,e,t){n.prototype[e]=function(r,i,o){const[a,s]=ae(this,e,t,r,i,o);return a.attributes.hasOwnProperty(s)}}m(Bt,"wt");b(Bt,"attachNodeAttributeChecker");function Ht(n,e,t){n.prototype[e]=function(r,i,o,a){const[s,d,c]=ae(this,e,t,r,i,o,a);return s.attributes[d]=c,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:d}),this}}m(Ht,"mt");b(Ht,"attachNodeAttributeSetter");function Vt(n,e,t){n.prototype[e]=function(r,i,o,a){const[s,d,c]=ae(this,e,t,r,i,o,a);if(typeof c!="function")throw new $(`Graph.${e}: updater should be a function.`);const p=s.attributes,l=c(p[d]);return p[d]=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:d}),this}}m(Vt,"bt");b(Vt,"attachNodeAttributeUpdater");function Kt(n,e,t){n.prototype[e]=function(r,i,o){const[a,s]=ae(this,e,t,r,i,o);return delete a.attributes[s],this.emit("nodeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:s}),this}}m(Kt,"$t");b(Kt,"attachNodeAttributeRemover");function Xt(n,e,t){n.prototype[e]=function(r,i,o){const[a,s]=ae(this,e,t,r,i,o);if(!K(s))throw new $(`Graph.${e}: provided attributes are not a plain object.`);return a.attributes=s,this.emit("nodeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}m(Xt,"Gt");b(Xt,"attachNodeAttributesReplacer");function Yt(n,e,t){n.prototype[e]=function(r,i,o){const[a,s]=ae(this,e,t,r,i,o);if(!K(s))throw new $(`Graph.${e}: provided attributes are not a plain object.`);return V(a.attributes,s),this.emit("nodeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:s}),this}}m(Yt,"Et");b(Yt,"attachNodeAttributesMerger");function Qt(n,e,t){n.prototype[e]=function(r,i,o){const[a,s]=ae(this,e,t,r,i,o);if(typeof s!="function")throw new $(`Graph.${e}: provided updater is not a function.`);return a.attributes=s(a.attributes),this.emit("nodeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}m(Qt,"kt");b(Qt,"attachNodeAttributesUpdater");const wi=[{name:b(n=>`get${n}Attribute`,"name"),attacher:Wt},{name:b(n=>`get${n}Attributes`,"name"),attacher:qt},{name:b(n=>`has${n}Attribute`,"name"),attacher:Bt},{name:b(n=>`set${n}Attribute`,"name"),attacher:Ht},{name:b(n=>`update${n}Attribute`,"name"),attacher:Vt},{name:b(n=>`remove${n}Attribute`,"name"),attacher:Kt},{name:b(n=>`replace${n}Attributes`,"name"),attacher:Xt},{name:b(n=>`merge${n}Attributes`,"name"),attacher:Yt},{name:b(n=>`update${n}Attributes`,"name"),attacher:Qt}];function Jt(n){wi.forEach(function({name:e,attacher:t}){t(n,e("Node"),Rt),t(n,e("Source"),Ft),t(n,e("Target"),bi),t(n,e("Opposite"),Pt)})}m(Jt,"xt");b(Jt,"attachNodeAttributesMethods");function Zt(n,e,t){n.prototype[e]=function(r,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,s=""+i;if(i=arguments[2],o=ee(this,a,s,t),!o)throw new x(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return o.attributes[i]}}m(Zt,"Dt");b(Zt,"attachEdgeAttributeGetter");function er(n,e,t){n.prototype[e]=function(r){let i;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+r,a=""+arguments[1];if(i=ee(this,o,a,t),!i)throw new x(`Graph.${e}: could not find an edge for the given path ("${o}" - "${a}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,i=this._edges.get(r),!i)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return i.attributes}}m(er,"At");b(er,"attachEdgeAttributesGetter");function tr(n,e,t){n.prototype[e]=function(r,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,s=""+i;if(i=arguments[2],o=ee(this,a,s,t),!o)throw new x(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return o.attributes.hasOwnProperty(i)}}m(tr,"vt");b(tr,"attachEdgeAttributeChecker");function rr(n,e,t){n.prototype[e]=function(r,i,o){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,d=""+i;if(i=arguments[2],o=arguments[3],a=ee(this,s,d,t),!a)throw new x(`Graph.${e}: could not find an edge for the given path ("${s}" - "${d}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,a=this._edges.get(r),!a)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return a.attributes[i]=o,this.emit("edgeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:i}),this}}m(rr,"Nt");b(rr,"attachEdgeAttributeSetter");function ir(n,e,t){n.prototype[e]=function(r,i,o){let a;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+r,d=""+i;if(i=arguments[2],o=arguments[3],a=ee(this,s,d,t),!a)throw new x(`Graph.${e}: could not find an edge for the given path ("${s}" - "${d}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,a=this._edges.get(r),!a)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(typeof o!="function")throw new $(`Graph.${e}: updater should be a function.`);return a.attributes[i]=o(a.attributes[i]),this.emit("edgeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:i}),this}}m(ir,"St");b(ir,"attachEdgeAttributeUpdater");function nr(n,e,t){n.prototype[e]=function(r,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,s=""+i;if(i=arguments[2],o=ee(this,a,s,t),!o)throw new x(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}return delete o.attributes[i],this.emit("edgeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:i}),this}}m(nr,"Ut");b(nr,"attachEdgeAttributeRemover");function or(n,e,t){n.prototype[e]=function(r,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,s=""+i;if(i=arguments[2],o=ee(this,a,s,t),!o)throw new x(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(!K(i))throw new $(`Graph.${e}: provided attributes are not a plain object.`);return o.attributes=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}m(or,"Lt");b(or,"attachEdgeAttributesReplacer");function ar(n,e,t){n.prototype[e]=function(r,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,s=""+i;if(i=arguments[2],o=ee(this,a,s,t),!o)throw new x(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(!K(i))throw new $(`Graph.${e}: provided attributes are not a plain object.`);return V(o.attributes,i),this.emit("edgeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:i}),this}}m(ar,"Mt");b(ar,"attachEdgeAttributesMerger");function sr(n,e,t){n.prototype[e]=function(r,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new D(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new D(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+r,s=""+i;if(i=arguments[2],o=ee(this,a,s,t),!o)throw new x(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(t!=="mixed")throw new D(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(r=""+r,o=this._edges.get(r),!o)throw new x(`Graph.${e}: could not find the "${r}" edge in the graph.`)}if(typeof i!="function")throw new $(`Graph.${e}: provided updater is not a function.`);return o.attributes=i(o.attributes),this.emit("edgeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}m(sr,"Ct");b(sr,"attachEdgeAttributesUpdater");const yi=[{name:b(n=>`get${n}Attribute`,"name"),attacher:Zt},{name:b(n=>`get${n}Attributes`,"name"),attacher:er},{name:b(n=>`has${n}Attribute`,"name"),attacher:tr},{name:b(n=>`set${n}Attribute`,"name"),attacher:rr},{name:b(n=>`update${n}Attribute`,"name"),attacher:ir},{name:b(n=>`remove${n}Attribute`,"name"),attacher:nr},{name:b(n=>`replace${n}Attributes`,"name"),attacher:or},{name:b(n=>`merge${n}Attributes`,"name"),attacher:ar},{name:b(n=>`update${n}Attributes`,"name"),attacher:sr}];function dr(n){yi.forEach(function({name:e,attacher:t}){t(n,e("Edge"),"mixed"),t(n,e("DirectedEdge"),"directed"),t(n,e("UndirectedEdge"),"undirected")})}m(dr,"It");b(dr,"attachEdgeAttributesMethods");const vi=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function cr(n,e,t,r){let i=!1;for(const o in e){if(o===r)continue;const a=e[o];if(i=t(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),n&&i)return a.key}}m(cr,"Ot");b(cr,"forEachSimple");function lr(n,e,t,r){let i,o,a,s=!1;for(const d in e)if(d!==r){i=e[d];do{if(o=i.source,a=i.target,s=t(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected),n&&s)return i.key;i=i.next}while(i!==void 0)}}m(lr,"Wt");b(lr,"forEachMulti");function Pe(n,e){const t=Object.keys(n),r=t.length;let i,o=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(o>=r)return{done:!0};const a=t[o++];if(a===e){i=void 0;continue}i=n[a]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}m(Pe,"K");b(Pe,"createIterator");function hr(n,e,t,r){const i=e[t];if(!i)return;const o=i.source,a=i.target;if(r(i.key,i.attributes,o.key,a.key,o.attributes,a.attributes,i.undirected)&&n)return i.key}m(hr,"Kt");b(hr,"forEachForKeySimple");function pr(n,e,t,r){let i=e[t];if(!i)return;let o=!1;do{if(o=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),n&&o)return i.key;i=i.next}while(i!==void 0)}m(pr,"Tt");b(pr,"forEachForKeyMulti");function We(n,e){let t=n[e];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const i={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:i}}};let r=!1;return{[Symbol.iterator](){return this},next(){return r===!0?{done:!0}:(r=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}m(We,"T$3");b(We,"createIteratorForKey");function ur(n,e){if(n.size===0)return[];if(e==="mixed"||e===n.type)return Array.from(n._edges.keys());const t=e==="undirected"?n.undirectedSize:n.directedSize,r=new Array(t),i=e==="undirected",o=n._edges.values();let a=0,s,d;for(;s=o.next(),s.done!==!0;)d=s.value,d.undirected===i&&(r[a++]=d.key);return r}m(ur,"Pt");b(ur,"createEdgeArray");function gt(n,e,t,r){if(e.size===0)return;const i=t!=="mixed"&&t!==e.type,o=t==="undirected";let a,s,d=!1;const c=e._edges.values();for(;a=c.next(),a.done!==!0;){if(s=a.value,i&&s.undirected!==o)continue;const{key:p,attributes:l,source:u,target:v}=s;if(d=r(p,l,u.key,v.key,u.attributes,v.attributes,s.undirected),n&&d)return p}}m(gt,"at");b(gt,"forEachEdge");function gr(n,e){if(n.size===0)return me();const t=e!=="mixed"&&e!==n.type,r=e==="undirected",i=n._edges.values();return{[Symbol.iterator](){return this},next(){let o,a;for(;;){if(o=i.next(),o.done)return o;if(a=o.value,!(t&&a.undirected!==r))break}return{value:{edge:a.key,attributes:a.attributes,source:a.source.key,target:a.target.key,sourceAttributes:a.source.attributes,targetAttributes:a.target.attributes,undirected:a.undirected},done:!1}}}}m(gr,"Ft");b(gr,"createEdgeIterator");function Be(n,e,t,r,i,o){const a=e?lr:cr;let s;if(t!=="undirected"&&(r!=="out"&&(s=a(n,i.in,o),n&&s)||r!=="in"&&(s=a(n,i.out,o,r?void 0:i.key),n&&s))||t!=="directed"&&(s=a(n,i.undirected,o),n&&s))return s}m(Be,"F$1");b(Be,"forEachEdgeForNode");function fr(n,e,t,r){const i=[];return Be(!1,n,e,t,r,function(o){i.push(o)}),i}m(fr,"Bt");b(fr,"createEdgeArrayForNode");function mr(n,e,t){let r=me();return n!=="undirected"&&(e!=="out"&&typeof t.in<"u"&&(r=oe(r,Pe(t.in))),e!=="in"&&typeof t.out<"u"&&(r=oe(r,Pe(t.out,e?void 0:t.key)))),n!=="directed"&&typeof t.undirected<"u"&&(r=oe(r,Pe(t.undirected))),r}m(mr,"Rt");b(mr,"createEdgeIteratorForNode");function He(n,e,t,r,i,o,a){const s=t?pr:hr;let d;if(e!=="undirected"&&(typeof i.in<"u"&&r!=="out"&&(d=s(n,i.in,o,a),n&&d)||typeof i.out<"u"&&r!=="in"&&(r||i.key!==o)&&(d=s(n,i.out,o,a),n&&d))||e!=="directed"&&typeof i.undirected<"u"&&(d=s(n,i.undirected,o,a),n&&d))return d}m(He,"B");b(He,"forEachEdgeForPath");function br(n,e,t,r,i){const o=[];return He(!1,n,e,t,r,i,function(a){o.push(a)}),o}m(br,"Yt");b(br,"createEdgeArrayForPath");function wr(n,e,t,r){let i=me();return n!=="undirected"&&(typeof t.in<"u"&&e!=="out"&&r in t.in&&(i=oe(i,We(t.in,r))),typeof t.out<"u"&&e!=="in"&&r in t.out&&(e||t.key!==r)&&(i=oe(i,We(t.out,r)))),n!=="directed"&&typeof t.undirected<"u"&&r in t.undirected&&(i=oe(i,We(t.undirected,r))),i}m(wr,"Ht");b(wr,"createEdgeIteratorForPath");function yr(n,e){const{name:t,type:r,direction:i}=e;n.prototype[t]=function(o,a){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];if(!arguments.length)return ur(this,r);if(arguments.length===1){o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new x(`Graph.${t}: could not find the "${o}" node in the graph.`);return fr(this.multi,r==="mixed"?this.type:r,i,s)}if(arguments.length===2){o=""+o,a=""+a;const s=this._nodes.get(o);if(!s)throw new x(`Graph.${t}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(a))throw new x(`Graph.${t}: could not find the "${a}" target node in the graph.`);return br(r,this.multi,i,s,a)}throw new $(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}m(yr,"Jt");b(yr,"attachEdgeArrayCreator");function vr(n,e){const{name:t,type:r,direction:i}=e,o="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(c,p,l){if(!(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)){if(arguments.length===1)return l=c,gt(!1,this,r,l);if(arguments.length===2){c=""+c,l=p;const u=this._nodes.get(c);if(typeof u>"u")throw new x(`Graph.${o}: could not find the "${c}" node in the graph.`);return Be(!1,this.multi,r==="mixed"?this.type:r,i,u,l)}if(arguments.length===3){c=""+c,p=""+p;const u=this._nodes.get(c);if(!u)throw new x(`Graph.${o}: could not find the "${c}" source node in the graph.`);if(!this._nodes.has(p))throw new x(`Graph.${o}: could not find the "${p}" target node in the graph.`);return He(!1,r,this.multi,i,u,p,l)}throw new $(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const a="map"+t[0].toUpperCase()+t.slice(1);n.prototype[a]=function(){const c=Array.prototype.slice.call(arguments),p=c.pop();let l;if(c.length===0){let u=0;r!=="directed"&&(u+=this.undirectedSize),r!=="undirected"&&(u+=this.directedSize),l=new Array(u);let v=0;c.push((S,N,A,I,R,F,z)=>{l[v++]=p(S,N,A,I,R,F,z)})}else l=[],c.push((u,v,S,N,A,I,R)=>{l.push(p(u,v,S,N,A,I,R))});return this[o].apply(this,c),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(){const c=Array.prototype.slice.call(arguments),p=c.pop(),l=[];return c.push((u,v,S,N,A,I,R)=>{p(u,v,S,N,A,I,R)&&l.push(u)}),this[o].apply(this,c),l};const d="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[d]=function(){let c=Array.prototype.slice.call(arguments);if(c.length<2||c.length>4)throw new $(`Graph.${d}: invalid number of arguments (expecting 2, 3 or 4 and got ${c.length}).`);if(typeof c[c.length-1]=="function"&&typeof c[c.length-2]!="function")throw new $(`Graph.${d}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let p,l;c.length===2?(p=c[0],l=c[1],c=[]):c.length===3?(p=c[1],l=c[2],c=[c[0]]):c.length===4&&(p=c[2],l=c[3],c=[c[0],c[1]]);let u=l;return c.push((v,S,N,A,I,R,F)=>{u=p(u,v,S,N,A,I,R,F)}),this[o].apply(this,c),u}}m(vr,"Vt");b(vr,"attachForEachEdge");function xr(n,e){const{name:t,type:r,direction:i}=e,o="find"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(d,c,p){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return!1;if(arguments.length===1)return p=d,gt(!0,this,r,p);if(arguments.length===2){d=""+d,p=c;const l=this._nodes.get(d);if(typeof l>"u")throw new x(`Graph.${o}: could not find the "${d}" node in the graph.`);return Be(!0,this.multi,r==="mixed"?this.type:r,i,l,p)}if(arguments.length===3){d=""+d,c=""+c;const l=this._nodes.get(d);if(!l)throw new x(`Graph.${o}: could not find the "${d}" source node in the graph.`);if(!this._nodes.has(c))throw new x(`Graph.${o}: could not find the "${c}" target node in the graph.`);return He(!0,r,this.multi,i,l,c,p)}throw new $(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const a="some"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[a]=function(){const d=Array.prototype.slice.call(arguments),c=d.pop();return d.push((p,l,u,v,S,N,A)=>c(p,l,u,v,S,N,A)),!!this[o].apply(this,d)};const s="every"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[s]=function(){const d=Array.prototype.slice.call(arguments),c=d.pop();return d.push((p,l,u,v,S,N,A)=>!c(p,l,u,v,S,N,A)),!this[o].apply(this,d)}}m(xr,"qt");b(xr,"attachFindEdge");function kr(n,e){const{name:t,type:r,direction:i}=e,o=t.slice(0,-1)+"Entries";n.prototype[o]=function(a,s){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return me();if(!arguments.length)return gr(this,r);if(arguments.length===1){a=""+a;const d=this._nodes.get(a);if(!d)throw new x(`Graph.${o}: could not find the "${a}" node in the graph.`);return mr(r,i,d)}if(arguments.length===2){a=""+a,s=""+s;const d=this._nodes.get(a);if(!d)throw new x(`Graph.${o}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(s))throw new x(`Graph.${o}: could not find the "${s}" target node in the graph.`);return wr(r,i,d,s)}throw new $(`Graph.${o}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}m(kr,"Qt");b(kr,"attachEdgeIteratorCreator");function Er(n){vi.forEach(e=>{yr(n,e),vr(n,e),xr(n,e),kr(n,e)})}m(Er,"Xt");b(Er,"attachEdgeIterationMethods");const xi=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function Le(){this.A=null,this.B=null}m(Le,"W");b(Le,"CompositeSetWrapper");Le.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};Le.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function $e(n,e,t,r,i){for(const o in r){const a=r[o],s=a.source,d=a.target,c=s===t?d:s;if(e&&e.has(c.key))continue;const p=i(c.key,c.attributes);if(n&&p)return c.key}}m($e,"I$1");b($e,"forEachInObjectOnce");function Ve(n,e,t,r,i){if(e!=="mixed"){if(e==="undirected")return $e(n,null,r,r.undirected,i);if(typeof t=="string")return $e(n,null,r,r[t],i)}const o=new Le;let a;if(e!=="undirected"){if(t!=="out"){if(a=$e(n,null,r,r.in,i),n&&a)return a;o.wrap(r.in)}if(t!=="in"){if(a=$e(n,o,r,r.out,i),n&&a)return a;o.wrap(r.out)}}if(e!=="directed"&&(a=$e(n,o,r,r.undirected,i),n&&a))return a}m(Ve,"R$1");b(Ve,"forEachNeighbor");function $r(n,e,t){if(n!=="mixed"){if(n==="undirected")return Object.keys(t.undirected);if(typeof e=="string")return Object.keys(t[e])}const r=[];return Ve(!1,n,e,t,function(i){r.push(i)}),r}m($r,"te$1");b($r,"createNeighborArrayForNode");function Ge(n,e,t){const r=Object.keys(t),i=r.length;let o=0;return{[Symbol.iterator](){return this},next(){let a=null;do{if(o>=i)return n&&n.wrap(t),{done:!0};const s=t[r[o++]],d=s.source,c=s.target;if(a=d===e?c:d,n&&n.has(a.key)){a=null;continue}}while(a===null);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}}}m(Ge,"j");b(Ge,"createDedupedObjectIterator");function Gr(n,e,t){if(n!=="mixed"){if(n==="undirected")return Ge(null,t,t.undirected);if(typeof e=="string")return Ge(null,t,t[e])}let r=me();const i=new Le;return n!=="undirected"&&(e!=="out"&&(r=oe(r,Ge(i,t,t.in))),e!=="in"&&(r=oe(r,Ge(i,t,t.out)))),n!=="directed"&&(r=oe(r,Ge(i,t,t.undirected))),r}m(Gr,"ee$1");b(Gr,"createNeighborIterator");function Ar(n,e){const{name:t,type:r,direction:i}=e;n.prototype[t]=function(o){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return[];o=""+o;const a=this._nodes.get(o);if(typeof a>"u")throw new x(`Graph.${t}: could not find the "${o}" node in the graph.`);return $r(r==="mixed"?this.type:r,i,a)}}m(Ar,"ie");b(Ar,"attachNeighborArrayCreator");function Sr(n,e){const{name:t,type:r,direction:i}=e,o="forEach"+t[0].toUpperCase()+t.slice(1,-1);n.prototype[o]=function(c,p){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;c=""+c;const l=this._nodes.get(c);if(typeof l>"u")throw new x(`Graph.${o}: could not find the "${c}" node in the graph.`);Ve(!1,r==="mixed"?this.type:r,i,l,p)};const a="map"+t[0].toUpperCase()+t.slice(1);n.prototype[a]=function(c,p){const l=[];return this[o](c,(u,v)=>{l.push(p(u,v))}),l};const s="filter"+t[0].toUpperCase()+t.slice(1);n.prototype[s]=function(c,p){const l=[];return this[o](c,(u,v)=>{p(u,v)&&l.push(u)}),l};const d="reduce"+t[0].toUpperCase()+t.slice(1);n.prototype[d]=function(c,p,l){if(arguments.length<3)throw new $(`Graph.${d}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let u=l;return this[o](c,(v,S)=>{u=p(u,v,S)}),u}}m(Sr,"ne");b(Sr,"attachForEachNeighbor");function Nr(n,e){const{name:t,type:r,direction:i}=e,o=t[0].toUpperCase()+t.slice(1,-1),a="find"+o;n.prototype[a]=function(c,p){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return;c=""+c;const l=this._nodes.get(c);if(typeof l>"u")throw new x(`Graph.${a}: could not find the "${c}" node in the graph.`);return Ve(!0,r==="mixed"?this.type:r,i,l,p)};const s="some"+o;n.prototype[s]=function(c,p){return!!this[a](c,p)};const d="every"+o;n.prototype[d]=function(c,p){return!this[a](c,(l,u)=>!p(l,u))}}m(Nr,"re");b(Nr,"attachFindNeighbor");function Cr(n,e){const{name:t,type:r,direction:i}=e,o=t.slice(0,-1)+"Entries";n.prototype[o]=function(a){if(r!=="mixed"&&this.type!=="mixed"&&r!==this.type)return me();a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new x(`Graph.${o}: could not find the "${a}" node in the graph.`);return Gr(r==="mixed"?this.type:r,i,s)}}m(Cr,"oe");b(Cr,"attachNeighborIteratorCreator");function _r(n){xi.forEach(e=>{Ar(n,e),Sr(n,e),Nr(n,e),Cr(n,e)})}m(_r,"se");b(_r,"attachNeighborIterationMethods");function Ie(n,e,t,r,i){const o=r._nodes.values(),a=r.type;let s,d,c,p,l,u,v;for(;s=o.next(),s.done!==!0;){let S=!1;if(d=s.value,a!=="undirected"){p=d.out;for(c in p){l=p[c];do{if(u=l.target,S=!0,v=i(d.key,u.key,d.attributes,u.attributes,l.key,l.attributes,l.undirected),n&&v)return l;l=l.next}while(l)}}if(a!=="directed"){p=d.undirected;for(c in p)if(!(e&&d.key>c)){l=p[c];do{if(u=l.target,u.key!==c&&(u=l.source),S=!0,v=i(d.key,u.key,d.attributes,u.attributes,l.key,l.attributes,l.undirected),n&&v)return l;l=l.next}while(l)}}if(t&&!S&&(v=i(d.key,null,d.attributes,null,null,null,null),n&&v))return null}}m(Ie,"O");b(Ie,"forEachAdjacency");function Dr(n,e){const t={key:n};return ct(e.attributes)||(t.attributes=V({},e.attributes)),t}m(Dr,"ae");b(Dr,"serializeNode");function Mr(n,e,t){const r={key:e,source:t.source.key,target:t.target.key};return ct(t.attributes)||(r.attributes=V({},t.attributes)),n==="mixed"&&t.undirected&&(r.undirected=!0),r}m(Mr,"ue");b(Mr,"serializeEdge");function Ir(n){if(!K(n))throw new $('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new $("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!K(n.attributes)||n.attributes===null))throw new $("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}m(Ir,"de");b(Ir,"validateSerializedNode");function Lr(n){if(!K(n))throw new $('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new $("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new $("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!K(n.attributes)||n.attributes===null))throw new $("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new $("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}m(Lr,"he");b(Lr,"validateSerializedEdge");const ki=Ot(),Ei=new Set(["directed","undirected","mixed"]),xt=new Set(["domain","_events","_eventsCount","_maxListeners"]),$i=[{name:b(n=>`${n}Edge`,"name"),generateKey:!0},{name:b(n=>`${n}DirectedEdge`,"name"),generateKey:!0,type:"directed"},{name:b(n=>`${n}UndirectedEdge`,"name"),generateKey:!0,type:"undirected"},{name:b(n=>`${n}EdgeWithKey`,"name")},{name:b(n=>`${n}DirectedEdgeWithKey`,"name"),type:"directed"},{name:b(n=>`${n}UndirectedEdgeWithKey`,"name"),type:"undirected"}],Gi={allowSelfLoops:!0,multi:!1,type:"mixed"};function Tr(n,e,t){if(t&&!K(t))throw new $(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(e=""+e,t=t||{},n._nodes.has(e))throw new D(`Graph.addNode: the "${e}" node already exist in the graph.`);const r=new n.NodeDataClass(e,t);return n._nodes.set(e,r),n.emit("nodeAdded",{key:e,attributes:t}),r}m(Tr,"ge");b(Tr,"addNode");function st(n,e,t){const r=new n.NodeDataClass(e,t);return n._nodes.set(e,r),n.emit("nodeAdded",{key:e,attributes:t}),r}m(st,"Z");b(st,"unsafeAddNode");function ft(n,e,t,r,i,o,a,s){if(!r&&n.type==="undirected")throw new D(`Graph.${e}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&n.type==="directed")throw new D(`Graph.${e}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!K(s))throw new $(`Graph.${e}: invalid attributes. Expecting an object but got "${s}"`);if(o=""+o,a=""+a,s=s||{},!n.allowSelfLoops&&o===a)throw new D(`Graph.${e}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const d=n._nodes.get(o),c=n._nodes.get(a);if(!d)throw new x(`Graph.${e}: source node "${o}" not found.`);if(!c)throw new x(`Graph.${e}: target node "${a}" not found.`);const p={key:null,undirected:r,source:o,target:a,attributes:s};if(t)i=n._edgeKeyGenerator();else if(i=""+i,n._edges.has(i))throw new D(`Graph.${e}: the "${i}" edge already exists in the graph.`);if(!n.multi&&(r?typeof d.undirected[a]<"u":typeof d.out[a]<"u"))throw new D(`Graph.${e}: an edge linking "${o}" to "${a}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const l=new be(r,i,d,c,s);n._edges.set(i,l);const u=o===a;return r?(d.undirectedDegree++,c.undirectedDegree++,u&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,c.inDegree++,u&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?l.attachMulti():l.attach(),r?n._undirectedSize++:n._directedSize++,p.key=i,n.emit("edgeAdded",p),i}m(ft,"ut");b(ft,"addEdge");function Or(n,e,t,r,i,o,a,s,d){if(!r&&n.type==="undirected")throw new D(`Graph.${e}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&n.type==="directed")throw new D(`Graph.${e}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s){if(d){if(typeof s!="function")throw new $(`Graph.${e}: invalid updater function. Expecting a function but got "${s}"`)}else if(!K(s))throw new $(`Graph.${e}: invalid attributes. Expecting an object but got "${s}"`)}o=""+o,a=""+a;let c;if(d&&(c=s,s=void 0),!n.allowSelfLoops&&o===a)throw new D(`Graph.${e}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let p=n._nodes.get(o),l=n._nodes.get(a),u,v;if(!t&&(u=n._edges.get(i),u)){if((u.source.key!==o||u.target.key!==a)&&(!r||u.source.key!==a||u.target.key!==o))throw new D(`Graph.${e}: inconsistency detected when attempting to merge the "${i}" edge with "${o}" source & "${a}" target vs. ("${u.source.key}", "${u.target.key}").`);v=u}if(!v&&!n.multi&&p&&(v=r?p.undirected[a]:p.out[a]),v){const R=[v.key,!1,!1,!1];if(d?!c:!s)return R;if(d){const F=v.attributes;v.attributes=c(F),n.emit("edgeAttributesUpdated",{type:"replace",key:v.key,attributes:v.attributes})}else V(v.attributes,s),n.emit("edgeAttributesUpdated",{type:"merge",key:v.key,attributes:v.attributes,data:s});return R}s=s||{},d&&c&&(s=c(s));const S={key:null,undirected:r,source:o,target:a,attributes:s};if(t)i=n._edgeKeyGenerator();else if(i=""+i,n._edges.has(i))throw new D(`Graph.${e}: the "${i}" edge already exists in the graph.`);let N=!1,A=!1;p||(p=st(n,o,{}),N=!0,o===a&&(l=p,A=!0)),l||(l=st(n,a,{}),A=!0),u=new be(r,i,p,l,s),n._edges.set(i,u);const I=o===a;return r?(p.undirectedDegree++,l.undirectedDegree++,I&&(p.undirectedLoops++,n._undirectedSelfLoopCount++)):(p.outDegree++,l.inDegree++,I&&(p.directedLoops++,n._directedSelfLoopCount++)),n.multi?u.attachMulti():u.attach(),r?n._undirectedSize++:n._directedSize++,S.key=i,n.emit("edgeAdded",S),[i,!0,N,A]}m(Or,"ye");b(Or,"mergeEdge");function fe(n,e){n._edges.delete(e.key);const{source:t,target:r,attributes:i}=e,o=e.undirected,a=t===r;o?(t.undirectedDegree--,r.undirectedDegree--,a&&(t.undirectedLoops--,n._undirectedSelfLoopCount--)):(t.outDegree--,r.inDegree--,a&&(t.directedLoops--,n._directedSelfLoopCount--)),n.multi?e.detachMulti():e.detach(),o?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:e.key,attributes:i,source:t.key,target:r.key,undirected:o})}m(fe,"U$1");b(fe,"dropEdgeFromData");let W=class dt extends si{static{m(this,"m")}static{b(this,"Graph")}constructor(e){if(super(),e=V({},Gi,e),typeof e.multi!="boolean")throw new $(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!Ei.has(e.type))throw new $(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!="boolean")throw new $(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);const t=e.type==="mixed"?ht:e.type==="directed"?pt:ut;Z(this,"NodeDataClass",t);const r="geid_"+ki()+"_";let i=0;const o=b(()=>{let a;do a=r+i++;while(this._edges.has(a));return a},"edgeKeyGenerator");Z(this,"_attributes",{}),Z(this,"_nodes",new Map),Z(this,"_edges",new Map),Z(this,"_directedSize",0),Z(this,"_undirectedSize",0),Z(this,"_directedSelfLoopCount",0),Z(this,"_undirectedSelfLoopCount",0),Z(this,"_edgeKeyGenerator",o),Z(this,"_options",e),xt.forEach(a=>Z(this,a,this[a])),re(this,"order",()=>this._nodes.size),re(this,"size",()=>this._edges.size),re(this,"directedSize",()=>this._directedSize),re(this,"undirectedSize",()=>this._undirectedSize),re(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),re(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),re(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),re(this,"multi",this._options.multi),re(this,"type",this._options.type),re(this,"allowSelfLoops",this._options.allowSelfLoops),re(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,t){if(this.type==="undirected")return!1;if(arguments.length===1){const r=""+e,i=this._edges.get(r);return!!i&&!i.undirected}else if(arguments.length===2){e=""+e,t=""+t;const r=this._nodes.get(e);return r?r.out.hasOwnProperty(t):!1}throw new $(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if(this.type==="directed")return!1;if(arguments.length===1){const r=""+e,i=this._edges.get(r);return!!i&&i.undirected}else if(arguments.length===2){e=""+e,t=""+t;const r=this._nodes.get(e);return r?r.undirected.hasOwnProperty(t):!1}throw new $(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(arguments.length===1){const r=""+e;return this._edges.has(r)}else if(arguments.length===2){e=""+e,t=""+t;const r=this._nodes.get(e);return r?typeof r.out<"u"&&r.out.hasOwnProperty(t)||typeof r.undirected<"u"&&r.undirected.hasOwnProperty(t):!1}throw new $(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if(this.type==="undirected")return;if(e=""+e,t=""+t,this.multi)throw new D("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const r=this._nodes.get(e);if(!r)throw new x(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new x(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const i=r.out&&r.out[t]||void 0;if(i)return i.key}undirectedEdge(e,t){if(this.type==="directed")return;if(e=""+e,t=""+t,this.multi)throw new D("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const r=this._nodes.get(e);if(!r)throw new x(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new x(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const i=r.undirected&&r.undirected[t]||void 0;if(i)return i.key}edge(e,t){if(this.multi)throw new D("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new x(`Graph.edge: could not find the "${t}" target node in the graph.`);const i=r.out&&r.out[t]||r.undirected&&r.undirected[t]||void 0;if(i)return i.key}areDirectedNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:t in r.in||t in r.out}areOutNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:t in r.out}areInNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:t in r.in}areUndirectedNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="directed"?!1:t in r.undirected}areNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&(t in r.in||t in r.out)||this.type!=="directed"&&t in r.undirected}areInboundNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&t in r.in||this.type!=="directed"&&t in r.undirected}areOutboundNeighbors(e,t){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new x(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&t in r.out||this.type!=="directed"&&t in r.undirected}inDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=t.undirectedDegree),this.type!=="undirected"&&(r+=t.inDegree),r}outboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=t.undirectedDegree),this.type!=="undirected"&&(r+=t.outDegree),r}degree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.degree: could not find the "${e}" node in the graph.`);let r=0;return this.type!=="directed"&&(r+=t.undirectedDegree),this.type!=="undirected"&&(r+=t.inDegree+t.outDegree),r}inDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=t.undirectedDegree,i+=t.undirectedLoops*2),this.type!=="undirected"&&(r+=t.inDegree,i+=t.directedLoops),r-i}outboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=t.undirectedDegree,i+=t.undirectedLoops*2),this.type!=="undirected"&&(r+=t.outDegree,i+=t.directedLoops),r-i}degreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let r=0,i=0;return this.type!=="directed"&&(r+=t.undirectedDegree,i+=t.undirectedLoops*2),this.type!=="undirected"&&(r+=t.inDegree+t.outDegree,i+=t.directedLoops*2),r-i}source(e){e=""+e;const t=this._edges.get(e);if(!t)throw new x(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=""+e;const t=this._edges.get(e);if(!t)throw new x(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=""+e;const t=this._edges.get(e);if(!t)throw new x(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=""+e,t=""+t;const r=this._edges.get(t);if(!r)throw new x(`Graph.opposite: could not find the "${t}" edge in the graph.`);const i=r.source.key,o=r.target.key;if(e===i)return o;if(e===o)return i;throw new x(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${i}, ${o}).`)}hasExtremity(e,t){e=""+e,t=""+t;const r=this._edges.get(e);if(!r)throw new x(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return r.source.key===t||r.target.key===t}isUndirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new x(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new x(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=""+e;const t=this._edges.get(e);if(!t)throw new x(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){return Tr(this,e,t).key}mergeNode(e,t){if(t&&!K(t))throw new $(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=""+e,t=t||{};let r=this._nodes.get(e);return r?(t&&(V(r.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:r.attributes,data:t})),[e,!1]):(r=new this.NodeDataClass(e,t),this._nodes.set(e,r),this.emit("nodeAdded",{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&typeof t!="function")throw new $(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=""+e;let r=this._nodes.get(e);if(r){if(t){const o=r.attributes;r.attributes=t(o),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:r.attributes})}return[e,!1]}const i=t?t({}):{};return r=new this.NodeDataClass(e,i),this._nodes.set(e,r),this.emit("nodeAdded",{key:e,attributes:i}),[e,!0]}dropNode(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new x(`Graph.dropNode: could not find the "${e}" node in the graph.`);let r;if(this.type!=="undirected"){for(const i in t.out){r=t.out[i];do fe(this,r),r=r.next;while(r)}for(const i in t.in){r=t.in[i];do fe(this,r),r=r.next;while(r)}}if(this.type!=="directed")for(const i in t.undirected){r=t.undirected[i];do fe(this,r),r=r.next;while(r)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){const r=""+arguments[0],i=""+arguments[1];if(t=ee(this,r,i,this.type),!t)throw new x(`Graph.dropEdge: could not find the "${r}" -> "${i}" edge in the graph.`)}else if(e=""+e,t=this._edges.get(e),!t)throw new x(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return fe(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new D("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new D("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,t=""+t;const r=ee(this,e,t,"directed");if(!r)throw new x(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return fe(this,r),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new D("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new D("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const r=ee(this,e,t,"undirected");if(!r)throw new x(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return fe(this,r),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let t;for(;t=e.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,t){if(typeof t!="function")throw new $("Graph.updateAttribute: updater should be a function.");const r=this._attributes[e];return this._attributes[e]=t(r),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!K(e))throw new $("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!K(e))throw new $("Graph.mergeAttributes: provided attributes are not a plain object.");return V(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")throw new $("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if(typeof e!="function")throw new $("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!at(t))throw new $("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,o.attributes=e(o.key,o.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(e,t){if(typeof e!="function")throw new $("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!at(t))throw new $("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const r=this._edges.values();let i,o,a,s;for(;i=r.next(),i.done!==!0;)o=i.value,a=o.source,s=o.target,o.attributes=e(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new $("Graph.forEachAdjacencyEntry: expecting a callback.");Ie(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new $("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Ie(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!="function")throw new $("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Ie(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new $("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Ie(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!="function")throw new $("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let r,i;for(;r=t.next(),r.done!==!0;)i=r.value,e(i.key,i.attributes)}findNode(e){if(typeof e!="function")throw new $("Graph.findNode: expecting a callback.");const t=this._nodes.values();let r,i;for(;r=t.next(),r.done!==!0;)if(i=r.value,e(i.key,i.attributes))return i.key}mapNodes(e){if(typeof e!="function")throw new $("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let r,i;const o=new Array(this.order);let a=0;for(;r=t.next(),r.done!==!0;)i=r.value,o[a++]=e(i.key,i.attributes);return o}someNode(e){if(typeof e!="function")throw new $("Graph.someNode: expecting a callback.");const t=this._nodes.values();let r,i;for(;r=t.next(),r.done!==!0;)if(i=r.value,e(i.key,i.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new $("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let r,i;for(;r=t.next(),r.done!==!0;)if(i=r.value,!e(i.key,i.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new $("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let r,i;const o=[];for(;r=t.next(),r.done!==!0;)i=r.value,e(i.key,i.attributes)&&o.push(i.key);return o}reduceNodes(e,t){if(typeof e!="function")throw new $("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new $("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let r=t;const i=this._nodes.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,r=e(r,a.key,a.attributes);return r}nodeEntries(){const e=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=e.next();if(t.done)return t;const r=t.value;return{value:{node:r.key,attributes:r.attributes},done:!1}}}}export(){const e=new Array(this._nodes.size);let t=0;this._nodes.forEach((i,o)=>{e[t++]=Dr(o,i)});const r=new Array(this._edges.size);return t=0,this._edges.forEach((i,o)=>{r[t++]=Mr(this.type,o,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:r}}import(e,t=!1){if(e instanceof dt)return e.forEachNode((d,c)=>{t?this.mergeNode(d,c):this.addNode(d,c)}),e.forEachEdge((d,c,p,l,u,v,S)=>{t?S?this.mergeUndirectedEdgeWithKey(d,p,l,c):this.mergeDirectedEdgeWithKey(d,p,l,c):S?this.addUndirectedEdgeWithKey(d,p,l,c):this.addDirectedEdgeWithKey(d,p,l,c)}),this;if(!K(e))throw new $("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!K(e.attributes))throw new $("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let r,i,o,a,s;if(e.nodes){if(o=e.nodes,!Array.isArray(o))throw new $("Graph.import: invalid nodes. Expecting an array.");for(r=0,i=o.length;r<i;r++){a=o[r],Ir(a);const{key:d,attributes:c}=a;t?this.mergeNode(d,c):this.addNode(d,c)}}if(e.edges){let d=!1;if(this.type==="undirected"&&(d=!0),o=e.edges,!Array.isArray(o))throw new $("Graph.import: invalid edges. Expecting an array.");for(r=0,i=o.length;r<i;r++){s=o[r],Lr(s);const{source:c,target:p,attributes:l,undirected:u=d}=s;let v;"key"in s?(v=t?u?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:u?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,v.call(this,s.key,c,p,l)):(v=t?u?this.mergeUndirectedEdge:this.mergeDirectedEdge:u?this.addUndirectedEdge:this.addDirectedEdge,v.call(this,c,p,l))}}return this}nullCopy(e){const t=new dt(V({},this._options,e));return t.replaceAttributes(V({},this.getAttributes())),t}emptyCopy(e){const t=this.nullCopy(e);return this._nodes.forEach((r,i)=>{const o=V({},r.attributes);r=new t.NodeDataClass(i,o),t._nodes.set(i,r)}),t}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new D(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new D("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new D("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(e),r=this._edges.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,ft(t,"copy",!1,o.undirected,o.key,o.source.key,o.target.key,V({},o.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((o,a)=>{e[a]=o.attributes});const t={},r={};this._edges.forEach((o,a)=>{const s=o.undirected?"--":"->";let d="",c=o.source.key,p=o.target.key,l;o.undirected&&c>p&&(l=c,c=p,p=l);const u=`(${c})${s}(${p})`;a.startsWith("geid_")?this.multi&&(typeof r[u]>"u"?r[u]=0:r[u]++,d+=`${r[u]}. `):d+=`[${a}]: `,d+=u,t[d]=o.attributes});const i={};for(const o in this)this.hasOwnProperty(o)&&!xt.has(o)&&typeof this[o]!="function"&&typeof o!="symbol"&&(i[o]=this[o]);return i.attributes=this._attributes,i.nodes=e,i.edges=t,Z(i,"constructor",this.constructor),i}};typeof Symbol<"u"&&(W.prototype[Symbol.for("nodejs.util.inspect.custom")]=W.prototype.inspect);$i.forEach(n=>{["add","merge","update"].forEach(e=>{const t=n.name(e),r=e==="add"?ft:Or;n.generateKey?W.prototype[t]=function(i,o,a){return r(this,t,!0,(n.type||this.type)==="undirected",null,i,o,a,e==="update")}:W.prototype[t]=function(i,o,a,s){return r(this,t,!1,(n.type||this.type)==="undirected",i,o,a,s,e==="update")}})});Jt(W);dr(W);Er(W);_r(W);class zr extends W{static{m(this,"Y")}static{b(this,"DirectedGraph")}constructor(e){const t=V({type:"directed"},e);if("multi"in t&&t.multi!==!1)throw new $("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new $('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}let jr=class extends W{static{m(this,"H")}static{b(this,"UndirectedGraph")}constructor(e){const t=V({type:"undirected"},e);if("multi"in t&&t.multi!==!1)throw new $("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new $('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}},Ur=class extends W{static{m(this,"J")}static{b(this,"MultiGraph")}constructor(e){const t=V({multi:!0},e);if("multi"in t&&t.multi!==!0)throw new $("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}};class Rr extends W{static{m(this,"V")}static{b(this,"MultiDirectedGraph")}constructor(e){const t=V({type:"directed",multi:!0},e);if("multi"in t&&t.multi!==!0)throw new $("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new $('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Fr extends W{static{m(this,"q")}static{b(this,"MultiUndirectedGraph")}constructor(e){const t=V({type:"undirected",multi:!0},e);if("multi"in t&&t.multi!==!0)throw new $("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new $('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function we(n){n.from=function(e,t){const r=V({},e.options,t),i=new n(r);return i.import(e),i}}m(we,"C$1");b(we,"attachStaticFromMethod");we(W);we(zr);we(jr);we(Ur);we(Rr);we(Fr);W.Graph=W;W.DirectedGraph=zr;W.UndirectedGraph=jr;W.MultiGraph=Ur;W.MultiDirectedGraph=Rr;W.MultiUndirectedGraph=Fr;W.InvalidArgumentsGraphError=$;W.NotFoundGraphError=x;W.UsageGraphError=D;var rt,kt;function Ai(){if(kt)return rt;kt=1;var n=Object.defineProperty,e=m((t,r)=>n(t,"name",{value:r,configurable:!0}),"e");return rt=e(function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"},"isGraph"),rt}m(Ai,"requireIsGraph");var Me={},Et;function Si(){if(Et)return Me;Et=1;var n=Object.defineProperty,e=m((o,a)=>n(o,"name",{value:a,configurable:!0}),"o");function t(o){return typeof o!="number"||isNaN(o)?1:o}m(t,"coerceWeight"),e(t,"coerceWeight");function r(o,a){var s={},d=e(function(l){return typeof l>"u"?a:l},"coerceToDefault");typeof a=="function"&&(d=a);var c=e(function(l){return d(l[o])},"get"),p=e(function(){return d(void 0)},"returnDefault");return typeof o=="string"?(s.fromAttributes=c,s.fromGraph=function(l,u){return c(l.getNodeAttributes(u))},s.fromEntry=function(l,u){return c(u)}):typeof o=="function"?(s.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},s.fromGraph=function(l,u){return d(o(u,l.getNodeAttributes(u)))},s.fromEntry=function(l,u){return d(o(l,u))}):(s.fromAttributes=p,s.fromGraph=p,s.fromEntry=p),s}m(r,"createNodeValueGetter"),e(r,"createNodeValueGetter");function i(o,a){var s={},d=e(function(l){return typeof l>"u"?a:l},"coerceToDefault");typeof a=="function"&&(d=a);var c=e(function(l){return d(l[o])},"get"),p=e(function(){return d(void 0)},"returnDefault");return typeof o=="string"?(s.fromAttributes=c,s.fromGraph=function(l,u){return c(l.getEdgeAttributes(u))},s.fromEntry=function(l,u){return c(u)},s.fromPartialEntry=s.fromEntry,s.fromMinimalEntry=s.fromEntry):typeof o=="function"?(s.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},s.fromGraph=function(l,u){var v=l.extremities(u);return d(o(u,l.getEdgeAttributes(u),v[0],v[1],l.getNodeAttributes(v[0]),l.getNodeAttributes(v[1]),l.isUndirected(u)))},s.fromEntry=function(l,u,v,S,N,A,I){return d(o(l,u,v,S,N,A,I))},s.fromPartialEntry=function(l,u,v,S){return d(o(l,u,v,S))},s.fromMinimalEntry=function(l,u){return d(o(l,u))}):(s.fromAttributes=p,s.fromGraph=p,s.fromEntry=p,s.fromMinimalEntry=p),s}return m(i,"createEdgeValueGetter"),e(i,"createEdgeValueGetter"),Me.createNodeValueGetter=r,Me.createEdgeValueGetter=i,Me.createEdgeWeightGetter=function(o){return i(o,t)},Me}m(Si,"requireGetters");var it,$t;function Ni(){if($t)return it;$t=1;var n=Object.defineProperty,e=m((_,h)=>n(_,"name",{value:h,configurable:!0}),"$"),t=0,r=1,i=2,o=3,a=4,s=5,d=6,c=7,p=8,l=9,u=0,v=1,S=2,N=0,A=1,I=2,R=3,F=4,z=5,H=6,Q=7,J=8,Ne=3,Y=10,Ye=3,T=9,O=10;return it=e(function(_,h,ye){var Qe,k,g,P,B,he,ve,X,L,Je,ne=h.length,Wr=ye.length,Ce=_.adjustSizes,qr=_.barnesHutTheta*_.barnesHutTheta,Te,q,j,U,se,M,C,f=[];for(g=0;g<ne;g+=Y)h[g+a]=h[g+i],h[g+s]=h[g+o],h[g+i]=0,h[g+o]=0;if(_.outboundAttractionDistribution){for(Te=0,g=0;g<ne;g+=Y)Te+=h[g+d];Te/=ne/Y}if(_.barnesHutOptimize){var pe=1/0,xe=-1/0,ue=1/0,ke=-1/0,te,Ee,Ze;for(g=0;g<ne;g+=Y)pe=Math.min(pe,h[g+t]),xe=Math.max(xe,h[g+t]),ue=Math.min(ue,h[g+r]),ke=Math.max(ke,h[g+r]);var Oe=xe-pe,ze=ke-ue;for(Oe>ze?(ue-=(Oe-ze)/2,ke=ue+Oe):(pe-=(ze-Oe)/2,xe=pe+ze),f[0+N]=-1,f[0+A]=(pe+xe)/2,f[0+I]=(ue+ke)/2,f[0+R]=Math.max(xe-pe,ke-ue),f[0+F]=-1,f[0+z]=-1,f[0+H]=0,f[0+Q]=0,f[0+J]=0,Qe=1,g=0;g<ne;g+=Y)for(k=0,Ze=Ne;;)if(f[k+z]>=0){h[g+t]<f[k+A]?h[g+r]<f[k+I]?te=f[k+z]:te=f[k+z]+T:h[g+r]<f[k+I]?te=f[k+z]+T*2:te=f[k+z]+T*3,f[k+Q]=(f[k+Q]*f[k+H]+h[g+t]*h[g+d])/(f[k+H]+h[g+d]),f[k+J]=(f[k+J]*f[k+H]+h[g+r]*h[g+d])/(f[k+H]+h[g+d]),f[k+H]+=h[g+d],k=te;continue}else if(f[k+N]<0){f[k+N]=g;break}else{if(f[k+z]=Qe*T,X=f[k+R]/2,L=f[k+z],f[L+N]=-1,f[L+A]=f[k+A]-X,f[L+I]=f[k+I]-X,f[L+R]=X,f[L+F]=L+T,f[L+z]=-1,f[L+H]=0,f[L+Q]=0,f[L+J]=0,L+=T,f[L+N]=-1,f[L+A]=f[k+A]-X,f[L+I]=f[k+I]+X,f[L+R]=X,f[L+F]=L+T,f[L+z]=-1,f[L+H]=0,f[L+Q]=0,f[L+J]=0,L+=T,f[L+N]=-1,f[L+A]=f[k+A]+X,f[L+I]=f[k+I]-X,f[L+R]=X,f[L+F]=L+T,f[L+z]=-1,f[L+H]=0,f[L+Q]=0,f[L+J]=0,L+=T,f[L+N]=-1,f[L+A]=f[k+A]+X,f[L+I]=f[k+I]+X,f[L+R]=X,f[L+F]=f[k+F],f[L+z]=-1,f[L+H]=0,f[L+Q]=0,f[L+J]=0,Qe+=4,h[f[k+N]+t]<f[k+A]?h[f[k+N]+r]<f[k+I]?te=f[k+z]:te=f[k+z]+T:h[f[k+N]+r]<f[k+I]?te=f[k+z]+T*2:te=f[k+z]+T*3,f[k+H]=h[f[k+N]+d],f[k+Q]=h[f[k+N]+t],f[k+J]=h[f[k+N]+r],f[te+N]=f[k+N],f[k+N]=-1,h[g+t]<f[k+A]?h[g+r]<f[k+I]?Ee=f[k+z]:Ee=f[k+z]+T:h[g+r]<f[k+I]?Ee=f[k+z]+T*2:Ee=f[k+z]+T*3,te===Ee)if(Ze--){k=te;continue}else{Ze=Ne;break}f[Ee+N]=g;break}}if(_.barnesHutOptimize)for(q=_.scalingRatio,g=0;g<ne;g+=Y)for(k=0;;)if(f[k+z]>=0)if(M=Math.pow(h[g+t]-f[k+Q],2)+Math.pow(h[g+r]-f[k+J],2),Je=f[k+R],4*Je*Je/M<qr){if(j=h[g+t]-f[k+Q],U=h[g+r]-f[k+J],Ce===!0?M>0?(C=q*h[g+d]*f[k+H]/M,h[g+i]+=j*C,h[g+o]+=U*C):M<0&&(C=-q*h[g+d]*f[k+H]/Math.sqrt(M),h[g+i]+=j*C,h[g+o]+=U*C):M>0&&(C=q*h[g+d]*f[k+H]/M,h[g+i]+=j*C,h[g+o]+=U*C),k=f[k+F],k<0)break;continue}else{k=f[k+z];continue}else{if(he=f[k+N],he>=0&&he!==g&&(j=h[g+t]-h[he+t],U=h[g+r]-h[he+r],M=j*j+U*U,Ce===!0?M>0?(C=q*h[g+d]*h[he+d]/M,h[g+i]+=j*C,h[g+o]+=U*C):M<0&&(C=-q*h[g+d]*h[he+d]/Math.sqrt(M),h[g+i]+=j*C,h[g+o]+=U*C):M>0&&(C=q*h[g+d]*h[he+d]/M,h[g+i]+=j*C,h[g+o]+=U*C)),k=f[k+F],k<0)break;continue}else for(q=_.scalingRatio,P=0;P<ne;P+=Y)for(B=0;B<P;B+=Y)j=h[P+t]-h[B+t],U=h[P+r]-h[B+r],Ce===!0?(M=Math.sqrt(j*j+U*U)-h[P+p]-h[B+p],M>0?(C=q*h[P+d]*h[B+d]/M/M,h[P+i]+=j*C,h[P+o]+=U*C,h[B+i]-=j*C,h[B+o]-=U*C):M<0&&(C=100*q*h[P+d]*h[B+d],h[P+i]+=j*C,h[P+o]+=U*C,h[B+i]-=j*C,h[B+o]-=U*C)):(M=Math.sqrt(j*j+U*U),M>0&&(C=q*h[P+d]*h[B+d]/M/M,h[P+i]+=j*C,h[P+o]+=U*C,h[B+i]-=j*C,h[B+o]-=U*C));for(L=_.gravity/_.scalingRatio,q=_.scalingRatio,g=0;g<ne;g+=Y)C=0,j=h[g+t],U=h[g+r],M=Math.sqrt(Math.pow(j,2)+Math.pow(U,2)),_.strongGravityMode?M>0&&(C=q*h[g+d]*L):M>0&&(C=q*h[g+d]*L/M),h[g+i]-=j*C,h[g+o]-=U*C;for(q=1*(_.outboundAttractionDistribution?Te:1),ve=0;ve<Wr;ve+=Ye)P=ye[ve+u],B=ye[ve+v],X=ye[ve+S],se=Math.pow(X,_.edgeWeightInfluence),j=h[P+t]-h[B+t],U=h[P+r]-h[B+r],Ce===!0?(M=Math.sqrt(j*j+U*U)-h[P+p]-h[B+p],_.linLogMode?_.outboundAttractionDistribution?M>0&&(C=-q*se*Math.log(1+M)/M/h[P+d]):M>0&&(C=-q*se*Math.log(1+M)/M):_.outboundAttractionDistribution?M>0&&(C=-q*se/h[P+d]):M>0&&(C=-q*se)):(M=Math.sqrt(Math.pow(j,2)+Math.pow(U,2)),_.linLogMode?_.outboundAttractionDistribution?M>0&&(C=-q*se*Math.log(1+M)/M/h[P+d]):M>0&&(C=-q*se*Math.log(1+M)/M):_.outboundAttractionDistribution?(M=1,C=-q*se/h[P+d]):(M=1,C=-q*se)),M>0&&(h[P+i]+=j*C,h[P+o]+=U*C,h[B+i]-=j*C,h[B+o]-=U*C);var je,_e,Ue,ge,Re,Fe;if(Ce===!0)for(g=0;g<ne;g+=Y)h[g+l]!==1&&(je=Math.sqrt(Math.pow(h[g+i],2)+Math.pow(h[g+o],2)),je>O&&(h[g+i]=h[g+i]*O/je,h[g+o]=h[g+o]*O/je),_e=h[g+d]*Math.sqrt((h[g+a]-h[g+i])*(h[g+a]-h[g+i])+(h[g+s]-h[g+o])*(h[g+s]-h[g+o])),Ue=Math.sqrt((h[g+a]+h[g+i])*(h[g+a]+h[g+i])+(h[g+s]+h[g+o])*(h[g+s]+h[g+o]))/2,ge=.1*Math.log(1+Ue)/(1+Math.sqrt(_e)),Re=h[g+t]+h[g+i]*(ge/_.slowDown),h[g+t]=Re,Fe=h[g+r]+h[g+o]*(ge/_.slowDown),h[g+r]=Fe);else for(g=0;g<ne;g+=Y)h[g+l]!==1&&(_e=h[g+d]*Math.sqrt((h[g+a]-h[g+i])*(h[g+a]-h[g+i])+(h[g+s]-h[g+o])*(h[g+s]-h[g+o])),Ue=Math.sqrt((h[g+a]+h[g+i])*(h[g+a]+h[g+i])+(h[g+s]+h[g+o])*(h[g+s]+h[g+o]))/2,ge=h[g+c]*Math.log(1+Ue)/(1+Math.sqrt(_e)),h[g+c]=Math.min(1,Math.sqrt(ge*(Math.pow(h[g+i],2)+Math.pow(h[g+o],2))/(1+Math.sqrt(_e)))),Re=h[g+t]+h[g+i]*(ge/_.slowDown),h[g+t]=Re,Fe=h[g+r]+h[g+o]*(ge/_.slowDown),h[g+r]=Fe);return{}},"iterate"),it}m(Ni,"requireIterate");var de={},Gt;function Ci(){if(Gt)return de;Gt=1;var n=Object.defineProperty,e=m((i,o)=>n(i,"name",{value:o,configurable:!0}),"y"),t=10,r=3;return de.assign=function(i){i=i||{};var o=Array.prototype.slice.call(arguments).slice(1),a,s,d;for(a=0,d=o.length;a<d;a++)if(o[a])for(s in o[a])i[s]=o[a][s];return i},de.validateSettings=function(i){return"linLogMode"in i&&typeof i.linLogMode!="boolean"?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in i&&typeof i.outboundAttractionDistribution!="boolean"?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in i&&typeof i.adjustSizes!="boolean"?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in i&&typeof i.edgeWeightInfluence!="number"?{message:"the `edgeWeightInfluence` setting should be a number."}:"scalingRatio"in i&&!(typeof i.scalingRatio=="number"&&i.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in i&&typeof i.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in i&&!(typeof i.gravity=="number"&&i.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in i&&!(typeof i.slowDown=="number"||i.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in i&&typeof i.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in i&&!(typeof i.barnesHutTheta=="number"&&i.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},de.graphToByteArrays=function(i,o){var a=i.order,s=i.size,d={},c,p=new Float32Array(a*t),l=new Float32Array(s*r);return c=0,i.forEachNode(function(u,v){d[u]=c,p[c]=v.x,p[c+1]=v.y,p[c+2]=0,p[c+3]=0,p[c+4]=0,p[c+5]=0,p[c+6]=1,p[c+7]=1,p[c+8]=v.size||1,p[c+9]=v.fixed?1:0,c+=t}),c=0,i.forEachEdge(function(u,v,S,N,A,I,R){var F=d[S],z=d[N],H=o(u,v,S,N,A,I,R);p[F+6]+=H,p[z+6]+=H,l[c]=F,l[c+1]=z,l[c+2]=H,c+=r}),{nodes:p,edges:l}},de.assignLayoutChanges=function(i,o,a){var s=0;i.updateEachNodeAttributes(function(d,c){return c.x=o[s],c.y=o[s+1],s+=t,a?a(d,c):c})},de.readGraphPositions=function(i,o){var a=0;i.forEachNode(function(s,d){o[a]=d.x,o[a+1]=d.y,a+=t})},de.collectLayoutChanges=function(i,o,a){for(var s=i.nodes(),d={},c=0,p=0,l=o.length;c<l;c+=t){if(a){var u=Object.assign({},i.getNodeAttributes(s[p]));u.x=o[c],u.y=o[c+1],u=a(s[p],u),d[s[p]]={x:u.x,y:u.y}}else d[s[p]]={x:o[c],y:o[c+1]};p++}return d},de.createWorker=e(function(i){var o=window.URL||window.webkitURL,a=i.toString(),s=o.createObjectURL(new Blob(["("+a+").call(this);"],{type:"text/javascript"})),d=new Worker(s);return o.revokeObjectURL(s),d},"createWorker"),de}m(Ci,"requireHelpers");var nt,At;function _i(){return At||(At=1,nt={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}),nt}m(_i,"requireDefaults");var ot,St;function Di(){if(St)return ot;St=1;var n=Object.defineProperty,e=m((p,l)=>n(p,"name",{value:l,configurable:!0}),"a"),t=Ai(),r=Si().createEdgeWeightGetter,i=Ni(),o=Ci(),a=_i();function s(p,l,u){if(!t(l))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");typeof u=="number"&&(u={iterations:u});var v=u.iterations;if(typeof v!="number")throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(v<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var S=r("getEdgeWeight"in u?u.getEdgeWeight:"weight").fromEntry,N=typeof u.outputReducer=="function"?u.outputReducer:null,A=o.assign({},a,u.settings),I=o.validateSettings(A);if(I)throw new Error("graphology-layout-forceatlas2: "+I.message);var R=o.graphToByteArrays(l,S),F;for(F=0;F<v;F++)i(A,R.nodes,R.edges);if(p){o.assignLayoutChanges(l,R.nodes,N);return}return o.collectLayoutChanges(l,R.nodes)}m(s,"abstractSynchronousLayout"),e(s,"abstractSynchronousLayout");function d(p){var l=typeof p=="number"?p:p.order;return{barnesHutOptimize:l>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(l)}}m(d,"inferSettings"),e(d,"inferSettings");var c=s.bind(null,!1);return c.assign=s.bind(null,!0),c.inferSettings=d,ot=c,ot}m(Di,"requireGraphologyLayoutForceatlas2");var Mi=Di();const Nt=di(Mi);var Ii=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:""}}}@layer theme{:root,:host{--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--leading-tight:1.25;--leading-snug:1.375;--radius-sm:.25rem;--ease-out:cubic-bezier(0, 0, .2, 1);--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--sans);--default-mono-font-family:var(--mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--bg:#f5f5f5;--panel:#fff;--panel2:#f0f0f0;--fg:#000;--muted:#555;--faint:#707070;--border:#e0e0e0;--border2:#bdbdbd;--row-hover:#f0f0f0;--accent:#d71921;--accent-soft:#d719210d;--link:#0050c0;--node-app:#000;--node-lib:#707070;--edge:#bdbdbd;--edge-faint:#e0e0e0;--mono:ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;--sans:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif}@media (prefers-color-scheme:dark){:root{--bg:#141414;--panel:#1c1c1c;--panel2:#242424;--fg:#fff;--muted:#b8b8b8;--faint:#8a8a8a;--border:#2e2e2e;--border2:#3e3e3e;--row-hover:#1f1f1f;--accent:#ff4d54;--accent-soft:#ff4d5414;--link:#7eb0f9;--node-app:#fff;--node-lib:#8a8a8a;--edge:#3e3e3e;--edge-faint:#2e2e2e}}html[data-theme=light]{--bg:#f5f5f5;--panel:#fff;--panel2:#f0f0f0;--fg:#000;--muted:#555;--faint:#707070;--border:#e0e0e0;--border2:#bdbdbd;--row-hover:#f0f0f0;--accent:#d71921;--accent-soft:#d719210d;--link:#0050c0;--node-app:#000;--node-lib:#707070;--edge:#bdbdbd;--edge-faint:#e0e0e0}html[data-theme=dark]{--bg:#141414;--panel:#1c1c1c;--panel2:#242424;--fg:#fff;--muted:#b8b8b8;--faint:#8a8a8a;--border:#2e2e2e;--border2:#3e3e3e;--row-hover:#1f1f1f;--accent:#ff4d54;--accent-soft:#ff4d5414;--link:#7eb0f9;--node-app:#fff;--node-lib:#8a8a8a;--edge:#3e3e3e;--edge-faint:#2e2e2e}body{background-image:radial-gradient(circle, var(--border) .5px, transparent .5px);font-feature-settings:"ss01";background-size:14px 14px}}@layer components{.tbtn-theme [data-icon=moon]{display:inline-flex}.tbtn-theme [data-icon=sun]{display:none}@media (prefers-color-scheme:dark){.tbtn-theme [data-icon=moon]{display:none}.tbtn-theme [data-icon=sun]{display:inline-flex}}html[data-theme=light] .tbtn-theme [data-icon=moon]{display:inline-flex}html[data-theme=light] .tbtn-theme [data-icon=sun],html[data-theme=dark] .tbtn-theme [data-icon=moon]{display:none}html[data-theme=dark] .tbtn-theme [data-icon=sun]{display:inline-flex}.anolilab-logo{width:auto;height:13px;fill:var(--fg)}.anolilab-accent{fill:#dfff1b}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-0{left:calc(var(--spacing) * 0)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.z-20{z-index:20}.z-30{z-index:30}.z-\\[2\\]{z-index:2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-12{margin-inline:calc(var(--spacing) * 12)}.mx-\\[0\\.12em\\]{margin-inline:.12em}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-12{margin-top:calc(var(--spacing) * 12)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-\\[7px\\]{width:7px;height:7px}.h-2{height:calc(var(--spacing) * 2)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-\\[6px\\]{height:6px}.h-\\[7px\\]{height:7px}.h-\\[8px\\]{height:8px}.h-\\[10px\\]{height:10px}.h-\\[18px\\]{height:18px}.h-full{height:100%}.h-px{height:1px}.max-h-72{max-height:calc(var(--spacing) * 72)}.min-h-\\[400px\\]{min-height:400px}.min-h-\\[480px\\]{min-height:480px}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-7{width:calc(var(--spacing) * 7)}.w-9{width:calc(var(--spacing) * 9)}.w-\\[7px\\]{width:7px}.w-\\[8px\\]{width:8px}.w-full{width:100%}.w-px{width:1px}.max-w-\\[380px\\]{max-width:380px}.max-w-\\[1080px\\]{max-width:1080px}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-\\[200px\\]{min-width:200px}.min-w-\\[220px\\]{min-width:220px}.min-w-\\[260px\\]{min-width:260px}.flex-1{flex:1}.flex-\\[1_1_280px\\]{flex:280px}.flex-auto{flex:auto}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[72px_1fr\\]{grid-template-columns:72px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-12{gap:calc(var(--spacing) * 12)}.gap-16{gap:calc(var(--spacing) * 16)}.gap-\\[0\\.65rem\\]{gap:.65rem}.gap-\\[2px\\]{gap:2px}.gap-\\[7px\\]{gap:7px}.gap-px{gap:1px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/60{border-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/60{border-color:color-mix(in oklab, var(--accent) 60%, transparent)}}.border-border{border-color:var(--border)}.border-border2{border-color:var(--border2)}.border-fg{border-color:var(--fg)}.border-link{border-color:var(--link)}.bg-accent{background-color:var(--accent)}.bg-accent-soft{background-color:var(--accent-soft)}.bg-accent\\/40{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/40{background-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.bg-bg,.bg-bg\\/40{background-color:var(--bg)}@supports (color:color-mix(in lab, red, red)){.bg-bg\\/40{background-color:color-mix(in oklab, var(--bg) 40%, transparent)}}.bg-border{background-color:var(--border)}.bg-border2{background-color:var(--border2)}.bg-edge{background-color:var(--edge)}.bg-edge-faint{background-color:var(--edge-faint)}.bg-fg{background-color:var(--fg)}.bg-node-app{background-color:var(--node-app)}.bg-node-lib{background-color:var(--node-lib)}.bg-panel,.bg-panel\\/95{background-color:var(--panel)}@supports (color:color-mix(in lab, red, red)){.bg-panel\\/95{background-color:color-mix(in oklab, var(--panel) 95%, transparent)}}.bg-panel2{background-color:var(--panel2)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-12{padding-inline:calc(var(--spacing) * 12)}.px-\\[5px\\]{padding-inline:5px}.px-\\[6px\\]{padding-inline:6px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-\\[3px\\]{padding-block:3px}.py-px{padding-block:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-7{padding-top:calc(var(--spacing) * 7)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pr-0{padding-right:calc(var(--spacing) * 0)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pl-0{padding-left:calc(var(--spacing) * 0)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-\\[7px\\]{padding-left:7px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[22px\\]{font-size:22px}.text-\\[28px\\]{font-size:28px}.text-\\[44px\\]{font-size:44px}.text-\\[72px\\]{font-size:72px}.text-\\[clamp\\(28px\\,5vw\\,52px\\)\\]{font-size:clamp(28px,5vw,52px)}.leading-\\[0\\.9\\]{--tw-leading:.9;line-height:.9}.leading-none{--tw-leading:1;line-height:1}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[-0\\.02em\\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\\[0\\.1em\\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\\[0\\.11em\\]{--tw-tracking:.11em;letter-spacing:.11em}.tracking-\\[0\\.12em\\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\\[0\\.15em\\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-\\[0\\.16em\\]{--tw-tracking:.16em;letter-spacing:.16em}.tracking-\\[0\\.22em\\]{--tw-tracking:.22em;letter-spacing:.22em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-accent{color:var(--accent)}.text-bg{color:var(--bg)}.text-faint{color:var(--faint)}.text-fg{color:var(--fg)}.text-link{color:var(--link)}.text-muted{color:var(--muted)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.opacity-40{opacity:.4}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 4px 12px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.12\\)\\]{--tw-shadow:0 8px 24px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-0{outline-style:var(--tw-outline-style);outline-width:0}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.select-none{-webkit-user-select:none;user-select:none}.group-data-\\[state\\=off\\]\\:opacity-30:is(:where(.group)[data-state=off] *){opacity:.3}.placeholder\\:text-faint::placeholder{color:var(--faint)}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:left-0:before{content:var(--tw-content);left:calc(var(--spacing) * 0)}.before\\:text-faint:before{content:var(--tw-content);color:var(--faint)}.before\\:content-\\[\\'→\\'\\]:before{--tw-content:"→";content:var(--tw-content)}.after\\:ml-auto:after{content:var(--tw-content);margin-left:auto}.after\\:font-mono:after{content:var(--tw-content);font-family:var(--mono)}.after\\:text-\\[9px\\]:after{content:var(--tw-content);font-size:9px}.after\\:tracking-\\[0\\.1em\\]:after{content:var(--tw-content);--tw-tracking:.1em;letter-spacing:.1em}.after\\:text-accent:after{content:var(--tw-content);color:var(--accent)}.after\\:content-\\[\\'ON\\'\\]:after{--tw-content:"ON";content:var(--tw-content)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\\:border-fg:focus-within{border-color:var(--fg)}@media (hover:hover){.hover\\:border-fg:hover{border-color:var(--fg)}.hover\\:bg-accent:hover{background-color:var(--accent)}.hover\\:bg-row-hover:hover{background-color:var(--row-hover)}.hover\\:text-accent:hover{color:var(--accent)}.hover\\:text-fg:hover{color:var(--fg)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-90:hover{opacity:.9}}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-fg:focus-visible{--tw-ring-color:var(--fg)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-40:disabled{opacity:.4}.aria-selected\\:bg-row-hover[aria-selected=true]{background-color:var(--row-hover)}.data-\\[open\\=false\\]\\:hidden[data-open=false]{display:none}.data-\\[pinned\\=true\\]\\:pointer-events-auto[data-pinned=true]{pointer-events:auto}.data-\\[pinned\\=true\\]\\:border-accent[data-pinned=true]{border-color:var(--accent)}.data-\\[state\\=off\\]\\:text-faint[data-state=off]{color:var(--faint)}.data-\\[state\\=off\\]\\:line-through[data-state=off]{text-decoration-line:line-through}.data-\\[state\\=off\\]\\:after\\:text-faint[data-state=off]:after{content:var(--tw-content);color:var(--faint)}.data-\\[state\\=off\\]\\:after\\:content-\\[\\'OFF\\'\\][data-state=off]:after{--tw-content:"OFF";content:var(--tw-content)}.data-\\[state\\=selected\\]\\:bg-row-hover[data-state=selected]{background-color:var(--row-hover)}.data-\\[state\\=zero\\]\\:text-accent[data-state=zero]{color:var(--accent)}@media (min-width:40rem){.sm\\:min-w-\\[320px\\]{min-width:320px}}@media (min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\\:grid-cols-\\[1\\.4fr_1fr\\]{grid-template-columns:1.4fr 1fr}}.\\[\\&_svg\\]\\:size-\\[14px\\] svg{width:14px;height:14px}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\]\\:border-b-0 tr{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\\[\\&\\>\\*\\+\\*\\]\\:ml-6>*+*{margin-left:calc(var(--spacing) * 6)}.\\[\\&\\>\\*\\+\\*\\]\\:border-l>*+*{border-left-style:var(--tw-border-style);border-left-width:1px}.\\[\\&\\>\\*\\+\\*\\]\\:border-border>*+*{border-color:var(--border)}.\\[\\&\\>\\*\\+\\*\\]\\:pl-6>*+*{padding-left:calc(var(--spacing) * 6)}.\\[\\&\\>td\\]\\:border-b>td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\\[\\&\\>td\\]\\:border-border>td{border-color:var(--border)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}`,Li=Object.defineProperty,Ke=m((n,e)=>Li(n,"name",{value:e,configurable:!0}),"d$1");const Ti=Ii,Oi=ni(import.meta.url),Xe=Ke((n,e)=>{const t=Oi.resolve(n);return Kr(oi(ai(t),e),"utf8")},"readUmd"),zi=Xe("sigma","sigma.min.js"),ji=Xe("graphology","graphology.umd.min.js"),Ui=Xe("@floating-ui/core","floating-ui.core.umd.min.js"),Ri=Xe("@floating-ui/dom","floating-ui.dom.umd.min.js"),Fi='<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>',Pi='<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41M2 12h2m16 0h2M4.93 19.07l1.41-1.41m11.32-11.32 1.41-1.41"/></svg>',ce=Ke(n=>n.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"escapeHtml"),Wi=9,qi=4,Bi=Ke((n,e)=>{if(n.length===0)return[];const t=new W({multi:!0,type:"directed"});for(const o of n){const a=t.order/n.length*Math.PI*2;t.addNode(o.name,{path:o.path,size:o.type==="application"?Wi:qi,type:o.type,x:Math.cos(a),y:Math.sin(a)})}for(const o of e)t.hasNode(o.source)&&t.hasNode(o.target)&&t.addEdge(o.source,o.target,{type:o.type});const r=Nt.inferSettings(t);Nt.assign(t,{iterations:600,settings:{...r,adjustSizes:!0,barnesHutOptimize:t.order>100,gravity:1.2,linLogMode:!0,scalingRatio:8,slowDown:4}});const i=[];return t.forEachNode((o,a)=>{i.push({name:o,path:a.path,size:a.size,type:a.type,x:a.x,y:a.y})}),i},"computeLayout"),Hi=Ke(n=>{const e=n.now??new Date,t=n.nodes.filter(p=>p.type==="application").length,r=n.nodes.length-t,i=Bi(n.nodes,n.edges),o=new Set(i.map(p=>p.name)),a=n.edges.filter(p=>o.has(p.source)&&o.has(p.target)),s={edges:a,nodes:i},d=n.nodes.length===0,c={chip:"font-mono tracking-[0.08em] text-muted border border-border2 inline-flex h-7 items-center justify-center rounded-[4px] px-3 text-[11px] font-medium uppercase",dvNum:"font-mono text-[22px] font-medium text-fg leading-none",labelMono:"font-mono text-[10px] uppercase tracking-[0.15em] text-faint"};return`<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
+
<title>${ce(n.tool.name)} graph · ${ce(e.toISOString().slice(0,10))}</title>
|
|
8
|
+
<style>${Ti}</style>
|
|
9
|
+
</head>
|
|
10
|
+
<body class="bg-bg text-fg">
|
|
11
|
+
<div class="min-h-screen flex flex-col">
|
|
12
|
+
<header class="flex flex-wrap items-end gap-4 px-8 pt-8 pb-5">
|
|
13
|
+
<div class="font-sans text-[clamp(28px,5vw,52px)] font-semibold text-fg leading-none tracking-tight">${(()=>{const[p,...l]=n.tool.name.split("-");return l.length>0?`${ce(p??n.tool.name)}<span class="text-accent mx-[0.12em] font-light">/</span>${ce(l.join("-"))}`:ce(n.tool.name)})()}<span class="font-mono tracking-[0.22em] text-faint mt-3 block text-[10px] font-medium uppercase">dependency graph</span></div>
|
|
14
|
+
<span class="flex-auto"></span>
|
|
15
|
+
<span class="${c.chip}">v${ce(n.tool.version)}</span>
|
|
16
|
+
<button id="theme" class="tbtn-theme font-mono text-muted border border-border2 inline-flex h-7 w-9 cursor-pointer items-center justify-center rounded-[4px] bg-transparent transition-colors duration-150 hover:text-fg hover:border-fg" type="button" aria-label="Toggle color theme" title="Toggle color theme"><span data-icon="moon" class="items-center justify-center">${Fi}</span><span data-icon="sun" class="items-center justify-center">${Pi}</span></button>
|
|
17
|
+
</header>
|
|
18
|
+
<div class="flex flex-wrap items-end gap-6 px-8 pt-5 pb-5 border-b border-border">
|
|
19
|
+
<div class="flex flex-wrap items-stretch gap-0 [&>*+*]:pl-6 [&>*+*]:ml-6 [&>*+*]:border-l [&>*+*]:border-border">
|
|
20
|
+
<div class="flex items-baseline gap-[0.65rem]"><span class="${c.labelMono}">apps</span><span class="${c.dvNum}">${String(t)}</span></div>
|
|
21
|
+
<div class="flex items-baseline gap-[0.65rem]"><span class="${c.labelMono}">libraries</span><span class="${c.dvNum}">${String(r)}</span></div>
|
|
22
|
+
<div class="flex items-baseline gap-[0.65rem]"><span class="${c.labelMono}">dependencies</span><span class="${c.dvNum}">${String(a.length)}</span></div>
|
|
23
|
+
</div>
|
|
24
|
+
<span class="flex-auto"></span>
|
|
25
|
+
<div class="relative min-w-[260px] sm:min-w-[320px] ml-auto">
|
|
26
|
+
<label class="flex items-center gap-3 border-b border-border2 transition-colors duration-150 hover:border-fg focus-within:border-fg pb-1.5">
|
|
27
|
+
<span class="${c.labelMono} select-none">find:</span>
|
|
28
|
+
<input id="filter" type="search" class="w-full min-w-0 border-0 bg-transparent py-0.5 text-fg text-[12px] font-mono outline-0 placeholder:text-faint" placeholder="package name…" aria-label="Filter packages" autocomplete="off" spellcheck="false" />
|
|
29
|
+
<span id="filter-count" data-state="" class="font-mono text-faint text-[10px] tracking-[0.05em] shrink-0 select-none data-[state=zero]:text-accent" aria-live="polite"></span>
|
|
30
|
+
</label>
|
|
31
|
+
<div id="filter-results" data-open="false" class="data-[open=false]:hidden absolute z-20 top-full left-0 right-0 mt-2 bg-panel border border-border max-h-72 overflow-y-auto shadow-[0_4px_12px_rgba(0,0,0,0.08)]" role="listbox" aria-label="Matching packages"></div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<main class="relative flex-1 min-h-[480px]">${d?'<div class="flex flex-col items-center justify-center min-h-[400px] gap-4 text-center"><div class="font-sans text-[72px] font-semibold text-fg leading-none tracking-tight">NONE</div><div class="font-mono text-faint text-[12px] uppercase tracking-[0.15em]">No projects discovered in this workspace.</div></div>':`<div id="graph" class="absolute inset-0"></div>
|
|
35
|
+
<div id="tooltip" data-pinned="false" class="fixed z-30 top-0 left-0 hidden bg-panel border border-border2 px-4 py-3 max-w-[380px] pointer-events-none font-sans shadow-[0_8px_24px_rgba(0,0,0,0.12)] data-[pinned=true]:pointer-events-auto data-[pinned=true]:border-accent"></div>
|
|
36
|
+
<div id="legend" class="absolute top-4 right-4 bg-panel/95 backdrop-blur-sm border border-border px-4 py-3 min-w-[200px]">
|
|
37
|
+
<div class="${c.labelMono} mb-2">Filter</div>
|
|
38
|
+
<div data-toggle="app" data-state="on" class="group flex items-center gap-3 py-1 cursor-pointer text-[12px] text-fg select-none transition-colors hover:text-accent data-[state=off]:line-through data-[state=off]:text-faint after:content-['ON'] after:font-mono after:text-[9px] after:tracking-[0.1em] after:ml-auto after:text-accent data-[state=off]:after:content-['OFF'] data-[state=off]:after:text-faint" role="switch" aria-checked="true" tabindex="0"><span class="inline-block w-2 h-2 rounded-full bg-node-app shrink-0 group-data-[state=off]:opacity-30"></span>Application</div>
|
|
39
|
+
<div data-toggle="lib" data-state="on" class="group flex items-center gap-3 py-1 cursor-pointer text-[12px] text-fg select-none transition-colors hover:text-accent data-[state=off]:line-through data-[state=off]:text-faint after:content-['ON'] after:font-mono after:text-[9px] after:tracking-[0.1em] after:ml-auto after:text-accent data-[state=off]:after:content-['OFF'] data-[state=off]:after:text-faint" role="switch" aria-checked="true" tabindex="0"><span class="inline-block w-2 h-2 rounded-full bg-node-lib shrink-0 group-data-[state=off]:opacity-30"></span>Library</div>
|
|
40
|
+
<div data-toggle="prod" data-state="on" class="group flex items-center gap-3 py-1 cursor-pointer text-[12px] text-fg select-none transition-colors hover:text-accent data-[state=off]:line-through data-[state=off]:text-faint after:content-['ON'] after:font-mono after:text-[9px] after:tracking-[0.1em] after:ml-auto after:text-accent data-[state=off]:after:content-['OFF'] data-[state=off]:after:text-faint" role="switch" aria-checked="true" tabindex="0"><span class="inline-block w-4 h-px bg-edge shrink-0 group-data-[state=off]:opacity-30"></span>Static dep</div>
|
|
41
|
+
<div data-toggle="dev" data-state="on" class="group flex items-center gap-3 py-1 cursor-pointer text-[12px] text-fg select-none transition-colors hover:text-accent data-[state=off]:line-through data-[state=off]:text-faint after:content-['ON'] after:font-mono after:text-[9px] after:tracking-[0.1em] after:ml-auto after:text-accent data-[state=off]:after:content-['OFF'] data-[state=off]:after:text-faint" role="switch" aria-checked="true" tabindex="0"><span class="inline-block w-4 h-px bg-edge-faint shrink-0 group-data-[state=off]:opacity-30"></span>Dev / implicit</div>
|
|
42
|
+
<div data-toggle="peer" data-state="on" class="group flex items-center gap-3 py-1 cursor-pointer text-[12px] text-fg select-none transition-colors hover:text-accent data-[state=off]:line-through data-[state=off]:text-faint after:content-['ON'] after:font-mono after:text-[9px] after:tracking-[0.1em] after:ml-auto after:text-accent data-[state=off]:after:content-['OFF'] data-[state=off]:after:text-faint" role="switch" aria-checked="true" tabindex="0"><span class="inline-block w-4 h-px bg-accent shrink-0 group-data-[state=off]:opacity-30"></span>Peer</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="absolute bottom-4 left-4 flex flex-wrap items-center gap-x-6 gap-y-2 bg-panel/95 backdrop-blur-sm border border-border px-4 py-2 font-mono text-[10px] uppercase tracking-[0.15em] text-faint">
|
|
45
|
+
<div class="flex items-center gap-2"><span class="inline-flex h-5 min-w-5 items-center justify-center px-1.5 border border-border2 rounded text-fg bg-panel2 normal-case tracking-normal text-[10px]">/</span><span>Search</span></div>
|
|
46
|
+
<div class="flex items-center gap-2"><span class="inline-flex h-5 min-w-5 items-center justify-center px-1.5 border border-border2 rounded text-fg bg-panel2 normal-case tracking-normal text-[10px]">R</span><span>Fit view</span></div>
|
|
47
|
+
<div class="flex items-center gap-2"><span class="inline-flex h-5 min-w-5 items-center justify-center px-1.5 border border-border2 rounded text-fg bg-panel2 normal-case tracking-normal text-[10px]">Click</span><span>Pin · click empty to unpin</span></div>
|
|
48
|
+
</div>`}</main>
|
|
49
|
+
<footer class="flex flex-wrap items-center justify-between gap-x-6 gap-y-3 px-8 py-4 text-[10px] uppercase border-t border-border font-mono text-faint tracking-[0.1em]">
|
|
50
|
+
<span><b class="text-fg font-semibold">${ce(n.tool.name)}</b> ${ce(n.tool.version)} · generated ${ce(e.toISOString())}</span>
|
|
51
|
+
<span class="inline-flex items-center gap-2"><span>built by</span><a class="sig-by-link inline-flex items-center" href="https://anolilab.com" rel="noreferrer noopener" target="_blank" aria-label="Anolilab">${ci}</a></span>
|
|
52
|
+
</footer>
|
|
53
|
+
</div>
|
|
54
|
+
<script>${ji}<\/script>
|
|
55
|
+
<script>${zi}<\/script>
|
|
56
|
+
<script>${Ui}<\/script>
|
|
57
|
+
<script>${Ri}<\/script>
|
|
58
|
+
<script>
|
|
59
|
+
(() => {
|
|
60
|
+
const root = document.documentElement;
|
|
61
|
+
const themeBtn = document.getElementById('theme');
|
|
62
|
+
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const stored = localStorage.getItem('vis-graph-theme');
|
|
66
|
+
if (stored === 'light' || stored === 'dark') {
|
|
67
|
+
root.dataset.theme = stored;
|
|
68
|
+
}
|
|
69
|
+
} catch {}
|
|
70
|
+
|
|
71
|
+
const data = ${JSON.stringify(s).replaceAll("</",String.raw`<\/`)};
|
|
72
|
+
if (!data.nodes.length || !window.graphology || !window.Sigma) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Reusable Tailwind utility-class strings for dynamically-created elements.
|
|
77
|
+
// Inline-everywhere is the system of record; these strings only exist
|
|
78
|
+
// because the JS DOM API can't read Tailwind from the markup.
|
|
79
|
+
const CLS = {
|
|
80
|
+
ttlName: 'font-sans text-fg text-[13px] font-semibold leading-tight mb-1 break-words',
|
|
81
|
+
ttlType: 'font-mono text-faint text-[10px] uppercase tracking-[0.15em]',
|
|
82
|
+
ttlPath: 'font-mono text-muted text-[10px] mt-2 break-all',
|
|
83
|
+
ttlSection: 'font-mono text-faint text-[10px] uppercase tracking-[0.15em] mt-3 mb-1',
|
|
84
|
+
ttlEmpty: 'font-mono text-faint text-[10px] italic mt-2',
|
|
85
|
+
ttlMore: 'font-mono text-faint text-[10px] italic pl-3 mt-1',
|
|
86
|
+
ttlUl: 'mt-1 space-y-0.5',
|
|
87
|
+
ttlLi: "font-mono text-fg text-[11px] leading-snug pl-3 relative before:content-['→'] before:text-faint before:absolute before:left-0",
|
|
88
|
+
matchItem: 'flex items-center justify-between gap-3 px-3 py-2 cursor-pointer text-[12px] hover:bg-row-hover aria-selected:bg-row-hover',
|
|
89
|
+
miName: 'font-sans text-fg truncate',
|
|
90
|
+
miMark: 'bg-accent-soft text-accent rounded-sm px-0.5',
|
|
91
|
+
miKind: 'font-mono text-faint text-[10px] uppercase tracking-[0.15em] shrink-0',
|
|
92
|
+
matchEmpty: 'font-mono text-faint text-[10px] uppercase tracking-[0.15em] px-3 py-3',
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// Read live colors from the rendered CSS so theme switches stay in one
|
|
96
|
+
// place: change vars → call sigma.refresh() and node/edge colors update.
|
|
97
|
+
const css = () => {
|
|
98
|
+
const s = getComputedStyle(root);
|
|
99
|
+
return {
|
|
100
|
+
app: s.getPropertyValue('--node-app').trim(),
|
|
101
|
+
lib: s.getPropertyValue('--node-lib').trim(),
|
|
102
|
+
edge: s.getPropertyValue('--edge').trim(),
|
|
103
|
+
edgeFaint: s.getPropertyValue('--edge-faint').trim(),
|
|
104
|
+
accent: s.getPropertyValue('--accent').trim(),
|
|
105
|
+
fg: s.getPropertyValue('--fg').trim(),
|
|
106
|
+
muted: s.getPropertyValue('--muted').trim(),
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
let theme = css();
|
|
111
|
+
|
|
112
|
+
const Graph = window.graphology.Graph || window.graphology;
|
|
113
|
+
const graph = new Graph({ multi: true, type: 'directed' });
|
|
114
|
+
|
|
115
|
+
const colorForNode = (type) => type === 'application' ? theme.app : theme.lib;
|
|
116
|
+
const colorForEdge = (type) => {
|
|
117
|
+
if (type === 'peerDependency') return theme.accent;
|
|
118
|
+
if (type === 'devDependency' || type === 'implicit') return theme.edgeFaint;
|
|
119
|
+
return theme.edge;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// Attribute is named "kind", not "type": sigma reads node.type as its
|
|
123
|
+
// program-class name and bails when it sees "application" / "library".
|
|
124
|
+
for (const n of data.nodes) {
|
|
125
|
+
graph.addNode(n.name, {
|
|
126
|
+
x: n.x,
|
|
127
|
+
y: n.y,
|
|
128
|
+
size: n.size,
|
|
129
|
+
label: n.name,
|
|
130
|
+
kind: n.type,
|
|
131
|
+
path: n.path,
|
|
132
|
+
color: colorForNode(n.type),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
for (const e of data.edges) {
|
|
137
|
+
graph.addEdge(e.source, e.target, {
|
|
138
|
+
color: colorForEdge(e.type),
|
|
139
|
+
depType: e.type,
|
|
140
|
+
size: 1,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Adjacency for tooltip & hover-emphasis.
|
|
145
|
+
const depMap = {}, rdepMap = {};
|
|
146
|
+
for (const n of data.nodes) { depMap[n.name] = []; rdepMap[n.name] = []; }
|
|
147
|
+
for (const e of data.edges) {
|
|
148
|
+
depMap[e.source].push(e.target);
|
|
149
|
+
rdepMap[e.target].push(e.source);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const container = document.getElementById('graph');
|
|
153
|
+
const tooltip = document.getElementById('tooltip');
|
|
154
|
+
const filterInput = document.getElementById('filter');
|
|
155
|
+
const filterCount = document.getElementById('filter-count');
|
|
156
|
+
const filterResults = document.getElementById('filter-results');
|
|
157
|
+
|
|
158
|
+
const renderer = new window.Sigma(graph, container, {
|
|
159
|
+
renderEdgeLabels: false,
|
|
160
|
+
labelColor: { color: theme.fg },
|
|
161
|
+
labelFont: 'system-ui, -apple-system, sans-serif',
|
|
162
|
+
labelSize: 11,
|
|
163
|
+
labelWeight: '500',
|
|
164
|
+
labelDensity: 0.7,
|
|
165
|
+
labelGridCellSize: 80,
|
|
166
|
+
defaultEdgeColor: theme.edge,
|
|
167
|
+
defaultNodeColor: theme.lib,
|
|
168
|
+
defaultEdgeType: 'arrow',
|
|
169
|
+
minCameraRatio: 0.05,
|
|
170
|
+
maxCameraRatio: 8,
|
|
171
|
+
// Suppress sigma's built-in hover label panel. We render our own tooltip,
|
|
172
|
+
// so its empty label box (the small rectangle near the cursor) is noise.
|
|
173
|
+
defaultDrawNodeHover: () => undefined,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// State: hover follows the mouse, focus is sticky (set by clicking a node
|
|
177
|
+
// or selecting a search result), pin keeps the tooltip locked in place.
|
|
178
|
+
let hoveredNode = null;
|
|
179
|
+
let focusedNode = null;
|
|
180
|
+
let pinned = false;
|
|
181
|
+
let filterTerm = '';
|
|
182
|
+
let matches = [];
|
|
183
|
+
let activeMatchIndex = -1;
|
|
184
|
+
|
|
185
|
+
// Legend filter state: each key toggles the visibility of a category.
|
|
186
|
+
// previewCategory is set transiently while hovering a legend row so the
|
|
187
|
+
// user can sneak-peek which lines/nodes belong to that category without
|
|
188
|
+
// committing to a toggle.
|
|
189
|
+
const visible = { app: true, lib: true, prod: true, dev: true, peer: true };
|
|
190
|
+
let previewCategory = null;
|
|
191
|
+
const isNodeCat = (k) => k === 'app' || k === 'lib';
|
|
192
|
+
const isEdgeCat = (k) => k === 'prod' || k === 'dev' || k === 'peer';
|
|
193
|
+
const edgeCategory = (depType) => {
|
|
194
|
+
if (depType === 'peerDependency') return 'peer';
|
|
195
|
+
if (depType === 'devDependency' || depType === 'implicit') return 'dev';
|
|
196
|
+
return 'prod';
|
|
197
|
+
};
|
|
198
|
+
const nodeVisible = (kind) => visible[kind === 'application' ? 'app' : 'lib'];
|
|
199
|
+
|
|
200
|
+
const activeNode = () => focusedNode || hoveredNode;
|
|
201
|
+
|
|
202
|
+
renderer.setSetting('nodeReducer', (node, attrs) => {
|
|
203
|
+
if (!nodeVisible(attrs.kind)) {
|
|
204
|
+
return { ...attrs, hidden: true, label: '' };
|
|
205
|
+
}
|
|
206
|
+
// Legend-row preview takes precedence over normal focus/hover emphasis:
|
|
207
|
+
// hovering a category gives an unambiguous "show me what's in this set".
|
|
208
|
+
if (previewCategory) {
|
|
209
|
+
const nodeCat = attrs.kind === 'application' ? 'app' : 'lib';
|
|
210
|
+
const inPreview = isNodeCat(previewCategory) ? nodeCat === previewCategory : false;
|
|
211
|
+
return {
|
|
212
|
+
...attrs,
|
|
213
|
+
color: inPreview ? attrs.color : theme.edgeFaint,
|
|
214
|
+
label: inPreview ? attrs.label : '',
|
|
215
|
+
zIndex: inPreview ? 1 : 0,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
const active = activeNode();
|
|
219
|
+
const matchedFilter = !filterTerm || node.toLowerCase().includes(filterTerm);
|
|
220
|
+
const isActive = active === node;
|
|
221
|
+
const isRelated = active && (depMap[active]?.includes(node) || rdepMap[active]?.includes(node));
|
|
222
|
+
const dim = (filterTerm && !matchedFilter) || (active && !isActive && !isRelated);
|
|
223
|
+
return {
|
|
224
|
+
...attrs,
|
|
225
|
+
color: isActive ? theme.accent : attrs.color,
|
|
226
|
+
label: dim ? '' : attrs.label,
|
|
227
|
+
zIndex: isActive ? 2 : isRelated ? 1 : 0,
|
|
228
|
+
};
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
renderer.setSetting('edgeReducer', (edge, attrs) => {
|
|
232
|
+
if (!visible[edgeCategory(attrs.depType)]) {
|
|
233
|
+
return { ...attrs, hidden: true };
|
|
234
|
+
}
|
|
235
|
+
const ext = graph.extremities(edge);
|
|
236
|
+
if (!nodeVisible(graph.getNodeAttribute(ext[0], 'kind')) || !nodeVisible(graph.getNodeAttribute(ext[1], 'kind'))) {
|
|
237
|
+
return { ...attrs, hidden: true };
|
|
238
|
+
}
|
|
239
|
+
if (previewCategory) {
|
|
240
|
+
if (isEdgeCat(previewCategory)) {
|
|
241
|
+
const inPreview = edgeCategory(attrs.depType) === previewCategory;
|
|
242
|
+
return { ...attrs, color: inPreview ? theme.accent : theme.edgeFaint, size: inPreview ? 1.5 : 0.3, zIndex: inPreview ? 1 : 0 };
|
|
243
|
+
}
|
|
244
|
+
// Previewing a node category dims every edge — the focus is on the dots.
|
|
245
|
+
return { ...attrs, color: theme.edgeFaint, size: 0.3 };
|
|
246
|
+
}
|
|
247
|
+
const active = activeNode();
|
|
248
|
+
const touchesActive = active && (ext[0] === active || ext[1] === active);
|
|
249
|
+
if (active && !touchesActive) {
|
|
250
|
+
return { ...attrs, color: theme.edgeFaint, hidden: false, size: 0.5 };
|
|
251
|
+
}
|
|
252
|
+
if (touchesActive) {
|
|
253
|
+
return { ...attrs, color: theme.accent, size: 1.5, zIndex: 1 };
|
|
254
|
+
}
|
|
255
|
+
return attrs;
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// Tooltip body assembled with safe DOM methods (createElement +
|
|
259
|
+
// textContent) — no innerHTML, no template strings of user data.
|
|
260
|
+
const MAX_TOOLTIP_ITEMS = 8;
|
|
261
|
+
const setTooltipContent = (name) => {
|
|
262
|
+
const node = graph.getNodeAttributes(name);
|
|
263
|
+
const deps = depMap[name] || [];
|
|
264
|
+
const rdeps = rdepMap[name] || [];
|
|
265
|
+
tooltip.textContent = '';
|
|
266
|
+
|
|
267
|
+
const nameEl = document.createElement('div');
|
|
268
|
+
nameEl.className = CLS.ttlName;
|
|
269
|
+
nameEl.textContent = name;
|
|
270
|
+
tooltip.appendChild(nameEl);
|
|
271
|
+
|
|
272
|
+
const typeEl = document.createElement('div');
|
|
273
|
+
typeEl.className = CLS.ttlType;
|
|
274
|
+
typeEl.textContent = node.kind + (pinned ? ' · pinned' : '');
|
|
275
|
+
tooltip.appendChild(typeEl);
|
|
276
|
+
|
|
277
|
+
if (node.path) {
|
|
278
|
+
const pathEl = document.createElement('div');
|
|
279
|
+
pathEl.className = CLS.ttlPath;
|
|
280
|
+
pathEl.textContent = node.path;
|
|
281
|
+
tooltip.appendChild(pathEl);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const addSection = (label, items) => {
|
|
285
|
+
const heading = document.createElement('div');
|
|
286
|
+
heading.className = CLS.ttlSection;
|
|
287
|
+
heading.textContent = label + ' (' + items.length + ')';
|
|
288
|
+
tooltip.appendChild(heading);
|
|
289
|
+
const ul = document.createElement('ul');
|
|
290
|
+
ul.className = CLS.ttlUl;
|
|
291
|
+
const shown = items.slice(0, MAX_TOOLTIP_ITEMS);
|
|
292
|
+
for (const item of shown) {
|
|
293
|
+
const li = document.createElement('li');
|
|
294
|
+
li.className = CLS.ttlLi;
|
|
295
|
+
li.textContent = item;
|
|
296
|
+
ul.appendChild(li);
|
|
297
|
+
}
|
|
298
|
+
if (items.length > MAX_TOOLTIP_ITEMS) {
|
|
299
|
+
const more = document.createElement('li');
|
|
300
|
+
more.className = CLS.ttlMore;
|
|
301
|
+
more.textContent = (items.length - MAX_TOOLTIP_ITEMS) + ' more';
|
|
302
|
+
ul.appendChild(more);
|
|
303
|
+
}
|
|
304
|
+
tooltip.appendChild(ul);
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
if (deps.length) addSection('Depends on', deps);
|
|
308
|
+
if (rdeps.length) addSection('Required by', rdeps);
|
|
309
|
+
if (!deps.length && !rdeps.length) {
|
|
310
|
+
const empty = document.createElement('div');
|
|
311
|
+
empty.className = CLS.ttlEmpty;
|
|
312
|
+
empty.textContent = 'No dependencies';
|
|
313
|
+
tooltip.appendChild(empty);
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// Tooltip placement delegated to Floating UI. We build a virtual reference
|
|
318
|
+
// element that either follows the cursor (hover) or anchors to a node's
|
|
319
|
+
// viewport position (pinned), then run computePosition with flip + shift +
|
|
320
|
+
// size middleware so the tooltip always fits the viewport.
|
|
321
|
+
const FUI = window.FloatingUIDOM;
|
|
322
|
+
let lastMouse = null;
|
|
323
|
+
let anchorMode = 'cursor'; // 'cursor' (follows mouse) or 'node' (sticky to node)
|
|
324
|
+
let anchorNode = null;
|
|
325
|
+
let cleanupAutoUpdate = null;
|
|
326
|
+
|
|
327
|
+
const cursorRef = {
|
|
328
|
+
getBoundingClientRect() {
|
|
329
|
+
const x = lastMouse ? lastMouse.clientX : 0;
|
|
330
|
+
const y = lastMouse ? lastMouse.clientY : 0;
|
|
331
|
+
return { width: 0, height: 0, x, y, top: y, left: x, right: x, bottom: y };
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
const nodeRef = {
|
|
336
|
+
getBoundingClientRect() {
|
|
337
|
+
if (!anchorNode || !graph.hasNode(anchorNode)) {
|
|
338
|
+
return { width: 0, height: 0, x: 0, y: 0, top: 0, left: 0, right: 0, bottom: 0 };
|
|
339
|
+
}
|
|
340
|
+
const pos = renderer.getNodeDisplayData(anchorNode);
|
|
341
|
+
const vp = renderer.graphToViewport({ x: pos.x, y: pos.y });
|
|
342
|
+
const rect = container.getBoundingClientRect();
|
|
343
|
+
const r = (pos.size || 4) + 4;
|
|
344
|
+
const cx = rect.left + vp.x;
|
|
345
|
+
const cy = rect.top + vp.y;
|
|
346
|
+
return { width: r * 2, height: r * 2, x: cx - r, y: cy - r, top: cy - r, left: cx - r, right: cx + r, bottom: cy + r };
|
|
347
|
+
},
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
const updatePosition = async () => {
|
|
351
|
+
if (tooltip.style.display !== 'block') return;
|
|
352
|
+
const ref = anchorMode === 'node' ? nodeRef : cursorRef;
|
|
353
|
+
const { x, y } = await FUI.computePosition(ref, tooltip, {
|
|
354
|
+
placement: 'right-start',
|
|
355
|
+
strategy: 'fixed',
|
|
356
|
+
middleware: [
|
|
357
|
+
FUI.offset(12),
|
|
358
|
+
FUI.flip({ fallbackPlacements: ['left-start', 'right-end', 'left-end', 'top', 'bottom'] }),
|
|
359
|
+
FUI.shift({ padding: 12 }),
|
|
360
|
+
FUI.size({
|
|
361
|
+
padding: 12,
|
|
362
|
+
apply({ availableWidth, availableHeight, elements }) {
|
|
363
|
+
const maxW = Math.min(380, Math.max(220, availableWidth));
|
|
364
|
+
const maxH = Math.max(160, availableHeight);
|
|
365
|
+
Object.assign(elements.floating.style, {
|
|
366
|
+
maxWidth: maxW + 'px',
|
|
367
|
+
maxHeight: maxH + 'px',
|
|
368
|
+
overflowY: 'auto',
|
|
369
|
+
});
|
|
370
|
+
},
|
|
371
|
+
}),
|
|
372
|
+
],
|
|
26
373
|
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
.
|
|
63
|
-
.
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
374
|
+
Object.assign(tooltip.style, { left: x + 'px', top: y + 'px' });
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
const stopAutoUpdate = () => {
|
|
378
|
+
if (cleanupAutoUpdate) { cleanupAutoUpdate(); cleanupAutoUpdate = null; }
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
// Auto-update is only used for the node-anchored (pinned) mode, where the
|
|
382
|
+
// reference is stable across events but its viewport position changes when
|
|
383
|
+
// the user pans, zooms, or resizes. In cursor mode we drive recomputation
|
|
384
|
+
// ourselves from the mousemove handler.
|
|
385
|
+
const startAutoUpdate = () => {
|
|
386
|
+
stopAutoUpdate();
|
|
387
|
+
if (anchorMode === 'node') {
|
|
388
|
+
cleanupAutoUpdate = FUI.autoUpdate(nodeRef, tooltip, updatePosition);
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
const showTooltipFor = (name, mode = 'cursor') => {
|
|
393
|
+
anchorMode = mode;
|
|
394
|
+
anchorNode = mode === 'node' ? name : null;
|
|
395
|
+
setTooltipContent(name);
|
|
396
|
+
tooltip.style.display = 'block';
|
|
397
|
+
startAutoUpdate();
|
|
398
|
+
updatePosition();
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const hideTooltip = () => {
|
|
402
|
+
stopAutoUpdate();
|
|
403
|
+
tooltip.style.display = 'none';
|
|
404
|
+
tooltip.dataset.pinned = 'false';
|
|
405
|
+
anchorNode = null;
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
renderer.on('enterNode', (e) => {
|
|
409
|
+
hoveredNode = e.node;
|
|
410
|
+
if (!pinned) showTooltipFor(e.node, 'cursor');
|
|
411
|
+
renderer.refresh({ skipIndexation: true });
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
renderer.on('leaveNode', () => {
|
|
415
|
+
hoveredNode = null;
|
|
416
|
+
if (!pinned) hideTooltip();
|
|
417
|
+
renderer.refresh({ skipIndexation: true });
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
// Click a node to pin it; the anchor switches from the cursor to the node
|
|
421
|
+
// so the tooltip stays attached even when the mouse moves away.
|
|
422
|
+
renderer.on('clickNode', (e) => {
|
|
423
|
+
focusedNode = e.node;
|
|
424
|
+
pinned = true;
|
|
425
|
+
tooltip.dataset.pinned = 'true';
|
|
426
|
+
showTooltipFor(e.node, 'node');
|
|
427
|
+
renderer.refresh({ skipIndexation: true });
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
renderer.on('clickStage', () => {
|
|
431
|
+
if (pinned || focusedNode) {
|
|
432
|
+
focusedNode = null;
|
|
433
|
+
pinned = false;
|
|
434
|
+
tooltip.dataset.pinned = 'false';
|
|
435
|
+
if (hoveredNode) {
|
|
436
|
+
showTooltipFor(hoveredNode, 'cursor');
|
|
437
|
+
} else {
|
|
438
|
+
hideTooltip();
|
|
439
|
+
}
|
|
440
|
+
renderer.refresh({ skipIndexation: true });
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
let posRafQueued = false;
|
|
445
|
+
container.addEventListener('mousemove', (e) => {
|
|
446
|
+
lastMouse = { clientX: e.clientX, clientY: e.clientY };
|
|
447
|
+
if (anchorMode === 'cursor' && tooltip.style.display === 'block' && !posRafQueued) {
|
|
448
|
+
posRafQueued = true;
|
|
449
|
+
requestAnimationFrame(() => {
|
|
450
|
+
posRafQueued = false;
|
|
451
|
+
updatePosition();
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
const focusOnNode = (name, { pin = true } = {}) => {
|
|
457
|
+
if (!graph.hasNode(name)) return;
|
|
458
|
+
const pos = renderer.getNodeDisplayData(name);
|
|
459
|
+
if (pos) renderer.getCamera().animate({ x: pos.x, y: pos.y, ratio: 0.3 }, { duration: 600 });
|
|
460
|
+
focusedNode = name;
|
|
461
|
+
pinned = pin;
|
|
462
|
+
if (pin) tooltip.dataset.pinned = 'true';
|
|
463
|
+
showTooltipFor(name, pin ? 'node' : 'cursor');
|
|
464
|
+
renderer.refresh({ skipIndexation: true });
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
// ── Search results ───────────────────────────────────────────────────
|
|
468
|
+
const totalNodes = data.nodes.length;
|
|
469
|
+
const renderResults = () => {
|
|
470
|
+
filterResults.textContent = '';
|
|
471
|
+
if (!filterTerm) {
|
|
472
|
+
filterResults.dataset.open = 'false';
|
|
473
|
+
filterCount.textContent = '';
|
|
474
|
+
filterCount.dataset.state = '';
|
|
475
|
+
activeMatchIndex = -1;
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
filterCount.textContent = matches.length + ' / ' + totalNodes;
|
|
479
|
+
filterCount.dataset.state = matches.length === 0 ? 'zero' : '';
|
|
480
|
+
if (matches.length === 0) {
|
|
481
|
+
const empty = document.createElement('div');
|
|
482
|
+
empty.className = CLS.matchEmpty;
|
|
483
|
+
const b = document.createElement('b'); b.textContent = 'No matches'; b.className = 'text-fg';
|
|
484
|
+
empty.appendChild(b);
|
|
485
|
+
empty.appendChild(document.createTextNode(' for "' + filterTerm + '"'));
|
|
486
|
+
filterResults.appendChild(empty);
|
|
487
|
+
filterResults.dataset.open = 'true';
|
|
488
|
+
activeMatchIndex = -1;
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
const limit = Math.min(matches.length, 24);
|
|
492
|
+
for (let i = 0; i < limit; i++) {
|
|
493
|
+
const m = matches[i];
|
|
494
|
+
const row = document.createElement('div');
|
|
495
|
+
row.className = CLS.matchItem;
|
|
496
|
+
row.setAttribute('role', 'option');
|
|
497
|
+
row.dataset.index = String(i);
|
|
498
|
+
if (i === activeMatchIndex) row.setAttribute('aria-selected', 'true');
|
|
499
|
+
|
|
500
|
+
const nameEl = document.createElement('span');
|
|
501
|
+
nameEl.className = CLS.miName;
|
|
502
|
+
const idx = m.name.toLowerCase().indexOf(filterTerm);
|
|
503
|
+
if (idx >= 0) {
|
|
504
|
+
nameEl.appendChild(document.createTextNode(m.name.slice(0, idx)));
|
|
505
|
+
const mark = document.createElement('mark');
|
|
506
|
+
mark.className = CLS.miMark;
|
|
507
|
+
mark.textContent = m.name.slice(idx, idx + filterTerm.length);
|
|
508
|
+
nameEl.appendChild(mark);
|
|
509
|
+
nameEl.appendChild(document.createTextNode(m.name.slice(idx + filterTerm.length)));
|
|
510
|
+
} else {
|
|
511
|
+
nameEl.textContent = m.name;
|
|
512
|
+
}
|
|
513
|
+
row.appendChild(nameEl);
|
|
514
|
+
|
|
515
|
+
const kindEl = document.createElement('span');
|
|
516
|
+
kindEl.className = CLS.miKind;
|
|
517
|
+
kindEl.textContent = m.type === 'application' ? 'app' : 'lib';
|
|
518
|
+
row.appendChild(kindEl);
|
|
519
|
+
|
|
520
|
+
row.addEventListener('mousedown', (ev) => {
|
|
521
|
+
ev.preventDefault();
|
|
522
|
+
focusOnNode(m.name);
|
|
523
|
+
filterResults.dataset.open = 'false';
|
|
524
|
+
});
|
|
525
|
+
filterResults.appendChild(row);
|
|
526
|
+
}
|
|
527
|
+
if (matches.length > limit) {
|
|
528
|
+
const more = document.createElement('div');
|
|
529
|
+
more.className = CLS.matchEmpty;
|
|
530
|
+
more.textContent = '+ ' + (matches.length - limit) + ' more — refine to see';
|
|
531
|
+
filterResults.appendChild(more);
|
|
532
|
+
}
|
|
533
|
+
filterResults.dataset.open = 'true';
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
const recomputeMatches = () => {
|
|
537
|
+
if (!filterTerm) { matches = []; return; }
|
|
538
|
+
matches = [];
|
|
539
|
+
for (const n of data.nodes) {
|
|
540
|
+
if (n.name.toLowerCase().includes(filterTerm)) matches.push(n);
|
|
541
|
+
}
|
|
542
|
+
matches.sort((a, b) => {
|
|
543
|
+
// Apps first, then by closeness of match position, then by name.
|
|
544
|
+
if (a.type !== b.type) return a.type === 'application' ? -1 : 1;
|
|
545
|
+
const ai = a.name.toLowerCase().indexOf(filterTerm);
|
|
546
|
+
const bi = b.name.toLowerCase().indexOf(filterTerm);
|
|
547
|
+
if (ai !== bi) return ai - bi;
|
|
548
|
+
return a.name.localeCompare(b.name);
|
|
549
|
+
});
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
let rafQueued = false;
|
|
553
|
+
filterInput.addEventListener('input', () => {
|
|
554
|
+
filterTerm = filterInput.value.toLowerCase().trim();
|
|
555
|
+
recomputeMatches();
|
|
556
|
+
activeMatchIndex = matches.length ? 0 : -1;
|
|
557
|
+
renderResults();
|
|
558
|
+
if (!rafQueued) {
|
|
559
|
+
rafQueued = true;
|
|
560
|
+
requestAnimationFrame(() => {
|
|
561
|
+
rafQueued = false;
|
|
562
|
+
renderer.refresh({ skipIndexation: true });
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
filterInput.addEventListener('focus', () => {
|
|
568
|
+
if (filterTerm) filterResults.dataset.open = 'true';
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
document.addEventListener('mousedown', (e) => {
|
|
572
|
+
if (!filterResults.contains(e.target) && e.target !== filterInput) {
|
|
573
|
+
filterResults.dataset.open = 'false';
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
filterInput.addEventListener('keydown', (e) => {
|
|
578
|
+
if (e.key === 'ArrowDown') {
|
|
579
|
+
if (matches.length) {
|
|
580
|
+
e.preventDefault();
|
|
581
|
+
activeMatchIndex = (activeMatchIndex + 1) % matches.length;
|
|
582
|
+
renderResults();
|
|
583
|
+
}
|
|
584
|
+
} else if (e.key === 'ArrowUp') {
|
|
585
|
+
if (matches.length) {
|
|
586
|
+
e.preventDefault();
|
|
587
|
+
activeMatchIndex = (activeMatchIndex - 1 + matches.length) % matches.length;
|
|
588
|
+
renderResults();
|
|
589
|
+
}
|
|
590
|
+
} else if (e.key === 'Enter') {
|
|
591
|
+
if (matches.length && activeMatchIndex >= 0) {
|
|
592
|
+
e.preventDefault();
|
|
593
|
+
focusOnNode(matches[activeMatchIndex].name);
|
|
594
|
+
filterResults.dataset.open = 'false';
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// ── Legend / category filter ─────────────────────────────────────────
|
|
600
|
+
const legend = document.getElementById('legend');
|
|
601
|
+
const toggleCategory = (key) => {
|
|
602
|
+
if (!(key in visible)) return;
|
|
603
|
+
visible[key] = !visible[key];
|
|
604
|
+
const row = legend?.querySelector('[data-toggle="' + key + '"]');
|
|
605
|
+
if (row) {
|
|
606
|
+
row.dataset.state = visible[key] ? 'on' : 'off';
|
|
607
|
+
row.setAttribute('aria-checked', String(visible[key]));
|
|
608
|
+
}
|
|
609
|
+
renderer.refresh({ skipIndexation: true });
|
|
610
|
+
};
|
|
611
|
+
let previewRafQueued = false;
|
|
612
|
+
const queuePreviewRefresh = () => {
|
|
613
|
+
if (previewRafQueued) return;
|
|
614
|
+
previewRafQueued = true;
|
|
615
|
+
requestAnimationFrame(() => {
|
|
616
|
+
previewRafQueued = false;
|
|
617
|
+
renderer.refresh({ skipIndexation: true });
|
|
618
|
+
});
|
|
619
|
+
};
|
|
620
|
+
legend?.querySelectorAll('[data-toggle]').forEach((row) => {
|
|
621
|
+
row.addEventListener('click', () => toggleCategory(row.dataset.toggle));
|
|
622
|
+
row.addEventListener('mouseenter', () => {
|
|
623
|
+
previewCategory = row.dataset.toggle;
|
|
624
|
+
queuePreviewRefresh();
|
|
625
|
+
});
|
|
626
|
+
row.addEventListener('mouseleave', () => {
|
|
627
|
+
previewCategory = null;
|
|
628
|
+
queuePreviewRefresh();
|
|
629
|
+
});
|
|
630
|
+
row.addEventListener('focus', () => {
|
|
631
|
+
previewCategory = row.dataset.toggle;
|
|
632
|
+
queuePreviewRefresh();
|
|
633
|
+
});
|
|
634
|
+
row.addEventListener('blur', () => {
|
|
635
|
+
previewCategory = null;
|
|
636
|
+
queuePreviewRefresh();
|
|
637
|
+
});
|
|
638
|
+
row.addEventListener('keydown', (e) => {
|
|
639
|
+
if (e.key === ' ' || e.key === 'Enter') {
|
|
640
|
+
e.preventDefault();
|
|
641
|
+
toggleCategory(row.dataset.toggle);
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
// ── Camera controls ──────────────────────────────────────────────────
|
|
647
|
+
const resetView = () => {
|
|
648
|
+
renderer.getCamera().animatedReset({ duration: 600 });
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
const applyTheme = () => {
|
|
652
|
+
theme = css();
|
|
653
|
+
graph.forEachNode((node, attrs) => {
|
|
654
|
+
graph.setNodeAttribute(node, 'color', colorForNode(attrs.kind));
|
|
655
|
+
});
|
|
656
|
+
graph.forEachEdge((edge, attrs) => {
|
|
657
|
+
graph.setEdgeAttribute(edge, 'color', colorForEdge(attrs.depType));
|
|
658
|
+
});
|
|
659
|
+
renderer.setSetting('labelColor', { color: theme.fg });
|
|
660
|
+
renderer.setSetting('defaultEdgeColor', theme.edge);
|
|
661
|
+
renderer.setSetting('defaultNodeColor', theme.lib);
|
|
662
|
+
renderer.refresh();
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
themeBtn?.addEventListener('click', () => {
|
|
666
|
+
const isDark = root.dataset.theme ? root.dataset.theme === 'dark' : mql.matches;
|
|
667
|
+
const next = isDark ? 'light' : 'dark';
|
|
668
|
+
root.dataset.theme = next;
|
|
669
|
+
try { localStorage.setItem('vis-graph-theme', next); } catch {}
|
|
670
|
+
applyTheme();
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
mql.addEventListener('change', () => {
|
|
674
|
+
if (!root.dataset.theme) applyTheme();
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// Keyboard shortcuts: '/' focuses search, 'R' fits view, Esc clears + unpins.
|
|
678
|
+
window.addEventListener('keydown', (e) => {
|
|
679
|
+
const inField = document.activeElement === filterInput;
|
|
680
|
+
if (e.key === '/' && !inField) {
|
|
681
|
+
e.preventDefault();
|
|
682
|
+
filterInput.focus();
|
|
683
|
+
filterInput.select();
|
|
684
|
+
} else if ((e.key === 'r' || e.key === 'R') && !inField) {
|
|
685
|
+
e.preventDefault();
|
|
686
|
+
resetView();
|
|
687
|
+
} else if (e.key === 'Escape') {
|
|
688
|
+
if (inField) {
|
|
689
|
+
filterInput.value = '';
|
|
690
|
+
filterTerm = '';
|
|
691
|
+
matches = [];
|
|
692
|
+
renderResults();
|
|
693
|
+
renderer.refresh({ skipIndexation: true });
|
|
694
|
+
filterInput.blur();
|
|
695
|
+
} else if (pinned || focusedNode) {
|
|
696
|
+
focusedNode = null;
|
|
697
|
+
pinned = false;
|
|
698
|
+
tooltip.dataset.pinned = 'false';
|
|
699
|
+
if (!hoveredNode) hideTooltip();
|
|
700
|
+
renderer.refresh({ skipIndexation: true });
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
})();
|
|
705
|
+
<\/script>
|
|
706
|
+
</body>
|
|
707
|
+
</html>`},"emitGraphHtml");var Vi=Object.defineProperty,Ae=m((n,e)=>Vi(n,"name",{value:e,configurable:!0}),"l");const Ki={application:0,library:3,service:1,tool:2},Ct=Ae(n=>Ki[n]??Number.MAX_SAFE_INTEGER,"typeRank"),Xi=Ae(n=>{const e=new Map;for(const[t,r]of Object.entries(n.dependencies))for(const i of r){const o=e.get(i.target)??[];o.push(t),e.set(i.target,o)}return Object.values(n.nodes).map(t=>({deps:n.dependencies[t.name]??[],name:t.name,reverseDeps:e.get(t.name)??[],type:t.type})).sort((t,r)=>t.type!==r.type?Ct(t.type)-Ct(r.type):t.name.localeCompare(r.name))},"buildNodes"),Yi=Ae((n,e,t)=>{let r=n;if(e==="app"?r=r.filter(i=>i.type==="application"):e==="lib"&&(r=r.filter(i=>i.type!=="application")),t){const i=t.toLowerCase();r=r.filter(o=>o.name.toLowerCase().includes(i))}return r},"filterNodes");class Qi{static{m(this,"GraphStore")}static{Ae(this,"GraphStore")}#e;#r=new Set;#i;constructor(e){this.#i=e;const t=Xi(e);this.#e={allNodes:t,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",selectedIndex:0}}getSnapshot=Ae(()=>this.#e,"getSnapshot");subscribe=Ae(e=>(this.#r.add(e),()=>{this.#r.delete(e)}),"subscribe");getFilteredNodes(){return Yi(this.#e.allNodes,this.#e.filterType,this.#e.filterText)}getStats(){const e=this.#e.allNodes.filter(i=>i.type==="application").length,t=this.#e.allNodes.length,r=Object.values(this.#i.dependencies).reduce((i,o)=>i+o.length,0);return{apps:e,deps:r,libs:t-e,total:t}}setSelectedIndex(e){const t=this.getFilteredNodes(),r=t.length===0?-1:Math.max(0,Math.min(e,t.length-1));r!==this.#e.selectedIndex&&this.#t({...this.#e,selectedIndex:r})}setFocusedPanel(e){e!==this.#e.focusedPanel&&this.#t({...this.#e,focusedPanel:e})}setFilterType(e){e!==this.#e.filterType&&this.#t({...this.#e,filterType:e,selectedIndex:0})}setFilter(e){this.#t({...this.#e,filterText:e,selectedIndex:0})}setFilterActive(e){e!==this.#e.filterActive&&this.#t({...this.#e,filterActive:e,filterText:e?this.#e.filterText:"",selectedIndex:e?this.#e.selectedIndex:0})}#t(e){this.#e=e;for(const t of this.#r)try{t()}catch{}}}var Ji=Object.defineProperty,Zi=m((n,e)=>Ji(n,"name",{value:e,configurable:!0}),"p");const en=Zi(({focused:n,node:e,scrollRef:t})=>{const r=n?"white":"gray";if(!e)return y(G,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:y(w,{dimColor:!0,children:"No project selected"})});const i=e.type==="application",o=i?"yellow":"cyan",a=i?"Application":"Library";return y(G,{borderColor:r,borderStyle:"single",borderTopRightTitle:` ${a} `,borderTopTitle:` ${e.name} `,flexDirection:"column",flexGrow:1,children:E(gi,{flexGrow:1,flexShrink:1,paddingX:2,ref:t,scrollbar:!0,scrollbarColor:"gray",children:[E(G,{flexDirection:"column",marginTop:1,children:[E(G,{children:[y(w,{dimColor:!0,children:"── "}),y(w,{bold:!0,color:"white",children:"DEPENDS ON"}),E(w,{dimColor:!0,children:[" ","(",e.deps.length,")"]})]}),e.deps.length===0?y(G,{marginTop:1,paddingLeft:2,children:y(w,{dimColor:!0,children:"No dependencies"})}):y(G,{flexDirection:"column",marginTop:1,children:e.deps.map(s=>E(G,{gap:1,paddingLeft:2,children:[y(w,{color:"cyan",children:"→"}),y(w,{children:s.target}),s.type!=="static"&&E(w,{dimColor:!0,children:["(",s.type,")"]})]},s.target))})]}),E(G,{flexDirection:"column",marginTop:1,children:[E(G,{children:[y(w,{dimColor:!0,children:"── "}),y(w,{bold:!0,color:"white",children:"REQUIRED BY"}),E(w,{dimColor:!0,children:[" ","(",e.reverseDeps.length,")"]})]}),e.reverseDeps.length===0?y(G,{marginTop:1,paddingLeft:2,children:y(w,{dimColor:!0,children:"No reverse dependencies"})}):y(G,{flexDirection:"column",marginTop:1,children:e.reverseDeps.map(s=>E(G,{gap:1,paddingLeft:2,children:[y(w,{color:"magenta",children:"←"}),y(w,{children:s})]},s))})]}),E(G,{flexDirection:"column",marginTop:1,children:[E(G,{children:[y(w,{dimColor:!0,children:"── "}),y(w,{bold:!0,color:"white",children:"INFO"})]}),E(G,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[E(G,{children:[y(G,{width:16,children:y(w,{dimColor:!0,children:"Type:"})}),y(w,{color:o,children:a})]}),E(G,{children:[y(G,{width:16,children:y(w,{dimColor:!0,children:"Dependencies:"})}),y(w,{children:String(e.deps.length)})]}),E(G,{children:[y(G,{width:16,children:y(w,{dimColor:!0,children:"Required by:"})}),y(w,{children:String(e.reverseDeps.length)})]}),E(G,{children:[y(G,{width:16,children:y(w,{dimColor:!0,children:"Connectivity:"})}),y(w,{children:String(e.deps.length+e.reverseDeps.length)})]})]})]})]})})},"ProjectDetailPanel");var tn=Object.defineProperty,mt=m((n,e)=>tn(n,"name",{value:e,configurable:!0}),"m");const rn=[{key:"all",label:"All",shortcut:"1"},{key:"app",label:"Apps",shortcut:"2"},{key:"lib",label:"Libs",shortcut:"3"}],_t=mt(({isSelected:n,node:e})=>{const t=e.type==="application",r=t?"yellow":"cyan",i=t?"app":"lib";return E(G,{flexShrink:0,height:1,children:[E(w,{children:[n?"▶":" "," "]}),y(G,{flexGrow:1,children:y(w,{bold:n,inverse:n,wrap:"truncate",children:e.name})}),E(w,{color:r,children:[" ",i]}),E(w,{dimColor:!0,children:[" ","→",e.deps.length," ","←",e.reverseDeps.length]})]})},"ProjectRow"),Dt=mt(({count:n,label:e})=>E(G,{flexShrink:0,height:1,marginTop:1,children:[E(w,{dimColor:!0,children:["▼"," "]}),y(w,{bold:!0,color:"white",children:e.toUpperCase()}),E(w,{dimColor:!0,children:[" ","(",n,")"]})]}),"TypeHeader"),nn=mt(({filterActive:n,filterText:e,filterType:t,focused:r,nodes:i,scrollOffset:o,selectedIndex:a,stats:s,viewportHeight:d})=>{const c=r?"white":"gray",p=i.filter(A=>A.type==="application"),l=i.filter(A=>A.type!=="application"),u=[];let v=0;if(p.length>0){u.push(y(Dt,{count:p.length,label:"Applications"},"hdr-apps"));for(const A of p){const I=v;u.push(y(_t,{isSelected:I===a,node:A},A.name)),v++}}if(l.length>0){u.push(y(Dt,{count:l.length,label:"Libraries"},"hdr-libs"));for(const A of l){const I=v;u.push(y(_t,{isSelected:I===a,node:A},A.name)),v++}}let S=0;p.length>0&&(S+=2+p.length),l.length>0&&(S+=2+l.length);const N=S>d&&d>0;return E(G,{borderColor:c,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[E(G,{flexShrink:0,gap:1,paddingX:1,children:[y(w,{bold:!0,inverse:!0,children:" VIS "}),E(w,{wrap:"truncate",children:[s.total," ","packages"]}),E(w,{dimColor:!0,children:["(",s.apps," ","apps,"," ",s.libs," ","libs,"," ",s.deps," ","deps)"]})]}),y(G,{flexShrink:0,gap:1,paddingX:1,paddingY:1,children:rn.map(A=>{const I=t===A.key;return E(G,{children:[y(w,{dimColor:!I,children:"["}),y(w,{bold:I,color:I?"cyan":"gray",children:A.shortcut}),y(w,{dimColor:!I,children:"]"}),E(w,{color:I?"white":"gray",children:[" ",A.label]})]},A.key)})}),n&&E(G,{flexShrink:0,paddingX:1,children:[y(w,{bold:!0,color:"white",children:"/ "}),y(w,{children:e}),y(w,{inverse:!0,children:" "})]}),E(G,{flexDirection:"row",flexGrow:1,overflow:"hidden",children:[y(G,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:y(G,{flexDirection:"column",marginTop:-o,children:u})}),N&&y(G,{flexShrink:0,marginLeft:1,marginRight:1,children:y(fi,{contentHeight:S,placement:"inset",scrollOffset:o,style:"block",viewportHeight:d})})]})]})},"ProjectListPanel");var on=Object.defineProperty,an=m((n,e)=>on(n,"name",{value:e,configurable:!0}),"E");const sn=100,dn=40,cn=10,Mt={1:"all",2:"app",3:"lib"},ln=an(({autoExitSeconds:n=0,store:e})=>{const{exit:t}=hi(),{columns:r,rows:i}=ui(),o=ri(e.subscribe,e.getSnapshot),[a,s]=et(!1),d=yt(null),c=yt(null),[p,l]=et(0),[u,v]=et(!1),S=tt(()=>e.getFilteredNodes(),[o.allNodes,o.filterType,o.filterText]),N=tt(()=>e.getStats(),[o.allNodes]),A=S[o.selectedIndex]??null,I=tt(()=>{let T=0,O=0;for(const _ of S)_.type==="application"?T+=1:O+=1;return{appsCount:T,libsCount:O}},[S]),R=vt(T=>{const{appsCount:O,libsCount:_}=I;if(T<O)return(O>0?2:0)+T;const h=O>0?2+O:0,ye=_>0?2:0;return h+ye+(T-O)},[I]),F=Math.max(1,i-8-(o.filterActive?1:0)),z=vt(T=>{const O=R(T);l(_=>O>_+F-2?Math.max(0,O-F+2):O<_+1?Math.max(0,O-1):_)},[R,F]);if(ii(()=>{c.current?.scrollToTop()},[A?.name]),pi((T,O)=>{if(T==="c"&&O.ctrl){t();return}if(!u){if(a){O.escape||T==="?"?s(!1):T==="q"?(s(!1),v(!0)):O.downArrow||T==="j"?d.current?.scrollBy(1):(O.upArrow||T==="k")&&d.current?.scrollBy(-1);return}if(T==="?"){s(!0);return}if(T==="q"){v(!0);return}if(O.tab){e.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(Mt[T]){e.setFilterType(Mt[T]);return}if(o.filterActive){if(O.escape){e.setFilterActive(!1);return}if(O.return){e.setFilterActive(!1);return}if(O.backspace){e.setFilter(o.filterText.slice(0,-1));return}if(T&&!O.ctrl&&!O.meta){e.setFilter(o.filterText+T);return}return}if(o.focusedPanel==="list"){if(S.length===0){T==="/"&&e.setFilterActive(!0);return}if(O.downArrow||T==="j"){const _=Math.min(o.selectedIndex+1,S.length-1);e.setSelectedIndex(_),z(_);return}if(O.upArrow||T==="k"){const _=Math.max(o.selectedIndex-1,0);e.setSelectedIndex(_),z(_);return}if(O.pageDown){const _=Math.min(o.selectedIndex+10,S.length-1);e.setSelectedIndex(_),z(_);return}if(O.pageUp){const _=Math.max(o.selectedIndex-10,0);e.setSelectedIndex(_),z(_);return}if(O.home){e.setSelectedIndex(0),l(0);return}if(O.end){const _=S.length-1;e.setSelectedIndex(_),z(_);return}if(T==="/"){e.setFilterActive(!0);return}if(O.rightArrow){e.setFocusedPanel("detail");return}return}if(o.focusedPanel==="detail"){if(O.escape||O.leftArrow){e.setFocusedPanel("list");return}if(O.downArrow||T==="j"){c.current?.scrollBy(1);return}if(O.upArrow||T==="k"){c.current?.scrollBy(-1);return}if(O.pageDown){c.current?.scrollBy(10);return}if(O.pageUp){c.current?.scrollBy(-10);return}if(O.home){c.current?.scrollToTop();return}O.end&&c.current?.scrollToBottom()}}},{isActive:!0}),r<dn||i<cn)return y(G,{alignItems:"center",height:i,justifyContent:"center",width:r,children:E(w,{color:"yellow",children:["Terminal too small (",r,"x",i,")"]})});const H=r>=sn,Q=y(G,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:E(G,{flexWrap:"wrap",gap:2,paddingX:1,children:[E(G,{gap:1,children:[y(w,{bold:!0,color:"white",children:"q"}),y(w,{dimColor:!0,children:"QUIT"})]},"q"),E(G,{gap:1,children:[y(w,{bold:!0,color:"white",children:"?"}),y(w,{dimColor:!0,children:"HELP"})]},"?"),E(G,{gap:1,children:[y(w,{bold:!0,color:"white",children:"↑↓"}),y(w,{dimColor:!0,children:"NAV"})]},"nav"),E(G,{gap:1,children:[y(w,{bold:!0,color:"white",children:"1-3 /"}),y(w,{dimColor:!0,children:"FILTER"})]},"f"),E(G,{gap:1,children:[y(w,{bold:!0,color:"white",children:"Tab"}),y(w,{dimColor:!0,children:"PANEL"})]},"t")]})}),J=E(li,{footer:E(w,{dimColor:!0,children:[y(w,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",y(w,{bold:!0,color:"white",children:"?"}),"/",y(w,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:d,title:"KEYBOARD SHORTCUTS",visible:a,width:52,children:[E(G,{flexDirection:"column",marginBottom:1,children:[E(G,{marginBottom:1,children:[y(w,{dimColor:!0,children:"── "}),y(w,{bold:!0,color:"white",children:"NAVIGATION"})]}),E(G,{children:[y(G,{width:24,children:E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","↑","/k"]}),y(w,{dimColor:!0,children:" Move up"})]})}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","↓","/j"]}),y(w,{dimColor:!0,children:" Move down"})]})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","Tab"]}),y(w,{dimColor:!0,children:" Switch panel"})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","→","/","←"]}),y(w,{dimColor:!0,children:" Focus detail/list"})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","PgUp/PgDn"]}),y(w,{dimColor:!0,children:" Jump 10 items"})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","Home/End"]}),y(w,{dimColor:!0,children:" Jump to start/end"})]})]}),E(G,{flexDirection:"column",marginBottom:1,children:[E(G,{marginBottom:1,children:[y(w,{dimColor:!0,children:"── "}),y(w,{bold:!0,color:"white",children:"FILTERS"})]}),E(G,{children:[y(G,{width:24,children:E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","1"]}),y(w,{dimColor:!0,children:" All"})]})}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","2"]}),y(w,{dimColor:!0,children:" Apps only"})]})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","3"]}),y(w,{dimColor:!0,children:" Libraries only"})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","/"]}),y(w,{dimColor:!0,children:" Text filter"})]})]}),E(G,{flexDirection:"column",children:[E(G,{marginBottom:1,children:[y(w,{dimColor:!0,children:"── "}),y(w,{bold:!0,color:"white",children:"ACTIONS"})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","q"]}),y(w,{dimColor:!0,children:" Quit"})]}),E(w,{children:[E(w,{bold:!0,color:"white",children:[" ","?"]}),y(w,{dimColor:!0,children:" Toggle help"})]})]})]}),Ne=y(nn,{filterActive:o.filterActive,filterText:o.filterText,filterType:o.filterType,focused:o.focusedPanel==="list",nodes:S,scrollOffset:p,selectedIndex:o.selectedIndex,stats:N,viewportHeight:F}),Y=y(en,{focused:o.focusedPanel==="detail",node:A,scrollRef:c});if(H){const T=Math.floor(r*.35);return E(G,{flexDirection:"column",height:i,width:r,children:[E(G,{flexDirection:"row",flexGrow:1,children:[y(G,{flexGrow:1,children:Ne}),y(G,{width:T,children:Y})]}),Q,y(wt,{autoExitSeconds:n??3,onCancel:m(()=>{v(!1)},"onCancel"),visible:u}),J]})}const Ye=Math.floor(i*.55);return E(G,{flexDirection:"column",height:i,width:r,children:[y(G,{height:Ye,children:Ne}),y(G,{flexGrow:1,children:Y}),Q,y(wt,{autoExitSeconds:n??3,onCancel:m(()=>{v(!1)},"onCancel"),visible:u}),J]})},"VisGraphApp");var hn=Object.defineProperty,Se=m((n,e)=>hn(n,"name",{value:e,configurable:!0}),"y");const Pr=Se((n,e,t,r,i,o,a,s)=>{const d=t?ie("└── "):ie("├── "),c=i.has(n),p=c?ie(" (*)"):"",l=r.get(n),u=l?.type==="application"?le(n):n;if(o.push(`${e}${d}${u}${p}`),c)return;i.add(n);const v=l?.deps??[],S=t?`${e} `:`${e}${ie("│")} `;if(s>=a&&v.length>0){o.push(`${S}${ie(`... ${v.length} more`)}`);return}for(let N=0;N<v.length;N++){const A=v[N];A&&Pr(A.target,S,N===v.length-1,r,i,o,a,s+1)}},"printDepsTree"),It=Se((n,e,t,r,i,o)=>{const a=e.get(n),s=a?.type==="application"?le(n):n;r.push(`${o}${s}`),t.add(n);const d=a?.deps??[];if(d.length===0){r.push(`${o} ${ie("(no dependencies)")}`);return}if(i<=0){r.push(`${o} ${ie(`... ${d.length} dependencies`)}`);return}for(let c=0;c<d.length;c++){const p=d[c];p&&Pr(p.target,o,c===d.length-1,e,t,r,i,1)}},"printRootProject"),Lt=Se((n,e)=>{const t=new Map;for(const[l,u]of Object.entries(n.nodes))t.set(l,{deps:(n.dependencies[l]??[]).map(v=>({target:v.target,type:v.type})),name:l,type:u.type});const r=[],i=[];for(const[l,u]of t)u.type==="application"?r.push(l):i.push(l);r.sort(),i.sort();const o=r.length+i.length,a=Object.values(n.dependencies).reduce((l,u)=>l+u.length,0),s=[le("Project Dependency Graph"),""];if(r.length>0){s.push(` ${le(bt(`Applications (${r.length})`))}`,"");for(const l of r)It(l,t,new Set,s,e," "),s.push("")}if(i.length>0){s.push(` ${le(bt(`Libraries (${i.length})`))}`,"");for(const l of i)It(l,t,new Set,s,e," "),s.push("")}const d=process.stdout.columns||80;s.push(ie("─".repeat(Math.min(d,60)))),s.push(`${le(String(o))} packages ${ie("·")} ${le(String(a))} dependencies ${ie("·")} ${le(String(r.length))} apps${ie(",")} ${le(String(i.length))} libraries`);const c=new Set;let p=!1;for(const l of[...r,...i]){const u=t.get(l)?.deps??[];for(const v of u)c.has(v.target)&&(p=!0),c.add(v.target);c.add(l)}return p&&s.push(ie("(*) = already shown above")),s.join(`
|
|
708
|
+
`)},"projectGraphToAscii"),pn=Se(n=>{const e=Object.values(n.nodes).map(t=>({name:t.name,type:t.type}));return{edges:Object.values(n.dependencies).flat(),nodes:e}},"projectGraphToJson"),un=Se(n=>{const e=Object.values(n.nodes).map(r=>({name:r.name,path:r.data?.root,type:r.type})),t=[];for(const r of Object.values(n.dependencies))for(const i of r)t.push({source:i.source,target:i.target,type:i.type});return Hi({edges:t,nodes:e,tool:{name:"vis-graph",version:"alpha"},workspaceRoot:process.cwd()})},"projectGraphToHtml"),Tn=Se(async({logger:n,options:e,visConfig:t,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const i=r,{packageJsons:o,workspace:a}=Jr(i,t),s=Zr(i,a,o),d=!!process.stdout.isTTY&&!ei,c=e.format??(d?"tui":"ascii"),p=e.output,l=e.depth??1/0;let u;switch(c){case"dot":{u=Yr(s);break}case"html":{u=un(s);break}case"json":{u=JSON.stringify(pn(s),void 0,2);break}case"tui":{if(!d){u=Lt(s,l);break}const v=t?.tui?.autoExit===!0?3:typeof t?.tui?.autoExit=="number"?t.tui.autoExit:0;process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&(process.stdin.setRawMode(!0),process.stdin.ref(),process.stdin.resume());const S=setInterval(()=>{},1e3),N=new Qi(s);await Qr(ti.createElement(ln,{autoExitSeconds:v,store:N}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit(),clearInterval(S);return}default:u=Lt(s,l)}p?(Xr(p,u,"utf8"),n.info(`Graph written to ${p}`)):n.info(u)},"execute");export{Tn as default};
|