@polycode-projects/the-mechanical-code-talker 4.0.1 → 4.1.1

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.
Files changed (65) hide show
  1. package/README.md +2 -1
  2. package/corpus/sprites/src/sprite-facts.jsonl +375 -8
  3. package/package.json +1 -1
  4. package/src/adapters/memory/core.mjs +20 -0
  5. package/src/domain/ask-vocab.mjs +71 -0
  6. package/src/domain/ask.mjs +168 -0
  7. package/src/domain/game-config.mjs +11 -0
  8. package/src/domain/mud-facts.mjs +15 -0
  9. package/src/domain/router/drive.mjs +35 -9
  10. package/src/domain/router/registry.mjs +24 -4
  11. package/src/domain/router/resolver.mjs +102 -40
  12. package/src/domain/scene-compose.mjs +117 -0
  13. package/src/domain/spider-fly-world.mjs +36 -0
  14. package/src/domain/sprite-facts.mjs +0 -0
  15. package/src/domain/sprite-request.mjs +156 -0
  16. package/src/domain/sprite-templates.mjs +161 -14
  17. package/src/services/adventure-editor.mjs +8 -14
  18. package/src/services/adventure-viz.mjs +119 -150
  19. package/src/services/adventure.mjs +97 -35
  20. package/src/services/chat-page-viz.mjs +64 -48
  21. package/src/services/chat.mjs +102 -34
  22. package/src/services/code-explorer-viz.mjs +52 -50
  23. package/src/services/ingest-viz.mjs +32 -74
  24. package/src/services/ledger-viz.mjs +87 -70
  25. package/src/services/memory-panel-viz.mjs +38 -0
  26. package/src/services/mud-editor.mjs +10 -15
  27. package/src/services/mud-turn.mjs +6 -6
  28. package/src/services/mud-viz.mjs +119 -225
  29. package/src/services/p2p-room.mjs +90 -23
  30. package/src/services/plan-pddl.mjs +3 -1
  31. package/src/services/plan-viz.mjs +13 -12
  32. package/src/services/research-viz.mjs +25 -67
  33. package/src/services/spider-fly-turn.mjs +14 -22
  34. package/src/services/spider-fly-viz.mjs +97 -136
  35. package/src/services/spider-fly.mjs +69 -11
  36. package/src/services/sprite-catalog-viz.mjs +274 -224
  37. package/src/services/viz-boot.mjs +71 -0
  38. package/src/services/viz-room-graph.mjs +203 -0
  39. package/src/services/viz-theme.mjs +75 -1
  40. package/src/services/viz-ticker.mjs +22 -0
  41. package/src/surfaces/web/adventure-browser-entry.mjs +62 -47
  42. package/src/surfaces/web/chat-browser-entry.mjs +51 -107
  43. package/src/surfaces/web/code-explorer-browser-entry.mjs +192 -35
  44. package/src/surfaces/web/engine-surface.mjs +82 -0
  45. package/src/surfaces/web/ingest-browser-entry.mjs +16 -17
  46. package/src/surfaces/web/ledger-browser-entry.mjs +24 -56
  47. package/src/surfaces/web/memory-ask-browser-entry.mjs +55 -13
  48. package/src/surfaces/web/memory-ask-browser.bundle.js +128 -125
  49. package/src/surfaces/web/memory-stats.mjs +11 -0
  50. package/src/surfaces/web/mud-browser-entry.mjs +70 -49
  51. package/src/surfaces/web/plan-browser-entry.mjs +39 -50
  52. package/src/surfaces/web/research-browser-entry.mjs +48 -46
  53. package/src/surfaces/web/spider-fly-browser-entry.mjs +76 -40
  54. package/src/surfaces/web/sprites-browser-entry.mjs +28 -32
  55. package/src/surfaces/web/tmct-surface.mjs +147 -0
  56. package/src/surfaces/web/turn-session.mjs +124 -0
  57. package/src/tools/definitions.mjs +30 -0
  58. package/src/tools/handlers/index.mjs +6 -3
  59. package/src/tools/handlers/kit.mjs +19 -2
  60. package/src/tools/handlers/tmct-ask.mjs +11 -6
  61. package/src/tools/handlers/tmct-ingest.mjs +5 -1
  62. package/src/tools/handlers/tmct-related.mjs +4 -4
  63. package/src/tools/handlers/tmct-sprite.mjs +147 -0
  64. package/src/tools/memory-fallthrough.mjs +9 -2
  65. package/src/tools/server.mjs +37 -6
@@ -1,41 +1,41 @@
1
- (()=>{var mb=Object.defineProperty;var M=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var En=(e,t)=>{for(var n in t)mb(e,n,{get:t[n],enumerable:!0})};var tt,S_,j_,__,R_,A_,T_,C_,I_,O_,L_,N_,M_,P_,F_,D_,z_,Z,ve,Wt,hu,B_,U_,W_,ze=M(()=>{tt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},S_=tt("createRequire"),j_=tt("readFileSync"),__=tt("access"),R_=tt("readFile"),A_=tt("writeFile"),T_=tt("appendFile"),C_=tt("mkdir"),I_=tt("mkdtemp"),O_=tt("rename"),L_=tt("unlink"),N_=tt("rm"),M_=tt("stat"),P_=tt("copyFile"),F_=tt("readdir"),D_=tt("createReadStream"),z_=tt("createWriteStream"),Z=(...e)=>e.join("/"),ve=e=>String(e).replace(/\/[^/]*$/,""),Wt=(...e)=>e.join("/"),hu="/",B_=tt("randomBytes"),U_=tt("spawnSync"),W_=tt("createInterface")});var nt,q_,V_,gu,Be,No,hb,Sn,gb,Lr,aa,bb,wb,H_,yb,K_,Y_,X_,J_,Q_,yt=M(()=>{nt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},q_=nt("createRequire"),V_=nt("readFileSync"),gu=nt("access"),Be=nt("readFile"),No=nt("writeFile"),hb=nt("appendFile"),Sn=nt("mkdir"),gb=nt("mkdtemp"),Lr=nt("rename"),aa=nt("unlink"),bb=nt("rm"),wb=nt("stat"),H_=nt("copyFile"),yb=nt("readdir"),K_=nt("createReadStream"),Y_=nt("createWriteStream"),X_=nt("randomBytes"),J_=nt("spawnSync"),Q_=nt("createInterface")});function gs(e){return e.replace(vb,"").trim()}function Yt(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(xb,"").trim();if(s=s.replace(Eb,"").trim(),s===t)break;t=s}return t}var bu,Mo,Po,Kt,wu,rn,ca,vb,$b,xb,kb,Eb,de,Fo,Sb,yu,Ue,Gt,Vn,vu,la,ua,da,$u,Do,bs,xu,ku,ws,jn,_n,Xs,Ve,Eu,ys,vs,Hn,pn,Su,zo,Js,Nr,Qs,ju,Rn=M(()=>{bu=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],Mo={imports:{bare:"import",comment:"Module -> Module: subject's import graph references object (usesComplexType).",verbs:["couples to","couple to","depends on","imports","import","relies on","rely on","requires","require","references","reference","pulls in","pull in","built on","builds on","build on","uses code from","grabs","grab","pulls from","pull from","leans on","lean on","is wired to","are wired to","is hooked up to","are hooked up to","importing"]},uses:{bare:"use",comment:"query-side union: imports (Module->Module) + calls (Module->Module) + callsSymbol (fn->fn).",verbs:["uses","use","makes use of","make use of","talks to","talk to","using"]},calls:{bare:"call",comment:"Function/Method -> Function/Class (symbol-grain) or Module -> Module (coarse): subject invokes object.",verbs:["invokes","invoke","calls","call","runs","run","executes","execute","hits","hit","triggers","trigger","fires","fire","kicks off","kick off","calling"]},defines:{bare:"define",comment:"Module -> top-level Function/Class/Method/Attribute: subject declares object.",verbs:["defines","define","declares","declare","has","have","holds","hold","defining"]},contains:{bare:"contain",comment:"Class -> Method/Attribute: subject's membership includes object.",verbs:["contains","contain","lives in","live in","is defined in","are defined in","is part of","are part of","sits in","sit in","sits inside","sit inside","containing"]},tests:{bare:"test",comment:"Module -> Module: subject is a test module importing/covering object.",verbs:["tests","test","covers","cover","verifies","verify","exercises","exercise","checks","check","makes sure of","make sure of","testing"]},inherits:{bare:"inherit from",comment:"Class -> Class: subject's declared base resolves to object (subclassOf).",verbs:["inherits from","inherit from","inherits","inherit","extends","extend","subclasses","subclass","derives from","derive from","is a subclass of","are a subclass of","is a kind of","are a kind of","is built off","are built off","is built on top of","are built on top of","extending","inheriting from","inheriting","subclassing","extends from",...bu]},touches:{bare:"touch",comment:"Commit -> Module (coarse) or Commit -> symbol (fine, touchesSymbol): a commit's changed-line-range intersects object.",verbs:["touched","touches","changed","change","modified","modifies","was changed in","were changed in","was edited in","were edited in","was modified by","were modified by","was tweaked in","were tweaked in","got changed in","got edited in","touch","changed in","landed in","land in","was in","were in","went into","included in","updated","edited","touching"]},cochange:{bare:"co-change with",comment:"Module -> Module: subject and object are frequently committed together (changeCoupledWith).",verbs:["changed with","co-changes with","co-change with","changes alongside","change alongside","shares commits with","share commits with","tends to change together with","tend to change together with","moves together with","move together with","changed together with","change together with","changes together with","changes with","change with","tends to change with","tend to change with","usually changes with"]},reexports:{bare:"re-export",comment:"Module -> exported symbol: subject's public API surface (__all__/export list).",verbs:["exports","export","re-exports","re-export","passes through","pass through","exposes","expose","exporting"]},serves:{bare:"serve",comment:"subject provides or backs the object \u2014 a handler serving a route, a module serving a surface (mgx:serves).",verbs:["serves","serve","serving"]},denotes:{bare:"denote",comment:"subject names the object \u2014 a glossary/lexicon term denoting a code entity (mgx:denotes).",verbs:["denotes","denote","denoting"]}},Po=Object.freeze([...bu,"is the superclass of","are the superclass of","is the parent class of"]),Kt=Object.freeze(["defined","declared","located","implemented"]),wu=Object.freeze(["now","currently","right now","at the moment","these days","today"]),rn=Object.freeze(["mentioned","referenced"]),ca=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),vb=new RegExp(`\\s+(?:${ca.join("|")})\\s*[?.!]*$`,"i");$b=Object.freeze(["then","though","too"]),xb=new RegExp(`\\s+(?:${$b.join("|")})\\s*[?.!]*$`,"i"),kb=Object.freeze(["please explain","explain"]),Eb=new RegExp(`,\\s*(?:${kb.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(Mo).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),Fo=Object.freeze(new Set(["has","have","holds","hold"])),Sb=e=>!Po.includes(e),yu=Object.freeze([...new Set(Object.keys(de).filter(Sb).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Ue=Object.freeze({function:"Function",functions:"Function",method:"Method",methods:"Method",class:"Class",classes:"Class",module:"Module",modules:"Module",mod:"Module",mods:"Module",file:"Module",files:"Module",package:"Package",packages:"Package",attribute:"Attribute",attributes:"Attribute",field:"Attribute",fields:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",change:"Change",changes:"Change",commit:"Commit",commits:"Commit"}),Gt=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),Vn=Object.freeze({imported:"imports",called:"calls",used:"uses",tested:"tests",covered:"tests",verified:"tests",exercised:"tests",checked:"tests",defined:"defines",declared:"defines",inherited:"inherits",extended:"inherits",subclassed:"inherits",contained:"contains",exported:"reexports","re-exported":"reexports",exposed:"reexports",touched:"touches",changed:"touches",modified:"touches",edited:"touches",updated:"touches"}),vu=Object.freeze({"inherited from":{kind:"inherits",role:"object"},"extended from":{kind:"inherits",role:"object"},"subclassed from":{kind:"inherits",role:"object"},"defined in":{kind:"defines",role:"agent"},"declared in":{kind:"defines",role:"agent"},"contained in":{kind:"contains",role:"agent"},"imported by":{kind:"imports",role:"agent"},"called by":{kind:"calls",role:"agent"},"used by":{kind:"uses",role:"agent"},"tested by":{kind:"tests",role:"agent"},"covered by":{kind:"tests",role:"agent"},"touched by":{kind:"touches",role:"agent"},"changed by":{kind:"touches",role:"agent"},"exported by":{kind:"reexports",role:"agent"}}),la=Object.freeze({"ain't":"is not",aint:"is not","isn't":"is not",isnt:"is not","aren't":"are not",arent:"are not","doesn't":"does not",doesnt:"does not","don't":"do not",dont:"do not","didn't":"did not",didnt:"did not","there's":"there is",theres:"there is","what's":"what is",whats:"what is","who's":"who is",whos:"who is",gonna:"going to",wanna:"want to",gotta:"got to",yer:"your",ur:"your",gimme:"give me"}),ua=Object.freeze({funtion:"function",funtions:"functions",fucntion:"function",fucntions:"functions",functoin:"function",functoins:"functions",calss:"class",calsses:"classes",classs:"class",clases:"classes",modul:"module",moduls:"modules",moduel:"module",moduels:"modules",moudle:"module",moudles:"modules",methdo:"method",methdos:"methods",mehtod:"method",mehtods:"methods",comit:"commit",comits:"commits",commmit:"commit",commmits:"commits",varaible:"variable",varaibles:"variables",varibale:"variable",varibales:"variables",atribute:"attribute",atributes:"attributes",improt:"import",improts:"imports",imoprt:"import",imoprts:"imports",inherts:"inherits",inheirts:"inherits",extands:"extends",extneds:"extends",depnds:"depends",touchs:"touches",tuoches:"touches",touhced:"touched",touchd:"touched",defned:"defined",chagned:"changed",chnaged:"changed",chagnes:"changes",chnages:"changes",calles:"calls",exprot:"export",exprots:"exports",tets:"tests",whcih:"which",wich:"which",whihc:"which",wehre:"where",whre:"where",waht:"what",wat:"what",dat:"that",dose:"does",doess:"does",teh:"the",manyn:"many",mnay:"many",amny:"many",mnany:"many",hwo:"how",coutn:"count",conut:"count",cuont:"count",ocunt:"count",numer:"number",nubmer:"number",numbr:"number",nmuber:"number",lst:"list",lsit:"list",ilst:"list",shwo:"show",hsow:"show",dispaly:"display",dsiplay:"display",funtcions:"functions",funciton:"function",funcitons:"functions"}),da=Object.freeze({folder:"module",folders:"modules",directory:"module",directories:"modules",func:"function",funcs:"functions",changeset:"commit",changesets:"commits",revision:"commit",revisions:"commits",property:"attribute",properties:"attributes"}),$u=/\b([a-z]{3,})in'/gi,Do=Object.freeze(["um","uh","erm","so","like","yo","hey","bru","bro","fam","mate","please","could you","can you","would you","tell me","i wonder","just wondering","quickly","real quick","kinda","sorta","btw","by the way","you","quick q"]),bs=Object.freeze(["this","it","that","here","this one","that one"]),xu=Object.freeze([{re:/\bthere\s+is\s+not\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bthere\s+is\s+no\s+\S+\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bis\s+not\s+there\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\b(?:nobody|nothing|no one)\s+(\S.*?)(?:,?\s+does\s+it\??|,?\s+do\s+they\??)?$/i,to:e=>`what ${e[1]}`}]),ku=Object.freeze([{re:/^what\s+(?:is|was|were|are)\s+in\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+(?:went|got)\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+made\s+it\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`}]),ws=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),jn=Object.freeze(["that","which","who"]),_n=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),Xs=Object.freeze({"but do not":"difference","but does not":"difference","and do not":"difference","and does not":"difference","but not":"difference","and not":"difference",except:"difference",without:"difference",and:"intersection",plus:"intersection",but:"intersection",or:"union"}),Ve=Object.freeze({public:{via:"visibility",value:"public"},private:{via:"visibility",value:"private"},protected:{via:"visibility",value:"protected"},static:{via:"attr",attr:"isStatic"},abstract:{via:"attr",attr:"isAbstract"},constant:{via:"attr",attr:"isConstant"},exported:{via:"exported"},"re-exported":{via:"exported"},tested:{via:"tested",value:!0},covered:{via:"tested",value:!0},untested:{via:"tested",value:!1},uncovered:{via:"tested",value:!1}}),Eu=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),ys=Object.freeze(["how many","how much","how many of","number of","total number of","quantity of","tally of","sum of","total of","amount of","count","count up","count of","tot up"]),vs=Object.freeze(["list","show","show me","show us","display","print","print out","dump","enumerate","name","give me","get me","spit out","rattle off","run down","run through","ls","what are","which are"]),Hn=Object.freeze({most:"most",greatest:"most",highest:"most",biggest:"most",largest:"most","most-connected":"most","most connected":"most",fewest:"fewest",least:"fewest",smallest:"fewest",lowest:"fewest"}),pn=Object.freeze({imports:{kind:"imports",dir:"out"},dependencies:{kind:"imports",dir:"out"},importers:{kind:"imports",dir:"in"},dependents:{kind:"imports",dir:"in"},callers:{kind:"calls",dir:"in",sibling:"callsSymbol"},callees:{kind:"calls",dir:"out",sibling:"callsSymbol"},calls:{kind:"calls",dir:"out",sibling:"callsSymbol"},methods:{kind:"contains",dir:"out",filter:"Method"},members:{kind:"contains",dir:"out"},tests:{kind:"tests",dir:"in"},test:{kind:"tests",dir:"in"},subclasses:{kind:"inherits",dir:"in"},connections:{kind:"*",dir:"both"},edges:{kind:"*",dir:"both"},connected:{kind:"*",dir:"both"},imported:{kind:"imports",dir:"in"},"depended-on":{kind:"imports",dir:"in"},depended:{kind:"imports",dir:"in"},used:{kind:"imports",dir:"in",sibling:"callsSymbol"},called:{kind:"calls",dir:"in",sibling:"callsSymbol"}}),Su=Object.freeze({tests:"Module",test:"Module"}),zo=Object.freeze(["those","them","these"]),Js=Object.freeze(["contains","defines"]),Nr=Object.freeze(["the","a","an","some","other","about","please","pls","plz","kindly","just","simply","maybe","perhaps","thanks","thank","ta","cheers","too","also","well","either","sorry","oops","actually","mean","meant","rather","hi","hello","hey","yo","hiya","howdy","ok","okay","matey","mate","buddy","pal","dude","man","bro","bru","fam","friend","sir","maam","folks","guys","everyone","dear","tmct","show","tell","give","list","find","me","us","lemme"]),Qs=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),ju=Object.freeze(["help","help me","how do i ask","how do i use this","what can i ask","what can you ask","usage","commands","examples","syntax","options"])});var Xt,_u,Ru,pa,Au,nR,sR,Tu=M(()=>{Rn();Xt=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),_u=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),Ru=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),pa=Object.freeze([{name:"tmct_context",tier:"hot",summary:"A sized edit bundle for one symbol \u2014 exemplar source, sibling signatures, registration anchor and the insertion region, in one call.",agentDescription:"START HERE to add/modify code: ONE call returns a sized edit bundle (exemplar source, sibling signatures, registration, insertion region) \u2014 then write directly, don't Read.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"Module path (e.g. path/to/module) or a sibling function/class name defined in it."},depth:{type:"string",enum:["min","auto","full"],default:"auto",description:"auto (sized to the task) | min (leanest) | full (every section)."}}},example:{symbol:"django/utils/text.py"}},{name:"tmct_snippet",tier:"hot",summary:"The exact source of one function, class or Class.method \u2014 its line span only, plus a one-line in-repo call hint.",agentDescription:"EXACT source of one function/class/Class.method by name (its line span only) + a one-line in-repo call hint. Prefer over Read for a single symbol.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"function/class name, Class.method, or fn:<path>#name."}}},example:{symbol:"Truncator.chars"}},{name:"tmct_ask",tier:"hot",summary:"A structural question in plain English, answered from the graph in one call \u2014 no model, and a clean miss instead of a guess.",agentDescription:'Ask a structural question in plain English: "which functions call X", "what uses X", "where is X defined", "when did X change". One call, no model. A clean miss beats a guess.',inputSchema:{type:"object",required:["query"],properties:{query:{type:"string",description:'A free-text question, e.g. "which functions explicitly couple to logging".'}}},example:{query:"which modules import src/core/model.mjs"},chat:{exampleRepo:"examples/mini-webapp",grammar:[{form:"which <things> <relation-verb> <entity>",example:"which modules import src/core/model.mjs",answers:"the imports edge, read forwards"},{form:"what is <relation-verb-passive> <entity>",example:"what is imported by src/core/store.mjs",answers:"the same edge, read backwards \u2014 a passive is the opposite direction, not a synonym"},{form:"what <relation-verb> <entity>",example:"what uses src/lib/http.mjs",answers:"the uses union: imports plus calls"},{form:"where is <entity> <where-marker>",example:"where is saveStore defined",answers:"the definition's file and line span"},{form:"when did <entity> change",example:"when did src/core/store.mjs change",answers:"the commits that touched it, newest first"}],whereMarkers:Kt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:Xt("A module path, symbol name, or Class.method."),example:{symbol:"django/utils/text.py"}},{name:"tmct_signature",tier:"cold",summary:"One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body.",inputSchema:Xt("A function, method, or Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_impact",tier:"cold",summary:"Transitive reverse closure over imports/calls \u2014 what breaks if a module or symbol changes, by depth, with tests.",inputSchema:_u("The module (or a symbol it defines) whose dependents you want."),example:{module:"django/utils/text.py"}},{name:"tmct_search",tier:"cold",summary:"Free-text/ranked lookup over the code-map to find the right module or symbol.",inputSchema:{type:"object",required:[],properties:{query:{type:"string",description:"Free text to rank against the code-map. Required unless kind narrows the search on its own."},kind:{type:"string",description:"Restrict to an entity class, e.g. function, class, module."},decorator:{type:"string",description:"Restrict to definitions carrying this decorator."},name:{type:"string",description:"Restrict to definitions whose name matches."}}},example:{query:"template filters",kind:"function"}},{name:"tmct_members",tier:"cold",summary:"A class's methods + attributes (file:line, decorators) in one slice.",inputSchema:Ru("The class whose members you want."),example:{class:"Truncator"}},{name:"tmct_subclasses",tier:"cold",summary:"A class's base classes plus the transitive set of classes that extend it.",inputSchema:Ru("The class to walk the inheritance edges of."),example:{class:"Field"}},{name:"tmct_related",tier:"cold",summary:"A term's synonyms (skos:altLabel) and related concepts (skos:related), from the memory graph's relation facts.",inputSchema:{type:"object",required:["term"],properties:{term:{type:"string",description:"The term whose synonyms / related concepts you want."}}},example:{term:"sofa"}},{name:"tmct_architecture",tier:"cold",summary:"Package/module map + the most-imported hub modules (optionally scoped to a package).",inputSchema:{type:"object",required:[],properties:{package:{type:"string",description:"Scope the map to one package. Omit for the whole repository."}}},example:{package:"django/template"}},{name:"tmct_exports",tier:"cold",summary:"A module's public __all__ surface, each name resolved to the module that defines it.",inputSchema:_u("The module whose public API surface you want."),example:{module:"django/db/models/__init__.py"}},{name:"tmct_tests_for",tier:"cold",summary:"The test modules covering a symbol or module, from the typed test edges.",inputSchema:Xt("The symbol or module to find covering tests for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_untested",tier:"cold",summary:"Source modules with no covering test module \u2014 a coverage-gap view (no arguments).",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_history",tier:"cold",summary:"Recent commits that touched a symbol's module (newest first).",inputSchema:Xt("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_file_history",tier:"cold",summary:"Commits that touched a symbol's module, each with author / date / subject.",inputSchema:Xt("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_method_history",tier:"cold",summary:"Commits that touched a specific method symbol (fine-grained), with author / date / subject.",inputSchema:Xt("A Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_class_history",tier:"cold",summary:"Commits that touched a specific class symbol (fine-grained), with author / date / subject.",inputSchema:Xt("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:Xt("The symbol whose callers you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_callees",tier:"cold",summary:"Modules a symbol's module calls into (one hop).",inputSchema:Xt("The symbol whose callees you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_calls",tier:"cold",summary:"The in-repo symbols a function calls (fn\u2192fn), each with file:line.",inputSchema:Xt("The function whose in-repo call sites you want."),example:{symbol:"slugify"}},{name:"tmct_cochanges",tier:"cold",summary:"Modules that historically change in the same commit as a symbol's module (git co-change).",inputSchema:Xt("The symbol whose module's change-coupling you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_context_more",tier:"cold",summary:"The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports).",inputSchema:Xt("The symbol a lean tmct_context bundle was built for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_export",tier:"cold",summary:"Every stored memory fact as JSONL (subject/predicate/object/provenance) \u2014 the shape `tmct extract` emits, for backup or audit.",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_ingest",tier:"cold",summary:"Ground plain text into memory facts with the same deterministic recognizer the chat teach lane uses \u2014 the strict tier, plus an optional lower-trust fuzzy tier \u2014 and report the canonical triples.",inputSchema:{type:"object",required:["text"],properties:{text:{type:"string",description:"The plain text to ground into facts."},optimistic:{type:"boolean",description:"Also run the lower-trust fuzzy tier over sentences the strict recognizer skips."}}},example:{text:"A kettle is a container. An otter is a mammal.",optimistic:!0}}]),Au=pa.filter(e=>e.tier==="hot"),nR=pa.filter(e=>e.tier==="cold"),sR=Object.freeze(pa.map(e=>e.name))});var Cu,Oe,Lt=M(()=>{ze();Cu=Z(".tmct","graph.json"),Oe=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function jb(e){let t=new Set;for(let n of Array.isArray(e?.individuals)?e.individuals:[])n&&n.id&&t.add(n.id);return t}function Iu(e){let t=(Array.isArray(e)?e:[]).map((l,c)=>({file:l?.file,payload:l?.payload||{},name:l?.name!=null&&String(l.name).length?String(l.name):String(c)})),n=t.map(({payload:l})=>jb(l)),s=new Map;for(let l of n)for(let c of l)s.set(c,(s.get(c)||0)+1);let o=new Set([...s.entries()].filter(([,l])=>l>1).map(([l])=>l)),r={generated_at:"",classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}},i="",a=t.length>0;for(let{payload:l,name:c}of t){a=a&&!!l.bootstrap,typeof l.generated_at=="string"&&l.generated_at>i&&(i=l.generated_at);let u=f=>o.has(f)?`${c}/${f}`:f;Array.isArray(l.classes)&&r.classes.push(...l.classes),Array.isArray(l.vocabulary)&&r.vocabulary.push(...l.vocabulary);for(let f of Array.isArray(l.individuals)?l.individuals:[]){if(!f)continue;let p={...f};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(m=>u(m))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(m=>m&&m.id?{...m,id:u(m.id)}:m)),r.individuals.push(p)}for(let f of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!f)continue;let p={...f};Array.isArray(p.examples)&&(p.examples=p.examples.map(m=>{if(!m)return m;let h={...m};return h.subject&&(h.subject=u(h.subject)),h.object&&(h.object=u(h.object)),h})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let m=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let h of Array.isArray(p)?p:[]){let g=u(h);m.includes(g)||m.push(g)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Ou=M(()=>{});var eo={};En(eo,{clearCache:()=>_b,emptyEntities:()=>fa,fetchEntities:()=>Cb,registerProvider:()=>Rb});function _b(){Zs=null,Bo=null}function Rb(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=Mr;return Mr=e??null,Zs=null,t}function fa(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function Ab(e){let t;try{t=await Be(e,"utf8")}catch(n){if(n?.code==="ENOENT")return fa();throw new Oe(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Oe(`graph artifact ${e} is not valid JSON`)}}async function Tb(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(Bo&&Bo.key===n)return Bo.payload;let s=[];for(let r=0;r<t.length;r++){let i=await Ab(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=Iu(s);return Bo={key:n,payload:o},o}async function Cb(e){if(Mr){let s;try{s=await Mr(e)}catch(o){throw o instanceof Oe?o:new Oe(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Oe("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return Tb(e);if(Zs&&Zs.file===e.graphFile)return Zs.payload;let t;try{t=await Be(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return fa();throw new Oe(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Oe(`graph artifact ${e.graphFile} is not valid JSON`)}return Zs={file:e.graphFile,payload:n},n}var Zs,Bo,Mr,Uo=M(()=>{yt();Lt();Ou();Zs=null,Bo=null,Mr=null});function fn(e){if(!e)return[];let t=String(e).replace(/\.[A-Za-z0-9]+$/,"");return t=t.replace(/[/\\]/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").replace(/[_\-.]+/g," "),t.split(/\s+/).map(n=>n.toLowerCase()).filter(n=>n.length>1&&n.length<=Lu)}function ma(e){if(!e)return[];let t=[],n=new Set;for(let s of String(e).toLowerCase().split(/[^a-z0-9]+/))if(!(s.length<2||s.length>Lu||Ib.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=Ob))break;return t}function Pr({name:e,doc:t}={}){return[...new Set([...fn(e),...ma(t)])].sort()}function Nu(e){let t=Object.create(null);for(let n of e){let s=(n.attributes||[]).find(o=>o.key==="prose_tokens");if(s?.value)for(let o of s.value.split(" "))t[o]||(t[o]=[]),t[o].push(n.id)}for(let n of Object.keys(t))t[n].sort();return t}function $s(e,t,{limit:n=10}={}){let s=[...new Set([...fn(t),...ma(t)])];if(!s.length)return[];let o=new Map;for(let r of s)for(let i of e?.[r]||[])o.set(i,(o.get(i)||0)+1);return[...o.entries()].sort((r,i)=>i[1]-r[1]||String(r[0]).localeCompare(i[0])).slice(0,n).map(([r,i])=>({id:r,score:i}))}function Mu(e,t){let n=e&&(e["tmct:layers"]?e:e.proseIndex),s=n&&n["tmct:layers"],o=String(t||"").toLowerCase(),r={ids:[],via:null};if(!o||!s||typeof s!="object")return r;let i=new Set,a=new Set;for(let l of Object.keys(s)){let c=s[l];if(!c||typeof c!="object")continue;let u=c[o],d=Array.isArray(u)?u:Array.isArray(u?.ids)?u.ids:null;if(d?.length){for(let f of d)i.add(f);a.add(l)}}return i.size?{ids:[...i].sort(),via:[...a].sort().join("+")}:r}var Ib,Lu,Ob,Kn=M(()=>{Ib=new Set("a an and or but the of to in on at for with from by as is are was were be been being it its this that these those i you he she they we me my your our do does did not no yes if then else than so such can will would should could may might about into over under out up down off again more most some any all what which who whom whose when where why how".split(/\s+/)),Lu=40,Ob=120});function Pu(e){let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(":"),r=o>=0?n.slice(o+1):"";return{createdAt:s,...r?{sessionId:r}:{}}}function Wo(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");if(o<0)return{kind:"reference",pack:s||"unknown",article:""};let r=s.slice(0,o)||"unknown";return{kind:Nb(r),pack:r,article:s.slice(o+1)}}if(t.startsWith("research:")){let s=t.slice(9),o=s.lastIndexOf("@");return{kind:"referenceLive",pack:"research",article:(o>=0?s.slice(0,o):s).trim()||"unknown"}}let n=t.split(/\s+/)[0];return n.startsWith("corpus-weak:")?{kind:"corpusWeak",name:n.slice(12)||"unknown"}:n.startsWith("corpus:")?{kind:"corpus",name:n.slice(7)||"unknown"}:n.startsWith("child:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("world:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("mud:")?{kind:"corpus",name:`mud:${n.slice(4).split(":")[0]||"unknown"}`}:n.startsWith("ace:")?{kind:"operator",...Pu(n.slice(4))}:n.startsWith("teach:")?{kind:"teach",...Pu(n.slice(6))}:n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}:n.startsWith("optimistic-extract:")?{kind:"optimisticExtract",name:n.slice(19)||"unknown"}:n.startsWith("extracted:")?{kind:"extracted",name:n.slice(10)||"unknown"}:n.startsWith("entailed:")?{kind:"entailed",rule:n.slice(9)}:n.startsWith("chat:")||n.startsWith("session:")||n.startsWith("operator")?{kind:"operator"}:null}function Fb(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Du;let n=Number(t);return Number.isFinite(n)?Math.max(ha,Math.min(zu,n)):Du}function Db(e,t=Date.now(),n=Mb){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return Fu+(1-Fu)*Math.pow(.5,o/n)}function Bu(e,t={},n={}){let s=typeof n.now=="number"?n.now:Date.now(),o=Array.isArray(e?.sourceIds)?e.sourceIds:[],r=new Set,i=[],a=[];for(let p of o){if(r.has(p))continue;r.add(p);let m=t[p],h=Pb(m);if(!h)continue;i.push(h);let g=(Go[h]??0)*Fb(m);a.push(Math.max(0,Math.min(1,g)))}let l=0,c=1;for(let p of a)c*=1-p;if(a.length&&(l=Math.min(1,1-c)),i.includes("entailed")&&Array.isArray(n.premiseTrusts)&&n.premiseTrusts.length){let p=typeof n.ruleConfidence=="number"?n.ruleConfidence:1;l=Math.max(0,Math.min(1,Math.min(...n.premiseTrusts)*p))}let u=Db(e?.createdAt,s,n.halfLifeMs),d=ga(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:ga(u)};return{score:d,inputs:f}}function Uu({factsAsserted:e=0,factsContradicted:t=0}={}){let n=Math.max(0,Number(e)||0),s=Math.max(0,Number(t)||0),o=Math.max(-1,Math.min(1,(n-2*s)/Math.max(1,n))),r=n/(n+zb),i=(o*r+1)/2;return ga(ha+(zu-ha)*i)}var Fr,ba,Nt,xs,Lb,Nb,Go,Mb,Fu,ha,zu,Du,ga,Pb,zb,ks=M(()=>{Fr="mgx:trustScore",ba="mgx:trustInputs",Nt="mgx:createdAt",xs="mgx:updatedAt";Lb="wikipedia-live",Nb=e=>e===Lb?"referenceLive":"reference";Go=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),Mb=720*60*60*1e3,Fu=.9,ha=.5,zu=1.5,Du=1,ga=(e,t=6)=>Number(e.toFixed(t)),Pb=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";zb=19});var Es,wa=M(()=>{Es=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)||/(^|\/)[^/]*[-_]tests?\//.test(e)||/\.(test|spec)\.[cm]?[jt]sx?$/.test(e)});function ya(e,t){return Math.log(1+e/(1+t))}var qo=M(()=>{});var zr={};En(zr,{bfsLevels:()=>Dr,findActionPath:()=>va,findReachableSet:()=>$a});function Wu(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function Gu(e,t){let n=[];for(let{action:s,nextState:o}of t(e)||[])n.push({state:o,actions:[s],states:[e,o]});return n}function va(e,t,n,{maxDepth:s=50,stateKey:o=Wu}={}){if(t(e))return{actions:[],states:[e]};let r=Gu(e,n),i=new Set([o(e)]);for(let a=1;a<=s&&r.length;a+=1){for(let c of r)if(t(c.state))return{actions:c.actions,states:c.states};if(a===s)break;let l=[];for(let c of r){let u=o(c.state);if(!i.has(u)){i.add(u);for(let{action:d,nextState:f}of n(c.state)||[]){let p=o(f);i.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}}r=l}return null}function $a(e,t,{maxDepth:n=50,stateKey:s=Wu}={}){let o=Gu(e,t),r=new Set([s(e)]),i=[];for(let a=1;a<=n&&o.length;a+=1){let l=[];for(let c of o){let u=s(c.state);if(!r.has(u)&&(r.add(u),i.push({node:c.state,path:{actions:c.actions,states:c.states}}),a!==n))for(let{action:d,nextState:f}of t(c.state)||[]){let p=s(f);r.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}o=l}return i}function*Dr(e,t,{maxDepth:n=8,keyOf:s=o=>o}={}){let o=new Set([e]),r=[e];for(let i=1;i<=n&&r.length;i+=1){let a=[],l=[];for(let c of r)for(let u of t(c)||[]){let d=s(u);o.has(d)||(o.add(d),a.push(u),l.push(d))}r=l,yield a}}var Ss=M(()=>{});function Ur(e){let t=Array.isArray(e?.individuals)?e.individuals:[],n=new Map;for(let r of t)r&&r.id&&n.set(r.id,r);let s=(Array.isArray(e?.objectProperties)?e.objectProperties:[]).filter(r=>r&&(r.predicate||r.prop)).map(r=>{let i=(Array.isArray(r.examples)?r.examples:[]).filter(a=>a&&a.subject&&a.object);return{predicate:String(r.predicate||""),prop:r.prop||null,count:Number(r.count)||i.length,edges:i}}),o=s.filter(r=>r.count>r.edges.length).map(r=>({predicate:r.predicate,count:r.count,shown:r.edges.length}));return{individuals:t,byId:n,relations:s,truncated:o,generatedAt:e?.generated_at||null,proseIndex:e?.proseIndex||{}}}function _a(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function In(e){let t=String(e?.prop||"").toLowerCase();if(qu[t])return qu[t];let n=String(e?.predicate||"").toLowerCase();if(/symbol/.test(n)){if(/\b(call|invoke)/.test(n))return"callsSymbol";if(/(touch|chang|modif)/.test(n))return"touchesSymbol"}return/\bimport/.test(n)?"imports":/\b(call|invoke)/.test(n)?"calls":/\b(define|export|declare)/.test(n)?"defines":/\b(test|cover)/.test(n)?"tests":/\b(touch|chang|modif)/.test(n)?"touches":/\bcontain/.test(n)?"contains":/\b(inherit|subclass|extend|specializ)/.test(n)?"inherits":null}function Tn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function xa(e){let t=Tn(e).split("/");return t[t.length-1]}function Bb(e){return(e?.derived_from||[]).filter(od).length}function Vu(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+Bb(e)}function qt(e,t){let n=Tn(t);if(!n)return{match:null,candidates:[]};let s=xa(n),o=!n.includes("/"),r=[];for(let i of e.individuals){let a=Tn(i.label),l=String(i.id||"").toLowerCase(),c=0;a===n||l===n?c=100:a.endsWith(`/${n}`)||o&&(xa(a)===s||xa(a).replace(/\.[a-z]+$/,"")===s)?c=80:a.includes(n)&&(c=Math.max(10,50-(a.length-n.length))),c>0&&r.push({ind:i,score:c})}return r.sort((i,a)=>a.score-i.score||Vu(a.ind)-Vu(i.ind)||String(i.ind.label).length-String(a.ind.label).length),{match:r[0]?.ind||null,candidates:r.slice(1,5).map(i=>i.ind)}}function vt(e){let t=(e?.attributes||[]).find(s=>s.key==="site");if(!t)return null;let n=String(t.value).match(/^(.*):(\d+)(?:-(\d+))?$/);return n?{path:n[1],start:Number(n[2]),end:n[3]?Number(n[3]):Number(n[2])}:null}function Ub(e,t){let n=[],s=[];for(let o of e.relations){let r=o.edges.filter(a=>a.subject===t),i=o.edges.filter(a=>a.object===t);r.length&&n.push({group:o,edges:r}),i.length&&s.push({group:o,edges:i})}return{out:n,incoming:s}}function Hu(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function Cn(e){let t=e||"Entity",n=fn(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function st(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function Ra(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(od);o.length&&s.push(`attestation: touched by ${o.length} commit(s)`);for(let l of t.attributes||[])s.push(`attribute: ${l.key} = ${l.value}${l.prop?` [${l.prop}]`:""}`);let{out:r,incoming:i}=Ub(e,t.id);if(!r.length&&!i.length)s.push("edges: none in the current artifact");else{s.push("edges:");for(let{group:l,edges:c}of r)s.push(` ${Hu(l)} (${c.length}) \u2192 ${st(c.map(u=>u.objectLabel||u.object),Ku)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${Hu(l)} (${c.length}) by ${st(c.map(u=>u.subjectLabel||u.subject),Ku)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${st(a,Wb)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${Cn(l.class)})`).join(", ")}`),e.truncated.length&&s.push(Gb(e)),s.join(`
2
- `)}function Gb(e){return`note: partial edge lists for: ${e.truncated.map(n=>`${n.predicate} (${n.shown}/${n.count})`).join(", ")}. Counts are complete; the lists are not.`}function no(e,t,{maxDepth:n=8}={}){let s=new Map,o=new Map,r=(a,l,c,u)=>{!a||!l||a===l||(s.has(a)||s.set(a,[]),s.get(a).push({id:l,label:c,via:u}))};for(let a of e.relations){let l=In(a);if(l==="imports"||l==="calls")for(let c of a.edges)r(c.object,c.subject,c.subjectLabel||c.subject,a.predicate);else if(l==="callsSymbol")for(let c of a.edges){let u=An(e,c.subject),d=An(e,c.object);if(!u||!d)continue;let f=e.byId.get(u)?.label||u;r(d,u,f,a.predicate),u!==d&&r(c.object,u,f,a.predicate)}else if(l==="tests")for(let c of a.edges)o.has(c.object)||o.set(c.object,[]),o.get(c.object).push(c.subjectLabel||c.subject)}let i=[];for(let a of Dr(t.id,l=>s.get(l)||[],{maxDepth:n,keyOf:l=>l.id})){if(!a.length)continue;let l=a.map(c=>({...c,tests:o.get(c.id)||[]})).sort((c,u)=>String(c.label).localeCompare(String(u.label)));i.push(l)}return i}function rd(e,t,{maxDepth:n=8}={}){let s=no(e,t,{maxDepth:n}),o=[`Impact of changing ${t.label} (reverse closure over imports/calls edges, module- and function-level):`];s.length||o.push("no dependents found in the current artifact \u2014 nothing imports or calls it (or its edges are not in the extracted graph yet).");let r=s.reduce((a,l)=>a+l.length,0);s.length&&o.push(`total: ${r} dependent(s) across ${s.length} depth level(s) (lists capped for brevity).`),s.forEach((a,l)=>{if(l>=qb){o.push(`depth ${l+1}: ${a.length} more dependent(s) (not listed)`);return}o.push(l===0?`depth 1 (${a.length} direct dependents):`:`depth ${l+1} (${a.length}):`);for(let c of a.slice(0,ka)){let u=c.tests.length?`tests: ${st(c.tests,Vb)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>ka&&o.push(` \u2026+${a.length-ka} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=In({predicate:a.predicate});return l==="imports"||l==="calls"||l==="callsSymbol"||l==="tests"});return i.length&&o.push("warning: partial edge lists ("+i.map(a=>`${a.predicate}: ${a.shown}/${a.count}`).join(", ")+") \u2014 this closure may be missing edges. Cross-check critical results with a lexical search (/find <term>)."),o.join(`
3
- `)}function id(e){let t=new Map;for(let n of e.relations)if(In(n)==="defines")for(let s of n.edges)t.has(s.subject)||t.set(s.subject,[]),t.get(s.subject).push(s.objectLabel||s.object);return t}function Xu(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function dd(e,t,n=null){let s=n||(i=>An(e,i)),o=new Map,r=(i,a)=>{!i||!a||i===a||(o.has(i)||o.set(i,new Set),o.has(a)||o.set(a,new Set),o.get(i).add(a),o.get(a).add(i))};for(let i of t)for(let a of ke(e,i))r(s(a.subject),s(a.object));return o}function Rw(e,t,n){if(t.length<2)return;let s=new Map(t.map(c=>[c.ind.id,c])),o=new Map(t.map(c=>[c.ind.id,c.score])),r=c=>{if(!c.size)return[[],[]];let u=0;for(let m of c.values())u=Math.max(u,m);let d=[...c.entries()].sort((m,h)=>h[1]-m[1]),f=[],p=[];for(let[m,h]of d)h>=u*ww&&f.length<n?f.push([m,h]):p.length<Yu&&p.push([m,h]);return[f,p]},[i,a]=r(new Map(t.map(c=>[c.ind.id,c.score]))),l=new Set(i.map(([c])=>c));for(let c=0;c<$w&&i.length;c++){let u=new Map,d=[];for(let f of xw){let p=dd(e,f),m=new Map;for(let[b,y]of i)for(let w of p.get(b)||[])o.has(w)&&m.set(w,Math.max(m.get(w)||0,y));let[h,g]=r(m);for(let[b,y]of h)u.set(b,Math.max(u.get(b)||0,y));d.push(...g)}a.push(...d);for(let[f,p]of u){if(l.has(f))continue;let m=s.get(f);m&&(m.score+=Math.min(p*yw,m.score*vw),l.add(f))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,Yu).filter(([f])=>!l.has(f)))}}function Aw(e,t=[],{depth:n=cd,q:s=ud,nodeLimit:o=ld,kinds:r=kw,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(_=>[_.ind.id,_])),d=0;for(let _ of t)d=Math.max(d,_.score);let f=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let m=dd(e,r,a),h=_=>m.get(_)?.size||0,g=[],b=(_,R)=>_.hop!==R.hop?_.hop<R.hop:_.deg!==R.deg?_.deg<R.deg:_.id<R.id,y=(_,R)=>{let S=g[_];g[_]=g[R],g[R]=S},w=_=>{g.push(_);let R=g.length-1;for(;R>0;){let S=R-1>>1;if(b(g[R],g[S]))y(R,S),R=S;else break}},$=()=>{let _=g[0],R=g.pop();if(g.length){g[0]=R;let S=0;for(;;){let A=2*S+1,L=2*S+2,T=S;if(A<g.length&&b(g[A],g[T])&&(T=A),L<g.length&&b(g[L],g[T])&&(T=L),T===S)break;y(S,T),S=T}}return _},j=new Set(p);for(let _ of p)w({id:_,hop:0,deg:h(_)});let v=null,x=0,k=[];for(;g.length&&x<o;){let _=$();if(k.push({id:_.id,hop:_.hop}),!p.has(_.id)){if(f){let A=d*Ew*Math.pow(Sw,_.hop-1),L=u.get(_.id);if(L)L.score+=Math.min(A*jw,L.score*_w);else{let T=e.byId?.get?.(_.id);if(T&&i(T)){v||(v=id(e));let P=v.get(T.id)||[],V={ind:T,score:A,defineCount:P.length,matching:[],density:0};t.push(V),u.set(_.id,V)}}}x++}if(_.hop>=n||_.hop>0&&h(_.id)>c)continue;let R=[];for(let A of m.get(_.id)||[]){if(j.has(A))continue;let L=e.byId?.get?.(A);!L||!i(L)||R.push({id:A,deg:h(A)})}if(!R.length)continue;R.sort((A,L)=>A.deg-L.deg||(A.id<L.id?-1:A.id>L.id?1:0));let S=Math.max(1,Math.floor(s*R.length));for(let A=0;A<S;A++){let L=R[A];j.add(L.id),w({id:L.id,hop:_.hop+1,deg:L.deg})}}return k}function pd(e,t,n={}){let{demoteNonProd:s=!1,callAdjacency:o=!1,implOfInterface:r=!1,beamSearch:i=!1,spiral:a=!1,proseBoost:l=!1,proseLayers:c=!1,literalMention:u=!1,rawQuery:d=""}=n,f=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=id(e),m=[];for(let $ of e.individuals){if(($.class||"")!=="Module")continue;let j=String($.label),v=j.toLowerCase(),x=p.get($.id)||[],k=new Set(x.map(S=>S.toLowerCase())),_=new Set;for(let S of x)for(let A of Xu(S))_.add(A);let R=u?String(($.attributes||[]).find(S=>S.key==="dotted")?.value||"").toLowerCase():"";m.push({ind:$,label:j,labelLc:v,defines:x,symSet:k,symComps:_,dotted:R})}let h=m.length||1,g=new Map,b=$=>{let j=0;for(let v of m)(v.labelLc.includes($)||v.symComps.has($)||v.symSet.has($))&&j++;return j},y=$=>(g.has($)||g.set($,ya(h,b($))),g.get($));for(let $ of t)y($);let w=[];for(let $ of m){let j=0,v=0,x=0,k=[];for(let L of t){let T=g.get(L)||0;T&&($.symSet.has(L)?(j+=T*ad,x++):$.symComps.has(L)&&(k.push(T),x++),$.labelLc.includes(L)&&(v+=T*Kb))}k.sort((L,T)=>T-L);let _=0;for(let L=0;L<Math.min(k.length,Xb);L++)_+=k[L]*Yb;let R=j+v+_;if(!R)continue;s&&(Es($.labelLc)||ew($.labelLc))?R*=Zb:Es($.labelLc)&&(R*=.4);let S=$.defines.filter(L=>{let T=L.toLowerCase(),P=Xu(L);return t.some(V=>T===V||P.has(V))}),A=$.defines.length?x/$.defines.length:0;w.push({ind:$.ind,score:R,defineCount:$.defines.length,matching:S,density:A})}if(u&&d&&w.length){let $=String(d).toLowerCase(),j=_=>_!=null&&/[a-z0-9_./]/.test(_),v=_=>{for(let R=$.indexOf(_);R!==-1;R=$.indexOf(_,R+1))if(!j($[R-1])&&!j($[R+_.length]))return!0;return!1},x=new Map(m.map(_=>[_.ind.id,_])),k=0;for(let _ of w)k=Math.max(k,_.score);for(let _ of w){let R=x.get(_.ind.id);if(!R)continue;let S=0;for(let A of new Set([R.dotted,R.labelLc])){if(!A||A.split(/[./]+/).filter(Boolean).length<mw||!v(A))continue;let L=[...new Set(A.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((P,V)=>V-P),T=0;for(let P=0;P<Math.min(L.length,hw);P++)T+=L[P]*fw;S=Math.max(S,T)}S&&(_.score+=Math.min(S*gw,k*bw))}}if(w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),j=new Map;for(let v of ke(e,"imports"))!$.has(v.subject)&&!$.has(v.object)||(j.has(v.subject)||j.set(v.subject,new Set),j.has(v.object)||j.set(v.object,new Set),j.get(v.subject).add(v.object),j.get(v.object).add(v.subject));for(let v of w){let x=0;for(let k of j.get(v.ind.id)||[])x=Math.max(x,$.get(k)||0);v.score+=Math.min(x*Jb,v.score*Qb)}}if(o&&w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),j=new Map;for(let v of["calls","callsSymbol"])for(let x of ke(e,v)){let k=An(e,x.subject),_=An(e,x.object);!k||!_||k===_||!$.has(k)&&!$.has(_)||(j.has(k)||j.set(k,new Set),j.has(_)||j.set(_,new Set),j.get(k).add(_),j.get(_).add(k))}for(let v of w){let x=0;for(let k of j.get(v.ind.id)||[])x=Math.max(x,$.get(k)||0);v.score+=Math.min(x*tw,v.score*nw)}}if(r&&w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),j=new Map;for(let v of e.individuals)(v.class||"")==="Class"&&v.label&&j.set(String(v.label),v);for(let v of w){if(!rw(v.ind.label))continue;let x=0;for(let k of ke(e,"inherits")){if(An(e,k.subject)!==v.ind.id||!iw(k.objectLabel))continue;let R=An(e,k.object);if(!R){let S=j.get(String(k.objectLabel||""));S&&(R=mn(e,S))}R&&(x=Math.max(x,$.get(R)||0))}v.score+=Math.min(x*sw,v.score*ow)}}if(l&&w.length&&e.proseIndex){let $=$s(e.proseIndex,t.join(" "),{limit:lw});if($.length){let j=new Map;for(let{id:v,score:x}of $){let k=An(e,v);k&&j.set(k,(j.get(k)||0)+x)}for(let v of w){let x=j.get(v.ind.id)||0;x&&(v.score+=Math.min(x*aw,v.score*cw))}}}if(c&&w.length&&e.proseIndex){let $=new Map(w.map(x=>[x.ind.id,x])),j=new Map(m.map(x=>[x.ind.id,x])),v=new Map;for(let x of new Set(t)){let k=g.get(x)||0;if(!k)continue;let{ids:_}=Mu(e.proseIndex,x);if(!_.length)continue;let R=new Set;for(let S of _){let A=An(e,S);if(!A||R.has(A)||(R.add(A),!$.has(A)))continue;let L=j.get(A);L&&(L.symSet.has(x)||L.symComps.has(x)||L.labelLc.includes(x))||v.set(A,(v.get(A)||0)+k*pw)}}for(let x of w){let k=v.get(x.ind.id)||0;k&&(x.score+=Math.min(k*uw,x.score*dw))}}return i&&w.length>1&&Rw(e,w,f),a&&w.length&&Aw(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:cd,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:ud,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:ld}),w.sort(($,j)=>j.score-$.score||j.density-$.density||$.defineCount-j.defineCount||String($.ind.label).length-String(j.ind.label).length),w}function fd(e,t,n={}){let s=String(t||""),o=s.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);if(!o.length)return[];let r=n.literalMention?{...n,rawQuery:s}:n;return pd(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function Cw(e){let t=0,n=!1,s=!1,o=!1,r="",i=!1,a=()=>{t+=1,r===")"&&(n=!0),i=!0};for(let l=0;l<e.length;l++){let c=e[l];if(c==="\\"){let u=e[l+1]||"";!o&&u>="1"&&u<="9"&&(s=!0),l+=1,r="",i=!1;continue}if(o){c==="]"&&(o=!1,r="]",i=!1);continue}if(c==="["){o=!0,r="[",i=!1;continue}if(c==="?"&&(r==="("||i)){r="?",i=!1;continue}if(c==="*"||c==="+"||c==="?"){a(),r=c;continue}if(c==="{"){let u=e.indexOf("}",l),d=u===-1?"":e.slice(l+1,u);if(u!==-1&&/^\d+(,\d*)?$/.test(d)){a(),l=u,r="}";continue}r="{",i=!1;continue}r=c,i=!1}return{quantifiers:t,quantifiedGroup:n,backreference:s}}function Aa(e,{now:t=Date.now}={}){let n=String(e);if(n.length>Ju)return{error:`name pattern is ${n.length} characters; the limit is ${Ju}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=Cw(n);if(o)return{error:`name pattern "${n}" quantifies a group, which can backtrack for minutes on one label. Quantify a character or a class instead.`};if(r)return{error:`name pattern "${n}" uses a back-reference, which can backtrack for minutes on one label.`};if(s>Qu)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${Qu}.`};let i;try{i=new RegExp(n,"i")}catch{return{error:`invalid name pattern: ${n}`}}let a=null;return{test(l){if(a===null)a=t()+Zu;else if(t()>a)throw new Br(`name pattern "${n}" exceeded its ${Zu}ms matching budget.`);return i.test(String(l).slice(0,Tw))}}}function md(e,t,{limit:n=Wr,kind:s="",decorator:o="",name:r="",toolNamePrefix:i="tmct_"}={}){let a=String(t||"").toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean),l=String(s||"").trim().toLowerCase(),c=String(o||"").trim().toLowerCase(),u=null;if(r){let m=Aa(r);if(m.error)return m.error;u=m}if(l&&l!=="module")try{return Mw(e,a,{limit:n,kind:l,decFilter:c,nameRe:u,toolNamePrefix:i})}catch(m){if(m instanceof Br)return m.message;throw m}if(!a.length&&!u&&!c)return"empty query";let d=pd(e,a);if(!d.length)return`no module matches "${t}". Try broader keywords, or ${i}describe <path> if you know where it lives.`;let f=d.slice(0,n),p=[`${d.length} module(s) match "${t}" (top ${f.length}):`];for(let{ind:m,defineCount:h,matching:g}of f){let b=g.length?` \u2014 matching: ${st([...new Set(g)],Hb)}`:"";p.push(`- ${m.label} (defines ${h} symbol(s))${b}`)}return p.push(`Then ${i}describe <path> for the full sibling list + typed edges, or ${i}impact <path> for dependents.`),p.join(`
4
- `)}function ke(e,t){let n=ed.get(e);n||(n=new Map,ed.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(In(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function An(e,t){let n=e.byId?.get?.(t);if(n)return mn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function mn(e,t){if((t?.class||"")==="Module")return t.id;let n=vt(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function Ta(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function to(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function hd(e,t,{toolNamePrefix:n="tmct_"}={}){let s=[`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`],o=ke(e,"contains").filter(a=>a.subject===t.id);if(!o.length)return s.push(`members: none recorded (empty class, or members not in the extracted graph). Use ${n}describe for its edges.`),s.join(`
5
- `);let r=[],i=[];for(let a of o){let l=e.byId.get(a.object),c=Ta(l?vt(l):null),u=l?to(l):"",d=`${a.objectLabel||a.object}${c}${u?` @${u}`:""}`;((l?.class||"")==="Attribute"?i:r).push(d)}return r.length&&s.push(`methods (${r.length}): ${st(r,td)}`),i.length&&s.push(`attributes (${i.length}): ${st(i,td)}`),s.push(`Use ${n}snippet <Class.member> for an exact body.`),s.join(`
6
- `)}function gd(e,t,{toolNamePrefix:n="tmct_"}={}){let s=vt(t),o=[`${t.label} \u2014 ${Cn(t.class)}${Ta(s)}`],r=Pe(t,"params"),i=Pe(t,"returns");(r||i||(t.class||"")==="Method"||(t.class||"")==="Function")&&o.push(`signature: ${t.label}(${r})${i?` -> ${i}`:""}`);let a=[];Pe(t,"isStatic")&&a.push("static"),Pe(t,"isAbstract")&&a.push("abstract"),Pe(t,"isConstant")&&a.push("constant");let l=Pe(t,"visibility");l&&a.push(l),a.length&&o.push(`flags: ${a.join(", ")}`);let c=to(t);c&&o.push(`decorators: @${c.split(", ").join(", @")}`);let u=Pe(t,"raises");u&&o.push(`raises: ${u}`);let d=Pe(t,"catches");d&&o.push(`catches: ${d}`);let f=Pe(t,"self_fields");f&&o.push(`self fields: ${f}`);let p=Pe(t,"value");p&&o.push(`value: ${p}`);let m=Pe(t,"doc");return m&&o.push(`doc: ${m}`),o.length===1&&o.push(`(no signature detail recorded for this symbol \u2014 likely a module or attribute; use ${n}snippet for its source.)`),o.push(`Use ${n}snippet for the exact body.`),o.join(`
7
- `)}function bd(e,t){let n=ke(e,"inherits"),s=n.filter(l=>l.subject===t.id).map(l=>l.objectLabel||l.object),o=new Map;for(let l of n)o.has(l.object)||o.set(l.object,[]),o.get(l.object).push({id:l.subject,label:l.subjectLabel||l.subject});let r=[`${t.label} \u2014 ${Cn(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${st(s,nd)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of Dr(t.id,c=>o.get(c)||[],{maxDepth:8,keyOf:c=>c.id}))l.length&&i.push(l.map(c=>c.label).sort((c,u)=>String(c).localeCompare(String(u))));let a=i.reduce((l,c)=>l+c.length,0);return a?(r.push(`subclasses: ${a} total across ${i.length} level(s).`),i.forEach((l,c)=>r.push(` depth ${c+1} (${l.length}): ${st(l,nd)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
- `)}function Gr(e){let t=new Map;for(let n of e){let s=n.label.includes("/")?n.label.slice(0,n.label.lastIndexOf("/")):"(root)";t.set(s,(t.get(s)||0)+1)}return t}function qr(e,t=""){let n=Tn(t);return e.individuals.filter(s=>(s.class||"")==="Module"&&(!n||Tn(s.label).startsWith(n)))}function wd(e,{pkg:t=""}={}){let n=Tn(t),s=qr(e,t);if(!s.length)return n?`no modules under "${t}".`:"no modules in the graph.";let o=Gr(s),r=new Map;for(let u of ke(e,"imports"))r.set(u.object,(r.get(u.object)||0)+1);let i=new Set(s.map(u=>u.id)),a=[...r.entries()].filter(([u])=>i.has(u)).sort((u,d)=>d[1]-u[1]).slice(0,Ow).map(([u,d])=>`${e.byId.get(u)?.label||u} (${d} importers)`),l=[...o.entries()].sort((u,d)=>d[1]-u[1]),c=[`Architecture${n?` of ${t}`:""}: ${s.length} module(s) in ${l.length} package(s).`];return c.push(`packages (by module count): ${st(l.map(([u,d])=>`${u} (${d})`),Iw)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
- `)}function vd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||vt(t)?.path||n,o=[...new Set(ke(e,"tests").filter(a=>a.object===n).map(a=>a.subjectLabel||a.subject))],r=o.length>0,i=r?`covered by ${o.length} test module(s):
10
- ${st(o,yd,`
1
+ (()=>{var ew=Object.defineProperty;var L=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(s){throw n=[s],s}};var Sn=(e,t)=>{for(var n in t)ew(e,n,{get:t[n],enumerable:!0})};var it,JR,QR,ZR,eA,tA,nA,sA,oA,rA,iA,aA,cA,lA,uA,dA,pA,Q,xe,qt,_u,fA,mA,hA,ze=L(()=>{it=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},JR=it("createRequire"),QR=it("readFileSync"),ZR=it("access"),eA=it("readFile"),tA=it("writeFile"),nA=it("appendFile"),sA=it("mkdir"),oA=it("mkdtemp"),rA=it("rename"),iA=it("unlink"),aA=it("rm"),cA=it("stat"),lA=it("copyFile"),uA=it("readdir"),dA=it("createReadStream"),pA=it("createWriteStream"),Q=(...e)=>e.join("/"),xe=e=>String(e).replace(/\/[^/]*$/,""),qt=(...e)=>e.join("/"),_u="/",fA=it("randomBytes"),mA=it("spawnSync"),hA=it("createInterface")});var at,bA,wA,Ru,Be,Do,tw,jn,nw,Fr,pa,sw,ow,yA,rw,vA,$A,xA,kA,EA,kt=L(()=>{at=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},bA=at("createRequire"),wA=at("readFileSync"),Ru=at("access"),Be=at("readFile"),Do=at("writeFile"),tw=at("appendFile"),jn=at("mkdir"),nw=at("mkdtemp"),Fr=at("rename"),pa=at("unlink"),sw=at("rm"),ow=at("stat"),yA=at("copyFile"),rw=at("readdir"),vA=at("createReadStream"),$A=at("createWriteStream"),xA=at("randomBytes"),kA=at("spawnSync"),EA=at("createInterface")});function ws(e){return e.replace(iw,"").trim()}function en(e){let t=e;for(let n=0;n<2;n+=1){let s=t.replace(cw,"").trim();if(s=s.replace(uw,"").trim(),s===t)break;t=s}return t}var Au,zo,Zs,Tu,Cu,Bo,Zt,Ou,un,fa,iw,aw,cw,lw,uw,de,Uo,dw,Iu,Ue,Ht,Hn,Lu,ma,ha,ga,Nu,Wo,ys,Mu,Pu,vs,_n,Rn,eo,Ye,Fu,$s,xs,Kn,gn,Du,Go,to,Dr,no,zu,An=L(()=>{Au=["is a superclass of","are a superclass of","is a parent class of","are a parent class of","superclass","superclasses"],zo={imports:{bare:"import",comment:"Module -> Module: subject's import graph references object (usesComplexType).",verbs:["couples to","couple to","depends on","imports","import","relies on","rely on","requires","require","references","reference","pulls in","pull in","built on","builds on","build on","uses code from","grabs","grab","pulls from","pull from","leans on","lean on","is wired to","are wired to","is hooked up to","are hooked up to","importing"]},uses:{bare:"use",comment:"query-side union: imports (Module->Module) + calls (Module->Module) + callsSymbol (fn->fn).",verbs:["uses","use","makes use of","make use of","talks to","talk to","using"]},calls:{bare:"call",comment:"Function/Method -> Function/Class (symbol-grain) or Module -> Module (coarse): subject invokes object.",verbs:["invokes","invoke","calls","call","runs","run","executes","execute","hits","hit","triggers","trigger","fires","fire","kicks off","kick off","calling"]},defines:{bare:"define",comment:"Module -> top-level Function/Class/Method/Attribute: subject declares object.",verbs:["defines","define","declares","declare","has","have","holds","hold","defining"]},contains:{bare:"contain",comment:"Class -> Method/Attribute: subject's membership includes object.",verbs:["contains","contain","lives in","live in","is defined in","are defined in","is part of","are part of","sits in","sit in","sits inside","sit inside","containing"]},tests:{bare:"test",comment:"Module -> Module: subject is a test module importing/covering object.",verbs:["tests","test","covers","cover","verifies","verify","exercises","exercise","checks","check","makes sure of","make sure of","testing"]},inherits:{bare:"inherit from",comment:"Class -> Class: subject's declared base resolves to object (subclassOf).",verbs:["inherits from","inherit from","inherits","inherit","extends","extend","subclasses","subclass","derives from","derive from","is a subclass of","are a subclass of","is a kind of","are a kind of","is built off","are built off","is built on top of","are built on top of","extending","inheriting from","inheriting","subclassing","extends from",...Au]},touches:{bare:"touch",comment:"Commit -> Module (coarse) or Commit -> symbol (fine, touchesSymbol): a commit's changed-line-range intersects object.",verbs:["touched","touches","changed","change","modified","modifies","was changed in","were changed in","was edited in","were edited in","was modified by","were modified by","was tweaked in","were tweaked in","got changed in","got edited in","touch","changed in","landed in","land in","was in","were in","went into","included in","updated","edited","touching"]},cochange:{bare:"co-change with",comment:"Module -> Module: subject and object are frequently committed together (changeCoupledWith).",verbs:["changed with","co-changes with","co-change with","changes alongside","change alongside","shares commits with","share commits with","tends to change together with","tend to change together with","moves together with","move together with","changed together with","change together with","changes together with","changes with","change with","tends to change with","tend to change with","usually changes with"]},reexports:{bare:"re-export",comment:"Module -> exported symbol: subject's public API surface (__all__/export list).",verbs:["exports","export","re-exports","re-export","passes through","pass through","exposes","expose","exporting"]},serves:{bare:"serve",comment:"subject provides or backs the object \u2014 a handler serving a route, a module serving a surface (mgx:serves).",verbs:["serves","serve","serving"]},denotes:{bare:"denote",comment:"subject names the object \u2014 a glossary/lexicon term denoting a code entity (mgx:denotes).",verbs:["denotes","denote","denoting"]}},Zs=Object.freeze({placement:Object.freeze({predicate:"mgx:currently-in",comment:"individual -> place: where the subject is right now.",nouns:Object.freeze(["location","locations","position","positions","place","places","whereabouts","room","rooms"]),reads:"is in"}),mood:Object.freeze({predicate:"mgx:feels",comment:"individual -> mood word: how the subject feels right now.",nouns:Object.freeze(["mood","moods","feeling","feelings","emotion","emotions"]),reads:"feels"}),mass:Object.freeze({predicate:"mgx:mass",comment:"individual -> number: the subject's current mass.",nouns:Object.freeze(["mass","masses","weight","weights"]),reads:"has mass"})}),Tu=Object.freeze(Object.fromEntries(Object.entries(Zs).flatMap(([e,{nouns:t}])=>t.map(n=>[n,e])))),Cu=Object.freeze(Object.values(Zs).map(e=>e.predicate)),Bo=Object.freeze([...Au,"is the superclass of","are the superclass of","is the parent class of"]),Zt=Object.freeze(["defined","declared","located","implemented"]),Ou=Object.freeze(["now","currently","right now","at the moment","these days","today"]),un=Object.freeze(["mentioned","referenced"]),fa=Object.freeze(["in this graph","in the graph","in this codebase","in the codebase","in this repo","in the repo","here"]),iw=new RegExp(`\\s+(?:${fa.join("|")})\\s*[?.!]*$`,"i");aw=Object.freeze(["then","though","too"]),cw=new RegExp(`\\s+(?:${aw.join("|")})\\s*[?.!]*$`,"i"),lw=Object.freeze(["please explain","explain"]),uw=new RegExp(`,\\s*(?:${lw.join("|")})\\s*[?.!]*$`,"i");de=Object.freeze(Object.fromEntries(Object.entries(zo).flatMap(([e,{verbs:t}])=>t.map(n=>[n,e])))),Uo=Object.freeze(new Set(["has","have","holds","hold"])),dw=e=>!Bo.includes(e),Iu=Object.freeze([...new Set(Object.keys(de).filter(dw).map(e=>e.match(/^(?:is|are)\s+an?\s+(.+)$/i)).filter(Boolean).map(e=>e[1].toLowerCase()))]),Ue=Object.freeze({function:"Function",functions:"Function",method:"Method",methods:"Method",class:"Class",classes:"Class",module:"Module",modules:"Module",mod:"Module",mods:"Module",file:"Module",files:"Module",package:"Package",packages:"Package",attribute:"Attribute",attributes:"Attribute",field:"Attribute",fields:"Attribute",variable:"GlobalVariable",variables:"GlobalVariable",global:"GlobalVariable",globals:"GlobalVariable",change:"Change",changes:"Change",commit:"Commit",commits:"Commit"}),Ht=Object.freeze({explicitly:"direct",directly:"direct",transitively:"transitive",indirectly:"transitive"}),Hn=Object.freeze({imported:"imports",called:"calls",used:"uses",tested:"tests",covered:"tests",verified:"tests",exercised:"tests",checked:"tests",defined:"defines",declared:"defines",inherited:"inherits",extended:"inherits",subclassed:"inherits",contained:"contains",exported:"reexports","re-exported":"reexports",exposed:"reexports",touched:"touches",changed:"touches",modified:"touches",edited:"touches",updated:"touches"}),Lu=Object.freeze({"inherited from":{kind:"inherits",role:"object"},"extended from":{kind:"inherits",role:"object"},"subclassed from":{kind:"inherits",role:"object"},"defined in":{kind:"defines",role:"agent"},"declared in":{kind:"defines",role:"agent"},"contained in":{kind:"contains",role:"agent"},"imported by":{kind:"imports",role:"agent"},"called by":{kind:"calls",role:"agent"},"used by":{kind:"uses",role:"agent"},"tested by":{kind:"tests",role:"agent"},"covered by":{kind:"tests",role:"agent"},"touched by":{kind:"touches",role:"agent"},"changed by":{kind:"touches",role:"agent"},"exported by":{kind:"reexports",role:"agent"}}),ma=Object.freeze({"ain't":"is not",aint:"is not","isn't":"is not",isnt:"is not","aren't":"are not",arent:"are not","doesn't":"does not",doesnt:"does not","don't":"do not",dont:"do not","didn't":"did not",didnt:"did not","there's":"there is",theres:"there is","what's":"what is",whats:"what is","who's":"who is",whos:"who is",gonna:"going to",wanna:"want to",gotta:"got to",yer:"your",ur:"your",gimme:"give me"}),ha=Object.freeze({funtion:"function",funtions:"functions",fucntion:"function",fucntions:"functions",functoin:"function",functoins:"functions",calss:"class",calsses:"classes",classs:"class",clases:"classes",modul:"module",moduls:"modules",moduel:"module",moduels:"modules",moudle:"module",moudles:"modules",methdo:"method",methdos:"methods",mehtod:"method",mehtods:"methods",comit:"commit",comits:"commits",commmit:"commit",commmits:"commits",varaible:"variable",varaibles:"variables",varibale:"variable",varibales:"variables",atribute:"attribute",atributes:"attributes",improt:"import",improts:"imports",imoprt:"import",imoprts:"imports",inherts:"inherits",inheirts:"inherits",extands:"extends",extneds:"extends",depnds:"depends",touchs:"touches",tuoches:"touches",touhced:"touched",touchd:"touched",defned:"defined",chagned:"changed",chnaged:"changed",chagnes:"changes",chnages:"changes",calles:"calls",exprot:"export",exprots:"exports",tets:"tests",whcih:"which",wich:"which",whihc:"which",wehre:"where",whre:"where",waht:"what",wat:"what",dat:"that",dose:"does",doess:"does",teh:"the",manyn:"many",mnay:"many",amny:"many",mnany:"many",hwo:"how",coutn:"count",conut:"count",cuont:"count",ocunt:"count",numer:"number",nubmer:"number",numbr:"number",nmuber:"number",lst:"list",lsit:"list",ilst:"list",shwo:"show",hsow:"show",dispaly:"display",dsiplay:"display",funtcions:"functions",funciton:"function",funcitons:"functions"}),ga=Object.freeze({folder:"module",folders:"modules",directory:"module",directories:"modules",func:"function",funcs:"functions",changeset:"commit",changesets:"commits",revision:"commit",revisions:"commits",property:"attribute",properties:"attributes"}),Nu=/\b([a-z]{3,})in'/gi,Wo=Object.freeze(["um","uh","erm","so","like","yo","hey","bru","bro","fam","mate","please","could you","can you","would you","tell me","i wonder","just wondering","quickly","real quick","kinda","sorta","btw","by the way","you","quick q"]),ys=Object.freeze(["this","it","that","here","this one","that one"]),Mu=Object.freeze([{re:/\bthere\s+is\s+not\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bthere\s+is\s+no\s+\S+\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\bis\s+not\s+there\s+(?:anything|nothing)\s+(?:that\s+)?(\S.*)$/i,to:e=>`what ${e[1]}`},{re:/\b(?:nobody|nothing|no one)\s+(\S.*?)(?:,?\s+does\s+it\??|,?\s+do\s+they\??)?$/i,to:e=>`what ${e[1]}`}]),Pu=Object.freeze([{re:/^what\s+(?:is|was|were|are)\s+in\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+(?:went|got)\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`},{re:/^what\s+made\s+it\s+into\s+((?:commit\s+)?[0-9a-f]{7,40})\??$/i,to:e=>`what did ${e[1]} touch`}]),vs=Object.freeze(["mean","means","stand for","stands for","signify","signifies","represent","represents","refer to","refers to"]),_n=Object.freeze(["that","which","who"]),Rn=Object.freeze(["something","anything","everything","somethings","things","thing","entities","entity","nodes","node","stuff","code","symbol","symbols"]),eo=Object.freeze({"but do not":"difference","but does not":"difference","and do not":"difference","and does not":"difference","but not":"difference","and not":"difference",except:"difference",without:"difference",and:"intersection",plus:"intersection",but:"intersection",or:"union"}),Ye=Object.freeze({public:{via:"visibility",value:"public"},private:{via:"visibility",value:"private"},protected:{via:"visibility",value:"protected"},static:{via:"attr",attr:"isStatic"},abstract:{via:"attr",attr:"isAbstract"},constant:{via:"attr",attr:"isConstant"},exported:{via:"exported"},"re-exported":{via:"exported"},tested:{via:"tested",value:!0},covered:{via:"tested",value:!0},untested:{via:"tested",value:!1},uncovered:{via:"tested",value:!1}}),Fu=Object.freeze(new Set(["tests","test","anything","something","anyone","someone","any"])),$s=Object.freeze(["how many","how much","how many of","number of","total number of","quantity of","tally of","sum of","total of","amount of","count","count up","count of","tot up"]),xs=Object.freeze(["list","show","show me","show us","display","print","print out","dump","enumerate","name","give me","get me","spit out","rattle off","run down","run through","ls","what are","which are"]),Kn=Object.freeze({most:"most",greatest:"most",highest:"most",biggest:"most",largest:"most","most-connected":"most","most connected":"most",fewest:"fewest",least:"fewest",smallest:"fewest",lowest:"fewest"}),gn=Object.freeze({imports:{kind:"imports",dir:"out"},dependencies:{kind:"imports",dir:"out"},importers:{kind:"imports",dir:"in"},dependents:{kind:"imports",dir:"in"},callers:{kind:"calls",dir:"in",sibling:"callsSymbol"},callees:{kind:"calls",dir:"out",sibling:"callsSymbol"},calls:{kind:"calls",dir:"out",sibling:"callsSymbol"},methods:{kind:"contains",dir:"out",filter:"Method"},members:{kind:"contains",dir:"out"},tests:{kind:"tests",dir:"in"},test:{kind:"tests",dir:"in"},subclasses:{kind:"inherits",dir:"in"},connections:{kind:"*",dir:"both"},edges:{kind:"*",dir:"both"},connected:{kind:"*",dir:"both"},imported:{kind:"imports",dir:"in"},"depended-on":{kind:"imports",dir:"in"},depended:{kind:"imports",dir:"in"},used:{kind:"imports",dir:"in",sibling:"callsSymbol"},called:{kind:"calls",dir:"in",sibling:"callsSymbol"}}),Du=Object.freeze({tests:"Module",test:"Module"}),Go=Object.freeze(["those","them","these"]),to=Object.freeze(["contains","defines"]),Dr=Object.freeze(["the","a","an","some","other","about","please","pls","plz","kindly","just","simply","maybe","perhaps","thanks","thank","ta","cheers","too","also","well","either","sorry","oops","actually","mean","meant","rather","hi","hello","hey","yo","hiya","howdy","ok","okay","matey","mate","buddy","pal","dude","man","bro","bru","fam","friend","sir","maam","folks","guys","everyone","dear","tmct","show","tell","give","list","find","me","us","lemme"]),no=Object.freeze({tally:"count",tallies:"count",sum:"count",total:"count",totals:"count"}),zu=Object.freeze(["help","help me","how do i ask","how do i use this","what can i ask","what can you ask","usage","commands","examples","syntax","options"])});var We,so,ba=L(()=>{We="#000000",so=Object.freeze({happy:`<circle cx="-0.4" cy="-0.15" r="0.11" fill="${We}" opacity="0.85"/><circle cx="0.4" cy="-0.15" r="0.11" fill="${We}" opacity="0.85"/><path d="M -0.4 0.35 Q 0 0.68 0.4 0.35" fill="none" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,sad:`<circle cx="-0.4" cy="-0.1" r="0.1" fill="${We}" opacity="0.85"/><circle cx="0.4" cy="-0.1" r="0.1" fill="${We}" opacity="0.85"/><path d="M -0.38 0.55 Q 0 0.3 0.38 0.55" fill="none" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/>`,angry:`<path d="M -0.58 -0.32 L -0.22 -0.16" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><path d="M 0.58 -0.32 L 0.22 -0.16" stroke="${We}" stroke-width="0.09" stroke-linecap="round" opacity="0.85"/><circle cx="-0.32" cy="-0.02" r="0.09" fill="${We}" opacity="0.85"/><circle cx="0.32" cy="-0.02" r="0.09" fill="${We}" opacity="0.85"/><path d="M -0.36 0.5 L 0.36 0.42" stroke="${We}" stroke-width="0.1" stroke-linecap="round" opacity="0.85"/>`,scared:`<circle cx="-0.4" cy="-0.12" r="0.2" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.4" cy="-0.12" r="0.07" fill="${We}" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.2" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="0.4" cy="-0.12" r="0.07" fill="${We}" opacity="0.85"/><circle cx="0" cy="0.42" r="0.09" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/>`,surprised:`<circle cx="-0.38" cy="-0.12" r="0.17" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="-0.38" cy="-0.12" r="0.06" fill="${We}" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.17" fill="none" stroke="${We}" stroke-width="0.07" opacity="0.85"/><circle cx="0.38" cy="-0.12" r="0.06" fill="${We}" opacity="0.85"/><ellipse cx="0" cy="0.42" rx="0.16" ry="0.22" fill="${We}" opacity="0.7"/>`,calm:`<path d="M -0.5 -0.1 Q -0.4 -0.2 -0.3 -0.1" fill="none" stroke="${We}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/><path d="M 0.3 -0.1 Q 0.4 -0.2 0.5 -0.1" fill="none" stroke="${We}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/><path d="M -0.3 0.4 Q 0 0.5 0.3 0.4" fill="none" stroke="${We}" stroke-width="0.08" stroke-linecap="round" opacity="0.85"/>`})});var pw,tn,Bu,Uu,wa,Wu,TA,CA,Gu=L(()=>{An();ba();pw=()=>Object.keys(so).sort(),tn=e=>({type:"object",required:["symbol"],properties:{symbol:{type:"string",description:e}}}),Bu=e=>({type:"object",required:["module"],properties:{module:{type:"string",description:e}}}),Uu=e=>({type:"object",required:["class"],properties:{class:{type:"string",description:e}}}),wa=Object.freeze([{name:"tmct_context",tier:"hot",summary:"A sized edit bundle for one symbol \u2014 exemplar source, sibling signatures, registration anchor and the insertion region, in one call.",agentDescription:"START HERE to add/modify code: ONE call returns a sized edit bundle (exemplar source, sibling signatures, registration, insertion region) \u2014 then write directly, don't Read.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"Module path (e.g. path/to/module) or a sibling function/class name defined in it."},depth:{type:"string",enum:["min","auto","full"],default:"auto",description:"auto (sized to the task) | min (leanest) | full (every section)."}}},example:{symbol:"django/utils/text.py"}},{name:"tmct_snippet",tier:"hot",summary:"The exact source of one function, class or Class.method \u2014 its line span only, plus a one-line in-repo call hint.",agentDescription:"EXACT source of one function/class/Class.method by name (its line span only) + a one-line in-repo call hint. Prefer over Read for a single symbol.",inputSchema:{type:"object",required:["symbol"],properties:{symbol:{type:"string",description:"function/class name, Class.method, or fn:<path>#name."}}},example:{symbol:"Truncator.chars"}},{name:"tmct_ask",tier:"hot",summary:"A structural question in plain English, answered from the graph in one call \u2014 no model, and a clean miss instead of a guess.",agentDescription:'Ask a structural question in plain English: "which functions call X", "what uses X", "where is X defined", "when did X change". One call, no model. A clean miss beats a guess.',inputSchema:{type:"object",required:["query"],properties:{query:{type:"string",description:'A free-text question, e.g. "which functions explicitly couple to logging".'}}},example:{query:"which modules import src/core/model.mjs"},chat:{exampleRepo:"examples/mini-webapp",grammar:[{form:"which <things> <relation-verb> <entity>",example:"which modules import src/core/model.mjs",answers:"the imports edge, read forwards"},{form:"what is <relation-verb-passive> <entity>",example:"what is imported by src/core/store.mjs",answers:"the same edge, read backwards \u2014 a passive is the opposite direction, not a synonym"},{form:"what <relation-verb> <entity>",example:"what uses src/lib/http.mjs",answers:"the uses union: imports plus calls"},{form:"where is <entity> <where-marker>",example:"where is saveStore defined",answers:"the definition's file and line span"},{form:"when did <entity> change",example:"when did src/core/store.mjs change",answers:"the commits that touched it, newest first"}],whereMarkers:Zt}},{name:"tmct_describe",tier:"cold",summary:"Locate one symbol and list its typed edges (both directions) with provenance.",inputSchema:tn("A module path, symbol name, or Class.method."),example:{symbol:"django/utils/text.py"}},{name:"tmct_signature",tier:"cold",summary:"One symbol's API surface (params, returns, raises/catches, flags, decorators, doc) without the body.",inputSchema:tn("A function, method, or Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_impact",tier:"cold",summary:"Transitive reverse closure over imports/calls \u2014 what breaks if a module or symbol changes, by depth, with tests.",inputSchema:Bu("The module (or a symbol it defines) whose dependents you want."),example:{module:"django/utils/text.py"}},{name:"tmct_search",tier:"cold",summary:"Free-text/ranked lookup over the code-map to find the right module or symbol.",inputSchema:{type:"object",required:[],properties:{query:{type:"string",description:"Free text to rank against the code-map. Required unless kind narrows the search on its own."},kind:{type:"string",description:"Restrict to an entity class, e.g. function, class, module."},decorator:{type:"string",description:"Restrict to definitions carrying this decorator."},name:{type:"string",description:"Restrict to definitions whose name matches."}}},example:{query:"template filters",kind:"function"}},{name:"tmct_members",tier:"cold",summary:"A class's methods + attributes (file:line, decorators) in one slice.",inputSchema:Uu("The class whose members you want."),example:{class:"Truncator"}},{name:"tmct_subclasses",tier:"cold",summary:"A class's base classes plus the transitive set of classes that extend it.",inputSchema:Uu("The class to walk the inheritance edges of."),example:{class:"Field"}},{name:"tmct_related",tier:"cold",summary:"A term's synonyms (skos:altLabel) and related concepts (skos:related), from the memory graph's relation facts.",inputSchema:{type:"object",required:["term"],properties:{term:{type:"string",description:"The term whose synonyms / related concepts you want."}}},example:{term:"sofa"}},{name:"tmct_sprite",tier:"cold",summary:"The sprite markup for a class, resolved up the taught rdfs:subClassOf chain \u2014 with the expression and size asked for, and the ancestor chain the resolver walked to find it.",inputSchema:{type:"object",required:["class"],properties:{class:{type:"string",description:"The class to draw, e.g. spider. Resolved through the memory graph's own rdfs:subClassOf taxonomy."},expression:{type:"string",enum:pw(),description:"The face the sprite wears, as an mgx:feels value. A class whose template takes no expression parameter misses rather than dropping it."},size:{type:"string",description:"A taught size property word (mgx:hasProperty), resolved to a numeric render SCALE \u2014 the size of the thing drawn, not a choice of template tier."}}},example:{class:"spider",expression:"happy",size:"large"}},{name:"tmct_architecture",tier:"cold",summary:"Package/module map + the most-imported hub modules (optionally scoped to a package).",inputSchema:{type:"object",required:[],properties:{package:{type:"string",description:"Scope the map to one package. Omit for the whole repository."}}},example:{package:"django/template"}},{name:"tmct_exports",tier:"cold",summary:"A module's public __all__ surface, each name resolved to the module that defines it.",inputSchema:Bu("The module whose public API surface you want."),example:{module:"django/db/models/__init__.py"}},{name:"tmct_tests_for",tier:"cold",summary:"The test modules covering a symbol or module, from the typed test edges.",inputSchema:tn("The symbol or module to find covering tests for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_untested",tier:"cold",summary:"Source modules with no covering test module \u2014 a coverage-gap view (no arguments).",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_history",tier:"cold",summary:"Recent commits that touched a symbol's module (newest first).",inputSchema:tn("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_file_history",tier:"cold",summary:"Commits that touched a symbol's module, each with author / date / subject.",inputSchema:tn("The symbol whose module's history you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_method_history",tier:"cold",summary:"Commits that touched a specific method symbol (fine-grained), with author / date / subject.",inputSchema:tn("A Class.method name."),example:{symbol:"Truncator.chars"}},{name:"tmct_class_history",tier:"cold",summary:"Commits that touched a specific class symbol (fine-grained), with author / date / subject.",inputSchema:tn("A class name."),example:{symbol:"Truncator"}},{name:"tmct_callers",tier:"cold",summary:"Modules that call into a symbol's module (one hop).",inputSchema:tn("The symbol whose callers you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_callees",tier:"cold",summary:"Modules a symbol's module calls into (one hop).",inputSchema:tn("The symbol whose callees you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_calls",tier:"cold",summary:"The in-repo symbols a function calls (fn\u2192fn), each with file:line.",inputSchema:tn("The function whose in-repo call sites you want."),example:{symbol:"slugify"}},{name:"tmct_cochanges",tier:"cold",summary:"Modules that historically change in the same commit as a symbol's module (git co-change).",inputSchema:tn("The symbol whose module's change-coupling you want."),example:{symbol:"django/utils/text.py"}},{name:"tmct_context_more",tier:"cold",summary:"The bundle sections a lean tmct_context omitted (siblings / tests / cochange / class members / re-exports).",inputSchema:tn("The symbol a lean tmct_context bundle was built for."),example:{symbol:"django/utils/text.py"}},{name:"tmct_export",tier:"cold",summary:"Every stored memory fact as JSONL (subject/predicate/object/provenance) \u2014 the shape `tmct extract` emits, for backup or audit.",inputSchema:{type:"object",required:[],properties:{}},example:{}},{name:"tmct_ingest",tier:"cold",summary:"Ground plain text into memory facts with the same deterministic recognizer the chat teach lane uses \u2014 the strict tier, plus an optional lower-trust fuzzy tier \u2014 and report the canonical triples.",inputSchema:{type:"object",required:["text"],properties:{text:{type:"string",description:"The plain text to ground into facts."},optimistic:{type:"boolean",description:"Also run the lower-trust fuzzy tier over sentences the strict recognizer skips."}}},example:{text:"A kettle is a container. An otter is a mammal.",optimistic:!0}}]),Wu=wa.filter(e=>e.tier==="hot"),TA=wa.filter(e=>e.tier==="cold"),CA=Object.freeze(wa.map(e=>e.name))});var Vu,Re,Mt=L(()=>{ze();Vu=Q(".tmct","graph.json"),Re=class extends Error{constructor(t){super(t),this.name="ToolError"}}});function fw(e){let t=new Set;for(let n of Array.isArray(e?.individuals)?e.individuals:[])n&&n.id&&t.add(n.id);return t}function qu(e){let t=(Array.isArray(e)?e:[]).map((l,c)=>({file:l?.file,payload:l?.payload||{},name:l?.name!=null&&String(l.name).length?String(l.name):String(c)})),n=t.map(({payload:l})=>fw(l)),s=new Map;for(let l of n)for(let c of l)s.set(c,(s.get(c)||0)+1);let o=new Set([...s.entries()].filter(([,l])=>l>1).map(([l])=>l)),r={generated_at:"",classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}},i="",a=t.length>0;for(let{payload:l,name:c}of t){a=a&&!!l.bootstrap,typeof l.generated_at=="string"&&l.generated_at>i&&(i=l.generated_at);let u=f=>o.has(f)?`${c}/${f}`:f;Array.isArray(l.classes)&&r.classes.push(...l.classes),Array.isArray(l.vocabulary)&&r.vocabulary.push(...l.vocabulary);for(let f of Array.isArray(l.individuals)?l.individuals:[]){if(!f)continue;let p={...f};p.id&&(p.id=u(p.id)),Array.isArray(p.derived_from)&&(p.derived_from=p.derived_from.map(m=>u(m))),Array.isArray(p.mentions)&&(p.mentions=p.mentions.map(m=>m&&m.id?{...m,id:u(m.id)}:m)),r.individuals.push(p)}for(let f of Array.isArray(l.objectProperties)?l.objectProperties:[]){if(!f)continue;let p={...f};Array.isArray(p.examples)&&(p.examples=p.examples.map(m=>{if(!m)return m;let h={...m};return h.subject&&(h.subject=u(h.subject)),h.object&&(h.object=u(h.object)),h})),r.objectProperties.push(p)}let d=l.proseIndex&&typeof l.proseIndex=="object"?l.proseIndex:{};for(let[f,p]of Object.entries(d)){let m=r.proseIndex[f]||(r.proseIndex[f]=[]);for(let h of Array.isArray(p)?p:[]){let g=u(h);m.includes(g)||m.push(g)}}}return r.generated_at=i,a&&(r.bootstrap=!0),r}var Hu=L(()=>{});var ro={};Sn(ro,{clearCache:()=>mw,emptyEntities:()=>ya,fetchEntities:()=>ww,registerProvider:()=>hw});function mw(){oo=null,Vo=null}function hw(e){if(e!=null&&typeof e!="function")throw new TypeError("registerProvider expects a function (config) => entities payload, or null");let t=zr;return zr=e??null,oo=null,t}function ya(){return{generated_at:"",bootstrap:!0,classes:[],vocabulary:[],objectProperties:[],individuals:[],proseIndex:{}}}async function gw(e){let t;try{t=await Be(e,"utf8")}catch(n){if(n?.code==="ENOENT")return ya();throw new Re(`cannot read graph artifact at ${e} (${n?.code||n?.message||n})`)}try{return JSON.parse(t)}catch{throw new Re(`graph artifact ${e} is not valid JSON`)}}async function bw(e){let t=e.graphFiles,n=[...t].map(String).sort().join("|");if(Vo&&Vo.key===n)return Vo.payload;let s=[];for(let r=0;r<t.length;r++){let i=await gw(t[r]);s.push({file:t[r],payload:i,name:e.graphNames?.[r]})}let o=qu(s);return Vo={key:n,payload:o},o}async function ww(e){if(zr){let s;try{s=await zr(e)}catch(o){throw o instanceof Re?o:new Re(`graph provider failed (${o?.message||o})`)}if(!s||typeof s!="object")throw new Re("graph provider returned no entities payload");return s}if(Array.isArray(e.graphFiles)&&e.graphFiles.length>1)return bw(e);if(oo&&oo.file===e.graphFile)return oo.payload;let t;try{t=await Be(e.graphFile,"utf8")}catch(s){if(s?.code==="ENOENT")return ya();throw new Re(`cannot read graph artifact at ${e.graphFile} (${s?.code||s?.message||s})`)}let n;try{n=JSON.parse(t)}catch{throw new Re(`graph artifact ${e.graphFile} is not valid JSON`)}return oo={file:e.graphFile,payload:n},n}var oo,Vo,zr,qo=L(()=>{kt();Mt();Hu();oo=null,Vo=null,zr=null});function bn(e){if(!e)return[];let t=String(e).replace(/\.[A-Za-z0-9]+$/,"");return t=t.replace(/[/\\]/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").replace(/[_\-.]+/g," "),t.split(/\s+/).map(n=>n.toLowerCase()).filter(n=>n.length>1&&n.length<=Ku)}function va(e){if(!e)return[];let t=[],n=new Set;for(let s of String(e).toLowerCase().split(/[^a-z0-9]+/))if(!(s.length<2||s.length>Ku||yw.has(s))&&!n.has(s)&&(n.add(s),t.push(s),t.length>=vw))break;return t}function Br({name:e,doc:t}={}){return[...new Set([...bn(e),...va(t)])].sort()}function Yu(e){let t=Object.create(null);for(let n of e){let s=(n.attributes||[]).find(o=>o.key==="prose_tokens");if(s?.value)for(let o of s.value.split(" "))t[o]||(t[o]=[]),t[o].push(n.id)}for(let n of Object.keys(t))t[n].sort();return t}function ks(e,t,{limit:n=10}={}){let s=[...new Set([...bn(t),...va(t)])];if(!s.length)return[];let o=new Map;for(let r of s)for(let i of e?.[r]||[])o.set(i,(o.get(i)||0)+1);return[...o.entries()].sort((r,i)=>i[1]-r[1]||String(r[0]).localeCompare(i[0])).slice(0,n).map(([r,i])=>({id:r,score:i}))}function Xu(e,t){let n=e&&(e["tmct:layers"]?e:e.proseIndex),s=n&&n["tmct:layers"],o=String(t||"").toLowerCase(),r={ids:[],via:null};if(!o||!s||typeof s!="object")return r;let i=new Set,a=new Set;for(let l of Object.keys(s)){let c=s[l];if(!c||typeof c!="object")continue;let u=c[o],d=Array.isArray(u)?u:Array.isArray(u?.ids)?u.ids:null;if(d?.length){for(let f of d)i.add(f);a.add(l)}}return i.size?{ids:[...i].sort(),via:[...a].sort().join("+")}:r}var yw,Ku,vw,Yn=L(()=>{yw=new Set("a an and or but the of to in on at for with from by as is are was were be been being it its this that these those i you he she they we me my your our do does did not no yes if then else than so such can will would should could may might about into over under out up down off again more most some any all what which who whom whose when where why how".split(/\s+/)),Ku=40,vw=120});function Ju(e){let t=e.indexOf("@"),n=t>=0?e.slice(0,t):e,s=t>=0?e.slice(t+1):"",o=n.indexOf(":"),r=o>=0?n.slice(o+1):"";return{createdAt:s,...r?{sessionId:r}:{}}}function Ho(e){let t=String(e||"").trim();if(!t)return null;if(t.startsWith("reference:")){let s=t.slice(10),o=s.indexOf(":");if(o<0)return{kind:"reference",pack:s||"unknown",article:""};let r=s.slice(0,o)||"unknown";return{kind:xw(r),pack:r,article:s.slice(o+1)}}if(t.startsWith("research:")){let s=t.slice(9),o=s.lastIndexOf("@");return{kind:"referenceLive",pack:"research",article:(o>=0?s.slice(0,o):s).trim()||"unknown"}}let n=t.split(/\s+/)[0];return n.startsWith("corpus-weak:")?{kind:"corpusWeak",name:n.slice(12)||"unknown"}:n.startsWith("corpus:")?{kind:"corpus",name:n.slice(7)||"unknown"}:n.startsWith("child:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("world:")?{kind:"corpus",name:n.slice(6).split(":")[0]||"unknown"}:n.startsWith("mud:")?{kind:"corpus",name:`mud:${n.slice(4).split(":")[0]||"unknown"}`}:n.startsWith("ace:")?{kind:"operator",...Ju(n.slice(4))}:n.startsWith("teach:")?{kind:"teach",...Ju(n.slice(6))}:n.startsWith("web:")?{kind:"web",url:n.slice(4)}:n.startsWith("url:")?{kind:"web",url:n.slice(4)}:n.startsWith("optimistic-extract:")?{kind:"optimisticExtract",name:n.slice(19)||"unknown"}:n.startsWith("extracted:")?{kind:"extracted",name:n.slice(10)||"unknown"}:n.startsWith("entailed:")?{kind:"entailed",rule:n.slice(9)}:n.startsWith("chat:")||n.startsWith("session:")||n.startsWith("operator")?{kind:"operator"}:null}function Sw(e){let t=(e?.attributes||[]).find(s=>s.prop==="mgx:sourceReliability")?.value;if(t===void 0)return Zu;let n=Number(t);return Number.isFinite(n)?Math.max($a,Math.min(ed,n)):Zu}function jw(e,t=Date.now(),n=kw){let s=Date.parse(e);if(!Number.isFinite(s))return 1;let o=Math.max(0,t-s);return Qu+(1-Qu)*Math.pow(.5,o/n)}function td(e,t={},n={}){let s=typeof n.now=="number"?n.now:Date.now(),o=Array.isArray(e?.sourceIds)?e.sourceIds:[],r=new Set,i=[],a=[];for(let p of o){if(r.has(p))continue;r.add(p);let m=t[p],h=Ew(m);if(!h)continue;i.push(h);let g=(Ko[h]??0)*Sw(m);a.push(Math.max(0,Math.min(1,g)))}let l=0,c=1;for(let p of a)c*=1-p;if(a.length&&(l=Math.min(1,1-c)),i.includes("entailed")&&Array.isArray(n.premiseTrusts)&&n.premiseTrusts.length){let p=typeof n.ruleConfidence=="number"?n.ruleConfidence:1;l=Math.max(0,Math.min(1,Math.min(...n.premiseTrusts)*p))}let u=jw(e?.createdAt,s,n.halfLifeMs),d=xa(Math.min(1,l*u)),f={sourceTypes:i.slice().sort(),corroboration:i.length,createdAt:e?.createdAt||"",recency:xa(u)};return{score:d,inputs:f}}function nd({factsAsserted:e=0,factsContradicted:t=0}={}){let n=Math.max(0,Number(e)||0),s=Math.max(0,Number(t)||0),o=Math.max(-1,Math.min(1,(n-2*s)/Math.max(1,n))),r=n/(n+_w),i=(o*r+1)/2;return xa($a+(ed-$a)*i)}var Ur,ka,Pt,Es,$w,xw,Ko,kw,Qu,$a,ed,Zu,xa,Ew,_w,Ss=L(()=>{Ur="mgx:trustScore",ka="mgx:trustInputs",Pt="mgx:createdAt",Es="mgx:updatedAt";$w="wikipedia-live",xw=e=>e===$w?"referenceLive":"reference";Ko=Object.freeze({operator:1,teach:.95,provider:.9,corpus:.7,reference:.6,corpusWeak:.55,referenceLive:.5,extracted:.45,web:.4,optimisticExtract:.35,entailed:.3}),kw=720*60*60*1e3,Qu=.9,$a=.5,ed=1.5,Zu=1,xa=(e,t=6)=>Number(e.toFixed(t)),Ew=e=>(e?.attributes||[]).find(t=>t.prop==="mgx:sourceType")?.value||"";_w=19});var js,Ea=L(()=>{js=e=>/(^|\/)tests?\//.test(e)||/(^|\/)test_[^/]*\.py$/.test(e)||/\.tests(\.|$)/.test(e)||/(^|\/)[^/]*[-_]tests?\//.test(e)||/\.(test|spec)\.[cm]?[jt]sx?$/.test(e)});function Sa(e,t){return Math.log(1+e/(1+t))}var Yo=L(()=>{});var Gr={};Sn(Gr,{bfsLevels:()=>Wr,findActionPath:()=>ja,findReachableSet:()=>_a});function sd(e){return e&&typeof e=="object"?JSON.stringify(e):String(e)}function od(e,t){let n=[];for(let{action:s,nextState:o}of t(e)||[])n.push({state:o,actions:[s],states:[e,o]});return n}function ja(e,t,n,{maxDepth:s=50,stateKey:o=sd}={}){if(t(e))return{actions:[],states:[e]};let r=od(e,n),i=new Set([o(e)]);for(let a=1;a<=s&&r.length;a+=1){for(let c of r)if(t(c.state))return{actions:c.actions,states:c.states};if(a===s)break;let l=[];for(let c of r){let u=o(c.state);if(!i.has(u)){i.add(u);for(let{action:d,nextState:f}of n(c.state)||[]){let p=o(f);i.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}}r=l}return null}function _a(e,t,{maxDepth:n=50,stateKey:s=sd}={}){let o=od(e,t),r=new Set([s(e)]),i=[];for(let a=1;a<=n&&o.length;a+=1){let l=[];for(let c of o){let u=s(c.state);if(!r.has(u)&&(r.add(u),i.push({node:c.state,path:{actions:c.actions,states:c.states}}),a!==n))for(let{action:d,nextState:f}of t(c.state)||[]){let p=s(f);r.has(p)||l.push({state:f,actions:[...c.actions,d],states:[...c.states,f]})}}o=l}return i}function*Wr(e,t,{maxDepth:n=8,keyOf:s=o=>o}={}){let o=new Set([e]),r=[e];for(let i=1;i<=n&&r.length;i+=1){let a=[],l=[];for(let c of r)for(let u of t(c)||[]){let d=s(u);o.has(d)||(o.add(d),a.push(u),l.push(d))}r=l,yield a}}var _s=L(()=>{});function qr(e){let t=Array.isArray(e?.individuals)?e.individuals:[],n=new Map;for(let r of t)r&&r.id&&n.set(r.id,r);let s=(Array.isArray(e?.objectProperties)?e.objectProperties:[]).filter(r=>r&&(r.predicate||r.prop)).map(r=>{let i=(Array.isArray(r.examples)?r.examples:[]).filter(a=>a&&a.subject&&a.object);return{predicate:String(r.predicate||""),prop:r.prop||null,count:Number(r.count)||i.length,edges:i}}),o=s.filter(r=>r.count>r.edges.length).map(r=>({predicate:r.predicate,count:r.count,shown:r.edges.length}));return{individuals:t,byId:n,relations:s,truncated:o,generatedAt:e?.generated_at||null,proseIndex:e?.proseIndex||{}}}function Ia(e){return!e||!Array.isArray(e.individuals)?0:e.individuals.filter(t=>(t.class||"")==="Module").length}function In(e){let t=String(e?.prop||"").toLowerCase();if(rd[t])return rd[t];let n=String(e?.predicate||"").toLowerCase();if(/symbol/.test(n)){if(/\b(call|invoke)/.test(n))return"callsSymbol";if(/(touch|chang|modif)/.test(n))return"touchesSymbol"}return/\bimport/.test(n)?"imports":/\b(call|invoke)/.test(n)?"calls":/\b(define|export|declare)/.test(n)?"defines":/\b(test|cover)/.test(n)?"tests":/\b(touch|chang|modif)/.test(n)?"touches":/\bcontain/.test(n)?"contains":/\b(inherit|subclass|extend|specializ)/.test(n)?"inherits":null}function Cn(e){return String(e||"").trim().toLowerCase().replace(/^\.\//,"").replace(/^\//,"")}function Ra(e){let t=Cn(e).split("/");return t[t.length-1]}function Rw(e){return(e?.derived_from||[]).filter(wd).length}function id(e){return(e?.mentions||[]).reduce((n,s)=>n+(Number(s?.count)||0),0)+Rw(e)}function Kt(e,t){let n=Cn(t);if(!n)return{match:null,candidates:[]};let s=Ra(n),o=!n.includes("/"),r=[];for(let i of e.individuals){let a=Cn(i.label),l=String(i.id||"").toLowerCase(),c=0;a===n||l===n?c=100:a.endsWith(`/${n}`)||o&&(Ra(a)===s||Ra(a).replace(/\.[a-z]+$/,"")===s)?c=80:a.includes(n)&&(c=Math.max(10,50-(a.length-n.length))),c>0&&r.push({ind:i,score:c})}return r.sort((i,a)=>a.score-i.score||id(a.ind)-id(i.ind)||String(i.ind.label).length-String(a.ind.label).length),{match:r[0]?.ind||null,candidates:r.slice(1,5).map(i=>i.ind)}}function Et(e){let t=(e?.attributes||[]).find(s=>s.key==="site");if(!t)return null;let n=String(t.value).match(/^(.*):(\d+)(?:-(\d+))?$/);return n?{path:n[1],start:Number(n[2]),end:n[3]?Number(n[3]):Number(n[2])}:null}function Aw(e,t){let n=[],s=[];for(let o of e.relations){let r=o.edges.filter(a=>a.subject===t),i=o.edges.filter(a=>a.object===t);r.length&&n.push({group:o,edges:r}),i.length&&s.push({group:o,edges:i})}return{out:n,incoming:s}}function ad(e){return e.prop?`${e.predicate} [${e.prop}]`:e.predicate}function On(e){let t=e||"Entity",n=bn(t);return n.length<2?t:n.map(s=>s[0].toUpperCase()+s.slice(1)).join(" ")}function ct(e,t,n=", "){return e.length<=t?e.join(n):e.slice(0,t).join(n)+`, +${e.length-t} more`}function La(e,t,{candidates:n=[]}={}){let s=[];s.push(`${t.label} \u2014 ${On(t.class)} (id: ${t.id})`);let o=(t.derived_from||[]).filter(wd);o.length&&s.push(`attestation: touched by ${o.length} commit(s)`);for(let l of t.attributes||[])s.push(`attribute: ${l.key} = ${l.value}${l.prop?` [${l.prop}]`:""}`);let{out:r,incoming:i}=Aw(e,t.id);if(!r.length&&!i.length)s.push("edges: none in the current artifact");else{s.push("edges:");for(let{group:l,edges:c}of r)s.push(` ${ad(l)} (${c.length}) \u2192 ${ct(c.map(u=>u.objectLabel||u.object),cd)}`);for(let{group:l,edges:c}of i)s.push(` \u2190 ${ad(l)} (${c.length}) by ${ct(c.map(u=>u.subjectLabel||u.subject),cd)}`)}let a=t.derived_from||[];return a.length&&s.push(`provenance: ${ct(a,Tw)}`),n.length&&s.push(`other matches: ${n.map(l=>`${l.label} (${On(l.class)})`).join(", ")}`),e.truncated.length&&s.push(Cw(e)),s.join(`
2
+ `)}function Cw(e){return`note: partial edge lists for: ${e.truncated.map(n=>`${n.predicate} (${n.shown}/${n.count})`).join(", ")}. Counts are complete; the lists are not.`}function ao(e,t,{maxDepth:n=8}={}){let s=new Map,o=new Map,r=(a,l,c,u)=>{!a||!l||a===l||(s.has(a)||s.set(a,[]),s.get(a).push({id:l,label:c,via:u}))};for(let a of e.relations){let l=In(a);if(l==="imports"||l==="calls")for(let c of a.edges)r(c.object,c.subject,c.subjectLabel||c.subject,a.predicate);else if(l==="callsSymbol")for(let c of a.edges){let u=Tn(e,c.subject),d=Tn(e,c.object);if(!u||!d)continue;let f=e.byId.get(u)?.label||u;r(d,u,f,a.predicate),u!==d&&r(c.object,u,f,a.predicate)}else if(l==="tests")for(let c of a.edges)o.has(c.object)||o.set(c.object,[]),o.get(c.object).push(c.subjectLabel||c.subject)}let i=[];for(let a of Wr(t.id,l=>s.get(l)||[],{maxDepth:n,keyOf:l=>l.id})){if(!a.length)continue;let l=a.map(c=>({...c,tests:o.get(c.id)||[]})).sort((c,u)=>String(c.label).localeCompare(String(u.label)));i.push(l)}return i}function yd(e,t,{maxDepth:n=8}={}){let s=ao(e,t,{maxDepth:n}),o=[`Impact of changing ${t.label} (reverse closure over imports/calls edges, module- and function-level):`];s.length||o.push("no dependents found in the current artifact \u2014 nothing imports or calls it (or its edges are not in the extracted graph yet).");let r=s.reduce((a,l)=>a+l.length,0);s.length&&o.push(`total: ${r} dependent(s) across ${s.length} depth level(s) (lists capped for brevity).`),s.forEach((a,l)=>{if(l>=Ow){o.push(`depth ${l+1}: ${a.length} more dependent(s) (not listed)`);return}o.push(l===0?`depth 1 (${a.length} direct dependents):`:`depth ${l+1} (${a.length}):`);for(let c of a.slice(0,Aa)){let u=c.tests.length?`tests: ${ct(c.tests,Iw)}`:"tests: none recorded",d=l===0?`${c.via} it`:"reaches it through an intermediary";o.push(` - ${c.label} (${d}) \u2014 ${u}`)}a.length>Aa&&o.push(` \u2026+${a.length-Aa} more at depth ${l+1}`)});let i=e.truncated.filter(a=>{let l=In({predicate:a.predicate});return l==="imports"||l==="calls"||l==="callsSymbol"||l==="tests"});return i.length&&o.push("warning: partial edge lists ("+i.map(a=>`${a.predicate}: ${a.shown}/${a.count}`).join(", ")+") \u2014 this closure may be missing edges. Cross-check critical results with a lexical search (/find <term>)."),o.join(`
3
+ `)}function vd(e){let t=new Map;for(let n of e.relations)if(In(n)==="defines")for(let s of n.edges)t.has(s.subject)||t.set(s.subject,[]),t.get(s.subject).push(s.objectLabel||s.object);return t}function ud(e){return new Set(String(e).replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function Sd(e,t,n=null){let s=n||(i=>Tn(e,i)),o=new Map,r=(i,a)=>{!i||!a||i===a||(o.has(i)||o.set(i,new Set),o.has(a)||o.set(a,new Set),o.get(i).add(a),o.get(a).add(i))};for(let i of t)for(let a of Se(e,i))r(s(a.subject),s(a.object));return o}function hy(e,t,n){if(t.length<2)return;let s=new Map(t.map(c=>[c.ind.id,c])),o=new Map(t.map(c=>[c.ind.id,c.score])),r=c=>{if(!c.size)return[[],[]];let u=0;for(let m of c.values())u=Math.max(u,m);let d=[...c.entries()].sort((m,h)=>h[1]-m[1]),f=[],p=[];for(let[m,h]of d)h>=u*ry&&f.length<n?f.push([m,h]):p.length<ld&&p.push([m,h]);return[f,p]},[i,a]=r(new Map(t.map(c=>[c.ind.id,c.score]))),l=new Set(i.map(([c])=>c));for(let c=0;c<cy&&i.length;c++){let u=new Map,d=[];for(let f of ly){let p=Sd(e,f),m=new Map;for(let[b,y]of i)for(let w of p.get(b)||[])o.has(w)&&m.set(w,Math.max(m.get(w)||0,y));let[h,g]=r(m);for(let[b,y]of h)u.set(b,Math.max(u.get(b)||0,y));d.push(...g)}a.push(...d);for(let[f,p]of u){if(l.has(f))continue;let m=s.get(f);m&&(m.score+=Math.min(p*iy,m.score*ay),l.add(f))}i=[...u.entries()],!i.length&&a.length&&(i=a.splice(0,ld).filter(([f])=>!l.has(f)))}}function gy(e,t=[],{depth:n=xd,q:s=Ed,nodeLimit:o=kd,kinds:r=uy,classPredicate:i=u=>(u.class||"")==="Module",idNormalizer:a=null,seeds:l=null,hubDegree:c=1/0}={}){let u=new Map(t.map(_=>[_.ind.id,_])),d=0;for(let _ of t)d=Math.max(d,_.score);let f=t.length>0&&d>0,p=new Set(l??u.keys());if(!p.size)return[];let m=Sd(e,r,a),h=_=>m.get(_)?.size||0,g=[],b=(_,R)=>_.hop!==R.hop?_.hop<R.hop:_.deg!==R.deg?_.deg<R.deg:_.id<R.id,y=(_,R)=>{let x=g[_];g[_]=g[R],g[R]=x},w=_=>{g.push(_);let R=g.length-1;for(;R>0;){let x=R-1>>1;if(b(g[R],g[x]))y(R,x),R=x;else break}},$=()=>{let _=g[0],R=g.pop();if(g.length){g[0]=R;let x=0;for(;;){let T=2*x+1,M=2*x+2,A=x;if(T<g.length&&b(g[T],g[A])&&(A=T),M<g.length&&b(g[M],g[A])&&(A=M),A===x)break;y(x,A),x=A}}return _},j=new Set(p);for(let _ of p)w({id:_,hop:0,deg:h(_)});let v=null,E=0,k=[];for(;g.length&&E<o;){let _=$();if(k.push({id:_.id,hop:_.hop}),!p.has(_.id)){if(f){let T=d*dy*Math.pow(py,_.hop-1),M=u.get(_.id);if(M)M.score+=Math.min(T*fy,M.score*my);else{let A=e.byId?.get?.(_.id);if(A&&i(A)){v||(v=vd(e));let P=v.get(A.id)||[],G={ind:A,score:T,defineCount:P.length,matching:[],density:0};t.push(G),u.set(_.id,G)}}}E++}if(_.hop>=n||_.hop>0&&h(_.id)>c)continue;let R=[];for(let T of m.get(_.id)||[]){if(j.has(T))continue;let M=e.byId?.get?.(T);!M||!i(M)||R.push({id:T,deg:h(T)})}if(!R.length)continue;R.sort((T,M)=>T.deg-M.deg||(T.id<M.id?-1:T.id>M.id?1:0));let x=Math.max(1,Math.floor(s*R.length));for(let T=0;T<x;T++){let M=R[T];j.add(M.id),w({id:M.id,hop:_.hop+1,deg:M.deg})}}return k}function jd(e,t,n={}){let{demoteNonProd:s=!1,callAdjacency:o=!1,implOfInterface:r=!1,beamSearch:i=!1,spiral:a=!1,proseBoost:l=!1,proseLayers:c=!1,literalMention:u=!1,rawQuery:d=""}=n,f=Number.isFinite(n.beamWidth)&&n.beamWidth>0?n.beamWidth:8,p=vd(e),m=[];for(let $ of e.individuals){if(($.class||"")!=="Module")continue;let j=String($.label),v=j.toLowerCase(),E=p.get($.id)||[],k=new Set(E.map(x=>x.toLowerCase())),_=new Set;for(let x of E)for(let T of ud(x))_.add(T);let R=u?String(($.attributes||[]).find(x=>x.key==="dotted")?.value||"").toLowerCase():"";m.push({ind:$,label:j,labelLc:v,defines:E,symSet:k,symComps:_,dotted:R})}let h=m.length||1,g=new Map,b=$=>{let j=0;for(let v of m)(v.labelLc.includes($)||v.symComps.has($)||v.symSet.has($))&&j++;return j},y=$=>(g.has($)||g.set($,Sa(h,b($))),g.get($));for(let $ of t)y($);let w=[];for(let $ of m){let j=0,v=0,E=0,k=[];for(let M of t){let A=g.get(M)||0;A&&($.symSet.has(M)?(j+=A*$d,E++):$.symComps.has(M)&&(k.push(A),E++),$.labelLc.includes(M)&&(v+=A*Nw))}k.sort((M,A)=>A-M);let _=0;for(let M=0;M<Math.min(k.length,Pw);M++)_+=k[M]*Mw;let R=j+v+_;if(!R)continue;s&&(js($.labelLc)||Bw($.labelLc))?R*=zw:js($.labelLc)&&(R*=.4);let x=$.defines.filter(M=>{let A=M.toLowerCase(),P=ud(M);return t.some(G=>A===G||P.has(G))}),T=$.defines.length?E/$.defines.length:0;w.push({ind:$.ind,score:R,defineCount:$.defines.length,matching:x,density:T})}if(u&&d&&w.length){let $=String(d).toLowerCase(),j=_=>_!=null&&/[a-z0-9_./]/.test(_),v=_=>{for(let R=$.indexOf(_);R!==-1;R=$.indexOf(_,R+1))if(!j($[R-1])&&!j($[R+_.length]))return!0;return!1},E=new Map(m.map(_=>[_.ind.id,_])),k=0;for(let _ of w)k=Math.max(k,_.score);for(let _ of w){let R=E.get(_.ind.id);if(!R)continue;let x=0;for(let T of new Set([R.dotted,R.labelLc])){if(!T||T.split(/[./]+/).filter(Boolean).length<ty||!v(T))continue;let M=[...new Set(T.split(/[^a-z0-9_]+/).filter(Boolean))].map(y).sort((P,G)=>G-P),A=0;for(let P=0;P<Math.min(M.length,ny);P++)A+=M[P]*ey;x=Math.max(x,A)}x&&(_.score+=Math.min(x*sy,k*oy))}}if(w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),j=new Map;for(let v of Se(e,"imports"))!$.has(v.subject)&&!$.has(v.object)||(j.has(v.subject)||j.set(v.subject,new Set),j.has(v.object)||j.set(v.object,new Set),j.get(v.subject).add(v.object),j.get(v.object).add(v.subject));for(let v of w){let E=0;for(let k of j.get(v.ind.id)||[])E=Math.max(E,$.get(k)||0);v.score+=Math.min(E*Fw,v.score*Dw)}}if(o&&w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),j=new Map;for(let v of["calls","callsSymbol"])for(let E of Se(e,v)){let k=Tn(e,E.subject),_=Tn(e,E.object);!k||!_||k===_||!$.has(k)&&!$.has(_)||(j.has(k)||j.set(k,new Set),j.has(_)||j.set(_,new Set),j.get(k).add(_),j.get(_).add(k))}for(let v of w){let E=0;for(let k of j.get(v.ind.id)||[])E=Math.max(E,$.get(k)||0);v.score+=Math.min(E*Uw,v.score*Ww)}}if(r&&w.length>1){let $=new Map(w.map(v=>[v.ind.id,v.score])),j=new Map;for(let v of e.individuals)(v.class||"")==="Class"&&v.label&&j.set(String(v.label),v);for(let v of w){if(!qw(v.ind.label))continue;let E=0;for(let k of Se(e,"inherits")){if(Tn(e,k.subject)!==v.ind.id||!Hw(k.objectLabel))continue;let R=Tn(e,k.object);if(!R){let x=j.get(String(k.objectLabel||""));x&&(R=wn(e,x))}R&&(E=Math.max(E,$.get(R)||0))}v.score+=Math.min(E*Gw,v.score*Vw)}}if(l&&w.length&&e.proseIndex){let $=ks(e.proseIndex,t.join(" "),{limit:Xw});if($.length){let j=new Map;for(let{id:v,score:E}of $){let k=Tn(e,v);k&&j.set(k,(j.get(k)||0)+E)}for(let v of w){let E=j.get(v.ind.id)||0;E&&(v.score+=Math.min(E*Kw,v.score*Yw))}}}if(c&&w.length&&e.proseIndex){let $=new Map(w.map(E=>[E.ind.id,E])),j=new Map(m.map(E=>[E.ind.id,E])),v=new Map;for(let E of new Set(t)){let k=g.get(E)||0;if(!k)continue;let{ids:_}=Xu(e.proseIndex,E);if(!_.length)continue;let R=new Set;for(let x of _){let T=Tn(e,x);if(!T||R.has(T)||(R.add(T),!$.has(T)))continue;let M=j.get(T);M&&(M.symSet.has(E)||M.symComps.has(E)||M.labelLc.includes(E))||v.set(T,(v.get(T)||0)+k*Zw)}}for(let E of w){let k=v.get(E.ind.id)||0;k&&(E.score+=Math.min(k*Jw,E.score*Qw))}}return i&&w.length>1&&hy(e,w,f),a&&w.length&&gy(e,w,{depth:Number.isFinite(n.spiralDepth)&&n.spiralDepth>0?n.spiralDepth:xd,q:Number.isFinite(n.mostDistinctiveBeams)&&n.mostDistinctiveBeams>0?n.mostDistinctiveBeams:Ed,nodeLimit:Number.isFinite(n.spiralNodeLimit)&&n.spiralNodeLimit>0?n.spiralNodeLimit:kd}),w.sort(($,j)=>j.score-$.score||j.density-$.density||$.defineCount-j.defineCount||String($.ind.label).length-String(j.ind.label).length),w}function _d(e,t,n={}){let s=String(t||""),o=s.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);if(!o.length)return[];let r=n.literalMention?{...n,rawQuery:s}:n;return jd(e,o,r).map(i=>({path:String(i.ind.label),score:i.score}))}function wy(e){let t=0,n=!1,s=!1,o=!1,r="",i=!1,a=()=>{t+=1,r===")"&&(n=!0),i=!0};for(let l=0;l<e.length;l++){let c=e[l];if(c==="\\"){let u=e[l+1]||"";!o&&u>="1"&&u<="9"&&(s=!0),l+=1,r="",i=!1;continue}if(o){c==="]"&&(o=!1,r="]",i=!1);continue}if(c==="["){o=!0,r="[",i=!1;continue}if(c==="?"&&(r==="("||i)){r="?",i=!1;continue}if(c==="*"||c==="+"||c==="?"){a(),r=c;continue}if(c==="{"){let u=e.indexOf("}",l),d=u===-1?"":e.slice(l+1,u);if(u!==-1&&/^\d+(,\d*)?$/.test(d)){a(),l=u,r="}";continue}r="{",i=!1;continue}r=c,i=!1}return{quantifiers:t,quantifiedGroup:n,backreference:s}}function Na(e,{now:t=Date.now}={}){let n=String(e);if(n.length>dd)return{error:`name pattern is ${n.length} characters; the limit is ${dd}.`};let{quantifiers:s,quantifiedGroup:o,backreference:r}=wy(n);if(o)return{error:`name pattern "${n}" quantifies a group, which can backtrack for minutes on one label. Quantify a character or a class instead.`};if(r)return{error:`name pattern "${n}" uses a back-reference, which can backtrack for minutes on one label.`};if(s>pd)return{error:`name pattern "${n}" has ${s} quantifiers; the limit is ${pd}.`};let i;try{i=new RegExp(n,"i")}catch{return{error:`invalid name pattern: ${n}`}}let a=null;return{test(l){if(a===null)a=t()+fd;else if(t()>a)throw new Vr(`name pattern "${n}" exceeded its ${fd}ms matching budget.`);return i.test(String(l).slice(0,by))}}}function Rd(e,t,{limit:n=Hr,kind:s="",decorator:o="",name:r="",toolNamePrefix:i="tmct_"}={}){let a=String(t||"").toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean),l=String(s||"").trim().toLowerCase(),c=String(o||"").trim().toLowerCase(),u=null;if(r){let m=Na(r);if(m.error)return m.error;u=m}if(l&&l!=="module")try{return ky(e,a,{limit:n,kind:l,decFilter:c,nameRe:u,toolNamePrefix:i})}catch(m){if(m instanceof Vr)return m.message;throw m}if(!a.length&&!u&&!c)return"empty query";let d=jd(e,a);if(!d.length)return`no module matches "${t}". Try broader keywords, or ${i}describe <path> if you know where it lives.`;let f=d.slice(0,n),p=[`${d.length} module(s) match "${t}" (top ${f.length}):`];for(let{ind:m,defineCount:h,matching:g}of f){let b=g.length?` \u2014 matching: ${ct([...new Set(g)],Lw)}`:"";p.push(`- ${m.label} (defines ${h} symbol(s))${b}`)}return p.push(`Then ${i}describe <path> for the full sibling list + typed edges, or ${i}impact <path> for dependents.`),p.join(`
4
+ `)}function Se(e,t){let n=md.get(e);n||(n=new Map,md.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(In(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Tn(e,t){let n=e.byId?.get?.(t);if(n)return wn(e,n);let s=String(t||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function wn(e,t){if((t?.class||"")==="Module")return t.id;let n=Et(t);if(n)return`mod:${n.path}`;let s=String(t?.id||"").match(/^fn:(.+)#/);return s?`mod:${s[1]}`:null}function Ma(e){if(!e)return"";let t=e.end>e.start?`${e.start}-${e.end}`:`${e.start}`;return` [${e.path}:${t}]`}function io(e){return(e?.attributes||[]).find(t=>t.key==="decorators")?.value||""}function Ad(e,t,{toolNamePrefix:n="tmct_"}={}){let s=[`${t.label} \u2014 ${On(t.class)} (id: ${t.id})`],o=Se(e,"contains").filter(a=>a.subject===t.id);if(!o.length)return s.push(`members: none recorded (empty class, or members not in the extracted graph). Use ${n}describe for its edges.`),s.join(`
5
+ `);let r=[],i=[];for(let a of o){let l=e.byId.get(a.object),c=Ma(l?Et(l):null),u=l?io(l):"",d=`${a.objectLabel||a.object}${c}${u?` @${u}`:""}`;((l?.class||"")==="Attribute"?i:r).push(d)}return r.length&&s.push(`methods (${r.length}): ${ct(r,hd)}`),i.length&&s.push(`attributes (${i.length}): ${ct(i,hd)}`),s.push(`Use ${n}snippet <Class.member> for an exact body.`),s.join(`
6
+ `)}function Td(e,t,{toolNamePrefix:n="tmct_"}={}){let s=Et(t),o=[`${t.label} \u2014 ${On(t.class)}${Ma(s)}`],r=Me(t,"params"),i=Me(t,"returns");(r||i||(t.class||"")==="Method"||(t.class||"")==="Function")&&o.push(`signature: ${t.label}(${r})${i?` -> ${i}`:""}`);let a=[];Me(t,"isStatic")&&a.push("static"),Me(t,"isAbstract")&&a.push("abstract"),Me(t,"isConstant")&&a.push("constant");let l=Me(t,"visibility");l&&a.push(l),a.length&&o.push(`flags: ${a.join(", ")}`);let c=io(t);c&&o.push(`decorators: @${c.split(", ").join(", @")}`);let u=Me(t,"raises");u&&o.push(`raises: ${u}`);let d=Me(t,"catches");d&&o.push(`catches: ${d}`);let f=Me(t,"self_fields");f&&o.push(`self fields: ${f}`);let p=Me(t,"value");p&&o.push(`value: ${p}`);let m=Me(t,"doc");return m&&o.push(`doc: ${m}`),o.length===1&&o.push(`(no signature detail recorded for this symbol \u2014 likely a module or attribute; use ${n}snippet for its source.)`),o.push(`Use ${n}snippet for the exact body.`),o.join(`
7
+ `)}function Cd(e,t){let n=Se(e,"inherits"),s=n.filter(l=>l.subject===t.id).map(l=>l.objectLabel||l.object),o=new Map;for(let l of n)o.has(l.object)||o.set(l.object,[]),o.get(l.object).push({id:l.subject,label:l.subjectLabel||l.subject});let r=[`${t.label} \u2014 ${On(t.class)} (id: ${t.id})`];r.push(s.length?`extends: ${ct(s,gd)}`:"extends: (no internal/recorded base classes)");let i=[];for(let l of Wr(t.id,c=>o.get(c)||[],{maxDepth:8,keyOf:c=>c.id}))l.length&&i.push(l.map(c=>c.label).sort((c,u)=>String(c).localeCompare(String(u))));let a=i.reduce((l,c)=>l+c.length,0);return a?(r.push(`subclasses: ${a} total across ${i.length} level(s).`),i.forEach((l,c)=>r.push(` depth ${c+1} (${l.length}): ${ct(l,gd)}`))):r.push("subclasses: none recorded \u2014 nothing extends it in the extracted graph."),r.join(`
8
+ `)}function Kr(e){let t=new Map;for(let n of e){let s=n.label.includes("/")?n.label.slice(0,n.label.lastIndexOf("/")):"(root)";t.set(s,(t.get(s)||0)+1)}return t}function Yr(e,t=""){let n=Cn(t);return e.individuals.filter(s=>(s.class||"")==="Module"&&(!n||Cn(s.label).startsWith(n)))}function Od(e,{pkg:t=""}={}){let n=Cn(t),s=Yr(e,t);if(!s.length)return n?`no modules under "${t}".`:"no modules in the graph.";let o=Kr(s),r=new Map;for(let u of Se(e,"imports"))r.set(u.object,(r.get(u.object)||0)+1);let i=new Set(s.map(u=>u.id)),a=[...r.entries()].filter(([u])=>i.has(u)).sort((u,d)=>d[1]-u[1]).slice(0,vy).map(([u,d])=>`${e.byId.get(u)?.label||u} (${d} importers)`),l=[...o.entries()].sort((u,d)=>d[1]-u[1]),c=[`Architecture${n?` of ${t}`:""}: ${s.length} module(s) in ${l.length} package(s).`];return c.push(`packages (by module count): ${ct(l.map(([u,d])=>`${u} (${d})`),yy)}`),c.push(a.length?`hub modules (most imported): ${a.join(", ")}`:"hub modules: none (no internal imports recorded)."),c.join(`
9
+ `)}function Ld(e,t){let n=wn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||Et(t)?.path||n,o=[...new Set(Se(e,"tests").filter(a=>a.object===n).map(a=>a.subjectLabel||a.subject))],r=o.length>0,i=r?`covered by ${o.length} test module(s):
10
+ ${ct(o,Id,`
11
11
  `)}`:"no covering tests recorded (no test module imports it).";return n===t.id?`${s}: ${i}`:`${t.label} is defined in ${s}, which ${r?"is":"has"} ${i}
12
- ${Lw}`}function $d(e){let t=new Set,n=new Set;for(let o of ke(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!Es(String(o.label).toLowerCase())&&!t.has(o.id)).map(o=>o.label).sort();return s.length?`${s.length} source module(s) with no covering test module:
13
- ${st(s,yd,`
14
- `)}`:"every source module has at least one covering test module."}function xd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${st(o,Mt)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function Ed(e,t,{toolNamePrefix:n="tmct_"}={}){if(kd.has(t.class)){let i=[...new Set(ke(e,"callsSymbol").filter(a=>a.object===t.id).map(a=>a.subjectLabel||a.subject))];return i.length?`${t.label} \u2014 called by ${i.length} symbol(s):
15
- ${st(i,Vo,`
16
- `)}`:`${t.label}: no recorded callers (fine-grained call edges are conservative \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}let s=mn(e,t);if(!s)return`cannot map ${t.label} to a module.`;let o=e.byId.get(s)?.label||s,r=[...new Set(ke(e,"calls").filter(i=>i.object===s).map(i=>i.subjectLabel||i.subject))];return r.length?`${o} \u2014 called by ${r.length} module(s):
17
- ${st(r,Vo,`
18
- `)}`:`${o}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}function Sd(e,t){if(kd.has(t.class)){let r=[...new Set(ke(e,"callsSymbol").filter(i=>i.subject===t.id).map(i=>i.objectLabel||i.object))];return r.length?`${t.label} \u2014 calls into ${r.length} symbol(s):
19
- ${st(r,Vo,`
20
- `)}`:`${t.label}: no recorded callees (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`}let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(ke(e,"calls").filter(r=>r.subject===n).map(r=>r.objectLabel||r.object))];return o.length?`${s} \u2014 calls into ${o.length} module(s):
21
- ${st(o,Vo,`
22
- `)}`:`${s}: no recorded callees.`}function jd(e,t){let n=e.byId.get(t.object),s=n?vt(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function Ca(e,t){if(!t?.id)return"";let n=ke(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${st(n.map(s=>jd(e,s)),Nw)}`:""}function _d(e,t){let n=ke(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${Cn(t.class)}: no in-repo calls recorded (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`;let s=n.map(o=>jd(e,o));return`${t.label} \u2014 ${Cn(t.class)} calls ${n.length} in-repo symbol(s):
23
- ${st(s,Vo,`
24
- `)}`}function Rd(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Pe(s,"commitDate")||Pe(s,"date"),i=Pe(s,"commitAuthor")||Pe(s,"author"),a=Pe(s,"commitMessage")||Pe(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function Ad(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"touches").filter(a=>a.object===n);if(!o.length)return`${s}: no commit history recorded (outside the git-log window or unmodified).`;let r=o.slice(0,Mt).map(a=>` ${Rd(e,a.subject,a.subjectLabel)}`),i=o.length>Mt?`
25
- \u2026+${o.length-Mt} more`:"";return`${s}: touched by ${o.length} recent commit(s):
12
+ ${$y}`}function Nd(e){let t=new Set,n=new Set;for(let o of Se(e,"tests"))t.add(o.object),n.add(o.subject);let s=e.individuals.filter(o=>(o.class||"")==="Module"&&!n.has(o.id)&&!js(String(o.label).toLowerCase())&&!t.has(o.id)).map(o=>o.label).sort();return s.length?`${s.length} source module(s) with no covering test module:
13
+ ${ct(s,Id,`
14
+ `)}`:"every source module has at least one covering test module."}function Md(e,t){let n=wn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Se(e,"touches").filter(r=>r.object===n).map(r=>r.subjectLabel||r.subject);return o.length?`${s}: touched by ${o.length} recent commit(s): ${ct(o,Ft)}`:`${s}: no commit history recorded (outside the git-log window or unmodified).`}function Fd(e,t,{toolNamePrefix:n="tmct_"}={}){if(Pd.has(t.class)){let i=[...new Set(Se(e,"callsSymbol").filter(a=>a.object===t.id).map(a=>a.subjectLabel||a.subject))];return i.length?`${t.label} \u2014 called by ${i.length} symbol(s):
15
+ ${ct(i,Xo,`
16
+ `)}`:`${t.label}: no recorded callers (fine-grained call edges are conservative \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}let s=wn(e,t);if(!s)return`cannot map ${t.label} to a module.`;let o=e.byId.get(s)?.label||s,r=[...new Set(Se(e,"calls").filter(i=>i.object===s).map(i=>i.subjectLabel||i.subject))];return r.length?`${o} \u2014 called by ${r.length} module(s):
17
+ ${ct(r,Xo,`
18
+ `)}`:`${o}: no recorded callers (calls are coarse/import-backed \u2014 absence is not proof). Try ${n}impact for the full reverse closure.`}function Dd(e,t){if(Pd.has(t.class)){let r=[...new Set(Se(e,"callsSymbol").filter(i=>i.subject===t.id).map(i=>i.objectLabel||i.object))];return r.length?`${t.label} \u2014 calls into ${r.length} symbol(s):
19
+ ${ct(r,Xo,`
20
+ `)}`:`${t.label}: no recorded callees (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`}let n=wn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=[...new Set(Se(e,"calls").filter(r=>r.subject===n).map(r=>r.objectLabel||r.object))];return o.length?`${s} \u2014 calls into ${o.length} module(s):
21
+ ${ct(o,Xo,`
22
+ `)}`:`${s}: no recorded callees.`}function zd(e,t){let n=e.byId.get(t.object),s=n?Et(n):null;return`${t.objectLabel||n?.label||t.object}${s?` [${s.path}:${s.start}]`:""}`}function Pa(e,t){if(!t?.id)return"";let n=Se(e,"callsSymbol").filter(s=>s.subject===t.id);return n.length?`calls in-repo: ${ct(n.map(s=>zd(e,s)),xy)}`:""}function Bd(e,t){let n=Se(e,"callsSymbol").filter(o=>o.subject===t.id);if(!n.length)return`${t.label} \u2014 ${On(t.class)}: no in-repo calls recorded (calls only stdlib/external, or fine-grained call edges are not in the extracted graph).`;let s=n.map(o=>zd(e,o));return`${t.label} \u2014 ${On(t.class)} calls ${n.length} in-repo symbol(s):
23
+ ${ct(s,Xo,`
24
+ `)}`}function Ud(e,t,n){let s=e.byId.get(t),o=s?.label||n||t,r=Me(s,"commitDate")||Me(s,"date"),i=Me(s,"commitAuthor")||Me(s,"author"),a=Me(s,"commitMessage")||Me(s,"message"),l=[o,r,i].filter(Boolean).join(" ");return a?`${l} \u2014 ${a}`:l}function Wd(e,t){let n=wn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Se(e,"touches").filter(a=>a.object===n);if(!o.length)return`${s}: no commit history recorded (outside the git-log window or unmodified).`;let r=o.slice(0,Ft).map(a=>` ${Ud(e,a.subject,a.subjectLabel)}`),i=o.length>Ft?`
25
+ \u2026+${o.length-Ft} more`:"";return`${s}: touched by ${o.length} recent commit(s):
26
26
  ${r.join(`
27
- `)}${i}`}function Td(e,t){let n=ke(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${Cn(t.class)}: no symbol-level commit history recorded (outside the git-log window, or fine-grained history is not in the extracted graph).`;let s=n.slice(0,Mt).map(r=>` ${Rd(e,r.subject,r.subjectLabel)}`),o=n.length>Mt?`
28
- \u2026+${n.length-Mt} more`:"";return`${t.label} \u2014 ${Cn(t.class)}: touched by ${n.length} commit(s):
27
+ `)}${i}`}function Gd(e,t){let n=Se(e,"touchesSymbol").filter(r=>r.object===t.id);if(!n.length)return`${t.label} \u2014 ${On(t.class)}: no symbol-level commit history recorded (outside the git-log window, or fine-grained history is not in the extracted graph).`;let s=n.slice(0,Ft).map(r=>` ${Ud(e,r.subject,r.subjectLabel)}`),o=n.length>Ft?`
28
+ \u2026+${n.length-Ft} more`:"";return`${t.label} \u2014 ${On(t.class)}: touched by ${n.length} commit(s):
29
29
  ${s.join(`
30
- `)}${o}`}function Cd(e,t){return Td(e,t)}function Id(e,t){return Td(e,t)}function Ia(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=Od[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!to(a).toLowerCase().includes(s))continue;let l=String(a.label).toLowerCase(),c=t.length?0:1;for(let u of t)l.includes(u)&&(c+=5);t.length&&!c||i.push({ind:a,score:c})}return i.sort((a,l)=>l.score-a.score||String(a.ind.label).length-String(l.ind.label).length),i}function Mw(e,t,{limit:n=Wr,kind:s,decFilter:o,nameRe:r,toolNamePrefix:i="tmct_"}){if(!Od[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let l=Ia(e,t,{kind:s,decFilter:o,nameRe:r});if(!l.length)return`no ${s} matches the given filters.`;let c=l.slice(0,n),u=[`${l.length} ${s}(s) match (top ${c.length}):`];for(let{ind:d}of c)u.push(`- ${d.label}${Ta(vt(d))}`);return u.push(`Then ${i}snippet <name> for the exact body, or ${i}describe for its edges.`),u.join(`
31
- `)}function Vw(e){return{paramCount:Vr(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function Hw(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>Vr(i.params)),n=e.filter(i=>!!i.returns).length,s=e.filter(i=>!!i.raises).length,o=new Map;for(let i of e)for(let a of i.callees||[])o.set(a,(o.get(a)||0)+1);let r=new Set([...o.entries()].filter(([,i])=>i>=2).map(([i])=>i));return{paramCount:qw(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function Kw(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(Vr(e.params)-t.paramCount));!!e.returns===t.hasReturns&&(n+=2),!!e.raises===t.hasRaises&&(n+=2);let s=[...e.callees||[]].filter(o=>t.callees.has(o)).length;return n+Math.min(s,4)*2}function Yw(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let f of e)for(let p of Ea(f.decorators))r.set(p,(r.get(p)||0)+1);let i="",a=1;for(let[f,p]of r)p>a&&(a=p,i=f);let l=new Set(Ea(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(sd(n)),d=s?.start??null;for(let f of e){let p=Ea(f.decorators).some(b=>c.has(b))?1:0,m=sd(f.label).filter(b=>u.has(b)).length,h=Kw(f,o),g=d!=null&&f.site?1/(1+Math.abs(f.site.start-d)):0;f._score=p*1e3+m*50+h+g}return[...e].sort((f,p)=>p._score-f._score||(f.site?.start||0)-(p.site?.start||0))}function so(e,t){let n=mn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=ke(e,"defines").filter(S=>S.subject===n),r=new Map;for(let S of ke(e,"callsSymbol"))r.has(S.subject)||r.set(S.subject,new Set),r.get(S.subject).add(S.object);let i=[],a=[],l=0;for(let S of o){let A=e.byId.get(S.object);if(!A)continue;let L=A.class||"",T=vt(A);L==="GlobalVariable"?(a.push({label:A.label,value:(A.attributes||[]).find(P=>P.key==="value")?.value||"",site:T}),T&&(l=Math.max(l,T.end))):(L==="Function"||L==="Class")&&(i.push({id:A.id,label:A.label,class:L,site:T,decorators:to(A),raises:Pe(A,"raises"),doc:Pe(A,"doc"),params:Pe(A,"params"),returns:Pe(A,"returns"),callees:r.get(A.id)||new Set}),T&&(l=Math.max(l,T.end)))}let c=vt(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:to(t),raises:Pe(t,"raises"),params:Pe(t,"params"),returns:Pe(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,f=u?Vw(u):Hw(i);i=Yw(i,u||{label:t.label},f);let p=u?null:i.find(S=>S.site&&S.label!==t.label)||null,m=[...new Set(ke(e,"tests").filter(S=>S.object===n).map(S=>S.subjectLabel||S.subject))].slice(0,zw),h=Pd(e,n).slice(0,Dw),g=ke(e,"reexports").filter(S=>S.subject===n).map(S=>S.objectLabel||S.object).slice(0,20),b=Pe(e.byId.get(n),"all"),y=ke(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(S=>S.object===t.id)?.subject||null);let $=null;if(w){let S=e.byId.get(w),A=y.filter(L=>L.subject===w).map(L=>{let T=e.byId.get(L.object);return{label:L.objectLabel||T?.label||L.object,class:T?.class||"",site:T?vt(T):null,decorators:T?to(T):"",params:T?Pe(T,"params"):"",returns:T?Pe(T,"returns"):"",raises:T?Pe(T,"raises"):""}}).slice(0,Fw);$={className:S?.label||String(w).replace(/^fn:.*#/,""),members:A,total:y.filter(L=>L.subject===w).length}}let j=null;for(let S of[...i,...a])S.site&&(!j||S.site.start>j.start)&&(j=S.site);let v=j?{start:j.start,end:j.end}:null,x=u||p,k=x?.id?e.byId.get(x.id):null,_=k?Ca(e,k):"",R=[];if(x?.callees)for(let S of x.callees){let A=e.byId.get(S),L=A?vt(A):null;if(L&&R.push({label:A.label,site:L}),R.length>=Gw)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:m,cochange:h,exports:g,allExports:b,classMembers:$,insertion:l,insertionRegion:v,calleeBodies:R,callHint:_,siblingCap:Pw}}function js(e){let t={anchor:!0,exemplar:!0,registration:!0,insertionRegion:!0,allExports:!0,classMembers:!0,siblings:!0,reexports:!0,tests:!0,cochange:!0,inlinedCallees:!1};return e==="TINY"?{...t,classMembers:!1,siblings:!1,reexports:!1,tests:!1,cochange:!1}:e==="LARGE"||e==="FULL"?{...t,inlinedCallees:!0}:t}function Ld(e){return{...e,anchor:!1,exemplar:!1,inlinedCallees:!1,classMembers:!1,reexports:!1,tests:!1,cochange:!1,registration:!0,siblings:!0,insertionRegion:!0,allExports:!0}}function Hr(e,t,{untuned:n=!1}={}){let s=e.anchor||e.exemplar,o="TINY";if(e.anchor&&e.anchor.site||e.exemplar&&e.exemplar.site||(o="MID"),e.classMembers&&e.classMembers.members&&e.classMembers.members.length&&(o="MID"),s){let i=s.site?s.site.end-s.site.start+1:1/0,a=Vr(s.params);(i>Bw||a>Uw||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),f=d?vt(d):null;if(f&&f.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=Ww;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:js(o),topup:o!=="TINY"}}function Nd(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
30
+ `)}${o}`}function Vd(e,t){return Gd(e,t)}function qd(e,t){return Gd(e,t)}function Fa(e,t,{kind:n,decFilter:s="",nameRe:o=null}={}){let r=Hd[n];if(!r)return[];let i=[];for(let a of e.individuals){if((a.class||"")!==r||o&&!o.test(a.label)||s&&!io(a).toLowerCase().includes(s))continue;let l=String(a.label).toLowerCase(),c=t.length?0:1;for(let u of t)l.includes(u)&&(c+=5);t.length&&!c||i.push({ind:a,score:c})}return i.sort((a,l)=>l.score-a.score||String(a.ind.label).length-String(l.ind.label).length),i}function ky(e,t,{limit:n=Hr,kind:s,decFilter:o,nameRe:r,toolNamePrefix:i="tmct_"}){if(!Hd[s])return`unknown kind "${s}" (use function, class, method, attribute, or module).`;let l=Fa(e,t,{kind:s,decFilter:o,nameRe:r});if(!l.length)return`no ${s} matches the given filters.`;let c=l.slice(0,n),u=[`${l.length} ${s}(s) match (top ${c.length}):`];for(let{ind:d}of c)u.push(`- ${d.label}${Ma(Et(d))}`);return u.push(`Then ${i}snippet <name> for the exact body, or ${i}describe for its edges.`),u.join(`
31
+ `)}function Iy(e){return{paramCount:Xr(e?.params),hasReturns:!!e?.returns,hasRaises:!!e?.raises,callees:e?.callees instanceof Set?e.callees:new Set}}function Ly(e){if(!e.length)return{paramCount:0,hasReturns:!1,hasRaises:!1,callees:new Set};let t=e.map(i=>Xr(i.params)),n=e.filter(i=>!!i.returns).length,s=e.filter(i=>!!i.raises).length,o=new Map;for(let i of e)for(let a of i.callees||[])o.set(a,(o.get(a)||0)+1);let r=new Set([...o.entries()].filter(([,i])=>i>=2).map(([i])=>i));return{paramCount:Oy(t),hasReturns:n*2>=e.length,hasRaises:s*2>=e.length,callees:r}}function Ny(e,t){if(!t)return 0;let n=Math.max(0,4-Math.abs(Xr(e.params)-t.paramCount));!!e.returns===t.hasReturns&&(n+=2),!!e.raises===t.hasRaises&&(n+=2);let s=[...e.callees||[]].filter(o=>t.callees.has(o)).length;return n+Math.min(s,4)*2}function My(e,{decorators:t="",label:n="",site:s=null}={},o=null){let r=new Map;for(let f of e)for(let p of Ta(f.decorators))r.set(p,(r.get(p)||0)+1);let i="",a=1;for(let[f,p]of r)p>a&&(a=p,i=f);let l=new Set(Ta(t)),c=l.size?l:new Set(i?[i]:[]),u=new Set(bd(n)),d=s?.start??null;for(let f of e){let p=Ta(f.decorators).some(b=>c.has(b))?1:0,m=bd(f.label).filter(b=>u.has(b)).length,h=Ny(f,o),g=d!=null&&f.site?1/(1+Math.abs(f.site.start-d)):0;f._score=p*1e3+m*50+h+g}return[...e].sort((f,p)=>p._score-f._score||(f.site?.start||0)-(p.site?.start||0))}function co(e,t){let n=wn(e,t),s=e.byId.get(n)?.label||String(n||"").replace(/^mod:/,""),o=Se(e,"defines").filter(x=>x.subject===n),r=new Map;for(let x of Se(e,"callsSymbol"))r.has(x.subject)||r.set(x.subject,new Set),r.get(x.subject).add(x.object);let i=[],a=[],l=0;for(let x of o){let T=e.byId.get(x.object);if(!T)continue;let M=T.class||"",A=Et(T);M==="GlobalVariable"?(a.push({label:T.label,value:(T.attributes||[]).find(P=>P.key==="value")?.value||"",site:A}),A&&(l=Math.max(l,A.end))):(M==="Function"||M==="Class")&&(i.push({id:T.id,label:T.label,class:M,site:A,decorators:io(T),raises:Me(T,"raises"),doc:Me(T,"doc"),params:Me(T,"params"),returns:Me(T,"returns"),callees:r.get(T.id)||new Set}),A&&(l=Math.max(l,A.end)))}let c=Et(t),u=c&&(t.class||"")!=="Module"?{id:t.id,label:t.label,class:t.class||"",site:c,decorators:io(t),raises:Me(t,"raises"),params:Me(t,"params"),returns:Me(t,"returns"),callees:r.get(t.id)||new Set}:null,d=i.length,f=u?Iy(u):Ly(i);i=My(i,u||{label:t.label},f);let p=u?null:i.find(x=>x.site&&x.label!==t.label)||null,m=[...new Set(Se(e,"tests").filter(x=>x.object===n).map(x=>x.subjectLabel||x.subject))].slice(0,_y),h=Jd(e,n).slice(0,jy),g=Se(e,"reexports").filter(x=>x.subject===n).map(x=>x.objectLabel||x.object).slice(0,20),b=Me(e.byId.get(n),"all"),y=Se(e,"contains"),w=null;(t.class||"")==="Class"?w=t.id:(t.class||"")==="Method"&&(w=y.find(x=>x.object===t.id)?.subject||null);let $=null;if(w){let x=e.byId.get(w),T=y.filter(M=>M.subject===w).map(M=>{let A=e.byId.get(M.object);return{label:M.objectLabel||A?.label||M.object,class:A?.class||"",site:A?Et(A):null,decorators:A?io(A):"",params:A?Me(A,"params"):"",returns:A?Me(A,"returns"):"",raises:A?Me(A,"raises"):""}}).slice(0,Sy);$={className:x?.label||String(w).replace(/^fn:.*#/,""),members:T,total:y.filter(M=>M.subject===w).length}}let j=null;for(let x of[...i,...a])x.site&&(!j||x.site.start>j.start)&&(j=x.site);let v=j?{start:j.start,end:j.end}:null,E=u||p,k=E?.id?e.byId.get(E.id):null,_=k?Pa(e,k):"",R=[];if(E?.callees)for(let x of E.callees){let T=e.byId.get(x),M=T?Et(T):null;if(M&&R.push({label:T.label,site:M}),R.length>=Cy)break}return{modId:n,moduleLabel:s,anchor:u,siblings:i,totalSiblings:d,exemplar:p,globals:a,tests:m,cochange:h,exports:g,allExports:b,classMembers:$,insertion:l,insertionRegion:v,calleeBodies:R,callHint:_,siblingCap:Ey}}function Rs(e){let t={anchor:!0,exemplar:!0,registration:!0,insertionRegion:!0,allExports:!0,classMembers:!0,siblings:!0,reexports:!0,tests:!0,cochange:!0,inlinedCallees:!1};return e==="TINY"?{...t,classMembers:!1,siblings:!1,reexports:!1,tests:!1,cochange:!1}:e==="LARGE"||e==="FULL"?{...t,inlinedCallees:!0}:t}function Kd(e){return{...e,anchor:!1,exemplar:!1,inlinedCallees:!1,classMembers:!1,reexports:!1,tests:!1,cochange:!1,registration:!0,siblings:!0,insertionRegion:!0,allExports:!0}}function Jr(e,t,{untuned:n=!1}={}){let s=e.anchor||e.exemplar,o="TINY";if(e.anchor&&e.anchor.site||e.exemplar&&e.exemplar.site||(o="MID"),e.classMembers&&e.classMembers.members&&e.classMembers.members.length&&(o="MID"),s){let i=s.site?s.site.end-s.site.start+1:1/0,a=Xr(s.params);(i>Ry||a>Ay||s.raises)&&(o="MID");let l=!1;if(e.anchor)for(let u of s.callees||[]){let d=t.byId.get(u),f=d?Et(d):null;if(f&&f.path!==e.moduleLabel){l=!0;break}}let c=(e.anchor?.class||"")==="Method"&&Number(e.classMembers?.total||e.classMembers?.members?.length||0)>=Ty;(l||c)&&(o="LARGE")}else o="MID";return{tier:o,mask:Rs(o),topup:o!=="TINY"}}function Yd(e){let t=[`Additional context for ${e.moduleLabel} (sections omitted from the lean bundle):`];if(e.classMembers&&e.classMembers.members.length){t.push(`
32
32
  ## members of ${e.classMembers.className}:`);for(let n of e.classMembers.members){let s=String(n.label).split(".").pop(),o=n.params!=null&&n.params!==""?`(${n.params})${n.returns?` -> ${n.returns}`:""}`:"",r=n.decorators?`@${n.decorators} `:"",i=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${s}${n.site?` :${n.site.start}`:""} ${r}${s}${o}${i}`)}}if(e.siblings.length){t.push(`
33
33
  ## sibling symbols (most relevant first; ${e.siblings.length} total):`);for(let n of e.siblings.slice(0,e.siblingCap)){let s=n.decorators?`@${n.decorators} `:"",o=n.raises?` raises=${n.raises}`:"";t.push(` ${n.class} ${n.label}${n.site?` :${n.site.start}`:""} ${s}${o}`)}e.siblings.length>e.siblingCap&&t.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return e.allExports&&t.push(`
34
34
  ## module __all__: ${e.allExports}`),e.exports&&e.exports.length&&t.push(`
35
35
  ## re-exported symbols: ${e.exports.join(", ")}`),e.tests.length&&t.push(`
36
36
  ## covering tests: ${e.tests.join(", ")}`),e.cochange&&e.cochange.length&&t.push(`
37
37
  ## usually changed together: ${e.cochange.map(n=>`${n.label} (\xD7${n.weight})`).join(", ")}`),t.length===1&&t.push("(no omitted sections \u2014 the lean bundle already contained everything for this symbol.)"),t.join(`
38
- `)}function Md(e,t){let n=[`Edit context for ${e.moduleLabel} (graph-only bundle \u2014 siblings/registration/tests are real graph truth; no source body without a source-capable provider).`];if(t.registration&&e.globals.length){n.push(`
38
+ `)}function Xd(e,t){let n=[`Edit context for ${e.moduleLabel} (graph-only bundle \u2014 siblings/registration/tests are real graph truth; no source body without a source-capable provider).`];if(t.registration&&e.globals.length){n.push(`
39
39
  ## registration / module globals (replicate this pattern):`);for(let s of e.globals)n.push(` ${s.label} = ${s.value}${s.site?` [:${s.site.start}]`:""}`)}if(t.classMembers&&e.classMembers&&e.classMembers.members.length){n.push(`
40
40
  ## members of ${e.classMembers.className}:`);for(let s of e.classMembers.members){let o=String(s.label).split(".").pop(),r=s.params!=null&&s.params!==""?`(${s.params})${s.returns?` -> ${s.returns}`:""}`:"",i=s.decorators?`@${s.decorators} `:"",a=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${o}${s.site?` :${s.site.start}`:""} ${i}${o}${r}${a}`)}}if(t.siblings&&e.siblings.length){n.push(`
41
41
  ## sibling symbols to copy the style of (most relevant first; ${e.siblings.length} total):`);for(let s of e.siblings.slice(0,e.siblingCap)){let o=s.decorators?`@${s.decorators} `:"",r=s.raises?` raises=${s.raises}`:"";n.push(` ${s.class} ${s.label}${s.site?` :${s.site.start}`:""} ${o}${r}`)}e.siblings.length>e.siblingCap&&n.push(` \u2026+${e.siblings.length-e.siblingCap} more`)}return t.allExports&&e.allExports&&n.push(`
@@ -45,142 +45,145 @@ ${s.join(`
45
45
  ## insert the new sibling after line ~${e.insertion} (end of the last top-level definition).`)),t.tests&&e.tests.length&&n.push(`
46
46
  ## covering tests: ${e.tests.join(", ")}`),t.cochange&&e.cochange&&e.cochange.length&&n.push(`
47
47
  ## usually changed together (consider editing these too): ${e.cochange.map(s=>`${s.label} (\xD7${s.weight})`).join(", ")}`),n.join(`
48
- `)}function Pd(e,t){let n=[];for(let s of ke(e,"cochange"))s.subject===t?n.push({label:s.objectLabel||s.object,weight:s.weight||0}):s.object===t&&n.push({label:s.subjectLabel||s.subject,weight:s.weight||0});return n.sort((s,o)=>o.weight-s.weight)}function Fd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Pd(e,n);if(!o.length)return`${s}: no change-coupling recorded (rarely co-committed, or outside the git-log window).`;let r=o.slice(0,Sa).map(i=>`${i.label} (\xD7${i.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
48
+ `)}function Jd(e,t){let n=[];for(let s of Se(e,"cochange"))s.subject===t?n.push({label:s.objectLabel||s.object,weight:s.weight||0}):s.object===t&&n.push({label:s.subjectLabel||s.subject,weight:s.weight||0});return n.sort((s,o)=>o.weight-s.weight)}function Qd(e,t){let n=wn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Jd(e,n);if(!o.length)return`${s}: no change-coupling recorded (rarely co-committed, or outside the git-log window).`;let r=o.slice(0,Ca).map(i=>`${i.label} (\xD7${i.weight})`);return`${s} \u2014 usually changes together with ${o.length} module(s) (edit these too):
49
49
  ${r.join(`
50
- `)}`+(o.length>Sa?`
51
- \u2026+${o.length-Sa} more`:"")}function Dd(e,t){let n=mn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=ke(e,"reexports").filter(i=>i.subject===n);if(!o.length)return`${s}: no public exports recorded (no export list / __all__ found, or none resolved).`;let r=o.slice(0,ja).map(i=>{let a=e.byId.get(i.object),l=a?vt(a):null,c=l?` \u2190 ${l.path}`:"";return`${i.objectLabel||i.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
50
+ `)}`+(o.length>Ca?`
51
+ \u2026+${o.length-Ca} more`:"")}function Zd(e,t){let n=wn(e,t);if(!n)return`cannot map ${t.label} to a module.`;let s=e.byId.get(n)?.label||n,o=Se(e,"reexports").filter(i=>i.subject===n);if(!o.length)return`${s}: no public exports recorded (no export list / __all__ found, or none resolved).`;let r=o.slice(0,Oa).map(i=>{let a=e.byId.get(i.object),l=a?Et(a):null,c=l?` \u2190 ${l.path}`:"";return`${i.objectLabel||i.object}${c}`});return`${s} \u2014 public API (${o.length} export(s)):
52
52
  ${r.join(`
53
- `)}`+(o.length>ja?`
54
- \u2026+${o.length-ja} more`:"")}var qu,od,Ku,Wb,qb,ka,Vb,Wr,Hb,Kb,Yb,ad,Xb,Jb,Qb,Zb,ew,tw,nw,sw,ow,rw,iw,aw,cw,lw,uw,dw,pw,fw,mw,hw,gw,bw,ww,yw,vw,Yu,$w,xw,cd,ld,ud,kw,Ew,Sw,jw,_w,Ju,Qu,Tw,Zu,Br,ed,td,nd,Vo,Pe,Iw,Ow,yd,Lw,Mt,kd,Nw,Od,Pw,Fw,Dw,zw,Bw,Uw,Ww,Gw,Ea,sd,Vr,qw,Sa,ja,Te=M(()=>{Kn();ks();wa();qo();Ss();qu={"mgx:importsnamespace":"imports","mgx:callscoarse":"calls","seon:declaresmethod":"defines","mgx:testscoverage":"tests","mgx:touchedbycommit":"touches","seon:containscodeentity":"contains","seon:hassupertype":"inherits","mgx:changecoupledwith":"cochange","mgx:reexports":"reexports","mgx:serves":"serves","mgx:denotes":"denotes","mgx:touchessymbol":"touchesSymbol","mgx:callssymbol":"callsSymbol","seon:usescomplextype":"imports","seon:invokesmethod":"calls","seon:history":"touches","mgx:subclassof":"inherits","mg:imports":"imports","mg:calls":"calls","mg:defines":"defines","mg:tests":"tests","mg:touches":"touches","mgx:saidinsession":"saidInSession","mgx:inreplyto":"inReplyTo","mgx:statedby":"statedBy","mgx:canonicalisedfrom":"canonicalisedFrom"};od=e=>/^(git|turn):/.test(String(e||""));Ku=30,Wb=8;qb=2,ka=25,Vb=3;Wr=10,Hb=8,Kb=3,Yb=2,ad=5,Xb=4,Jb=.2,Qb=.35,Zb=.15,ew=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),tw=.2,nw=.35,sw=.2,ow=.35,rw=e=>/\.cs$/i.test(e),iw=e=>/^I[A-Z]/.test(String(e||"")),aw=.2,cw=.35,lw=50,uw=.2,dw=.35,pw=.5,fw=ad,mw=3,hw=4,gw=1,bw=.9,ww=.5,yw=.2,vw=.35,Yu=4,$w=2,xw=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],cd=3,ld=12,ud=.9,kw=["imports","calls","callsSymbol","inherits"],Ew=.5,Sw=.6,jw=.2,_w=.35;Ju=128,Qu=4,Tw=64,Zu=250,Br=class extends Error{};ed=new WeakMap;td=40,nd=40,Vo=30;Pe=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";Iw=25,Ow=15;yd=40,Lw="tests edges are recorded module to module, so this is module-grain coverage.";Mt=15;kd=new Set(["Function","Method"]);Nw=8;Od={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};Pw=8,Fw=16,Dw=4,zw=6,Bw=12,Uw=2,Ww=8,Gw=3,Ea=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),sd=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),Vr=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},qw=e=>{let t=new Map,n=e[0]??0,s=0;for(let o of e){let r=(t.get(o)||0)+1;t.set(o,r),r>s&&(s=r,n=o)}return n};Sa=20;ja=40});function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vd(e){let t=String(e||"");return zd&&(t=t.replace(zd," ")),t.replace(/\s+/g," ").trim()}function Hd(e){let t=String(e||"");t=t.replace(py," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(ly);if(o&&(t=o[1].trim()),o=t.match(uy),o&&(t=o[1].trim()),o=t.match(Bd),o&&(t=o[1].trim()),o=t.match(Ud),o&&(t=o[1].trim()),o=t.match(Wd),o&&(t=o[1].trim()),o=t.match(dy),o&&(t=o[1].trim()),o=t.match(Gd),o&&(t=o[1].trim()),o=t.match(fy),o&&(t=o[1].trim()),o=t.match(my),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(hy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(gy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(by),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(wy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(yy),o&&Yn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(vy),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match($y),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(xy),o){let r=o[1].trim();cy(r)||(t=!ky.test(r)&&(ry.test(r)||Yn.test(r))?r:`describe ${r}`)}if(o=t.match(Ey),o){let r=o[1].trim();(Yn.test(r)||Sy.test(r)||Gd.test(r)||Bd.test(r)||Wd.test(r)||Ud.test(r)||jy.test(r))&&(t=r)}if(t===s)break}return t}function Ay(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(_y);if(o&&(t=o[1].trim()),o=t.match(Ry),o&&(t=o[1].trim()),t===s)break}return t}function Cy(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(Ty);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function Ly(e){let t=String(e||""),n=t.match(Oy);if(n){let o=Yd[n[1].toLowerCase()],r=Kd[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(Xd);return s?`which modules transitively import ${s[1].trim()}`:t}function Kr(e){return String(e||"").replace(Jw,t=>la[t.toLowerCase()])}function _s(e){let t=Kr(e);return t=t.replace(Qw,n=>ua[n.toLowerCase()]),t=t.replace(Zw,n=>da[n.toLowerCase()]),t=t.replace(ey,"with"),t=t.replace(ty,(n,s)=>`${s} for`),t=t.replace(ny,(n,s)=>`for ${s}`),t=t.replace(sy,(n,s)=>s),t=t.replace(Ny,"$1$2"),t=t.replace($u,"$1ing"),t=Hd(t),t=Cy(t),t=Ay(t),t=Ly(t),t=Vd(t),t=Yt(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function Ho(e){for(let t of[...ku,...xu]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Oa(e){for(let t of My){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Jd(e){let t=String(e||"").match(Py);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var Xw,Jw,qd,Qw,Zw,ey,ty,ny,sy,oy,zd,ry,Yn,iy,ay,cy,ly,uy,Bd,Ud,Wd,dy,py,fy,my,hy,gy,by,wy,yy,vy,$y,xy,ky,Ey,Sy,jy,Gd,_y,Ry,Ty,Kd,Yd,Iy,Oy,Xd,Ny,My,Py,ot,Jt,me,Xn=M(()=>{Rn();Xw=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ye).join("|")+")\\b","gi"),Jw=Xw(la),qd=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Ye).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Qw=qd(ua),Zw=qd(da),ey=/(?<=^|\s)w\/(?=\s|$)/gi,ty=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,ny=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,sy=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,oy=Object.keys(de).sort((e,t)=>t.length-e.length).map(Ye).join("|"),zd=Do.length?new RegExp("\\b("+[...Do].sort((e,t)=>t.length-e.length).map(Ye).join("|")+")\\b\\s*,?","gi"):null;ry=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(Ye).join("|")+")\\b","i"),Yn=/^(?:which|what|who|whose|where|when|why|how)\b/i,iy=new Set(["modules","files","packages","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),ay=/^(?:all\s+|the\s+)?(?:module|file|package|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,cy=e=>{if(ay.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return iy.has((t[t.length-1]||"").toLowerCase())},ly=/^(?:hi|hiya|hello|hey|yo|howdy|g'?day|yeah\s+nah|good\s+(?:morning|afternoon|evening|day)|greetings|salutations)(?:\s+(?:there|pardner|folks|friend|mate))?\s*[,.—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,uy=/^(?:thanks|thank\s+you|many\s+thanks|thx|ty|cheers)(?:\s+(?:so\s+much|a\s+lot|very\s+much|a\s+bunch))?\s*[,—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,Bd=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|(?:just\s+)?(?:one|another)\s+more|another\s+one)[\s,]+)+(.+)$/i,Ud=/^(?:just\s+(?:poking\s+around|looking\s+around|browsing|exploring|checking\s+(?:this|it)\s+out)|first\s+time\s+(?:trying\s+this\s+out|using\s+this|here)|i'?m\s+new\s+(?:here|around\s+here|to\s+(?:this|all\s+this)(?:\s+(?:repo|codebase|project|app|tool|thing))?))\s*[,.—–-]\s*(.+)$/i,Wd=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,dy=/^(?:please[\s,]+)+(.+)$/i,py=/,?\s*if\s+(?:it'?s|it\s+is|that'?s|that\s+is)\s+not\s+too\s+much\s+(?:trouble|bother|hassle)\s*,?\s*/i,fy=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,my=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,hy=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,gy=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,by=/^do\s+you\s+know\s+(.+?)\??$/i,wy=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,yy=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,vy=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,$y=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,xy=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,ky=/^everything\s+i(?:'d|\s+would)?\s+need\b/i,Ey=/^(?:and|also|so|then|now|but)\s+(.+)$/i,Sy=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,jy=/^(?:the|its|their|his|her|our|my)\s+[\w'-]+(?:\s+[\w'-]+){0,2}\s+(?:that|which|who)\s+\S/i,Gd=/^(?:(?:actually|no\s+wait|wait|hold\s+on|never\s+mind|scratch\s+that|on\s+second\s+thought|i\s+mean(?:t)?)[\s,.]+)+(.+)$/i;_y=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,Ry=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;Ty=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;Kd=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),Yd=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),Iy="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",Oy=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(Yd).join("|")+")\\s+("+Object.keys(Kd).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+Iy+")\\??$","i"),Xd=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;Ny=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${wu.map(Ye).join("|")})(\\s*[?.!]*)$`,"i");My=Object.freeze([{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:are|is)\s+(?:in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:does|do)\s+(.+?)\s+have\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+are\s+(?:the\s+)?(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:of|in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^(?:the\s+)?(?:members?|methods?|attributes?|contents)\s+of\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+else\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:defined|declared)\s+(?:the\s+)?(?:function\s+|method\s+|class\s+|module\s+|variable\s+|constant\s+)?(.+?)\??$/i,to:e=>`where is ${e[1]} defined`},{re:/^where'?s\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^were\s+is\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^what\s+is\s+the\s+purpose\s+of\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\??$/i,to:e=>`what is a ${e[1]}`},{re:new RegExp(`^what\\s+does\\s+(?:the\\s+)?(?!(?:an?|it|this|that|these|those)\\s)(.+?)\\s+do\\s+(?:${ca.map(Ye).join("|")})\\??$`,"i"),to:e=>`what is a ${e[1]}`},{re:/^(?:which|what)\s+(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:are|is)\s+(public|private|protected|static|abstract|constant|exported|re-?exported|tested|covered|untested|uncovered)\??$/i,to:e=>`${e[2].toLowerCase()} ${e[1].toLowerCase()}`},{re:/^what\s+(?:is|are)\s+(not\s+)?(tested|untested|covered|uncovered)\??$/i,to:e=>{let t=e[2].toLowerCase();return`${e[1]?t==="tested"?"untested":t==="covered"?"uncovered":t:t} modules`}},{re:/^what\s+does\s+(.+?)\s+changes?\s+together\s+with\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^what\s+changes?\s+together\s+with\s+(.+?)\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^how\s+many\s+commits\s+(?:are|were)\s+(?:recorded|logged)\s+(?:for|against)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`how many commits touched ${e[1]}`},{re:/^who\s+(?:wrote|authored)\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^who\s+is\s+the\s+authors?\s+of\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^(?:does|do)\s+(?!.*\bnot\b)(.+?)\s+have\s+(?:any\s+)?(?:tests?|test\s+coverage|coverage)\??$/i,to:e=>`what tests ${e[1]}`},{re:/^(?:is|are)\s+(?!.*\bnot\b)(.+?)\s+tested\??$/i,to:e=>`what tests ${e[1]}`},{re:/^what\s+needs\s+(?:to\s+be\s+)?(?:a\s+)?(?:tested|tests?|testing|coverage|covering)\??$/i,to:()=>"untested modules"},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:(?:that|which)\s+)?(?:have|has|having|with)\s+no\s+tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+without\s+(?:any\s+)?tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:new RegExp(`^(?:do|does)\\s+(.+?)\\s+(${oy})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);Py=new RegExp("^(?:which|what|who|list|show(?:\\s+me)?|find|give\\s+me)?\\s*(?:the\\s+|all\\s+)?([a-z][a-z-]*)\\s+(?:(?:that|which|who)\\s+)?(?:(?:do|does|did|are|is|was|were|have|has|can|could|will|would|should)\\s+not|cannot|can't|won't|couldn't|shouldn't|wouldn't|not)\\s+(.+)$","i");ot=new Set(["what","who","which","where","when","why","how","does","do","did","is","are","was","were","the","a","an","of","to","from","at","in","on","there","something","anything","nothing","one","any","anywhere","last","usually","typically","generally","normally","often","commonly","mostly","should","would","could","can","will","shall","might","must"]),Jt=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),me=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var Zd,Qd=M(()=>{Zd={source:"corpus/wordnet/*.jsonl lemmas, expanded through the regular -s/-ed/-ing inflections",generator:"scripts/generate-real-word-collisions.mjs",targets:["alongside","build","builds","built","call","calling","calls","change","changed","changes","check","checks","class","co-change","co-changes","code","commits","contain","containing","contains","couple","couples","cover","covers","declare","declares","define","defined","defines","defining","denote","denotes","denoting","depends","derive","derives","directly","edited","execute","executes","exercise","exercises","explicitly","export","exporting","exports","expose","exposes","extend","extending","extends","fire","fires","from","grab","grabs","have","hits","hold","holds","hooked","import","importing","imports","included","indirectly","inherit","inheriting","inherits","inside","into","invoke","invokes","kick","kicks","kind","land","landed","lean","leans","live","lives","make","makes","modified","modifies","move","moves","parent","part","pass","passes","pull","pulls","re-export","re-exports","reference","references","relies","rely","require","requires","runs","serve","serves","serving","share","shares","sits","subclass","subclasses","subclassing","superclass","superclasses","sure","talk","talks","tend","tends","test","testing","tests","through","together","touch","touched","touches","touching","transitively","trigger","triggers","tweaked","updated","uses","using","usually","verifies","verify","went","were","wired","with"],words:["aalging","aasing","aave","ablies","abling","aboves","absing","abuses","abusing","acauling","achinged","acolds","acquire","acquires","acyling","adelies","adenine","adenined","adenines","adenining","adenota","adenotaing","adenotas","aditted","aerides","aerified","aerifies","aerify","aerying","affine","affined","affines","affining","afire","afires","afling","agalling","ailing","aired","airied","airies","airport","airporting","airports","airsed","airses","airted","alaing","alases","albing","alecks","aleves","aliaes","alikes","alines","alive","alives","allaing","allies","alling","alls","allying","alongsided","alongsides","alping","alting","altogether","amasses","amazes","amends","amorting","amorts","amuses","amusing","analling","anded","anoded","ansing","anuses","apart","aparts","apises","apparent","appends","appose","apposes","apsing","apsises","arab","arabis","arabs","ardent","argent","arpent","arrive","arrives","arsing","asaing","asding","aseans","ases","ashing","ashore","ashores","asing","asking","asping","asring","asses","assess","assets","assing","assure","attending","attest","attesting","attests","audited","aufing","auging","auking","aurifies","aurify","avouch","avouched","avouches","avouching","awaked","awakes","awared","awares","awling","awried","axling","baases","badded","bailed","bailing","baited","bake","bakeds","bakers","bakes","balded","balding","baling","balk","balking","balks","ball","balling","balls","ballsing","ballying","balming","band","banded","bandeds","bandied","bandsed","banked","banned","barded","barelies","barely","barses","bart","baseses","bashes","basing","basises","bass","bassed","basses","basset","bassets","bassos","bastes","basting","batses","bauded","baulks","bawded","bawling","bbsing","beaked","bean","beanos","beans","beasting","beasts","beating","beeting","begild","begilds","behave","behold","beholds","belied","belief","beliefs","belies","belikes","belizes","belles","bellies","belling","belting","bend","bended","bends","bent","berging","bering","berking","berming","beroes","besets","besots","besses","bessing","best","besting","bests","beting","betting","bevies","bhanged","biered","bigger","biggers","billing","bind","binded","birded","birled","birles","biroed","birred","bising","bjsing","bladed","blanced","bland","blanda","blandaed","blanded","blands","blanked","blares","blases","blasts","bleaked","bleaks","blears","bleats","blended","blends","blesting","blests","blinded","blinds","blited","blites","bloked","blonded","bmuses","bnsing","boched","boches","boching","bocked","bode","bodilied","bodilies","boiled","boileds","bokked","bold","bolds","bolling","bonded","boners","bonked","boobed","booked","bookeds","bookend","booker","bookied","booksed","boomed","booned","boored","booted","boozed","borers","borough","bosked","bosses","botched","botches","botching","boucheed","bouchees","boucle","boucled","boucling","boughed","boughing","boules","boulle","boulles","bouses","bousing","bowers","boxers","bpsing","bragger","braggers","brakes","branded","brasses","breaked","breves","breving","bricks","brigged","brills","broked","brooked","bruins","brunts","brunus","bses","bsing","bugled","bugles","buhled","builders","buildups","bull","bulled","bullet","bulling","bulls","buns","bunses","bunsing","buried","burieds","burled","burleds","buses","bushes","bushing","busied","busies","busking","bussing","busying","buyied","buying","bypass","bypasses","caballing","cabals","cabbing","cabers","cabged","cabging","cables","cablin","cabling","cablins","caching","cackling","cadded","cadding","cadent","cadged","cadges","cadging","cadring","cafers","caffing","cafing","cagers","caging","cagying","caining","cajoling","cake","cakes","cakiling","caking","calcine","calean","caleans","caleying","caleys","calf","calfing","calfs","califs","calkin","calking","calkins","callaing","callas","callers","callinged","callings","callous","callowing","callows","calluna","callus","calm","calming","calmings","calmlying","calms","calquing","calvaing","calvas","calves","calving","calvings","calx","calxes","calxing","calycling","calyxing","camass","camelling","camels","camming","camoing","camping","canaing","canalling","canals","candid","candied","candled","candling","cangue","cangued","cangues","caning","canning","canoes","canting","cantling","capers","caping","caplin","caplins","capoing","capping","captain","captaining","captains","carded","carding","caring","carking","carlina","carline","carling","carlings","carlos","carning","caroling","carolling","carols","carping","carring","cart","carting","carver","carvers","carves","casaing","cashes","cashing","casking","cassies","castes","castling","casually","casuses","caters","catling","catlings","catses","catsing","catting","cattling","caul","cauline","cauling","caulking","cauls","cavaing","cave","caverns","cavilling","cavils","caving","cavying","cawing","caying","ceases","cecalling","cede","cedied","ceiling","cell","celling","celloing","cellos","cells","cellsing","cent","cercises","cere","cering","cerise","cerises","ceroing","cerring","certain","certaining","certains","certifies","certify","cervina","cervus","cfling","cgsing","chadded","chafed","chaffed","chafinged","chagaed","chagas","chagga","chaggaed","chaggas","chained","chainsed","chainses","chaired","chaise","chaised","chaises","chaited","chaits","chajaed","chalked","chalking","challis","champed","chanal","chanals","chanar","chanars","chance","chanced","chancels","chances","chancied","chancies","chancre","chancred","chancres","chancy","changers","channels","chanted","chanters","chanteys","chantied","chanties","chanty","chaosed","chaoses","chapped","charded","chards","charge","charged","chargers","charges","charied","charmed","charms","charred","charrs","charted","charts","chased","chasmed","chasms","chassed","chaste","chasted","chastes","chatted","chaunaed","chaused","chauses","chawed","cheaps","cheats","checkeds","checkers","checksum","checkups","cheek","cheeks","cheeps","chelas","chenned","cheops","cherts","chesting","chewas","chianed","chick","chicks","chigger","chiggers","chiling","chilling","chills","chinaed","chined","chines","chinked","chinks","chinned","chinoed","chirks","chits","chives","choanaed","chock","chocked","chocks","choked","choker","chokers","choler","cholers","chonned","choosed","chords","chores","chough","chuaned","chuck","chucks","chugged","chunga","chungaed","chungas","chunked","chunks","chyling","cialis","cicers","ciders","circed","circes","cive","cives","civies","cladded","claded","clades","clading","clads","claims","clamps","clams","clamses","clanged","clangers","clanks","clans","claps","clarks","claros","clash","clashes","clasp","clasps","classed","classic","classy","clast","clasts","clausa","clausas","clause","clauses","claver","clavers","clavus","clawing","claws","claying","clays","clean","cleans","cleanse","clerks","clever","clevers","cliing","climes","clinged","cloaks","clocks","closer","closers","closes","cloved","cloven","clovens","clover","clovers","clucks","cluing","clving","clxing","cnsing","coached","coaches","coaching","coaling","coasts","coaxer","coaxers","cobber","cobbers","cobble","cobbles","cocain","cocaining","cocains","cocked","cocker","cockers","cockle","cockles","coda","codaed","codded","coddles","coded","coders","codes","codex","codgers","codified","codifies","codling","cods","coed","coeurs","coffer","coffers","coggle","coggles","coheres","coiling","coiner","coiners","coired","coke","colaing","cold","colded","colding","colds","cole","coleus","coliing","coling","colling","collins","collying","colors","coltan","coltanning","coltans","colter","colters","colting","comalling","combats","comber","combers","come","comer","comers","comfies","comfit","comfits","comics","comints","comity","commas","comments","commes","commie","commied","commies","comming","commit","commix","commixes","commons","commute","commutes","compel","compels","compile","compiles","complies","comply","comport","comporting","comports","conched","conches","conching","concluded","cone","coneys","confer","confers","confining","confits","conged","conger","congers","conges","conjoin","conjoining","conjoins","conked","conker","conkers","constrain","constraining","constrains","contact","contacting","contacts","contadinoing","contadinos","contagion","contagioning","contagions","containeds","containers","contemn","contemning","contemns","continuing","contrail","contrailing","contrails","contriting","contriving","converse","converso","converts","convex","convey","conveys","convoke","convokes","cooked","cookeds","cookers","cookied","cooled","cooler","coolers","cooling","cooned","cooped","cooper","coopers","cooted","cooter","cooters","copalling","cope","copeck","copecks","copier","copiers","copies","copper","coppers","copses","copula","copulas","coralling","corded","core","coreference","coreferences","corer","corers","corked","corker","corkers","corner","corners","corpse","corpses","corvee","corvees","cosecs","cosher","coshers","cosmics","cosmids","cosses","costing","cotanning","cotans","cote","cotter","cotters","couch","couched","couches","couching","coude","couded","coue","coughed","coughing","coupe","coupes","coupleds","couplers","couplets","coupon","coupons","course","courses","couthed","couthing","coved","coven","covens","covereds","coverts","covet","covets","covey","coveys","cower","cowers","cowling","cowpie","cowpies","cozens","cpsing","crab","crabs","cracks","cradling","cragged","crakes","craned","cranes","cranked","cranned","crass","crasses","crawling","crawls","creaked","creaks","credited","creeks","cresting","crests","criers","cringe","cringed","cringes","crocks","crooked","crouch","crouched","crouches","crouching","croupe","croupes","crumple","crumples","cruses","crusing","cses","csing","ctened","ctenes","cubing","cuking","culling","culming","culting","cupalling","cupels","cupsing","cupule","cupules","cure","curing","curling","curses","cursing","curtain","curtaining","curtains","curves","curving","cusking","cusping","cussing","cuting","cutlass","cutses","cutsing","cxling","cxlving","cyanned","cyanoed","cycling","cyders","cymling","cysting","dadded","dahling","dailing","daises","daling","dall","dalliing","dalling","dallis","dalls","dallying","daloing","danced","dander","dandied","dandled","danked","dansed","danses","darded","darling","dart","dashes","dassed","dassies","dative","datives","dayses","ddsing","deafened","deafening","deafing","deaing","dealting","dean","deaned","deaning","deans","dearie","dearies","debate","debates","debating","debiled","debiling","deboned","debrises","debted","decade","decades","decalling","decease","deceases","deceive","deceives","decents","decided","deciding","deciled","deciling","declaim","declaims","declareds","declarers","declaw","declined","declining","decocting","decodes","decoding","decoing","decoke","decokes","decoking","decouple","decouples","decoying","decries","deepens","deface","defaced","defaces","defacing","defame","defamed","defames","defaming","defang","defanged","defanging","defangs","defence","defenced","defences","defencing","defended","defending","defends","defensed","defenses","defensing","deference","deferences","deferenses","defiance","defianced","defiances","defiancing","defiant","defianted","defianting","defiants","defied","defies","defile","defiled","defilers","defiles","defiling","defininged","definings","definited","definites","definiting","deflate","deflates","deftness","defuse","defused","defuses","defusing","deglaze","deglazes","deicing","deified","deifying","deigned","deigning","deisted","deists","deitied","delete","deletes","deleting","delfing","delfting","deliing","delivers","delling","delving","demands","demised","demising","demode","demodes","demoding","demoing","demote","demotes","demoting","dengue","dengues","denguing","denied","denned","denotives","denotiving","densaing","denses","densing","dent","dentate","dentates","dentating","dente","denteds","dentes","dentin","dentined","dentines","denting","dentining","dentins","denude","denudes","denuding","denying","depart","depend","depended","deplane","deplanes","deplore","deplores","deponed","deposing","depotting","deprave","depraves","deprive","depriveds","deprives","depute","deputes","deputing","derating","derbies","deride","derides","deriding","derisive","derisives","deriveds","dermises","derpies","derping","derring","derrises","derving","descends","deserve","deserves","deserving","designed","designing","desired","desiring","desking","desponds","dessing","destined","destines","destining","destiny","detained","detaining","detents","detest","detesting","detests","detinue","detinued","detinues","detinuing","detoxes","detoxing","deuses","deusing","deveined","deveining","deviced","devicing","deviled","devised","devising","devote","devoteds","devotees","devotes","devoting","devouting","dewied","dewiness","dewing","dexoned","dhalling","dholed","dholes","dick","dicks","dieted","digger","diggers","dilling","dining","dinted","dinting","dire","direct","directed","director","directory","directs","dired","dires","dirged","dirges","dirked","disport","disporting","disports","disses","ditaed","ditted","dive","dives","divest","divine","divined","divines","divining","dmuses","docked","doleds","dolling","domine","domined","domines","domining","donate","donates","donating","doobed","doomed","doored","dopeds","dories","dorked","dosing","dosses","doting","double","doubles","douched","douches","douching","doughed","doughing","douses","dousing","dove","doves","dowers","dozers","drab","drabas","drabs","dragger","draggers","drained","draining","drakes","dranged","drecks","drilies","drive","drivels","drivens","drivers","drives","drover","drovers","drunks","druses","drusing","drylies","dses","dsing","dsling","dtsing","ducing","duding","dudses","dudsing","duking","dulies","dull","dulling","dulls","dulses","dulsing","duning","duns","duoing","duping","duples","during","dusking","eagling","earling","earses","easies","easing","easted","easting","eating","eatses","ebitted","ebooked","ebsing","ebving","echted","eclats","ecting","eddaed","eddied","eddoed","edgied","edibled","edicted","editeds","editor","editted","edsing","edtaed","educed","eduled","eelses","eerilies","eerily","eerying","effort","efforting","efforts","efting","egesting","egests","eidoses","eiraed","elan","eland","elanded","elanned","elans","elanus","elated","elegans","elided","elinted","elited","elling","elocute","elocutes","elopses","elsing","eluted","elvers","emending","emiled","emitted","emoted","emoting","emsing","enated","enates","enating","encode","endived","ends","energise","energises","enquire","enquires","ensile","ensure","entendring","ententing","epopses","eposes","equally","equine","equines","eraing","erectly","erging","erning","eroses","erring","ersted","ersting","erudited","erying","escort","escorting","escorts","eses","esing","esports","esportsing","espouse","espouses","esquire","esquires","esting","ests","eternise","eternises","ethoses","evicted","evoked","evokes","exceed","exceeding","exceeds","exchange","exchanged","exchanges","excite","excited","excites","excluded","execrate","execrates","executeds","executive","executives","executors","exegete","exegetes","exercisers","exerciseses","exerting","exerts","exhort","exhorting","exhorts","exiled","existed","exitted","exodes","exorcise","exorcisers","exorcises","exorcism","exorcisms","exorcist","exorcists","exorcize","exorcizes","expand","expanding","expands","expanse","expanses","expats","expatting","expect","expecting","expects","expend","expending","expendings","expends","expense","expenses","expensing","expert","experting","expertise","expertises","experts","expiating","expiring","expiry","expirying","explicit","explicits","explode","explodes","exploit","exploiting","exploits","exploring","expoing","exporters","exportinged","exportings","expos","exposeds","exposing","exposure","exposures","express","exsert","exserting","exserts","extant","extanting","extants","extendeds","extent","extented","extenting","extents","extern","externa","externaing","externas","externed","externing","externus","extort","extorting","extorts","extruding","fabling","fadded","failing","failling","faire","faires","fairies","faited","fake","fakers","fakes","fall","falling","fallings","falls","fallsing","falses","falsing","fanned","farces","fare","fares","fart","fasces","fassed","fasting","fawkes","fcsing","feasting","feasts","feating","fecalling","feeting","feined","feining","feisting","feists","felids","feline","felined","felining","felises","fellies","felling","felting","fend","fended","fends","feres","ferined","fering","ferining","ferning","ferring","fesses","fessing","feting","fetting","fevers","fibers","fibre","fibres","fice","fices","fide","fides","fiends","fierce","fierces","fieries","fieris","fife","fifes","figure","figures","file","filers","files","filets","filles","filling","filses","find","finded","fine","finers","fines","fining","fiords","fireds","firm","firmas","firmers","firms","firmus","firsts","firths","fishes","fisting","fitses","fixe","fixeds","fixers","fixes","fizzes","flakes","flange","flanges","flanked","flanned","flasks","flecks","flicks","fliers","flirts","focalling","fold","folds","folies","folked","fonded","fooded","fooled","footed","forces","fore","fores","forest","forges","forked","form","fortes","fosses","fountain","fountaining","fountains","foyers","fpsing","freaked","frieds","friers","fries","frigged","frog","froms","frores","fros","frsing","fsbing","fshing","full","fulling","fulls","fuming","funded","funs","furies","furzes","fuseds","fusees","fusels","fuses","fusing","fussing","fuzing","fwsing","gabling","gabs","gadded","gaeling","gaited","galaing","galing","gall","galliing","gallina","galling","gallings","gallis","galls","gallus","gand","ganded","gander","gandied","ganked","gaoling","garb","garbs","garded","garment","garnet","gaseses","gashes","gassed","gassies","gatling","gauched","gauches","gauching","gauded","gauling","gausses","gcsing","gean","geans","gelids","gellies","gelling","gelting","genies","genome","genomes","genoming","gent","germing","gerres","gestaing","gestes","gesting","getting","gilling","girded","girled","giroed","gisting","give","givens","gives","gladded","gladed","glanced","gland","glanded","glands","glandsed","glansed","glares","glass","glasses","glassy","gleams","glean","gleans","glides","glises","gofers","gold","golds","gonded","goners","gooded","goofed","gooked","gooned","gooped","goosed","gorals","gouached","gouaches","gouaching","governs","gpsing","graces","grad","grades","grads","graf","grafs","grafts","grails","grains","gram","gramas","gramps","grams","gran","granded","grands","grange","granged","granges","grans","grants","grapes","graphs","grases","grasps","grass","grasses","grassy","gratas","grates","gratis","graves","gravis","gray","grays","grazes","greats","grebes","greylies","greyly","groaks","groans","groats","grouch","grouched","grouches","grouching","groves","grub","grubs","grunts","gruses","gsaing","gsring","guesting","guests","guiing","guild","guilds","guiled","guiles","guilt","guilty","guises","guising","gull","gulling","gulls","guns","guses","gushes","gushing","gussing","gutses","gutsing","guying","gyrans","habits","hacked","hadded","hagged","haicks","haiked","hailing","haired","haje","hakeas","hakes","halals","hale","halfing","haling","hall","halling","halls","halming","haloing","halting","halve","halved","halves","halving","hame","hand","handed","handeds","handel","hander","handied","handled","handsed","hanged","hangers","harded","harems","hares","harked","harold","harolds","hart","harvey","hashes","hassles","hastes","hasting","hate","hats","hauling","haved","haven","havens","haves","hawked","hawses","haze","heating","heave","heaved","heaven","heaver","heaving","hectare","hectares","hefting","heired","heisting","held","helds","helixes","helling","helving","herbes","herbing","herding","here","hering","herming","heroing","herpes","herring","hets","hetting","hexine","hexined","hexines","hexining","hexose","hexoses","hhsing","hiatus","hick","hicked","hicks","hies","hilling","hilts","hind","hinded","hinged","hinges","hins","hints","hips","hire","hired","hirers","hires","hirtas","hiss","hisses","hives","hivs","hoards","hoared","hoaxed","hobbed","hoboed","hocced","hocked","hockey","hodded","hods","hoed","hogged","hoists","hokaed","holcus","holders","holdups","hole","holed","holes","holeys","holism","hollas","hollos","holm","holms","holy","homers","homied","homoed","honied","honked","honker","honkey","honkied","honored","hooches","hooching","hood","hooded","hoodeds","hoods","hooeyed","hoofed","hoofeds","hoofer","hookah","hookeds","hooker","hookeri","hookers","hookied","hookies","hooksed","hookses","hookup","hooped","hoopoed","hoopsed","hooted","hooter","hooved","hooveds","hoovers","hopers","hopied","hopped","hopple","hopples","hopsed","horded","hordes","horned","horsed","hosing","hosted","hosting","hotbed","hots","hotsed","hotted","hounds","houred","housed","houses","housing","hover","hovers","hoyaed","hrts","hses","hsing","hucked","huging","hulked","hull","hulling","hullos","hulls","hunged","hunked","huns","huoned","hushes","hushing","husked","husking","husoing","huts","hyoids","ictalling","idioted","idlies","iising","ileals","illing","images","impact","impacting","impacts","impart","imparting","impartings","imparts","impasses","impends","implore","implores","imploring","impoliting","important","importeds","importeeing","importees","importers","importinged","importings","importune","importuning","imposing","impost","imposting","imposts","improving","impure","impures","impuring","imputing","inbuilt","incise","incite","inclined","inclosed","include","includeds","includes","income","incomes","indied","indirect","indirected","indirects","indite","indited","indole","indoles","inerting","inerts","inference","inferences","infidel","influxed","info","inhabit","inhabits","inhere","inhered","inherent","inherenting","inherents","inheriteds","inheritinged","inheritings","inheritors","inheritting","inhibit","inhibits","initio","inkied","inland","inlanded","inline","inosine","inquire","inquires","insane","insert","inserting","inserts","insided","insider","insiders","insides","insist","insoles","inspire","insted","insting","intake","intakes","intending","interim","interims","intermit","intermits","inti","intied","intoed","intones","intos","intro","intron","intros","intruded","invades","invert","inverting","inverts","invites","invoice","invoices","involve","involves","iodide","ipsing","ired","ires","ironside","irsing","iruses","ises","isiing","ising","island","islanded","isling","isming","isning","isring","itsing","iuding","jailing","jakes","janned","jawses","jean","jeans","jellies","jelling","jerking","jest","jesting","jestings","jests","jetting","jigger","jiggers","jirded","jive","jives","jocked","jokers","jooked","josing","josses","joules","jove","joves","juking","julies","juning","jure","juring","juses","jussing","justes","juting","kailing","kakkes","kalaing","kaliing","kaling","kalkas","karens","karling","kelpies","kelting","kenoing","kepting","keraing","kerbing","kerite","kerited","kerites","kerning","kerring","keynote","keynotes","keynoting","khanned","kianged","kickers","kied","killing","kilned","kina","kinaed","kinda","kindas","kindle","kindly","kinds","kine","kined","king","kinged","kinked","kinks","kinned","kino","kinoed","kins","kiosks","kirk","kirked","kirks","kisses","kith","kleins","klick","klicks","knacks","knocks","knucks","koined","kooked","kookied","kuiing","kvasses","kweeked","kylies","labbed","lacced","lacied","lacked","ladded","ladder","laddied","laded","ladied","ladled","ladling","laed","lagans","lagend","lagended","lagged","lahhed","lahued","laiced","laid","laided","lairded","lake","lakes","lakhed","lallying","lamaed","lambed","lament","lammed","lamnaed","lamped","lanaied","lanated","lanced","lancer","lances","lancet","landaued","landeds","lander","landers","landler","lands","lane","lang","langed","langued","lank","lankaed","lanked","lankied","lanned","lansaed","lanseh","lanset","lapped","lapsed","lapses","lard","larded","larder","larged","laried","larked","larred","lashed","lashes","lassas","lasses","lassies","lassos","lasted","lasting","latent","latest","latesting","latests","lathed","latked","latkes","latsed","latses","latted","lauans","laud","lauded","lauder","laudes","launced","launder","lavaed","laves","lavved","lawsed","lawses","laxaed","lazied","lead","leaded","leaden","leadens","leads","leaf","leafs","leak","leaked","leaks","leal","leals","leaners","leap","leaps","learn","learns","leases","leasting","leaven","leavens","leaving","ledded","lefting","legals","legends","lemnas","lemons","lended","lender","lends","lenifies","lenify","lens","lensed","lent","lented","lentes","lentoing","leon","leones","leons","lerring","lesses","lessing","letting","levants","levees","levels","levited","levving","lewded","lianaed","lianas","liared","libels","libred","lice","lices","lick","licks","lidded","lieded","lieges","lies","life","lifers","lifes","ligand","liganded","ligans","ligers","lignes","like","likeds","likens","likes","limans","lime","limens","limes","limeys","linden","lindied","line","lineds","linens","liners","lines","linged","linied","linked","linoed","linted","liraed","lirred","lises","lisles","listes","listing","lite","liters","lites","lithes","litred","livedos","livens","livers","livias","livids","llanoed","llanos","loached","loaches","loaching","loaded","loan","loans","localling","loched","loches","loching","locked","lode","lohans","loired","lolling","loners","longed","looked","looker","looksed","loomed","looned","looped","loosed","looted","lorded","losers","losing","losses","losting","louched","louches","louching","louded","loughed","loughing","loupes","louses","lousing","louver","louvers","lover","lovers","lowans","lowers","lsding","lubing","lueses","luesing","luging","lull","lulling","lulls","lunaed","lundaed","lunged","lunned","luoing","lure","luring","lushes","lushing","luting","luxing","lynxed","mace","macers","maces","maches","mackems","mackle","mackles","madake","madakes","madded","made","mades","maes","magens","mahoes","maided","mailing","maines","maired","maizes","makers","makeups","mako","makos","male","maleos","males","maliing","maliks","maling","mall","malling","malls","malsing","malting","mameys","mandaed","manded","mane","maneds","manes","manied","manies","mankies","manned","mansed","manxed","manxes","maples","mapling","mare","mares","marges","maries","markeds","markers","markets","marling","mart","martes","masers","mases","maskeds","maskers","mass","massed","masseds","masses","masting","mate","mateds","maters","mates","mateys","mattes","mauling","maunded","maxes","maybes","maze","mazeds","mazers","mazes","mazies","mealies","mean","means","meating","mediaed","mediated","medicied","meeting","meined","meining","melees","melias","melics","melting","mend","mended","mends","menoing","mere","merelies","merely","merges","merging","mering","merited","merles","merling","merring","merses","mersing","mesaing","meshing","mesning","messes","messing","meting","metrifies","metrify","mevving","mick","micks","mike","mikes","milling","mind","minded","minified","minifies","minkes","mire","mired","mires","miried","miries","miroed","mising","misses","misting","mitred","mitres","mlsing","mocked","models","modems","modes","modest","modifieded","modifiered","modifiers","modished","modishes","modisted","modistes","modses","mogens","mohaves","mohses","moired","mojave","mojaves","mold","molds","mole","moles","molest","molles","mollified","mollifies","molling","molvas","mommies","monded","mondes","monels","moneys","monked","monses","montan","montanning","montans","montes","mooched","mooches","mooching","mooded","mooned","moored","moosed","mooses","mooted","mope","mopeds","mopes","more","morels","mores","morses","mortified","mortifies","moses","moseys","moshes","mosting","mote","motels","motes","motets","motiffed","motive","motives","moue","moues","moulds","mountain","mountaining","mountains","mousing","mouthed","mouthing","moveds","movie","movies","moxies","mpsing","mrsing","msbing","mscing","mses","msging","mshing","msing","muanged","muched","muches","muching","muling","mull","mullas","mulling","mulls","mullus","muming","musaing","musding","musers","muses","mushes","mushing","musing","musings","musking","mussing","muting","mutually","myalling","myalls","myopes","nadded","nailing","naives","nakeds","nalline","nanaed","nanced","nand","nanded","nandued","nanned","narded","nashes","nasuses","nauched","nauches","nauching","nave","neating","nemine","nemined","nemines","nemining","nerding","nerve","nerves","nerving","nervus","nervying","nesses","nessing","nest","nesting","nestings","nestling","nests","netting","nevers","neving","newlies","newting","nexted","nexting","nick","nicks","nigger","niggers","nilling","nisied","nisting","nitred","nitres","niveas","nivose","nivoses","nocked","node","noired","noires","nolling","nonuple","nonuples","nooked","nookied","nooksed","nooned","noosed","nosing","notched","notches","notching","notified","notifies","noting","nouses","nousing","nsaing","nscing","nsfing","nsuing","nswing","nuding","nuited","nuking","null","nulling","nulls","nuns","nurses","nursing","nutses","nutsing","nuxing","oakens","oasing","oasises","oasting","oatses","observe","observes","observing","obtain","obtaining","obtains","occluded","oceans","ochers","octalling","octuple","octuples","odisted","ogives","oilies","oising","olds","olefine","olefined","olefines","olefining","oleins","olive","olives","onlies","onto","onuses","opalling","opiated","oppose","opposes","opulus","opuses","oralling","orange","oranged","oranges","oses","osing","otuses","ouring","ousels","outclass","outclasses","outclassing","outdated","outing","outrigger","outriggers","ovalling","over","overs","overts","pacoses","pacs","pact","padded","padres","pads","paduses","paeans","pageant","pageses","paided","pailing","painses","paired","paks","palases","paliing","paling","palling","pallying","palming","palmses","paloing","pals","palsies","pandaed","pander","pangses","panned","pans","pansies","pant","panted","pantses","paps","para","parang","pare","parental","parented","parents","parers","pareve","pari","paries","paring","parises","parity","park","parr","parsec","parsecs","parsed","parsee","parsees","parser","parsers","parses","parted","parti","partis","partly","parts","partses","party","paruses","parvenu","parving","pasches","paso","pasoed","pasos","pasques","passages","passed","passeds","passee","passeed","passees","passel","passels","passer","passers","passims","passives","passkey","passkeys","passu","passued","passus","pasted","pasteds","pastel","pastels","paster","pasters","pastes","pasties","pasting","pastises","pasts","patases","patens","patent","patents","patient","pats","patsies","pauling","paulis","paused","pauses","pausing","pave","pavises","pawling","paws","payees","payment","pays","pbsing","peaked","pean","peans","peated","peating","pecans","pecses","peeves","peeving","pekans","pelling","pelting","pent","percent","perces","percing","pere","periing","pering","perking","perming","perring","pert","peruing","perve","perves","perving","pesoing","pessed","pessing","pest","pesting","pestis","pestling","pestoing","pestos","pests","petited","petrifies","petrify","petting","peyote","peyotes","peyoting","phaged","pharos","pholis","phsing","pick","picks","piered","pigses","pill","pilling","pills","pinses","pinto","pintos","pisces","piss","pissed","pisseds","pisser","pissers","pisses","pistes","pisting","pith","pitses","plaided","planaed","planked","planned","planted","plashes","plated","pleads","pleats","plover","plovers","pmsing","poached","poaches","poaching","pocked","poises","pokers","polers","polies","poll","polling","pollos","polls","pommies","ponded","ponses","pooched","pooches","pooching","pooded","poofed","pooled","pooned","pooped","poored","pooved","pooves","porched","porches","porching","porked","port","portent","posers","poshes","posies","posing","posits","possed","posses","possess","posset","possets","postes","posting","potent","pouch","pouched","pouches","pouching","powers","praises","pranged","prat","prated","preference","preferences","prelims","premies","preses","presses","prexies","pricks","prigged","prises","prom","proses","proves","prunes","prunos","prunus","psaing","psas","pses","psiing","psing","pucing","puking","pula","pulas","pule","pules","puling","pullers","pullets","pulleys","pulling","pulp","pulps","pulsing","puns","pupals","pupated","pupils","pure","purelies","purely","purifies","purify","puring","purl","purls","pursing","puses","pushing","puss","pussed","pusses","pussies","pussing","pyrene","qianged","quaing","quakes","quares","quells","questing","quests","quicks","quiing","quilt","quired","quited","quoing","quolls","rabies","racies","radded","raided","railing","raises","rake","rakes","raling","rallies","rallying","ramies","ranaed","rand","randed","randied","raneed","ranges","ranied","ranked","ranted","rarelies","rarely","rarifies","rarify","rashes","rasing","rassed","rave","ravers","readies","realines","realise","realises","realizes","reallies","really","realties","realty","reaving","rebuild","rebuilds","reburies","recall","recalling","recalls","recces","reccies","recipes","recited","recites","reclines","recode","recommits","recover","recovers","redefine","redefined","redefines","redefining","redlines","reedies","reefies","reeving","referee","referees","referenceds","referent","refine","refined","refiners","refines","refining","refinings","refits","regias","regimes","regius","reined","reining","reited","reiting","rejigs","relaces","relates","relaxes","relay","relics","relict","relicts","relied","relief","reliefs","relieve","relieves","relievo","relievos","relines","relining","relish","relishes","relived","relives","remake","remakes","remise","remises","remiss","remits","remote","remotes","remoting","remove","removes","rend","rended","rends","renins","renises","rent","repands","repens","repents","repine","repined","repining","replay","replied","replies","reply","repose","reposes","requiems","requireds","requite","requites","requote","requotes","reruns","reserve","reserves","reserving","resets","reshes","reshing","reside","resides","resids","resiles","resins","resizes","respire","respires","ressing","rest","resting","restings","rests","retied","reties","reting","retire","retouch","retouched","retouches","retouching","retries","retting","reusing","reverence","reverences","revers","review","reviews","reviles","revise","revises","revive","revoke","revokes","revues","revving","rewire","rewired","rhuses","rick","ricks","rigged","riggeds","rigger","riggers","rilling","rimies","rind","rinded","ringer","ringers","ringside","rising","risses","rive","rives","rivets","roached","roaches","roaching","rocked","rogers","roilies","rolling","rons","rooded","roofed","rooked","rookied","roomed","rooted","ropers","ropies","rosies","rosing","rouble","roubles","roughed","roughing","rounds","rouses","rousing","rove","rover","rovers","roves","rowers","rubens","rubies","rubing","rubins","rubs","rudelies","rudely","ruding","rues","rugger","ruggers","rugs","ruins","rulied","rulies","ruling","ruly","rumens","rums","rune","runes","rung","rungs","runics","runing","runt","runts","runups","ruses","rushes","rushing","rusing","rusking","russing","ruts","saales","saaling","saames","sabling","sabres","sadded","saided","sailing","saints","saises","sake","sakes","salals","saling","salk","salking","salks","salling","sallying","salols","salping","salting","salves","sand","sanded","sander","sandied","sandsed","sanned","sansed","sanses","sapling","sarded","sarding","sariing","sarsing","sashes","sass","sassed","sasses","sassies","sats","saurel","save","savers","saving","scalding","scalds","scaling","scalping","scalps","scalying","scapes","scarce","scarces","scare","scareds","scarers","scares","scarfs","scaries","scarps","scends","schick","schicks","scired","scoked","scolds","scorer","scorers","scores","scoter","scoters","screes","scries","scruple","scruples","scrying","sculling","seaing","sealing","seaming","seaport","seaporting","seaports","seareds","searing","seasing","seaxing","sebaes","sebaing","sebbing","sebing","sebses","sebsing","seccing","secluded","secure","sedans","sedding","sedges","sedging","seeding","seeing","seeking","seeling","seeming","seening","seeping","seering","segoing","segues","seguing","seifing","seiing","seined","seizes","seizing","selfing","selvaing","selvas","semiing","semited","senate","senates","senating","send","sended","sending","sends","sening","senning","senses","sensing","sent","sepping","sequine","sequines","serape","serapes","seraping","seraxes","seraxing","serbing","serene","serenes","serening","serers","seres","serfing","serge","sergers","serges","serging","series","serined","sering","serous","serowing","serows","serpens","serums","servals","servant","servers","services","servicing","serviles","serviling","servinged","servings","servo","servoing","servos","setaing","sets","seuling","sevens","sewing","sewning","sexing","sexpot","sexpots","sexpotting","sexted","sexying","shabus","shade","shadeds","shades","shadies","shafts","shagged","shake","shakens","shakers","shakes","shakies","shakos","shale","shales","shame","shameds","shames","shamus","shanged","shanked","shanks","shanned","shape","shapeds","shapers","shapes","shard","shards","shareds","sharers","shareses","sharias","shark","sharks","sharons","sharp","sharpens","sharpers","sharpie","sharpies","sharps","shart","sharts","shaveds","shavens","shavers","shaves","shaving","shawls","shawms","sheareds","shearers","shearses","sheers","sheiks","shelve","shelves","shelving","sherding","sherds","shines","shinto","shire","shires","shirks","shirrs","shited","shnooked","shocked","shocks","shoeds","shooed","shooked","shooted","shore","shoreas","shores","shorns","shorts","shotes","shover","shovers","shoving","shreds","shrews","shriving","shrove","shroves","shroving","shucks","sibs","sick","sicks","sics","sids","sieving","sifts","sights","silling","silts","sind","sinded","sing","sins","sips","sirced","sircing","sired","sirens","sires","siring","sirred","sirring","sirs","sising","siss","sisses","sitars","site","sites","sitkas","sittas","situ","situs","sitz","sitzes","sixths","skates","skinks","skints","skirts","skits","skiving","skulls","slander","slanted","slates","slaving","sleeve","sleeves","sleeving","slices","slicks","slides","slimes","slits","slivers","slouch","slouched","slouches","slouching","slsing","smalling","smalls","smarms","smarts","smited","smites","smiths","smoked","snare","snarers","snares","snarfs","snarls","sneaked","snicks","snigger","sniggers","snits","snooked","snores","soaked","soaving","sobers","socked","solare","solares","sold","solds","solids","solling","solver","solvers","solving","sooned","sooted","sorbing","sore","sorelies","sorely","soring","sorting","sots","souchong","soughed","soughing","souked","soupies","source","soured","souses","sousing","southed","southing","sowers","spaces","spades","spalling","spanged","spare","sparers","spares","sparge","sparges","sparks","spasms","spated","spates","spazes","speaked","specks","spells","sperming","sphere","spheres","spicks","spills","spinto","spired","spirts","spited","spites","spits","splits","spoked","spooked","spores","sprees","spries","sprigger","spriggers","spring","sprits","sprues","spruing","sprying","spurge","squally","squares","squires","sriing","ssaing","sses","ssing","ssping","ssriing","sssing","sswing","stacks","stages","stalk","stalks","stalling","standed","stands","stanks","stapes","stare","starers","stares","starets","starses","starts","starving","states","staving","steads","steaked","steeds","stenting","sterling","sterning","stetting","sticks","stilts","stints","stoked","stores","stover","stovers","stoving","streaked","string","stringer","stringers","striving","suaving","subclassed","suched","suches","suching","sucre","sucred","sudated","sudses","sudsing","suer","suered","suering","sues","suiing","suing","suited","suites","suits","sullas","summits","sundated","sunglass","sunglasses","sunglassing","suns","superclassed","supergrass","supergrasses","sura","suraed","suraing","surd","surded","surding","sured","surelies","sures","surety","surf","surfed","surfer","surfing","surge","surged","surging","surrey","surveys","suses","sussing","suture","suvving","svring","swages","swales","swards","swarms","swarts","sweared","sweated","swerve","swerves","swerving","swervings","swifts","swined","swiped","swirled","switch","taaling","tables","tabling","tabses","tached","taches","taching","tack","tacks","tacting","tadded","taeling","tagger","taggers","tailing","tajiks","take","takens","takers","takes","tala","talaing","talas","talc","talcing","talcs","tale","talent","tales","taling","talkers","talkies","talking","talksed","talkses","talling","tallying","talons","talus","tandem","tank","tankas","tanked","tanks","tanned","taoses","tapses","tart","tarting","task","tasking","tasks","tassed","tassel","tassels","tasses","tasset","tassets","tassing","tasting","tastings","tastying","tatting","tauting","tawses","tdting","teached","teaches","teaching","teaing","teaked","teaking","tealed","tealing","teamed","teaming","teared","tearing","teased","teases","teasing","teasling","teat","teated","teating","teats","tebets","teccing","teched","teches","tectaing","tectas","tedding","teds","teed","teeing","teeming","teened","teening","teething","teeths","teffing","tegging","teiids","tejuing","tellies","temming","temping","tempting","tempts","tenched","tenches","tenching","tendeds","tenders","tendons","tenens","tenged","tenges","tenging","tenias","tenned","tenning","tennis","tennos","tenons","tenors","tensed","tenseds","tensing","tented","tenthing","tenting","tentings","tenuis","tepids","terces","tereting","terned","terrifies","terrify","teslaing","teslas","testaing","testas","testating","testeds","testeeing","testees","testers","testes","testied","testify","testily","testinged","testings","testis","testying","tether","tething","tetting","tevets","texans","text","texted","textes","texting","textings","texts","thaned","thanked","thanks","thanned","thecas","thefting","thefts","theist","theisting","theists","theres","thesis","thinged","tholed","tholes","thonged","thorough","thoroughs","thought","thrive","thrives","throng","throngs","throughed","throughs","thrush","thuses","ticalling","tick","ticks","tiered","tigers","tilling","tilting","tineds","tinting","tire","tired","tires","tiroed","titred","titres","titting","tnting","toasting","toasts","toeaed","toeses","toesing","togethers","told","tolds","tolling","tommies","tomtits","toneds","toners","tontining","tooled","tooned","tooted","toothed","toothing","tooting","topers","toposes","topple","topples","torch","torched","torches","torching","torting","toshed","toshes","tosked","tosking","tosses","tossing","toters","toting","totting","toucan","toucans","touchers","touchied","touchies","touchinged","touchingly","touchings","touchline","touchy","touchying","tough","toughed","toughens","toughied","toughies","toughing","toughying","touped","toupee","toupeed","touping","toured","touring","tousle","tousled","tousling","touted","towers","tracks","transitive","transitived","transitives","transitivity","treaded","treads","treated","treating","treats","treeds","trekked","trend","trends","trenting","tressing","trestling","triage","triaged","tricker","trickers","tricks","triers","trifler","triflers","trigged","trimer","trimers","trimmer","trimmers","tripper","trippers","trited","triting","troched","troches","troching","trough","troughed","troughing","troughs","troves","truced","truces","trucing","trucked","trucking","trudger","trudgers","trulies","trunks","trusting","trusts","truthed","truthing","trysting","trysts","tsetse","tsetsing","tubing","tucked","tucking","tufting","tugger","tuggers","tuling","tulles","tulling","tumses","tumsing","tuning","tuns","turing","tushed","tutting","tuxing","twanged","tweaks","tweeded","tweeds","tweeped","tweeted","tweeting","tweets","tweezed","twelved","twenty","twerked","twerped","twiced","twigged","twined","twirled","twirped","twisting","twists","twitch","ufoing","uglies","uhfing","uing","ukases","ukasing","ukes","uking","ulls","ulting","umaing","umping","unchanged","unclouded","uncouple","uncouples","uncover","uncovers","undated","undateds","undefined","unding","unedited","unhooked","uniated","uning","united","unkind","unlive","unlives","unmake","unmakes","unmated","unmodified","unqing","unsated","unsees","unsung","unsure","untouched","unusually","unwired","unyoke","unyokes","upbeated","upcasted","update","updates","updrafted","uphold","upholds","uping","upland","uplanded","upsets","upside","uptaked","upvoted","urated","urging","urling","urning","urns","ursine","uruses","usages","usaging","usaing","usas","usbegs","usbeks","uscbing","usdaed","usdaing","used","useds","user","userring","users","ushers","usinged","usings","usmcing","usneas","usning","usns","usps","uspses","uspsing","usss","usssing","usualed","usuals","usurer","utaing","utcing","utes","uting","utning","uubing","uuhing","uuping","uuqing","uuting","uving","uziing","valiing","valing","valling","valses","valsing","valuing","valving","vandaed","vanned","varment","vasing","vassed","vasting","vedisted","vegans","veined","veines","veining","vend","vended","vends","venose","venoses","venosing","vent","veraing","verbified","verbifies","verbify","verbing","verdes","verding","verges","verging","veridis","veridises","veried","verified","verifieds","verifier","verifiers","verited","veritied","verities","verity","verses","versified","versifier","versifiers","versifies","versify","versing","versting","versts","vertes","verve","verves","vervets","verving","verying","vest","vesting","vests","vetting","vianded","vilifies","vilify","vinifies","vinify","virens","vireos","vising","visits","visually","vitrifies","vitrify","vive","vives","vivifies","vivify","vivred","vocalling","vomers","vomits","voters","vouch","vouched","voucheed","vouchees","vouchers","vouches","vouching","vowers","wadded","wadses","waifed","wailed","wailing","wained","waived","waives","wake","wakens","wakers","wakes","waling","walk","walking","walks","wall","walling","wallings","walls","wallying","wand","wanded","wander","wanked","wanned","want","wanted","ware","wared","waried","warmed","warned","warped","warred","warsed","warses","wart","warted","washes","wassed","wastes","wasting","watses","wauling","wave","wavers","wawling","wayses","wbsing","weaked","weaken","wealed","wean","weaned","weans","wearer","weaved","weaves","weaving","weeked","weft","wefting","weirded","weired","wekaed","welling","welt","welting","wended","wends","wens","weres","wering","westing","wests","wetting","whacks","whales","whanged","wharfs","whelks","whiled","whined","whirled","whirred","whists","whites","whits","wholed","wholes","whooped","whored","whores","wick","wicked","wicks","wided","width","widths","wifed","wified","wigged","wilded","wiled","wilied","wilies","willed","willing","wilted","wimped","winced","wind","wined","winged","winied","winked","winned","winoed","wiped","wipeds","wireds","wirer","wiried","wised","wisent","wish","wished","wising","wisped","witch","withal","withe","wither","withes","within","withs","withy","witsed","witted","wive","wived","wives","wizzed","wlanned","wokked","wold","wolds","wonked","wont","wooded","wooers","woofed","wooled","worded","worlds","wormed","worned","worsed","worted","woulds","wove","woves","wraith","wrasses","wreaked","wrecks","wresting","wrests","wricks","wried","wriggler","wrigglers","wringer","wringers","writhe","wswing","wussing","wyrded","xerotes","xmases","yanaed","yanked","yarded","yawling","yawses","yearns","yeasting","yeasts","yelling","yerring","yessing","yetting","yolked","yorked","youthed","youthing","yuling","yuses","yussing","zaired","zaires","zanied","zend","zended","zends","zeroing","zest","zesting","zests","zestying","zeuses","zeusing","zhuanged","zilling","zonked","zoomed","zooted"]}});function On(e,t,n){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;let s=null,o=Array.from({length:t.length+1},(r,i)=>i);for(let r=1;r<=e.length;r+=1){let i=[r],a=r;for(let l=1;l<=t.length;l+=1){let c=e[r-1]===t[l-1]?0:1,u=Math.min(o[l]+1,i[l-1]+1,o[l-1]+c);r>1&&l>1&&e[r-1]===t[l-2]&&e[r-2]===t[l-1]&&(u=Math.min(u,s[l-2]+c)),i[l]=u,u<a&&(a=u)}if(a>n)return n+1;s=o,o=i}return o[t.length]}function Na(e){return/^[a-z]+$/.test(e)&&!ot.has(e)&&!La.has(e)}function ep(e){return Wy(e)?null:Ma(e,By,Jn(e))}function Ma(e,t,n=Jn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=On(e,i,Math.min(s,n));a<s?(s=a,o=i,r=!1):a===s&&a<=n&&i!==o&&(r=!0)}return s<=n&&!r?o:null}var Dy,Jn,La,zy,By,Uy,Wy,Ko=M(()=>{Rn();Qd();Xn();Dy=["used"];Jn=e=>e.length<=5?1:2,La=new Set([...Object.keys(de),...Object.keys(Ue),...Object.keys(Gt),...Dy].flatMap(e=>e.split(" "))),zy=4,By=[...new Set([...Object.keys(de),...Object.keys(Gt)].flatMap(e=>e.split(" ")).filter(e=>e.length>=zy))],Uy=new Set(Zd.words),Wy=e=>Uy.has(e)});function oo(e){for(let t of Hy){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Yr,Gy,qy,Vy,Pa,Hy,tp,Xr=M(()=>{Rn();Xn();Yr=Object.keys(de).sort((e,t)=>t.length-e.length).map(Ye).join("|"),Gy=Object.keys(Ue).sort((e,t)=>t.length-e.length).map(Ye).join("|"),qy=Object.keys(Gt).sort((e,t)=>t.length-e.length).map(Ye).join("|"),Vy=ws.slice().sort((e,t)=>t.length-e.length).map(Ye).join("|"),Pa=(e,t)=>e==="defines"&&Fo.has(t),Hy=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Yr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(Pa(n,t))return null;let s=e[1].trim(),o=e[3].trim();return Po.includes(t)&&([s,o]=[o,s]),{shape:"ask",entityType:null,modifier:"direct",kind:n,subject:s,object:o}}},{name:"reverse",re:new RegExp(`^which\\s+(${Gy})\\s+(?:(${qy})\\s+)?(${Yr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return Pa(n,t)?null:{shape:"reverse",entityType:Ue[e[1].toLowerCase()],modifier:e[2]?Gt[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Yr})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return Pa(n,t)?null:{shape:"forward",entityType:null,modifier:"direct",kind:n,object:e[1].trim()}}},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${Vy})\\??$`,"i"),build:e=>({shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:e[1].trim()})},{name:"meta-whatis",re:new RegExp("^what\\s+(?:is|are)\\s+(?:(an?|the)\\s+)?(.+?)\\??$","i"),build:e=>{let t=e[1]?e[1].toLowerCase():null,n=Yt(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Ue[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&yu.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:gs(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${rn.map(Ye).join("|")})\\??$`,"i"),build:e=>({shape:"mentions",entityType:null,modifier:"direct",kind:"mentions",object:e[1].trim()})},{name:"where",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)(?:\\s+(?:${Kt.map(Ye).join("|")}))?\\??$`,"i"),build:e=>({shape:"where",entityType:null,modifier:"direct",kind:"where",object:e[1].trim()})},{name:"when",re:new RegExp(`^when\\s+(?:did|does|do|was|were|is)\\s+(.+?)\\s+(?:last\\s+)?(${Yr})\\??$`,"i"),build:e=>de[e[2].toLowerCase()]==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()}:null},{name:"commit-history",re:/^(?:the\s+)?commit\s+history\s+(?:of|for)\s+(.+?)\??$/i,build:e=>({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()})},{name:"cochange-partners",re:/^co-?change\s+partners\s+(?:of|for|with)\s+(.+?)\??$/i,build:e=>({shape:"reverse",entityType:"Module",modifier:"direct",kind:"cochange",object:e[1].trim()})}];tp={id:"grammar",class:"graph-query",run(e){let t=oo(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function $t(e,t,n=null){let s=Object.keys(t).sort((o,r)=>r.split(" ").length-o.split(" ").length);for(let o of s){let r=o.split(" ");for(let i=0;i<=e.length-r.length;i+=1)if(!(n&&r.some((a,l)=>n.has(i+l)))&&r.every((a,l)=>e[i+l]===a))return{kind:t[o],start:i,end:i+r.length}}return null}function Xo(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(k=>k.toLowerCase());if(s.includes("where")&&!$t(s,de)){let k=s.some(S=>rn.includes(S)),_=new Set([...Kt,...rn]),R=n.filter((S,A)=>!ot.has(s[A])&&!_.has(s[A])).join(" ").trim();if(R){let S=k?"mentions":"where";return{shape:S,entityType:null,modifier:"direct",kind:S,object:R}}}if(new Set(["has","have","had"]).has(s[0])){let k=s.length;for(;k>1&&(s[k-1]==="ever"||s[k-1]==="been");)k-=1;if((k>1?de[s[k-1]]:null)==="touches"){let R=n.slice(1,k-1).filter((S,A)=>!ot.has(s[1+A])).join(" ").trim();if(R)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:R}}}let r=s,i=$t(s,de);if(!i&&t){let k=s.map(_=>{if(!Na(_))return _;let R=t.lemma(_);return La.has(R)?R:_});i=$t(k,de),i&&(r=k)}let a=null;if(!i){let k=s.map(_=>_.length>=4&&Na(_)&&ep(_)||_);if(i=$t(k,de),i){r=k;let _=s.slice(i.start,i.end).findIndex((S,A)=>S!==k[i.start+A]),R=i.start+Math.max(_,0);a={from:s[R],to:k[R]}}}let l=!1;if(!i)for(let k=0;k<s.length;k+=1){let _=Vn[s[k]];if(!(_&&s[k]==="used"&&s[k+1]==="for")&&_&&s.slice(0,k).some(R=>Yo.has(R))){i={kind:_,start:k,end:k+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&Vn[s[i.start]]&&s.slice(0,i.start).some(k=>Yo.has(k))&&(l=!0);let c=k=>a?{...k,fuzzyVerb:a}:k;if(t&&i.end-i.start===1){let k=i.start,_=s[k-1];if((_==="the"||_==="these"||_==="those")&&s[k+1]==="of"&&t.posTags(n)[k]==="NOUN"){let S=n.slice(k+2).filter((A,L)=>!ot.has(s[k+2+L])).join(" ").trim();if(S)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:S})}}let u=new Set,d=k=>{if(k)for(let _=k.start;_<k.end;_+=1)u.add(_)};d(i);for(let[k,_]of Object.entries(de)){if(_!==i.kind)continue;let R=k.split(" "),S=i.end;if(R.every((A,L)=>r[S+L]===A)){d({start:S,end:S+R.length});break}}let f=$t(r,Ue,u);d(f);let p=$t(r,Gt,u);d(p);let m=(k,_)=>n.slice(k,_).filter((R,S)=>!u.has(k+S)&&!ot.has(s[k+S])).join(" ").trim(),h=m(0,i.start),g=m(i.end,n.length);l&&!s.includes("by")&&Xy.has(g.toLowerCase())&&(g="");let b=i.kind,y=f?Ue[r.slice(f.start,f.end).join(" ")]:null,w=p?Gt[r.slice(p.start,p.end).join(" ")]:"direct";if(b==="touches"&&s.includes("when")){let k=h||g;if(k)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:k})}if(b==="touches"&&s.includes("who")&&s.includes("last")){let k=h||g;if(k)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:k})}let $=s.indexOf("by"),j=s.slice(0,i.start).findIndex(k=>Yo.has(k)),v=j>=0,x=v&&j>$;if($>=0&&!u.has($)&&v){let k=(S,A)=>n.slice(S,A).filter((L,T)=>{let P=S+T,V=s[P];return!u.has(P)&&!ot.has(V)&&V!=="by"&&!Yo.has(V)&&!Ky.has(V)&&!Yy.has(V)}).join(" ").trim(),[_,R]=x?[k(j+1,n.length),k($+1,j)]:[k(0,$),k($+1,n.length)];if(_&&R)return b==="defines"&&Fo.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:R,object:_});if(R)return c({shape:"forward",entityType:y,modifier:w,kind:b,object:R});if(_)return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:_})}if(l&&$<0&&g&&s[i.start]==="called")return null;if(h&&g){let k=r.slice(i.start,i.end).join(" ");if(b==="defines"&&Fo.has(k))return null;let _=h,R=g;return Po.includes(k)&&([_,R]=[R,_]),c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:_,object:R})}if(g){let k=f&&f.start>=i.end?null:y;return c({shape:"reverse",entityType:k,modifier:w,kind:b,object:g})}if(b==="inherits"&&!h&&f&&f.start===i.end){let k=r.slice(f.start,f.end).join(" ");if(k)return c({shape:"reverse",entityType:null,modifier:w,kind:b,object:k})}if(h&&!g&&v&&i.end-i.start===1&&Vn[s[i.start]]){if(h.split(/\s+/).length>1)return null;if(b==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:b,object:h});let k=Yo.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:h,...k?{polar:!0}:{}})}return h?c({shape:"forward",entityType:y,modifier:"direct",kind:b,object:h}):null}var Yo,Ky,Yy,Xy,np,Jr=M(()=>{Rn();Xn();Ko();Yo=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Ky=new Set(["which","what","who","whom","whose"]),Yy=new Set(_n.map(e=>e.toLowerCase())),Xy=new Set(["recently","lately","yet","already","ever","again"]);np={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=Xo(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Qy(e,t,n){if(!n||typeof n.posTags!="function"||!t.length)return[];let s=new Set(t.map(i=>i.toLowerCase())),o;try{o=n.posTags(e)}catch{return[]}let r=[];for(let i=0;i<e.length;i+=1){let a=e[i],l=a.toLowerCase();!/^[a-z]+$/.test(a)||sp.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function Zy(e,t=null){let n=Jt(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!sp.has(a)&&(Jy.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=Qy(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var sp,Jy,op,rp=M(()=>{Rn();Xn();Xr();Jr();sp=new Set([...ot,...me(bs),...me(Object.keys(de)),...me(Object.keys(Ue)),...me(Object.keys(Gt)),...me(Object.keys(Ve)),...me(ys),...me(vs),...me(Object.keys(Hn)),...me(Object.keys(pn)),...me(Object.keys(Xs)),...me(_n),...me(zo),...me(ws),...me(Kt),...me(rn),...me(jn),...me(Object.keys(Qs))]),Jy=new Set([...me(Do),...me(Nr)]);op={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(oo(e))return null;let{text:n,dropped:s,maybeNoise:o}=Zy(e,t.nlp||null);if(!s.length||!n)return null;let r=oo(n)||Xo(n,t.nlp||null);if(!r)return null;if(o.length&&(r.shape==="where"||r.shape==="mentions")&&r.object){let i=r.object.split(/\s+/).filter(a=>!o.includes(a.toLowerCase())).join(" ").trim();i&&i!==r.object&&(r.altObject=i)}return{strategyId:"noise-strip",class:"noise-stripped",candidates:[{parsed:r,confidence:.75,note:`noise-stripped to "${n}"`}]}}}});var ip=M(()=>{});var Qr,Zr=M(()=>{Qr=()=>{}});function cp(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?ro(e.subject)===ro(t.subject)&&ro(e.object)===ro(t.object):ro(e.object)===ro(t.object)}function Fa(e){let t=(e||[]).filter(c=>c&&Array.isArray(c.candidates)&&c.candidates.length);if(!t.length)return null;let n=[];for(let c of t)for(let u of c.candidates)!u||!u.parsed||n.push({parsed:u.parsed,confidence:typeof u.confidence=="number"?u.confidence:.5,note:u.note||null,via:u.via||null,strategyId:c.strategyId,class:c.class});if(n.some(c=>!lp(c))&&(n=n.filter(c=>!lp(c))),!n.length)return null;let s=new Map;for(let c of n)s.has(c.class)||s.set(c.class,[]),s.get(c.class).push(c);let o=[];for(let[c,u]of s){let d=[];for(let f of u){let p=d.find(m=>cp(m.parsed,f.parsed)&&m.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),ap(f.parsed)<ap(p.parsed)&&(p.parsed=f.parsed);continue}d.push({...f,agreed:1})}d.length&&o.push({class:c,candidates:d})}if(!o.length)return null;let r=c=>Math.max(...c.candidates.map(u=>u.confidence)),i=o[0];for(let c of o)r(c)>r(i)&&(i=c);let a=i.candidates.length===1?i.candidates[0].parsed:{ambiguousParse:!0,candidates:i.candidates.map(c=>c.parsed)},l=o.filter(c=>c!==i).map(c=>c.candidates[0]).filter(c=>!i.candidates.some(u=>cp(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function nv(e){if(!e)return"something else";if(e.ambiguousParse)return"one of several readings";let t=e.object??e.subject??"?";return`${e.kind} "${t}"`}function up(e,{describe:t=nv,answerFor:n=null}={}){return(e||[]).map(s=>{let o=s.note||t(s.parsed),r=n&&n(s)||"ask it that way";return`if you mean ${o} then ${r}`})}var ro,ev,ap,tv,lp,Da=M(()=>{ro=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),ev=/^\s*(?:the|a|an)\s+/i,ap=e=>[e?.subject,e?.object].filter(t=>ev.test(String(t||""))).length;tv=new Set(["fuzzy","lemma","spell"]),lp=e=>tv.has(e.via)});function ei(e){za=e}function ti(){return typeof za=="function"?za():null}var za,io=M(()=>{za=null});function fp(e,t={},n=ov){let s=[];for(let o of n)try{let r=o.run(e,t);r&&typeof r.then!="function"&&s.push(r)}catch{}return s}var sv,ov,mp=M(()=>{Xn();Xr();Jr();rp();ip();Zr();Da();io();sv=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],ov=[tp,np,op,...sv]});function ao(e){return rv.test(String(e||"").trim())?"an":"a"}function ni(e){let t=String(e||"").trim();return t&&(/(?:s|x|z|ch|sh)$/.test(t)?`${t}es`:/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:`${t}s`)}function co(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function Jo(e){let t=(e||[]).map(n=>String(n||"").trim()).filter(Boolean);return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}var rv,si=M(()=>{rv=/^[aeiou]/i});var Qo,Ba=M(()=>{Qo=(e,t,n)=>n});var nf={};En(nf,{DYNAMIC_TAIL_OK_RE:()=>pc,applyNegationFrames:()=>Ho,ask:()=>ns,classDisplayName:()=>Zn,degreeMetric:()=>Hp,metaFallbackEntityAnswer:()=>zp,normalizeQuery:()=>_s,parseQuery:()=>nr,parseQueryFull:()=>ec,render:()=>gn,rephraseHint:()=>ac,resolveObject:()=>an,traverse:()=>Vt});function Ge(e,t){let n=hp.get(e);n||(n=new Map,hp.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(In(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Fe(e,t){let[n,s]=Ap[e]||["result","results"];return t===1?n:s}function or(e,t,n,s={}){return!e||!t.length?[]:[{kind:"set",class:e,label:`${t.length} ${Fe(e,t.length)}`,ids:t.map(o=>o.id),attrs:{count:t.length},lane:n,...s}]}function Zn(e){let t=String(e||"");if(typeof fn=="function"){let n=fn(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function Rs(e){return av[e]||e}function pv(e){if(!e?.ambiguousParse||!Array.isArray(e.candidates)||e.candidates.length!==2)return e;let t=e.candidates.find(r=>r?.shape==="meta"),n=e.candidates.find(r=>r!==t);if(!t||!n)return e;let s=String(t.object||"").trim().toLowerCase();if(!s||dv.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return me(ws).includes(o)?t:e}function nr(e,{nlp:t=void 0}={}){return ec(e,{nlp:t}).parsed}function ec(e,{nlp:t=void 0}={}){let n=t===void 0?ti():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Oa(Ho(_s(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=mv(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=Fa(fp(o,{nlp:n,raw:s}));return i?{parsed:pv(i.parsed),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function Ha(e,t){return t.length&&Cp.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function po(e,t){return oo(e)||Xo(e,t)}function mv(e,t){let n=Jt(e),s=n.map(o=>o.toLowerCase());return Lv(n,s)||Mv(n,s)||wv(n,s,t)||Op(e,t,0)||Pv(n,s,t)||vv(n,s,t)||_v(n,s,t,0)||Av(n,s)||Iv(n,s,t)||Fv(n,s,t)||Uv(n,s,t)||Gv(n,s,t,0)||Bv(n,s,t,0)||nc(n,s,t,0)||xv(n,s,t)||gv(n,s)||Fp(n,s,t,0)}function gv(e,t){let n=0;hv.has(t[n])&&(n+=1);let s=xt(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=m=>m+1<t.length?vu[`${t[m]} ${t[m+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let m=a;m+1<t.length;m+=1){let h=r(m);if(h){l=m,c=h;break}}if(l<0)return null;let u=e.slice(a,l).join(" ").trim(),d=e.slice(l+2).join(" ").trim();if(!u||!d)return null;let f=(m,h)=>m.role==="object"?{shape:"reverse",kind:m.kind,entityType:o,modifier:"direct",object:h}:{shape:"forward",kind:m.kind,modifier:"direct",object:h},p=f(i,u);return p.entityType=o,{node:"boolean",entityType:o,atoms:[{op:"seed",kind:"set",ast:{node:"clause",clause:p}},{op:"intersection",kind:"set",ast:{node:"clause",clause:f(c,d)}}]}}function ri(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function wv(e,t,n){if(!["do","does","did"].includes(t[0])||!bv.has(t[1]))return null;let s=xt(t[2]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;if(o==="Change")return{node:"miss",reason:`"${t[2]}" isn't an enumerable kind \u2014 a universal check needs a concrete kind (functions, classes, modules, \u2026)`};let r=t[2],i=e.slice(3),a=t.slice(3);if(!i.length)return null;let l=$t(a,de);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=i.filter((f,p)=>(p<l.start||p>=l.end)&&!ot.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=fo(`which ${r} ${i.join(" ")}`,n,1);return!d||d.node==="miss"?{node:"miss",reason:d&&d.reason||"the universal clause didn't parse"}:{node:"universal",entityType:o,kind:l.kind,object:u,complement:ri(o,{op:"difference",kind:"set",ast:d})}}function Op(e,t,n=0){let s=Jd(e);if(!s)return null;let o=xt(s.entWord);if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;if(r==="Change")return{node:"miss",reason:`"${s.entWord}" isn't an enumerable kind \u2014 a set complement needs a concrete kind (functions, classes, modules, \u2026)`};let i=Jt(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Ve[d]))return ri(r,{op:"difference",kind:"qual",filters:a});let l=$t(a,de);if(!l)return{node:"miss",reason:"a negated set query needs a known relation verb (import, call, inherit from, test, \u2026)"};if(!i.filter((d,f)=>(f<l.start||f>=l.end)&&!ot.has(a[f])&&a[f]!=="from").length)return ri(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=fo(`which ${s.entWord} ${s.predicate}`,t,n+1);return!u||u.node==="miss"?{node:"miss",reason:u&&u.reason||"the negated clause didn't parse"}:ri(r,{op:"difference",kind:"set",ast:u})}function vv(e,t,n){let s=0;for(;s<t.length&&yv.has(t[s]);)s+=1;if(!["do","does","did"].includes(t[s]))return null;s+=1;let o=e.slice(s),r=t.slice(s),i=r.indexOf("not");if(i<0)return null;let a=$t(r,de);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!ot.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function Lp(e,t){let n=new Set;for(let s of t)for(let o of Ge(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function Np(e,t){let n=Rt(t),s=n.filter(r=>!Rp.has(r)),o=Lp(e,s.length?s:n);return o.size===1?[...o][0]:null}function fo(e,t,n){if(n>Tp)return{node:"miss",reason:"too deep to resolve"};let s=Op(e,t,n);if(s)return s;let o=Jt(e),r=o.map(c=>c.toLowerCase()),i=nc(o,r,t,n);if(i)return i;let a=Fp(o,r,t,n);if(a)return a;let l=po(e,t);return l?{node:"clause",clause:l}:null}function nc(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=jn.includes(t[o]),i=!r&&Ip(t[o]);if(!r&&!i||r&&o+1>=t.length||!xt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>Ve[f.toLowerCase()]))continue;let c=po([...l,Va].join(" "),n);if(!c||c.shape!=="reverse"&&c.shape!=="forward"||c.modifier&&c.modifier!=="direct")continue;let u=`which ${t[o-1]} ${e.slice(r?o+1:o).join(" ")}`,d=fo(u,n,s+1);return!d||d.node==="miss"?d?{node:"miss",reason:d.reason||"inner clause didn't parse"}:{node:"miss",reason:"inner clause didn't parse"}:{node:c.shape==="reverse"?"reverseSet":"forwardSet",kind:c.kind,entityType:c.entityType,inner:d}}return null}function xv(e,t,n){for(let s=0;s<t.length;s+=1){if(!$v.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!de[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),Va,...e.slice(s+1)],a=po(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Va&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function _v(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!kv.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(Ev.has(t[d])){r=d;break}if(r<0)return null;let i=e.slice(o,r),a=t.slice(o,r);for(;a.length&&Sv.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&jv.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>jn.includes(d)))return null;let l=tc.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=fo(l,n,s+1);if(!c||c.node==="miss")return c?{node:"miss",reason:c.reason||"the inner set of the temporal query didn't parse"}:{node:"miss",reason:"the inner set of the temporal query didn't parse"};let u=xt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function Av(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!Rv.has(t[n]))return null;let s=t[n],o=e.slice(n+1).join(" ").trim();return o?{node:"commitFilter",op:s,pivotRaw:o}:{node:"miss",reason:`"what changed ${s}" needs a date or commit afterward`}}function Cv(e){let t=new Set,n=[];for(let s of e){if(!s||!Tv.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function Iv(e,t,n){if(t.length===2&&t[0]==="which"&&(t[1]==="ones"||t[1]==="one"))return{node:"anaphora",mode:"list",filter:{type:"all"}};let s=-1,o=!1;for(let d=1;d<t.length;d+=1){if(!zo.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let f=t.slice(0,d).join(" ");if(d===t.length-1&&(ys.includes(f)||vs.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=ys.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=Ov(e.slice(s+1),n);if(a===void 0)return{node:"miss",reason:"the follow-up filter didn't parse"};let l=o?s-1:s,c=Cv(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function Ov(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&fv.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Ve[a]))return{type:"qual",filters:r};if(o.length===1){let a=xt(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=po(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function Lv(e,t){let n;if(t[0]==="is"&&t[1]==="there")n=2;else if(t[0]==="are"&&t[1]==="there")n=2;else return null;let s=t[n];if(s==="a"||s==="an"||s==="any")n+=1;else return null;let o=n<t.length?xt(t[n]):null;if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;n+=1;let i=t.slice(n),a=e.slice(n);if(i.length&&i[i.length-1]==="anywhere"?(i=i.slice(0,-1),a=a.slice(0,-1)):i.length>=2&&i[i.length-2]==="at"&&i[i.length-1]==="all"&&(i=i.slice(0,-2),a=a.slice(0,-2)),!i.length)return{node:"exists",entityType:r,term:null,scopeModule:null};if(i[0]==="called"||i[0]==="named"){if(i.length<2)return{node:"miss",reason:`"${i[0]}" needs a name afterward`};let l=i.indexOf("in",1);if(l>0){let u=a.slice(1,l).join(" ").trim(),d=a.slice(l+1).join(" ").trim();return!u||!d?{node:"miss",reason:'a named existence check needs both a name and a module after "in"'}:{node:"exists",entityType:r,term:u,scopeModule:d}}let c=a.slice(1).join(" ").trim();return c?{node:"exists",entityType:r,term:c,scopeModule:null}:{node:"miss",reason:`"${i[0]}" needs a name afterward`}}if(i[0]==="in"){let l=a.slice(1).join(" ").trim();return l?{node:"exists",entityType:r,term:null,scopeModule:l}:{node:"miss",reason:'"in" needs a module afterward'}}return null}function Nv(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=gs(n).slice(e.length).trim(),o=Jt(s),r=o.findIndex(a=>a.toLowerCase()==="in");if(r<0)return null;let i=o.slice(r+1).join(" ").trim();return i?{scope:i}:{node:"miss",reason:'"in" needs a scope afterward'}}function Mv(e,t){if(t[0]!=="is"&&t[0]!=="are"||t[1]==="there")return null;let n=-1,s=!1;for(let c=1;c<t.length;c+=1)if(Ve[t[c]]){n=c,s=t[c-1]==="not";break}if(n<0)return null;let o=t.indexOf("by",n+1);if(o>0&&Vn[t[n]]){let c=o+1;for(;c<t.length&&(t[c]==="the"||t[c]==="a"||t[c]==="an");)c+=1;let u=t[c];if(u&&!Eu.has(u))return null}let r=Nv(t[n],e.slice(n+1));if(r?.node==="miss")return r;let i=1;t[i]==="the"&&(i+=1);let a=s?n-1:n;a>i&&(t[a-1]==="a"||t[a-1]==="an")&&(a-=1);let l=a>i?e.slice(i,a).join(" ").trim():"";return l?{node:"qualCheck",term:l,qualifier:t[n],negated:s,scope:r?.scope||null}:{node:"miss",reason:'"is/are <qualifier>" needs a named thing to check first'}}function Pv(e,t,n){if(!["do","does","did","is","are","was","were"].includes(t[0]))return null;let s=t.indexOf("not",1);if(s<0)return null;let o=po(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function Fv(e,t,n){let s=ys.find(d=>t.slice(0,d.split(" ").length).join(" ")===d);if(!s)return null;let o=s.split(" ").length;for(;o<t.length&&(t[o]==="the"||t[o]==="a"||t[o]==="all");)o+=1;let r=[];for(;o<t.length&&Ve[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?xt(t[o]):null;if(!i)return{node:"miss",reason:"count needs a known entity kind (functions, classes, modules, \u2026)"};let a=t[o];o+=1;let l=e.slice(o),c=t.slice(o).some(d=>!ot.has(d)&&!Mp.has(d)),u;if(c){let d=fo(`which ${a} ${l.join(" ")}`,n,1);if(!d||d.node==="miss")return{node:"miss",reason:"the count restrictor didn't parse"};u=d}else u={node:"allOfClass",entityType:i.entityType};return r.length&&(u={node:"qualifier",filters:r,inner:u}),{node:"count",entityType:i.entityType,base:u}}function Bv(e,t,n,s){let o=0,r=!1,i=null;for(let y of Dv){let w=y.split(" ");if(t.slice(0,w.length).join(" ")===y){i=y,o=w.length;break}}if(!i)if(t[0]==="what"||t[0]==="which")r=!0,o=1;else return null;for(;o<t.length&&sc.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Ve[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?xt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!_n.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Pp}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!ot.has(y)&&!Mp.has(y)),p=t.slice(o),m=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),m=m.slice(1));let h=r&&zv.has(p[0]);if(r&&(f&&!h||d.length===0))return null;let g,b=!1;if(f){let y=h?m:d,w=fo(`which ${[...a,u,...y].join(" ")}`,n,(s||0)+1);if(!w||w.node==="miss")return{node:"miss",reason:w&&w.reason||"the list filter didn't parse"};g=w,b=!0}else g={node:"allOfClass",entityType:c},a.length&&(g={node:"qualifier",filters:a,inner:g});return{node:"list",entityType:c,base:g,scoped:b}}function Uv(e,t,n){let s=null,o=-1;for(let m=0;m<t.length;m+=1){let h=t.slice(m,m+2).join(" ");if(Hn[h]){s=Hn[h],o=m;break}if(Hn[t[m]]){s=Hn[t[m]],o=m;break}}if(!s)return null;let r=null,i=null;for(let m=o;m<t.length;m+=1)if(pn[t[m]]){r=pn[t[m]],i=t[m];break}if(!r){for(let m=o-1;m>=0;m-=1)if(pn[t[m]]){r=pn[t[m]],i=t[m];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]),l=["important","significant","central","key","core","essential","critical","principal"],c=t.some(m=>l.includes(m));!r&&(a||c)&&(r=pn.connections,i="connections");let u,d=null;for(let m of t){let h=xt(m);if(h&&!h.placeholder){u=h.entityType,d=m;break}}if(!d&&(u=i?Su[i]:void 0,!u))return{node:"miss",reason:"a superlative needs an entity kind (module, class, function, \u2026)"};if(!r)return{node:"miss",reason:"name what to rank by (imports, callers, methods, tests, or connections)"};let f=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(m=>f.includes(m))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function Gv(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&sc.has(t[o]);)o+=1;if(o>=t.length)return null;let r=xt(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&Wv.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=xt(t[t.length-1]);if(i&&!i.placeholder&&i.entityType!=="Change"){let a=e.slice(o,t.length-1).join(" ").trim();if(a)return{node:"find",entityType:i.entityType,term:a}}return t.some(a=>jn.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!_n.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Pp}`}:null}function qv(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&sc.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(jn.includes(t[i])){s=i;break}if(s<0)return null;let o=xt(t[s-1]);if(!o||o.placeholder||o.entityType==="Change")return null;let r=e.slice(n,s-1).join(" ").trim();return r?{entityType:o.entityType,term:r,relIdx:s}:null}function Vv(e,t,n,s,o,r){let{branches:i,ops:a}=ii(n,s),l=null,c=[];for(let u=0;u<i.length;u+=1){let d=i[u],f=d.map(y=>y.toLowerCase()),p=u===0?"intersection":a[u-1],m=Ha(d,f);if(m.blc.length&&m.blc.every(y=>Ve[y])){c.push({op:p,kind:"qual",filters:m.blc});continue}if(f[0]==="of"||f[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let h=d,g=$t(f,de);g?l=d.slice(g.start,g.end):l&&(h=[...l,...d]);let b=Dp(`${t} ${h.join(" ")}`,o,r);if(!b||b.node==="miss")return{miss:b&&b.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:b})}return{atoms:c}}function Fp(e,t,n,s){let o=qv(e,t);if(o){let{entityType:R,term:S,relIdx:A}=o,L=t.slice(A+1),T=e.slice(A+1);if(!L.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[A]}"`};let P=Vv(R,`which ${t[A-1]}`,L,T,n,s+1);if(P.miss)return{node:"miss",reason:P.miss};let V=[{op:"seed",kind:"set",ast:{node:"find",entityType:R,term:S}},...P.atoms];return V.length===1?V[0].ast:{node:"boolean",entityType:R,atoms:V}}let r=0;for(;r<t.length&&tc.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Ve[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?xt(t[r]):null;if(!l){let R=r+1<t.length?xt(t[r+1]):null;if(gp.has(t[r])&&R&&R.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(Cp.has(t[r])){let S=r+1;S<t.length&&(t[S]==="the"||t[S]==="a"||t[S]==="an")&&(S+=1);let A=S+1<t.length?xt(t[S+1]):null;if(gp.has(t[S])&&A&&A.entityType==="Commit"&&S+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&R&&/^[a-z]+$/.test(t[r])&&!de[t[r]]&&!ot.has(t[r])&&!dc.has(t[r])?{node:"find",entityType:R.entityType,term:e[r]}:null}let c=l.entityType,u=t[r];r+=1;let d=t.slice(r),f=e.slice(r),p=!1;d.length&&jn.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let m=d[0]==="of"||d[0]==="in",h=d.length>0&&Ip(d[0]),g=f.length>0&&ii(d,f).branches.some(R=>{let{blc:S}=Ha(R,R.map(A=>A.toLowerCase()));return S.length&&S.every(A=>Ve[A])}),b=f.length>0?ii(d,f).branches:[],y=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),S=$t(R,de);S&&S.start===0&&(y=b.slice(1).every(A=>{let L=A.map(P=>P.toLowerCase()),T=$t(L,de);return T&&T.start===0?T.kind===S.kind:!T}))}let w=!1;if(b.length>1){let R=b[0].map(A=>A.toLowerCase()),S=$t(R,de);S&&S.start===0&&(w=b.slice(1).every(A=>{let L=A.map(P=>P.toLowerCase()),T=$t(L,de);return!!T&&T.start===0&&T.end-T.start===1}))}if(!(a.length||p||m||h||g||y||w))return null;if(!f.length){let R={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:R,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let $=l.placeholder?"what":`which ${u}`,{branches:j,ops:v}=ii(d,f),x=null,k=[];for(let R=0;R<j.length;R+=1){let S=j[R],A=S.map(te=>te.toLowerCase()),L=R===0?"seed":v[R-1],T=Ha(S,A);if(T.blc.length&&T.blc.every(te=>Ve[te])){k.push({op:L,kind:"qual",filters:T.blc});continue}if(A[0]==="of"||A[0]==="in"){k.push({op:L,kind:"set",ast:{node:"membership",entityType:c,term:S.slice(1).join(" ")}});continue}let P=S,V=$t(A,de);V?x=S.slice(V.start,V.end):x&&(P=[...x,...S]);let Y=Dp(`${$} ${P.join(" ")}`,n,s+1);if(!Y||Y.node==="miss")return{node:"miss",reason:Y&&Y.reason||"a clause in the combination didn't parse"};k.push({op:L,kind:"set",ast:Y})}if(k[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let _;return k.length===1?_=k[0].ast:_={node:"boolean",entityType:c,atoms:k},a.length&&(_={node:"qualifier",filters:a,inner:_,entityType:c}),_}function Dp(e,t,n){if(n>Tp)return{node:"miss",reason:"too deep to resolve"};let s=Jt(e),o=s.map(a=>a.toLowerCase()),r=nc(s,o,t,n);if(r)return r;let i=po(e,t);return i?{node:"clause",clause:i}:null}function ii(e,t){let n=Object.keys(Xs).sort((a,l)=>l.split(" ").length-a.split(" ").length),s=[],o=[],r=0,i=0;for(;i<e.length;){let a=null;for(let l of n){let c=l.split(" ");if(e.slice(i,i+c.length).join(" ")===l){a={c:l,len:c.length};break}}a&&i>r?(s.push(t.slice(r,i)),o.push(Xs[a.c]),i+=a.len,r=i):a?(i+=a.len,r=i):i+=1}return s.push(t.slice(r)),{branches:s,ops:o}}function oc(e,t,n,s){let o=lo[t];if(o&&ts.has(n)){let u=Ge(e,o).filter(d=>s.has(d.object));return Nn(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>ts.has(e.byId.get(u)?.class))?[...Rt(t),o]:Rt(t)).flatMap(u=>Ge(e,u)).filter(u=>s.has(u.object)),l=Nn(a.map(u=>e.byId.get(u.subject)).filter(Boolean));if(!n||n==="Change")return l;let c=l.filter(u=>u.class===n);return c.length?c:n!=="Module"&&l.some(u=>u.class==="Module")?cc(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function Kv(e,t){let n=new Set(oc(e,"touches","Commit",t).map(s=>String(s.label||"").toLowerCase()));for(let s of t)for(let o of e.byId.get(s)?.derived_from||[]){let r=Hv.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function tr(e,t,n){let s=Rt(t).flatMap(o=>Ge(e,o)).filter(o=>n.has(o.subject));return Nn(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function Nn(e){let t=new Set,n=[];for(let s of e)s&&!t.has(s.id)&&(t.add(s.id),n.push(s));return n}function Yv(e,t){let n=Tn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Tn(o.label).startsWith(s))}function Ka(e){let t=bp.get(e);if(t)return t;let n=new Set;for(let i of Ge(e,"reexports")){n.add(String(i.object).toLowerCase());let a=e.byId.get(i.object);a&&n.add(String(a.label).toLowerCase())}let s=new Set,o=new Set;for(let i of Ge(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of Ge(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},bp.set(e,t),t}function uo(e,t){return t?t.class==="Module"?t.id:Ka(e).moduleOfSymbol.get(t.id)||null:null}function zp(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>Xv.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=uo(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Fe(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${Qo("defined-in",o.id,"defined in")} ${i}`:"",u=o.class==="Class"?` or "which classes inherit from ${o.label}"`:"";return{text:`${o.label} is ${l} ${a} in this codebase${c} \u2014 try "describe ${o.label}"${u}.`,hit:o,modLabel:i}}function Ya(e,t,n){let s=Nn(Js.flatMap(o=>tr(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function rc(e,t,n=null){let s=Ln(e,t,n);if(!(s.match&&s.tier===1)){let o=Yv(e,t);if(o.length)return{kind:"dir",mods:o}}return s.match?{kind:"single",id:s.match.id,entityClass:s.match.class,label:s.match.label}:{kind:"miss"}}function Bp(e,t,n,s,o){let r=o||(()=>!0),i=Ya(e,t,s).filter(r);if(i.length||!Wp(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of Up(e,t)){let l=e.byId.get(a);if(!l)continue;let c=Ya(e,a,s).filter(r);if(c.length)return{own:i,inherited:c,viaId:a,viaLabel:l.label}}return{own:i,inherited:[],viaId:null,viaLabel:null}}function As(e,t,n){if(!n)return!1;switch(n.via){case"visibility":return String((t.attributes||[]).find(o=>o.key==="visibility")?.value||"public").toLowerCase()===n.value;case"attr":return!!(t.attributes||[]).find(s=>s.key===n.attr)?.value;case"exported":{let s=Ka(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=uo(e,t),o=Ka(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&Es(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function ic(e){return Ge(e,"inherits")}function Xa(e,t){return ic(e).filter(n=>n.object===t).map(n=>n.subject)}function wp(e,t){return ic(e).filter(n=>n.subject===t).map(n=>n.object)}function Jv(e,t){let n=new Set,s=[...Xa(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Xa(e,o))n.has(r)||s.push(r)}}return n}function Up(e,t){let n=new Set,s=[...wp(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of wp(e,o))n.has(r)||s.push(r)}}return n}function Wp(e,t){let n=yp.get(e);if(n||(n=new Map,yp.set(e,n)),n.has(t))return n.get(t);let s=ic(e).some(o=>{let r=e.byId.get(o.subject),i=e.byId.get(o.object);return!!r&&!!i&&r.class===t&&i.class===t});return n.set(t,s),s}function vp(e,t){let n=String(e.label||"").toLowerCase();if(t.every(o=>n.includes(o)))return"label";let s=(e.attributes||[]).map(o=>String(o.value??"").toLowerCase());return t.every(o=>s.some(r=>r.includes(o)))?"attr":null}function xp(e){return e.slice().sort((t,n)=>$p[n.via]-$p[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function kp(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Jn(n);if(On(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of Ts(e.label))if(On(o,n,s)<=s)return!0;return!1}function Gp(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...Ts(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=Wp(e,t),i=[];for(let l of s){let c=vp(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...Jv(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!vp(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:xp(i),broad:[]};let a=new Map;for(let l of s)for(let c of Up(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&kp(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of Xa(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&kp(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:xp([...a.values()])}}function Qv(e){return[...Gr(qr(e)).entries()].sort((t,n)=>n[1]-t[1]||t[0].localeCompare(n[0])).map(([t])=>({id:`pkg:${t}`,label:t,class:"Package"}))}function Qt(e,t,n){switch(t.node){case"clause":return Vt(e,t.clause,n).matches||[];case"allOfClass":return t.entityType==="Package"?Qv(e):e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=Gp(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(Rt(t.kind).flatMap(o=>Ge(e,o)).map(o=>o.subject));return e.individuals.filter(o=>s.has(o.id)&&(!t.entityType||o.class===t.entityType))}case"forwardComplement":{let s=Ln(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=Np(e,t.kind);if(!o)return[];let r=new Set(tr(e,t.kind,new Set([s.match.id])).map(i=>i.id));return e.individuals.filter(i=>i.class===o&&!r.has(i.id))}case"reverseSet":{let s=new Set(Qt(e,t.inner,n).map(o=>o.id));return oc(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(Qt(e,t.inner,n).map(o=>o.id));return tr(e,t.kind,s)}case"prevSet":{let s=n&&n.prev;return Array.isArray(s)?s.map(o=>e.byId.get(o)).filter(Boolean):[]}case"membership":{let s=rc(e,t.term,n&&n.contextId);if(s.kind==="dir"){if(!t.entityType||t.entityType==="Module")return s.mods;let i=new Set(s.mods.map(l=>l.id));return Nn(Js.flatMap(l=>tr(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=Bp(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?Kp(e,t,n).matches:Qt(e,t.inner,n).filter(o=>t.filters.every(r=>As(e,o,Ve[r])));case"boolean":return qp(e,t,n);case"anaphora":return Vp(e,t,n).matches;default:return[]}}function qp(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=Qt(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>As(e,l,Ve[c])),a=l=>o.filters.every(c=>{let u=Zv(Ve[c]);return u?As(e,l,u):!As(e,l,Ve[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(Qt(e,o.ast,n).map(i=>i.id));if(o.op==="intersection")s=s.filter(i=>r.has(i.id));else if(o.op==="difference")s=s.filter(i=>!r.has(i.id));else if(o.op==="union"){let i=new Set(s.map(a=>a.id));for(let a of Qt(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function e$(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=an(e,o);r&&r.match&&!n.has(r.match.id)&&(n.add(r.match.id),s.push(r.match))}return s.length>=2?s:null}function Vp(e,t,n){let o=e$(e,t.candidateTerms);if(!o){let d=n&&n.prev;if(!Array.isArray(d)||!d.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=d.map(f=>e.byId.get(f)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(d=>i.filters.every(f=>As(e,d,Ve[f])));else if(i&&i.type==="entity")r=r.filter(d=>d.class===i.entityType);else if(i&&i.type==="clause"){let d=an(e,i.clause.object);if(!d.match)r=[];else{let f=lo[i.clause.kind],p=[...Rt(i.clause.kind),...f?[f]:[]],m=new Set(p.flatMap(h=>Ge(e,h)).filter(h=>h.object===d.match.id).map(h=>h.subject));r=r.filter(h=>m.has(h.id))}}let a=d=>d.length&&d.every(f=>f.class===d[0].class)?d[0].class:null,l=i&&i.type==="entity"?i.entityType:a(o),c=r.length?a(r):l;if(t.mode==="count")return{compositeKind:"count",count:r.length,entityType:c,matches:[]};let u=or(c,r,"anaphora",{bound:!0});return{compositeKind:"set",matches:r,entityType:c,referents:u}}function Hp(e,t,n){let s=n.kind==="*"?t$:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of Ge(e,r)){let a=i.subject===t.id,l=i.object===t.id;if(n.dir==="out"&&a){if(n.filter){let c=e.byId.get(i.object);if(!c||c.class!==n.filter)continue}o+=1}else(n.dir==="in"&&l||n.dir==="both"&&(a||l))&&(o+=1)}return o}function n$(e){let t=e.individuals.filter(s=>s.class==="Commit"),n=s=>String((s.attributes||[]).find(o=>o.key==="date")?.value||"");return t.sort((s,o)=>n(o).localeCompare(n(s))),{compositeKind:"recentCommits",matches:t}}function o$(e,t){let{op:n,pivotRaw:s}=t,o=u=>String((u.attributes||[]).find(d=>d.key==="date")?.value||"").slice(0,10),r=null,i=null,a=null;if(s$.test(s))r=s;else{let{match:u,ambiguous:d}=an(e,s,{expectedClass:"Commit"});u&&!d&&u.class==="Commit"&&o(u)&&(i=u.id,a=u.label,r=o(u))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let l=e.individuals.filter(u=>u.class==="Commit"&&u.id!==i&&o(u)).filter(u=>{let d=o(u);return n==="since"?d>=r:n==="before"?d<r:n==="after"?d>r:d===r}).sort((u,d)=>o(d).localeCompare(o(u))),c=[];return l.length&&c.push({kind:"set",class:"Commit",label:`${l.length} commit${l.length===1?"":"s"} ${n} ${s}`,ids:l.map(u=>u.id),attrs:{count:l.length,op:n,...i?{pivot:i}:{}},lane:"commitFilter"}),i&&c.push({kind:"event",class:"Commit",label:a,ids:[i],attrs:{date:r},lane:"commitFilter"}),{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:l,referents:c}}function r$(e,t,n){let s=Qt(e,t.inner,n),o=new Set(s.map(a=>a.id));if(!o.size)return{compositeKind:"temporal",matches:[],entityType:t.entityType,innerCount:0};let r=oc(e,"touches","Commit",o),i=a=>String((a.attributes||[]).find(l=>l.key==="date")?.value||"");return r.sort((a,l)=>i(l).localeCompare(i(a))),{compositeKind:"temporal",matches:r,entityType:t.entityType,innerCount:s.length}}function i$(e,t){let n=e.individuals.filter(a=>a.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let a=new Set(Ge(e,"tests").map(l=>l.subject));n=n.filter(l=>!a.has(l.id)&&!Es(String(l.label).toLowerCase()))}let s=n.map(a=>({ind:a,score:Hp(e,a,t.metric)})).sort((a,l)=>t.extreme==="most"?l.score-a.score:a.score-l.score);if(!s.length)return{compositeKind:"superlative",entityType:t.entityType,matches:[]};let o=s[0].score,r=s.filter(a=>a.score===o).map(a=>a.ind),i=r.length>=2?or(t.entityType,r,"superlative"):[{kind:"entity",class:t.entityType,label:r[0].label,ids:[r[0].id],attrs:{},lane:"superlative"}];return i.push({kind:"measure",label:`${o} ${t.metricNoun}`,ids:[],attrs:{metric:o},lane:"superlative"}),{compositeKind:"superlative",entityType:t.entityType,metricNoun:t.metricNoun,extreme:t.extreme,score:o,matches:r,referents:i}}function Kp(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?m=>s.filters.every(h=>As(e,m,Ve[h])):null,a=m=>or(r,m,"membership"),l=rc(e,o.term,n&&n.contextId);if(l.kind==="dir"){let m;if(!r||r==="Module")m=l.mods;else{let h=new Set(l.mods.map(g=>g.id));m=Nn(Js.flatMap(g=>tr(e,g,h))).filter(g=>g.class===r)}return i&&(m=m.filter(i)),{compositeKind:"set",matches:m,entityType:r,referents:a(m)}}if(l.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:c,inherited:u,viaLabel:d}=Bp(e,l.id,l.entityClass,r,i),f=!c.length&&u.length>0,p=f?u:c;return{compositeKind:"membership",entityType:r,matches:p,inheritedNotOwn:f,viaLabel:d,ownerLabel:l.label,referents:a(p)}}function a$(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=an(e,o,{expectedClass:"Module"});if(!a.match)return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMiss:!0,matches:[]};r=a.match}if(s){let a=an(e,s,{expectedClass:n}),l=!r||a.match&&uo(e,a.match)===r.id,c=a.match&&l;return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMatch:r,matches:c?[a.match]:[]}}let i=r?cc(e,new Set([r.id]),n):e.individuals.filter(a=>a.class===n);return{compositeKind:"exists",entityType:n,term:null,scopeModule:o,scopeMatch:r,matches:i}}function c$(e,t,n){let s=uo(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||Ya(e,n.id).some(o=>o.id===t.id)}function l$(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Ln(e,s,n.contextId);if(a.unresolvedPronoun)return{compositeKind:"qualCheck",qualCheckMiss:"pronoun",term:s,matches:[]};if(!a.match)return{compositeKind:"qualCheck",qualCheckMiss:"unresolved",term:s,matches:[]};if(i){let d=rc(e,i,n.contextId);if(d.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!c$(e,a.match,d))return{compositeKind:"qualCheck",qualCheckMiss:"outsideScope",term:s,scope:i,subjectLabel:a.match.label,scopeLabel:d.kind==="dir"?i:d.label,matches:[]}}let l=As(e,a.match,Ve[o]),c=r?!l:l,u=[{kind:"entity",class:a.match.class,label:a.match.label,ids:[a.match.id],attrs:{},lane:"qualCheck"}];return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match],referents:u}}function u$(e,t,n){let s=an(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=Qt(e,{node:"allOfClass",entityType:t.entityType},n),r=qp(e,t.complement,n),i=r.length===0;return{compositeKind:"universal",entityType:t.entityType,kind:t.kind,object:s.match.label,holds:i,total:o.length,counter:r,matches:i?o:r}}function d$(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(Qt(e,t.inner,n).map(s=>s.id));if(t.node==="clause"&&t.clause?.shape==="reverse"&&t.clause.kind==="touches"&&t.clause.entityType==="Commit"){let{objMatch:s,ambiguous:o}=Vt(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function p$(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return a$(e,t);if(t.node==="qualCheck")return l$(e,t,n);if(t.node==="universal")return u$(e,t,n);if(t.node==="count"){let i=d$(e,t.base,n);return i?{compositeKind:"count",count:Kv(e,i),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:Qt(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:Qt(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="superlative")return i$(e,t);if(t.node==="temporal")return r$(e,t,n);if(t.node==="recentCommits")return n$(e);if(t.node==="commitFilter")return o$(e,t);if(t.node==="anaphora")return Vp(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return Kp(e,t,n);if(t.node==="find"){let{narrow:i,broad:a}=Gp(e,t.entityType,t.term);return{compositeKind:"find",entityType:t.entityType,term:t.term,matches:i.length?i:a,broad:!i.length&&a.length>0}}if((t.node==="reverseSet"||t.node==="forwardSet")&&t.inner.node==="prevSet"&&!(Array.isArray(n.prev)&&n.prev.length))return{compositeMiss:!0,reason:"no-prev",matches:[]};let s=Qt(e,t,n),o=t.entityType||null,r=or(o,s,t.node==="qualifier"?"qualifierListing":"compositeSet");return{compositeKind:"set",matches:s,entityType:o,referents:r}}function Yp(){return'compositional queries also work: "which functions call X and call Y", "what calls something that imports X", "public methods of X", "list functions" / "show me the classes", "how many classes", "which module has the most imports", "find me the payment class", or (after a listing) "which of those are tested"'}function f$(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=sr(e);return n?`${t} in ${n}`:t}function Ja(e){return!e||typeof e!="object"?!1:Array.isArray(e)?e.some(Ja):Array.isArray(e.filters)&&e.filters.some(t=>Ve[String(t).toLowerCase()]?.via==="tested")?!0:Object.values(e).some(Ja)}function m$(e,t){return!["Function","Method"].includes(t)||!Ja(e)?null:"This index records tests edges module to module, so it holds no function-grain coverage to filter on \u2014 ask whether the module a function lives in is tested instead."}function h$(e,t,n){if(t.compositeMiss)return t.reason==="no-prev"?{content:'"those"/"them" needs a previous answer to refer to \u2014 ask a listing question first, then follow up.',miss:!0,ambiguous:!1}:{content:`couldn't compile this compositional question${t.reason?` (${t.reason})`:""}. ${Yp()}.`,miss:!0,ambiguous:!1};if(t.compositeKind==="exists"){if(t.scopeMiss)return{content:`no module matching "${t.scopeModule}" found in the index.`,miss:!0,ambiguous:!1};let s=Fe(t.entityType,1),o=Fe(t.entityType,2),r=t.scopeMatch?` in ${t.scopeMatch.label}`:"";if(t.term){if(!t.matches.length)return{content:`No \u2014 no ${s} named "${t.term}" found${r}.`,miss:!0,ambiguous:!1};let i=t.matches[0],a=sr(i),l=i.class==="Module"?"":a?`, ${Qo("defined-in",i.id,"defined in")} ${a}`:"";return{content:`Yes \u2014 ${i.label} is a ${s}${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`Yes \u2014 ${Qn(t.matches)}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 no ${o} found${r}.`,miss:!0,ambiguous:!1}}if(t.compositeKind==="qualCheck"){if(t.qualCheckMiss==="pronoun")return{content:`"${t.term}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="unresolved")return{content:`couldn't find "${t.term}" in the index to check.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="scope")return{content:`couldn't find "${t.scope}" in the index to check inside.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="outsideScope")return{content:`No \u2014 ${t.subjectLabel} isn't in ${t.scopeLabel}.`,miss:!0,ambiguous:!1};let s=t.subject.label,o=t.negated?`not ${t.qualifier}`:t.qualifier,r=t.negated?t.qualifier:`not ${t.qualifier}`;return{content:`${t.holds?"Yes":"No"} \u2014 ${s} is ${t.holds?o:r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="universal"){if(t.universalMiss==="unresolved")return{content:`couldn't find "${t.object}" in the index to check.`,miss:!0,ambiguous:!1,matches:[]};let s=Fe(t.entityType,t.total),o=lv(t.kind);return t.holds?{content:`Yes \u2014 all ${t.total} ${s} ${o} ${t.object}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 ${t.counter.length} of ${t.total} ${s} do not ${o} ${t.object}: ${Qn(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Fe(t.entityType,t.count):t.count===1?"result":"results";return{content:`${t.count} ${s}.`,miss:!1,ambiguous:!1,matches:[]}}if(t.compositeKind==="list"){if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} in this index.`,miss:!0,ambiguous:!1,matches:[]};let s=!["Module","Package","Commit","Fact","Utterance","Session","Source","Rule"].includes(t.entityType),o=!t.scoped&&s&&t.matches.length>We?` \u2014 narrow with "${Fe(t.entityType,2)} in <module>"`:"";return{content:`${Qn(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="membership"){if(!t.matches.length)return{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Fe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${Qn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${Qn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Fe(t.entityType,1);if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?f$(t.matches[0]):Qn(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Fe(t.entityType,2)}: ${o}.`,miss:!1,ambiguous:!1,matches:t.matches,relatedNotExact:!0}:{content:`${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="recentCommits"){if(!t.matches.length)return{content:"no commits recorded in this index.",miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Mt).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Mt?` \u2026+${t.matches.length-Mt} more`:"";return{content:`${t.matches.length} recent commit(s): ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="commitFilter"){if(!t.pivotResolved)return{content:`"${t.pivotRaw}" isn't a recognized date (yyyy-mm-dd) or a known commit \u2014 try "what changed since 2026-06-01" or "what changed before <commit>".`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no commits recorded ${t.op} ${t.pivotRaw}.`,miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Mt).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Mt?` \u2026+${t.matches.length-Mt} more`:"";return{content:`${t.matches.length} commit(s) changed ${t.op} ${t.pivotRaw}: ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="superlative"){if(!t.matches.length)return{content:`no ${Fe(t.entityType,2)} to rank in this index.`,miss:!0,ambiguous:!1};let s=t.extreme==="most"?"the most":"the fewest",o=t.matches.length>1?` (${t.matches.length}-way tie)`:"";return{content:`${Qn(t.matches)} \u2014 ${s} ${t.metricNoun} (${t.score})${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="temporal"){let s=t.innerCount||0,o=t.entityType?Fe(t.entityType,s||2):s===1?"entity":"entities",r=s===1?"was":"were";if(!s)return{content:`nothing in the index matches the inner set, so there is no change history to date. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no recorded commit touched the ${s} ${o} in that set in this index. ${es(n)}`,miss:!0,ambiguous:!1,matches:[]};let i=t.matches[0],a=(i.attributes||[]).find(d=>d.key==="date")?.value||"";if(!a)return{content:`the ${o} in that set ${r} last touched by commit ${i.label}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1,matches:t.matches};let l=(i.attributes||[]).find(d=>d.key==="message")?.value||"",c=String(a).slice(0,10),u=t.matches.length-1;return{content:`the ${o} in that set ${r} last touched by commit ${i.label} on ${c}${l?` ("${l}")`:""}${u?`; ${u} earlier commit${u===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.matches.length){let s=m$(e,t.entityType)||es(n);return{content:`nothing in the index matches that${t.entityType?` (${Fe(t.entityType,2)})`:""}. ${s}`,miss:!0,ambiguous:!1,matches:[]}}return{content:`${Qn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}function ac(){return`"which <functions|classes|modules> <imports|calls|uses|inherits from|tests> <name>" or "what does <name> <import|call|export>" or "what uses <name>" or "where is <name> defined" / "where is <name> mentioned" or "when did <name> change" or "which commits touched <name>" or "which changes touch commit <sha>"/"what did commit <sha> touch" (a commit's own changes) or plainly "what calls this" (about a selected node) or "what does <term> mean"/"what is a <ClassName>" (about the graph's own vocabulary). `+Yp()}function es(e=null){return e&&_a(e)===0?"This store holds no code index, so it records no modules or commits to look through.":`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function Ts(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function ci(e){if(e.length<5)return e;let t=e.replace(/(ing|ers|ors|er|or)$/,"");return t===e?e:t.length>=3&&t[t.length-1]===t[t.length-2]?t.slice(0,-1):t}function Xp(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function g$(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function Zo(e,t,{expectedClass:n=null}={}){let s=String(t||"").trim();if(!s)return{match:null,candidates:[],tier:null,ambiguous:!1};let o=s.toLowerCase(),r=n?e.individuals.filter(g=>g.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let g=i[2],b=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${g}`)||String(y.label).toLowerCase().startsWith(g)));if(b.length===1)return{match:b[0],candidates:[],tier:1,ambiguous:!1};if(b.length>1)return{match:b[0],candidates:b.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(g=>String(g.label).toLowerCase()===o||String(g.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let g of e.relations)for(let b of g.edges)if(String(b.object).toLowerCase()===l){c=b.object;break e}if(c&&!n)return{match:{id:c,label:s,class:null},candidates:[],tier:2,ambiguous:!1};let u=s.split(/\s+and\s+/i).map(g=>g.trim()).filter(Boolean);if(u.length>1){let g=new Set;for(let b of u){let y=Zo(e,b,{expectedClass:n});y.match&&!y.ambiguous&&g.add(y.match.id)}if(g.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let g=o.split(".").pop();for(let b of r){let y=String(b.label||"").toLowerCase();b.class==="Module"?y.split("/").pop()===o&&d.push({ind:b,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:b,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${g}`)&&d.push({ind:b,score:1500-Math.abs(y.length-o.length)})}}else{let g=[...Ts(s)],b=o.split(/\s+/).find(v=>v.includes("/")),y=b?b.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,$=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,j=$?g$(s):null;for(let v of r){let x=String(v.label||"").toLowerCase(),k=x.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(k===o){d.push({ind:v,score:5e3});continue}if(o.length>=4&&(k.startsWith(o)||k.endsWith(o))){d.push({ind:v,score:4e3-Math.abs(k.length-o.length)});continue}if($){let S=Xp(v.label);if(S&&S===j){d.push({ind:v,score:5e3});continue}let A=/[/_-]/.test(v.label)||/\.[a-z0-9]+$/i.test(String(v.label||""));if(S&&A&&j.length>=4&&S.includes(j)){d.push({ind:v,score:2e3-Math.abs(S.length-j.length)});continue}}if(v.class==="Module"){let S=ci(o);if(S!==o&&S===ci(k)){let A=Jn(o);if(On(k,o,A)>A){d.push({ind:v,score:3e3-Math.abs(k.length-o.length)});continue}}}if(o.length>=4&&x.includes(o)){d.push({ind:v,score:1e3-Math.abs(x.length-o.length)});continue}let _=Ts(v.label),R=g.filter(S=>_.has(S)).length;R>0&&(!y||_.has(y))&&d.push({ind:v,score:R/g.length*Wa})}}if(d.sort((g,b)=>b.score-g.score),d.length){let[g,...b]=d,y=b.filter($=>$.score===g.score),w=g.score>=Wa?b.filter($=>$.score>=Wa):b;return{match:g.ind,candidates:w.slice(0,4).map($=>$.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),m=null,h=!p&&typeof $s=="function"?$s(e.proseIndex,s).filter(g=>!n||e.byId.get(g.id)?.class===n):[];if(h.length){let[g,...b]=h,y=e.byId.get(g.id);if(y){let w=b.filter($=>$.score===g.score);if(m={match:y,candidates:b.slice(0,4).map($=>e.byId.get($.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!m.ambiguous&&g.via!=="spell")return m}}if(!i&&o.length>=4){let g=Jn(o),b=g+1,y=[];for(let w of r){let $=On(String(w.label||"").toLowerCase(),o,g);if($>0)for(let j of Ts(w.label)){if($<=0)break;$=Math.min($,On(j,o,g))}$<b?(b=$,y=[w]):$===b&&$<=g&&y.push(w)}if(b<=g&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(b<=g&&y.length>1&&!m){let[w,...$]=y;return{match:w,candidates:$.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return m||{match:null,candidates:[],tier:null,ambiguous:!1}}function Ga(e,t){let n=Xp(t),s=[...Ts(t)],o=[];for(let r of Ts(e))n.includes(r)||s.some(i=>ci(i)===ci(r))||ai.has(r)||Zp.has(r)||o.push(r);return o}function oi(e,t){if(!e?.match||e.tier!==3||e.matchedVia)return e;if(e.ambiguous){let s=[e.match,...e.candidates||[]],o=s.map(r=>new Set(Ga(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),Ga(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:hn(s.slice(0,4).map(r=>r.label))}:e}let n=Ga(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function an(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(b$,"").trim(),i=r.match(w$);if(i){let a=r.slice(0,i.index).trim(),l=Ue[i[1].toLowerCase()];if(a&&l){let c=oi(Zo(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=oi(Zo(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return oi(Zo(e,t,n),t)}return oi(Zo(e,t,n),t)}function Ln(e,t,n){if(bs.includes(String(t||"").trim().toLowerCase())){if(!n)return{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0};let s=e.byId.get(n);return s?{match:s,candidates:[],tier:1,ambiguous:!1}:{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0}}return an(e,t)}function cc(e,t,n){let s=[];for(let o of Ge(e,"defines")){if(!t.has(o.subject))continue;let r=e.byId.get(o.object);r&&r.class===n&&s.push(r)}return s}function y$(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||ts.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>Ge(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&ts.has(n)&&(l=l.filter(c=>c.class===n)),{matches:l,objMatch:t,commitSubject:!0,ambiguous:!1,candidates:[],traversal:`${a.join("+")} edges where subject = commit ${t.label}`,...s}}function k$(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&lc.has(Ep(s.label))).map(s=>({ind:s,named:n.has(Ep(s.label))?1:0,depth:String(s.label).split("/").length,fixture:x$(s.label)?1:0})).sort((s,o)=>o.named-s.named||s.depth-o.depth||s.fixture-o.fixture||String(s.ind.label).localeCompare(String(o.ind.label))).map(s=>s.ind)}function E$(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function uc(e){return(e?.attributes||[]).find(t=>t.prop===S$)?.value||null}function j$(e){return e==="SchemaClass"?"a class in the graph's schema":e==="SchemaPredicate"?"a predicate (relation) in the graph's schema":`${ao(e)} ${e} in this graph's vocabulary`}function Vt(e,t,{contextId:n=null,prev:s=null,pinnedObjMatch:o=null}={}){if(!t)return{matches:[],objMatch:null,candidates:[],traversal:null,ambiguous:!1};if(t.node)return p$(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let T=t.candidates.map(P=>{let V=Vt(e,P,{contextId:n,prev:s});return{parsed:P,result:V,rendered:gn(P,V,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:T}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let T=String(t.object||"").trim(),P=T.toLowerCase(),V=(e.individuals||[]).find(Y=>{if(!uc(Y))return!1;if(String(Y.label).toLowerCase()===P)return!0;let te=(Y.attributes||[]).find(F=>F.key==="token")?.value;return te&&String(te).toLowerCase()===P});if(!V){let Y=zp(e,T);return Y?{matches:[Y.hit],objMatch:Y.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:Y.text,traversal:`schema lookup for "${T}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}return{matches:[V],objMatch:V,candidates:[],traversal:`schema lookup for "${T}"`,ambiguous:!1}}if(r==="mentions"){let T=String(t.object||"").trim();return{matches:(typeof $s=="function"?$s(e.proseIndex,T):[]).map(Y=>e.byId.get(Y.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${T}"`}}if(r==="where"&&v$.test(String(t.object||"").trim())){let T=k$(e,t.object);return{matches:T,objMatch:T[0]||null,candidates:T.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...lc].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!E$(r,i,a))return{matches:[],objMatch:null,candidates:[],ambiguous:!1,unsupportedModifier:!0,traversal:`modifier "${t.modifier}" requested for a "${i}" query \u2014 no closure traversal exists for this combination yet`};if(r==="ask"){let T=Ln(e,t.subject,n),P=Ln(e,t.object,n);if(!T.match||!P.match||T.ambiguous||P.ambiguous)return{matches:[],objMatch:P.match,candidates:P.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(T.unresolvedPronoun||P.unresolvedPronoun)};let[V,Y]=[T.match,P.match];i==="touches"&&Y.class==="Commit"&&V.class!=="Commit"&&([V,Y]=[Y,V]);let te=lo[i],F=[...new Set(te?[...Rt(i),te]:Rt(i))],D=F.flatMap(B=>Ge(e,B)).filter(B=>B.subject===V.id&&B.object===Y.id);return{matches:D,answer:t.negated?D.length===0:D.length>0,objMatch:P.match,subjMatch:T.match,candidates:[],traversal:`${F.join("+")} edge from ${V.label} to ${Y.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Ln(e,t.object,n),t.altObject&&t.altObject!==t.object){let T=Ln(e,t.altObject,n),P=!!l.match&&!l.ambiguous,V=!!T.match&&!T.ambiguous;!P&&V?l=T:P&&V&&l.match.id!==T.match.id&&(l={...l,ambiguous:!0,candidates:[T.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let T=Y=>Y.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),P=T(String(t.object||"").trim().toLowerCase()),V=(e.individuals||[]).find(Y=>{if(Y.class!=="Module"||Y.id===l.match.id)return!1;let te=String(Y.label||"").toLowerCase().split("/").pop();return te!==T(te)&&T(te)===P});V&&(l={...l,ambiguous:!0,candidates:[V,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:m,nearestLabel:h}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:m,nearestLabel:h};if(d){let P=Nn([c,...u||[]]).slice(0,We).map(V=>{let Y=Vt(e,t,{contextId:n,prev:s,pinnedObjMatch:V});return{candidate:V,result:Y,rendered:gn(t,Y,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:P}}if(r==="where"){let T=(c.attributes||[]).find(P=>P.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:T,traversal:T?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let T=Y=>String((Y.attributes||[]).find(te=>te.key==="date")?.value||""),P;if(c.class==="Commit")P=[c];else{let Y=["touches","touchesSymbol"].flatMap(F=>Ge(e,F)).filter(F=>F.object===c.id),te=new Set;P=[];for(let F of Y){if(te.has(F.subject))continue;te.add(F.subject);let D=e.byId.get(F.subject);D&&D.class==="Commit"&&P.push(D)}P.sort((F,D)=>T(D).localeCompare(T(F)))}let V=P.length&&T(P[0])?[{kind:"event",class:"Commit",label:P[0].label,ids:[P[0].id],attrs:{date:T(P[0]).slice(0,10)},lane:"when"}]:[];return{matches:P,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whenShape:!0,referents:V,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit date first`}}if(r==="whoLast"){let T=F=>String((F.attributes||[]).find(D=>D.key==="date")?.value||""),P=["touches","touchesSymbol"].flatMap(F=>Ge(e,F)).filter(F=>F.object===c.id),V=new Set,Y=[];for(let F of P){if(V.has(F.subject))continue;V.add(F.subject);let D=e.byId.get(F.subject);D&&D.class==="Commit"&&Y.push(D)}Y.sort((F,D)=>T(D).localeCompare(T(F)));let te=Y.length&&T(Y[0])?[{kind:"event",class:"Commit",label:Y[0].label,ids:[Y[0].id],attrs:{date:T(Y[0]).slice(0,10)},lane:"whoLast"}]:[];return{matches:Y,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,referents:te,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return y$(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let T=lo[i],V=!!(T&&c.class&&ts.has(c.class))?[...new Set([...Rt(i),T])]:Rt(i);if(a&&a!=="Change"){let W=Lp(e,V),C=Ua[a];if(W.size&&!W.has(a)&&!(C&&W.has(C)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...W],traversal:`${V.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${Zn(a)})`}}let te=V.flatMap(W=>Ge(e,W)).filter(W=>W.subject===c.id).map(W=>e.byId.get(W.object)).filter(Boolean),F=Nn(te),D=F,B="";if(a&&a!=="Change"){D=F.filter(C=>C.class===a);let W=Ua[a];if(!D.length&&W){let C=F.filter(O=>O.class===W);C.length&&(D=C,B=`, widened to ${W} subjects (no ${a} recorded)`)}}return{matches:D,objMatch:c,candidates:u,traversal:`${V.join("+")} edges where subject = ${c.label}${B}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:no(e,c,{maxDepth:Sp}).flat().map(V=>e.byId.get(V.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${Sp})`};let g=lo[i]||Rt(i).find(T=>Rp.has(T))||null,b=!!(c.class&&ts.has(c.class));if(g&&(ts.has(a)||b)){let T=Ge(e,g).filter(B=>B.object===c.id),P=Nn(T.map(B=>e.byId.get(B.subject)).filter(Boolean)),V=!a||a==="Change"?P:P.filter(B=>B.class===a),Y="",te=Ua[a];if(!V.length&&te){let B=P.filter(W=>W.class===te);B.length&&(V=B,Y=`, widened to ${te} subjects (no ${a} recorded)`)}let F=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!Ge(e,"contains").some(B=>B.subject===c.id),D=F?e.byId.get(uo(e,c)||""):null;if(V.length||!(F&&D))return{matches:V,objMatch:c,candidates:u,traversal:`${g} edges where object = ${c.label}${Y}`,ambiguous:d,matchedVia:p}}let y=c,w=u,$=d,j=p,v="",x=Np(e,i);if(x&&y.class&&y.class!==x){let T=an(e,t.object,{expectedClass:x});if(T.match&&!T.ambiguous)y=T.match,w=T.candidates,$=T.ambiguous,j=T.matchedVia;else if(x==="Module"){let P=uo(e,y),V=P&&e.byId.get(P);if(V)v=`, refined from ${y.label} to its containing module`,y=V;else return{matches:[],objMatch:y,candidates:w,ambiguous:$,matchedVia:j,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${Zn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Zn(x)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:$,matchedVia:j,wrongGrainMiss:!0,wantClass:x,traversal:`"${t.object}" resolved to ${Zn(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${Zn(x)})`}}let k=Rt(i).flatMap(T=>Ge(e,T)).filter(T=>T.object===y.id);i==="cochange"&&(k=k.concat(Rt(i).flatMap(T=>Ge(e,T)).filter(T=>T.subject===y.id).map(T=>({...T,subject:T.object,object:T.subject}))));let _="";if(!k.length&&y.class){let T=`ext:${String(y.label).toLowerCase()}`;k=Rt(i).flatMap(P=>Ge(e,P)).filter(P=>String(P.object).toLowerCase()===T),k.length&&(_=` (by name, via unresolved ${T} references)`)}let R=[],S=new Set;for(let T of k){let P=e.byId.get(T.subject);P&&!S.has(P.id)&&(S.add(P.id),R.push(P))}let A,L="";if(!a||a==="Change")A=R;else{let T=R.filter(P=>P.class===a);if(T.length)A=T;else if(a!=="Module"&&R.some(P=>P.class==="Module")){let P=new Set(R.filter(V=>V.class==="Module").map(V=>V.id));A=cc(e,P,a),L=`, then ${Zn(a)} defined in the matched module(s)`}else A=[]}return{matches:A,objMatch:y,candidates:w,traversal:`${Rt(i).join("+")} edges where object = ${y.label}${_}${L}${v}`,ambiguous:$,matchedVia:j}}function sr(e){if(e.class==="Module")return e.label;let t=(e.attributes||[]).find(s=>s.key==="site")?.value;if(t)return String(t).split(":")[0];let n=String(e.id||"").match(/^fn:(.+)#/);return n?n[1]:null}function qa(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function _$(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function hn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function er(e){let t=e.object??e.subject??"?";return`${e.entityType?Fe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function Qa(e){return Mo[e]?.bare||e}function R$(e){let t=Qa(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function A$(e){if(!Array.isArray(e.atoms)||e.atoms.length!==2)return null;let[t,n]=e.atoms;if(t.op!=="seed"||t.ast?.node!=="allOfClass"||n.op!=="difference")return null;let s=Fe(e.entityType,2);if(n.kind==="qual")return`${s} that are not ${n.filters.join(" and not ")}`;if(n.kind!=="set"||!n.ast)return null;if(n.ast.node==="existsEdge")return`${s} that do not ${Qa(n.ast.kind)} anything`;let o=n.ast.node==="clause"?n.ast.clause:n.ast;if(!o||o.node||!o.kind)return null;let r=o.object??o.subject;return r==null?null:`${s} that do not ${Qa(o.kind)} ${JSON.stringify(String(r))}`}function Jp(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(er).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>Jp(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?A$(e):null)||`a compositional query (${e.node})`,machine:`composite(${e.node})`};let t=r=>JSON.stringify(String(r??"")),n=[];e.kind&&n.push(e.kind),e.negated&&n.push("negated"),e.entityType&&n.push(`entityType=${e.entityType}`),e.modifier&&e.modifier!=="direct"&&n.push(`modifier=${e.modifier}`),e.subject!=null&&n.push(`subject=${t(e.subject)}`),e.object!=null&&n.push(t(e.object));let s=`${e.shape}(${n.join(", ")})`,o;if(e.shape==="ask")o=`does "${e.subject}" ${e.negated?"not ":""}${Rs(e.kind)} "${e.object}"?`;else if(e.shape==="meta")o=`what does "${e.object}" mean, in this graph's own vocabulary?`;else if(e.shape==="mentions")o=`where is "${e.object}" mentioned?`;else if(e.shape==="where")o=`where is "${e.object}" defined?`;else{let r=e.entityType?Fe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${Rs(e.kind)}`:`${r}${Rs(e.kind)} "${e.object}"`}return{english:o,machine:s}}function gn(e,t,n=null){let s=Qp(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function Qp(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${ac()}`,miss:!0,ambiguous:!1};if(e.node)return h$(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
55
- ${t.branches.map((l,c)=>`${c+1}) as ${er(l.parsed)}: ${l.rendered.content}`).join(`
53
+ `)}`+(o.length>Oa?`
54
+ \u2026+${o.length-Oa} more`:"")}var rd,wd,cd,Tw,Ow,Aa,Iw,Hr,Lw,Nw,Mw,$d,Pw,Fw,Dw,zw,Bw,Uw,Ww,Gw,Vw,qw,Hw,Kw,Yw,Xw,Jw,Qw,Zw,ey,ty,ny,sy,oy,ry,iy,ay,ld,cy,ly,xd,kd,Ed,uy,dy,py,fy,my,dd,pd,by,fd,Vr,md,hd,gd,Xo,Me,yy,vy,Id,$y,Ft,Pd,xy,Hd,Ey,Sy,jy,_y,Ry,Ay,Ty,Cy,Ta,bd,Xr,Oy,Ca,Oa,Ie=L(()=>{Yn();Ss();Ea();Yo();_s();rd={"mgx:importsnamespace":"imports","mgx:callscoarse":"calls","seon:declaresmethod":"defines","mgx:testscoverage":"tests","mgx:touchedbycommit":"touches","seon:containscodeentity":"contains","seon:hassupertype":"inherits","mgx:changecoupledwith":"cochange","mgx:reexports":"reexports","mgx:serves":"serves","mgx:denotes":"denotes","mgx:touchessymbol":"touchesSymbol","mgx:callssymbol":"callsSymbol","seon:usescomplextype":"imports","seon:invokesmethod":"calls","seon:history":"touches","mgx:subclassof":"inherits","mg:imports":"imports","mg:calls":"calls","mg:defines":"defines","mg:tests":"tests","mg:touches":"touches","mgx:saidinsession":"saidInSession","mgx:inreplyto":"inReplyTo","mgx:statedby":"statedBy","mgx:canonicalisedfrom":"canonicalisedFrom"};wd=e=>/^(git|turn):/.test(String(e||""));cd=30,Tw=8;Ow=2,Aa=25,Iw=3;Hr=10,Lw=8,Nw=3,Mw=2,$d=5,Pw=4,Fw=.2,Dw=.35,zw=.15,Bw=e=>/(^|\/)(examples?|fixtures?|samples?|demos?|benchmarks?|test-[^/]+)(\/|$)/.test(e),Uw=.2,Ww=.35,Gw=.2,Vw=.35,qw=e=>/\.cs$/i.test(e),Hw=e=>/^I[A-Z]/.test(String(e||"")),Kw=.2,Yw=.35,Xw=50,Jw=.2,Qw=.35,Zw=.5,ey=$d,ty=3,ny=4,sy=1,oy=.9,ry=.5,iy=.2,ay=.35,ld=4,cy=2,ly=[["imports"],["calls","callsSymbol"],["inherits"],["cochange"]],xd=3,kd=12,Ed=.9,uy=["imports","calls","callsSymbol","inherits"],dy=.5,py=.6,fy=.2,my=.35;dd=128,pd=4,by=64,fd=250,Vr=class extends Error{};md=new WeakMap;hd=40,gd=40,Xo=30;Me=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value||"";yy=25,vy=15;Id=40,$y="tests edges are recorded module to module, so this is module-grain coverage.";Ft=15;Pd=new Set(["Function","Method"]);xy=8;Hd={function:"Function",class:"Class",method:"Method",attribute:"Attribute"};Ey=8,Sy=16,jy=4,_y=6,Ry=12,Ay=2,Ty=8,Cy=3,Ta=e=>String(e||"").split(",").map(t=>t.trim()).filter(Boolean),bd=e=>String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean),Xr=e=>{let t=String(e||"").trim();return t?t.split(",").map(n=>n.trim()).filter(Boolean).length:0},Oy=e=>{let t=new Map,n=e[0]??0,s=0;for(let o of e){let r=(t.get(o)||0)+1;t.set(o,r),r>s&&(s=r,n=o)}return n};Ca=20;Oa=40});function Xe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ip(e){let t=String(e||"");return ep&&(t=t.replace(ep," ")),t.replace(/\s+/g," ").trim()}function ap(e){let t=String(e||"");t=t.replace(Zy," ").replace(/\s+/g," ").trim();for(let n=0;n<3;n++){let s=t,o=t.match(Xy);if(o&&(t=o[1].trim()),o=t.match(Jy),o&&(t=o[1].trim()),o=t.match(tp),o&&(t=o[1].trim()),o=t.match(np),o&&(t=o[1].trim()),o=t.match(sp),o&&(t=o[1].trim()),o=t.match(Qy),o&&(t=o[1].trim()),o=t.match(op),o&&(t=o[1].trim()),o=t.match(ev),o&&(t=o[1].trim()),o=t.match(tv),o&&Xn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(nv),o&&Xn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(sv),o&&Xn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(ov),o&&Xn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(rv),o&&Xn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(iv),o&&Xn.test(o[1].trim())&&(t=o[1].trim()),o=t.match(av),o&&(t=`what ${o[2].toLowerCase()} ${o[1].trim()}`),o=t.match(cv),o&&(t=`what does ${o[1].trim()} mean`),o=t.match(lv),o){let r=o[1].trim();Yy(r)||(t=!uv.test(r)&&(qy.test(r)||Xn.test(r))?r:`describe ${r}`)}if(o=t.match(dv),o){let r=o[1].trim();(Xn.test(r)||pv.test(r)||op.test(r)||tp.test(r)||sp.test(r)||np.test(r)||fv.test(r))&&(t=r)}if(t===s)break}return t}function gv(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t,o=t.match(mv);if(o&&(t=o[1].trim()),o=t.match(hv),o&&(t=o[1].trim()),t===s)break}return t}function wv(e){let t=String(e||"");for(let n=0;n<3;n++){let s=t.match(bv);if(!s)break;let o=s[1].trim();if(!o||o===t)break;t=o}return t}function $v(e){let t=String(e||""),n=t.match(vv);if(n){let o=lp[n[1].toLowerCase()],r=cp[n[2].toLowerCase()];return`${o} ${r} ${n[3].trim()} and ${n[4].toLowerCase()}`}let s=t.match(up);return s?`which modules transitively import ${s[1].trim()}`:t}function Qr(e){return String(e||"").replace(Fy,t=>ma[t.toLowerCase()])}function As(e){let t=Qr(e);return t=t.replace(Dy,n=>ha[n.toLowerCase()]),t=t.replace(zy,n=>ga[n.toLowerCase()]),t=t.replace(By,"with"),t=t.replace(Uy,(n,s)=>`${s} for`),t=t.replace(Wy,(n,s)=>`for ${s}`),t=t.replace(Gy,(n,s)=>s),t=t.replace(xv,"$1$2"),t=t.replace(Nu,"$1ing"),t=ap(t),t=wv(t),t=gv(t),t=$v(t),t=ip(t),t=en(t),t=t.replace(/\?{2,}\s*$/,"?"),t.replace(/\s+/g," ").trim()}function Jo(e){for(let t of[...Pu,...Mu]){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function Da(e){for(let t of kv){let n=e.match(t.re);if(n)return t.to(n).replace(/\s+/g," ").trim()}return e}function dp(e){let t=String(e||"").match(Ev);if(!t)return null;let n=t[1].toLowerCase(),s=t[2].trim();return s?{entWord:n,predicate:s}:null}var Py,Fy,rp,Dy,zy,By,Uy,Wy,Gy,Vy,ep,qy,Xn,Hy,Ky,Yy,Xy,Jy,tp,np,sp,Qy,Zy,ev,tv,nv,sv,ov,rv,iv,av,cv,lv,uv,dv,pv,fv,op,mv,hv,bv,cp,lp,yv,vv,up,xv,kv,Ev,lt,nn,he,Jn=L(()=>{An();Py=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Xe).join("|")+")\\b","gi"),Fy=Py(ma),rp=e=>new RegExp("\\b("+Object.keys(e).sort((t,n)=>n.length-t.length).map(Xe).join("|")+")\\b(?!\\.[a-z0-9])","gi"),Dy=rp(ha),zy=rp(ga),By=/(?<=^|\s)w\/(?=\s|$)/gi,Uy=/\b(thx|thanks|thank\s+you|many\s+thanks|ty|cheers)\s+4\b/gi,Wy=/\b4\s+(example|instance)\b(?!\s*[a-z])/gi,Gy=/\b(this|that)\s+(class|module|function|method|attribute|variable|file|commit)\b/gi,Vy=Object.keys(de).sort((e,t)=>t.length-e.length).map(Xe).join("|"),ep=Wo.length?new RegExp("\\b("+[...Wo].sort((e,t)=>t.length-e.length).map(Xe).join("|")+")\\b\\s*,?","gi"):null;qy=new RegExp("\\b(?:"+Object.keys(de).sort((e,t)=>t.length-e.length).map(Xe).join("|")+")\\b","i"),Xn=/^(?:which|what|who|whose|where|when|why|how)\b/i,Hy=new Set(["modules","files","packages","functions","methods","classes","attributes","fields","properties","variables","globals","commits","changes","tests","members"]),Ky=/^(?:all\s+|the\s+)?(?:module|file|package|function|method|class|attribute|field|property|variable|global|commit|change|test|member)\??$/i,Yy=e=>{if(Ky.test(e))return!0;let t=e.replace(/\?+\s*$/,"").trim().split(/\s+/);return Hy.has((t[t.length-1]||"").toLowerCase())},Xy=/^(?:hi|hiya|hello|hey|yo|howdy|g'?day|yeah\s+nah|good\s+(?:morning|afternoon|evening|day)|greetings|salutations)(?:\s+(?:there|pardner|folks|friend|mate))?\s*[,.—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,Jy=/^(?:thanks|thank\s+you|many\s+thanks|thx|ty|cheers)(?:\s+(?:so\s+much|a\s+lot|very\s+much|a\s+bunch))?\s*[,—–-]\s*(?:(?:just\s+a\s+)?quick\s+question\s*[,:—–-]?\s*)?(.+)$/i,tp=/^(?:(?:ok(?:ay)?|aight|cool|alright|sure|right|fine|great|nice|got it|gotcha|sounds good|no worries|no problem|(?:just\s+)?(?:one|another)\s+more|another\s+one)[\s,]+)+(.+)$/i,np=/^(?:just\s+(?:poking\s+around|looking\s+around|browsing|exploring|checking\s+(?:this|it)\s+out)|first\s+time\s+(?:trying\s+this\s+out|using\s+this|here)|i'?m\s+new\s+(?:here|around\s+here|to\s+(?:this|all\s+this)(?:\s+(?:repo|codebase|project|app|tool|thing))?))\s*[,.—–-]\s*(.+)$/i,sp=/^(?:(?:maybe|possibly|perhaps)\s+)+(.+)$/i,Qy=/^(?:please[\s,]+)+(.+)$/i,Zy=/,?\s*if\s+(?:it'?s|it\s+is|that'?s|that\s+is)\s+not\s+too\s+much\s+(?:trouble|bother|hassle)\s*,?\s*/i,ev=/^(?:can|could|would|will)\s+you\s+(?:please\s+)?(.+?)(?:[,\s]+please)?\??$/i,tv=/^explain\s+(?:to\s+me\s+|please\s+)*(.+?)\??$/i,nv=/^tell\s+me\s+(?:please\s+)?(.+?)\??$/i,sv=/^(?:(?:would|do)\s+you\s+)?mind\s+telling\s+(?:me|us)\s+(?:please\s+)?(.+?)\??$/i,ov=/^do\s+you\s+know\s+(.+?)\??$/i,rv=/^i(?:'d|\s+would)?\s+(?:(?:like|want|need)\s+to|wanna)\s+know\s+(.+?)\??$/i,iv=/^i(?:\s+was|\s+am|'m)?\s+(?:just\s+)?(?:wonder(?:ing|ed)?|curious)(?:\s+(?:if|whether|about))?\s+(.+?)\??$/i,av=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+(is|are)\??$/i,cv=/^what\s+((?:an?\s+|the\s+)?[\w'-]+(?:\s+[\w'-]+){0,2})\s+means\??$/i,lv=/^(?:show|give)\s+me\s+(?:the\s+)?(.+?)\??$/i,uv=/^everything\s+i(?:'d|\s+would)?\s+need\b/i,dv=/^(?:and|also|so|then|now|but)\s+(.+)$/i,pv=/^(?:does|do|did|is|are|was|were|has|have|had|can|could|will|would|should)\b/i,fv=/^(?:the|its|their|his|her|our|my)\s+[\w'-]+(?:\s+[\w'-]+){0,2}\s+(?:that|which|who)\s+\S/i,op=/^(?:(?:actually|no\s+wait|wait|hold\s+on|never\s+mind|scratch\s+that|on\s+second\s+thought|i\s+mean(?:t)?)[\s,.]+)+(.+)$/i;mv=/^(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+?,\s*(.+)$/i,hv=/^(.+?),\s*(?:since|although|(?:even\s+)?though|while|because|whereas|given\s+that|now\s+that)\s+.+$/i;bv=/^.+?(?:\s*(?:--|—|-)\s*)?\b(?:sorry|i\s+mean)\b\s*(?:--|—|-|,|:)\s*(.+)$/i;cp=Object.freeze({imports:"importing",calls:"calling",touches:"touching",tests:"testing",exports:"exporting",contains:"containing",defines:"defining",uses:"using","inherits from":"inheriting from"}),lp=Object.freeze({module:"modules",class:"classes",function:"functions",method:"methods",attribute:"attributes",variable:"variables",commit:"commits",file:"files"}),yv="public|private|protected|static|abstract|constant|re-?exported|exported|tested|covered|untested|uncovered",vv=new RegExp("^if\\s+(?:a|an|the)?\\s*("+Object.keys(lp).join("|")+")\\s+("+Object.keys(cp).join("|")+")\\s+(.+?),\\s*(?:is|are)\\s+(?:it|that|they|this)\\s+("+yv+")\\??$","i"),up=/^if\s+(.+?)\s+(?:were|was)\s+(?:deleted|removed),?\s*what\s+(?:would|might|could)\s+(?:break|fail|be\s+affected)\??$/i;xv=new RegExp(`^(where\\s+(?:is|are|was|were)\\s+.+?)\\s+(?:${Ou.map(Xe).join("|")})(\\s*[?.!]*)$`,"i");kv=Object.freeze([{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:are|is)\s+(?:in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:does|do)\s+(.+?)\s+have\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+are\s+(?:the\s+)?(?:functions?|methods?|members?|attributes?|fields?|properties)\s+(?:of|in|inside|within)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^(?:the\s+)?(?:members?|methods?|attributes?|contents)\s+of\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+else\s+is\s+(?:in|inside)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`what does ${e[1]} contain`},{re:/^what\s+(?:defined|declared)\s+(?:the\s+)?(?:function\s+|method\s+|class\s+|module\s+|variable\s+|constant\s+)?(.+?)\??$/i,to:e=>`where is ${e[1]} defined`},{re:/^where'?s\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^were\s+is\s+(?:the\s+)?(.+?)\s+(defined|declared|located|implemented)\??$/i,to:e=>`where is ${e[1]} ${e[2]}`},{re:/^what\s+is\s+the\s+purpose\s+of\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\??$/i,to:e=>`what is a ${e[1]}`},{re:new RegExp(`^what\\s+does\\s+(?:the\\s+)?(?!(?:an?|it|this|that|these|those)\\s)(.+?)\\s+do\\s+(?:${fa.map(Xe).join("|")})\\??$`,"i"),to:e=>`what is a ${e[1]}`},{re:/^(?:which|what)\s+(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:are|is)\s+(public|private|protected|static|abstract|constant|exported|re-?exported|tested|covered|untested|uncovered)\??$/i,to:e=>`${e[2].toLowerCase()} ${e[1].toLowerCase()}`},{re:/^what\s+(?:is|are)\s+(not\s+)?(tested|untested|covered|uncovered)\??$/i,to:e=>{let t=e[2].toLowerCase();return`${e[1]?t==="tested"?"untested":t==="covered"?"uncovered":t:t} modules`}},{re:/^what\s+does\s+(.+?)\s+changes?\s+together\s+with\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^what\s+changes?\s+together\s+with\s+(.+?)\??$/i,to:e=>`what co-changes with ${e[1]}`},{re:/^how\s+many\s+commits\s+(?:are|were)\s+(?:recorded|logged)\s+(?:for|against)\s+(?:the\s+)?(.+?)\??$/i,to:e=>`how many commits touched ${e[1]}`},{re:/^who\s+(?:wrote|authored)\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^who\s+is\s+the\s+authors?\s+of\s+(?:the\s+)?(?!(?:commit\s+)?[0-9a-f]{7,40}\??$)(.+?)\??$/i,to:e=>`who touched ${e[1]}`},{re:/^(?:does|do)\s+(?!.*\bnot\b)(.+?)\s+have\s+(?:any\s+)?(?:tests?|test\s+coverage|coverage)\??$/i,to:e=>`what tests ${e[1]}`},{re:/^(?:is|are)\s+(?!.*\bnot\b)(.+?)\s+tested\??$/i,to:e=>`what tests ${e[1]}`},{re:/^what\s+needs\s+(?:to\s+be\s+)?(?:a\s+)?(?:tested|tests?|testing|coverage|covering)\??$/i,to:()=>"untested modules"},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+(?:(?:that|which)\s+)?(?:have|has|having|with)\s+no\s+tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:/^(?:which|what|list|show(?:\s+me)?|find)?\s*(?:the\s+|all\s+)?([a-z][a-z-]*?)\s+without\s+(?:any\s+)?tests?\??$/i,to:e=>`untested ${e[1].toLowerCase()}`},{re:new RegExp(`^(?:do|does)\\s+(.+?)\\s+(${Vy})\\s+(?:anything|something)(?:\\s+else)?\\??$`,"i"),to:e=>`what does ${e[1]} ${e[2]}`}]);Ev=new RegExp("^(?:which|what|who|list|show(?:\\s+me)?|find|give\\s+me)?\\s*(?:the\\s+|all\\s+)?([a-z][a-z-]*)\\s+(?:(?:that|which|who)\\s+)?(?:(?:do|does|did|are|is|was|were|have|has|can|could|will|would|should)\\s+not|cannot|can't|won't|couldn't|shouldn't|wouldn't|not)\\s+(.+)$","i");lt=new Set(["what","who","which","where","when","why","how","does","do","did","is","are","was","were","the","a","an","of","to","from","at","in","on","there","something","anything","nothing","one","any","anywhere","last","usually","typically","generally","normally","often","commonly","mostly","should","would","could","can","will","shall","might","must"]),nn=e=>String(e).replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),he=e=>e.flatMap(t=>String(t).toLowerCase().split(" "))});var fp,pp=L(()=>{fp={source:"corpus/wordnet/*.jsonl lemmas, expanded through the regular -s/-ed/-ing inflections",generator:"scripts/generate-real-word-collisions.mjs",targets:["alongside","build","builds","built","call","calling","calls","change","changed","changes","check","checks","class","co-change","co-changes","code","commits","contain","containing","contains","couple","couples","cover","covers","declare","declares","define","defined","defines","defining","denote","denotes","denoting","depends","derive","derives","directly","edited","execute","executes","exercise","exercises","explicitly","export","exporting","exports","expose","exposes","extend","extending","extends","fire","fires","from","grab","grabs","have","hits","hold","holds","hooked","import","importing","imports","included","indirectly","inherit","inheriting","inherits","inside","into","invoke","invokes","kick","kicks","kind","land","landed","lean","leans","live","lives","make","makes","modified","modifies","move","moves","parent","part","pass","passes","pull","pulls","re-export","re-exports","reference","references","relies","rely","require","requires","runs","serve","serves","serving","share","shares","sits","subclass","subclasses","subclassing","superclass","superclasses","sure","talk","talks","tend","tends","test","testing","tests","through","together","touch","touched","touches","touching","transitively","trigger","triggers","tweaked","updated","uses","using","usually","verifies","verify","went","were","wired","with"],words:["aalging","aasing","aave","ablies","abling","aboves","absing","abuses","abusing","acauling","achinged","acolds","acquire","acquires","acyling","adelies","adenine","adenined","adenines","adenining","adenota","adenotaing","adenotas","aditted","aerides","aerified","aerifies","aerify","aerying","affine","affined","affines","affining","afire","afires","afling","agalling","ailing","aired","airied","airies","airport","airporting","airports","airsed","airses","airted","alaing","alases","albing","alecks","aleves","aliaes","alikes","alines","alive","alives","allaing","allies","alling","alls","allying","alongsided","alongsides","alping","alting","altogether","amasses","amazes","amends","amorting","amorts","amuses","amusing","analling","anded","anoded","ansing","anuses","apart","aparts","apises","apparent","appends","appose","apposes","apsing","apsises","arab","arabis","arabs","ardent","argent","arpent","arrive","arrives","arsing","asaing","asding","aseans","ases","ashing","ashore","ashores","asing","asking","asping","asring","asses","assess","assets","assing","assure","attending","attest","attesting","attests","audited","aufing","auging","auking","aurifies","aurify","avouch","avouched","avouches","avouching","awaked","awakes","awared","awares","awling","awried","axling","baases","badded","bailed","bailing","baited","bake","bakeds","bakers","bakes","balded","balding","baling","balk","balking","balks","ball","balling","balls","ballsing","ballying","balming","band","banded","bandeds","bandied","bandsed","banked","banned","barded","barelies","barely","barses","bart","baseses","bashes","basing","basises","bass","bassed","basses","basset","bassets","bassos","bastes","basting","batses","bauded","baulks","bawded","bawling","bbsing","beaked","bean","beanos","beans","beasting","beasts","beating","beeting","begild","begilds","behave","behold","beholds","belied","belief","beliefs","belies","belikes","belizes","belles","bellies","belling","belting","bend","bended","bends","bent","berging","bering","berking","berming","beroes","besets","besots","besses","bessing","best","besting","bests","beting","betting","bevies","bhanged","biered","bigger","biggers","billing","bind","binded","birded","birled","birles","biroed","birred","bising","bjsing","bladed","blanced","bland","blanda","blandaed","blanded","blands","blanked","blares","blases","blasts","bleaked","bleaks","blears","bleats","blended","blends","blesting","blests","blinded","blinds","blited","blites","bloked","blonded","bmuses","bnsing","boched","boches","boching","bocked","bode","bodilied","bodilies","boiled","boileds","bokked","bold","bolds","bolling","bonded","boners","bonked","boobed","booked","bookeds","bookend","booker","bookied","booksed","boomed","booned","boored","booted","boozed","borers","borough","bosked","bosses","botched","botches","botching","boucheed","bouchees","boucle","boucled","boucling","boughed","boughing","boules","boulle","boulles","bouses","bousing","bowers","boxers","bpsing","bragger","braggers","brakes","branded","brasses","breaked","breves","breving","bricks","brigged","brills","broked","brooked","bruins","brunts","brunus","bses","bsing","bugled","bugles","buhled","builders","buildups","bull","bulled","bullet","bulling","bulls","buns","bunses","bunsing","buried","burieds","burled","burleds","buses","bushes","bushing","busied","busies","busking","bussing","busying","buyied","buying","bypass","bypasses","caballing","cabals","cabbing","cabers","cabged","cabging","cables","cablin","cabling","cablins","caching","cackling","cadded","cadding","cadent","cadged","cadges","cadging","cadring","cafers","caffing","cafing","cagers","caging","cagying","caining","cajoling","cake","cakes","cakiling","caking","calcine","calean","caleans","caleying","caleys","calf","calfing","calfs","califs","calkin","calking","calkins","callaing","callas","callers","callinged","callings","callous","callowing","callows","calluna","callus","calm","calming","calmings","calmlying","calms","calquing","calvaing","calvas","calves","calving","calvings","calx","calxes","calxing","calycling","calyxing","camass","camelling","camels","camming","camoing","camping","canaing","canalling","canals","candid","candied","candled","candling","cangue","cangued","cangues","caning","canning","canoes","canting","cantling","capers","caping","caplin","caplins","capoing","capping","captain","captaining","captains","carded","carding","caring","carking","carlina","carline","carling","carlings","carlos","carning","caroling","carolling","carols","carping","carring","cart","carting","carver","carvers","carves","casaing","cashes","cashing","casking","cassies","castes","castling","casually","casuses","caters","catling","catlings","catses","catsing","catting","cattling","caul","cauline","cauling","caulking","cauls","cavaing","cave","caverns","cavilling","cavils","caving","cavying","cawing","caying","ceases","cecalling","cede","cedied","ceiling","cell","celling","celloing","cellos","cells","cellsing","cent","cercises","cere","cering","cerise","cerises","ceroing","cerring","certain","certaining","certains","certifies","certify","cervina","cervus","cfling","cgsing","chadded","chafed","chaffed","chafinged","chagaed","chagas","chagga","chaggaed","chaggas","chained","chainsed","chainses","chaired","chaise","chaised","chaises","chaited","chaits","chajaed","chalked","chalking","challis","champed","chanal","chanals","chanar","chanars","chance","chanced","chancels","chances","chancied","chancies","chancre","chancred","chancres","chancy","changers","channels","chanted","chanters","chanteys","chantied","chanties","chanty","chaosed","chaoses","chapped","charded","chards","charge","charged","chargers","charges","charied","charmed","charms","charred","charrs","charted","charts","chased","chasmed","chasms","chassed","chaste","chasted","chastes","chatted","chaunaed","chaused","chauses","chawed","cheaps","cheats","checkeds","checkers","checksum","checkups","cheek","cheeks","cheeps","chelas","chenned","cheops","cherts","chesting","chewas","chianed","chick","chicks","chigger","chiggers","chiling","chilling","chills","chinaed","chined","chines","chinked","chinks","chinned","chinoed","chirks","chits","chives","choanaed","chock","chocked","chocks","choked","choker","chokers","choler","cholers","chonned","choosed","chords","chores","chough","chuaned","chuck","chucks","chugged","chunga","chungaed","chungas","chunked","chunks","chyling","cialis","cicers","ciders","circed","circes","cive","cives","civies","cladded","claded","clades","clading","clads","claims","clamps","clams","clamses","clanged","clangers","clanks","clans","claps","clarks","claros","clash","clashes","clasp","clasps","classed","classic","classy","clast","clasts","clausa","clausas","clause","clauses","claver","clavers","clavus","clawing","claws","claying","clays","clean","cleans","cleanse","clerks","clever","clevers","cliing","climes","clinged","cloaks","clocks","closer","closers","closes","cloved","cloven","clovens","clover","clovers","clucks","cluing","clving","clxing","cnsing","coached","coaches","coaching","coaling","coasts","coaxer","coaxers","cobber","cobbers","cobble","cobbles","cocain","cocaining","cocains","cocked","cocker","cockers","cockle","cockles","coda","codaed","codded","coddles","coded","coders","codes","codex","codgers","codified","codifies","codling","cods","coed","coeurs","coffer","coffers","coggle","coggles","coheres","coiling","coiner","coiners","coired","coke","colaing","cold","colded","colding","colds","cole","coleus","coliing","coling","colling","collins","collying","colors","coltan","coltanning","coltans","colter","colters","colting","comalling","combats","comber","combers","come","comer","comers","comfies","comfit","comfits","comics","comints","comity","commas","comments","commes","commie","commied","commies","comming","commit","commix","commixes","commons","commute","commutes","compel","compels","compile","compiles","complies","comply","comport","comporting","comports","conched","conches","conching","concluded","cone","coneys","confer","confers","confining","confits","conged","conger","congers","conges","conjoin","conjoining","conjoins","conked","conker","conkers","constrain","constraining","constrains","contact","contacting","contacts","contadinoing","contadinos","contagion","contagioning","contagions","containeds","containers","contemn","contemning","contemns","continuing","contrail","contrailing","contrails","contriting","contriving","converse","converso","converts","convex","convey","conveys","convoke","convokes","cooked","cookeds","cookers","cookied","cooled","cooler","coolers","cooling","cooned","cooped","cooper","coopers","cooted","cooter","cooters","copalling","cope","copeck","copecks","copier","copiers","copies","copper","coppers","copses","copula","copulas","coralling","corded","core","coreference","coreferences","corer","corers","corked","corker","corkers","corner","corners","corpse","corpses","corvee","corvees","cosecs","cosher","coshers","cosmics","cosmids","cosses","costing","cotanning","cotans","cote","cotter","cotters","couch","couched","couches","couching","coude","couded","coue","coughed","coughing","coupe","coupes","coupleds","couplers","couplets","coupon","coupons","course","courses","couthed","couthing","coved","coven","covens","covereds","coverts","covet","covets","covey","coveys","cower","cowers","cowling","cowpie","cowpies","cozens","cpsing","crab","crabs","cracks","cradling","cragged","crakes","craned","cranes","cranked","cranned","crass","crasses","crawling","crawls","creaked","creaks","credited","creeks","cresting","crests","criers","cringe","cringed","cringes","crocks","crooked","crouch","crouched","crouches","crouching","croupe","croupes","crumple","crumples","cruses","crusing","cses","csing","ctened","ctenes","cubing","cuking","culling","culming","culting","cupalling","cupels","cupsing","cupule","cupules","cure","curing","curling","curses","cursing","curtain","curtaining","curtains","curves","curving","cusking","cusping","cussing","cuting","cutlass","cutses","cutsing","cxling","cxlving","cyanned","cyanoed","cycling","cyders","cymling","cysting","dadded","dahling","dailing","daises","daling","dall","dalliing","dalling","dallis","dalls","dallying","daloing","danced","dander","dandied","dandled","danked","dansed","danses","darded","darling","dart","dashes","dassed","dassies","dative","datives","dayses","ddsing","deafened","deafening","deafing","deaing","dealting","dean","deaned","deaning","deans","dearie","dearies","debate","debates","debating","debiled","debiling","deboned","debrises","debted","decade","decades","decalling","decease","deceases","deceive","deceives","decents","decided","deciding","deciled","deciling","declaim","declaims","declareds","declarers","declaw","declined","declining","decocting","decodes","decoding","decoing","decoke","decokes","decoking","decouple","decouples","decoying","decries","deepens","deface","defaced","defaces","defacing","defame","defamed","defames","defaming","defang","defanged","defanging","defangs","defence","defenced","defences","defencing","defended","defending","defends","defensed","defenses","defensing","deference","deferences","deferenses","defiance","defianced","defiances","defiancing","defiant","defianted","defianting","defiants","defied","defies","defile","defiled","defilers","defiles","defiling","defininged","definings","definited","definites","definiting","deflate","deflates","deftness","defuse","defused","defuses","defusing","deglaze","deglazes","deicing","deified","deifying","deigned","deigning","deisted","deists","deitied","delete","deletes","deleting","delfing","delfting","deliing","delivers","delling","delving","demands","demised","demising","demode","demodes","demoding","demoing","demote","demotes","demoting","dengue","dengues","denguing","denied","denned","denotives","denotiving","densaing","denses","densing","dent","dentate","dentates","dentating","dente","denteds","dentes","dentin","dentined","dentines","denting","dentining","dentins","denude","denudes","denuding","denying","depart","depend","depended","deplane","deplanes","deplore","deplores","deponed","deposing","depotting","deprave","depraves","deprive","depriveds","deprives","depute","deputes","deputing","derating","derbies","deride","derides","deriding","derisive","derisives","deriveds","dermises","derpies","derping","derring","derrises","derving","descends","deserve","deserves","deserving","designed","designing","desired","desiring","desking","desponds","dessing","destined","destines","destining","destiny","detained","detaining","detents","detest","detesting","detests","detinue","detinued","detinues","detinuing","detoxes","detoxing","deuses","deusing","deveined","deveining","deviced","devicing","deviled","devised","devising","devote","devoteds","devotees","devotes","devoting","devouting","dewied","dewiness","dewing","dexoned","dhalling","dholed","dholes","dick","dicks","dieted","digger","diggers","dilling","dining","dinted","dinting","dire","direct","directed","director","directory","directs","dired","dires","dirged","dirges","dirked","disport","disporting","disports","disses","ditaed","ditted","dive","dives","divest","divine","divined","divines","divining","dmuses","docked","doleds","dolling","domine","domined","domines","domining","donate","donates","donating","doobed","doomed","doored","dopeds","dories","dorked","dosing","dosses","doting","double","doubles","douched","douches","douching","doughed","doughing","douses","dousing","dove","doves","dowers","dozers","drab","drabas","drabs","dragger","draggers","drained","draining","drakes","dranged","drecks","drilies","drive","drivels","drivens","drivers","drives","drover","drovers","drunks","druses","drusing","drylies","dses","dsing","dsling","dtsing","ducing","duding","dudses","dudsing","duking","dulies","dull","dulling","dulls","dulses","dulsing","duning","duns","duoing","duping","duples","during","dusking","eagling","earling","earses","easies","easing","easted","easting","eating","eatses","ebitted","ebooked","ebsing","ebving","echted","eclats","ecting","eddaed","eddied","eddoed","edgied","edibled","edicted","editeds","editor","editted","edsing","edtaed","educed","eduled","eelses","eerilies","eerily","eerying","effort","efforting","efforts","efting","egesting","egests","eidoses","eiraed","elan","eland","elanded","elanned","elans","elanus","elated","elegans","elided","elinted","elited","elling","elocute","elocutes","elopses","elsing","eluted","elvers","emending","emiled","emitted","emoted","emoting","emsing","enated","enates","enating","encode","endived","ends","energise","energises","enquire","enquires","ensile","ensure","entendring","ententing","epopses","eposes","equally","equine","equines","eraing","erectly","erging","erning","eroses","erring","ersted","ersting","erudited","erying","escort","escorting","escorts","eses","esing","esports","esportsing","espouse","espouses","esquire","esquires","esting","ests","eternise","eternises","ethoses","evicted","evoked","evokes","exceed","exceeding","exceeds","exchange","exchanged","exchanges","excite","excited","excites","excluded","execrate","execrates","executeds","executive","executives","executors","exegete","exegetes","exercisers","exerciseses","exerting","exerts","exhort","exhorting","exhorts","exiled","existed","exitted","exodes","exorcise","exorcisers","exorcises","exorcism","exorcisms","exorcist","exorcists","exorcize","exorcizes","expand","expanding","expands","expanse","expanses","expats","expatting","expect","expecting","expects","expend","expending","expendings","expends","expense","expenses","expensing","expert","experting","expertise","expertises","experts","expiating","expiring","expiry","expirying","explicit","explicits","explode","explodes","exploit","exploiting","exploits","exploring","expoing","exporters","exportinged","exportings","expos","exposeds","exposing","exposure","exposures","express","exsert","exserting","exserts","extant","extanting","extants","extendeds","extent","extented","extenting","extents","extern","externa","externaing","externas","externed","externing","externus","extort","extorting","extorts","extruding","fabling","fadded","failing","failling","faire","faires","fairies","faited","fake","fakers","fakes","fall","falling","fallings","falls","fallsing","falses","falsing","fanned","farces","fare","fares","fart","fasces","fassed","fasting","fawkes","fcsing","feasting","feasts","feating","fecalling","feeting","feined","feining","feisting","feists","felids","feline","felined","felining","felises","fellies","felling","felting","fend","fended","fends","feres","ferined","fering","ferining","ferning","ferring","fesses","fessing","feting","fetting","fevers","fibers","fibre","fibres","fice","fices","fide","fides","fiends","fierce","fierces","fieries","fieris","fife","fifes","figure","figures","file","filers","files","filets","filles","filling","filses","find","finded","fine","finers","fines","fining","fiords","fireds","firm","firmas","firmers","firms","firmus","firsts","firths","fishes","fisting","fitses","fixe","fixeds","fixers","fixes","fizzes","flakes","flange","flanges","flanked","flanned","flasks","flecks","flicks","fliers","flirts","focalling","fold","folds","folies","folked","fonded","fooded","fooled","footed","forces","fore","fores","forest","forges","forked","form","fortes","fosses","fountain","fountaining","fountains","foyers","fpsing","freaked","frieds","friers","fries","frigged","frog","froms","frores","fros","frsing","fsbing","fshing","full","fulling","fulls","fuming","funded","funs","furies","furzes","fuseds","fusees","fusels","fuses","fusing","fussing","fuzing","fwsing","gabling","gabs","gadded","gaeling","gaited","galaing","galing","gall","galliing","gallina","galling","gallings","gallis","galls","gallus","gand","ganded","gander","gandied","ganked","gaoling","garb","garbs","garded","garment","garnet","gaseses","gashes","gassed","gassies","gatling","gauched","gauches","gauching","gauded","gauling","gausses","gcsing","gean","geans","gelids","gellies","gelling","gelting","genies","genome","genomes","genoming","gent","germing","gerres","gestaing","gestes","gesting","getting","gilling","girded","girled","giroed","gisting","give","givens","gives","gladded","gladed","glanced","gland","glanded","glands","glandsed","glansed","glares","glass","glasses","glassy","gleams","glean","gleans","glides","glises","gofers","gold","golds","gonded","goners","gooded","goofed","gooked","gooned","gooped","goosed","gorals","gouached","gouaches","gouaching","governs","gpsing","graces","grad","grades","grads","graf","grafs","grafts","grails","grains","gram","gramas","gramps","grams","gran","granded","grands","grange","granged","granges","grans","grants","grapes","graphs","grases","grasps","grass","grasses","grassy","gratas","grates","gratis","graves","gravis","gray","grays","grazes","greats","grebes","greylies","greyly","groaks","groans","groats","grouch","grouched","grouches","grouching","groves","grub","grubs","grunts","gruses","gsaing","gsring","guesting","guests","guiing","guild","guilds","guiled","guiles","guilt","guilty","guises","guising","gull","gulling","gulls","guns","guses","gushes","gushing","gussing","gutses","gutsing","guying","gyrans","habits","hacked","hadded","hagged","haicks","haiked","hailing","haired","haje","hakeas","hakes","halals","hale","halfing","haling","hall","halling","halls","halming","haloing","halting","halve","halved","halves","halving","hame","hand","handed","handeds","handel","hander","handied","handled","handsed","hanged","hangers","harded","harems","hares","harked","harold","harolds","hart","harvey","hashes","hassles","hastes","hasting","hate","hats","hauling","haved","haven","havens","haves","hawked","hawses","haze","heating","heave","heaved","heaven","heaver","heaving","hectare","hectares","hefting","heired","heisting","held","helds","helixes","helling","helving","herbes","herbing","herding","here","hering","herming","heroing","herpes","herring","hets","hetting","hexine","hexined","hexines","hexining","hexose","hexoses","hhsing","hiatus","hick","hicked","hicks","hies","hilling","hilts","hind","hinded","hinged","hinges","hins","hints","hips","hire","hired","hirers","hires","hirtas","hiss","hisses","hives","hivs","hoards","hoared","hoaxed","hobbed","hoboed","hocced","hocked","hockey","hodded","hods","hoed","hogged","hoists","hokaed","holcus","holders","holdups","hole","holed","holes","holeys","holism","hollas","hollos","holm","holms","holy","homers","homied","homoed","honied","honked","honker","honkey","honkied","honored","hooches","hooching","hood","hooded","hoodeds","hoods","hooeyed","hoofed","hoofeds","hoofer","hookah","hookeds","hooker","hookeri","hookers","hookied","hookies","hooksed","hookses","hookup","hooped","hoopoed","hoopsed","hooted","hooter","hooved","hooveds","hoovers","hopers","hopied","hopped","hopple","hopples","hopsed","horded","hordes","horned","horsed","hosing","hosted","hosting","hotbed","hots","hotsed","hotted","hounds","houred","housed","houses","housing","hover","hovers","hoyaed","hrts","hses","hsing","hucked","huging","hulked","hull","hulling","hullos","hulls","hunged","hunked","huns","huoned","hushes","hushing","husked","husking","husoing","huts","hyoids","ictalling","idioted","idlies","iising","ileals","illing","images","impact","impacting","impacts","impart","imparting","impartings","imparts","impasses","impends","implore","implores","imploring","impoliting","important","importeds","importeeing","importees","importers","importinged","importings","importune","importuning","imposing","impost","imposting","imposts","improving","impure","impures","impuring","imputing","inbuilt","incise","incite","inclined","inclosed","include","includeds","includes","income","incomes","indied","indirect","indirected","indirects","indite","indited","indole","indoles","inerting","inerts","inference","inferences","infidel","influxed","info","inhabit","inhabits","inhere","inhered","inherent","inherenting","inherents","inheriteds","inheritinged","inheritings","inheritors","inheritting","inhibit","inhibits","initio","inkied","inland","inlanded","inline","inosine","inquire","inquires","insane","insert","inserting","inserts","insided","insider","insiders","insides","insist","insoles","inspire","insted","insting","intake","intakes","intending","interim","interims","intermit","intermits","inti","intied","intoed","intones","intos","intro","intron","intros","intruded","invades","invert","inverting","inverts","invites","invoice","invoices","involve","involves","iodide","ipsing","ired","ires","ironside","irsing","iruses","ises","isiing","ising","island","islanded","isling","isming","isning","isring","itsing","iuding","jailing","jakes","janned","jawses","jean","jeans","jellies","jelling","jerking","jest","jesting","jestings","jests","jetting","jigger","jiggers","jirded","jive","jives","jocked","jokers","jooked","josing","josses","joules","jove","joves","juking","julies","juning","jure","juring","juses","jussing","justes","juting","kailing","kakkes","kalaing","kaliing","kaling","kalkas","karens","karling","kelpies","kelting","kenoing","kepting","keraing","kerbing","kerite","kerited","kerites","kerning","kerring","keynote","keynotes","keynoting","khanned","kianged","kickers","kied","killing","kilned","kina","kinaed","kinda","kindas","kindle","kindly","kinds","kine","kined","king","kinged","kinked","kinks","kinned","kino","kinoed","kins","kiosks","kirk","kirked","kirks","kisses","kith","kleins","klick","klicks","knacks","knocks","knucks","koined","kooked","kookied","kuiing","kvasses","kweeked","kylies","labbed","lacced","lacied","lacked","ladded","ladder","laddied","laded","ladied","ladled","ladling","laed","lagans","lagend","lagended","lagged","lahhed","lahued","laiced","laid","laided","lairded","lake","lakes","lakhed","lallying","lamaed","lambed","lament","lammed","lamnaed","lamped","lanaied","lanated","lanced","lancer","lances","lancet","landaued","landeds","lander","landers","landler","lands","lane","lang","langed","langued","lank","lankaed","lanked","lankied","lanned","lansaed","lanseh","lanset","lapped","lapsed","lapses","lard","larded","larder","larged","laried","larked","larred","lashed","lashes","lassas","lasses","lassies","lassos","lasted","lasting","latent","latest","latesting","latests","lathed","latked","latkes","latsed","latses","latted","lauans","laud","lauded","lauder","laudes","launced","launder","lavaed","laves","lavved","lawsed","lawses","laxaed","lazied","lead","leaded","leaden","leadens","leads","leaf","leafs","leak","leaked","leaks","leal","leals","leaners","leap","leaps","learn","learns","leases","leasting","leaven","leavens","leaving","ledded","lefting","legals","legends","lemnas","lemons","lended","lender","lends","lenifies","lenify","lens","lensed","lent","lented","lentes","lentoing","leon","leones","leons","lerring","lesses","lessing","letting","levants","levees","levels","levited","levving","lewded","lianaed","lianas","liared","libels","libred","lice","lices","lick","licks","lidded","lieded","lieges","lies","life","lifers","lifes","ligand","liganded","ligans","ligers","lignes","like","likeds","likens","likes","limans","lime","limens","limes","limeys","linden","lindied","line","lineds","linens","liners","lines","linged","linied","linked","linoed","linted","liraed","lirred","lises","lisles","listes","listing","lite","liters","lites","lithes","litred","livedos","livens","livers","livias","livids","llanoed","llanos","loached","loaches","loaching","loaded","loan","loans","localling","loched","loches","loching","locked","lode","lohans","loired","lolling","loners","longed","looked","looker","looksed","loomed","looned","looped","loosed","looted","lorded","losers","losing","losses","losting","louched","louches","louching","louded","loughed","loughing","loupes","louses","lousing","louver","louvers","lover","lovers","lowans","lowers","lsding","lubing","lueses","luesing","luging","lull","lulling","lulls","lunaed","lundaed","lunged","lunned","luoing","lure","luring","lushes","lushing","luting","luxing","lynxed","mace","macers","maces","maches","mackems","mackle","mackles","madake","madakes","madded","made","mades","maes","magens","mahoes","maided","mailing","maines","maired","maizes","makers","makeups","mako","makos","male","maleos","males","maliing","maliks","maling","mall","malling","malls","malsing","malting","mameys","mandaed","manded","mane","maneds","manes","manied","manies","mankies","manned","mansed","manxed","manxes","maples","mapling","mare","mares","marges","maries","markeds","markers","markets","marling","mart","martes","masers","mases","maskeds","maskers","mass","massed","masseds","masses","masting","mate","mateds","maters","mates","mateys","mattes","mauling","maunded","maxes","maybes","maze","mazeds","mazers","mazes","mazies","mealies","mean","means","meating","mediaed","mediated","medicied","meeting","meined","meining","melees","melias","melics","melting","mend","mended","mends","menoing","mere","merelies","merely","merges","merging","mering","merited","merles","merling","merring","merses","mersing","mesaing","meshing","mesning","messes","messing","meting","metrifies","metrify","mevving","mick","micks","mike","mikes","milling","mind","minded","minified","minifies","minkes","mire","mired","mires","miried","miries","miroed","mising","misses","misting","mitred","mitres","mlsing","mocked","models","modems","modes","modest","modifieded","modifiered","modifiers","modished","modishes","modisted","modistes","modses","mogens","mohaves","mohses","moired","mojave","mojaves","mold","molds","mole","moles","molest","molles","mollified","mollifies","molling","molvas","mommies","monded","mondes","monels","moneys","monked","monses","montan","montanning","montans","montes","mooched","mooches","mooching","mooded","mooned","moored","moosed","mooses","mooted","mope","mopeds","mopes","more","morels","mores","morses","mortified","mortifies","moses","moseys","moshes","mosting","mote","motels","motes","motets","motiffed","motive","motives","moue","moues","moulds","mountain","mountaining","mountains","mousing","mouthed","mouthing","moveds","movie","movies","moxies","mpsing","mrsing","msbing","mscing","mses","msging","mshing","msing","muanged","muched","muches","muching","muling","mull","mullas","mulling","mulls","mullus","muming","musaing","musding","musers","muses","mushes","mushing","musing","musings","musking","mussing","muting","mutually","myalling","myalls","myopes","nadded","nailing","naives","nakeds","nalline","nanaed","nanced","nand","nanded","nandued","nanned","narded","nashes","nasuses","nauched","nauches","nauching","nave","neating","nemine","nemined","nemines","nemining","nerding","nerve","nerves","nerving","nervus","nervying","nesses","nessing","nest","nesting","nestings","nestling","nests","netting","nevers","neving","newlies","newting","nexted","nexting","nick","nicks","nigger","niggers","nilling","nisied","nisting","nitred","nitres","niveas","nivose","nivoses","nocked","node","noired","noires","nolling","nonuple","nonuples","nooked","nookied","nooksed","nooned","noosed","nosing","notched","notches","notching","notified","notifies","noting","nouses","nousing","nsaing","nscing","nsfing","nsuing","nswing","nuding","nuited","nuking","null","nulling","nulls","nuns","nurses","nursing","nutses","nutsing","nuxing","oakens","oasing","oasises","oasting","oatses","observe","observes","observing","obtain","obtaining","obtains","occluded","oceans","ochers","octalling","octuple","octuples","odisted","ogives","oilies","oising","olds","olefine","olefined","olefines","olefining","oleins","olive","olives","onlies","onto","onuses","opalling","opiated","oppose","opposes","opulus","opuses","oralling","orange","oranged","oranges","oses","osing","otuses","ouring","ousels","outclass","outclasses","outclassing","outdated","outing","outrigger","outriggers","ovalling","over","overs","overts","pacoses","pacs","pact","padded","padres","pads","paduses","paeans","pageant","pageses","paided","pailing","painses","paired","paks","palases","paliing","paling","palling","pallying","palming","palmses","paloing","pals","palsies","pandaed","pander","pangses","panned","pans","pansies","pant","panted","pantses","paps","para","parang","pare","parental","parented","parents","parers","pareve","pari","paries","paring","parises","parity","park","parr","parsec","parsecs","parsed","parsee","parsees","parser","parsers","parses","parted","parti","partis","partly","parts","partses","party","paruses","parvenu","parving","pasches","paso","pasoed","pasos","pasques","passages","passed","passeds","passee","passeed","passees","passel","passels","passer","passers","passims","passives","passkey","passkeys","passu","passued","passus","pasted","pasteds","pastel","pastels","paster","pasters","pastes","pasties","pasting","pastises","pasts","patases","patens","patent","patents","patient","pats","patsies","pauling","paulis","paused","pauses","pausing","pave","pavises","pawling","paws","payees","payment","pays","pbsing","peaked","pean","peans","peated","peating","pecans","pecses","peeves","peeving","pekans","pelling","pelting","pent","percent","perces","percing","pere","periing","pering","perking","perming","perring","pert","peruing","perve","perves","perving","pesoing","pessed","pessing","pest","pesting","pestis","pestling","pestoing","pestos","pests","petited","petrifies","petrify","petting","peyote","peyotes","peyoting","phaged","pharos","pholis","phsing","pick","picks","piered","pigses","pill","pilling","pills","pinses","pinto","pintos","pisces","piss","pissed","pisseds","pisser","pissers","pisses","pistes","pisting","pith","pitses","plaided","planaed","planked","planned","planted","plashes","plated","pleads","pleats","plover","plovers","pmsing","poached","poaches","poaching","pocked","poises","pokers","polers","polies","poll","polling","pollos","polls","pommies","ponded","ponses","pooched","pooches","pooching","pooded","poofed","pooled","pooned","pooped","poored","pooved","pooves","porched","porches","porching","porked","port","portent","posers","poshes","posies","posing","posits","possed","posses","possess","posset","possets","postes","posting","potent","pouch","pouched","pouches","pouching","powers","praises","pranged","prat","prated","preference","preferences","prelims","premies","preses","presses","prexies","pricks","prigged","prises","prom","proses","proves","prunes","prunos","prunus","psaing","psas","pses","psiing","psing","pucing","puking","pula","pulas","pule","pules","puling","pullers","pullets","pulleys","pulling","pulp","pulps","pulsing","puns","pupals","pupated","pupils","pure","purelies","purely","purifies","purify","puring","purl","purls","pursing","puses","pushing","puss","pussed","pusses","pussies","pussing","pyrene","qianged","quaing","quakes","quares","quells","questing","quests","quicks","quiing","quilt","quired","quited","quoing","quolls","rabies","racies","radded","raided","railing","raises","rake","rakes","raling","rallies","rallying","ramies","ranaed","rand","randed","randied","raneed","ranges","ranied","ranked","ranted","rarelies","rarely","rarifies","rarify","rashes","rasing","rassed","rave","ravers","readies","realines","realise","realises","realizes","reallies","really","realties","realty","reaving","rebuild","rebuilds","reburies","recall","recalling","recalls","recces","reccies","recipes","recited","recites","reclines","recode","recommits","recover","recovers","redefine","redefined","redefines","redefining","redlines","reedies","reefies","reeving","referee","referees","referenceds","referent","refine","refined","refiners","refines","refining","refinings","refits","regias","regimes","regius","reined","reining","reited","reiting","rejigs","relaces","relates","relaxes","relay","relics","relict","relicts","relied","relief","reliefs","relieve","relieves","relievo","relievos","relines","relining","relish","relishes","relived","relives","remake","remakes","remise","remises","remiss","remits","remote","remotes","remoting","remove","removes","rend","rended","rends","renins","renises","rent","repands","repens","repents","repine","repined","repining","replay","replied","replies","reply","repose","reposes","requiems","requireds","requite","requites","requote","requotes","reruns","reserve","reserves","reserving","resets","reshes","reshing","reside","resides","resids","resiles","resins","resizes","respire","respires","ressing","rest","resting","restings","rests","retied","reties","reting","retire","retouch","retouched","retouches","retouching","retries","retting","reusing","reverence","reverences","revers","review","reviews","reviles","revise","revises","revive","revoke","revokes","revues","revving","rewire","rewired","rhuses","rick","ricks","rigged","riggeds","rigger","riggers","rilling","rimies","rind","rinded","ringer","ringers","ringside","rising","risses","rive","rives","rivets","roached","roaches","roaching","rocked","rogers","roilies","rolling","rons","rooded","roofed","rooked","rookied","roomed","rooted","ropers","ropies","rosies","rosing","rouble","roubles","roughed","roughing","rounds","rouses","rousing","rove","rover","rovers","roves","rowers","rubens","rubies","rubing","rubins","rubs","rudelies","rudely","ruding","rues","rugger","ruggers","rugs","ruins","rulied","rulies","ruling","ruly","rumens","rums","rune","runes","rung","rungs","runics","runing","runt","runts","runups","ruses","rushes","rushing","rusing","rusking","russing","ruts","saales","saaling","saames","sabling","sabres","sadded","saided","sailing","saints","saises","sake","sakes","salals","saling","salk","salking","salks","salling","sallying","salols","salping","salting","salves","sand","sanded","sander","sandied","sandsed","sanned","sansed","sanses","sapling","sarded","sarding","sariing","sarsing","sashes","sass","sassed","sasses","sassies","sats","saurel","save","savers","saving","scalding","scalds","scaling","scalping","scalps","scalying","scapes","scarce","scarces","scare","scareds","scarers","scares","scarfs","scaries","scarps","scends","schick","schicks","scired","scoked","scolds","scorer","scorers","scores","scoter","scoters","screes","scries","scruple","scruples","scrying","sculling","seaing","sealing","seaming","seaport","seaporting","seaports","seareds","searing","seasing","seaxing","sebaes","sebaing","sebbing","sebing","sebses","sebsing","seccing","secluded","secure","sedans","sedding","sedges","sedging","seeding","seeing","seeking","seeling","seeming","seening","seeping","seering","segoing","segues","seguing","seifing","seiing","seined","seizes","seizing","selfing","selvaing","selvas","semiing","semited","senate","senates","senating","send","sended","sending","sends","sening","senning","senses","sensing","sent","sepping","sequine","sequines","serape","serapes","seraping","seraxes","seraxing","serbing","serene","serenes","serening","serers","seres","serfing","serge","sergers","serges","serging","series","serined","sering","serous","serowing","serows","serpens","serums","servals","servant","servers","services","servicing","serviles","serviling","servinged","servings","servo","servoing","servos","setaing","sets","seuling","sevens","sewing","sewning","sexing","sexpot","sexpots","sexpotting","sexted","sexying","shabus","shade","shadeds","shades","shadies","shafts","shagged","shake","shakens","shakers","shakes","shakies","shakos","shale","shales","shame","shameds","shames","shamus","shanged","shanked","shanks","shanned","shape","shapeds","shapers","shapes","shard","shards","shareds","sharers","shareses","sharias","shark","sharks","sharons","sharp","sharpens","sharpers","sharpie","sharpies","sharps","shart","sharts","shaveds","shavens","shavers","shaves","shaving","shawls","shawms","sheareds","shearers","shearses","sheers","sheiks","shelve","shelves","shelving","sherding","sherds","shines","shinto","shire","shires","shirks","shirrs","shited","shnooked","shocked","shocks","shoeds","shooed","shooked","shooted","shore","shoreas","shores","shorns","shorts","shotes","shover","shovers","shoving","shreds","shrews","shriving","shrove","shroves","shroving","shucks","sibs","sick","sicks","sics","sids","sieving","sifts","sights","silling","silts","sind","sinded","sing","sins","sips","sirced","sircing","sired","sirens","sires","siring","sirred","sirring","sirs","sising","siss","sisses","sitars","site","sites","sitkas","sittas","situ","situs","sitz","sitzes","sixths","skates","skinks","skints","skirts","skits","skiving","skulls","slander","slanted","slates","slaving","sleeve","sleeves","sleeving","slices","slicks","slides","slimes","slits","slivers","slouch","slouched","slouches","slouching","slsing","smalling","smalls","smarms","smarts","smited","smites","smiths","smoked","snare","snarers","snares","snarfs","snarls","sneaked","snicks","snigger","sniggers","snits","snooked","snores","soaked","soaving","sobers","socked","solare","solares","sold","solds","solids","solling","solver","solvers","solving","sooned","sooted","sorbing","sore","sorelies","sorely","soring","sorting","sots","souchong","soughed","soughing","souked","soupies","source","soured","souses","sousing","southed","southing","sowers","spaces","spades","spalling","spanged","spare","sparers","spares","sparge","sparges","sparks","spasms","spated","spates","spazes","speaked","specks","spells","sperming","sphere","spheres","spicks","spills","spinto","spired","spirts","spited","spites","spits","splits","spoked","spooked","spores","sprees","spries","sprigger","spriggers","spring","sprits","sprues","spruing","sprying","spurge","squally","squares","squires","sriing","ssaing","sses","ssing","ssping","ssriing","sssing","sswing","stacks","stages","stalk","stalks","stalling","standed","stands","stanks","stapes","stare","starers","stares","starets","starses","starts","starving","states","staving","steads","steaked","steeds","stenting","sterling","sterning","stetting","sticks","stilts","stints","stoked","stores","stover","stovers","stoving","streaked","string","stringer","stringers","striving","suaving","subclassed","suched","suches","suching","sucre","sucred","sudated","sudses","sudsing","suer","suered","suering","sues","suiing","suing","suited","suites","suits","sullas","summits","sundated","sunglass","sunglasses","sunglassing","suns","superclassed","supergrass","supergrasses","sura","suraed","suraing","surd","surded","surding","sured","surelies","sures","surety","surf","surfed","surfer","surfing","surge","surged","surging","surrey","surveys","suses","sussing","suture","suvving","svring","swages","swales","swards","swarms","swarts","sweared","sweated","swerve","swerves","swerving","swervings","swifts","swined","swiped","swirled","switch","taaling","tables","tabling","tabses","tached","taches","taching","tack","tacks","tacting","tadded","taeling","tagger","taggers","tailing","tajiks","take","takens","takers","takes","tala","talaing","talas","talc","talcing","talcs","tale","talent","tales","taling","talkers","talkies","talking","talksed","talkses","talling","tallying","talons","talus","tandem","tank","tankas","tanked","tanks","tanned","taoses","tapses","tart","tarting","task","tasking","tasks","tassed","tassel","tassels","tasses","tasset","tassets","tassing","tasting","tastings","tastying","tatting","tauting","tawses","tdting","teached","teaches","teaching","teaing","teaked","teaking","tealed","tealing","teamed","teaming","teared","tearing","teased","teases","teasing","teasling","teat","teated","teating","teats","tebets","teccing","teched","teches","tectaing","tectas","tedding","teds","teed","teeing","teeming","teened","teening","teething","teeths","teffing","tegging","teiids","tejuing","tellies","temming","temping","tempting","tempts","tenched","tenches","tenching","tendeds","tenders","tendons","tenens","tenged","tenges","tenging","tenias","tenned","tenning","tennis","tennos","tenons","tenors","tensed","tenseds","tensing","tented","tenthing","tenting","tentings","tenuis","tepids","terces","tereting","terned","terrifies","terrify","teslaing","teslas","testaing","testas","testating","testeds","testeeing","testees","testers","testes","testied","testify","testily","testinged","testings","testis","testying","tether","tething","tetting","tevets","texans","text","texted","textes","texting","textings","texts","thaned","thanked","thanks","thanned","thecas","thefting","thefts","theist","theisting","theists","theres","thesis","thinged","tholed","tholes","thonged","thorough","thoroughs","thought","thrive","thrives","throng","throngs","throughed","throughs","thrush","thuses","ticalling","tick","ticks","tiered","tigers","tilling","tilting","tineds","tinting","tire","tired","tires","tiroed","titred","titres","titting","tnting","toasting","toasts","toeaed","toeses","toesing","togethers","told","tolds","tolling","tommies","tomtits","toneds","toners","tontining","tooled","tooned","tooted","toothed","toothing","tooting","topers","toposes","topple","topples","torch","torched","torches","torching","torting","toshed","toshes","tosked","tosking","tosses","tossing","toters","toting","totting","toucan","toucans","touchers","touchied","touchies","touchinged","touchingly","touchings","touchline","touchy","touchying","tough","toughed","toughens","toughied","toughies","toughing","toughying","touped","toupee","toupeed","touping","toured","touring","tousle","tousled","tousling","touted","towers","tracks","transitive","transitived","transitives","transitivity","treaded","treads","treated","treating","treats","treeds","trekked","trend","trends","trenting","tressing","trestling","triage","triaged","tricker","trickers","tricks","triers","trifler","triflers","trigged","trimer","trimers","trimmer","trimmers","tripper","trippers","trited","triting","troched","troches","troching","trough","troughed","troughing","troughs","troves","truced","truces","trucing","trucked","trucking","trudger","trudgers","trulies","trunks","trusting","trusts","truthed","truthing","trysting","trysts","tsetse","tsetsing","tubing","tucked","tucking","tufting","tugger","tuggers","tuling","tulles","tulling","tumses","tumsing","tuning","tuns","turing","tushed","tutting","tuxing","twanged","tweaks","tweeded","tweeds","tweeped","tweeted","tweeting","tweets","tweezed","twelved","twenty","twerked","twerped","twiced","twigged","twined","twirled","twirped","twisting","twists","twitch","ufoing","uglies","uhfing","uing","ukases","ukasing","ukes","uking","ulls","ulting","umaing","umping","unchanged","unclouded","uncouple","uncouples","uncover","uncovers","undated","undateds","undefined","unding","unedited","unhooked","uniated","uning","united","unkind","unlive","unlives","unmake","unmakes","unmated","unmodified","unqing","unsated","unsees","unsung","unsure","untouched","unusually","unwired","unyoke","unyokes","upbeated","upcasted","update","updates","updrafted","uphold","upholds","uping","upland","uplanded","upsets","upside","uptaked","upvoted","urated","urging","urling","urning","urns","ursine","uruses","usages","usaging","usaing","usas","usbegs","usbeks","uscbing","usdaed","usdaing","used","useds","user","userring","users","ushers","usinged","usings","usmcing","usneas","usning","usns","usps","uspses","uspsing","usss","usssing","usualed","usuals","usurer","utaing","utcing","utes","uting","utning","uubing","uuhing","uuping","uuqing","uuting","uving","uziing","valiing","valing","valling","valses","valsing","valuing","valving","vandaed","vanned","varment","vasing","vassed","vasting","vedisted","vegans","veined","veines","veining","vend","vended","vends","venose","venoses","venosing","vent","veraing","verbified","verbifies","verbify","verbing","verdes","verding","verges","verging","veridis","veridises","veried","verified","verifieds","verifier","verifiers","verited","veritied","verities","verity","verses","versified","versifier","versifiers","versifies","versify","versing","versting","versts","vertes","verve","verves","vervets","verving","verying","vest","vesting","vests","vetting","vianded","vilifies","vilify","vinifies","vinify","virens","vireos","vising","visits","visually","vitrifies","vitrify","vive","vives","vivifies","vivify","vivred","vocalling","vomers","vomits","voters","vouch","vouched","voucheed","vouchees","vouchers","vouches","vouching","vowers","wadded","wadses","waifed","wailed","wailing","wained","waived","waives","wake","wakens","wakers","wakes","waling","walk","walking","walks","wall","walling","wallings","walls","wallying","wand","wanded","wander","wanked","wanned","want","wanted","ware","wared","waried","warmed","warned","warped","warred","warsed","warses","wart","warted","washes","wassed","wastes","wasting","watses","wauling","wave","wavers","wawling","wayses","wbsing","weaked","weaken","wealed","wean","weaned","weans","wearer","weaved","weaves","weaving","weeked","weft","wefting","weirded","weired","wekaed","welling","welt","welting","wended","wends","wens","weres","wering","westing","wests","wetting","whacks","whales","whanged","wharfs","whelks","whiled","whined","whirled","whirred","whists","whites","whits","wholed","wholes","whooped","whored","whores","wick","wicked","wicks","wided","width","widths","wifed","wified","wigged","wilded","wiled","wilied","wilies","willed","willing","wilted","wimped","winced","wind","wined","winged","winied","winked","winned","winoed","wiped","wipeds","wireds","wirer","wiried","wised","wisent","wish","wished","wising","wisped","witch","withal","withe","wither","withes","within","withs","withy","witsed","witted","wive","wived","wives","wizzed","wlanned","wokked","wold","wolds","wonked","wont","wooded","wooers","woofed","wooled","worded","worlds","wormed","worned","worsed","worted","woulds","wove","woves","wraith","wrasses","wreaked","wrecks","wresting","wrests","wricks","wried","wriggler","wrigglers","wringer","wringers","writhe","wswing","wussing","wyrded","xerotes","xmases","yanaed","yanked","yarded","yawling","yawses","yearns","yeasting","yeasts","yelling","yerring","yessing","yetting","yolked","yorked","youthed","youthing","yuling","yuses","yussing","zaired","zaires","zanied","zend","zended","zends","zeroing","zest","zesting","zests","zestying","zeuses","zeusing","zhuanged","zilling","zonked","zoomed","zooted"]}});function Ln(e,t,n){if(e===t)return 0;if(Math.abs(e.length-t.length)>n)return n+1;let s=null,o=Array.from({length:t.length+1},(r,i)=>i);for(let r=1;r<=e.length;r+=1){let i=[r],a=r;for(let l=1;l<=t.length;l+=1){let c=e[r-1]===t[l-1]?0:1,u=Math.min(o[l]+1,i[l-1]+1,o[l-1]+c);r>1&&l>1&&e[r-1]===t[l-2]&&e[r-2]===t[l-1]&&(u=Math.min(u,s[l-2]+c)),i[l]=u,u<a&&(a=u)}if(a>n)return n+1;s=o,o=i}return o[t.length]}function Ba(e){return/^[a-z]+$/.test(e)&&!lt.has(e)&&!za.has(e)}function mp(e){return Tv(e)?null:Ua(e,Rv,Qn(e))}function Ua(e,t,n=Qn(e)){let s=n+1,o=null,r=!1;for(let i of t){let a=Ln(e,i,Math.min(s,n));a<s?(s=a,o=i,r=!1):a===s&&a<=n&&i!==o&&(r=!0)}return s<=n&&!r?o:null}var jv,Qn,za,_v,Rv,Av,Tv,Qo=L(()=>{An();pp();Jn();jv=["used"];Qn=e=>e.length<=5?1:2,za=new Set([...Object.keys(de),...Object.keys(Ue),...Object.keys(Ht),...jv].flatMap(e=>e.split(" "))),_v=4,Rv=[...new Set([...Object.keys(de),...Object.keys(Ht)].flatMap(e=>e.split(" ")).filter(e=>e.length>=_v))],Av=new Set(fp.words),Tv=e=>Av.has(e)});function lo(e){for(let t of Lv){let n=e.match(t.re);if(n){let s=t.build(n);if(s)return s}}return null}var Zr,Cv,Ov,Iv,Wa,Lv,hp,ei=L(()=>{An();Jn();Zr=Object.keys(de).sort((e,t)=>t.length-e.length).map(Xe).join("|"),Cv=Object.keys(Ue).sort((e,t)=>t.length-e.length).map(Xe).join("|"),Ov=Object.keys(Ht).sort((e,t)=>t.length-e.length).map(Xe).join("|"),Iv=vs.slice().sort((e,t)=>t.length-e.length).map(Xe).join("|"),Wa=(e,t)=>e==="defines"&&Uo.has(t),Lv=[{name:"ask",re:new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+(${Zr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];if(Wa(n,t))return null;let s=e[1].trim(),o=e[3].trim();return Bo.includes(t)&&([s,o]=[o,s]),{shape:"ask",entityType:null,modifier:"direct",kind:n,subject:s,object:o}}},{name:"reverse",re:new RegExp(`^which\\s+(${Cv})\\s+(?:(${Ov})\\s+)?(${Zr})\\s+(.+?)\\??$`,"i"),build:e=>{let t=e[3].toLowerCase(),n=de[t];return Wa(n,t)?null:{shape:"reverse",entityType:Ue[e[1].toLowerCase()],modifier:e[2]?Ht[e[2].toLowerCase()]:"direct",kind:n,object:e[4].trim()}}},{name:"forward",re:new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+(${Zr})\\??$`,"i"),build:e=>{let t=e[2].toLowerCase(),n=de[t];return Wa(n,t)?null:{shape:"forward",entityType:null,modifier:"direct",kind:n,object:e[1].trim()}}},{name:"meta-mean",re:new RegExp(`^what\\s+(?:does|do|is|are)\\s+(.+?)\\s+(?:${Iv})\\??$`,"i"),build:e=>({shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:e[1].trim()})},{name:"meta-whatis",re:new RegExp("^what\\s+(?:is|are)\\s+(?:(an?|the)\\s+)?(.+?)\\??$","i"),build:e=>{let t=e[1]?e[1].toLowerCase():null,n=en(e[2].trim()),s=!/\s/.test(n);if(t==="the"&&!s||!t&&!Ue[n.toLowerCase()])return null;let o=n.toLowerCase();return t&&t!=="the"&&Iu.some(r=>o===r||o.startsWith(`${r} `))?null:{shape:"meta",entityType:null,modifier:"direct",kind:"meta",object:ws(n)}}},{name:"mention",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)\\s+(?:${un.map(Xe).join("|")})\\??$`,"i"),build:e=>({shape:"mentions",entityType:null,modifier:"direct",kind:"mentions",object:e[1].trim()})},{name:"where",re:new RegExp(`^where\\s+(?:is|are|was|were)\\s+(.+?)(?:\\s+(?:${Zt.map(Xe).join("|")}))?\\??$`,"i"),build:e=>({shape:"where",entityType:null,modifier:"direct",kind:"where",object:e[1].trim()})},{name:"when",re:new RegExp(`^when\\s+(?:did|does|do|was|were|is)\\s+(.+?)\\s+(?:last\\s+)?(${Zr})\\??$`,"i"),build:e=>de[e[2].toLowerCase()]==="touches"?{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()}:null},{name:"commit-history",re:/^(?:the\s+)?commit\s+history\s+(?:of|for)\s+(.+?)\??$/i,build:e=>({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:e[1].trim()})},{name:"cochange-partners",re:/^co-?change\s+partners\s+(?:of|for|with)\s+(.+?)\??$/i,build:e=>({shape:"reverse",entityType:"Module",modifier:"direct",kind:"cochange",object:e[1].trim()})}];hp={id:"grammar",class:"graph-query",run(e){let t=lo(e);return t?{strategyId:"grammar",class:"graph-query",candidates:[{parsed:t,confidence:.9}]}:null}}});function St(e,t,n=null){let s=Object.keys(t).sort((o,r)=>r.split(" ").length-o.split(" ").length);for(let o of s){let r=o.split(" ");for(let i=0;i<=e.length-r.length;i+=1)if(!(n&&r.some((a,l)=>n.has(i+l)))&&r.every((a,l)=>e[i+l]===a))return{kind:t[o],start:i,end:i+r.length}}return null}function er(e,t=null){let n=e.replace(/\?+\s*$/,"").replace(/,/g," ").split(/\s+/).filter(Boolean),s=n.map(k=>k.toLowerCase());if(s.includes("where")&&!St(s,de)){let k=s.some(x=>un.includes(x)),_=new Set([...Zt,...un]),R=n.filter((x,T)=>!lt.has(s[T])&&!_.has(s[T])).join(" ").trim();if(R){let x=k?"mentions":"where";return{shape:x,entityType:null,modifier:"direct",kind:x,object:R}}}if(new Set(["has","have","had"]).has(s[0])){let k=s.length;for(;k>1&&(s[k-1]==="ever"||s[k-1]==="been");)k-=1;if((k>1?de[s[k-1]]:null)==="touches"){let R=n.slice(1,k-1).filter((x,T)=>!lt.has(s[1+T])).join(" ").trim();if(R)return{shape:"when",entityType:null,modifier:"direct",kind:"touches",object:R}}}let r=s,i=St(s,de);if(!i&&t){let k=s.map(_=>{if(!Ba(_))return _;let R=t.lemma(_);return za.has(R)?R:_});i=St(k,de),i&&(r=k)}let a=null;if(!i){let k=s.map(_=>_.length>=4&&Ba(_)&&mp(_)||_);if(i=St(k,de),i){r=k;let _=s.slice(i.start,i.end).findIndex((x,T)=>x!==k[i.start+T]),R=i.start+Math.max(_,0);a={from:s[R],to:k[R]}}}let l=!1;if(!i)for(let k=0;k<s.length;k+=1){let _=Hn[s[k]];if(!(_&&s[k]==="used"&&s[k+1]==="for")&&_&&s.slice(0,k).some(R=>Zo.has(R))){i={kind:_,start:k,end:k+1},l=!0;break}}if(!i)return null;!l&&i.end-i.start===1&&Hn[s[i.start]]&&s.slice(0,i.start).some(k=>Zo.has(k))&&(l=!0);let c=k=>a?{...k,fuzzyVerb:a}:k;if(t&&i.end-i.start===1){let k=i.start,_=s[k-1];if((_==="the"||_==="these"||_==="those")&&s[k+1]==="of"&&t.posTags(n)[k]==="NOUN"){let x=n.slice(k+2).filter((T,M)=>!lt.has(s[k+2+M])).join(" ").trim();if(x)return c({shape:"forward",entityType:null,modifier:"direct",kind:i.kind,object:x})}}let u=new Set,d=k=>{if(k)for(let _=k.start;_<k.end;_+=1)u.add(_)};d(i);for(let[k,_]of Object.entries(de)){if(_!==i.kind)continue;let R=k.split(" "),x=i.end;if(R.every((T,M)=>r[x+M]===T)){d({start:x,end:x+R.length});break}}let f=St(r,Ue,u);d(f);let p=St(r,Ht,u);d(p);let m=(k,_)=>n.slice(k,_).filter((R,x)=>!u.has(k+x)&&!lt.has(s[k+x])).join(" ").trim(),h=m(0,i.start),g=m(i.end,n.length);l&&!s.includes("by")&&Pv.has(g.toLowerCase())&&(g="");let b=i.kind,y=f?Ue[r.slice(f.start,f.end).join(" ")]:null,w=p?Ht[r.slice(p.start,p.end).join(" ")]:"direct";if(b==="touches"&&s.includes("when")){let k=h||g;if(k)return c({shape:"when",entityType:null,modifier:"direct",kind:"touches",object:k})}if(b==="touches"&&s.includes("who")&&s.includes("last")){let k=h||g;if(k)return c({shape:"whoLast",entityType:null,modifier:"direct",kind:"touches",object:k})}let $=s.indexOf("by"),j=s.slice(0,i.start).findIndex(k=>Zo.has(k)),v=j>=0,E=v&&j>$;if($>=0&&!u.has($)&&v){let k=(x,T)=>n.slice(x,T).filter((M,A)=>{let P=x+A,G=s[P];return!u.has(P)&&!lt.has(G)&&G!=="by"&&!Zo.has(G)&&!Nv.has(G)&&!Mv.has(G)}).join(" ").trim(),[_,R]=E?[k(j+1,n.length),k($+1,j)]:[k(0,$),k($+1,n.length)];if(_&&R)return b==="defines"&&Uo.has(r.slice(i.start,i.end).join(" "))?null:c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:R,object:_});if(R)return c({shape:"forward",entityType:y,modifier:w,kind:b,object:R});if(_)return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:_})}if(l&&$<0&&g&&s[i.start]==="called")return null;if(h&&g){let k=r.slice(i.start,i.end).join(" ");if(b==="defines"&&Uo.has(k))return null;let _=h,R=g;return Bo.includes(k)&&([_,R]=[R,_]),c({shape:"ask",entityType:null,modifier:"direct",kind:b,subject:_,object:R})}if(g){let k=f&&f.start>=i.end?null:y;return c({shape:"reverse",entityType:k,modifier:w,kind:b,object:g})}if(b==="inherits"&&!h&&f&&f.start===i.end){let k=r.slice(f.start,f.end).join(" ");if(k)return c({shape:"reverse",entityType:null,modifier:w,kind:b,object:k})}if(h&&!g&&v&&i.end-i.start===1&&Hn[s[i.start]]){if(h.split(/\s+/).length>1)return null;if(b==="touches")return c({shape:"when",entityType:null,modifier:"direct",kind:b,object:h});let k=Zo.has(s[0]);return c({shape:"reverse",entityType:y,modifier:w,kind:b,object:h,...k?{polar:!0}:{}})}return h?c({shape:"forward",entityType:y,modifier:"direct",kind:b,object:h}):null}var Zo,Nv,Mv,Pv,gp,ti=L(()=>{An();Jn();Qo();Zo=new Set(["is","are","was","were","be","been","being","get","gets","got"]),Nv=new Set(["which","what","who","whom","whose"]),Mv=new Set(Rn.map(e=>e.toLowerCase())),Pv=new Set(["recently","lately","yet","already","ever","again"]);gp={id:"keyword-spot",class:"graph-query",run(e,t={}){let n=er(e,t.nlp||null);return n?{strategyId:"keyword-spot",class:"graph-query",candidates:[{parsed:n,confidence:.7}]}:null}}});function Dv(e,t,n){if(!n||typeof n.posTags!="function"||!t.length)return[];let s=new Set(t.map(i=>i.toLowerCase())),o;try{o=n.posTags(e)}catch{return[]}let r=[];for(let i=0;i<e.length;i+=1){let a=e[i],l=a.toLowerCase();!/^[a-z]+$/.test(a)||bp.has(l)||!s.has(l)||o[i]==="VERB"&&r.push(l)}return r}function zv(e,t=null){let n=nn(e),s=[],o=[];for(let i of n){let a=i.toLowerCase();/^[a-z]+$/.test(i)&&!bp.has(a)&&(Fv.has(a)||t&&typeof t.isStopWord=="function"&&t.isStopWord(a))?o.push(i):s.push(i)}let r=Dv(n,s,t);return{text:s.join(" "),dropped:o,maybeNoise:r}}var bp,Fv,wp,yp=L(()=>{An();Jn();ei();ti();bp=new Set([...lt,...he(ys),...he(Object.keys(de)),...he(Object.keys(Ue)),...he(Object.keys(Ht)),...he(Object.keys(Ye)),...he($s),...he(xs),...he(Object.keys(Kn)),...he(Object.keys(gn)),...he(Object.keys(eo)),...he(Rn),...he(Go),...he(vs),...he(Zt),...he(un),...he(_n),...he(Object.keys(no))]),Fv=new Set([...he(Wo),...he(Dr)]);wp={id:"noise-strip",class:"noise-stripped",run(e,t={}){if(lo(e))return null;let{text:n,dropped:s,maybeNoise:o}=zv(e,t.nlp||null);if(!s.length||!n)return null;let r=lo(n)||er(n,t.nlp||null);if(!r)return null;if(o.length&&(r.shape==="where"||r.shape==="mentions")&&r.object){let i=r.object.split(/\s+/).filter(a=>!o.includes(a.toLowerCase())).join(" ").trim();i&&i!==r.object&&(r.altObject=i)}return{strategyId:"noise-strip",class:"noise-stripped",candidates:[{parsed:r,confidence:.75,note:`noise-stripped to "${n}"`}]}}}});var vp=L(()=>{});var ni,si=L(()=>{ni=()=>{}});function xp(e,t){return e.shape!==t.shape||e.kind!==t.kind?!1:e.shape==="ask"?uo(e.subject)===uo(t.subject)&&uo(e.object)===uo(t.object):uo(e.object)===uo(t.object)}function Ga(e){let t=(e||[]).filter(c=>c&&Array.isArray(c.candidates)&&c.candidates.length);if(!t.length)return null;let n=[];for(let c of t)for(let u of c.candidates)!u||!u.parsed||n.push({parsed:u.parsed,confidence:typeof u.confidence=="number"?u.confidence:.5,note:u.note||null,via:u.via||null,strategyId:c.strategyId,class:c.class});if(n.some(c=>!kp(c))&&(n=n.filter(c=>!kp(c))),!n.length)return null;let s=new Map;for(let c of n)s.has(c.class)||s.set(c.class,[]),s.get(c.class).push(c);let o=[];for(let[c,u]of s){let d=[];for(let f of u){let p=d.find(m=>xp(m.parsed,f.parsed)&&m.via===f.via);if(p){p.agreed+=1,p.confidence=Math.max(p.confidence,f.confidence),$p(f.parsed)<$p(p.parsed)&&(p.parsed=f.parsed);continue}d.push({...f,agreed:1})}d.length&&o.push({class:c,candidates:d})}if(!o.length)return null;let r=c=>Math.max(...c.candidates.map(u=>u.confidence)),i=o[0];for(let c of o)r(c)>r(i)&&(i=c);let a=i.candidates.length===1?i.candidates[0].parsed:{ambiguousParse:!0,candidates:i.candidates.map(c=>c.parsed)},l=o.filter(c=>c!==i).map(c=>c.candidates[0]).filter(c=>!i.candidates.some(u=>xp(u.parsed,c.parsed)));return{class:i.class,parsed:a,winner:i.candidates[0],alternates:l}}function Wv(e){if(!e)return"something else";if(e.ambiguousParse)return"one of several readings";let t=e.object??e.subject??"?";return`${e.kind} "${t}"`}function Ep(e,{describe:t=Wv,answerFor:n=null}={}){return(e||[]).map(s=>{let o=s.note||t(s.parsed),r=n&&n(s)||"ask it that way";return`if you mean ${o} then ${r}`})}var uo,Bv,$p,Uv,kp,Va=L(()=>{uo=e=>String(e||"").trim().toLowerCase().replace(/\s+/g," ").replace(/^(?:the|a|an)\s+/,"").replace(/^commit\s+(?=[0-9a-f]{7,40}$)/,""),Bv=/^\s*(?:the|a|an)\s+/i,$p=e=>[e?.subject,e?.object].filter(t=>Bv.test(String(t||""))).length;Uv=new Set(["fuzzy","lemma","spell"]),kp=e=>Uv.has(e.via)});function oi(e){qa=e}function ri(){return typeof qa=="function"?qa():null}var qa,po=L(()=>{qa=null});function _p(e,t={},n=Vv){let s=[];for(let o of n)try{let r=o.run(e,t);r&&typeof r.then!="function"&&s.push(r)}catch{}return s}var Gv,Vv,Rp=L(()=>{Jn();ei();ti();yp();vp();si();Va();po();Gv=[...typeof void 0<"u"?[void 0]:[],...typeof void 0<"u"?[void 0]:[]],Vv=[hp,gp,wp,...Gv]});function fo(e){return qv.test(String(e||"").trim())?"an":"a"}function ii(e){let t=String(e||"").trim();return t&&(/(?:s|x|z|ch|sh)$/.test(t)?`${t}es`:/[^aeiou]y$/.test(t)?`${t.slice(0,-1)}ies`:`${t}s`)}function mo(e){let t=String(e||"");return t&&t[0].toUpperCase()+t.slice(1)}function tr(e){let t=(e||[]).map(n=>String(n||"").trim()).filter(Boolean);return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]}`}var qv,ai=L(()=>{qv=/^[aeiou]/i});var nr,Ha=L(()=>{nr=(e,t,n)=>n});var vf={};Sn(vf,{DYNAMIC_TAIL_OK_RE:()=>yc,applyNegationFrames:()=>Jo,ask:()=>ss,classDisplayName:()=>es,degreeMetric:()=>uf,metaFallbackEntityAnswer:()=>nf,normalizeQuery:()=>As,parseQuery:()=>ir,parseQueryFull:()=>ac,render:()=>pn,rephraseHint:()=>mc,resolveObject:()=>fn,traverse:()=>Dt,worldRelationGraphPayload:()=>Ix});function He(e,t){let n=Ap.get(e);n||(n=new Map,Ap.set(e,n));let s=n.get(t);if(s)return s;let o=[];for(let r of e.relations)if(In(r)===t)for(let i of r.edges)o.push(i);return n.set(t,o),o}function Pe(e,t){let[n,s]=Gp[e]||["result","results"];return t===1?n:s}function cr(e,t,n,s={}){return!e||!t.length?[]:[{kind:"set",class:e,label:`${t.length} ${Pe(e,t.length)}`,ids:t.map(o=>o.id),attrs:{count:t.length},lane:n,...s}]}function es(e){let t=String(e||"");if(typeof bn=="function"){let n=bn(t).join(" ");if(n)return n}return t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase()}function Ts(e){return Kv[e]||e}function Zv(e){if(!e?.ambiguousParse||!Array.isArray(e.candidates)||e.candidates.length!==2)return e;let t=e.candidates.find(r=>r?.shape==="meta"),n=e.candidates.find(r=>r!==t);if(!t||!n)return e;let s=String(t.object||"").trim().toLowerCase();if(!s||Qv.has(s))return e;let o=String(n.object||"").trim().toLowerCase();return he(vs).includes(o)?t:e}function ir(e,{nlp:t=void 0}={}){return ac(e,{nlp:t}).parsed}function ac(e,{nlp:t=void 0}={}){let n=t===void 0?ri():t,s=String(e||"").trim().replace(/\s+/g," ");if(!s)return{parsed:null,alternates:[],class:null};let o=Da(Jo(As(s)));if(!o)return{parsed:null,alternates:[],class:null};let r=t$(o,n);if(r)return{parsed:r,alternates:[],class:null};let i=Ga(_p(o,{nlp:n,raw:s}));return i?{parsed:Zv(i.parsed),alternates:i.alternates||[],class:i.class||null}:{parsed:null,alternates:[],class:null}}function ec(e,t){return t.length&&qp.has(t[0])?{bw:e.slice(1),blc:t.slice(1)}:{bw:e,blc:t}}function bo(e,t){return lo(e)||er(e,t)}function t$(e,t){let n=nn(e),s=n.map(o=>o.toLowerCase());return $$(n,s)||k$(n,s)||r$(n,s,t)||Kp(e,t,0)||E$(n,s,t)||a$(n,s,t)||m$(n,s,t,0)||g$(n,s)||y$(n,s,t)||S$(n,s,t)||R$(n,s,t)||T$(n,s,t,0)||_$(n,s,t,0)||lc(n,s,t,0)||l$(n,s,t)||s$(n,s)||ef(n,s,t,0)}function s$(e,t){let n=0;n$.has(t[n])&&(n+=1);let s=jt(t[n]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;n+=1;let r=m=>m+1<t.length?Lu[`${t[m]} ${t[m+1]}`]:void 0,i=r(n);if(!i)return null;let a=n+2,l=-1,c;for(let m=a;m+1<t.length;m+=1){let h=r(m);if(h){l=m,c=h;break}}if(l<0)return null;let u=e.slice(a,l).join(" ").trim(),d=e.slice(l+2).join(" ").trim();if(!u||!d)return null;let f=(m,h)=>m.role==="object"?{shape:"reverse",kind:m.kind,entityType:o,modifier:"direct",object:h}:{shape:"forward",kind:m.kind,modifier:"direct",object:h},p=f(i,u);return p.entityType=o,{node:"boolean",entityType:o,atoms:[{op:"seed",kind:"set",ast:{node:"clause",clause:p}},{op:"intersection",kind:"set",ast:{node:"clause",clause:f(c,d)}}]}}function li(e,t){return{node:"boolean",entityType:e,atoms:[{op:"seed",kind:"set",ast:{node:"allOfClass",entityType:e}},t]}}function r$(e,t,n){if(!["do","does","did"].includes(t[0])||!o$.has(t[1]))return null;let s=jt(t[2]);if(!s||s.placeholder||!s.entityType)return null;let o=s.entityType;if(o==="Change")return{node:"miss",reason:`"${t[2]}" isn't an enumerable kind \u2014 a universal check needs a concrete kind (functions, classes, modules, \u2026)`};let r=t[2],i=e.slice(3),a=t.slice(3);if(!i.length)return null;let l=St(a,de);if(!l)return{node:"miss",reason:"a universal check needs a known relation verb (import, call, inherit from, test, \u2026)"};let u=i.filter((f,p)=>(p<l.start||p>=l.end)&&!lt.has(a[p])&&a[p]!=="from").join(" ").trim();if(!u)return null;let d=wo(`which ${r} ${i.join(" ")}`,n,1);return!d||d.node==="miss"?{node:"miss",reason:d&&d.reason||"the universal clause didn't parse"}:{node:"universal",entityType:o,kind:l.kind,object:u,complement:li(o,{op:"difference",kind:"set",ast:d})}}function Kp(e,t,n=0){let s=dp(e);if(!s)return null;let o=jt(s.entWord);if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;if(r==="Change")return{node:"miss",reason:`"${s.entWord}" isn't an enumerable kind \u2014 a set complement needs a concrete kind (functions, classes, modules, \u2026)`};let i=nn(s.predicate),a=i.map(d=>d.toLowerCase());if(a.length&&a.every(d=>Ye[d]))return li(r,{op:"difference",kind:"qual",filters:a});let l=St(a,de);if(!l)return{node:"miss",reason:"a negated set query needs a known relation verb (import, call, inherit from, test, \u2026)"};if(!i.filter((d,f)=>(f<l.start||f>=l.end)&&!lt.has(a[f])&&a[f]!=="from").length)return li(r,{op:"difference",kind:"set",ast:{node:"existsEdge",entityType:r,kind:l.kind}});let u=wo(`which ${s.entWord} ${s.predicate}`,t,n+1);return!u||u.node==="miss"?{node:"miss",reason:u&&u.reason||"the negated clause didn't parse"}:li(r,{op:"difference",kind:"set",ast:u})}function a$(e,t,n){let s=0;for(;s<t.length&&i$.has(t[s]);)s+=1;if(!["do","does","did"].includes(t[s]))return null;s+=1;let o=e.slice(s),r=t.slice(s),i=r.indexOf("not");if(i<0)return null;let a=St(r,de);if(!a)return null;let c=o.filter((u,d)=>d!==i&&(d<a.start||d>=a.end)&&r[d]!=="from"&&!lt.has(r[d])).join(" ").trim();return c?{node:"forwardComplement",kind:a.kind,subjectTerm:c}:null}function Yp(e,t){let n=new Set;for(let s of t)for(let o of He(e,s)){let r=e.byId.get(o.object);r&&r.class&&n.add(r.class)}return n}function Xp(e,t){let n=At(t),s=n.filter(r=>!Wp.has(r)),o=Yp(e,s.length?s:n);return o.size===1?[...o][0]:null}function wo(e,t,n){if(n>Vp)return{node:"miss",reason:"too deep to resolve"};let s=Kp(e,t,n);if(s)return s;let o=nn(e),r=o.map(c=>c.toLowerCase()),i=lc(o,r,t,n);if(i)return i;let a=ef(o,r,t,n);if(a)return a;let l=bo(e,t);return l?{node:"clause",clause:l}:null}function lc(e,t,n,s){for(let o=1;o<t.length;o+=1){let r=_n.includes(t[o]),i=!r&&Hp(t[o]);if(!r&&!i||r&&o+1>=t.length||!jt(t[o-1]))continue;let l=e.slice(0,o-1);if(!l.length||l.every(f=>Ye[f.toLowerCase()]))continue;let c=bo([...l,Za].join(" "),n);if(!c||c.shape!=="reverse"&&c.shape!=="forward"||c.modifier&&c.modifier!=="direct")continue;let u=`which ${t[o-1]} ${e.slice(r?o+1:o).join(" ")}`,d=wo(u,n,s+1);return!d||d.node==="miss"?d?{node:"miss",reason:d.reason||"inner clause didn't parse"}:{node:"miss",reason:"inner clause didn't parse"}:{node:c.shape==="reverse"?"reverseSet":"forwardSet",kind:c.kind,entityType:c.entityType,inner:d}}return null}function l$(e,t,n){for(let s=0;s<t.length;s+=1){if(!c$.has(t[s])||t[s-1]==="of")continue;let o=s===t.length-1,r=s+1<t.length&&!!de[t[s+1]];if(!o&&!r)continue;let i=[...e.slice(0,s),Za,...e.slice(s+1)],a=bo(i.join(" "),n);if(!(!a||a.shape!=="reverse"&&a.shape!=="forward")&&a.object===Za&&!(a.modifier&&a.modifier!=="direct"))return{node:a.shape==="reverse"?"reverseSet":"forwardSet",kind:a.kind,entityType:a.entityType,inner:{node:"prevSet"}}}return null}function m$(e,t,n,s=0){if(t[0]!=="when")return null;let o=1;if(!u$.has(t[o]))return null;o+=1;let r=-1;for(let d=t.length-1;d>=o;d-=1)if(d$.has(t[d])){r=d;break}if(r<0)return null;let i=e.slice(o,r),a=t.slice(o,r);for(;a.length&&p$.has(a[a.length-1]);)i=i.slice(0,-1),a=a.slice(0,-1);for(;a.length&&f$.has(a[0]);)i=i.slice(1),a=a.slice(1);if(!i.length||!a.some(d=>_n.includes(d)))return null;let l=cc.has(a[0])?i.join(" "):`which ${i.join(" ")}`,c=wo(l,n,s+1);if(!c||c.node==="miss")return c?{node:"miss",reason:c.reason||"the inner set of the temporal query didn't parse"}:{node:"miss",reason:"the inner set of the temporal query didn't parse"};let u=jt(a[0]);return{node:"temporal",inner:c,entityType:u&&u.entityType||null}}function g$(e,t){if(t[0]!=="what"||t[1]!=="changed")return null;let n=2;if(t[n]==="ever"&&(n+=1),!h$.has(t[n]))return null;let s=t[n],o=e.slice(n+1).join(" ").trim();return o?{node:"commitFilter",op:s,pivotRaw:o}:{node:"miss",reason:`"what changed ${s}" needs a date or commit afterward`}}function w$(e){let t=new Set,n=[];for(let s of e){if(!s||!b$.test(s))continue;let o=s.toLowerCase();t.has(o)||(t.add(o),n.push(s))}return n}function y$(e,t,n){if(t.length===2&&t[0]==="which"&&(t[1]==="ones"||t[1]==="one"))return{node:"anaphora",mode:"list",filter:{type:"all"}};let s=-1,o=!1;for(let d=1;d<t.length;d+=1){if(!Go.includes(t[d]))continue;if(t[d-1]==="of"){s=d,o=!0;break}let f=t.slice(0,d).join(" ");if(d===t.length-1&&($s.includes(f)||xs.includes(f))){s=d;break}}if(s<0)return null;let r=(o?t.slice(0,s-1):t.slice(0,s)).join(" "),i=$s.includes(r)||/^(how many|how much|count|number|quantity|total)\b/.test(r)?"count":"list",a=v$(e.slice(s+1),n);if(a===void 0)return{node:"miss",reason:"the follow-up filter didn't parse"};let l=o?s-1:s,c=w$(e.slice(0,l)),u={node:"anaphora",mode:i,filter:a};return c.length>=2&&(u.candidateTerms=c),u}function v$(e,t){let n=0,s=e.map(a=>a.toLowerCase());for(;n<s.length&&e$.has(s[n]);)n+=1;let o=e.slice(n),r=s.slice(n);if(!o.length)return{type:"all"};if(r.every(a=>Ye[a]))return{type:"qual",filters:r};if(o.length===1){let a=jt(r[0]);if(a&&!a.placeholder&&a.entityType)return{type:"entity",entityType:a.entityType}}let i=bo(`what ${o.join(" ")}`,t);if(i&&(i.shape==="reverse"||i.shape==="forward")&&i.object)return{type:"clause",clause:i}}function $$(e,t){let n;if(t[0]==="is"&&t[1]==="there")n=2;else if(t[0]==="are"&&t[1]==="there")n=2;else return null;let s=t[n];if(s==="a"||s==="an"||s==="any")n+=1;else return null;let o=n<t.length?jt(t[n]):null;if(!o||o.placeholder||!o.entityType)return null;let r=o.entityType;n+=1;let i=t.slice(n),a=e.slice(n);if(i.length&&i[i.length-1]==="anywhere"?(i=i.slice(0,-1),a=a.slice(0,-1)):i.length>=2&&i[i.length-2]==="at"&&i[i.length-1]==="all"&&(i=i.slice(0,-2),a=a.slice(0,-2)),!i.length)return{node:"exists",entityType:r,term:null,scopeModule:null};if(i[0]==="called"||i[0]==="named"){if(i.length<2)return{node:"miss",reason:`"${i[0]}" needs a name afterward`};let l=i.indexOf("in",1);if(l>0){let u=a.slice(1,l).join(" ").trim(),d=a.slice(l+1).join(" ").trim();return!u||!d?{node:"miss",reason:'a named existence check needs both a name and a module after "in"'}:{node:"exists",entityType:r,term:u,scopeModule:d}}let c=a.slice(1).join(" ").trim();return c?{node:"exists",entityType:r,term:c,scopeModule:null}:{node:"miss",reason:`"${i[0]}" needs a name afterward`}}if(i[0]==="in"){let l=a.slice(1).join(" ").trim();return l?{node:"exists",entityType:r,term:null,scopeModule:l}:{node:"miss",reason:'"in" needs a module afterward'}}return null}function x$(e,t){if(!t.length)return null;let n=`${e} ${t.join(" ")}`,s=ws(n).slice(e.length).trim(),o=nn(s),r=o.findIndex(a=>a.toLowerCase()==="in");if(r<0)return null;let i=o.slice(r+1).join(" ").trim();return i?{scope:i}:{node:"miss",reason:'"in" needs a scope afterward'}}function k$(e,t){if(t[0]!=="is"&&t[0]!=="are"||t[1]==="there")return null;let n=-1,s=!1;for(let c=1;c<t.length;c+=1)if(Ye[t[c]]){n=c,s=t[c-1]==="not";break}if(n<0)return null;let o=t.indexOf("by",n+1);if(o>0&&Hn[t[n]]){let c=o+1;for(;c<t.length&&(t[c]==="the"||t[c]==="a"||t[c]==="an");)c+=1;let u=t[c];if(u&&!Fu.has(u))return null}let r=x$(t[n],e.slice(n+1));if(r?.node==="miss")return r;let i=1;t[i]==="the"&&(i+=1);let a=s?n-1:n;a>i&&(t[a-1]==="a"||t[a-1]==="an")&&(a-=1);let l=a>i?e.slice(i,a).join(" ").trim():"";return l?{node:"qualCheck",term:l,qualifier:t[n],negated:s,scope:r?.scope||null}:{node:"miss",reason:'"is/are <qualifier>" needs a named thing to check first'}}function E$(e,t,n){if(!["do","does","did","is","are","was","were"].includes(t[0]))return null;let s=t.indexOf("not",1);if(s<0)return null;let o=bo(e.filter((r,i)=>i!==s).join(" "),n);return!o||o.shape!=="ask"?null:{...o,negated:!0}}function S$(e,t,n){let s=$s.find(d=>t.slice(0,d.split(" ").length).join(" ")===d);if(!s)return null;let o=s.split(" ").length;for(;o<t.length&&(t[o]==="the"||t[o]==="a"||t[o]==="all");)o+=1;let r=[];for(;o<t.length&&Ye[t[o]];)r.push(t[o]),o+=1;let i=o<t.length?jt(t[o]):null;if(!i)return{node:"miss",reason:"count needs a known entity kind (functions, classes, modules, \u2026)"};let a=t[o];o+=1;let l=e.slice(o),c=t.slice(o).some(d=>!lt.has(d)&&!Jp.has(d)),u;if(c){let d=wo(`which ${a} ${l.join(" ")}`,n,1);if(!d||d.node==="miss")return{node:"miss",reason:"the count restrictor didn't parse"};u=d}else u={node:"allOfClass",entityType:i.entityType};return r.length&&(u={node:"qualifier",filters:r,inner:u}),{node:"count",entityType:i.entityType,base:u}}function _$(e,t,n,s){let o=0,r=!1,i=null;for(let y of Qp){let w=y.split(" ");if(t.slice(0,w.length).join(" ")===y){i=y,o=w.length;break}}if(!i)if(t[0]==="what"||t[0]==="which")r=!0,o=1;else return null;for(;o<t.length&&uc.has(t[o]);)o+=1;let a=[];for(;o<t.length&&Ye[t[o]];)a.push(t[o]),o+=1;let l=o<t.length?jt(t[o]):null;if(!l||l.placeholder||l.entityType==="Change")return!r&&o<t.length&&o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!Rn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Zp}`}:null;let c=l.entityType,u=t[o];o+=1;let d=e.slice(o),f=t.slice(o).some(y=>!lt.has(y)&&!Jp.has(y)),p=t.slice(o),m=d;(p[0]==="is"||p[0]==="are")&&(p=p.slice(1),m=m.slice(1));let h=r&&j$.has(p[0]);if(r&&(f&&!h||d.length===0))return null;let g,b=!1;if(f){let y=h?m:d,w=wo(`which ${[...a,u,...y].join(" ")}`,n,(s||0)+1);if(!w||w.node==="miss")return{node:"miss",reason:w&&w.reason||"the list filter didn't parse"};g=w,b=!0}else g={node:"allOfClass",entityType:c},a.length&&(g={node:"qualifier",filters:a,inner:g});return{node:"list",entityType:c,base:g,scoped:b}}function R$(e,t,n){let s=null,o=-1;for(let m=0;m<t.length;m+=1){let h=t.slice(m,m+2).join(" ");if(Kn[h]){s=Kn[h],o=m;break}if(Kn[t[m]]){s=Kn[t[m]],o=m;break}}if(!s)return null;let r=null,i=null;for(let m=o;m<t.length;m+=1)if(gn[t[m]]){r=gn[t[m]],i=t[m];break}if(!r){for(let m=o-1;m>=0;m-=1)if(gn[t[m]]){r=gn[t[m]],i=t[m];break}}let a=t.includes("connected")||t.slice(o,o+2).join(" ")==="most connected"||["largest","biggest","smallest"].includes(t[o]),l=["important","significant","central","key","core","essential","critical","principal"],c=t.some(m=>l.includes(m));!r&&(a||c)&&(r=gn.connections,i="connections");let u,d=null;for(let m of t){let h=jt(m);if(h&&!h.placeholder){u=h.entityType,d=m;break}}if(!d&&(u=i?Du[i]:void 0,!u))return{node:"miss",reason:"a superlative needs an entity kind (module, class, function, \u2026)"};if(!r)return{node:"miss",reason:"name what to rank by (imports, callers, methods, tests, or connections)"};let f=["needs","need","needing","lacks","lack","lacking","misses","missing"],p=t.some(m=>f.includes(m))?s==="most"?"fewest":"most":s;return{node:"superlative",entityType:u,metric:r,metricNoun:i,extreme:p}}function T$(e,t,n,s){if(t[0]!=="find")return null;let o=1;for(;o<t.length&&uc.has(t[o]);)o+=1;if(o>=t.length)return null;let r=jt(t[o]);if(r&&!r.placeholder&&r.entityType!=="Change"&&o+1<t.length&&A$.has(t[o+1])){let a=e.slice(o+2).join(" ").trim();if(a)return{node:"find",entityType:r.entityType,term:a}}let i=jt(t[t.length-1]);if(i&&!i.placeholder&&i.entityType!=="Change"){let a=e.slice(o,t.length-1).join(" ").trim();if(a)return{node:"find",entityType:i.entityType,term:a}}return t.some(a=>_n.includes(a))?null:o===t.length-1&&/^[a-z]+$/.test(t[o])&&!de[t[o]]&&!Rn.includes(t[o])?{node:"miss",reason:`"${t[o]}" isn't a listable kind \u2014 try ${Zp}`}:null}function C$(e,t){if(t[0]!=="find")return null;let n=1;for(;n<t.length&&uc.has(t[n]);)n+=1;let s=-1;for(let i=n+1;i<t.length;i+=1)if(_n.includes(t[i])){s=i;break}if(s<0)return null;let o=jt(t[s-1]);if(!o||o.placeholder||o.entityType==="Change")return null;let r=e.slice(n,s-1).join(" ").trim();return r?{entityType:o.entityType,term:r,relIdx:s}:null}function O$(e,t,n,s,o,r){let{branches:i,ops:a}=ui(n,s),l=null,c=[];for(let u=0;u<i.length;u+=1){let d=i[u],f=d.map(y=>y.toLowerCase()),p=u===0?"intersection":a[u-1],m=ec(d,f);if(m.blc.length&&m.blc.every(y=>Ye[y])){c.push({op:p,kind:"qual",filters:m.blc});continue}if(f[0]==="of"||f[0]==="in"){c.push({op:p,kind:"set",ast:{node:"membership",entityType:e,term:d.slice(1).join(" ")}});continue}let h=d,g=St(f,de);g?l=d.slice(g.start,g.end):l&&(h=[...l,...d]);let b=tf(`${t} ${h.join(" ")}`,o,r);if(!b||b.node==="miss")return{miss:b&&b.reason||"a clause in the combination didn't parse"};c.push({op:p,kind:"set",ast:b})}return{atoms:c}}function ef(e,t,n,s){let o=C$(e,t);if(o){let{entityType:R,term:x,relIdx:T}=o,M=t.slice(T+1),A=e.slice(T+1);if(!M.length)return{node:"miss",reason:`a relative clause needs a predicate after "${t[T]}"`};let P=O$(R,`which ${t[T-1]}`,M,A,n,s+1);if(P.miss)return{node:"miss",reason:P.miss};let G=[{op:"seed",kind:"set",ast:{node:"find",entityType:R,term:x}},...P.atoms];return G.length===1?G[0].ast:{node:"boolean",entityType:R,atoms:G}}let r=0;for(;r<t.length&&cc.has(t[r]);)r+=1;let i=r>0,a=[];for(;r<t.length&&Ye[t[r]];)a.push(t[r]),r+=1;let l=r<t.length?jt(t[r]):null;if(!l){let R=r+1<t.length?jt(t[r+1]):null;if(Tp.has(t[r])&&R&&R.entityType==="Commit"&&r+2===t.length)return{node:"recentCommits"};if(qp.has(t[r])){let x=r+1;x<t.length&&(t[x]==="the"||t[x]==="a"||t[x]==="an")&&(x+=1);let T=x+1<t.length?jt(t[x+1]):null;if(Tp.has(t[x])&&T&&T.entityType==="Commit"&&x+2===t.length)return{node:"recentCommits"}}return(i||a.length)&&R&&/^[a-z]+$/.test(t[r])&&!de[t[r]]&&!lt.has(t[r])&&!wc.has(t[r])?{node:"find",entityType:R.entityType,term:e[r]}:null}let c=l.entityType,u=t[r];r+=1;let d=t.slice(r),f=e.slice(r),p=!1;d.length&&_n.includes(d[0])&&(p=!0,d=d.slice(1),f=f.slice(1));let m=d[0]==="of"||d[0]==="in",h=d.length>0&&Hp(d[0]),g=f.length>0&&ui(d,f).branches.some(R=>{let{blc:x}=ec(R,R.map(T=>T.toLowerCase()));return x.length&&x.every(T=>Ye[T])}),b=f.length>0?ui(d,f).branches:[],y=!1;if(b.length>1){let R=b[0].map(T=>T.toLowerCase()),x=St(R,de);x&&x.start===0&&(y=b.slice(1).every(T=>{let M=T.map(P=>P.toLowerCase()),A=St(M,de);return A&&A.start===0?A.kind===x.kind:!A}))}let w=!1;if(b.length>1){let R=b[0].map(T=>T.toLowerCase()),x=St(R,de);x&&x.start===0&&(w=b.slice(1).every(T=>{let M=T.map(P=>P.toLowerCase()),A=St(M,de);return!!A&&A.start===0&&A.end-A.start===1}))}if(!(a.length||p||m||h||g||y||w))return null;if(!f.length){let R={node:"allOfClass",entityType:c};return a.length?{node:"qualifier",filters:a,inner:R,entityType:c}:{node:"miss",reason:"nothing to filter or traverse"}}let $=l.placeholder?"what":`which ${u}`,{branches:j,ops:v}=ui(d,f),E=null,k=[];for(let R=0;R<j.length;R+=1){let x=j[R],T=x.map(ee=>ee.toLowerCase()),M=R===0?"seed":v[R-1],A=ec(x,T);if(A.blc.length&&A.blc.every(ee=>Ye[ee])){k.push({op:M,kind:"qual",filters:A.blc});continue}if(T[0]==="of"||T[0]==="in"){k.push({op:M,kind:"set",ast:{node:"membership",entityType:c,term:x.slice(1).join(" ")}});continue}let P=x,G=St(T,de);G?E=x.slice(G.start,G.end):E&&(P=[...E,...x]);let J=tf(`${$} ${P.join(" ")}`,n,s+1);if(!J||J.node==="miss")return{node:"miss",reason:J&&J.reason||"a clause in the combination didn't parse"};k.push({op:M,kind:"set",ast:J})}if(k[0].kind!=="set")return{node:"miss",reason:"start with a clause, then combine with and/or/but-not"};let _;return k.length===1?_=k[0].ast:_={node:"boolean",entityType:c,atoms:k},a.length&&(_={node:"qualifier",filters:a,inner:_,entityType:c}),_}function tf(e,t,n){if(n>Vp)return{node:"miss",reason:"too deep to resolve"};let s=nn(e),o=s.map(a=>a.toLowerCase()),r=lc(s,o,t,n);if(r)return r;let i=bo(e,t);return i?{node:"clause",clause:i}:null}function ui(e,t){let n=Object.keys(eo).sort((a,l)=>l.split(" ").length-a.split(" ").length),s=[],o=[],r=0,i=0;for(;i<e.length;){let a=null;for(let l of n){let c=l.split(" ");if(e.slice(i,i+c.length).join(" ")===l){a={c:l,len:c.length};break}}a&&i>r?(s.push(t.slice(r,i)),o.push(eo[a.c]),i+=a.len,r=i):a?(i+=a.len,r=i):i+=1}return s.push(t.slice(r)),{branches:s,ops:o}}function dc(e,t,n,s){let o=ho[t];if(o&&ns.has(n)){let u=He(e,o).filter(d=>s.has(d.object));return Mn(u.map(d=>e.byId.get(d.subject)).filter(d=>d&&d.class===n))}let a=(!!o&&[...s].some(u=>ns.has(e.byId.get(u)?.class))?[...At(t),o]:At(t)).flatMap(u=>He(e,u)).filter(u=>s.has(u.object)),l=Mn(a.map(u=>e.byId.get(u.subject)).filter(Boolean));if(!n||n==="Change")return l;let c=l.filter(u=>u.class===n);return c.length?c:n!=="Module"&&l.some(u=>u.class==="Module")?hc(e,new Set(l.filter(u=>u.class==="Module").map(u=>u.id)),n):[]}function L$(e,t){let n=new Set(dc(e,"touches","Commit",t).map(s=>String(s.label||"").toLowerCase()));for(let s of t)for(let o of e.byId.get(s)?.derived_from||[]){let r=I$.exec(String(o||""));r&&n.add(r[1].toLowerCase())}return n.size}function rr(e,t,n){let s=At(t).flatMap(o=>He(e,o)).filter(o=>n.has(o.subject));return Mn(s.map(o=>e.byId.get(o.object)).filter(Boolean))}function Mn(e){let t=new Set,n=[];for(let s of e)s&&!t.has(s.id)&&(t.add(s.id),n.push(s));return n}function N$(e,t){let n=Cn(t);if(!n)return[];let s=`${n}/`;return e.individuals.filter(o=>o.class==="Module"&&Cn(o.label).startsWith(s))}function tc(e){let t=Cp.get(e);if(t)return t;let n=new Set;for(let i of He(e,"reexports")){n.add(String(i.object).toLowerCase());let a=e.byId.get(i.object);a&&n.add(String(a.label).toLowerCase())}let s=new Set,o=new Set;for(let i of He(e,"tests"))s.add(i.object),o.add(i.subject);let r=new Map;for(let i of He(e,"defines"))r.set(i.object,i.subject);return t={exported:n,testedModules:s,testModules:o,moduleOfSymbol:r},Cp.set(e,t),t}function go(e,t){return t?t.class==="Module"?t.id:tc(e).moduleOfSymbol.get(t.id)||null:null}function nf(e,t){let n=String(t||"").trim().toLowerCase();if(!n)return null;let s=(e?.individuals||[]).filter(d=>M$.has(d.class)&&String(d.label).toLowerCase()===n);if(s.length!==1)return null;let o=s[0],r=go(e,o),i=r&&e.byId.get(r)?.label||String((o.attributes||[]).find(d=>d.key==="site")?.value||"").split(":")[0]||null,a=Pe(o.class,1),l=a==="attribute"?"an":"a",c=i?`, ${nr("defined-in",o.id,"defined in")} ${i}`:"",u=o.class==="Class"?` or "which classes inherit from ${o.label}"`:"";return{text:`${o.label} is ${l} ${a} in this codebase${c} \u2014 try "describe ${o.label}"${u}.`,hit:o,modLabel:i}}function nc(e,t,n){let s=Mn(to.flatMap(o=>rr(e,o,new Set([t]))));return n?s.filter(o=>o.class===n):s}function pc(e,t,n=null){let s=Nn(e,t,n);if(!(s.match&&s.tier===1)){let o=N$(e,t);if(o.length)return{kind:"dir",mods:o}}return s.match?{kind:"single",id:s.match.id,entityClass:s.match.class,label:s.match.label}:{kind:"miss"}}function sf(e,t,n,s,o){let r=o||(()=>!0),i=nc(e,t,s).filter(r);if(i.length||!rf(e,n))return{own:i,inherited:[],viaId:null,viaLabel:null};for(let a of of(e,t)){let l=e.byId.get(a);if(!l)continue;let c=nc(e,a,s).filter(r);if(c.length)return{own:i,inherited:c,viaId:a,viaLabel:l.label}}return{own:i,inherited:[],viaId:null,viaLabel:null}}function Cs(e,t,n){if(!n)return!1;switch(n.via){case"visibility":return String((t.attributes||[]).find(o=>o.key==="visibility")?.value||"public").toLowerCase()===n.value;case"attr":return!!(t.attributes||[]).find(s=>s.key===n.attr)?.value;case"exported":{let s=tc(e).exported;return s.has(String(t.label).toLowerCase())||s.has(String(t.id).toLowerCase())}case"tested":{let s=go(e,t),o=tc(e),r=s?e.byId?.get?.(s):null;return s&&(o.testModules.has(s)||r&&js(String(r.label).toLowerCase()))?!1:(!!s&&o.testedModules.has(s))===n.value}default:return!1}}function fc(e){return He(e,"inherits")}function sc(e,t){return fc(e).filter(n=>n.object===t).map(n=>n.subject)}function Op(e,t){return fc(e).filter(n=>n.subject===t).map(n=>n.object)}function P$(e,t){let n=new Set,s=[...sc(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of sc(e,o))n.has(r)||s.push(r)}}return n}function of(e,t){let n=new Set,s=[...Op(e,t)];for(;s.length;){let o=s.shift();if(!n.has(o)){n.add(o);for(let r of Op(e,o))n.has(r)||s.push(r)}}return n}function rf(e,t){let n=Ip.get(e);if(n||(n=new Map,Ip.set(e,n)),n.has(t))return n.get(t);let s=fc(e).some(o=>{let r=e.byId.get(o.subject),i=e.byId.get(o.object);return!!r&&!!i&&r.class===t&&i.class===t});return n.set(t,s),s}function Lp(e,t){let n=String(e.label||"").toLowerCase();if(t.every(o=>n.includes(o)))return"label";let s=(e.attributes||[]).map(o=>String(o.value??"").toLowerCase());return t.every(o=>s.some(r=>r.includes(o)))?"attr":null}function Mp(e){return e.slice().sort((t,n)=>Np[n.via]-Np[t.via]||String(t.ind.label).length-String(n.ind.label).length).map(t=>t.ind)}function Pp(e,t){let n=String(t||"").trim().toLowerCase();if(n.length<4)return!1;let s=Qn(n);if(Ln(String(e.label||"").toLowerCase(),n,s)<=s)return!0;for(let o of Os(e.label))if(Ln(o,n,s)<=s)return!0;return!1}function af(e,t,n){let s=e.individuals.filter(l=>l.class===t),o=[...Os(n)];if(!o.length||!s.length)return{narrow:[],broad:[]};let r=rf(e,t),i=[];for(let l of s){let c=Lp(l,o);if(c){i.push({ind:l,via:c});continue}if(!r)continue;[...P$(e,l.id)].some(d=>{let f=e.byId.get(d);return!!f&&!!Lp(f,o)})&&i.push({ind:l,via:"chain"})}if(i.length||!r)return{narrow:Mp(i),broad:[]};let a=new Map;for(let l of s)for(let c of of(e,l.id)){if(!a.has(c)){let u=e.byId.get(c);u&&u.class===t&&Pp(u,n)&&a.set(c,{ind:u,via:"chain"})}for(let u of sc(e,c)){if(u===l.id||a.has(u))continue;let d=e.byId.get(u);d&&d.class===t&&Pp(d,n)&&a.set(u,{ind:d,via:"chain"})}}return{narrow:[],broad:Mp([...a.values()])}}function F$(e){return[...Kr(Yr(e)).entries()].sort((t,n)=>n[1]-t[1]||t[0].localeCompare(n[0])).map(([t])=>({id:`pkg:${t}`,label:t,class:"Package"}))}function sn(e,t,n){switch(t.node){case"clause":return Dt(e,t.clause,n).matches||[];case"allOfClass":return t.entityType==="Package"?F$(e):e.individuals.filter(s=>s.class===t.entityType);case"find":{let{narrow:s,broad:o}=af(e,t.entityType,t.term);return s.length?s:o}case"existsEdge":{let s=new Set(At(t.kind).flatMap(o=>He(e,o)).map(o=>o.subject));return e.individuals.filter(o=>s.has(o.id)&&(!t.entityType||o.class===t.entityType))}case"forwardComplement":{let s=Nn(e,t.subjectTerm,n&&n.contextId);if(!s.match)return[];let o=Xp(e,t.kind);if(!o)return[];let r=new Set(rr(e,t.kind,new Set([s.match.id])).map(i=>i.id));return e.individuals.filter(i=>i.class===o&&!r.has(i.id))}case"reverseSet":{let s=new Set(sn(e,t.inner,n).map(o=>o.id));return dc(e,t.kind,t.entityType,s)}case"forwardSet":{let s=new Set(sn(e,t.inner,n).map(o=>o.id));return rr(e,t.kind,s)}case"prevSet":{let s=n&&n.prev;return Array.isArray(s)?s.map(o=>e.byId.get(o)).filter(Boolean):[]}case"membership":{let s=pc(e,t.term,n&&n.contextId);if(s.kind==="dir"){if(!t.entityType||t.entityType==="Module")return s.mods;let i=new Set(s.mods.map(l=>l.id));return Mn(to.flatMap(l=>rr(e,l,i))).filter(l=>l.class===t.entityType)}if(s.kind==="miss")return[];let{own:o,inherited:r}=sf(e,s.id,s.entityClass,t.entityType);return o.length?o:r}case"qualifier":return t.inner.node==="membership"?df(e,t,n).matches:sn(e,t.inner,n).filter(o=>t.filters.every(r=>Cs(e,o,Ye[r])));case"boolean":return cf(e,t,n);case"anaphora":return lf(e,t,n).matches;default:return[]}}function cf(e,t,n){let s=[];for(let o of t.atoms){if(o.op==="seed"){s=sn(e,o.ast,n);continue}if(o.kind==="qual"){let i=l=>o.filters.every(c=>Cs(e,l,Ye[c])),a=l=>o.filters.every(c=>{let u=D$(Ye[c]);return u?Cs(e,l,u):!Cs(e,l,Ye[c])});s=o.op==="difference"?s.filter(a):s.filter(i);continue}let r=new Set(sn(e,o.ast,n).map(i=>i.id));if(o.op==="intersection")s=s.filter(i=>r.has(i.id));else if(o.op==="difference")s=s.filter(i=>!r.has(i.id));else if(o.op==="union"){let i=new Set(s.map(a=>a.id));for(let a of sn(e,o.ast,n))i.has(a.id)||(i.add(a.id),s.push(a))}}return s}function z$(e,t){if(!Array.isArray(t)||t.length<2)return null;let n=new Set,s=[];for(let o of t){let r=fn(e,o);r&&r.match&&!n.has(r.match.id)&&(n.add(r.match.id),s.push(r.match))}return s.length>=2?s:null}function lf(e,t,n){let o=z$(e,t.candidateTerms);if(!o){let d=n&&n.prev;if(!Array.isArray(d)||!d.length)return{compositeMiss:!0,reason:"no-prev",matches:[]};o=d.map(f=>e.byId.get(f)).filter(Boolean)}let r=o,i=t.filter;if(i&&i.type==="qual")r=r.filter(d=>i.filters.every(f=>Cs(e,d,Ye[f])));else if(i&&i.type==="entity")r=r.filter(d=>d.class===i.entityType);else if(i&&i.type==="clause"){let d=fn(e,i.clause.object);if(!d.match)r=[];else{let f=ho[i.clause.kind],p=[...At(i.clause.kind),...f?[f]:[]],m=new Set(p.flatMap(h=>He(e,h)).filter(h=>h.object===d.match.id).map(h=>h.subject));r=r.filter(h=>m.has(h.id))}}let a=d=>d.length&&d.every(f=>f.class===d[0].class)?d[0].class:null,l=i&&i.type==="entity"?i.entityType:a(o),c=r.length?a(r):l;if(t.mode==="count")return{compositeKind:"count",count:r.length,entityType:c,matches:[]};let u=cr(c,r,"anaphora",{bound:!0});return{compositeKind:"set",matches:r,entityType:c,referents:u}}function uf(e,t,n){let s=n.kind==="*"?B$:[n.kind,...n.sibling?[n.sibling]:[]],o=0;for(let r of s)for(let i of He(e,r)){let a=i.subject===t.id,l=i.object===t.id;if(n.dir==="out"&&a){if(n.filter){let c=e.byId.get(i.object);if(!c||c.class!==n.filter)continue}o+=1}else(n.dir==="in"&&l||n.dir==="both"&&(a||l))&&(o+=1)}return o}function U$(e){let t=e.individuals.filter(s=>s.class==="Commit"),n=s=>String((s.attributes||[]).find(o=>o.key==="date")?.value||"");return t.sort((s,o)=>n(o).localeCompare(n(s))),{compositeKind:"recentCommits",matches:t}}function G$(e,t){let{op:n,pivotRaw:s}=t,o=u=>String((u.attributes||[]).find(d=>d.key==="date")?.value||"").slice(0,10),r=null,i=null,a=null;if(W$.test(s))r=s;else{let{match:u,ambiguous:d}=fn(e,s,{expectedClass:"Commit"});u&&!d&&u.class==="Commit"&&o(u)&&(i=u.id,a=u.label,r=o(u))}if(!r)return{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotResolved:!1,matches:[]};let l=e.individuals.filter(u=>u.class==="Commit"&&u.id!==i&&o(u)).filter(u=>{let d=o(u);return n==="since"?d>=r:n==="before"?d<r:n==="after"?d>r:d===r}).sort((u,d)=>o(d).localeCompare(o(u))),c=[];return l.length&&c.push({kind:"set",class:"Commit",label:`${l.length} commit${l.length===1?"":"s"} ${n} ${s}`,ids:l.map(u=>u.id),attrs:{count:l.length,op:n,...i?{pivot:i}:{}},lane:"commitFilter"}),i&&c.push({kind:"event",class:"Commit",label:a,ids:[i],attrs:{date:r},lane:"commitFilter"}),{compositeKind:"commitFilter",op:n,pivotRaw:s,pivotDate:r,pivotResolved:!0,matches:l,referents:c}}function V$(e,t,n){let s=sn(e,t.inner,n),o=new Set(s.map(a=>a.id));if(!o.size)return{compositeKind:"temporal",matches:[],entityType:t.entityType,innerCount:0};let r=dc(e,"touches","Commit",o),i=a=>String((a.attributes||[]).find(l=>l.key==="date")?.value||"");return r.sort((a,l)=>i(l).localeCompare(i(a))),{compositeKind:"temporal",matches:r,entityType:t.entityType,innerCount:s.length}}function q$(e,t){let n=e.individuals.filter(a=>a.class===t.entityType);if(t.metric?.kind==="tests"&&t.entityType==="Module"){let a=new Set(He(e,"tests").map(l=>l.subject));n=n.filter(l=>!a.has(l.id)&&!js(String(l.label).toLowerCase()))}let s=n.map(a=>({ind:a,score:uf(e,a,t.metric)})).sort((a,l)=>t.extreme==="most"?l.score-a.score:a.score-l.score);if(!s.length)return{compositeKind:"superlative",entityType:t.entityType,matches:[]};let o=s[0].score,r=s.filter(a=>a.score===o).map(a=>a.ind),i=r.length>=2?cr(t.entityType,r,"superlative"):[{kind:"entity",class:t.entityType,label:r[0].label,ids:[r[0].id],attrs:{},lane:"superlative"}];return i.push({kind:"measure",label:`${o} ${t.metricNoun}`,ids:[],attrs:{metric:o},lane:"superlative"}),{compositeKind:"superlative",entityType:t.entityType,metricNoun:t.metricNoun,extreme:t.extreme,score:o,matches:r,referents:i}}function df(e,t,n){let s=t.node==="qualifier"&&t.inner.node==="membership"?t:null,o=s?s.inner:t,r=o.entityType,i=s?m=>s.filters.every(h=>Cs(e,m,Ye[h])):null,a=m=>cr(r,m,"membership"),l=pc(e,o.term,n&&n.contextId);if(l.kind==="dir"){let m;if(!r||r==="Module")m=l.mods;else{let h=new Set(l.mods.map(g=>g.id));m=Mn(to.flatMap(g=>rr(e,g,h))).filter(g=>g.class===r)}return i&&(m=m.filter(i)),{compositeKind:"set",matches:m,entityType:r,referents:a(m)}}if(l.kind==="miss")return{compositeKind:"set",matches:[],entityType:r};let{own:c,inherited:u,viaLabel:d}=sf(e,l.id,l.entityClass,r,i),f=!c.length&&u.length>0,p=f?u:c;return{compositeKind:"membership",entityType:r,matches:p,inheritedNotOwn:f,viaLabel:d,ownerLabel:l.label,referents:a(p)}}function H$(e,t){let{entityType:n,term:s,scopeModule:o}=t,r=null;if(o){let a=fn(e,o,{expectedClass:"Module"});if(!a.match)return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMiss:!0,matches:[]};r=a.match}if(s){let a=fn(e,s,{expectedClass:n}),l=!r||a.match&&go(e,a.match)===r.id,c=a.match&&l;return{compositeKind:"exists",entityType:n,term:s,scopeModule:o,scopeMatch:r,matches:c?[a.match]:[]}}let i=r?hc(e,new Set([r.id]),n):e.individuals.filter(a=>a.class===n);return{compositeKind:"exists",entityType:n,term:null,scopeModule:o,scopeMatch:r,matches:i}}function K$(e,t,n){let s=go(e,t);return n.kind==="dir"?n.mods.some(o=>o.id===t.id||o.id===s):s===n.id||nc(e,n.id).some(o=>o.id===t.id)}function Y$(e,t,n){let{term:s,qualifier:o,negated:r,scope:i}=t,a=Nn(e,s,n.contextId);if(a.unresolvedPronoun)return{compositeKind:"qualCheck",qualCheckMiss:"pronoun",term:s,matches:[]};if(!a.match)return{compositeKind:"qualCheck",qualCheckMiss:"unresolved",term:s,matches:[]};if(i){let d=pc(e,i,n.contextId);if(d.kind==="miss")return{compositeKind:"qualCheck",qualCheckMiss:"scope",term:s,scope:i,matches:[]};if(!K$(e,a.match,d))return{compositeKind:"qualCheck",qualCheckMiss:"outsideScope",term:s,scope:i,subjectLabel:a.match.label,scopeLabel:d.kind==="dir"?i:d.label,matches:[]}}let l=Cs(e,a.match,Ye[o]),c=r?!l:l,u=[{kind:"entity",class:a.match.class,label:a.match.label,ids:[a.match.id],attrs:{},lane:"qualCheck"}];return{compositeKind:"qualCheck",subject:a.match,qualifier:o,negated:r,holds:c,matches:[a.match],referents:u}}function X$(e,t,n){let s=fn(e,t.object);if(!s||!s.match)return{compositeKind:"universal",universalMiss:"unresolved",object:t.object,matches:[]};let o=sn(e,{node:"allOfClass",entityType:t.entityType},n),r=cf(e,t.complement,n),i=r.length===0;return{compositeKind:"universal",entityType:t.entityType,kind:t.kind,object:s.match.label,holds:i,total:o.length,counter:r,matches:i?o:r}}function J$(e,t,n){if(t.node==="reverseSet"&&t.kind==="touches"&&t.entityType==="Commit")return new Set(sn(e,t.inner,n).map(s=>s.id));if(t.node==="clause"&&t.clause?.shape==="reverse"&&t.clause.kind==="touches"&&t.clause.entityType==="Commit"){let{objMatch:s,ambiguous:o}=Dt(e,t.clause,n);return s&&!o?new Set([s.id]):null}return null}function Q$(e,t,n={}){if(t.node==="miss")return{compositeMiss:!0,reason:t.reason||null,matches:[]};if(t.node==="exists")return H$(e,t);if(t.node==="qualCheck")return Y$(e,t,n);if(t.node==="universal")return X$(e,t,n);if(t.node==="count"){let i=J$(e,t.base,n);return i?{compositeKind:"count",count:L$(e,i),entityType:t.entityType,matches:[]}:{compositeKind:"count",count:sn(e,t.base,n).length,entityType:t.entityType,matches:[]}}if(t.node==="list")return{compositeKind:"list",matches:sn(e,t.base,n),entityType:t.entityType,scoped:t.scoped};if(t.node==="worldRelation")return Cx(e,t);if(t.node==="superlative")return q$(e,t);if(t.node==="temporal")return V$(e,t,n);if(t.node==="recentCommits")return U$(e);if(t.node==="commitFilter")return G$(e,t);if(t.node==="anaphora")return lf(e,t,n);if(t.node==="membership"||t.node==="qualifier"&&t.inner.node==="membership")return df(e,t,n);if(t.node==="find"){let{narrow:i,broad:a}=af(e,t.entityType,t.term);return{compositeKind:"find",entityType:t.entityType,term:t.term,matches:i.length?i:a,broad:!i.length&&a.length>0}}if((t.node==="reverseSet"||t.node==="forwardSet")&&t.inner.node==="prevSet"&&!(Array.isArray(n.prev)&&n.prev.length))return{compositeMiss:!0,reason:"no-prev",matches:[]};let s=sn(e,t,n),o=t.entityType||null,r=cr(o,s,t.node==="qualifier"?"qualifierListing":"compositeSet");return{compositeKind:"set",matches:s,entityType:o,referents:r}}function pf(){return'compositional queries also work: "which functions call X and call Y", "what calls something that imports X", "public methods of X", "list functions" / "show me the classes", "how many classes", "which module has the most imports", "find me the payment class", or (after a listing) "which of those are tested"'}function Z$(e){let t=["Function","Method"].includes(e.class)?`${e.label}()`:e.label;if(e.class==="Module")return t;let n=ar(e);return n?`${t} in ${n}`:t}function oc(e){return!e||typeof e!="object"?!1:Array.isArray(e)?e.some(oc):Array.isArray(e.filters)&&e.filters.some(t=>Ye[String(t).toLowerCase()]?.via==="tested")?!0:Object.values(e).some(oc)}function ex(e,t){return!["Function","Method"].includes(t)||!oc(e)?null:"This index records tests edges module to module, so it holds no function-grain coverage to filter on \u2014 ask whether the module a function lives in is tested instead."}function tx(e,t,n){if(t.compositeMiss)return t.reason==="no-prev"?{content:'"those"/"them" needs a previous answer to refer to \u2014 ask a listing question first, then follow up.',miss:!0,ambiguous:!1}:{content:`couldn't compile this compositional question${t.reason?` (${t.reason})`:""}. ${pf()}.`,miss:!0,ambiguous:!1};if(t.compositeKind==="exists"){if(t.scopeMiss)return{content:`no module matching "${t.scopeModule}" found in the index.`,miss:!0,ambiguous:!1};let s=Pe(t.entityType,1),o=Pe(t.entityType,2),r=t.scopeMatch?` in ${t.scopeMatch.label}`:"";if(t.term){if(!t.matches.length)return{content:`No \u2014 no ${s} named "${t.term}" found${r}.`,miss:!0,ambiguous:!1};let i=t.matches[0],a=ar(i),l=i.class==="Module"?"":a?`, ${nr("defined-in",i.id,"defined in")} ${a}`:"";return{content:`Yes \u2014 ${i.label} is a ${s}${l}.`,miss:!1,ambiguous:!1,matches:t.matches}}return t.matches.length?{content:`Yes \u2014 ${Zn(t.matches)}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 no ${o} found${r}.`,miss:!0,ambiguous:!1}}if(t.compositeKind==="qualCheck"){if(t.qualCheckMiss==="pronoun")return{content:`"${t.term}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="unresolved")return{content:`couldn't find "${t.term}" in the index to check.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="scope")return{content:`couldn't find "${t.scope}" in the index to check inside.`,miss:!0,ambiguous:!1};if(t.qualCheckMiss==="outsideScope")return{content:`No \u2014 ${t.subjectLabel} isn't in ${t.scopeLabel}.`,miss:!0,ambiguous:!1};let s=t.subject.label,o=t.negated?`not ${t.qualifier}`:t.qualifier,r=t.negated?t.qualifier:`not ${t.qualifier}`;return{content:`${t.holds?"Yes":"No"} \u2014 ${s} is ${t.holds?o:r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="universal"){if(t.universalMiss==="unresolved")return{content:`couldn't find "${t.object}" in the index to check.`,miss:!0,ambiguous:!1,matches:[]};let s=Pe(t.entityType,t.total),o=Xv(t.kind);return t.holds?{content:`Yes \u2014 all ${t.total} ${s} ${o} ${t.object}.`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`No \u2014 ${t.counter.length} of ${t.total} ${s} do not ${o} ${t.object}: ${Zn(t.counter)}.`,miss:!1,ambiguous:!1,matches:t.counter}}if(t.compositeKind==="count"){let s=t.entityType?Pe(t.entityType,t.count):t.count===1?"result":"results";return{content:`${t.count} ${s}.`,miss:!1,ambiguous:!1,matches:[]}}if(t.compositeKind==="list"){if(!t.matches.length)return{content:`no ${Pe(t.entityType,2)} in this index.`,miss:!0,ambiguous:!1,matches:[]};let s=!["Module","Package","Commit","Fact","Utterance","Session","Source","Rule"].includes(t.entityType),o=!t.scoped&&s&&t.matches.length>qe?` \u2014 narrow with "${Pe(t.entityType,2)} in <module>"`:"";return{content:`${Zn(t.matches)}${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="worldRelation"){let s=dn(t.askedClasses),o=Zs[t.relation].nouns[1];if(!t.pairs.length)return{content:`no ${o} on record for ${s} in this graph.`,miss:!0,ambiguous:!1,matches:[]};let r=Zs[t.relation].reads;return{content:`${t.pairs.map(a=>`${a.subject.label||a.subject.id} ${r} ${a.object}`).join("; ")}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="membership"){if(!t.matches.length)return{content:`nothing in the index matches that${t.entityType?` (${Pe(t.entityType,2)})`:""}. ${ts(n)}`,miss:!0,ambiguous:!1,matches:[]};if(t.inheritedNotOwn){let s=Pe(t.entityType,2);return{content:`${t.ownerLabel?`${t.ownerLabel} has no own ${s}`:`no own ${s}`} \u2014 inherited from ${t.viaLabel}: ${Zn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches,inheritedNotOwn:!0}}return{content:`${Zn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="find"){let s=Pe(t.entityType,1);if(!t.matches.length)return{content:`no ${Pe(t.entityType,2)} found matching "${t.term}".`,miss:!0,ambiguous:!1,matches:[]};let o=t.matches.length===1?Z$(t.matches[0]):Zn(t.matches);return t.broad?{content:`no exact ${s} named "${t.term}", but found a related ${t.matches.length===1?s:Pe(t.entityType,2)}: ${o}.`,miss:!1,ambiguous:!1,matches:t.matches,relatedNotExact:!0}:{content:`${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="recentCommits"){if(!t.matches.length)return{content:"no commits recorded in this index.",miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Ft).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Ft?` \u2026+${t.matches.length-Ft} more`:"";return{content:`${t.matches.length} recent commit(s): ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="commitFilter"){if(!t.pivotResolved)return{content:`"${t.pivotRaw}" isn't a recognized date (yyyy-mm-dd) or a known commit \u2014 try "what changed since 2026-06-01" or "what changed before <commit>".`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no commits recorded ${t.op} ${t.pivotRaw}.`,miss:!0,ambiguous:!1,matches:[]};let s=i=>String((i.attributes||[]).find(a=>a.key==="date")?.value||""),o=t.matches.slice(0,Ft).map(i=>{let a=s(i).slice(0,10),l=(i.attributes||[]).find(c=>c.key==="message")?.value||"";return`${i.label}${a?` (${a})`:""}${l?` \u2014 ${l}`:""}`}),r=t.matches.length>Ft?` \u2026+${t.matches.length-Ft} more`:"";return{content:`${t.matches.length} commit(s) changed ${t.op} ${t.pivotRaw}: ${o.join(", ")}${r}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="superlative"){if(!t.matches.length)return{content:`no ${Pe(t.entityType,2)} to rank in this index.`,miss:!0,ambiguous:!1};let s=t.extreme==="most"?"the most":"the fewest",o=t.matches.length>1?` (${t.matches.length}-way tie)`:"";return{content:`${Zn(t.matches)} \u2014 ${s} ${t.metricNoun} (${t.score})${o}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.compositeKind==="temporal"){let s=t.innerCount||0,o=t.entityType?Pe(t.entityType,s||2):s===1?"entity":"entities",r=s===1?"was":"were";if(!s)return{content:`nothing in the index matches the inner set, so there is no change history to date. ${ts(n)}`,miss:!0,ambiguous:!1,matches:[]};if(!t.matches.length)return{content:`no recorded commit touched the ${s} ${o} in that set in this index. ${ts(n)}`,miss:!0,ambiguous:!1,matches:[]};let i=t.matches[0],a=(i.attributes||[]).find(d=>d.key==="date")?.value||"";if(!a)return{content:`the ${o} in that set ${r} last touched by commit ${i.label}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1,matches:t.matches};let l=(i.attributes||[]).find(d=>d.key==="message")?.value||"",c=String(a).slice(0,10),u=t.matches.length-1;return{content:`the ${o} in that set ${r} last touched by commit ${i.label} on ${c}${l?` ("${l}")`:""}${u?`; ${u} earlier commit${u===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.matches.length){let s=ex(e,t.entityType)||ts(n);return{content:`nothing in the index matches that${t.entityType?` (${Pe(t.entityType,2)})`:""}. ${s}`,miss:!0,ambiguous:!1,matches:[]}}return{content:`${Zn(t.matches)}.`,miss:!1,ambiguous:!1,matches:t.matches}}function mc(){return`"which <functions|classes|modules> <imports|calls|uses|inherits from|tests> <name>" or "what does <name> <import|call|export>" or "what uses <name>" or "where is <name> defined" / "where is <name> mentioned" or "when did <name> change" or "which commits touched <name>" or "which changes touch commit <sha>"/"what did commit <sha> touch" (a commit's own changes) or plainly "what calls this" (about a selected node) or "what does <term> mean"/"what is a <ClassName>" (about the graph's own vocabulary). `+pf()}function ts(e=null){return e&&Ia(e)===0?"This store holds no code index, so it records no modules or commits to look through.":`Try "who touched <a module that actually has commits>" or "/describe <module>" to see what's in the index.`}function Os(e){return new Set(String(e).toLowerCase().split(/[^a-z0-9]+/).filter(Boolean))}function pi(e){if(e.length<5)return e;let t=e.replace(/(ing|ers|ors|er|or)$/,"");return t===e?e:t.length>=3&&t[t.length-1]===t[t.length-2]?t.slice(0,-1):t}function ff(e){return String(e||"").replace(/\.[a-z0-9]+$/i,"").toLowerCase().replace(/[/\-_.]+/g,"")}function nx(e){return String(e||"").trim().replace(/^(?:the|a|an)\s+/i,"").toLowerCase().replace(/[\s\-_]+/g,"")}function sr(e,t,{expectedClass:n=null}={}){let s=String(t||"").trim();if(!s)return{match:null,candidates:[],tier:null,ambiguous:!1};let o=s.toLowerCase(),r=n?e.individuals.filter(g=>g.class===n):e.individuals,i=o.match(/^(commit[:\s])?([0-9a-f]{7,40})$/);if(i){let g=i[2],b=r.filter(y=>y.class==="Commit"&&(String(y.id).toLowerCase().startsWith(`commit:${g}`)||String(y.label).toLowerCase().startsWith(g)));if(b.length===1)return{match:b[0],candidates:[],tier:1,ambiguous:!1};if(b.length>1)return{match:b[0],candidates:b.slice(1,5),tier:1,ambiguous:!0};if(i[1])return{match:null,candidates:[],tier:null,ambiguous:!1}}let a=r.find(g=>String(g.label).toLowerCase()===o||String(g.id).toLowerCase()===o);if(a)return{match:a,candidates:[],tier:1,ambiguous:!1};let l=`ext:${o}`,c=null;e:for(let g of e.relations)for(let b of g.edges)if(String(b.object).toLowerCase()===l){c=b.object;break e}if(c&&!n)return{match:{id:c,label:s,class:null},candidates:[],tier:2,ambiguous:!1};let u=s.split(/\s+and\s+/i).map(g=>g.trim()).filter(Boolean);if(u.length>1){let g=new Set;for(let b of u){let y=sr(e,b,{expectedClass:n});y.match&&!y.ambiguous&&g.add(y.match.id)}if(g.size>1)return{match:null,candidates:[],tier:null,ambiguous:!1}}let d=[],f=!o.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(o);if(f){let g=o.split(".").pop();for(let b of r){let y=String(b.label||"").toLowerCase();b.class==="Module"?y.split("/").pop()===o&&d.push({ind:b,score:1e3-Math.abs(y.length-o.length)}):y.includes(o)?d.push({ind:b,score:2e3-Math.abs(y.length-o.length)}):y.endsWith(`.${g}`)&&d.push({ind:b,score:1500-Math.abs(y.length-o.length)})}}else{let g=[...Os(s)],b=o.split(/\s+/).find(v=>v.includes("/")),y=b?b.split("/").pop().replace(/\.[a-z0-9]+$/,""):null,$=s.trim().replace(/^(?:the|a|an)\s+/i,"").trim().split(/\s+/).filter(Boolean).length>=2,j=$?nx(s):null;for(let v of r){let E=String(v.label||"").toLowerCase(),k=E.split("/").pop().replace(/\.[a-z0-9]+$/,"");if(k===o){d.push({ind:v,score:5e3});continue}if(o.length>=4&&(k.startsWith(o)||k.endsWith(o))){d.push({ind:v,score:4e3-Math.abs(k.length-o.length)});continue}if($){let x=ff(v.label);if(x&&x===j){d.push({ind:v,score:5e3});continue}let T=/[/_-]/.test(v.label)||/\.[a-z0-9]+$/i.test(String(v.label||""));if(x&&T&&j.length>=4&&x.includes(j)){d.push({ind:v,score:2e3-Math.abs(x.length-j.length)});continue}}if(v.class==="Module"){let x=pi(o);if(x!==o&&x===pi(k)){let T=Qn(o);if(Ln(k,o,T)>T){d.push({ind:v,score:3e3-Math.abs(k.length-o.length)});continue}}}if(o.length>=4&&E.includes(o)){d.push({ind:v,score:1e3-Math.abs(E.length-o.length)});continue}let _=Os(v.label),R=g.filter(x=>_.has(x)).length;R>0&&(!y||_.has(y))&&d.push({ind:v,score:R/g.length*Ya})}}if(d.sort((g,b)=>b.score-g.score),d.length){let[g,...b]=d,y=b.filter($=>$.score===g.score),w=g.score>=Ya?b.filter($=>$.score>=Ya):b;return{match:g.ind,candidates:w.slice(0,4).map($=>$.ind),tier:3,ambiguous:y.length>0}}let p=f||o.includes("/"),m=null,h=!p&&typeof ks=="function"?ks(e.proseIndex,s).filter(g=>!n||e.byId.get(g.id)?.class===n):[];if(h.length){let[g,...b]=h,y=e.byId.get(g.id);if(y){let w=b.filter($=>$.score===g.score);if(m={match:y,candidates:b.slice(0,4).map($=>e.byId.get($.id)).filter(Boolean),tier:4,ambiguous:w.length>0,matchedVia:"prose"},!m.ambiguous&&g.via!=="spell")return m}}if(!i&&o.length>=4){let g=Qn(o),b=g+1,y=[];for(let w of r){let $=Ln(String(w.label||"").toLowerCase(),o,g);if($>0)for(let j of Os(w.label)){if($<=0)break;$=Math.min($,Ln(j,o,g))}$<b?(b=$,y=[w]):$===b&&$<=g&&y.push(w)}if(b<=g&&y.length===1)return{match:y[0],candidates:[],tier:5,ambiguous:!1,matchedVia:"fuzzy"};if(b<=g&&y.length>1&&!m){let[w,...$]=y;return{match:w,candidates:$.slice(0,4),tier:5,ambiguous:!0,matchedVia:"fuzzy"}}}return m||{match:null,candidates:[],tier:null,ambiguous:!1}}function Xa(e,t){let n=ff(t),s=[...Os(t)],o=[];for(let r of Os(e))n.includes(r)||s.some(i=>pi(i)===pi(r))||di.has(r)||gf.has(r)||o.push(r);return o}function ci(e,t){if(!e?.match||e.tier!==3||e.matchedVia)return e;if(e.ambiguous){let s=[e.match,...e.candidates||[]],o=s.map(r=>new Set(Xa(t,r.label))).reduce((r,i)=>r.filter(a=>i.has(a)),Xa(t,s[0].label));return o.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:o,nearestLabel:dn(s.slice(0,4).map(r=>r.label))}:e}let n=Xa(t,e.match.label);return n.length?{match:null,candidates:[],tier:null,ambiguous:!1,unplacedWords:n,nearestLabel:e.match.label}:e}function fn(e,t,n={}){let{expectedClass:s=null}=n;if(!s){let o=String(t||"").trim(),r=o.replace(sx,"").trim(),i=r.match(ox);if(i){let a=r.slice(0,i.index).trim(),l=Ue[i[1].toLowerCase()];if(a&&l){let c=ci(sr(e,a,{expectedClass:l}),a);if(c?.match?.id&&!c.ambiguous)return c}}if(r&&r!==o){let a=ci(sr(e,r,n),r);if(a?.match?.id&&!a.ambiguous)return a}return ci(sr(e,t,n),t)}return ci(sr(e,t,n),t)}function Nn(e,t,n){if(ys.includes(String(t||"").trim().toLowerCase())){if(!n)return{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0};let s=e.byId.get(n);return s?{match:s,candidates:[],tier:1,ambiguous:!1}:{match:null,candidates:[],tier:null,ambiguous:!1,unresolvedPronoun:!0}}return fn(e,t)}function hc(e,t,n){let s=[];for(let o of He(e,"defines")){if(!t.has(o.subject))continue;let r=e.byId.get(o.object);r&&r.class===n&&s.push(r)}return s}function rx(e,t,n,s={}){let o=!n||n==="Change"||n==="Commit",r=o||n==="Module",i=o||ns.has(n),a=[...r?["touches"]:[],...i?["touchesSymbol"]:[]],l=a.flatMap(c=>He(e,c)).filter(c=>c.subject===t.id).map(c=>e.byId.get(c.object)).filter(Boolean);return n&&ns.has(n)&&(l=l.filter(c=>c.class===n)),{matches:l,objMatch:t,commitSubject:!0,ambiguous:!1,candidates:[],traversal:`${a.join("+")} edges where subject = commit ${t.label}`,...s}}function lx(e,t){let n=new Set(String(t||"").toLowerCase().split(/[\s-]+/).filter(Boolean));return(e.individuals||[]).filter(s=>s.class==="Module"&&gc.has(Fp(s.label))).map(s=>({ind:s,named:n.has(Fp(s.label))?1:0,depth:String(s.label).split("/").length,fixture:cx(s.label)?1:0})).sort((s,o)=>o.named-s.named||s.depth-o.depth||s.fixture-o.fixture||String(s.ind.label).localeCompare(String(o.ind.label))).map(s=>s.ind)}function ux(e,t,n){return e==="reverse"&&(t==="imports"||t==="calls")&&(!n||n==="Module")}function bc(e){return(e?.attributes||[]).find(t=>t.prop===dx)?.value||null}function px(e){return e==="SchemaClass"?"a class in the graph's schema":e==="SchemaPredicate"?"a predicate (relation) in the graph's schema":`${fo(e)} ${e} in this graph's vocabulary`}function Dt(e,t,{contextId:n=null,prev:s=null,pinnedObjMatch:o=null}={}){if(!t)return{matches:[],objMatch:null,candidates:[],traversal:null,ambiguous:!1};if(t.node)return Q$(e,t,{contextId:n,prev:s});if(t.ambiguousParse){let A=t.candidates.map(P=>{let G=Dt(e,P,{contextId:n,prev:s});return{parsed:P,result:G,rendered:pn(P,G,e)}});return{matches:[],objMatch:null,candidates:t.candidates,traversal:null,ambiguous:!0,branches:A}}let{shape:r,kind:i,entityType:a}=t;if(r==="meta"){let A=String(t.object||"").trim(),P=A.toLowerCase(),G=(e.individuals||[]).find(J=>{if(!bc(J))return!1;if(String(J.label).toLowerCase()===P)return!0;let ee=(J.attributes||[]).find(ie=>ie.key==="token")?.value;return ee&&String(ee).toLowerCase()===P});if(!G){let J=nf(e,A);return J?{matches:[J.hit],objMatch:J.hit,candidates:[],ambiguous:!1,metaCodeClass:!0,metaFallbackText:J.text,traversal:`schema lookup for "${A}" (miss), then unique code-entity individual by label`}:{matches:[],objMatch:null,candidates:[],traversal:`schema lookup for "${A}"`,ambiguous:!1}}return{matches:[G],objMatch:G,candidates:[],traversal:`schema lookup for "${A}"`,ambiguous:!1}}if(r==="mentions"){let A=String(t.object||"").trim();return{matches:(typeof ks=="function"?ks(e.proseIndex,A):[]).map(J=>e.byId.get(J.id)).filter(Boolean),objMatch:null,candidates:[],ambiguous:!1,mentionsShape:!0,traversal:`proseIndex word lookup for "${A}"`}}if(r==="where"&&ix.test(String(t.object||"").trim())){let A=lx(e,t.object);return{matches:A,objMatch:A[0]||null,candidates:A.slice(1,5),ambiguous:!1,entryPointShape:!0,traversal:`Module individuals with an entry-point basename (${[...gc].join("/")}), ranked query-named basename first, then shallower path, then non-test path`}}if(t.modifier&&t.modifier!=="direct"&&!ux(r,i,a))return{matches:[],objMatch:null,candidates:[],ambiguous:!1,unsupportedModifier:!0,traversal:`modifier "${t.modifier}" requested for a "${i}" query \u2014 no closure traversal exists for this combination yet`};if(r==="ask"){let A=Nn(e,t.subject,n),P=Nn(e,t.object,n);if(!A.match||!P.match||A.ambiguous||P.ambiguous)return{matches:[],objMatch:P.match,candidates:P.candidates,traversal:null,ambiguous:!1,answer:null,unresolvedPronoun:!!(A.unresolvedPronoun||P.unresolvedPronoun)};let[G,J]=[A.match,P.match];i==="touches"&&J.class==="Commit"&&G.class!=="Commit"&&([G,J]=[J,G]);let ee=ho[i],ie=[...new Set(ee?[...At(i),ee]:At(i))],D=ie.flatMap(z=>He(e,z)).filter(z=>z.subject===G.id&&z.object===J.id);return{matches:D,answer:t.negated?D.length===0:D.length>0,objMatch:P.match,subjMatch:A.match,candidates:[],traversal:`${ie.join("+")} edge from ${G.label} to ${J.label}`,ambiguous:!1}}let l;if(o)l={match:o,candidates:[],ambiguous:!1,matchedVia:null};else{if(l=Nn(e,t.object,n),t.altObject&&t.altObject!==t.object){let A=Nn(e,t.altObject,n),P=!!l.match&&!l.ambiguous,G=!!A.match&&!A.ambiguous;!P&&G?l=A:P&&G&&l.match.id!==A.match.id&&(l={...l,ambiguous:!0,candidates:[A.match,...l.candidates||[]]})}if(t.kind==="tests"&&l.match&&!l.ambiguous&&!String(t.object||"").includes("/")){let A=J=>J.replace(/\.(?:test|spec|tests)(?=\.[^.]+$)/,""),P=A(String(t.object||"").trim().toLowerCase()),G=(e.individuals||[]).find(J=>{if(J.class!=="Module"||J.id===l.match.id)return!1;let ee=String(J.label||"").toLowerCase().split("/").pop();return ee!==A(ee)&&A(ee)===P});G&&(l={...l,ambiguous:!0,candidates:[G,...l.candidates||[]]})}}let{match:c,candidates:u,ambiguous:d,unresolvedPronoun:f,matchedVia:p,unplacedWords:m,nearestLabel:h}=l;if(!c)return{matches:[],objMatch:null,candidates:u,traversal:null,ambiguous:!1,unresolvedPronoun:f,unplacedWords:m,nearestLabel:h};if(d){let P=Mn([c,...u||[]]).slice(0,qe).map(G=>{let J=Dt(e,t,{contextId:n,prev:s,pinnedObjMatch:G});return{candidate:G,result:J,rendered:pn(t,J,e)}});return{matches:[],objMatch:c,candidates:u,traversal:null,ambiguous:!0,branches:P}}if(r==="where"){let A=(c.attributes||[]).find(P=>P.key==="site")?.value||null;return{matches:[c],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whereShape:!0,site:A,traversal:A?`site attribute of ${c.label}`:`class + defining module of ${c.label}`}}if(r==="when"){let A=J=>String((J.attributes||[]).find(ee=>ee.key==="date")?.value||""),P;if(c.class==="Commit")P=[c];else{let J=["touches","touchesSymbol"].flatMap(ie=>He(e,ie)).filter(ie=>ie.object===c.id),ee=new Set;P=[];for(let ie of J){if(ee.has(ie.subject))continue;ee.add(ie.subject);let D=e.byId.get(ie.subject);D&&D.class==="Commit"&&P.push(D)}P.sort((ie,D)=>A(D).localeCompare(A(ie)))}let G=P.length&&A(P[0])?[{kind:"event",class:"Commit",label:P[0].label,ids:[P[0].id],attrs:{date:A(P[0]).slice(0,10)},lane:"when"}]:[];return{matches:P,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whenShape:!0,referents:G,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit date first`}}if(r==="whoLast"){let A=ie=>String((ie.attributes||[]).find(D=>D.key==="date")?.value||""),P=["touches","touchesSymbol"].flatMap(ie=>He(e,ie)).filter(ie=>ie.object===c.id),G=new Set,J=[];for(let ie of P){if(G.has(ie.subject))continue;G.add(ie.subject);let D=e.byId.get(ie.subject);D&&D.class==="Commit"&&J.push(D)}J.sort((ie,D)=>A(D).localeCompare(A(ie)));let ee=J.length&&A(J[0])?[{kind:"event",class:"Commit",label:J[0].label,ids:[J[0].id],attrs:{date:A(J[0]).slice(0,10)},lane:"whoLast"}]:[];return{matches:J,objMatch:c,candidates:u,ambiguous:d,matchedVia:p,whoLastShape:!0,referents:ee,traversal:`touches+touchesSymbol edges where object = ${c.label}, newest commit's author`}}if(i==="touches"&&c.class==="Commit")return rx(e,c,a,{candidates:u,ambiguous:d,matchedVia:p});if(r==="forward"){let A=ho[i],G=!!(A&&c.class&&ns.has(c.class))?[...new Set([...At(i),A])]:At(i);if(a&&a!=="Change"){let U=Yp(e,G),C=Ka[a];if(U.size&&!U.has(a)&&!(C&&U.has(C)))return{matches:[],objMatch:c,candidates:u,ambiguous:d,matchedVia:p,forwardGrainMiss:!0,wantClasses:[...U],traversal:`${G.join("+")} edges where subject = ${c.label} (grain mismatch: this "${i}" relation never targets a ${es(a)})`}}let ee=G.flatMap(U=>He(e,U)).filter(U=>U.subject===c.id).map(U=>e.byId.get(U.object)).filter(Boolean),ie=Mn(ee),D=ie,z="";if(a&&a!=="Change"){D=ie.filter(C=>C.class===a);let U=Ka[a];if(!D.length&&U){let C=ie.filter(I=>I.class===U);C.length&&(D=C,z=`, widened to ${U} subjects (no ${a} recorded)`)}}return{matches:D,objMatch:c,candidates:u,traversal:`${G.join("+")} edges where subject = ${c.label}${z}`,ambiguous:d,matchedVia:p}}if(t.modifier==="transitive")return{matches:ao(e,c,{maxDepth:Dp}).flat().map(G=>e.byId.get(G.id)).filter(Boolean),objMatch:c,candidates:u,ambiguous:d,matchedVia:p,traversal:`reverse dependency closure over imports+calls edges from ${c.label} (impactClosure, maxDepth=${Dp})`};let g=ho[i]||At(i).find(A=>Wp.has(A))||null,b=!!(c.class&&ns.has(c.class));if(g&&(ns.has(a)||b)){let A=He(e,g).filter(z=>z.object===c.id),P=Mn(A.map(z=>e.byId.get(z.subject)).filter(Boolean)),G=!a||a==="Change"?P:P.filter(z=>z.class===a),J="",ee=Ka[a];if(!G.length&&ee){let z=P.filter(U=>U.class===ee);z.length&&(G=z,J=`, widened to ${ee} subjects (no ${a} recorded)`)}let ie=(i==="touches"||i==="calls"||i==="uses")&&c.class==="Class"&&!He(e,"contains").some(z=>z.subject===c.id),D=ie?e.byId.get(go(e,c)||""):null;if(G.length||!(ie&&D))return{matches:G,objMatch:c,candidates:u,traversal:`${g} edges where object = ${c.label}${J}`,ambiguous:d,matchedVia:p}}let y=c,w=u,$=d,j=p,v="",E=Xp(e,i);if(E&&y.class&&y.class!==E){let A=fn(e,t.object,{expectedClass:E});if(A.match&&!A.ambiguous)y=A.match,w=A.candidates,$=A.ambiguous,j=A.matchedVia;else if(E==="Module"){let P=go(e,y),G=P&&e.byId.get(P);if(G)v=`, refined from ${y.label} to its containing module`,y=G;else return{matches:[],objMatch:y,candidates:w,ambiguous:$,matchedVia:j,wrongGrainMiss:!0,wantClass:E,traversal:`"${t.object}" resolved to ${es(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${es(E)}, and no containing module could be found to refine to)`}}else return{matches:[],objMatch:y,candidates:w,ambiguous:$,matchedVia:j,wrongGrainMiss:!0,wantClass:E,traversal:`"${t.object}" resolved to ${es(y.class)} ${y.label} (grain mismatch: this "${i}" question needs a ${es(E)})`}}let k=At(i).flatMap(A=>He(e,A)).filter(A=>A.object===y.id);i==="cochange"&&(k=k.concat(At(i).flatMap(A=>He(e,A)).filter(A=>A.subject===y.id).map(A=>({...A,subject:A.object,object:A.subject}))));let _="";if(!k.length&&y.class){let A=`ext:${String(y.label).toLowerCase()}`;k=At(i).flatMap(P=>He(e,P)).filter(P=>String(P.object).toLowerCase()===A),k.length&&(_=` (by name, via unresolved ${A} references)`)}let R=[],x=new Set;for(let A of k){let P=e.byId.get(A.subject);P&&!x.has(P.id)&&(x.add(P.id),R.push(P))}let T,M="";if(!a||a==="Change")T=R;else{let A=R.filter(P=>P.class===a);if(A.length)T=A;else if(a!=="Module"&&R.some(P=>P.class==="Module")){let P=new Set(R.filter(G=>G.class==="Module").map(G=>G.id));T=hc(e,P,a),M=`, then ${es(a)} defined in the matched module(s)`}else T=[]}return{matches:T,objMatch:y,candidates:w,traversal:`${At(i).join("+")} edges where object = ${y.label}${_}${M}${v}`,ambiguous:$,matchedVia:j}}function ar(e){if(e.class==="Module")return e.label;let t=(e.attributes||[]).find(s=>s.key==="site")?.value;if(t)return String(t).split(":")[0];let n=String(e.id||"").match(/^fn:(.+)#/);return n?n[1]:null}function Ja(e){let t=String(e.label||e.id||"");return["Function","Method"].includes(e.class)?`function ${t}()`:t}function fx(e){let t=String(e.label||e.id||""),n=(e.attributes||[]).find(s=>s.key==="author")?.value;return n?`${t} (${n})`:t}function dn(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`:e[0]}function or(e){let t=e.object??e.subject??"?";return`${e.entityType?Pe(e.entityType,2)+" that ":""}${e.kind} "${t}"`}function rc(e){return zo[e]?.bare||e}function mx(e){let t=rc(e);return t.endsWith("e")?`${t}d`:`${t}ed`}function hx(e){if(!Array.isArray(e.atoms)||e.atoms.length!==2)return null;let[t,n]=e.atoms;if(t.op!=="seed"||t.ast?.node!=="allOfClass"||n.op!=="difference")return null;let s=Pe(e.entityType,2);if(n.kind==="qual")return`${s} that are not ${n.filters.join(" and not ")}`;if(n.kind!=="set"||!n.ast)return null;if(n.ast.node==="existsEdge")return`${s} that do not ${rc(n.ast.kind)} anything`;let o=n.ast.node==="clause"?n.ast.clause:n.ast;if(!o||o.node||!o.kind)return null;let r=o.object??o.subject;return r==null?null:`${s} that do not ${rc(o.kind)} ${JSON.stringify(String(r))}`}function mf(e){if(!e)return null;if(e.ambiguousParse)return{english:`ambiguous: ${e.candidates.map(or).join(" \u2014 or \u2014 ")}`,machine:`ambiguousParse(${e.candidates.map(r=>mf(r)?.machine).join(", ")})`};if(e.node)return{english:(e.node==="boolean"?hx(e):null)||`a compositional query (${e.node})`,machine:`composite(${e.node})`};let t=r=>JSON.stringify(String(r??"")),n=[];e.kind&&n.push(e.kind),e.negated&&n.push("negated"),e.entityType&&n.push(`entityType=${e.entityType}`),e.modifier&&e.modifier!=="direct"&&n.push(`modifier=${e.modifier}`),e.subject!=null&&n.push(`subject=${t(e.subject)}`),e.object!=null&&n.push(t(e.object));let s=`${e.shape}(${n.join(", ")})`,o;if(e.shape==="ask")o=`does "${e.subject}" ${e.negated?"not ":""}${Ts(e.kind)} "${e.object}"?`;else if(e.shape==="meta")o=`what does "${e.object}" mean, in this graph's own vocabulary?`;else if(e.shape==="mentions")o=`where is "${e.object}" mentioned?`;else if(e.shape==="where")o=`where is "${e.object}" defined?`;else{let r=e.entityType?Pe(e.entityType,2)+" that ":"";o=e.shape==="forward"?`what "${e.object}" itself ${Ts(e.kind)}`:`${r}${Ts(e.kind)} "${e.object}"`}return{english:o,machine:s}}function pn(e,t,n=null){let s=hf(e,t,n);return t&&t.matchedVia==="fuzzy"&&t.objMatch&&!s.ambiguous&&(s.content=`assuming you meant ${t.objMatch.label}: ${s.content}`),s}function hf(e,t,n){if(!e)return{content:`couldn't parse this as a graph question. Try: ${mc()}`,miss:!0,ambiguous:!1};if(e.node)return tx(e,t,n);if(e.ambiguousParse)return t.branches&&t.branches.length?{content:`this could mean more than one thing:
55
+ ${t.branches.map((l,c)=>`${c+1}) as ${or(l.parsed)}: ${l.rendered.content}`).join(`
56
56
  `)}
57
- (ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(er),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${er(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(er),candidateParses:e.candidates};if(t.unresolvedPronoun)return{content:`"${e.object??e.subject}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.unsupportedModifier)return{content:`the "${e.modifier}" modifier isn't supported for "${e.kind}" queries yet \u2014 only imports/calls (module-level) have a transitive closure today.`,miss:!0,ambiguous:!1};if(t.wrongGrainMiss){let i=t.objMatch.class?Fe(t.objMatch.class,1):"term",a=Fe(t.wantClass,1);return{content:`"${e.object}" resolved to the ${i} ${t.objMatch.label}, but this question needs a ${a} \u2014 no ${a} named "${e.object}" was found in the index.`,miss:!0,ambiguous:!1}}if(t.forwardGrainMiss){let i=t.wantClasses.map(a=>Fe(a,2));return{content:`${t.objMatch.label}'s "${Rs(e.kind)}" relation in this index never produces ${Fe(e.entityType,2)} \u2014 only ${hn(i)}.`,miss:!0,ambiguous:!1}}if(e.shape==="meta"){if(!t.objMatch)return{content:`"${e.object}" isn't a term in this graph's own vocabulary (no matching class or predicate).`,miss:!0,ambiguous:!1};if(t.metaCodeClass)return{content:t.metaFallbackText,miss:!1,ambiguous:!1,matches:t.matches};let i=uc(t.objMatch)||"";return{content:`${t.objMatch.label} is ${j$(t.objMatch.class)}: ${i}`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.mentionsShape){if(!t.matches.length)return{content:`"${e.object}" is not mentioned in any indexed identifier or doc-comment prose.`,miss:!0,ambiguous:!1};let i=t.matches.slice(0,We).map(l=>`${l.label} (${Fe(l.class,1)})`),a=t.matches.length>We?`, \u2026and ${t.matches.length-We} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${hn(i)}${a}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.entryPointShape){if(!t.matches.length)return{content:`no entry-point module found in the index \u2014 no module basename matches ${hn([...lc])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...a]=t.matches,l=a.slice(0,We).map(d=>d.label),c=a.length>We?`, \u2026and ${a.length-We} more`:"",u=a.length?` \u2014 also matched: ${hn(l)}${c}`:"";return{content:`ranked ${t.matches.length} entry-point match${t.matches.length===1?"":"es"}; top: ${i.label}${u}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.objMatch&&(!t.candidates||t.candidates.length===0)&&e.shape!=="ask"){let i=String(e.object||"").trim(),a=e.entityType&&Ap[e.entityType]?Fe(e.entityType,1):"module",l=/^(?:commit[:\s])?[0-9a-f]{7,40}$/i.test(i)?"commit":!i.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(i)?"symbol":a;if(t.unplacedWords?.length){let c=hn(t.unplacedWords.map(f=>`"${f}"`)),u=t.unplacedWords.length===1?"names":"name",d=t.nearestLabel?` Did you mean ${t.nearestLabel}?`:"";return{content:`no ${l} matching "${e.object}" found in the index. ${c} ${u} nothing here, and reading past ${t.unplacedWords.length===1?"it":"them"} would answer a different question.${d}`,miss:!0,ambiguous:!1,candidates:[]}}return{content:`no ${l} matching "${e.object}" found in the index. ${es(n)}`,miss:!0,ambiguous:!1,candidates:[]}}if(t.ambiguous){let i=[t.objMatch,...t.candidates||[]].filter(Boolean),a=t.branches;if(e.kind&&e.kind!=="touches"&&!i.every(g=>g.class==="Commit")){let g=y=>!["Commit","Session","Source","Utterance"].includes(y?.class),b=i.filter(g);b.length&&(i=b,a?.length&&(a=a.filter(y=>g(y.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let g=String(e.object||"").toLowerCase(),b=new Set(fn(String(e.object||"")).filter(v=>v.length>=3)),y=new Set(i.map(v=>v.id)),w=null,$=0,j=1/0;if(b.size)for(let v of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes(v.class)||y.has(v.id))continue;let x=fn(String(v.label)).filter(_=>b.has(_)).length;if(!x||x<$)continue;let k=On(String(v.label).toLowerCase(),g,8);(x>$||k<j)&&(w=v,$=x,j=k)}if(w&&(i=[...i,w],a)){let v=Vt(n,e,{pinnedObjMatch:w});a=[...a,{candidate:w,result:v,rendered:gn(e,v,n)}]}}let l=i.length&&i.every(g=>g.class==="Commit")?"commit":"module",c=i.slice(0,We).map(g=>g.label),u=i.length>We?`, \u2026and ${i.length-We} more`:"",d=`"${e.object}" matches more than one ${l} ambiguously \u2014 did you mean ${hn(c)}${u}? Try one of those. If you're not sure, narrow it to one name.`,f=String(e.object||""),p=f?new RegExp(`\\b${Ye(f)}\\b`,"gi"):null,m=g=>p?g.rendered.content.replace(p,g.candidate.label):g.rendered.content;return{content:a&&a.length?`${d}
57
+ (ask one of these directly, or try rephrasing more specifically, to get just that reading)`,miss:!1,ambiguous:!0,candidates:e.candidates.map(or),candidateParses:e.candidates}:{content:`this could mean more than one thing: ${e.candidates.map((a,l)=>`${l+1}) ${or(a)}`).join(" or ")} \u2014 try rephrasing more specifically.`,miss:!1,ambiguous:!0,candidates:e.candidates.map(or),candidateParses:e.candidates};if(t.unresolvedPronoun)return{content:`"${e.object??e.subject}" needs a selected node to refer to \u2014 click a node first, or name it directly.`,miss:!0,ambiguous:!1};if(t.unsupportedModifier)return{content:`the "${e.modifier}" modifier isn't supported for "${e.kind}" queries yet \u2014 only imports/calls (module-level) have a transitive closure today.`,miss:!0,ambiguous:!1};if(t.wrongGrainMiss){let i=t.objMatch.class?Pe(t.objMatch.class,1):"term",a=Pe(t.wantClass,1);return{content:`"${e.object}" resolved to the ${i} ${t.objMatch.label}, but this question needs a ${a} \u2014 no ${a} named "${e.object}" was found in the index.`,miss:!0,ambiguous:!1}}if(t.forwardGrainMiss){let i=t.wantClasses.map(a=>Pe(a,2));return{content:`${t.objMatch.label}'s "${Ts(e.kind)}" relation in this index never produces ${Pe(e.entityType,2)} \u2014 only ${dn(i)}.`,miss:!0,ambiguous:!1}}if(e.shape==="meta"){if(!t.objMatch)return{content:`"${e.object}" isn't a term in this graph's own vocabulary (no matching class or predicate).`,miss:!0,ambiguous:!1};if(t.metaCodeClass)return{content:t.metaFallbackText,miss:!1,ambiguous:!1,matches:t.matches};let i=bc(t.objMatch)||"";return{content:`${t.objMatch.label} is ${px(t.objMatch.class)}: ${i}`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.mentionsShape){if(!t.matches.length)return{content:`"${e.object}" is not mentioned in any indexed identifier or doc-comment prose.`,miss:!0,ambiguous:!1};let i=t.matches.slice(0,qe).map(l=>`${l.label} (${Pe(l.class,1)})`),a=t.matches.length>qe?`, \u2026and ${t.matches.length-qe} more`:"";return{content:`"${e.object}" is mentioned in the prose tokens of ${dn(i)}${a}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.entryPointShape){if(!t.matches.length)return{content:`no entry-point module found in the index \u2014 no module basename matches ${dn([...gc])}.`,miss:!0,ambiguous:!1,candidates:[]};let[i,...a]=t.matches,l=a.slice(0,qe).map(d=>d.label),c=a.length>qe?`, \u2026and ${a.length-qe} more`:"",u=a.length?` \u2014 also matched: ${dn(l)}${c}`:"";return{content:`ranked ${t.matches.length} entry-point match${t.matches.length===1?"":"es"}; top: ${i.label}${u}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(!t.objMatch&&(!t.candidates||t.candidates.length===0)&&e.shape!=="ask"){let i=String(e.object||"").trim(),a=e.entityType&&Gp[e.entityType]?Pe(e.entityType,1):"module",l=/^(?:commit[:\s])?[0-9a-f]{7,40}$/i.test(i)?"commit":!i.includes("/")&&/^[\w$]+(\.[\w$]+)+$/.test(i)?"symbol":a;if(t.unplacedWords?.length){let c=dn(t.unplacedWords.map(f=>`"${f}"`)),u=t.unplacedWords.length===1?"names":"name",d=t.nearestLabel?` Did you mean ${t.nearestLabel}?`:"";return{content:`no ${l} matching "${e.object}" found in the index. ${c} ${u} nothing here, and reading past ${t.unplacedWords.length===1?"it":"them"} would answer a different question.${d}`,miss:!0,ambiguous:!1,candidates:[]}}return{content:`no ${l} matching "${e.object}" found in the index. ${ts(n)}`,miss:!0,ambiguous:!1,candidates:[]}}if(t.ambiguous){let i=[t.objMatch,...t.candidates||[]].filter(Boolean),a=t.branches;if(e.kind&&e.kind!=="touches"&&!i.every(g=>g.class==="Commit")){let g=y=>!["Commit","Session","Source","Utterance"].includes(y?.class),b=i.filter(g);b.length&&(i=b,a?.length&&(a=a.filter(y=>g(y.candidate))))}if(n&&!/[/.]/.test(String(e.object||""))){let g=String(e.object||"").toLowerCase(),b=new Set(bn(String(e.object||"")).filter(v=>v.length>=3)),y=new Set(i.map(v=>v.id)),w=null,$=0,j=1/0;if(b.size)for(let v of n.individuals){if(!["Function","Method","Class","GlobalVariable","Attribute"].includes(v.class)||y.has(v.id))continue;let E=bn(String(v.label)).filter(_=>b.has(_)).length;if(!E||E<$)continue;let k=Ln(String(v.label).toLowerCase(),g,8);(E>$||k<j)&&(w=v,$=E,j=k)}if(w&&(i=[...i,w],a)){let v=Dt(n,e,{pinnedObjMatch:w});a=[...a,{candidate:w,result:v,rendered:pn(e,v,n)}]}}let l=i.length&&i.every(g=>g.class==="Commit")?"commit":"module",c=i.slice(0,qe).map(g=>g.label),u=i.length>qe?`, \u2026and ${i.length-qe} more`:"",d=`"${e.object}" matches more than one ${l} ambiguously \u2014 did you mean ${dn(c)}${u}? Try one of those. If you're not sure, narrow it to one name.`,f=String(e.object||""),p=f?new RegExp(`\\b${Xe(f)}\\b`,"gi"):null,m=g=>p?g.rendered.content.replace(p,g.candidate.label):g.rendered.content;return{content:a&&a.length?`${d}
58
58
  ${a.map((g,b)=>`${b+1}) ${g.candidate.label}: ${m(g)}`).join(`
59
- `)}`:d,miss:!1,ambiguous:!0,candidates:i.map(g=>g.label)}}if(t.whereShape){let i=t.objMatch;if(i.class==="Module")return{content:`${i.label} is a module \u2014 the label is its repo path.`,miss:!1,ambiguous:!1,matches:t.matches};if(i.class==="Commit")return{content:`${i.label} is a commit, not a code location \u2014 try "what did commit ${i.label} touch".`,miss:!0,ambiguous:!1};let a=String(t.site||"").match(/^(.*):(\d+)(?:-(\d+))?$/);if(a){let c=a[3]&&a[3]!==a[2]?`lines ${a[2]}-${a[3]}`:`line ${a[2]}`;return{content:`${qa(i)} is defined in ${a[1]} at ${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}let l=sr(i);return l?{content:`${qa(i)} is defined in ${l} (no line span recorded in this index).`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`${i.label} has no recorded code location in this index \u2014 it carries no source site, and nothing places it in a module.`,miss:!0,ambiguous:!1}}if(t.whenShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${es(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(f=>f.key==="date")?.value||"";if(!l)return{content:`commit ${a.label} touched ${i}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1};let c=(a.attributes||[]).find(f=>f.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${Qo("is-dated",a.id,"is dated")} ${u}${c?` ("${c}")`:""}.`,miss:!1,ambiguous:!1,matches:t.matches};let d=t.matches.length-1;return{content:`${i} was last touched by commit ${a.label} on ${u}${c?` ("${c}")`:""}${d?`; ${d} earlier commit${d===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whoLastShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${es(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(u=>u.key==="author")?.value;if(!l)return{content:`commit ${a.label} last touched ${i}, but this index records no commit author \u2014 regenerate the graph to attach mgx:commitAuthor.`,miss:!0,ambiguous:!1};let c=t.matches.length-1;return{content:`${i} was last touched by ${l} (commit ${a.label})${c?`; ${c} earlier commit${c===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.commitSubject){let i=`commit ${t.objMatch.label}`;if(!t.matches.length)return{content:`${i} touched nothing recorded in the index.`,miss:!0,ambiguous:!1};let a=new Map;for(let u of t.matches.slice(0,We)){let d=u.class||"Module";a.has(d)||a.set(d,[]),a.get(d).push(["Function","Method"].includes(d)?`${u.label}()`:u.label)}let l=[...a.entries()].map(([u,d])=>`${Fe(u,d.length)} ${hn(d)}`),c=t.matches.length>We?`; \u2026and ${t.matches.length-We} more`:"";return{content:`${i} touched ${l.join("; ")}${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(e.shape==="ask"){if(!t.objMatch||!t.subjMatch)return{content:"couldn't resolve one of the terms in this question.",miss:!0,ambiguous:!1};let i=`${t.traversal}.`,a=`no ${e.kind} edge found from ${t.subjMatch.label} to ${t.objMatch.label}.`,l=e.negated?a:i,c=e.negated?i:a;return{content:`${t.answer?"Yes":"No"} \u2014 ${t.answer?l:c}`,miss:!t.matches.length,ambiguous:!1}}if(!t.matches.length){if(e.shape==="forward"){if(Js.includes(e.kind)&&n&&t.objMatch)for(let l of Js){if(l===e.kind)continue;let c={...e,kind:l},u=Vt(n,c,{pinnedObjMatch:t.objMatch});if(u?.matches?.length&&!u.ambiguous)return Qp(c,u,n)}return{content:`${t.objMatch.label} has no ${Rs(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}if(e.kind==="tests"&&!e.entityType)return{content:`No tests cover ${String(e.object||"").replace(uv,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1};let i=Fe(e.entityType||"Module",2),a=t.objMatch&&bs.includes(String(e.object||"").toLowerCase())?t.objMatch.label:e.object;return{content:`No ${i} found whose module directly ${Rs(e.kind)} ${a}. ${es(n)}`,miss:!0,ambiguous:!1}}if(e.polar&&t.matches.length===1)return{content:`Yes \u2014 ${t.objMatch?.label||e.object} is ${R$(e.kind)} by ${t.matches[0].label}.`,miss:!1,ambiguous:!1,matches:t.matches};if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!ts.has(i.class))){let i=t.matches.slice(0,We).map(l=>l.class==="Commit"?_$(l):l.label),a=t.matches.length>We?`, \u2026and ${t.matches.length-We} more`:"";return{content:i.join(" and ")+a+".",miss:!1,ambiguous:!1,matches:t.matches}}let s=new Map;for(let i of t.matches.slice(0,We)){let a=sr(i)||"no recorded module";s.has(a)||s.set(a,[]),s.get(a).push(qa(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=hn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>We?` \u2026and ${t.matches.length-We} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function ef(e){if(e.length<4||I$.has(e))return null;let t=Jn(e),n=t+1,s=null,o=!1;for(let r of C$){let i=On(e,r,Math.min(n,t));i<n?(n=i,s=r,o=!1):i===n&&i<=t&&r!==s&&(o=!0)}return n<=t&&!o?s:null}function jp(e,t){if(!e?.match||e.matchedVia!=="fuzzy"||e.ambiguous||!uc(e.match))return!1;let n=String(t||"").trim().toLowerCase(),s=ef(n);return!!s&&s!==n&&!!Ue[s]}function tf(e,t,n){if(!t)return!1;if(t.ambiguousParse)return"ambiguous";if(t.node)return t.node!=="miss";if(t.shape==="meta"||t.shape==="mentions")return!0;let s=Ln(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||jp(s,t.object))return!1;if(t.shape==="ask"){let o=Ln(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!jp(o,t.subject))}return!0}function O$(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return ju.includes(t)}function L$(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=Ho(_s(String(t||""))),i=Jt(r);if(!i.length)return null;let a=[],l=[],c=S=>{let A=an(e,S);return!!A.match&&A.tier!=null&&A.tier<=2},u=S=>{let A=an(e,S);return!!A.match&&A.tier!=null&&A.tier<=3},d=S=>{let A=String(S||"").trim().toLowerCase();return bs.includes(A)?!0:Jt(A).some(L=>{let T=L.toLowerCase();return!ai.has(T)&&!Za.has(T)})},f=new Set(["reverse","forward","where","when","ask"]),p=S=>{let A=S.join(" "),L=nr(A,{nlp:n});return tf(e,L,s)!==!0||L&&!L.node&&f.has(L.shape)&&(L.object!=null&&!d(L.object)||L.shape==="ask"&&L.subject!=null&&!d(L.subject))||gn(L,Vt(e,L,{contextId:s,prev:o}),e).miss?null:{parsed:L,text:A}},m=S=>({parsed:S.parsed,from:r,to:S.text,dropped:[...a],steps:l}),h=0,g=Math.max(i.length,1)+12;for(;h<g;h+=1){let S=-1;for(let T=0;T<i.length;T+=1){let P=i[T].toLowerCase();if(dc.has(P)&&!ai.has(P)&&!c(i[T])){S=T;break}}if(S<0)break;let A=i[S];i=i.filter((T,P)=>P!==S),a.push(A),l.push(`strip noise "${A}" \u2192 "${i.join(" ")}"`);let L=p(i);if(L)return m(L)}let b=nr(i.join(" "),{nlp:n}),y=new Set;if(b&&!b.node&&f.has(b.shape))for(let S of[b.object,b.subject])for(let A of Jt(String(S||"").toLowerCase()))y.add(A);let w=[],$=[],j=[];for(let S of i){let A=S.toLowerCase();if(!/^[a-z]+$/.test(A)||ai.has(A)||Za.has(A)||u(S)){w.push(S);continue}let T=ef(A);if(T&&T!==A){w.push(T),j.push(`${S}\u2192${T}`);continue}if(y.has(A)){w.push(S);continue}$.push(S)}if((j.length||$.length)&&w.length){i=w,a.push(...$),j.length&&l.push(`fuzzy-correct ${JSON.stringify(j)} \u2192 "${i.join(" ")}"`),$.length&&l.push(`drop unmatched ${JSON.stringify($)} \u2192 "${i.join(" ")}"`);let S=p(i);if(S)return m(S)}let v=!1,x=i.map(S=>{let A=S.toLowerCase();return Qs[A]&&!u(S)?(v=!0,Qs[A]):S});if(v){l.push(`normalise synonyms \u2192 "${x.join(" ")}"`);let S=p(x);if(S)return m(S)}let k=Jt(r).map(S=>S.toLowerCase()),_=[],R=[];for(let S of k){if(Zp.has(S))continue;let A=Ue[S];A&&A!=="Change"?_.push(S):R.push(S)}if(_.length===1&&R.length===0){let S=p(["count",_[0]]);if(S)return l.push(`bare kind "${_[0]}" \u2192 count`),m(S)}return null}function M$(e,t){let n=String(t||"");if(!e||!_p.test(n))return n;let s=e.individuals.filter(l=>l.class==="Commit");if(!s.length)return n;let o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||""),r=[...s].sort((l,c)=>o(c).localeCompare(o(l)))[0];if(!r)return n;let i=n.replace(_p,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return N$.test(a)?`${a} touched`:i}function P$(e){let t=String(e||"").toLowerCase(),n=new Set([t]);return t.endsWith("ies")&&n.add(`${t.slice(0,-3)}y`),(t.endsWith("ses")||t.endsWith("es"))&&n.add(t.slice(0,-2)),t.endsWith("s")&&t.length>1&&n.add(t.slice(0,-1)),[...n]}function F$(e,t){let n=P$(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function B$(e,t){let n=String(t||"").trim(),s=n.match(D$),o=s?null:n.match(z$),r=s||o;if(!r||!pc.test(r[2]||"")||Ue[r[1].toLowerCase()])return null;let i=F$(e,r[1]);if(!i)return null;let a={node:"allOfClass",entityType:i};return s?{node:"list",entityType:i,base:a,scoped:!1}:{node:"count",entityType:i,base:a}}function ns(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(O$(t))return{content:ac(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=M$(e,t);let r=ec(t,{nlp:s}),i=r.parsed,a=i,l=null;if(tf(e,i,n)===!1){let f=L$(e,t,{nlp:s,contextId:n,prev:o});f&&(a=f.parsed,l={from:f.from,to:f.to,dropped:f.dropped,steps:f.steps})}let c=Vt(e,a,{contextId:n,prev:o}),u=gn(a,c,e);if(u.miss&&!u.ambiguous){let f=B$(e,t);if(f){let p=Vt(e,f,{contextId:n,prev:o}),m=gn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Kr(String(t||"")).trim().match(U$)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let m=nr(`what is a ${p}`,{nlp:s});m?.shape==="meta"&&(c=Vt(e,m,{contextId:n,prev:o}),u=gn(m,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=_s(String(t||"")).match(W$)?.[1]?.trim();if(p){let m=nr(`what is a ${p}`,{nlp:s});if(m?.shape==="meta"){let h=Vt(e,m,{contextId:n,prev:o}),g=gn(m,h,e);!g.miss&&!g.ambiguous&&(c=h,u=g)}}}let d=l&&!u.miss&&l.to!==l.from?`read as "${l.to}" \u2014 ${u.content}`:u.content;if(!l&&!u.miss&&!u.ambiguous&&r.alternates.length){let f=r.alternates.map(p=>{let m=Vt(e,p.parsed,{contextId:n,prev:o}),h=gn(p.parsed,m,e);return h.miss?null:{a:p,text:h.content}}).filter(Boolean);if(f.length){let p=up(f.map(m=>m.a),{answerFor:m=>f.find(h=>h.a===m)?.text||null});d=`${d}
59
+ `)}`:d,miss:!1,ambiguous:!0,candidates:i.map(g=>g.label)}}if(t.whereShape){let i=t.objMatch;if(i.class==="Module")return{content:`${i.label} is a module \u2014 the label is its repo path.`,miss:!1,ambiguous:!1,matches:t.matches};if(i.class==="Commit")return{content:`${i.label} is a commit, not a code location \u2014 try "what did commit ${i.label} touch".`,miss:!0,ambiguous:!1};let a=String(t.site||"").match(/^(.*):(\d+)(?:-(\d+))?$/);if(a){let c=a[3]&&a[3]!==a[2]?`lines ${a[2]}-${a[3]}`:`line ${a[2]}`;return{content:`${Ja(i)} is defined in ${a[1]} at ${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}let l=ar(i);return l?{content:`${Ja(i)} is defined in ${l} (no line span recorded in this index).`,miss:!1,ambiguous:!1,matches:t.matches}:{content:`${i.label} has no recorded code location in this index \u2014 it carries no source site, and nothing places it in a module.`,miss:!0,ambiguous:!1}}if(t.whenShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${ts(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(f=>f.key==="date")?.value||"";if(!l)return{content:`commit ${a.label} touched ${i}, but this index records no commit dates \u2014 regenerate the graph to attach mgx:commitDate.`,miss:!0,ambiguous:!1};let c=(a.attributes||[]).find(f=>f.key==="message")?.value||"",u=String(l).slice(0,10);if(a.id===t.objMatch.id)return{content:`commit ${a.label} ${nr("is-dated",a.id,"is dated")} ${u}${c?` ("${c}")`:""}.`,miss:!1,ambiguous:!1,matches:t.matches};let d=t.matches.length-1;return{content:`${i} was last touched by commit ${a.label} on ${u}${c?` ("${c}")`:""}${d?`; ${d} earlier commit${d===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.whoLastShape){let i=t.objMatch.label;if(!t.matches.length)return{content:`no recorded commit touches ${i} in this index. ${ts(n)}`,miss:!0,ambiguous:!1};let a=t.matches[0],l=(a.attributes||[]).find(u=>u.key==="author")?.value;if(!l)return{content:`commit ${a.label} last touched ${i}, but this index records no commit author \u2014 regenerate the graph to attach mgx:commitAuthor.`,miss:!0,ambiguous:!1};let c=t.matches.length-1;return{content:`${i} was last touched by ${l} (commit ${a.label})${c?`; ${c} earlier commit${c===1?"":"s"} recorded`:""}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(t.commitSubject){let i=`commit ${t.objMatch.label}`;if(!t.matches.length)return{content:`${i} touched nothing recorded in the index.`,miss:!0,ambiguous:!1};let a=new Map;for(let u of t.matches.slice(0,qe)){let d=u.class||"Module";a.has(d)||a.set(d,[]),a.get(d).push(["Function","Method"].includes(d)?`${u.label}()`:u.label)}let l=[...a.entries()].map(([u,d])=>`${Pe(u,d.length)} ${dn(d)}`),c=t.matches.length>qe?`; \u2026and ${t.matches.length-qe} more`:"";return{content:`${i} touched ${l.join("; ")}${c}.`,miss:!1,ambiguous:!1,matches:t.matches}}if(e.shape==="ask"){if(!t.objMatch||!t.subjMatch)return{content:"couldn't resolve one of the terms in this question.",miss:!0,ambiguous:!1};let i=`${t.traversal}.`,a=`no ${e.kind} edge found from ${t.subjMatch.label} to ${t.objMatch.label}.`,l=e.negated?a:i,c=e.negated?i:a;return{content:`${t.answer?"Yes":"No"} \u2014 ${t.answer?l:c}`,miss:!t.matches.length,ambiguous:!1}}if(!t.matches.length){if(e.shape==="forward"){if(to.includes(e.kind)&&n&&t.objMatch)for(let l of to){if(l===e.kind)continue;let c={...e,kind:l},u=Dt(n,c,{pinnedObjMatch:t.objMatch});if(u?.matches?.length&&!u.ambiguous)return hf(c,u,n)}return{content:`${t.objMatch.label} has no ${Ts(e.kind)} edges in the index.`,miss:!0,ambiguous:!1}}if(e.kind==="tests"&&!e.entityType)return{content:`No tests cover ${String(e.object||"").replace(Jv,"").trim()||String(e.object||"").trim()}.`,miss:!0,ambiguous:!1};let i=Pe(e.entityType||"Module",2),a=t.objMatch&&ys.includes(String(e.object||"").toLowerCase())?t.objMatch.label:e.object;return{content:`No ${i} found whose module directly ${Ts(e.kind)} ${a}. ${ts(n)}`,miss:!0,ambiguous:!1}}if(e.polar&&t.matches.length===1)return{content:`Yes \u2014 ${t.objMatch?.label||e.object} is ${mx(e.kind)} by ${t.matches[0].label}.`,miss:!1,ambiguous:!1,matches:t.matches};if(e.shape==="forward"||e.entityType==="Module"||t.matches.every(i=>!ns.has(i.class))){let i=t.matches.slice(0,qe).map(l=>l.class==="Commit"?fx(l):l.label),a=t.matches.length>qe?`, \u2026and ${t.matches.length-qe} more`:"";return{content:i.join(" and ")+a+".",miss:!1,ambiguous:!1,matches:t.matches}}let s=new Map;for(let i of t.matches.slice(0,qe)){let a=ar(i)||"no recorded module";s.has(a)||s.set(a,[]),s.get(a).push(Ja(i))}let o=[...s.entries()].map(([i,a],l)=>{let c=dn(a);return l===0?`in ${i} there is ${c}`:`there is ${c} in ${i}`}),r=t.matches.length>qe?` \u2026and ${t.matches.length-qe} more`:"";return{content:o.join(" and ")+r+".",miss:!1,ambiguous:!1,matches:t.matches}}function bf(e){if(e.length<4||wx.has(e))return null;let t=Qn(e),n=t+1,s=null,o=!1;for(let r of bx){let i=Ln(e,r,Math.min(n,t));i<n?(n=i,s=r,o=!1):i===n&&i<=t&&r!==s&&(o=!0)}return n<=t&&!o?s:null}function zp(e,t){if(!e?.match||e.matchedVia!=="fuzzy"||e.ambiguous||!bc(e.match))return!1;let n=String(t||"").trim().toLowerCase(),s=bf(n);return!!s&&s!==n&&!!Ue[s]}function wf(e,t,n){if(!t)return!1;if(t.ambiguousParse)return"ambiguous";if(t.node)return t.node!=="miss";if(t.shape==="meta"||t.shape==="mentions")return!0;let s=Nn(e,t.object,n);if(s.unresolvedPronoun)return"pronoun";if(!s.match||zp(s,t.object))return!1;if(t.shape==="ask"){let o=Nn(e,t.subject,n);return o.unresolvedPronoun?"pronoun":!!(o.match&&!zp(o,t.subject))}return!0}function yx(e){let t=String(e||"").trim().toLowerCase().replace(/[?.!\s]+$/,"");return zu.includes(t)}function vx(e,t,{nlp:n=void 0,contextId:s=null,prev:o=null}={}){let r=Jo(As(String(t||""))),i=nn(r);if(!i.length)return null;let a=[],l=[],c=x=>{let T=fn(e,x);return!!T.match&&T.tier!=null&&T.tier<=2},u=x=>{let T=fn(e,x);return!!T.match&&T.tier!=null&&T.tier<=3},d=x=>{let T=String(x||"").trim().toLowerCase();return ys.includes(T)?!0:nn(T).some(M=>{let A=M.toLowerCase();return!di.has(A)&&!ic.has(A)})},f=new Set(["reverse","forward","where","when","ask"]),p=x=>{let T=x.join(" "),M=ir(T,{nlp:n});return wf(e,M,s)!==!0||M&&!M.node&&f.has(M.shape)&&(M.object!=null&&!d(M.object)||M.shape==="ask"&&M.subject!=null&&!d(M.subject))||pn(M,Dt(e,M,{contextId:s,prev:o}),e).miss?null:{parsed:M,text:T}},m=x=>({parsed:x.parsed,from:r,to:x.text,dropped:[...a],steps:l}),h=0,g=Math.max(i.length,1)+12;for(;h<g;h+=1){let x=-1;for(let A=0;A<i.length;A+=1){let P=i[A].toLowerCase();if(wc.has(P)&&!di.has(P)&&!c(i[A])){x=A;break}}if(x<0)break;let T=i[x];i=i.filter((A,P)=>P!==x),a.push(T),l.push(`strip noise "${T}" \u2192 "${i.join(" ")}"`);let M=p(i);if(M)return m(M)}let b=ir(i.join(" "),{nlp:n}),y=new Set;if(b&&!b.node&&f.has(b.shape))for(let x of[b.object,b.subject])for(let T of nn(String(x||"").toLowerCase()))y.add(T);let w=[],$=[],j=[];for(let x of i){let T=x.toLowerCase();if(!/^[a-z]+$/.test(T)||di.has(T)||ic.has(T)||u(x)){w.push(x);continue}let A=bf(T);if(A&&A!==T){w.push(A),j.push(`${x}\u2192${A}`);continue}if(y.has(T)){w.push(x);continue}$.push(x)}if((j.length||$.length)&&w.length){i=w,a.push(...$),j.length&&l.push(`fuzzy-correct ${JSON.stringify(j)} \u2192 "${i.join(" ")}"`),$.length&&l.push(`drop unmatched ${JSON.stringify($)} \u2192 "${i.join(" ")}"`);let x=p(i);if(x)return m(x)}let v=!1,E=i.map(x=>{let T=x.toLowerCase();return no[T]&&!u(x)?(v=!0,no[T]):x});if(v){l.push(`normalise synonyms \u2192 "${E.join(" ")}"`);let x=p(E);if(x)return m(x)}let k=nn(r).map(x=>x.toLowerCase()),_=[],R=[];for(let x of k){if(gf.has(x))continue;let T=Ue[x];T&&T!=="Change"?_.push(x):R.push(x)}if(_.length===1&&R.length===0){let x=p(["count",_[0]]);if(x)return l.push(`bare kind "${_[0]}" \u2192 count`),m(x)}return null}function xx(e,t){let n=String(t||"");if(!e||!Bp.test(n))return n;let s=e.individuals.filter(l=>l.class==="Commit");if(!s.length)return n;let o=l=>String((l.attributes||[]).find(c=>c.key==="date")?.value||""),r=[...s].sort((l,c)=>o(c).localeCompare(o(l)))[0];if(!r)return n;let i=n.replace(Bp,`commit ${r.label}`),a=i.trim().replace(/[?.!]+$/,"");return $x.test(a)?`${a} touched`:i}function kx(e){let t=String(e||"").toLowerCase(),n=new Set([t]);return t.endsWith("ies")&&n.add(`${t.slice(0,-3)}y`),(t.endsWith("ses")||t.endsWith("es"))&&n.add(t.slice(0,-2)),t.endsWith("s")&&t.length>1&&n.add(t.slice(0,-1)),[...n]}function yf(e,t){let n=kx(t);for(let s of e?.individuals||[])if(s?.class&&n.includes(String(s.class).toLowerCase()))return s.class;return null}function jx(e,t){let n=String(t||"").trim(),s=n.match(Ex),o=s?null:n.match(Sx),r=s||o;if(!r||!yc.test(r[2]||"")||Ue[r[1].toLowerCase()])return null;let i=yf(e,r[1]);if(!i)return null;let a={node:"allOfClass",entityType:i};return s?{node:"list",entityType:i,base:a,scoped:!1}:{node:"count",entityType:i,base:a}}function _x(e,t){let n=String(t||"").split(/\s*,\s*|\s+and\s+/i).map(r=>r.trim()).filter(Boolean);if(!n.length)return null;let s=[],o=[];for(let r of n){let i=r.replace(/^(?:all\s+)?(?:the\s+)?/i,"").trim();if(!/^[a-z][a-z'-]*$/i.test(i))return null;let a=yf(e,i);if(!a)return null;s.push(i.toLowerCase()),o.push(a)}return{asked:[...new Set(s)],classes:[...new Set(o)]}}function Tx(e,t){let n=String(t||"").trim(),s=n.match(Rx),o=s?Tu[s[1].toLowerCase()]:"placement";if(!o)return null;let r=s?s[2]:n.match(Ax)?.[1];if(!r)return null;let i=_x(e,r);return i?{node:"worldRelation",relation:o,predicate:Zs[o].predicate,classes:i.classes,askedClasses:i.asked}:null}function Cx(e,t){let n=new Set(t.classes),s=new Map;for(let r of e?.relations||[])if(!(Up(r.prop)!==t.predicate&&Up(r.predicate)!==t.predicate))for(let i of r.edges||[]){let a=e.byId?.get(i.subject);a&&n.has(a.class)&&s.set(i.subject,{subject:a,object:i.object})}let o=[...s.values()].sort((r,i)=>String(r.subject.id).localeCompare(String(i.subject.id)));return{compositeKind:"worldRelation",relation:t.relation,askedClasses:t.askedClasses,pairs:o,matches:o.map(r=>r.subject)}}function Qa(e){let t=Ox.exec(String(e??""));return t?{base:t[1],stamp:Number(t[2])}:{base:String(e??""),stamp:0}}function Ix(e,{classOf:t=()=>null}={}){let n=new Map;for(let a of e||[])a?.predicate==="rdf:type"&&a.subject&&a.object&&n.set(Qa(a.subject).base,String(a.object));let s=new Set(Cu),o=new Map,r=new Map;for(let a of e||[]){if(!a?.subject||!s.has(a.predicate))continue;let{base:l,stamp:c}=Qa(a.subject),u=n.get(l)||t(l);if(!u)continue;let d=`${a.predicate}\0${l}`,f=r.get(d);f&&f.stamp>c||(o.set(l,{id:l,label:l,class:u}),r.set(d,{stamp:c,predicate:a.predicate,subject:l,object:Qa(a.object).base}))}let i=new Map;for(let a of r.values())i.has(a.predicate)||i.set(a.predicate,{prop:a.predicate,predicate:a.predicate,examples:[]}),i.get(a.predicate).examples.push({subject:a.subject,object:a.object});return{individuals:[...o.values()],objectProperties:[...i.values()]}}function ss(e,t,{contextId:n=null,nlp:s=void 0,prev:o=null}={}){if(yx(t))return{content:mc(),tmct_ask:{mechanical:!0,parsed:null,canonical:null,matches:[],traversal:null,miss:!0,ambiguous:!1,matchedVia:null,help:!0,relaxed:null}};t=xx(e,t);let r=ac(t,{nlp:s}),i=r.parsed,a=i,l=null;if(wf(e,i,n)===!1){let f=vx(e,t,{nlp:s,contextId:n,prev:o});f&&(a=f.parsed,l={from:f.from,to:f.to,dropped:f.dropped,steps:f.steps})}let c=Dt(e,a,{contextId:n,prev:o}),u=pn(a,c,e);if(u.miss&&!u.ambiguous){let f=jx(e,t);if(f){let p=Dt(e,f,{contextId:n,prev:o}),m=pn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(u.miss&&!u.ambiguous){let f=Tx(e,t);if(f){let p=Dt(e,f,{contextId:n,prev:o}),m=pn(f,p,e);m.miss||(a=f,c=p,u=m,l=null)}}if(a===null&&u.miss&&!u.ambiguous){let p=Qr(String(t||"")).trim().match(Lx)?.[1]?.trim();if(p&&!/\s+(?:for|about)$/i.test(p)){let m=ir(`what is a ${p}`,{nlp:s});m?.shape==="meta"&&(c=Dt(e,m,{contextId:n,prev:o}),u=pn(m,c,e))}}if(a===null&&u.miss&&!u.ambiguous){let p=As(String(t||"")).match(Nx)?.[1]?.trim();if(p){let m=ir(`what is a ${p}`,{nlp:s});if(m?.shape==="meta"){let h=Dt(e,m,{contextId:n,prev:o}),g=pn(m,h,e);!g.miss&&!g.ambiguous&&(c=h,u=g)}}}let d=l&&!u.miss&&l.to!==l.from?`read as "${l.to}" \u2014 ${u.content}`:u.content;if(!l&&!u.miss&&!u.ambiguous&&r.alternates.length){let f=r.alternates.map(p=>{let m=Dt(e,p.parsed,{contextId:n,prev:o}),h=pn(p.parsed,m,e);return h.miss?null:{a:p,text:h.content}}).filter(Boolean);if(f.length){let p=Ep(f.map(m=>m.a),{answerFor:m=>f.find(h=>h.a===m)?.text||null});d=`${d}
60
60
  ${p.join(`
61
61
  `)}`}}if(!u.ambiguous&&c.objMatch&&Array.isArray(c.candidates)&&c.candidates.length){let f=new Set((c.matches||[]).map(m=>m&&m.id)),p=c.candidates.filter(m=>m&&m.id&&m.id!==c.objMatch.id&&!f.has(m.id));if(p.length){let m=p.slice(0,3).map(b=>b.label).filter(Boolean),h=p.length-m.length,g=m.join(", ")+(h>0?`, +${h} more`:"");d=`${d}
62
- (answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${g})`}}return!Array.isArray(c.referents)&&!u.miss&&!u.ambiguous&&(a?.shape==="reverse"||a?.shape==="forward")&&a.entityType&&Array.isArray(c.matches)&&c.matches.length&&c.matches.every(f=>f&&f.class===a.entityType)&&(c={...c,referents:or(a.entityType,c.matches,"relationListing")}),{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:Jp(a),matches:(c.matches||[]).map(f=>({id:f.id,label:f.label,type:f.class,module:f.class?sr(f):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...Array.isArray(c.referents)&&c.referents.length?{discourse:c.referents}:{},...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var hp,lo,ts,Ua,iv,Rt,Rp,We,Ap,av,cv,lv,uv,dv,Tp,Va,fv,tc,Cp,xt,Ip,hv,bv,yv,$v,kv,Ev,Sv,jv,Rv,Tv,Mp,sc,Dv,Pp,zv,Wv,gp,Hv,bp,Xv,yp,$p,Zv,t$,s$,Qn,Wa,b$,w$,v$,lc,$$,Ep,x$,Sp,S$,ai,Za,dc,Zp,T$,C$,I$,_p,N$,D$,z$,pc,U$,W$,ss=M(()=>{Te();wa();Rn();Xn();Ko();Xr();Jr();mp();Da();Kn();si();Ba();io();hp=new WeakMap;lo={calls:"callsSymbol",touches:"touchesSymbol"},ts=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),Ua={Function:"Method",Method:"Function"},iv={uses:["imports","calls","callsSymbol"]},Rt=e=>iv[e]||[e],Rp=new Set(Object.values(lo)),We=12,Ap={Function:["function","functions"],Method:["method","methods"],Class:["class","classes"],Module:["module","modules"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Change:["change","changes"],Package:["package","packages"],Fact:["fact","facts"],Utterance:["utterance","utterances"],Session:["session","sessions"],Source:["source","sources"],Rule:["rule","rules"]};av={cochange:"cochanges",reexports:"export"};cv={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use",serves:"serve",denotes:"denote"},lv=e=>cv[e]||Rs(e),uv=new RegExp(`^(?:${Object.keys(de).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),dv=new Set(["imports"]);Tp=4,Va="zzinnerset",fv=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),tc=new Set(["which","what","who","list","show","find","give","me","us","all"]),Cp=new Set(["are","is","was","were"]);xt=e=>Ue[e]?{entityType:Ue[e],placeholder:!1}:_n.includes(e)?{entityType:null,placeholder:!0}:null,Ip=e=>!!de[e]&&e.endsWith("ing");hv=new Set(["which","the","all"]);bv=new Set(["all","every","each"]);yv=new Set(["what","which","thing","things","one","ones","stuff"]);$v=new Set(["those","them"]);kv=new Set(["did","was","were","do","does","has","have","had"]),Ev=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),Sv=new Set(["last","recently","ever","get","got","been","then","now","already"]),jv=new Set(["the","a","an","all","those","these","any"]);Rv=new Set(["since","before","after","on"]);Tv=/\b[\w-]+(?:[/.][\w-]+)+\b|\b[A-Z][A-Za-z0-9_]*\b|\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/;Mp=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);sc=new Set(["the","a","an","all","me","us"]),Dv=[...vs].sort((e,t)=>t.split(" ").length-e.split(" ").length),Pp="functions, classes, methods, modules, packages, attributes, variables, or commits",zv=new Set(["in","inside","under"]);Wv=new Set(["called","named","about","like","containing","matching","with"]);gp=new Set(["recent","latest","newest"]);Hv=/^git:(.+)$/i;bp=new WeakMap;Xv=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);yp=new WeakMap;$p={label:3,chain:2,attr:1};Zv=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;t$=["imports","calls","callsSymbol","inherits","contains","tests"];s$=/^\d{4}-\d{2}-\d{2}$/;Qn=e=>hn(e.slice(0,We).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>We?`, \u2026and ${e.length-We} more`:"");Wa=10;b$=/^(?:the|a|an)\s+/i,w$=new RegExp(`\\s+(${Object.keys(Ue).join("|")})$`,"i");v$=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,lc=new Set(["index","main","app","server","cli","__main__"]),$$=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),Ep=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),x$=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>$$.has(t));Sp=8,S$="mgx:schemaDoc";ai=new Set([...me(Object.keys(de)),...me(Object.keys(Ue)),...me(Object.keys(Gt)),...me(Object.keys(Ve)),...me(ys),...me(Object.keys(Hn)),...me(Object.keys(pn)),...me(Object.keys(Xs)),...me(_n),...me(zo),...me(ws),...me(Kt),...me(rn),...me(jn),...me(Object.keys(Qs))]),Za=new Set([...ot,...tc,...bs]),dc=new Set(me(Nr)),Zp=new Set([...dc,...Za]),T$=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],C$=[...new Set([...me(Object.keys(de)),...Object.keys(Ue),...T$])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!ot.has(e)),I$=new Set(["impact","impacts","impacted"]);_p=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,N$=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;D$=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,z$=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,pc=/^(?:are there(?:\s+in\s+total)?|is there|do you know(?:\s+about)?|do you have|exist(?:s)?|are known|in (?:the |a )?(?:graph|memory)|you know(?:\s+about)?)?[?.!\s]*$/i;U$=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,W$=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i});function os(e,t,n,s){let o=Math.max(1,t),r=Math.min(e.length,n),i=!1;s!=null&&r-o+1>s&&(r=o+s-1,i=!0);let a=e.slice(o-1,r).map((l,c)=>`${o+c} ${l}`).join(`
63
- `);return{start:o,end:r,text:a,truncated:i}}async function Mn({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=Wt(t),a=Wt(i,n);if(a!==i&&!a.startsWith(i+hu))throw new Oe(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
64
- `);return s==null||o==null?{lines:c}:{lines:c,...os(c,s,o,r)}}var li=M(()=>{ze();Lt()});function ht(e){return{ok:!0,value:e}}function gt(e,{detail:t="",term:n=null}={}){if(!Qe[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function bn(e){return!e||!e.id?null:{id:String(e.id),label:e.label!=null?String(e.label):String(e.id),class:e.class||"Entity",attributes:(Array.isArray(e.attributes)?e.attributes:[]).map(t=>({key:t.key,value:t.value,prop:t.prop||null}))}}function ui(e,{predicate:t="",prop:n=null}={}){let s={subject:e.subject,object:e.object,predicate:t,prop:n||null};return e.subjectLabel!=null&&(s.subjectLabel=e.subjectLabel),e.objectLabel!=null&&(s.objectLabel=e.objectLabel),e.weight!=null&&(s.weight=e.weight),s}var mc,G$,Qe,hc,yA,sf,gc,q$,cn,fc,kt,vA,of=M(()=>{mc="1.1.0",G$="urn:tmct:core",Qe=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),hc=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports","serves","denotes"]),yA=Object.freeze({imports:"tmct:imports",calls:"tmct:calls",callsSymbol:"tmct:calls",defines:"tmct:defines",tests:"tmct:covers",touches:"tmct:touches",touchesSymbol:"tmct:touches",contains:"tmct:contains",inherits:"tmct:extends",cochange:"tmct:dependsOn",reexports:"tmct:exports",serves:"tmct:serves",denotes:"tmct:denotes"}),sf=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),gc=Object.freeze(Object.values(sf).flat()),q$=Object.freeze(new Set(sf.source));cn="Individual",fc="Edge",kt="concurrent-safe: reads immutable graph truth; no shared mutable state",vA=Object.freeze({version:mc,ontology:G$,missReasons:Object.values(Qe),edgeKinds:[...hc],types:{Individual:{fields:{id:"string (opaque provider id)",label:"string (human/display name)",class:"string \u2014 a tmct: class token (module|class|function|method|attribute|variable|commit|test|\u2026)",attributes:"Array<{ key: string, value: string, prop: string|null }> \u2014 prop is the SEON/mgx token grounding the value"}},Edge:{fields:{subject:"string (individual id)",object:"string (individual id)",predicate:"string \u2014 the relation predicate",prop:"string|null \u2014 the SEON/mgx property token; see edgeKinds \u2192 tmct: mapping",subjectLabel:"string? (additive)",objectLabel:"string? (additive)",weight:"number? (additive; e.g. cochange coupling)"}},Result:{shape:"{ ok: true, value: T } | { ok: false, miss: Miss }"},Miss:{shape:"{ reason: MISS_REASONS, detail: string, term: string|null }"}},capabilitiesModel:"A provider advertises `capabilities: string[]` (service names it implements). A service outside the set is negotiated away to miss(CAPABILITY_ABSENT) \u2014 never an error. snippet may be advertised yet answer miss(NO_SOURCE) when no working tree exists (it has nothing useful without fs); context is graph-only-capable since INTERFACE_VERSION 1.1.0 \u2014 it returns a real hit (graph-only bundle) for any resolvable symbol even with no working tree, only escalating NO_SOURCE-style behavior to richer body text when source-capable.",services:{resolve:{group:"resolution",args:{term:"string"},result:`{ match: ${cn}, candidates: ${cn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The resolveSymbol seam: map a free term to an individual + runner-up candidates. Every id-taking service consumes a resolved id."},describe:{group:"resolution",args:{id:"string"},result:`{ individual: ${cn}, out: ${fc}[], incoming: ${fc}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${cn}[], attributes: ${cn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${cn}[], subclasses: ${cn}[], levels: Array<${cn}[]> }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this). `subclasses` is the flat closure; `levels` groups the same individuals by inheritance depth (direct children first), mirroring `impact`'s leveled shape."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${cn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"A module's curated public API (resolved __all__ / re-exports)."},signature:{group:"resolution",args:{id:"string"},result:"{ id, label, class, params, returns, raises, decorators, doc, selfFields, flags }",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The compact API surface of a symbol without its body."},edges:{group:"traversal",args:{id:"string",kind:"EDGE_KINDS member"},result:`{ kind: string, edges: ${fc}[] }`,misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"Outgoing edges of one closed kind from an individual (an honest empty array is not a miss).",note:"An unknown kind (outside EDGE_KINDS) is a programming error and throws TypeError, not a miss."},impact:{group:"traversal",args:{moduleId:"string"},result:"{ total: number, levels: Array<Array<{ id, label, via, tests }>> }",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The transitive dependent closure the interpreter cannot compute without provider truth."},snippet:{group:"source",args:{id:"string"},result:"{ path: string, span: { start, end }, body: string|null } \u2014 Promise<Result>",misses:["UNRESOLVED_TERM","NO_SOURCE"],concurrency:kt,purpose:"The exact source span of a symbol. A provider with no working tree returns miss(NO_SOURCE) honestly \u2014 snippet has nothing useful without fs.",note:"ASYNC (returns Promise<Result>) \u2014 a real body read is inherently fs I/O; callers should always await it. A graph-only provider still resolves synchronously-in-spirit (the promise settles on the same tick) but the return type is uniformly a Promise regardless of sourceAccess."},context:{group:"source",args:{symbol:"string",depth:"min|auto|full?"},result:"{ text: string, tier: string } (a sized edit bundle) \u2014 Promise<Result>",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The composed edit bundle (exemplar, siblings, registration, insertion region). A graph-only provider returns the graph-only sections as a real hit; a source-capable provider (sourceAccess:true, repoRoot, readFile) additionally includes the anchor/exemplar/inlined-callee body text.",note:"ASYNC (returns Promise<Result>) \u2014 see snippet's note; source-capable rendering is fs I/O."},architecture:{group:"aggregate",args:{package:"string?"},result:"{ modules: number, packages: Array<[dir, count]>, hubs: Array<{ id, label, importers }> }",misses:[],concurrency:kt,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${cn}[] }`,misses:[],concurrency:kt,purpose:"Modules with no covering test module (via the tests relation)."},stats:{group:"aggregate",args:{},result:"{ total: number, classes: Array<{ class: string, count: number }>, truncated: boolean }",misses:[],concurrency:kt,purpose:"Per-tmct:class individual counts, read straight from the payload."},history:{group:"temporal",args:{id:"string"},result:"{ commits: Array<{ id, label, author, date, message }> }",misses:["UNRESOLVED_TERM"],concurrency:kt,purpose:"The commits that touched an individual (tmct:commit individuals via tmct:touches)."},search:{group:"search",args:{query:"string",kind:"string?",name:"string?",decorator:"string?"},result:`{ results: ${cn}[] }`,misses:[],concurrency:kt,purpose:"Lexical, provider-local locate. An empty result set is honest, not a miss."},ask:{group:"search",args:{query:"string"},result:"{ content: string, tmct_ask: object } (the composed NL round-trip envelope)",misses:[],concurrency:kt,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function V$(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(ui(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(ui(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function H$(e,t){for(let n of e.relations)if(In(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function Y$(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await Mn({readFile:n,repoRoot:s,path:e.moduleLabel}))}catch{o=null}if(!o)return"";let r=[];if(t.anchor&&e.anchor?.site){let{start:i,end:a}=e.anchor.site;r.push(`
65
- ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(os(o,i,a,bc).text),e.callHint&&r.push(e.callHint)}if(t.exemplar&&e.exemplar?.site){let{start:i,end:a}=e.exemplar.site,l=e.exemplar.decorators?` @${e.exemplar.decorators}`:"";r.push(`
66
- ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(os(o,i,a,bc).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=K$;for(let a of e.calleeBodies){if(i<=0)break;let l=a.site.start,u=a.site.path===e.moduleLabel?o:null;if(!u)try{({lines:u}=await Mn({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=os(u,l,a.site.end,i);r.push(`
62
+ (answering for ${c.objMatch.label} \u2014 ${p.length} other match${p.length===1?"":"es"}: ${g})`}}return!Array.isArray(c.referents)&&!u.miss&&!u.ambiguous&&(a?.shape==="reverse"||a?.shape==="forward")&&a.entityType&&Array.isArray(c.matches)&&c.matches.length&&c.matches.every(f=>f&&f.class===a.entityType)&&(c={...c,referents:cr(a.entityType,c.matches,"relationListing")}),{content:d,tmct_ask:{mechanical:!0,parsed:a&&!a.ambiguousParse?a:null,canonical:mf(a),matches:(c.matches||[]).map(f=>({id:f.id,label:f.label,type:f.class,module:f.class?ar(f):void 0})),traversal:c.traversal||null,miss:!!u.miss,ambiguous:!!u.ambiguous,relaxed:l,matchedVia:c.matchedVia||null,...Array.isArray(c.referents)&&c.referents.length?{discourse:c.referents}:{},...u.ambiguous?{candidates:u.candidates,candidateParses:u.candidateParses}:{}}}}var Ap,ho,ns,Ka,Hv,At,Wp,qe,Gp,Kv,Yv,Xv,Jv,Qv,Vp,Za,e$,cc,qp,jt,Hp,n$,o$,i$,c$,u$,d$,p$,f$,h$,b$,Jp,uc,Qp,Zp,j$,A$,Tp,I$,Cp,M$,Ip,Np,D$,B$,W$,Zn,Ya,sx,ox,ix,gc,ax,Fp,cx,Dp,dx,di,ic,wc,gf,gx,bx,wx,Bp,$x,Ex,Sx,yc,Rx,Ax,Up,Ox,Lx,Nx,os=L(()=>{Ie();Ea();An();Jn();Qo();ei();ti();Rp();Va();Yn();ai();Ha();po();Ap=new WeakMap;ho={calls:"callsSymbol",touches:"touchesSymbol"},ns=new Set(["Function","Method","Class","Attribute","GlobalVariable"]),Ka={Function:"Method",Method:"Function"},Hv={uses:["imports","calls","callsSymbol"]},At=e=>Hv[e]||[e],Wp=new Set(Object.values(ho)),qe=12,Gp={Function:["function","functions"],Method:["method","methods"],Class:["class","classes"],Module:["module","modules"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Change:["change","changes"],Package:["package","packages"],Fact:["fact","facts"],Utterance:["utterance","utterances"],Session:["session","sessions"],Source:["source","sources"],Rule:["rule","rules"]};Kv={cochange:"cochanges",reexports:"export"};Yv={imports:"import",calls:"call",callsSymbol:"call",inherits:"inherit from",contains:"contain",tests:"test",touches:"touch",cochange:"cochange",reexports:"export",uses:"use",serves:"serve",denotes:"denote"},Xv=e=>Yv[e]||Ts(e),Jv=new RegExp(`^(?:${Object.keys(de).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})(?:s|ing|ed)?\\s+`,"i"),Qv=new Set(["imports"]);Vp=4,Za="zzinnerset",e$=new Set(["that","which","who","are","is","was","were","do","does","also","still","both","and","then","though"]),cc=new Set(["which","what","who","list","show","find","give","me","us","all"]),qp=new Set(["are","is","was","were"]);jt=e=>Ue[e]?{entityType:Ue[e],placeholder:!1}:Rn.includes(e)?{entityType:null,placeholder:!0}:null,Hp=e=>!!de[e]&&e.endsWith("ing");n$=new Set(["which","the","all"]);o$=new Set(["all","every","each"]);i$=new Set(["what","which","thing","things","one","ones","stuff"]);c$=new Set(["those","them"]);u$=new Set(["did","was","were","do","does","has","have","had"]),d$=new Set(["change","changed","changes","update","updated","updates","modify","modified","modifies","touch","touched","touches","edit","edited","revise","revised"]),p$=new Set(["last","recently","ever","get","got","been","then","now","already"]),f$=new Set(["the","a","an","all","those","these","any"]);h$=new Set(["since","before","after","on"]);b$=/\b[\w-]+(?:[/.][\w-]+)+\b|\b[A-Z][A-Za-z0-9_]*\b|\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/;Jp=new Set(["total","altogether","overall","exist","exists","existing","present","here","now","currently","graph","index","codebase","repo","repository","this","that"]);uc=new Set(["the","a","an","all","me","us"]),Qp=[...xs].sort((e,t)=>t.split(" ").length-e.split(" ").length),Zp="functions, classes, methods, modules, packages, attributes, variables, or commits",j$=new Set(["in","inside","under"]);A$=new Set(["called","named","about","like","containing","matching","with"]);Tp=new Set(["recent","latest","newest"]);I$=/^git:(.+)$/i;Cp=new WeakMap;M$=new Set(["Class","Function","Method","GlobalVariable","Attribute"]);Ip=new WeakMap;Np={label:3,chain:2,attr:1};D$=e=>e&&typeof e.value=="boolean"?{...e,value:!e.value}:null;B$=["imports","calls","callsSymbol","inherits","contains","tests"];W$=/^\d{4}-\d{2}-\d{2}$/;Zn=e=>dn(e.slice(0,qe).map(t=>["Function","Method"].includes(t.class)?`${t.label}()`:t.label))+(e.length>qe?`, \u2026and ${e.length-qe} more`:"");Ya=10;sx=/^(?:the|a|an)\s+/i,ox=new RegExp(`\\s+(${Object.keys(Ue).join("|")})$`,"i");ix=/^(?:the\s+)?(?:main\s+|primary\s+)?entry[\s-]?points?(?:\s+(?:of|to|for)\s+(?:this|the)\s+(?:codebase|code|repo|repository|project|app))?$/i,gc=new Set(["index","main","app","server","cli","__main__"]),ax=new Set(["test","tests","__tests__","fixture","fixtures","spec","specs","testdata"]),Fp=e=>String(e).toLowerCase().split("/").pop().replace(/\.[a-z0-9]+$/,""),cx=e=>String(e).toLowerCase().split("/").slice(0,-1).some(t=>ax.has(t));Dp=8,dx="mgx:schemaDoc";di=new Set([...he(Object.keys(de)),...he(Object.keys(Ue)),...he(Object.keys(Ht)),...he(Object.keys(Ye)),...he($s),...he(Object.keys(Kn)),...he(Object.keys(gn)),...he(Object.keys(eo)),...he(Rn),...he(Go),...he(vs),...he(Zt),...he(un),...he(_n),...he(Object.keys(no))]),ic=new Set([...lt,...cc,...ys]),wc=new Set(he(Dr)),gf=new Set([...wc,...ic]),gx=["many","count","number","quantity","total","tally","list","show","display","print","dump","enumerate","name"],bx=[...new Set([...he(Object.keys(de)),...Object.keys(Ue),...gx])].filter(e=>/^[a-z]+$/.test(e)&&e.length>=4&&!lt.has(e)),wx=new Set(["impact","impacts","impacted"]);Bp=/\b(?:the\s+)?(?:last|latest|most\s+recent)\s+commit\b/i,$x=/^when\s+(?:was|were|is|did|does|do)\s+commit\s+[0-9a-fA-F:]+$/i;Ex=/^(?:list|show(?:\s+me)?)\s+(?:all\s+|the\s+)?([a-z][a-z'-]*)\s*(.*)$/i,Sx=/^(?:how\s+many|number\s+of|count(?:\s+the)?)\s+([a-z][a-z'-]*)\s*(.*)$/i,yc=/^(?:are there(?:\s+in\s+total)?|is there|do you know(?:\s+about)?|do you have|exist(?:s)?|are known|in (?:the |a )?(?:graph|memory)|you know(?:\s+about)?)?[?.!\s]*$/i;Rx=new RegExp(`^(?:${Qp.map(Xe).join("|")})\\s+(?:all\\s+)?(?:the\\s+)?([a-z][a-z'-]*)\\s+(?:of|for)\\s+(.+?)[?.!\\s]*$`,"i"),Ax=/^where(?:'s|\s+is|\s+are)\s+(?:all\s+)?(?:the\s+)?(.+?)[?.!\s]*$/i;Up=e=>String(e||"").toLowerCase();Ox=/^(.+)@(?:turn|step)(\d+)$/;Lx=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,Nx=/^what\s+is\s+(?:the\s+)?(?!(?:an?|it|this|that|these|those)\s)(.+?)\s+(?:used\s+)?for[?.!\s]*$/i});function rs(e,t,n,s){let o=Math.max(1,t),r=Math.min(e.length,n),i=!1;s!=null&&r-o+1>s&&(r=o+s-1,i=!0);let a=e.slice(o-1,r).map((l,c)=>`${o+c} ${l}`).join(`
63
+ `);return{start:o,end:r,text:a,truncated:i}}async function Pn({readFile:e,repoRoot:t,path:n,start:s,end:o,maxLines:r}){let i=qt(t),a=qt(i,n);if(a!==i&&!a.startsWith(i+_u))throw new Re(`refusing to read outside the repository root: ${n}`);let c=(await e(a,"utf8")).split(`
64
+ `);return s==null||o==null?{lines:c}:{lines:c,...rs(c,s,o,r)}}var fi=L(()=>{ze();Mt()});function wt(e){return{ok:!0,value:e}}function yt(e,{detail:t="",term:n=null}={}){if(!nt[e])throw new TypeError(`miss(): unknown reason "${e}" (not in MISS_REASONS)`);return{ok:!1,miss:{reason:e,detail:t,term:n}}}function yn(e){return!e||!e.id?null:{id:String(e.id),label:e.label!=null?String(e.label):String(e.id),class:e.class||"Entity",attributes:(Array.isArray(e.attributes)?e.attributes:[]).map(t=>({key:t.key,value:t.value,prop:t.prop||null}))}}function mi(e,{predicate:t="",prop:n=null}={}){let s={subject:e.subject,object:e.object,predicate:t,prop:n||null};return e.subjectLabel!=null&&(s.subjectLabel=e.subjectLabel),e.objectLabel!=null&&(s.objectLabel=e.objectLabel),e.weight!=null&&(s.weight=e.weight),s}var $c,Mx,nt,xc,HT,$f,kc,Px,mn,vc,_t,KT,xf=L(()=>{$c="1.1.0",Mx="urn:tmct:core",nt=Object.freeze({UNRESOLVED_TERM:"UNRESOLVED_TERM",CAPABILITY_ABSENT:"CAPABILITY_ABSENT",TRUNCATED_GRAPH:"TRUNCATED_GRAPH",NO_SOURCE:"NO_SOURCE"}),xc=Object.freeze(["imports","calls","callsSymbol","defines","tests","touches","touchesSymbol","contains","inherits","cochange","reexports","serves","denotes"]),HT=Object.freeze({imports:"tmct:imports",calls:"tmct:calls",callsSymbol:"tmct:calls",defines:"tmct:defines",tests:"tmct:covers",touches:"tmct:touches",touchesSymbol:"tmct:touches",contains:"tmct:contains",inherits:"tmct:extends",cochange:"tmct:dependsOn",reexports:"tmct:exports",serves:"tmct:serves",denotes:"tmct:denotes"}),$f=Object.freeze({resolution:["resolve","describe","members","subclasses","exports","signature"],traversal:["edges","impact"],source:["snippet","context"],aggregate:["architecture","untested","stats"],temporal:["history"],search:["search","ask"]}),kc=Object.freeze(Object.values($f).flat()),Px=Object.freeze(new Set($f.source));mn="Individual",vc="Edge",_t="concurrent-safe: reads immutable graph truth; no shared mutable state",KT=Object.freeze({version:$c,ontology:Mx,missReasons:Object.values(nt),edgeKinds:[...xc],types:{Individual:{fields:{id:"string (opaque provider id)",label:"string (human/display name)",class:"string \u2014 a tmct: class token (module|class|function|method|attribute|variable|commit|test|\u2026)",attributes:"Array<{ key: string, value: string, prop: string|null }> \u2014 prop is the SEON/mgx token grounding the value"}},Edge:{fields:{subject:"string (individual id)",object:"string (individual id)",predicate:"string \u2014 the relation predicate",prop:"string|null \u2014 the SEON/mgx property token; see edgeKinds \u2192 tmct: mapping",subjectLabel:"string? (additive)",objectLabel:"string? (additive)",weight:"number? (additive; e.g. cochange coupling)"}},Result:{shape:"{ ok: true, value: T } | { ok: false, miss: Miss }"},Miss:{shape:"{ reason: MISS_REASONS, detail: string, term: string|null }"}},capabilitiesModel:"A provider advertises `capabilities: string[]` (service names it implements). A service outside the set is negotiated away to miss(CAPABILITY_ABSENT) \u2014 never an error. snippet may be advertised yet answer miss(NO_SOURCE) when no working tree exists (it has nothing useful without fs); context is graph-only-capable since INTERFACE_VERSION 1.1.0 \u2014 it returns a real hit (graph-only bundle) for any resolvable symbol even with no working tree, only escalating NO_SOURCE-style behavior to richer body text when source-capable.",services:{resolve:{group:"resolution",args:{term:"string"},result:`{ match: ${mn}, candidates: ${mn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"The resolveSymbol seam: map a free term to an individual + runner-up candidates. Every id-taking service consumes a resolved id."},describe:{group:"resolution",args:{id:"string"},result:`{ individual: ${mn}, out: ${vc}[], incoming: ${vc}[] }`,misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"Full typed portrait of one individual: its attributes and its outgoing/incoming edges."},members:{group:"resolution",args:{classId:"string"},result:`{ methods: ${mn}[], attributes: ${mn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"A class's methods + attributes (via the contains relation) \u2014 replaces reading the class body."},subclasses:{group:"resolution",args:{classId:"string"},result:`{ bases: ${mn}[], subclasses: ${mn}[], levels: Array<${mn}[]> }`,misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"Forward bases + the transitive reverse inheritance closure (who extends this). `subclasses` is the flat closure; `levels` groups the same individuals by inheritance depth (direct children first), mirroring `impact`'s leveled shape."},exports:{group:"resolution",args:{moduleId:"string"},result:`{ exports: ${mn}[] }`,misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"A module's curated public API (resolved __all__ / re-exports)."},signature:{group:"resolution",args:{id:"string"},result:"{ id, label, class, params, returns, raises, decorators, doc, selfFields, flags }",misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"The compact API surface of a symbol without its body."},edges:{group:"traversal",args:{id:"string",kind:"EDGE_KINDS member"},result:`{ kind: string, edges: ${vc}[] }`,misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"Outgoing edges of one closed kind from an individual (an honest empty array is not a miss).",note:"An unknown kind (outside EDGE_KINDS) is a programming error and throws TypeError, not a miss."},impact:{group:"traversal",args:{moduleId:"string"},result:"{ total: number, levels: Array<Array<{ id, label, via, tests }>> }",misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"The transitive dependent closure the interpreter cannot compute without provider truth."},snippet:{group:"source",args:{id:"string"},result:"{ path: string, span: { start, end }, body: string|null } \u2014 Promise<Result>",misses:["UNRESOLVED_TERM","NO_SOURCE"],concurrency:_t,purpose:"The exact source span of a symbol. A provider with no working tree returns miss(NO_SOURCE) honestly \u2014 snippet has nothing useful without fs.",note:"ASYNC (returns Promise<Result>) \u2014 a real body read is inherently fs I/O; callers should always await it. A graph-only provider still resolves synchronously-in-spirit (the promise settles on the same tick) but the return type is uniformly a Promise regardless of sourceAccess."},context:{group:"source",args:{symbol:"string",depth:"min|auto|full?"},result:"{ text: string, tier: string } (a sized edit bundle) \u2014 Promise<Result>",misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"The composed edit bundle (exemplar, siblings, registration, insertion region). A graph-only provider returns the graph-only sections as a real hit; a source-capable provider (sourceAccess:true, repoRoot, readFile) additionally includes the anchor/exemplar/inlined-callee body text.",note:"ASYNC (returns Promise<Result>) \u2014 see snippet's note; source-capable rendering is fs I/O."},architecture:{group:"aggregate",args:{package:"string?"},result:"{ modules: number, packages: Array<[dir, count]>, hubs: Array<{ id, label, importers }> }",misses:[],concurrency:_t,purpose:"Package/module shape + the most-imported hub modules. Optional package prefix scopes it."},untested:{group:"aggregate",args:{},result:`{ modules: ${mn}[] }`,misses:[],concurrency:_t,purpose:"Modules with no covering test module (via the tests relation)."},stats:{group:"aggregate",args:{},result:"{ total: number, classes: Array<{ class: string, count: number }>, truncated: boolean }",misses:[],concurrency:_t,purpose:"Per-tmct:class individual counts, read straight from the payload."},history:{group:"temporal",args:{id:"string"},result:"{ commits: Array<{ id, label, author, date, message }> }",misses:["UNRESOLVED_TERM"],concurrency:_t,purpose:"The commits that touched an individual (tmct:commit individuals via tmct:touches)."},search:{group:"search",args:{query:"string",kind:"string?",name:"string?",decorator:"string?"},result:`{ results: ${mn}[] }`,misses:[],concurrency:_t,purpose:"Lexical, provider-local locate. An empty result set is honest, not a miss."},ask:{group:"search",args:{query:"string"},result:"{ content: string, tmct_ask: object } (the composed NL round-trip envelope)",misses:[],concurrency:_t,purpose:"The mechanical, zero-model NL query over the graph \u2014 tmct's whole reason to exist."}}})});function Fx(e,t){let n=[],s=[];for(let o of e.relations)for(let r of o.edges)r.subject===t&&n.push(mi(r,{predicate:o.predicate,prop:o.prop})),r.object===t&&s.push(mi(r,{predicate:o.predicate,prop:o.prop}));return{out:n,incoming:s}}function Dx(e,t){for(let n of e.relations)if(In(n)===t)return{predicate:n.predicate,prop:n.prop};return{predicate:t,prop:null}}async function Bx(e,t,{readFile:n,repoRoot:s}){if(!e.moduleLabel)return"";let o=null;try{({lines:o}=await Pn({readFile:n,repoRoot:s,path:e.moduleLabel}))}catch{o=null}if(!o)return"";let r=[];if(t.anchor&&e.anchor?.site){let{start:i,end:a}=e.anchor.site;r.push(`
65
+ ## anchor: ${e.anchor.label} (${e.anchor.class}) @ ${e.moduleLabel}:${i}-${a}`),r.push(rs(o,i,a,Ec).text),e.callHint&&r.push(e.callHint)}if(t.exemplar&&e.exemplar?.site){let{start:i,end:a}=e.exemplar.site,l=e.exemplar.decorators?` @${e.exemplar.decorators}`:"";r.push(`
66
+ ## closest example (full body) \u2014 copy this style: ${e.exemplar.label} (${e.exemplar.class})${l} @ ${e.moduleLabel}:${i}-${a}`),r.push(rs(o,i,a,Ec).text),e.callHint&&r.push(e.callHint)}if(t.inlinedCallees&&e.calleeBodies.length){let i=zx;for(let a of e.calleeBodies){if(i<=0)break;let l=a.site.start,u=a.site.path===e.moduleLabel?o:null;if(!u)try{({lines:u}=await Pn({readFile:n,repoRoot:s,path:a.site.path}))}catch{u=null}if(!u)continue;let d=rs(u,l,a.site.end,i);r.push(`
67
67
  ## inlined callee body (depth-1 in-repo call): ${a.label} @ ${a.site.path}:${l}-${a.site.end}`),r.push(d.text),i-=d.end-l+1}}return r.join(`
68
- `)}function di(e,{sourceAccess:t=!1,repoRoot:n=null,readFile:s=null,tel:o=null,ask:r=null}={}){let i=e.byId;if(t&&(!n||typeof s!="function"))throw new TypeError("createGraphService({ sourceAccess: true }) requires both repoRoot and readFile \u2014 fs access is an injected capability, not an ambient import.");let a=c=>i.get(c)||null,l={version:mc,capabilities:[...gc],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=qt(e,String(c??""));return u?ht({match:bn(u),candidates:d.map(bn)}):gt(Qe.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return gt(Qe.UNRESOLVED_TERM,{term:c});let{out:d,incoming:f}=V$(e,c);return ht({individual:bn(u),out:d,incoming:f})},members(c){if(!a(c))return gt(Qe.UNRESOLVED_TERM,{term:c});let d=ke(e,"contains").filter(m=>m.subject===c),f=[],p=[];for(let m of d){let h=i.get(m.object),g=h?bn(h):{id:m.object,label:m.objectLabel||m.object,class:"Entity",attributes:[]};(h?.class||"")==="Attribute"?p.push(g):f.push(g)}return ht({methods:f,attributes:p})},subclasses(c){if(!a(c))return gt(Qe.UNRESOLVED_TERM,{term:c});let d=ke(e,"inherits"),f=d.filter(y=>y.subject===c).map(y=>i.get(y.object)?bn(i.get(y.object)):{id:y.object,label:y.objectLabel||y.object,class:"Class",attributes:[]}),p=new Map;for(let y of d)p.has(y.object)||p.set(y.object,[]),p.get(y.object).push(y.subject);let m=new Set([c]),h=[],g=[],b=[c];for(let y=0;y<8&&b.length;y+=1){let w=[],$=[];for(let j of b)for(let v of p.get(j)||[]){if(m.has(v))continue;m.add(v);let x=i.get(v),k=x?bn(x):{id:v,label:v,class:"Class",attributes:[]};h.push(k),$.push(k),w.push(v)}$.length&&g.push($),b=w}return ht({bases:f,subclasses:h,levels:g})},exports(c){if(!a(c))return gt(Qe.UNRESOLVED_TERM,{term:c});let f=ke(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?bn(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return ht({exports:f})},signature(c){let u=a(c);if(!u)return gt(Qe.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,m]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])Pt(u,p)&&d.push(m);let f=Pt(u,"visibility");return f&&d.push(f),ht({id:u.id,label:u.label,class:u.class||"Entity",params:Pt(u,"params"),returns:Pt(u,"returns"),raises:Pt(u,"raises"),decorators:Pt(u,"decorators"),doc:Pt(u,"doc"),selfFields:Pt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:f=0}={}){if(!hc.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return gt(Qe.UNRESOLVED_TERM,{term:c});let m=H$(e,u),h=ke(e,u).filter(g=>g.subject===c).map(g=>ui(g,m));return h=d==null?h.slice(f):h.slice(f,f+d),ht({kind:u,edges:h})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return gt(Qe.UNRESOLVED_TERM,{term:c});let f=u==null?no(e,d):no(e,d,{maxDepth:u}),p=f.reduce((m,h)=>m+h.length,0);return ht({total:p,levels:f})},async snippet(c){let u=a(c);if(!u)return gt(Qe.UNRESOLVED_TERM,{term:c});let d=vt(u);if(!l.sourceAccess)return gt(Qe.NO_SOURCE,{term:c,detail:d?`span is ${d.path}:${d.start}-${d.end}; this provider exposes no working tree`:"no source span in the graph"});if(!d)return gt(Qe.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let f=await Mn({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:bc});return ht({path:d.path,span:{start:d.start,end:d.end},body:f.text})}catch(f){return gt(Qe.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${f?.message||f}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=qt(e,String(c??""));if(!d)return gt(Qe.UNRESOLVED_TERM,{term:String(c??"")});let f=so(e,d),p=String(u||"auto").trim().toLowerCase(),m,h;p==="min"?(m="TINY",h=js("TINY")):p==="full"?(m="FULL",h=js("FULL")):{tier:m,mask:h}=Hr(f,e,{});let g=Md(f,h);if(!l.sourceAccess)return ht({text:g,tier:m});let b=await Y$(f,h,{readFile:s,repoRoot:n});return ht({text:b?`${g}
69
- ${b}`:g,tier:m})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(b=>(b.class||"")==="Module"&&(!u||String(b.label||"").toLowerCase().startsWith(u))),f=new Map;for(let b of d){let y=b.label.includes("/")?b.label.slice(0,b.label.lastIndexOf("/")):"(root)";f.set(y,(f.get(y)||0)+1)}let p=new Set(d.map(b=>b.id)),m=new Map;for(let b of ke(e,"imports"))p.has(b.object)&&m.set(b.object,(m.get(b.object)||0)+1);let h=[...m.entries()].sort((b,y)=>y[1]-b[1]).map(([b,y])=>({id:b,label:i.get(b)?.label||b,importers:y})),g=[...f.entries()].sort((b,y)=>y[1]-b[1]);return ht({modules:d.length,packages:g,hubs:h})},untested(){let c=new Set(ke(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(bn);return ht({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let f=d.class||"Entity";c.set(f,(c.get(f)||0)+1)}let u=[...c.entries()].map(([d,f])=>({class:d,count:f})).sort((d,f)=>f.count-d.count||d.class.localeCompare(f.class));return ht({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return gt(Qe.UNRESOLVED_TERM,{term:c});let d=[...ke(e,"touches"),...ke(e,"touchesSymbol")].filter(m=>m.object===c),f=new Set,p=[];for(let m of d){if(f.has(m.subject))continue;f.add(m.subject);let h=i.get(m.subject);p.push({id:m.subject,label:m.subjectLabel||h?.label||m.subject,author:h?Pt(h,"author")??Pt(h,"commitAuthor"):null,date:h?Pt(h,"date")??Pt(h,"commitDate"):null,message:h?Pt(h,"message")??Pt(h,"commitMessage"):null})}return ht({commits:p})},search(c,{kind:u="",name:d="",decorator:f="",limit:p=Wr,offset:m=0}={}){let h=String(c||""),g=String(u||"").trim().toLowerCase(),b=String(d||"").trim(),y=String(f||"").trim().toLowerCase(),w;if(g&&g!=="module"){let j=null;if(b){let x=Aa(b);if(x.error)return gt(Qe.UNRESOLVED_TERM,{term:b,detail:x.error});j=x}let v=h.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=Ia(e,v,{kind:g,decFilter:y,nameRe:j}).map(x=>x.ind)}catch(x){return gt(Qe.UNRESOLVED_TERM,{term:b,detail:String(x?.message||x)})}}else{let j=new Map;for(let v of e.individuals)(v.class||"")==="Module"&&j.set(v.label,v);w=fd(e,h).map(({path:v})=>j.get(v)).filter(Boolean)}let $=w.slice(m,m+p).map(bn);return ht({results:$})},ask(c){if(typeof r!="function")return gt(Qe.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return ht({content:u,tmct_ask:d})}};if(o)for(let c of gc){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let f=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(m=>(rf(o,c,performance.now()-f,m),m)):(rf(o,c,performance.now()-f,p),p)})}return l}function rf(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:X$(s)})}catch{}}function X$(e){if(!e||typeof e!="object"||e.ok!==!0)return{ok:!1,reason:e?.miss?.reason||null};let t=0,n=e.value;if(Array.isArray(n))t=n.length;else if(n&&typeof n=="object")for(let s of Object.values(n))Array.isArray(s)&&(t+=s.length);return{ok:!0,count:t}}var Pt,bc,K$,pi=M(()=>{Te();li();of();Pt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;bc=200,K$=120});async function rr(e,t){let n=await t.fetchEntities(e),s=Ur(n);if(!s.individuals.length){let o=new Oe(`the graph at ${e.graphFile} is empty \u2014 no entities to answer from yet (this repo starts with no graph; the chat session folds the conversation into one).`);throw o.emptyGraph=!0,o}return s}var fi=M(()=>{Lt();Te()});function rt(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Oe(`${t} is required`);return n}function wt(e,t,n){let{match:s,candidates:o}=qt(e.graph,t);if(!s)throw new Oe(`no entity matching ${n} "${t}" in the code-map graph. Try a repo-relative path (e.g. path/to/module), a basename, or tmct_search for a fuzzy lookup.`);return{match:s,candidates:o}}var ir,Ze,Xe=M(()=>{Lt();Te();ir=200;Ze=e=>(t,{graph:n,svc:s,config:o})=>{let{match:r}=wt(s,rt(t,"symbol"),"symbol");return e(n,r,{toolNamePrefix:o?.toolNamePrefix})}});async function af(e,{config:t,source:n=eo,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Oe("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=t?.toolNamePrefix||"tmct_",d=await rr(t,n),f=ve(ve(t.graphFile)),p=di(d,{sourceAccess:!0,repoRoot:f,readFile:Be,tel:o,ask:ns}),{match:m}=wt(p,r,"symbol"),h=so(d,m),g,b,y=!1;a||i==="min"?(g="TINY",b=js("TINY")):c||i==="full"?(g="FULL",b=js("FULL"),y=!0):{tier:g,mask:b,topup:y}=Hr(h,d,{untuned:l}),s&&!c&&(b=Ld(b));let w=null;if(h.moduleLabel)try{({lines:w}=await Mn({readFile:Be,repoRoot:f,path:h.moduleLabel}))}catch{w=null}let $=x=>w&&w[x-1]!=null?w[x-1].trim():"",j=(x,k)=>os(w,x,k,ir).text,v=[`Edit context for ${h.moduleLabel} [${g}${s?" secondary":""}] \u2014 assembled from the typed graph + that file. You do NOT need to Read it; write the new code directly after reviewing this.`];if(b.anchor&&h.anchor?.site&&w){let{start:x,end:k}=h.anchor.site;v.push(`
70
- ## anchor: ${h.anchor.label} (${h.anchor.class}) @ ${h.moduleLabel}:${x}-${k}`),v.push(j(x,k)),h.callHint&&v.push(h.callHint)}if(b.registration&&h.globals.length){v.push(`
71
- ## registration / module globals (replicate this pattern):`);for(let x of h.globals)v.push(` ${x.label} = ${x.value}${x.site?` [:${x.site.start}]`:""}`)}if(b.exemplar&&h.exemplar?.site&&w){let{start:x,end:k}=h.exemplar.site,_=h.exemplar.decorators?` @${h.exemplar.decorators}`:"";v.push(`
72
- ## closest example (full body) \u2014 copy this style: ${h.exemplar.label} (${h.exemplar.class})${_} @ ${h.moduleLabel}:${x}-${k}`),v.push(j(x,k)),h.callHint&&v.push(h.callHint)}if(b.inlinedCallees&&h.calleeBodies.length&&w){let x=120;for(let k of h.calleeBodies){if(x<=0)break;let _=k.site.start,S=k.site.path===h.moduleLabel&&w?w:await Mn({readFile:Be,repoRoot:f,path:k.site.path}).then(L=>L.lines).catch(()=>null);if(!S)continue;let A=os(S,_,k.site.end,x);v.push(`
73
- ## inlined callee body (depth-1 in-repo call): ${k.label} @ ${k.site.path}:${_}-${k.site.end}`),v.push(A.text),x-=A.end-_+1}}if(b.classMembers&&h.classMembers&&h.classMembers.members.length){v.push(`
74
- ## members of ${h.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let x of h.classMembers.members){let k=String(x.label).split(".").pop(),_=x.params!=null&&x.params!==""?`(${x.params})${x.returns?` -> ${x.returns}`:""}`:"",R=x.decorators?`@${x.decorators} `:"",S=x.raises?` raises=${x.raises}`:"";v.push(` ${x.class} ${k}${x.site?` :${x.site.start}`:""} ${R}${k}${_}${S}`)}}if(b.siblings&&h.siblings.length){v.push(`
75
- ## sibling symbols to copy the style of (most relevant first; ${h.siblings.length} total):`);for(let x of h.siblings.slice(0,h.siblingCap)){let k=x.site?$(x.site.start):"",_=x.decorators?`@${x.decorators} `:"",R=x.raises?` raises=${x.raises}`:"";v.push(` ${x.class} ${x.label}${x.site?` :${x.site.start}`:""} ${_}${k}${R}`)}h.siblings.length>h.siblingCap&&v.push(` \u2026+${h.siblings.length-h.siblingCap} more (use ${u}search kind=function or ${u}snippet <name> for any of them)`)}if(b.allExports&&h.allExports&&v.push(`
68
+ `)}function hi(e,{sourceAccess:t=!1,repoRoot:n=null,readFile:s=null,tel:o=null,ask:r=null}={}){let i=e.byId;if(t&&(!n||typeof s!="function"))throw new TypeError("createGraphService({ sourceAccess: true }) requires both repoRoot and readFile \u2014 fs access is an injected capability, not an ambient import.");let a=c=>i.get(c)||null,l={version:$c,capabilities:[...kc],sourceAccess:!!t,graph:e,resolve(c){let{match:u,candidates:d}=Kt(e,String(c??""));return u?wt({match:yn(u),candidates:d.map(yn)}):yt(nt.UNRESOLVED_TERM,{term:String(c??"")})},describe(c){let u=a(c);if(!u)return yt(nt.UNRESOLVED_TERM,{term:c});let{out:d,incoming:f}=Fx(e,c);return wt({individual:yn(u),out:d,incoming:f})},members(c){if(!a(c))return yt(nt.UNRESOLVED_TERM,{term:c});let d=Se(e,"contains").filter(m=>m.subject===c),f=[],p=[];for(let m of d){let h=i.get(m.object),g=h?yn(h):{id:m.object,label:m.objectLabel||m.object,class:"Entity",attributes:[]};(h?.class||"")==="Attribute"?p.push(g):f.push(g)}return wt({methods:f,attributes:p})},subclasses(c){if(!a(c))return yt(nt.UNRESOLVED_TERM,{term:c});let d=Se(e,"inherits"),f=d.filter(y=>y.subject===c).map(y=>i.get(y.object)?yn(i.get(y.object)):{id:y.object,label:y.objectLabel||y.object,class:"Class",attributes:[]}),p=new Map;for(let y of d)p.has(y.object)||p.set(y.object,[]),p.get(y.object).push(y.subject);let m=new Set([c]),h=[],g=[],b=[c];for(let y=0;y<8&&b.length;y+=1){let w=[],$=[];for(let j of b)for(let v of p.get(j)||[]){if(m.has(v))continue;m.add(v);let E=i.get(v),k=E?yn(E):{id:v,label:v,class:"Class",attributes:[]};h.push(k),$.push(k),w.push(v)}$.length&&g.push($),b=w}return wt({bases:f,subclasses:h,levels:g})},exports(c){if(!a(c))return yt(nt.UNRESOLVED_TERM,{term:c});let f=Se(e,"reexports").filter(p=>p.subject===c).map(p=>i.get(p.object)?yn(i.get(p.object)):{id:p.object,label:p.objectLabel||p.object,class:"Entity",attributes:[]});return wt({exports:f})},signature(c){let u=a(c);if(!u)return yt(nt.UNRESOLVED_TERM,{term:c});let d=[];for(let[p,m]of[["isStatic","static"],["isAbstract","abstract"],["isConstant","constant"]])zt(u,p)&&d.push(m);let f=zt(u,"visibility");return f&&d.push(f),wt({id:u.id,label:u.label,class:u.class||"Entity",params:zt(u,"params"),returns:zt(u,"returns"),raises:zt(u,"raises"),decorators:zt(u,"decorators"),doc:zt(u,"doc"),selfFields:zt(u,"self_fields"),flags:d})},edges(c,u,{limit:d,offset:f=0}={}){if(!xc.includes(u))throw new TypeError(`edges(): unknown kind "${u}" (not in EDGE_KINDS)`);if(!a(c))return yt(nt.UNRESOLVED_TERM,{term:c});let m=Dx(e,u),h=Se(e,u).filter(g=>g.subject===c).map(g=>mi(g,m));return h=d==null?h.slice(f):h.slice(f,f+d),wt({kind:u,edges:h})},impact(c,{maxDepth:u}={}){let d=a(c);if(!d)return yt(nt.UNRESOLVED_TERM,{term:c});let f=u==null?ao(e,d):ao(e,d,{maxDepth:u}),p=f.reduce((m,h)=>m+h.length,0);return wt({total:p,levels:f})},async snippet(c){let u=a(c);if(!u)return yt(nt.UNRESOLVED_TERM,{term:c});let d=Et(u);if(!l.sourceAccess)return yt(nt.NO_SOURCE,{term:c,detail:d?`span is ${d.path}:${d.start}-${d.end}; this provider exposes no working tree`:"no source span in the graph"});if(!d)return yt(nt.NO_SOURCE,{term:c,detail:"no source span in the graph (likely a module)"});try{let f=await Pn({readFile:s,repoRoot:n,path:d.path,start:d.start,end:d.end,maxLines:Ec});return wt({path:d.path,span:{start:d.start,end:d.end},body:f.text})}catch(f){return yt(nt.NO_SOURCE,{term:c,detail:`could not read ${d.path}: ${f?.message||f}`})}},async context(c,{depth:u="auto"}={}){let{match:d}=Kt(e,String(c??""));if(!d)return yt(nt.UNRESOLVED_TERM,{term:String(c??"")});let f=co(e,d),p=String(u||"auto").trim().toLowerCase(),m,h;p==="min"?(m="TINY",h=Rs("TINY")):p==="full"?(m="FULL",h=Rs("FULL")):{tier:m,mask:h}=Jr(f,e,{});let g=Xd(f,h);if(!l.sourceAccess)return wt({text:g,tier:m});let b=await Bx(f,h,{readFile:s,repoRoot:n});return wt({text:b?`${g}
69
+ ${b}`:g,tier:m})},architecture({package:c=""}={}){let u=String(c||"").trim().toLowerCase().replace(/^\.?\//,""),d=e.individuals.filter(b=>(b.class||"")==="Module"&&(!u||String(b.label||"").toLowerCase().startsWith(u))),f=new Map;for(let b of d){let y=b.label.includes("/")?b.label.slice(0,b.label.lastIndexOf("/")):"(root)";f.set(y,(f.get(y)||0)+1)}let p=new Set(d.map(b=>b.id)),m=new Map;for(let b of Se(e,"imports"))p.has(b.object)&&m.set(b.object,(m.get(b.object)||0)+1);let h=[...m.entries()].sort((b,y)=>y[1]-b[1]).map(([b,y])=>({id:b,label:i.get(b)?.label||b,importers:y})),g=[...f.entries()].sort((b,y)=>y[1]-b[1]);return wt({modules:d.length,packages:g,hubs:h})},untested(){let c=new Set(Se(e,"tests").map(d=>d.object)),u=e.individuals.filter(d=>(d.class||"")==="Module"&&!c.has(d.id)&&!/\.test\./.test(d.label||"")).map(yn);return wt({modules:u})},stats(){let c=new Map;for(let d of e.individuals){let f=d.class||"Entity";c.set(f,(c.get(f)||0)+1)}let u=[...c.entries()].map(([d,f])=>({class:d,count:f})).sort((d,f)=>f.count-d.count||d.class.localeCompare(f.class));return wt({total:e.individuals.length,classes:u,truncated:(e.truncated||[]).length>0})},history(c){if(!a(c))return yt(nt.UNRESOLVED_TERM,{term:c});let d=[...Se(e,"touches"),...Se(e,"touchesSymbol")].filter(m=>m.object===c),f=new Set,p=[];for(let m of d){if(f.has(m.subject))continue;f.add(m.subject);let h=i.get(m.subject);p.push({id:m.subject,label:m.subjectLabel||h?.label||m.subject,author:h?zt(h,"author")??zt(h,"commitAuthor"):null,date:h?zt(h,"date")??zt(h,"commitDate"):null,message:h?zt(h,"message")??zt(h,"commitMessage"):null})}return wt({commits:p})},search(c,{kind:u="",name:d="",decorator:f="",limit:p=Hr,offset:m=0}={}){let h=String(c||""),g=String(u||"").trim().toLowerCase(),b=String(d||"").trim(),y=String(f||"").trim().toLowerCase(),w;if(g&&g!=="module"){let j=null;if(b){let E=Na(b);if(E.error)return yt(nt.UNRESOLVED_TERM,{term:b,detail:E.error});j=E}let v=h.toLowerCase().split(/[^a-z0-9_]+/).filter(Boolean);try{w=Fa(e,v,{kind:g,decFilter:y,nameRe:j}).map(E=>E.ind)}catch(E){return yt(nt.UNRESOLVED_TERM,{term:b,detail:String(E?.message||E)})}}else{let j=new Map;for(let v of e.individuals)(v.class||"")==="Module"&&j.set(v.label,v);w=_d(e,h).map(({path:v})=>j.get(v)).filter(Boolean)}let $=w.slice(m,m+p).map(yn);return wt({results:$})},ask(c){if(typeof r!="function")return yt(nt.CAPABILITY_ABSENT,"this provider was constructed without an ask answerer");let{content:u,tmct_ask:d}=r(e,String(c||""));return wt({content:u,tmct_ask:d})}};if(o)for(let c of kc){let u=l[c];typeof u=="function"&&(l[c]=(...d)=>{let f=performance.now(),p=u.apply(l,d);return p&&typeof p.then=="function"?p.then(m=>(kf(o,c,performance.now()-f,m),m)):(kf(o,c,performance.now()-f,p),p)})}return l}function kf(e,t,n,s){try{e.record({tool:`ri.${t}`,perf:{ms_total:n},response:Ux(s)})}catch{}}function Ux(e){if(!e||typeof e!="object"||e.ok!==!0)return{ok:!1,reason:e?.miss?.reason||null};let t=0,n=e.value;if(Array.isArray(n))t=n.length;else if(n&&typeof n=="object")for(let s of Object.values(n))Array.isArray(s)&&(t+=s.length);return{ok:!0,count:t}}var zt,Ec,zx,gi=L(()=>{Ie();fi();xf();zt=(e,t)=>(e?.attributes||[]).find(n=>n.key===t)?.value??null;Ec=200,zx=120});async function lr(e,t){let n=await t.fetchEntities(e),s=qr(n);if(!s.individuals.length){let o=new Re(`the graph at ${e.graphFile} is empty \u2014 no entities to answer from yet (this repo starts with no graph; the chat session folds the conversation into one).`);throw o.emptyGraph=!0,o}return s}var bi=L(()=>{Mt();Ie()});function is({content:e,data:t,text:n=null}){return{content:e,data:t,text:n??e}}function et(e,t){let n=String(e?.[t]||"").trim();if(!n)throw new Re(`${t} is required`);return n}function vt(e,t,n){let{match:s,candidates:o}=Kt(e.graph,t);if(!s)throw new Re(`no entity matching ${n} "${t}" in the code-map graph. Try a repo-relative path (e.g. path/to/module), a basename, or tmct_search for a fuzzy lookup.`);return{match:s,candidates:o}}var ur,st,Ge=L(()=>{Mt();Ie();ur=200;st=e=>(t,{graph:n,svc:s,config:o})=>{let{match:r}=vt(s,et(t,"symbol"),"symbol");return e(n,r,{toolNamePrefix:o?.toolNamePrefix})}});async function Ef(e,{config:t,source:n=ro,trim:s=!1,tel:o=null}={}){let r=String(e?.symbol||"").trim();if(!r)throw new Re("symbol is required");let i=String(e?.depth||"auto").trim().toLowerCase(),a=!!e?.min,l=!!e?.untuned,c=!!e?.max,u=t?.toolNamePrefix||"tmct_",d=await lr(t,n),f=xe(xe(t.graphFile)),p=hi(d,{sourceAccess:!0,repoRoot:f,readFile:Be,tel:o,ask:ss}),{match:m}=vt(p,r,"symbol"),h=co(d,m),g,b,y=!1;a||i==="min"?(g="TINY",b=Rs("TINY")):c||i==="full"?(g="FULL",b=Rs("FULL"),y=!0):{tier:g,mask:b,topup:y}=Jr(h,d,{untuned:l}),s&&!c&&(b=Kd(b));let w=null;if(h.moduleLabel)try{({lines:w}=await Pn({readFile:Be,repoRoot:f,path:h.moduleLabel}))}catch{w=null}let $=E=>w&&w[E-1]!=null?w[E-1].trim():"",j=(E,k)=>rs(w,E,k,ur).text,v=[`Edit context for ${h.moduleLabel} [${g}${s?" secondary":""}] \u2014 assembled from the typed graph + that file. You do NOT need to Read it; write the new code directly after reviewing this.`];if(b.anchor&&h.anchor?.site&&w){let{start:E,end:k}=h.anchor.site;v.push(`
70
+ ## anchor: ${h.anchor.label} (${h.anchor.class}) @ ${h.moduleLabel}:${E}-${k}`),v.push(j(E,k)),h.callHint&&v.push(h.callHint)}if(b.registration&&h.globals.length){v.push(`
71
+ ## registration / module globals (replicate this pattern):`);for(let E of h.globals)v.push(` ${E.label} = ${E.value}${E.site?` [:${E.site.start}]`:""}`)}if(b.exemplar&&h.exemplar?.site&&w){let{start:E,end:k}=h.exemplar.site,_=h.exemplar.decorators?` @${h.exemplar.decorators}`:"";v.push(`
72
+ ## closest example (full body) \u2014 copy this style: ${h.exemplar.label} (${h.exemplar.class})${_} @ ${h.moduleLabel}:${E}-${k}`),v.push(j(E,k)),h.callHint&&v.push(h.callHint)}if(b.inlinedCallees&&h.calleeBodies.length&&w){let E=120;for(let k of h.calleeBodies){if(E<=0)break;let _=k.site.start,x=k.site.path===h.moduleLabel&&w?w:await Pn({readFile:Be,repoRoot:f,path:k.site.path}).then(M=>M.lines).catch(()=>null);if(!x)continue;let T=rs(x,_,k.site.end,E);v.push(`
73
+ ## inlined callee body (depth-1 in-repo call): ${k.label} @ ${k.site.path}:${_}-${k.site.end}`),v.push(T.text),E-=T.end-_+1}}if(b.classMembers&&h.classMembers&&h.classMembers.members.length){v.push(`
74
+ ## members of ${h.classMembers.className} (the edit likely lives INSIDE this class \u2014 copy a member's shape, do not read the class body):`);for(let E of h.classMembers.members){let k=String(E.label).split(".").pop(),_=E.params!=null&&E.params!==""?`(${E.params})${E.returns?` -> ${E.returns}`:""}`:"",R=E.decorators?`@${E.decorators} `:"",x=E.raises?` raises=${E.raises}`:"";v.push(` ${E.class} ${k}${E.site?` :${E.site.start}`:""} ${R}${k}${_}${x}`)}}if(b.siblings&&h.siblings.length){v.push(`
75
+ ## sibling symbols to copy the style of (most relevant first; ${h.siblings.length} total):`);for(let E of h.siblings.slice(0,h.siblingCap)){let k=E.site?$(E.site.start):"",_=E.decorators?`@${E.decorators} `:"",R=E.raises?` raises=${E.raises}`:"";v.push(` ${E.class} ${E.label}${E.site?` :${E.site.start}`:""} ${_}${k}${R}`)}h.siblings.length>h.siblingCap&&v.push(` \u2026+${h.siblings.length-h.siblingCap} more (use ${u}search kind=function or ${u}snippet <name> for any of them)`)}if(b.allExports&&h.allExports&&v.push(`
76
76
  ## module __all__ \u2014 this module curates its public API; ADD your new public symbol to this list so it is importable:
77
77
  ${h.allExports}`),b.reexports&&h.exports&&h.exports.length&&v.push(`
78
- ## re-exported symbols (resolved __all__ \u2192 defining module): ${h.exports.join(", ")}`),b.insertionRegion&&h.insertionRegion&&w){let x=h.insertionRegion.start,k=Math.min(w.length,x+40-1);v.push(`
79
- ## insertion region (write your new sibling here) \u2014 ${h.moduleLabel}:${x}-${k}`),v.push(w.slice(x-1,k).map((_,R)=>`${x+R} ${_}`).join(`
78
+ ## re-exported symbols (resolved __all__ \u2192 defining module): ${h.exports.join(", ")}`),b.insertionRegion&&h.insertionRegion&&w){let E=h.insertionRegion.start,k=Math.min(w.length,E+40-1);v.push(`
79
+ ## insertion region (write your new sibling here) \u2014 ${h.moduleLabel}:${E}-${k}`),v.push(w.slice(E-1,k).map((_,R)=>`${E+R} ${_}`).join(`
80
80
  `))}else h.insertion&&v.push(`
81
81
  ## insert the new sibling after line ~${h.insertion} (end of the last top-level definition).`);return b.tests&&h.tests.length&&v.push(`
82
82
  ## covering tests: ${h.tests.join(", ")}`),b.cochange&&h.cochange&&h.cochange.length&&v.push(`
83
- ## usually changed together (consider editing these too): ${h.cochange.map(x=>`${x.label} (\xD7${x.weight})`).join(", ")}`),v.push(`
83
+ ## usually changed together (consider editing these too): ${h.cochange.map(E=>`${E.label} (\xD7${E.weight})`).join(", ")}`),v.push(`
84
84
  You now have the snippet, the sibling style, the registration anchor and the tests. Write the new code with Edit/Write \u2014 do NOT Read ${h.moduleLabel}.`),g!=="FULL"&&v.push(`(bundle tier ${g}; for any omitted sections run ${u}context_more {"symbol":"${r}"}, or ${u}context with depth="full".)`),{text:v.join(`
85
- `),tier:g,topup:y}}async function wc(e,{config:t,source:n,tel:s}){return(await af(e,{config:t,source:n,tel:s})).text}var yc=M(()=>{yt();ze();Lt();li();Uo();Te();ss();pi();fi();Xe();wc.ownsGraphLoad=!0});function cf(e,{graph:t,svc:n}){let{match:s}=wt(n,rt(e,"symbol"),"symbol");return Nd(so(t,s))}var lf=M(()=>{Te();Xe()});function mi(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function ar(e){return mi(e).toString(16).padStart(8,"0")}function Q$(e){let t=new TextEncoder().encode(String(e)),n=t.length*8,s=new Uint8Array((t.length+8>>6)+1<<6);s.set(t),s[t.length]=128;let o=new DataView(s.buffer);o.setUint32(s.length-8,Math.floor(n/4294967296)),o.setUint32(s.length-4,n>>>0);let r=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64),a=(u,d)=>u>>>d|u<<32-d;for(let u=0;u<s.length;u+=64){for(let w=0;w<16;w+=1)i[w]=o.getUint32(u+w*4);for(let w=16;w<64;w+=1){let $=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,j=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+$+i[w-7]+j>>>0}let[d,f,p,m,h,g,b,y]=r;for(let w=0;w<64;w+=1){let $=a(h,6)^a(h,11)^a(h,25),j=h&g^~h&b,v=y+$+j+J$[w]+i[w]>>>0,x=a(d,2)^a(d,13)^a(d,22),k=d&f^d&p^f&p,_=x+k>>>0;y=b,b=g,g=h,h=m+v>>>0,m=p,p=f,f=d,d=v+_>>>0}r[0]=r[0]+d>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+h>>>0,r[5]=r[5]+g>>>0,r[6]=r[6]+b>>>0,r[7]=r[7]+y>>>0}let l=new Uint8Array(32),c=new DataView(l.buffer);for(let u=0;u<8;u+=1)c.setUint32(u*4,r[u]);return l}function Z$(e,t){let n=Q$(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function ee(e){let t=Pn(e);return t=t.replace(/^\/c\/[a-z]{2,3}\//i,""),t=t.replace(/^[a-z][\w.-]*:/i,""),t=t.replace(/_/g," ").replace(/\s+/g," ").trim(),t=t.replace(/^(?:the|an?)\s+/i,""),t.toLowerCase()}function Fn(e){let t=Pn(e);return tx.get(t)??t}function he(e,t,n){return cr(ee(e),Fn(t),ee(n))}var J$,ex,Pn,tx,cr,Zt=M(()=>{J$=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);ex=2e3,Pn=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,ex);tx=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"],["mgx:used-for","mgx:usedFor"],["mgx:made-of","mgx:madeOf"]]);cr=(e,t,n)=>`fact:${Z$(`${e}\0${t}\0${n}`,8)}`});var en={};En(en,{CARDINALITY_RULE_CONFIDENCE:()=>cx,CAX_DW_RULE:()=>$c,CAX_DW_RULE_CONFIDENCE:()=>kc,CAX_MAXC0_RULE_CONFIDENCE:()=>ux,CLS_SVF1_RULE:()=>Ec,CLS_SVF1_RULE_CONFIDENCE:()=>jc,DEFAULT_MAX_ENVIRONMENTS:()=>hi,DISJOINT_PREDICATE:()=>mo,ENTAILED_DISJOINT_PROVENANCE:()=>xc,ENTAILED_PROVENANCE:()=>pf,ENTAILED_SCM_SVF_PROVENANCE:()=>Ac,ENTAILED_SVF1_PROVENANCE:()=>Sc,ENTAILED_TYPE_PROVENANCE:()=>mf,ON_PROPERTY_PREDICATE:()=>wn,SCM_SVF_RULE:()=>Rc,SCM_SVF_RULE_CONFIDENCE:()=>Tc,SOME_VALUES_FROM_PREDICATE:()=>yn,SUBCLASS_PREDICATE:()=>De,TYPE_PREDICATE:()=>At,buildCardinalityRestrictions:()=>ax,buildRelevanceFrontier:()=>vc,deriveDisjointViolations:()=>wf,deriveSomeValuesFromApplication:()=>yf,deriveSomeValuesFromSubsumption:()=>vf,deriveSubClassClosure:()=>hf,deriveSubClassClosureDelta:()=>gf,deriveTypePropagation:()=>bf,entailedTrustFrom:()=>sx,findConsistencyViolations:()=>px,findIsaChain:()=>Cc,proveCardinalityAtLeast:()=>lx,proveMaxCardinalityZeroDenial:()=>dx,retractSubClassOf:()=>bx,syllogise:()=>fx});function uf(e,t,n){for(let s of t)if(typeof e?.[s]!="function")throw new TypeError(`${n} needs a store option carrying { ${t.join(", ")} } (memory/core.mjs's read/write functions) \u2014 missing ${s}`);return e}function sx(e,t=1){let n=(Array.isArray(e)?e:[]).filter(o=>typeof o=="number");if(!n.length)return null;let s=Math.max(0,Math.min(1,Math.min(...n)*t));return Number(s.toFixed(6))}function Dn(e){if(!e)return null;let t=e instanceof Set?[...e]:Array.isArray(e)?e:[],n=new Set;for(let s of t){let o=ee(s);o&&n.add(o)}return n.size?n:null}function hf(e,{depth:t=32,budget:n=50,focus:s=null}={}){let o=new Set,r=new Map;for(let[u,d]of e||[])!u||!d||u===d||(o.add(`${u}${Ce}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:Dn(s),a=(u,d,f)=>!i||i.has(u)||i.has(d)||i.has(f),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,m]of r)for(let h of m){let g=r.get(h);if(g)for(let b of g){if(p===b)continue;let y=`${p}${Ce}${b}`;o.has(y)||c.has(y)||a(p,h,b)&&d.push([p,h,b,y])}}if(!d.length)break;d.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let f=!1;for(let[p,m,h,g]of d)if(!c.has(g)){if(l.length>=n)break;c.add(g),l.push({subject:p,object:h,via:m}),r.has(p)||r.set(p,new Set),r.get(p).add(h),f=!0}if(l.length>=n||!f)break}return l}function gf(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[m,h]of e||[])!m||!h||m===h||(r.add(`${m}${Ce}${h}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),a.has(h)||a.set(h,new Set),a.get(h).add(m));let l=[],c=new Set;for(let[m,h]of t||[]){if(!m||!h||m===h)continue;let g=`${m}${Ce}${h}`;c.has(g)||(c.add(g),l.push([m,h]))}let u=o instanceof Set?o.size?o:null:Dn(o),d=(m,h,g)=>!u||u.has(m)||u.has(h)||u.has(g),f=[],p=new Set;for(let m=0;m<n&&l.length;m+=1){let h=[],g=(w,$,j)=>{if(w===j)return;let v=`${w}${Ce}${j}`;r.has(v)||p.has(v)||d(w,$,j)&&h.push([w,$,j,v])};for(let[w,$]of l){for(let j of i.get($)||[])g(w,$,j);for(let j of a.get(w)||[])g(j,w,$)}if(!h.length)break;h.sort((w,$)=>w[0].localeCompare($[0])||w[2].localeCompare($[2])||w[1].localeCompare($[1]));let b=!1,y=[];for(let[w,$,j,v]of h)if(!p.has(v)){if(f.length>=s)break;p.add(v),f.push({subject:w,object:j,via:$}),i.has(w)||i.set(w,new Set),i.get(w).add(j),a.has(j)||a.set(j,new Set),a.get(j).add(w),y.push([w,j]),b=!0}if(f.length>=s||!b)break;l=y}return f}function vn(e){let t=new Map;for(let[s,o]of e||[])!s||!o||s===o||(t.has(s)||t.set(s,new Set),t.get(s).add(o));let n=new Map;return s=>{if(n.has(s))return n.get(s);let o=new Set,r=[...t.get(s)||[]];for(;r.length;){let i=r.pop();if(!o.has(i)){o.add(i);for(let a of t.get(i)||[])o.has(a)||r.push(a)}}return n.set(s,o),o}}function ox(e){return vn((e||[]).map(([t,n])=>[n,t]))}function vc(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(rs(c.predicate)?n.push([c.subject,c.object]):Is(c.predicate)?s.push([c.subject,c.object]):ho(c.predicate)?o.set(c.subject,c.object):ur(c.predicate)&&r.set(c.subject,c.object));let i=ox(n),a=new Set;for(let c of t||[]){let u=ee(c);if(u){a.add(u);for(let d of i(u))a.add(d)}}let l=new Set(a);for(let[c,u]of s)a.has(u)&&l.add(c);for(let[c,u]of r)o.has(c)&&a.has(u)&&l.add(c);return l}function bf(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=vn(t),i=new Set,a=new Set;for(let[p,m]of o||[])p&&m&&i.add(`${p}${Ce}${m}`);let l=s instanceof Set?s.size?s:null:Dn(s),c=(p,m,h)=>!l||l.has(p)||l.has(m)||l.has(h),u=[];for(let[p,m]of e||[]){if(!p||!m)continue;let h=`${p}${Ce}${m}`;if(!a.has(h)){a.add(h);for(let g of r(m)){if(g===m||g===p)continue;let b=`${p}${Ce}${g}`;i.has(b)||c(p,m,g)&&u.push([p,m,g,b])}}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let d=[],f=new Set;for(let[p,m,h,g]of u)if(!f.has(g)){if(d.length>=n)break;f.add(g),d.push({subject:p,object:h,via:m})}return d}function wf(e,t,n,{budget:s=50,focus:o=null}={}){let r=vn(t),i=new Map,a=new Set;for(let[m,h]of n||[])!m||!h||m===h||(a.add(`${m}${Ce}${h}`),a.add(`${h}${Ce}${m}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),i.has(h)||i.set(h,new Set),i.get(h).add(m));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:Dn(o),u=(m,h,g)=>!c||c.has(m)||c.has(h)||c.has(g),d=[];for(let[m,h]of e||[]){if(!m||!h)continue;let g=`${m}${Ce}${h}`;if(!l.has(g)){l.add(g);for(let b of[h,...r(h)]){let y=i.get(b);if(y)for(let w of y){if(w===m)continue;let $=`${m}${Ce}${w}`;a.has($)||u(m,h,w)&&d.push([m,h,b,w,$])}}}}d.sort((m,h)=>m[0].localeCompare(h[0])||m[3].localeCompare(h[3])||m[2].localeCompare(h[2])||m[1].localeCompare(h[1]));let f=[],p=new Set;for(let[m,h,g,b,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:m,object:b,viaType:h,viaClass:g})}return f}function yf(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=vn(n),a=new Map;for(let g of s||[]){if(!g||!g.restriction||!g.property||!g.target)continue;let b=`${g.property}${Ce}${g.target}`;a.has(b)||a.set(b,new Set),a.get(b).add(g.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[g,b]of t||[])!g||!b||(l.add(`${g}${Ce}${b}`),c.has(g)||c.set(g,new Set),c.get(g).add(b));let u=r instanceof Set?r.size?r:null:Dn(r),d=(g,b,y)=>!u||u.has(g)||u.has(b)||u.has(y),f=new Set,p=[];for(let[g,b,y]of e||[]){if(!g||!b||!y)continue;let w=ee(b),$=`${g}${Ce}${w}${Ce}${y}`;if(f.has($))continue;f.add($);let j=c.get(y);if(j)for(let v of j)for(let x of[v,...i(v)]){let k=a.get(`${w}${Ce}${x}`);if(k)for(let _ of k){if(g===_)continue;let R=`${g}${Ce}${_}`;l.has(R)||d(g,y,_)&&p.push([g,b,w,y,v,x,_,R])}}}p.sort((g,b)=>g[0].localeCompare(b[0])||g[6].localeCompare(b[6])||g[1].localeCompare(b[1])||g[3].localeCompare(b[3]));let m=[],h=new Set;for(let[g,b,y,w,$,j,v,x]of p)if(!h.has(x)){if(m.length>=o)break;h.add(x),m.push({subject:g,object:v,viaProperty:b,viaPropertyKey:y,viaValue:w,viaType:$,viaTarget:j})}return m}function ax(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(ho(r.predicate))t.set(r.subject,r.object);else if(nx(r.predicate))s.set(r.subject,r.object);else{let i=ix[String(r.predicate).trim().toLowerCase()];if(!i)continue;let a=Number(r.object);Number.isFinite(a)&&n.set(r.subject,{kind:i,n:a})}let o=[];for(let[r,{kind:i,n:a}]of n){if(t.get(r)!==rx)continue;let l=s.get(r);l&&o.push({restriction:r,kind:i,n:a,onClass:l})}return o.sort((r,i)=>r.restriction.localeCompare(i.restriction)),o}function vf(e,t,{budget:n=50,focus:s=null}={}){let o=vn(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=ee(f.property);r.has(p)||r.set(p,[]),r.get(p).push({restriction:f.restriction,target:f.target})}let i=new Set;for(let[f,p]of t||[])f&&p&&i.add(`${f}${Ce}${p}`);let a=s instanceof Set?s.size?s:null:Dn(s),l=(f,p)=>!a||a.has(f)||a.has(p),c=[];for(let[,f]of r)if(!(f.length<2))for(let p of f)for(let m of f){if(p.restriction===m.restriction||p.target===m.target||!o(p.target).has(m.target))continue;let h=`${p.restriction}${Ce}${m.restriction}`;i.has(h)||l(p.restriction,m.restriction)&&c.push([p.restriction,m.restriction,p.target,m.target,h])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,m,h,g]of c)if(!d.has(g)){if(u.length>=n)break;d.add(g),u.push({subject:f,object:p,viaY1:m,viaY2:h})}return u}function $f(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=vn(e),a=r instanceof Set?r.size?r:null:Dn(r),l=f=>!a||a.has(n)||a.has(f),c=new Map;for(let[f,p]of e||[])!f||!p||(c.has(f)||c.set(f,new Set),c.get(f).add(p));let u=new Map((t||[]).map(f=>[f.restriction,f])),d=0;for(let f of[n,...i(n)]){if(d>=o)break;if(d+=1,!!l(f))for(let p of c.get(f)||[]){let m=u.get(p);if(m&&s(m))return{viaClass:f,viaRestriction:p,record:m}}}return null}function lx(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=$f(e,t,n,a=>a.onClass===s&&(a.kind==="exactly"||a.kind==="min")&&a.n>=o,r);return i?{subject:n,object:s,m:o,n:i.record.n,kind:i.record.kind,viaClass:i.viaClass,viaRestriction:i.viaRestriction}:null}function dx(e,t,n,s,o={}){if(!s)return null;let r=$f(e,t,n,i=>i.onClass===s&&i.kind==="max"&&i.n===0,o);return r?{subject:n,object:s,viaClass:r.viaClass,viaRestriction:r.viaRestriction}:null}function px(e,t,n,{budget:s=50,focus:o=null}={}){let r=vn(t),i=new Map;for(let[p,m]of n||[])!p||!m||p===m||(i.has(p)||i.set(p,new Set),i.get(p).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(p));if(!i.size)return[];let a=new Map;for(let[p,m]of e||[])!p||!m||(a.has(p)||a.set(p,new Set),a.get(p).add(m));let l=o instanceof Set?o.size?o:null:Dn(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,m]of a){if(!c(p))continue;let h=[...m].sort();for(let g=0;g<h.length;g+=1)for(let b=g+1;b<h.length;b+=1){let[y,w]=[h[g],h[b]],$=[y,...r(y)],j=[w,...r(w)],v=null;for(let k of $){let _=i.get(k);if(_){for(let R of j)if(_.has(R)){v=[k,R];break}if(v)break}}if(!v)continue;let x=`${p}${Ce}${y}${Ce}${w}`;d.has(x)||(d.add(x),u.push([p,y,w,v[0],v[1]]))}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[1].localeCompare(m[1])||p[2].localeCompare(m[2]));let f=[];for(let[p,m,h,g,b]of u){if(f.length>=s)break;f.push({subject:p,classA:m,classB:h,viaA:g,viaB:b})}return f}async function fx(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=hi,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=uf(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),m=p.filter(E=>rs(E.predicate)).map(E=>[E.subject,E.object]),h=p.filter(E=>Is(E.predicate)).map(E=>[E.subject,E.object]),g=p.filter(E=>Cs(E.predicate)).map(E=>[E.subject,E.object]),b=new Map,y=new Map,w=[];for(let E of p){let ue=String(E.predicate||"").trim().toLowerCase();ho(E.predicate)?b.set(E.subject,E.object):ur(E.predicate)?y.set(E.subject,E.object):_c.has(ue)||w.push([E.subject,E.predicate,E.object])}let $=[];for(let[E,ue]of b){let je=y.get(E);je&&$.push({restriction:E,property:ue,target:je})}let j=Dn(s),v=o&&j?vc(p,[...j]):j,x=v===null&&d?await a.loadSyllogiseState(e):null,k=new Set(p.map(E=>E.id)),_=Array.isArray(x?.factIds)?x.factIds.filter(E=>!k.has(E)):[],R=x&&Array.isArray(x.factIds)&&!_.length&&!i?"delta":"full",S=R==="delta"?new Set(x.factIds):null,A=R==="delta"?p.filter(E=>!S.has(E.id)):p,L=A.length,T=new Map;for(let E of p)T.set(`${E.subject}${Ce}${E.predicate}${Ce}${E.object}`,E.trust);let P=(E,ue,je)=>T.get(`${E}${Ce}${ue}${Ce}${je}`),V=(E,ue,je)=>T.has(`${E}${Ce}${ue}${Ce}${je}`),Y=E=>E.filter(ue=>typeof ue=="number"),te=R==="delta"&&!A.length,F=R==="delta"?A.filter(E=>rs(E.predicate)).map(E=>[E.subject,E.object]):[],D=R==="delta"?F.length?gf(m,F,{depth:t,budget:n,focus:v}):[]:hf(m,{depth:t,budget:n,focus:v}),B=m.concat(D.map(E=>[E.subject,E.object])),W=v,C=null;if(R==="delta"&&!te){let E=p.concat(D.map(je=>({subject:je.subject,predicate:De,object:je.object}))),ue=[];for(let je of A)ue.push(je.subject,je.object);C=vc(E,ue),W=C}let O=E=>!C||C.has(E),I=C?h.filter(([E,ue])=>O(E)||O(ue)):h,N=new Set;if(C)for(let E of A)Cs(E.predicate)&&(N.add(E.subject),N.add(E.object));let q=C&&N.size?vn(B):null,U=C?h.filter(([E,ue])=>O(E)||O(ue)||q&&[...q(ue)].some(je=>N.has(je))):h,re=new Set;if(C){for(let E of A)if(ho(E.predicate)||ur(E.predicate)){let ue=b.get(E.subject);ue&&re.add(ee(ue))}}let oe=C?w.filter(([E,ue,je])=>O(E)||O(je)||re.has(ee(ue))):w,H=Math.max(0,n-D.length),X=H>0&&!te?bf(I,B,{budget:H,focus:W,presentTypeEdges:h}):[],se=Math.max(0,n-D.length-X.length),J=se>0&&!te?wf(U,B,g,{budget:se,focus:W}):[],ae=Math.max(0,n-D.length-X.length-J.length),ne=ae>0&&$.length&&!te?yf(oe,h,B,$,{budget:ae,focus:W}):[],_e=Math.max(0,n-D.length-X.length-J.length-ne.length),Le=_e>0&&$.length>1&&!te?vf($,B,{budget:_e,focus:W}):[],Q=new Map($.map(E=>[E.restriction,E])),ge=[...D.map(E=>({subject:E.subject,predicate:De,object:E.object,provenance:pf,justification:[[he(E.subject,De,E.via),he(E.via,De,E.object)]]})),...X.map(E=>({subject:E.subject,predicate:At,object:E.object,provenance:mf,justification:[[he(E.subject,At,E.via),he(E.via,De,E.object)]]})),...J.map(E=>{let ue=V(E.viaClass,mo,E.object),[je,kn]=ue?[E.viaClass,E.object]:[E.object,E.viaClass],Ys=Y([P(E.subject,At,E.viaType),P(je,mo,kn),...E.viaClass!==E.viaType?[P(E.viaType,De,E.viaClass)]:[]]);return{subject:E.subject,predicate:mo,object:E.object,provenance:xc,justification:[[he(E.subject,At,E.viaType),he(je,mo,kn),...E.viaClass!==E.viaType?[he(E.viaType,De,E.viaClass)]:[]]],...Ys.length?{premiseTrusts:Ys,ruleConfidence:kc}:{}}}),...ne.map(E=>{let ue=Y([P(E.subject,E.viaProperty,E.viaValue),P(E.viaValue,At,E.viaType),P(E.object,wn,E.viaPropertyKey),P(E.object,yn,E.viaTarget),...E.viaType!==E.viaTarget?[P(E.viaType,De,E.viaTarget)]:[]]);return{subject:E.subject,predicate:At,object:E.object,provenance:Sc,justification:[[he(E.subject,E.viaProperty,E.viaValue),he(E.viaValue,At,E.viaType),he(E.object,wn,E.viaPropertyKey),he(E.object,yn,E.viaTarget),...E.viaType!==E.viaTarget?[he(E.viaType,De,E.viaTarget)]:[]]],...ue.length?{premiseTrusts:ue,ruleConfidence:jc}:{}}}),...Le.map(E=>{let ue=Q.get(E.subject),je=Q.get(E.object),kn=Y([ue&&P(E.subject,wn,ue.property),P(E.subject,yn,E.viaY1),je&&P(E.object,wn,je.property),P(E.object,yn,E.viaY2),P(E.viaY1,De,E.viaY2)]);return{subject:E.subject,predicate:De,object:E.object,provenance:Ac,justification:[[...ue?[he(E.subject,wn,ue.property)]:[],he(E.subject,yn,E.viaY1),...je?[he(E.object,wn,je.property)]:[],he(E.object,yn,E.viaY2),he(E.viaY1,De,E.viaY2)]],...kn.length?{premiseTrusts:kn,ruleConfidence:Tc}:{}}})],$e=ge.map(E=>({id:he(E.subject,E.predicate,E.object),subject:E.subject,predicate:E.predicate,object:E.object,environments:E.justification,write:E})),pe=kf(p.concat($e.map(E=>({id:E.id,subject:E.subject,predicate:E.predicate,object:E.object})))),Ie=new Map(p.map(E=>[E.id,E])),G=E=>rs(E)||Is(E)||Cs(E),ce=E=>R!=="delta"||C!==null&&(C.has(E.subject)||C.has(E.object)),le=p.filter(E=>G(E.predicate)&&xf(E.provenance)&&lr(E).length<r&&ce(E)).map(E=>({id:E.id,subject:E.subject,predicate:E.predicate,object:E.object,environments:lr(E),provenance:E.provenance})),Ne=[...$e,...le].sort((E,ue)=>E.subject.localeCompare(ue.subject)||E.predicate.localeCompare(ue.predicate)||E.object.localeCompare(ue.object)),jt=0,Ke=!1,un=0;for(let E of Ne){if(un>=n){Ke=!0;break}un+=1;let ue=pe(E,{maxEnvironments:r+1}),{kept:je,truncated:kn}=hx(E.environments,ue,r);if(kn&&(Ke=!0),!(je.length<=E.environments.length)){if(jt+=je.length-E.environments.length,E.write){E.write.justification=je;continue}ge.push({subject:E.subject,predicate:E.predicate,object:E.object,justification:je,...Ef(E.provenance,je,Ys=>Ie.get(Ys)?.trust)||{}})}}let{ids:Ht}=await u(e,ge),Bt=[],It=0;for(let E of D)Bt.push({id:Ht[It],subject:E.subject,object:E.object,via:E.via,rule:df}),It+=1;for(let E of X)Bt.push({id:Ht[It],subject:E.subject,object:E.object,via:E.via,rule:ff}),It+=1;for(let E of J)Bt.push({id:Ht[It],subject:E.subject,object:E.object,via:E.viaClass,rule:$c}),It+=1;for(let E of ne)Bt.push({id:Ht[It],subject:E.subject,object:E.object,via:E.viaValue,rule:Ec}),It+=1;for(let E of Le)Bt.push({id:Ht[It],subject:E.subject,object:E.object,via:E.viaY1,rule:Rc}),It+=1;let Cr=Bt.length>=n;if(v===null&&d&&!Cr){let E=new Set(k);for(let ue of Ht)E.add(ue);await a.saveSyllogiseState(e,{version:1,factIds:[...E].sort(),completedAt:new Date().toISOString()})}return{derived:Bt,count:Bt.length,budget:n,depth:t,truncated:Cr,mode:R,deltaSize:L,environmentsAdded:jt,alternatesTruncated:Ke}}function xf(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function mx(e){let t=[],n=new Map,s=new Map,o=new Map,r=new Map,i=new Map;for(let u of e){let d=String(u.predicate||"").trim().toLowerCase();rs(u.predicate)?t.push([u.subject,u.object]):Is(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Cs(u.predicate)?(s.has(u.subject)||s.set(u.subject,new Set),s.get(u.subject).add(u.object),s.has(u.object)||s.set(u.object,new Set),s.get(u.object).add(u.subject)):ho(u.predicate)?o.set(u.subject,u.object):ur(u.predicate)?r.set(u.subject,u.object):_c.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([ee(u.predicate),u.object]))}let a=vn(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),f=r.get(u);return d&&f?{property:ee(d),target:f}:null};return u=>{if(rs(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),f=c(u.object);return!!(d&&f&&d.property===f.property&&l(d.target,f.target))}if(Is(u.predicate)){for(let f of n.get(u.subject)||[])if(l(f,u.object))return!0;let d=c(u.object);if(d){for(let[f,p]of i.get(u.subject)||[])if(f===d.property){for(let m of n.get(p)||[])if(m===d.target||l(m,d.target))return!0}}return!1}if(Cs(u.predicate)){for(let d of n.get(u.subject)||[])for(let f of[d,...a(d)])if(s.get(f)?.has(u.object))return!0;return!1}return!0}}function kf(e){let t=new Set,n=[],s=new Map,o=new Map,r=new Set,i=new Map,a=new Map,l=new Map,c=new Map;for(let p of e){if(!p||!p.subject||!p.predicate||!p.object)continue;p.id&&t.add(p.id);let m=String(p.predicate||"").trim().toLowerCase();rs(p.predicate)?(n.push([p.subject,p.object]),s.has(p.subject)||s.set(p.subject,new Set),s.get(p.subject).add(p.object)):Is(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Cs(p.predicate)?(r.add(`${p.subject}${Ce}${p.object}`),i.has(p.subject)||i.set(p.subject,new Set),i.get(p.subject).add(p.object),i.has(p.object)||i.set(p.object,new Set),i.get(p.object).add(p.subject)):ho(p.predicate)?a.set(p.subject,p.object):ur(p.predicate)?l.set(p.subject,p.object):_c.has(m)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=vn(n),d=p=>s.get(p)||new Set,f=p=>{let m=a.get(p),h=l.get(p);return m&&h?{property:m,propertyKey:ee(m),target:h}:null};return(p,{maxEnvironments:m=hi}={})=>{let h=[],g=new Set,b=y=>{if(h.length>=m||p.id&&y.includes(p.id)||!y.every($=>t.has($)))return;let w=[...y].sort().join(" ");g.has(w)||(g.add(w),h.push(y))};if(rs(p.predicate)){for(let y of[...d(p.subject)].sort()){if(h.length>=m)break;y===p.subject||y===p.object||d(y).has(p.object)&&b([he(p.subject,De,y),he(y,De,p.object)])}if(h.length<m){let y=f(p.subject),w=f(p.object);y&&w&&y.propertyKey===w.propertyKey&&y.target!==w.target&&d(y.target).has(w.target)&&b([he(p.subject,wn,y.property),he(p.subject,yn,y.target),he(p.object,wn,w.property),he(p.object,yn,w.target),he(y.target,De,w.target)])}return h}if(Is(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(h.length>=m)break;w!==p.object&&d(w).has(p.object)&&b([he(p.subject,At,w),he(w,De,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([$])=>ee($)===y.propertyKey).sort(($,j)=>$[0].localeCompare(j[0])||$[1].localeCompare(j[1]));for(let[$,j]of w){if(h.length>=m)break;for(let v of[...o.get(j)||[]].sort()){if(h.length>=m)break;v!==y.target&&!d(v).has(y.target)||b([he(p.subject,$,j),he(j,At,v),he(p.object,wn,y.propertyKey),he(p.object,yn,y.target),...v!==y.target?[he(v,De,y.target)]:[]])}}}return h}if(Cs(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let $ of[w,...u(w)])(i.get($)||new Set).has(p.object)&&y.push([w,$]);y.sort((w,$)=>w[0].localeCompare($[0])||w[1].localeCompare($[1]));for(let[w,$]of y){if(h.length>=m)break;let j=r.has(`${$}${Ce}${p.object}`),[v,x]=j?[$,p.object]:[p.object,$];b([he(p.subject,At,w),he(v,mo,x),...$!==w?[he(w,De,$)]:[]])}return h}return h}}function hx(e,t,n){let s=[],o=new Set,r=!1;for(let i of[...e||[],...t||[]]){if(!Array.isArray(i)||!i.length)continue;let a=[...i].sort().join(" ");if(!o.has(a)){if(s.length>=n){r=!0;continue}o.add(a),s.push(i)}}return{kept:s,truncated:r}}function Ef(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=gx.get(i);if(a!==void 0){s=a;break}}if(s===void 0)return null;let o=null,r=-1;for(let i of t||[]){let a=i.map(c=>n(c)).filter(c=>typeof c=="number");if(a.length!==i.length)continue;let l=Math.min(...a);l>r&&(r=l,o=a)}return o?{premiseTrusts:o,ruleConfidence:s}:null}async function bx(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=hi,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=uf(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=ee(t),f=ee(n),p=he(d,De,f),m=await a(e),h=l(m),g=new Map(h.map(R=>[R.id,R]));if(!g.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let b=h.filter(R=>lr(R).length&&xf(R.provenance)),y=new Map;for(let R of b)for(let S of lr(R))for(let A of S)y.has(A)||y.set(A,new Set),y.get(A).add(R.id);let w=new Set([p]),$=[p],j=new Map,v=!1,x=0,k=[p];for(;x<o;x+=1){let R=new Set;for(let te of k)for(let F of y.get(te)||[])w.has(F)||R.add(F);let S=[...R].map(te=>g.get(te)).sort((te,F)=>te.subject.localeCompare(F.subject)||te.predicate.localeCompare(F.predicate)||te.object.localeCompare(F.object));if(!S.length)break;let A=h.filter(te=>!w.has(te.id)&&!R.has(te.id)),L=new Set(A.map(te=>te.id)),T=kf(A),P=mx(A),V=!1,Y=!1;k=[];for(let te of S){if(w.size>=s){Y=!0;break}let F=lr(te),D=F.filter(W=>W.every(C=>L.has(C)));if(D.length){D.length!==F.length&&j.set(te.id,D);continue}let B=T(te,{maxEnvironments:r});if(B.length){j.set(te.id,B);continue}P(te)||(w.add(te.id),$.push(te.id),k.push(te.id),V=!0)}if(Y){v=!0;break}if(!V)break}!v&&x>=o&&(v=b.some(R=>!w.has(R.id)&&R.justification.some(S=>w.has(S))));let{removed:_}=await c(e,$);if(u){let R=[...j.entries()].filter(([S])=>!w.has(S)).sort((S,A)=>S[0].localeCompare(A[0])).map(([S,A])=>{let L=g.get(S);return{subject:L.subject,predicate:L.predicate,object:L.object,justification:A,...Ef(L.provenance,A,T=>g.get(T)?.trust)||{}}});R.length&&await u(e,R)}return{retracted:_,count:_.length,budget:s,depth:o,truncated:v,found:!0}}function Cc(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=new Map;for(let[c,u]of s||[])!c||!u||c===u||(i.has(c)||i.set(c,new Set),i.get(c).add(u));let a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:At,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:De,object:c}]});let l=new Set([e]);for(let c=1;c<=o&&a.length;c+=1){for(let{node:d,path:f}of a)if(r.has(d))return f;if(c===o)break;let u=[];for(let{node:d,path:f}of a)if(!l.has(d)){l.add(d);for(let p of i.get(d)||[])l.has(p)||u.push({node:p,path:[...f,{subject:d,predicate:De,object:p}]})}a=u}return null}var De,df,pf,At,ff,mf,mo,$c,xc,kc,wn,yn,Ec,Sc,jc,hi,Ce,rs,Is,Cs,ho,ur,nx,_c,rx,ix,Rc,Ac,Tc,cx,ux,lr,gx,Ft=M(()=>{Zt();De="rdfs:subClassOf",df="subClassOf",pf=`entailed:${df}`,At="rdf:type",ff="type",mf=`entailed:${ff}`,mo="owl:disjointWith",$c="disjointWith",xc=`entailed:${$c}`,kc=.95,wn="owl:onProperty",yn="owl:someValuesFrom",Ec="someValuesFrom",Sc=`entailed:${Ec}`,jc=.95,hi=4,Ce="\u241F",rs=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Is=e=>String(e||"").trim().toLowerCase()==="rdf:type",Cs=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",ho=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",ur=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",nx=e=>String(e||"").trim().toLowerCase()==="owl:onclass",_c=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);rx="has",ix={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};Rc="someValuesFromSubsumption",Ac=`entailed:${Rc}`,Tc=.95;cx=.95;ux=.95;lr=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);gx=new Map([[xc,kc],[Sc,jc],[Ac,Tc]])});function yo(e){let t=String(e||""),n=Sf.get(t);return n||(t.startsWith(Ic)?go+t.slice(Ic.length):t)}function jf(e){let t=String(e||""),n=wx.get(t);return n||(t.startsWith(go)?Ic+t.slice(go.length):null)}function Af(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Cc(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function wi(e,t,n,{maxHops:s=3}={}){let o=wo(e),r=wo(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=Rf(i),c=i.filter(b=>(b.predicate===bi||b.predicate===bo)&&r.has(b.object)),u=[];for(let b of c){let y=b.predicate===bo?"negative":"positive";if(o.has(b.subject)){u.push({fact:b,polarity:y,hops:0,chain:null});continue}let w=Af(o,b.subject,a,l,s);w&&w.length&&u.push({fact:b,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Lc(o,r,i,{maxHops:s})};u.sort((b,y)=>b.hops-y.hops||(y.fact.trust||0)-(b.fact.trust||0));let d=u[0].hops,f=u.filter(b=>b.hops===d),p=f.filter(b=>b.polarity==="positive").map(b=>b.fact),m=f.filter(b=>b.polarity==="negative").map(b=>b.fact),h=m.length&&!p.length?"negative":"positive",g=u.find(b=>b.hops>d&&b.polarity!==h)||null;return{verdict:p.length&&m.length?"both":m.length?"no":"yes",hops:d,positive:p,negative:m,chain:u[0].chain,overrides:g?{fact:g.fact,chain:g.chain}:null,baseRate:null}}function Lc(e,t,n,{maxHops:s=3}={}){let o=wo(e),r=wo(t),i=Array.isArray(n)?n:[],a=i.filter(h=>h.predicate===De||h.predicate===At),l=a.filter(h=>o.has(h.subject)).map(h=>h.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(h=>h.object===c&&!o.has(h.subject)).map(h=>h.subject))],d=h=>{let g=i.find(b=>b.subject===h&&r.has(b.object)&&(b.predicate===bi||b.predicate===bo));return g?{name:h,polarity:g.predicate===bo?"negative":"positive",fact:g}:{name:h,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassEdges:m}=Rf(i);return{klass:c,kinds:u.length,positive:f.filter(h=>h.polarity==="positive"),negative:f.filter(h=>h.polarity==="negative"),unknown:f.filter(h=>h.polarity==="unknown"),chain:Af(o,c,p,m,s)}}function Nc(e,t,{exclude:n=[],maxHops:s=3}={}){let o=wo(e),r=wo(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==bi||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),wi(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(yx)}var go,Ic,gi,Sf,wx,_f,bi,bo,Oc,yx,wo,Rf,Mc=M(()=>{Ft();go="mgxneg:",Ic="mgx:",gi="mgxneg:subClassOf",Sf=new Map([[De,gi]]),wx=new Map([...Sf].map(([e,t])=>[t,e]));_f=e=>String(e||"").startsWith(go),bi="mgx:capableOf",bo=yo(bi),Oc=6,yx=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),wo=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),Rf=e=>({typeEdges:e.filter(t=>t.predicate===At).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===De).map(t=>[t.subject,t.object])})});function vo(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function kx(e,t){(!e?.class||!vx.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function Ex(e,t){for(let s of["rdf:subject","rdf:predicate","rdf:object"])yi(vo(e,s))||t.push(`a Fact needs a non-empty ${s}`);for(let s of["rdf:subject","rdf:object"]){let o=vo(e,s);o!==void 0&&xx.test(o)&&t.push(`a Fact's ${s} must be a single term, not text spanning a sentence boundary (got ${JSON.stringify(o)})`)}let n=vo(e,"mgx:factProvenance");n!==void 0&&!yi(n)&&t.push("mgx:factProvenance, when present, must be non-empty")}function Sx(e,t){yi(vo(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=vo(e,"mgx:ruleKind");if(!n||!Tf.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...Tf].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of $x[n])yi(vo(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function jx(e){let t=[];return kx(e,t),e?.class==="Fact"&&Ex(e,t),e?.class==="Rule"&&Sx(e,t),{ok:t.length===0,violations:t}}function Pc(e){let t=jx(e);if(!t.ok){let n=new Error(`SHACL validation failed for ${e?.class} "${e?.id}": ${t.violations.join(" | ")}`);throw n.violations=t.violations,n}}var vx,Tf,$x,xx,yi,Cf=M(()=>{vx=new Set(["Utterance","Fact","Session","Source","Rule"]),Tf=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),$x={compose2:["mgx:ruleBase1","mgx:ruleBase2"],filter:["mgx:ruleBase1","mgx:ruleFilterProperty"],recursive:["mgx:ruleBaseCase","mgx:ruleRecStep"],"action-signature":["mgx:ruleActionSubjectClass","mgx:ruleActionTargetClass"],"action-precond":["mgx:ruleActionPrecondShape","mgx:ruleActionPrecondPredicate","mgx:ruleActionPrecondRole","mgx:ruleActionPrecondScope"],"action-effect":["mgx:ruleActionEffectPredicate","mgx:ruleActionEffectSubject"],"action-constraint":["mgx:ruleActionConstraintLeft","mgx:ruleActionConstraintRight","mgx:ruleActionConstraintGuard"]},xx=/[.!?]\s+\w/;yi=e=>typeof e=="string"&&e.trim().length>0});var If={};En(If,{access:()=>Ax,appendFile:()=>Ix,basename:()=>Kx,copyFile:()=>Dx,createInterface:()=>Zx,createReadStream:()=>Bx,createRequire:()=>_x,createWriteStream:()=>Ux,default:()=>tk,dirname:()=>qx,existsSync:()=>Wx,fileURLToPath:()=>Xx,isAbsolute:()=>Hx,join:()=>Gx,mkdir:()=>Ox,mkdtemp:()=>Lx,randomBytes:()=>Jx,readFile:()=>Tx,readFileSync:()=>Rx,readdir:()=>zx,rename:()=>Nx,resolve:()=>Vx,rm:()=>Px,sep:()=>Yx,spawnSync:()=>Qx,stat:()=>Fx,tmpdir:()=>ek,unlink:()=>Mx,writeFile:()=>Cx});var it,_x,Rx,Ax,Tx,Cx,Ix,Ox,Lx,Nx,Mx,Px,Fx,Dx,zx,Bx,Ux,Wx,Gx,qx,Vx,Hx,Kx,Yx,Xx,Jx,Qx,Zx,ek,tk,Of=M(()=>{it=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},_x=it("createRequire"),Rx=it("readFileSync"),Ax=it("access"),Tx=it("readFile"),Cx=it("writeFile"),Ix=it("appendFile"),Ox=it("mkdir"),Lx=it("mkdtemp"),Nx=it("rename"),Mx=it("unlink"),Px=it("rm"),Fx=it("stat"),Dx=it("copyFile"),zx=it("readdir"),Bx=it("createReadStream"),Ux=it("createWriteStream"),Wx=()=>!1,Gx=(...e)=>e.join("/"),qx=e=>String(e).replace(/\/[^/]*$/,""),Vx=(...e)=>e.join("/"),Hx=e=>String(e).startsWith("/"),Kx=e=>String(e).split("/").pop(),Yx="/",Xx=e=>String(e),Jx=it("randomBytes"),Qx=it("spawnSync"),Zx=it("createInterface"),ek=()=>"/tmp",tk={}});var nk,dr,Fc=M(()=>{nk=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,dr=class e extends Date{#t=!1;#n=!1;#e=null;constructor(t){let n=!0,s=!0,o="Z";if(typeof t=="string"){let r=t.match(nk);r?(r[1]||(n=!1,t=`0000-01-01T${t}`),s=!!r[2],s&&t[10]===" "&&(t=t.replace(" ","T")),r[2]&&+r[2]>23?t="":(o=r[3]||null,t=t.toUpperCase(),!o&&s&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=n,this.#n=s,this.#e=o)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,n="Z"){let s=new e(t);return s.#e=n,s}static wrapAsLocalDateTime(t){let n=new e(t);return n.#e=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#t=!1,n.#e=null,n}}});function sk(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function ok(e,t,n){let s=e.split(/\r\n|\n|\r/g),o="",r=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=s[i-1];a&&(o+=i.toString().padEnd(r," "),o+=": ",o+=a,o+=`
85
+ `),tier:g,topup:y}}async function Sc(e,{config:t,source:n,tel:s}){return(await Ef(e,{config:t,source:n,tel:s})).text}var jc=L(()=>{kt();ze();Mt();fi();qo();Ie();os();gi();bi();Ge();Sc.ownsGraphLoad=!0});function Sf(e,{graph:t,svc:n}){let{match:s}=vt(n,et(e,"symbol"),"symbol");return Yd(co(t,s))}var jf=L(()=>{Ie();Ge()});function wi(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function dr(e){return wi(e).toString(16).padStart(8,"0")}function Gx(e){let t=new TextEncoder().encode(String(e)),n=t.length*8,s=new Uint8Array((t.length+8>>6)+1<<6);s.set(t),s[t.length]=128;let o=new DataView(s.buffer);o.setUint32(s.length-8,Math.floor(n/4294967296)),o.setUint32(s.length-4,n>>>0);let r=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64),a=(u,d)=>u>>>d|u<<32-d;for(let u=0;u<s.length;u+=64){for(let w=0;w<16;w+=1)i[w]=o.getUint32(u+w*4);for(let w=16;w<64;w+=1){let $=a(i[w-15],7)^a(i[w-15],18)^i[w-15]>>>3,j=a(i[w-2],17)^a(i[w-2],19)^i[w-2]>>>10;i[w]=i[w-16]+$+i[w-7]+j>>>0}let[d,f,p,m,h,g,b,y]=r;for(let w=0;w<64;w+=1){let $=a(h,6)^a(h,11)^a(h,25),j=h&g^~h&b,v=y+$+j+Wx[w]+i[w]>>>0,E=a(d,2)^a(d,13)^a(d,22),k=d&f^d&p^f&p,_=E+k>>>0;y=b,b=g,g=h,h=m+v>>>0,m=p,p=f,f=d,d=v+_>>>0}r[0]=r[0]+d>>>0,r[1]=r[1]+f>>>0,r[2]=r[2]+p>>>0,r[3]=r[3]+m>>>0,r[4]=r[4]+h>>>0,r[5]=r[5]+g>>>0,r[6]=r[6]+b>>>0,r[7]=r[7]+y>>>0}let l=new Uint8Array(32),c=new DataView(l.buffer);for(let u=0;u<8;u+=1)c.setUint32(u*4,r[u]);return l}function Vx(e,t){let n=Gx(e),s="";for(let o=0;o<t;o+=1)s+=n[o].toString(16).padStart(2,"0");return s}function X(e){let t=Fn(e);return t=t.replace(/^\/c\/[a-z]{2,3}\//i,""),t=t.replace(/^[a-z][\w.-]*:/i,""),t=t.replace(/_/g," ").replace(/\s+/g," ").trim(),t=t.replace(/^(?:the|an?)\s+/i,""),t.toLowerCase()}function Dn(e){let t=Fn(e);return Hx.get(t)??t}function ge(e,t,n){return pr(X(e),Dn(t),X(n))}var Wx,qx,Fn,Hx,pr,Yt=L(()=>{Wx=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);qx=2e3,Fn=e=>String(e??"").replace(/\s+/g," ").trim().slice(0,qx);Hx=new Map([["mgx:cause","mgx:causes"],["mgx:desire","mgx:desires"],["mgx:want","mgx:desires"],["mgx:require","mgx:hasPrerequisite"],["mgx:involve","mgx:hasSubevent"],["mgx:used-for","mgx:usedFor"],["mgx:made-of","mgx:madeOf"]]);pr=(e,t,n)=>`fact:${Vx(`${e}\0${t}\0${n}`,8)}`});var on={};Sn(on,{CARDINALITY_RULE_CONFIDENCE:()=>ek,CAX_DW_RULE:()=>Rc,CAX_DW_RULE_CONFIDENCE:()=>Tc,CAX_MAXC0_RULE_CONFIDENCE:()=>nk,CLS_SVF1_RULE:()=>Cc,CLS_SVF1_RULE_CONFIDENCE:()=>Ic,DEFAULT_MAX_ENVIRONMENTS:()=>yi,DISJOINT_PREDICATE:()=>yo,ENTAILED_DISJOINT_PROVENANCE:()=>Ac,ENTAILED_PROVENANCE:()=>Af,ENTAILED_SCM_SVF_PROVENANCE:()=>Mc,ENTAILED_SVF1_PROVENANCE:()=>Oc,ENTAILED_TYPE_PROVENANCE:()=>Cf,ON_PROPERTY_PREDICATE:()=>vn,SCM_SVF_RULE:()=>Nc,SCM_SVF_RULE_CONFIDENCE:()=>Pc,SOME_VALUES_FROM_PREDICATE:()=>$n,SUBCLASS_PREDICATE:()=>Fe,TYPE_PREDICATE:()=>Tt,buildCardinalityRestrictions:()=>Zx,buildRelevanceFrontier:()=>_c,deriveDisjointViolations:()=>Nf,deriveSomeValuesFromApplication:()=>Mf,deriveSomeValuesFromSubsumption:()=>Pf,deriveSubClassClosure:()=>Of,deriveSubClassClosureDelta:()=>If,deriveTypePropagation:()=>Lf,entailedTrustFrom:()=>Yx,findConsistencyViolations:()=>ok,findIsaChain:()=>Fc,proveCardinalityAtLeast:()=>tk,proveMaxCardinalityZeroDenial:()=>sk,retractSubClassOf:()=>lk,syllogise:()=>rk});function _f(e,t,n){for(let s of t)if(typeof e?.[s]!="function")throw new TypeError(`${n} needs a store option carrying { ${t.join(", ")} } (memory/core.mjs's read/write functions) \u2014 missing ${s}`);return e}function Yx(e,t=1){let n=(Array.isArray(e)?e:[]).filter(o=>typeof o=="number");if(!n.length)return null;let s=Math.max(0,Math.min(1,Math.min(...n)*t));return Number(s.toFixed(6))}function zn(e){if(!e)return null;let t=e instanceof Set?[...e]:Array.isArray(e)?e:[],n=new Set;for(let s of t){let o=X(s);o&&n.add(o)}return n.size?n:null}function Of(e,{depth:t=32,budget:n=50,focus:s=null}={}){let o=new Set,r=new Map;for(let[u,d]of e||[])!u||!d||u===d||(o.add(`${u}${Le}${d}`),r.has(u)||r.set(u,new Set),r.get(u).add(d));let i=s instanceof Set?s.size?s:null:zn(s),a=(u,d,f)=>!i||i.has(u)||i.has(d)||i.has(f),l=[],c=new Set;for(let u=0;u<t;u+=1){let d=[];for(let[p,m]of r)for(let h of m){let g=r.get(h);if(g)for(let b of g){if(p===b)continue;let y=`${p}${Le}${b}`;o.has(y)||c.has(y)||a(p,h,b)&&d.push([p,h,b,y])}}if(!d.length)break;d.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let f=!1;for(let[p,m,h,g]of d)if(!c.has(g)){if(l.length>=n)break;c.add(g),l.push({subject:p,object:h,via:m}),r.has(p)||r.set(p,new Set),r.get(p).add(h),f=!0}if(l.length>=n||!f)break}return l}function If(e,t,{depth:n=32,budget:s=50,focus:o=null}={}){let r=new Set,i=new Map,a=new Map;for(let[m,h]of e||[])!m||!h||m===h||(r.add(`${m}${Le}${h}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),a.has(h)||a.set(h,new Set),a.get(h).add(m));let l=[],c=new Set;for(let[m,h]of t||[]){if(!m||!h||m===h)continue;let g=`${m}${Le}${h}`;c.has(g)||(c.add(g),l.push([m,h]))}let u=o instanceof Set?o.size?o:null:zn(o),d=(m,h,g)=>!u||u.has(m)||u.has(h)||u.has(g),f=[],p=new Set;for(let m=0;m<n&&l.length;m+=1){let h=[],g=(w,$,j)=>{if(w===j)return;let v=`${w}${Le}${j}`;r.has(v)||p.has(v)||d(w,$,j)&&h.push([w,$,j,v])};for(let[w,$]of l){for(let j of i.get($)||[])g(w,$,j);for(let j of a.get(w)||[])g(j,w,$)}if(!h.length)break;h.sort((w,$)=>w[0].localeCompare($[0])||w[2].localeCompare($[2])||w[1].localeCompare($[1]));let b=!1,y=[];for(let[w,$,j,v]of h)if(!p.has(v)){if(f.length>=s)break;p.add(v),f.push({subject:w,object:j,via:$}),i.has(w)||i.set(w,new Set),i.get(w).add(j),a.has(j)||a.set(j,new Set),a.get(j).add(w),y.push([w,j]),b=!0}if(f.length>=s||!b)break;l=y}return f}function xn(e){let t=new Map;for(let[s,o]of e||[])!s||!o||s===o||(t.has(s)||t.set(s,new Set),t.get(s).add(o));let n=new Map;return s=>{if(n.has(s))return n.get(s);let o=new Set,r=[...t.get(s)||[]];for(;r.length;){let i=r.pop();if(!o.has(i)){o.add(i);for(let a of t.get(i)||[])o.has(a)||r.push(a)}}return n.set(s,o),o}}function Xx(e){return xn((e||[]).map(([t,n])=>[n,t]))}function _c(e,t){let n=[],s=[],o=new Map,r=new Map;for(let c of e||[])!c||!c.subject||!c.predicate||!c.object||(as(c.predicate)?n.push([c.subject,c.object]):Ls(c.predicate)?s.push([c.subject,c.object]):vo(c.predicate)?o.set(c.subject,c.object):mr(c.predicate)&&r.set(c.subject,c.object));let i=Xx(n),a=new Set;for(let c of t||[]){let u=X(c);if(u){a.add(u);for(let d of i(u))a.add(d)}}let l=new Set(a);for(let[c,u]of s)a.has(u)&&l.add(c);for(let[c,u]of r)o.has(c)&&a.has(u)&&l.add(c);return l}function Lf(e,t,{budget:n=50,focus:s=null,presentTypeEdges:o=e}={}){let r=xn(t),i=new Set,a=new Set;for(let[p,m]of o||[])p&&m&&i.add(`${p}${Le}${m}`);let l=s instanceof Set?s.size?s:null:zn(s),c=(p,m,h)=>!l||l.has(p)||l.has(m)||l.has(h),u=[];for(let[p,m]of e||[]){if(!p||!m)continue;let h=`${p}${Le}${m}`;if(!a.has(h)){a.add(h);for(let g of r(m)){if(g===m||g===p)continue;let b=`${p}${Le}${g}`;i.has(b)||c(p,m,g)&&u.push([p,m,g,b])}}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[2].localeCompare(m[2])||p[1].localeCompare(m[1]));let d=[],f=new Set;for(let[p,m,h,g]of u)if(!f.has(g)){if(d.length>=n)break;f.add(g),d.push({subject:p,object:h,via:m})}return d}function Nf(e,t,n,{budget:s=50,focus:o=null}={}){let r=xn(t),i=new Map,a=new Set;for(let[m,h]of n||[])!m||!h||m===h||(a.add(`${m}${Le}${h}`),a.add(`${h}${Le}${m}`),i.has(m)||i.set(m,new Set),i.get(m).add(h),i.has(h)||i.set(h,new Set),i.get(h).add(m));if(!i.size)return[];let l=new Set,c=o instanceof Set?o.size?o:null:zn(o),u=(m,h,g)=>!c||c.has(m)||c.has(h)||c.has(g),d=[];for(let[m,h]of e||[]){if(!m||!h)continue;let g=`${m}${Le}${h}`;if(!l.has(g)){l.add(g);for(let b of[h,...r(h)]){let y=i.get(b);if(y)for(let w of y){if(w===m)continue;let $=`${m}${Le}${w}`;a.has($)||u(m,h,w)&&d.push([m,h,b,w,$])}}}}d.sort((m,h)=>m[0].localeCompare(h[0])||m[3].localeCompare(h[3])||m[2].localeCompare(h[2])||m[1].localeCompare(h[1]));let f=[],p=new Set;for(let[m,h,g,b,y]of d)if(!p.has(y)){if(f.length>=s)break;p.add(y),f.push({subject:m,object:b,viaType:h,viaClass:g})}return f}function Mf(e,t,n,s,{budget:o=50,focus:r=null}={}){let i=xn(n),a=new Map;for(let g of s||[]){if(!g||!g.restriction||!g.property||!g.target)continue;let b=`${g.property}${Le}${g.target}`;a.has(b)||a.set(b,new Set),a.get(b).add(g.restriction)}if(!a.size)return[];let l=new Set,c=new Map;for(let[g,b]of t||[])!g||!b||(l.add(`${g}${Le}${b}`),c.has(g)||c.set(g,new Set),c.get(g).add(b));let u=r instanceof Set?r.size?r:null:zn(r),d=(g,b,y)=>!u||u.has(g)||u.has(b)||u.has(y),f=new Set,p=[];for(let[g,b,y]of e||[]){if(!g||!b||!y)continue;let w=X(b),$=`${g}${Le}${w}${Le}${y}`;if(f.has($))continue;f.add($);let j=c.get(y);if(j)for(let v of j)for(let E of[v,...i(v)]){let k=a.get(`${w}${Le}${E}`);if(k)for(let _ of k){if(g===_)continue;let R=`${g}${Le}${_}`;l.has(R)||d(g,y,_)&&p.push([g,b,w,y,v,E,_,R])}}}p.sort((g,b)=>g[0].localeCompare(b[0])||g[6].localeCompare(b[6])||g[1].localeCompare(b[1])||g[3].localeCompare(b[3]));let m=[],h=new Set;for(let[g,b,y,w,$,j,v,E]of p)if(!h.has(E)){if(m.length>=o)break;h.add(E),m.push({subject:g,object:v,viaProperty:b,viaPropertyKey:y,viaValue:w,viaType:$,viaTarget:j})}return m}function Zx(e){let t=new Map,n=new Map,s=new Map;for(let r of e||[])if(!(!r||!r.subject||!r.predicate))if(vo(r.predicate))t.set(r.subject,r.object);else if(Kx(r.predicate))s.set(r.subject,r.object);else{let i=Qx[String(r.predicate).trim().toLowerCase()];if(!i)continue;let a=Number(r.object);Number.isFinite(a)&&n.set(r.subject,{kind:i,n:a})}let o=[];for(let[r,{kind:i,n:a}]of n){if(t.get(r)!==Jx)continue;let l=s.get(r);l&&o.push({restriction:r,kind:i,n:a,onClass:l})}return o.sort((r,i)=>r.restriction.localeCompare(i.restriction)),o}function Pf(e,t,{budget:n=50,focus:s=null}={}){let o=xn(t),r=new Map;for(let f of e||[]){if(!f||!f.restriction||!f.property||!f.target)continue;let p=X(f.property);r.has(p)||r.set(p,[]),r.get(p).push({restriction:f.restriction,target:f.target})}let i=new Set;for(let[f,p]of t||[])f&&p&&i.add(`${f}${Le}${p}`);let a=s instanceof Set?s.size?s:null:zn(s),l=(f,p)=>!a||a.has(f)||a.has(p),c=[];for(let[,f]of r)if(!(f.length<2))for(let p of f)for(let m of f){if(p.restriction===m.restriction||p.target===m.target||!o(p.target).has(m.target))continue;let h=`${p.restriction}${Le}${m.restriction}`;i.has(h)||l(p.restriction,m.restriction)&&c.push([p.restriction,m.restriction,p.target,m.target,h])}c.sort((f,p)=>f[0].localeCompare(p[0])||f[1].localeCompare(p[1]));let u=[],d=new Set;for(let[f,p,m,h,g]of c)if(!d.has(g)){if(u.length>=n)break;d.add(g),u.push({subject:f,object:p,viaY1:m,viaY2:h})}return u}function Ff(e,t,n,s,{budget:o=20,focus:r=null}={}){if(!n)return null;let i=xn(e),a=r instanceof Set?r.size?r:null:zn(r),l=f=>!a||a.has(n)||a.has(f),c=new Map;for(let[f,p]of e||[])!f||!p||(c.has(f)||c.set(f,new Set),c.get(f).add(p));let u=new Map((t||[]).map(f=>[f.restriction,f])),d=0;for(let f of[n,...i(n)]){if(d>=o)break;if(d+=1,!!l(f))for(let p of c.get(f)||[]){let m=u.get(p);if(m&&s(m))return{viaClass:f,viaRestriction:p,record:m}}}return null}function tk(e,t,n,s,o,r={}){if(!s||!Number.isFinite(o))return null;let i=Ff(e,t,n,a=>a.onClass===s&&(a.kind==="exactly"||a.kind==="min")&&a.n>=o,r);return i?{subject:n,object:s,m:o,n:i.record.n,kind:i.record.kind,viaClass:i.viaClass,viaRestriction:i.viaRestriction}:null}function sk(e,t,n,s,o={}){if(!s)return null;let r=Ff(e,t,n,i=>i.onClass===s&&i.kind==="max"&&i.n===0,o);return r?{subject:n,object:s,viaClass:r.viaClass,viaRestriction:r.viaRestriction}:null}function ok(e,t,n,{budget:s=50,focus:o=null}={}){let r=xn(t),i=new Map;for(let[p,m]of n||[])!p||!m||p===m||(i.has(p)||i.set(p,new Set),i.get(p).add(m),i.has(m)||i.set(m,new Set),i.get(m).add(p));if(!i.size)return[];let a=new Map;for(let[p,m]of e||[])!p||!m||(a.has(p)||a.set(p,new Set),a.get(p).add(m));let l=o instanceof Set?o.size?o:null:zn(o),c=p=>!l||l.has(p),u=[],d=new Set;for(let[p,m]of a){if(!c(p))continue;let h=[...m].sort();for(let g=0;g<h.length;g+=1)for(let b=g+1;b<h.length;b+=1){let[y,w]=[h[g],h[b]],$=[y,...r(y)],j=[w,...r(w)],v=null;for(let k of $){let _=i.get(k);if(_){for(let R of j)if(_.has(R)){v=[k,R];break}if(v)break}}if(!v)continue;let E=`${p}${Le}${y}${Le}${w}`;d.has(E)||(d.add(E),u.push([p,y,w,v[0],v[1]]))}}u.sort((p,m)=>p[0].localeCompare(m[0])||p[1].localeCompare(m[1])||p[2].localeCompare(m[2]));let f=[];for(let[p,m,h,g,b]of u){if(f.length>=s)break;f.push({subject:p,classA:m,classB:h,viaA:g,viaB:b})}return f}async function rk(e,{depth:t=32,budget:n=50,focus:s=null,expandFocus:o=!1,maxEnvironments:r=yi,full:i=!1,store:a}={}){let{loadMemory:l,readFactRows:c,appendFacts:u}=_f(a,["loadMemory","readFactRows","appendFacts"],"syllogise"),d=typeof a?.loadSyllogiseState=="function"&&typeof a?.saveSyllogiseState=="function",f=await l(e),p=c(f),m=p.filter(S=>as(S.predicate)).map(S=>[S.subject,S.object]),h=p.filter(S=>Ls(S.predicate)).map(S=>[S.subject,S.object]),g=p.filter(S=>Is(S.predicate)).map(S=>[S.subject,S.object]),b=new Map,y=new Map,w=[];for(let S of p){let le=String(S.predicate||"").trim().toLowerCase();vo(S.predicate)?b.set(S.subject,S.object):mr(S.predicate)?y.set(S.subject,S.object):Lc.has(le)||w.push([S.subject,S.predicate,S.object])}let $=[];for(let[S,le]of b){let Ae=y.get(S);Ae&&$.push({restriction:S,property:le,target:Ae})}let j=zn(s),v=o&&j?_c(p,[...j]):j,E=v===null&&d?await a.loadSyllogiseState(e):null,k=new Set(p.map(S=>S.id)),_=Array.isArray(E?.factIds)?E.factIds.filter(S=>!k.has(S)):[],R=E&&Array.isArray(E.factIds)&&!_.length&&!i?"delta":"full",x=R==="delta"?new Set(E.factIds):null,T=R==="delta"?p.filter(S=>!x.has(S.id)):p,M=T.length,A=new Map;for(let S of p)A.set(`${S.subject}${Le}${S.predicate}${Le}${S.object}`,S.trust);let P=(S,le,Ae)=>A.get(`${S}${Le}${le}${Le}${Ae}`),G=(S,le,Ae)=>A.has(`${S}${Le}${le}${Le}${Ae}`),J=S=>S.filter(le=>typeof le=="number"),ee=R==="delta"&&!T.length,ie=R==="delta"?T.filter(S=>as(S.predicate)).map(S=>[S.subject,S.object]):[],D=R==="delta"?ie.length?If(m,ie,{depth:t,budget:n,focus:v}):[]:Of(m,{depth:t,budget:n,focus:v}),z=m.concat(D.map(S=>[S.subject,S.object])),U=v,C=null;if(R==="delta"&&!ee){let S=p.concat(D.map(Ae=>({subject:Ae.subject,predicate:Fe,object:Ae.object}))),le=[];for(let Ae of T)le.push(Ae.subject,Ae.object);C=_c(S,le),U=C}let I=S=>!C||C.has(S),O=C?h.filter(([S,le])=>I(S)||I(le)):h,N=new Set;if(C)for(let S of T)Is(S.predicate)&&(N.add(S.subject),N.add(S.object));let F=C&&N.size?xn(z):null,W=C?h.filter(([S,le])=>I(S)||I(le)||F&&[...F(le)].some(Ae=>N.has(Ae))):h,H=new Set;if(C){for(let S of T)if(vo(S.predicate)||mr(S.predicate)){let le=b.get(S.subject);le&&H.add(X(le))}}let ae=C?w.filter(([S,le,Ae])=>I(S)||I(Ae)||H.has(X(le))):w,ce=Math.max(0,n-D.length),K=ce>0&&!ee?Lf(O,z,{budget:ce,focus:U,presentTypeEdges:h}):[],Z=Math.max(0,n-D.length-K.length),V=Z>0&&!ee?Nf(W,z,g,{budget:Z,focus:U}):[],ne=Math.max(0,n-D.length-K.length-V.length),te=ne>0&&$.length&&!ee?Mf(ae,h,z,$,{budget:ne,focus:U}):[],$e=Math.max(0,n-D.length-K.length-V.length-te.length),Te=$e>0&&$.length>1&&!ee?Pf($,z,{budget:$e,focus:U}):[],pe=new Map($.map(S=>[S.restriction,S])),re=[...D.map(S=>({subject:S.subject,predicate:Fe,object:S.object,provenance:Af,justification:[[ge(S.subject,Fe,S.via),ge(S.via,Fe,S.object)]]})),...K.map(S=>({subject:S.subject,predicate:Tt,object:S.object,provenance:Cf,justification:[[ge(S.subject,Tt,S.via),ge(S.via,Fe,S.object)]]})),...V.map(S=>{let le=G(S.viaClass,yo,S.object),[Ae,En]=le?[S.viaClass,S.object]:[S.object,S.viaClass],Qs=J([P(S.subject,Tt,S.viaType),P(Ae,yo,En),...S.viaClass!==S.viaType?[P(S.viaType,Fe,S.viaClass)]:[]]);return{subject:S.subject,predicate:yo,object:S.object,provenance:Ac,justification:[[ge(S.subject,Tt,S.viaType),ge(Ae,yo,En),...S.viaClass!==S.viaType?[ge(S.viaType,Fe,S.viaClass)]:[]]],...Qs.length?{premiseTrusts:Qs,ruleConfidence:Tc}:{}}}),...te.map(S=>{let le=J([P(S.subject,S.viaProperty,S.viaValue),P(S.viaValue,Tt,S.viaType),P(S.object,vn,S.viaPropertyKey),P(S.object,$n,S.viaTarget),...S.viaType!==S.viaTarget?[P(S.viaType,Fe,S.viaTarget)]:[]]);return{subject:S.subject,predicate:Tt,object:S.object,provenance:Oc,justification:[[ge(S.subject,S.viaProperty,S.viaValue),ge(S.viaValue,Tt,S.viaType),ge(S.object,vn,S.viaPropertyKey),ge(S.object,$n,S.viaTarget),...S.viaType!==S.viaTarget?[ge(S.viaType,Fe,S.viaTarget)]:[]]],...le.length?{premiseTrusts:le,ruleConfidence:Ic}:{}}}),...Te.map(S=>{let le=pe.get(S.subject),Ae=pe.get(S.object),En=J([le&&P(S.subject,vn,le.property),P(S.subject,$n,S.viaY1),Ae&&P(S.object,vn,Ae.property),P(S.object,$n,S.viaY2),P(S.viaY1,Fe,S.viaY2)]);return{subject:S.subject,predicate:Fe,object:S.object,provenance:Mc,justification:[[...le?[ge(S.subject,vn,le.property)]:[],ge(S.subject,$n,S.viaY1),...Ae?[ge(S.object,vn,Ae.property)]:[],ge(S.object,$n,S.viaY2),ge(S.viaY1,Fe,S.viaY2)]],...En.length?{premiseTrusts:En,ruleConfidence:Pc}:{}}})],fe=re.map(S=>({id:ge(S.subject,S.predicate,S.object),subject:S.subject,predicate:S.predicate,object:S.object,environments:S.justification,write:S})),be=zf(p.concat(fe.map(S=>({id:S.id,subject:S.subject,predicate:S.predicate,object:S.object})))),Ce=new Map(p.map(S=>[S.id,S])),ue=S=>as(S)||Ls(S)||Is(S),q=S=>R!=="delta"||C!==null&&(C.has(S.subject)||C.has(S.object)),se=p.filter(S=>ue(S.predicate)&&Df(S.provenance)&&fr(S).length<r&&q(S)).map(S=>({id:S.id,subject:S.subject,predicate:S.predicate,object:S.object,environments:fr(S),provenance:S.provenance})),Ze=[...fe,...se].sort((S,le)=>S.subject.localeCompare(le.subject)||S.predicate.localeCompare(le.predicate)||S.object.localeCompare(le.object)),De=0,Ve=!1,Jt=0;for(let S of Ze){if(Jt>=n){Ve=!0;break}Jt+=1;let le=be(S,{maxEnvironments:r+1}),{kept:Ae,truncated:En}=ak(S.environments,le,r);if(En&&(Ve=!0),!(Ae.length<=S.environments.length)){if(De+=Ae.length-S.environments.length,S.write){S.write.justification=Ae;continue}re.push({subject:S.subject,predicate:S.predicate,object:S.object,justification:Ae,...Bf(S.provenance,Ae,Qs=>Ce.get(Qs)?.trust)||{}})}}let{ids:Qt}=await u(e,re),Gt=[],Lt=0;for(let S of D)Gt.push({id:Qt[Lt],subject:S.subject,object:S.object,via:S.via,rule:Rf}),Lt+=1;for(let S of K)Gt.push({id:Qt[Lt],subject:S.subject,object:S.object,via:S.via,rule:Tf}),Lt+=1;for(let S of V)Gt.push({id:Qt[Lt],subject:S.subject,object:S.object,via:S.viaClass,rule:Rc}),Lt+=1;for(let S of te)Gt.push({id:Qt[Lt],subject:S.subject,object:S.object,via:S.viaValue,rule:Cc}),Lt+=1;for(let S of Te)Gt.push({id:Qt[Lt],subject:S.subject,object:S.object,via:S.viaY1,rule:Nc}),Lt+=1;let Nr=Gt.length>=n;if(v===null&&d&&!Nr){let S=new Set(k);for(let le of Qt)S.add(le);await a.saveSyllogiseState(e,{version:1,factIds:[...S].sort(),completedAt:new Date().toISOString()})}return{derived:Gt,count:Gt.length,budget:n,depth:t,truncated:Nr,mode:R,deltaSize:M,environmentsAdded:De,alternatesTruncated:Ve}}function Df(e){let t=String(e||"").split(" | ").filter(Boolean);return t.length>0&&t.every(n=>n.startsWith("entailed:"))}function ik(e){let t=[],n=new Map,s=new Map,o=new Map,r=new Map,i=new Map;for(let u of e){let d=String(u.predicate||"").trim().toLowerCase();as(u.predicate)?t.push([u.subject,u.object]):Ls(u.predicate)?(n.has(u.subject)||n.set(u.subject,new Set),n.get(u.subject).add(u.object)):Is(u.predicate)?(s.has(u.subject)||s.set(u.subject,new Set),s.get(u.subject).add(u.object),s.has(u.object)||s.set(u.object,new Set),s.get(u.object).add(u.subject)):vo(u.predicate)?o.set(u.subject,u.object):mr(u.predicate)?r.set(u.subject,u.object):Lc.has(d)||(i.has(u.subject)||i.set(u.subject,[]),i.get(u.subject).push([X(u.predicate),u.object]))}let a=xn(t),l=(u,d)=>u!==d&&a(u).has(d),c=u=>{let d=o.get(u),f=r.get(u);return d&&f?{property:X(d),target:f}:null};return u=>{if(as(u.predicate)){if(l(u.subject,u.object))return!0;let d=c(u.subject),f=c(u.object);return!!(d&&f&&d.property===f.property&&l(d.target,f.target))}if(Ls(u.predicate)){for(let f of n.get(u.subject)||[])if(l(f,u.object))return!0;let d=c(u.object);if(d){for(let[f,p]of i.get(u.subject)||[])if(f===d.property){for(let m of n.get(p)||[])if(m===d.target||l(m,d.target))return!0}}return!1}if(Is(u.predicate)){for(let d of n.get(u.subject)||[])for(let f of[d,...a(d)])if(s.get(f)?.has(u.object))return!0;return!1}return!0}}function zf(e){let t=new Set,n=[],s=new Map,o=new Map,r=new Set,i=new Map,a=new Map,l=new Map,c=new Map;for(let p of e){if(!p||!p.subject||!p.predicate||!p.object)continue;p.id&&t.add(p.id);let m=String(p.predicate||"").trim().toLowerCase();as(p.predicate)?(n.push([p.subject,p.object]),s.has(p.subject)||s.set(p.subject,new Set),s.get(p.subject).add(p.object)):Ls(p.predicate)?(o.has(p.subject)||o.set(p.subject,new Set),o.get(p.subject).add(p.object)):Is(p.predicate)?(r.add(`${p.subject}${Le}${p.object}`),i.has(p.subject)||i.set(p.subject,new Set),i.get(p.subject).add(p.object),i.has(p.object)||i.set(p.object,new Set),i.get(p.object).add(p.subject)):vo(p.predicate)?a.set(p.subject,p.object):mr(p.predicate)?l.set(p.subject,p.object):Lc.has(m)||(c.has(p.subject)||c.set(p.subject,[]),c.get(p.subject).push([p.predicate,p.object]))}let u=xn(n),d=p=>s.get(p)||new Set,f=p=>{let m=a.get(p),h=l.get(p);return m&&h?{property:m,propertyKey:X(m),target:h}:null};return(p,{maxEnvironments:m=yi}={})=>{let h=[],g=new Set,b=y=>{if(h.length>=m||p.id&&y.includes(p.id)||!y.every($=>t.has($)))return;let w=[...y].sort().join(" ");g.has(w)||(g.add(w),h.push(y))};if(as(p.predicate)){for(let y of[...d(p.subject)].sort()){if(h.length>=m)break;y===p.subject||y===p.object||d(y).has(p.object)&&b([ge(p.subject,Fe,y),ge(y,Fe,p.object)])}if(h.length<m){let y=f(p.subject),w=f(p.object);y&&w&&y.propertyKey===w.propertyKey&&y.target!==w.target&&d(y.target).has(w.target)&&b([ge(p.subject,vn,y.property),ge(p.subject,$n,y.target),ge(p.object,vn,w.property),ge(p.object,$n,w.target),ge(y.target,Fe,w.target)])}return h}if(Ls(p.predicate)){for(let w of[...o.get(p.subject)||[]].sort()){if(h.length>=m)break;w!==p.object&&d(w).has(p.object)&&b([ge(p.subject,Tt,w),ge(w,Fe,p.object)])}let y=f(p.object);if(y){let w=[...c.get(p.subject)||[]].filter(([$])=>X($)===y.propertyKey).sort(($,j)=>$[0].localeCompare(j[0])||$[1].localeCompare(j[1]));for(let[$,j]of w){if(h.length>=m)break;for(let v of[...o.get(j)||[]].sort()){if(h.length>=m)break;v!==y.target&&!d(v).has(y.target)||b([ge(p.subject,$,j),ge(j,Tt,v),ge(p.object,vn,y.propertyKey),ge(p.object,$n,y.target),...v!==y.target?[ge(v,Fe,y.target)]:[]])}}}return h}if(Is(p.predicate)){let y=[];for(let w of o.get(p.subject)||[])for(let $ of[w,...u(w)])(i.get($)||new Set).has(p.object)&&y.push([w,$]);y.sort((w,$)=>w[0].localeCompare($[0])||w[1].localeCompare($[1]));for(let[w,$]of y){if(h.length>=m)break;let j=r.has(`${$}${Le}${p.object}`),[v,E]=j?[$,p.object]:[p.object,$];b([ge(p.subject,Tt,w),ge(v,yo,E),...$!==w?[ge(w,Fe,$)]:[]])}return h}return h}}function ak(e,t,n){let s=[],o=new Set,r=!1;for(let i of[...e||[],...t||[]]){if(!Array.isArray(i)||!i.length)continue;let a=[...i].sort().join(" ");if(!o.has(a)){if(s.length>=n){r=!0;continue}o.add(a),s.push(i)}}return{kept:s,truncated:r}}function Bf(e,t,n){let s;for(let i of String(e||"").split(" | ")){let a=ck.get(i);if(a!==void 0){s=a;break}}if(s===void 0)return null;let o=null,r=-1;for(let i of t||[]){let a=i.map(c=>n(c)).filter(c=>typeof c=="number");if(a.length!==i.length)continue;let l=Math.min(...a);l>r&&(r=l,o=a)}return o?{premiseTrusts:o,ruleConfidence:s}:null}async function lk(e,t,n,{budget:s=50,depth:o=32,maxEnvironments:r=yi,store:i}={}){let{loadMemory:a,readFactRows:l,removeFacts:c}=_f(i,["loadMemory","readFactRows","removeFacts"],"retractSubClassOf"),u=typeof i?.appendFacts=="function"?i.appendFacts:null,d=X(t),f=X(n),p=ge(d,Fe,f),m=await a(e),h=l(m),g=new Map(h.map(R=>[R.id,R]));if(!g.has(p))return{retracted:[],count:0,budget:s,depth:o,truncated:!1,found:!1};let b=h.filter(R=>fr(R).length&&Df(R.provenance)),y=new Map;for(let R of b)for(let x of fr(R))for(let T of x)y.has(T)||y.set(T,new Set),y.get(T).add(R.id);let w=new Set([p]),$=[p],j=new Map,v=!1,E=0,k=[p];for(;E<o;E+=1){let R=new Set;for(let ee of k)for(let ie of y.get(ee)||[])w.has(ie)||R.add(ie);let x=[...R].map(ee=>g.get(ee)).sort((ee,ie)=>ee.subject.localeCompare(ie.subject)||ee.predicate.localeCompare(ie.predicate)||ee.object.localeCompare(ie.object));if(!x.length)break;let T=h.filter(ee=>!w.has(ee.id)&&!R.has(ee.id)),M=new Set(T.map(ee=>ee.id)),A=zf(T),P=ik(T),G=!1,J=!1;k=[];for(let ee of x){if(w.size>=s){J=!0;break}let ie=fr(ee),D=ie.filter(U=>U.every(C=>M.has(C)));if(D.length){D.length!==ie.length&&j.set(ee.id,D);continue}let z=A(ee,{maxEnvironments:r});if(z.length){j.set(ee.id,z);continue}P(ee)||(w.add(ee.id),$.push(ee.id),k.push(ee.id),G=!0)}if(J){v=!0;break}if(!G)break}!v&&E>=o&&(v=b.some(R=>!w.has(R.id)&&R.justification.some(x=>w.has(x))));let{removed:_}=await c(e,$);if(u){let R=[...j.entries()].filter(([x])=>!w.has(x)).sort((x,T)=>x[0].localeCompare(T[0])).map(([x,T])=>{let M=g.get(x);return{subject:M.subject,predicate:M.predicate,object:M.object,justification:T,...Bf(M.provenance,T,A=>g.get(A)?.trust)||{}}});R.length&&await u(e,R)}return{retracted:_,count:_.length,budget:s,depth:o,truncated:v,found:!0}}function Fc(e,t,n,s,{maxHops:o=6}={}){let r=t instanceof Set?t:new Set(t||[]),i=new Map;for(let[c,u]of s||[])!c||!u||c===u||(i.has(c)||i.set(c,new Set),i.get(c).add(u));let a=[];for(let[c,u]of n||[])c===e&&u&&a.push({node:u,path:[{subject:c,predicate:Tt,object:u}]});for(let c of i.get(e)||[])a.push({node:c,path:[{subject:e,predicate:Fe,object:c}]});let l=new Set([e]);for(let c=1;c<=o&&a.length;c+=1){for(let{node:d,path:f}of a)if(r.has(d))return f;if(c===o)break;let u=[];for(let{node:d,path:f}of a)if(!l.has(d)){l.add(d);for(let p of i.get(d)||[])l.has(p)||u.push({node:p,path:[...f,{subject:d,predicate:Fe,object:p}]})}a=u}return null}var Fe,Rf,Af,Tt,Tf,Cf,yo,Rc,Ac,Tc,vn,$n,Cc,Oc,Ic,yi,Le,as,Ls,Is,vo,mr,Kx,Lc,Jx,Qx,Nc,Mc,Pc,ek,nk,fr,ck,Bt=L(()=>{Yt();Fe="rdfs:subClassOf",Rf="subClassOf",Af=`entailed:${Rf}`,Tt="rdf:type",Tf="type",Cf=`entailed:${Tf}`,yo="owl:disjointWith",Rc="disjointWith",Ac=`entailed:${Rc}`,Tc=.95,vn="owl:onProperty",$n="owl:someValuesFrom",Cc="someValuesFrom",Oc=`entailed:${Cc}`,Ic=.95,yi=4,Le="\u241F",as=e=>String(e||"").trim().toLowerCase()==="rdfs:subclassof",Ls=e=>String(e||"").trim().toLowerCase()==="rdf:type",Is=e=>String(e||"").trim().toLowerCase()==="owl:disjointwith",vo=e=>String(e||"").trim().toLowerCase()==="owl:onproperty",mr=e=>String(e||"").trim().toLowerCase()==="owl:somevaluesfrom",Kx=e=>String(e||"").trim().toLowerCase()==="owl:onclass",Lc=new Set(["rdfs:subclassof","rdf:type","owl:disjointwith","owl:onproperty","owl:somevaluesfrom","owl:intersectionof"]);Jx="has",Qx={"owl:cardinality":"exactly","owl:mincardinality":"min","owl:maxcardinality":"max"};Nc="someValuesFromSubsumption",Mc=`entailed:${Nc}`,Pc=.95;ek=.95;nk=.95;fr=e=>e.environments||(Array.isArray(e.justification)&&e.justification.length?[e.justification]:[]);ck=new Map([[Ac,Tc],[Oc,Ic],[Mc,Pc]])});function Eo(e){let t=String(e||""),n=Uf.get(t);return n||(t.startsWith(Dc)?$o+t.slice(Dc.length):t)}function Wf(e){let t=String(e||""),n=uk.get(t);return n||(t.startsWith($o)?Dc+t.slice($o.length):null)}function qf(e,t,n,s,o){let r=null;for(let i of e){if(i===t)return[];let a=Fc(i,new Set([t]),n,s,{maxHops:o});a&&(!r||a.length<r.length)&&(r=a)}return r}function xi(e,t,n,{maxHops:s=3}={}){let o=ko(e),r=ko(t),i=Array.isArray(n)?n:[],{typeEdges:a,subClassEdges:l}=Vf(i),c=i.filter(b=>(b.predicate===$i||b.predicate===xo)&&r.has(b.object)),u=[];for(let b of c){let y=b.predicate===xo?"negative":"positive";if(o.has(b.subject)){u.push({fact:b,polarity:y,hops:0,chain:null});continue}let w=qf(o,b.subject,a,l,s);w&&w.length&&u.push({fact:b,polarity:y,hops:w.length,chain:w})}if(!u.length)return{verdict:"none",hops:0,positive:[],negative:[],chain:null,overrides:null,baseRate:Bc(o,r,i,{maxHops:s})};u.sort((b,y)=>b.hops-y.hops||(y.fact.trust||0)-(b.fact.trust||0));let d=u[0].hops,f=u.filter(b=>b.hops===d),p=f.filter(b=>b.polarity==="positive").map(b=>b.fact),m=f.filter(b=>b.polarity==="negative").map(b=>b.fact),h=m.length&&!p.length?"negative":"positive",g=u.find(b=>b.hops>d&&b.polarity!==h)||null;return{verdict:p.length&&m.length?"both":m.length?"no":"yes",hops:d,positive:p,negative:m,chain:u[0].chain,overrides:g?{fact:g.fact,chain:g.chain}:null,baseRate:null}}function Bc(e,t,n,{maxHops:s=3}={}){let o=ko(e),r=ko(t),i=Array.isArray(n)?n:[],a=i.filter(h=>h.predicate===Fe||h.predicate===Tt),l=a.filter(h=>o.has(h.subject)).map(h=>h.object);if(!l.length)return null;let c=l[0],u=[...new Set(a.filter(h=>h.object===c&&!o.has(h.subject)).map(h=>h.subject))],d=h=>{let g=i.find(b=>b.subject===h&&r.has(b.object)&&(b.predicate===$i||b.predicate===xo));return g?{name:h,polarity:g.predicate===xo?"negative":"positive",fact:g}:{name:h,polarity:"unknown",fact:null}},f=u.map(d),{typeEdges:p,subClassEdges:m}=Vf(i);return{klass:c,kinds:u.length,positive:f.filter(h=>h.polarity==="positive"),negative:f.filter(h=>h.polarity==="negative"),unknown:f.filter(h=>h.polarity==="unknown"),chain:qf(o,c,p,m,s)}}function Uc(e,t,{exclude:n=[],maxHops:s=3}={}){let o=ko(e),r=ko(n),i=Array.isArray(t)?t:[],a=new Set,l=[];for(let c of i)c.predicate!==$i||!o.has(c.object)||r.has(c.subject)||a.has(c.subject)||(a.add(c.subject),xi(new Set([c.subject]),o,i,{maxHops:s}).verdict==="yes"&&l.push(c));return l.sort(dk)}var $o,Dc,vi,Uf,uk,Gf,$i,xo,zc,dk,ko,Vf,Wc=L(()=>{Bt();$o="mgxneg:",Dc="mgx:",vi="mgxneg:subClassOf",Uf=new Map([[Fe,vi]]),uk=new Map([...Uf].map(([e,t])=>[t,e]));Gf=e=>String(e||"").startsWith($o),$i="mgx:capableOf",xo=Eo($i),zc=6,dk=(e,t)=>(t.trust||0)-(e.trust||0)||String(e.subject).localeCompare(String(t.subject)),ko=e=>e instanceof Set?e:new Set(Array.isArray(e)?e:[e]),Vf=e=>({typeEdges:e.filter(t=>t.predicate===Tt).map(t=>[t.subject,t.object]),subClassEdges:e.filter(t=>t.predicate===Fe).map(t=>[t.subject,t.object])})});function So(e,t){let n=(e?.attributes||[]).find(s=>s?.prop===t);return n?String(n.value??""):void 0}function hk(e,t){(!e?.class||!pk.has(e.class))&&t.push(`must have a class from the closed vocabulary Utterance | Fact | Session | Source | Rule (got ${JSON.stringify(e?.class)})`)}function gk(e,t){for(let s of["rdf:subject","rdf:predicate","rdf:object"])ki(So(e,s))||t.push(`a Fact needs a non-empty ${s}`);for(let s of["rdf:subject","rdf:object"]){let o=So(e,s);o!==void 0&&mk.test(o)&&t.push(`a Fact's ${s} must be a single term, not text spanning a sentence boundary (got ${JSON.stringify(o)})`)}let n=So(e,"mgx:factProvenance");n!==void 0&&!ki(n)&&t.push("mgx:factProvenance, when present, must be non-empty")}function bk(e,t){ki(So(e,"mgx:ruleName"))||t.push("a Rule needs a non-empty mgx:ruleName");let n=So(e,"mgx:ruleKind");if(!n||!Hf.has(n)){t.push(`a Rule's mgx:ruleKind must be one of ${[...Hf].join(" | ")} (got ${JSON.stringify(n)})`);return}for(let s of fk[n])ki(So(e,s))||t.push(`a ${n} Rule needs a non-empty ${s}`)}function wk(e){let t=[];return hk(e,t),e?.class==="Fact"&&gk(e,t),e?.class==="Rule"&&bk(e,t),{ok:t.length===0,violations:t}}function Gc(e){let t=wk(e);if(!t.ok){let n=new Error(`SHACL validation failed for ${e?.class} "${e?.id}": ${t.violations.join(" | ")}`);throw n.violations=t.violations,n}}var pk,Hf,fk,mk,ki,Kf=L(()=>{pk=new Set(["Utterance","Fact","Session","Source","Rule"]),Hf=new Set(["compose2","filter","recursive","action-signature","action-precond","action-effect","action-constraint"]),fk={compose2:["mgx:ruleBase1","mgx:ruleBase2"],filter:["mgx:ruleBase1","mgx:ruleFilterProperty"],recursive:["mgx:ruleBaseCase","mgx:ruleRecStep"],"action-signature":["mgx:ruleActionSubjectClass","mgx:ruleActionTargetClass"],"action-precond":["mgx:ruleActionPrecondShape","mgx:ruleActionPrecondPredicate","mgx:ruleActionPrecondRole","mgx:ruleActionPrecondScope"],"action-effect":["mgx:ruleActionEffectPredicate","mgx:ruleActionEffectSubject"],"action-constraint":["mgx:ruleActionConstraintLeft","mgx:ruleActionConstraintRight","mgx:ruleActionConstraintGuard"]},mk=/[.!?]\s+\w/;ki=e=>typeof e=="string"&&e.trim().length>0});var Yf={};Sn(Yf,{access:()=>$k,appendFile:()=>Ek,basename:()=>zk,copyFile:()=>Ck,createInterface:()=>Vk,createReadStream:()=>Ik,createRequire:()=>yk,createWriteStream:()=>Lk,default:()=>Hk,dirname:()=>Pk,existsSync:()=>Nk,fileURLToPath:()=>Uk,isAbsolute:()=>Dk,join:()=>Mk,mkdir:()=>Sk,mkdtemp:()=>jk,randomBytes:()=>Wk,readFile:()=>xk,readFileSync:()=>vk,readdir:()=>Ok,rename:()=>_k,resolve:()=>Fk,rm:()=>Ak,sep:()=>Bk,spawnSync:()=>Gk,stat:()=>Tk,tmpdir:()=>qk,unlink:()=>Rk,writeFile:()=>kk});var ut,yk,vk,$k,xk,kk,Ek,Sk,jk,_k,Rk,Ak,Tk,Ck,Ok,Ik,Lk,Nk,Mk,Pk,Fk,Dk,zk,Bk,Uk,Wk,Gk,Vk,qk,Hk,Xf=L(()=>{ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},yk=ut("createRequire"),vk=ut("readFileSync"),$k=ut("access"),xk=ut("readFile"),kk=ut("writeFile"),Ek=ut("appendFile"),Sk=ut("mkdir"),jk=ut("mkdtemp"),_k=ut("rename"),Rk=ut("unlink"),Ak=ut("rm"),Tk=ut("stat"),Ck=ut("copyFile"),Ok=ut("readdir"),Ik=ut("createReadStream"),Lk=ut("createWriteStream"),Nk=()=>!1,Mk=(...e)=>e.join("/"),Pk=e=>String(e).replace(/\/[^/]*$/,""),Fk=(...e)=>e.join("/"),Dk=e=>String(e).startsWith("/"),zk=e=>String(e).split("/").pop(),Bk="/",Uk=e=>String(e),Wk=ut("randomBytes"),Gk=ut("spawnSync"),Vk=ut("createInterface"),qk=()=>"/tmp",Hk={}});var Kk,hr,Vc=L(()=>{Kk=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,hr=class e extends Date{#t=!1;#n=!1;#e=null;constructor(t){let n=!0,s=!0,o="Z";if(typeof t=="string"){let r=t.match(Kk);r?(r[1]||(n=!1,t=`0000-01-01T${t}`),s=!!r[2],s&&t[10]===" "&&(t=t.replace(" ","T")),r[2]&&+r[2]>23?t="":(o=r[3]||null,t=t.toUpperCase(),!o&&s&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=n,this.#n=s,this.#e=o)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let n=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return n=this.#e[0]==="-"?n:-n,new Date(this.getTime()-n*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,n="Z"){let s=new e(t);return s.#e=n,s}static wrapAsLocalDateTime(t){let n=new e(t);return n.#e=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#n=!1,n.#e=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#t=!1,n.#e=null,n}}});function Yk(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Xk(e,t,n){let s=e.split(/\r\n|\n|\r/g),o="",r=(Math.log10(t+1)|0)+1;for(let i=t-1;i<=t+1;i++){let a=s[i-1];a&&(o+=i.toString().padEnd(r," "),o+=": ",o+=a,o+=`
86
86
  `,i===t&&(o+=" ".repeat(r+n+2),o+=`^
87
- `))}return o}var fe,Os=M(()=>{fe=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=sk(n.toml,n.ptr),r=ok(n.toml,s,o);super(`Invalid TOML document: ${t}
87
+ `))}return o}var me,Ns=L(()=>{me=class extends Error{line;column;codeblock;constructor(t,n){let[s,o]=Yk(n.toml,n.ptr),r=Xk(n.toml,s,o);super(`Invalid TOML document: ${t}
88
88
 
89
- ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function vi(e,t){let n=e[t++],s=n,o=n==="'",r=n===e[t]&&n===e[t+1];r&&(e[t+=2]===`
89
+ ${r}`,n),this.line=s,this.column=o,this.codeblock=r}}});function Ei(e,t){let n=e[t++],s=n,o=n==="'",r=n===e[t]&&n===e[t+1];r&&(e[t+=2]===`
90
90
  `?t++:e[t]==="\r"&&e[t+1]===`
91
91
  `&&(t+=2));let i="",a=t,l=0;for(let c=t;c<e.length;c++)if(n=e[c],r&&(n===`
92
92
  `||n==="\r"&&e[c+1]===`
93
- `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new fe("control characters are not allowed in strings",{toml:e,ptr:c});if((!l||l===3)&&n===s&&(!r||e[c+1]===s&&e[c+2]===s))return r&&(e[c+3]===s&&c++,e[c+3]===s&&c++),[l?i:i+e.slice(a,c),c+(r?3:1)];if(!l)!o&&n==="\\"&&(i+=e.slice(a,a=c),l=1);else if(l===1)if(n==="x"||n==="u"||n==="U"){let u=0,d=n==="x"?2:n==="u"?4:8;for(let f=0;f<d;f++,c++){let p=e.charCodeAt(c+1),m=p>=48&&p<=57?p-48:p>=65&&p<=70?p-65+10:p>=97&&p<=102?p-97+10:-1;if(m<0)throw new fe("invalid non-hex character in unicode escape",{toml:e,ptr:c+1});u=u<<4|m}if(u<0||u>1114111||u>=55296&&u<=57343)throw new fe("invalid unicode escape",{toml:e,ptr:c});i+=String.fromCodePoint(u),a=c+1,l=0}else if(n===" "||n===" ")l=2;else{if(n==="b")i+="\b";else if(n==="t")i+=" ";else if(n==="n")i+=`
94
- `;else if(n==="f")i+="\f";else if(n==="r")i+="\r";else if(n==="e")i+="\x1B";else if(n==='"')i+='"';else if(n==="\\")i+="\\";else throw new fe("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new fe("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new fe("unfinished string",{toml:e,ptr:t})}function Lf(e,t,n,s){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return s?0n:0;let o=rk.test(e);if(o||ik.test(e)){if(ak.test(e))throw new fe("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new fe("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new fe("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new dr(e);if(!r.isValid())throw new fe("invalid value",{toml:t,ptr:n});return r}var rk,ik,ak,Dc=M(()=>{Fc();Os();rk=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ik=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,ak=/^[+-]?0[0-9_]/});function $i(e,t=0,n=e.length){let s=e.indexOf(`
95
- `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function $o(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
93
+ `))l=l&&3;else{if(n<" "&&n!==" "||n==="\x7F")throw new me("control characters are not allowed in strings",{toml:e,ptr:c});if((!l||l===3)&&n===s&&(!r||e[c+1]===s&&e[c+2]===s))return r&&(e[c+3]===s&&c++,e[c+3]===s&&c++),[l?i:i+e.slice(a,c),c+(r?3:1)];if(!l)!o&&n==="\\"&&(i+=e.slice(a,a=c),l=1);else if(l===1)if(n==="x"||n==="u"||n==="U"){let u=0,d=n==="x"?2:n==="u"?4:8;for(let f=0;f<d;f++,c++){let p=e.charCodeAt(c+1),m=p>=48&&p<=57?p-48:p>=65&&p<=70?p-65+10:p>=97&&p<=102?p-97+10:-1;if(m<0)throw new me("invalid non-hex character in unicode escape",{toml:e,ptr:c+1});u=u<<4|m}if(u<0||u>1114111||u>=55296&&u<=57343)throw new me("invalid unicode escape",{toml:e,ptr:c});i+=String.fromCodePoint(u),a=c+1,l=0}else if(n===" "||n===" ")l=2;else{if(n==="b")i+="\b";else if(n==="t")i+=" ";else if(n==="n")i+=`
94
+ `;else if(n==="f")i+="\f";else if(n==="r")i+="\r";else if(n==="e")i+="\x1B";else if(n==='"')i+='"';else if(n==="\\")i+="\\";else throw new me("unrecognized escape sequence",{toml:e,ptr:c});a=c+1,l=0}else if(n!==" "&&n!==" "){if(l===2)throw new me("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});l=!o&&n==="\\"?1:0,a=c}}throw new me("unfinished string",{toml:e,ptr:t})}function Jf(e,t,n,s){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return s?0n:0;let o=Jk.test(e);if(o||Qk.test(e)){if(Zk.test(e))throw new me("leading zeroes are not allowed",{toml:t,ptr:n});e=e.replace(/_/g,"");let i=+e;if(isNaN(i))throw new me("invalid number",{toml:t,ptr:n});if(o){if((o=!Number.isSafeInteger(i))&&!s)throw new me("integer value cannot be represented losslessly",{toml:t,ptr:n});(o||s===!0)&&(i=BigInt(e))}return i}let r=new hr(e);if(!r.isValid())throw new me("invalid value",{toml:t,ptr:n});return r}var Jk,Qk,Zk,qc=L(()=>{Vc();Ns();Jk=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Qk=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Zk=/^[+-]?0[0-9_]/});function Si(e,t=0,n=e.length){let s=e.indexOf(`
95
+ `,t);return e[s-1]==="\r"&&s--,s<=n?s:-1}function jo(e,t){for(let n=t;n<e.length;n++){let s=e[n];if(s===`
96
96
  `)return n;if(s==="\r"&&e[n+1]===`
97
- `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new fe("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function $n(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
97
+ `)return n+1;if(s<" "&&s!==" "||s==="\x7F")throw new me("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function kn(e,t,n,s){let o;for(;;){for(;(o=e[t])===" "||o===" "||!n&&(o===`
98
98
  `||o==="\r"&&e[t+1]===`
99
- `);)t++;if(s||o!=="#")break;t=$o(e,t)}return t}function Nf(e,t,n,s,o=!1){if(!s)return t=$i(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=$i(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
99
+ `);)t++;if(s||o!=="#")break;t=jo(e,t)}return t}function Qf(e,t,n,s,o=!1){if(!s)return t=Si(e,t),t<0?e.length:t;for(let r=t;r<e.length;r++){let i=e[r];if(i==="#")r=Si(e,r);else{if(i===n)return r+1;if(i===s||o&&(i===`
100
100
  `||i==="\r"&&e[r+1]===`
101
- `))return r}}throw new fe("cannot find end of structure",{toml:e,ptr:t})}var xi=M(()=>{Os();});function ck(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&($o(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function pr(e,t,n,s,o){if(s===0)throw new fe("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?Pf(e,t,s,o):Mf(e,t,s,o);if(n){if(c=$n(e,c),e[c]===",")c++;else if(e[c]!==n)throw new fe("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=vi(e,t);if(n){if(c=$n(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
102
- `&&e[c]!=="\r")throw new fe("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=Nf(e,t,",",n),a=ck(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new fe("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=$n(e,t+a[1]),e[i]===","&&i++),[Lf(a[0],e,t,o),i]}var zc=M(()=>{Dc();Bc();xi();Os();});function ki(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new fe("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++s];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new fe("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=vi(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=$i(c);if(u>-1)throw new fe("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new fe("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new fe("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(a)}else{s=e.indexOf(".",t);let a=e.slice(t,s<0||s>r?r:s);if(!lk.test(a))throw new fe("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(s+1&&s<r);return[o,$n(e,r+1,!0,!0)]}function Mf(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new fe("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=$o(e,t);else if(i!==" "&&i!==" "&&i!==`
103
- `&&i!=="\r"){let a,l=o,c=!1,[u,d]=ki(e,t-1);for(let m=0;m<u.length;m++){if(m&&(l=c?l[a]:l[a]={}),a=u[m],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||r.has(l[a])))throw new fe("trying to redefine an already defined value",{toml:e,ptr:t});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new fe("trying to redefine an already defined value",{toml:e,ptr:t});let[f,p]=pr(e,d,"}",n-1,s);r.add(f),l[a]=f,t=p}}if(!i)throw new fe("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function Pf(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new fe("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=$o(e,t);else if(r!==" "&&r!==" "&&r!==`
104
- `&&r!=="\r"){let i=pr(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new fe("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var lk,Bc=M(()=>{Dc();zc();xi();Os();lk=/^[a-zA-Z0-9-_]+[ \t]*$/});function Ff(e,t,n,s){let o=t,r=n,i,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[i]:o[i]={},r=(l=r[i]).c,s===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],r=r[u].c}}if(i=e[c],(a=Object.hasOwn(o,i))&&r[i]?.t===0&&r[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,i,{enumerable:!0,configurable:!0,writable:!0})),r[i]={t:c<e.length-1&&s===2?3:s,d:!1,i:0,c:{}})}if(l=r[i],l.t!==s&&!(s===1&&l.t===3)||(s===2&&(l.d||(l.d=!0,o[i]=[]),o[i].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,s===1)o=a?o[i]:o[i]={};else if(s===0&&a)return null;return[i,o,l.c]}function xo(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=$n(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=ki(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new fe("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=Ff(c[0],s,o,l?2:1);if(!u)throw new fe("trying to redefine an already defined table or value",{toml:e,ptr:a});i=u[2],r=u[1],a=c[1]}else{let l=ki(e,a),c=Ff(l[0],r,i,0);if(!c)throw new fe("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=pr(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=$n(e,a,!0),e[a]&&e[a]!==`
105
- `&&e[a]!=="\r")throw new fe("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=$n(e,a)}return s}var Df=M(()=>{Bc();zc();xi();Os();});var zf=M(()=>{});var Ei=M(()=>{Df();zf();Fc();Os();});var Wf={};En(Wf,{CONFIG_FILE:()=>ji,loadTomlConfig:()=>Uc,mergeEffective:()=>Uf,normalizeConfig:()=>Bf});async function Uc(e,{file:t}={}){let n=t||Z(e,ji),s;try{s=await Be(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return xo(s)}catch(o){throw new Error(`Invalid ${ji} at ${n}: ${o&&o.message?o.message:o}`)}}async function uk(e,t){let n;if(Array.isArray(e))n=e;else{let o=Wt(t,String(e));n=(await Be(o,"utf8")).split(`
106
- `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(Wt(t,r))}return s}async function Bf(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await uk(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=Wt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=Wt(s,String(n.graph_file))),n.graph_files!==void 0){let w=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=w.map($=>Wt(s,String($)))}let r=n.graph||{};r.read_only!==void 0&&(o.graph={readOnly:r.read_only});let i=n.corpus||{};i.tier!==void 0&&(o.corpus={tier:i.tier});let a=n.seed||{},l={};a.enabled!==void 0&&(l.enabled=a.enabled),a.limit!==void 0&&(l.limit=a.limit),a.capture_unknown_context!==void 0&&(l.captureUnknownContext=a.capture_unknown_context),a.unknown_context_limit!==void 0&&(l.unknownContextLimit=a.unknown_context_limit),Object.keys(l).length&&(o.seed=l),n.extensions!==void 0&&(o.extensions=n.extensions),n.bias!==void 0&&(o.bias=n.bias),n.games!==void 0&&(o.games=n.games),n.planning!==void 0&&(o.planning=n.planning),n.research!==void 0&&(o.research=n.research),n.discourse!==void 0&&(o.discourse=n.discourse);let c=n.index||{},u={};c.languages!==void 0&&(u.languages=c.languages),c.exclude!==void 0&&(u.exclude=c.exclude),c.secret_exclude!==void 0&&(u.secretExclude=c.secret_exclude),c.history_depth!==void 0&&(u.historyDepth=c.history_depth),c.include_text!==void 0&&(u.includeText=c.include_text),c.include_structure!==void 0&&(u.includeStructure=c.include_structure),c.respect_gitignore!==void 0&&(u.respectGitignore=c.respect_gitignore),c.markdown_sections!==void 0&&(u.markdownSections=c.markdown_sections),c.vue!==void 0&&(u.vue=c.vue),Object.keys(u).length&&(o.index=u);let d=n.tune||{},f={};d.score_gap_k!==void 0&&(f.scoreGapK=d.score_gap_k),d.literal_mention!==void 0&&(f.literalMention=d.literal_mention),d.demote_non_prod!==void 0&&(f.demoteNonProd=d.demote_non_prod),d.call_adjacency!==void 0&&(f.callAdjacency=d.call_adjacency),d.impl_of_interface!==void 0&&(f.implOfInterface=d.impl_of_interface),d.beam_search!==void 0&&(f.beamSearch=d.beam_search),d.beam_width!==void 0&&(f.beamWidth=d.beam_width),d.prose_layers!==void 0&&(f.proseLayers=d.prose_layers);let p=d.expansion||{},m={};p.strategy!==void 0&&(m.strategy=p.strategy),p.nodes!==void 0&&(m.nodes=p.nodes),p.q!==void 0&&(m.q=p.q),p.depth!==void 0&&(m.depth=p.depth),Object.keys(m).length&&(f.expansion=m),Object.keys(f).length&&(o.tune=f);let h=n.telemetry||{};h.enabled!==void 0&&(o.telemetry={enabled:h.enabled});let g=n.memory||{},b={};g.retention_versions!==void 0&&(b.retentionVersions=g.retention_versions),g.backend!==void 0&&(b.backend=g.backend),Object.keys(b).length&&(o.memory=b);let y=[];for(let[w,$]of dk)n[w]&&n[w][$]!==void 0&&y.push(`${w}.${$}`);return o.unwired=y,o}function Si(e,t="",n={}){for(let[s,o]of Object.entries(e||{})){if(o==null)continue;let r=t?`${t}.${s}`:s;Array.isArray(o)||typeof o!="object"?n[r]=o:Si(o,r,n)}return n}function Uf({args:e={},toml:t=null,defaults:n={}}={}){let s=Si(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?Si(o):{},i=Si(e),a=[...new Set([...Object.keys(s),...Object.keys(r),...Object.keys(i)])].sort(),l={},c={};for(let u of a)u in i?(l[u]=i[u],c[u]="arg"):u in r?(l[u]=r[u],c[u]="tmct.toml"):(l[u]=s[u],c[u]="default");return{effective:l,sources:c}}var ji,dk,_i=M(()=>{yt();ze();Ei();ji="tmct.toml";dk=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var cs={};En(cs,{CANONICALISED_FROM_PROP:()=>Zc,CAPABLE_OF_PREDICATE:()=>im,CREATED_AT_PROP:()=>Nt,DEFAULT_RETENTION:()=>Vc,FACT_CLASS:()=>is,HAS_A_PREDICATE:()=>Fs,IN_REPLY_TO_PROP:()=>Qc,MEMORY_DIR_REL:()=>hr,MEMORY_GRAPH_REL:()=>Kc,MEMORY_MANIFEST_REL:()=>Qf,MEMORY_SESSION_CLASS:()=>Xc,MULTI_VALUED_PREDICATES:()=>am,OPERATOR_SOURCE_ID:()=>Ri,RULE_CLASS:()=>Eo,RULE_KIND_ACTION_CONSTRAINT:()=>il,RULE_KIND_ACTION_EFFECT:()=>xr,RULE_KIND_ACTION_PRECOND:()=>Li,RULE_KIND_ACTION_SIGNATURE:()=>rl,RULE_KIND_COMPOSE2:()=>vr,RULE_KIND_FILTER:()=>$r,RULE_KIND_PROP:()=>jo,RULE_KIND_RECURSIVE:()=>ol,SAID_IN_SESSION_PROP:()=>Jc,SOURCE_CLASS:()=>ko,SOURCE_RELIABILITY_PROP:()=>Vf,STATED_BY_PROP:()=>Bn,SYLLOGISE_STATE_REL:()=>sl,UPDATED_AT_PROP:()=>xs,UTTERANCE_CLASS:()=>Yc,appendCanonicalisedFromEdges:()=>qk,appendFact:()=>Vk,appendFacts:()=>yr,appendRule:()=>al,appendUtterance:()=>Gk,appendUtterances:()=>sm,closeSqliteMemoryStore:()=>Yf,createInMemoryStore:()=>Ci,createSqliteMemoryStore:()=>Kf,emptyMemory:()=>gr,factIdForTriple:()=>he,findContradictions:()=>cm,findRuleByName:()=>cl,findRulesByName:()=>Jk,isMemoryOrSqliteHandle:()=>tl,loadMemory:()=>tn,loadSyllogiseState:()=>Ck,normFactPredicate:()=>Fn,normFactTerm:()=>ee,openConfiguredMemoryBackend:()=>as,openMemoryBackend:()=>Xf,provSourceClassFor:()=>Mk,provenanceTagToSource:()=>Wo,readFactRows:()=>Dt,readRuleRows:()=>ll,removeFacts:()=>Qk,resolveMemoryGraphFile:()=>fr,resolveRelationChase:()=>ul,resolveRelationChaseReverse:()=>rm,saveSyllogiseState:()=>Ik,snapshotMemory:()=>Rk});function gr(){return{generated_at:"",memory:!0,prefixes:{owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",mgx:"urn:tmct:mgx#",mgxneg:"urn:tmct:mgxneg#"},vocabulary:mk.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function fr(e,t=null){if(So(e)||Ls(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?Z(e,Kc):Z(e,hr,`graph.v${t}.json`)}function So(e){return!!e&&typeof e=="object"&&e.backend===el}function Ls(e){return!!e&&typeof e=="object"&&e.backend===Hf}function tl(e){return So(e)||Ls(e)}function Ci(){return{backend:el,payload:gr()}}function bk(){if(qf)return;qf=!0;let e=process.listeners("warning").slice();process.removeAllListeners("warning"),process.on("warning",t=>{if(!(t?.name==="ExperimentalWarning"&&/sqlite/i.test(String(t?.message))))if(e.length)for(let n of e)n(t);else console.error(t.stack||String(t))})}async function Kf(e){bk();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Of(),If)),n=new t(e);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(hk),{backend:Hf,db:n,dbPath:e}}function Yf(e){Ls(e)&&e.db.close()}async function Xf(e,t){if(t===el)return{dir:Ci(),close:async()=>{}};let n=Z(e,".tmct","memory","graph.sqlite"),s=r=>gu(r).then(()=>!0,()=>!1);!await s(n)&&await s(Z(e,Kc))&&process.stderr.write(`found .tmct/memory/graph.json \u2014 the flat-file memory backend is retired; starting a fresh sqlite store (the old file is left untouched)
107
- `),await Sn(ve(n),{recursive:!0});let o=await Kf(n);return{dir:o,close:async()=>Yf(o)}}async function as(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(_i(),Wf));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return Xf(e,n)}function wk(e){let t=e.db.prepare("PRAGMA data_version").get()?.data_version;return e.cachedPayload&&e.cachedDataVersion!==t&&(e.cachedPayload=null),e.cachedPayload||(e.cachedPayload=yk(e),e.cachedDataVersion=t),zn(e.cachedPayload)}function yk(e){let t=e.db,n=gr(),s=(a,l)=>{let c=t.prepare("SELECT v FROM meta WHERE k = ?").get(a);return c?JSON.parse(c.v):l},o=t.prepare("SELECT json FROM individuals ORDER BY ord").all().map(a=>JSON.parse(a.json)),r=t.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ? ORDER BY rowid"),i=t.prepare("SELECT prop, predicate, count FROM relations ORDER BY ord").all().map(a=>({predicate:a.predicate,prop:a.prop,count:a.count,examples:r.all(a.prop).map(l=>{let c={subject:l.subject,object:l.object,subjectLabel:l.subject_label,objectLabel:l.object_label};return l.extra&&Object.assign(c,JSON.parse(l.extra)),c})}));return{generated_at:s("generated_at",n.generated_at),memory:s("memory",n.memory),prefixes:s("prefixes",n.prefixes),vocabulary:s("vocabulary",n.vocabulary),classes:s("classes",n.classes),objectProperties:i,individuals:o,proseIndex:s("proseIndex",n.proseIndex)}}function vk(e,t){let n=zn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function $k(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function xk(e,t){let n=e.objectProperties.find(s=>s?.prop===t);return n||(n={predicate:null,prop:t,count:0,examples:[]},e.objectProperties.push(n)),n}function kk(e,t,n){let s=`${t.subject}\0${t.object}`;e.examples=e.examples.filter(r=>`${r.subject}\0${r.object}`!==s);let o={subject:t.subject,object:t.object,subjectLabel:t.subjectLabel??null,objectLabel:t.objectLabel??null};n.length&&Object.assign(o,zn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function Ek(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function Sk(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function jk(e,t){let n=e.db,s=gr(),o=e.cachedPayload||null;n.exec("BEGIN IMMEDIATE");try{let r=n.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)");r.run("generated_at",JSON.stringify(t.generated_at??s.generated_at)),r.run("memory",JSON.stringify(t.memory??s.memory)),r.run("prefixes",JSON.stringify(t.prefixes??s.prefixes)),r.run("vocabulary",JSON.stringify(t.vocabulary??s.vocabulary)),r.run("classes",JSON.stringify(t.classes??s.classes)),r.run("proseIndex",JSON.stringify(t.proseIndex??s.proseIndex)),o&&(o.generated_at=zn(t.generated_at??s.generated_at),o.memory=zn(t.memory??s.memory),o.prefixes=zn(t.prefixes??s.prefixes),o.vocabulary=zn(t.vocabulary??s.vocabulary),o.classes=zn(t.classes??s.classes),o.proseIndex=zn(t.proseIndex??s.proseIndex));let i=n.prepare("SELECT ord, json FROM individuals WHERE id = ?"),l=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM individuals").get().m+1,c=n.prepare("INSERT OR REPLACE INTO individuals(id, ord, class, label, json) VALUES (?, ?, ?, ?, ?)"),u=new Set;for(let $ of t.individuals||[]){u.add($.id);let j=JSON.stringify($),v=i.get($.id);if(v&&v.json===j)continue;let x=v?v.ord:l++;c.run($.id,x,$.class??null,$.label??null,j),o&&vk(o,$)}let d=n.prepare("DELETE FROM individuals WHERE id = ?");for(let $ of n.prepare("SELECT id FROM individuals").all())u.has($.id)||d.run($.id);o&&$k(o,u);let f=n.prepare("SELECT ord FROM relations WHERE prop = ?"),m=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,h=n.prepare("INSERT OR REPLACE INTO relations(prop, ord, predicate, count) VALUES (?, ?, ?, ?)"),g=n.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ?"),b=n.prepare("INSERT OR REPLACE INTO edges(prop, subject, object, subject_label, object_label, extra) VALUES (?, ?, ?, ?, ?, ?)"),y=n.prepare("DELETE FROM edges WHERE prop = ? AND subject = ? AND object = ?"),w=new Set;for(let $ of t.objectProperties||[]){w.add($.prop);let j=g.all($.prop),v=new Map(j.map(S=>[`${S.subject}\0${S.object}`,S])),x=new Set,k=o?xk(o,$.prop):null;for(let S of $.examples||[]){let A=`${S.subject}\0${S.object}`;x.add(A);let L=Object.keys(S).filter(Y=>!gk.has(Y)),T=L.length?JSON.stringify(Object.fromEntries(L.map(Y=>[Y,S[Y]]))):null,P=v.get(A);P&&(P.subject_label??null)===(S.subjectLabel??null)&&(P.object_label??null)===(S.objectLabel??null)&&(P.extra??null)===(T??null)||(b.run($.prop,S.subject,S.object,S.subjectLabel??null,S.objectLabel??null,T),k&&kk(k,S,L))}for(let S of v.keys()){if(x.has(S))continue;let[A,L]=S.split("\0");y.run($.prop,A,L)}k&&Ek(k,x);let _=Number.isFinite($.count)?$.count:($.examples||[]).length,R=f.get($.prop)?.ord??m++;h.run($.prop,R,$.predicate??null,_),k&&(k.predicate=$.predicate??null,k.count=_)}for(let $ of n.prepare("SELECT prop FROM relations").all())w.has($.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run($.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run($.prop));o&&Sk(o,w),n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,r}}async function Jf(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await No(n,t),await Lr(n,e)}async function nl(e,t){await Jf(e,JSON.stringify(t))}async function Rk(e,{retentionVersions:t}={}){if(tl(e))throw new Error("snapshotMemory only supports the flat-JSON backend (Backend A) \u2014 a memory/sqlite handle has no on-disk graph.json to snapshot");let n=fr(e),s;try{s=await Be(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=_k(e),r;try{r=JSON.parse(await Be(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??Vc}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??Vc);let i=r.version,a=fr(e,i);await Sn(ve(a),{recursive:!0}),await Jf(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await aa(fr(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await nl(o,r),{skipped:!1,version:i,prunedVersion:l}}async function tn(e){if(So(e))return Wc(e.payload);if(Ls(e))return Wc(wk(e));let t;try{t=await Be(qc(e),"utf8")}catch(n){if(n?.code==="ENOENT")return gr();throw n}return Wc(JSON.parse(t))}function Wc(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==is||!Ak.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=cr(o("subject"),o("predicate"),o("object"));r!==s.id&&(t.set(s.id,r),s.id=r)}if(!t.size)return e;let n=s=>t.get(s)||s;for(let s of e.objectProperties||[])for(let o of s.examples||[])o&&(t.has(o.subject)&&(o.subject=t.get(o.subject)),t.has(o.object)&&(o.object=t.get(o.object)));for(let s of e.individuals){Array.isArray(s?.derived_from)&&s.derived_from.length&&(s.derived_from=s.derived_from.map(n));let o=(s?.attributes||[]).find(r=>r?.prop==="mgx:factJustification");o?.value&&(o.value=o.value.split(" | ").map(r=>r.split(" ").filter(Boolean).map(n).join(" ")).filter(Boolean).join(" | "))}return e}async function Tk(e,t){if(So(e)){e.payload=t;return}if(Ls(e)){jk(e,t);return}await Sn(ve(qc(e)),{recursive:!0}),await nl(qc(e),t)}async function Ck(e){if(So(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Ls(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(Zf);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await Be(Z(e,sl),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function Ik(e,t){if(So(e)){e.syllogiseState=structuredClone(t);return}if(Ls(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(Zf,JSON.stringify(t));return}let n=Z(e,sl);await Sn(ve(n),{recursive:!0}),await nl(n,t)}function Ok(e){let t=new Map,n=new Map,s=new Map;for(let r of e.individuals||[])r?.id&&(t.set(r.id,r),r.class===ko&&n.set(r.id,r));let o=(e.objectProperties||[]).find(r=>r?.prop===Bn);for(let r of o?.examples||[]){if(!r?.subject)continue;let i=s.get(r.subject);i?i.push(r.object):s.set(r.subject,[r.object])}return e[Hc]={individualsById:t,sourcesById:n,statedByBySubject:s},e[Hc]}async function Ms(e,t){let n=await tn(e);Ok(n);let s=await t(n)??n;return zk(s),Uk(s),s.proseIndex=Nu(s.individuals),await Tk(e,s),s}function br(e,t){return e?.attributes?.find(n=>n?.prop===Nt)?.value||t||Ai()}function mr(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function Lk(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${Ri}:${e.sessionId}`:Ri,type:"operator"};case"teach":return{id:e.sessionId?`${Gc}:${e.sessionId}`:Gc,type:"teach"};case"provider":return{id:`src:provider:${e.name}`,type:"provider"};case"corpus":return{id:`src:corpus:${e.name}`,type:"corpus"};case"corpusWeak":return{id:`src:corpus-weak:${e.name}`,type:"corpusWeak"};case"reference":return{id:`src:reference:${e.pack}:${e.article}`,type:"reference"};case"referenceLive":return{id:`src:reference:${e.pack}:${e.article}`,type:"referenceLive"};case"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"optimisticExtract":return{id:`src:optimistic-extract:${e.name}`,type:"optimisticExtract"};case"web":return{id:`src:learned:web:${ar(String(e.url||""))}`,type:"web",url:String(e.url||"")};case"entailed":return{id:`src:entailed:${e.rule}`,type:"entailed",rule:String(e.rule||"")};default:return null}}function Mk(e){return Nk[e]||null}function Pk(e,t,n){let s=Lk(t);if(!s)return null;let o=Ns(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=br(r,t?.createdAt||n),a={id:s.id,label:em(s.id),class:ko,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:Nt,key:"createdAt",value:i},...s.url?[{prop:"mgx:sourceUrl",key:"sourceUrl",value:s.url}]:[],...s.rule?[{prop:"mgx:sourceRule",key:"sourceRule",value:s.rule}]:[]]},l=wr(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function Fk(e){let t=Ns(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===ko&&(n[s.id]=s);return n}function Dk(e,t){let n=Ns(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===Bn)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function tm(e,t,n=Date.now(),s={}){let o=Dk(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===Nt)?.value||"",{score:i,inputs:a}=Bu({sourceIds:o,createdAt:r},Fk(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});mr(t,Fr,"trustScore",String(i)),mr(t,ba,"trustInputs",JSON.stringify(a)),mr(t,xs,"updatedAt",new Date(n).toISOString())}function Oi(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===Nt)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=Wo(i);if(!a)continue;let l=Pk(e,a,r);l&&Ti(e,{predicate:"statedBy",prop:Bn},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:em(l)})}tm(e,t,n,s)}function zk(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===Bn),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==is||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(Oi(e,r,o),s=!0);s&&Ps(e)}function Uk(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=Dt(e),n=new Set;for(let a of cm(e))for(let l of a)n.add(l.id);let s=new Map;for(let a of t)for(let l of a.sourceIds){if(!Bk(l))continue;let c=s.get(l)||{factsAsserted:0,factsContradicted:0};c.factsAsserted+=1,n.has(a.id)&&(c.factsContradicted+=1),s.set(l,c)}if(!s.size)return;let o=Ns(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(mr(c,Vf,"sourceReliability",String(Uu(l))),mr(c,xs,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===Bn),i=new Set;for(let a of r?.examples||[])s.has(a?.object)&&i.add(a.subject);for(let a of i){let l=o?o.individualsById.get(a):e.individuals.find(c=>c?.id===a);l&&tm(e,l)}}function wr(e,t){let n=Ns(e);if(n){let o=n.individualsById.get(t.id);return o?(Object.assign(o,t),o):(e.individuals.push(t),n.individualsById.set(t.id,t),t)}let s=e.individuals.findIndex(o=>o?.id===t.id);return s>=0?(e.individuals[s]=t,t):(e.individuals.push(t),t)}function Ti(e,{predicate:t,prop:n},s){let o=e.objectProperties.find(l=>l?.prop===n);o||(o={predicate:t,prop:n,count:0,examples:[]},e.objectProperties.push(o));let r=n===Bn?Ns(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||Ai()}),o.count=o.examples.length,l?l.push(s.object):r.statedByBySubject.set(s.subject,[s.object]);return}}let a=(o.examples||[]).find(l=>l?.subject===s.subject&&l?.object===s.object)?.createdAt||s.createdAt||Ai();if(o.examples=(o.examples||[]).filter(l=>!(l?.subject===s.subject&&l?.object===s.object)),o.examples.push({...s,createdAt:a}),o.count=o.examples.length,r){let l=r.statedByBySubject.get(s.subject)||[];l.includes(s.object)||l.push(s.object),r.statedByBySubject.set(s.subject,l)}}function Ps(e){let t=[Xc,Yc,is,ko,Eo];e.classes=e.classes.filter(n=>!t.includes(n?.name));for(let n of t){let s=e.individuals.filter(o=>o?.class===n);s.length&&e.classes.push({name:n,count:s.length,sample:s.slice(0,3).map(o=>o.label)})}}function Wk(e,t,n=""){let s=`session:${t}`;return e.individuals.some(o=>o?.id===s)||e.individuals.push({id:s,label:String(t).slice(0,8),class:Xc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Nt,key:"createdAt",value:n||Ai()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function nm(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!fk.has(t))throw new Error(`utterance role must be "visitor" or "tmct", got ${JSON.stringify(t)}`);if(!o)throw new Error("utterance needs a sessionId");let c=String(s||""),u=Pn(n),d=`utt:${o}#${c}#${t}`,f=Ii(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=Pr({doc:u}),m=e.individuals.find(y=>y?.id===d),h=br(m,l||c),g={id:d,label:f,class:Yc,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:utteranceRole",key:"role",value:t},{prop:"mgx:utteranceText",key:"text",value:u},{prop:"mgx:utteranceTs",key:"ts",value:c},{prop:Nt,key:"createdAt",value:h},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};wr(e,g);let b=Wk(e,o,r);if(Ti(e,{predicate:"saidInSession",prop:Jc},{subject:d,object:b,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&Ti(e,{predicate:"inReplyTo",prop:Qc},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function Gk(e,t){let n;return await Ms(e,s=>{n=nm(s,t),Ps(s)}),{id:n}}async function sm(e,t){let n=[];return t?.length?(await Ms(e,s=>{for(let o of t)n.push(nm(s,o));Ps(s)}),{ids:n}):{ids:n}}async function qk(e,t){t?.length&&await Ms(e,n=>{for(let s of t)Ti(n,{predicate:"canonicalisedFrom",prop:Zc},{subject:s.factId,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}async function Vk(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",quantifier:i="",premiseTrusts:a,ruleConfidence:l}={}){let c=ee(t),u=Fn(n),d=ee(s);if(!c||!u||!d)throw new Error("a fact needs subject, predicate and object");let f=cr(c,u,d),p=`${c} ${u} ${d}`,m=Pr({doc:p}),h=Pn(i);return await Ms(e,async g=>{let b=g.individuals.find(k=>k?.id===f),y=b?.attributes?.find(k=>k?.prop==="mgx:factProvenance")?.value||"",w=[...new Set([...y.split(" | "),Pn(o)].filter(Boolean))],$=br(b,r),j=b?.attributes?.find(k=>k?.prop==="mgx:factQuantifier")?.value||"",v=h||j,x={id:f,label:Ii(p),class:is,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:c},{prop:"rdf:predicate",key:"predicate",value:u},{prop:"rdf:object",key:"object",value:d},{prop:Nt,key:"createdAt",value:$},...w.length?[{prop:"mgx:factProvenance",key:"provenance",value:w.join(" | ")}]:[],...m.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:m.join(" ")}]:[],...v?[{prop:"mgx:factQuantifier",key:"quantifier",value:v}]:[]]};await Pc(x),wr(g,x),Oi(g,g.individuals.find(k=>k?.id===f),void 0,{premiseTrusts:a,ruleConfidence:l}),Ps(g)}),{id:f}}function Hk(e){if(!Array.isArray(e))return;let t=e.some(Array.isArray)?e.filter(Array.isArray):[e],n=[],s=new Set;for(let o of t){let r=o.filter(a=>typeof a=="string"&&a);if(!r.length)continue;let i=[...r].sort().join(" ");s.has(i)||(s.add(i),n.push(r))}return n.length?n:void 0}async function yr(e,t){let n=[],s=0;for(let r of t||[]){let i=ee(r?.subject),a=Fn(r?.predicate),l=ee(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:cr(i,a,l),s:i,p:a,o:l,text:c,tokens:Pr({doc:c}),provenance:Pn(r?.provenance),createdAt:r?.createdAt||"",quantifier:Pn(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:Hk(r?.justification)})}let o=[];return n.length?(await Ms(e,r=>{let i=Ns(r),a=i?i.individualsById:new Map(r.individuals.map(d=>[d?.id,d])),l=[],c=new Set,u=new Map;for(let d of n){let f=a.get(d.id),p=f?.attributes?.find($=>$?.prop==="mgx:factProvenance")?.value||"",m=[...new Set([...p.split(" | "),d.provenance].filter(Boolean))],h=br(f,d.createdAt),g=f?.attributes?.find($=>$?.prop==="mgx:factQuantifier")?.value||"",b=d.quantifier||g,y={id:d.id,label:Ii(d.text),class:is,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:d.s},{prop:"rdf:predicate",key:"predicate",value:d.p},{prop:"rdf:object",key:"object",value:d.o},{prop:Nt,key:"createdAt",value:h},...m.length?[{prop:"mgx:factProvenance",key:"provenance",value:m.join(" | ")}]:[],...d.tokens.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:d.tokens.join(" ")}]:[],...b?[{prop:"mgx:factQuantifier",key:"quantifier",value:b}]:[],...d.environments?[{prop:"mgx:factJustification",key:"justification",value:d.environments.map($=>$.join(" ")).join(" | ")}]:[]]},w=wr(r,y);a.set(d.id,w),o.push(d.id),c.has(d.id)||(c.add(d.id),l.push(d.id)),(d.premiseTrusts!==void 0||d.ruleConfidence!==void 0)&&u.set(d.id,{premiseTrusts:d.premiseTrusts,ruleConfidence:d.ruleConfidence})}for(let d of l)Oi(r,a.get(d),void 0,u.get(d));Ps(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function al(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=om[n];if(!i)throw new Error(`a rule kind must be one of ${Kk.join(", ")}, got ${JSON.stringify(n)}`);let a=ee(t);if(!a)throw new Error("a rule needs a name");let l=Yk[n]||new Set,c=i.map(([p])=>ee(s?.[p])),u=i.filter(([p],m)=>!l.has(p)&&!c[m]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===xr){let p=c[i.findIndex(([h])=>h==="objectRole")],m=c[i.findIndex(([h])=>h==="value")];if(!p&&!m)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=Xk(n,a,c),f=Ii(`${a} = ${n}(${c.join(", ")})`);return await Ms(e,async p=>{let m=p.individuals.find(w=>w?.id===d),h=m?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",g=[...new Set([...h.split(" | "),Pn(o)].filter(Boolean))],b=br(m,r),y={id:d,label:f,class:Eo,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Ni,key:"ruleName",value:a},{prop:jo,key:"ruleKind",value:n},...i.map(([w,$],j)=>({prop:$,key:w,value:c[j],skip:!c[j]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...$})=>$),{prop:Nt,key:"createdAt",value:b},...g.length?[{prop:"mgx:factProvenance",key:"provenance",value:g.join(" | ")}]:[]]};await Pc(y),wr(p,y),Oi(p,p.individuals.find(w=>w?.id===d)),Ps(p)}),{id:d}}function cl(e,t){let n=ee(t);return(e?.individuals||[]).find(s=>s?.class===Eo&&(s.attributes||[]).find(o=>o?.prop===Ni)?.value===n)}function Jk(e,t){let n=ee(t),s=o=>(o.attributes||[]).find(r=>r?.prop===jo)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===Eo&&(o.attributes||[]).find(r=>r?.prop===Ni)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function ll(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==Eo)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(jo),r=om[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(Ni)||"",kind:o,slots:i,provenance:s("mgx:factProvenance")||""})}return t.sort((n,s)=>n.name.localeCompare(s.name)||n.kind.localeCompare(s.kind)||String(n.id).localeCompare(String(s.id))),t}async function ul(e,t,n,s,o){let{relationFactsFor:r,renderFactLine:i,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:f}=o,p=String(t||"").trim().toLowerCase(),m=l(ee,n),h=l(ee,s),g=r(p).filter(w=>m.has(w.fact.subject)&&h.has(w.fact.object));if(g.length){let w=g.slice().sort(($,j)=>c($.fact,j.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map($=>`${a($)}${$.provenance?` (source: ${$.provenance})`:""}`)]}}let b=cl(e,p),y=b?.attributes?.find(w=>w.prop===jo)?.value;if(b&&y===vr){let w=b.attributes.find(L=>L.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(L=>L.prop==="mgx:ruleBase2")?.value,j=ee(n),v=ee(s);if(!w||!$||!j||!v)return null;let R=f({entity:j,hopsTaken:0},L=>L.hopsTaken===2&&L.entity===v,L=>{if(L.hopsTaken>=2)return[];let T=L.hopsTaken===0?w:$;return r(T).filter(P=>P.fact.subject===L.entity).map(P=>({action:P,nextState:{entity:P.fact.object,hopsTaken:L.hopsTaken+1}}))},{maxDepth:2,stateKey:L=>`${L.entity}#${L.hopsTaken}`});if(!R)return null;let S=new Set,A=[];for(let L of R.actions){A.push(i(L.fact));for(let T of L.aliasFacts){let P=T.id||`${T.subject}|${T.predicate}|${T.object}`;S.has(P)||(S.add(P),A.push(`${a(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{citation:A}}if(b&&y===$r){let w=b.attributes.find(_=>_.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(_=>_.prop==="mgx:ruleFilterProperty")?.value;if(!w||!$)return null;let j=await ul(e,w,n,s,o);if(!j)return null;let v=ee(n),x=ee($),k=u.find(_=>_.predicate===d&&_.subject===v&&ee(_.object)===x);return k?{citation:[...j.citation,i(k)]}:null}return null}async function rm(e,t,n,s){let{relationFactsFor:o,renderFactLine:r,factPhrase:i,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,f=String(t||"").trim().toLowerCase(),p=a(ee,n),m=o(f).filter(b=>p.has(b.fact.object));if(m.length){let b=new Map;for(let y of m)b.has(y.fact.subject)||b.set(y.fact.subject,[]),b.get(y.fact.subject).push(y);return[...b.entries()].map(([y,w])=>{let $=w.slice().sort((j,v)=>l(j.fact,v.fact))[0];return{subject:y,citation:[r($.fact),...$.aliasFacts.map(j=>`${i(j)}${j.provenance?` (source: ${j.provenance})`:""}`)]}})}let h=cl(e,f),g=h?.attributes?.find(b=>b.prop===jo)?.value;if(h&&g===vr){let b=h.attributes.find(x=>x.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(x=>x.prop==="mgx:ruleBase2")?.value,w=ee(n);return!b||!y||!w?[]:d({entity:w,hopsTaken:0},x=>{if(x.hopsTaken>=2)return[];let k=x.hopsTaken===0?y:b;return o(k).filter(_=>_.fact.object===x.entity).map(_=>({action:_,nextState:{entity:_.fact.subject,hopsTaken:x.hopsTaken+1}}))},{maxDepth:2,stateKey:x=>`${x.entity}#${x.hopsTaken}`}).filter(x=>x.node.hopsTaken===2).map(({node:x,path:k})=>{let _=new Set,R=[];for(let S of k.actions.slice().reverse()){R.push(r(S.fact));for(let A of S.aliasFacts){let L=A.id||`${A.subject}|${A.predicate}|${A.object}`;_.has(L)||(_.add(L),R.push(`${i(A)}${A.provenance?` (source: ${A.provenance})`:""}`))}}return{subject:x.entity,citation:R}})}if(h&&g===$r){let b=h.attributes.find(v=>v.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(v=>v.prop==="mgx:ruleFilterProperty")?.value;if(!b||!y)return[];let w=await rm(e,b,n,s),$=ee(y),j=[];for(let v of w){let x=ee(v.subject),k=c.find(_=>_.predicate===u&&_.subject===x&&ee(_.object)===$);k&&j.push({subject:v.subject,citation:[...v.citation,r(k)]})}return j}return[]}function Dt(e){let t=e?.individuals||[],n=new Map(t.filter(i=>i?.class===ko).map(i=>[i.id,i])),s=(e?.objectProperties||[]).find(i=>i?.prop===Bn),o=new Map;for(let i of s?.examples||[])o.has(i.subject)||o.set(i.subject,[]),o.get(i.subject).push(i.object);let r=[];for(let i of t){if(i?.class!==is)continue;let a=m=>(i.attributes||[]).find(h=>h?.key===m)?.value||"",l=o.get(i.id)||[],c=l.map(m=>(n.get(m)?.attributes||[]).find(h=>h?.prop==="mgx:sourceType")?.value).filter(Boolean),u=a("justification"),d=[];if(u)for(let m of u.split(" | ")){let h=m.split(" ").filter(Boolean);h.length&&d.push(h)}let f=[],p=new Set;for(let m of d)for(let h of m)p.has(h)||(p.add(h),f.push(h));r.push({id:i.id,subject:a("subject"),predicate:a("predicate"),object:a("object"),provenance:a("provenance"),quantifier:a("quantifier"),sourceIds:l,sourceTypes:c,trust:Number((i.attributes||[]).find(m=>m?.prop===Fr)?.value)||0,environments:d,justification:f})}return r}async function Qk(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await Ms(e,o=>{if(o.individuals=(o.individuals||[]).filter(i=>i?.class===is&&n.has(i.id)?(s.push(i.id),!1):!0),!s.length)return;let r=new Set(s);for(let i of o.objectProperties||[]){let a=i.examples||[];i.examples=a.filter(l=>!r.has(l?.subject)&&!r.has(l?.object)),i.count=i.examples.length}Ps(o)}),{removed:s}):{removed:s}}function cm(e,{floor:t=Zk}={}){let n=Dt(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(am.has(r.predicate))continue;let i=`${r.subject} ${r.predicate}`;s.has(i)||s.set(i,[]),s.get(i).push(r)}let o=[];for(let r of s.values())new Set(r.map(i=>i.object)).size>1&&o.push(r.slice().sort((i,a)=>a.trust-i.trust||i.object.localeCompare(a.object)));return o.sort((r,i)=>`${r[0].subject} ${r[0].predicate}`.localeCompare(`${i[0].subject} ${i[0].predicate}`))}var hr,Kc,Yc,is,Xc,ko,Eo,Jc,Qc,pk,Bn,Zc,Vf,Ri,Gc,fk,Gf,mk,qc,el,Hf,hk,gk,qf,zn,Qf,Vc,_k,Ak,sl,Zf,Hc,Ns,Ii,Ai,em,Nk,Bk,vr,$r,ol,rl,Li,xr,il,Kk,Ni,jo,om,Yk,Xk,Zk,Fs,im,am,He=M(()=>{yt();ze();Kn();Zt();Zt();ks();ks();Mc();Cf();hr=Z(".tmct","memory"),Kc=Z(hr,"graph.json"),Yc="Utterance",is="Fact",Xc="Session",ko="Source",Eo="Rule",Jc="mgx:saidInSession",Qc="mgx:inReplyTo",pk="mgx:derivedFrom",Bn="mgx:statedBy",Zc="mgx:canonicalisedFrom",Vf="mgx:sourceReliability",Ri="src:operator-chat",Gc="src:teach-chat",fk=new Set(["visitor","tmct"]),Gf=48,mk=[{prop:"rdf:type",note:"rdf-ish typing attribute: owl:NamedIndividual (utterances/sessions) or rdf:Statement (reified facts)"},{prop:"mgx:utteranceRole",note:"who said it: visitor (an a-visitor-said item) or tmct (the response alongside it)"},{prop:"mgx:utteranceText",note:"the utterance's normalized text (capped)"},{prop:"mgx:utteranceTs",note:"when it was said, ISO-8601 (the chat turn timestamp)"},{prop:"mgx:utteranceParsed",note:"optional JSON of the parse the interpretation pipeline produced for this request"},{prop:Jc,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:Qc,predicate:"inReplyTo",note:"tmct Utterance \u2192 the visitor Utterance it answers (the Q/A pairing)"},{prop:"rdf:subject",note:"reified fact: the triple's subject term"},{prop:"rdf:predicate",note:"reified fact: the triple's predicate term"},{prop:"rdf:object",note:"reified fact: the triple's object term"},{prop:"mgx:factProvenance",note:"LEGACY COMPAT SHIM: the ' | '-joined provenance tag string a fact came from; the source-of-truth is now the mgx:statedBy edges derived from it"},{prop:"mgx:factQuantifier",note:"OPTIONAL: the quantifier word a plural class-membership teach used ('every'/'some'/'a few'), for literal recall by 'how many Xs are Ys' \u2014 never real cardinality counting"},{prop:"mgx:factJustification",note:"an entailed Fact's supporting premise fact ids: ' | '-separated environments, one space-separated premise-id list per independent derivation, capped by syllogise's maxEnvironments knob; a value with no ' | ' is a single environment"},{prop:"mgx:ruleName",note:"a taught Rule's own name (e.g. 'grandparent') \u2014 the query-dispatcher's lookup key, PLAN_TAUGHT_RELATIONS.md \xA72/\xA73"},{prop:"mgx:ruleKind",note:"a taught Rule's SHAPE tag \u2014 the closed vocabulary compose2 | filter | recursive (structural, like 'Fact'/'Rule' themselves, never a domain word)"},{prop:"mgx:ruleBase1",note:"compose2: the first hop's base relation name; filter: the base rule/relation being filtered (same 'base relation' role in both kinds, so the name is shared)"},{prop:"mgx:ruleBase2",note:"compose2 only: the second hop's base relation name"},{prop:"mgx:ruleFilterProperty",note:"filter only: the property literal candidates are filtered by (an mgx:hasProperty-shaped Fact lookup)"},{prop:"mgx:ruleBaseCase",note:"recursive only: the base-case relation name (hop zero)"},{prop:"mgx:ruleRecStep",note:"recursive only: the self-referential recursive-step relation name"},{prop:Nt,note:"when an individual was FIRST written, ISO-8601 (first-write-wins on upsert); the audit 'when', the recency input to trust, the novelty signal"},{prop:xs,note:"an audit / last-modified stamp: when an individual's OWN attributes were last mutated in place (upsertSession, recomputeFactTrust, recomputeSourceReliability) \u2014 most individuals never carry it at all. NOT transaction time: a mutable stamp cannot record when the previous version stopped being current, so tmct is not bitemporal"},{prop:pk,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:Bn,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:Zc,predicate:"canonicalisedFrom",note:"subPropertyOf derivedFrom: a canonical Fact cleaned from a raw Block/Source, never replacing it"},{prop:"mgx:sourceType",note:"a Source's kind: operator | teach | provider | corpus | corpusWeak | reference | referenceLive | extracted | optimisticExtract | web | entailed (the trust-prior key)"},{prop:"mgx:sourceUrl",note:"a web Source's URL"},{prop:"mgx:sourceRule",note:"an entailed Source's rule id"},{prop:"mgx:sourceReliability",note:"actor-level (session-scoped) trust nudge in [0.5,1.5], neutral 1.0 when absent \u2014 materialised by recomputeSourceReliability from a session's asserted-vs-contradicted track record (memory/trust.mjs's sessionReliabilityFrom); folds into computeTrust's per-source prior"},{prop:Fr,note:"materialised trust cache in [0,1] \u2014 pure function of a fact's Sources + createdAt (memory/trust.mjs); invalidated when a statedBy edge is added"},{prop:ba,note:"JSON of the inputs the trust score was computed from (source-type multiset, corroboration count, createdAt, recency) \u2014 makes the score auditable"},{prop:"mgx:hasProseTokens",note:"prose tokens (prose.mjs tokenizer) backing the payload's proseIndex"},{prop:"mgx:sessionStarted",note:"session anchor: when the session started, ISO-8601"},{prop:"rdf:predicate",prefix:go,note:"a reified fact's predicate carries its POLARITY: mgxneg:capableOf is the negative twin of mgx:capableOf ('a penguin cannot fly'). Polarity cannot be a separate property \u2014 the fact id hashes (subject, predicate, object), so both polarities would share one id and union their statedBy edges (memory/capability.mjs)"}];qc=e=>fr(e),el="memory",Hf="sqlite";hk=`
101
+ `))return r}}throw new me("cannot find end of structure",{toml:e,ptr:t})}var ji=L(()=>{Ns();});function eE(e,t,n){let s=e.slice(t,n),o=s.indexOf("#");return o>-1&&(jo(e,o),s=s.slice(0,o)),[s.trimEnd(),o]}function gr(e,t,n,s,o){if(s===0)throw new me("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let r=e[t];if(r==="["||r==="{"){let[l,c]=r==="["?em(e,t,s,o):Zf(e,t,s,o);if(n){if(c=kn(e,c),e[c]===",")c++;else if(e[c]!==n)throw new me("expected comma or end of structure",{toml:e,ptr:c})}return[l,c]}if(r==='"'||r==="'"){let[l,c]=Ei(e,t);if(n){if(c=kn(e,c),e[c]&&e[c]!==","&&e[c]!==n&&e[c]!==`
102
+ `&&e[c]!=="\r")throw new me("unexpected character encountered",{toml:e,ptr:c});e[c]===","&&c++}return[l,c]}let i=Qf(e,t,",",n),a=eE(e,t,i-(e[i-1]===","?1:0));if(!a[0])throw new me("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return n&&a[1]>-1&&(i=kn(e,t+a[1]),e[i]===","&&i++),[Jf(a[0],e,t,o),i]}var Hc=L(()=>{qc();Kc();ji();Ns();});function _i(e,t,n="="){let s=t-1,o=[],r=e.indexOf(n,t);if(r<0)throw new me("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let i=e[t=++s];if(i!==" "&&i!==" ")if(i==='"'||i==="'"){if(i===e[t+1]&&i===e[t+2])throw new me("multiline strings are not allowed in keys",{toml:e,ptr:t});let[a,l]=Ei(e,t);s=e.indexOf(".",l);let c=e.slice(l,s<0||s>r?r:s),u=Si(c);if(u>-1)throw new me("newlines are not allowed in keys",{toml:e,ptr:t+s+u});if(c.trimStart())throw new me("found extra tokens after the string part",{toml:e,ptr:l});if(r<l&&(r=e.indexOf(n,l),r<0))throw new me("incomplete key-value: cannot find end of key",{toml:e,ptr:t});o.push(a)}else{s=e.indexOf(".",t);let a=e.slice(t,s<0||s>r?r:s);if(!tE.test(a))throw new me("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});o.push(a.trimEnd())}}while(s+1&&s<r);return[o,kn(e,r+1,!0,!0)]}function Zf(e,t,n,s){let o={},r=new Set,i;for(t++;(i=e[t++])!=="}"&&i;){if(i===",")throw new me("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=jo(e,t);else if(i!==" "&&i!==" "&&i!==`
103
+ `&&i!=="\r"){let a,l=o,c=!1,[u,d]=_i(e,t-1);for(let m=0;m<u.length;m++){if(m&&(l=c?l[a]:l[a]={}),a=u[m],(c=Object.hasOwn(l,a))&&(typeof l[a]!="object"||r.has(l[a])))throw new me("trying to redefine an already defined value",{toml:e,ptr:t});!c&&a==="__proto__"&&Object.defineProperty(l,a,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new me("trying to redefine an already defined value",{toml:e,ptr:t});let[f,p]=gr(e,d,"}",n-1,s);r.add(f),l[a]=f,t=p}}if(!i)throw new me("unfinished table encountered",{toml:e,ptr:t});return[o,t]}function em(e,t,n,s){let o=[],r;for(t++;(r=e[t++])!=="]"&&r;){if(r===",")throw new me("expected value, found comma",{toml:e,ptr:t-1});if(r==="#")t=jo(e,t);else if(r!==" "&&r!==" "&&r!==`
104
+ `&&r!=="\r"){let i=gr(e,t-1,"]",n-1,s);o.push(i[0]),t=i[1]}}if(!r)throw new me("unfinished array encountered",{toml:e,ptr:t});return[o,t]}var tE,Kc=L(()=>{qc();Hc();ji();Ns();tE=/^[a-zA-Z0-9-_]+[ \t]*$/});function tm(e,t,n,s){let o=t,r=n,i,a=!1,l;for(let c=0;c<e.length;c++){if(c){if(o=a?o[i]:o[i]={},r=(l=r[i]).c,s===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=o.length-1;o=o[u],r=r[u].c}}if(i=e[c],(a=Object.hasOwn(o,i))&&r[i]?.t===0&&r[i]?.d)return null;a||(i==="__proto__"&&(Object.defineProperty(o,i,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,i,{enumerable:!0,configurable:!0,writable:!0})),r[i]={t:c<e.length-1&&s===2?3:s,d:!1,i:0,c:{}})}if(l=r[i],l.t!==s&&!(s===1&&l.t===3)||(s===2&&(l.d||(l.d=!0,o[i]=[]),o[i].push(o={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,s===1)o=a?o[i]:o[i]={};else if(s===0&&a)return null;return[i,o,l.c]}function _o(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let s={},o={},r=s,i=o;for(let a=kn(e,0);a<e.length;){if(e[a]==="["){let l=e[++a]==="[",c=_i(e,a+=+l,"]");if(l){if(e[c[1]-1]!=="]")throw new me("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let u=tm(c[0],s,o,l?2:1);if(!u)throw new me("trying to redefine an already defined table or value",{toml:e,ptr:a});i=u[2],r=u[1],a=c[1]}else{let l=_i(e,a),c=tm(l[0],r,i,0);if(!c)throw new me("trying to redefine an already defined table or value",{toml:e,ptr:a});let u=gr(e,l[1],void 0,t,n);c[1][c[0]]=u[0],a=u[1]}if(a=kn(e,a,!0),e[a]&&e[a]!==`
105
+ `&&e[a]!=="\r")throw new me("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:a});a=kn(e,a)}return s}var nm=L(()=>{Kc();Hc();ji();Ns();});var sm=L(()=>{});var Ri=L(()=>{nm();sm();Vc();Ns();});var im={};Sn(im,{CONFIG_FILE:()=>Ti,loadTomlConfig:()=>Yc,mergeEffective:()=>rm,normalizeConfig:()=>om});async function Yc(e,{file:t}={}){let n=t||Q(e,Ti),s;try{s=await Be(n,"utf8")}catch(o){if(o&&o.code==="ENOENT")return null;throw o}try{return _o(s)}catch(o){throw new Error(`Invalid ${Ti} at ${n}: ${o&&o.message?o.message:o}`)}}async function nE(e,t){let n;if(Array.isArray(e))n=e;else{let o=qt(t,String(e));n=(await Be(o,"utf8")).split(`
106
+ `)}let s=[];for(let o of n){let r=String(o).trim();!r||r.startsWith("#")||s.push(qt(t,r))}return s}async function om(e,{configDir:t}={}){let n=e||{},s=t||process.cwd(),o={};if(n.repositories!==void 0&&(o.repositories=await nE(n.repositories,s)),n.out_root!==void 0&&(o.outRoot=qt(s,String(n.out_root))),n.graph_file!==void 0&&(o.graphFile=qt(s,String(n.graph_file))),n.graph_files!==void 0){let w=Array.isArray(n.graph_files)?n.graph_files:[n.graph_files];o.graphFiles=w.map($=>qt(s,String($)))}let r=n.graph||{};r.read_only!==void 0&&(o.graph={readOnly:r.read_only});let i=n.corpus||{};i.tier!==void 0&&(o.corpus={tier:i.tier});let a=n.seed||{},l={};a.enabled!==void 0&&(l.enabled=a.enabled),a.limit!==void 0&&(l.limit=a.limit),a.capture_unknown_context!==void 0&&(l.captureUnknownContext=a.capture_unknown_context),a.unknown_context_limit!==void 0&&(l.unknownContextLimit=a.unknown_context_limit),Object.keys(l).length&&(o.seed=l),n.extensions!==void 0&&(o.extensions=n.extensions),n.bias!==void 0&&(o.bias=n.bias),n.games!==void 0&&(o.games=n.games),n.planning!==void 0&&(o.planning=n.planning),n.research!==void 0&&(o.research=n.research),n.discourse!==void 0&&(o.discourse=n.discourse);let c=n.index||{},u={};c.languages!==void 0&&(u.languages=c.languages),c.exclude!==void 0&&(u.exclude=c.exclude),c.secret_exclude!==void 0&&(u.secretExclude=c.secret_exclude),c.history_depth!==void 0&&(u.historyDepth=c.history_depth),c.include_text!==void 0&&(u.includeText=c.include_text),c.include_structure!==void 0&&(u.includeStructure=c.include_structure),c.respect_gitignore!==void 0&&(u.respectGitignore=c.respect_gitignore),c.markdown_sections!==void 0&&(u.markdownSections=c.markdown_sections),c.vue!==void 0&&(u.vue=c.vue),Object.keys(u).length&&(o.index=u);let d=n.tune||{},f={};d.score_gap_k!==void 0&&(f.scoreGapK=d.score_gap_k),d.literal_mention!==void 0&&(f.literalMention=d.literal_mention),d.demote_non_prod!==void 0&&(f.demoteNonProd=d.demote_non_prod),d.call_adjacency!==void 0&&(f.callAdjacency=d.call_adjacency),d.impl_of_interface!==void 0&&(f.implOfInterface=d.impl_of_interface),d.beam_search!==void 0&&(f.beamSearch=d.beam_search),d.beam_width!==void 0&&(f.beamWidth=d.beam_width),d.prose_layers!==void 0&&(f.proseLayers=d.prose_layers);let p=d.expansion||{},m={};p.strategy!==void 0&&(m.strategy=p.strategy),p.nodes!==void 0&&(m.nodes=p.nodes),p.q!==void 0&&(m.q=p.q),p.depth!==void 0&&(m.depth=p.depth),Object.keys(m).length&&(f.expansion=m),Object.keys(f).length&&(o.tune=f);let h=n.telemetry||{};h.enabled!==void 0&&(o.telemetry={enabled:h.enabled});let g=n.memory||{},b={};g.retention_versions!==void 0&&(b.retentionVersions=g.retention_versions),g.backend!==void 0&&(b.backend=g.backend),Object.keys(b).length&&(o.memory=b);let y=[];for(let[w,$]of sE)n[w]&&n[w][$]!==void 0&&y.push(`${w}.${$}`);return o.unwired=y,o}function Ai(e,t="",n={}){for(let[s,o]of Object.entries(e||{})){if(o==null)continue;let r=t?`${t}.${s}`:s;Array.isArray(o)||typeof o!="object"?n[r]=o:Ai(o,r,n)}return n}function rm({args:e={},toml:t=null,defaults:n={}}={}){let s=Ai(n),o=null;if(t){let{unwired:u,...d}=t;o=d}let r=o?Ai(o):{},i=Ai(e),a=[...new Set([...Object.keys(s),...Object.keys(r),...Object.keys(i)])].sort(),l={},c={};for(let u of a)u in i?(l[u]=i[u],c[u]="arg"):u in r?(l[u]=r[u],c[u]="tmct.toml"):(l[u]=s[u],c[u]="default");return{effective:l,sources:c}}var Ti,sE,Ci=L(()=>{kt();ze();Ri();Ti="tmct.toml";sE=[["index","include_text"],["index","include_structure"],["index","respect_gitignore"],["index","markdown_sections"],["index","vue"]]});var us={};Sn(us,{CANONICALISED_FROM_PROP:()=>il,CAPABLE_OF_PREDICATE:()=>km,CREATED_AT_PROP:()=>Pt,DEFAULT_RETENTION:()=>Zc,FACT_CLASS:()=>cs,HAS_A_PREDICATE:()=>zs,IN_REPLY_TO_PROP:()=>rl,MEMORY_DIR_REL:()=>yr,MEMORY_GRAPH_REL:()=>tl,MEMORY_MANIFEST_REL:()=>hm,MEMORY_SESSION_CLASS:()=>sl,MULTI_VALUED_PREDICATES:()=>Em,OPERATOR_SOURCE_ID:()=>Oi,RULE_CLASS:()=>Ao,RULE_KIND_ACTION_CONSTRAINT:()=>fl,RULE_KIND_ACTION_EFFECT:()=>jr,RULE_KIND_ACTION_PRECOND:()=>Fi,RULE_KIND_ACTION_SIGNATURE:()=>pl,RULE_KIND_COMPOSE2:()=>Er,RULE_KIND_FILTER:()=>Sr,RULE_KIND_PROP:()=>Co,RULE_KIND_RECURSIVE:()=>dl,SAID_IN_SESSION_PROP:()=>ol,SOURCE_CLASS:()=>Ro,SOURCE_RELIABILITY_PROP:()=>lm,STATED_BY_PROP:()=>Un,SYLLOGISE_STATE_REL:()=>ul,UPDATED_AT_PROP:()=>Es,UTTERANCE_CLASS:()=>nl,appendCanonicalisedFromEdges:()=>DE,appendFact:()=>zE,appendFacts:()=>kr,appendRule:()=>ml,appendUtterance:()=>FE,appendUtterances:()=>vm,applySeedPayload:()=>aE,cloneMemoryPayload:()=>cE,closeSqliteMemoryStore:()=>pm,createInMemoryStore:()=>Ni,createSqliteMemoryStore:()=>dm,emptyMemory:()=>vr,factIdForTriple:()=>ge,findContradictions:()=>Sm,findRuleByName:()=>hl,findRulesByName:()=>VE,isMemoryOrSqliteHandle:()=>cl,loadMemory:()=>Xt,loadSyllogiseState:()=>SE,normFactPredicate:()=>Dn,normFactTerm:()=>X,openConfiguredMemoryBackend:()=>ls,openMemoryBackend:()=>fm,provSourceClassFor:()=>TE,provenanceTagToSource:()=>Ho,readFactRows:()=>Ct,readRuleRows:()=>gl,removeFacts:()=>qE,resolveMemoryGraphFile:()=>br,resolveRelationChase:()=>bl,resolveRelationChaseReverse:()=>xm,saveSyllogiseState:()=>jE,snapshotMemory:()=>xE});function vr(){return{generated_at:"",memory:!0,prefixes:{owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",mgx:"urn:tmct:mgx#",mgxneg:"urn:tmct:mgxneg#"},vocabulary:iE.map(e=>({...e})),classes:[],objectProperties:[],individuals:[],proseIndex:{}}}function br(e,t=null){if(To(e)||Ms(e))throw new Error("resolveMemoryGraphFile: dir is a memory/sqlite handle, not a file path (Backend A only)");return t===null?Q(e,tl):Q(e,yr,`graph.v${t}.json`)}function To(e){return!!e&&typeof e=="object"&&e.backend===al}function Ms(e){return!!e&&typeof e=="object"&&e.backend===um}function cl(e){return To(e)||Ms(e)}function Ni(){return{backend:al,payload:vr()}}function aE(e,t){t&&(e.payload={...e.payload,...t})}function cE(e){if(!e)return null;try{return structuredClone(e)}catch{return JSON.parse(JSON.stringify(e))}}function dE(){if(cm)return;cm=!0;let e=process.listeners("warning").slice();process.removeAllListeners("warning"),process.on("warning",t=>{if(!(t?.name==="ExperimentalWarning"&&/sqlite/i.test(String(t?.message))))if(e.length)for(let n of e)n(t);else console.error(t.stack||String(t))})}async function dm(e){dE();let{DatabaseSync:t}=await Promise.resolve().then(()=>(Xf(),Yf)),n=new t(e);return n.exec("PRAGMA journal_mode = WAL"),n.exec("PRAGMA synchronous = NORMAL"),n.exec(lE),{backend:um,db:n,dbPath:e}}function pm(e){Ms(e)&&e.db.close()}async function fm(e,t){if(t===al)return{dir:Ni(),close:async()=>{}};let n=Q(e,".tmct","memory","graph.sqlite"),s=r=>Ru(r).then(()=>!0,()=>!1);!await s(n)&&await s(Q(e,tl))&&process.stderr.write(`found .tmct/memory/graph.json \u2014 the flat-file memory backend is retired; starting a fresh sqlite store (the old file is left untouched)
107
+ `),await jn(xe(n),{recursive:!0});let o=await dm(n);return{dir:o,close:async()=>pm(o)}}async function ls(e,t=process.env){let n=String(t?.TMCT_MEMORY_BACKEND||"").trim().toLowerCase();if(!n)try{let{loadTomlConfig:s}=await Promise.resolve().then(()=>(Ci(),im));n=String((await s(e))?.memory?.backend||"").trim().toLowerCase()}catch{n=""}return fm(e,n)}function pE(e){let t=e.db.prepare("PRAGMA data_version").get()?.data_version;return e.cachedPayload&&e.cachedDataVersion!==t&&(e.cachedPayload=null),e.cachedPayload||(e.cachedPayload=fE(e),e.cachedDataVersion=t),Bn(e.cachedPayload)}function fE(e){let t=e.db,n=vr(),s=(a,l)=>{let c=t.prepare("SELECT v FROM meta WHERE k = ?").get(a);return c?JSON.parse(c.v):l},o=t.prepare("SELECT json FROM individuals ORDER BY ord").all().map(a=>JSON.parse(a.json)),r=t.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ? ORDER BY rowid"),i=t.prepare("SELECT prop, predicate, count FROM relations ORDER BY ord").all().map(a=>({predicate:a.predicate,prop:a.prop,count:a.count,examples:r.all(a.prop).map(l=>{let c={subject:l.subject,object:l.object,subjectLabel:l.subject_label,objectLabel:l.object_label};return l.extra&&Object.assign(c,JSON.parse(l.extra)),c})}));return{generated_at:s("generated_at",n.generated_at),memory:s("memory",n.memory),prefixes:s("prefixes",n.prefixes),vocabulary:s("vocabulary",n.vocabulary),classes:s("classes",n.classes),objectProperties:i,individuals:o,proseIndex:s("proseIndex",n.proseIndex)}}function mE(e,t){let n=Bn(t),s=e.individuals.findIndex(o=>o?.id===t.id);s>=0?e.individuals[s]=n:e.individuals.push(n)}function hE(e,t){e.individuals=e.individuals.filter(n=>t.has(n?.id))}function gE(e,t){let n=e.objectProperties.find(s=>s?.prop===t);return n||(n={predicate:null,prop:t,count:0,examples:[]},e.objectProperties.push(n)),n}function bE(e,t,n){let s=`${t.subject}\0${t.object}`;e.examples=e.examples.filter(r=>`${r.subject}\0${r.object}`!==s);let o={subject:t.subject,object:t.object,subjectLabel:t.subjectLabel??null,objectLabel:t.objectLabel??null};n.length&&Object.assign(o,Bn(Object.fromEntries(n.map(r=>[r,t[r]])))),e.examples.push(o)}function wE(e,t){e.examples=e.examples.filter(n=>t.has(`${n.subject}\0${n.object}`))}function yE(e,t){e.objectProperties=e.objectProperties.filter(n=>t.has(n?.prop))}function vE(e,t){let n=e.db,s=vr(),o=e.cachedPayload||null;n.exec("BEGIN IMMEDIATE");try{let r=n.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)");r.run("generated_at",JSON.stringify(t.generated_at??s.generated_at)),r.run("memory",JSON.stringify(t.memory??s.memory)),r.run("prefixes",JSON.stringify(t.prefixes??s.prefixes)),r.run("vocabulary",JSON.stringify(t.vocabulary??s.vocabulary)),r.run("classes",JSON.stringify(t.classes??s.classes)),r.run("proseIndex",JSON.stringify(t.proseIndex??s.proseIndex)),o&&(o.generated_at=Bn(t.generated_at??s.generated_at),o.memory=Bn(t.memory??s.memory),o.prefixes=Bn(t.prefixes??s.prefixes),o.vocabulary=Bn(t.vocabulary??s.vocabulary),o.classes=Bn(t.classes??s.classes),o.proseIndex=Bn(t.proseIndex??s.proseIndex));let i=n.prepare("SELECT ord, json FROM individuals WHERE id = ?"),l=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM individuals").get().m+1,c=n.prepare("INSERT OR REPLACE INTO individuals(id, ord, class, label, json) VALUES (?, ?, ?, ?, ?)"),u=new Set;for(let $ of t.individuals||[]){u.add($.id);let j=JSON.stringify($),v=i.get($.id);if(v&&v.json===j)continue;let E=v?v.ord:l++;c.run($.id,E,$.class??null,$.label??null,j),o&&mE(o,$)}let d=n.prepare("DELETE FROM individuals WHERE id = ?");for(let $ of n.prepare("SELECT id FROM individuals").all())u.has($.id)||d.run($.id);o&&hE(o,u);let f=n.prepare("SELECT ord FROM relations WHERE prop = ?"),m=n.prepare("SELECT COALESCE(MAX(ord), -1) AS m FROM relations").get().m+1,h=n.prepare("INSERT OR REPLACE INTO relations(prop, ord, predicate, count) VALUES (?, ?, ?, ?)"),g=n.prepare("SELECT subject, object, subject_label, object_label, extra FROM edges WHERE prop = ?"),b=n.prepare("INSERT OR REPLACE INTO edges(prop, subject, object, subject_label, object_label, extra) VALUES (?, ?, ?, ?, ?, ?)"),y=n.prepare("DELETE FROM edges WHERE prop = ? AND subject = ? AND object = ?"),w=new Set;for(let $ of t.objectProperties||[]){w.add($.prop);let j=g.all($.prop),v=new Map(j.map(x=>[`${x.subject}\0${x.object}`,x])),E=new Set,k=o?gE(o,$.prop):null;for(let x of $.examples||[]){let T=`${x.subject}\0${x.object}`;E.add(T);let M=Object.keys(x).filter(J=>!uE.has(J)),A=M.length?JSON.stringify(Object.fromEntries(M.map(J=>[J,x[J]]))):null,P=v.get(T);P&&(P.subject_label??null)===(x.subjectLabel??null)&&(P.object_label??null)===(x.objectLabel??null)&&(P.extra??null)===(A??null)||(b.run($.prop,x.subject,x.object,x.subjectLabel??null,x.objectLabel??null,A),k&&bE(k,x,M))}for(let x of v.keys()){if(E.has(x))continue;let[T,M]=x.split("\0");y.run($.prop,T,M)}k&&wE(k,E);let _=Number.isFinite($.count)?$.count:($.examples||[]).length,R=f.get($.prop)?.ord??m++;h.run($.prop,R,$.predicate??null,_),k&&(k.predicate=$.predicate??null,k.count=_)}for(let $ of n.prepare("SELECT prop FROM relations").all())w.has($.prop)||(n.prepare("DELETE FROM edges WHERE prop = ?").run($.prop),n.prepare("DELETE FROM relations WHERE prop = ?").run($.prop));o&&yE(o,w),n.exec("COMMIT")}catch(r){throw n.exec("ROLLBACK"),e.cachedPayload=void 0,r}}async function mm(e,t){let n=`${e}.tmp-${process.pid}-${Math.random().toString(36).slice(2,10)}`;await Do(n,t),await Fr(n,e)}async function ll(e,t){await mm(e,JSON.stringify(t))}async function xE(e,{retentionVersions:t}={}){if(cl(e))throw new Error("snapshotMemory only supports the flat-JSON backend (Backend A) \u2014 a memory/sqlite handle has no on-disk graph.json to snapshot");let n=br(e),s;try{s=await Be(n,"utf8")}catch(u){if(u?.code==="ENOENT")return{skipped:!0,version:null,prunedVersion:null};throw u}let o=$E(e),r;try{r=JSON.parse(await Be(o,"utf8"))}catch(u){if(u?.code!=="ENOENT")throw u;r={version:0,retentionVersions:t??Zc}}Number.isInteger(r.version)||(r.version=0),Number.isInteger(r.retentionVersions)||(r.retentionVersions=t??Zc);let i=r.version,a=br(e,i);await jn(xe(a),{recursive:!0}),await mm(a,s),r.version=i+1;let l=null,c=i-r.retentionVersions;if(c>=0)try{await pa(br(e,c)),l=c}catch(u){if(u?.code!=="ENOENT")throw u}return await ll(o,r),{skipped:!1,version:i,prunedVersion:l}}async function Xt(e){if(To(e))return Xc(e.payload);if(Ms(e))return Xc(pE(e));let t;try{t=await Be(Qc(e),"utf8")}catch(n){if(n?.code==="ENOENT")return vr();throw n}return Xc(JSON.parse(t))}function Xc(e){if(!Array.isArray(e?.individuals))return e;let t=new Map;for(let s of e.individuals){if(s?.class!==cs||!kE.test(s.id||""))continue;let o=i=>(s.attributes||[]).find(a=>a?.key===i)?.value||"",r=pr(o("subject"),o("predicate"),o("object"));r!==s.id&&(t.set(s.id,r),s.id=r)}if(!t.size)return e;let n=s=>t.get(s)||s;for(let s of e.objectProperties||[])for(let o of s.examples||[])o&&(t.has(o.subject)&&(o.subject=t.get(o.subject)),t.has(o.object)&&(o.object=t.get(o.object)));for(let s of e.individuals){Array.isArray(s?.derived_from)&&s.derived_from.length&&(s.derived_from=s.derived_from.map(n));let o=(s?.attributes||[]).find(r=>r?.prop==="mgx:factJustification");o?.value&&(o.value=o.value.split(" | ").map(r=>r.split(" ").filter(Boolean).map(n).join(" ")).filter(Boolean).join(" | "))}return e}async function EE(e,t){if(To(e)){e.payload=t;return}if(Ms(e)){vE(e,t);return}await jn(xe(Qc(e)),{recursive:!0}),await ll(Qc(e),t)}async function SE(e){if(To(e))return e.syllogiseState?structuredClone(e.syllogiseState):null;if(Ms(e)){let t=e.db.prepare("SELECT v FROM meta WHERE k = ?").get(gm);return t?.v?JSON.parse(t.v):null}try{return JSON.parse(await Be(Q(e,ul),"utf8"))}catch(t){if(t?.code==="ENOENT")return null;throw t}}async function jE(e,t){if(To(e)){e.syllogiseState=structuredClone(t);return}if(Ms(e)){e.db.prepare("INSERT OR REPLACE INTO meta(k, v) VALUES (?, ?)").run(gm,JSON.stringify(t));return}let n=Q(e,ul);await jn(xe(n),{recursive:!0}),await ll(n,t)}function _E(e){let t=new Map,n=new Map,s=new Map;for(let r of e.individuals||[])r?.id&&(t.set(r.id,r),r.class===Ro&&n.set(r.id,r));let o=(e.objectProperties||[]).find(r=>r?.prop===Un);for(let r of o?.examples||[]){if(!r?.subject)continue;let i=s.get(r.subject);i?i.push(r.object):s.set(r.subject,[r.object])}return e[el]={individualsById:t,sourcesById:n,statedByBySubject:s},e[el]}async function Fs(e,t){let n=await Xt(e);_E(n);let s=await t(n)??n;return LE(s),ME(s),s.proseIndex=Yu(s.individuals),await EE(e,s),s}function $r(e,t){return e?.attributes?.find(n=>n?.prop===Pt)?.value||t||Ii()}function wr(e,t,n,s){e.attributes=(e.attributes||[]).filter(o=>o?.prop!==t),e.attributes.push({prop:t,key:n,value:s})}function RE(e){switch(e?.kind){case"operator":return{id:e.sessionId?`${Oi}:${e.sessionId}`:Oi,type:"operator"};case"teach":return{id:e.sessionId?`${Jc}:${e.sessionId}`:Jc,type:"teach"};case"provider":return{id:`src:provider:${e.name}`,type:"provider"};case"corpus":return{id:`src:corpus:${e.name}`,type:"corpus"};case"corpusWeak":return{id:`src:corpus-weak:${e.name}`,type:"corpusWeak"};case"reference":return{id:`src:reference:${e.pack}:${e.article}`,type:"reference"};case"referenceLive":return{id:`src:reference:${e.pack}:${e.article}`,type:"referenceLive"};case"extracted":return{id:`src:extracted:${e.name}`,type:"extracted"};case"optimisticExtract":return{id:`src:optimistic-extract:${e.name}`,type:"optimisticExtract"};case"web":return{id:`src:learned:web:${dr(String(e.url||""))}`,type:"web",url:String(e.url||"")};case"entailed":return{id:`src:entailed:${e.rule}`,type:"entailed",rule:String(e.rule||"")};default:return null}}function TE(e){return AE[e]||null}function CE(e,t,n){let s=RE(t);if(!s)return null;let o=Ps(e),r=o?o.individualsById.get(s.id):e.individuals.find(c=>c?.id===s.id),i=$r(r,t?.createdAt||n),a={id:s.id,label:bm(s.id),class:Ro,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:sourceType",key:"sourceType",value:s.type},{prop:Pt,key:"createdAt",value:i},...s.url?[{prop:"mgx:sourceUrl",key:"sourceUrl",value:s.url}]:[],...s.rule?[{prop:"mgx:sourceRule",key:"sourceRule",value:s.rule}]:[]]},l=xr(e,a);return o&&o.sourcesById.set(s.id,l),s.id}function OE(e){let t=Ps(e),n={};if(t){for(let[s,o]of t.sourcesById)n[s]=o;return n}for(let s of e.individuals)s?.class===Ro&&(n[s.id]=s);return n}function IE(e,t){let n=Ps(e);return n?(n.statedByBySubject.get(t)||[]).slice():(e.objectProperties.find(o=>o?.prop===Un)?.examples||[]).filter(o=>o?.subject===t).map(o=>o.object)}function wm(e,t,n=Date.now(),s={}){let o=IE(e,t.id),r=(t.attributes||[]).find(l=>l?.prop===Pt)?.value||"",{score:i,inputs:a}=td({sourceIds:o,createdAt:r},OE(e),{now:n,...Array.isArray(s?.premiseTrusts)?{premiseTrusts:s.premiseTrusts}:{},...typeof s?.ruleConfidence=="number"?{ruleConfidence:s.ruleConfidence}:{}});wr(t,Ur,"trustScore",String(i)),wr(t,ka,"trustInputs",JSON.stringify(a)),wr(t,Es,"updatedAt",new Date(n).toISOString())}function Pi(e,t,n=Date.now(),s={}){let o=(t.attributes||[]).find(i=>i?.prop==="mgx:factProvenance")?.value||"",r=(t.attributes||[]).find(i=>i?.prop===Pt)?.value||new Date(n).toISOString();for(let i of o.split(" | ").filter(Boolean)){let a=Ho(i);if(!a)continue;let l=CE(e,a,r);l&&Li(e,{predicate:"statedBy",prop:Un},{subject:t.id,object:l,subjectLabel:t.label,objectLabel:bm(l)})}wm(e,t,n,s)}function LE(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=e.objectProperties.find(r=>r?.prop===Un),n=new Set((t?.examples||[]).map(r=>r.subject)),s=!1,o=Date.now();for(let r of e.individuals)r?.class!==cs||n.has(r.id)||!(r.attributes||[]).find(a=>a?.prop==="mgx:factProvenance")?.value||(Pi(e,r,o),s=!0);s&&Ds(e)}function ME(e){if(!Array.isArray(e?.individuals)||!Array.isArray(e?.objectProperties))return;let t=Ct(e),n=new Set;for(let a of Sm(e))for(let l of a)n.add(l.id);let s=new Map;for(let a of t)for(let l of a.sourceIds){if(!NE(l))continue;let c=s.get(l)||{factsAsserted:0,factsContradicted:0};c.factsAsserted+=1,n.has(a.id)&&(c.factsContradicted+=1),s.set(l,c)}if(!s.size)return;let o=Ps(e);for(let[a,l]of s){let c=o?o.individualsById.get(a):e.individuals.find(u=>u?.id===a);c&&(wr(c,lm,"sourceReliability",String(nd(l))),wr(c,Es,"updatedAt",new Date().toISOString()))}let r=e.objectProperties.find(a=>a?.prop===Un),i=new Set;for(let a of r?.examples||[])s.has(a?.object)&&i.add(a.subject);for(let a of i){let l=o?o.individualsById.get(a):e.individuals.find(c=>c?.id===a);l&&wm(e,l)}}function xr(e,t){let n=Ps(e);if(n){let o=n.individualsById.get(t.id);return o?(Object.assign(o,t),o):(e.individuals.push(t),n.individualsById.set(t.id,t),t)}let s=e.individuals.findIndex(o=>o?.id===t.id);return s>=0?(e.individuals[s]=t,t):(e.individuals.push(t),t)}function Li(e,{predicate:t,prop:n},s){let o=e.objectProperties.find(l=>l?.prop===n);o||(o={predicate:t,prop:n,count:0,examples:[]},e.objectProperties.push(o));let r=n===Un?Ps(e):null;if(r){let l=r.statedByBySubject.get(s.subject);if(!l||!l.includes(s.object)){o.examples.push({...s,createdAt:s.createdAt||Ii()}),o.count=o.examples.length,l?l.push(s.object):r.statedByBySubject.set(s.subject,[s.object]);return}}let a=(o.examples||[]).find(l=>l?.subject===s.subject&&l?.object===s.object)?.createdAt||s.createdAt||Ii();if(o.examples=(o.examples||[]).filter(l=>!(l?.subject===s.subject&&l?.object===s.object)),o.examples.push({...s,createdAt:a}),o.count=o.examples.length,r){let l=r.statedByBySubject.get(s.subject)||[];l.includes(s.object)||l.push(s.object),r.statedByBySubject.set(s.subject,l)}}function Ds(e){let t=[sl,nl,cs,Ro,Ao];e.classes=e.classes.filter(n=>!t.includes(n?.name));for(let n of t){let s=e.individuals.filter(o=>o?.class===n);s.length&&e.classes.push({name:n,count:s.length,sample:s.slice(0,3).map(o=>o.label)})}}function PE(e,t,n=""){let s=`session:${t}`;return e.individuals.some(o=>o?.id===s)||e.individuals.push({id:s,label:String(t).slice(0,8),class:sl,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Pt,key:"createdAt",value:n||Ii()},...n?[{prop:"mgx:sessionStarted",key:"started",value:n}]:[]]}),s}function ym(e,{role:t,text:n,ts:s,sessionId:o,sessionStarted:r="",parsed:i=null,replyTo:a=null,createdAt:l=""}){if(!rE.has(t))throw new Error(`utterance role must be "visitor" or "tmct", got ${JSON.stringify(t)}`);if(!o)throw new Error("utterance needs a sessionId");let c=String(s||""),u=Fn(n),d=`utt:${o}#${c}#${t}`,f=Mi(u)||(t==="visitor"?"a-visitor-said":"a-tmct-said"),p=Br({doc:u}),m=e.individuals.find(y=>y?.id===d),h=$r(m,l||c),g={id:d,label:f,class:nl,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:"mgx:utteranceRole",key:"role",value:t},{prop:"mgx:utteranceText",key:"text",value:u},{prop:"mgx:utteranceTs",key:"ts",value:c},{prop:Pt,key:"createdAt",value:h},...i!=null?[{prop:"mgx:utteranceParsed",key:"parsed",value:JSON.stringify(i)}]:[],...p.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:p.join(" ")}]:[]]};xr(e,g);let b=PE(e,o,r);if(Li(e,{predicate:"saidInSession",prop:ol},{subject:d,object:b,subjectLabel:f,objectLabel:String(o).slice(0,8)}),a){let y=e.individuals.find(w=>w?.id===a);y&&Li(e,{predicate:"inReplyTo",prop:rl},{subject:d,object:a,subjectLabel:f,objectLabel:y.label})}return c&&c>String(e.generated_at||"")&&(e.generated_at=c),d}async function FE(e,t){let n;return await Fs(e,s=>{n=ym(s,t),Ds(s)}),{id:n}}async function vm(e,t){let n=[];return t?.length?(await Fs(e,s=>{for(let o of t)n.push(ym(s,o));Ds(s)}),{ids:n}):{ids:n}}async function DE(e,t){t?.length&&await Fs(e,n=>{for(let s of t)Li(n,{predicate:"canonicalisedFrom",prop:il},{subject:s.factId,object:s.uttId,subjectLabel:s.factLabel,objectLabel:s.uttLabel})})}async function zE(e,{subject:t,predicate:n,object:s,provenance:o="",createdAt:r="",quantifier:i="",premiseTrusts:a,ruleConfidence:l}={}){let c=X(t),u=Dn(n),d=X(s);if(!c||!u||!d)throw new Error("a fact needs subject, predicate and object");let f=pr(c,u,d),p=`${c} ${u} ${d}`,m=Br({doc:p}),h=Fn(i);return await Fs(e,async g=>{let b=g.individuals.find(k=>k?.id===f),y=b?.attributes?.find(k=>k?.prop==="mgx:factProvenance")?.value||"",w=[...new Set([...y.split(" | "),Fn(o)].filter(Boolean))],$=$r(b,r),j=b?.attributes?.find(k=>k?.prop==="mgx:factQuantifier")?.value||"",v=h||j,E={id:f,label:Mi(p),class:cs,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:c},{prop:"rdf:predicate",key:"predicate",value:u},{prop:"rdf:object",key:"object",value:d},{prop:Pt,key:"createdAt",value:$},...w.length?[{prop:"mgx:factProvenance",key:"provenance",value:w.join(" | ")}]:[],...m.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:m.join(" ")}]:[],...v?[{prop:"mgx:factQuantifier",key:"quantifier",value:v}]:[]]};await Gc(E),xr(g,E),Pi(g,g.individuals.find(k=>k?.id===f),void 0,{premiseTrusts:a,ruleConfidence:l}),Ds(g)}),{id:f}}function BE(e){if(!Array.isArray(e))return;let t=e.some(Array.isArray)?e.filter(Array.isArray):[e],n=[],s=new Set;for(let o of t){let r=o.filter(a=>typeof a=="string"&&a);if(!r.length)continue;let i=[...r].sort().join(" ");s.has(i)||(s.add(i),n.push(r))}return n.length?n:void 0}async function kr(e,t){let n=[],s=0;for(let r of t||[]){let i=X(r?.subject),a=Dn(r?.predicate),l=X(r?.object);if(!i||!a||!l){s+=1;continue}let c=`${i} ${a} ${l}`;n.push({id:pr(i,a,l),s:i,p:a,o:l,text:c,tokens:Br({doc:c}),provenance:Fn(r?.provenance),createdAt:r?.createdAt||"",quantifier:Fn(r?.quantifier),premiseTrusts:Array.isArray(r?.premiseTrusts)?r.premiseTrusts:void 0,ruleConfidence:typeof r?.ruleConfidence=="number"?r.ruleConfidence:void 0,environments:BE(r?.justification)})}let o=[];return n.length?(await Fs(e,r=>{let i=Ps(r),a=i?i.individualsById:new Map(r.individuals.map(d=>[d?.id,d])),l=[],c=new Set,u=new Map;for(let d of n){let f=a.get(d.id),p=f?.attributes?.find($=>$?.prop==="mgx:factProvenance")?.value||"",m=[...new Set([...p.split(" | "),d.provenance].filter(Boolean))],h=$r(f,d.createdAt),g=f?.attributes?.find($=>$?.prop==="mgx:factQuantifier")?.value||"",b=d.quantifier||g,y={id:d.id,label:Mi(d.text),class:cs,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"rdf:Statement"},{prop:"rdf:subject",key:"subject",value:d.s},{prop:"rdf:predicate",key:"predicate",value:d.p},{prop:"rdf:object",key:"object",value:d.o},{prop:Pt,key:"createdAt",value:h},...m.length?[{prop:"mgx:factProvenance",key:"provenance",value:m.join(" | ")}]:[],...d.tokens.length?[{prop:"mgx:hasProseTokens",key:"prose_tokens",value:d.tokens.join(" ")}]:[],...b?[{prop:"mgx:factQuantifier",key:"quantifier",value:b}]:[],...d.environments?[{prop:"mgx:factJustification",key:"justification",value:d.environments.map($=>$.join(" ")).join(" | ")}]:[]]},w=xr(r,y);a.set(d.id,w),o.push(d.id),c.has(d.id)||(c.add(d.id),l.push(d.id)),(d.premiseTrusts!==void 0||d.ruleConfidence!==void 0)&&u.set(d.id,{premiseTrusts:d.premiseTrusts,ruleConfidence:d.ruleConfidence})}for(let d of l)Pi(r,a.get(d),void 0,u.get(d));Ds(r)}),{ids:o,appended:o.length,skipped:s}):{ids:o,appended:0,skipped:s}}async function ml(e,{name:t,kind:n,slots:s,provenance:o="",createdAt:r=""}={}){let i=$m[n];if(!i)throw new Error(`a rule kind must be one of ${UE.join(", ")}, got ${JSON.stringify(n)}`);let a=X(t);if(!a)throw new Error("a rule needs a name");let l=WE[n]||new Set,c=i.map(([p])=>X(s?.[p])),u=i.filter(([p],m)=>!l.has(p)&&!c[m]);if(u.length)throw new Error(`a ${n} rule needs ${u.map(([p])=>p).join(" + ")}`);if(n===jr){let p=c[i.findIndex(([h])=>h==="objectRole")],m=c[i.findIndex(([h])=>h==="value")];if(!p&&!m)throw new Error(`a ${n} rule needs an objectRole or a value`)}let d=GE(n,a,c),f=Mi(`${a} = ${n}(${c.join(", ")})`);return await Fs(e,async p=>{let m=p.individuals.find(w=>w?.id===d),h=m?.attributes?.find(w=>w?.prop==="mgx:factProvenance")?.value||"",g=[...new Set([...h.split(" | "),Fn(o)].filter(Boolean))],b=$r(m,r),y={id:d,label:f,class:Ao,derived_from:[],mentions:[],attributes:[{prop:"rdf:type",key:"type",value:"owl:NamedIndividual"},{prop:Di,key:"ruleName",value:a},{prop:Co,key:"ruleKind",value:n},...i.map(([w,$],j)=>({prop:$,key:w,value:c[j],skip:!c[j]&&l.has(w)})).filter(w=>!w.skip).map(({skip:w,...$})=>$),{prop:Pt,key:"createdAt",value:b},...g.length?[{prop:"mgx:factProvenance",key:"provenance",value:g.join(" | ")}]:[]]};await Gc(y),xr(p,y),Pi(p,p.individuals.find(w=>w?.id===d)),Ds(p)}),{id:d}}function hl(e,t){let n=X(t);return(e?.individuals||[]).find(s=>s?.class===Ao&&(s.attributes||[]).find(o=>o?.prop===Di)?.value===n)}function VE(e,t){let n=X(t),s=o=>(o.attributes||[]).find(r=>r?.prop===Co)?.value||"";return(e?.individuals||[]).filter(o=>o?.class===Ao&&(o.attributes||[]).find(r=>r?.prop===Di)?.value===n).sort((o,r)=>s(o).localeCompare(s(r))||String(o.id).localeCompare(String(r.id)))}function gl(e){let t=[];for(let n of e?.individuals||[]){if(n?.class!==Ao)continue;let s=a=>(n.attributes||[]).find(l=>l?.prop===a)?.value,o=s(Co),r=$m[o];if(!r)continue;let i={};for(let[a,l]of r)i[a]=s(l)??"";t.push({id:n.id,name:s(Di)||"",kind:o,slots:i,provenance:s("mgx:factProvenance")||""})}return t.sort((n,s)=>n.name.localeCompare(s.name)||n.kind.localeCompare(s.kind)||String(n.id).localeCompare(String(s.id))),t}async function bl(e,t,n,s,o){let{relationFactsFor:r,renderFactLine:i,factPhrase:a,factTermVariants:l,byTrust:c,rows:u,HAS_PROPERTY_PREDICATE:d,findActionPath:f}=o,p=String(t||"").trim().toLowerCase(),m=l(X,n),h=l(X,s),g=r(p).filter(w=>m.has(w.fact.subject)&&h.has(w.fact.object));if(g.length){let w=g.slice().sort(($,j)=>c($.fact,j.fact))[0];return{citation:[i(w.fact),...w.aliasFacts.map($=>`${a($)}${$.provenance?` (source: ${$.provenance})`:""}`)]}}let b=hl(e,p),y=b?.attributes?.find(w=>w.prop===Co)?.value;if(b&&y===Er){let w=b.attributes.find(M=>M.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(M=>M.prop==="mgx:ruleBase2")?.value,j=X(n),v=X(s);if(!w||!$||!j||!v)return null;let R=f({entity:j,hopsTaken:0},M=>M.hopsTaken===2&&M.entity===v,M=>{if(M.hopsTaken>=2)return[];let A=M.hopsTaken===0?w:$;return r(A).filter(P=>P.fact.subject===M.entity).map(P=>({action:P,nextState:{entity:P.fact.object,hopsTaken:M.hopsTaken+1}}))},{maxDepth:2,stateKey:M=>`${M.entity}#${M.hopsTaken}`});if(!R)return null;let x=new Set,T=[];for(let M of R.actions){T.push(i(M.fact));for(let A of M.aliasFacts){let P=A.id||`${A.subject}|${A.predicate}|${A.object}`;x.has(P)||(x.add(P),T.push(`${a(A)}${A.provenance?` (source: ${A.provenance})`:""}`))}}return{citation:T}}if(b&&y===Sr){let w=b.attributes.find(_=>_.prop==="mgx:ruleBase1")?.value,$=b.attributes.find(_=>_.prop==="mgx:ruleFilterProperty")?.value;if(!w||!$)return null;let j=await bl(e,w,n,s,o);if(!j)return null;let v=X(n),E=X($),k=u.find(_=>_.predicate===d&&_.subject===v&&X(_.object)===E);return k?{citation:[...j.citation,i(k)]}:null}return null}async function xm(e,t,n,s){let{relationFactsFor:o,renderFactLine:r,factPhrase:i,factTermVariants:a,byTrust:l,rows:c,HAS_PROPERTY_PREDICATE:u,findReachableSet:d}=s,f=String(t||"").trim().toLowerCase(),p=a(X,n),m=o(f).filter(b=>p.has(b.fact.object));if(m.length){let b=new Map;for(let y of m)b.has(y.fact.subject)||b.set(y.fact.subject,[]),b.get(y.fact.subject).push(y);return[...b.entries()].map(([y,w])=>{let $=w.slice().sort((j,v)=>l(j.fact,v.fact))[0];return{subject:y,citation:[r($.fact),...$.aliasFacts.map(j=>`${i(j)}${j.provenance?` (source: ${j.provenance})`:""}`)]}})}let h=hl(e,f),g=h?.attributes?.find(b=>b.prop===Co)?.value;if(h&&g===Er){let b=h.attributes.find(E=>E.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(E=>E.prop==="mgx:ruleBase2")?.value,w=X(n);return!b||!y||!w?[]:d({entity:w,hopsTaken:0},E=>{if(E.hopsTaken>=2)return[];let k=E.hopsTaken===0?y:b;return o(k).filter(_=>_.fact.object===E.entity).map(_=>({action:_,nextState:{entity:_.fact.subject,hopsTaken:E.hopsTaken+1}}))},{maxDepth:2,stateKey:E=>`${E.entity}#${E.hopsTaken}`}).filter(E=>E.node.hopsTaken===2).map(({node:E,path:k})=>{let _=new Set,R=[];for(let x of k.actions.slice().reverse()){R.push(r(x.fact));for(let T of x.aliasFacts){let M=T.id||`${T.subject}|${T.predicate}|${T.object}`;_.has(M)||(_.add(M),R.push(`${i(T)}${T.provenance?` (source: ${T.provenance})`:""}`))}}return{subject:E.entity,citation:R}})}if(h&&g===Sr){let b=h.attributes.find(v=>v.prop==="mgx:ruleBase1")?.value,y=h.attributes.find(v=>v.prop==="mgx:ruleFilterProperty")?.value;if(!b||!y)return[];let w=await xm(e,b,n,s),$=X(y),j=[];for(let v of w){let E=X(v.subject),k=c.find(_=>_.predicate===u&&_.subject===E&&X(_.object)===$);k&&j.push({subject:v.subject,citation:[...v.citation,r(k)]})}return j}return[]}function Ct(e){let t=e?.individuals||[],n=new Map(t.filter(i=>i?.class===Ro).map(i=>[i.id,i])),s=(e?.objectProperties||[]).find(i=>i?.prop===Un),o=new Map;for(let i of s?.examples||[])o.has(i.subject)||o.set(i.subject,[]),o.get(i.subject).push(i.object);let r=[];for(let i of t){if(i?.class!==cs)continue;let a=m=>(i.attributes||[]).find(h=>h?.key===m)?.value||"",l=o.get(i.id)||[],c=l.map(m=>(n.get(m)?.attributes||[]).find(h=>h?.prop==="mgx:sourceType")?.value).filter(Boolean),u=a("justification"),d=[];if(u)for(let m of u.split(" | ")){let h=m.split(" ").filter(Boolean);h.length&&d.push(h)}let f=[],p=new Set;for(let m of d)for(let h of m)p.has(h)||(p.add(h),f.push(h));r.push({id:i.id,subject:a("subject"),predicate:a("predicate"),object:a("object"),provenance:a("provenance"),quantifier:a("quantifier"),sourceIds:l,sourceTypes:c,trust:Number((i.attributes||[]).find(m=>m?.prop===Ur)?.value)||0,environments:d,justification:f})}return r}async function qE(e,t){let n=new Set((t||[]).filter(Boolean)),s=[];return n.size?(await Fs(e,o=>{if(o.individuals=(o.individuals||[]).filter(i=>i?.class===cs&&n.has(i.id)?(s.push(i.id),!1):!0),!s.length)return;let r=new Set(s);for(let i of o.objectProperties||[]){let a=i.examples||[];i.examples=a.filter(l=>!r.has(l?.subject)&&!r.has(l?.object)),i.count=i.examples.length}Ds(o)}),{removed:s}):{removed:s}}function Sm(e,{floor:t=HE}={}){let n=Ct(e).filter(r=>r.trust>=t),s=new Map;for(let r of n){if(Em.has(r.predicate))continue;let i=`${r.subject} ${r.predicate}`;s.has(i)||s.set(i,[]),s.get(i).push(r)}let o=[];for(let r of s.values())new Set(r.map(i=>i.object)).size>1&&o.push(r.slice().sort((i,a)=>a.trust-i.trust||i.object.localeCompare(a.object)));return o.sort((r,i)=>`${r[0].subject} ${r[0].predicate}`.localeCompare(`${i[0].subject} ${i[0].predicate}`))}var yr,tl,nl,cs,sl,Ro,Ao,ol,rl,oE,Un,il,lm,Oi,Jc,rE,am,iE,Qc,al,um,lE,uE,cm,Bn,hm,Zc,$E,kE,ul,gm,el,Ps,Mi,Ii,bm,AE,NE,Er,Sr,dl,pl,Fi,jr,fl,UE,Di,Co,$m,WE,GE,HE,zs,km,Em,Je=L(()=>{kt();ze();Yn();Yt();Yt();Ss();Ss();Wc();Kf();yr=Q(".tmct","memory"),tl=Q(yr,"graph.json"),nl="Utterance",cs="Fact",sl="Session",Ro="Source",Ao="Rule",ol="mgx:saidInSession",rl="mgx:inReplyTo",oE="mgx:derivedFrom",Un="mgx:statedBy",il="mgx:canonicalisedFrom",lm="mgx:sourceReliability",Oi="src:operator-chat",Jc="src:teach-chat",rE=new Set(["visitor","tmct"]),am=48,iE=[{prop:"rdf:type",note:"rdf-ish typing attribute: owl:NamedIndividual (utterances/sessions) or rdf:Statement (reified facts)"},{prop:"mgx:utteranceRole",note:"who said it: visitor (an a-visitor-said item) or tmct (the response alongside it)"},{prop:"mgx:utteranceText",note:"the utterance's normalized text (capped)"},{prop:"mgx:utteranceTs",note:"when it was said, ISO-8601 (the chat turn timestamp)"},{prop:"mgx:utteranceParsed",note:"optional JSON of the parse the interpretation pipeline produced for this request"},{prop:ol,predicate:"saidInSession",note:"Utterance \u2192 Session it was said in; runtime observation, owned (no SEON term)"},{prop:rl,predicate:"inReplyTo",note:"tmct Utterance \u2192 the visitor Utterance it answers (the Q/A pairing)"},{prop:"rdf:subject",note:"reified fact: the triple's subject term"},{prop:"rdf:predicate",note:"reified fact: the triple's predicate term"},{prop:"rdf:object",note:"reified fact: the triple's object term"},{prop:"mgx:factProvenance",note:"LEGACY COMPAT SHIM: the ' | '-joined provenance tag string a fact came from; the source-of-truth is now the mgx:statedBy edges derived from it"},{prop:"mgx:factQuantifier",note:"OPTIONAL: the quantifier word a plural class-membership teach used ('every'/'some'/'a few'), for literal recall by 'how many Xs are Ys' \u2014 never real cardinality counting"},{prop:"mgx:factJustification",note:"an entailed Fact's supporting premise fact ids: ' | '-separated environments, one space-separated premise-id list per independent derivation, capped by syllogise's maxEnvironments knob; a value with no ' | ' is a single environment"},{prop:"mgx:ruleName",note:"a taught Rule's own name (e.g. 'grandparent') \u2014 the query-dispatcher's lookup key, PLAN_TAUGHT_RELATIONS.md \xA72/\xA73"},{prop:"mgx:ruleKind",note:"a taught Rule's SHAPE tag \u2014 the closed vocabulary compose2 | filter | recursive (structural, like 'Fact'/'Rule' themselves, never a domain word)"},{prop:"mgx:ruleBase1",note:"compose2: the first hop's base relation name; filter: the base rule/relation being filtered (same 'base relation' role in both kinds, so the name is shared)"},{prop:"mgx:ruleBase2",note:"compose2 only: the second hop's base relation name"},{prop:"mgx:ruleFilterProperty",note:"filter only: the property literal candidates are filtered by (an mgx:hasProperty-shaped Fact lookup)"},{prop:"mgx:ruleBaseCase",note:"recursive only: the base-case relation name (hop zero)"},{prop:"mgx:ruleRecStep",note:"recursive only: the self-referential recursive-step relation name"},{prop:Pt,note:"when an individual was FIRST written, ISO-8601 (first-write-wins on upsert); the audit 'when', the recency input to trust, the novelty signal"},{prop:Es,note:"an audit / last-modified stamp: when an individual's OWN attributes were last mutated in place (upsertSession, recomputeFactTrust, recomputeSourceReliability) \u2014 most individuals never carry it at all. NOT transaction time: a mutable stamp cannot record when the previous version stopped being current, so tmct is not bitemporal"},{prop:oE,predicate:"derivedFrom",note:"umbrella: a Fact derived from a Source (or another Fact). ext ref prov:wasDerivedFrom (UNVERIFIED-pending-web-check)"},{prop:Un,predicate:"statedBy",note:"subPropertyOf derivedFrom: a Source directly asserts this Fact (one edge per independent source \u2014 replaces the factProvenance union)"},{prop:il,predicate:"canonicalisedFrom",note:"subPropertyOf derivedFrom: a canonical Fact cleaned from a raw Block/Source, never replacing it"},{prop:"mgx:sourceType",note:"a Source's kind: operator | teach | provider | corpus | corpusWeak | reference | referenceLive | extracted | optimisticExtract | web | entailed (the trust-prior key)"},{prop:"mgx:sourceUrl",note:"a web Source's URL"},{prop:"mgx:sourceRule",note:"an entailed Source's rule id"},{prop:"mgx:sourceReliability",note:"actor-level (session-scoped) trust nudge in [0.5,1.5], neutral 1.0 when absent \u2014 materialised by recomputeSourceReliability from a session's asserted-vs-contradicted track record (memory/trust.mjs's sessionReliabilityFrom); folds into computeTrust's per-source prior"},{prop:Ur,note:"materialised trust cache in [0,1] \u2014 pure function of a fact's Sources + createdAt (memory/trust.mjs); invalidated when a statedBy edge is added"},{prop:ka,note:"JSON of the inputs the trust score was computed from (source-type multiset, corroboration count, createdAt, recency) \u2014 makes the score auditable"},{prop:"mgx:hasProseTokens",note:"prose tokens (prose.mjs tokenizer) backing the payload's proseIndex"},{prop:"mgx:sessionStarted",note:"session anchor: when the session started, ISO-8601"},{prop:"rdf:predicate",prefix:$o,note:"a reified fact's predicate carries its POLARITY: mgxneg:capableOf is the negative twin of mgx:capableOf ('a penguin cannot fly'). Polarity cannot be a separate property \u2014 the fact id hashes (subject, predicate, object), so both polarities would share one id and union their statedBy edges (memory/capability.mjs)"}];Qc=e=>br(e),al="memory",um="sqlite";lE=`
108
108
  CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v TEXT NOT NULL);
109
109
  CREATE TABLE IF NOT EXISTS individuals (id TEXT PRIMARY KEY, ord INTEGER NOT NULL, class TEXT, label TEXT, json TEXT NOT NULL);
110
110
  CREATE TABLE IF NOT EXISTS relations (prop TEXT PRIMARY KEY, ord INTEGER NOT NULL, predicate TEXT, count INTEGER);
111
111
  CREATE TABLE IF NOT EXISTS edges (prop TEXT NOT NULL, subject TEXT NOT NULL, object TEXT NOT NULL, subject_label TEXT, object_label TEXT, extra TEXT, PRIMARY KEY (prop, subject, object));
112
112
  CREATE INDEX IF NOT EXISTS edges_by_prop ON edges(prop);
113
- `,gk=new Set(["subject","object","subjectLabel","objectLabel"]),qf=!1;zn=e=>e===void 0?e:structuredClone(e);Qf=Z(hr,"manifest.json"),Vc=5,_k=e=>Z(e,Qf);Ak=/^fact:[0-9a-f]{8}$/;sl=Z(hr,"syllogise-state.json"),Zf="syllogiseState";Hc=Symbol("mutateMemory lookup index");Ns=e=>e?.[Hc]||null;Ii=e=>e.length>Gf?e.slice(0,Gf-1)+"\u2026":e,Ai=()=>new Date().toISOString();em=e=>String(e).replace(/^src:/,""),Nk=Object.freeze({operator:{subClass:"tmct:AgentSource",prov:"prov:Agent"},teach:{subClass:"tmct:AgentSource",prov:"prov:Agent"},provider:{subClass:"tmct:AgentSource",prov:"prov:Agent"},corpus:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},corpusWeak:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},reference:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},referenceLive:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},optimisticExtract:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}});Bk=e=>typeof e=="string"&&(e.startsWith(`${Ri}:`)||e.startsWith(`${Gc}:`));vr="compose2",$r="filter",ol="recursive",rl="action-signature",Li="action-precond",xr="action-effect",il="action-constraint",Kk=Object.freeze([vr,$r,ol,rl,Li,xr,il]),Ni="mgx:ruleName",jo="mgx:ruleKind",om={[vr]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[$r]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[ol]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[rl]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[Li]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[xr]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[il]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},Yk={[Li]:new Set(["value","negate"]),[xr]:new Set(["objectRole","value"])},Xk=(e,t,n)=>`rule:${ar([e,t,...n].join("\0"))}`;Zk=.5,Fs="mgx:hasA",im="mgx:capableOf",am=new Set([Fs,im].flatMap(e=>[e,yo(e)]))});async function xn(e){try{let{dir:t,close:n}=await as(ve(ve(e.graphFile)));try{return Dt(await tn(t))}finally{await n()}}catch{return[]}}function um(e){let t=[...new Set(e.map(s=>s.provenance).filter(Boolean))];return t.length?`provenance: ${t.slice(0,2).join("; ")}${t.length>2?`, +${t.length-2} more source(s)`:""}`:"provenance: memory/corpus facts"}function Mi(e,t){let n=ee(t),s=e.filter(a=>lm.has(a.predicate)&&a.object===n);if(!s.length)return null;let o=[...new Set(s.map(a=>a.subject))].sort(),r=o.slice(0,Ds),i=o.length>Ds?`
114
- \u2026+${o.length-Ds} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
113
+ `,uE=new Set(["subject","object","subjectLabel","objectLabel"]),cm=!1;Bn=e=>e===void 0?e:structuredClone(e);hm=Q(yr,"manifest.json"),Zc=5,$E=e=>Q(e,hm);kE=/^fact:[0-9a-f]{8}$/;ul=Q(yr,"syllogise-state.json"),gm="syllogiseState";el=Symbol("mutateMemory lookup index");Ps=e=>e?.[el]||null;Mi=e=>e.length>am?e.slice(0,am-1)+"\u2026":e,Ii=()=>new Date().toISOString();bm=e=>String(e).replace(/^src:/,""),AE=Object.freeze({operator:{subClass:"tmct:AgentSource",prov:"prov:Agent"},teach:{subClass:"tmct:AgentSource",prov:"prov:Agent"},provider:{subClass:"tmct:AgentSource",prov:"prov:Agent"},corpus:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},corpusWeak:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},reference:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},referenceLive:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},web:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},extracted:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},optimisticExtract:{subClass:"tmct:DocumentSource",prov:"prov:Entity"},entailed:{subClass:"tmct:ActivitySource",prov:"prov:Activity"}});NE=e=>typeof e=="string"&&(e.startsWith(`${Oi}:`)||e.startsWith(`${Jc}:`));Er="compose2",Sr="filter",dl="recursive",pl="action-signature",Fi="action-precond",jr="action-effect",fl="action-constraint",UE=Object.freeze([Er,Sr,dl,pl,Fi,jr,fl]),Di="mgx:ruleName",Co="mgx:ruleKind",$m={[Er]:[["base1","mgx:ruleBase1"],["base2","mgx:ruleBase2"]],[Sr]:[["base","mgx:ruleBase1"],["property","mgx:ruleFilterProperty"]],[dl]:[["baseCase","mgx:ruleBaseCase"],["recStep","mgx:ruleRecStep"]],[pl]:[["subjectClass","mgx:ruleActionSubjectClass"],["targetClass","mgx:ruleActionTargetClass"]],[Fi]:[["shape","mgx:ruleActionPrecondShape"],["predicate","mgx:ruleActionPrecondPredicate"],["role","mgx:ruleActionPrecondRole"],["scope","mgx:ruleActionPrecondScope"],["value","mgx:ruleActionPrecondValue"],["negate","mgx:ruleActionPrecondNegate"]],[jr]:[["predicate","mgx:ruleActionEffectPredicate"],["subjectRole","mgx:ruleActionEffectSubject"],["objectRole","mgx:ruleActionEffectObject"],["value","mgx:ruleActionEffectValue"]],[fl]:[["left","mgx:ruleActionConstraintLeft"],["right","mgx:ruleActionConstraintRight"],["guard","mgx:ruleActionConstraintGuard"]]},WE={[Fi]:new Set(["value","negate"]),[jr]:new Set(["objectRole","value"])},GE=(e,t,n)=>`rule:${dr([e,t,...n].join("\0"))}`;HE=.5,zs="mgx:hasA",km="mgx:capableOf",Em=new Set([zs,km].flatMap(e=>[e,Eo(e)]))});async function rn(e,t=null){try{if(t)return Ct(await Xt(t));let{dir:n,close:s}=await ls(xe(xe(e.graphFile)));try{return Ct(await Xt(n))}finally{await s()}}catch{return[]}}function _m(e){let t=[...new Set(e.map(s=>s.provenance).filter(Boolean))];return t.length?`provenance: ${t.slice(0,2).join("; ")}${t.length>2?`, +${t.length-2} more source(s)`:""}`:"provenance: memory/corpus facts"}function zi(e,t){let n=X(t),s=e.filter(a=>jm.has(a.predicate)&&a.object===n);if(!s.length)return null;let o=[...new Set(s.map(a=>a.subject))].sort(),r=o.slice(0,Bs),i=o.length>Bs?`
114
+ \u2026+${o.length-Bs} more`:"";return`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts. ${o.length} known subclass(es):
115
115
  ${r.join(`
116
116
  `)}${i}
117
- (${um(s)})`}function Pi(e,t){let n=ee(t),s=e.filter(a=>lm.has(a.predicate)&&(a.subject===n||a.object===n));if(!s.length)return null;let o=[...new Set(s.filter(a=>a.subject===n).map(a=>a.object))],r=[...new Set(s.filter(a=>a.object===n).map(a=>a.subject))].sort(),i=[`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts.`];if(o.length&&i.push(`is a: ${o.slice(0,Ds).join(", ")}`),r.length){let a=r.length>Ds?`, +${r.length-Ds} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,Ds).join(", ")}${a}`)}return i.push(`(${um(s)})`),i.join(`
118
- `)}var lm,Ds,_o=M(()=>{ze();He();lm=new Set(["rdfs:subClassOf","rdf:type"]),Ds=40});async function dm(e,{graph:t,svc:n,config:s}){let o=rt(e,"symbol"),{match:r,candidates:i}=qt(n.graph,o);if(r)return Ra(t,r,{candidates:i});let a=Pi(await xn(s),o);if(a)return a;wt(n,o,"symbol")}var pm=M(()=>{Te();_o();Xe()});async function fm(e,{graph:t,svc:n,repoRoot:s}){let o=rt(e,"symbol"),{match:r,candidates:i}=wt(n,o,"symbol"),a=vt(r);if(!a)throw new Oe(`"${r.label}" (${r.class||"Entity"}) has no source span in the graph \u2014 it is likely a module. Use tmct_describe for its contents, then tmct_snippet one of the functions/classes it defines.`);let l;try{l=await Mn({readFile:Be,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:ir})}catch(g){throw g instanceof Oe?g:new Oe(`could not read ${a.path} (${g?.code||g?.message||g})`)}let{text:c,truncated:u}=l,d=a.end>a.start?`${a.start}-${a.end}`:`${a.start}`,f=`${r.label} \u2014 ${r.class||"Entity"} @ ${a.path}:${d}`,p=u?`
119
- \u2026 (truncated to ${ir} lines; full span ${d})`:"",m=i.length?`
120
- (other matches: ${i.map(g=>g.label).join(", ")})`:"",h=Ca(t,r);return`${f}
117
+ (${_m(s)})`}function Bi(e,t){let n=X(t),s=e.filter(a=>jm.has(a.predicate)&&(a.subject===n||a.object===n));if(!s.length)return null;let o=[...new Set(s.filter(a=>a.subject===n).map(a=>a.object))],r=[...new Set(s.filter(a=>a.object===n).map(a=>a.subject))].sort(),i=[`"${t}" is not a code-map entity \u2014 answering from memory/corpus facts.`];if(o.length&&i.push(`is a: ${o.slice(0,Bs).join(", ")}`),r.length){let a=r.length>Bs?`, +${r.length-Bs} more`:"";i.push(`known subclasses (${r.length}): ${r.slice(0,Bs).join(", ")}${a}`)}return i.push(`(${_m(s)})`),i.join(`
118
+ `)}var jm,Bs,Us=L(()=>{ze();Je();jm=new Set(["rdfs:subClassOf","rdf:type"]),Bs=40});async function Rm(e,{graph:t,svc:n,config:s}){let o=et(e,"symbol"),{match:r,candidates:i}=Kt(n.graph,o);if(r)return La(t,r,{candidates:i});let a=Bi(await rn(s),o);if(a)return a;vt(n,o,"symbol")}var Am=L(()=>{Ie();Us();Ge()});async function Tm(e,{graph:t,svc:n,repoRoot:s}){let o=et(e,"symbol"),{match:r,candidates:i}=vt(n,o,"symbol"),a=Et(r);if(!a)throw new Re(`"${r.label}" (${r.class||"Entity"}) has no source span in the graph \u2014 it is likely a module. Use tmct_describe for its contents, then tmct_snippet one of the functions/classes it defines.`);let l;try{l=await Pn({readFile:Be,repoRoot:s,path:a.path,start:a.start,end:a.end,maxLines:ur})}catch(g){throw g instanceof Re?g:new Re(`could not read ${a.path} (${g?.code||g?.message||g})`)}let{text:c,truncated:u}=l,d=a.end>a.start?`${a.start}-${a.end}`:`${a.start}`,f=`${r.label} \u2014 ${r.class||"Entity"} @ ${a.path}:${d}`,p=u?`
119
+ \u2026 (truncated to ${ur} lines; full span ${d})`:"",m=i.length?`
120
+ (other matches: ${i.map(g=>g.label).join(", ")})`:"",h=Pa(t,r);return`${f}
121
121
  ${c}${p}${h?`
122
- ${h}`:""}${m}`}var mm=M(()=>{yt();Lt();li();Te();Xe()});var hm,gm=M(()=>{Te();Xe();hm=Ze(gd)});function bm(e,{graph:t,svc:n}){let{match:s}=wt(n,rt(e,"module"),"module");return rd(t,s)}var wm=M(()=>{Te();Xe()});async function ym(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Oe("query is required");let r=md(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim(),toolNamePrefix:n?.toolNamePrefix});if(!o&&/^no module matches/.test(r)){let i=Pi(await xn(n),s);if(i)return i}return r}var vm=M(()=>{Lt();Te();_o()});async function $m(e,{graph:t,svc:n,config:s}){let o=rt(e,"class"),{match:r}=qt(n.graph,o);if(r)return hd(t,r,{toolNamePrefix:s?.toolNamePrefix});let i=Mi(await xn(s),o);if(i)return i;wt(n,o,"class")}var xm=M(()=>{Te();_o();Xe()});async function km(e,{graph:t,svc:n,config:s}){let o=rt(e,"class"),{match:r}=qt(n.graph,o);if(r)return bd(t,r);let i=Mi(await xn(s),o);if(i)return i;wt(n,o,"class")}var Em=M(()=>{Te();_o();Xe()});function nE(e,{conceptBase:t="concept:",relationMap:n=tE}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),r=new Map,i=g=>{r.has(g)||r.set(g,g)},a=g=>{let b=g;for(;r.get(b)!==b;)b=r.get(b);for(;r.get(g)!==b;){let y=r.get(g);r.set(g,b),g=y}return b},l=(g,b)=>{let y=a(g),w=a(b);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let g of e){let b=g.predicate;if(!s.has(b)&&!o.has(b))continue;let y=ee(g.subject),w=ee(g.object);!y||!w||(i(y),i(w),s.has(b)?l(y,w):c.push({s:y,o:w}))}let u=g=>t+g.replace(/ /g,"_"),d=new Map;for(let g of r.keys()){let b=a(g);d.has(b)||d.set(b,new Set),d.get(b).add(g)}let f=[];for(let[g,b]of d){let y=[...b].sort();f.push({id:u(g),prefLabel:g,altLabels:y.filter(w=>w!==g)})}f.sort((g,b)=>g.id<b.id?-1:g.id>b.id?1:0);let p=new Set,m=[];for(let{s:g,o:b}of c){let y=u(a(g)),w=u(a(b));if(y===w)continue;let $=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has($)||(p.add($),m.push({subject:y,object:w}))}return m.sort((g,b)=>`${g.subject}${g.object}`<`${b.subject}${b.object}`?-1:1),{concepts:f,related:m,conceptIdForTerm:g=>{let b=ee(g);return r.has(b)?u(a(b)):null},namespace:eE}}function dl(e,t,n={}){let s=nE(e,n),o=s.conceptIdForTerm(t);if(!o)return null;let r=new Map(s.concepts.map(u=>[u.id,u])),i=r.get(o),a=ee(t),l=[i.prefLabel,...i.altLabels].filter(u=>u!==a),c=s.related.filter(u=>u.subject===o||u.object===o).map(u=>r.get(u.subject===o?u.object:u.subject)).filter(Boolean);return{conceptId:o,prefLabel:i.prefLabel,altLabels:i.altLabels,synonyms:l,related:c}}var eE,tE,pl=M(()=>{Zt();eE="http://www.w3.org/2004/02/skos/core#",tE={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function fl(e,{config:t}){let n=rt(e,"term"),s=dl(await xn(t),n);if(!s)throw new Oe(`no synonym or related facts for "${n}" in the memory graph. This view answers where the store holds mgx:synonym / mgx:relatedTo facts (a corpus import seeds them).`);let o=[`${s.prefLabel} [${s.conceptId}]`];return s.synonyms.length&&o.push(`synonyms (skos:altLabel): ${s.synonyms.join(", ")}`),s.related.length&&o.push(`related (skos:related): ${s.related.map(r=>r.prefLabel).join(", ")}`),o.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),o.join(`
123
- `)}var Sm=M(()=>{Lt();pl();_o();Xe();fl.ownsGraphLoad=!0});function jm(e,{graph:t}){return wd(t,{pkg:String(e?.package||"").trim()})}var _m=M(()=>{Te()});function Rm(e,{graph:t,svc:n}){let{match:s}=wt(n,rt(e,"module"),"module");return Dd(t,s)}var Am=M(()=>{Te();Xe()});function Tm(e,{graph:t}){return $d(t)}var Cm=M(()=>{Te()});function Im(e,{graph:t}){let{content:n,tmct_ask:s}=ns(t,rt(e,"query"));return`${n}
122
+ ${h}`:""}${m}`}var Cm=L(()=>{kt();Mt();fi();Ie();Ge()});var Om,Im=L(()=>{Ie();Ge();Om=st(Td)});function Lm(e,{graph:t,svc:n}){let{match:s}=vt(n,et(e,"module"),"module");return yd(t,s)}var Nm=L(()=>{Ie();Ge()});async function Mm(e,{graph:t,config:n}){let s=String(e?.query||"").trim(),o=String(e?.kind||"").trim();if(!s&&!o)throw new Re("query is required");let r=Rd(t,s,{kind:o,decorator:String(e?.decorator||"").trim(),name:String(e?.name||"").trim(),toolNamePrefix:n?.toolNamePrefix});if(!o&&/^no module matches/.test(r)){let i=Bi(await rn(n),s);if(i)return i}return r}var Pm=L(()=>{Mt();Ie();Us()});async function Fm(e,{graph:t,svc:n,config:s}){let o=et(e,"class"),{match:r}=Kt(n.graph,o);if(r)return Ad(t,r,{toolNamePrefix:s?.toolNamePrefix});let i=zi(await rn(s),o);if(i)return i;vt(n,o,"class")}var Dm=L(()=>{Ie();Us();Ge()});async function zm(e,{graph:t,svc:n,config:s}){let o=et(e,"class"),{match:r}=Kt(n.graph,o);if(r)return Cd(t,r);let i=zi(await rn(s),o);if(i)return i;vt(n,o,"class")}var Bm=L(()=>{Ie();Us();Ge()});function XE(e,{conceptBase:t="concept:",relationMap:n=YE}={}){let s=new Set(n.synonym||[]),o=new Set(n.related||[]),r=new Map,i=g=>{r.has(g)||r.set(g,g)},a=g=>{let b=g;for(;r.get(b)!==b;)b=r.get(b);for(;r.get(g)!==b;){let y=r.get(g);r.set(g,b),g=y}return b},l=(g,b)=>{let y=a(g),w=a(b);y!==w&&(y<w?r.set(w,y):r.set(y,w))},c=[];for(let g of e){let b=g.predicate;if(!s.has(b)&&!o.has(b))continue;let y=X(g.subject),w=X(g.object);!y||!w||(i(y),i(w),s.has(b)?l(y,w):c.push({s:y,o:w}))}let u=g=>t+g.replace(/ /g,"_"),d=new Map;for(let g of r.keys()){let b=a(g);d.has(b)||d.set(b,new Set),d.get(b).add(g)}let f=[];for(let[g,b]of d){let y=[...b].sort();f.push({id:u(g),prefLabel:g,altLabels:y.filter(w=>w!==g)})}f.sort((g,b)=>g.id<b.id?-1:g.id>b.id?1:0);let p=new Set,m=[];for(let{s:g,o:b}of c){let y=u(a(g)),w=u(a(b));if(y===w)continue;let $=y<w?`${y}\0${w}`:`${w}\0${y}`;p.has($)||(p.add($),m.push({subject:y,object:w}))}return m.sort((g,b)=>`${g.subject}${g.object}`<`${b.subject}${b.object}`?-1:1),{concepts:f,related:m,conceptIdForTerm:g=>{let b=X(g);return r.has(b)?u(a(b)):null},namespace:KE}}function wl(e,t,n={}){let s=XE(e,n),o=s.conceptIdForTerm(t);if(!o)return null;let r=new Map(s.concepts.map(u=>[u.id,u])),i=r.get(o),a=X(t),l=[i.prefLabel,...i.altLabels].filter(u=>u!==a),c=s.related.filter(u=>u.subject===o||u.object===o).map(u=>r.get(u.subject===o?u.object:u.subject)).filter(Boolean);return{conceptId:o,prefLabel:i.prefLabel,altLabels:i.altLabels,synonyms:l,related:c}}var KE,YE,yl=L(()=>{Yt();KE="http://www.w3.org/2004/02/skos/core#",YE={synonym:["mgx:synonym"],related:["mgx:relatedTo","mgx:similarTo"]}});async function vl(e,{config:t,memoryBackend:n=null}){let s=et(e,"term"),o=wl(await rn(t,n),s);if(!o)throw new Re(`no synonym or related facts for "${s}" in the memory graph. This view answers where the store holds mgx:synonym / mgx:relatedTo facts (a corpus import seeds them).`);let r=[`${o.prefLabel} [${o.conceptId}]`];return o.synonyms.length&&r.push(`synonyms (skos:altLabel): ${o.synonyms.join(", ")}`),o.related.length&&r.push(`related (skos:related): ${o.related.map(i=>i.prefLabel).join(", ")}`),r.push("(from the memory graph's mgx:synonym / mgx:relatedTo / mgx:similarTo facts)"),is({content:r.join(`
123
+ `),data:o})}var Um=L(()=>{Mt();yl();Us();Ge();vl.ownsGraphLoad=!0});function uS(e,t){let n=[];for(let s of t||[])s?.predicate===JE&&X(s.subject)===e&&n.push(X(s.object));return n}function Ui(e,t){let n=X(e),s=new Set,o=[n],r=[];for(;o.length;){let i=o.shift();if(!s.has(i)){s.add(i),r.push(i);for(let a of uS(i,t))s.has(a)||o.push(a)}}return r}var JE,QE,ZE,eS,tS,nS,sS,oS,rS,iS,aS,cS,lS,Wm,$l=L(()=>{Yt();JE="rdfs:subClassOf",QE='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="10" r="3.4" fill="currentColor"/><circle cx="12" cy="15.6" r="4.6" fill="currentColor"/><g stroke="currentColor" stroke-width="1.1" fill="none" stroke-linecap="round"><path d="M9 8 L2 4"/><path d="M9 10 L1.5 9"/><path d="M9 12.5 L2 14"/><path d="M9 15.5 L3 19"/><path d="M15 8 L22 4"/><path d="M15 10 L22.5 9"/><path d="M15 12.5 L22 14"/><path d="M15 15.5 L21 19"/></g></svg>',ZE='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="13.2" rx="3.2" ry="5" fill="currentColor"/><circle cx="12" cy="7" r="2.6" fill="currentColor"/><g fill="currentColor" opacity="0.55"><path d="M9 10 C3 6 2 4 3 2 C6 2 9 6 10.5 10 Z"/><path d="M15 10 C21 6 22 4 21 2 C18 2 15 6 13.5 10 Z"/></g></svg>',eS='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2 C7 2 4 10 4 15.5 C4 20 7.6 22 12 22 C16.4 22 20 20 20 15.5 C20 10 17 2 12 2 Z" fill="currentColor"/></svg>',tS='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="13" cy="15" rx="6.4" ry="4.6" fill="currentColor"/><circle cx="7" cy="8.5" r="4" fill="currentColor"/><g fill="currentColor"><circle cx="4" cy="6" r="1.6"/><circle cx="7" cy="4.2" r="1.7"/><circle cx="10" cy="6" r="1.6"/></g><rect x="18.5" y="14" width="2.2" height="6" rx="1.1" fill="currentColor"/><circle cx="19.6" cy="13" r="1.5" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="9" y1="19.5" x2="9" y2="22"/><line x1="17" y1="19.5" x2="17" y2="22"/></g></svg>',nS='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="13" cy="15" rx="6.4" ry="4.2" fill="currentColor"/><circle cx="7" cy="9" r="3.6" fill="currentColor"/><path d="M4.5 6.5 L2 3 L6 5 Z" fill="currentColor"/><path d="M19 13 C22 12 22.5 15 20 16 Z" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="9" y1="19" x2="9" y2="22"/><line x1="17" y1="19" x2="17" y2="22"/></g></svg>',sS='<svg viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="13" rx="7" ry="4.4" fill="currentColor"/><circle cx="12" cy="7" r="3.4" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="7" y1="17" x2="7" y2="21"/><line x1="17" y1="17" x2="17" y2="21"/></g></svg>',oS='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="1" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M9 21 L9 13 A3 3 0 0 1 15 13 L15 21" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>',rS='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="5" width="16" height="3" rx="1" fill="currentColor"/><rect x="4" y="8" width="3" height="12" fill="currentColor"/><rect x="17" y="8" width="3" height="12" fill="currentColor"/></svg>',iS='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 6 C7.5 6 5 9.4 5 13.4 C5 17.7 8.1 20 12 20 C15.9 20 19 17.7 19 13.4 C19 9.4 16.5 6 12 6 Z" fill="currentColor"/><path d="M9.4 6.4 C9.9 4.6 10.8 3.4 12 3.4 C13.2 3.4 14.1 4.6 14.6 6.4" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><ellipse cx="9.8" cy="11.6" rx="1.6" ry="2.1" fill="currentColor" opacity="0.28"/></svg>',aS='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="6.5" r="3.2" fill="currentColor"/><path d="M6 21 C6 15.5 8.7 13 12 13 C15.3 13 18 15.5 18 21 Z" fill="currentColor"/></svg>',cS='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="6.5" r="3.2" fill="currentColor"/><path d="M6 21 C6 15.5 8.7 13 12 13 C15.3 13 18 15.5 18 21 Z" fill="currentColor"/><rect x="15.5" y="13.5" width="4.5" height="5" rx="1" fill="currentColor" opacity="0.6"/></svg>',lS='<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="10" width="18" height="10" rx="1.2" fill="currentColor"/><path d="M3 10 L5 5 H19 L21 10 Z" fill="currentColor" opacity="0.7"/><rect x="10.6" y="9.4" width="2.8" height="2.2" rx="0.4" fill="currentColor" opacity="0.35"/></svg>',Wm=Object.freeze({spider:QE,fly:ZE,egg:eS,poodle:tS,dog:nS,animal:sS,room:oS,furniture:rS,portable:iS,person:aS,adventurer:cS,container:lS})});function dS(e){return[...new Set([...e.matchAll(/\bid="([^"]+)"/g)].map(t=>t[1]))]}function Gm(e,t){if(!t||typeof e!="string")return e;let n=String(t).replace(/[^a-zA-Z0-9_-]/g,"-"),s=e;for(let o of dS(e)){let r=`${o}-${n}`;s=s.split(`id="${o}"`).join(`id="${r}"`),s=s.split(`url(#${o})`).join(`url(#${r})`)}return s}var Vm=L(()=>{});function pS(e,t){return(t||[]).filter(n=>Array.isArray(n?.classes)&&n.classes.includes(e))}function fS(e){let t=e?.match;return t?Array.isArray(t)?t:[t]:[]}function Km(e){return fS(e).filter(t=>t?.property&&t.value!==void 0)}function mS(e,t){return e.length?e.every(n=>(t||[]).some(s=>s.predicate===n.property&&s.object===n.value)):!1}function hS(e,t){let n=null,s=0;for(let o of e){let r=Km(o);r.length<=s||mS(r,t)&&(n=o,s=r.length)}return n}function gS(e,t,n){if(typeof n=="string"&&t.placeholder)return e.split(t.placeholder).join(n);if(n&&typeof n=="object"&&t.placeholders){let s=e;for(let[o,r]of Object.entries(t.placeholders)){if(!Object.prototype.hasOwnProperty.call(n,o))return null;s=s.split(r).join(n[o])}return s}return null}function qm(e,t){let n=e.svg,s=0;for(let o of Object.values(e.parameters||{})){let r=o?.values||{},i=(t||[]).find(l=>l.predicate===o.property&&Object.prototype.hasOwnProperty.call(r,l.object));if(!i)continue;let a=gS(n,o,r[i.object]);a&&(n=a,s+=1)}return s>0?n:null}function bS(e){let t=[];for(let n of Object.values(e.parameters||{})){n?.placeholder&&t.push(n.placeholder);for(let s of Object.values(n?.placeholders||{}))t.push(s)}return t}function wS(e,t){let n=t;for(let s of bS(e))n=n.split(s).join("");return n}function Hm(e,t,n){let s=pS(e,n),o=hS(s,t);if(o&&!o.parameters)return o.svg;if(o)return wS(o,qm(o,t)||o.svg);for(let i of s){if(i.match||!i.parameters)continue;let a=qm(i,t);if(a)return a}let r=s.find(i=>!i.match&&!i.parameters);return r?r.svg:null}function yS(e,t,n,s,o,r){for(let a of Ui(e,t)){let l=Hm(a,n,s);if(l)return l;if(Object.prototype.hasOwnProperty.call(o,a))return o[a]}let i=Hm(r,n,s);return i||o[r]}function Ym(e,t,n,s,o,{rootFallback:r="animal",instanceKey:i}={}){let a=yS(e,t,n,s,o,r);return i?Gm(a,i):a}var tI,nI,xl=L(()=>{$l();Vm();tI=Object.freeze(["left","half-left","half-right","right"]),nI=Object.freeze(["moving"])});function kl(e){for(let t of e||[])if(t?.predicate===vS&&Object.prototype.hasOwnProperty.call(Xm,t.object))return Xm[t.object];return 1}var vS,Xm,Jm=L(()=>{vS="mgx:hasProperty",Xm=Object.freeze({small:.8,large:1.3,long:1.2,tall:1.25})});function Qm(e,t){let n="mgx:feels",s="mgx:hasProperty",o=String(e&&e.class||"").trim(),r=String(e&&e.expression||"").trim(),i=String(e&&e.size||"").trim(),a=t||{},l=a.resolveSpriteAsset;if(typeof l!="function")throw new TypeError("resolveSpriteRequest needs deps.resolveSpriteAsset");let c=a.templates||[],u=a.spriteRegistry||{},d=a.factRows||[],f=a.rootFallback||"animal",p=a.classAncestorChain,m=a.sizeScaleFor,h=a.expressionPalette,g=[];r&&g.push({predicate:n,object:r}),i&&g.push({predicate:s,object:i});let b={rootFallback:f};a.instanceKey&&(b.instanceKey=a.instanceKey);let y=l(o,d,g,c,u,b),w=R=>l(R,[],g,c,{},{rootFallback:R}),$=R=>Object.prototype.hasOwnProperty.call(u,R),j=(R,x)=>{let T=c.filter(P=>P&&Array.isArray(P.classes)&&P.classes.indexOf(R)>=0),A=T.find(P=>P.svg===x)||T.find(P=>!P.match&&P.parameters)||null;return A?{classes:A.classes.slice(),parameters:Object.keys(A.parameters||{}).sort(),match:A.match||null}:null},v=null,E=null;if(typeof p=="function"){v=[];for(let R of p(o,d)){let x=w(R);if(v.push({term:R,template:!!x,registry:$(R)}),x){E={term:R,via:"template",hops:v.length-1,root:!1,template:j(R,x)};break}if($(R)){E={term:R,via:"registry",hops:v.length-1,root:!1,template:null};break}}if(!E){let R=w(f);v.push({term:f,template:!!R,registry:$(f),root:!0}),E={term:f,via:R?"template":"registry",hops:v.length-1,root:!0,template:R?j(f,R):null}}}let k=a.instanceKey?l(o,d,g,c,u,{rootFallback:f}):y,_=r?l(o,d,g.filter(R=>R.predicate!==n),c,u,{rootFallback:f}):null;return{class:o,expression:r||null,size:i||null,svg:y,scale:typeof m=="function"?m(g):1,sizeKnown:i&&typeof m=="function"?m([{predicate:s,object:i}])!==1:null,expressionKnown:r&&h?Object.prototype.hasOwnProperty.call(h,r):null,expressionApplied:r?k!==_:null,rootFallback:f,fellBackToRoot:E?!!E.root:null,chain:v,matched:E}}var Zm=L(()=>{});var eh,th,nh=L(()=>{xl();eh="icon tier",th="sprite tier"});var sh,oh=L(()=>{sh=()=>[]});var rh,ih=L(()=>{rh=()=>[]});function ES(){let e=rh();return e.length?{templates:e,tier:th}:{templates:sh(),tier:eh}}function ah(e){return e.map(t=>t.term).join(" -> ")}async function El(e,{config:t,memoryBackend:n=null}){let s=et(e,"class").toLowerCase(),o=String(e?.expression||"").trim().toLowerCase(),r=String(e?.size||"").trim().toLowerCase();if(o&&!Object.hasOwn(so,o))throw new Re(`"${o}" is not a sprite expression. The palette holds: ${xS().join(", ")}.`);if(r&&!kS(r))throw new Re(`"${r}" is not a size the sprite scale recognises \u2014 it reads a taught mgx:hasProperty size word off the individual, and has no entry for this one.`);let{templates:i,tier:a}=ES(),l=await rn(t,n),c=Qm({class:s,expression:o,size:r},{factRows:l,templates:i,spriteRegistry:Wm,resolveSpriteAsset:Ym,classAncestorChain:Ui,sizeScaleFor:kl,expressionPalette:so});if(!c.svg||c.fellBackToRoot)throw new Re(`no sprite for "${s}" \u2014 neither it nor any rdfs:subClassOf ancestor the memory graph knows (${ah(c.chain)}) carries one in the ${a}. Teach the class its superclass first, or ask for a class the catalog draws.`);if(o&&!c.expressionApplied)throw new Re(`the ${a} draws "${s}" (matched at "${c.matched.term}") but that template takes no expression, so "${o}" would not show. Ask for the plain sprite, or a class whose template carries an emotion parameter.`);let u=[o?`expression ${o}`:"",r?`size ${r}`:""].filter(Boolean),d=[`sprite for "${s}"${u.length?` (${u.join(", ")})`:""}, from the ${a}`,c.matched.hops===0?`matched at "${c.matched.term}", the class itself, via its own ${c.matched.via}`:`matched at "${c.matched.term}", ${c.matched.hops} hop(s) up the ancestor chain, via its ${c.matched.via}`,`ancestor chain walked: ${ah(c.chain)}`];return c.matched.template?.parameters.length&&d.push(`template parameters: ${c.matched.template.parameters.join(", ")}`),r&&d.push(`render scale: ${c.scale} (from the taught mgx:hasProperty "${r}")`),d.push(`${c.svg.length} characters of SVG markup`),is({content:d.join(`
124
+ `),data:{class:c.class,expression:c.expression,size:c.size,tier:a,scale:c.scale,svg:c.svg,chain:c.chain,matched:c.matched,expressionApplied:c.expressionApplied}})}var $S,xS,kS,ch=L(()=>{Mt();$l();xl();ba();Jm();Zm();nh();oh();ih();Us();Ge();$S="mgx:hasProperty",xS=()=>Object.keys(so).sort(),kS=e=>!!e&&kl([{predicate:$S,object:String(e)}])!==1;El.ownsGraphLoad=!0});function lh(e,{graph:t}){return Od(t,{pkg:String(e?.package||"").trim()})}var uh=L(()=>{Ie()});function dh(e,{graph:t,svc:n}){let{match:s}=vt(n,et(e,"module"),"module");return Zd(t,s)}var ph=L(()=>{Ie();Ge()});function fh(e,{graph:t}){return Nd(t)}var mh=L(()=>{Ie()});function gh(e,{graph:t}){let{content:n,tmct_ask:s}=ss(t,et(e,"query"));return is({content:n,data:s,text:`${n}${hh}${JSON.stringify(s,null,2)}`})}var hh,Sl=L(()=>{os();Ge();hh=`
124
125
 
125
126
  ---tmct_ask---
126
- ${JSON.stringify(s,null,2)}`}var Om=M(()=>{Lt();ss();Xe()});var Lm,Nm=M(()=>{Te();Xe();Lm=Ze(vd)});var Mm,Pm=M(()=>{Te();Xe();Mm=Ze(xd)});var Fm,Dm=M(()=>{Te();Xe();Fm=Ze(Ad)});var zm,Bm=M(()=>{Te();Xe();zm=Ze(Cd)});var Um,Wm=M(()=>{Te();Xe();Um=Ze(Id)});var Gm,qm=M(()=>{Te();Xe();Gm=Ze(Ed)});var Vm,Hm=M(()=>{Te();Xe();Vm=Ze(Sd)});var Km,Ym=M(()=>{Te();Xe();Km=Ze(_d)});var Xm,Jm=M(()=>{Te();Xe();Xm=Ze(Fd)});function sE(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function oE(e){let t=(e||[]).map(sE);return t.map(n=>JSON.stringify(n)).join(`
127
+ `});var bh,wh=L(()=>{Ie();Ge();bh=st(Ld)});var yh,vh=L(()=>{Ie();Ge();yh=st(Md)});var $h,xh=L(()=>{Ie();Ge();$h=st(Wd)});var kh,Eh=L(()=>{Ie();Ge();kh=st(Vd)});var Sh,jh=L(()=>{Ie();Ge();Sh=st(qd)});var _h,Rh=L(()=>{Ie();Ge();_h=st(Fd)});var Ah,Th=L(()=>{Ie();Ge();Ah=st(Dd)});var Ch,Oh=L(()=>{Ie();Ge();Ch=st(Bd)});var Ih,Lh=L(()=>{Ie();Ge();Ih=st(Qd)});function SS(e){let t={subject:e.subject,predicate:e.predicate,object:e.object,provenance:e.provenance||""};return e.quantifier&&(t.quantifier=e.quantifier),t}function jS(e){let t=(e||[]).map(SS);return t.map(n=>JSON.stringify(n)).join(`
127
128
  `)+(t.length?`
128
- `:"")}function Qm(e){return oE(Dt(e))}var Zm=M(()=>{He()});async function ml(e,{config:t,memoryBackend:n=null}){let s=n?null:await as(ve(ve(t.graphFile))),o=n||s.dir;try{return Qm(await tn(o))||"(the memory store holds no facts to export)"}finally{s&&await s.close()}}var eh=M(()=>{Zm();ze();He();ml.ownsGraphLoad=!0});async function hl(e,{config:t,ingest:n}){let s=String(e?.text??"");if(!s.trim())return"(nothing to ingest \u2014 pass some text)";if(typeof n!="function")return"(ingest isn't wired into this context \u2014 invoke tmct_ingest through the CLI `cli` route or the chat surface)";let o=e?.optimistic===!0,{dir:r,close:i}=await as(ve(ve(t.graphFile)));try{let a=await n(s,{memoryDir:r,config:t,sourceTag:"tool",optimistic:o,canonical:!0}),l=a.extracted.length+a.optimistic.length,c=`${a.sentences} sentence(s), ${a.recognized} recognized`+(o?`, ${a.optimistic.length} optimistic candidate(s)`:"")+`, ${a.skipped} skipped \u2014 ${l} fact(s) grounded.`;return l?`${c}
129
+ `:"")}function Nh(e){return jS(Ct(e))}var Mh=L(()=>{Je()});async function jl(e,{config:t,memoryBackend:n=null}){let s=n?null:await ls(xe(xe(t.graphFile))),o=n||s.dir;try{return Nh(await Xt(o))||"(the memory store holds no facts to export)"}finally{s&&await s.close()}}var Ph=L(()=>{Mh();ze();Je();jl.ownsGraphLoad=!0});async function _l(e,{config:t,ingest:n}){let s=String(e?.text??"");if(!s.trim())return"(nothing to ingest \u2014 pass some text)";if(typeof n!="function")return"(ingest isn't wired into this context \u2014 invoke tmct_ingest through the CLI `cli` route or the chat surface)";let o=e?.optimistic===!0,{dir:r,close:i}=await ls(xe(xe(t.graphFile)));try{let a=await n(s,{memoryDir:r,config:t,sourceTag:"tool",optimistic:o,canonical:!0}),l=a.extracted.length+a.optimistic.length,c=`${a.sentences} sentence(s), ${a.recognized} recognized`+(o?`, ${a.optimistic.length} optimistic candidate(s)`:"")+`, ${a.skipped} skipped \u2014 ${l} fact(s) grounded.`;return is({content:l?`${c}
129
130
  ${a.canonical.join(`
130
- `)}`:c}finally{await i()}}var th=M(()=>{ze();He();hl.ownsGraphLoad=!0});var rE,nh=M(()=>{yc();lf();pm();mm();gm();wm();vm();xm();Em();Sm();_m();Am();Cm();Om();Nm();Pm();Dm();Bm();Wm();qm();Hm();Ym();Jm();eh();th();rE=Object.freeze({tmct_context:wc,tmct_context_more:cf,tmct_describe:dm,tmct_snippet:fm,tmct_signature:hm,tmct_impact:bm,tmct_search:ym,tmct_members:$m,tmct_subclasses:km,tmct_related:fl,tmct_architecture:jm,tmct_exports:Rm,tmct_untested:Tm,tmct_ask:Im,tmct_tests_for:Lm,tmct_history:Mm,tmct_file_history:Fm,tmct_method_history:zm,tmct_class_history:Um,tmct_callers:Gm,tmct_callees:Vm,tmct_calls:Km,tmct_cochanges:Xm,tmct_export:ml,tmct_ingest:hl})});var gl=M(()=>{});var Fi,bl=M(()=>{Fi=()=>({relations:[],constructions:[]})});var sh,oh=M(()=>{yt();ze();Tu();Lt();Uo();ss();pi();fi();nh();io();Zr();gl();bl();fi();yc();ei(void 0);Qr(Fi);sh=Au.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var rO,iO,aO,Di=M(()=>{rO=Object.freeze(["entity","set","event","measure"]),iO=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),aO=Object.freeze({it:Object.freeze(["entity","event","measure"]),this:Object.freeze(["entity","event","measure"]),that:Object.freeze(["entity","event","measure"]),"this one":Object.freeze(["entity","event","measure"]),"that one":Object.freeze(["entity","event","measure"]),those:Object.freeze(["set"]),them:Object.freeze(["set"]),these:Object.freeze(["set"]),here:Object.freeze(["entity"])})});var at,lO,uO,dO,pO,fO,mO,hO,gO,bO,wO,yO,vO,$O,xO,kO,EO,iE,SO,jO,rh=M(()=>{at=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},lO=at("createRequire"),uO=at("readFileSync"),dO=at("access"),pO=at("readFile"),fO=at("writeFile"),mO=at("appendFile"),hO=at("mkdir"),gO=at("mkdtemp"),bO=at("rename"),wO=at("unlink"),yO=at("rm"),vO=at("stat"),$O=at("copyFile"),xO=at("readdir"),kO=at("createReadStream"),EO=at("createWriteStream"),iE=at("randomBytes"),SO=at("spawnSync"),jO=at("createInterface")});var zi=M(()=>{rh()});var ct,TO,CO,IO,OO,LO,NO,MO,PO,FO,DO,zO,BO,UO,WO,GO,qO,zt,VO,HO,KO,ls=M(()=>{ct=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},TO=ct("createRequire"),CO=ct("readFileSync"),IO=ct("access"),OO=ct("readFile"),LO=ct("writeFile"),NO=ct("appendFile"),MO=ct("mkdir"),PO=ct("mkdtemp"),FO=ct("rename"),DO=ct("unlink"),zO=ct("rm"),BO=ct("stat"),UO=ct("copyFile"),WO=ct("readdir"),GO=ct("createReadStream"),qO=ct("createWriteStream"),zt=e=>String(e),VO=ct("randomBytes"),HO=ct("spawnSync"),KO=ct("createInterface")});var aE,ih,ZO,eL,tL,yl=M(()=>{yt();ls();ze();aE={},ih=Z(ve(zt(aE.url)),"..","..",".."),ZO=Z(ih,"data","templates","responses.jsonl"),eL=Z(ih,"data","phrasebook","software-phrases.txt"),tL=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});function lE(e,t={}){let n=cE.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function uE(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>lE(s,t))):1}function Je(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:uE(s,t)})).sort((s,o)=>o.bias-s.bias||(o.row?.trust??0)-(s.row?.trust??0)||s.index-o.index).map(s=>s.row)}var cE,ah=M(()=>{cE=/^src:corpus:(.+)$/});var lt,oL,Ro,rL,iL,aL,cL,lL,uL,dL,pL,fL,mL,hL,gL,dE,pE,bL,wL,yL,zs=M(()=>{lt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},oL=lt("createRequire"),Ro=lt("readFileSync"),rL=lt("access"),iL=lt("readFile"),aL=lt("writeFile"),cL=lt("appendFile"),lL=lt("mkdir"),uL=lt("mkdtemp"),dL=lt("rename"),pL=lt("unlink"),fL=lt("rm"),mL=lt("stat"),hL=lt("copyFile"),gL=lt("readdir"),dE=lt("createReadStream"),pE=lt("createWriteStream"),bL=lt("randomBytes"),wL=lt("spawnSync"),yL=lt("createInterface")});function ch(e,t){let n=String(e).toLowerCase().replace(/^[^a-z]+/,"");if(!n)return null;for(let o of t.vowel_sound_consonants||[])if(n.startsWith(o))return!0;for(let o of t.consonant_sound_vowels||[])if(n.startsWith(o))return!1;let s=n[0];return"aeiou".includes(s)?!0:/[a-z]/.test(s)?!1:null}function gE(e=mE){let t=xo(Ro(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function vl(){if(Bi===null)try{Bi=gE()}catch{Bi=[]}return Bi}var bE,fE,mE,hE,_L,Bi,$l=M(()=>{zs();ls();ze();Ei();yl();bE={},fE=ve(zt(bE.url)),mE=Z(fE,"..","..","data","templates","grammar-rules.toml"),hE=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),_L=Object.freeze(new Set(hE.filter(e=>e!=="prose")));Bi=null});function wE(){if(kr!==void 0)return kr;try{let e=lh?lh():yE();kr=e&&e.winkNLP&&e.model?e:null}catch{kr=null}return kr}function yE(){let e=process.getBuiltinModule("node:module").createRequire(vE.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function xl(){if(Ao!==void 0)return Ao;let e=wE();if(!e)return Ao=null,null;try{Ao=e.winkNLP(e.model)}catch{Ao=null}return Ao}var vE,lh,kr,Ao,kl=M(()=>{vE={}});var uh=M(()=>{kl()});var ph,dh=M(()=>{ph={comment:"tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",nouns:{module:{},class:{},function:{},method:{},attribute:{},variable:{},constant:{},test:{},suite:{},service:{},repository:{},branch:{},commit:{},tag:{},release:{},package:{},library:{},framework:{},api:{},endpoint:{},route:{},handler:{},controller:{},model:{},view:{},template:{},component:{},interface:{},type:{},category:{},kind:{},artifact:{},routine:{},part:{},helper:{},operation:{},change:{},schema:{},database:{},table:{},query:{},index:{plural:"indices"},cache:{},queue:{},worker:{},job:{},task:{},bug:{},defect:{},issue:{},ticket:{},feature:{},requirement:{},specification:{},document:{},developer:{},engineer:{},user:{},visitor:{},team:{},project:{},codebase:{},file:{},directory:{},folder:{},line:{},symbol:{},identifier:{},comment:{},docstring:{},string:{},number:{},list:{},array:{},graph:{},node:{},edge:{},triple:{},fact:{},ontology:{},lexicon:{},grammar:{},sentence:{},utterance:{},session:{},response:{},request:{},question:{},answer:{},error:{},exception:{},warning:{},log:{},metric:{},benchmark:{},pipeline:{},build:{},deployment:{},environment:{},config:{},configuration:{},setting:{},option:{},flag:{},argument:{},parameter:{},value:{},result:{},output:{},input:{},server:{},client:{},protocol:{},message:{},event:{},hook:{},plugin:{},script:{},tool:{},command:{},prompt:{},token:{},parser:{},compiler:{},linter:{},formatter:{},runtime:{},process:{},thread:{},loop:{},statement:{},expression:{},keyword:{},scope:{},callback:{},promise:{},iterator:{},generator:{},unit:{},risk:{},prototype:{},milestone:{},sprint:{},backlog:{},roadmap:{},phase:{},pattern:{},smell:{},coverage:{},mock:{},stub:{},fixture:{},assertion:{},snapshot:{},regression:{},migration:{},refactor:{},review:{},merge:{},license:{property:"data"},version:{property:"data"},name:{property:"data"},path:{property:"data"},size:{property:"data"},status:{property:"data"},language:{property:"data"},extension:{property:"data"},churn:{property:"data"},impact:{property:"data"},complexity:{property:"data"},latency:{property:"data"},duration:{property:"data"},frequency:{property:"data"},severity:{property:"data"},owner:{property:"object"},maintainer:{property:"object"},author:{property:"object"},reviewer:{property:"object"},parent:{property:"object"},dependency:{property:"object"},man:{plural:"men"},woman:{plural:"women"},person:{plural:"people"},child:{plural:"children"},boy:{},girl:{},baby:{},adult:{},friend:{},neighbor:{},stranger:{},guest:{},doctor:{},teacher:{},nurse:{},student:{},farmer:{},mother:{},father:{},brother:{},sister:{},family:{},king:{},queen:{},soldier:{},artist:{},writer:{},cook:{},group:{},crowd:{},audience:{},club:{},president:{},human:{},lawyer:{},driver:{},manager:{},officer:{},judge:{},priest:{},servant:{},butler:{},housekeeper:{},gardener:{},employee:{},boss:{},husband:{},wife:{plural:"wives"},son:{},daughter:{},grandmother:{},grandfather:{},citizen:{},customer:{},leader:{},champion:{},volunteer:{},resident:{},place:{},city:{},town:{},village:{},country:{},house:{},home:{},room:{},kitchen:{},bedroom:{},bathroom:{},school:{},hospital:{},shop:{},market:{},church:{},park:{},garden:{},street:{},road:{},bridge:{},farm:{},office:{},factory:{},museum:{},hotel:{},airport:{},castle:{},beach:{},forest:{},mountain:{},hat:{},shirt:{},coat:{},shoe:{},dress:{},clothing:{},chair:{},desk:{},lamp:{},portrait:{},bed:{},door:{},window:{},wall:{},roof:{},pen:{},paper:{},key:{},lock:{},box:{},car:{},bicycle:{},boat:{},train:{},wheel:{},knife:{plural:"knives"},spoon:{},fork:{},plate:{},cup:{},bottle:{},bag:{},money:{},coin:{},toy:{},machine:{},clock:{},phone:{},book:{},letter:{},umbrella:{},glove:{},sock:{},ring:{},watch:{},mirror:{},candle:{},ladder:{},hammer:{},basket:{},wallet:{},dog:{},cat:{},horse:{},cow:{},pig:{},sheep:{},bird:{},fish:{},mouse:{plural:"mice"},rabbit:{},bear:{},lion:{},tiger:{},elephant:{},snake:{},mole:{},groundhog:{},meerkat:{},tree:{},flower:{},grass:{},leaf:{plural:"leaves"},root:{},seed:{},fruit:{},water:{},air:{},fire:{},earth:{},stone:{},sand:{},gold:{},iron:{},rain:{},snow:{},wind:{},cloud:{},sun:{},moon:{},star:{},owl:{},wolf:{plural:"wolves"},frog:{},bee:{},ant:{},butterfly:{},spider:{},river:{},ocean:{},time:{},day:{},night:{},morning:{},evening:{},week:{},month:{},year:{},hour:{},minute:{},second:{},moment:{},season:{},spring:{},summer:{},winter:{},wedding:{},race:{},dozen:{},half:{plural:"halves"},amount:{},meeting:{},game:{},war:{},trip:{},birthday:{},holiday:{},autumn:{},century:{},body:{},head:{},hand:{},arm:{},leg:{},foot:{plural:"feet"},eye:{},ear:{},mouth:{},nose:{},hair:{},heart:{},blood:{},bone:{},skin:{},face:{},food:{},bread:{},meat:{},milk:{},egg:{},cheese:{},vegetable:{},meal:{},breakfast:{},dinner:{},drink:{},wine:{},tea:{},coffee:{},tongue:{},tooth:{plural:"teeth"},finger:{},toe:{},shoulder:{},knee:{},brain:{},lung:{},sugar:{},salt:{},word:{},story:{},news:{},idea:{},thought:{},mind:{},memory:{},dream:{},belief:{},love:{},hate:{},fear:{},joy:{},anger:{},hope:{},surprise:{},pride:{},song:{},music:{},sound:{},voice:{},picture:{},art:{},knowledge:{},opinion:{},reason:{},imagination:{},laughter:{},tear:{},smile:{},silence:{},object:{},location:{},quantity:{},organization:{},animal:{},plant:{},furniture:{},vehicle:{},insect:{},emotion:{},metal:{},liquid:{},weather:{},planet:{},jewelry:{},cutlery:{},government:{},material:{},draw:{},set:{},heavy:{},stand:{},free:{},pack:{},dead:{},pick:{},double:{},straight:{},cast:{},dry:{},bank:{},stamp:{},tender:{},fair:{},active:{},regular:{},blue:{},hack:{},band:{},brush:{},guard:{},master:{},transfer:{},firm:{},side:{},bull:{},mate:{},rank:{},board:{},brace:{},grade:{},better:{},course:{},natural:{},butt:{},camp:{},crop:{},date:{},fold:{},help:{},hunt:{},count:{},court:{},crush:{},major:{},march:{},tease:{},tough:{},flight:{},forward:{},division:{},commission:{},jam:{},rat:{},gray:{},hood:{},jerk:{},miss:{},pile:{},pool:{},rear:{},whip:{},bench:{},chain:{},cycle:{},grind:{},guide:{},stiff:{},troll:{},union:{},circle:{},carrier:{},defence:{},defense:{},radical:{},reserve:{},intimate:{},opposite:{},superior:{},grey:{},host:{},knot:{},left:{},lost:{},blind:{},crank:{},panel:{},rally:{},state:{},tramp:{},waver:{},clutch:{},living:{},runner:{},steady:{},stream:{},combine:{},company:{},convert:{},general:{},moderate:{},alternate:{},ace:{},crab:{},flop:{},fund:{},pair:{},rake:{},rock:{},sick:{},blade:{},cheat:{},sport:{},caller:{},column:{},couple:{},divine:{},pledge:{},simple:{},sponge:{},system:{},wanton:{},sleeper:{},business:{},associate:{},instrument:{},substitute:{},gun:{},sum:{},alto:{},best:{},buff:{},dear:{},mass:{},cream:{},creep:{},giant:{},labor:{},pilot:{},sneak:{},stack:{},staff:{},world:{},gutter:{},jumper:{},labour:{},lather:{},picket:{},reader:{},savage:{},captain:{},culture:{},monitor:{},neutral:{},unknown:{},utility:{},inferior:{},initiate:{},innocent:{},national:{},transpose:{},association:{},professional:{},bum:{},fan:{},law:{},deck:{},fool:{},join:{},kink:{},page:{},pink:{},stud:{},twin:{},clump:{},coach:{},dance:{},drone:{},extra:{},feast:{},fence:{},fleet:{},flock:{},ghost:{},clear:{},right:{},open:{},beat:{},back:{},block:{},see:{},keep:{},square:{},pitch:{},center:{},centre:{},top:{},post:{},field:{},spot:{},bar:{},end:{},frame:{},rough:{},address:{},quarter:{},position:{},land:{},bound:{},range:{},seat:{},dark:{},rail:{},cross:{},section:{},tip:{},plug:{},port:{},stall:{},corner:{},outside:{},dig:{},way:{},front:{},joint:{},patch:{},reach:{},thick:{},medium:{plural:"media"},dock:{},ruin:{},tack:{},floor:{},bottom:{},puddle:{},compound:{},retreat:{},mat:{},belt:{},dump:{},scene:{},space:{},border:{},common:{},cradle:{},inside:{},surface:{},lie:{},boot:{},clog:{},coil:{},nest:{},wire:{},yard:{},forge:{},limit:{},lodge:{},buffer:{},middle:{},capital:{},overhead:{},preserve:{},terminal:{},direction:{},hall:{},loft:{},plot:{},tape:{},grate:{},stoop:{},fringe:{},circuit:{},distance:{},derivation:{},bent:{},gate:{},mill:{},safe:{},sail:{},hedge:{},paint:{},parcel:{},sphere:{},bearing:{},profile:{},shelter:{},crossing:{},interior:{},reservation:{},area:{},bush:{},cork:{},dive:{},limb:{},raft:{},shed:{},zone:{},chase:{},cut:{},light:{},charge:{},check:{},work:{},stock:{},stick:{},flat:{},crack:{},press:{},settle:{},spread:{},wash:{},well:{},swing:{},fly:{},tap:{},stretch:{},shot:{},black:{},strip:{},separate:{},tie:{},rack:{},match:{},piece:{},shell:{},still:{},present:{},trim:{},spike:{},split:{},white:{},yield:{},squeeze:{},bolt:{},fret:{},choke:{},float:{},track:{},low:{},crown:{},screen:{},die:{plural:"dice"},pin:{},chip:{},mold:{},seal:{},draft:{},shade:{},shaft:{},stuff:{},switch:{},balance:{},reverse:{},subject:{},approach:{},beam:{},bill:{},card:{},link:{},sack:{},sink:{},trap:{},spare:{},credit:{},counter:{},express:{},positive:{},net:{},pay:{},ball:{},bond:{},bowl:{},horn:{},pole:{},wing:{},glass:{},grant:{},smack:{},collar:{},record:{},ruffle:{},silver:{},negative:{},cap:{},lap:{},pad:{},rag:{},rig:{},bend:{},clip:{},fine:{},flap:{},heel:{},pall:{},pump:{},gauge:{},image:{},plain:{},print:{},slick:{},spoil:{},clinch:{},gather:{},offset:{},pocket:{},relief:{},channel:{},whistle:{},irregular:{},transport:{},bat:{},ice:{},peg:{},pot:{},bust:{},grip:{},hole:{},nail:{},poke:{},slug:{},spat:{},stem:{},suit:{},yoke:{},flood:{},grand:{},gross:{},perch:{},slip:{},down:{},shoot:{},ground:{},discharge:{},solid:{},kill:{},slack:{},waste:{},rush:{},grain:{},shake:{},pit:{},mould:{},colour:{},render:{},mount:{},cutting:{},fill:{},flux:{},tail:{},plaster:{},swallow:{},concentrate:{},bay:{},gum:{},ray:{},slop:{},spur:{},extract:{},fat:{},hop:{},corn:{},rust:{},smut:{},label:{},stain:{},composition:{},gas:{},pip:{},duck:{},gall:{},lime:{},mint:{},tick:{},stalk:{},whiff:{},cement:{},rubber:{},conjugate:{},preparation:{},dun:{},dust:{},jade:{},mire:{},pulp:{},snag:{},bloom:{},caper:{},crude:{},fluid:{},frost:{},paste:{},rinse:{},steam:{},straw:{},corona:{},poison:{},refuse:{},savory:{},feather:{},ferment:{},organic:{},chestnut:{},mushroom:{},percolate:{},sublimate:{},synthetic:{},suspension:{},precipitate:{},cod:{},pet:{},rod:{},bunt:{},crow:{},hide:{},punk:{},vein:{},assay:{},goose:{plural:"geese"},olive:{},stray:{},trash:{},ginger:{},pepper:{},permit:{},polish:{},sorrel:{},blister:{},bristle:{},complex:{},filling:{},flicker:{},harvest:{},scollop:{},whiting:{},anteater:{},snowball:{},tincture:{},repellent:{},ink:{},lip:{},nag:{},rue:{},wad:{},acid:{},beak:{},bean:{},coal:{},dirt:{},fawn:{},fuel:{},lark:{},ling:{},mash:{},palm:{},pelt:{},plum:{},pony:{},pout:{},soil:{},stag:{},bream:{},brier:{},chalk:{},coral:{},fiber:{},fall:{},pass:{},lift:{},go:{},roll:{},drop:{},blow:{},return:{},strike:{},rise:{},snap:{},shift:{},twist:{},case:{},deal:{},start:{},deep:{},jump:{},step:{},stop:{},pound:{},advance:{},pop:{},flash:{},rest:{},crash:{},score:{},figure:{},leave:{},smash:{},stroke:{},first:{},sweep:{},even:{},flow:{},kick:{},heave:{},trace:{},opening:{},full:{},gain:{},jack:{},spin:{},wave:{},splash:{},bob:{},bang:{},dash:{},flick:{},hitch:{},prime:{},proof:{},passing:{},bit:{},click:{},knock:{},swell:{},trouble:{},collapse:{},movement:{},standard:{},variation:{},rap:{},boom:{},bump:{},clap:{},pace:{},peck:{},zero:{},blaze:{},speed:{},spell:{},treat:{},bounce:{},factor:{},little:{},plunge:{},scrape:{},single:{},ban:{},mix:{},one:{},mesh:{},roar:{},tilt:{},climb:{},flip:{},puff:{},bite:{},feed:{},bitter:{},chop:{},sour:{},special:{},crisp:{},tonic:{},scallop:{},mess:{},quick:{},smear:{},fillet:{},curl:{},malt:{},glaze:{},souse:{},breast:{},humour:{},draught:{},delicacy:{},dressing:{},transplant:{},hip:{},sop:{},kiss:{},mush:{},neck:{},belly:{},frank:{},jumble:{},junket:{},trifle:{},stomach:{},clot:{},shin:{},stew:{},tart:{},cheek:{},graft:{},molar:{},roast:{},spice:{},stout:{},sweat:{},groove:{},region:{},savoury:{},western:{},backbone:{},conserve:{},dominant:{},macerate:{},melancholy:{},cake:{},lens:{},loaf:{plural:"loaves"},menu:{},must:{},peel:{},pore:{},suds:{},butch:{},cling:{},curry:{},drool:{},honey:{},jerky:{},juice:{},mince:{},nasal:{},nerve:{},sauce:{},tract:{},dainty:{},entree:{},facial:{},relish:{},squash:{},brittle:{},caramel:{},cordial:{},fissure:{},oblique:{},adhesion:{},turnover:{},nonpareil:{},posterior:{},vegetation:{},ail:{},orb:{},pap:{},rum:{},brew:{},chew:{},hash:{},lard:{},rump:{},brine:{},dowdy:{},farce:{},flour:{},fudge:{},halal:{},icing:{},lunch:{},play:{},make:{},hold:{},close:{},mark:{},form:{},order:{},support:{},rule:{},sign:{},hang:{},drag:{},feel:{},find:{},shock:{},mean:{},offer:{},study:{},show:{},tone:{},flare:{},attack:{},act:{},life:{plural:"lives"},stay:{},think:{},secret:{},account:{},hurt:{},note:{},taste:{},report:{},measure:{},condition:{},cry:{},focus:{plural:"foci"},style:{},thing:{},title:{},recall:{},average:{},contract:{},dissolve:{},so:{},aim:{},bind:{},heat:{},know:{},stir:{},claim:{},power:{},demand:{},design:{},notice:{},source:{},upgrade:{},resolution:{},bid:{},skim:{},brand:{},curve:{},sight:{},smoke:{},digest:{},regard:{},passage:{},program:{},exposure:{},interest:{},character:{},projection:{},lay:{},curse:{},favor:{},remit:{},sense:{},slash:{},wedge:{},bubble:{},excuse:{},favour:{},invite:{},mantle:{},salute:{},stress:{},survey:{},temper:{},comfort:{},neglect:{},resolve:{},respect:{},torment:{},conflict:{},dispatch:{},standing:{},challenge:{},programme:{},background:{},conclusion:{},impression:{},particular:{},withdrawal:{},cite:{},echo:{},hail:{},rip:{},lot:{},great:{},relay:{},tenor:{},browse:{},bundle:{},chorus:{},cypher:{},fellow:{},litter:{},marine:{},native:{},occult:{},plague:{},rocker:{},scheme:{},series:{plural:"series"},social:{},streak:{},sucker:{},teaser:{},antique:{},battery:{},bracket:{},founder:{},gallery:{},liberal:{},starter:{},turnout:{},witness:{},diagonal:{},familiar:{},ordinary:{},prospect:{},sequence:{},aggregate:{},authority:{},community:{},dependent:{},desperate:{},patronage:{},primitive:{},principal:{},complement:{},engagement:{},foundation:{},generation:{},settlement:{},combination:{},lightweight:{},steamroller:{},subordinate:{},organisation:{},establishment:{},representative:{},con:{},fox:{},kid:{},pod:{},red:{},sex:{},spy:{},vet:{},aged:{},bore:{},diet:{},fare:{},gown:{},hawk:{},heap:{},herd:{},hive:{},lump:{},romp:{},sort:{},agent:{},alien:{},beard:{},brave:{},breed:{},brood:{},canon:{},craft:{},crazy:{},devil:{},dummy:{},equal:{},flake:{},groom:{},mound:{},organ:{},scrub:{},toast:{},troop:{},youth:{},colony:{},copper:{},cutter:{},escort:{},feeder:{},junior:{},maroon:{},matrix:{plural:"matrices"},modern:{},muscle:{},people:{},sector:{},shrink:{},tinker:{},topper:{},booster:{},gallant:{},hostile:{},marshal:{},network:{},nucleus:{plural:"nuclei"},premier:{},scourge:{},secular:{},sitting:{},snapper:{},suspect:{},swagger:{},traffic:{},variant:{},cardinal:{},derelict:{},domestic:{},favorite:{},finisher:{},graduate:{},humanist:{},infernal:{},magazine:{},manifold:{},minister:{},palatine:{},presence:{},receiver:{},relation:{},favourite:{},following:{},goldbrick:{},operative:{},sensitive:{},syndicate:{},complexion:{},mouthpiece:{},withdrawer:{},appointment:{},conjugation:{},constituent:{},heavyweight:{},incompetent:{},independent:{},replacement:{},underground:{},untouchable:{},conservative:{},administration:{},ape:{},gem:{},hob:{},sap:{},van:{},axis:{plural:"axes"},chap:{},char:{},crew:{},cult:{},duet:{},gang:{},hero:{},hire:{},lamb:{},lame:{},mute:{},nude:{},pawn:{},pill:{},sage:{},soul:{},tout:{},trio:{},ward:{},worm:{},bunch:{},crimp:{},dwarf:{},elect:{},flank:{},ideal:{},noble:{},octet:{},quack:{},saint:{},scrag:{},shark:{},shoal:{},silly:{},skunk:{},super:{},witch:{},zombi:{},agency:{},anchor:{},backup:{},batter:{},buster:{},canary:{},circus:{},dealer:{},domain:{},doomed:{},genius:{},gossip:{},herald:{},hoodoo:{},hopper:{},immune:{},jockey:{},legion:{},member:{},nature:{},orphan:{},parade:{},peanut:{},pillar:{},pirate:{},player:{},porter:{},pusher:{},putter:{},senior:{},septet:{},sestet:{},sextet:{},surety:{},tapper:{},tiller:{},zombie:{},adjunct:{},butcher:{},captive:{},cascade:{},chapter:{},charity:{},checker:{},chicane:{},chicken:{},climber:{},cognate:{},consort:{},cracker:{},dresser:{},gentile:{},invalid:{},knocker:{},lineage:{},mission:{},mixture:{},monster:{},offence:{},partner:{},pioneer:{},pitcher:{},quartet:{},quintet:{},recruit:{},referee:{},shooter:{},spoiler:{},sponsor:{},stemmer:{},steward:{},striker:{},terrace:{},alliance:{},castrate:{},designer:{},director:{},ensemble:{},faithful:{},friendly:{},mandarin:{},operator:{},romantic:{},accessory:{},annoyance:{},attendant:{},bourgeois:{},precedent:{},quadruple:{},reception:{},recession:{},religious:{},reprobate:{},satellite:{},selection:{},sensation:{},supporter:{},contingent:{},convention:{},expedition:{},incendiary:{},individual:{},masquerade:{},population:{},sweetheart:{},tubercular:{},confederate:{},cooperative:{},subdivision:{},territorial:{},transcriber:{},intelligence:{},registration:{},sophisticate:{},welterweight:{},revolutionary:{},ex:{},ass:{},cog:{},cub:{},den:{},dud:{},duo:{},ham:{},hog:{},mob:{},pro:{},deaf:{},dove:{},fate:{},five:{},folk:{},gull:{},jinx:{},mime:{},nark:{},nine:{},pest:{},prey:{},quad:{},rash:{},scab:{},sire:{},wisp:{},wood:{},zany:{},armor:{},batch:{},bogey:{},caste:{},chief:{},choir:{},clone:{},divan:{},drunk:{},elder:{},enemy:{},exile:{},faith:{},flirt:{},grunt:{},joker:{},lobby:{},louse:{plural:"lice"},pagan:{},pivot:{},racer:{},rebel:{},scout:{},siren:{},slave:{},swarm:{},timid:{},triad:{},tribe:{},armour:{},bearer:{},censor:{},choker:{},convoy:{},covert:{},damned:{},deputy:{},empire:{},goffer:{},gopher:{},huddle:{},killer:{},league:{},martyr:{},muster:{},mystic:{},outfit:{},packet:{},palace:{},passer:{},patrol:{},potter:{},quarry:{},rigger:{},ringer:{},rustic:{},scribe:{},sitter:{},slider:{},slouch:{},squire:{},squirt:{},stupid:{},summit:{},tailor:{},tenant:{},terror:{},tracer:{},turkey:{},turner:{},venter:{},voider:{},voodoo:{},walker:{},worthy:{},academy:{},agonist:{},amateur:{},ancient:{},banquet:{},cabinet:{},cashier:{},classic:{},commune:{},courser:{},crammer:{},current:{},divider:{},economy:{},edition:{},emperor:{},entrant:{},fireman:{},lookout:{},octette:{},orderly:{},painter:{},pervert:{},plotter:{},plunger:{},roaster:{},sampler:{},scanner:{},sellout:{},skimmer:{},skipper:{},society:{},soprano:{},spastic:{},spotter:{},stratum:{plural:"strata"},trimmer:{},tripper:{},trooper:{},tumbler:{},upstart:{},veteran:{},wheeler:{},academic:{},agnostic:{},aviation:{},backstop:{},baritone:{},calendar:{},casualty:{},colonial:{},divinity:{},fireball:{},homeless:{},huckster:{},marriage:{},militant:{},military:{},ministry:{},modifier:{},partisan:{},pedigree:{},possible:{},recorder:{},regiment:{},renegade:{},repeater:{},revenant:{},septette:{},sextette:{},shepherd:{},stalwart:{},stringer:{},stripper:{},whistler:{},affiliate:{},ascendant:{},bacchanal:{},canvasser:{},cockscomb:{},collector:{},comforter:{},commander:{},companion:{},conductor:{},crossover:{},eccentric:{},executive:{},fledgling:{},franchise:{},freelance:{},incumbent:{},mercenary:{},moderator:{},neighbour:{},newspaper:{},patriarch:{},patrician:{},portfolio:{},quartette:{},quintette:{},repertory:{},secretary:{},segregate:{},spearhead:{},stigmatic:{},summation:{},transient:{},trumpeter:{},voluntary:{},absolutism:{},anthropoid:{},apparition:{},assemblage:{},collective:{},contractor:{},delinquent:{},episcopate:{},exaltation:{},exposition:{},illiterate:{},judicature:{},leadership:{},lieutenant:{},minimalist:{},percussion:{},profligate:{},provincial:{},rendezvous:{},brotherhood:{},determinant:{},distributor:{},interpreter:{},stipendiary:{},analphabetic:{},antediluvian:{},civilisation:{},civilization:{},commonwealth:{},conglomerate:{},contemporary:{},cosmopolitan:{},humanitarian:{},neighborhood:{},thoroughbred:{},ultramontane:{},concatenation:{},featherweight:{},superordinate:{},classification:{},fundamentalist:{},cop:{},don:{},eon:{},gal:{},gob:{},god:{},hoe:{},kin:{},nan:{},pup:{},wag:{},wit:{},aeon:{},ally:{},bard:{},chum:{},clew:{},dean:{},fink:{},flak:{},geek:{},goof:{},hulk:{},idol:{},lady:{},loon:{},mace:{},para:{},ruck:{},seer:{},self:{plural:"selves"},adder:{},angel:{},augur:{},baron:{},blond:{},brick:{},brute:{},cabal:{},champ:{},comic:{},crier:{},decoy:{},demon:{},diner:{},diver:{},diwan:{},drove:{},envoy:{},fiend:{},flack:{},flier:{},flyer:{},freak:{},gaudy:{},harpy:{},horde:{},indie:{},jewel:{},leech:{},levee:{},liege:{},locus:{},loser:{},mimic:{},needy:{},nymph:{},oiler:{},poser:{},pupil:{},riser:{},roper:{},rummy:{},scold:{},squad:{},timer:{},tutor:{},usher:{},vicar:{},whale:{},wiper:{},affine:{},albino:{},angler:{},badass:{},baster:{},beggar:{},blonde:{},bomber:{},bowler:{},butter:{},carver:{},caster:{},chichi:{},clinic:{},closer:{},cohort:{},coiner:{},comber:{},cookie:{},cordon:{},corpus:{},cotter:{},cowboy:{},coyote:{},critic:{},dragon:{},drawer:{},drudge:{},eleven:{},ensign:{},estate:{},ethnic:{},exarch:{},finder:{},fodder:{},gaffer:{},gainer:{},galaxy:{},granny:{},hacker:{},hedger:{},heller:{},holder:{},honker:{},hooker:{},hotdog:{},inmate:{},intern:{},jungle:{},knight:{},kvetch:{},lineup:{},lovely:{},magpie:{},maiden:{},mailer:{},maniac:{},matron:{},miller:{},muller:{},nation:{},opener:{},ouster:{},packer:{},parrot:{},patron:{},peeler:{},peeper:{},polity:{},poster:{},powwow:{},punter:{},puppet:{},purdah:{},racist:{},rafter:{},ramrod:{},redact:{},regent:{},rusher:{},sailor:{},scorer:{},seeder:{},shaver:{},slaver:{},slicer:{},smoker:{},snitch:{},syntax:{},tacker:{},tagger:{},tanker:{},tartar:{},teller:{},thrush:{},trigon:{},troika:{},truant:{},tucker:{},tyrant:{},umpire:{},undoer:{},vestal:{},virgin:{},votary:{},warren:{},washer:{},wetter:{},winder:{},winner:{},wizard:{},admirer:{},amnesic:{},analyst:{},anomaly:{},aphasic:{},armorer:{},arrival:{},ascetic:{},auditor:{},baggage:{},bastion:{},biology:{},boarder:{},brahman:{},brahmin:{},breaker:{},caravan:{},clapper:{},cluster:{},coaster:{},cobbler:{},college:{},convict:{},council:{},counsel:{},coxcomb:{},crawler:{},creeper:{},crewman:{},crimper:{},darling:{},destiny:{},dragoon:{},dreamer:{},duality:{},echelon:{},ejector:{},fiddler:{},fighter:{},flasher:{},forbear:{},harrier:{},holdout:{},hostess:{},incubus:{},ingenue:{},justice:{},kachina:{},kindred:{},kingpin:{},macumba:{},manikin:{},marcher:{},married:{},newborn:{},notable:{},nursing:{},outpost:{},parvenu:{},patient:{},payroll:{},peasant:{},phalanx:{},phantom:{},planter:{},platoon:{},plodder:{},poacher:{},printer:{},prodigy:{},puncher:{},realist:{},redhead:{},revival:{},runaway:{},scholar:{},sharpie:{},skidder:{},slicker:{},slogger:{},smasher:{},snorter:{},snuffer:{},spinner:{},splicer:{},stalker:{},stamper:{},standby:{},stepper:{},striper:{},sweeper:{},thrower:{},triplet:{},utopian:{},utterer:{},voucher:{},washout:{},watcher:{},wiggler:{},wrecker:{},affluent:{},armourer:{},attender:{},bacchant:{},bachelor:{},bankrupt:{},bisexual:{},bondsman:{},cautious:{},congress:{},corporal:{},creature:{},decadent:{},defeated:{},delegate:{},diabetic:{},dictator:{},dyslexic:{},effector:{},exponent:{},flagging:{},freshman:{},fugitive:{},futurist:{},garrison:{},greyback:{},hangover:{},humanism:{},immortal:{},juvenile:{},lapidary:{},mainstay:{},mannikin:{},maverick:{},mechanic:{},minority:{},minstrel:{},mistress:{},monotype:{},mutation:{},nativist:{},neophyte:{},neurotic:{},newsroom:{},nobility:{},opponent:{},pacifier:{},pantheon:{},planting:{},probable:{},producer:{},recusant:{},referral:{},reminder:{},retainer:{},ruralism:{},scalawag:{},scrubber:{},searcher:{},sergeant:{},sociable:{},songster:{},splitter:{},squadron:{},straggle:{},strawman:{},survivor:{},taxonomy:{},treasury:{},vanguard:{},virtuoso:{},walloper:{},warhorse:{},yearling:{},alcoholic:{},anorectic:{},artificer:{},artillery:{},attracter:{},attractor:{},automaton:{},auxiliary:{},barbarian:{},bombshell:{},brokerage:{},coalition:{},concourse:{},contralto:{},counselor:{},crewwoman:{},cyberpunk:{},defaulter:{},deliverer:{},democracy:{},dependant:{},descender:{},dissident:{},dyspeptic:{},feudatory:{},firewoman:{},flyweight:{},incurable:{},institute:{},insurgent:{},intellect:{},introvert:{},mandatory:{},mendicant:{},middleman:{},navigator:{},organiser:{},organizer:{},pluralism:{},pluralist:{},pothunter:{},precursor:{},predictor:{},presenter:{},pretender:{},processor:{},proconsul:{},publisher:{},quintuple:{},registrar:{},regulator:{},scallywag:{},scavenger:{},scrambler:{},scratcher:{},serration:{},singleton:{},stargazer:{},stockpile:{},successor:{},surrogate:{},symbolism:{},temporary:{},throwback:{},trickster:{},warrantee:{},womanhood:{},antagonist:{},attendance:{},blackguard:{},bondswoman:{},chancellor:{},classifier:{},conference:{},conformist:{},counsellor:{},crossroads:{},descendant:{},descendent:{},doorkeeper:{},embodiment:{},expatriate:{},federation:{},fellowship:{},filibuster:{},forerunner:{},fratricide:{},grandstand:{},mastermind:{},minstrelsy:{},missionary:{},ordination:{},plantation:{},powerhouse:{},quadruplet:{},quintuplet:{},repatriate:{},republican:{},respondent:{},rubberneck:{},salamander:{},scholastic:{},separatism:{},sisterhood:{},subscriber:{},subsidiary:{},supplicant:{},suppresser:{},suppressor:{},timekeeper:{},translator:{},university:{},wallflower:{},abomination:{},academician:{},agriculture:{},anachronism:{},antiquarian:{},beneficiary:{},bureaucracy:{},clairvoyant:{},conditioner:{},confederacy:{},consumptive:{},deification:{},enlightened:{},incarnation:{},lilliputian:{},middlewoman:{},narcoleptic:{},nationalist:{},partnership:{},peacekeeper:{},peripatetic:{},pontificate:{},progression:{},prosecution:{},quarterback:{},recessional:{},romanticist:{},shipbuilder:{},transmitter:{},transsexual:{},underwriter:{},undesirable:{},utilitarian:{},acquaintance:{},bantamweight:{},collaborator:{},congregation:{},conservatory:{},countertenor:{},demonstrator:{},denomination:{},headquarters:{},illegitimate:{},investigator:{},metropolitan:{},middleweight:{},noncombatant:{},philharmonic:{},schoolmaster:{},sharpshooter:{},totalitarian:{},authoritarian:{},confederation:{},correspondent:{},reincarnation:{},schizophrenic:{},supernumerary:{},categorization:{},tatterdemalion:{},instrumentality:{},internationalist:{},bey:{},cox:{},cur:{},few:{},foe:{},hag:{},lad:{},mod:{},obi:{},sib:{},aide:{},amah:{},anti:{},army:{},beau:{},bevy:{},bogy:{},chit:{},clod:{},coon:{},czar:{},dada:{},dame:{},derp:{},dodo:{},dude:{},duke:{},dupe:{},gild:{},giro:{},goat:{},goon:{},grad:{},guru:{},heir:{},hobo:{},hunk:{},jilt:{},jock:{},jury:{},khan:{},maid:{},naif:{},navy:{},nerd:{},peri:{},pimp:{},putz:{},sect:{},suer:{},swot:{},tuft:{},adept:{},baker:{},basso:{},beast:{},bride:{},bunny:{},cadre:{},comer:{},cooky:{},corps:{},covey:{},deist:{},edger:{},elite:{},emcee:{},enate:{},faery:{},fatty:{},fauna:{},felon:{},filer:{},flora:{},folks:{},forum:{},genus:{plural:"genera"},ghoul:{},gipsy:{},giver:{},gnome:{},grove:{},gypsy:{},hajji:{},hakim:{},junky:{},knave:{},lefty:{},leper:{},loony:{},macho:{},madam:{},magus:{},medic:{},mezzo:{},miler:{},mooch:{},mufti:{},nabob:{},nexus:{},ninja:{},obeah:{},parer:{},pigmy:{},poilu:{},ponce:{},prior:{},proxy:{},puppy:{},pygmy:{},quint:{},raver:{},rover:{},satyr:{},scamp:{},sheik:{},shill:{},shrew:{},sibyl:{},sissy:{},slain:{},smith:{},snoop:{},sprog:{},stoic:{},sylph:{},taker:{},thane:{},toady:{},totem:{},trier:{},tryst:{},tuner:{},twirp:{},uncle:{},valet:{},vegan:{},vixen:{},waker:{},widow:{},wight:{},wirer:{},yenta:{},agnate:{},alexic:{},amazon:{},audile:{},avatar:{},avower:{},bagger:{},bagman:{},banker:{},barber:{},barker:{},bather:{},bawler:{},beater:{},beldam:{},bidder:{},boater:{},brewer:{},broker:{},brunet:{},bureau:{},caddie:{},camper:{},cantor:{},caucus:{},chaser:{},cherub:{},chosen:{},coeval:{},cooper:{},coquet:{},cottar:{},craven:{},cubist:{},daemon:{},deacon:{},digger:{},dodger:{},dowser:{},duette:{},dunker:{},egoist:{},eldest:{},eparch:{},erotic:{},eyeful:{},faller:{},fitter:{},flunky:{},forger:{},framer:{},gaggle:{},gagman:{},gamine:{},gasbag:{},gillie:{},goalie:{},gouger:{},grouch:{},gunman:{},gunner:{},hamlet:{},hanger:{},hawker:{},heaver:{},hermit:{},hitter:{},hummer:{},iceman:{},joiner:{},junkie:{},jurist:{},keeper:{},kelpie:{},kisser:{},lackey:{},lector:{},lifter:{},lister:{},lizard:{},loader:{},loaner:{},logjam:{},longer:{},lubber:{},lumper:{},lyceum:{},madcap:{},maenad:{},maimed:{},masher:{},medico:{},menial:{},midden:{},midget:{},minder:{},moiety:{},motile:{},nester:{},oblate:{},oilman:{},parish:{},paster:{},pelter:{},phylum:{},picker:{},plenum:{},police:{},pruner:{},psyche:{},puller:{},python:{},rabble:{},raider:{},raiser:{},ranger:{},ranker:{},rapper:{},reaper:{},redcap:{},reeler:{},regime:{},renter:{},rifler:{},romper:{},sachem:{},salter:{},sawyer:{},sealer:{},seeker:{},sender:{},sexist:{},shaker:{},shaper:{},sharpy:{},signer:{},silvan:{},sleuth:{},smiler:{},sorter:{},sphinx:{},stager:{},stater:{},supper:{},sylvan:{},talent:{},tanner:{},tester:{},theist:{},throng:{},tilter:{},tipper:{},toller:{},tosser:{},tourer:{},townie:{},trusty:{},varlet:{},vermin:{},vestry:{},victor:{},virago:{},voicer:{},waster:{},weasel:{},weaver:{},weeder:{},weeper:{},weirdo:{},whaler:{},winker:{},wraith:{},wretch:{},yakuza:{},yeoman:{},adapter:{},admiral:{},airhead:{},amalgam:{},animist:{},aphakic:{},applier:{},arbiter:{},armiger:{},atheist:{},attache:{},babbler:{},baffled:{},beldame:{},beloved:{},berserk:{},bondman:{},bounder:{},brigade:{},browser:{},buffoon:{},bulimic:{},burgher:{},caitiff:{},carload:{},catcher:{},cavalry:{},chachka:{},changer:{},charmer:{},chemist:{},cocotte:{},collage:{},compere:{},shadow:{},layer:{},north:{},orbit:{},trend:{},truss:{},vault:{},bunker:{},harbor:{},orient:{},origin:{},resort:{},safety:{},target:{},chamber:{},extreme:{},harbour:{},kingdom:{},mandate:{},outline:{},station:{},blockade:{},darkness:{},overlook:{},landscape:{},northeast:{},northwest:{},partition:{},southeast:{},southwest:{},structure:{},atmosphere:{},lug:{},tee:{},balk:{},burr:{},cage:{},drip:{},east:{},fort:{},hoop:{},west:{},cleat:{},fluke:{},scour:{},south:{},beacon:{},closet:{},duplex:{},radius:{plural:"radii"},vacuum:{},wattle:{},canteen:{},grounds:{},cloister:{},pinnacle:{},property:{},surround:{},terminus:{},anchorage:{},barricade:{},honeycomb:{},turnaround:{},institution:{},termination:{},cab:{},dam:{},brim:{},calk:{},dome:{},goal:{},hill:{},hull:{},knob:{},prop:{},seam:{},site:{},turf:{},apron:{},arena:{},baulk:{},cabin:{},grill:{},groin:{},haunt:{},lever:{},niche:{},privy:{},works:{},airway:{},barren:{},corral:{},dugout:{},fender:{},galley:{},hurdle:{},lounge:{},outlet:{},refuge:{},sconce:{},sprawl:{},temple:{},toilet:{},wicket:{},barrack:{},bulwark:{},buttery:{},cornice:{},grating:{},landing:{},leeward:{},maximum:{},pasture:{},salient:{},shingle:{},squinch:{},surgery:{},building:{},cylinder:{},downtown:{},fountain:{},landmark:{},munition:{},quadrant:{},rearward:{},sideline:{},windward:{},homestead:{},multiplex:{},perfumery:{},residence:{},stretcher:{},substrate:{},excavation:{},silhouette:{},convenience:{},culmination:{},declination:{},architecture:{},spa:{},aery:{},brow:{},bung:{},dike:{},flue:{},hell:{},tent:{},abbey:{},aisle:{},arbor:{},attic:{},booth:{},brink:{},disco:{},oxbow:{},oxeye:{},quoin:{},realm:{},salon:{},villa:{},whorl:{},barony:{},barrow:{},bazaar:{},billet:{},bustle:{},canton:{},casing:{},cellar:{},cooler:{},garage:{},ghetto:{},grille:{},hearth:{},locker:{},midway:{},muffle:{},oracle:{},remise:{},saloon:{},stocks:{},studio:{},tiptop:{},uptown:{},volute:{},arsenal:{},chassis:{},cockpit:{},commons:{},cubicle:{},dockage:{},fairway:{},fencing:{},gondola:{},heading:{},hotspot:{},lattice:{},lodging:{},minimum:{},moorage:{},pannier:{},rattrap:{},rootage:{},stowage:{},theater:{},theatre:{},vacuity:{},baseline:{},butchery:{},buttress:{},clearing:{},crosscut:{},domicile:{},erection:{},exterior:{},fanlight:{},fastness:{},firewall:{},foothold:{},frontier:{},lavatory:{},memorial:{},monument:{},mortuary:{},overhang:{},pedestal:{},scenario:{},solitude:{},sprocket:{},stockade:{},stoppage:{},vaulting:{},bombproof:{},cathedral:{},fundament:{},hindrance:{},panhandle:{},proximity:{},resonator:{},sanctuary:{},territory:{},watershed:{},confluence:{},department:{},encampment:{},flashpoint:{},groundwork:{},hinderance:{},quartering:{},substratum:{},underbelly:{},breadbasket:{},columbarium:{},destination:{},engineering:{},equinoctial:{},planetarium:{},penitentiary:{},circumference:{},confectionery:{},fortification:{},hub:{},hut:{},lee:{},sty:{},acme:{},apex:{},barn:{},brig:{},coop:{},digs:{},holy:{},jail:{},jook:{},juke:{},loge:{},mall:{},nook:{},pave:{},sash:{},silo:{},slum:{},tope:{},weir:{},abode:{},aerie:{},altar:{},bazar:{},detox:{},haven:{},heath:{},hutch:{},kraal:{},lager:{},manor:{},manse:{},navel:{},oasis:{plural:"oases"},opera:{},paddy:{},plaza:{},pylon:{},rodeo:{},shire:{},spile:{},sprag:{},venue:{},visor:{},apogee:{},arcade:{},ashram:{},asylum:{},atrium:{},bagnio:{},bailey:{},barrio:{},belfry:{},boards:{},casino:{},chapel:{},county:{},creche:{},cupola:{},deckle:{},fraise:{},haymow:{},hostel:{},kennel:{},lancet:{},larder:{},lockup:{},mihrab:{},parlor:{},plaque:{},prefab:{},prison:{},spigot:{},stacks:{},tampon:{},turret:{},vertex:{},zodiac:{},automat:{},balcony:{},batwing:{},benthos:{},borough:{},bubbler:{},bullpen:{},cabaret:{},caboose:{},chantry:{},convent:{},deanery:{},demesne:{},derrick:{},desktop:{},drydock:{},dukedom:{},dungeon:{},earldom:{},earplug:{},embassy:{},emirate:{},eparchy:{},equinox:{},fiefdom:{},florist:{},flyover:{},framing:{},funfair:{},grocery:{},hayrack:{},hospice:{},khanate:{},lunette:{},mansion:{},marquee:{},masonry:{},matting:{},midland:{},mooring:{},narthex:{},nirvana:{},obelisk:{},outback:{},parapet:{},parlour:{},pinhead:{},railing:{},rathole:{},redoubt:{},ribbing:{},rotunda:{},sanctum:{},sawmill:{},shipway:{},shoebox:{},stopple:{},tambour:{},transom:{},trellis:{},trestle:{},tribune:{},vantage:{},abutment:{},airspace:{},ambiance:{},ambience:{},backside:{},ballpark:{},basement:{},basilica:{},bioscope:{},bodywork:{},brattice:{},diggings:{},doghouse:{},dominion:{},entrepot:{},environs:{},extremum:{},farmland:{},fireside:{},hacienda:{},hideaway:{},imperium:{},jalousie:{},littoral:{},mantelet:{},mounting:{},nailhead:{},outdoors:{},palisade:{},pharmacy:{},porthole:{},province:{},revolver:{},seascape:{},sidewall:{},steerage:{},stopover:{},suburbia:{},sudatory:{},sweatbox:{},tailgate:{},turnpike:{},wellhead:{},backwater:{},bailiwick:{},beachhead:{},belvedere:{},caliphate:{},caparison:{},cellarage:{},chandlery:{},cloakroom:{},colonnade:{},cookhouse:{},couchette:{},crematory:{},crownwork:{},cubbyhole:{},dollhouse:{},dormitory:{},dripstone:{},fieldwork:{},fireguard:{},forefront:{},guardroom:{},hatchback:{},isoclinal:{},lazaretto:{},lineation:{},mezzanine:{},millinery:{},orphanage:{},outfitter:{},pleasance:{},princedom:{},revetment:{},roadblock:{},scrapheap:{},shrubbery:{},viewpoint:{},viscounty:{},workhouse:{},architrave:{},birthplace:{},borderline:{},bridgehead:{},brownstone:{},chokepoint:{},commissary:{},courthouse:{},escarpment:{},greenhouse:{},ironmonger:{},justiciary:{},laboratory:{},lamination:{},maisonette:{},metropolis:{},obstructor:{},panopticon:{},playground:{},prefecture:{},proscenium:{},quadrangle:{},rotisserie:{},sanatorium:{},suzerainty:{},tenderloin:{},triclinium:{},wellspring:{},wheelhouse:{},condominium:{},conventicle:{},crematorium:{},crenelation:{},demarcation:{},maisonnette:{},observatory:{},reformatory:{},superstrate:{},tobacconist:{},trusteeship:{},wainscoting:{},amphitheater:{},amphitheatre:{},chapterhouse:{},clotheshorse:{},delicatessen:{},fountainhead:{},haberdashery:{},municipality:{},packinghouse:{},patriarchate:{},retrenchment:{},substructure:{},superstratum:{},surroundings:{},wainscotting:{},juxtaposition:{},infrastructure:{},dec:{},inn:{},loo:{},pub:{},burg:{},cafe:{},deli:{},dorm:{},hank:{},iglu:{},kirk:{},lair:{},lawn:{},mart:{},nave:{},oast:{},rink:{},souk:{},tine:{},tipi:{},veld:{},ways:{},wold:{},yurt:{},apsis:{},burgh:{},condo:{},cubby:{},cuddy:{},dacha:{},duchy:{},duomo:{},eaves:{},flies:{},gable:{},glade:{},gulag:{},harem:{},hogan:{},igloo:{},lanai:{},layby:{},mecca:{},midst:{},motel:{},oriel:{},parts:{},patio:{},polls:{},qibla:{},roads:{},rooms:{},sauna:{},skein:{},socle:{},soddy:{},sodom:{},spire:{},stoep:{},stupa:{},tenon:{},tepee:{},tupek:{},tupik:{},veldt:{},weald:{},abatis:{},abbacy:{},alcove:{},apiary:{},arbour:{},aviary:{},bedsit:{},bethel:{},bodega:{},bounds:{},bowels:{},cabana:{},calkin:{},campus:{},carrel:{},casbah:{},casern:{},chalet:{},depths:{},dolmen:{},donjon:{},dormer:{},durbar:{},eatery:{},escarp:{},fipple:{},flange:{},flyway:{},friary:{},furket:{},gantry:{},garret:{},hangar:{},hareem:{},hayrig:{},imaret:{},isobar:{},isohel:{},isolex:{},kasbah:{},laager:{},locale:{},loggia:{},marina:{},masjid:{},meadow:{},medina:{},menhir:{},merlon:{},midair:{},morgue:{},mosque:{},mudhif:{},musjid:{},pagoda:{},paling:{},pantry:{},parvis:{},pelmet:{},piazza:{},pigsty:{},plinth:{},priory:{},pueblo:{},radome:{},setoff:{},skybox:{},skyway:{},stalls:{},storey:{},suburb:{},tenter:{},upside:{},volary:{},wigwam:{},wikiup:{},winery:{},abattis:{},airdock:{},airlock:{},alcazar:{},antapex:{},apadana:{},apojove:{},apolune:{},athanor:{},barroom:{},bascule:{},bedside:{},beeline:{},borstal:{},boudoir:{},brewery:{},brewpub:{},brothel:{},campong:{},cannery:{},capitol:{},carport:{},carrell:{},chancel:{},chateau:{},citadel:{},coaming:{},corncob:{},cottage:{},cowbarn:{},cowshed:{},cowtown:{},crinion:{},dinette:{},diocese:{},earshot:{},edifice:{},enclave:{},exurbia:{},eyeshot:{},fantail:{},feedlot:{},firebox:{},screw:{},share:{},sheet:{},slice:{},slide:{},spill:{},stage:{},stake:{},tread:{},paddle:{},weight:{},canvass:{},compact:{},undercut:{},representation:{},fin:{},gag:{},jet:{},tug:{},bark:{},bunk:{},drum:{},mask:{},pipe:{},reel:{},scan:{},blank:{},drill:{},plumb:{},plume:{},shank:{},sling:{},spray:{},pickup:{},saddle:{},trench:{},capsule:{},security:{},sacrifice:{},technical:{},can:{},jar:{},map:{},ply:{},rib:{},rim:{},web:{},bell:{},buck:{},claw:{},comb:{},copy:{},crib:{},dish:{},fake:{},foil:{},grab:{},kite:{},ramp:{},rent:{},slot:{},spit:{},tank:{},bosom:{},cable:{},charm:{},drain:{},grave:{},price:{},skirt:{},stool:{},strap:{},stump:{},trail:{},access:{},cannon:{},fiddle:{},formal:{},insert:{},launch:{},purple:{},reward:{},strand:{},tackle:{},display:{},floater:{},incline:{},limited:{},portion:{},torpedo:{},overcast:{},puncture:{},broadside:{},duplicate:{},submarine:{},surcharge:{},production:{},interchange:{},bus:{},due:{},gap:{},jaw:{},lag:{},nut:{},tin:{},win:{},arch:{},bail:{},cell:{},dope:{},fell:{},film:{},lace:{},lash:{},mail:{},pale:{},purl:{},rate:{},skid:{},sole:{},spar:{},tuck:{},vamp:{},vent:{},vest:{},brake:{},brass:{},chuck:{},cramp:{},crest:{},drape:{},elbow:{},habit:{},lease:{},lower:{},prize:{},roach:{},royal:{},scrap:{},slate:{},snare:{},snuff:{},total:{},trump:{},beaver:{},canvas:{},future:{},handle:{},header:{},jacket:{},motley:{},muzzle:{},quiver:{},rocket:{},roller:{},staple:{},wrench:{},compass:{},element:{},exhaust:{},frontal:{},thunder:{},transit:{},upstage:{},traverse:{},accession:{},allowance:{},guarantee:{},promenade:{},shipwreck:{},attachment:{},protection:{},perpendicular:{},aid:{},gig:{},gin:{},nap:{},oil:{},ram:{},bead:{},bulb:{},curb:{},dart:{},daub:{},dial:{},dose:{},exit:{},fuse:{},goad:{},item:{},knit:{},plan:{},rein:{},swag:{},veil:{},alarm:{},chart:{},cinch:{},clasp:{},eagle:{},entry:{},fluff:{},gouge:{},lance:{},meter:{},miter:{},pouch:{},probe:{},punch:{},purse:{},sable:{},scuff:{},shear:{},stern:{},taper:{},thumb:{},wharf:{},whisk:{},barrel:{},beetle:{},bronze:{},burden:{},congee:{},fleece:{},glossy:{},halter:{},limber:{},margin:{},mobile:{},needle:{},remote:{},shroud:{},sketch:{},splice:{},stripe:{},toggle:{},trough:{},volume:{},ballast:{},binding:{},blanket:{},costume:{},crackle:{},crystal:{},diamond:{},fitting:{},graphic:{},harness:{},premium:{},product:{},pyramid:{},sandbag:{},squelch:{},trammel:{},uniform:{},venture:{},warrant:{},wildcat:{},working:{},assembly:{},charcoal:{},discount:{},envelope:{},imperial:{},ligature:{},original:{},specific:{},treasure:{},vertical:{},deduction:{},distemper:{},inventory:{},objective:{},reversion:{},whitewash:{},supplement:{},contrivance:{},convertible:{},inspiration:{},intersection:{},counterbalance:{},bet:{},gel:{},gut:{},jag:{},jig:{},pan:{},pry:{},tab:{},tax:{},zip:{},bait:{},barb:{},bomb:{},cone:{},cuff:{},dado:{},disk:{},gear:{},gore:{},grid:{},harp:{},loom:{},main:{},pant:{},pike:{},prod:{},reef:{},ruff:{},sham:{},tare:{},tidy:{},tire:{},toll:{},award:{},basic:{},basin:{},baton:{},birch:{},braid:{},broom:{},clack:{},cloak:{},clout:{},crock:{},fagot:{},ferry:{},filet:{},forte:{},found:{},frail:{},jolly:{},motor:{},pedal:{},potty:{},radio:{},rivet:{},scarf:{},shore:{},shunt:{},sieve:{},splat:{},splay:{},stave:{},steal:{},steel:{},thong:{},tithe:{},torch:{},trunk:{},twine:{},upper:{},valve:{},weave:{},bridle:{},buckle:{},buffet:{},carpet:{},cotton:{},custom:{},devise:{},enamel:{},entail:{},furrow:{},girdle:{},hobble:{},mangle:{},mosaic:{},motive:{},pallet:{},pencil:{},pinion:{},powder:{},radial:{},rattle:{},rebate:{},rumble:{},shield:{},shimmy:{},shovel:{},sledge:{},sluice:{},tablet:{},throne:{},timber:{},tinsel:{},uplift:{},benefit:{},bombard:{},bootleg:{},console:{},default:{},forfeit:{},freight:{},gantlet:{},generic:{},grapple:{},journal:{},loading:{},molding:{},overlap:{},pigment:{},plastic:{},salvage:{},scooter:{},scuffle:{},spindle:{},steamer:{},stopper:{},upright:{},carriage:{},catapult:{},facility:{},laminate:{},medicine:{},offstage:{},overload:{},plastron:{},railroad:{},retrofit:{},strickle:{},throttle:{},whipping:{},wireless:{},automatic:{},blackjack:{},blackwash:{},foliation:{},interlock:{},roughcast:{},threshold:{},antiseptic:{},camouflage:{},incidental:{},intangible:{},preventive:{},reversible:{},watercolor:{},maintenance:{},watercolour:{},differential:{},prescription:{},preventative:{},prophylactic:{},reproduction:{},transcription:{},transportation:{},fob:{},guy:{},hem:{},jug:{},kit:{},saw:{},cane:{},cart:{},clam:{},coif:{},cosy:{},cozy:{},disc:{},felt:{},gash:{},hone:{},hose:{},keel:{},loot:{},luff:{},lure:{},mast:{},mend:{},mine:{},muff:{},nuke:{},plow:{},robe:{},ruby:{},snip:{},soap:{},spud:{},swab:{},tile:{},till:{},tram:{},vane:{},wand:{},weed:{},weld:{},welt:{},audio:{},audit:{},baste:{},bilge:{},brail:{},bugle:{},canal:{},chest:{},chock:{},conge:{},couch:{},crape:{},crepe:{},crook:{},flute:{},frill:{},frock:{},fusee:{},hoist:{},inset:{},kitty:{},leash:{},liner:{},mixer:{},noose:{},novel:{},pearl:{},piano:{},plait:{},quill:{},reset:{},roost:{},saber:{},sabre:{},scull:{},spear:{},squab:{},stilt:{},sulky:{},video:{},vomit:{},wagon:{},aerial:{},armory:{},baffle:{},banner:{},batten:{},binder:{},bodkin:{},bypass:{},canopy:{},chisel:{},clench:{},dollar:{},dredge:{},drogue:{},duster:{},engine:{},excise:{},facing:{},funnel:{},garner:{},hamper:{},joggle:{},kettle:{},lining:{},livery:{},lumber:{},marble:{},mortar:{},mousse:{},nickel:{},ocular:{},payoff:{},pestle:{},piping:{},pommel:{},profit:{},puzzle:{},ransom:{},ration:{},rental:{},ribbon:{},rotary:{},runway:{},saucer:{},seesaw:{},siphon:{},suture:{},tattoo:{},thatch:{},throat:{},tunnel:{},turtle:{},wealth:{},acrylic:{},armoury:{},balloon:{},bargain:{},beehive:{},blinker:{},bolster:{},caisson:{},casting:{},ceiling:{},chariot:{},chopper:{},clarion:{},clinker:{},clipper:{},cowhide:{},earnest:{},elastic:{},expense:{},festoon:{},fortune:{},garnish:{},gravure:{},grinder:{},killing:{},linkage:{},novelty:{},overall:{},overlay:{},pallium:{},perfume:{},pillory:{},pointer:{},ringlet:{},rosette:{},segment:{},shuttle:{},staging:{},trailer:{},trumpet:{},unction:{},barbecue:{},barbeque:{},disguise:{},electric:{},elevated:{},fraction:{},gauntlet:{},gossamer:{},heritage:{},homespun:{},ironclad:{},lifeline:{},lighting:{},mackinaw:{},moulding:{},pinpoint:{},pinwheel:{},poundage:{},sanguine:{},sapphire:{},scribble:{},triangle:{},underlay:{},upstairs:{},virginal:{},admission:{},amphibian:{},backstage:{},capillary:{},cartridge:{},cartwheel:{},cathartic:{},condenser:{},damascene:{},depiction:{},diaphragm:{},medallion:{},overdrive:{},pacemaker:{},reservoir:{},screening:{},sectional:{},solitaire:{},spotlight:{},undercoat:{},assessment:{},bottleneck:{},equatorial:{},overburden:{},pigeonhole:{},pocketbook:{},pontifical:{},refractory:{},reparation:{},roundabout:{},simulation:{},waterproof:{},accelerator:{},certificate:{},inheritance:{},installment:{},restorative:{},ventilation:{},modification:{},subscription:{},hospitalization:{},instrumentation:{},ax:{},axe:{},bib:{},bin:{},bur:{},cot:{},fee:{},fur:{},jib:{},lid:{},six:{},ten:{},tub:{},two:{},bath:{},bike:{},cash:{},coke:{},cope:{},cowl:{},cusp:{},darn:{},debt:{},dice:{},dory:{},duct:{},fore:{},four:{},gaff:{},gage:{},gong:{},helm:{},hemp:{},icon:{},iris:{},junk:{},kern:{},loan:{},maul:{},mink:{},pane:{},pier:{},quid:{},reed:{},rook:{},scum:{},semi:{},sump:{},swob:{},taxi:{},vice:{},ware:{},wool:{},yarn:{},yawl:{},annex:{},atlas:{},barge:{},bevel:{},chaff:{},chute:{},clamp:{},crane:{},crate:{},cubeb:{},dandy:{},dicky:{},dinky:{},dolly:{},dower:{},eight:{},fifty:{},flail:{},floss:{},folio:{},fuzee:{},genre:{},girth:{},gourd:{},grape:{},hinge:{},hobby:{},inlay:{},japan:{},ladle:{},latch:{},linen:{},means:{},mitre:{},motif:{},mulct:{},pique:{},quilt:{},quirk:{},quota:{},rifle:{},rotor:{},setup:{},seven:{},shred:{},skate:{},spade:{},spool:{},spout:{},strut:{},three:{},toner:{},trawl:{},truck:{},twill:{},virtu:{},alpaca:{},anklet:{},argyle:{},argyll:{},arnica:{},balsam:{},bender:{},birdie:{},bishop:{},blower:{},blowup:{},bolero:{},bonnet:{},bounty:{},budget:{},bullet:{},cachet:{},carbon:{},casket:{},castor:{},claxon:{},cobble:{},cobweb:{},collet:{},crenel:{},cutoff:{},cutout:{},damask:{},damper:{},dibble:{},dickey:{},dipper:{},domino:{},douche:{},dragee:{},equity:{},eyelet:{},fetish:{},foible:{},fresco:{},gaiter:{},gibbet:{},gusset:{},heckle:{},hooter:{},horror:{},hunter:{},intake:{},jigger:{},lacing:{},lappet:{},makeup:{},making:{},mallet:{},marker:{},patina:{},paving:{},platen:{},plough:{},poleax:{},portal:{},primer:{},rabbet:{},rattan:{},refill:{},retort:{},revere:{},screed:{},sheath:{},sinker:{},socket:{},splint:{},stereo:{},syphon:{},tamper:{},tandem:{},tarmac:{},tenure:{},ticker:{},trepan:{},twenty:{},velvet:{},veneer:{},vessel:{},vicuna:{},backing:{},bandage:{},bobsled:{},carving:{},central:{},chamfer:{},chequer:{},cistern:{},cleaner:{},cleanup:{},coinage:{},crochet:{},cruiser:{},curtain:{},dilator:{},distaff:{},emerald:{},etching:{},flannel:{},flounce:{},footing:{},gangway:{},garbage:{},garland:{},gauffer:{},gelatin:{},grizzle:{},hanging:{},haywire:{},lamella:{},laniard:{},lanyard:{},lashing:{},lockage:{},lounger:{},manakin:{},masking:{},meshing:{},mileage:{},mintage:{},mortice:{},mortise:{},movable:{},muffler:{},palette:{},pendant:{},pendent:{},pennant:{},pillbox:{},poleaxe:{},portage:{},pottery:{},priming:{},quarrel:{},readout:{},retread:{},roundel:{},rubbing:{},scupper:{},scuttle:{},serpent:{},shampoo:{},shellac:{},shutter:{},snaffle:{},snorkel:{},spangle:{},spouter:{},stabile:{},stinker:{},tankage:{},toehold:{},tracing:{},treadle:{},trefoil:{},truckle:{},trundle:{},vesture:{},webbing:{},whipsaw:{},wrapper:{},additive:{},adjuvant:{},aperture:{},aquatint:{},backdoor:{},basilisk:{},blowback:{},bludgeon:{},breakage:{},causeway:{},checkout:{},clincher:{},compress:{},corduroy:{},coupling:{},crossbar:{},currency:{},detector:{},dividend:{},dogtooth:{},downcast:{},followup:{},frontage:{},giveaway:{},goodwill:{},hardware:{},headgear:{},headshot:{},hypnotic:{},ignition:{},inhalant:{},lipstick:{},masthead:{},meniscus:{},metallic:{},modeling:{},nautilus:{},neckband:{},nightcap:{},ornament:{},outboard:{},partizan:{},pavement:{},pectoral:{},planking:{},plumbing:{},portable:{},pressing:{},radiator:{},remittal:{},residual:{},resource:{},roulette:{},scaffold:{},scapular:{},scissors:{plural:"scissors"},scrabble:{},springer:{},sunburst:{},tapestry:{},taxation:{},thrasher:{},tomahawk:{},totality:{},tympanum:{},valuable:{},vignette:{},wardrobe:{},widening:{},admixture:{},antiquity:{},aquaplane:{},bagatelle:{},bastinado:{},blindfold:{},blueprint:{},boomerang:{},carpetbag:{},crinoline:{},depressor:{},detergent:{},doodlebug:{},downstage:{},emergency:{},endowment:{},equalizer:{},exemption:{},extortion:{},extractor:{},facsimile:{},freewheel:{},gabardine:{},grotesque:{},hemstitch:{},horseshoe:{},invention:{},jackknife:{},microwave:{},millstone:{},miniature:{},modernism:{},nosepiece:{},ownership:{},packaging:{},pargeting:{},patchwork:{},pinstripe:{},polyester:{},potpourri:{},recording:{},refresher:{},semaphore:{},semblance:{},shielding:{},sideboard:{},skyrocket:{},slapstick:{},soporific:{},spectacle:{},starboard:{},telephone:{},telescope:{},treadmill:{},turntable:{},verdigris:{},videotape:{},whirligig:{},allocation:{},ambulatory:{},anesthetic:{},assistance:{},astringent:{},automation:{},cantilever:{},chinchilla:{},concertina:{},constraint:{},deductible:{},depilatory:{},disposable:{},elongation:{},escutcheon:{},featherbed:{},foreground:{},forfeiture:{},guillotine:{},hammerhead:{},hydroplane:{},innovation:{},intoxicant:{},knockabout:{},lithograph:{},monochrome:{},nonpayment:{},nutcracker:{},pargetting:{},peripheral:{},polychrome:{},redemption:{},stabilizer:{},stenograph:{},subvention:{},sustenance:{},technology:{},television:{},waterspout:{},anaesthetic:{},anamorphism:{},concealment:{},containment:{},copperplate:{},cornerstone:{},counterfeit:{},countersink:{},cryptograph:{},delineation:{},delinquency:{},encumbrance:{},fingerboard:{},fluorescent:{},incumbrance:{},perforation:{},pyrotechnic:{},retribution:{},subsistence:{},tensiometer:{},transporter:{},undercharge:{},withholding:{},dispensation:{},electrolytic:{},encrustation:{},inclinometer:{},incrustation:{},installation:{},intermixture:{},photogravure:{},straightaway:{},transparency:{},appropriation:{},embellishment:{},improvisation:{},merchandising:{},mystification:{},quadruplicate:{},semiautomatic:{},pharmaceutical:{},superannuation:{},aba:{},boa:{},dag:{},fax:{},gad:{},keg:{},nib:{},nog:{},pix:{},pyx:{},rep:{},ski:{},taw:{},urn:{},ante:{},arms:{},bale:{},berm:{},bier:{},bitt:{},bola:{},bolo:{},brad:{},cape:{},cask:{},cent:{},coax:{},coca:{},cosh:{},dime:{},dole:{},doll:{},garb:{},gilt:{},gyro:{},hasp:{},hypo:{},ikon:{},juju:{},lane:{},lint:{},luge:{},lute:{},maxi:{},maze:{},mini:{},mitt:{},mule:{},pail:{},perk:{},plat:{},pork:{},pouf:{},rung:{},scow:{},silk:{},sill:{},skep:{},sled:{},tamp:{},tapa:{},topi:{},trey:{},vape:{},wale:{},wick:{},adobe:{},aegis:{},aglet:{},album:{},alley:{},anode:{},anvil:{},arrow:{},auger:{},batik:{},bogie:{},bolus:{},bongo:{},borer:{},bribe:{},bulla:{},caddy:{},canoe:{},chime:{},coign:{},debit:{},denim:{},depot:{},diary:{},diode:{},drier:{},flask:{},flume:{},fount:{},frier:{},fryer:{},gauze:{},globe:{},golem:{},hijab:{},inlet:{},jimmy:{},jorum:{},kayak:{},khaki:{},lasso:{},latex:{},lisle:{},lorry:{},lucre:{},manta:{},mimeo:{},mizen:{},moire:{},mulch:{},newel:{},nylon:{},penny:{},piste:{},plush:{},poker:{},prism:{},pyxis:{},ranch:{},razor:{},relic:{},rouge:{},ruler:{},sabot:{},scape:{},sedan:{},seine:{},servo:{},shelf:{plural:"shelves"},slops:{},spoke:{},sprig:{},stele:{},steps:{},stoup:{},stove:{},strop:{},suede:{},swage:{},tammy:{},tanka:{},tappa:{},teddy:{},terms:{},toque:{},torus:{},towel:{},tunic:{},tweed:{},usury:{},verso:{},vizor:{},waist:{},winch:{},withe:{},xerox:{},yacht:{},abacus:{},afghan:{},aiglet:{},alidad:{},amends:{},arctic:{},artery:{},avenue:{},banger:{},bangle:{},banian:{},banyan:{},bauble:{},beaker:{},bicorn:{},blazon:{},boiler:{},bracer:{},broach:{},bumper:{},burner:{},buzzer:{},caftan:{},calash:{},camera:{},camion:{},camlet:{},capote:{},carton:{},casein:{},catgut:{},chaise:{},cheque:{},chiton:{},chukka:{},cither:{},cloaca:{},cloche:{},coffer:{},coffin:{},coigne:{},colors:{},corbel:{},corker:{},corset:{},crayon:{},crutch:{},dagger:{},daybed:{},detour:{},diaper:{},dickie:{},dipole:{},dirndl:{},discus:{},dogleg:{},dolman:{},dosage:{},duffel:{},duffle:{},eyecup:{},fabric:{},facade:{},falsie:{},fanjet:{},fascia:{},fetter:{},firkin:{},fizgig:{},floppy:{},frieze:{},garter:{},gimlet:{},goblet:{},guimpe:{},guinea:{},gunnel:{},harrow:{},helmet:{},hookup:{},hotbed:{},impost:{},instep:{},iodine:{},island:{},jersey:{},jetsam:{},jigsaw:{},juicer:{},kaftan:{},kibble:{},kirtle:{},lateen:{},laurel:{},ledger:{},linage:{},lunula:{},magnet:{},markup:{},miotic:{},mizzen:{},myotic:{},nipple:{},nozzle:{},onager:{},pajama:{},pavage:{},pellet:{},pennon:{},peplum:{},peyote:{},pincer:{},pipage:{},pomade:{},pompon:{},popper:{},pyjama:{},ragbag:{},reamer:{},remake:{},reseau:{},rudder:{},russet:{},scythe:{},settee:{},shades:{},shorts:{},siding:{},sleeve:{},sleigh:{},spinet:{},spline:{},stoker:{},stylus:{},sublet:{},subway:{},surtax:{},swathe:{},swivel:{},syrinx:{},taenia:{},talcum:{},tariff:{},teacup:{},teeter:{},tenner:{},tether:{},thwart:{},tocsin:{},trophy:{},trowel:{},turban:{},viewer:{},waggon:{},wampum:{},wherry:{},wicker:{},willow:{},wiring:{},woolen:{},yarder:{},zipper:{},acetate:{},aerosol:{},airline:{},alidade:{},ampulla:{},android:{},aneroid:{},annulet:{},anodyne:{},apanage:{},apparel:{},archive:{},armband:{},armilla:{},arrears:{},banding:{},basting:{},batting:{},bayonet:{},beading:{},bedding:{},bladder:{},blocker:{},blusher:{},bollock:{},bouquet:{},bracing:{},brocade:{},broiler:{},bullion:{},bunting:{},burthen:{},bushing:{},caleche:{},caliper:{},cathode:{},catwalk:{},cautery:{},charger:{},charnel:{},chemise:{},chevron:{},chimney:{},chlamys:{},circlet:{},colours:{},commode:{},cooling:{},cordage:{},coronet:{},corsair:{},crampon:{},cutaway:{},daybook:{},deadeye:{},decoder:{},diagram:{},doeskin:{},dogsled:{},doormat:{},dragger:{},dragnet:{},drapery:{},drawers:{},dustpan:{},escheat:{},eyehole:{},fixings:{},flatbed:{},flattop:{},flipper:{},foghorn:{},foliage:{},footage:{},foretop:{},forgery:{},frigate:{},funding:{},furring:{},fustian:{},garment:{},garotte:{},garrote:{},gouache:{},grapnel:{},griddle:{},hackney:{},hammock:{},harpoon:{},hassock:{},hatchel:{},hatchet:{},heating:{},hedging:{},hibachi:{},hobnail:{},holding:{},holster:{},hydrant:{},iceboat:{},igniter:{},impasse:{},ironing:{},jackpot:{},javelin:{},joinery:{},fibre:{},hazel:{},lemon:{},peach:{},plank:{},raven:{},snipe:{},spine:{},steer:{},stint:{},stunt:{},bleach:{},breath:{},callus:{},cherry:{},dimple:{},entire:{},ferret:{},filler:{},hybrid:{},jackal:{},marrow:{},orange:{},radish:{},spruce:{},stifle:{},winkle:{},endemic:{},vanilla:{},beefwood:{},calabash:{},concrete:{},emission:{},kingfish:{},solution:{},volatile:{},partridge:{},repellant:{},derivative:{},thickening:{},ash:{},bud:{},cob:{},hen:{},mew:{},mud:{},mum:{},paw:{},roe:{},sow:{},soy:{},wax:{},yam:{},beef:{},burl:{},calf:{plural:"calves"},chat:{},fowl:{},fuzz:{},gill:{},grub:{},hock:{},hoof:{},lobe:{},rose:{},scup:{},soup:{},swan:{},tint:{},tuna:{},tusk:{},alloy:{},briar:{},clove:{},coney:{},ebony:{},ether:{},filth:{},flesh:{},gumbo:{},homer:{},jelly:{},matte:{},mocha:{},reeve:{},wrack:{},annual:{},canine:{},carrot:{},cereal:{},cockle:{},feeler:{},fennel:{},flimsy:{},gargle:{},gravel:{},grouse:{},indigo:{},mammee:{},medlar:{},monkey:{},nebula:{},oyster:{},salmon:{plural:"salmon"},shiner:{},shrimp:{},sprout:{},stigma:{},blossom:{},blubber:{},buffalo:{},cabbage:{},calamus:{},catfish:{},caudate:{},caustic:{},chelate:{},chicory:{},ciliate:{},essence:{},griffon:{},hemlock:{},hydrate:{},incense:{},lighter:{},remount:{},sardine:{},stinger:{},vitriol:{},ambrosia:{},billfish:{},blackcap:{},crawfish:{},crayfish:{},earthnut:{},escallop:{},filament:{},flounder:{},infusion:{},ironwood:{},quandong:{},relative:{},ringtail:{},screamer:{},sycamore:{},alabaster:{},algarroba:{},broadbill:{},composite:{},fulminate:{},perennial:{},tangerine:{},bladderpod:{},granadilla:{},heartsease:{},periwinkle:{},tumbleweed:{},agglomerate:{},bittersweet:{},intermediate:{},dye:{},elk:{},fig:{},haw:{},oka:{},pea:{},pee:{},rye:{},sac:{},tar:{},yak:{},carp:{},clay:{},coma:{},cony:{},crud:{},cusk:{},dung:{},fang:{},foam:{},germ:{},glue:{},hare:{},hind:{},husk:{},kiwi:{},lake:{},mung:{},okra:{},pine:{},pith:{},puke:{},rice:{},roan:{},sloe:{},taro:{},teal:{},titi:{},twig:{},amber:{},anime:{},berry:{},boxer:{},carob:{},cedar:{},chine:{},guava:{},hound:{},husky:{},kauri:{},lemma:{},monad:{},ocher:{},ochre:{},onion:{},ounce:{},pansy:{},pecan:{},pewit:{},prawn:{},quail:{},shuck:{},sloth:{},slush:{},smelt:{},snail:{},snout:{},spawn:{},swift:{},tabby:{},thorn:{},topaz:{},umber:{},virus:{},wafer:{},wahoo:{},wheat:{},whelk:{},badger:{},bonito:{},broody:{},chrome:{},cirrus:{},cocoon:{},cowpea:{},cuckoo:{},elixir:{},grease:{},grubby:{},howler:{},jabiru:{},jargon:{},jujube:{},kernel:{},leaven:{},lentil:{},liquor:{},locust:{},manioc:{},mastic:{},mentum:{},mildew:{},mimosa:{},mullet:{},muscat:{},mutant:{},nectar:{},nettle:{},nodule:{},pawpaw:{},pecker:{},plasma:{},ruddle:{},sallow:{},shoddy:{},squill:{},starch:{},stroma:{},stucco:{},sunray:{},thorax:{},tissue:{},violet:{},walnut:{},warble:{},amyloid:{},antenna:{plural:"antennae"},apricot:{},aquatic:{},asphalt:{},avocado:{},beebalm:{},bobtail:{},builder:{},bulldog:{},caltrop:{},cayenne:{},chinook:{},coconut:{},cricket:{},cudweed:{},currant:{},cuticle:{},dasheen:{},gallfly:{},juniper:{},lacquer:{},leaflet:{},lettuce:{},macadam:{},mordant:{},mustard:{},packing:{},panther:{},papilla:{},papyrus:{},parsnip:{},pigweed:{},pollard:{},redfish:{},redwood:{},rubbish:{},saffron:{},salsify:{},shallot:{},slating:{},solvate:{},solvent:{},soybean:{},sunfish:{},truffle:{},whisker:{},abrasive:{},allspice:{},angelica:{},biennial:{},bilberry:{},bluebell:{},chickpea:{},cinnabar:{},cinnamon:{},congener:{},creosote:{},demerara:{},duckbill:{},firebird:{},fleabane:{},humanity:{},lavender:{},mahogany:{},monkfish:{},paraffin:{},peduncle:{},peroxide:{},plantain:{},rockfish:{},sandarac:{},sandwort:{},scammony:{},shamrock:{},skipjack:{},skullcap:{},snowbird:{},suckling:{},tubercle:{},alligator:{},angelfish:{},arachnoid:{},arrowroot:{},bearberry:{},blackfish:{},buckthorn:{},capitulum:{},carbonate:{},carnation:{},celluloid:{},chemistry:{},coriander:{},corrosive:{},crabapple:{},devilfish:{},emanation:{},groundnut:{},horseback:{},horsemint:{},injection:{},matchwood:{},mistletoe:{},offspring:{plural:"offspring"},pyrethrum:{},raspberry:{},razorback:{},satinwood:{},sheepskin:{},tomatillo:{},waxflower:{},whitefish:{},ammunition:{},bitterwood:{},blackberry:{},butterfish:{},chinquapin:{},coneflower:{},flagellate:{},flamboyant:{},fledgeling:{},insulation:{},peppermint:{},receptacle:{},strawberry:{},watercress:{},chittamwood:{},everlasting:{},fomentation:{},helleborine:{},honeysuckle:{},horseradish:{},huckleberry:{},salmonberry:{},shittimwood:{},strawflower:{},ultramarine:{},whitethroat:{},wintergreen:{},helmetflower:{},impregnation:{},quintessence:{},sternutatory:{},thimbleberry:{},contamination:{},extravasation:{},leatherjacket:{},pulverisation:{},pulverization:{},tortoiseshell:{},ti:{},ala:{},asp:{},eel:{},elm:{},fir:{},gar:{},neb:{},nit:{},oak:{},oat:{},sol:{},tom:{},yew:{},agar:{},akee:{},anil:{},atom:{},balm:{},bast:{},beet:{},boar:{},bole:{},bran:{},brit:{},cere:{},cero:{},chow:{},coho:{},dahl:{},dill:{},flax:{},foal:{},glop:{},gnat:{},hake:{},herb:{},hoar:{},homo:{},kaki:{},kino:{},leek:{},loin:{},mite:{},musk:{},parr:{},pear:{},poon:{},puka:{},rhea:{},saki:{},seta:{},shad:{},silt:{},slag:{},soda:{},soma:{},soot:{},soya:{},talc:{},teak:{},tufa:{},unai:{},unau:{},whey:{},woad:{},wort:{},yolk:{},zinc:{},abaca:{},alder:{},alula:{},amino:{},anise:{},apple:{},aroid:{},aster:{},balsa:{},basil:{},beech:{},betel:{},biddy:{},billy:{},biped:{},booby:{},britt:{},bruin:{},cairn:{},capon:{},caulk:{},chard:{},chess:{},chick:{},cisco:{},cohoe:{},comma:{},croup:{},cumin:{},dross:{},elver:{},epoxy:{},ergot:{},falls:{},flint:{},fossa:{},genip:{},grout:{},grume:{},henna:{},hilum:{},humus:{},hydra:{},icaco:{},ilama:{},imago:{},ivory:{},kapok:{},kenaf:{},lapin:{},larch:{},lilac:{},lotus:{},luffa:{},mahoe:{},maize:{},mamey:{},mango:{},manna:{},melon:{},moong:{},naiad:{},nanny:{},nopal:{},orris:{},osier:{},otter:{},ovary:{},ovule:{},pacer:{},panda:{},papaw:{},piggy:{},pilus:{},pinna:{},pixie:{},polyp:{},potto:{},putty:{},quira:{},robin:{},roble:{},rosin:{},scrod:{},sepia:{},sisal:{},slime:{},sorus:{},sprat:{},squid:{},stoma:{},sumac:{},swede:{},theca:{},thyme:{},trout:{plural:"trout"},tunny:{},vapor:{},velum:{},venom:{},vinyl:{},whelp:{},yeast:{},acetum:{},acinus:{},acumen:{},adduct:{},agaric:{},alkali:{},almond:{},anuran:{},archil:{},argent:{},balata:{},bamboo:{},bantam:{},barley:{},basset:{},beluga:{},bennet:{},bluing:{},bonduc:{},borage:{},capsid:{},cashew:{},cassia:{},caudex:{},celery:{},chives:{},cilium:{},citron:{},cobnut:{},cocker:{},cosmos:{},cowage:{},croton:{},cupule:{},cushaw:{},darter:{},dentin:{},dobson:{},dodder:{},donkey:{},durian:{},embryo:{},endive:{},ermine:{},falcon:{},feijoa:{},feline:{},fisher:{},fucoid:{},gadfly:{},garlic:{},glycol:{},hackle:{},haunch:{},herpes:{},hyssop:{},kaffir:{},kitten:{},lichee:{},limpet:{},linden:{},linnet:{},litchi:{},loofah:{},loquat:{},lovage:{},lupine:{},madder:{},maguey:{},manure:{},marang:{},mescal:{},mocker:{},mombin:{},mucoid:{},mudcat:{},munggo:{},murine:{},mussel:{},myrtle:{},nipper:{},nutmeg:{},obeche:{},orchil:{},orchis:{},oriole:{},padauk:{},paigle:{},papaya:{},parget:{},pasang:{},peewee:{},peewit:{},phenol:{},plaice:{},pomelo:{},poplar:{},possum:{},potato:{},pothos:{},pouter:{},puffer:{},pullet:{},pumice:{},pyrene:{},quahog:{},quartz:{},quince:{},rachis:{},raffia:{},ratter:{},relict:{},sabicu:{},saline:{},sapote:{},saurel:{},schrod:{},senega:{},septum:{},setter:{},sierra:{},simian:{},sludge:{},solder:{},spirea:{},stevia:{},sulfur:{},thrift:{},toetoe:{},tomato:{},tophus:{},triton:{},tupelo:{},turbot:{},turnip:{},vapour:{},vellum:{},wapiti:{},wasabi:{},acerola:{},actinon:{},aculeus:{},adamant:{},albumen:{},alewife:{},alfalfa:{},amboyna:{},anchovy:{},anemone:{},anionic:{},annelid:{},annulus:{},antacid:{},antlion:{},arsenic:{},aurochs:{},babbitt:{},barilla:{},beeswax:{},bimetal:{},biomass:{},bloomer:{},blotter:{},bluefin:{},blueing:{},boneset:{},boxwood:{},bracken:{},brocket:{},bromide:{},buckeye:{},bugbane:{},bugloss:{},bullock:{},bulrush:{},buzzard:{},cackler:{},cacodyl:{},caliche:{},calycle:{},cambium:{},capulin:{},caraway:{},cardoon:{},catbird:{},catechu:{},celtuce:{},ceriman:{},chalaza:{},chamois:{},chervil:{},chigger:{},citrate:{},cocoyam:{},codfish:{},comfrey:{},compost:{},cowslip:{},crappie:{},crawdad:{},crinoid:{},cyanide:{},cypress:{},dabbler:{},denizen:{},diploid:{},dogfish:{},dogwood:{},echidna:{},eelpout:{},enation:{},fallout:{},ferrite:{},fetlock:{},filaria:{},filbert:{},firebug:{},firefly:{},frijole:{},fuchsia:{},gamboge:{},ginseng:{},girasol:{},glutton:{},gobbler:{},grackle:{},grampus:{},granite:{},grizzly:{},grouper:{},grunter:{},gudgeon:{},haddock:{},halibut:{},haploid:{},haricot:{},heather:{},hepatic:{},herring:{},hickory:{},hogfish:{},honesty:{},hyaline:{},ignitor:{},inducer:{},jackass:{},jewfish:{},jonquil:{},kestrel:{},kingcup:{},kumquat:{},lactate:{},langsat:{},lanolin:{},lingcod:{},lobster:{},logwood:{},mahagua:{},majagua:{},malacca:{},mammoth:{},marabou:{},marasca:{},menthol:{},mercury:{},monarch:{},moneran:{},mongrel:{},moorhen:{},morello:{},muskrat:{},nervure:{},nitrate:{},octopus:{},oldwife:{},opossum:{},oregano:{},ostrich:{},oxheart:{},parsley:{},peacock:{},pigfish:{},pimento:{},piranha:{},plumcot:{},pollack:{},pollock:{},pompano:{},popcorn:{},poultry:{},pricket:{},puccoon:{},pulasan:{},pyrogen:{},quahaug:{},quassia:{},quetzal:{},raccoon:{},ragweed:{},ragwort:{},rattler:{},redbird:{},redpoll:{},redtail:{},reducer:{},redwing:{},remover:{},residue:{},retinal:{},rhubarb:{},rosebud:{},rostrum:{},satsuma:{},saurian:{},sequoia:{},seriema:{},skylark:{},sockeye:{},soursop:{},sparrow:{},spinach:{},spiraea:{},stentor:{},steroid:{},stubble:{},sulfate:{},sulphur:{},tangelo:{},taproot:{},tarweed:{},tarwood:{},tattler:{},taurine:{},teargas:{},timothy:{},tobacco:{},topknot:{},tortrix:{},trotter:{},varmint:{},verdure:{},viceroy:{},vinegar:{},viscose:{},vulture:{},walleye:{},waratah:{},warbler:{},waxwork:{},whooper:{},wilding:{},witloof:{},wryneck:{},abradant:{},absinthe:{},acceptor:{},actinoid:{},adhesive:{},adjutant:{},ageratum:{},agueweed:{},albacore:{},amarelle:{},amethyst:{},ammoniac:{},argonaut:{},armyworm:{},auricula:{},balancer:{},baldpate:{},barnacle:{},basswood:{},bayberry:{},bearskin:{},beetroot:{},birdlime:{},blackfly:{},blacktop:{},bluebird:{},bluefish:{},boarfish:{},bocconia:{},boxberry:{},brisling:{},broccoli:{},buckskin:{},bullhead:{},bullrush:{},canistel:{},capuchin:{},carangid:{},carbonyl:{},carboxyl:{},cardamom:{},cardamon:{},carinate:{},carnauba:{},carotene:{},cashmere:{},catalyst:{},catchfly:{},celeriac:{},cetacean:{},chimaera:{},chloride:{},cilantro:{},cinchona:{},citrange:{},cockspur:{},conodont:{},costmary:{},cowberry:{},cucumber:{},deadwood:{},detritus:{},dewberry:{},dilution:{},dolomite:{},duckling:{},ectozoan:{},eelgrass:{},effluent:{},eggplant:{},emulsion:{},estragon:{},filtrate:{},fireweed:{},flathead:{},flooring:{},forelock:{},galangal:{},garbanzo:{},grayback:{},guaiacum:{},hardtack:{},harebell:{},hawkweed:{},hazelnut:{},hedgehog:{},hepatica:{},hookworm:{},hornwort:{},horsefly:{},hyacinth:{},impurity:{},iodoform:{},jalapeno:{},jamberry:{},japonica:{},keurboom:{},kindling:{},kingwood:{},kinkajou:{},kohlrabi:{},labdanum:{},lambskin:{},locoweed:{},lovebird:{},magnolia:{},mahimahi:{},mandrake:{},margarin:{},marjoram:{},medusoid:{},mephitis:{},migrator:{},molecule:{},moonfish:{},mucilage:{},mulberry:{},nestling:{},omnivore:{},ovenbird:{},pandanus:{},pickerel:{},pilchard:{},pimiento:{},pitahaya:{},placenta:{},plumbago:{},predator:{},ptomaine:{},puffball:{},pulassan:{},purebred:{},pyrectic:{},quandang:{},quickset:{},rambotan:{},rambutan:{},redberry:{},redstart:{},reedbird:{},ricebird:{},richweed:{},ringdove:{},rockrose:{},rosefish:{},rosemary:{},rosewood:{},ruminant:{},rutabaga:{},sailfish:{},salsilla:{},saltwort:{},sandfish:{},scallion:{},seahorse:{},sealskin:{},sewerage:{},shoveler:{},siderite:{},silkworm:{},sparling:{},squealer:{},squirrel:{},stearate:{},stinkpot:{},superbug:{},surffish:{},sweetsop:{},tamarind:{},tarragon:{},teaberry:{},thresher:{},throstle:{},tilefish:{},tomentum:{},toxicant:{},turmeric:{},ungulate:{},univalve:{},urochord:{},vesicant:{},warragal:{},warrigal:{},watchdog:{},waxberry:{},weakfish:{},wolffish:{},woodbine:{},woodruff:{},wormcast:{},wriggler:{},zucchini:{},absorbent:{},adsorbate:{},adsorbent:{},albatross:{},almandine:{},andromeda:{},antiknock:{},apophysis:{},archangel:{},arsenical:{},artichoke:{},asparagus:{},aubergine:{},bacteroid:{},blackbird:{},blindworm:{},bluegrass:{},bluepoint:{},broadtail:{},brooklime:{},brookweed:{},brushwood:{},buckwheat:{},bugleweed:{},buteonine:{},butternut:{},caecilian:{},calyculus:{},candlenut:{},cantaloup:{},carambola:{},carbonado:{},carbuncle:{},cardboard:{},carnivore:{},catamount:{},celandine:{},chameleon:{},chatterer:{},chelonian:{},cherimoya:{},chickweed:{},chlamydia:{},clamshell:{},clapboard:{},coachwhip:{},cochineal:{},cocklebur:{},cocozelle:{},coltsfoot:{},commensal:{},courgette:{},crackling:{},cupflower:{},cyanamide:{},digestive:{},digitalis:{},driftfish:{},ecrevisse:{},ectoplasm:{},eiderdown:{},ephemeral:{},eutherian:{},evergreen:{},excretion:{},exudation:{},fenugreek:{},firebrand:{},firestone:{},flagellum:{},frostweed:{},funiculus:{},gladiolus:{},glasswort:{},goldeneye:{},goldfinch:{},grapevine:{},grenadier:{},hackberry:{},hamadryad:{},heartleaf:{},hellebore:{},hollyhock:{},horehound:{},horsebean:{},horsehair:{},horseweed:{},hortensia:{},hydroxide:{},jackfruit:{},jacksnipe:{},jellyfish:{},juneberry:{},lancewood:{},langouste:{},leavening:{},lemonwood:{},mammalian:{},manzanita:{},maravilla:{},marihuana:{},marijuana:{},moosewood:{},muscadine:{},muskmelon:{},nakedwood:{},nectarine:{},nighthawk:{},pasturage:{},patchouli:{},patchouly:{},pelecypod:{},pellitory:{},peregrine:{},peristome:{},persimmon:{},phosphate:{},pimpernel:{},pinchbeck:{},pineapple:{},pistachio:{},polyploid:{},probiotic:{},proboscis:{},protozoan:{},pureblood:{},quadruped:{},rauwolfia:{},recycling:{},reptilian:{},reticulum:{},rockcress:{},rootstock:{},rosinweed:{},sandpaper:{},sapodilla:{},sassafras:{},sheldrake:{},shingling:{},shoveller:{},siccative:{},sicklepod:{},snakeroot:{},snowflake:{},sourdough:{},spicebush:{},spirillum:{},stainless:{},stiffener:{},strangler:{},strawworm:{},sugarcane:{},swordfish:{},tamarindo:{},tarantula:{},topminnow:{},tulipwood:{},turquoise:{},twayblade:{},twinberry:{},wallpaper:{},whitebait:{},whiteface:{},wineberry:{},wolverine:{},workhorse:{},adulterant:{},amygdaloid:{},anopheline:{},aquamarine:{},belladonna:{},bellwether:{},bitterweed:{},blacksnake:{},blackthorn:{},bluebonnet:{},bluebottle:{},bottlenose:{},brachiopod:{},brazilwood:{},breadfruit:{},butterball:{},butterweed:{},candelilla:{},cantaloupe:{},catarrhine:{},cellulosic:{},chatterbox:{},chinaberry:{},cinquefoil:{},citronwood:{},clementine:{},condensate:{},copperhead:{},coralberry:{},cornflower:{},cottonweed:{},cottonwood:{},crossbreed:{},crustacean:{},deathwatch:{},demoiselle:{},dollarfish:{},elderberry:{},exhalation:{},feathertop:{},fetterbush:{},fiddlehead:{},flycatcher:{},fritillary:{},garambulla:{},goldenbush:{},gooseberry:{},grapefruit:{},jaboticaba:{},jackrabbit:{},ketembilla:{},kitembilla:{},lemongrass:{},littleneck:{},loganberry:{},loggerhead:{},mangosteen:{},marblewood:{},marguerite:{},massasauga:{},meerschaum:{},monoclonal:{},nasturtium:{},needlefish:{},nonstarter:{},ornamental:{},pacesetter:{},parenchyma:{},pennyroyal:{},pepperwort:{},plasmodium:{},princewood:{},propellant:{},propellent:{},pufferfish:{},pyrimidine:{},quercitron:{},restharrow:{},restrainer:{},ribbonfish:{},ribbonwood:{},rudderfish:{},sapphirine:{},scorzonera:{},sidewinder:{},silverbush:{},silverfish:{},silverweed:{},spiceberry:{},sticktight:{},sugarberry:{},superoxide:{},tarmacadam:{},turpentine:{},turtledove:{},velvetleaf:{},vertebrate:{},vesicatory:{},wandflower:{},watermelon:{},windowpane:{},witchgrass:{},yellowbird:{},yellowtail:{},yellowwood:{},adulterator:{},arthrospore:{},artiodactyl:{},bactericide:{},boysenberry:{},branchiopod:{},buffalofish:{},butcherbird:{},cauliflower:{},cherrystone:{},chittimwood:{},chokecherry:{},combustible:{},conspecific:{},digitigrade:{},dolphinfish:{},flameflower:{},gillyflower:{},groundberry:{},groundcover:{},heterocycle:{},honeyflower:{},insectivore:{},leatherleaf:{},leatherwood:{},lingonberry:{},liquidambar:{},loosestrife:{},muskellunge:{},plantigrade:{},platyrrhine:{},pomegranate:{},precipitant:{},prickleback:{},quicksilver:{},recombinant:{},refrigerant:{},shellflower:{},silversides:{},sleuthhound:{},swallowwort:{},unguiculate:{},waldmeister:{},archosaurian:{},distillation:{},heterocyclic:{},honeycreeper:{},instillation:{},invertebrate:{},nonsteroidal:{},placentation:{},sarsaparilla:{},serviceberry:{},squirrelfish:{},transudation:{},weatherboard:{},whortleberry:{},yellowhammer:{},branchiopodan:{},inflorescence:{},platyrrhinian:{},semiconductor:{},transactinide:{},vitrification:{},fructification:{},aa:{},ai:{},ani:{},auk:{},awn:{},bot:{},dak:{},daw:{},dew:{},doe:{},dug:{},eft:{},ern:{},ewe:{},gib:{},gnu:{},goo:{},ivy:{},jay:{},kea:{},kob:{},lac:{},lye:{},may:{},mei:{},moa:{},oca:{},ola:{},olm:{},pia:{},pug:{},teg:{},tup:{},acyl:{},agua:{},aloe:{},amyl:{},anoa:{},apar:{},aril:{},arui:{},atar:{},axil:{},barm:{},baya:{},bine:{},boll:{},bufo:{},buna:{},calx:{},cavy:{},chub:{},cleg:{},coco:{},colt:{},coot:{},corm:{},cows:{},craw:{},culm:{},cyme:{},dace:{},dalo:{},deer:{plural:"deer"},derv:{},dhak:{},dhal:{},dika:{},diol:{},disa:{},dita:{},dogy:{},doob:{},dopa:{},enol:{},erne:{},eyas:{},fern:{},fice:{},floc:{},fuji:{},gean:{},goby:{},guan:{},guar:{},guib:{},haem:{},halm:{},hart:{},heme:{},hogg:{},hops:{},hoya:{},ibex:{},ibis:{},inga:{},jird:{},jute:{},kali:{},kelp:{},kola:{},kudu:{},lily:{},lino:{},liza:{},loam:{},loir:{},lory:{},lynx:{},mako:{},mamo:{},mara:{},marl:{},merl:{},mica:{},milo:{},miro:{},mola:{},moss:{},munj:{},mutt:{},myna:{},nagi:{},napa:{},napu:{},neem:{},neon:{},olla:{},ombu:{},onyx:{},opah:{},opal:{},orca:{},oryx:{},paca:{},peat:{},peba:{},pika:{},pome:{},puku:{},puma:{},pupa:{},ragi:{},rimu:{},rudd:{},sago:{},salp:{},sang:{},sard:{},scut:{},sial:{},sika:{},sild:{},sima:{},skua:{},smew:{},sugi:{},tatu:{},teff:{},teju:{},tern:{},tipu:{},toad:{},tody:{},tolu:{},tuff:{},tung:{},urea:{},urus:{},vole:{},wasp:{},weka:{},blast:{},dinar:{},lapse:{},lurch:{},whirl:{},travel:{},capacity:{},encounter:{},conversion:{},separation:{},age:{},nip:{},now:{},halt:{},leap:{},mile:{},peak:{},peso:{},slam:{},term:{},wake:{},faint:{},scoop:{},surge:{},third:{},trick:{},bother:{},cackle:{},motion:{},chatter:{},reversal:{},elevation:{},experience:{},dab:{},pat:{},cube:{},howl:{},over:{},peep:{},span:{},cause:{},death:{},plump:{},plunk:{},poise:{},pulse:{},shame:{},spark:{},twang:{},wound:{},cipher:{},crunch:{},damage:{},fusion:{},period:{},racket:{},repeat:{},supply:{},wallow:{},wonder:{},dribble:{},failure:{},outrage:{},sparkle:{},backfire:{},campaign:{},delivery:{},increase:{},variance:{},explosion:{},correction:{},disturbance:{},translation:{},displacement:{},transposition:{},hum:{},mug:{},buzz:{},cord:{},dawn:{},fuss:{},hint:{},hiss:{},much:{},past:{},ping:{},rout:{},seek:{},tide:{},warp:{},birth:{},blend:{},crumb:{},delay:{},rupee:{},worst:{},climax:{},deluge:{},dirham:{},recoil:{},replay:{},rhythm:{},rising:{},descent:{},grumble:{},impulse:{},respite:{},scruple:{},triumph:{},addition:{},dogfight:{},eruption:{},occasion:{},progress:{},reprieve:{},shilling:{},stampede:{},accretion:{},induction:{},appearance:{},suggestion:{},circulation:{},irradiation:{},accommodation:{},precipitation:{},in:{},ebb:{},mil:{},zap:{},gush:{},honk:{},lull:{},plop:{},rave:{},ream:{},slap:{},then:{},zoom:{},fifth:{},final:{},gleam:{},reign:{},swash:{},throb:{},thump:{},tweet:{},wreck:{},wring:{},billow:{},breach:{},ending:{},fourth:{},gurgle:{},injury:{},nibble:{},parity:{},sunset:{},billion:{},history:{},instant:{},spatter:{},blackout:{},creation:{},decision:{},downhill:{},entrance:{},rational:{},trillion:{},hereafter:{},immersion:{},intrusion:{},millenary:{},remainder:{},saltation:{},adjustment:{},antecedent:{},dedication:{},deflection:{},impairment:{},limitation:{},outpouring:{},refinement:{},scattering:{},devastation:{},elaboration:{},fundamental:{},prohibition:{},retardation:{},interference:{},transmission:{},manifestation:{},scintillation:{},mi:{},kip:{},wee:{},yaw:{},bout:{},bray:{},doom:{},harm:{},haul:{},jolt:{},none:{},ooze:{},pity:{},sigh:{},surf:{},thaw:{},tour:{},alpha:{},carom:{},chunk:{},clink:{},colon:{},deuce:{},drama:{},glint:{},going:{},shtik:{},sixth:{},spurt:{},thrum:{},tinge:{},today:{},waltz:{},worth:{},bucket:{},egress:{},fathom:{},mutter:{},patter:{},picnic:{},quaver:{},ripple:{},rustle:{},shtick:{},sizzle:{},squawk:{},stride:{},tremor:{},whoosh:{},wobble:{},absence:{},allegro:{},andante:{},deficit:{},episode:{},heaving:{},raising:{},rebirth:{},roaring:{},rupture:{},screech:{},scrunch:{},seventh:{},success:{},sunrise:{},takeoff:{},trample:{},twinkle:{},cracking:{},deletion:{},incident:{},interval:{},isometry:{},overflow:{},rattling:{},skeleton:{},splatter:{},striking:{},twilight:{},upheaval:{},advantage:{},alignment:{},deflexion:{},diffusion:{},emergence:{},inflation:{},normality:{},remission:{},resultant:{},ruination:{},shakedown:{},vibration:{},yesterday:{},allegretto:{},conception:{},concoction:{},concretion:{},disruption:{},divergence:{},graduation:{},inflection:{},initiation:{},moderation:{},sprinkling:{},approaching:{},biquadratic:{},competition:{},compression:{},contraction:{},humiliation:{},permutation:{},constriction:{},ramification:{},accompaniment:{},embarrassment:{},mortification:{},rectification:{},coo:{},eve:{},gee:{},par:{},sea:{},sec:{},tot:{},won:{},yen:{},bash:{},beep:{},ding:{},dram:{},fete:{},gait:{},inch:{},lira:{},peal:{},pint:{},purr:{},rial:{},ting:{},toot:{},whiz:{},blare:{},bleat:{},brawl:{},cease:{},digit:{},dying:{},epoch:{},gravy:{},idyll:{},knell:{},metre:{},minim:{},ninth:{},plash:{},plonk:{},quake:{},quart:{},ravel:{},salvo:{},skirl:{},snore:{},spate:{},spirt:{},swish:{},tenth:{},unity:{},whack:{},whirr:{},years:{},ascent:{},bushel:{},curfew:{},drachm:{},eighth:{},enough:{},finale:{},fizzle:{},footer:{},gobble:{},jingle:{},marvel:{},myriad:{},octave:{},ravage:{},smudge:{},spritz:{},squeak:{},squeal:{},squish:{},swerve:{},tierce:{},usance:{},waxing:{},atrophy:{},banging:{},bending:{},blowout:{},centner:{},clangor:{},debacle:{},decimal:{},eclipse:{},glitter:{},kickoff:{},midterm:{},million:{},misfire:{},modulus:{},monsoon:{},ordinal:{},outflow:{},ringing:{},shimmer:{},sinking:{},smolder:{},torrent:{},twelfth:{},backwash:{},bouncing:{},downfall:{},dripping:{},drumbeat:{},eighties:{},eternity:{},exigency:{},footstep:{},furlough:{},gleaming:{},grinding:{},hardship:{},instance:{},invasion:{},majority:{},maturity:{},nineties:{},overtime:{},overture:{},pandemic:{},pounding:{},receding:{},recovery:{},rustling:{},scraping:{},sixtieth:{},smoulder:{},spoilage:{},spraying:{},tomorrow:{},touching:{},amplitude:{},ascension:{},athletics:{},avalanche:{},billionth:{},checkmate:{},clearance:{},collision:{},commotion:{},contagion:{},departure:{},fertility:{},formality:{},gestation:{},heartbeat:{},honeymoon:{},hundredth:{},interlude:{},irruption:{},lactation:{},millionth:{},multitude:{},onslaught:{},outgrowth:{},plurality:{},probation:{},pulsation:{},shrinkage:{},sixteenth:{},spreading:{},stalemate:{},throbbing:{},whistling:{},withering:{},affliction:{},alteration:{},betterment:{},dispersion:{},enervation:{},expiration:{},foreboding:{},incubation:{},incumbency:{},inevitable:{},irrational:{},jubilation:{},levitation:{},millennium:{plural:"millennia"},procession:{},repetition:{},revolution:{},sabbatical:{},solubility:{},subsidence:{},thousandth:{},undulation:{},visitation:{},accelerando:{},catastrophe:{},celebration:{},coincidence:{},consequence:{},continuance:{},deformation:{},dislocation:{},dissipation:{},expansivity:{},fluctuation:{},gravitation:{},oscillation:{},preliminary:{},punctuation:{},sufficiency:{},acceleration:{},augmentation:{},championship:{},commencement:{},conservation:{},deceleration:{},degeneration:{},encroachment:{},interlocking:{},reflectivity:{},consolidation:{},hundredweight:{},magnetisation:{},magnetization:{},regurgitation:{},sheepshearing:{},transmutation:{},conglomeration:{},materialisation:{},optic:{},patty:{},prune:{},saute:{},scalp:{},sinus:{},swill:{},bubbly:{},burgoo:{},choler:{},claret:{},cortex:{},crotch:{},drivel:{},frappe:{},hiatus:{},kosher:{},legume:{},macula:{},phlegm:{},pickle:{},stemma:{},thenar:{},tiptoe:{},adrenal:{},anatomy:{},confect:{},freckle:{},jugular:{},knuckle:{},mastoid:{},medulla:{},pudding:{},takeout:{},thyroid:{},tonsure:{},wassail:{},anterior:{},coloring:{},julienne:{},libation:{},rhomboid:{},sandwich:{},takeaway:{},appendage:{},chocolate:{},colouring:{},endocrine:{},hamstring:{},moonshine:{},permanent:{},recessive:{},turbinate:{},confection:{},hemisphere:{},ingredient:{},spatchcock:{},sweetening:{},convolution:{},pneumogastric:{},os:{},cos:{},cud:{},sup:{},caul:{},chaw:{},chin:{},chou:{},curd:{},cyst:{},fizz:{},jowl:{},mane:{},milt:{},perm:{},snot:{},sorb:{},sura:{},taco:{},booze:{},broth:{},caput:{},chili:{},cocoa:{},costa:{},cress:{},dough:{},eater:{},fanny:{},fondu:{},hyoid:{},loins:{},lolly:{},lumen:{},mamma:{},mummy:{},pasta:{},plasm:{},porgy:{},puree:{},quaff:{},quark:{},sinew:{},thigh:{},tripe:{},tummy:{},areola:{},banana:{},booger:{},bowleg:{},brunch:{},carpal:{},cervix:{},citrus:{},comfit:{},dactyl:{},dorsum:{},edible:{},flitch:{},fondue:{},fornix:{},gammon:{},herbal:{},lambda:{},malted:{},marcel:{},millet:{},monggo:{},noodle:{},paring:{},pastry:{},pelvis:{},simnel:{},spleen:{},tarsal:{},tensor:{},tipple:{},waffle:{},wonton:{},abdomen:{},adenoid:{},auricle:{},biscuit:{},brownie:{},clabber:{},criollo:{},croaker:{},cubitus:{},deltoid:{},dentine:{},dietary:{},eyeball:{},fistula:{},forearm:{},fritter:{},gherkin:{},haircut:{},headful:{},hyaloid:{},iceberg:{},isthmus:{},kneecap:{},lacteal:{},lasagna:{},lasagne:{},lozenge:{},marmite:{},midriff:{},oatmeal:{},ocellus:{},pageboy:{},paprika:{},pathway:{},pottage:{},prepuce:{},pumpkin:{},ramekin:{},ratafia:{},roulade:{},sausage:{},seltzer:{},serving:{},sidecar:{},slobber:{},sorghum:{},stirrup:{},sultana:{},teacake:{},timbale:{},toenail:{},topping:{},tostada:{},trachea:{},treacle:{},twister:{},vintage:{},abducent:{},abductor:{},afferent:{},alveolus:{},appendix:{plural:"appendices"},astragal:{},bicuspid:{},blowfish:{},blowhole:{},bouffant:{},capitate:{},chowchow:{},cobblers:{},cocktail:{},coquille:{},couscous:{},doughboy:{},doughnut:{},dumpling:{},efferent:{},eminence:{},exocrine:{},fascicle:{},flatfish:{},flatfoot:{},flummery:{},forehead:{},foreskin:{},hairline:{},honeydew:{},licorice:{},ligament:{},lollipop:{},macaroni:{},mackerel:{},marinade:{},membrane:{},monstera:{},mouthful:{},muscatel:{},pheasant:{},physique:{},potation:{},prostate:{},ramequin:{},receptor:{},sillabub:{},sinusoid:{},smoothie:{},specimen:{},streusel:{},stuffing:{},syllabub:{},teardrop:{},venation:{},windfall:{},abdominal:{},apparatus:{},blueberry:{},casserole:{},corpuscle:{},cranberry:{},demitasse:{},dentition:{},drinkable:{},drumstick:{},epiphysis:{},flageolet:{},fricassee:{},hamburger:{},labyrinth:{},lifeblood:{},lineament:{},liquorice:{},mastoidal:{},maxillary:{},navicular:{},pituitary:{},pompadour:{},provender:{},purulence:{},shellfish:{},spaghetti:{},spareribs:{},splayfoot:{},spoilable:{},sundowner:{},sweetener:{},trapezium:{},trapezoid:{},umbilical:{},ventricle:{},vestibule:{},zygomatic:{},applesauce:{},autoplasty:{},blackheart:{},breadstuff:{},cheesecake:{},comestible:{},gastronomy:{},hotchpotch:{},interstice:{},jawbreaker:{},kitambilla:{},maraschino:{},metacarpal:{},metatarsal:{},passageway:{},perishable:{},salmagundi:{},shortening:{},articulator:{},excrescence:{},grasshopper:{},griddlecake:{},intercostal:{},longanberry:{},nourishment:{},screwdriver:{},smorgasbord:{},spindlelegs:{},checkerberry:{},perspiration:{},spindleshanks:{},parasympathetic:{},ab:{},ade:{},ale:{},bap:{},bun:{},jak:{},lat:{},lox:{},pes:{},pie:{},poi:{},pud:{},pus:{},tum:{},vas:{},veg:{},anus:{},arak:{},axon:{},baba:{},bile:{},bleb:{},bleu:{},bock:{},bosc:{},choc:{},clit:{},cola:{},coxa:{},crus:{},cuke:{},duff:{},dura:{},edda:{},eggs:{},fist:{},flab:{},flan:{},fugu:{},genu:{},ghee:{},glia:{},grog:{},isaw:{},java:{},kava:{},marc:{},mayo:{},mead:{},miso:{},mons:{},naan:{},nape:{},nipa:{},oleo:{},orzo:{},ouzo:{},ovum:{},pecs:{},pita:{},pone:{},pons:{},porc:{},rete:{},rima:{},rind:{},roux:{},ruga:{},rusk:{},slaw:{},sops:{},suet:{},tofu:{},ugli:{},ulna:{},umbo:{},uvea:{},veal:{},veau:{},vena:{},vino:{},womb:{},ziti:{},zona:{},ackee:{},adobo:{},aioli:{},anjou:{},ankle:{},annon:{},aorta:{},arcus:{},aspic:{},atole:{},axone:{},babka:{},bacon:{},bagel:{},bialy:{},bigos:{},bitok:{},blanc:{},blini:{},bliny:{},boeuf:{},borsh:{},bowel:{},bursa:{},butty:{},cauda:{},cavum:{},cecum:{},celom:{},chips:{},chyle:{},cider:{},congo:{},copra:{},cornu:{},cuppa:{},cutis:{},cyder:{},cytol:{},decaf:{},donut:{},facia:{},femur:{},filum:{},flews:{},fovea:{},fries:{},gigot:{},gland:{},glans:{},gleet:{},glogg:{},glute:{},gonad:{},goody:{},grist:{},grits:{},gruel:{},gyrus:{},hilus:{},hoagy:{},hooch:{},hooks:{},hymen:{},hyson:{},ileum:{},ilium:{},incus:{},inion:{},jello:{},julep:{},kabob:{},kasha:{},kebab:{},knish:{},kumis:{},kvass:{},lansa:{},latke:{},latte:{},lichi:{},limpa:{},lymph:{},macon:{},manus:{},matzo:{},mucus:{},nacho:{},naris:{},nates:{},negus:{},offal:{},ootid:{},pekoe:{},penis:{},penne:{},perry:{},pesto:{},pilaf:{},pinky:{},pizza:{},plica:{},porta:{},pruno:{},psoas:{},pubis:{},quiff:{},raita:{},ramus:{},raphe:{},salmi:{},salsa:{},savoy:{},sebum:{},serum:{},sirup:{},skull:{},sperm:{},steak:{},sudor:{},sushi:{},taffy:{},tamal:{},tater:{},teeth:{},teres:{},tibia:{},titty:{},toddy:{},toffy:{},torso:{},torte:{},tress:{},uvula:{},vagus:{},viand:{},vodka:{},vomer:{},vulva:{},wrist:{},adnexa:{},afters:{},agnail:{},ananas:{},anlage:{},annexa:{},annona:{},antrum:{},armpit:{},arrack:{},axilla:{},baguet:{},beigel:{},biceps:{},bisque:{},blintz:{},bonbon:{},borsch:{},brazil:{},bregma:{},bulgur:{},burger:{},cachou:{},caecum:{},canape:{},canola:{},cardia:{},carina:{},carpus:{},casaba:{},catsup:{},caviar:{},chevre:{},chiasm:{},chilli:{},choana:{},coccyx:{},coelom:{},comedo:{},concha:{},confit:{},congou:{},corium:{},corpse:{},cupper:{},cuspid:{},cutlet:{},damson:{},danish:{},dermis:{},dewlap:{},dolmas:{},eclair:{},eggnog:{},eschar:{},eyelid:{},farina:{},fauces:{},fibula:{},finnan:{},flexor:{},fundus:{},gateau:{},geneva:{},giblet:{},glossa:{},gluten:{},goatee:{},gobbet:{},gonion:{},goober:{},graham:{},grappa:{},groats:{},gulyas:{},haggis:{},hairdo:{},hallah:{},hallux:{},hamate:{},haslet:{},hoagie:{},hominy:{},hommos:{},hootch:{},hotpot:{},huitre:{},hummus:{},inguen:{},intima:{},jambon:{},jugale:{},jumbal:{},karyon:{},kencur:{},kidney:{},kipper:{},kirsch:{},kishke:{},korlan:{},kummel:{},labium:{},lamina:{},lanseh:{},lanugo:{},larynx:{},lekvar:{},limbus:{},lingua:{},lobule:{},lochia:{},locule:{},lunule:{},matzoh:{},meatus:{},meninx:{},milium:{},mohawk:{},mouton:{},mucosa:{},muesli:{},muffin:{},murphy:{},mutton:{},nasion:{},nervus:{},neuron:{},nougat:{},oculus:{},omelet:{},onyxis:{},oocyte:{},oolong:{},operon:{},organs:{},paczki:{},paella:{},palate:{},paries:{},pastis:{},paunch:{},pectus:{},phyllo:{},pilaff:{},pinkie:{},pinole:{},pirogi:{},pleura:{},plexus:{},pollex:{},polony:{},posset:{},potage:{},poteen:{},potion:{},potpie:{},poulet:{},premix:{},pulque:{},purloo:{},quiche:{},rectum:{},rectus:{},repast:{},retina:{},rhaphe:{},ribier:{},rickey:{},rotgut:{},sacrum:{},salami:{},saliva:{},samosa:{},sapota:{},scampi:{},scampo:{},sclera:{},scruff:{},seckel:{},serosa:{},shandy:{},sherry:{},silage:{},skilly:{},smegma:{},soleus:{},sorbet:{},sputum:{},stapes:{},stodge:{},succus:{},sulcus:{},sundae:{},sutura:{},tahini:{},tamale:{},tarsus:{},tendon:{},testis:{},thymus:{},tidbit:{},tiffin:{},tisane:{},titbit:{},toffee:{},tonsil:{},tragus:{},troche:{},tubule:{},tunica:{},unguis:{},ureter:{},uterus:{},vagina:{},veggie:{},venula:{},venule:{},vermis:{},vesica:{},viscus:{},vitals:{},waters:{},whisky:{},wiener:{},yogurt:{},zaatar:{},zonula:{},zonule:{},zygoma:{},zygote:{},absinth:{},akvavit:{},aniseed:{},aquavit:{},arteria:{},ashcake:{},baklava:{},bannock:{},beignet:{},keen:{},rage:{},wish:{},aside:{},chafe:{},gloss:{},tense:{},whole:{},worry:{},effect:{},reject:{},riddle:{},snatch:{},speech:{},closure:{},collect:{},romance:{},flourish:{},classical:{},influence:{},substance:{},reflection:{},inclination:{},recognition:{},dot:{},nod:{},blur:{},itch:{},slur:{},solo:{},wink:{},abuse:{},acute:{},alert:{},angle:{},bluff:{},cheer:{},honor:{},humor:{},lyric:{},snarl:{},tally:{},accent:{},degree:{},detail:{},indent:{},matter:{},patent:{},rubric:{},thrill:{},abandon:{},bluster:{},concern:{},concord:{},formula:{plural:"formulae"},imprint:{},nominal:{},quality:{},reading:{},sputter:{},torture:{},wrinkle:{},contrast:{},estimate:{},harmonic:{},judgment:{},reaction:{},sanction:{},singular:{},straddle:{},construct:{},judgement:{},reflexion:{},rendering:{},universal:{},acceptance:{},discipline:{},irritation:{},regulation:{},relaxation:{},submission:{},application:{},replication:{},construction:{},introduction:{},presentation:{},cant:{},code:{},joke:{},pain:{},stab:{},trot:{},will:{},blame:{},brief:{},dodge:{},fancy:{},glide:{},grasp:{},guess:{},quote:{},scent:{},slant:{},snort:{},swoop:{},theme:{},trial:{},vocal:{},accord:{},affect:{},cancel:{},debate:{},desire:{},heroic:{},murmur:{},phrase:{},resume:{},scream:{},serial:{},tangle:{},closing:{},dissent:{},drawing:{},example:{},exhibit:{},fatigue:{},feeling:{},mention:{},partial:{},posture:{},protest:{},regress:{},telling:{},welcome:{},absolute:{},analysis:{plural:"analyses"},distress:{},pastoral:{},platform:{},temporal:{},agreement:{},attention:{},beginning:{},closeness:{},connexion:{},dimension:{},discourse:{},lightness:{},principle:{},surrender:{},assignment:{},coordinate:{},involution:{},abstraction:{},arrangement:{},conjunction:{},declaration:{},penetration:{},proposition:{},realisation:{},realization:{},condensation:{},consideration:{},no:{},cue:{},fun:{},rub:{},bias:{},gift:{},hoot:{},jazz:{},oral:{},snub:{},text:{},tune:{},urge:{},coast:{},craze:{},daily:{},debut:{},dowse:{},funny:{},logic:{},mercy:{},peace:{},rerun:{},samba:{},slang:{},taboo:{},verse:{},whine:{},words:{},aspect:{},babble:{},canker:{},choice:{},clamor:{},denial:{},device:{},esteem:{},format:{},lament:{},manual:{},menace:{},normal:{},pardon:{},regret:{},skinny:{},sorrow:{},tickle:{},twinge:{},vision:{},warmth:{},caution:{},charter:{},conceit:{},cunning:{},delight:{},dictate:{},discord:{},finance:{},harmony:{},keynote:{},knowing:{},leaning:{},lecture:{},mistake:{},musical:{},offense:{},palaver:{},preempt:{},purpose:{},pyrrhic:{},realism:{},sharing:{},texture:{},worship:{},writing:{},aspirate:{},biweekly:{},blessing:{},citation:{},despatch:{},dullness:{},feminine:{},flatness:{},geminate:{},manifest:{},personal:{},pleasure:{},politics:{},singsong:{},yielding:{},agitation:{},attrition:{},bimonthly:{},broadcast:{},confusion:{},deviation:{},disregard:{},education:{},faintness:{},heaviness:{},imitation:{},indenture:{},interview:{},isolation:{},isometric:{},minuscule:{},portrayal:{},predicate:{},provision:{},screaming:{},signature:{},spiritual:{},throwaway:{},tightness:{},accounting:{},aggression:{},assumption:{},attraction:{},commercial:{},compromise:{},confession:{},confidence:{},conformity:{},conveyance:{},detachment:{},difference:{},discretion:{},imperative:{},mellowness:{},modulation:{},tenderness:{},uneasiness:{},awkwardness:{},discernment:{},elimination:{},endorsement:{},examination:{},fabrication:{},familiarity:{},implication:{},indorsement:{},involvement:{},observation:{},obstruction:{},performance:{},requisition:{},sensitivity:{},testimonial:{},appreciation:{},articulation:{},condemnation:{},confirmation:{},deliberation:{},intervention:{},satisfaction:{},confrontation:{},decomposition:{},determination:{},reinforcement:{},understanding:{},characteristic:{},correspondence:{},sophistication:{},transformation:{},rationalisation:{},rationalization:{},dub:{},fog:{},bold:{},buoy:{},dare:{},daze:{},envy:{},gape:{},okay:{},plus:{},rasp:{},rime:{},role:{},tabu:{},yell:{},above:{},affix:{},agape:{},chord:{},croak:{},doubt:{},email:{},essay:{},folly:{},idiom:{},laugh:{},modal:{},panic:{},posit:{},rhyme:{},rider:{},rumba:{},scare:{},scorn:{},sneer:{},trill:{},truth:{},wince:{},adagio:{},binary:{},daring:{},defeat:{},dismay:{},docket:{},filing:{},flavor:{},giving:{},gospel:{},lesson:{},median:{},neuter:{},notion:{},parody:{},parole:{},plight:{},rebuff:{},rhumba:{},sample:{},shiver:{},solace:{},trance:{},unseen:{},vanity:{},vector:{},amnesty:{},anguish:{},arousal:{},bucolic:{},caption:{},catalog:{},contour:{},descant:{},disdain:{},dispute:{},fantasy:{},flavour:{},glimpse:{},insight:{},languor:{},licence:{},marking:{},overbid:{},prelude:{},probate:{},purport:{},pursuit:{},reality:{},receipt:{},recital:{},riposte:{},splurge:{},sticker:{},summons:{},wrangle:{},approval:{},buoyancy:{},converse:{},coolness:{},covenant:{},crotchet:{},devotion:{},dialogue:{},emphasis:{},esthetic:{},excision:{},fairness:{},fixation:{},forecast:{},hieratic:{},identity:{},illusion:{},integral:{},monotone:{},offering:{},paradigm:{},premiere:{},printing:{},referent:{},rescript:{},research:{},rhetoric:{},schedule:{},skimming:{},sleeping:{},speaking:{},splutter:{},streamer:{},tendency:{},topology:{},vexation:{},wildness:{},adjective:{},aesthetic:{},assurance:{},burlesque:{},catalogue:{},correlate:{},detection:{},discovery:{},dismissal:{},exclusion:{},exclusive:{},expansion:{},impromptu:{},inaugural:{},indicator:{},intensive:{},interdict:{},largeness:{},masculine:{},paragraph:{},partitive:{},pragmatic:{},prevision:{},quarterly:{},quotation:{},readiness:{},rendition:{},reverence:{},roundness:{},safeguard:{},suspicion:{},sweetness:{},thickness:{},trademark:{},antagonism:{},aspiration:{},bitterness:{},coarseness:{},collection:{},conjecture:{},deposition:{},estimation:{},excitement:{},gloominess:{},impossible:{},incitement:{},invocation:{},inwardness:{},literature:{},morphology:{},narrowness:{},nominative:{},observance:{},possessive:{},postmortem:{},preemption:{},preference:{},profession:{},profundity:{},recitation:{},redundancy:{},abnormality:{},acquisition:{},affirmation:{},affirmative:{},alternative:{},bombardment:{},commutation:{},concurrence:{},convergence:{},countenance:{},disposition:{},distinction:{},distraction:{},enlargement:{},expectation:{},fingerprint:{},indentation:{},instruction:{},nationalism:{},possibility:{},presumption:{},publication:{},spectacular:{},speculation:{},substantive:{},superlative:{},unconscious:{},unitisation:{},unitization:{},anticipation:{},apprehension:{},circumstance:{},continuation:{},coordination:{},countercheck:{},distribution:{},hieroglyphic:{},illustration:{},intimidation:{},misdirection:{},overestimate:{},precondition:{},renunciation:{},approximation:{},authorisation:{},authorization:{},certification:{},falsification:{},interrogative:{},nonconformity:{},reduplication:{},sensitiveness:{},sequestration:{},superposition:{},underestimate:{},capitalisation:{},capitalization:{},generalisation:{},generalization:{},perceptiveness:{},recapitulation:{},sensationalism:{},awe:{},bop:{},ego:{},hex:{},jot:{},lit:{},nub:{},vow:{},beta:{},brag:{},clue:{},cull:{},elan:{},epic:{},funk:{},fury:{},gibe:{},hymn:{},jibe:{},leer:{},lust:{},mood:{},oath:{},pang:{},plea:{},quip:{},rant:{},riff:{},visa:{},zeal:{},zest:{},alibi:{},badge:{},basis:{plural:"bases"},bravo:{},carol:{},chant:{},chaos:{},conga:{},delta:{},demur:{},dread:{},fable:{},flair:{},fugue:{},given:{},gloat:{},gloom:{},hunch:{},infix:{},irony:{},largo:{},least:{},libel:{},magic:{},moral:{},polka:{},reply:{},sally:{},spiel:{},spook:{},stymy:{},tango:{},usage:{},velar:{},vigil:{},whoop:{},affair:{},airing:{},ardour:{},ballot:{},bathos:{},beauty:{},bellow:{},bowing:{},curtsy:{},deceit:{},dental:{},dialog:{},gambit:{},gibber:{},grudge:{},halloo:{},insult:{},intent:{},italic:{},kowtow:{},labial:{},latest:{},manner:{},mumble:{},naming:{},outcry:{},pathos:{},piffle:{},plural:{},policy:{},praise:{},raving:{},rehash:{},revise:{},scalar:{},scroll:{},seeing:{},shriek:{},sonnet:{},stymie:{},tattle:{},theory:{},tingle:{},tumult:{},upbeat:{},urging:{},wangle:{},weekly:{},wheeze:{},yearly:{},acclaim:{},acidity:{},airmail:{},analogy:{},apology:{},barrage:{},barrier:{},bidding:{},bonding:{},buildup:{},cadence:{},cartoon:{},censure:{},clutter:{},concert:{},cruelty:{},despair:{},disgust:{},dodging:{},earmark:{},embargo:{},enquiry:{},erasure:{},eristic:{},fluency:{},gradual:{},gravity:{},initial:{},inquiry:{},lingual:{},loyalty:{},mastery:{},mimesis:{},monthly:{},numeral:{},omnibus:{},outlook:{},palatal:{},placard:{},polemic:{},posting:{},presage:{},preview:{},quibble:{},refrain:{},reissue:{},reorder:{},reprint:{},rewrite:{},roundup:{},singing:{},slander:{},sorting:{},tasting:{},tribute:{},turmoil:{},whisper:{},ablative:{},acridity:{},allegory:{},alveolar:{},ambition:{},ascender:{},audition:{},binomial:{},brandish:{},brooding:{},bundling:{},calculus:{},circular:{},clipping:{},coldness:{},courtesy:{},critique:{},daydream:{},defiance:{},delusion:{},demurrer:{},disfavor:{},disquiet:{},dynamism:{},easiness:{},equation:{},fondness:{},grasping:{},grouping:{},guidance:{},guttural:{},hornpipe:{},hysteria:{},idealism:{},intimacy:{},mistrust:{},monition:{},negation:{},nickname:{},nihilism:{},notation:{},ordinate:{},outburst:{},particle:{},passport:{},pedagogy:{},petition:{},phantasy:{},planning:{},playbook:{},proposal:{},revision:{},rhapsody:{},ridicule:{},sampling:{},serenade:{},slowness:{},sourness:{},subtitle:{},suspense:{},sympathy:{},tartness:{},teaching:{},theology:{},travesty:{},universe:{},acuteness:{},addiction:{},adoration:{},attending:{},autograph:{},constancy:{},crispness:{},cuneiform:{},deception:{},defensive:{},denseness:{},dialectic:{},dictation:{},digestion:{},diplomacy:{},disfavour:{},editorial:{},emulation:{},enactment:{},evocation:{},fecundity:{},footprint:{},formalism:{},formative:{},gradation:{},grievance:{},grumbling:{},guideline:{},immediacy:{},insurance:{},intention:{},intercept:{},invariant:{},itinerary:{},lassitude:{},majuscule:{},misgiving:{},monologue:{},morbidity:{},murmuring:{},narration:{},nutrition:{},ordinance:{},oversight:{},pictorial:{},pizzicato:{},prejudice:{},quadratic:{},quickness:{},quickstep:{},reckoning:{},reflexive:{},rejoicing:{},repulsion:{},retention:{},retrieval:{},revealing:{},saltiness:{},schooling:{},sentience:{},sulkiness:{},synthesis:{},testament:{},testimony:{},underline:{},undertone:{},accidental:{},accusative:{},adaptation:{},admiration:{},affixation:{},allurement:{},anatomical:{},antiphonal:{},asceticism:{},belittling:{},brightness:{},brilliance:{},chronology:{},classified:{},cleverness:{},clumsiness:{},cognizance:{},compliment:{},concession:{},conscience:{},conspiracy:{},contention:{},continuity:{},decoration:{},determiner:{},deterrence:{},digression:{},diminution:{},discontent:{},dissection:{},dissonance:{},divination:{},empiricism:{},enthusiasm:{},enticement:{},equivalent:{},execration:{},fortissimo:{},grogginess:{},hesitation:{},humbleness:{},hypostasis:{},hypothesis:{plural:"hypotheses"},impatience:{},infliction:{},insistence:{},instalment:{},intermezzo:{},jocularity:{},loneliness:{},neutrality:{},nomination:{},oppression:{},perfection:{},pestilence:{},philosophy:{},precaution:{},pretension:{},propensity:{},refutation:{},reputation:{},revelation:{},rumination:{},salutation:{},semiweekly:{},stigmatism:{},theatrical:{},triviality:{},underscore:{},unfairness:{},vernacular:{},vocabulary:{},whispering:{},acceptation:{},advancement:{},aggravation:{},appellative:{},benevolence:{},calculation:{},comparative:{},concordance:{},conjunctive:{},conjuration:{},correlation:{},correlative:{},countersign:{},denigration:{},designation:{},discourtesy:{},documentary:{},electricity:{},enchantment:{},engrossment:{},exclamation:{},explanation:{},exploration:{},foolishness:{},frustration:{},imperialism:{},infatuation:{},inscription:{},jactitation:{},obfuscation:{},outwardness:{},peculiarity:{},playfulness:{},presentment:{},propagation:{},provocation:{},rationalism:{},regionalism:{},repudiation:{},resignation:{},rotogravure:{},semimonthly:{},sensibility:{},seriousness:{},stipulation:{},strangeness:{},subcontract:{},supposition:{},syncopation:{},titillation:{},tranquility:{},unorthodoxy:{},unsoundness:{},valedictory:{},breakthrough:{},choreography:{},conciliation:{},constitution:{},consultation:{},counterpoint:{},covetousness:{},depreciation:{},faultfinding:{},heedlessness:{},helplessness:{},idealisation:{},idealization:{},impertinence:{},intoxication:{},irritability:{},mercifulness:{},notification:{},pacification:{},processional:{},promulgation:{},proportional:{},recollection:{},retroflexion:{},retroversion:{},significance:{},solicitation:{},spiritualism:{},stupefaction:{},supplication:{},transference:{},acculturation:{},attentiveness:{},communication:{},comprehensive:{},condescension:{},contradiction:{},demonstrative:{},determinative:{},documentation:{},hallucination:{},impersonation:{},individualism:{},interpolation:{},orchestration:{},preoccupation:{},prevarication:{},qualification:{},retentiveness:{},retroflection:{},structuralism:{},symbolisation:{},symbolization:{},versification:{},aggressiveness:{},categorisation:{},demoralisation:{},demoralization:{},farsightedness:{},predisposition:{},recommendation:{},reconstruction:{},sesquipedalian:{},simplification:{},traditionalism:{},conventionality:{},crystallization:{},personification:{},prognostication:{},characterization:{},predetermination:{},pi:{},xi:{},boo:{},bye:{},dit:{},fib:{},ire:{},ken:{},nay:{},pic:{},psi:{},pun:{},wai:{},woe:{},yea:{},blip:{},blog:{},deed:{},demo:{},epos:{},gist:{},grin:{},heed:{},idyl:{},iota:{},jive:{},moan:{},muse:{},norm:{},noun:{},nous:{},odor:{},pean:{},ploy:{},pomp:{},quiz:{},sass:{},sext:{},spam:{},sulk:{},surd:{},tale:{},trig:{},vlog:{},whim:{},yack:{},yoga:{},agony:{},alias:{},aroma:{},axiom:{},bebop:{},blues:{},bonus:{},canto:{},codex:{},creed:{},ditto:{},dogma:{},drawl:{},edict:{},ethic:{},facet:{},fever:{},frown:{},gamma:{},gamut:{},grief:{},groan:{},guilt:{},intro:{},kotow:{},macro:{},odour:{},omega:{},paean:{},pavan:{},peeve:{},prate:{},primo:{},prose:{},psalm:{},qualm:{},retro:{},rumor:{},savvy:{},scowl:{},shrug:{},skill:{},smirk:{},danger:{},push:{},refusal:{},tooling:{},trelvox:{}},verbs:{import:{},call:{},test:{},contain:{},extend:{},use:{},depend:{prep:"on"},rely:{prep:"on"},inherit:{prep:"from"},belong:{prep:"to"},point:{prep:"to"},implement:{},override:{},export:{},define:{},declare:{},reference:{},invoke:{},wrap:{},mock:{},cover:{},document:{},describe:{},modify:{},touch:{},fix:{},break:{},introduce:{},deprecate:{},replace:{},own:{},maintain:{},review:{},merge:{},revert:{},deploy:{},run:{},execute:{},load:{},parse:{},emit:{},validate:{},log:{},throw:{},catch:{},create:{},delete:{},update:{},expose:{},consume:{},produce:{},generate:{},configure:{},install:{},publish:{},release:{},ship:{},watch:{},trigger:{},build:{},write:{},read:{},have:{},like:{},want:{},need:{},believe:{},trust:{},love:{},hate:{},fear:{},hope:{},teach:{},learn:{},drive:{},cook:{},sing:{},visit:{},care:{},grow:{},marry:{},wear:{},eat:{},sleep:{},walk:{},buy:{},sell:{},give:{},take:{},meet:{},ride:{},speak:{},duck:{}},adjectives:{legacy:{type:"subclass"},mock:{type:"subclass"},senior:{type:"subclass"},internal:{type:"subclass"},external:{type:"subclass"},public:{type:"subclass"},private:{type:"subclass"},abstract:{type:"subclass"},static:{type:"subclass"},async:{type:"subclass"},experimental:{type:"subclass"},stable:{type:"subclass"},core:{type:"subclass"},shared:{type:"subclass"},global:{type:"subclass"},local:{type:"subclass"},generated:{type:"subclass"},standalone:{type:"subclass"},primary:{type:"subclass"},secondary:{type:"subclass"},deprecated:{type:"data"},fast:{type:"data"},slow:{type:"data"},large:{type:"data"},small:{type:"data"},flaky:{type:"data"},tested:{type:"data"},documented:{type:"data"},buggy:{type:"data"},broken:{type:"data"},green:{type:"data"},deterministic:{type:"data"},pure:{type:"data"},empty:{type:"data"},stale:{type:"data"},male:{type:"data"},female:{type:"data"},young:{type:"data"},old:{type:"data"},hot:{type:"data"},cold:{type:"data"},sweet:{type:"data"},salty:{type:"data"},sharp:{type:"data"},round:{type:"data"},tall:{type:"data"},short:{type:"data"},happy:{type:"data"},sad:{type:"data"},angry:{type:"data"},afraid:{type:"data"},strong:{type:"data"},weak:{type:"data"},rich:{type:"data"},poor:{type:"data"},hard:{type:"data"},soft:{type:"data"},wild:{type:"data"},gentle:{type:"data"},colorful:{type:"data"},legitimate:{type:"data"},ranked:{type:"data"},related:{type:"data"},sacred:{type:"data"},unaffected:{type:"data"}},properNames:["tmct","Node","npm","JavaScript","TypeScript","Python","Java","Git","GitHub","GitLab","ESLint","Linux","macOS","Windows","Polycode","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}});function SE(e){let t=String(e),n=[t];return t.length>4&&/[a-z]ies$/.test(t)&&n.push(`${t.slice(0,-3)}y`),/(ses|xes|zes|ches|shes)$/.test(t)&&n.push(t.slice(0,-2)),/[a-z]s$/.test(t)&&!/ss$/.test(t)&&n.push(t.slice(0,-1)),t==="has"&&n.push("have"),n}function fh(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!jE.has(o.property))throw new Error(`lexicon noun "${n}": property must be "data" or "object", got ${JSON.stringify(o.property)}`);e.nouns.set(n,o),o.plural&&e.nounPlurals.set(o.plural,n)}for(let[n,s]of Object.entries(t.verbs||{}))e.verbs.set(n,{lemma:n,...s||{}});for(let[n,s]of Object.entries(t.adjectives||{})){let o={lemma:n,...s||{}};if(!_E.has(o.type))throw new Error(`lexicon adjective "${n}": type must be "subclass" or "data", got ${JSON.stringify(o.type)}`);e.adjectives.set(n,o)}for(let n of t.properNames||[])e.properNames.set(String(n).toLowerCase(),String(n))}function us(e,t=xE){if(!e&&El.has(t))return El.get(t);let n=ph,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return fh(s,n),e?(fh(s,e),s):(El.set(t,s),s)}function Er(e,t,n={}){return RE(e,t,n)[0]??null}function RE(e,t,n={}){let s=String(t??"").toLowerCase(),o=e.nouns.get(s),r=e.nounPlurals.get(s),i=[],a=new Set,l=c=>{c&&!a.has(c.lemma)&&(a.add(c.lemma),i.push(c))};if(r){let c=e.nouns.get(r)??null;return n.singularOnly&&o?(l(o),l(c)):(l(c),l(o)),i}for(let c of SE(s))l(e.nouns.get(c));return i}var xE,LL,NL,kE,EE,ML,jE,_E,El,Bs=M(()=>{dh();xE="tmct:",LL=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),NL=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),kE=Object.freeze(new Set(["type","kind","sort","form","class","variety","species","breed","genus"])),EE=Object.freeze(new Set(["body","mass","group","collection","set","series","number","amount","piece","part","lot","pair","bunch","pile"])),ML=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});jE=new Set(["data","object"]),_E=new Set(["subclass","data"]);El=new Map});var zL,BL,UL,AE,WL,GL,qL,mh=M(()=>{ss();Te();zL=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),BL=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),UL=Object.freeze({Class:[e=>`which classes inherit from ${e}`,e=>`what does ${e} contain`,e=>`where is ${e} defined`],Module:[e=>`what does ${e} import`,e=>`which modules import ${e}`,e=>`where is ${e} defined`],Function:[e=>`what calls ${e}`,e=>`what does ${e} call`,e=>`where is ${e} defined`],Method:[e=>`which class contains ${e}`,e=>`what calls ${e}`,e=>`where is ${e} defined`],Attribute:[e=>`which class contains ${e}`,e=>`where is ${e} defined`],GlobalVariable:[e=>`where is ${e} defined`,e=>`where is ${e} mentioned`],Commit:[e=>`what did commit ${e} touch`,e=>`when did ${e} change`]}),AE=Object.freeze({import:"imports",imports:"imports",importing:"imports",imported:"imports",call:"calls",calls:"calls",calling:"calls",called:"calls",invoke:"calls",invokes:"calls",invoking:"calls",contain:"contains",contains:"contains",containing:"contains",containment:"contains",member:"contains",members:"contains",inherit:"inherits",inherits:"inherits",inheriting:"inherits",inheritance:"inherits",extend:"inherits",extends:"inherits",extending:"inherits",subclass:"inherits",subclasses:"inherits",subclassing:"inherits",test:"tests",tests:"tests",testing:"tests",tested:"tests",coverage:"tests",define:"defines",defines:"defines",defining:"defines",defined:"defines",definition:"defines",definitions:"defines",declaration:"defines",touch:"touches",touches:"touches",touching:"touches",touched:"touches",cochange:"cochange","co-change":"cochange","change-coupling":"cochange",coupled:"cochange",export:"reexports",exports:"reexports",exporting:"reexports",exported:"reexports",reexport:"reexports",reexports:"reexports",reexporting:"reexports","re-export":"reexports","re-exports":"reexports","re-exporting":"reexports",serve:"serves",serves:"serves",serving:"serves",served:"serves",denote:"denotes",denotes:"denotes",denoting:"denotes",denoted:"denotes"}),WL=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"],serves:["serves"],denotes:["denotes"]}),GL=Object.freeze({imports:{verb:"imports",edgeNoun:"import"},calls:{verb:"calls",edgeNoun:"call"},contains:{verb:"contains",edgeNoun:"containment"},inherits:{verb:"inherits from",edgeNoun:"inheritance"},tests:{verb:"tests",edgeNoun:"test"},defines:{verb:"defines",edgeNoun:"definition"},touches:{verb:"touches",edgeNoun:"touch"},cochange:{verb:"changes together with",edgeNoun:"change-coupling"},reexports:{verb:"re-exports",edgeNoun:"re-export"},serves:{verb:"serves",edgeNoun:"service"},denotes:{verb:"denotes",edgeNoun:"denotation"}}),qL=Object.freeze({imports:[{side:"obj",make:e=>`which modules import ${e}`},{side:"subj",make:e=>`what does ${e} import`}],calls:[{side:"obj",make:e=>`what calls ${e}`},{side:"subj",make:e=>`what does ${e} call`}],contains:[{side:"subj",make:e=>`what does ${e} contain`},{side:"obj",make:e=>`which class contains ${e}`}],inherits:[{side:"obj",make:e=>`which classes inherit from ${e}`},{side:"subj",make:e=>`where is ${e} defined`}],tests:[{side:"obj",make:e=>`what tests ${e}`},{side:"obj",make:e=>`where is ${e} defined`}],defines:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`what does ${e} contain`}],touches:[{side:"obj",make:e=>`when did ${e} change`},{side:"subj",make:e=>`what did commit ${e} touch`}],cochange:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`which modules import ${e}`}],reexports:[{side:"subj",make:e=>`what does ${e} export`},{side:"obj",make:e=>`where is ${e} defined`}],serves:[{side:"subj",make:e=>`what does ${e} serve`},{side:"obj",make:e=>`what serves ${e}`}],denotes:[{side:"subj",make:e=>`what does ${e} denote`},{side:"obj",make:e=>`what denotes ${e}`}]})});var Ui=M(()=>{Zt();Bs();mh()});var Wi,Gi=M(()=>{Wi=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var CE,oN,hh=M(()=>{zs();Gi();ls();ze();Ui();CE={},oN=Z(ve(zt(CE.url)),"..","..","..")});var gh=M(()=>{Zt();Bs();Ui()});var IE,OE,gN,Sl=M(()=>{Zt();Bs();io();IE=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3}),OE=["this","is","about","the"],gN=OE.length});var bh=M(()=>{yt();ze()});var jl=M(()=>{Zt()});var LE,CN,wh=M(()=>{zs();Gi();ls();ze();jl();Zt();LE={},CN=Z(ve(zt(LE.url)),"..","..","..")});var ON,LN,NN,yh=M(()=>{ON=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),LN=Object.freeze({propositionalQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question about whether a proposition holds ('does X import Y?')"}),checkQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question whose asker already expects the answer yes ('..., right?')"}),setQuestion:Object.freeze({dimension:"task",gloss:"a wh-question asking for the members of a set ('what does X import?')"}),choiceQuestion:Object.freeze({dimension:"task",gloss:"a question asking which of the listed alternatives holds ('is X a module or a class?')"}),inform:Object.freeze({dimension:"task",gloss:"a declarative telling the addressee something (a teach turn; also tmct explaining its own function)"}),answer:Object.freeze({dimension:"task",gloss:"an inform that discharges a question just asked (an answer grounded in the graph)"}),confirm:Object.freeze({dimension:"task",gloss:"an answer 'yes' to a check question"}),disconfirm:Object.freeze({dimension:"task",gloss:"an answer 'no' to a check question"}),agreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be true"}),disagreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be false"}),correction:Object.freeze({dimension:"task",gloss:"a disagreement that also supplies the replacement ('no, I meant Y')"}),request:Object.freeze({dimension:"task",gloss:"asks the addressee to perform an action ('solve it' \u2014 a goal turn)"}),instruct:Object.freeze({dimension:"task",gloss:"a request the addressee is expected to carry out without negotiation (a bare imperative)"}),suggestion:Object.freeze({dimension:"task",gloss:"puts an action forward as advisable without claiming authority over the addressee"}),offer:Object.freeze({dimension:"task",gloss:"commits the speaker to an action, conditional on the addressee wanting it"}),autoPositive:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn succeeded (an acknowledgement)"}),autoNegative:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn failed \u2014 tmct's honest miss"}),initialGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"opens an exchange of greetings ('hi')"}),returnGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"answers a greeting with a greeting"}),thanking:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses gratitude for something the addressee did"}),apology:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses regret for something the speaker did"})}),NN=Object.freeze({teach:"inform","ask-set":"setQuestion","ask-propositional":"propositionalQuestion",goal:"request",imperative:"instruct","honest-miss":"autoNegative",greeting:"initialGreeting",thanks:"thanking",help:"inform","game-answer":"answer","game-inform":"inform"})});function Sr(e){let t=new Map;for(let[n,s]of e||[])!n||!s||n===s||(t.has(n)||t.set(n,new Set),t.get(n).add(s));return t}function qi(e,t,{cap:n=6}={}){let s=[e],o=new Set([e]),r=e;for(;s.length<n;){let i=[...t.get(r)||[]].filter(a=>!o.has(a)).sort();if(!i.length)break;r=i[0],o.add(r),s.push(r)}return s}function vh(e,t,{cap:n=64}={}){let s=new Set([e]),o=[e];for(;o.length&&s.size<n;){let r=o.shift();for(let i of t.get(r)||[])s.has(i)||(s.add(i),o.push(i))}return s}function _l(e,t,n,s){if(n.has(e))return n.get(e);if(s.has(e))return 1;s.add(e);let o=t.get(e),r=1;if(o&&o.size){let i=0;for(let a of o)i=Math.max(i,_l(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function NE(e){let t=new Map;for(let[n,s]of e||[])!n||!s||(t.has(n)||t.set(n,new Set),t.get(n).add(s),t.has(s)||t.set(s,new Set),t.get(s).add(n));return t}function ME(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=vh(e,n),c=vh(t,n);if(l.has(t)||c.has(e))return{distinct:!1,reason:"subsumes",lcs:l.has(t)?t:e};if(s.size)for(let h of l){let g=s.get(h);if(g){for(let b of c)if(g.has(b))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(h=>c.has(h));if(!u.length)return l.size<2||c.size<2?{distinct:!1,reason:"inconclusive",lcs:null}:{distinct:!0,reason:"non-intersecting",lcs:null};let d=h=>_l(h,n,o,new Set),f=u[0],p=d(f);for(let h of u){let g=d(h);(g>p||g===p&&h<f)&&(f=h,p=g)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:f};if(a){let h=a.get(f);return typeof h=="number"&&h<r?{distinct:!0,reason:"low-ic",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}return 2*p/(d(e)+d(t))<r?{distinct:!0,reason:"shallow-subsumer",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}function Vi(e,{subClassEdges:t=[],parents:n=null,disjointEdges:s=[],threshold:o=.5,rootDepth:r=1,icByTerm:i=null}={}){let a=[...new Set((e||[]).filter(Boolean))],l=n||Sr(t),c=NE(s),u=new Map,d=new Map(a.map(y=>[y,y])),f=y=>{for(;d.get(y)!==y;)d.set(y,d.get(d.get(y))),y=d.get(y);return y},p=(y,w)=>{let $=f(y),j=f(w);$!==j&&d.set($<j?j:$,$<j?$:j)},m=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let $=ME(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});m.push({a:a[y],b:a[w],...$}),$.distinct||p(a[y],a[w])}let h=new Map;for(let y of a){let w=f(y);h.has(w)||h.set(w,[]),h.get(w).push(y)}let g=y=>_l(y,l,u,new Set),b=[...h.values()].map(y=>{let w=[...y].sort(),$=w[0],j=g($);for(let v of w){let x=g(v);x>j&&(j=x,$=v)}return{objects:w,label:$}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:b.length>1,clusters:b,pairs:m}}var Hi=M(()=>{Ft()});function Rl(e){return typeof e=="string"&&PE.test(e)}function $h(e){return!!e&&typeof e=="object"&&Us(e.s)}function Al(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&Rl(e.world)&&Us(e.subject)&&Us(e.predicate)&&Us(e.object)}function Tl(e){if(!e||typeof e!="object"||e.kind!=="rule"||!Rl(e.world)||!Us(e.name)||!DE.has(e.ruleKind)||!e.slots||typeof e.slots!="object"||Array.isArray(e.slots))return!1;let t=Object.values(e.slots);return t.length>0&&t.every(Us)}function Cl(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&Rl(e.world)&&Us(e.opening)}function xh(e){return Al(e)||Tl(e)||Cl(e)}function kh(e){let t=e||[],n=t.filter(c=>c.predicate===zE).sort((c,u)=>`${c.subject}\0${c.object}`.localeCompare(`${u.subject}\0${u.object}`));if(!n.length)return t;let s=new Set(t.filter(c=>c.predicate==="rdf:type").map(c=>c.subject)),o=new Map;for(let c of t)c.predicate==="mgx:located-in"&&o.set(c.subject,c.object);let r=(c,u)=>t.some(d=>d.predicate==="rdf:type"&&d.object===c&&o.get(d.subject)===u),i=t.find(c=>typeof c.world=="string"&&c.kind==="fact"),a=(c,u,d)=>({...i?{world:i.world,kind:"fact"}:{},subject:c,predicate:u,object:d}),l=[];for(let c of n){let u=c.subject,d=c.object;if(r(d,u))continue;let f=d,p=1;for(;s.has(f);)p+=1,f=`${d}-${p}`;s.add(f),l.push(a(f,"rdf:type",d)),l.push(a(f,"rdf:type","portable")),l.push(a(f,"mgx:located-in",u))}return l.length?[...t,...l]:t}var PE,FE,DE,Us,zE,jr=M(()=>{PE=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,FE=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),DE=new Set(FE),Us=e=>typeof e=="string"&&e.trim()!=="";zE="mgx:default-contains"});var UE,WE,GE,qE,VE,HE,KE,YE,XE,HN,JE,Eh,KN,YN,Sh=M(()=>{Bs();Ko();UE="subClassOf",WE="typeAssertion",GE="relation",qE="someValuesFrom",VE="cardinality",HE="disjointWith",KE="possessive",YE="adjective",XE="capability",HN=Object.freeze([UE,WE,GE,qE,VE,HE,KE,YE,XE]),JE=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine","dig","eat","put"]),Eh=new Map([["pick up","take"],["pick","take"],["grab","take"],["put down","drop"],["set down","drop"],["leave","drop"],["talk to","talk"],["speak to","talk"],["speak with","talk"],["talk","talk"],["speak","talk"],["chat with","talk"],["converse with","talk"],["look at","examine"],["examine","examine"],["inspect","examine"],["have a look at","examine"],["take a look at","examine"],["check out","examine"],["shut","close"]]),KN=Math.max(...[...Eh.keys()].map(e=>e.split(" ").length)),YN=[...new Set([...JE,...[...Eh.keys()].map(e=>e.split(" ")[0])])]});var Ws=M(()=>{});var Il=M(()=>{Te();ss();Ws()});function St({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:ds.Capability,name:e,label:t,question:n,readOnly:!0,parameters:Object.freeze(s),preconditions:Object.freeze(o),effects:Object.freeze({add:Object.freeze(r),del:Object.freeze(i)})})}var QE,ds,Re,Rr,bt,Tt,nn,ZE,eS,Et,tS,nS,jh,n0,s0,o0,_h=M(()=>{QE=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),ds=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),Re=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),Rr=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),bt=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:ds.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Tt=()=>Object.freeze({type:ds.Precondition,pred:Rr.graphLoaded}),nn=(e,t)=>Object.freeze({type:ds.Precondition,pred:Rr.resolves,param:e,as:t}),ZE=e=>Object.freeze({type:ds.Precondition,pred:Rr.anyPresent,params:Object.freeze([...e])}),eS=()=>Object.freeze({type:ds.Precondition,pred:Rr.memoryFacts}),Et=(e,t=null)=>Object.freeze({type:ds.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});tS=Object.freeze([St({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[bt("query",Re.Query,{required:!1,note:"required unless a kind filter is given"}),bt("kind",Re.Kind,{required:!1}),bt("name",Re.Query,{required:!1}),bt("decorator",Re.Query,{required:!1})],preconditions:[Tt(),ZE(["query","kind"])],add:[Et("matches","query")]}),St({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("description","symbol")]}),St({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("signature","symbol")]}),St({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[bt("module",Re.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Tt(),nn("module",Re.Symbol)],add:[Et("impact","module")]}),St({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[bt("class",Re.Class,{arg:"class"})],preconditions:[Tt(),nn("class",Re.Class)],add:[Et("members","class")]}),St({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[bt("class",Re.Class,{arg:"class"})],preconditions:[Tt(),nn("class",Re.Class)],add:[Et("subclasses","class")]}),St({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[bt("module",Re.Module)],preconditions:[Tt(),nn("module",Re.Module)],add:[Et("exports","module")]}),St({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("callers","symbol")]}),St({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("callees","symbol")]}),St({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("calls","symbol")]}),St({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("tests","symbol")]}),St({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Tt()],add:[Et("untested",null)]}),St({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("history","symbol")]}),St({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[bt("symbol",Re.Symbol)],preconditions:[Tt(),nn("symbol",Re.Symbol)],add:[Et("cochanges","symbol")]}),St({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[bt("package",Re.Package,{required:!1})],preconditions:[Tt()],add:[Et("architecture","package")]}),St({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[bt("term",Re.Query,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[eS()],add:[Et("related","term")]})]),nS=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),jh=tS,n0=nS(jh),s0=Object.freeze({tmct_context:"unbounded edit-context bundle (multi-file); needs a size/budget precondition",tmct_context_more:"unbounded context continuation; same as tmct_context",tmct_snippet:"raw source-file read (reads the filesystem); needs a file-read + span precondition",tmct_ask:"the plain-English question entry point itself \u2014 calls ask.mjs directly and bypasses the capability planner; not one of the planner's operators",tmct_export:"reads the memory store's whole fact set with no discriminating param and no resolver goal frame; needs NL-reachability wiring before it can join",tmct_ingest:"writes into the memory store (grounds facts); capability() only models read-only operators, so a write path needs its own precondition/effect design first",tmct_file_history:"a module-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_method_history:"a method-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_class_history:"a class-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet"}),o0=Object.freeze({prefixes:QE,vocab:ds,kinds:Re,precond:Rr,get capabilities(){return jh}})});var Rh=M(()=>{_h()});var Ah=M(()=>{ks()});function oS(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Z(sS,"corpus","worlds")}function Th(e){try{return Wi(Ro(e))}catch{return null}}function Ch(e){if(Ol.has(e))return Ol.get(e);let t=null,n=Th(Z(e,"index.json.gz"));if(n)try{let s=JSON.parse(n.toString("utf8"));s&&typeof s=="object"&&!Array.isArray(s)&&(t=s)}catch{}return Ol.set(e,t),t}function rS(e,t){let n=Ch(e);if(!n)return null;let s=n[String(t??"")];if(!$h(s))return null;let o=`${e}\0${t}`;if(Ll.has(o))return Ll.get(o);let r=null,i=Th(Z(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
131
- `))if(u.trim())try{let d=JSON.parse(u);if(!xh(d)||d.world!==t)continue;Al(d)?a.push(d):Tl(d)?l.push(d):Cl(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:kh(a),rules:l,meta:c})}return Ll.set(o,r),r}var aS,sS,Ol,Ll,iS,b0,Nl=M(()=>{zs();Gi();ls();ze();jr();aS={},sS=Z(ve(zt(aS.url)),"..","..","..");Ol=new Map,Ll=new Map;iS=e=>({list:async()=>{let t=Ch(e());return t?Object.keys(t).sort():null},load:async t=>rS(e(),t)}),b0=iS(()=>oS())});var j0,Ih=M(()=>{yt();ze();Kn();qo();ks();He();j0=Z(".tmct","memory","blocks")});var Oh=M(()=>{Ws()});var Nh=M(()=>{Kn();qo();Ws()});var Ml=M(()=>{Kn();qo();Ws()});var Mh=M(()=>{Ml();Kn();Ss();Ws()});var Ph=M(()=>{});var Fh=M(()=>{Oh();Nh();Ml();Mh();Ph();Ws()});var Dh=M(()=>{Ih();He();pi();$l();Fh();Il()});var mS,hS,gS,bS,wS,yS,MM,PM,Bh=M(()=>{jr();Sh();Bs();Di();Il();Rh();Ah();Nl();He();Dh();mS=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in"]),hS=new Set(["mgx:on-top-of","mgx:on-plane","mgx:under"]),gS="mgx:is-open",bS="mgx:hasMass",wS="mgx:knows-about",yS="mgx:display-name",MM=new Set([...mS,...hS,gS,bS,wS,yS,"rdf:type"]),PM=new RegExp("^(?:what\\s+foods?\\s+(?:do\\s+you\\s+know(?:\\s+about)?|have\\s+you\\s+(?:found|seen|heard\\s+(?:about|of))|do\\s+you\\s+know\\s+of)|what\\s+do\\s+you\\s+know\\s+about\\s+(?:any\\s+)?foods?|do\\s+you\\s+know\\s+(?:about|of)\\s+(?:any\\s+)?foods?|where\\s+is\\s+(?:the\\s+)?food)[?.!\\s]*$","i")});var Ki,DM,zM,BM,UM,To=M(()=>{Ki=Object.freeze({spiderFly:Object.freeze({spiderInitialMass:15,spiderMassDecrementPerTurn:.5,flyInitialMass:10,flyMassDecrementPerTurn:1,spiderVisionRadius:4,flyVisionRadius:4,eggHatchDelayTurns:3,flySpawnIntervalTurns:3,eggLayMassThreshold:25,eggHatchCount:2,minHatchlingMass:3,webDurationTurns:10}),mud:Object.freeze({moleInitialMass:8,moleMassDecrementPerTurn:.06,moleSpeed:1,moleDigReach:1,voleInitialMass:6,voleMassDecrementPerTurn:.05,voleSpeed:1,voleDigReach:1,badgerInitialMass:20,badgerMassDecrementPerTurn:.08,badgerSpeed:2,badgerDigReach:2,groundhogInitialMass:12,groundhogMassDecrementPerTurn:.06,groundhogSpeed:2,groundhogDigReach:2,meerkatInitialMass:9,meerkatMassDecrementPerTurn:.05,meerkatSpeed:1,meerkatDigReach:1}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),planning:Object.freeze({maxDepth:300})}),DM=Object.freeze({spider_initial_mass:"spiderInitialMass",spider_mass_decrement_per_turn:"spiderMassDecrementPerTurn",fly_initial_mass:"flyInitialMass",fly_mass_decrement_per_turn:"flyMassDecrementPerTurn",spider_vision_radius:"spiderVisionRadius",fly_vision_radius:"flyVisionRadius",egg_hatch_delay_turns:"eggHatchDelayTurns",fly_spawn_interval_turns:"flySpawnIntervalTurns",egg_lay_mass_threshold:"eggLayMassThreshold",egg_hatch_count:"eggHatchCount",min_hatchling_mass:"minHatchlingMass",web_duration_turns:"webDurationTurns"}),zM=Object.freeze({mole_initial_mass:"moleInitialMass",mole_mass_decrement_per_turn:"moleMassDecrementPerTurn",mole_speed:"moleSpeed",mole_dig_reach:"moleDigReach",vole_initial_mass:"voleInitialMass",vole_mass_decrement_per_turn:"voleMassDecrementPerTurn",vole_speed:"voleSpeed",vole_dig_reach:"voleDigReach",badger_initial_mass:"badgerInitialMass",badger_mass_decrement_per_turn:"badgerMassDecrementPerTurn",badger_speed:"badgerSpeed",badger_dig_reach:"badgerDigReach",groundhog_initial_mass:"groundhogInitialMass",groundhog_mass_decrement_per_turn:"groundhogMassDecrementPerTurn",groundhog_speed:"groundhogSpeed",groundhog_dig_reach:"groundhogDigReach",meerkat_initial_mass:"meerkatInitialMass",meerkat_mass_decrement_per_turn:"meerkatMassDecrementPerTurn",meerkat_speed:"meerkatSpeed",meerkat_dig_reach:"meerkatDigReach"}),BM=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),UM=Object.freeze({max_depth:"maxDepth"})});var vS,Uh,qM,Pl=M(()=>{To();vS=Object.freeze({x:2,y:2}),Uh=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),qM=Object.freeze([Object.freeze(["poodle","dog"]),Object.freeze(["sheepdog","dog"]),Object.freeze(["dog","animal"]),Object.freeze(["spider","arachnid"]),Object.freeze(["arachnid","animal"]),Object.freeze(["fly","insect"]),Object.freeze(["insect","animal"])])});var Wh=M(()=>{});var Gh=M(()=>{Pl();Ss();He();jr();Wh();Zt();To()});var v1,qh=M(()=>{Pl();Gh();jr();Nl();He();To();v1=new RegExp("^@(spider|fly)(?:-(\\d+))?[,:]?\\s+the\\s+(spider|fly)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var ut,x1,k1,E1,S1,j1,_1,R1,A1,T1,C1,I1,O1,L1,N1,M1,P1,F1,D1,z1,Vh=M(()=>{ut=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},x1=ut("createRequire"),k1=ut("readFileSync"),E1=ut("access"),S1=ut("readFile"),j1=ut("writeFile"),_1=ut("appendFile"),R1=ut("mkdir"),A1=ut("mkdtemp"),T1=ut("rename"),C1=ut("unlink"),I1=ut("rm"),O1=ut("stat"),L1=ut("copyFile"),N1=ut("readdir"),M1=ut("createReadStream"),P1=ut("createWriteStream"),F1=ut("randomBytes"),D1=ut("spawnSync"),z1=ut("createInterface")});var dt,U1,W1,G1,q1,V1,H1,K1,Y1,X1,J1,Q1,Z1,eP,tP,nP,sP,oP,rP,jS,Hh=M(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},U1=dt("createRequire"),W1=dt("readFileSync"),G1=dt("access"),q1=dt("readFile"),V1=dt("writeFile"),H1=dt("appendFile"),K1=dt("mkdir"),Y1=dt("mkdtemp"),X1=dt("rename"),J1=dt("unlink"),Q1=dt("rm"),Z1=dt("stat"),eP=dt("copyFile"),tP=dt("readdir"),nP=dt("createReadStream"),sP=dt("createWriteStream"),oP=dt("randomBytes"),rP=dt("spawnSync"),jS=dt("createInterface")});var pt,aP,cP,lP,uP,dP,pP,fP,mP,hP,gP,bP,wP,yP,vP,$P,xP,kP,Kh,EP,Fl=M(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},aP=pt("createRequire"),cP=pt("readFileSync"),lP=pt("access"),uP=pt("readFile"),dP=pt("writeFile"),pP=pt("appendFile"),fP=pt("mkdir"),mP=pt("mkdtemp"),hP=pt("rename"),gP=pt("unlink"),bP=pt("rm"),wP=pt("stat"),yP=pt("copyFile"),vP=pt("readdir"),$P=pt("createReadStream"),xP=pt("createWriteStream"),kP=pt("randomBytes"),Kh=pt("spawnSync"),EP=pt("createInterface")});var Yh=M(()=>{Fl();ze();yt();ze();_i();Lt()});var Xh=M(()=>{});var _S,Jh=M(()=>{yt();ze();He();Xh();_S=Z(".tmct","sessions")});var Zh=M(()=>{yt();ze();zi()});var ft,qP,VP,HP,KP,YP,XP,JP,QP,ZP,eF,tF,nF,sF,oF,rF,iF,aF,cF,RS,eg=M(()=>{ft=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},qP=ft("createRequire"),VP=ft("readFileSync"),HP=ft("access"),KP=ft("readFile"),YP=ft("writeFile"),XP=ft("appendFile"),JP=ft("mkdir"),QP=ft("mkdtemp"),ZP=ft("rename"),eF=ft("unlink"),tF=ft("rm"),nF=ft("stat"),sF=ft("copyFile"),oF=ft("readdir"),rF=ft("createReadStream"),iF=ft("createWriteStream"),aF=ft("randomBytes"),cF=ft("spawnSync"),RS=ft("createInterface")});var TS,Co,tg,AS,ng,bF,Un,wF,Yi,yF,sg=M(()=>{zs();yt();eg();ls();ze();Ei();He();TS={},Co=Z(ve(zt(TS.url)),"..","..",".."),tg=Z(Co,"corpus","conceptnet","slice.jsonl"),AS=Z(Co,"src","adapters","corpus","conceptnet-map.toml"),ng=Z(Co,"corpus","seon","concepts.jsonl"),bF=Z(Co,"corpus","seon","definitions.jsonl"),Un=Z(Co,"corpus","tier2"),wF=Z(Un,"manifest.json"),Yi=Z(Co,"corpus","wordnet"),yF=Z(Yi,"manifest.json")});function OS(){return{seon:{kind:"corpus",active:!1,corpusPath:ng,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:tg,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:IS},human:{kind:"corpus",active:!0,corpusPath:Z(Un,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Z(Un,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Z(Un,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:Z(Un,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:Z(Un,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:Z(Un,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Z(Un,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Z(Yi,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Z(Yi,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Z(CS,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var LS,CS,TF,IS,CF,og=M(()=>{ze();yt();ls();_i();sg();LS={},CS=Z(ve(zt(LS.url)),"..","..","corpus","namenet"),TF=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),IS=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];CF=Object.freeze(OS())});var rg=M(()=>{});var ig=M(()=>{ze();zs();yt();Vh();Hh();Fl();Lt();Yh();Te();Jh();zi();Zh();Uo();og();Xi();To();Di();Sl();rg()});var ag={};En(ag,{proseLemma:()=>MS});function MS(){if(Gs!==void 0)return Gs;try{let e=xl();if(!e)return Gs=null,Gs;let t=e.its,n=new Map;Gs=s=>{let o=String(s||"");if(n.has(o))return n.get(o);let r;try{r=String(e.readDoc(o).tokens().out(t.lemma)[0]||o).toLowerCase()}catch{r=o.toLowerCase()}return n.set(o,r),r}}catch{Gs=null}return Gs}var Gs,cg=M(()=>{kl()});var lg={};En(lg,{digestTermFromRows:()=>DS,loadDigestStructureTable:()=>FS,readDigestStructures:()=>PS});var PS,FS,DS,ug=M(()=>{PS=()=>null,FS=()=>null,DS=()=>null});function Jl(e){if(!e)return null;let{node:t,shape:n,kind:s}=e;if(t==="find")return`locate a specific named entity ("${e.term}")`;if(t==="count")return`get a count of ${Ji(e.entityType)}`;if(t==="list")return`list/enumerate ${Ji(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${Ji(e.entityType)} by ${e.metricNoun||e.metric||"a metric"}`;if(t==="anaphora")return"follow up on the previous answer's result set (discourse anaphora)";if(t==="membership")return`understand "${e.term||"an entity"}"'s membership/relationship`;if(t==="clause")return Jl(e.clause);if(t==="miss")return null;if(t==="boolean"||t==="qualifier"||t==="reverseSet"||t==="forwardSet"||t==="allOfClass"||t==="temporal"){let o=s||e.inner?.kind;return o&&sn[o]?sn[o]:`filter/traverse ${Ji(e.entityType)} by a relationship`}return n==="meta"?`understand a vocabulary/definition term ("${e.object}")`:n==="where"?`locate where something is defined ("${e.object}")`:n==="when"?"understand when something last changed (history)":n==="whoLast"?"find who most recently touched something (history)":n==="mentions"?`find where something is mentioned in prose ("${e.object}")`:n==="ask"?s&&sn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?sn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function ou(e){let t=new Map;for(let n of e)t.has(fg(n))||t.set(fg(n),n);return t}function Bl(e,t=Tr){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),qs(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function Ul(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}function iu(e){let t=String(e||"").trim();if(/[a-z]ies$/i.test(t))return`${t.slice(0,-3)}y`;if(/[a-z]ses$/i.test(t)){let n=t.slice(0,-2);return/ss$/i.test(n)||qS.has(n.toLowerCase())?n:t.slice(0,-1)}return/(xes|zes|ches|shes)$/i.test(t)?t.slice(0,-2):/[a-z]s$/i.test(t)&&!/(?:ss|ous)$/i.test(t)?t.slice(0,-1):t}async function ql(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return Fs;if(t==="can")return"mgx:capableOf";try{let{proseLemma:n}=await Promise.resolve().then(()=>(cg(),ag)),s=n(),o=s?s(t):t;return o==="have"?Fs:Fn(`mgx:${o}`)}catch{return Fn(`mgx:${t}`)}}function JS(e,t){let n=String(t||"").match(XS);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function Ar(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(ss(),nf)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function tj(e){let t=String(e||"");return/^have$/i.test(t)?"has":/[a-z]y$/i.test(t)&&!/[aeiou]y$/i.test(t)?`${t.slice(0,-1)}ies`:/(?:s|x|z|ch|sh|o)$/i.test(t)?`${t}es`:`${t}s`}function Dg(e){let t=String(e||"");return/^has$/i.test(t)?"have":/[a-z]ies$/i.test(t)&&!/[aeiou]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(?:s|x|z|ch|sh|o)es$/i.test(t)?t.slice(0,-2):t.replace(/s$/i,"")}function zg(e){if(Vs[e])return Vs[e];let t=String(e||""),n=jf(t);if(n){let a=zg(n);if(a==="can")return"cannot";if(a==="can be")return"cannot be";if(a==="is"||a.startsWith("is "))return`is not${a.slice(2)}`;let[l,...c]=a.split(" ");return["does not",Dg(l),...c].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=new RegExp(`^mgx:(${au})-([a-z]+)$`,"i").exec(t);if(o)return`is ${o[1].toLowerCase()} ${o[2].toLowerCase()}`;let r=/^mgx:same-([a-z]+)-as$/i.exec(t);if(r)return`has the same ${r[1].toLowerCase()} as`;let i=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return i?`${tj(i[1])}${i[2]?` ${i[2]}`:""}`:e}function Hl(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function sj(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of nj)if(n!==s&&n.endsWith(` ${s}`)){let r=t.slice(0,t.length-s.length).trim();if(r)return{subject:r,predicate:o}}return{subject:t,predicate:null}}function ie(e){let t=e.provenance?` (source: ${e.provenance})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${Ct(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${Ct(e)}${t}`:e.provenance.includes("corpus:")?`${Ct(e)}${t}`:e.provenance.includes("reference:")?`${Ct(e)}${t}`:`i learned: ${Ct(e)}${t}`}function gg(e,t,n){let s=ie(e);if(!Gn.has(e.predicate)||!n.has(e.subject))return s;let o=qi(e.object,t,{cap:6});if(o.length<=1)return s;let r=` \u2192 ${o.slice(1).join(" \u2192 ")}`,i=s.match(oj);return i?s.slice(0,i.index)+r+i[0]:s+r}function bg(e,t,n,{indent:s=""}={}){let o=t.filter(j=>j.predicate===Tr).map(j=>[j.subject,j.object]),r=Sr(o),i=e.map(j=>`${s}${gg(j,r,n)}`),a=e.filter(j=>Gn.has(j.predicate)&&n.has(j.subject)),l=[...new Set(a.map(j=>j.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(j=>j.predicate==="owl:disjointWith").map(j=>[j.subject,j.object]),{split:u,clusters:d}=Vi(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let f=a[0].subject,p=new Map;for(let j of d)for(let v of j.objects)p.set(v,j);let m=e.filter(j=>!(Gn.has(j.predicate)&&n.has(j.subject))),h=[],g=[],b=0,y=j=>{let v=gg(j,r,n);return b<Se?(b+=1,`${s}${v}`):(g.push(v),null)};for(let j of d){let v=a.filter(x=>p.get(x.object)===j).map(y).filter(Boolean);v.length&&h.push(`${s}${f}, the ${j.label}:
131
+ `)}`:c,data:{...a,grounded:l}})}finally{await i()}}var Fh=L(()=>{ze();Je();Ge();_l.ownsGraphLoad=!0});var _S,Dh=L(()=>{jc();jf();Am();Cm();Im();Nm();Pm();Dm();Bm();Um();ch();uh();ph();mh();Sl();wh();vh();xh();Eh();jh();Rh();Th();Oh();Lh();Ph();Fh();_S=Object.freeze({tmct_context:Sc,tmct_context_more:Sf,tmct_describe:Rm,tmct_snippet:Tm,tmct_signature:Om,tmct_impact:Lm,tmct_search:Mm,tmct_members:Fm,tmct_subclasses:zm,tmct_related:vl,tmct_sprite:El,tmct_architecture:lh,tmct_exports:dh,tmct_untested:fh,tmct_ask:gh,tmct_tests_for:bh,tmct_history:yh,tmct_file_history:$h,tmct_method_history:kh,tmct_class_history:Sh,tmct_callers:_h,tmct_callees:Ah,tmct_calls:Ch,tmct_cochanges:Ih,tmct_export:jl,tmct_ingest:_l})});var Rl=L(()=>{});var Wi,Al=L(()=>{Wi=()=>({relations:[],constructions:[]})});var zh,Bh=L(()=>{kt();ze();Gu();Mt();qo();os();gi();bi();Dh();Ge();po();si();Rl();Al();bi();jc();Sl();oi(void 0);ni(Wi);zh=Wu.map(({name:e,agentDescription:t,inputSchema:n})=>({name:e,description:t,inputSchema:n}))});var cN,lN,uN,Gi=L(()=>{cN=Object.freeze(["entity","set","event","measure"]),lN=Object.freeze(["date","count","op","pivot","metric","kind","provenance"]),uN=Object.freeze({it:Object.freeze(["entity","event","measure"]),this:Object.freeze(["entity","event","measure"]),that:Object.freeze(["entity","event","measure"]),"this one":Object.freeze(["entity","event","measure"]),"that one":Object.freeze(["entity","event","measure"]),those:Object.freeze(["set"]),them:Object.freeze(["set"]),these:Object.freeze(["set"]),here:Object.freeze(["entity"])})});var dt,pN,fN,mN,hN,gN,bN,wN,yN,vN,$N,xN,kN,EN,SN,jN,_N,RS,RN,AN,Uh=L(()=>{dt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},pN=dt("createRequire"),fN=dt("readFileSync"),mN=dt("access"),hN=dt("readFile"),gN=dt("writeFile"),bN=dt("appendFile"),wN=dt("mkdir"),yN=dt("mkdtemp"),vN=dt("rename"),$N=dt("unlink"),xN=dt("rm"),kN=dt("stat"),EN=dt("copyFile"),SN=dt("readdir"),jN=dt("createReadStream"),_N=dt("createWriteStream"),RS=dt("randomBytes"),RN=dt("spawnSync"),AN=dt("createInterface")});var Vi=L(()=>{Uh()});var pt,IN,LN,NN,MN,PN,FN,DN,zN,BN,UN,WN,GN,VN,qN,HN,KN,Ut,YN,XN,JN,ds=L(()=>{pt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},IN=pt("createRequire"),LN=pt("readFileSync"),NN=pt("access"),MN=pt("readFile"),PN=pt("writeFile"),FN=pt("appendFile"),DN=pt("mkdir"),zN=pt("mkdtemp"),BN=pt("rename"),UN=pt("unlink"),WN=pt("rm"),GN=pt("stat"),VN=pt("copyFile"),qN=pt("readdir"),HN=pt("createReadStream"),KN=pt("createWriteStream"),Ut=e=>String(e),YN=pt("randomBytes"),XN=pt("spawnSync"),JN=pt("createInterface")});var AS,Wh,n0,s0,o0,Cl=L(()=>{kt();ds();ze();AS={},Wh=Q(xe(Ut(AS.url)),"..","..",".."),n0=Q(Wh,"data","templates","responses.jsonl"),s0=Q(Wh,"data","phrasebook","software-phrases.txt"),o0=Object.freeze(new Set(["subject","count","noun","scope","comparison","metric","unit","superlative","provenance"]))});function CS(e,t={}){let n=TS.exec(String(e||""));if(!n)return 1;let s=t?.[n[1]];return typeof s=="number"&&Number.isFinite(s)?s:1}function OS(e,t={}){let n=Array.isArray(e?.sourceIds)?e.sourceIds:[];return n.length?Math.max(...n.map(s=>CS(s,t))):1}function Qe(e,t={}){return(Array.isArray(e)?e:[]).map((s,o)=>({row:s,index:o,bias:OS(s,t)})).sort((s,o)=>o.bias-s.bias||(o.row?.trust??0)-(s.row?.trust??0)||s.index-o.index).map(s=>s.row)}var TS,Gh=L(()=>{TS=/^src:corpus:(.+)$/});var ft,a0,Oo,c0,l0,u0,d0,p0,f0,m0,h0,g0,b0,w0,y0,IS,LS,v0,$0,x0,Ws=L(()=>{ft=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},a0=ft("createRequire"),Oo=ft("readFileSync"),c0=ft("access"),l0=ft("readFile"),u0=ft("writeFile"),d0=ft("appendFile"),p0=ft("mkdir"),f0=ft("mkdtemp"),m0=ft("rename"),h0=ft("unlink"),g0=ft("rm"),b0=ft("stat"),w0=ft("copyFile"),y0=ft("readdir"),IS=ft("createReadStream"),LS=ft("createWriteStream"),v0=ft("randomBytes"),$0=ft("spawnSync"),x0=ft("createInterface")});function Vh(e,t){let n=String(e).toLowerCase().replace(/^[^a-z]+/,"");if(!n)return null;for(let o of t.vowel_sound_consonants||[])if(n.startsWith(o))return!0;for(let o of t.consonant_sound_vowels||[])if(n.startsWith(o))return!1;let s=n[0];return"aeiou".includes(s)?!0:/[a-z]/.test(s)?!1:null}function FS(e=MS){let t=_o(Oo(e,"utf8"));return Array.isArray(t.rule)?t.rule:[]}function Ol(){if(qi===null)try{qi=FS()}catch{qi=[]}return qi}var DS,NS,MS,PS,T0,qi,Il=L(()=>{Ws();ds();ze();Ri();Cl();DS={},NS=xe(Ut(DS.url)),MS=Q(NS,"..","..","data","templates","grammar-rules.toml"),PS=Object.freeze(["prose","entity","path","number","code","provenance","receipt"]),T0=Object.freeze(new Set(PS.filter(e=>e!=="prose")));qi=null});function zS(){if(_r!==void 0)return _r;try{let e=qh?qh():BS();_r=e&&e.winkNLP&&e.model?e:null}catch{_r=null}return _r}function BS(){let e=process.getBuiltinModule("node:module").createRequire(US.url);return{winkNLP:e("wink-nlp"),model:e("wink-eng-lite-web-model")}}function Ll(){if(Io!==void 0)return Io;let e=zS();if(!e)return Io=null,null;try{Io=e.winkNLP(e.model)}catch{Io=null}return Io}var US,qh,_r,Io,Nl=L(()=>{US={}});var Hh=L(()=>{Nl()});var Yh,Kh=L(()=>{Yh={comment:"tmct's starter lexicon, now covering BOTH the original software domain and the default 'human-world' persona's everyday people/places/objects/nature/time/body/mind vocabulary. Every word the ACE-OWL sub-fragment parser (src/domain/grammar/ace.mjs) is allowed to understand is DECLARED here \u2014 tmct never guesses a word's category. Nouns may declare a possessive property typing ('data' or 'object', pattern 7) or an irregular 'plural' (WordNet-sourced human nouns like 'man'/'child' need this \u2014 the morphology fold only handles regular -s/-ies/-es endings); adjectives MUST declare a type ('subclass' forms a class, 'data' asserts a boolean-ish datatype property, pattern 8); verbs may declare a preposition ('depend' + 'on' \u2192 dependsOn). The human-domain additions are flat and simple (breadth over depth \u2014 no gender/kinship taxonomy, no formal role hierarchy), matching corpus/tier2/generate.mjs's CORPUSES.human.lexicon sub-key, which --verify drift-checks against. Extend via loadLexicon(extra) with this same shape.",nouns:{module:{},class:{},function:{},method:{},attribute:{},variable:{},constant:{},test:{},suite:{},service:{},repository:{},branch:{},commit:{},tag:{},release:{},package:{},library:{},framework:{},api:{},endpoint:{},route:{},handler:{},controller:{},model:{},view:{},template:{},component:{},interface:{},type:{},category:{},kind:{},artifact:{},routine:{},part:{},helper:{},operation:{},change:{},schema:{},database:{},table:{},query:{},index:{plural:"indices"},cache:{},queue:{},worker:{},job:{},task:{},bug:{},defect:{},issue:{},ticket:{},feature:{},requirement:{},specification:{},document:{},developer:{},engineer:{},user:{},visitor:{},team:{},project:{},codebase:{},file:{},directory:{},folder:{},line:{},symbol:{},identifier:{},comment:{},docstring:{},string:{},number:{},list:{},array:{},graph:{},node:{},edge:{},triple:{},fact:{},ontology:{},lexicon:{},grammar:{},sentence:{},utterance:{},session:{},response:{},request:{},question:{},answer:{},error:{},exception:{},warning:{},log:{},metric:{},benchmark:{},pipeline:{},build:{},deployment:{},environment:{},config:{},configuration:{},setting:{},option:{},flag:{},argument:{},parameter:{},value:{},result:{},output:{},input:{},server:{},client:{},protocol:{},message:{},event:{},hook:{},plugin:{},script:{},tool:{},command:{},prompt:{},token:{},parser:{},compiler:{},linter:{},formatter:{},runtime:{},process:{},thread:{},loop:{},statement:{},expression:{},keyword:{},scope:{},callback:{},promise:{},iterator:{},generator:{},unit:{},risk:{},prototype:{},milestone:{},sprint:{},backlog:{},roadmap:{},phase:{},pattern:{},smell:{},coverage:{},mock:{},stub:{},fixture:{},assertion:{},snapshot:{},regression:{},migration:{},refactor:{},review:{},merge:{},license:{property:"data"},version:{property:"data"},name:{property:"data"},path:{property:"data"},size:{property:"data"},status:{property:"data"},language:{property:"data"},extension:{property:"data"},churn:{property:"data"},impact:{property:"data"},complexity:{property:"data"},latency:{property:"data"},duration:{property:"data"},frequency:{property:"data"},severity:{property:"data"},owner:{property:"object"},maintainer:{property:"object"},author:{property:"object"},reviewer:{property:"object"},parent:{property:"object"},dependency:{property:"object"},man:{plural:"men"},woman:{plural:"women"},person:{plural:"people"},child:{plural:"children"},boy:{},girl:{},baby:{},adult:{},friend:{},neighbor:{},stranger:{},guest:{},doctor:{},teacher:{},nurse:{},student:{},farmer:{},mother:{},father:{},brother:{},sister:{},family:{},king:{},queen:{},soldier:{},artist:{},writer:{},cook:{},group:{},crowd:{},audience:{},club:{},president:{},human:{},lawyer:{},driver:{},manager:{},officer:{},judge:{},priest:{},servant:{},butler:{},housekeeper:{},gardener:{},employee:{},boss:{},husband:{},wife:{plural:"wives"},son:{},daughter:{},grandmother:{},grandfather:{},citizen:{},customer:{},leader:{},champion:{},volunteer:{},resident:{},place:{},city:{},town:{},village:{},country:{},house:{},home:{},room:{},kitchen:{},bedroom:{},bathroom:{},school:{},hospital:{},shop:{},market:{},church:{},park:{},garden:{},street:{},road:{},bridge:{},farm:{},office:{},factory:{},museum:{},hotel:{},airport:{},castle:{},beach:{},forest:{},mountain:{},hat:{},shirt:{},coat:{},shoe:{},dress:{},clothing:{},chair:{},desk:{},lamp:{},portrait:{},bed:{},door:{},window:{},wall:{},roof:{},pen:{},paper:{},key:{},lock:{},box:{},car:{},bicycle:{},boat:{},train:{},wheel:{},knife:{plural:"knives"},spoon:{},fork:{},plate:{},cup:{},bottle:{},bag:{},money:{},coin:{},toy:{},machine:{},clock:{},phone:{},book:{},letter:{},umbrella:{},glove:{},sock:{},ring:{},watch:{},mirror:{},candle:{},ladder:{},hammer:{},basket:{},wallet:{},dog:{},cat:{},horse:{},cow:{},pig:{},sheep:{},bird:{},fish:{},mouse:{plural:"mice"},rabbit:{},bear:{},lion:{},tiger:{},elephant:{},snake:{},mole:{},groundhog:{},meerkat:{},tree:{},flower:{},grass:{},leaf:{plural:"leaves"},root:{},seed:{},fruit:{},water:{},air:{},fire:{},earth:{},stone:{},sand:{},gold:{},iron:{},rain:{},snow:{},wind:{},cloud:{},sun:{},moon:{},star:{},owl:{},wolf:{plural:"wolves"},frog:{},bee:{},ant:{},butterfly:{},spider:{},river:{},ocean:{},time:{},day:{},night:{},morning:{},evening:{},week:{},month:{},year:{},hour:{},minute:{},second:{},moment:{},season:{},spring:{},summer:{},winter:{},wedding:{},race:{},dozen:{},half:{plural:"halves"},amount:{},meeting:{},game:{},war:{},trip:{},birthday:{},holiday:{},autumn:{},century:{},body:{},head:{},hand:{},arm:{},leg:{},foot:{plural:"feet"},eye:{},ear:{},mouth:{},nose:{},hair:{},heart:{},blood:{},bone:{},skin:{},face:{},food:{},bread:{},meat:{},milk:{},egg:{},cheese:{},vegetable:{},meal:{},breakfast:{},dinner:{},drink:{},wine:{},tea:{},coffee:{},tongue:{},tooth:{plural:"teeth"},finger:{},toe:{},shoulder:{},knee:{},brain:{},lung:{},sugar:{},salt:{},word:{},story:{},news:{},idea:{},thought:{},mind:{},memory:{},dream:{},belief:{},love:{},hate:{},fear:{},joy:{},anger:{},hope:{},surprise:{},pride:{},song:{},music:{},sound:{},voice:{},picture:{},art:{},knowledge:{},opinion:{},reason:{},imagination:{},laughter:{},tear:{},smile:{},silence:{},object:{},location:{},quantity:{},organization:{},animal:{},plant:{},furniture:{},vehicle:{},insect:{},emotion:{},metal:{},liquid:{},weather:{},planet:{},jewelry:{},cutlery:{},government:{},material:{},draw:{},set:{},heavy:{},stand:{},free:{},pack:{},dead:{},pick:{},double:{},straight:{},cast:{},dry:{},bank:{},stamp:{},tender:{},fair:{},active:{},regular:{},blue:{},hack:{},band:{},brush:{},guard:{},master:{},transfer:{},firm:{},side:{},bull:{},mate:{},rank:{},board:{},brace:{},grade:{},better:{},course:{},natural:{},butt:{},camp:{},crop:{},date:{},fold:{},help:{},hunt:{},count:{},court:{},crush:{},major:{},march:{},tease:{},tough:{},flight:{},forward:{},division:{},commission:{},jam:{},rat:{},gray:{},hood:{},jerk:{},miss:{},pile:{},pool:{},rear:{},whip:{},bench:{},chain:{},cycle:{},grind:{},guide:{},stiff:{},troll:{},union:{},circle:{},carrier:{},defence:{},defense:{},radical:{},reserve:{},intimate:{},opposite:{},superior:{},grey:{},host:{},knot:{},left:{},lost:{},blind:{},crank:{},panel:{},rally:{},state:{},tramp:{},waver:{},clutch:{},living:{},runner:{},steady:{},stream:{},combine:{},company:{},convert:{},general:{},moderate:{},alternate:{},ace:{},crab:{},flop:{},fund:{},pair:{},rake:{},rock:{},sick:{},blade:{},cheat:{},sport:{},caller:{},column:{},couple:{},divine:{},pledge:{},simple:{},sponge:{},system:{},wanton:{},sleeper:{},business:{},associate:{},instrument:{},substitute:{},gun:{},sum:{},alto:{},best:{},buff:{},dear:{},mass:{},cream:{},creep:{},giant:{},labor:{},pilot:{},sneak:{},stack:{},staff:{},world:{},gutter:{},jumper:{},labour:{},lather:{},picket:{},reader:{},savage:{},captain:{},culture:{},monitor:{},neutral:{},unknown:{},utility:{},inferior:{},initiate:{},innocent:{},national:{},transpose:{},association:{},professional:{},bum:{},fan:{},law:{},deck:{},fool:{},join:{},kink:{},page:{},pink:{},stud:{},twin:{},clump:{},coach:{},dance:{},drone:{},extra:{},feast:{},fence:{},fleet:{},flock:{},ghost:{},clear:{},right:{},open:{},beat:{},back:{},block:{},see:{},keep:{},square:{},pitch:{},center:{},centre:{},top:{},post:{},field:{},spot:{},bar:{},end:{},frame:{},rough:{},address:{},quarter:{},position:{},land:{},bound:{},range:{},seat:{},dark:{},rail:{},cross:{},section:{},tip:{},plug:{},port:{},stall:{},corner:{},outside:{},dig:{},way:{},front:{},joint:{},patch:{},reach:{},thick:{},medium:{plural:"media"},dock:{},ruin:{},tack:{},floor:{},bottom:{},puddle:{},compound:{},retreat:{},mat:{},belt:{},dump:{},scene:{},space:{},border:{},common:{},cradle:{},inside:{},surface:{},lie:{},boot:{},clog:{},coil:{},nest:{},wire:{},yard:{},forge:{},limit:{},lodge:{},buffer:{},middle:{},capital:{},overhead:{},preserve:{},terminal:{},direction:{},hall:{},loft:{},plot:{},tape:{},grate:{},stoop:{},fringe:{},circuit:{},distance:{},derivation:{},bent:{},gate:{},mill:{},safe:{},sail:{},hedge:{},paint:{},parcel:{},sphere:{},bearing:{},profile:{},shelter:{},crossing:{},interior:{},reservation:{},area:{},bush:{},cork:{},dive:{},limb:{},raft:{},shed:{},zone:{},chase:{},cut:{},light:{},charge:{},check:{},work:{},stock:{},stick:{},flat:{},crack:{},press:{},settle:{},spread:{},wash:{},well:{},swing:{},fly:{},tap:{},stretch:{},shot:{},black:{},strip:{},separate:{},tie:{},rack:{},match:{},piece:{},shell:{},still:{},present:{},trim:{},spike:{},split:{},white:{},yield:{},squeeze:{},bolt:{},fret:{},choke:{},float:{},track:{},low:{},crown:{},screen:{},die:{plural:"dice"},pin:{},chip:{},mold:{},seal:{},draft:{},shade:{},shaft:{},stuff:{},switch:{},balance:{},reverse:{},subject:{},approach:{},beam:{},bill:{},card:{},link:{},sack:{},sink:{},trap:{},spare:{},credit:{},counter:{},express:{},positive:{},net:{},pay:{},ball:{},bond:{},bowl:{},horn:{},pole:{},wing:{},glass:{},grant:{},smack:{},collar:{},record:{},ruffle:{},silver:{},negative:{},cap:{},lap:{},pad:{},rag:{},rig:{},bend:{},clip:{},fine:{},flap:{},heel:{},pall:{},pump:{},gauge:{},image:{},plain:{},print:{},slick:{},spoil:{},clinch:{},gather:{},offset:{},pocket:{},relief:{},channel:{},whistle:{},irregular:{},transport:{},bat:{},ice:{},peg:{},pot:{},bust:{},grip:{},hole:{},nail:{},poke:{},slug:{},spat:{},stem:{},suit:{},yoke:{},flood:{},grand:{},gross:{},perch:{},slip:{},down:{},shoot:{},ground:{},discharge:{},solid:{},kill:{},slack:{},waste:{},rush:{},grain:{},shake:{},pit:{},mould:{},colour:{},render:{},mount:{},cutting:{},fill:{},flux:{},tail:{},plaster:{},swallow:{},concentrate:{},bay:{},gum:{},ray:{},slop:{},spur:{},extract:{},fat:{},hop:{},corn:{},rust:{},smut:{},label:{},stain:{},composition:{},gas:{},pip:{},duck:{},gall:{},lime:{},mint:{},tick:{},stalk:{},whiff:{},cement:{},rubber:{},conjugate:{},preparation:{},dun:{},dust:{},jade:{},mire:{},pulp:{},snag:{},bloom:{},caper:{},crude:{},fluid:{},frost:{},paste:{},rinse:{},steam:{},straw:{},corona:{},poison:{},refuse:{},savory:{},feather:{},ferment:{},organic:{},chestnut:{},mushroom:{},percolate:{},sublimate:{},synthetic:{},suspension:{},precipitate:{},cod:{},pet:{},rod:{},bunt:{},crow:{},hide:{},punk:{},vein:{},assay:{},goose:{plural:"geese"},olive:{},stray:{},trash:{},ginger:{},pepper:{},permit:{},polish:{},sorrel:{},blister:{},bristle:{},complex:{},filling:{},flicker:{},harvest:{},scollop:{},whiting:{},anteater:{},snowball:{},tincture:{},repellent:{},ink:{},lip:{},nag:{},rue:{},wad:{},acid:{},beak:{},bean:{},coal:{},dirt:{},fawn:{},fuel:{},lark:{},ling:{},mash:{},palm:{},pelt:{},plum:{},pony:{},pout:{},soil:{},stag:{},bream:{},brier:{},chalk:{},coral:{},fiber:{},fall:{},pass:{},lift:{},go:{},roll:{},drop:{},blow:{},return:{},strike:{},rise:{},snap:{},shift:{},twist:{},case:{},deal:{},start:{},deep:{},jump:{},step:{},stop:{},pound:{},advance:{},pop:{},flash:{},rest:{},crash:{},score:{},figure:{},leave:{},smash:{},stroke:{},first:{},sweep:{},even:{},flow:{},kick:{},heave:{},trace:{},opening:{},full:{},gain:{},jack:{},spin:{},wave:{},splash:{},bob:{},bang:{},dash:{},flick:{},hitch:{},prime:{},proof:{},passing:{},bit:{},click:{},knock:{},swell:{},trouble:{},collapse:{},movement:{},standard:{},variation:{},rap:{},boom:{},bump:{},clap:{},pace:{},peck:{},zero:{},blaze:{},speed:{},spell:{},treat:{},bounce:{},factor:{},little:{},plunge:{},scrape:{},single:{},ban:{},mix:{},one:{},mesh:{},roar:{},tilt:{},climb:{},flip:{},puff:{},bite:{},feed:{},bitter:{},chop:{},sour:{},special:{},crisp:{},tonic:{},scallop:{},mess:{},quick:{},smear:{},fillet:{},curl:{},malt:{},glaze:{},souse:{},breast:{},humour:{},draught:{},delicacy:{},dressing:{},transplant:{},hip:{},sop:{},kiss:{},mush:{},neck:{},belly:{},frank:{},jumble:{},junket:{},trifle:{},stomach:{},clot:{},shin:{},stew:{},tart:{},cheek:{},graft:{},molar:{},roast:{},spice:{},stout:{},sweat:{},groove:{},region:{},savoury:{},western:{},backbone:{},conserve:{},dominant:{},macerate:{},melancholy:{},cake:{},lens:{},loaf:{plural:"loaves"},menu:{},must:{},peel:{},pore:{},suds:{},butch:{},cling:{},curry:{},drool:{},honey:{},jerky:{},juice:{},mince:{},nasal:{},nerve:{},sauce:{},tract:{},dainty:{},entree:{},facial:{},relish:{},squash:{},brittle:{},caramel:{},cordial:{},fissure:{},oblique:{},adhesion:{},turnover:{},nonpareil:{},posterior:{},vegetation:{},ail:{},orb:{},pap:{},rum:{},brew:{},chew:{},hash:{},lard:{},rump:{},brine:{},dowdy:{},farce:{},flour:{},fudge:{},halal:{},icing:{},lunch:{},play:{},make:{},hold:{},close:{},mark:{},form:{},order:{},support:{},rule:{},sign:{},hang:{},drag:{},feel:{},find:{},shock:{},mean:{},offer:{},study:{},show:{},tone:{},flare:{},attack:{},act:{},life:{plural:"lives"},stay:{},think:{},secret:{},account:{},hurt:{},note:{},taste:{},report:{},measure:{},condition:{},cry:{},focus:{plural:"foci"},style:{},thing:{},title:{},recall:{},average:{},contract:{},dissolve:{},so:{},aim:{},bind:{},heat:{},know:{},stir:{},claim:{},power:{},demand:{},design:{},notice:{},source:{},upgrade:{},resolution:{},bid:{},skim:{},brand:{},curve:{},sight:{},smoke:{},digest:{},regard:{},passage:{},program:{},exposure:{},interest:{},character:{},projection:{},lay:{},curse:{},favor:{},remit:{},sense:{},slash:{},wedge:{},bubble:{},excuse:{},favour:{},invite:{},mantle:{},salute:{},stress:{},survey:{},temper:{},comfort:{},neglect:{},resolve:{},respect:{},torment:{},conflict:{},dispatch:{},standing:{},challenge:{},programme:{},background:{},conclusion:{},impression:{},particular:{},withdrawal:{},cite:{},echo:{},hail:{},rip:{},lot:{},great:{},relay:{},tenor:{},browse:{},bundle:{},chorus:{},cypher:{},fellow:{},litter:{},marine:{},native:{},occult:{},plague:{},rocker:{},scheme:{},series:{plural:"series"},social:{},streak:{},sucker:{},teaser:{},antique:{},battery:{},bracket:{},founder:{},gallery:{},liberal:{},starter:{},turnout:{},witness:{},diagonal:{},familiar:{},ordinary:{},prospect:{},sequence:{},aggregate:{},authority:{},community:{},dependent:{},desperate:{},patronage:{},primitive:{},principal:{},complement:{},engagement:{},foundation:{},generation:{},settlement:{},combination:{},lightweight:{},steamroller:{},subordinate:{},organisation:{},establishment:{},representative:{},con:{},fox:{},kid:{},pod:{},red:{},sex:{},spy:{},vet:{},aged:{},bore:{},diet:{},fare:{},gown:{},hawk:{},heap:{},herd:{},hive:{},lump:{},romp:{},sort:{},agent:{},alien:{},beard:{},brave:{},breed:{},brood:{},canon:{},craft:{},crazy:{},devil:{},dummy:{},equal:{},flake:{},groom:{},mound:{},organ:{},scrub:{},toast:{},troop:{},youth:{},colony:{},copper:{},cutter:{},escort:{},feeder:{},junior:{},maroon:{},matrix:{plural:"matrices"},modern:{},muscle:{},people:{},sector:{},shrink:{},tinker:{},topper:{},booster:{},gallant:{},hostile:{},marshal:{},network:{},nucleus:{plural:"nuclei"},premier:{},scourge:{},secular:{},sitting:{},snapper:{},suspect:{},swagger:{},traffic:{},variant:{},cardinal:{},derelict:{},domestic:{},favorite:{},finisher:{},graduate:{},humanist:{},infernal:{},magazine:{},manifold:{},minister:{},palatine:{},presence:{},receiver:{},relation:{},favourite:{},following:{},goldbrick:{},operative:{},sensitive:{},syndicate:{},complexion:{},mouthpiece:{},withdrawer:{},appointment:{},conjugation:{},constituent:{},heavyweight:{},incompetent:{},independent:{},replacement:{},underground:{},untouchable:{},conservative:{},administration:{},ape:{},gem:{},hob:{},sap:{},van:{},axis:{plural:"axes"},chap:{},char:{},crew:{},cult:{},duet:{},gang:{},hero:{},hire:{},lamb:{},lame:{},mute:{},nude:{},pawn:{},pill:{},sage:{},soul:{},tout:{},trio:{},ward:{},worm:{},bunch:{},crimp:{},dwarf:{},elect:{},flank:{},ideal:{},noble:{},octet:{},quack:{},saint:{},scrag:{},shark:{},shoal:{},silly:{},skunk:{},super:{},witch:{},zombi:{},agency:{},anchor:{},backup:{},batter:{},buster:{},canary:{},circus:{},dealer:{},domain:{},doomed:{},genius:{},gossip:{},herald:{},hoodoo:{},hopper:{},immune:{},jockey:{},legion:{},member:{},nature:{},orphan:{},parade:{},peanut:{},pillar:{},pirate:{},player:{},porter:{},pusher:{},putter:{},senior:{},septet:{},sestet:{},sextet:{},surety:{},tapper:{},tiller:{},zombie:{},adjunct:{},butcher:{},captive:{},cascade:{},chapter:{},charity:{},checker:{},chicane:{},chicken:{},climber:{},cognate:{},consort:{},cracker:{},dresser:{},gentile:{},invalid:{},knocker:{},lineage:{},mission:{},mixture:{},monster:{},offence:{},partner:{},pioneer:{},pitcher:{},quartet:{},quintet:{},recruit:{},referee:{},shooter:{},spoiler:{},sponsor:{},stemmer:{},steward:{},striker:{},terrace:{},alliance:{},castrate:{},designer:{},director:{},ensemble:{},faithful:{},friendly:{},mandarin:{},operator:{},romantic:{},accessory:{},annoyance:{},attendant:{},bourgeois:{},precedent:{},quadruple:{},reception:{},recession:{},religious:{},reprobate:{},satellite:{},selection:{},sensation:{},supporter:{},contingent:{},convention:{},expedition:{},incendiary:{},individual:{},masquerade:{},population:{},sweetheart:{},tubercular:{},confederate:{},cooperative:{},subdivision:{},territorial:{},transcriber:{},intelligence:{},registration:{},sophisticate:{},welterweight:{},revolutionary:{},ex:{},ass:{},cog:{},cub:{},den:{},dud:{},duo:{},ham:{},hog:{},mob:{},pro:{},deaf:{},dove:{},fate:{},five:{},folk:{},gull:{},jinx:{},mime:{},nark:{},nine:{},pest:{},prey:{},quad:{},rash:{},scab:{},sire:{},wisp:{},wood:{},zany:{},armor:{},batch:{},bogey:{},caste:{},chief:{},choir:{},clone:{},divan:{},drunk:{},elder:{},enemy:{},exile:{},faith:{},flirt:{},grunt:{},joker:{},lobby:{},louse:{plural:"lice"},pagan:{},pivot:{},racer:{},rebel:{},scout:{},siren:{},slave:{},swarm:{},timid:{},triad:{},tribe:{},armour:{},bearer:{},censor:{},choker:{},convoy:{},covert:{},damned:{},deputy:{},empire:{},goffer:{},gopher:{},huddle:{},killer:{},league:{},martyr:{},muster:{},mystic:{},outfit:{},packet:{},palace:{},passer:{},patrol:{},potter:{},quarry:{},rigger:{},ringer:{},rustic:{},scribe:{},sitter:{},slider:{},slouch:{},squire:{},squirt:{},stupid:{},summit:{},tailor:{},tenant:{},terror:{},tracer:{},turkey:{},turner:{},venter:{},voider:{},voodoo:{},walker:{},worthy:{},academy:{},agonist:{},amateur:{},ancient:{},banquet:{},cabinet:{},cashier:{},classic:{},commune:{},courser:{},crammer:{},current:{},divider:{},economy:{},edition:{},emperor:{},entrant:{},fireman:{},lookout:{},octette:{},orderly:{},painter:{},pervert:{},plotter:{},plunger:{},roaster:{},sampler:{},scanner:{},sellout:{},skimmer:{},skipper:{},society:{},soprano:{},spastic:{},spotter:{},stratum:{plural:"strata"},trimmer:{},tripper:{},trooper:{},tumbler:{},upstart:{},veteran:{},wheeler:{},academic:{},agnostic:{},aviation:{},backstop:{},baritone:{},calendar:{},casualty:{},colonial:{},divinity:{},fireball:{},homeless:{},huckster:{},marriage:{},militant:{},military:{},ministry:{},modifier:{},partisan:{},pedigree:{},possible:{},recorder:{},regiment:{},renegade:{},repeater:{},revenant:{},septette:{},sextette:{},shepherd:{},stalwart:{},stringer:{},stripper:{},whistler:{},affiliate:{},ascendant:{},bacchanal:{},canvasser:{},cockscomb:{},collector:{},comforter:{},commander:{},companion:{},conductor:{},crossover:{},eccentric:{},executive:{},fledgling:{},franchise:{},freelance:{},incumbent:{},mercenary:{},moderator:{},neighbour:{},newspaper:{},patriarch:{},patrician:{},portfolio:{},quartette:{},quintette:{},repertory:{},secretary:{},segregate:{},spearhead:{},stigmatic:{},summation:{},transient:{},trumpeter:{},voluntary:{},absolutism:{},anthropoid:{},apparition:{},assemblage:{},collective:{},contractor:{},delinquent:{},episcopate:{},exaltation:{},exposition:{},illiterate:{},judicature:{},leadership:{},lieutenant:{},minimalist:{},percussion:{},profligate:{},provincial:{},rendezvous:{},brotherhood:{},determinant:{},distributor:{},interpreter:{},stipendiary:{},analphabetic:{},antediluvian:{},civilisation:{},civilization:{},commonwealth:{},conglomerate:{},contemporary:{},cosmopolitan:{},humanitarian:{},neighborhood:{},thoroughbred:{},ultramontane:{},concatenation:{},featherweight:{},superordinate:{},classification:{},fundamentalist:{},cop:{},don:{},eon:{},gal:{},gob:{},god:{},hoe:{},kin:{},nan:{},pup:{},wag:{},wit:{},aeon:{},ally:{},bard:{},chum:{},clew:{},dean:{},fink:{},flak:{},geek:{},goof:{},hulk:{},idol:{},lady:{},loon:{},mace:{},para:{},ruck:{},seer:{},self:{plural:"selves"},adder:{},angel:{},augur:{},baron:{},blond:{},brick:{},brute:{},cabal:{},champ:{},comic:{},crier:{},decoy:{},demon:{},diner:{},diver:{},diwan:{},drove:{},envoy:{},fiend:{},flack:{},flier:{},flyer:{},freak:{},gaudy:{},harpy:{},horde:{},indie:{},jewel:{},leech:{},levee:{},liege:{},locus:{},loser:{},mimic:{},needy:{},nymph:{},oiler:{},poser:{},pupil:{},riser:{},roper:{},rummy:{},scold:{},squad:{},timer:{},tutor:{},usher:{},vicar:{},whale:{},wiper:{},affine:{},albino:{},angler:{},badass:{},baster:{},beggar:{},blonde:{},bomber:{},bowler:{},butter:{},carver:{},caster:{},chichi:{},clinic:{},closer:{},cohort:{},coiner:{},comber:{},cookie:{},cordon:{},corpus:{},cotter:{},cowboy:{},coyote:{},critic:{},dragon:{},drawer:{},drudge:{},eleven:{},ensign:{},estate:{},ethnic:{},exarch:{},finder:{},fodder:{},gaffer:{},gainer:{},galaxy:{},granny:{},hacker:{},hedger:{},heller:{},holder:{},honker:{},hooker:{},hotdog:{},inmate:{},intern:{},jungle:{},knight:{},kvetch:{},lineup:{},lovely:{},magpie:{},maiden:{},mailer:{},maniac:{},matron:{},miller:{},muller:{},nation:{},opener:{},ouster:{},packer:{},parrot:{},patron:{},peeler:{},peeper:{},polity:{},poster:{},powwow:{},punter:{},puppet:{},purdah:{},racist:{},rafter:{},ramrod:{},redact:{},regent:{},rusher:{},sailor:{},scorer:{},seeder:{},shaver:{},slaver:{},slicer:{},smoker:{},snitch:{},syntax:{},tacker:{},tagger:{},tanker:{},tartar:{},teller:{},thrush:{},trigon:{},troika:{},truant:{},tucker:{},tyrant:{},umpire:{},undoer:{},vestal:{},virgin:{},votary:{},warren:{},washer:{},wetter:{},winder:{},winner:{},wizard:{},admirer:{},amnesic:{},analyst:{},anomaly:{},aphasic:{},armorer:{},arrival:{},ascetic:{},auditor:{},baggage:{},bastion:{},biology:{},boarder:{},brahman:{},brahmin:{},breaker:{},caravan:{},clapper:{},cluster:{},coaster:{},cobbler:{},college:{},convict:{},council:{},counsel:{},coxcomb:{},crawler:{},creeper:{},crewman:{},crimper:{},darling:{},destiny:{},dragoon:{},dreamer:{},duality:{},echelon:{},ejector:{},fiddler:{},fighter:{},flasher:{},forbear:{},harrier:{},holdout:{},hostess:{},incubus:{},ingenue:{},justice:{},kachina:{},kindred:{},kingpin:{},macumba:{},manikin:{},marcher:{},married:{},newborn:{},notable:{},nursing:{},outpost:{},parvenu:{},patient:{},payroll:{},peasant:{},phalanx:{},phantom:{},planter:{},platoon:{},plodder:{},poacher:{},printer:{},prodigy:{},puncher:{},realist:{},redhead:{},revival:{},runaway:{},scholar:{},sharpie:{},skidder:{},slicker:{},slogger:{},smasher:{},snorter:{},snuffer:{},spinner:{},splicer:{},stalker:{},stamper:{},standby:{},stepper:{},striper:{},sweeper:{},thrower:{},triplet:{},utopian:{},utterer:{},voucher:{},washout:{},watcher:{},wiggler:{},wrecker:{},affluent:{},armourer:{},attender:{},bacchant:{},bachelor:{},bankrupt:{},bisexual:{},bondsman:{},cautious:{},congress:{},corporal:{},creature:{},decadent:{},defeated:{},delegate:{},diabetic:{},dictator:{},dyslexic:{},effector:{},exponent:{},flagging:{},freshman:{},fugitive:{},futurist:{},garrison:{},greyback:{},hangover:{},humanism:{},immortal:{},juvenile:{},lapidary:{},mainstay:{},mannikin:{},maverick:{},mechanic:{},minority:{},minstrel:{},mistress:{},monotype:{},mutation:{},nativist:{},neophyte:{},neurotic:{},newsroom:{},nobility:{},opponent:{},pacifier:{},pantheon:{},planting:{},probable:{},producer:{},recusant:{},referral:{},reminder:{},retainer:{},ruralism:{},scalawag:{},scrubber:{},searcher:{},sergeant:{},sociable:{},songster:{},splitter:{},squadron:{},straggle:{},strawman:{},survivor:{},taxonomy:{},treasury:{},vanguard:{},virtuoso:{},walloper:{},warhorse:{},yearling:{},alcoholic:{},anorectic:{},artificer:{},artillery:{},attracter:{},attractor:{},automaton:{},auxiliary:{},barbarian:{},bombshell:{},brokerage:{},coalition:{},concourse:{},contralto:{},counselor:{},crewwoman:{},cyberpunk:{},defaulter:{},deliverer:{},democracy:{},dependant:{},descender:{},dissident:{},dyspeptic:{},feudatory:{},firewoman:{},flyweight:{},incurable:{},institute:{},insurgent:{},intellect:{},introvert:{},mandatory:{},mendicant:{},middleman:{},navigator:{},organiser:{},organizer:{},pluralism:{},pluralist:{},pothunter:{},precursor:{},predictor:{},presenter:{},pretender:{},processor:{},proconsul:{},publisher:{},quintuple:{},registrar:{},regulator:{},scallywag:{},scavenger:{},scrambler:{},scratcher:{},serration:{},singleton:{},stargazer:{},stockpile:{},successor:{},surrogate:{},symbolism:{},temporary:{},throwback:{},trickster:{},warrantee:{},womanhood:{},antagonist:{},attendance:{},blackguard:{},bondswoman:{},chancellor:{},classifier:{},conference:{},conformist:{},counsellor:{},crossroads:{},descendant:{},descendent:{},doorkeeper:{},embodiment:{},expatriate:{},federation:{},fellowship:{},filibuster:{},forerunner:{},fratricide:{},grandstand:{},mastermind:{},minstrelsy:{},missionary:{},ordination:{},plantation:{},powerhouse:{},quadruplet:{},quintuplet:{},repatriate:{},republican:{},respondent:{},rubberneck:{},salamander:{},scholastic:{},separatism:{},sisterhood:{},subscriber:{},subsidiary:{},supplicant:{},suppresser:{},suppressor:{},timekeeper:{},translator:{},university:{},wallflower:{},abomination:{},academician:{},agriculture:{},anachronism:{},antiquarian:{},beneficiary:{},bureaucracy:{},clairvoyant:{},conditioner:{},confederacy:{},consumptive:{},deification:{},enlightened:{},incarnation:{},lilliputian:{},middlewoman:{},narcoleptic:{},nationalist:{},partnership:{},peacekeeper:{},peripatetic:{},pontificate:{},progression:{},prosecution:{},quarterback:{},recessional:{},romanticist:{},shipbuilder:{},transmitter:{},transsexual:{},underwriter:{},undesirable:{},utilitarian:{},acquaintance:{},bantamweight:{},collaborator:{},congregation:{},conservatory:{},countertenor:{},demonstrator:{},denomination:{},headquarters:{},illegitimate:{},investigator:{},metropolitan:{},middleweight:{},noncombatant:{},philharmonic:{},schoolmaster:{},sharpshooter:{},totalitarian:{},authoritarian:{},confederation:{},correspondent:{},reincarnation:{},schizophrenic:{},supernumerary:{},categorization:{},tatterdemalion:{},instrumentality:{},internationalist:{},bey:{},cox:{},cur:{},few:{},foe:{},hag:{},lad:{},mod:{},obi:{},sib:{},aide:{},amah:{},anti:{},army:{},beau:{},bevy:{},bogy:{},chit:{},clod:{},coon:{},czar:{},dada:{},dame:{},derp:{},dodo:{},dude:{},duke:{},dupe:{},gild:{},giro:{},goat:{},goon:{},grad:{},guru:{},heir:{},hobo:{},hunk:{},jilt:{},jock:{},jury:{},khan:{},maid:{},naif:{},navy:{},nerd:{},peri:{},pimp:{},putz:{},sect:{},suer:{},swot:{},tuft:{},adept:{},baker:{},basso:{},beast:{},bride:{},bunny:{},cadre:{},comer:{},cooky:{},corps:{},covey:{},deist:{},edger:{},elite:{},emcee:{},enate:{},faery:{},fatty:{},fauna:{},felon:{},filer:{},flora:{},folks:{},forum:{},genus:{plural:"genera"},ghoul:{},gipsy:{},giver:{},gnome:{},grove:{},gypsy:{},hajji:{},hakim:{},junky:{},knave:{},lefty:{},leper:{},loony:{},macho:{},madam:{},magus:{},medic:{},mezzo:{},miler:{},mooch:{},mufti:{},nabob:{},nexus:{},ninja:{},obeah:{},parer:{},pigmy:{},poilu:{},ponce:{},prior:{},proxy:{},puppy:{},pygmy:{},quint:{},raver:{},rover:{},satyr:{},scamp:{},sheik:{},shill:{},shrew:{},sibyl:{},sissy:{},slain:{},smith:{},snoop:{},sprog:{},stoic:{},sylph:{},taker:{},thane:{},toady:{},totem:{},trier:{},tryst:{},tuner:{},twirp:{},uncle:{},valet:{},vegan:{},vixen:{},waker:{},widow:{},wight:{},wirer:{},yenta:{},agnate:{},alexic:{},amazon:{},audile:{},avatar:{},avower:{},bagger:{},bagman:{},banker:{},barber:{},barker:{},bather:{},bawler:{},beater:{},beldam:{},bidder:{},boater:{},brewer:{},broker:{},brunet:{},bureau:{},caddie:{},camper:{},cantor:{},caucus:{},chaser:{},cherub:{},chosen:{},coeval:{},cooper:{},coquet:{},cottar:{},craven:{},cubist:{},daemon:{},deacon:{},digger:{},dodger:{},dowser:{},duette:{},dunker:{},egoist:{},eldest:{},eparch:{},erotic:{},eyeful:{},faller:{},fitter:{},flunky:{},forger:{},framer:{},gaggle:{},gagman:{},gamine:{},gasbag:{},gillie:{},goalie:{},gouger:{},grouch:{},gunman:{},gunner:{},hamlet:{},hanger:{},hawker:{},heaver:{},hermit:{},hitter:{},hummer:{},iceman:{},joiner:{},junkie:{},jurist:{},keeper:{},kelpie:{},kisser:{},lackey:{},lector:{},lifter:{},lister:{},lizard:{},loader:{},loaner:{},logjam:{},longer:{},lubber:{},lumper:{},lyceum:{},madcap:{},maenad:{},maimed:{},masher:{},medico:{},menial:{},midden:{},midget:{},minder:{},moiety:{},motile:{},nester:{},oblate:{},oilman:{},parish:{},paster:{},pelter:{},phylum:{},picker:{},plenum:{},police:{},pruner:{},psyche:{},puller:{},python:{},rabble:{},raider:{},raiser:{},ranger:{},ranker:{},rapper:{},reaper:{},redcap:{},reeler:{},regime:{},renter:{},rifler:{},romper:{},sachem:{},salter:{},sawyer:{},sealer:{},seeker:{},sender:{},sexist:{},shaker:{},shaper:{},sharpy:{},signer:{},silvan:{},sleuth:{},smiler:{},sorter:{},sphinx:{},stager:{},stater:{},supper:{},sylvan:{},talent:{},tanner:{},tester:{},theist:{},throng:{},tilter:{},tipper:{},toller:{},tosser:{},tourer:{},townie:{},trusty:{},varlet:{},vermin:{},vestry:{},victor:{},virago:{},voicer:{},waster:{},weasel:{},weaver:{},weeder:{},weeper:{},weirdo:{},whaler:{},winker:{},wraith:{},wretch:{},yakuza:{},yeoman:{},adapter:{},admiral:{},airhead:{},amalgam:{},animist:{},aphakic:{},applier:{},arbiter:{},armiger:{},atheist:{},attache:{},babbler:{},baffled:{},beldame:{},beloved:{},berserk:{},bondman:{},bounder:{},brigade:{},browser:{},buffoon:{},bulimic:{},burgher:{},caitiff:{},carload:{},catcher:{},cavalry:{},chachka:{},changer:{},charmer:{},chemist:{},cocotte:{},collage:{},compere:{},shadow:{},layer:{},north:{},orbit:{},trend:{},truss:{},vault:{},bunker:{},harbor:{},orient:{},origin:{},resort:{},safety:{},target:{},chamber:{},extreme:{},harbour:{},kingdom:{},mandate:{},outline:{},station:{},blockade:{},darkness:{},overlook:{},landscape:{},northeast:{},northwest:{},partition:{},southeast:{},southwest:{},structure:{},atmosphere:{},lug:{},tee:{},balk:{},burr:{},cage:{},drip:{},east:{},fort:{},hoop:{},west:{},cleat:{},fluke:{},scour:{},south:{},beacon:{},closet:{},duplex:{},radius:{plural:"radii"},vacuum:{},wattle:{},canteen:{},grounds:{},cloister:{},pinnacle:{},property:{},surround:{},terminus:{},anchorage:{},barricade:{},honeycomb:{},turnaround:{},institution:{},termination:{},cab:{},dam:{},brim:{},calk:{},dome:{},goal:{},hill:{},hull:{},knob:{},prop:{},seam:{},site:{},turf:{},apron:{},arena:{},baulk:{},cabin:{},grill:{},groin:{},haunt:{},lever:{},niche:{},privy:{},works:{},airway:{},barren:{},corral:{},dugout:{},fender:{},galley:{},hurdle:{},lounge:{},outlet:{},refuge:{},sconce:{},sprawl:{},temple:{},toilet:{},wicket:{},barrack:{},bulwark:{},buttery:{},cornice:{},grating:{},landing:{},leeward:{},maximum:{},pasture:{},salient:{},shingle:{},squinch:{},surgery:{},building:{},cylinder:{},downtown:{},fountain:{},landmark:{},munition:{},quadrant:{},rearward:{},sideline:{},windward:{},homestead:{},multiplex:{},perfumery:{},residence:{},stretcher:{},substrate:{},excavation:{},silhouette:{},convenience:{},culmination:{},declination:{},architecture:{},spa:{},aery:{},brow:{},bung:{},dike:{},flue:{},hell:{},tent:{},abbey:{},aisle:{},arbor:{},attic:{},booth:{},brink:{},disco:{},oxbow:{},oxeye:{},quoin:{},realm:{},salon:{},villa:{},whorl:{},barony:{},barrow:{},bazaar:{},billet:{},bustle:{},canton:{},casing:{},cellar:{},cooler:{},garage:{},ghetto:{},grille:{},hearth:{},locker:{},midway:{},muffle:{},oracle:{},remise:{},saloon:{},stocks:{},studio:{},tiptop:{},uptown:{},volute:{},arsenal:{},chassis:{},cockpit:{},commons:{},cubicle:{},dockage:{},fairway:{},fencing:{},gondola:{},heading:{},hotspot:{},lattice:{},lodging:{},minimum:{},moorage:{},pannier:{},rattrap:{},rootage:{},stowage:{},theater:{},theatre:{},vacuity:{},baseline:{},butchery:{},buttress:{},clearing:{},crosscut:{},domicile:{},erection:{},exterior:{},fanlight:{},fastness:{},firewall:{},foothold:{},frontier:{},lavatory:{},memorial:{},monument:{},mortuary:{},overhang:{},pedestal:{},scenario:{},solitude:{},sprocket:{},stockade:{},stoppage:{},vaulting:{},bombproof:{},cathedral:{},fundament:{},hindrance:{},panhandle:{},proximity:{},resonator:{},sanctuary:{},territory:{},watershed:{},confluence:{},department:{},encampment:{},flashpoint:{},groundwork:{},hinderance:{},quartering:{},substratum:{},underbelly:{},breadbasket:{},columbarium:{},destination:{},engineering:{},equinoctial:{},planetarium:{},penitentiary:{},circumference:{},confectionery:{},fortification:{},hub:{},hut:{},lee:{},sty:{},acme:{},apex:{},barn:{},brig:{},coop:{},digs:{},holy:{},jail:{},jook:{},juke:{},loge:{},mall:{},nook:{},pave:{},sash:{},silo:{},slum:{},tope:{},weir:{},abode:{},aerie:{},altar:{},bazar:{},detox:{},haven:{},heath:{},hutch:{},kraal:{},lager:{},manor:{},manse:{},navel:{},oasis:{plural:"oases"},opera:{},paddy:{},plaza:{},pylon:{},rodeo:{},shire:{},spile:{},sprag:{},venue:{},visor:{},apogee:{},arcade:{},ashram:{},asylum:{},atrium:{},bagnio:{},bailey:{},barrio:{},belfry:{},boards:{},casino:{},chapel:{},county:{},creche:{},cupola:{},deckle:{},fraise:{},haymow:{},hostel:{},kennel:{},lancet:{},larder:{},lockup:{},mihrab:{},parlor:{},plaque:{},prefab:{},prison:{},spigot:{},stacks:{},tampon:{},turret:{},vertex:{},zodiac:{},automat:{},balcony:{},batwing:{},benthos:{},borough:{},bubbler:{},bullpen:{},cabaret:{},caboose:{},chantry:{},convent:{},deanery:{},demesne:{},derrick:{},desktop:{},drydock:{},dukedom:{},dungeon:{},earldom:{},earplug:{},embassy:{},emirate:{},eparchy:{},equinox:{},fiefdom:{},florist:{},flyover:{},framing:{},funfair:{},grocery:{},hayrack:{},hospice:{},khanate:{},lunette:{},mansion:{},marquee:{},masonry:{},matting:{},midland:{},mooring:{},narthex:{},nirvana:{},obelisk:{},outback:{},parapet:{},parlour:{},pinhead:{},railing:{},rathole:{},redoubt:{},ribbing:{},rotunda:{},sanctum:{},sawmill:{},shipway:{},shoebox:{},stopple:{},tambour:{},transom:{},trellis:{},trestle:{},tribune:{},vantage:{},abutment:{},airspace:{},ambiance:{},ambience:{},backside:{},ballpark:{},basement:{},basilica:{},bioscope:{},bodywork:{},brattice:{},diggings:{},doghouse:{},dominion:{},entrepot:{},environs:{},extremum:{},farmland:{},fireside:{},hacienda:{},hideaway:{},imperium:{},jalousie:{},littoral:{},mantelet:{},mounting:{},nailhead:{},outdoors:{},palisade:{},pharmacy:{},porthole:{},province:{},revolver:{},seascape:{},sidewall:{},steerage:{},stopover:{},suburbia:{},sudatory:{},sweatbox:{},tailgate:{},turnpike:{},wellhead:{},backwater:{},bailiwick:{},beachhead:{},belvedere:{},caliphate:{},caparison:{},cellarage:{},chandlery:{},cloakroom:{},colonnade:{},cookhouse:{},couchette:{},crematory:{},crownwork:{},cubbyhole:{},dollhouse:{},dormitory:{},dripstone:{},fieldwork:{},fireguard:{},forefront:{},guardroom:{},hatchback:{},isoclinal:{},lazaretto:{},lineation:{},mezzanine:{},millinery:{},orphanage:{},outfitter:{},pleasance:{},princedom:{},revetment:{},roadblock:{},scrapheap:{},shrubbery:{},viewpoint:{},viscounty:{},workhouse:{},architrave:{},birthplace:{},borderline:{},bridgehead:{},brownstone:{},chokepoint:{},commissary:{},courthouse:{},escarpment:{},greenhouse:{},ironmonger:{},justiciary:{},laboratory:{},lamination:{},maisonette:{},metropolis:{},obstructor:{},panopticon:{},playground:{},prefecture:{},proscenium:{},quadrangle:{},rotisserie:{},sanatorium:{},suzerainty:{},tenderloin:{},triclinium:{},wellspring:{},wheelhouse:{},condominium:{},conventicle:{},crematorium:{},crenelation:{},demarcation:{},maisonnette:{},observatory:{},reformatory:{},superstrate:{},tobacconist:{},trusteeship:{},wainscoting:{},amphitheater:{},amphitheatre:{},chapterhouse:{},clotheshorse:{},delicatessen:{},fountainhead:{},haberdashery:{},municipality:{},packinghouse:{},patriarchate:{},retrenchment:{},substructure:{},superstratum:{},surroundings:{},wainscotting:{},juxtaposition:{},infrastructure:{},dec:{},inn:{},loo:{},pub:{},burg:{},cafe:{},deli:{},dorm:{},hank:{},iglu:{},kirk:{},lair:{},lawn:{},mart:{},nave:{},oast:{},rink:{},souk:{},tine:{},tipi:{},veld:{},ways:{},wold:{},yurt:{},apsis:{},burgh:{},condo:{},cubby:{},cuddy:{},dacha:{},duchy:{},duomo:{},eaves:{},flies:{},gable:{},glade:{},gulag:{},harem:{},hogan:{},igloo:{},lanai:{},layby:{},mecca:{},midst:{},motel:{},oriel:{},parts:{},patio:{},polls:{},qibla:{},roads:{},rooms:{},sauna:{},skein:{},socle:{},soddy:{},sodom:{},spire:{},stoep:{},stupa:{},tenon:{},tepee:{},tupek:{},tupik:{},veldt:{},weald:{},abatis:{},abbacy:{},alcove:{},apiary:{},arbour:{},aviary:{},bedsit:{},bethel:{},bodega:{},bounds:{},bowels:{},cabana:{},calkin:{},campus:{},carrel:{},casbah:{},casern:{},chalet:{},depths:{},dolmen:{},donjon:{},dormer:{},durbar:{},eatery:{},escarp:{},fipple:{},flange:{},flyway:{},friary:{},furket:{},gantry:{},garret:{},hangar:{},hareem:{},hayrig:{},imaret:{},isobar:{},isohel:{},isolex:{},kasbah:{},laager:{},locale:{},loggia:{},marina:{},masjid:{},meadow:{},medina:{},menhir:{},merlon:{},midair:{},morgue:{},mosque:{},mudhif:{},musjid:{},pagoda:{},paling:{},pantry:{},parvis:{},pelmet:{},piazza:{},pigsty:{},plinth:{},priory:{},pueblo:{},radome:{},setoff:{},skybox:{},skyway:{},stalls:{},storey:{},suburb:{},tenter:{},upside:{},volary:{},wigwam:{},wikiup:{},winery:{},abattis:{},airdock:{},airlock:{},alcazar:{},antapex:{},apadana:{},apojove:{},apolune:{},athanor:{},barroom:{},bascule:{},bedside:{},beeline:{},borstal:{},boudoir:{},brewery:{},brewpub:{},brothel:{},campong:{},cannery:{},capitol:{},carport:{},carrell:{},chancel:{},chateau:{},citadel:{},coaming:{},corncob:{},cottage:{},cowbarn:{},cowshed:{},cowtown:{},crinion:{},dinette:{},diocese:{},earshot:{},edifice:{},enclave:{},exurbia:{},eyeshot:{},fantail:{},feedlot:{},firebox:{},screw:{},share:{},sheet:{},slice:{},slide:{},spill:{},stage:{},stake:{},tread:{},paddle:{},weight:{},canvass:{},compact:{},undercut:{},representation:{},fin:{},gag:{},jet:{},tug:{},bark:{},bunk:{},drum:{},mask:{},pipe:{},reel:{},scan:{},blank:{},drill:{},plumb:{},plume:{},shank:{},sling:{},spray:{},pickup:{},saddle:{},trench:{},capsule:{},security:{},sacrifice:{},technical:{},can:{},jar:{},map:{},ply:{},rib:{},rim:{},web:{},bell:{},buck:{},claw:{},comb:{},copy:{},crib:{},dish:{},fake:{},foil:{},grab:{},kite:{},ramp:{},rent:{},slot:{},spit:{},tank:{},bosom:{},cable:{},charm:{},drain:{},grave:{},price:{},skirt:{},stool:{},strap:{},stump:{},trail:{},access:{},cannon:{},fiddle:{},formal:{},insert:{},launch:{},purple:{},reward:{},strand:{},tackle:{},display:{},floater:{},incline:{},limited:{},portion:{},torpedo:{},overcast:{},puncture:{},broadside:{},duplicate:{},submarine:{},surcharge:{},production:{},interchange:{},bus:{},due:{},gap:{},jaw:{},lag:{},nut:{},tin:{},win:{},arch:{},bail:{},cell:{},dope:{},fell:{},film:{},lace:{},lash:{},mail:{},pale:{},purl:{},rate:{},skid:{},sole:{},spar:{},tuck:{},vamp:{},vent:{},vest:{},brake:{},brass:{},chuck:{},cramp:{},crest:{},drape:{},elbow:{},habit:{},lease:{},lower:{},prize:{},roach:{},royal:{},scrap:{},slate:{},snare:{},snuff:{},total:{},trump:{},beaver:{},canvas:{},future:{},handle:{},header:{},jacket:{},motley:{},muzzle:{},quiver:{},rocket:{},roller:{},staple:{},wrench:{},compass:{},element:{},exhaust:{},frontal:{},thunder:{},transit:{},upstage:{},traverse:{},accession:{},allowance:{},guarantee:{},promenade:{},shipwreck:{},attachment:{},protection:{},perpendicular:{},aid:{},gig:{},gin:{},nap:{},oil:{},ram:{},bead:{},bulb:{},curb:{},dart:{},daub:{},dial:{},dose:{},exit:{},fuse:{},goad:{},item:{},knit:{},plan:{},rein:{},swag:{},veil:{},alarm:{},chart:{},cinch:{},clasp:{},eagle:{},entry:{},fluff:{},gouge:{},lance:{},meter:{},miter:{},pouch:{},probe:{},punch:{},purse:{},sable:{},scuff:{},shear:{},stern:{},taper:{},thumb:{},wharf:{},whisk:{},barrel:{},beetle:{},bronze:{},burden:{},congee:{},fleece:{},glossy:{},halter:{},limber:{},margin:{},mobile:{},needle:{},remote:{},shroud:{},sketch:{},splice:{},stripe:{},toggle:{},trough:{},volume:{},ballast:{},binding:{},blanket:{},costume:{},crackle:{},crystal:{},diamond:{},fitting:{},graphic:{},harness:{},premium:{},product:{},pyramid:{},sandbag:{},squelch:{},trammel:{},uniform:{},venture:{},warrant:{},wildcat:{},working:{},assembly:{},charcoal:{},discount:{},envelope:{},imperial:{},ligature:{},original:{},specific:{},treasure:{},vertical:{},deduction:{},distemper:{},inventory:{},objective:{},reversion:{},whitewash:{},supplement:{},contrivance:{},convertible:{},inspiration:{},intersection:{},counterbalance:{},bet:{},gel:{},gut:{},jag:{},jig:{},pan:{},pry:{},tab:{},tax:{},zip:{},bait:{},barb:{},bomb:{},cone:{},cuff:{},dado:{},disk:{},gear:{},gore:{},grid:{},harp:{},loom:{},main:{},pant:{},pike:{},prod:{},reef:{},ruff:{},sham:{},tare:{},tidy:{},tire:{},toll:{},award:{},basic:{},basin:{},baton:{},birch:{},braid:{},broom:{},clack:{},cloak:{},clout:{},crock:{},fagot:{},ferry:{},filet:{},forte:{},found:{},frail:{},jolly:{},motor:{},pedal:{},potty:{},radio:{},rivet:{},scarf:{},shore:{},shunt:{},sieve:{},splat:{},splay:{},stave:{},steal:{},steel:{},thong:{},tithe:{},torch:{},trunk:{},twine:{},upper:{},valve:{},weave:{},bridle:{},buckle:{},buffet:{},carpet:{},cotton:{},custom:{},devise:{},enamel:{},entail:{},furrow:{},girdle:{},hobble:{},mangle:{},mosaic:{},motive:{},pallet:{},pencil:{},pinion:{},powder:{},radial:{},rattle:{},rebate:{},rumble:{},shield:{},shimmy:{},shovel:{},sledge:{},sluice:{},tablet:{},throne:{},timber:{},tinsel:{},uplift:{},benefit:{},bombard:{},bootleg:{},console:{},default:{},forfeit:{},freight:{},gantlet:{},generic:{},grapple:{},journal:{},loading:{},molding:{},overlap:{},pigment:{},plastic:{},salvage:{},scooter:{},scuffle:{},spindle:{},steamer:{},stopper:{},upright:{},carriage:{},catapult:{},facility:{},laminate:{},medicine:{},offstage:{},overload:{},plastron:{},railroad:{},retrofit:{},strickle:{},throttle:{},whipping:{},wireless:{},automatic:{},blackjack:{},blackwash:{},foliation:{},interlock:{},roughcast:{},threshold:{},antiseptic:{},camouflage:{},incidental:{},intangible:{},preventive:{},reversible:{},watercolor:{},maintenance:{},watercolour:{},differential:{},prescription:{},preventative:{},prophylactic:{},reproduction:{},transcription:{},transportation:{},fob:{},guy:{},hem:{},jug:{},kit:{},saw:{},cane:{},cart:{},clam:{},coif:{},cosy:{},cozy:{},disc:{},felt:{},gash:{},hone:{},hose:{},keel:{},loot:{},luff:{},lure:{},mast:{},mend:{},mine:{},muff:{},nuke:{},plow:{},robe:{},ruby:{},snip:{},soap:{},spud:{},swab:{},tile:{},till:{},tram:{},vane:{},wand:{},weed:{},weld:{},welt:{},audio:{},audit:{},baste:{},bilge:{},brail:{},bugle:{},canal:{},chest:{},chock:{},conge:{},couch:{},crape:{},crepe:{},crook:{},flute:{},frill:{},frock:{},fusee:{},hoist:{},inset:{},kitty:{},leash:{},liner:{},mixer:{},noose:{},novel:{},pearl:{},piano:{},plait:{},quill:{},reset:{},roost:{},saber:{},sabre:{},scull:{},spear:{},squab:{},stilt:{},sulky:{},video:{},vomit:{},wagon:{},aerial:{},armory:{},baffle:{},banner:{},batten:{},binder:{},bodkin:{},bypass:{},canopy:{},chisel:{},clench:{},dollar:{},dredge:{},drogue:{},duster:{},engine:{},excise:{},facing:{},funnel:{},garner:{},hamper:{},joggle:{},kettle:{},lining:{},livery:{},lumber:{},marble:{},mortar:{},mousse:{},nickel:{},ocular:{},payoff:{},pestle:{},piping:{},pommel:{},profit:{},puzzle:{},ransom:{},ration:{},rental:{},ribbon:{},rotary:{},runway:{},saucer:{},seesaw:{},siphon:{},suture:{},tattoo:{},thatch:{},throat:{},tunnel:{},turtle:{},wealth:{},acrylic:{},armoury:{},balloon:{},bargain:{},beehive:{},blinker:{},bolster:{},caisson:{},casting:{},ceiling:{},chariot:{},chopper:{},clarion:{},clinker:{},clipper:{},cowhide:{},earnest:{},elastic:{},expense:{},festoon:{},fortune:{},garnish:{},gravure:{},grinder:{},killing:{},linkage:{},novelty:{},overall:{},overlay:{},pallium:{},perfume:{},pillory:{},pointer:{},ringlet:{},rosette:{},segment:{},shuttle:{},staging:{},trailer:{},trumpet:{},unction:{},barbecue:{},barbeque:{},disguise:{},electric:{},elevated:{},fraction:{},gauntlet:{},gossamer:{},heritage:{},homespun:{},ironclad:{},lifeline:{},lighting:{},mackinaw:{},moulding:{},pinpoint:{},pinwheel:{},poundage:{},sanguine:{},sapphire:{},scribble:{},triangle:{},underlay:{},upstairs:{},virginal:{},admission:{},amphibian:{},backstage:{},capillary:{},cartridge:{},cartwheel:{},cathartic:{},condenser:{},damascene:{},depiction:{},diaphragm:{},medallion:{},overdrive:{},pacemaker:{},reservoir:{},screening:{},sectional:{},solitaire:{},spotlight:{},undercoat:{},assessment:{},bottleneck:{},equatorial:{},overburden:{},pigeonhole:{},pocketbook:{},pontifical:{},refractory:{},reparation:{},roundabout:{},simulation:{},waterproof:{},accelerator:{},certificate:{},inheritance:{},installment:{},restorative:{},ventilation:{},modification:{},subscription:{},hospitalization:{},instrumentation:{},ax:{},axe:{},bib:{},bin:{},bur:{},cot:{},fee:{},fur:{},jib:{},lid:{},six:{},ten:{},tub:{},two:{},bath:{},bike:{},cash:{},coke:{},cope:{},cowl:{},cusp:{},darn:{},debt:{},dice:{},dory:{},duct:{},fore:{},four:{},gaff:{},gage:{},gong:{},helm:{},hemp:{},icon:{},iris:{},junk:{},kern:{},loan:{},maul:{},mink:{},pane:{},pier:{},quid:{},reed:{},rook:{},scum:{},semi:{},sump:{},swob:{},taxi:{},vice:{},ware:{},wool:{},yarn:{},yawl:{},annex:{},atlas:{},barge:{},bevel:{},chaff:{},chute:{},clamp:{},crane:{},crate:{},cubeb:{},dandy:{},dicky:{},dinky:{},dolly:{},dower:{},eight:{},fifty:{},flail:{},floss:{},folio:{},fuzee:{},genre:{},girth:{},gourd:{},grape:{},hinge:{},hobby:{},inlay:{},japan:{},ladle:{},latch:{},linen:{},means:{},mitre:{},motif:{},mulct:{},pique:{},quilt:{},quirk:{},quota:{},rifle:{},rotor:{},setup:{},seven:{},shred:{},skate:{},spade:{},spool:{},spout:{},strut:{},three:{},toner:{},trawl:{},truck:{},twill:{},virtu:{},alpaca:{},anklet:{},argyle:{},argyll:{},arnica:{},balsam:{},bender:{},birdie:{},bishop:{},blower:{},blowup:{},bolero:{},bonnet:{},bounty:{},budget:{},bullet:{},cachet:{},carbon:{},casket:{},castor:{},claxon:{},cobble:{},cobweb:{},collet:{},crenel:{},cutoff:{},cutout:{},damask:{},damper:{},dibble:{},dickey:{},dipper:{},domino:{},douche:{},dragee:{},equity:{},eyelet:{},fetish:{},foible:{},fresco:{},gaiter:{},gibbet:{},gusset:{},heckle:{},hooter:{},horror:{},hunter:{},intake:{},jigger:{},lacing:{},lappet:{},makeup:{},making:{},mallet:{},marker:{},patina:{},paving:{},platen:{},plough:{},poleax:{},portal:{},primer:{},rabbet:{},rattan:{},refill:{},retort:{},revere:{},screed:{},sheath:{},sinker:{},socket:{},splint:{},stereo:{},syphon:{},tamper:{},tandem:{},tarmac:{},tenure:{},ticker:{},trepan:{},twenty:{},velvet:{},veneer:{},vessel:{},vicuna:{},backing:{},bandage:{},bobsled:{},carving:{},central:{},chamfer:{},chequer:{},cistern:{},cleaner:{},cleanup:{},coinage:{},crochet:{},cruiser:{},curtain:{},dilator:{},distaff:{},emerald:{},etching:{},flannel:{},flounce:{},footing:{},gangway:{},garbage:{},garland:{},gauffer:{},gelatin:{},grizzle:{},hanging:{},haywire:{},lamella:{},laniard:{},lanyard:{},lashing:{},lockage:{},lounger:{},manakin:{},masking:{},meshing:{},mileage:{},mintage:{},mortice:{},mortise:{},movable:{},muffler:{},palette:{},pendant:{},pendent:{},pennant:{},pillbox:{},poleaxe:{},portage:{},pottery:{},priming:{},quarrel:{},readout:{},retread:{},roundel:{},rubbing:{},scupper:{},scuttle:{},serpent:{},shampoo:{},shellac:{},shutter:{},snaffle:{},snorkel:{},spangle:{},spouter:{},stabile:{},stinker:{},tankage:{},toehold:{},tracing:{},treadle:{},trefoil:{},truckle:{},trundle:{},vesture:{},webbing:{},whipsaw:{},wrapper:{},additive:{},adjuvant:{},aperture:{},aquatint:{},backdoor:{},basilisk:{},blowback:{},bludgeon:{},breakage:{},causeway:{},checkout:{},clincher:{},compress:{},corduroy:{},coupling:{},crossbar:{},currency:{},detector:{},dividend:{},dogtooth:{},downcast:{},followup:{},frontage:{},giveaway:{},goodwill:{},hardware:{},headgear:{},headshot:{},hypnotic:{},ignition:{},inhalant:{},lipstick:{},masthead:{},meniscus:{},metallic:{},modeling:{},nautilus:{},neckband:{},nightcap:{},ornament:{},outboard:{},partizan:{},pavement:{},pectoral:{},planking:{},plumbing:{},portable:{},pressing:{},radiator:{},remittal:{},residual:{},resource:{},roulette:{},scaffold:{},scapular:{},scissors:{plural:"scissors"},scrabble:{},springer:{},sunburst:{},tapestry:{},taxation:{},thrasher:{},tomahawk:{},totality:{},tympanum:{},valuable:{},vignette:{},wardrobe:{},widening:{},admixture:{},antiquity:{},aquaplane:{},bagatelle:{},bastinado:{},blindfold:{},blueprint:{},boomerang:{},carpetbag:{},crinoline:{},depressor:{},detergent:{},doodlebug:{},downstage:{},emergency:{},endowment:{},equalizer:{},exemption:{},extortion:{},extractor:{},facsimile:{},freewheel:{},gabardine:{},grotesque:{},hemstitch:{},horseshoe:{},invention:{},jackknife:{},microwave:{},millstone:{},miniature:{},modernism:{},nosepiece:{},ownership:{},packaging:{},pargeting:{},patchwork:{},pinstripe:{},polyester:{},potpourri:{},recording:{},refresher:{},semaphore:{},semblance:{},shielding:{},sideboard:{},skyrocket:{},slapstick:{},soporific:{},spectacle:{},starboard:{},telephone:{},telescope:{},treadmill:{},turntable:{},verdigris:{},videotape:{},whirligig:{},allocation:{},ambulatory:{},anesthetic:{},assistance:{},astringent:{},automation:{},cantilever:{},chinchilla:{},concertina:{},constraint:{},deductible:{},depilatory:{},disposable:{},elongation:{},escutcheon:{},featherbed:{},foreground:{},forfeiture:{},guillotine:{},hammerhead:{},hydroplane:{},innovation:{},intoxicant:{},knockabout:{},lithograph:{},monochrome:{},nonpayment:{},nutcracker:{},pargetting:{},peripheral:{},polychrome:{},redemption:{},stabilizer:{},stenograph:{},subvention:{},sustenance:{},technology:{},television:{},waterspout:{},anaesthetic:{},anamorphism:{},concealment:{},containment:{},copperplate:{},cornerstone:{},counterfeit:{},countersink:{},cryptograph:{},delineation:{},delinquency:{},encumbrance:{},fingerboard:{},fluorescent:{},incumbrance:{},perforation:{},pyrotechnic:{},retribution:{},subsistence:{},tensiometer:{},transporter:{},undercharge:{},withholding:{},dispensation:{},electrolytic:{},encrustation:{},inclinometer:{},incrustation:{},installation:{},intermixture:{},photogravure:{},straightaway:{},transparency:{},appropriation:{},embellishment:{},improvisation:{},merchandising:{},mystification:{},quadruplicate:{},semiautomatic:{},pharmaceutical:{},superannuation:{},aba:{},boa:{},dag:{},fax:{},gad:{},keg:{},nib:{},nog:{},pix:{},pyx:{},rep:{},ski:{},taw:{},urn:{},ante:{},arms:{},bale:{},berm:{},bier:{},bitt:{},bola:{},bolo:{},brad:{},cape:{},cask:{},cent:{},coax:{},coca:{},cosh:{},dime:{},dole:{},doll:{},garb:{},gilt:{},gyro:{},hasp:{},hypo:{},ikon:{},juju:{},lane:{},lint:{},luge:{},lute:{},maxi:{},maze:{},mini:{},mitt:{},mule:{},pail:{},perk:{},plat:{},pork:{},pouf:{},rung:{},scow:{},silk:{},sill:{},skep:{},sled:{},tamp:{},tapa:{},topi:{},trey:{},vape:{},wale:{},wick:{},adobe:{},aegis:{},aglet:{},album:{},alley:{},anode:{},anvil:{},arrow:{},auger:{},batik:{},bogie:{},bolus:{},bongo:{},borer:{},bribe:{},bulla:{},caddy:{},canoe:{},chime:{},coign:{},debit:{},denim:{},depot:{},diary:{},diode:{},drier:{},flask:{},flume:{},fount:{},frier:{},fryer:{},gauze:{},globe:{},golem:{},hijab:{},inlet:{},jimmy:{},jorum:{},kayak:{},khaki:{},lasso:{},latex:{},lisle:{},lorry:{},lucre:{},manta:{},mimeo:{},mizen:{},moire:{},mulch:{},newel:{},nylon:{},penny:{},piste:{},plush:{},poker:{},prism:{},pyxis:{},ranch:{},razor:{},relic:{},rouge:{},ruler:{},sabot:{},scape:{},sedan:{},seine:{},servo:{},shelf:{plural:"shelves"},slops:{},spoke:{},sprig:{},stele:{},steps:{},stoup:{},stove:{},strop:{},suede:{},swage:{},tammy:{},tanka:{},tappa:{},teddy:{},terms:{},toque:{},torus:{},towel:{},tunic:{},tweed:{},usury:{},verso:{},vizor:{},waist:{},winch:{},withe:{},xerox:{},yacht:{},abacus:{},afghan:{},aiglet:{},alidad:{},amends:{},arctic:{},artery:{},avenue:{},banger:{},bangle:{},banian:{},banyan:{},bauble:{},beaker:{},bicorn:{},blazon:{},boiler:{},bracer:{},broach:{},bumper:{},burner:{},buzzer:{},caftan:{},calash:{},camera:{},camion:{},camlet:{},capote:{},carton:{},casein:{},catgut:{},chaise:{},cheque:{},chiton:{},chukka:{},cither:{},cloaca:{},cloche:{},coffer:{},coffin:{},coigne:{},colors:{},corbel:{},corker:{},corset:{},crayon:{},crutch:{},dagger:{},daybed:{},detour:{},diaper:{},dickie:{},dipole:{},dirndl:{},discus:{},dogleg:{},dolman:{},dosage:{},duffel:{},duffle:{},eyecup:{},fabric:{},facade:{},falsie:{},fanjet:{},fascia:{},fetter:{},firkin:{},fizgig:{},floppy:{},frieze:{},garter:{},gimlet:{},goblet:{},guimpe:{},guinea:{},gunnel:{},harrow:{},helmet:{},hookup:{},hotbed:{},impost:{},instep:{},iodine:{},island:{},jersey:{},jetsam:{},jigsaw:{},juicer:{},kaftan:{},kibble:{},kirtle:{},lateen:{},laurel:{},ledger:{},linage:{},lunula:{},magnet:{},markup:{},miotic:{},mizzen:{},myotic:{},nipple:{},nozzle:{},onager:{},pajama:{},pavage:{},pellet:{},pennon:{},peplum:{},peyote:{},pincer:{},pipage:{},pomade:{},pompon:{},popper:{},pyjama:{},ragbag:{},reamer:{},remake:{},reseau:{},rudder:{},russet:{},scythe:{},settee:{},shades:{},shorts:{},siding:{},sleeve:{},sleigh:{},spinet:{},spline:{},stoker:{},stylus:{},sublet:{},subway:{},surtax:{},swathe:{},swivel:{},syrinx:{},taenia:{},talcum:{},tariff:{},teacup:{},teeter:{},tenner:{},tether:{},thwart:{},tocsin:{},trophy:{},trowel:{},turban:{},viewer:{},waggon:{},wampum:{},wherry:{},wicker:{},willow:{},wiring:{},woolen:{},yarder:{},zipper:{},acetate:{},aerosol:{},airline:{},alidade:{},ampulla:{},android:{},aneroid:{},annulet:{},anodyne:{},apanage:{},apparel:{},archive:{},armband:{},armilla:{},arrears:{},banding:{},basting:{},batting:{},bayonet:{},beading:{},bedding:{},bladder:{},blocker:{},blusher:{},bollock:{},bouquet:{},bracing:{},brocade:{},broiler:{},bullion:{},bunting:{},burthen:{},bushing:{},caleche:{},caliper:{},cathode:{},catwalk:{},cautery:{},charger:{},charnel:{},chemise:{},chevron:{},chimney:{},chlamys:{},circlet:{},colours:{},commode:{},cooling:{},cordage:{},coronet:{},corsair:{},crampon:{},cutaway:{},daybook:{},deadeye:{},decoder:{},diagram:{},doeskin:{},dogsled:{},doormat:{},dragger:{},dragnet:{},drapery:{},drawers:{},dustpan:{},escheat:{},eyehole:{},fixings:{},flatbed:{},flattop:{},flipper:{},foghorn:{},foliage:{},footage:{},foretop:{},forgery:{},frigate:{},funding:{},furring:{},fustian:{},garment:{},garotte:{},garrote:{},gouache:{},grapnel:{},griddle:{},hackney:{},hammock:{},harpoon:{},hassock:{},hatchel:{},hatchet:{},heating:{},hedging:{},hibachi:{},hobnail:{},holding:{},holster:{},hydrant:{},iceboat:{},igniter:{},impasse:{},ironing:{},jackpot:{},javelin:{},joinery:{},fibre:{},hazel:{},lemon:{},peach:{},plank:{},raven:{},snipe:{},spine:{},steer:{},stint:{},stunt:{},bleach:{},breath:{},callus:{},cherry:{},dimple:{},entire:{},ferret:{},filler:{},hybrid:{},jackal:{},marrow:{},orange:{},radish:{},spruce:{},stifle:{},winkle:{},endemic:{},vanilla:{},beefwood:{},calabash:{},concrete:{},emission:{},kingfish:{},solution:{},volatile:{},partridge:{},repellant:{},derivative:{},thickening:{},ash:{},bud:{},cob:{},hen:{},mew:{},mud:{},mum:{},paw:{},roe:{},sow:{},soy:{},wax:{},yam:{},beef:{},burl:{},calf:{plural:"calves"},chat:{},fowl:{},fuzz:{},gill:{},grub:{},hock:{},hoof:{},lobe:{},rose:{},scup:{},soup:{},swan:{},tint:{},tuna:{},tusk:{},alloy:{},briar:{},clove:{},coney:{},ebony:{},ether:{},filth:{},flesh:{},gumbo:{},homer:{},jelly:{},matte:{},mocha:{},reeve:{},wrack:{},annual:{},canine:{},carrot:{},cereal:{},cockle:{},feeler:{},fennel:{},flimsy:{},gargle:{},gravel:{},grouse:{},indigo:{},mammee:{},medlar:{},monkey:{},nebula:{},oyster:{},salmon:{plural:"salmon"},shiner:{},shrimp:{},sprout:{},stigma:{},blossom:{},blubber:{},buffalo:{},cabbage:{},calamus:{},catfish:{},caudate:{},caustic:{},chelate:{},chicory:{},ciliate:{},essence:{},griffon:{},hemlock:{},hydrate:{},incense:{},lighter:{},remount:{},sardine:{},stinger:{},vitriol:{},ambrosia:{},billfish:{},blackcap:{},crawfish:{},crayfish:{},earthnut:{},escallop:{},filament:{},flounder:{},infusion:{},ironwood:{},quandong:{},relative:{},ringtail:{},screamer:{},sycamore:{},alabaster:{},algarroba:{},broadbill:{},composite:{},fulminate:{},perennial:{},tangerine:{},bladderpod:{},granadilla:{},heartsease:{},periwinkle:{},tumbleweed:{},agglomerate:{},bittersweet:{},intermediate:{},dye:{},elk:{},fig:{},haw:{},oka:{},pea:{},pee:{},rye:{},sac:{},tar:{},yak:{},carp:{},clay:{},coma:{},cony:{},crud:{},cusk:{},dung:{},fang:{},foam:{},germ:{},glue:{},hare:{},hind:{},husk:{},kiwi:{},lake:{},mung:{},okra:{},pine:{},pith:{},puke:{},rice:{},roan:{},sloe:{},taro:{},teal:{},titi:{},twig:{},amber:{},anime:{},berry:{},boxer:{},carob:{},cedar:{},chine:{},guava:{},hound:{},husky:{},kauri:{},lemma:{},monad:{},ocher:{},ochre:{},onion:{},ounce:{},pansy:{},pecan:{},pewit:{},prawn:{},quail:{},shuck:{},sloth:{},slush:{},smelt:{},snail:{},snout:{},spawn:{},swift:{},tabby:{},thorn:{},topaz:{},umber:{},virus:{},wafer:{},wahoo:{},wheat:{},whelk:{},badger:{},bonito:{},broody:{},chrome:{},cirrus:{},cocoon:{},cowpea:{},cuckoo:{},elixir:{},grease:{},grubby:{},howler:{},jabiru:{},jargon:{},jujube:{},kernel:{},leaven:{},lentil:{},liquor:{},locust:{},manioc:{},mastic:{},mentum:{},mildew:{},mimosa:{},mullet:{},muscat:{},mutant:{},nectar:{},nettle:{},nodule:{},pawpaw:{},pecker:{},plasma:{},ruddle:{},sallow:{},shoddy:{},squill:{},starch:{},stroma:{},stucco:{},sunray:{},thorax:{},tissue:{},violet:{},walnut:{},warble:{},amyloid:{},antenna:{plural:"antennae"},apricot:{},aquatic:{},asphalt:{},avocado:{},beebalm:{},bobtail:{},builder:{},bulldog:{},caltrop:{},cayenne:{},chinook:{},coconut:{},cricket:{},cudweed:{},currant:{},cuticle:{},dasheen:{},gallfly:{},juniper:{},lacquer:{},leaflet:{},lettuce:{},macadam:{},mordant:{},mustard:{},packing:{},panther:{},papilla:{},papyrus:{},parsnip:{},pigweed:{},pollard:{},redfish:{},redwood:{},rubbish:{},saffron:{},salsify:{},shallot:{},slating:{},solvate:{},solvent:{},soybean:{},sunfish:{},truffle:{},whisker:{},abrasive:{},allspice:{},angelica:{},biennial:{},bilberry:{},bluebell:{},chickpea:{},cinnabar:{},cinnamon:{},congener:{},creosote:{},demerara:{},duckbill:{},firebird:{},fleabane:{},humanity:{},lavender:{},mahogany:{},monkfish:{},paraffin:{},peduncle:{},peroxide:{},plantain:{},rockfish:{},sandarac:{},sandwort:{},scammony:{},shamrock:{},skipjack:{},skullcap:{},snowbird:{},suckling:{},tubercle:{},alligator:{},angelfish:{},arachnoid:{},arrowroot:{},bearberry:{},blackfish:{},buckthorn:{},capitulum:{},carbonate:{},carnation:{},celluloid:{},chemistry:{},coriander:{},corrosive:{},crabapple:{},devilfish:{},emanation:{},groundnut:{},horseback:{},horsemint:{},injection:{},matchwood:{},mistletoe:{},offspring:{plural:"offspring"},pyrethrum:{},raspberry:{},razorback:{},satinwood:{},sheepskin:{},tomatillo:{},waxflower:{},whitefish:{},ammunition:{},bitterwood:{},blackberry:{},butterfish:{},chinquapin:{},coneflower:{},flagellate:{},flamboyant:{},fledgeling:{},insulation:{},peppermint:{},receptacle:{},strawberry:{},watercress:{},chittamwood:{},everlasting:{},fomentation:{},helleborine:{},honeysuckle:{},horseradish:{},huckleberry:{},salmonberry:{},shittimwood:{},strawflower:{},ultramarine:{},whitethroat:{},wintergreen:{},helmetflower:{},impregnation:{},quintessence:{},sternutatory:{},thimbleberry:{},contamination:{},extravasation:{},leatherjacket:{},pulverisation:{},pulverization:{},tortoiseshell:{},ti:{},ala:{},asp:{},eel:{},elm:{},fir:{},gar:{},neb:{},nit:{},oak:{},oat:{},sol:{},tom:{},yew:{},agar:{},akee:{},anil:{},atom:{},balm:{},bast:{},beet:{},boar:{},bole:{},bran:{},brit:{},cere:{},cero:{},chow:{},coho:{},dahl:{},dill:{},flax:{},foal:{},glop:{},gnat:{},hake:{},herb:{},hoar:{},homo:{},kaki:{},kino:{},leek:{},loin:{},mite:{},musk:{},parr:{},pear:{},poon:{},puka:{},rhea:{},saki:{},seta:{},shad:{},silt:{},slag:{},soda:{},soma:{},soot:{},soya:{},talc:{},teak:{},tufa:{},unai:{},unau:{},whey:{},woad:{},wort:{},yolk:{},zinc:{},abaca:{},alder:{},alula:{},amino:{},anise:{},apple:{},aroid:{},aster:{},balsa:{},basil:{},beech:{},betel:{},biddy:{},billy:{},biped:{},booby:{},britt:{},bruin:{},cairn:{},capon:{},caulk:{},chard:{},chess:{},chick:{},cisco:{},cohoe:{},comma:{},croup:{},cumin:{},dross:{},elver:{},epoxy:{},ergot:{},falls:{},flint:{},fossa:{},genip:{},grout:{},grume:{},henna:{},hilum:{},humus:{},hydra:{},icaco:{},ilama:{},imago:{},ivory:{},kapok:{},kenaf:{},lapin:{},larch:{},lilac:{},lotus:{},luffa:{},mahoe:{},maize:{},mamey:{},mango:{},manna:{},melon:{},moong:{},naiad:{},nanny:{},nopal:{},orris:{},osier:{},otter:{},ovary:{},ovule:{},pacer:{},panda:{},papaw:{},piggy:{},pilus:{},pinna:{},pixie:{},polyp:{},potto:{},putty:{},quira:{},robin:{},roble:{},rosin:{},scrod:{},sepia:{},sisal:{},slime:{},sorus:{},sprat:{},squid:{},stoma:{},sumac:{},swede:{},theca:{},thyme:{},trout:{plural:"trout"},tunny:{},vapor:{},velum:{},venom:{},vinyl:{},whelp:{},yeast:{},acetum:{},acinus:{},acumen:{},adduct:{},agaric:{},alkali:{},almond:{},anuran:{},archil:{},argent:{},balata:{},bamboo:{},bantam:{},barley:{},basset:{},beluga:{},bennet:{},bluing:{},bonduc:{},borage:{},capsid:{},cashew:{},cassia:{},caudex:{},celery:{},chives:{},cilium:{},citron:{},cobnut:{},cocker:{},cosmos:{},cowage:{},croton:{},cupule:{},cushaw:{},darter:{},dentin:{},dobson:{},dodder:{},donkey:{},durian:{},embryo:{},endive:{},ermine:{},falcon:{},feijoa:{},feline:{},fisher:{},fucoid:{},gadfly:{},garlic:{},glycol:{},hackle:{},haunch:{},herpes:{},hyssop:{},kaffir:{},kitten:{},lichee:{},limpet:{},linden:{},linnet:{},litchi:{},loofah:{},loquat:{},lovage:{},lupine:{},madder:{},maguey:{},manure:{},marang:{},mescal:{},mocker:{},mombin:{},mucoid:{},mudcat:{},munggo:{},murine:{},mussel:{},myrtle:{},nipper:{},nutmeg:{},obeche:{},orchil:{},orchis:{},oriole:{},padauk:{},paigle:{},papaya:{},parget:{},pasang:{},peewee:{},peewit:{},phenol:{},plaice:{},pomelo:{},poplar:{},possum:{},potato:{},pothos:{},pouter:{},puffer:{},pullet:{},pumice:{},pyrene:{},quahog:{},quartz:{},quince:{},rachis:{},raffia:{},ratter:{},relict:{},sabicu:{},saline:{},sapote:{},saurel:{},schrod:{},senega:{},septum:{},setter:{},sierra:{},simian:{},sludge:{},solder:{},spirea:{},stevia:{},sulfur:{},thrift:{},toetoe:{},tomato:{},tophus:{},triton:{},tupelo:{},turbot:{},turnip:{},vapour:{},vellum:{},wapiti:{},wasabi:{},acerola:{},actinon:{},aculeus:{},adamant:{},albumen:{},alewife:{},alfalfa:{},amboyna:{},anchovy:{},anemone:{},anionic:{},annelid:{},annulus:{},antacid:{},antlion:{},arsenic:{},aurochs:{},babbitt:{},barilla:{},beeswax:{},bimetal:{},biomass:{},bloomer:{},blotter:{},bluefin:{},blueing:{},boneset:{},boxwood:{},bracken:{},brocket:{},bromide:{},buckeye:{},bugbane:{},bugloss:{},bullock:{},bulrush:{},buzzard:{},cackler:{},cacodyl:{},caliche:{},calycle:{},cambium:{},capulin:{},caraway:{},cardoon:{},catbird:{},catechu:{},celtuce:{},ceriman:{},chalaza:{},chamois:{},chervil:{},chigger:{},citrate:{},cocoyam:{},codfish:{},comfrey:{},compost:{},cowslip:{},crappie:{},crawdad:{},crinoid:{},cyanide:{},cypress:{},dabbler:{},denizen:{},diploid:{},dogfish:{},dogwood:{},echidna:{},eelpout:{},enation:{},fallout:{},ferrite:{},fetlock:{},filaria:{},filbert:{},firebug:{},firefly:{},frijole:{},fuchsia:{},gamboge:{},ginseng:{},girasol:{},glutton:{},gobbler:{},grackle:{},grampus:{},granite:{},grizzly:{},grouper:{},grunter:{},gudgeon:{},haddock:{},halibut:{},haploid:{},haricot:{},heather:{},hepatic:{},herring:{},hickory:{},hogfish:{},honesty:{},hyaline:{},ignitor:{},inducer:{},jackass:{},jewfish:{},jonquil:{},kestrel:{},kingcup:{},kumquat:{},lactate:{},langsat:{},lanolin:{},lingcod:{},lobster:{},logwood:{},mahagua:{},majagua:{},malacca:{},mammoth:{},marabou:{},marasca:{},menthol:{},mercury:{},monarch:{},moneran:{},mongrel:{},moorhen:{},morello:{},muskrat:{},nervure:{},nitrate:{},octopus:{},oldwife:{},opossum:{},oregano:{},ostrich:{},oxheart:{},parsley:{},peacock:{},pigfish:{},pimento:{},piranha:{},plumcot:{},pollack:{},pollock:{},pompano:{},popcorn:{},poultry:{},pricket:{},puccoon:{},pulasan:{},pyrogen:{},quahaug:{},quassia:{},quetzal:{},raccoon:{},ragweed:{},ragwort:{},rattler:{},redbird:{},redpoll:{},redtail:{},reducer:{},redwing:{},remover:{},residue:{},retinal:{},rhubarb:{},rosebud:{},rostrum:{},satsuma:{},saurian:{},sequoia:{},seriema:{},skylark:{},sockeye:{},soursop:{},sparrow:{},spinach:{},spiraea:{},stentor:{},steroid:{},stubble:{},sulfate:{},sulphur:{},tangelo:{},taproot:{},tarweed:{},tarwood:{},tattler:{},taurine:{},teargas:{},timothy:{},tobacco:{},topknot:{},tortrix:{},trotter:{},varmint:{},verdure:{},viceroy:{},vinegar:{},viscose:{},vulture:{},walleye:{},waratah:{},warbler:{},waxwork:{},whooper:{},wilding:{},witloof:{},wryneck:{},abradant:{},absinthe:{},acceptor:{},actinoid:{},adhesive:{},adjutant:{},ageratum:{},agueweed:{},albacore:{},amarelle:{},amethyst:{},ammoniac:{},argonaut:{},armyworm:{},auricula:{},balancer:{},baldpate:{},barnacle:{},basswood:{},bayberry:{},bearskin:{},beetroot:{},birdlime:{},blackfly:{},blacktop:{},bluebird:{},bluefish:{},boarfish:{},bocconia:{},boxberry:{},brisling:{},broccoli:{},buckskin:{},bullhead:{},bullrush:{},canistel:{},capuchin:{},carangid:{},carbonyl:{},carboxyl:{},cardamom:{},cardamon:{},carinate:{},carnauba:{},carotene:{},cashmere:{},catalyst:{},catchfly:{},celeriac:{},cetacean:{},chimaera:{},chloride:{},cilantro:{},cinchona:{},citrange:{},cockspur:{},conodont:{},costmary:{},cowberry:{},cucumber:{},deadwood:{},detritus:{},dewberry:{},dilution:{},dolomite:{},duckling:{},ectozoan:{},eelgrass:{},effluent:{},eggplant:{},emulsion:{},estragon:{},filtrate:{},fireweed:{},flathead:{},flooring:{},forelock:{},galangal:{},garbanzo:{},grayback:{},guaiacum:{},hardtack:{},harebell:{},hawkweed:{},hazelnut:{},hedgehog:{},hepatica:{},hookworm:{},hornwort:{},horsefly:{},hyacinth:{},impurity:{},iodoform:{},jalapeno:{},jamberry:{},japonica:{},keurboom:{},kindling:{},kingwood:{},kinkajou:{},kohlrabi:{},labdanum:{},lambskin:{},locoweed:{},lovebird:{},magnolia:{},mahimahi:{},mandrake:{},margarin:{},marjoram:{},medusoid:{},mephitis:{},migrator:{},molecule:{},moonfish:{},mucilage:{},mulberry:{},nestling:{},omnivore:{},ovenbird:{},pandanus:{},pickerel:{},pilchard:{},pimiento:{},pitahaya:{},placenta:{},plumbago:{},predator:{},ptomaine:{},puffball:{},pulassan:{},purebred:{},pyrectic:{},quandang:{},quickset:{},rambotan:{},rambutan:{},redberry:{},redstart:{},reedbird:{},ricebird:{},richweed:{},ringdove:{},rockrose:{},rosefish:{},rosemary:{},rosewood:{},ruminant:{},rutabaga:{},sailfish:{},salsilla:{},saltwort:{},sandfish:{},scallion:{},seahorse:{},sealskin:{},sewerage:{},shoveler:{},siderite:{},silkworm:{},sparling:{},squealer:{},squirrel:{},stearate:{},stinkpot:{},superbug:{},surffish:{},sweetsop:{},tamarind:{},tarragon:{},teaberry:{},thresher:{},throstle:{},tilefish:{},tomentum:{},toxicant:{},turmeric:{},ungulate:{},univalve:{},urochord:{},vesicant:{},warragal:{},warrigal:{},watchdog:{},waxberry:{},weakfish:{},wolffish:{},woodbine:{},woodruff:{},wormcast:{},wriggler:{},zucchini:{},absorbent:{},adsorbate:{},adsorbent:{},albatross:{},almandine:{},andromeda:{},antiknock:{},apophysis:{},archangel:{},arsenical:{},artichoke:{},asparagus:{},aubergine:{},bacteroid:{},blackbird:{},blindworm:{},bluegrass:{},bluepoint:{},broadtail:{},brooklime:{},brookweed:{},brushwood:{},buckwheat:{},bugleweed:{},buteonine:{},butternut:{},caecilian:{},calyculus:{},candlenut:{},cantaloup:{},carambola:{},carbonado:{},carbuncle:{},cardboard:{},carnivore:{},catamount:{},celandine:{},chameleon:{},chatterer:{},chelonian:{},cherimoya:{},chickweed:{},chlamydia:{},clamshell:{},clapboard:{},coachwhip:{},cochineal:{},cocklebur:{},cocozelle:{},coltsfoot:{},commensal:{},courgette:{},crackling:{},cupflower:{},cyanamide:{},digestive:{},digitalis:{},driftfish:{},ecrevisse:{},ectoplasm:{},eiderdown:{},ephemeral:{},eutherian:{},evergreen:{},excretion:{},exudation:{},fenugreek:{},firebrand:{},firestone:{},flagellum:{},frostweed:{},funiculus:{},gladiolus:{},glasswort:{},goldeneye:{},goldfinch:{},grapevine:{},grenadier:{},hackberry:{},hamadryad:{},heartleaf:{},hellebore:{},hollyhock:{},horehound:{},horsebean:{},horsehair:{},horseweed:{},hortensia:{},hydroxide:{},jackfruit:{},jacksnipe:{},jellyfish:{},juneberry:{},lancewood:{},langouste:{},leavening:{},lemonwood:{},mammalian:{},manzanita:{},maravilla:{},marihuana:{},marijuana:{},moosewood:{},muscadine:{},muskmelon:{},nakedwood:{},nectarine:{},nighthawk:{},pasturage:{},patchouli:{},patchouly:{},pelecypod:{},pellitory:{},peregrine:{},peristome:{},persimmon:{},phosphate:{},pimpernel:{},pinchbeck:{},pineapple:{},pistachio:{},polyploid:{},probiotic:{},proboscis:{},protozoan:{},pureblood:{},quadruped:{},rauwolfia:{},recycling:{},reptilian:{},reticulum:{},rockcress:{},rootstock:{},rosinweed:{},sandpaper:{},sapodilla:{},sassafras:{},sheldrake:{},shingling:{},shoveller:{},siccative:{},sicklepod:{},snakeroot:{},snowflake:{},sourdough:{},spicebush:{},spirillum:{},stainless:{},stiffener:{},strangler:{},strawworm:{},sugarcane:{},swordfish:{},tamarindo:{},tarantula:{},topminnow:{},tulipwood:{},turquoise:{},twayblade:{},twinberry:{},wallpaper:{},whitebait:{},whiteface:{},wineberry:{},wolverine:{},workhorse:{},adulterant:{},amygdaloid:{},anopheline:{},aquamarine:{},belladonna:{},bellwether:{},bitterweed:{},blacksnake:{},blackthorn:{},bluebonnet:{},bluebottle:{},bottlenose:{},brachiopod:{},brazilwood:{},breadfruit:{},butterball:{},butterweed:{},candelilla:{},cantaloupe:{},catarrhine:{},cellulosic:{},chatterbox:{},chinaberry:{},cinquefoil:{},citronwood:{},clementine:{},condensate:{},copperhead:{},coralberry:{},cornflower:{},cottonweed:{},cottonwood:{},crossbreed:{},crustacean:{},deathwatch:{},demoiselle:{},dollarfish:{},elderberry:{},exhalation:{},feathertop:{},fetterbush:{},fiddlehead:{},flycatcher:{},fritillary:{},garambulla:{},goldenbush:{},gooseberry:{},grapefruit:{},jaboticaba:{},jackrabbit:{},ketembilla:{},kitembilla:{},lemongrass:{},littleneck:{},loganberry:{},loggerhead:{},mangosteen:{},marblewood:{},marguerite:{},massasauga:{},meerschaum:{},monoclonal:{},nasturtium:{},needlefish:{},nonstarter:{},ornamental:{},pacesetter:{},parenchyma:{},pennyroyal:{},pepperwort:{},plasmodium:{},princewood:{},propellant:{},propellent:{},pufferfish:{},pyrimidine:{},quercitron:{},restharrow:{},restrainer:{},ribbonfish:{},ribbonwood:{},rudderfish:{},sapphirine:{},scorzonera:{},sidewinder:{},silverbush:{},silverfish:{},silverweed:{},spiceberry:{},sticktight:{},sugarberry:{},superoxide:{},tarmacadam:{},turpentine:{},turtledove:{},velvetleaf:{},vertebrate:{},vesicatory:{},wandflower:{},watermelon:{},windowpane:{},witchgrass:{},yellowbird:{},yellowtail:{},yellowwood:{},adulterator:{},arthrospore:{},artiodactyl:{},bactericide:{},boysenberry:{},branchiopod:{},buffalofish:{},butcherbird:{},cauliflower:{},cherrystone:{},chittimwood:{},chokecherry:{},combustible:{},conspecific:{},digitigrade:{},dolphinfish:{},flameflower:{},gillyflower:{},groundberry:{},groundcover:{},heterocycle:{},honeyflower:{},insectivore:{},leatherleaf:{},leatherwood:{},lingonberry:{},liquidambar:{},loosestrife:{},muskellunge:{},plantigrade:{},platyrrhine:{},pomegranate:{},precipitant:{},prickleback:{},quicksilver:{},recombinant:{},refrigerant:{},shellflower:{},silversides:{},sleuthhound:{},swallowwort:{},unguiculate:{},waldmeister:{},archosaurian:{},distillation:{},heterocyclic:{},honeycreeper:{},instillation:{},invertebrate:{},nonsteroidal:{},placentation:{},sarsaparilla:{},serviceberry:{},squirrelfish:{},transudation:{},weatherboard:{},whortleberry:{},yellowhammer:{},branchiopodan:{},inflorescence:{},platyrrhinian:{},semiconductor:{},transactinide:{},vitrification:{},fructification:{},aa:{},ai:{},ani:{},auk:{},awn:{},bot:{},dak:{},daw:{},dew:{},doe:{},dug:{},eft:{},ern:{},ewe:{},gib:{},gnu:{},goo:{},ivy:{},jay:{},kea:{},kob:{},lac:{},lye:{},may:{},mei:{},moa:{},oca:{},ola:{},olm:{},pia:{},pug:{},teg:{},tup:{},acyl:{},agua:{},aloe:{},amyl:{},anoa:{},apar:{},aril:{},arui:{},atar:{},axil:{},barm:{},baya:{},bine:{},boll:{},bufo:{},buna:{},calx:{},cavy:{},chub:{},cleg:{},coco:{},colt:{},coot:{},corm:{},cows:{},craw:{},culm:{},cyme:{},dace:{},dalo:{},deer:{plural:"deer"},derv:{},dhak:{},dhal:{},dika:{},diol:{},disa:{},dita:{},dogy:{},doob:{},dopa:{},enol:{},erne:{},eyas:{},fern:{},fice:{},floc:{},fuji:{},gean:{},goby:{},guan:{},guar:{},guib:{},haem:{},halm:{},hart:{},heme:{},hogg:{},hops:{},hoya:{},ibex:{},ibis:{},inga:{},jird:{},jute:{},kali:{},kelp:{},kola:{},kudu:{},lily:{},lino:{},liza:{},loam:{},loir:{},lory:{},lynx:{},mako:{},mamo:{},mara:{},marl:{},merl:{},mica:{},milo:{},miro:{},mola:{},moss:{},munj:{},mutt:{},myna:{},nagi:{},napa:{},napu:{},neem:{},neon:{},olla:{},ombu:{},onyx:{},opah:{},opal:{},orca:{},oryx:{},paca:{},peat:{},peba:{},pika:{},pome:{},puku:{},puma:{},pupa:{},ragi:{},rimu:{},rudd:{},sago:{},salp:{},sang:{},sard:{},scut:{},sial:{},sika:{},sild:{},sima:{},skua:{},smew:{},sugi:{},tatu:{},teff:{},teju:{},tern:{},tipu:{},toad:{},tody:{},tolu:{},tuff:{},tung:{},urea:{},urus:{},vole:{},wasp:{},weka:{},blast:{},dinar:{},lapse:{},lurch:{},whirl:{},travel:{},capacity:{},encounter:{},conversion:{},separation:{},age:{},nip:{},now:{},halt:{},leap:{},mile:{},peak:{},peso:{},slam:{},term:{},wake:{},faint:{},scoop:{},surge:{},third:{},trick:{},bother:{},cackle:{},motion:{},chatter:{},reversal:{},elevation:{},experience:{},dab:{},pat:{},cube:{},howl:{},over:{},peep:{},span:{},cause:{},death:{},plump:{},plunk:{},poise:{},pulse:{},shame:{},spark:{},twang:{},wound:{},cipher:{},crunch:{},damage:{},fusion:{},period:{},racket:{},repeat:{},supply:{},wallow:{},wonder:{},dribble:{},failure:{},outrage:{},sparkle:{},backfire:{},campaign:{},delivery:{},increase:{},variance:{},explosion:{},correction:{},disturbance:{},translation:{},displacement:{},transposition:{},hum:{},mug:{},buzz:{},cord:{},dawn:{},fuss:{},hint:{},hiss:{},much:{},past:{},ping:{},rout:{},seek:{},tide:{},warp:{},birth:{},blend:{},crumb:{},delay:{},rupee:{},worst:{},climax:{},deluge:{},dirham:{},recoil:{},replay:{},rhythm:{},rising:{},descent:{},grumble:{},impulse:{},respite:{},scruple:{},triumph:{},addition:{},dogfight:{},eruption:{},occasion:{},progress:{},reprieve:{},shilling:{},stampede:{},accretion:{},induction:{},appearance:{},suggestion:{},circulation:{},irradiation:{},accommodation:{},precipitation:{},in:{},ebb:{},mil:{},zap:{},gush:{},honk:{},lull:{},plop:{},rave:{},ream:{},slap:{},then:{},zoom:{},fifth:{},final:{},gleam:{},reign:{},swash:{},throb:{},thump:{},tweet:{},wreck:{},wring:{},billow:{},breach:{},ending:{},fourth:{},gurgle:{},injury:{},nibble:{},parity:{},sunset:{},billion:{},history:{},instant:{},spatter:{},blackout:{},creation:{},decision:{},downhill:{},entrance:{},rational:{},trillion:{},hereafter:{},immersion:{},intrusion:{},millenary:{},remainder:{},saltation:{},adjustment:{},antecedent:{},dedication:{},deflection:{},impairment:{},limitation:{},outpouring:{},refinement:{},scattering:{},devastation:{},elaboration:{},fundamental:{},prohibition:{},retardation:{},interference:{},transmission:{},manifestation:{},scintillation:{},mi:{},kip:{},wee:{},yaw:{},bout:{},bray:{},doom:{},harm:{},haul:{},jolt:{},none:{},ooze:{},pity:{},sigh:{},surf:{},thaw:{},tour:{},alpha:{},carom:{},chunk:{},clink:{},colon:{},deuce:{},drama:{},glint:{},going:{},shtik:{},sixth:{},spurt:{},thrum:{},tinge:{},today:{},waltz:{},worth:{},bucket:{},egress:{},fathom:{},mutter:{},patter:{},picnic:{},quaver:{},ripple:{},rustle:{},shtick:{},sizzle:{},squawk:{},stride:{},tremor:{},whoosh:{},wobble:{},absence:{},allegro:{},andante:{},deficit:{},episode:{},heaving:{},raising:{},rebirth:{},roaring:{},rupture:{},screech:{},scrunch:{},seventh:{},success:{},sunrise:{},takeoff:{},trample:{},twinkle:{},cracking:{},deletion:{},incident:{},interval:{},isometry:{},overflow:{},rattling:{},skeleton:{},splatter:{},striking:{},twilight:{},upheaval:{},advantage:{},alignment:{},deflexion:{},diffusion:{},emergence:{},inflation:{},normality:{},remission:{},resultant:{},ruination:{},shakedown:{},vibration:{},yesterday:{},allegretto:{},conception:{},concoction:{},concretion:{},disruption:{},divergence:{},graduation:{},inflection:{},initiation:{},moderation:{},sprinkling:{},approaching:{},biquadratic:{},competition:{},compression:{},contraction:{},humiliation:{},permutation:{},constriction:{},ramification:{},accompaniment:{},embarrassment:{},mortification:{},rectification:{},coo:{},eve:{},gee:{},par:{},sea:{},sec:{},tot:{},won:{},yen:{},bash:{},beep:{},ding:{},dram:{},fete:{},gait:{},inch:{},lira:{},peal:{},pint:{},purr:{},rial:{},ting:{},toot:{},whiz:{},blare:{},bleat:{},brawl:{},cease:{},digit:{},dying:{},epoch:{},gravy:{},idyll:{},knell:{},metre:{},minim:{},ninth:{},plash:{},plonk:{},quake:{},quart:{},ravel:{},salvo:{},skirl:{},snore:{},spate:{},spirt:{},swish:{},tenth:{},unity:{},whack:{},whirr:{},years:{},ascent:{},bushel:{},curfew:{},drachm:{},eighth:{},enough:{},finale:{},fizzle:{},footer:{},gobble:{},jingle:{},marvel:{},myriad:{},octave:{},ravage:{},smudge:{},spritz:{},squeak:{},squeal:{},squish:{},swerve:{},tierce:{},usance:{},waxing:{},atrophy:{},banging:{},bending:{},blowout:{},centner:{},clangor:{},debacle:{},decimal:{},eclipse:{},glitter:{},kickoff:{},midterm:{},million:{},misfire:{},modulus:{},monsoon:{},ordinal:{},outflow:{},ringing:{},shimmer:{},sinking:{},smolder:{},torrent:{},twelfth:{},backwash:{},bouncing:{},downfall:{},dripping:{},drumbeat:{},eighties:{},eternity:{},exigency:{},footstep:{},furlough:{},gleaming:{},grinding:{},hardship:{},instance:{},invasion:{},majority:{},maturity:{},nineties:{},overtime:{},overture:{},pandemic:{},pounding:{},receding:{},recovery:{},rustling:{},scraping:{},sixtieth:{},smoulder:{},spoilage:{},spraying:{},tomorrow:{},touching:{},amplitude:{},ascension:{},athletics:{},avalanche:{},billionth:{},checkmate:{},clearance:{},collision:{},commotion:{},contagion:{},departure:{},fertility:{},formality:{},gestation:{},heartbeat:{},honeymoon:{},hundredth:{},interlude:{},irruption:{},lactation:{},millionth:{},multitude:{},onslaught:{},outgrowth:{},plurality:{},probation:{},pulsation:{},shrinkage:{},sixteenth:{},spreading:{},stalemate:{},throbbing:{},whistling:{},withering:{},affliction:{},alteration:{},betterment:{},dispersion:{},enervation:{},expiration:{},foreboding:{},incubation:{},incumbency:{},inevitable:{},irrational:{},jubilation:{},levitation:{},millennium:{plural:"millennia"},procession:{},repetition:{},revolution:{},sabbatical:{},solubility:{},subsidence:{},thousandth:{},undulation:{},visitation:{},accelerando:{},catastrophe:{},celebration:{},coincidence:{},consequence:{},continuance:{},deformation:{},dislocation:{},dissipation:{},expansivity:{},fluctuation:{},gravitation:{},oscillation:{},preliminary:{},punctuation:{},sufficiency:{},acceleration:{},augmentation:{},championship:{},commencement:{},conservation:{},deceleration:{},degeneration:{},encroachment:{},interlocking:{},reflectivity:{},consolidation:{},hundredweight:{},magnetisation:{},magnetization:{},regurgitation:{},sheepshearing:{},transmutation:{},conglomeration:{},materialisation:{},optic:{},patty:{},prune:{},saute:{},scalp:{},sinus:{},swill:{},bubbly:{},burgoo:{},choler:{},claret:{},cortex:{},crotch:{},drivel:{},frappe:{},hiatus:{},kosher:{},legume:{},macula:{},phlegm:{},pickle:{},stemma:{},thenar:{},tiptoe:{},adrenal:{},anatomy:{},confect:{},freckle:{},jugular:{},knuckle:{},mastoid:{},medulla:{},pudding:{},takeout:{},thyroid:{},tonsure:{},wassail:{},anterior:{},coloring:{},julienne:{},libation:{},rhomboid:{},sandwich:{},takeaway:{},appendage:{},chocolate:{},colouring:{},endocrine:{},hamstring:{},moonshine:{},permanent:{},recessive:{},turbinate:{},confection:{},hemisphere:{},ingredient:{},spatchcock:{},sweetening:{},convolution:{},pneumogastric:{},os:{},cos:{},cud:{},sup:{},caul:{},chaw:{},chin:{},chou:{},curd:{},cyst:{},fizz:{},jowl:{},mane:{},milt:{},perm:{},snot:{},sorb:{},sura:{},taco:{},booze:{},broth:{},caput:{},chili:{},cocoa:{},costa:{},cress:{},dough:{},eater:{},fanny:{},fondu:{},hyoid:{},loins:{},lolly:{},lumen:{},mamma:{},mummy:{},pasta:{},plasm:{},porgy:{},puree:{},quaff:{},quark:{},sinew:{},thigh:{},tripe:{},tummy:{},areola:{},banana:{},booger:{},bowleg:{},brunch:{},carpal:{},cervix:{},citrus:{},comfit:{},dactyl:{},dorsum:{},edible:{},flitch:{},fondue:{},fornix:{},gammon:{},herbal:{},lambda:{},malted:{},marcel:{},millet:{},monggo:{},noodle:{},paring:{},pastry:{},pelvis:{},simnel:{},spleen:{},tarsal:{},tensor:{},tipple:{},waffle:{},wonton:{},abdomen:{},adenoid:{},auricle:{},biscuit:{},brownie:{},clabber:{},criollo:{},croaker:{},cubitus:{},deltoid:{},dentine:{},dietary:{},eyeball:{},fistula:{},forearm:{},fritter:{},gherkin:{},haircut:{},headful:{},hyaloid:{},iceberg:{},isthmus:{},kneecap:{},lacteal:{},lasagna:{},lasagne:{},lozenge:{},marmite:{},midriff:{},oatmeal:{},ocellus:{},pageboy:{},paprika:{},pathway:{},pottage:{},prepuce:{},pumpkin:{},ramekin:{},ratafia:{},roulade:{},sausage:{},seltzer:{},serving:{},sidecar:{},slobber:{},sorghum:{},stirrup:{},sultana:{},teacake:{},timbale:{},toenail:{},topping:{},tostada:{},trachea:{},treacle:{},twister:{},vintage:{},abducent:{},abductor:{},afferent:{},alveolus:{},appendix:{plural:"appendices"},astragal:{},bicuspid:{},blowfish:{},blowhole:{},bouffant:{},capitate:{},chowchow:{},cobblers:{},cocktail:{},coquille:{},couscous:{},doughboy:{},doughnut:{},dumpling:{},efferent:{},eminence:{},exocrine:{},fascicle:{},flatfish:{},flatfoot:{},flummery:{},forehead:{},foreskin:{},hairline:{},honeydew:{},licorice:{},ligament:{},lollipop:{},macaroni:{},mackerel:{},marinade:{},membrane:{},monstera:{},mouthful:{},muscatel:{},pheasant:{},physique:{},potation:{},prostate:{},ramequin:{},receptor:{},sillabub:{},sinusoid:{},smoothie:{},specimen:{},streusel:{},stuffing:{},syllabub:{},teardrop:{},venation:{},windfall:{},abdominal:{},apparatus:{},blueberry:{},casserole:{},corpuscle:{},cranberry:{},demitasse:{},dentition:{},drinkable:{},drumstick:{},epiphysis:{},flageolet:{},fricassee:{},hamburger:{},labyrinth:{},lifeblood:{},lineament:{},liquorice:{},mastoidal:{},maxillary:{},navicular:{},pituitary:{},pompadour:{},provender:{},purulence:{},shellfish:{},spaghetti:{},spareribs:{},splayfoot:{},spoilable:{},sundowner:{},sweetener:{},trapezium:{},trapezoid:{},umbilical:{},ventricle:{},vestibule:{},zygomatic:{},applesauce:{},autoplasty:{},blackheart:{},breadstuff:{},cheesecake:{},comestible:{},gastronomy:{},hotchpotch:{},interstice:{},jawbreaker:{},kitambilla:{},maraschino:{},metacarpal:{},metatarsal:{},passageway:{},perishable:{},salmagundi:{},shortening:{},articulator:{},excrescence:{},grasshopper:{},griddlecake:{},intercostal:{},longanberry:{},nourishment:{},screwdriver:{},smorgasbord:{},spindlelegs:{},checkerberry:{},perspiration:{},spindleshanks:{},parasympathetic:{},ab:{},ade:{},ale:{},bap:{},bun:{},jak:{},lat:{},lox:{},pes:{},pie:{},poi:{},pud:{},pus:{},tum:{},vas:{},veg:{},anus:{},arak:{},axon:{},baba:{},bile:{},bleb:{},bleu:{},bock:{},bosc:{},choc:{},clit:{},cola:{},coxa:{},crus:{},cuke:{},duff:{},dura:{},edda:{},eggs:{},fist:{},flab:{},flan:{},fugu:{},genu:{},ghee:{},glia:{},grog:{},isaw:{},java:{},kava:{},marc:{},mayo:{},mead:{},miso:{},mons:{},naan:{},nape:{},nipa:{},oleo:{},orzo:{},ouzo:{},ovum:{},pecs:{},pita:{},pone:{},pons:{},porc:{},rete:{},rima:{},rind:{},roux:{},ruga:{},rusk:{},slaw:{},sops:{},suet:{},tofu:{},ugli:{},ulna:{},umbo:{},uvea:{},veal:{},veau:{},vena:{},vino:{},womb:{},ziti:{},zona:{},ackee:{},adobo:{},aioli:{},anjou:{},ankle:{},annon:{},aorta:{},arcus:{},aspic:{},atole:{},axone:{},babka:{},bacon:{},bagel:{},bialy:{},bigos:{},bitok:{},blanc:{},blini:{},bliny:{},boeuf:{},borsh:{},bowel:{},bursa:{},butty:{},cauda:{},cavum:{},cecum:{},celom:{},chips:{},chyle:{},cider:{},congo:{},copra:{},cornu:{},cuppa:{},cutis:{},cyder:{},cytol:{},decaf:{},donut:{},facia:{},femur:{},filum:{},flews:{},fovea:{},fries:{},gigot:{},gland:{},glans:{},gleet:{},glogg:{},glute:{},gonad:{},goody:{},grist:{},grits:{},gruel:{},gyrus:{},hilus:{},hoagy:{},hooch:{},hooks:{},hymen:{},hyson:{},ileum:{},ilium:{},incus:{},inion:{},jello:{},julep:{},kabob:{},kasha:{},kebab:{},knish:{},kumis:{},kvass:{},lansa:{},latke:{},latte:{},lichi:{},limpa:{},lymph:{},macon:{},manus:{},matzo:{},mucus:{},nacho:{},naris:{},nates:{},negus:{},offal:{},ootid:{},pekoe:{},penis:{},penne:{},perry:{},pesto:{},pilaf:{},pinky:{},pizza:{},plica:{},porta:{},pruno:{},psoas:{},pubis:{},quiff:{},raita:{},ramus:{},raphe:{},salmi:{},salsa:{},savoy:{},sebum:{},serum:{},sirup:{},skull:{},sperm:{},steak:{},sudor:{},sushi:{},taffy:{},tamal:{},tater:{},teeth:{},teres:{},tibia:{},titty:{},toddy:{},toffy:{},torso:{},torte:{},tress:{},uvula:{},vagus:{},viand:{},vodka:{},vomer:{},vulva:{},wrist:{},adnexa:{},afters:{},agnail:{},ananas:{},anlage:{},annexa:{},annona:{},antrum:{},armpit:{},arrack:{},axilla:{},baguet:{},beigel:{},biceps:{},bisque:{},blintz:{},bonbon:{},borsch:{},brazil:{},bregma:{},bulgur:{},burger:{},cachou:{},caecum:{},canape:{},canola:{},cardia:{},carina:{},carpus:{},casaba:{},catsup:{},caviar:{},chevre:{},chiasm:{},chilli:{},choana:{},coccyx:{},coelom:{},comedo:{},concha:{},confit:{},congou:{},corium:{},corpse:{},cupper:{},cuspid:{},cutlet:{},damson:{},danish:{},dermis:{},dewlap:{},dolmas:{},eclair:{},eggnog:{},eschar:{},eyelid:{},farina:{},fauces:{},fibula:{},finnan:{},flexor:{},fundus:{},gateau:{},geneva:{},giblet:{},glossa:{},gluten:{},goatee:{},gobbet:{},gonion:{},goober:{},graham:{},grappa:{},groats:{},gulyas:{},haggis:{},hairdo:{},hallah:{},hallux:{},hamate:{},haslet:{},hoagie:{},hominy:{},hommos:{},hootch:{},hotpot:{},huitre:{},hummus:{},inguen:{},intima:{},jambon:{},jugale:{},jumbal:{},karyon:{},kencur:{},kidney:{},kipper:{},kirsch:{},kishke:{},korlan:{},kummel:{},labium:{},lamina:{},lanseh:{},lanugo:{},larynx:{},lekvar:{},limbus:{},lingua:{},lobule:{},lochia:{},locule:{},lunule:{},matzoh:{},meatus:{},meninx:{},milium:{},mohawk:{},mouton:{},mucosa:{},muesli:{},muffin:{},murphy:{},mutton:{},nasion:{},nervus:{},neuron:{},nougat:{},oculus:{},omelet:{},onyxis:{},oocyte:{},oolong:{},operon:{},organs:{},paczki:{},paella:{},palate:{},paries:{},pastis:{},paunch:{},pectus:{},phyllo:{},pilaff:{},pinkie:{},pinole:{},pirogi:{},pleura:{},plexus:{},pollex:{},polony:{},posset:{},potage:{},poteen:{},potion:{},potpie:{},poulet:{},premix:{},pulque:{},purloo:{},quiche:{},rectum:{},rectus:{},repast:{},retina:{},rhaphe:{},ribier:{},rickey:{},rotgut:{},sacrum:{},salami:{},saliva:{},samosa:{},sapota:{},scampi:{},scampo:{},sclera:{},scruff:{},seckel:{},serosa:{},shandy:{},sherry:{},silage:{},skilly:{},smegma:{},soleus:{},sorbet:{},sputum:{},stapes:{},stodge:{},succus:{},sulcus:{},sundae:{},sutura:{},tahini:{},tamale:{},tarsus:{},tendon:{},testis:{},thymus:{},tidbit:{},tiffin:{},tisane:{},titbit:{},toffee:{},tonsil:{},tragus:{},troche:{},tubule:{},tunica:{},unguis:{},ureter:{},uterus:{},vagina:{},veggie:{},venula:{},venule:{},vermis:{},vesica:{},viscus:{},vitals:{},waters:{},whisky:{},wiener:{},yogurt:{},zaatar:{},zonula:{},zonule:{},zygoma:{},zygote:{},absinth:{},akvavit:{},aniseed:{},aquavit:{},arteria:{},ashcake:{},baklava:{},bannock:{},beignet:{},keen:{},rage:{},wish:{},aside:{},chafe:{},gloss:{},tense:{},whole:{},worry:{},effect:{},reject:{},riddle:{},snatch:{},speech:{},closure:{},collect:{},romance:{},flourish:{},classical:{},influence:{},substance:{},reflection:{},inclination:{},recognition:{},dot:{},nod:{},blur:{},itch:{},slur:{},solo:{},wink:{},abuse:{},acute:{},alert:{},angle:{},bluff:{},cheer:{},honor:{},humor:{},lyric:{},snarl:{},tally:{},accent:{},degree:{},detail:{},indent:{},matter:{},patent:{},rubric:{},thrill:{},abandon:{},bluster:{},concern:{},concord:{},formula:{plural:"formulae"},imprint:{},nominal:{},quality:{},reading:{},sputter:{},torture:{},wrinkle:{},contrast:{},estimate:{},harmonic:{},judgment:{},reaction:{},sanction:{},singular:{},straddle:{},construct:{},judgement:{},reflexion:{},rendering:{},universal:{},acceptance:{},discipline:{},irritation:{},regulation:{},relaxation:{},submission:{},application:{},replication:{},construction:{},introduction:{},presentation:{},cant:{},code:{},joke:{},pain:{},stab:{},trot:{},will:{},blame:{},brief:{},dodge:{},fancy:{},glide:{},grasp:{},guess:{},quote:{},scent:{},slant:{},snort:{},swoop:{},theme:{},trial:{},vocal:{},accord:{},affect:{},cancel:{},debate:{},desire:{},heroic:{},murmur:{},phrase:{},resume:{},scream:{},serial:{},tangle:{},closing:{},dissent:{},drawing:{},example:{},exhibit:{},fatigue:{},feeling:{},mention:{},partial:{},posture:{},protest:{},regress:{},telling:{},welcome:{},absolute:{},analysis:{plural:"analyses"},distress:{},pastoral:{},platform:{},temporal:{},agreement:{},attention:{},beginning:{},closeness:{},connexion:{},dimension:{},discourse:{},lightness:{},principle:{},surrender:{},assignment:{},coordinate:{},involution:{},abstraction:{},arrangement:{},conjunction:{},declaration:{},penetration:{},proposition:{},realisation:{},realization:{},condensation:{},consideration:{},no:{},cue:{},fun:{},rub:{},bias:{},gift:{},hoot:{},jazz:{},oral:{},snub:{},text:{},tune:{},urge:{},coast:{},craze:{},daily:{},debut:{},dowse:{},funny:{},logic:{},mercy:{},peace:{},rerun:{},samba:{},slang:{},taboo:{},verse:{},whine:{},words:{},aspect:{},babble:{},canker:{},choice:{},clamor:{},denial:{},device:{},esteem:{},format:{},lament:{},manual:{},menace:{},normal:{},pardon:{},regret:{},skinny:{},sorrow:{},tickle:{},twinge:{},vision:{},warmth:{},caution:{},charter:{},conceit:{},cunning:{},delight:{},dictate:{},discord:{},finance:{},harmony:{},keynote:{},knowing:{},leaning:{},lecture:{},mistake:{},musical:{},offense:{},palaver:{},preempt:{},purpose:{},pyrrhic:{},realism:{},sharing:{},texture:{},worship:{},writing:{},aspirate:{},biweekly:{},blessing:{},citation:{},despatch:{},dullness:{},feminine:{},flatness:{},geminate:{},manifest:{},personal:{},pleasure:{},politics:{},singsong:{},yielding:{},agitation:{},attrition:{},bimonthly:{},broadcast:{},confusion:{},deviation:{},disregard:{},education:{},faintness:{},heaviness:{},imitation:{},indenture:{},interview:{},isolation:{},isometric:{},minuscule:{},portrayal:{},predicate:{},provision:{},screaming:{},signature:{},spiritual:{},throwaway:{},tightness:{},accounting:{},aggression:{},assumption:{},attraction:{},commercial:{},compromise:{},confession:{},confidence:{},conformity:{},conveyance:{},detachment:{},difference:{},discretion:{},imperative:{},mellowness:{},modulation:{},tenderness:{},uneasiness:{},awkwardness:{},discernment:{},elimination:{},endorsement:{},examination:{},fabrication:{},familiarity:{},implication:{},indorsement:{},involvement:{},observation:{},obstruction:{},performance:{},requisition:{},sensitivity:{},testimonial:{},appreciation:{},articulation:{},condemnation:{},confirmation:{},deliberation:{},intervention:{},satisfaction:{},confrontation:{},decomposition:{},determination:{},reinforcement:{},understanding:{},characteristic:{},correspondence:{},sophistication:{},transformation:{},rationalisation:{},rationalization:{},dub:{},fog:{},bold:{},buoy:{},dare:{},daze:{},envy:{},gape:{},okay:{},plus:{},rasp:{},rime:{},role:{},tabu:{},yell:{},above:{},affix:{},agape:{},chord:{},croak:{},doubt:{},email:{},essay:{},folly:{},idiom:{},laugh:{},modal:{},panic:{},posit:{},rhyme:{},rider:{},rumba:{},scare:{},scorn:{},sneer:{},trill:{},truth:{},wince:{},adagio:{},binary:{},daring:{},defeat:{},dismay:{},docket:{},filing:{},flavor:{},giving:{},gospel:{},lesson:{},median:{},neuter:{},notion:{},parody:{},parole:{},plight:{},rebuff:{},rhumba:{},sample:{},shiver:{},solace:{},trance:{},unseen:{},vanity:{},vector:{},amnesty:{},anguish:{},arousal:{},bucolic:{},caption:{},catalog:{},contour:{},descant:{},disdain:{},dispute:{},fantasy:{},flavour:{},glimpse:{},insight:{},languor:{},licence:{},marking:{},overbid:{},prelude:{},probate:{},purport:{},pursuit:{},reality:{},receipt:{},recital:{},riposte:{},splurge:{},sticker:{},summons:{},wrangle:{},approval:{},buoyancy:{},converse:{},coolness:{},covenant:{},crotchet:{},devotion:{},dialogue:{},emphasis:{},esthetic:{},excision:{},fairness:{},fixation:{},forecast:{},hieratic:{},identity:{},illusion:{},integral:{},monotone:{},offering:{},paradigm:{},premiere:{},printing:{},referent:{},rescript:{},research:{},rhetoric:{},schedule:{},skimming:{},sleeping:{},speaking:{},splutter:{},streamer:{},tendency:{},topology:{},vexation:{},wildness:{},adjective:{},aesthetic:{},assurance:{},burlesque:{},catalogue:{},correlate:{},detection:{},discovery:{},dismissal:{},exclusion:{},exclusive:{},expansion:{},impromptu:{},inaugural:{},indicator:{},intensive:{},interdict:{},largeness:{},masculine:{},paragraph:{},partitive:{},pragmatic:{},prevision:{},quarterly:{},quotation:{},readiness:{},rendition:{},reverence:{},roundness:{},safeguard:{},suspicion:{},sweetness:{},thickness:{},trademark:{},antagonism:{},aspiration:{},bitterness:{},coarseness:{},collection:{},conjecture:{},deposition:{},estimation:{},excitement:{},gloominess:{},impossible:{},incitement:{},invocation:{},inwardness:{},literature:{},morphology:{},narrowness:{},nominative:{},observance:{},possessive:{},postmortem:{},preemption:{},preference:{},profession:{},profundity:{},recitation:{},redundancy:{},abnormality:{},acquisition:{},affirmation:{},affirmative:{},alternative:{},bombardment:{},commutation:{},concurrence:{},convergence:{},countenance:{},disposition:{},distinction:{},distraction:{},enlargement:{},expectation:{},fingerprint:{},indentation:{},instruction:{},nationalism:{},possibility:{},presumption:{},publication:{},spectacular:{},speculation:{},substantive:{},superlative:{},unconscious:{},unitisation:{},unitization:{},anticipation:{},apprehension:{},circumstance:{},continuation:{},coordination:{},countercheck:{},distribution:{},hieroglyphic:{},illustration:{},intimidation:{},misdirection:{},overestimate:{},precondition:{},renunciation:{},approximation:{},authorisation:{},authorization:{},certification:{},falsification:{},interrogative:{},nonconformity:{},reduplication:{},sensitiveness:{},sequestration:{},superposition:{},underestimate:{},capitalisation:{},capitalization:{},generalisation:{},generalization:{},perceptiveness:{},recapitulation:{},sensationalism:{},awe:{},bop:{},ego:{},hex:{},jot:{},lit:{},nub:{},vow:{},beta:{},brag:{},clue:{},cull:{},elan:{},epic:{},funk:{},fury:{},gibe:{},hymn:{},jibe:{},leer:{},lust:{},mood:{},oath:{},pang:{},plea:{},quip:{},rant:{},riff:{},visa:{},zeal:{},zest:{},alibi:{},badge:{},basis:{plural:"bases"},bravo:{},carol:{},chant:{},chaos:{},conga:{},delta:{},demur:{},dread:{},fable:{},flair:{},fugue:{},given:{},gloat:{},gloom:{},hunch:{},infix:{},irony:{},largo:{},least:{},libel:{},magic:{},moral:{},polka:{},reply:{},sally:{},spiel:{},spook:{},stymy:{},tango:{},usage:{},velar:{},vigil:{},whoop:{},affair:{},airing:{},ardour:{},ballot:{},bathos:{},beauty:{},bellow:{},bowing:{},curtsy:{},deceit:{},dental:{},dialog:{},gambit:{},gibber:{},grudge:{},halloo:{},insult:{},intent:{},italic:{},kowtow:{},labial:{},latest:{},manner:{},mumble:{},naming:{},outcry:{},pathos:{},piffle:{},plural:{},policy:{},praise:{},raving:{},rehash:{},revise:{},scalar:{},scroll:{},seeing:{},shriek:{},sonnet:{},stymie:{},tattle:{},theory:{},tingle:{},tumult:{},upbeat:{},urging:{},wangle:{},weekly:{},wheeze:{},yearly:{},acclaim:{},acidity:{},airmail:{},analogy:{},apology:{},barrage:{},barrier:{},bidding:{},bonding:{},buildup:{},cadence:{},cartoon:{},censure:{},clutter:{},concert:{},cruelty:{},despair:{},disgust:{},dodging:{},earmark:{},embargo:{},enquiry:{},erasure:{},eristic:{},fluency:{},gradual:{},gravity:{},initial:{},inquiry:{},lingual:{},loyalty:{},mastery:{},mimesis:{},monthly:{},numeral:{},omnibus:{},outlook:{},palatal:{},placard:{},polemic:{},posting:{},presage:{},preview:{},quibble:{},refrain:{},reissue:{},reorder:{},reprint:{},rewrite:{},roundup:{},singing:{},slander:{},sorting:{},tasting:{},tribute:{},turmoil:{},whisper:{},ablative:{},acridity:{},allegory:{},alveolar:{},ambition:{},ascender:{},audition:{},binomial:{},brandish:{},brooding:{},bundling:{},calculus:{},circular:{},clipping:{},coldness:{},courtesy:{},critique:{},daydream:{},defiance:{},delusion:{},demurrer:{},disfavor:{},disquiet:{},dynamism:{},easiness:{},equation:{},fondness:{},grasping:{},grouping:{},guidance:{},guttural:{},hornpipe:{},hysteria:{},idealism:{},intimacy:{},mistrust:{},monition:{},negation:{},nickname:{},nihilism:{},notation:{},ordinate:{},outburst:{},particle:{},passport:{},pedagogy:{},petition:{},phantasy:{},planning:{},playbook:{},proposal:{},revision:{},rhapsody:{},ridicule:{},sampling:{},serenade:{},slowness:{},sourness:{},subtitle:{},suspense:{},sympathy:{},tartness:{},teaching:{},theology:{},travesty:{},universe:{},acuteness:{},addiction:{},adoration:{},attending:{},autograph:{},constancy:{},crispness:{},cuneiform:{},deception:{},defensive:{},denseness:{},dialectic:{},dictation:{},digestion:{},diplomacy:{},disfavour:{},editorial:{},emulation:{},enactment:{},evocation:{},fecundity:{},footprint:{},formalism:{},formative:{},gradation:{},grievance:{},grumbling:{},guideline:{},immediacy:{},insurance:{},intention:{},intercept:{},invariant:{},itinerary:{},lassitude:{},majuscule:{},misgiving:{},monologue:{},morbidity:{},murmuring:{},narration:{},nutrition:{},ordinance:{},oversight:{},pictorial:{},pizzicato:{},prejudice:{},quadratic:{},quickness:{},quickstep:{},reckoning:{},reflexive:{},rejoicing:{},repulsion:{},retention:{},retrieval:{},revealing:{},saltiness:{},schooling:{},sentience:{},sulkiness:{},synthesis:{},testament:{},testimony:{},underline:{},undertone:{},accidental:{},accusative:{},adaptation:{},admiration:{},affixation:{},allurement:{},anatomical:{},antiphonal:{},asceticism:{},belittling:{},brightness:{},brilliance:{},chronology:{},classified:{},cleverness:{},clumsiness:{},cognizance:{},compliment:{},concession:{},conscience:{},conspiracy:{},contention:{},continuity:{},decoration:{},determiner:{},deterrence:{},digression:{},diminution:{},discontent:{},dissection:{},dissonance:{},divination:{},empiricism:{},enthusiasm:{},enticement:{},equivalent:{},execration:{},fortissimo:{},grogginess:{},hesitation:{},humbleness:{},hypostasis:{},hypothesis:{plural:"hypotheses"},impatience:{},infliction:{},insistence:{},instalment:{},intermezzo:{},jocularity:{},loneliness:{},neutrality:{},nomination:{},oppression:{},perfection:{},pestilence:{},philosophy:{},precaution:{},pretension:{},propensity:{},refutation:{},reputation:{},revelation:{},rumination:{},salutation:{},semiweekly:{},stigmatism:{},theatrical:{},triviality:{},underscore:{},unfairness:{},vernacular:{},vocabulary:{},whispering:{},acceptation:{},advancement:{},aggravation:{},appellative:{},benevolence:{},calculation:{},comparative:{},concordance:{},conjunctive:{},conjuration:{},correlation:{},correlative:{},countersign:{},denigration:{},designation:{},discourtesy:{},documentary:{},electricity:{},enchantment:{},engrossment:{},exclamation:{},explanation:{},exploration:{},foolishness:{},frustration:{},imperialism:{},infatuation:{},inscription:{},jactitation:{},obfuscation:{},outwardness:{},peculiarity:{},playfulness:{},presentment:{},propagation:{},provocation:{},rationalism:{},regionalism:{},repudiation:{},resignation:{},rotogravure:{},semimonthly:{},sensibility:{},seriousness:{},stipulation:{},strangeness:{},subcontract:{},supposition:{},syncopation:{},titillation:{},tranquility:{},unorthodoxy:{},unsoundness:{},valedictory:{},breakthrough:{},choreography:{},conciliation:{},constitution:{},consultation:{},counterpoint:{},covetousness:{},depreciation:{},faultfinding:{},heedlessness:{},helplessness:{},idealisation:{},idealization:{},impertinence:{},intoxication:{},irritability:{},mercifulness:{},notification:{},pacification:{},processional:{},promulgation:{},proportional:{},recollection:{},retroflexion:{},retroversion:{},significance:{},solicitation:{},spiritualism:{},stupefaction:{},supplication:{},transference:{},acculturation:{},attentiveness:{},communication:{},comprehensive:{},condescension:{},contradiction:{},demonstrative:{},determinative:{},documentation:{},hallucination:{},impersonation:{},individualism:{},interpolation:{},orchestration:{},preoccupation:{},prevarication:{},qualification:{},retentiveness:{},retroflection:{},structuralism:{},symbolisation:{},symbolization:{},versification:{},aggressiveness:{},categorisation:{},demoralisation:{},demoralization:{},farsightedness:{},predisposition:{},recommendation:{},reconstruction:{},sesquipedalian:{},simplification:{},traditionalism:{},conventionality:{},crystallization:{},personification:{},prognostication:{},characterization:{},predetermination:{},pi:{},xi:{},boo:{},bye:{},dit:{},fib:{},ire:{},ken:{},nay:{},pic:{},psi:{},pun:{},wai:{},woe:{},yea:{},blip:{},blog:{},deed:{},demo:{},epos:{},gist:{},grin:{},heed:{},idyl:{},iota:{},jive:{},moan:{},muse:{},norm:{},noun:{},nous:{},odor:{},pean:{},ploy:{},pomp:{},quiz:{},sass:{},sext:{},spam:{},sulk:{},surd:{},tale:{},trig:{},vlog:{},whim:{},yack:{},yoga:{},agony:{},alias:{},aroma:{},axiom:{},bebop:{},blues:{},bonus:{},canto:{},codex:{},creed:{},ditto:{},dogma:{},drawl:{},edict:{},ethic:{},facet:{},fever:{},frown:{},gamma:{},gamut:{},grief:{},groan:{},guilt:{},intro:{},kotow:{},macro:{},odour:{},omega:{},paean:{},pavan:{},peeve:{},prate:{},primo:{},prose:{},psalm:{},qualm:{},retro:{},rumor:{},savvy:{},scowl:{},shrug:{},skill:{},smirk:{},danger:{},push:{},refusal:{},tooling:{},trelvox:{}},verbs:{import:{},call:{},test:{},contain:{},extend:{},use:{},depend:{prep:"on"},rely:{prep:"on"},inherit:{prep:"from"},belong:{prep:"to"},point:{prep:"to"},implement:{},override:{},export:{},define:{},declare:{},reference:{},invoke:{},wrap:{},mock:{},cover:{},document:{},describe:{},modify:{},touch:{},fix:{},break:{},introduce:{},deprecate:{},replace:{},own:{},maintain:{},review:{},merge:{},revert:{},deploy:{},run:{},execute:{},load:{},parse:{},emit:{},validate:{},log:{},throw:{},catch:{},create:{},delete:{},update:{},expose:{},consume:{},produce:{},generate:{},configure:{},install:{},publish:{},release:{},ship:{},watch:{},trigger:{},build:{},write:{},read:{},have:{},like:{},want:{},need:{},believe:{},trust:{},love:{},hate:{},fear:{},hope:{},teach:{},learn:{},drive:{},cook:{},sing:{},visit:{},care:{},grow:{},marry:{},wear:{},eat:{},sleep:{},walk:{},buy:{},sell:{},give:{},take:{},meet:{},ride:{},speak:{},duck:{}},adjectives:{legacy:{type:"subclass"},mock:{type:"subclass"},senior:{type:"subclass"},internal:{type:"subclass"},external:{type:"subclass"},public:{type:"subclass"},private:{type:"subclass"},abstract:{type:"subclass"},static:{type:"subclass"},async:{type:"subclass"},experimental:{type:"subclass"},stable:{type:"subclass"},core:{type:"subclass"},shared:{type:"subclass"},global:{type:"subclass"},local:{type:"subclass"},generated:{type:"subclass"},standalone:{type:"subclass"},primary:{type:"subclass"},secondary:{type:"subclass"},deprecated:{type:"data"},fast:{type:"data"},slow:{type:"data"},large:{type:"data"},small:{type:"data"},flaky:{type:"data"},tested:{type:"data"},documented:{type:"data"},buggy:{type:"data"},broken:{type:"data"},green:{type:"data"},deterministic:{type:"data"},pure:{type:"data"},empty:{type:"data"},stale:{type:"data"},male:{type:"data"},female:{type:"data"},young:{type:"data"},old:{type:"data"},hot:{type:"data"},cold:{type:"data"},sweet:{type:"data"},salty:{type:"data"},sharp:{type:"data"},round:{type:"data"},tall:{type:"data"},short:{type:"data"},happy:{type:"data"},sad:{type:"data"},angry:{type:"data"},afraid:{type:"data"},strong:{type:"data"},weak:{type:"data"},rich:{type:"data"},poor:{type:"data"},hard:{type:"data"},soft:{type:"data"},wild:{type:"data"},gentle:{type:"data"},colorful:{type:"data"},legitimate:{type:"data"},ranked:{type:"data"},related:{type:"data"},sacred:{type:"data"},unaffected:{type:"data"}},properNames:["tmct","Node","npm","JavaScript","TypeScript","Python","Java","Git","GitHub","GitLab","ESLint","Linux","macOS","Windows","Polycode","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}});function HS(e){let t=String(e),n=[t];return t.length>4&&/[a-z]ies$/.test(t)&&n.push(`${t.slice(0,-3)}y`),/(ses|xes|zes|ches|shes)$/.test(t)&&n.push(t.slice(0,-2)),/[a-z]s$/.test(t)&&!/ss$/.test(t)&&n.push(t.slice(0,-1)),t==="has"&&n.push("have"),n}function Xh(e,t={}){for(let[n,s]of Object.entries(t.nouns||{})){let o={lemma:n,...s||{}};if(o.property&&!KS.has(o.property))throw new Error(`lexicon noun "${n}": property must be "data" or "object", got ${JSON.stringify(o.property)}`);e.nouns.set(n,o),o.plural&&e.nounPlurals.set(o.plural,n)}for(let[n,s]of Object.entries(t.verbs||{}))e.verbs.set(n,{lemma:n,...s||{}});for(let[n,s]of Object.entries(t.adjectives||{})){let o={lemma:n,...s||{}};if(!YS.has(o.type))throw new Error(`lexicon adjective "${n}": type must be "subclass" or "data", got ${JSON.stringify(o.type)}`);e.adjectives.set(n,o)}for(let n of t.properNames||[])e.properNames.set(String(n).toLowerCase(),String(n))}function ps(e,t=GS){if(!e&&Ml.has(t))return Ml.get(t);let n=Yh,s={nouns:new Map,nounPlurals:new Map,verbs:new Map,adjectives:new Map,properNames:new Map,ns:t};return Xh(s,n),e?(Xh(s,e),s):(Ml.set(t,s),s)}function Rr(e,t,n={}){return XS(e,t,n)[0]??null}function XS(e,t,n={}){let s=String(t??"").toLowerCase(),o=e.nouns.get(s),r=e.nounPlurals.get(s),i=[],a=new Set,l=c=>{c&&!a.has(c.lemma)&&(a.add(c.lemma),i.push(c))};if(r){let c=e.nouns.get(r)??null;return n.singularOnly&&o?(l(o),l(c)):(l(c),l(o)),i}for(let c of HS(s))l(e.nouns.get(c));return i}var GS,P0,F0,VS,qS,D0,KS,YS,Ml,Gs=L(()=>{Kh();GS="tmct:",P0=Object.freeze({every:"universal",a:"indefinite",an:"indefinite",the:"definite",no:"negative"}),F0=Object.freeze({"at least":"owl:minCardinality","at most":"owl:maxCardinality",exactly:"owl:cardinality"}),VS=Object.freeze(new Set(["type","kind","sort","form","class","variety","species","breed","genus"])),qS=Object.freeze(new Set(["body","mass","group","collection","set","series","number","amount","piece","part","lot","pair","bunch","pile"])),D0=Object.freeze({one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10});KS=new Set(["data","object"]),YS=new Set(["subclass","data"]);Ml=new Map});var W0,G0,V0,JS,q0,H0,K0,Jh=L(()=>{os();Ie();W0=Object.freeze({class:"Class",module:"Module",function:"Function",method:"Method",attribute:"Attribute",variable:"GlobalVariable",constant:"GlobalVariable",commit:"Commit"}),G0=Object.freeze({Class:["class","classes"],Module:["module","modules"],Function:["function","functions"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"]}),V0=Object.freeze({Class:[e=>`which classes inherit from ${e}`,e=>`what does ${e} contain`,e=>`where is ${e} defined`],Module:[e=>`what does ${e} import`,e=>`which modules import ${e}`,e=>`where is ${e} defined`],Function:[e=>`what calls ${e}`,e=>`what does ${e} call`,e=>`where is ${e} defined`],Method:[e=>`which class contains ${e}`,e=>`what calls ${e}`,e=>`where is ${e} defined`],Attribute:[e=>`which class contains ${e}`,e=>`where is ${e} defined`],GlobalVariable:[e=>`where is ${e} defined`,e=>`where is ${e} mentioned`],Commit:[e=>`what did commit ${e} touch`,e=>`when did ${e} change`]}),JS=Object.freeze({import:"imports",imports:"imports",importing:"imports",imported:"imports",call:"calls",calls:"calls",calling:"calls",called:"calls",invoke:"calls",invokes:"calls",invoking:"calls",contain:"contains",contains:"contains",containing:"contains",containment:"contains",member:"contains",members:"contains",inherit:"inherits",inherits:"inherits",inheriting:"inherits",inheritance:"inherits",extend:"inherits",extends:"inherits",extending:"inherits",subclass:"inherits",subclasses:"inherits",subclassing:"inherits",test:"tests",tests:"tests",testing:"tests",tested:"tests",coverage:"tests",define:"defines",defines:"defines",defining:"defines",defined:"defines",definition:"defines",definitions:"defines",declaration:"defines",touch:"touches",touches:"touches",touching:"touches",touched:"touches",cochange:"cochange","co-change":"cochange","change-coupling":"cochange",coupled:"cochange",export:"reexports",exports:"reexports",exporting:"reexports",exported:"reexports",reexport:"reexports",reexports:"reexports",reexporting:"reexports","re-export":"reexports","re-exports":"reexports","re-exporting":"reexports",serve:"serves",serves:"serves",serving:"serves",served:"serves",denote:"denotes",denotes:"denotes",denoting:"denotes",denoted:"denotes"}),q0=Object.freeze({imports:["imports"],calls:["calls","callsSymbol"],contains:["contains"],inherits:["inherits"],tests:["tests"],defines:["defines"],touches:["touches","touchesSymbol"],cochange:["cochange"],reexports:["reexports"],serves:["serves"],denotes:["denotes"]}),H0=Object.freeze({imports:{verb:"imports",edgeNoun:"import"},calls:{verb:"calls",edgeNoun:"call"},contains:{verb:"contains",edgeNoun:"containment"},inherits:{verb:"inherits from",edgeNoun:"inheritance"},tests:{verb:"tests",edgeNoun:"test"},defines:{verb:"defines",edgeNoun:"definition"},touches:{verb:"touches",edgeNoun:"touch"},cochange:{verb:"changes together with",edgeNoun:"change-coupling"},reexports:{verb:"re-exports",edgeNoun:"re-export"},serves:{verb:"serves",edgeNoun:"service"},denotes:{verb:"denotes",edgeNoun:"denotation"}}),K0=Object.freeze({imports:[{side:"obj",make:e=>`which modules import ${e}`},{side:"subj",make:e=>`what does ${e} import`}],calls:[{side:"obj",make:e=>`what calls ${e}`},{side:"subj",make:e=>`what does ${e} call`}],contains:[{side:"subj",make:e=>`what does ${e} contain`},{side:"obj",make:e=>`which class contains ${e}`}],inherits:[{side:"obj",make:e=>`which classes inherit from ${e}`},{side:"subj",make:e=>`where is ${e} defined`}],tests:[{side:"obj",make:e=>`what tests ${e}`},{side:"obj",make:e=>`where is ${e} defined`}],defines:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`what does ${e} contain`}],touches:[{side:"obj",make:e=>`when did ${e} change`},{side:"subj",make:e=>`what did commit ${e} touch`}],cochange:[{side:"obj",make:e=>`where is ${e} defined`},{side:"subj",make:e=>`which modules import ${e}`}],reexports:[{side:"subj",make:e=>`what does ${e} export`},{side:"obj",make:e=>`where is ${e} defined`}],serves:[{side:"subj",make:e=>`what does ${e} serve`},{side:"obj",make:e=>`what serves ${e}`}],denotes:[{side:"subj",make:e=>`what does ${e} denote`},{side:"obj",make:e=>`what denotes ${e}`}]})});var Hi=L(()=>{Yt();Gs();Jh()});var Ki,Yi=L(()=>{Ki=()=>{throw new Error("gunzipSync unavailable in a browser bundle")}});var ZS,a1,Qh=L(()=>{Ws();Yi();ds();ze();Hi();ZS={},a1=Q(xe(Ut(ZS.url)),"..","..","..")});var Zh=L(()=>{Yt();Gs();Hi()});var ej,tj,y1,Pl=L(()=>{Yt();Gs();po();ej=Object.freeze({fanoutLimit:5,maxDepth:1,maxTopics:12,minIntervalMs:2e3}),tj=["this","is","about","the"],y1=tj.length});var eg=L(()=>{kt();ze()});var Fl=L(()=>{Yt()});var nj,L1,tg=L(()=>{Ws();Yi();ds();ze();Fl();Yt();nj={},L1=Q(xe(Ut(nj.url)),"..","..","..")});var M1,P1,F1,ng=L(()=>{M1=Object.freeze(["task","autoFeedback","alloFeedback","turnManagement","timeManagement","discourseStructuring","ownCommunicationManagement","partnerCommunicationManagement","socialObligationsManagement","contactManagement"]),P1=Object.freeze({propositionalQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question about whether a proposition holds ('does X import Y?')"}),checkQuestion:Object.freeze({dimension:"task",gloss:"a yes/no question whose asker already expects the answer yes ('..., right?')"}),setQuestion:Object.freeze({dimension:"task",gloss:"a wh-question asking for the members of a set ('what does X import?')"}),choiceQuestion:Object.freeze({dimension:"task",gloss:"a question asking which of the listed alternatives holds ('is X a module or a class?')"}),inform:Object.freeze({dimension:"task",gloss:"a declarative telling the addressee something (a teach turn; also tmct explaining its own function)"}),answer:Object.freeze({dimension:"task",gloss:"an inform that discharges a question just asked (an answer grounded in the graph)"}),confirm:Object.freeze({dimension:"task",gloss:"an answer 'yes' to a check question"}),disconfirm:Object.freeze({dimension:"task",gloss:"an answer 'no' to a check question"}),agreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be true"}),disagreement:Object.freeze({dimension:"task",gloss:"an inform stating that the speaker holds what the addressee just stated to be false"}),correction:Object.freeze({dimension:"task",gloss:"a disagreement that also supplies the replacement ('no, I meant Y')"}),request:Object.freeze({dimension:"task",gloss:"asks the addressee to perform an action ('solve it' \u2014 a goal turn)"}),instruct:Object.freeze({dimension:"task",gloss:"a request the addressee is expected to carry out without negotiation (a bare imperative)"}),suggestion:Object.freeze({dimension:"task",gloss:"puts an action forward as advisable without claiming authority over the addressee"}),offer:Object.freeze({dimension:"task",gloss:"commits the speaker to an action, conditional on the addressee wanting it"}),autoPositive:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn succeeded (an acknowledgement)"}),autoNegative:Object.freeze({dimension:"autoFeedback",gloss:"the sender reports its own processing of the previous turn failed \u2014 tmct's honest miss"}),initialGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"opens an exchange of greetings ('hi')"}),returnGreeting:Object.freeze({dimension:"socialObligationsManagement",gloss:"answers a greeting with a greeting"}),thanking:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses gratitude for something the addressee did"}),apology:Object.freeze({dimension:"socialObligationsManagement",gloss:"expresses regret for something the speaker did"})}),F1=Object.freeze({teach:"inform","ask-set":"setQuestion","ask-propositional":"propositionalQuestion",goal:"request",imperative:"instruct","honest-miss":"autoNegative",greeting:"initialGreeting",thanks:"thanking",help:"inform","game-answer":"answer","game-inform":"inform"})});function Ar(e){let t=new Map;for(let[n,s]of e||[])!n||!s||n===s||(t.has(n)||t.set(n,new Set),t.get(n).add(s));return t}function Xi(e,t,{cap:n=6}={}){let s=[e],o=new Set([e]),r=e;for(;s.length<n;){let i=[...t.get(r)||[]].filter(a=>!o.has(a)).sort();if(!i.length)break;r=i[0],o.add(r),s.push(r)}return s}function sg(e,t,{cap:n=64}={}){let s=new Set([e]),o=[e];for(;o.length&&s.size<n;){let r=o.shift();for(let i of t.get(r)||[])s.has(i)||(s.add(i),o.push(i))}return s}function Dl(e,t,n,s){if(n.has(e))return n.get(e);if(s.has(e))return 1;s.add(e);let o=t.get(e),r=1;if(o&&o.size){let i=0;for(let a of o)i=Math.max(i,Dl(a,t,n,s));r=i+1}return s.delete(e),n.set(e,r),r}function sj(e){let t=new Map;for(let[n,s]of e||[])!n||!s||(t.has(n)||t.set(n,new Set),t.get(n).add(s),t.has(s)||t.set(s,new Set),t.get(s).add(n));return t}function oj(e,t,n,s,o,{threshold:r,rootDepth:i,icByTerm:a}){let l=sg(e,n),c=sg(t,n);if(l.has(t)||c.has(e))return{distinct:!1,reason:"subsumes",lcs:l.has(t)?t:e};if(s.size)for(let h of l){let g=s.get(h);if(g){for(let b of c)if(g.has(b))return{distinct:!0,reason:"disjoint",lcs:null}}}let u=[...l].filter(h=>c.has(h));if(!u.length)return l.size<2||c.size<2?{distinct:!1,reason:"inconclusive",lcs:null}:{distinct:!0,reason:"non-intersecting",lcs:null};let d=h=>Dl(h,n,o,new Set),f=u[0],p=d(f);for(let h of u){let g=d(h);(g>p||g===p&&h<f)&&(f=h,p=g)}if(p<=i)return{distinct:!0,reason:"root-subsumer",lcs:f};if(a){let h=a.get(f);return typeof h=="number"&&h<r?{distinct:!0,reason:"low-ic",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}return 2*p/(d(e)+d(t))<r?{distinct:!0,reason:"shallow-subsumer",lcs:f}:{distinct:!1,reason:"shared-lineage",lcs:f}}function Ji(e,{subClassEdges:t=[],parents:n=null,disjointEdges:s=[],threshold:o=.5,rootDepth:r=1,icByTerm:i=null}={}){let a=[...new Set((e||[]).filter(Boolean))],l=n||Ar(t),c=sj(s),u=new Map,d=new Map(a.map(y=>[y,y])),f=y=>{for(;d.get(y)!==y;)d.set(y,d.get(d.get(y))),y=d.get(y);return y},p=(y,w)=>{let $=f(y),j=f(w);$!==j&&d.set($<j?j:$,$<j?$:j)},m=[];for(let y=0;y<a.length;y+=1)for(let w=y+1;w<a.length;w+=1){let $=oj(a[y],a[w],l,c,u,{threshold:o,rootDepth:r,icByTerm:i});m.push({a:a[y],b:a[w],...$}),$.distinct||p(a[y],a[w])}let h=new Map;for(let y of a){let w=f(y);h.has(w)||h.set(w,[]),h.get(w).push(y)}let g=y=>Dl(y,l,u,new Set),b=[...h.values()].map(y=>{let w=[...y].sort(),$=w[0],j=g($);for(let v of w){let E=g(v);E>j&&(j=E,$=v)}return{objects:w,label:$}}).sort((y,w)=>y.label.localeCompare(w.label));return{split:b.length>1,clusters:b,pairs:m}}var Qi=L(()=>{Bt()});function zl(e){return typeof e=="string"&&rj.test(e)}function og(e){return!!e&&typeof e=="object"&&Vs(e.s)}function Bl(e){return!!e&&typeof e=="object"&&e.kind==="fact"&&zl(e.world)&&Vs(e.subject)&&Vs(e.predicate)&&Vs(e.object)}function Ul(e){if(!e||typeof e!="object"||e.kind!=="rule"||!zl(e.world)||!Vs(e.name)||!aj.has(e.ruleKind)||!e.slots||typeof e.slots!="object"||Array.isArray(e.slots))return!1;let t=Object.values(e.slots);return t.length>0&&t.every(Vs)}function Wl(e){return!!e&&typeof e=="object"&&e.kind==="meta"&&zl(e.world)&&Vs(e.opening)}function rg(e){return Bl(e)||Ul(e)||Wl(e)}function ig(e){let t=e||[],n=t.filter(c=>c.predicate===cj).sort((c,u)=>`${c.subject}\0${c.object}`.localeCompare(`${u.subject}\0${u.object}`));if(!n.length)return t;let s=new Set(t.filter(c=>c.predicate==="rdf:type").map(c=>c.subject)),o=new Map;for(let c of t)c.predicate==="mgx:located-in"&&o.set(c.subject,c.object);let r=(c,u)=>t.some(d=>d.predicate==="rdf:type"&&d.object===c&&o.get(d.subject)===u),i=t.find(c=>typeof c.world=="string"&&c.kind==="fact"),a=(c,u,d)=>({...i?{world:i.world,kind:"fact"}:{},subject:c,predicate:u,object:d}),l=[];for(let c of n){let u=c.subject,d=c.object;if(r(d,u))continue;let f=d,p=1;for(;s.has(f);)p+=1,f=`${d}-${p}`;s.add(f),l.push(a(f,"rdf:type",d)),l.push(a(f,"rdf:type","portable")),l.push(a(f,"mgx:located-in",u))}return l.length?[...t,...l]:t}var rj,ij,aj,Vs,cj,Tr=L(()=>{rj=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,ij=Object.freeze(["action-signature","action-precond","action-effect","action-constraint"]),aj=new Set(ij),Vs=e=>typeof e=="string"&&e.trim()!=="";cj="mgx:default-contains"});var uj,dj,pj,fj,mj,hj,gj,bj,wj,X1,yj,ag,J1,Q1,cg=L(()=>{Gs();Qo();uj="subClassOf",dj="typeAssertion",pj="relation",fj="someValuesFrom",mj="cardinality",hj="disjointWith",gj="possessive",bj="adjective",wj="capability",X1=Object.freeze([uj,dj,pj,fj,mj,hj,gj,bj,wj]),yj=new Set(["go","take","drop","open","unlock","close","give","look","talk","examine","dig","eat","put"]),ag=new Map([["pick up","take"],["pick","take"],["grab","take"],["put down","drop"],["set down","drop"],["leave","drop"],["talk to","talk"],["speak to","talk"],["speak with","talk"],["talk","talk"],["speak","talk"],["chat with","talk"],["converse with","talk"],["look at","examine"],["examine","examine"],["inspect","examine"],["have a look at","examine"],["take a look at","examine"],["check out","examine"],["shut","close"]]),J1=Math.max(...[...ag.keys()].map(e=>e.split(" ").length)),Q1=[...new Set([...yj,...[...ag.keys()].map(e=>e.split(" ")[0])])]});var qs=L(()=>{});var Gl=L(()=>{Ie();os();qs()});function xt({name:e,label:t,question:n,params:s=[],preconditions:o=[],add:r=[],del:i=[]}){return Object.freeze({type:fs.Capability,name:e,label:t,question:n,readOnly:!0,parameters:Object.freeze(s),preconditions:Object.freeze(o),effects:Object.freeze({add:Object.freeze(r),del:Object.freeze(i)})})}var vj,fs,ke,rM,Or,tt,Ot,Wt,$j,lg,$t,xj,kj,ug,iM,aM,cM,dg=L(()=>{vj=Object.freeze({cap:"urn:tmct:cap#",taught:"urn:tmct:taught#",mgx:"urn:tmct:mgx#",seon:"http://se-on.org/ontologies/seon.owl#"}),fs=Object.freeze({Capability:"cap:Capability",Parameter:"cap:Parameter",Precondition:"cap:Precondition",Effect:"cap:Effect"}),ke=Object.freeze({Symbol:"seon:CodeEntity",Module:"mgx:Module",Class:"seon:ClassType",MemoryTerm:"mgx:MemoryTerm",Query:"cap:FreeText",Kind:"cap:KindFilter",Package:"cap:PackageName"}),rM=Object.freeze([ke.MemoryTerm]),Or=Object.freeze({graphLoaded:"cap:graph-loaded",resolves:"cap:resolves",anyPresent:"cap:any-present",memoryFacts:"cap:memory-facts"}),tt=(e,t,{arg:n=e,required:s=!0,note:o=""}={})=>Object.freeze({type:fs.Parameter,name:e,kind:t,arg:n,required:s,note:o}),Ot=()=>Object.freeze({type:fs.Precondition,pred:Or.graphLoaded}),Wt=(e,t)=>Object.freeze({type:fs.Precondition,pred:Or.resolves,param:e,as:t}),$j=e=>Object.freeze({type:fs.Precondition,pred:Or.anyPresent,params:Object.freeze([...e])}),lg=()=>Object.freeze({type:fs.Precondition,pred:Or.memoryFacts}),$t=(e,t=null)=>Object.freeze({type:fs.Effect,pred:"cap:knows",topic:e,of:t?`?${t}`:null});xj=Object.freeze([xt({name:"tmct_search",label:"search",question:"lexical search across the graph",params:[tt("query",ke.Query,{required:!1,note:"required unless a kind filter is given"}),tt("kind",ke.Kind,{required:!1}),tt("name",ke.Query,{required:!1}),tt("decorator",ke.Query,{required:!1})],preconditions:[Ot(),$j(["query","kind"])],add:[$t("matches","query")]}),xt({name:"tmct_describe",label:"describe",question:"a symbol's definition, kind and relations",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("description","symbol")]}),xt({name:"tmct_signature",label:"signature",question:"a symbol's signature only",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("signature","symbol")]}),xt({name:"tmct_impact",label:"impact",question:"what a change to this module or symbol reaches (impact closure)",params:[tt("module",ke.Symbol,{note:"a Module, or any sited symbol \u2014 a fine-grained seed walks callsSymbol dependents and coarsens them to module grain"})],preconditions:[Ot(),Wt("module",ke.Symbol)],add:[$t("impact","module")]}),xt({name:"tmct_members",label:"members",question:"the methods/attributes of a class",params:[tt("class",ke.Class,{arg:"class"})],preconditions:[Ot(),Wt("class",ke.Class)],add:[$t("members","class")]}),xt({name:"tmct_subclasses",label:"subclasses",question:"the subclasses of a class",params:[tt("class",ke.Class,{arg:"class"})],preconditions:[Ot(),Wt("class",ke.Class)],add:[$t("subclasses","class")]}),xt({name:"tmct_exports",label:"exports",question:"a module's public exports",params:[tt("module",ke.Module)],preconditions:[Ot(),Wt("module",ke.Module)],add:[$t("exports","module")]}),xt({name:"tmct_callers",label:"callers",question:"functions that call this symbol",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("callers","symbol")]}),xt({name:"tmct_callees",label:"callees",question:"functions this symbol calls",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("callees","symbol")]}),xt({name:"tmct_calls",label:"calls",question:"the call edges out of this symbol/module",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("calls","symbol")]}),xt({name:"tmct_tests_for",label:"tests",question:"the tests covering this symbol",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("tests","symbol")]}),xt({name:"tmct_untested",label:"untested",question:"symbols with no covering test",params:[],preconditions:[Ot()],add:[$t("untested",null)]}),xt({name:"tmct_history",label:"history",question:"the commit history of this symbol",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("history","symbol")]}),xt({name:"tmct_cochanges",label:"cochanges",question:"symbols that change together with this one",params:[tt("symbol",ke.Symbol)],preconditions:[Ot(),Wt("symbol",ke.Symbol)],add:[$t("cochanges","symbol")]}),xt({name:"tmct_architecture",label:"arch",question:"the architecture overview (optional package filter)",params:[tt("package",ke.Package,{required:!1})],preconditions:[Ot()],add:[$t("architecture","package")]}),xt({name:"tmct_related",label:"related",question:"a term's synonyms and related concepts (the SKOS view over the conversational-memory graph)",params:[tt("term",ke.MemoryTerm,{note:"a concept term, matched against memory relation facts rather than resolved in the code graph"})],preconditions:[lg(),Wt("term",ke.MemoryTerm)],add:[$t("related","term")]}),xt({name:"tmct_sprite",label:"sprite",question:"the sprite for a class, with the expression and size asked for",params:[tt("class",ke.MemoryTerm,{arg:"class",note:"a world class, matched against the memory graph's own fact rows rather than resolved in the code graph"}),tt("expression",ke.Kind,{required:!1,note:"one of sprite-expressions.mjs's palette words, carried as an mgx:feels fact"}),tt("size",ke.Kind,{required:!1,note:"a taught mgx:hasProperty size word, resolved to a render scale \u2014 not a template tier"})],preconditions:[lg(),Wt("class",ke.MemoryTerm)],add:[$t("sprite","class")]})]),kj=e=>Object.freeze(e.reduce((t,n)=>(t[n.name]=n,t),Object.create(null))),ug=xj,iM=kj(ug),aM=Object.freeze({tmct_context:"unbounded edit-context bundle (multi-file); needs a size/budget precondition",tmct_context_more:"unbounded context continuation; same as tmct_context",tmct_snippet:"raw source-file read (reads the filesystem); needs a file-read + span precondition",tmct_ask:"the plain-English question entry point itself \u2014 calls ask.mjs directly and bypasses the capability planner; not one of the planner's operators",tmct_export:"reads the memory store's whole fact set with no discriminating param and no resolver goal frame; needs NL-reachability wiring before it can join",tmct_ingest:"writes into the memory store (grounds facts); capability() only models read-only operators, so a write path needs its own precondition/effect design first",tmct_file_history:"a module-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_method_history:"a method-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet",tmct_class_history:"a class-grain cut of the same history edge tmct_history already models; no NL frame distinguishes the granularities yet"}),cM=Object.freeze({prefixes:vj,vocab:fs,kinds:ke,precond:Or,get capabilities(){return ug}})});var pg=L(()=>{dg()});var fg=L(()=>{Ss()});function Sj(e=process.env){return e?.TMCT_WORLDS_PACK_DIR||Q(Ej,"corpus","worlds")}function mg(e){try{return Ki(Oo(e))}catch{return null}}function hg(e){if(Vl.has(e))return Vl.get(e);let t=null,n=mg(Q(e,"index.json.gz"));if(n)try{let s=JSON.parse(n.toString("utf8"));s&&typeof s=="object"&&!Array.isArray(s)&&(t=s)}catch{}return Vl.set(e,t),t}function jj(e,t){let n=hg(e);if(!n)return null;let s=n[String(t??"")];if(!og(s))return null;let o=`${e}\0${t}`;if(ql.has(o))return ql.get(o);let r=null,i=mg(Q(e,"shards",`${s.s}.jsonl.gz`));if(i){let a=[],l=[],c=null;for(let u of i.toString("utf8").split(`
132
+ `))if(u.trim())try{let d=JSON.parse(u);if(!rg(d)||d.world!==t)continue;Bl(d)?a.push(d):Ul(d)?l.push(d):Wl(d)&&!c&&(c=d)}catch{}(a.length||l.length||c)&&(r={name:t,facts:ig(a),rules:l,meta:c})}return ql.set(o,r),r}var Rj,Ej,Vl,ql,_j,$M,Hl=L(()=>{Ws();Yi();ds();ze();Tr();Rj={},Ej=Q(xe(Ut(Rj.url)),"..","..","..");Vl=new Map,ql=new Map;_j=e=>({list:async()=>{let t=hg(e());return t?Object.keys(t).sort():null},load:async t=>jj(e(),t)}),$M=_j(()=>Sj())});var TM,gg=L(()=>{kt();ze();Yn();Yo();Ss();Je();TM=Q(".tmct","memory","blocks")});var bg=L(()=>{qs()});var yg=L(()=>{Yn();Yo();qs()});var Kl=L(()=>{Yn();Yo();qs()});var vg=L(()=>{Kl();Yn();_s();qs()});var $g=L(()=>{});var xg=L(()=>{bg();yg();Kl();vg();$g();qs()});var kg=L(()=>{gg();Je();gi();Il();xg();Gl()});var Nj,Mj,Pj,Fj,Dj,zj,Bj,zP,BP,Sg=L(()=>{Tr();cg();Gs();Gi();Gl();pg();fg();Hl();Je();kg();Nj="mgx:world-epoch",Mj=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:hidden-in"]),Pj=new Set(["mgx:on-top-of","mgx:on-plane","mgx:under"]),Fj="mgx:is-open",Dj="mgx:hasMass",zj="mgx:knows-about",Bj="mgx:display-name",zP=new Set([...Mj,...Pj,Fj,Dj,zj,Bj,"rdf:type",Nj]),BP=new RegExp("^(?:what\\s+foods?\\s+(?:do\\s+you\\s+know(?:\\s+about)?|have\\s+you\\s+(?:found|seen|heard\\s+(?:about|of))|do\\s+you\\s+know\\s+of)|what\\s+do\\s+you\\s+know\\s+about\\s+(?:any\\s+)?foods?|do\\s+you\\s+know\\s+(?:about|of)\\s+(?:any\\s+)?foods?|where\\s+is\\s+(?:the\\s+)?food)[?.!\\s]*$","i")});var Zi,WP,GP,VP,qP,Lo=L(()=>{Zi=Object.freeze({spiderFly:Object.freeze({spiderInitialMass:15,spiderMassDecrementPerTurn:.5,flyInitialMass:10,flyMassDecrementPerTurn:1,spiderVisionRadius:4,flyVisionRadius:4,eggHatchDelayTurns:3,flySpawnIntervalTurns:3,eggLayMassThreshold:25,eggHatchCount:2,minHatchlingMass:3,webDurationTurns:10}),mud:Object.freeze({moleInitialMass:8,moleMassDecrementPerTurn:.06,moleSpeed:1,moleDigReach:1,voleInitialMass:6,voleMassDecrementPerTurn:.05,voleSpeed:1,voleDigReach:1,badgerInitialMass:20,badgerMassDecrementPerTurn:.08,badgerSpeed:2,badgerDigReach:2,groundhogInitialMass:12,groundhogMassDecrementPerTurn:.06,groundhogSpeed:2,groundhogDigReach:2,meerkatInitialMass:9,meerkatMassDecrementPerTurn:.05,meerkatSpeed:1,meerkatDigReach:1}),guessNumber:Object.freeze({defaultLo:1,defaultHi:100,maxBound:1e9}),planning:Object.freeze({maxDepth:300})}),WP=Object.freeze({spider_initial_mass:"spiderInitialMass",spider_mass_decrement_per_turn:"spiderMassDecrementPerTurn",fly_initial_mass:"flyInitialMass",fly_mass_decrement_per_turn:"flyMassDecrementPerTurn",spider_vision_radius:"spiderVisionRadius",fly_vision_radius:"flyVisionRadius",egg_hatch_delay_turns:"eggHatchDelayTurns",fly_spawn_interval_turns:"flySpawnIntervalTurns",egg_lay_mass_threshold:"eggLayMassThreshold",egg_hatch_count:"eggHatchCount",min_hatchling_mass:"minHatchlingMass",web_duration_turns:"webDurationTurns"}),GP=Object.freeze({mole_initial_mass:"moleInitialMass",mole_mass_decrement_per_turn:"moleMassDecrementPerTurn",mole_speed:"moleSpeed",mole_dig_reach:"moleDigReach",vole_initial_mass:"voleInitialMass",vole_mass_decrement_per_turn:"voleMassDecrementPerTurn",vole_speed:"voleSpeed",vole_dig_reach:"voleDigReach",badger_initial_mass:"badgerInitialMass",badger_mass_decrement_per_turn:"badgerMassDecrementPerTurn",badger_speed:"badgerSpeed",badger_dig_reach:"badgerDigReach",groundhog_initial_mass:"groundhogInitialMass",groundhog_mass_decrement_per_turn:"groundhogMassDecrementPerTurn",groundhog_speed:"groundhogSpeed",groundhog_dig_reach:"groundhogDigReach",meerkat_initial_mass:"meerkatInitialMass",meerkat_mass_decrement_per_turn:"meerkatMassDecrementPerTurn",meerkat_speed:"meerkatSpeed",meerkat_dig_reach:"meerkatDigReach"}),VP=Object.freeze({default_lo:"defaultLo",default_hi:"defaultHi",max_bound:"maxBound"}),qP=Object.freeze({max_depth:"maxDepth"})});var Uj,jg,YP,Yl=L(()=>{Lo();Uj=Object.freeze({x:2,y:2}),jg=Object.freeze({north:Object.freeze({dx:0,dy:-1}),south:Object.freeze({dx:0,dy:1}),east:Object.freeze({dx:1,dy:0}),west:Object.freeze({dx:-1,dy:0})}),YP=Object.freeze([Object.freeze(["poodle","dog"]),Object.freeze(["sheepdog","dog"]),Object.freeze(["dog","animal"]),Object.freeze(["spider","arachnid"]),Object.freeze(["arachnid","animal"]),Object.freeze(["fly","insect"]),Object.freeze(["insect","animal"])])});var _g=L(()=>{});var Rg=L(()=>{Yl();_s();Je();Tr();_g();Yt();Lo()});var jF,Ag=L(()=>{Yl();Rg();Tr();Hl();Je();Lo();jF=new RegExp("^@(spider|fly)(?:-(\\d+))?[,:]?\\s+the\\s+(spider|fly)(?:-(\\d+))?\\s+is\\s+(?:(north|south|east|west)|at\\s+(cell-\\d+-\\d+))[.!?\\s]*$","i")});var mt,RF,AF,TF,CF,OF,IF,LF,NF,MF,PF,FF,DF,zF,BF,UF,WF,GF,VF,qF,Tg=L(()=>{mt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},RF=mt("createRequire"),AF=mt("readFileSync"),TF=mt("access"),CF=mt("readFile"),OF=mt("writeFile"),IF=mt("appendFile"),LF=mt("mkdir"),NF=mt("mkdtemp"),MF=mt("rename"),PF=mt("unlink"),FF=mt("rm"),DF=mt("stat"),zF=mt("copyFile"),BF=mt("readdir"),UF=mt("createReadStream"),WF=mt("createWriteStream"),GF=mt("randomBytes"),VF=mt("spawnSync"),qF=mt("createInterface")});var ht,KF,YF,XF,JF,QF,ZF,eD,tD,nD,sD,oD,rD,iD,aD,cD,lD,uD,dD,Kj,Cg=L(()=>{ht=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},KF=ht("createRequire"),YF=ht("readFileSync"),XF=ht("access"),JF=ht("readFile"),QF=ht("writeFile"),ZF=ht("appendFile"),eD=ht("mkdir"),tD=ht("mkdtemp"),nD=ht("rename"),sD=ht("unlink"),oD=ht("rm"),rD=ht("stat"),iD=ht("copyFile"),aD=ht("readdir"),cD=ht("createReadStream"),lD=ht("createWriteStream"),uD=ht("randomBytes"),dD=ht("spawnSync"),Kj=ht("createInterface")});var gt,fD,mD,hD,gD,bD,wD,yD,vD,$D,xD,kD,ED,SD,jD,_D,RD,AD,Og,TD,Xl=L(()=>{gt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},fD=gt("createRequire"),mD=gt("readFileSync"),hD=gt("access"),gD=gt("readFile"),bD=gt("writeFile"),wD=gt("appendFile"),yD=gt("mkdir"),vD=gt("mkdtemp"),$D=gt("rename"),xD=gt("unlink"),kD=gt("rm"),ED=gt("stat"),SD=gt("copyFile"),jD=gt("readdir"),_D=gt("createReadStream"),RD=gt("createWriteStream"),AD=gt("randomBytes"),Og=gt("spawnSync"),TD=gt("createInterface")});var Ig=L(()=>{Xl();ze();kt();ze();Ci();Mt()});var Lg=L(()=>{});var Yj,Ng=L(()=>{kt();ze();Je();Lg();Yj=Q(".tmct","sessions")});var Pg=L(()=>{kt();ze();Vi()});var bt,JD,QD,ZD,ez,tz,nz,sz,oz,rz,iz,az,cz,lz,uz,dz,pz,fz,mz,Xj,Fg=L(()=>{bt=e=>()=>{throw new Error(e+" unavailable in the browser ask bundle")},JD=bt("createRequire"),QD=bt("readFileSync"),ZD=bt("access"),ez=bt("readFile"),tz=bt("writeFile"),nz=bt("appendFile"),sz=bt("mkdir"),oz=bt("mkdtemp"),rz=bt("rename"),iz=bt("unlink"),az=bt("rm"),cz=bt("stat"),lz=bt("copyFile"),uz=bt("readdir"),dz=bt("createReadStream"),pz=bt("createWriteStream"),fz=bt("randomBytes"),mz=bt("spawnSync"),Xj=bt("createInterface")});var Qj,No,Dg,Jj,zg,kz,Wn,Ez,ea,Sz,Bg=L(()=>{Ws();kt();Fg();ds();ze();Ri();Je();Qj={},No=Q(xe(Ut(Qj.url)),"..","..",".."),Dg=Q(No,"corpus","conceptnet","slice.jsonl"),Jj=Q(No,"src","adapters","corpus","conceptnet-map.toml"),zg=Q(No,"corpus","seon","concepts.jsonl"),kz=Q(No,"corpus","seon","definitions.jsonl"),Wn=Q(No,"corpus","tier2"),Ez=Q(Wn,"manifest.json"),ea=Q(No,"corpus","wordnet"),Sz=Q(ea,"manifest.json")});function t_(){return{seon:{kind:"corpus",active:!1,corpusPath:zg,provenancePrefix:"corpus:seon"},conceptnet:{kind:"corpus",active:!1,corpusPath:Dg,provenancePrefix:"corpus:conceptnet",limit:void 0,prefer:e_},human:{kind:"corpus",active:!0,corpusPath:Q(Wn,"human.jsonl"),provenancePrefix:"corpus:human"},"human-medium":{kind:"corpus",active:!1,corpusPath:Q(Wn,"human-medium.jsonl"),provenancePrefix:"corpus:human-medium"},"human-large":{kind:"corpus",active:!1,corpusPath:Q(Wn,"human-large.jsonl"),provenancePrefix:"corpus:human-large"},"tier2-aws":{kind:"corpus",active:!1,corpusPath:Q(Wn,"aws.jsonl"),provenancePrefix:"corpus:tier2-aws"},"tier2-python":{kind:"corpus",active:!1,corpusPath:Q(Wn,"python.jsonl"),provenancePrefix:"corpus:tier2-python"},"tier2-java":{kind:"corpus",active:!1,corpusPath:Q(Wn,"java.jsonl"),provenancePrefix:"corpus:tier2-java"},"tier2-general":{kind:"corpus",active:!1,corpusPath:Q(Wn,"general.jsonl"),provenancePrefix:"corpus:tier2-general"},"wordnet-xl":{kind:"corpus",active:!1,corpusPath:Q(ea,"wordnet-xl.jsonl"),provenancePrefix:"corpus:wordnet-xl"},"wordnet-full":{kind:"corpus",active:!1,corpusPath:Q(ea,"wordnet-full.jsonl"),provenancePrefix:"corpus:wordnet-full"},namenet:{kind:"corpus",active:!1,corpusPath:Q(Zj,"namenet.jsonl"),provenancePrefix:"corpus:namenet"}}}var n_,Zj,Mz,e_,Pz,Ug=L(()=>{ze();kt();ds();Ci();Bg();n_={},Zj=Q(xe(Ut(n_.url)),"..","..","corpus","namenet"),Mz=Object.freeze(["corpus","lexicon","templates","pack","ontology"]),e_=["rdfs:subClassOf","rdf:type","mgx:usedFor","mgx:partOf","mgx:capableOf"];Pz=Object.freeze(t_())});var Wg=L(()=>{});var Gg=L(()=>{ze();Ws();kt();Tg();Cg();Xl();Mt();Ig();Ie();Ng();Vi();Pg();qo();Ug();ta();Lo();Gi();Pl();Wg()});var Vg={};Sn(Vg,{proseLemma:()=>o_});function o_(){if(Hs!==void 0)return Hs;try{let e=Ll();if(!e)return Hs=null,Hs;let t=e.its,n=new Map;Hs=s=>{let o=String(s||"");if(n.has(o))return n.get(o);let r;try{r=String(e.readDoc(o).tokens().out(t.lemma)[0]||o).toLowerCase()}catch{r=o.toLowerCase()}return n.set(o,r),r}}catch{Hs=null}return Hs}var Hs,qg=L(()=>{Nl()});var Hg={};Sn(Hg,{digestTermFromRows:()=>a_,loadDigestStructureTable:()=>i_,readDigestStructures:()=>r_});var r_,i_,a_,Kg=L(()=>{r_=()=>null,i_=()=>null,a_=()=>null});function lu(e){if(!e)return null;let{node:t,shape:n,kind:s}=e;if(t==="find")return`locate a specific named entity ("${e.term}")`;if(t==="count")return`get a count of ${na(e.entityType)}`;if(t==="list")return`list/enumerate ${na(e.entityType)} matching a condition`;if(t==="superlative")return`rank/compare ${na(e.entityType)} by ${e.metricNoun||e.metric||"a metric"}`;if(t==="anaphora")return"follow up on the previous answer's result set (discourse anaphora)";if(t==="membership")return`understand "${e.term||"an entity"}"'s membership/relationship`;if(t==="clause")return lu(e.clause);if(t==="miss")return null;if(t==="boolean"||t==="qualifier"||t==="reverseSet"||t==="forwardSet"||t==="allOfClass"||t==="temporal"){let o=s||e.inner?.kind;return o&&cn[o]?cn[o]:`filter/traverse ${na(e.entityType)} by a relationship`}return n==="meta"?`understand a vocabulary/definition term ("${e.object}")`:n==="where"?`locate where something is defined ("${e.object}")`:n==="when"?"understand when something last changed (history)":n==="whoLast"?"find who most recently touched something (history)":n==="mentions"?`find where something is mentioned in prose ("${e.object}")`:n==="ask"?s&&cn[s]||"check a specific subject/object relationship":(n==="reverse"||n==="forward")&&s?cn[s]||`understand a "${s}" relationship`:"understand a graph relationship"}function gu(e){let t=new Map;for(let n of e)t.has(Jg(n))||t.set(Jg(n),n);return t}function Zl(e,t=Lr){let n=[],s=[];for(let o of e)o.predicate===t&&(s.push([o.subject,o.object]),Ks(o)&&n.push([o.subject,o.object]));return{strictEdges:n,broadEdges:s}}function eu(e,t,n,s,o){return e(t,n,[],s.strictEdges,o)||e(t,n,[],s.broadEdges,o)}function wu(e){let t=String(e||"").trim();if(/[a-z]ies$/i.test(t))return`${t.slice(0,-3)}y`;if(/[a-z]ses$/i.test(t)){let n=t.slice(0,-2);return/ss$/i.test(n)||f_.has(n.toLowerCase())?n:t.slice(0,-1)}return/(xes|zes|ches|shes)$/i.test(t)?t.slice(0,-2):/[a-z]s$/i.test(t)&&!/(?:ss|ous)$/i.test(t)?t.slice(0,-1):t}async function su(e){let t=String(e||"").toLowerCase();if(t==="has"||t==="have")return zs;if(t==="can")return"mgx:capableOf";try{let{proseLemma:n}=await Promise.resolve().then(()=>(qg(),Vg)),s=n(),o=s?s(t):t;return o==="have"?zs:Dn(`mgx:${o}`)}catch{return Dn(`mgx:${t}`)}}function y_(e,t){let n=String(t||"").match(w_);return n&&/^mgx:[a-z]+$/.test(e)?{predicate:`${e}-${n[1].toLowerCase()}`,object:n[2].trim()}:{predicate:e,object:String(t||"").trim()}}async function Ir(e,t){if(!e||!t)return null;try{let{resolveObject:n}=await Promise.resolve().then(()=>(os(),vf)),s=n(e,t);if(s?.match?.id&&!s.ambiguous)return{id:s.match.id,label:s.match.label}}catch{}return null}function k_(e){let t=String(e||"");return/^have$/i.test(t)?"has":/[a-z]y$/i.test(t)&&!/[aeiou]y$/i.test(t)?`${t.slice(0,-1)}ies`:/(?:s|x|z|ch|sh|o)$/i.test(t)?`${t}es`:`${t}s`}function kb(e){let t=String(e||"");return/^has$/i.test(t)?"have":/[a-z]ies$/i.test(t)&&!/[aeiou]ies$/i.test(t)?`${t.slice(0,-3)}y`:/(?:s|x|z|ch|sh|o)es$/i.test(t)?t.slice(0,-2):t.replace(/s$/i,"")}function Eb(e){if(Ys[e])return Ys[e];let t=String(e||""),n=Wf(t);if(n){let a=Eb(n);if(a==="can")return"cannot";if(a==="can be")return"cannot be";if(a==="is"||a.startsWith("is "))return`is not${a.slice(2)}`;let[l,...c]=a.split(" ");return["does not",kb(l),...c].join(" ")}let s=/^mgx:([a-z]+(?:-[a-z]+)*)-than$/i.exec(t);if(s)return`is ${s[1].replace(/-/g," ")} than`;let o=new RegExp(`^mgx:(${yu})-([a-z]+)$`,"i").exec(t);if(o)return`is ${o[1].toLowerCase()} ${o[2].toLowerCase()}`;let r=/^mgx:same-([a-z]+)-as$/i.exec(t);if(r)return`has the same ${r[1].toLowerCase()} as`;let i=/^mgx:([a-z]+)(?:-([a-z]+))?$/i.exec(t);return i?`${k_(i[1])}${i[2]?` ${i[2]}`:""}`:e}function ru(e){let t=/^mgx:([a-z][\w-]*)$/i.exec(String(e||""));return t?t[1].toLowerCase():null}function S_(e){let t=String(e||"").trim(),n=t.toLowerCase();for(let{marker:s,predicate:o}of E_)if(n!==s&&n.endsWith(` ${s}`)){let r=t.slice(0,t.length-s.length).trim();if(r)return{subject:r,predicate:o}}return{subject:t,predicate:null}}function oe(e){let t=e.provenance?` (source: ${e.provenance})`:"";return e.provenance.includes("ace:chat")||e.provenance.includes("teach:chat")?`you told me: ${It(e)}${t}`:e.provenance.includes("corpus-weak:")?`possibly: ${It(e)}${t}`:e.provenance.includes("corpus:")?`${It(e)}${t}`:e.provenance.includes("reference:")?`${It(e)}${t}`:`i learned: ${It(e)}${t}`}function eb(e,t,n){let s=oe(e);if(!Vn.has(e.predicate)||!n.has(e.subject))return s;let o=Xi(e.object,t,{cap:6});if(o.length<=1)return s;let r=` \u2192 ${o.slice(1).join(" \u2192 ")}`,i=s.match(j_);return i?s.slice(0,i.index)+r+i[0]:s+r}function tb(e,t,n,{indent:s=""}={}){let o=t.filter(j=>j.predicate===Lr).map(j=>[j.subject,j.object]),r=Ar(o),i=e.map(j=>`${s}${eb(j,r,n)}`),a=e.filter(j=>Vn.has(j.predicate)&&n.has(j.subject)),l=[...new Set(a.map(j=>j.object))];if(l.length<2)return{lines:i,grouped:null};let c=t.filter(j=>j.predicate==="owl:disjointWith").map(j=>[j.subject,j.object]),{split:u,clusters:d}=Ji(l,{parents:r,disjointEdges:c});if(!u)return{lines:i,grouped:null};let f=a[0].subject,p=new Map;for(let j of d)for(let v of j.objects)p.set(v,j);let m=e.filter(j=>!(Vn.has(j.predicate)&&n.has(j.subject))),h=[],g=[],b=0,y=j=>{let v=eb(j,r,n);return b<je?(b+=1,`${s}${v}`):(g.push(v),null)};for(let j of d){let v=a.filter(E=>p.get(E.object)===j).map(y).filter(Boolean);v.length&&h.push(`${s}${f}, the ${j.label}:
132
133
  ${v.join(`
133
134
  `)}`)}if(m.length){let j=m.map(y).filter(Boolean);j.length&&h.push(`${s}also about ${f}:
134
135
  ${j.join(`
135
136
  `)}`)}let w=g.length?`
136
137
  ${s}\u2026and ${g.length} more \u2014 say 'more' to see them.`:"",$={text:h.join(`
137
- `)+w,replace:!0,...g.length?{pending:{items:g,noun:"facts"}}:{}};return{lines:i,grouped:$}}async function ij(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(ug(),lg)))}catch{return null}let r;try{r=o(e,t,n)}catch{return null}if(!r||!r.paragraphs.length)return null;let i=[...new Set((r.sources||[]).map(u=>u.provenance).filter(Boolean))],a=i.length?`(sources: ${i.join("; ")})
138
+ `)+w,replace:!0,...g.length?{pending:{items:g,noun:"facts"}}:{}};return{lines:i,grouped:$}}async function R_(e,t,n,s){let o;try{({digestTermFromRows:o}=await Promise.resolve().then(()=>(Kg(),Hg)))}catch{return null}let r;try{r=o(e,t,n)}catch{return null}if(!r||!r.paragraphs.length)return null;let i=[...new Set((r.sources||[]).map(u=>u.provenance).filter(Boolean))],a=i.length?`(sources: ${i.join("; ")})
138
139
  `:"",l=`Say 'show the facts' for all ${s.length} stored facts.`;return{text:`${r.paragraphs.join(`
139
140
 
140
141
  `)}
141
142
 
142
- ${a}${l}`,pending:{items:s,noun:"facts"}}}function Io(e){let t=vl().find(n=>n.kind==="article");return t&&ch(String(e||""),t)?"an":"a"}function Bg(e,t){return e&&t?{text:`you've told me both, and I won't pick between them \u2014 ${ie(e)}; ${ie(t)}. To settle it, say "forget that ${e.subject} is ${Io(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${ie(t)}`,replace:!0}:e?{text:`yes \u2014 ${ie(e)}`,replace:!0}:null}function aj(e,t){let n=s=>`${Ct(s)}${s.provenance?` (source: ${s.provenance})`:""}`;return{text:`you've told me both ${n(e)} and ${n(t)} \u2014 together those contradict, and I won't derive an answer from an inconsistency. To settle it, say "forget that ${e.subject} is ${Io(e.object)} ${e.object}".`,replace:!0}}function Qi(e){let t=o=>`${Ct(o)}${o.provenance?` (source: ${o.provenance})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function Kl(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(He(),cs)),n=await t(e),s=[];for(let o of n.individuals||[]){if(o?.class!=="Fact")continue;let r=i=>(o.attributes||[]).find(a=>a.key===i)?.value||"";s.push({subject:r("subject"),predicate:r("predicate"),object:r("object"),provenance:r("provenance")})}return s}catch{return[]}}async function mt(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(He(),cs)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function cj(e){if(!Zi)try{Zi=us().nounPlurals}catch{Zi=new Map}return Zi.get(e)??null}function ta(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return Er(us(),t)?.lemma||t}catch{return t}}function lj(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return ta(e);let n=ta(iu(t[1]));return`${Io(n)} ${n}`}function K(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(uj,"").trim();r&&r!==n&&o.add(r);for(let i of o){s.add(i),i.endsWith("es")&&s.add(i.slice(0,-2)),i.endsWith("s")&&s.add(i.slice(0,-1));let a=cj(i);a&&s.add(e(a))}return s}function wg(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}function Gg(e,t=null){let n=na(e),s=n.match(dj);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(fj);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function Zl(e){let t=String(e||"").replace(gj,"");if(t!==e){let s=t.match(ps);if(s)return s}let n=String(e||"").match(bj);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(ps):null}function tu(e){return String(e||"").replace(/^(?:can't|cannot|can not|cant)\s+/i,"can ").replace(/^(?:doesn't|does not)\s+/i,"does ").replace(/^(?:don't|do not)\s+/i,"do ").replace(/^(?:didn't|did not)\s+/i,"did ").replace(/\s+(?:not|never)\s+/i," ").replace(/\s+/g," ").trim()}function $g(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function Tj(e,t){let n=(e||[]).map(s=>t.find(o=>o.predicate===s.predicate&&o.subject===s.subject&&o.object===s.object));return!n.length||!n.every(Boolean)?null:n.map(s=>`${Ct(s)}${s.provenance?` (source: ${s.provenance})`:""}`).join("; ")}function kg(e,t,n,{maxHops:s=3}={}){let o=K(ee,e),r=K(ee,t),i=wi(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?Tj(l,n):null;return c?` \u2014 via: ${c}`:""};if(i.verdict==="both")return{text:`I have both, at the same level of detail \u2014 my sources disagree, so I won't pick:
143
- ${[...i.negative,...i.positive].map(ie).join(`
144
- `)}`,replace:!0,miss:!0};if(i.verdict==="yes"||i.verdict==="no"){let l=i.verdict==="no"?i.negative[0]:i.positive[0],c=`${i.verdict} \u2014 ${ie(l)}${a(i.chain)}`;return i.overrides&&(c+=`. That overrides what I know about ${i.overrides.fact.subject} generally: ${ie(i.overrides.fact)}`),{text:c,replace:!0}}return null}function Eg(e,t,n,{maxHops:s=3}={}){let o=K(ee,e),r=K(ee,t),i=Lc(o,r,n,{maxHops:s});if(!i)return null;let a=`${e} is a kind of ${i.klass}`,l=`I don't know if ${e} can ${t}.`;if(i.positive.length||i.negative.length){let u=[`${i.positive.length} can ${t}`,`${i.negative.length} cannot`,`${i.unknown.length} I have nothing on`].join(", "),d=[...i.positive,...i.negative].slice(0,Oc).map(f=>ie(f.fact));return{text:`${l} ${a}, and of the ${i.kinds} kind${i.kinds===1?"":"s"} of ${i.klass} I know, ${u}.
143
+ ${a}${l}`,pending:{items:s,noun:"facts"}}}function Mo(e){let t=Ol().find(n=>n.kind==="article");return t&&Vh(String(e||""),t)?"an":"a"}function Sb(e,t){return e&&t?{text:`you've told me both, and I won't pick between them \u2014 ${oe(e)}; ${oe(t)}. To settle it, say "forget that ${e.subject} is ${Mo(e.object)} ${e.object}".`,replace:!0}:t?{text:`no \u2014 ${oe(t)}`,replace:!0}:e?{text:`yes \u2014 ${oe(e)}`,replace:!0}:null}function A_(e,t){let n=s=>`${It(s)}${s.provenance?` (source: ${s.provenance})`:""}`;return{text:`you've told me both ${n(e)} and ${n(t)} \u2014 together those contradict, and I won't derive an answer from an inconsistency. To settle it, say "forget that ${e.subject} is ${Mo(e.object)} ${e.object}".`,replace:!0}}function sa(e){let t=o=>`${It(o)}${o.provenance?` (source: ${o.provenance})`:""}`,n=e[0],s=e[e.length-1];return`${e.map(t).join("; ")}; so ${n.subject} is a ${s.object}`}async function iu(e){try{let{loadMemory:t}=await Promise.resolve().then(()=>(Je(),us)),n=await t(e),s=[];for(let o of n.individuals||[]){if(o?.class!=="Fact")continue;let r=i=>(o.attributes||[]).find(a=>a.key===i)?.value||"";s.push({subject:r("subject"),predicate:r("predicate"),object:r("object"),provenance:r("provenance")})}return s}catch{return[]}}async function ot(e,t=null){if(t?.rows)return t.rows;try{let{loadMemory:n,readFactRows:s}=await Promise.resolve().then(()=>(Je(),us)),o=s(await n(e));return t&&(t.rows=o,t.reloads=(t.reloads||0)+1),o}catch{return[]}}function T_(e){if(!oa)try{oa=ps().nounPlurals}catch{oa=new Map}return oa.get(e)??null}function ia(e){let t=String(e||"").trim().toLowerCase();if(!t||/\s/.test(t))return t;try{return Rr(ps(),t)?.lemma||t}catch{return t}}function C_(e){let t=String(e||"").trim().match(/^(?:all|every|each|both|most|some)\s+([\w-]+)$/i);if(!t)return ia(e);let n=ia(wu(t[1]));return`${Mo(n)} ${n}`}function Y(e,t){let n=e(t),s=new Set,o=new Set([n]),r=n.replace(O_,"").trim();r&&r!==n&&o.add(r);for(let i of o){s.add(i),i.endsWith("es")&&s.add(i.slice(0,-2)),i.endsWith("s")&&s.add(i.slice(0,-1));let a=T_(i);a&&s.add(e(a))}return s}function nb(e,t,n){for(let s of e)for(let o of t){let r=n(s,o);if(r)return r}return null}function Rb(e,t=null){let n=aa(e),s=n.match(I_);if(s)return[s[0],s[2],s[1]];if(!t)return null;let o=n.match(N_);return o&&t(o[1])?[o[0],o[2],o[1]]:null}function du(e){let t=String(e||"").replace(F_,"");if(t!==e){let s=t.match(ms);if(s)return s}let n=String(e||"").match(D_);return n?`is ${n[1].trim()} a ${n[2].trim()}`.match(ms):null}function fu(e){return String(e||"").replace(/^(?:can't|cannot|can not|cant)\s+/i,"can ").replace(/^(?:doesn't|does not)\s+/i,"does ").replace(/^(?:don't|do not)\s+/i,"do ").replace(/^(?:didn't|did not)\s+/i,"did ").replace(/\s+(?:not|never)\s+/i," ").replace(/\s+/g," ").trim()}function rb(e){let t=String(e.text||"").replace(/^(?:yes|no) — /i,"");return t===e.text?e:{...e,text:t}}function Z_(e,t){let n=(e||[]).map(s=>t.find(o=>o.predicate===s.predicate&&o.subject===s.subject&&o.object===s.object));return!n.length||!n.every(Boolean)?null:n.map(s=>`${It(s)}${s.provenance?` (source: ${s.provenance})`:""}`).join("; ")}function ab(e,t,n,{maxHops:s=3}={}){let o=Y(X,e),r=Y(X,t),i=xi(o,r,n,{maxHops:s}),a=l=>{let c=l&&l.length?Z_(l,n):null;return c?` \u2014 via: ${c}`:""};if(i.verdict==="both")return{text:`I have both, at the same level of detail \u2014 my sources disagree, so I won't pick:
144
+ ${[...i.negative,...i.positive].map(oe).join(`
145
+ `)}`,replace:!0,miss:!0};if(i.verdict==="yes"||i.verdict==="no"){let l=i.verdict==="no"?i.negative[0]:i.positive[0],c=`${i.verdict} \u2014 ${oe(l)}${a(i.chain)}`;return i.overrides&&(c+=`. That overrides what I know about ${i.overrides.fact.subject} generally: ${oe(i.overrides.fact)}`),{text:c,replace:!0}}return null}function cb(e,t,n,{maxHops:s=3}={}){let o=Y(X,e),r=Y(X,t),i=Bc(o,r,n,{maxHops:s});if(!i)return null;let a=`${e} is a kind of ${i.klass}`,l=`I don't know if ${e} can ${t}.`;if(i.positive.length||i.negative.length){let u=[`${i.positive.length} can ${t}`,`${i.negative.length} cannot`,`${i.unknown.length} I have nothing on`].join(", "),d=[...i.positive,...i.negative].slice(0,zc).map(f=>oe(f.fact));return{text:`${l} ${a}, and of the ${i.kinds} kind${i.kinds===1?"":"s"} of ${i.klass} I know, ${u}.
145
146
  ${d.join(`
146
- `)}`,replace:!0,miss:!0}}let c=Nc(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,Oc),d=c.slice(u.length);return{text:`${l} ${a}, and nothing I know about ${i.klass} says whether one can ${t}. I do know ${c.length} thing${c.length===1?"":"s"} that can ${t}${d.length?` (first ${u.length} shown)`:""}:
147
- ${u.map(ie).join(`
148
- `)}`,replace:!0,miss:!0,...d.length?{pending:{items:d.map(ie),noun:"facts"}}:{}}}return{text:`${l} ${a}, but nothing I remember says whether any kind of ${i.klass} can ${t}.`,replace:!0,miss:!0}}function Oj(e){let t=String(e||"").toLowerCase().trim().replace(/\s+/g," ");if(t==="best")return"better";if(t==="worst")return"worse";let n=t.match(/^(most|least)\s+([a-z][\w-]*)$/);return n?`${n[1]==="most"?"more":"less"} ${n[2]}`:/[a-z]est$/.test(t)&&t.length>4?`${t.slice(0,-3)}er`:null}function ln(e){let t=new Set,n=[];for(let s of e){let o=`${s.subject}|${s.predicate}|${s.object}`;t.has(o)||(t.add(o),n.push(s))}return n}async function Vg(e,t,n,s,o={},r=null,i=null){return Hg(await Dj(e,t,n,s,o,r,i),n,t)}function Hg(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=Jl(t?.parsed);if(!o&&e.generalVerbQuery&&(o=dg),!o){let r=s.match(Ql),i=r?null:na(s).match(Wg)||Gg(s),a=r?r[2]:i?i[1]:null;a&&!eu.has(a.toLowerCase())&&(o=dg)}if(!o){let r=s.match(Yg);r&&(o=Jl({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function Dj(e,t,n,s,o={},r=null,i=null){let a,l;try{({normFactTerm:a,normFactPredicate:l}=await Promise.resolve().then(()=>(He(),cs)))}catch{return null}let c=String(t).trim(),u=c.match(kj);if(u){let F=K(a,u[1]),D=(await mt(e,r)).filter(B=>B.predicate==="mgx:usedFor"&&F.has(B.object));if(D.length){let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
149
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
150
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}for(let{predicate:F,re:D}of Nj){let B=c.match(D);if(!B)continue;let W=K(a,B[1]),C=(await mt(e,r)).filter(re=>re.predicate===F&&W.has(re.object));if(!C.length)continue;let I=Je(ln(C),o).map(ie),N=I.slice(0,Se),q=I.slice(Se),U=q.length?`
151
- \u2026and ${q.length} more \u2014 say 'more' to see them.`:"";return{text:N.join(`
152
- `)+U,replace:!0,...q.length?{pending:{items:q,noun:"facts"}}:{}}}let d=c.match(Cj),f=d?null:c.match(Ij),p=d?d[1]:f?.[2],m=d?d[2]:f?.[1],h=p&&m?Oj(m):null;if(h){let F=`mgx:${h.replace(/\s+/g,"-")}-than`,D=await mt(e,r),B=K(a,p),W=[...B].sort((I,N)=>I.length-N.length)[0],C=I=>B.has(I)||I.startsWith(`${W}-`)||I.startsWith(`${W} `)||D.some(N=>Gn.has(N.predicate)&&N.subject===I&&B.has(N.object)),O=ln(D.filter(I=>I.predicate===F&&qs(I))).filter(I=>I.subject!==I.object&&C(I.subject)&&C(I.object));if(O.length){let I=new Set,N=new Map;for(let H of O)I.add(H.subject),I.add(H.object),N.set(H.object,(N.get(H.object)||0)+1),N.has(H.subject)||N.set(H.subject,N.get(H.subject)||0);let q=new Map(N),U=[],re=null;for(;q.size;){let H=[...q.keys()].filter(se=>q.get(se)===0);if(H.length!==1){re=H.length===0?{text:`I can't order the ${W}s \u2014 the "${h} than" facts I have loop back on themselves, so no ${m} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${m} ${W} from what I know \u2014 nothing compares ${H[0]} and ${H[1]}. Teach me, e.g. "${H[0]} is ${h} than ${H[1]}".`,replace:!0,miss:!0};break}let X=H[0];U.push(X),q.delete(X);for(let se of O)se.subject===X&&q.has(se.object)&&q.set(se.object,q.get(se.object)-1)}if(re)return re;let oe=U.slice(0,-1).map((H,X)=>O.find(se=>se.subject===H&&se.object===U[X+1]));if(oe.every(Boolean)){let H=oe.map(X=>`${Ct(X)}${X.provenance?` (source: ${X.provenance})`:""}`).join("; ");return{text:`${U[0]} \u2014 ${H}; so ${U[0]} is the ${m} ${W}`,replace:!0}}}}let g=s?c.match(Ej):null;if(g){let F=K(a,g[1]),D=(await mt(e,r)).filter(B=>vg.test(B.predicate)&&F.has(B.subject));if(D.length){let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
153
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
154
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let b=c.match(Sj);if(b){let F=b[1].toLowerCase(),D=K(a,b[2].replace(/^(?:an?|the)\s+/i,"").trim()),B=(await mt(e,r)).filter(W=>vg.test(W.predicate)&&W.predicate.endsWith(`-${F}`)&&D.has(W.object));if(B.length){let C=Je(ln(B),o).map(ie),O=C.slice(0,Se),I=C.slice(Se),N=I.length?`
155
- \u2026and ${I.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
156
- `)+N,replace:!0,...I.length?{pending:{items:I,noun:"facts"}}:{}}}}let y=n?.parsed?.shape==="meta"?n.parsed.object:null,w=n?.parsed&&n.parsed.node!=="miss";if(!y&&s&&!w&&!Sg.test(c)){let F=c.match(Yg)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);F&&(y=gs(F[1]))}if(!y&&n?.ambiguous&&Array.isArray(n.candidateParses)){let F=n.candidateParses.find(D=>D?.shape==="meta"&&D.object);F&&(y=gs(String(F.object)))}if(y){let F=sj(y),{predicate:D}=F,B=F.subject.replace(/^(?:the|an?)\s+/i,"").trim()||F.subject,W=!1;if(D&&Wn.test(B)){if(!i){let se=String(Vs[D]||"").replace(/^(?:is|are)\s+/,"");return{text:`not sure what "${B.toLowerCase()}" refers to yet \u2014 name the subject directly, e.g. "what is a <name>${se?` ${se}`:""}".`,replace:s,miss:!0,selfContainedMiss:!0}}B=i,W=!0}let C=K(a,B),O=(await mt(e,r)).filter(se=>C.has(se.subject)&&!hg.has(se.predicate)),I=D?O.filter(se=>l(se.predicate)===D):O;if(!D&&I.length&&!I.some(Yl)&&(I=[]),!I.length){if(D&&(O.length||W))return{text:`I don't have any "${Vs[D]}" facts about ${B}.`,replace:s,...O.length?{}:{miss:!0}};if(!D){let se=Je((await mt(e,r)).filter(J=>C.has(J.object)),o);if(se.length&&!se.some(Yl)&&(se=[]),se.length){let J=se.map(ie),ae=J.slice(0,Se),ne=J.slice(Se),_e=ne.length?`
157
- \u2026and ${ne.length} more \u2014 say 'more' to see them.`:"";return{text:ae.join(`
158
- `)+_e,replace:s,...ne.length?{pending:{items:ne,noun:"facts"}}:{}}}}return null}I=Je(I,o);let N=await mt(e,r),{lines:q,grouped:U}=bg(I,N,C),re=!D&&q.length>rj?await ij(B,I,N,q):null;if(re)return{...re,replace:s};if(U)return{...U,replace:s};let oe=q.slice(0,Se),H=q.slice(Se),X=H.length?`
159
- \u2026and ${H.length} more \u2014 say 'more' to see them.`:"";return{text:oe.join(`
160
- `)+X,replace:s,...H.length?{pending:{items:H,noun:"facts"}}:{}}}if(!s)return null;let $=c.match(WS);if($){let D=`mgx:${$[2].toLowerCase().replace(/\s+/g,"-")}-than`,B=await Kl(e),W=oe=>{let H=oe.replace(/^(?:an?|the)\s+/i,"").trim();return i&&Wn.test(H)?i:H},C=W($[1]),O=W($[3]),I=K(a,C),N=K(a,O),q=B.find(oe=>oe.predicate===D&&I.has(oe.subject)&&N.has(oe.object));if(q){let oe=B.find(X=>X.predicate===D&&I.has(X.object)&&N.has(X.subject)),H=oe?` \u2014 though you also told me the opposite: ${ie(oe)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${ie(q)}${H}`,replace:!0}}let U=B.filter(oe=>oe.predicate===D&&(I.has(oe.subject)||I.has(oe.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${U.length?` I do know: ${U.slice(0,3).map(ie).join("; ")}.`:""} If it's true, teach me: "${C} is ${$[2].toLowerCase()} than ${O}".`,replace:!0,miss:!0}}for(let{predicate:F,phrase:D,re:B}of Pj){let W=c.match(B);if(!W)continue;let C=await Kl(e),O=K(a,W[1]),I=K(a,W[2]),N=C.find(U=>U.predicate===F&&O.has(U.subject)&&I.has(U.object));if(N)return{text:`yes \u2014 ${ie(N)}`,replace:!0};let q=C.filter(U=>U.predicate===F&&O.has(U.subject));if(q.length){let U=q.slice(0,3).map(ie).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${W[1]} ${D} ${W[2]}. I do know: ${U}.`,replace:!0,miss:!0}}if(!n?.parsed&&C.some(U=>O.has(U.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${W[1]} ${D} ${W[2]}.`,replace:!0,miss:!0};break}let j=c.match(ps)||Zl(c);if(j){let F=K(a,j[1]),D=K(a,j[2]),B=await mt(e,r),W=N=>F.has(N.subject)&&D.has(N.object),{DISJOINT_PREDICATE:C}=await Promise.resolve().then(()=>(Ft(),en)),O=N=>F.has(N.subject)||F.has(N.object)||D.has(N.subject)||D.has(N.object);return B.some(N=>N.predicate===C&&qs(N)&&O(N))?null:Bg(B.find(N=>Gn.has(N.predicate)&&W(N)),B.find(N=>N.predicate===gi&&W(N)))}let v=tu(c),x=v.match(yj);if(x){let F=await mt(e,r),D=x[1],B=kg(x[2],x[3],F);if(B&&v!==xg(c)&&(B=$g(B)),B&&D)return{text:`I can't speak for ${D.trim()} ${x[2]} \u2014 what I remember is generic, not universal. ${B.text}.`,replace:!0};if(B)return B;let W=K(a,x[2]),C=F.filter(O=>O.predicate==="mgx:capableOf"&&W.has(O.subject));if(C.length){let O=C.slice(0,3).map(ie).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${x[2]} can ${x[3]}. I do know: ${O}. If it's true, teach me: "a ${C[0].subject} can ${x[3]}".`,replace:!0,miss:!0}}return Eg(x[2],x[3],F)}let k=c.match(vj);if(k){let F=K(a,k[1]),D=K(a,k[2]),B=new Set(["mgx:hasA","tmct:has"]),W=await Kl(e),C=q=>W.find(U=>B.has(U.predicate)&&q.has(U.subject)&&D.has(U.object)),O=C(F);if(O)return{text:`yes \u2014 ${ie(O)}`,replace:!0};let I=[{terms:F,chain:[]}],N=new Set;for(let q=0;q<4;q+=1){let U=[];for(let{terms:re,chain:oe}of I){let H=W.filter(X=>Gn.has(X.predicate)&&re.has(X.subject)&&!N.has(X.object));for(let X of H){if(N.has(X.object))continue;N.add(X.object);let se=[...oe,X],J=C(K(a,X.object));if(J)return{text:`yes \u2014 ${[...se.map(ie),ie(J)].join("; ")}`,replace:!0};U.push({terms:K(a,X.object),chain:se})}}if(!U.length)break;I=U}return null}let _=tu(c),R=_.match(jj);if(R){let F=await mt(e,r),D=!!R[1],B=K(a,R[2]),W=K(a,R[3]),C=kg(R[2],R[3],F);if(C&&_!==xg(c)&&(C=$g(C)),C&&D)return{text:`I can't speak for ${R[1].trim()} ${R[2]} \u2014 what I remember is generic, not universal. ${C.text}.`,replace:!0};if(C)return C;if(s){let O=F.filter(N=>N.predicate==="mgx:capableOf"&&B.has(N.subject));if(O.length){let N=O.slice(0,3).map(ie).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${R[2]} can ${R[3]}. I do know: ${N}. If it's true, teach me: "a ${O[0].subject} can ${R[3]}".`,replace:!0,miss:!0}}let I=Eg(R[2],R[3],F);if(I)return I;if(!/\s/.test(R[2].trim())&&!F.some(N=>B.has(N.subject)||B.has(N.object))){let N=iu(ta(R[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${R[2]}" yet. Teach me "a ${N} can ${R[3]}" (or "a ${N} cannot ${R[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let S=c.match($j);if(S){let F=K(a,S[1]),D=(await mt(e,r)).filter(N=>(N.predicate==="mgx:capableOf"||N.predicate===bo)&&F.has(N.subject));if(!D.length)return null;let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
161
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
162
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let A=c.match(Aj);if(A){let F=K(a,A[1]),D=K(a,A[2]),B=await mt(e,r),W=ln(B.filter(C=>C.predicate==="mgx:capableOf"&&D.has(C.object))).filter(C=>wi(new Set([C.subject]),D,B).verdict==="yes");if(W.length){let{findIsaChain:C,SUBCLASS_PREDICATE:O,TYPE_PREDICATE:I}=await Promise.resolve().then(()=>(Ft(),en)),N=B.filter(Q=>Q.predicate===O),q=B.filter(Q=>Q.predicate===I),U=N.map(Q=>[Q.subject,Q.object]),re=q.map(Q=>[Q.subject,Q.object]),oe=Q=>(Q.predicate===O?N:q).find(ge=>ge.subject===Q.subject&&ge.object===Q.object),H=new Map,X=W.filter(Q=>F.has(Q.subject)?!0:(H.has(Q.subject)||H.set(Q.subject,C(Q.subject,F,re,U,{maxHops:3})),!!H.get(Q.subject))),J=Je(X.length?X:W,o).map(Q=>{let ge=X.length?H.get(Q.subject):null;if(!ge||ge.length<2)return ie(Q);let $e=ge.map(oe);if(!$e.every(Boolean))return ie(Q);let pe=$e.map(Ie=>`${Ct(Ie)}${Ie.provenance?` (source: ${Ie.provenance})`:""}`).join("; ");return`${ie(Q)} \u2014 via: ${pe}`}),ae=J.slice(0,Se),ne=J.slice(Se),_e=ne.length?`
163
- \u2026and ${ne.length} more \u2014 say 'more' to see them.`:"";return{text:(X.length?"":`nothing I remember ties these to "${A[1]}", but:
164
- `)+ae.join(`
165
- `)+_e,replace:!0,...ne.length?{pending:{items:ne,noun:"facts"}}:{}}}}let L=c.match(Rj);if(L&&L[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let F=K(a,L[1]),D=(await mt(e,r)).filter(B=>B.predicate==="mgxneg:capableOf"&&F.has(B.object));if(D.length){let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
166
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
167
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}return{text:`nothing I remember says anything cannot ${L[1].trim()}.`,replace:!0,miss:!0}}let T=c.match(_j);if(T&&T[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let F=K(a,T[1]),D=Nc(F,await mt(e,r));if(D.length){let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
168
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
169
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let P=c.match(xj);if(P&&!Fj.has(P[1].trim().split(/\s+/)[0]?.toLowerCase())){let F=K(a,P[1]),D=(await mt(e,r)).filter(N=>N.predicate==="mgx:hasA"&&F.has(N.object));if(!D.length)return null;let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
170
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
171
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let V=c.match(Sg),Y=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:V?.[1];if(Y){let F=K(a,Y),D=(await mt(e,r)).filter(N=>Gn.has(N.predicate)&&F.has(N.object));if(!D.length)return null;let W=Je(ln(D),o).map(ie),C=W.slice(0,Se),O=W.slice(Se),I=O.length?`
172
- \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:C.join(`
173
- `)+I,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let te=c.match(wj);if(te){let F=K(a,te[1]),D=await mt(e,r),B=G=>!String(G.provenance||"").includes("corpus:")&&!String(G.provenance||"").includes("web:"),W=D.filter(G=>Gn.has(G.predicate)&&B(G)),C=new Set,O=F;for(let G=0;G<8&&O.size;G+=1){let ce=new Set;for(let Ne of W)O.has(Ne.object)&&!C.has(Ne.subject)&&ce.add(Ne.subject);if(!ce.size)break;for(let Ne of ce)C.add(Ne);let le=new Set;for(let Ne of ce)for(let jt of K(a,Ne))le.add(jt);O=le}let I=D.filter(G=>F.has(G.subject)||F.has(G.object)||C.has(G.subject));if(!I.length){let G=a(te[1]).split(/\s+/).filter(ce=>ce.length>=4&&!Ug.has(ce));if(G.length){let ce=Ne=>new Set(String(Ne||"").split(/\s+/)),le=Ne=>{let jt=ce(Ne);return G.some(Ke=>jt.has(Ke))};I=D.filter(Ne=>le(Ne.subject)||le(Ne.object))}}I=I.filter(G=>!hg.has(G.predicate));let N=I.length>0&&!I.some(Yl);if(!I.length)return null;let{findConsistencyViolations:q,TYPE_PREDICATE:U,SUBCLASS_PREDICATE:re,DISJOINT_PREDICATE:oe}=await Promise.resolve().then(()=>(Ft(),en)),H=G=>!G.provenance?.includes("corpus:")&&!G.provenance?.includes("web:"),X=D.filter(G=>G.predicate===U&&H(G)).map(G=>[G.subject,G.object]),se=D.filter(G=>G.predicate===re&&H(G)).map(G=>[G.subject,G.object]),J=D.filter(G=>G.predicate===oe&&H(G)).map(G=>[G.subject,G.object]);if(J.length){let ce=q(X,se,J,{focus:F,budget:5}).find(le=>F.has(le.subject));if(ce)return{text:`I can't answer that \u2014 what I've been told about ${ce.subject} is inconsistent: it's taught to be both ${ce.classA} and ${ce.classB}, but ${ce.viaA} and ${ce.viaB} are disjoint (${ce.viaA} owl:disjointWith ${ce.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let ae=I.find(G=>F.has(G.subject)||F.has(G.object)),ne=ae?F.has(ae.subject)?ae.subject:ae.object:te[1].trim(),_e=I.some(G=>C.has(G.subject)&&!F.has(G.subject)&&!F.has(G.object));I=Je(I,o);let Le=`${I.length} remembered fact${I.length===1?"":"s"} about ${ne}${_e?" (including its known subtypes)":""}:`,{lines:Q,grouped:ge}=bg(I,D,F,{indent:" "});if(ge)return{...ge,text:`${Le}
174
- ${ge.text}`,...N?{weakOnly:!0}:{}};let $e=Q.slice(0,Se),pe=Q.slice(Se),Ie=pe.length?`
175
- \u2026and ${pe.length} more \u2014 say 'more' to see them.`:"";return{text:`${Le}
176
- ${$e.join(`
177
- `)}${Ie}`,replace:!0,...pe.length?{pending:{items:pe.map(G=>G.trim()),noun:"facts"}}:{},...N?{weakOnly:!0}:{}}}return null}async function Xj(e,t){let n=await Ar(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&pg[s]?pg[s][0]:null}function ea(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<Qj;r+=1){let i=null;for(let a of e.relations||[])if(Jj.test(`${a?.prop||""} ${a?.predicate||""}`)&&(i=(a.edges||[]).find(l=>l?.subject===o)||null,i))break;if(!i||s.has(i.object))break;s.add(i.object),n.push({id:i.object,label:i.objectLabel||i.object}),o=i.object}return n}async function Kg(e,t,n,s,o=null,r=null,i={},a=null){return Hg(await Zj(e,t,n,s,o,r,i,a),n,t)}async function Zj(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(He(),cs)))}catch{return null}let c=String(t).trim();if(o){let C=c.match(ps);if(C){let O=await Ar(o,C[1]);if(O){let I=K(l,Yt(C[2])),N=ea(o,O.id).find(U=>[...K(l,U.label)].some(re=>I.has(re)));if(N)return{text:`yes \u2014 the code graph says ${O.label} inherits ${N.label}.`,replace:!0};let q=await Ar(o,Yt(C[2]));if(q&&ea(o,q.id).some(U=>U.id===O.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${q.label} inherits ${O.label}. An inheritance doesn't reverse.`,replace:!0,miss:!0}}}}let u=c.replace(/^(?:actually|really|honestly|yeah\s+nah)\s*,?\s+/i,""),d=await mt(e,a);if(!d.length){if(!ps.test(u)&&!Ql.test(u)){let O=u.match(_g);if(O){let I=O[1].trim(),N=Wn.test(I)?r||null:I;if(N&&!/^there\b/i.test(N)&&!n?.parsed&&!Ag.test(I)&&!Rg.test(I)&&!mg.test(O[2].trim()))return Tg(N,O[2].trim().toLowerCase())}}let C=u.match(ps)||Zl(c);if(!(C&&!/^there\b/i.test(C[1].trim())||yg.test(c)))return null}let f=d.filter(C=>Gn.has(C.predicate)),p=(C,O)=>O.trust-C.trust,m=C=>{let O=C.map(ie),I=O.slice(0,Se),N=O.slice(Se),q=N.length?`
178
- \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
179
- `)+q,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(Yj.test(c)){let C=Je(f.length?f:d,i);return C.length?m(C):null}let h=u.match(Ql);if(h){let C=h[1].trim(),O=Wn.test(C)?r||null:C,I=h[2].trim().toLowerCase(),N=h[3].trim();if(O&&!eu.has(I)){let q=Bl(d),{findIsaChain:U}=await Promise.resolve().then(()=>(Ft(),en)),re=Le=>{let Q=String(Le||"").trim().toLowerCase(),ge=[];for(let $e of d){let pe=Hl($e.predicate);if(!pe)continue;if(pe===Q){ge.push({fact:$e,aliasFacts:[]});continue}let Ie=Ul(U,pe,new Set([Q]),q,{maxHops:2});if(!Ie)continue;let G=Ie.map(ce=>d.find(le=>le.predicate===Tr&&le.subject===ce.subject&&le.object===ce.object));G.every(Boolean)&&ge.push({fact:$e,aliasFacts:G})}return ge},{loadMemory:oe,findRuleByName:H,resolveRelationChase:X}=await Promise.resolve().then(()=>(He(),cs)),{findActionPath:se}=await Promise.resolve().then(()=>(Ss(),zr)),J=await oe(e),ne=await X(J,I,O,N,{relationFactsFor:re,renderFactLine:ie,factPhrase:Ct,factTermVariants:K,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:zl,findActionPath:se});return ne?{text:`yes \u2014 ${ne.citation.join("; ")}`,replace:!0}:re(I).length>0||!!H(J,I)?{text:`I know the '${I}' relation, but I can't confirm ${O} is the ${I} of ${N} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${I}' yet.`,replace:!0}}}let g=na(u).match(Wg)||Gg(u,C=>{let O=K(l,C);return d.some(I=>O.has(I.subject)||O.has(I.object))});if(g){let C=g[1].trim().toLowerCase(),O=g[2].trim(),I=Wn.test(O)?r||null:O;if(I&&!eu.has(C)){let N=Bl(d),{findIsaChain:q}=await Promise.resolve().then(()=>(Ft(),en)),U=Le=>{let Q=String(Le||"").trim().toLowerCase(),ge=[];for(let $e of d){let pe=Hl($e.predicate);if(!pe)continue;if(pe===Q){ge.push({fact:$e,aliasFacts:[]});continue}let Ie=Ul(q,pe,new Set([Q]),N,{maxHops:2});if(!Ie)continue;let G=Ie.map(ce=>d.find(le=>le.predicate===Tr&&le.subject===ce.subject&&le.object===ce.object));G.every(Boolean)&&ge.push({fact:$e,aliasFacts:G})}return ge},{loadMemory:re,findRuleByName:oe,resolveRelationChaseReverse:H}=await Promise.resolve().then(()=>(He(),cs)),X=await re(e),{findReachableSet:se}=await Promise.resolve().then(()=>(Ss(),zr)),ae=await H(X,C,I,{relationFactsFor:U,renderFactLine:ie,factPhrase:Ct,factTermVariants:K,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:zl,findReachableSet:se});return ae.length?{text:ae.map(Q=>`${Q.subject} \u2014 ${Q.citation.join("; ")}`).join(`
180
- `),replace:!0}:U(C).length>0||!!oe(X,C)?{text:/^what\b/i.test(na(u))?`I don't know what the ${C} of ${I} is from what you've told me.`:`I don't know anyone who is the ${C} of ${I} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${C}' yet.`,replace:!0}}}{let C=u.match(e_);if(C){let O=K(l,C[1]),I=Je(d.filter(N=>O.has(N.subject)||O.has(N.object)),i);if(I.length){let N=I.map(ie),q=N.slice(0,Se),U=N.slice(Se),re=U.length?`
181
- \u2026and ${U.length} more \u2014 say 'more' to see them.`:"";return{text:q.join(`
182
- `)+re,replace:!0,...U.length?{pending:{items:U,noun:"facts"}}:{}}}}}let b=u.match(mj);if(b){let C=iu(b[1].trim().toLowerCase()),O=b[2].trim(),I=Wn.test(O)?r||null:O;if(I){let{loadMemory:N,findRuleByName:q,RULE_KIND_PROP:U,RULE_KIND_RECURSIVE:re}=await Promise.resolve().then(()=>(He(),cs)),oe=await N(e),H=q(oe,C),X=H?.attributes?.find(se=>se.prop===U)?.value;if(H&&X===re){let se=H.attributes.find(ne=>ne.prop==="mgx:ruleBaseCase")?.value,J=H.attributes.find(ne=>ne.prop==="mgx:ruleRecStep")?.value,ae=l(I);if(se&&J&&ae){let ne=Bl(d),{findIsaChain:_e}=await Promise.resolve().then(()=>(Ft(),en)),Le=Ie=>{let G=String(Ie||"").trim().toLowerCase(),ce=[];for(let le of d){let Ne=Hl(le.predicate);if(!Ne)continue;if(Ne===G){ce.push({fact:le,aliasFacts:[]});continue}let jt=Ul(_e,Ne,new Set([G]),ne,{maxHops:2});if(!jt)continue;let Ke=jt.map(un=>d.find(Ht=>Ht.predicate===Tr&&Ht.subject===un.subject&&Ht.object===un.object));Ke.every(Boolean)&&ce.push({fact:le,aliasFacts:Ke})}return ce},{findReachableSet:Q}=await Promise.resolve().then(()=>(Ss(),zr)),pe=Q({entity:ae,hop:0},Ie=>{let G=Ie.hop===0?se:J;return Le(G).filter(ce=>ce.fact.subject===Ie.entity).map(ce=>({action:ce,nextState:{entity:ce.fact.object,hop:Ie.hop+1}}))},{maxDepth:20,stateKey:Ie=>Ie.entity});if(pe.length)return{text:pe.map(({node:G,path:ce})=>{let le=new Set,Ne=[];for(let jt of ce.actions){Ne.push(ie(jt.fact));for(let Ke of jt.aliasFacts){let un=Ke.id||`${Ke.subject}|${Ke.predicate}|${Ke.object}`;le.has(un)||(le.add(un),Ne.push(`${Ct(Ke)}${Ke.provenance?` (source: ${Ke.provenance})`:""}`))}}return`${G.entity} \u2014 ${Ne.join("; ")}`}).join(`
183
- `),replace:!0}}}return null}}let y=c.match(yg),w=c.match(ps)||Zl(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(ps);if(w){let C=K(l,Yt(w[2])),O=r&&Wn.test(w[1].trim())?r:w[1],I=new Set(K(l,O));if([...I].some(z=>C.has(z))){let z=Yt(w[2]).trim();return{text:`yes \u2014 ${Io(z)} ${z} is ${Io(z)} ${z}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await Xj(o,O);if(N)for(let z of K(l,N))I.add(z);let{findIsaChain:q,deriveDisjointViolations:U,SUBCLASS_PREDICATE:re,TYPE_PREDICATE:oe,DISJOINT_PREDICATE:H}=await Promise.resolve().then(()=>(Ft(),en)),X=qs,se=f.filter(z=>z.predicate===re&&X(z)),J=f.filter(z=>z.predicate===oe&&X(z)),ae=se.map(z=>[z.subject,z.object]),ne=J.map(z=>[z.subject,z.object]),_e=f.filter(z=>z.predicate===re),Le=f.filter(z=>z.predicate===oe),Q=Le.map(z=>[z.subject,z.object]),ge=_e.map(z=>[z.subject,z.object]),$e=d.filter(z=>z.predicate===H&&X(z)),pe=$e.map(z=>[z.subject,z.object]),Ie=$e.length?U(Q.concat(ge),ge,pe,{budget:20,focus:new Set([...I,...C])}):[],G=z=>{let be=Ie.find(Me=>Me.subject===z&&C.has(Me.object));if(!be)return null;let we=f.filter(Me=>C.has(Me.object)&&(Me.subject===be.viaClass||Me.subject===be.subject)).sort(p)[0],Ee=$e.find(Me=>Me.subject===be.viaClass&&Me.object===be.object||Me.subject===be.object&&Me.object===be.viaClass);return!we||!Ee?null:aj(we,Ee)},ce=f.filter(z=>I.has(z.subject)&&C.has(z.object)).sort(p)[0],le=d.filter(z=>z.predicate===gi&&I.has(z.subject)&&C.has(z.object)).sort(p)[0],Ne=$e.find(z=>I.has(z.subject)&&C.has(z.object)||I.has(z.object)&&C.has(z.subject));if(ce&&!le){let z=G(ce.subject);if(z)return z}let jt=Bg(ce,le||Ne);if(jt)return jt;if($e.length){let z=Ee=>{let Me=new Set(Ee),_t=new Set(Ee);for(let Ae=0;Ae<8&&_t.size;Ae+=1){let ye=new Set;for(let[et,ms]of ge)_t.has(et)&&!Me.has(ms)&&ye.add(ms);if(!ye.size)break;for(let et of ye)Me.add(et);_t=ye}return Me},be=z(C),we=Ie.find(Ee=>I.has(Ee.subject)&&be.has(Ee.object)&&!z([Ee.viaClass]).has(Ee.object)&&!z([Ee.object]).has(Ee.viaClass));if(we){let Ee=f.filter(ye=>I.has(ye.subject)&&ye.object===we.viaClass).sort(p)[0],Me=$e.find(ye=>ye.subject===we.viaClass&&ye.object===we.object||ye.subject===we.object&&ye.object===we.viaClass),_t=!C.has(we.object),Ae=_t?f.filter(ye=>C.has(ye.subject)&&ye.object===we.object).sort(p)[0]:null;if(Ee&&Me&&(!_t||Ae)){let ye=Yt(w[2]).trim();return{text:`no \u2014 ${[Ee,...Ae?[Ae]:[]].map(ie).join("; ")}; and ${Ct(Me)}${Me.provenance?` (source: ${Me.provenance})`:""} \u2014 so ${O} can never be ${Io(ye)} ${ye}.`,replace:!0}}}}let Ke=await Ar(o,O);if(Ke){let z=new Map;for(let we of ea(o,Ke.id))for(let Ee of K(l,we.label))!I.has(Ee)&&!z.has(Ee)&&z.set(Ee,we.label);let be=f.filter(we=>z.has(we.subject)&&C.has(we.object)).sort(p)[0];if(be)return{text:`yes \u2014 the code graph says ${Ke.label} inherits ${z.get(be.subject)}, and ${ie(be)}`,replace:!0}}let un=z=>(z.predicate===re?se:J).find(be=>be.subject===z.subject&&be.object===z.object);for(let z of I){let be=q(z,C,ne,ae,{maxHops:2});if(!be)continue;let we=G(z);if(we)return we;let Ee=be.map(un);if(Ee.every(Boolean))return{text:`yes \u2014 ${Qi(Ee)}`,replace:!0}}let Ht=z=>(z.predicate===re?_e:Le).find(be=>be.subject===z.subject&&be.object===z.object);for(let z of I){let be=q(z,C,Q,ge,{maxHops:2});if(!be)continue;let we=G(z);if(we)return we;let Ee=be.map(Ht);if(Ee.every(Boolean)&&Ee.some(X))return{text:`yes \u2014 ${Qi(Ee)}`,replace:!0}}let Bt=O.match(/^(.*\S)\s+not$/i),It=Bt&&[Bt[0],r&&Wn.test(Bt[1].trim())?r:Bt[1]];if(It){let z=K(l,It[1]),be=C,we=f.filter(Ae=>z.has(Ae.subject)&&be.has(Ae.object)).sort(p)[0];if(we)return{text:`no \u2014 ${ie(we)}`,replace:!0};let Ee=$e.find(Ae=>z.has(Ae.subject)&&be.has(Ae.object)||z.has(Ae.object)&&be.has(Ae.subject));if(Ee)return{text:`yes \u2014 ${ie(Ee)}`,replace:!0};let Me=It[1].trim(),_t=Yt(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Me} and ${_t}. If no ${Me} is a ${_t}, teach me: "no ${Me} is a ${_t}".`,replace:!0,miss:!0}}if($e.length){let z=U(ne.concat(ae),ae,pe,{budget:10});for(let be of I){let we=z.find(Ae=>Ae.subject===be&&C.has(Ae.object));if(!we)continue;let Ee=J.concat(se).find(Ae=>Ae.subject===we.subject&&Ae.object===we.viaType),Me=$e.find(Ae=>Ae.subject===we.viaClass&&Ae.object===we.object||Ae.subject===we.object&&Ae.object===we.viaClass),_t=[Ee,Me].filter(Boolean).map(ie);return{text:`no \u2014 ${_t.length?_t.join("; "):`${we.viaClass} and ${we.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:Cr,ON_PROPERTY_PREDICATE:E,SOME_VALUES_FROM_PREDICATE:ue,deriveSomeValuesFromSubsumption:je,ENTAILED_SCM_SVF_PROVENANCE:kn,SCM_SVF_RULE_CONFIDENCE:Ys,entailedTrustFrom:uu}=await Promise.resolve().then(()=>(Ft(),en)),du=d.filter(z=>z.predicate===E&&X(z)),pu=d.filter(z=>z.predicate===ue&&X(z));if(du.length&&pu.length){let z=new Map(pu.map(ye=>[ye.subject,ye.object])),be=du.map(ye=>({restriction:ye.subject,property:ye.object,target:z.get(ye.subject)})).filter(ye=>ye.target),we=new Set([re,oe,H,E,ue,"owl:intersectionOf"]),Ee=d.filter(ye=>X(ye)&&!we.has(ye.predicate)),Me=Ee.map(ye=>[ye.subject,ye.predicate,ye.object]),_t=Cr(Me,ne,ae,be,{budget:10});for(let ye of I){let et=_t.find(on=>on.subject===ye&&C.has(on.object));if(!et)continue;let ms=Ee.find(on=>on.subject===et.subject&&on.predicate===et.viaProperty&&on.object===et.viaValue),hs=J.find(on=>on.subject===et.viaValue&&on.object===et.viaType),Lo=[ms,hs].filter(Boolean).map(ie);return{text:`yes \u2014 ${Lo.length?Lo.join("; "):`${et.subject} ${et.viaProperty} ${et.viaValue}, and ${et.viaValue} is a ${et.viaType}.`}`,replace:!0}}let Ae=be.length>1?je(be,ae,{budget:10}):[];if(Ae.length){let ye=ae.concat(Ae.map(xe=>[xe.subject,xe.object])),et=new Map(be.map(xe=>[xe.restriction,xe])),ms=new Map;for(let xe of d)ms.set(`${xe.subject}\0${xe.predicate}\0${xe.object}`,xe.trust);let hs=(xe,dn,Ot)=>ms.get(`${xe}\0${dn}\0${Ot}`),Lo=new Map;for(let xe of Ae){let dn=et.get(xe.subject),Ot=et.get(xe.object),Ut=[dn&&hs(xe.subject,E,dn.property),hs(xe.subject,ue,xe.viaY1),Ot&&hs(xe.object,E,Ot.property),hs(xe.object,ue,xe.viaY2),hs(xe.viaY1,re,xe.viaY2)].filter(fb=>typeof fb=="number"),Or=uu(Ut,Ys);Or!==null&&Lo.set(`${xe.subject}\0${xe.object}`,Or)}let on=xe=>{if(xe.predicate!==re)return J.find(Ut=>Ut.subject===xe.subject&&Ut.object===xe.object);let dn=se.find(Ut=>Ut.subject===xe.subject&&Ut.object===xe.object);if(dn)return dn;let Ot=Ae.find(Ut=>Ut.subject===xe.subject&&Ut.object===xe.object);return Ot?{subject:Ot.subject,predicate:re,object:Ot.object,provenance:kn,trust:Lo.get(`${Ot.subject}\0${Ot.object}`)}:void 0};for(let xe of I){let dn=q(xe,C,ne,ye,{maxHops:3});if(!dn)continue;let Ot=dn.map(on);if(Ot.every(Boolean)){let Ut=uu(Ot.map(Or=>Or.trust),1);return{text:`yes \u2014 ${Qi(Ot)}`,replace:!0,...Ut!==null?{trust:Ut}:{}}}}}}let db=K(l,O),fu=f.filter(z=>db.has(z.subject)).sort(p),fs=O.trim(),Ir=Yt(w[2]).trim(),pb=[...I].some(z=>q(z,C,ne,ae,{maxHops:hj}));if(fu.length){let z=fu.slice(0,3).map(ie).join("; "),be=pb?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${fs}", then ask me again.`:`If it's true, teach me: "${fs} is a kind of ${Ir}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${fs} is a ${Ir}. I do know: ${z}. ${be}`,replace:!0,miss:!0}}let mu=f.filter(z=>I.has(z.object)&&C.has(z.subject)).sort(p)[0];return mu?{text:`I can't confirm that \u2014 what I know runs the other way: ${ie(mu)}. A kind doesn't reverse. If it's true, teach me: "every ${fs} is a ${Ir}".`,replace:!0,miss:!0}:!Ke&&!N&&!zS(fs)&&!d.some(z=>I.has(z.subject)||I.has(z.object))?{text:`I can't confirm that \u2014 I don't know "${fs}" at all yet. If it's true, teach me: "${fs} is a kind of ${Ir}".`,replace:!0,miss:!0}:null}let $=c.match(Uj);if($){let[,C,O,I]=$,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:q,buildCardinalityRestrictions:U,proveCardinalityAtLeast:re,CARDINALITY_RULE_CONFIDENCE:oe,entailedTrustFrom:H}=await Promise.resolve().then(()=>(Ft(),en)),X=qs,se=f.filter(ne=>ne.predicate===N&&X(ne)).map(ne=>[ne.subject,ne.object]),J=d.filter(ne=>(ne.predicate===q||jg.has(ne.predicate))&&X(ne)),ae=U(J);if(ae.length){let ne=K(l,C.trim()),_e=K(l,I.trim()),Le=Number(O),Q=wg(ne,_e,(ge,$e)=>re(se,ae,ge,$e,Le,{}));if(Q){let ge=d.find(le=>le.predicate===N&&le.subject===Q.viaClass&&le.object===Q.viaRestriction),$e=ge?.provenance?` (source: ${ge.provenance})`:"",pe=Q.kind==="exactly"?"exactly":"at least",Ie=(le,Ne)=>`${le}${Ne===1?"":"s"}`,G=[ge?.trust,...J.filter(le=>le.subject===Q.viaRestriction).map(le=>le.trust),...Q.viaClass!==Q.subject?[f.find(le=>le.predicate===N&&le.subject===Q.subject&&le.object===Q.viaClass)?.trust]:[]].filter(le=>typeof le=="number"),ce=H(G,oe);return{text:`yes \u2014 every ${Q.viaClass} has ${pe} ${Q.n} ${Ie(Q.object,Q.n)}${$e}, so at least ${Le} follows.`,replace:!0,...ce!==null?{trust:ce}:{}}}}}let j=c.match(Wj);if(j){let[,C,O]=j,{SUBCLASS_PREDICATE:I,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:q,proveMaxCardinalityZeroDenial:U,CAX_MAXC0_RULE_CONFIDENCE:re,entailedTrustFrom:oe}=await Promise.resolve().then(()=>(Ft(),en)),H=qs,X=f.filter(ae=>ae.predicate===I&&H(ae)).map(ae=>[ae.subject,ae.object]),se=d.filter(ae=>(ae.predicate===N||jg.has(ae.predicate))&&H(ae)),J=q(se);if(J.length){let ae=K(l,C.trim()),ne=K(l,O.trim()),_e=wg(ae,ne,(Le,Q)=>U(X,J,Le,Q,{}));if(_e){let Le=d.find(pe=>pe.predicate===I&&pe.subject===_e.viaClass&&pe.object===_e.viaRestriction),Q=Le?.provenance?` (source: ${Le.provenance})`:"",ge=[Le?.trust,...se.filter(pe=>pe.subject===_e.viaRestriction).map(pe=>pe.trust),..._e.viaClass!==_e.subject?[f.find(pe=>pe.predicate===I&&pe.subject===_e.subject&&pe.object===_e.viaClass)?.trust]:[]].filter(pe=>typeof pe=="number"),$e=oe(ge,re);return{text:`no \u2014 every ${_e.viaClass} has at most 0 ${_e.object}${Q}.`,replace:!0,...$e!==null?{trust:$e}:{}}}}}let v=c.match(Gj);if(v){let C=K(l,v[1]),O=d.filter(I=>I.predicate===Dl&&C.has(I.subject)).sort(p);return O.length?m(O):null}let x=u.match(qj);if(x){let[,C,O]=x,I=K(l,C.trim()),N=K(l,O.replace(/^an?\s+/i,"").trim()),q=d.filter(U=>U.predicate===Dl&&N.has(U.subject)&&I.has(U.object)).sort(p)[0];return q?{text:`yes \u2014 ${ie(q)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} owns/maintains ${O.trim()}.`,replace:!0}}let k=u.match(Vj);if(k){let[,C,O]=k,I=K(l,C.replace(/^an?\s+/i,"").trim()),N=K(l,O.trim()),q=d.filter(U=>U.predicate===Dl&&I.has(U.subject)&&N.has(U.object)).sort(p)[0];return q?{text:`yes \u2014 ${ie(q)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} is owned by ${O.trim()}.`,replace:!0}}let _=u.match(Hj);if(_){let[,C,O]=_,I=K(l,C.trim()),N=K(l,`${O.trim()} method`),q=d.filter(U=>U.predicate===Fs&&I.has(U.subject)&&N.has(U.object)).sort(p)[0];return q?{text:`yes \u2014 ${ie(q)}`,replace:!0}:null}let R=u.match(Kj);if(R){let C=K(l,R[1].trim()),O=d.filter(I=>I.predicate===Fs&&C.has(I.subject)&&/ method$/.test(I.object)).sort(p);return O.length?m(O):null}let S=u.match(_g);if(S){let C=S[1].trim(),O=Ag.test(C)||Rg.test(C)?null:Wn.test(C)?r||null:C,I=S[2].trim().toLowerCase();if(O){let N=K(l,O),q=new Map,U=null;if(o){let J=await Ar(o,O);if(U=J,J)for(let ae of ea(o,J.id))for(let ne of K(l,ae.label))!N.has(ne)&&!q.has(ne)&&q.set(ne,ae.label),N.add(ne)}let re=J=>J.predicate===zl&&l(J.object)===I||J.predicate===`tmct:${I}`&&J.object==="true",oe=l(O).split(/\s+/).filter(J=>J.length>=4&&!Ug.has(J)),H=J=>oe.some(ae=>new Set(String(J.subject||"").split(/\s+/)).has(ae)),X=J=>N.has(J.subject)||oe.length&&H(J),se=d.filter(J=>X(J)&&re(J)).sort(p)[0];if(se){let J=q.get(se.subject);return{text:J?`yes \u2014 the code graph says ${U.label} inherits ${J}, and ${ie(se)}`:`yes \u2014 ${ie(se)}`,replace:!0}}{let{findIsaChain:J,SUBCLASS_PREDICATE:ae,TYPE_PREDICATE:ne}=await Promise.resolve().then(()=>(Ft(),en)),_e=qs,Le=d.filter(G=>G.predicate===ae&&_e(G)),Q=d.filter(G=>G.predicate===ne&&_e(G)),ge=Le.map(G=>[G.subject,G.object]),$e=Q.map(G=>[G.subject,G.object]),pe=G=>(G.predicate===ae?Le:Q).find(ce=>ce.subject===G.subject&&ce.object===G.object),Ie=K(l,I);for(let G of N){let ce=J(G,Ie,$e,ge,{maxHops:2});if(!ce)continue;let le=ce.map(pe);if(le.every(Boolean))return{text:`yes \u2014 ${Qi(le)}`,replace:!0}}}if(d.some(X)&&!n?.parsed)return{text:`I don't have a fact saying ${lj(O)} is ${I}.`,replace:!0};if(!n?.parsed&&!mg.test(I))return Tg(O,I)}}let A=tu(c).match(KS);if(A&&!Gl.test(c)){let[,C,O,I]=A,N=O.toLowerCase();if(!Wl.test(N)&&!Vl.test(N)){let q=C.trim(),U=JS(await ql(N),I),re=U.object.replace(/^an?\s+/i,"").trim();if(q&&re){let oe=U.predicate,H=K(l,q),X=K(l,re),se=[oe,yo(oe)],J=d.filter(ne=>se.includes(ne.predicate)&&H.has(ne.subject)&&X.has(ne.object)).sort(p)[0];if(J)return{text:`${_f(J.predicate)?"no":"yes"} \u2014 ${ie(J)}`,replace:!0,generalVerbQuery:!0};let ae=d.filter(ne=>se.includes(ne.predicate)&&H.has(ne.subject));if(ae.length){let ne=ae.slice(0,3).map(ie).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${Ct({subject:q,predicate:oe,object:re})}. I do know: ${ne}.`,replace:!0,miss:!0}}return null}}}let L=c.match(YS);if(L&&!Gl.test(c)){let[,C,O]=L,[I,N]=O.toLowerCase().split(/\s+/);if(!Wl.test(I)&&!Vl.test(I)){let q=C.trim();if(q){let U=await ql(I);N&&/^mgx:[a-z]+$/.test(U)&&(U=`${U}-${N}`);let re=K(l,q),oe=[U,yo(U)],H=Je(d.filter(X=>oe.includes(X.predicate)&&re.has(X.subject)),i);if(H.length)return{...m(H),generalVerbQuery:!0}}}}let T=c.match(/^(?:what|who)\s+([a-z]+)\s+(on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside)\s+(.+?)[?.!\s]*$/i);if(T&&!Gl.test(c)){let[,C,O,I]=T,N=C.toLowerCase();if(!Wl.test(N)&&!Vl.test(N)&&!HS.test(N)){let q=await ql(N);/^mgx:[a-z]+$/.test(q)&&(q=`${q}-${O.toLowerCase()}`);let U=K(l,I.replace(/^(?:an?|the)\s+/i,"").trim()),re=Je(d.filter(oe=>oe.predicate===q&&U.has(oe.object)),i);if(re.length)return{...m(re),generalVerbQuery:!0}}}let P=c.match(zj);if(P){let C=K(l,P[1]),O=Je(d.filter(oe=>C.has(oe.subject)||C.has(oe.object)),i);if(!O.length)return null;let I=C.has(O[0].subject)?O[0].subject:O[0].object,N=O.map(oe=>` ${ie(oe)}`),q=N.slice(0,Se),U=N.slice(Se),re=U.length?`
184
- \u2026and ${U.length} more \u2014 say 'more' to see them.`:"";return{text:`${O.length} remembered fact${O.length===1?"":"s"} about ${I}:
185
- ${q.join(`
186
- `)}${re}`,replace:!0,...U.length?{pending:{items:U.map(oe=>oe.trim()),noun:"facts"}}:{}}}let V=n?.parsed?.shape==="meta"?n.parsed.object:null,Y=!1,te=c.match(Bj);if(te)V=te[1],Y=!0;else if(!V&&!n?.parsed){let C=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);C&&(V=C[1])}if(!V)return null;let F=K(l,V),D=Je(f.filter(C=>F.has(C.subject)),i),B=Je(f.filter(C=>F.has(C.object)),i),W=Y?D.length?D:B:B.length?B:D;return W.length?m(W):null}function Yl(e){let t=e.sourceTypes||[];return t.length===0||t.some(n=>n!=="corpusWeak")}var su,zS,sn,Ji,dg,Cg,Fz,pg,BS,Dz,zz,Ig,Og,Lg,US,fg,Bz,Uz,Wz,Gz,qz,ru,Vz,WS,qe,Dl,zl,Tr,GS,qs,Hz,Kz,Yz,Xz,Jz,Qz,Zz,eB,tB,nB,sB,oB,rB,iB,aB,mg,qS,sa,VS,cB,lB,au,Ng,uB,dB,pB,Wl,Gl,HS,fB,KS,YS,Vl,XS,QS,mB,Mg,Pg,ZS,hB,gB,bB,wB,Oo,yB,vB,$B,Fg,xB,kB,ej,EB,SB,jB,Vs,hg,cu,Ct,nj,oj,rj,Zi,uj,Ug,_B,Ql,Wg,dj,pj,na,fj,mj,ps,Gn,hj,gj,bj,eu,yg,wj,Se,yj,vj,$j,xj,kj,Ej,vg,Sj,jj,_j,Rj,Aj,xg,qg,Cj,Ij,Lj,Nj,Mj,Pj,Sg,Fj,zj,Bj,Uj,Wj,jg,Gj,qj,Vj,Hj,Kj,_g,Wn,Rg,Ag,Tg,Yj,Jj,Qj,RB,Yg,e_,AB,Xl,nu,t_,TB,CB,Xg,IB,OB,LB,NB,MB,oa,PB,FB,DB,zB,n_,BB,UB,Xi=M(()=>{ze();oh();Lt();Te();ss();Di();zi();Uo();yl();ah();He();Mc();$l();uh();Rn();Xn();io();Zr();gl();bl();Ko();Bs();Ba();Ui();hh();gh();Sl();bh();jl();wh();yh();Hi();pl();Bh();qh();To();ig();ei(void 0);Qr(Fi);su=new Set(["it","this","that","here"]),zS=e=>su.has(String(e||"").trim().toLowerCase()),sn={imports:"understand a dependency/import relationship",uses:"understand a dependency/usage relationship (imports and/or calls)",calls:"understand a call relationship",callsSymbol:"understand a call relationship",defines:"locate what a module/class defines",contains:"understand class membership (methods/attributes)",tests:"assess test coverage",inherits:"understand a class hierarchy/inheritance relationship",touches:"understand commit/change history",touchesSymbol:"understand commit/change history",cochange:"understand change-coupling between modules",reexports:"understand a module's public exports/API surface",serves:"understand which component provides or backs another",denotes:"understand which vocabulary term names a code entity"},Ji=e=>e?`${String(e).toLowerCase()}(s)`:"entities",dg="look up a taught fact about a subject/verb/object";Cg={find:{tool:"tmct_search",arg:"query",help:"lexical search across the graph"},search:{tool:"tmct_search",arg:"query",help:"alias of /find"},context:{tool:"tmct_context",arg:"symbol",help:"the sized edit bundle for a symbol (start here to change code)"},snippet:{tool:"tmct_snippet",arg:"symbol",help:"exact source of one function/class/method"},describe:{tool:"tmct_describe",arg:"symbol",help:"a symbol's definition, kind and relations"},signature:{tool:"tmct_signature",arg:"symbol",help:"a symbol's signature only"},members:{tool:"tmct_members",arg:"class",help:"the methods/attributes of a class"},subclasses:{tool:"tmct_subclasses",arg:"class",help:"the subclasses of a class"},impact:{tool:"tmct_impact",arg:"module",help:"what a change to this module or symbol reaches (impact closure)"},callers:{tool:"tmct_callers",arg:"symbol",help:"functions that call this symbol"},callees:{tool:"tmct_callees",arg:"symbol",help:"functions this symbol calls"},tests:{tool:"tmct_tests_for",arg:"symbol",help:"the tests covering this symbol"},untested:{tool:"tmct_untested",arg:null,help:"symbols with no covering test"},history:{tool:"tmct_history",arg:"symbol",help:"the commit history of this symbol"},exports:{tool:"tmct_exports",arg:"module",help:"a module's public exports"},arch:{tool:"tmct_architecture",arg:"package",help:"the architecture overview (optional package filter)",optional:!0}},Fz=new Set(["stats","memory","focus",...Object.keys(Cg)]),pg={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Package:["package","packages"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]},BS=new Set(["have","has","holds","hold"]),Dz=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(Vn)].filter(e=>!BS.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),zz=new Set([...sh.map(e=>e.name),...Object.values(Cg).map(e=>e.tool)]),Ig=new Set(["hi","hello","hey","yo","hiya","howdy","sup","greetings","g'day","gday","hey there","hi there","hello there","good morning","good afternoon","good evening","morning","alright","you alright","alright mate","morning all","yeah nah","hey y'all","howdy there","hiya there","good day","good day to you","salutations","good to meet you","pleased to meet you","yo yo","ayy","wassup","sup fam","heya","hiya!","gm","ge"]),Og=new Set(["thanks","thank you","thankyou","thx","ty","ta","cheers","nice one","much appreciated","cool thanks","many thanks","much obliged","ta very much","cheers mate","cheers for that","tks","sweet thanks","nice","brilliant","ta for that","cheers, that's everything for now, thanks","that's everything for now, thanks","that's all for now, thanks"]),Lg=new Set(["bye","goodbye","quit","exit","see ya","see you","cya","later","farewell","peace","peace out","im off","i'm off","gtg","gotta go","catch you later","farewell then"]),US=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),fg=e=>e.replace(/(.)\1+/g,"$1");Bz=ou(Ig),Uz=ou(Og),Wz=ou(Lg),Gz=new RegExp(`^(?:${[...US].map(Ye).join("|")})\\s+(.+)$`,"i"),qz=[...Ig,...Og,...Lg,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],ru="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",Vz=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${ru})\\s+than\\s+(.+)$`,"i"),WS=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${ru})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),qe="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",Dl="mgx:ownedBy",zl="mgx:hasProperty",Tr="rdfs:subClassOf",GS=new Set(["operator","teach","entailed"]),qs=e=>!!e.sourceTypes?.some(t=>GS.has(t));Hz=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Kz=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Yz=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${qe})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Xz=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${ru})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Jz=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${qe})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Qz=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+may\\s+not\\s+be\\s+with\\s+the\\s+([a-z][\\w-]*)\\s+without\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),Zz=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),eB=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),tB=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${qe})\\s+([\\w-]+)[.!?]*$`,"i"),nB=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${qe})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),sB=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${qe})\\s+([\\w-]+)[?.!]*$`,"i"),oB=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${qe})\\s+([\\w-]+)[?.!]*$`,"i"),rB=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${qe})\\s+([\\w-]+)$`,"i"),iB=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${qe})\\s+(.+?)[?.!\\s]*$`,"i"),aB=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${qe}))?[?.!\\s]*$`,"i"),mg=/^(?:anywhere|everywhere|nowhere|somewhere)$/i,qS=new Set(["bus","gas","plus","minus","surplus","lens","bias","atlas","canvas","virus","bonus","campus","census","chorus","circus","focus","status","iris","genius","sinus","walrus","cactus","fungus","radius","nucleus","alias","crocus","abacus","syllabus","octopus","platypus"]);sa="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",VS="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",cB=new RegExp(`^(.+?)\\s+(${VS})\\s+(.+)$`,"i"),lB=new RegExp(`^([\\w'-]+)\\s+${sa}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),au="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",Ng="with|to|from|by|of|in|on|for|as|about|into",uB=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${sa}(${au})\\s+(${Ng})\\s+(.+)$`,"i"),dB=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${au})\\s+(${Ng})\\s+(.+)$`,"i"),pB=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${qe})\\s+(.+?)[.!?]*$`,"i"),Wl=/^(?:is|are|am|owns|maintains)$/i,Gl=/\b(?:is|are|am|owns|maintains)\b/i,HS=new RegExp("^(?:i|me|you|he|him|she|her|it|we|us|they|them|my|your|his|its|our|their|mine|yours|hers|ours|theirs|this|that|these|those|a|an|the|every|each|all|some|any|no|both|either|neither|in|on|at|to|from|by|with|for|of|about|into|onto|over|under|near|before|after|during|through|up|down|off|out|above|below|between|among|against|without|within|along|across|behind|beyond|upon|toward|towards|per|and|but|or|if|because|although|though|while|when|since|unless|until|whether|so|nor|than|as|what|who|whom|whose|which|where|why|how)$","i"),fB=new RegExp(`^(?:${vs.filter(e=>!/\s/.test(e)).join("|")})$`,"i");KS=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${sa}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),YS=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${sa}([a-z]+(?:\\s+(?:${qe}))?)[?.!\\s]*$`,"i"),Vl=/^(?:be|own|maintain)$/i,XS=new RegExp(`^(${qe})\\s+(.+)$`,"i");QS=["first","second","third","then","next","finally","later","meanwhile","afterward","afterwards"],mB=new RegExp(`^(?:${QS.join("|")})\\b\\s*,?\\s+`,"i"),Mg=Object.freeze(["you","i","it","they","he","she","we"]),Pg=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),ZS=Object.freeze([...Pg,...Mg]),hB=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${ZS.join("|")})\\s+\\S+`,"i"),gB=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${Mg.join("|")})\\s+(?:is|are|am|was|were)|(${Pg.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),bB=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${qe})\\s+([\\w-]+)$`,"i"),wB=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${qe})\\s+([\\w-]+)$`,"i"),Oo="(?:\\s+(?:exactly|really|actually|truly|anyway|internally|properly))?",yB=new RegExp(`^what\\s+does\\s+(.+?)${Oo}\\s+do${Oo}\\??$`,"i"),vB=new RegExp(`^what\\s+(.+?)${Oo}\\s+does${Oo}\\??$`,"i"),$B=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)${Oo}\\s+do${Oo}\\??$`,"i"),Fg="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",xB=new RegExp(`^who\\s+(?:is|was)\\s+${Fg}$`,"i"),kB=new RegExp(`^what\\s+(?:did|has)\\s+${Fg}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),ej="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",EB=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${ej}\\b`,"i"),SB=new RegExp("^(?:what\\s+time\\s+is\\s+it(?:\\s+(?:now|right\\s+now))?|what(?:'s|s|\\s+is)\\s+the\\s+time(?:\\s+(?:now|right\\s+now))?|what\\s+day\\s+is\\s+it(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+(?:the\\s+)?(?:day|date)(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+today'?s\\s+date|what(?:'s|s|\\s+is)\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?|how'?s\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?)\\??$","i");jB=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...Kt,...rn,"owns","maintains"].filter(e=>e.length>=3)),Vs={"rdfs:subClassOf":"is a kind of","mgxneg:subClassOf":"is not a kind of","rdf:type":"is a","owl:disjointWith":"is not a","mgx:partOf":"is part of","mgx:hasA":"has","mgx:usedFor":"is used for","mgx:capableOf":"can","mgx:atLocation":"is found in","mgx:causes":"causes","mgx:hasProperty":"is","mgx:madeOf":"is made of","mgx:receivesAction":"can be","mgx:createdBy":"is created by","mgx:mannerOf":"is a way to","mgx:desires":"wants","mgx:locatedNear":"is typically near","mgx:motivatedByGoal":"is motivated by","mgx:obstructedBy":"can be prevented by","mgx:causesDesire":"makes you want to","mgx:hasSubevent":"involves","mgx:hasFirstSubevent":"begins with","mgx:hasLastSubevent":"ends with","mgx:hasPrerequisite":"requires","mgx:ownedBy":"is owned by","mgx:rendersAs":"renders as","mgx:synonym":"means the same as","mgx:antonym":"is the opposite of","mgx:similarTo":"is similar to","mgx:relatedTo":"is related to","mgx:symbolOf":"is a symbol of","mgx:currently-in":"is in","mgx:located-in":"is in","mgx:fixed-in":"is fixed in","mgx:stands-locked-in":"stands locked in","mgx:works-in":"works in"},hg=new Set(["mgx:hidden-in","mgx:is-objective","mgx:unlocks-with","mgx:is-npc","mgx:acts-on-turn","mgx:acts-toward","mgx:is-container","mgx:is-open"]),cu=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);Ct=e=>`${e.subject} ${zg(e.predicate)} ${e.object}`;nj=Object.entries(Vs).filter(([e])=>!cu.has(e)).map(([e,t])=>{let n=/^(?:is|are)\s+(.+)$/i.exec(t);return n?{predicate:e,marker:n[1].trim().toLowerCase()}:null}).filter(e=>e&&e.marker.length>1).sort((e,t)=>t.marker.length-e.marker.length);oj=/ \(source: [^)]*\)$/;rj=8;Zi=null;uj=/^(?:every|each|all|any)\s+/i;Ug=new Set(["module","modules","class","classes","function","functions","method","methods","handler","handlers","controller","controllers","service","services","component","components","flow","flows","thing","things","item","items","object","objects","commit","commits"]),_B=new Set([["interpreter","compiler"],["string","thread"],["heart","kernel"],["battalion","heap"],["bash","sock"],["command","skill"],["docker","longshoreman"],["name","list"],["list","number"]].map(([e,t])=>[e,t].sort().join("|"))),Ql=/^(?:is|are|was|were)\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Wg=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,dj=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,pj=/^(who|what)'?s\s+/i,na=e=>String(e).replace(pj,(t,n)=>`${n} is `),fj=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;mj=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,ps=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,Gn=new Set(["rdfs:subClassOf","rdf:type"]),hj=6,gj=/^why\s+(?=(?:is|are)\b)/i,bj=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;eu=new Set(["kind","sort","type","subclass","superclass"]),yg=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,wj=/^(?:what\s+do\s+you\s+know\s+about|what(?:'s|s|\s+is)\s+in\s+your\s+memory\s+about|what\s+do\s+you\s+remember\s+about)\s+(.+?)[?.!\s]*$/i,Se=32,yj=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,vj=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,$j=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,xj=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,kj=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,Ej=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,vg=/^mgx:[a-z]+-(?:on|in|at|inside|under|below|above|near|beside|behind|by)$/,Sj=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${qe})\\s+(.+?)\\s*[?.!]*$`,"i"),jj=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,_j=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,Rj=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,Aj=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;xg=e=>String(e||"").replace(/\s+/g," ").trim();qg="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",Cj=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${qg})[?.!\\s]*$`,"i"),Ij=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${qg})\\s+([\\w'-]+)[?.!\\s]*$`,"i");Lj=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),Nj=Object.entries(Vs).filter(([e])=>!Lj.has(e)&&!cu.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Ye(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),Mj=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),Pj=Object.entries(Vs).filter(([e])=>!Mj.has(e)&&!cu.has(e)).map(([e,t])=>{let n;if(t==="can be")n=new RegExp("^can\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+be\\s+(.+?)[?.!\\s]*$","i");else if(t.startsWith("is ")){let s=Ye(t.slice(3));n=new RegExp(`^(?:is|are)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${s}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}else{let[s,...o]=t.split(" "),r=[Dg(s),...o].map(Ye).join("\\s+");n=new RegExp(`^(?:does|do)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${r}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}return{predicate:e,phrase:t,re:n}}).sort((e,t)=>t.re.source.length-e.re.source.length),Sg=/^what\s+(?:inherits?\s+(?:from\s+)?(?:an?\s+)?|is\s+(?:an?\s+)?(?:kind|sort|type)\s+of\s+|is\s+(?:an?\s+)?subclass\s+of\s+)(.+?)[?.!\s]*$/i,Fj=new Set(["changed","change","changes","updated","modified","happened","occurred"]);zj=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,Bj=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,Uj=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,Wj=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,jg=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),Gj=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,qj=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,Vj=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,Hj=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,Kj=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,_g=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,Wn=/^(?:it|this|that)$/i,Rg=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,Ag=/^(?:you|i|they|he|she|we)\b/i,Tg=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${ta(e)} is ${t}".`,replace:!0}),Yj=/^(?:what\s+(?:did|have)\s+(?:i|we)\s+(?:told?|tell|said?|say)\s+(?:you|me|us)?(?:\s+(?:last\s+time|before|earlier|previously|already))?|what\s+facts?\s+do\s+you\s+(?:know|have|remember)|what\s+do\s+you\s+(?:know|remember)|what\s+have\s+you\s+(?:learned|learnt|remembered))[?.!\s]*$/i;Jj=/inherit|supertype|subclass|extend|specializ/i,Qj=8;RB=new RegExp(`\\b(?:${[...su].join("|")})\\b`,"i"),Yg=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,e_=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i;AB=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Ue).join("|")})$`,"i"),Xl="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",nu="(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)",t_=`(?:\\s+${nu})?`,TB=[new RegExp(`^${Xl}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${t_}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${Xl}architecture\\s+(?:${nu}|overview|map|diagram)\\??$`,"i"),new RegExp(`^${Xl}(?:(?:an?|the)\\s+)?(?:overview|map|diagram)\\s+${nu}(?:\\s+here)?\\??$`,"i")],CB={find:"locate a specific named entity",search:"locate a specific named entity",context:"gather the sized edit bundle for a symbol before changing code",snippet:"view a symbol's exact source",describe:"look up a symbol's definition and relations",signature:"view a symbol's signature",members:sn.contains,subclasses:sn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:sn.calls,callees:sn.calls,tests:sn.tests,untested:sn.tests,history:sn.touches,exports:sn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",syllogise:"materialize the entailed facts that follow from what's remembered about one term",wiki:"toggle the live Wikipedia supplement for questions nothing local can answer",export:"write the memory store to a file, in the standard JSONL shape",ingest:"read a local text file and store every fact the recognizer grounds from it"},Xg="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",IB=new RegExp(`^what\\s+(?:would|will|might|could|does|do)?\\s*(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|is\\s+impacted|be\\s+impacted)\\s+if\\s+(?:i|we|you|one|someone)\\s+${Xg}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),OB=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${Xg}\\s+(?:the\\s+)?(.+?),?\\s+what\\s+(?:would\\s+|will\\s+|might\\s+|could\\s+|does\\s+|do\\s+)?(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|would\\s+break|will\\s+break)[?.!\\s]*$`,"i"),LB=new RegExp("^what\\s+(?:is|are|gets?|would\\s+be|will\\s+be)\\s+(?:affected|impacted|broken)\\s+(?:by|when|if)\\s+(?:i\\s+|we\\s+|you\\s+)?(?:chang(?:e|es|ing)|edit(?:s|ing)?|modif(?:y|ies|ying)|touch(?:es|ing)?|updat(?:e|es|ing)|delet(?:e|es|ing)|remov(?:e|es|ing)|a\\s+change\\s+to)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),NB=new RegExp("^(?:(?:can|could)\\s+(?:i|we|you|one|someone)\\s+safely|is\\s+it\\s+safe\\s+to)\\s+(?:change|edit|modify|touch|update|alter|delete|remove|drop)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),MB=new RegExp("^(?:what(?:'s|\\s+is)\\s+the\\s+)?(?:blast\\s+radius|impact)\\s+(?:of|for)\\s+(?:chang(?:ing|es)\\s+|editing\\s+|modifying\\s+|touching\\s+|updating\\s+|deleting\\s+|removing\\s+)?(?:the\\s+)?(.+?)[?.!\\s]*$","i"),oa="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",PB=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${oa}\\s*\\??$`,"i"),FB=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${oa}\\s*\\??$`,"i"),DB=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${oa}\\s*\\??$`,"i"),zB=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${oa}\\s*[.!]*$`,"i"),n_=Object.freeze([...su].filter(e=>e!=="here").concat("they")),BB=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${n_.join("|")})\\b(\\s+\\S.*)?$`,"i"),UB=Z(".tmct","memory","corpus-seed.json")});Xi();He();ks();Hi();var ra={uninformativeClassMaxShare:.35,uninformativeClassMinSubjects:12,entailedDepthPenalty:.2,minoritySensePenalty:.5,minScore:.05,groupSplitThreshold:4,openerConceptCount:2,maxObjectsPerBodySentence:4,maxBodySentences:4,closerRootCount:2,budget:{chatReply:5,researchPanel:10,cliDigest:12,ledgerTerm:8}};var Zg=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),Hs=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),ia=e=>Zg[e]||"other",o_=e=>Math.max(0,Math.min(1,e));function Jg(e){let t=(e.sourceTypes||[]).map(n=>Go[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:Go.entailed}function r_(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function Qg(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function eb(e,t,n={},s={}){let o={...ra,...s.config||{}},r=Number.isInteger(s.budget)?s.budget:o.budget.chatReply,i=(t||[]).filter(v=>v&&v.object&&v.object!==e),a=[],l=(Number(n?.totalSubjects)||0)>=o.uninformativeClassMinSubjects,c=[];for(let v of i){if(ia(v.predicate)==="isa"){let x=Qg(v.object,n);if(l&&x>o.uninformativeClassMaxShare){a.push({row:v,family:"isa",reason:"uninformative-class",share:x});continue}}c.push(v)}let u=c.filter(v=>ia(v.predicate)==="isa").map(v=>v.object),d=Vi(u,{subClassEdges:n.subClassEdges||[],disjointEdges:n.disjointEdges||[]}),f=new Map,p=new Map;for(let v of d.clusters){let x=0;for(let k of v.objects){p.set(k,v.label);let _=c.find(R=>R.object===k&&ia(R.predicate)==="isa");x+=_?Jg(_):0}f.set(v.label,x)}let m=null,h=-1;for(let[v,x]of[...f].sort((k,_)=>k[0].localeCompare(_[0])))x>h&&(h=x,m=v);let g=[];for(let v of c){let x=ia(v.predicate),k=Jg(v),_={provenance:k};if(r_(v)&&(k-=o.entailedDepthPenalty,_.entailed=!0),x==="isa"){let S=.6+.4*(1-Qg(v.object,n));k*=S,_.informativeness=S;let A=p.get(v.object);m&&A&&A!==m&&(k-=o.minoritySensePenalty,_.minoritySense=A)}k=o_(k),g.push({row:v,family:x,score:k,reasons:_})}let b=[];for(let v of g)v.score<o.minScore?a.push({row:v.row,family:v.family,reason:"below-floor",score:v.score}):b.push(v);let y=new Map;for(let v of b)y.has(v.family)||y.set(v.family,[]),y.get(v.family).push(v);for(let v of y.values())v.sort((x,k)=>k.score-x.score||x.row.object.localeCompare(k.row.object));let w=Hs.filter(v=>y.has(v)).concat([...y.keys()].filter(v=>!Hs.includes(v)).sort()),$=[],j=!1;for(;$.length<r&&!j;){j=!0;for(let v of w){let x=y.get(v);if(x&&x.length&&($.push(x.shift()),j=!1,$.length>=r))break}}for(let v of w)for(let x of y.get(v)||[])a.push({row:x.row,family:x.family,reason:"over-budget",score:x.score});return $.sort((v,x)=>{let k=Hs.indexOf(v.family),_=Hs.indexOf(x.family);return k-_||x.score-v.score||v.row.object.localeCompare(x.row.object)}),{term:e,selected:$,cut:a,senses:{split:d.split,clusters:d.clusters,dominantLabel:m}}}si();Zt();var i_=new Set(["isa","location","partOf","capableOf","usedFor"]),a_=new Set(["single","several","chained","group","closer"]),tb=(e,t)=>`${e}:${t}`;function lu(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!i_.has(n.family)||typeof n.form!="string"||!a_.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=tb(n.family,n.form);t.has(s)||t.set(s,{family:n.family,form:n.form,templates:[]});let o=t.get(s);o.templates.includes(n.template)||o.templates.push(n.template)}return t}var Ks=e=>`${ao(e)} ${e}`;function c_(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=Ks(t[0]),s=t.slice(1);return s.length?`${n}, and so ${Jo(s.map(Ks))}`:n}function l_(e,t,n,s){let o=String(e||"").trim(),r=(t||[]).map(l=>String(l||"").trim()).filter(Boolean),i=r[0]||"",a=String(s||"").trim();return{TERM:o,TERM_CAP:co(o),A_TERM:Ks(o),A_TERM_CAP:co(Ks(o)),TERMS:ni(o),TERMS_CAP:co(ni(o)),PRONOUN:"it",PRONOUN_CAP:"It",PARENT:a,A_PARENT:a?Ks(a):"",OBJECT:i,A_OBJECT:i?Ks(i):"",OBJECTS_A:Jo(r.map(Ks)),OBJECTS_PLURAL:Jo(r.map(ni)),OBJECTS_RAW:Jo(r),CHAIN:c_(n&&n.length?n:r.slice(0,1))}}function u_(e,t){return String(e).replace(/\{([A-Z_]+)\}/g,(n,s)=>s in t?t[s]:"").replace(/\s+/g," ").replace(/\s+([.,;])/g,"$1").trim()}function qn(e,t,n,s={}){let o=(n||[]).filter(Boolean);if(!o.length)return null;let r=s.term??o[0].subject??"",i=s.form||(o.length>1?"several":"single"),a=e instanceof Map?e.get(tb(t,i)):null,l=a?a.templates:null;if(!l||!l.length)return null;let c=s.variantSeed??"",u=mi(`${r}|${t}|${i}|${c}`)%l.length,d=s.objectsOverride||o.map(p=>p.object),f=u_(l[u],l_(r,d,s.chain,s.parent));return f?{text:f,rows:o,family:t,form:i}:null}si();var d_=Hs.filter(e=>e!=="isa"&&e!=="other");function p_(e){let t=new Map;for(let n of e||[])t.has(n.family)||t.set(n.family,[]),t.get(n.family).push(n.row);return t}function nb(e,t){let n=Math.max(1,Math.trunc(t)||1),s=[];for(let o=0;o<(e||[]).length;o+=n)s.push(e.slice(o,o+n));return s}function f_(e,t){let n=l=>(t?.[l.object]||[])[1]||null,s=new Map;for(let l of e||[]){let c=n(l);c&&s.set(c,(s.get(c)||0)+1)}let o=new Map,r=[],i=[];for(let l of e||[]){let c=n(l);c&&s.get(c)>=2?(o.has(c)||(o.set(c,[]),r.push(c)),o.get(c).push(l)):i.push(l)}let a=r.map(l=>({parent:l,rows:o.get(l)}));return i.length&&a.push({parent:null,rows:i}),a}function m_(e,t,n){let s=new Map,o=new Map;for(let l of t||[]){let c=e?.[l.object];if(!Array.isArray(c)||c.length<2)continue;let u=c[c.length-1];!u||u===l.object||(s.set(u,(s.get(u)||0)+1),o.has(u)||o.set(u,[]),o.get(u).push(l))}let r=[...s.keys()].sort((l,c)=>s.get(c)-s.get(l)||l.localeCompare(c)).slice(0,Math.max(0,n)),i=[],a=new Set;for(let l of r)for(let c of o.get(l)||[])a.has(c.id)||(a.add(c.id),i.push(c));return{roots:r,rows:i}}function h_(e,t,n,s,o){let r=[];if(!e.length)return r;if(e.length===1){let f=t[e[0].object],p=f&&f.length>1?"chained":"single",m=qn(s,"isa",e,{term:n,form:p,chain:f});return m&&r.push({...m,role:"names-term",paragraph:"definition"}),r}if(e.length<=o.groupSplitThreshold){let f=qn(s,"isa",e,{term:n,form:"several"});return f&&r.push({...f,role:"names-term",paragraph:"definition"}),r}let i=e.slice(0,o.openerConceptCount),a=e.slice(o.openerConceptCount),l=qn(s,"isa",i,{term:n,form:i.length>1?"several":"single",variantSeed:n});l&&r.push({...l,role:"names-term",paragraph:"definition"});let c=[];for(let f of f_(a,t))for(let p of nb(f.rows,o.maxObjectsPerBodySentence))c.push({parent:f.parent,rows:p});if(c.length>o.maxBodySentences){let f=c.slice(0,o.maxBodySentences),p=f[f.length-1];for(let m of c.slice(o.maxBodySentences))p.rows=p.rows.concat(m.rows);p.parent=null,c=f}for(let f of c){let p=f.parent?qn(s,"isa",f.rows,{term:n,form:"group",parent:f.parent,variantSeed:f.parent}):qn(s,"isa",f.rows,{term:n,form:"several",variantSeed:n});p&&r.push({...p,role:"describes-isa",paragraph:"definition"})}let{roots:u,rows:d}=m_(t,e,o.closerRootCount);if(u.length){let f=qn(s,"isa",d.length?d:e,{term:n,form:"closer",objectsOverride:u,variantSeed:n});f&&r.push({...f,role:"closes-isa",paragraph:"definition"})}return r}function g_(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=co(`${ao(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function b_(e,t){let n=[],s=null,o=null;for(let r of e)(!s||r.paragraph!==o||s.length>=t)&&(s=[],o=r.paragraph,n.push(s)),s.push(r);return n.map(r=>({sentences:r,text:r.map(i=>i.text).join(" ")}))}function sb(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,r=n.chains||{},i={...ra,...n.config||{}},a=p_(e?.selected||[]),l=[];for(let u of h_(a.get("isa")||[],r,s,t,i))l.push(u);for(let u of d_){let d=a.get(u);if(!(!d||!d.length))for(let f of nb(d,i.maxObjectsPerBodySentence)){let p=qn(t,u,f,{term:s});p&&l.push({...p,role:"describes",paragraph:"description"})}}g_(l,s);let c=new Map;for(let u of l)for(let d of u.rows)c.has(d.id)||c.set(d.id,d);return{term:s,sentences:l,paragraphs:b_(l,o),provenanceRows:[...c.values()]}}var w_=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function y_(e){let t=new Set,n=[];for(let s of e||[]){let o=s.provenance||(s.sourceTypes||[]).join(",");!o||t.has(o)||(t.add(o),n.push({provenance:s.provenance||"",sourceTypes:s.sourceTypes||[]}))}return n}var v_=Object.freeze({facts:"show the facts",chains:"show the chains"});function $_(e,t){let n=[...(e?.selected||[]).map(o=>o.row),...(e?.cut||[]).map(o=>o.row)].filter(Boolean),s=Object.entries(t||{}).filter(([,o])=>Array.isArray(o)&&o.length>1).map(([o,r])=>({object:o,chain:r}));return{escapes:v_,facts:n.map(w_),factCount:n.length,chains:s}}function ob(e,t,n={}){let s=t?.term||e?.term||"";return{kind:"term-article",term:s,headline:s,paragraphs:(t?.paragraphs||[]).map(o=>o.text).filter(Boolean),body:t?.paragraphs||[],sources:y_(t?.provenanceRows||[]),detail:$_(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function rb(e,t,n={},s=new Map,o={}){let r=eb(e,t,n,o),i=sb(r,s,o);return ob(r,i,o)}Hi();var ib=new Set(["rdfs:subClassOf","rdf:type"]);function ab(e){let t=new Map,n=new Set,s=[],o=[];for(let i of e||[])!i||!i.predicate||(ib.has(i.predicate)?(n.add(i.subject),t.has(i.object)||t.set(i.object,new Set),t.get(i.object).add(i.subject),s.push([i.subject,i.object])):i.predicate==="owl:disjointWith"&&o.push([i.subject,i.object]));let r={};for(let[i,a]of t)r[i]=a.size;return{classSubjectCounts:r,totalSubjects:n.size,subClassEdges:s,disjointEdges:o}}function cb(e,t,n=6){let s=Sr(e||[]),o={};for(let r of t||[]){if(r in o)continue;let i=qi(r,s,{cap:n});i.length>1&&(o[r]=i)}return o}function lb(e){let t=[],n=new Set;for(let s of e||[])!s||!ib.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}He();Xi();function x_(e,t,n,s,o={}){let r=lu(s||[]);if(!r||r.size===0)return null;let i=t||[],a=ab(n||i),l=cb(a.subClassEdges,lb(i));return rb(e,i,a,r,{...o,chains:l})}function ub(e,t,n,s={}){let o=Dt(e||{individuals:[],objectProperties:[]}),r=K(ee,t),i=o.filter(l=>r.has(l.subject));if(!i.length)return null;let a=x_(t,i,o,n,s);return k_(a)}function k_(e){if(!e||!Array.isArray(e.paragraphs)||!e.paragraphs.length)return null;let t=e.detail&&Array.isArray(e.detail.facts)?e.detail.facts:[];return{term:e.term||"",paragraphs:e.paragraphs.slice(),sources:[...new Set((e.sources||[]).map(n=>n.provenance).filter(Boolean))],facts:t,factCount:e.detail&&Number.isInteger(e.detail.factCount)?e.detail.factCount:t.length}}globalThis.tmctMemoryAsk={factAnswer:Vg,factReadBack:Kg,createInMemoryStore:Ci,normFactTerm:ee,digestTermFromPayloadBrowser:ub};})();
147
+ `)}`,replace:!0,miss:!0}}let c=Uc(r,n,{exclude:new Set([...o,i.klass])});if(c.length){let u=c.slice(0,zc),d=c.slice(u.length);return{text:`${l} ${a}, and nothing I know about ${i.klass} says whether one can ${t}. I do know ${c.length} thing${c.length===1?"":"s"} that can ${t}${d.length?` (first ${u.length} shown)`:""}:
148
+ ${u.map(oe).join(`
149
+ `)}`,replace:!0,miss:!0,...d.length?{pending:{items:d.map(oe),noun:"facts"}}:{}}}return{text:`${l} ${a}, but nothing I remember says whether any kind of ${i.klass} can ${t}.`,replace:!0,miss:!0}}function nR(e){let t=String(e||"").toLowerCase().trim().replace(/\s+/g," ");if(t==="best")return"better";if(t==="worst")return"worse";let n=t.match(/^(most|least)\s+([a-z][\w-]*)$/);return n?`${n[1]==="most"?"more":"less"} ${n[2]}`:/[a-z]est$/.test(t)&&t.length>4?`${t.slice(0,-3)}er`:null}function an(e){let t=new Set,n=[];for(let s of e){let o=`${s.subject}|${s.predicate}|${s.object}`;t.has(o)||(t.add(o),n.push(s))}return n}async function Tb(e,t,n,s,o={},r=null,i=null){return Cb(await cR(e,t,n,s,o,r,i),n,t)}function Cb(e,t,n){if(!e||e.goal!==void 0)return e;let s=String(n||"").trim(),o=lu(t?.parsed);if(!o&&e.generalVerbQuery&&(o=Yg),!o){let r=s.match(uu),i=r?null:aa(s).match(_b)||Rb(s),a=r?r[2]:i?i[1]:null;a&&!pu.has(a.toLowerCase())&&(o=Yg)}if(!o){let r=s.match(Ib);r&&(o=lu({shape:"meta",object:r[1]}))}return o?{...e,goal:o}:e}async function cR(e,t,n,s,o={},r=null,i=null){let a,l;try{({normFactTerm:a,normFactPredicate:l}=await Promise.resolve().then(()=>(Je(),us)))}catch{return null}let c=String(t).trim(),u=c.match(V_);if(u){let D=Y(a,u[1]),z=(await ot(e,r)).filter(U=>U.predicate==="mgx:usedFor"&&D.has(U.object));if(z.length){let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
150
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
151
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}for(let{predicate:D,re:z}of oR){let U=c.match(z);if(!U)continue;let C=Y(a,U[1]),I=(await ot(e,r)).filter(ae=>ae.predicate===D&&C.has(ae.object));if(!I.length)continue;let N=Qe(an(I),o).map(oe),F=N.slice(0,je),W=N.slice(je),H=W.length?`
152
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:F.join(`
153
+ `)+H,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}let d=c.match(eR),f=d?null:c.match(tR),p=d?d[1]:f?.[2],m=d?d[2]:f?.[1],h=p&&m?nR(m):null;if(h){let D=`mgx:${h.replace(/\s+/g,"-")}-than`,z=await ot(e,r),U=Y(a,p),C=[...U].sort((N,F)=>N.length-F.length)[0],I=N=>U.has(N)||N.startsWith(`${C}-`)||N.startsWith(`${C} `)||z.some(F=>Vn.has(F.predicate)&&F.subject===N&&U.has(F.object)),O=an(z.filter(N=>N.predicate===D&&Ks(N))).filter(N=>N.subject!==N.object&&I(N.subject)&&I(N.object));if(O.length){let N=new Set,F=new Map;for(let K of O)N.add(K.subject),N.add(K.object),F.set(K.object,(F.get(K.object)||0)+1),F.has(K.subject)||F.set(K.subject,F.get(K.subject)||0);let W=new Map(F),H=[],ae=null;for(;W.size;){let K=[...W.keys()].filter(V=>W.get(V)===0);if(K.length!==1){ae=K.length===0?{text:`I can't order the ${C}s \u2014 the "${h} than" facts I have loop back on themselves, so no ${m} exists. /memory to inspect them.`,replace:!0,miss:!0}:{text:`I can't pick the ${m} ${C} from what I know \u2014 nothing compares ${K[0]} and ${K[1]}. Teach me, e.g. "${K[0]} is ${h} than ${K[1]}".`,replace:!0,miss:!0};break}let Z=K[0];H.push(Z),W.delete(Z);for(let V of O)V.subject===Z&&W.has(V.object)&&W.set(V.object,W.get(V.object)-1)}if(ae)return ae;let ce=H.slice(0,-1).map((K,Z)=>O.find(V=>V.subject===K&&V.object===H[Z+1]));if(ce.every(Boolean)){let K=ce.map(Z=>`${It(Z)}${Z.provenance?` (source: ${Z.provenance})`:""}`).join("; ");return{text:`${H[0]} \u2014 ${K}; so ${H[0]} is the ${m} ${C}`,replace:!0}}}}let g=s?c.match(q_):null;if(g){let D=Y(a,g[1]),z=(await ot(e,r)).filter(U=>ob.test(U.predicate)&&D.has(U.subject));if(z.length){let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
154
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
155
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let b=c.match(H_);if(b){let D=b[1].toLowerCase(),z=Y(a,b[2].replace(/^(?:an?|the)\s+/i,"").trim()),U=(await ot(e,r)).filter(C=>ob.test(C.predicate)&&C.predicate.endsWith(`-${D}`)&&z.has(C.object));if(U.length){let I=Qe(an(U),o).map(oe),O=I.slice(0,je),N=I.slice(je),F=N.length?`
156
+ \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
157
+ `)+F,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}}}let y=c.match(K_);if(y){let D=y[3].toLowerCase(),z=Y(a,y[2]),U=new Set([...Y(a,y[1])].map(I=>l(`mgx:${D}-${I.replace(/\s+/g,"-")}`))),C=(await ot(e,r)).filter(I=>U.has(l(I.predicate))&&z.has(a(I.subject)));if(C.length){let O=Qe(an(C),o).map(oe),N=O.slice(0,je),F=O.slice(je),W=F.length?`
158
+ \u2026and ${F.length} more \u2014 say 'more' to see them.`:"";return{text:N.join(`
159
+ `)+W,replace:!0,...F.length?{pending:{items:F,noun:"facts"}}:{}}}}let w=n?.parsed?.shape==="meta"?n.parsed.object:null,$=n?.parsed&&n.parsed.node!=="miss";if(!w&&s&&!$&&!lb.test(c)){let D=c.match(Ib)||c.match(/^what\s+(?:does|do)\s+(.+?)\s+means?[?.!\s]*$/i);D&&(w=ws(D[1]))}if(!w&&n?.ambiguous&&Array.isArray(n.candidateParses)){let D=n.candidateParses.find(z=>z?.shape==="meta"&&z.object);D&&(w=ws(String(D.object)))}if(w){let D=S_(w),{predicate:z}=D,U=D.subject.replace(/^(?:the|an?)\s+/i,"").trim()||D.subject,C=!1;if(z&&Gn.test(U)){if(!i){let V=String(Ys[z]||"").replace(/^(?:is|are)\s+/,"");return{text:`not sure what "${U.toLowerCase()}" refers to yet \u2014 name the subject directly, e.g. "what is a <name>${V?` ${V}`:""}".`,replace:s,miss:!0,selfContainedMiss:!0}}U=i,C=!0}let I=Y(a,U),O=(await ot(e,r)).filter(V=>I.has(V.subject)&&!Zg.has(V.predicate)),N=z?O.filter(V=>l(V.predicate)===z):O;if(!z&&N.length&&!N.some(au)&&(N=[]),!N.length){if(z&&(O.length||C))return{text:`I don't have any "${Ys[z]}" facts about ${U}.`,replace:s,...O.length?{}:{miss:!0}};if(!z){let V=Qe((await ot(e,r)).filter(ne=>I.has(ne.object)),o);if(V.length&&!V.some(au)&&(V=[]),V.length){let ne=V.map(oe),te=ne.slice(0,je),$e=ne.slice(je),Te=$e.length?`
160
+ \u2026and ${$e.length} more \u2014 say 'more' to see them.`:"";return{text:te.join(`
161
+ `)+Te,replace:s,...$e.length?{pending:{items:$e,noun:"facts"}}:{}}}}return null}N=Qe(N,o);let F=await ot(e,r),{lines:W,grouped:H}=tb(N,F,I),ae=!z&&W.length>__?await R_(U,N,F,W):null;if(ae)return{...ae,replace:s};if(H)return{...H,replace:s};let ce=W.slice(0,je),K=W.slice(je),Z=K.length?`
162
+ \u2026and ${K.length} more \u2014 say 'more' to see them.`:"";return{text:ce.join(`
163
+ `)+Z,replace:s,...K.length?{pending:{items:K,noun:"facts"}}:{}}}if(!s)return null;let j=c.match(d_);if(j){let z=`mgx:${j[2].toLowerCase().replace(/\s+/g,"-")}-than`,U=await iu(e),C=ce=>{let K=ce.replace(/^(?:an?|the)\s+/i,"").trim();return i&&Gn.test(K)?i:K},I=C(j[1]),O=C(j[3]),N=Y(a,I),F=Y(a,O),W=U.find(ce=>ce.predicate===z&&N.has(ce.subject)&&F.has(ce.object));if(W){let ce=U.find(Z=>Z.predicate===z&&N.has(Z.object)&&F.has(Z.subject)),K=ce?` \u2014 though you also told me the opposite: ${oe(ce)}. Both are stored; I won't silently pick one.`:"";return{text:`yes \u2014 ${oe(W)}${K}`,replace:!0}}let H=U.filter(ce=>ce.predicate===z&&(N.has(ce.subject)||N.has(ce.object)));return{text:`I can't confirm that \u2014 nothing I remember compares them that way.${H.length?` I do know: ${H.slice(0,3).map(oe).join("; ")}.`:""} If it's true, teach me: "${I} is ${j[2].toLowerCase()} than ${O}".`,replace:!0,miss:!0}}for(let{predicate:D,phrase:z,re:U}of iR){let C=c.match(U);if(!C)continue;let I=await iu(e),O=Y(a,C[1]),N=Y(a,C[2]),F=I.find(H=>H.predicate===D&&O.has(H.subject)&&N.has(H.object));if(F)return{text:`yes \u2014 ${oe(F)}`,replace:!0};let W=I.filter(H=>H.predicate===D&&O.has(H.subject));if(W.length){let H=W.slice(0,3).map(oe).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${C[1]} ${z} ${C[2]}. I do know: ${H}.`,replace:!0,miss:!0}}if(!n?.parsed&&I.some(H=>O.has(H.subject)))return{text:`I can't confirm that \u2014 nothing I remember says ${C[1]} ${z} ${C[2]}.`,replace:!0,miss:!0};break}let v=c.match(ms)||du(c);if(v){let D=Y(a,v[1]),z=Y(a,v[2]),U=await ot(e,r),C=F=>D.has(F.subject)&&z.has(F.object),{DISJOINT_PREDICATE:I}=await Promise.resolve().then(()=>(Bt(),on)),O=F=>D.has(F.subject)||D.has(F.object)||z.has(F.subject)||z.has(F.object);return U.some(F=>F.predicate===I&&Ks(F)&&O(F))?null:Sb(U.find(F=>Vn.has(F.predicate)&&C(F)),U.find(F=>F.predicate===vi&&C(F)))}let E=fu(c),k=E.match(B_);if(k){let D=await ot(e,r),z=k[1],U=ab(k[2],k[3],D);if(U&&E!==ib(c)&&(U=rb(U)),U&&z)return{text:`I can't speak for ${z.trim()} ${k[2]} \u2014 what I remember is generic, not universal. ${U.text}.`,replace:!0};if(U)return U;let C=Y(a,k[2]),I=D.filter(O=>O.predicate==="mgx:capableOf"&&C.has(O.subject));if(I.length){let O=I.slice(0,3).map(oe).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${k[2]} can ${k[3]}. I do know: ${O}. If it's true, teach me: "a ${I[0].subject} can ${k[3]}".`,replace:!0,miss:!0}}return cb(k[2],k[3],D)}let _=c.match(U_);if(_){let D=Y(a,_[1]),z=Y(a,_[2]),U=new Set(["mgx:hasA","tmct:has"]),C=await iu(e),I=W=>C.find(H=>U.has(H.predicate)&&W.has(H.subject)&&z.has(H.object)),O=I(D);if(O)return{text:`yes \u2014 ${oe(O)}`,replace:!0};let N=[{terms:D,chain:[]}],F=new Set;for(let W=0;W<4;W+=1){let H=[];for(let{terms:ae,chain:ce}of N){let K=C.filter(Z=>Vn.has(Z.predicate)&&ae.has(Z.subject)&&!F.has(Z.object));for(let Z of K){if(F.has(Z.object))continue;F.add(Z.object);let V=[...ce,Z],ne=I(Y(a,Z.object));if(ne)return{text:`yes \u2014 ${[...V.map(oe),oe(ne)].join("; ")}`,replace:!0};H.push({terms:Y(a,Z.object),chain:V})}}if(!H.length)break;N=H}return null}let R=fu(c),x=R.match(Y_);if(x){let D=await ot(e,r),z=!!x[1],U=Y(a,x[2]),C=Y(a,x[3]),I=ab(x[2],x[3],D);if(I&&R!==ib(c)&&(I=rb(I)),I&&z)return{text:`I can't speak for ${x[1].trim()} ${x[2]} \u2014 what I remember is generic, not universal. ${I.text}.`,replace:!0};if(I)return I;if(s){let O=D.filter(F=>F.predicate==="mgx:capableOf"&&U.has(F.subject));if(O.length){let F=O.slice(0,3).map(oe).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${x[2]} can ${x[3]}. I do know: ${F}. If it's true, teach me: "a ${O[0].subject} can ${x[3]}".`,replace:!0,miss:!0}}let N=cb(x[2],x[3],D);if(N)return N;if(!/\s/.test(x[2].trim())&&!D.some(F=>U.has(F.subject)||U.has(F.object))){let F=wu(ia(x[2]));return{text:`I can't confirm that \u2014 I don't know anything about "${x[2]}" yet. Teach me "a ${F} can ${x[3]}" (or "a ${F} cannot ${x[3]}") and I'll remember it.`,replace:!0,miss:!0}}}}let T=c.match(W_);if(T){let D=Y(a,T[1]),z=(await ot(e,r)).filter(F=>(F.predicate==="mgx:capableOf"||F.predicate===xo)&&D.has(F.subject));if(!z.length)return null;let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
164
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
165
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let M=c.match(Q_);if(M){let D=Y(a,M[1]),z=Y(a,M[2]),U=await ot(e,r),C=an(U.filter(I=>I.predicate==="mgx:capableOf"&&z.has(I.object))).filter(I=>xi(new Set([I.subject]),z,U).verdict==="yes");if(C.length){let{findIsaChain:I,SUBCLASS_PREDICATE:O,TYPE_PREDICATE:N}=await Promise.resolve().then(()=>(Bt(),on)),F=U.filter(re=>re.predicate===O),W=U.filter(re=>re.predicate===N),H=F.map(re=>[re.subject,re.object]),ae=W.map(re=>[re.subject,re.object]),ce=re=>(re.predicate===O?F:W).find(fe=>fe.subject===re.subject&&fe.object===re.object),K=new Map,Z=C.filter(re=>D.has(re.subject)?!0:(K.has(re.subject)||K.set(re.subject,I(re.subject,D,ae,H,{maxHops:3})),!!K.get(re.subject))),ne=Qe(Z.length?Z:C,o).map(re=>{let fe=Z.length?K.get(re.subject):null;if(!fe||fe.length<2)return oe(re);let be=fe.map(ce);if(!be.every(Boolean))return oe(re);let Ce=be.map(ue=>`${It(ue)}${ue.provenance?` (source: ${ue.provenance})`:""}`).join("; ");return`${oe(re)} \u2014 via: ${Ce}`}),te=ne.slice(0,je),$e=ne.slice(je),Te=$e.length?`
166
+ \u2026and ${$e.length} more \u2014 say 'more' to see them.`:"";return{text:(Z.length?"":`nothing I remember ties these to "${M[1]}", but:
167
+ `)+te.join(`
168
+ `)+Te,replace:!0,...$e.length?{pending:{items:$e,noun:"facts"}}:{}}}}let A=c.match(J_);if(A&&A[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=Y(a,A[1]),z=(await ot(e,r)).filter(U=>U.predicate==="mgxneg:capableOf"&&D.has(U.object));if(z.length){let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
169
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
170
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}return{text:`nothing I remember says anything cannot ${A[1].trim()}.`,replace:!0,miss:!0}}let P=c.match(X_);if(P&&P[1].trim().split(/\s+/).at(-1)?.toLowerCase()!=="do"){let D=Y(a,P[1]),z=Uc(D,await ot(e,r));if(z.length){let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
171
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
172
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}}let G=c.match(G_);if(G&&!aR.has(G[1].trim().split(/\s+/)[0]?.toLowerCase())){let D=Y(a,G[1]),z=(await ot(e,r)).filter(F=>F.predicate==="mgx:hasA"&&D.has(F.object));if(!z.length)return null;let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
173
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
174
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let J=c.match(lb),ee=n?.parsed?.shape==="reverse"&&n.parsed.kind==="inherits"?n.parsed.object:J?.[1];if(ee){let D=Y(a,ee),z=(await ot(e,r)).filter(F=>Vn.has(F.predicate)&&D.has(F.object));if(!z.length)return null;let C=Qe(an(z),o).map(oe),I=C.slice(0,je),O=C.slice(je),N=O.length?`
175
+ \u2026and ${O.length} more \u2014 say 'more' to see them.`:"";return{text:I.join(`
176
+ `)+N,replace:!0,...O.length?{pending:{items:O,noun:"facts"}}:{}}}let ie=c.match(z_);if(ie){let D=Y(a,ie[1]),z=await ot(e,r),U=q=>!String(q.provenance||"").includes("corpus:")&&!String(q.provenance||"").includes("web:"),C=z.filter(q=>Vn.has(q.predicate)&&U(q)),I=new Set,O=D;for(let q=0;q<8&&O.size;q+=1){let se=new Set;for(let De of C)O.has(De.object)&&!I.has(De.subject)&&se.add(De.subject);if(!se.size)break;for(let De of se)I.add(De);let Ze=new Set;for(let De of se)for(let Ve of Y(a,De))Ze.add(Ve);O=Ze}let N=z.filter(q=>D.has(q.subject)||D.has(q.object)||I.has(q.subject));if(!N.length){let q=a(ie[1]).split(/\s+/).filter(se=>se.length>=4&&!jb.has(se));if(q.length){let se=De=>new Set(String(De||"").split(/\s+/)),Ze=De=>{let Ve=se(De);return q.some(Jt=>Ve.has(Jt))};N=z.filter(De=>Ze(De.subject)||Ze(De.object))}}N=N.filter(q=>!Zg.has(q.predicate));let F=N.length>0&&!N.some(au);if(!N.length)return null;let{findConsistencyViolations:W,TYPE_PREDICATE:H,SUBCLASS_PREDICATE:ae,DISJOINT_PREDICATE:ce}=await Promise.resolve().then(()=>(Bt(),on)),K=q=>!q.provenance?.includes("corpus:")&&!q.provenance?.includes("web:"),Z=z.filter(q=>q.predicate===H&&K(q)).map(q=>[q.subject,q.object]),V=z.filter(q=>q.predicate===ae&&K(q)).map(q=>[q.subject,q.object]),ne=z.filter(q=>q.predicate===ce&&K(q)).map(q=>[q.subject,q.object]);if(ne.length){let se=W(Z,V,ne,{focus:D,budget:5}).find(Ze=>D.has(Ze.subject));if(se)return{text:`I can't answer that \u2014 what I've been told about ${se.subject} is inconsistent: it's taught to be both ${se.classA} and ${se.classB}, but ${se.viaA} and ${se.viaB} are disjoint (${se.viaA} owl:disjointWith ${se.viaB}). I'd need one of those retracted before I can answer honestly.`,replace:!0}}let te=N.find(q=>D.has(q.subject)||D.has(q.object)),$e=te?D.has(te.subject)?te.subject:te.object:ie[1].trim(),Te=N.some(q=>I.has(q.subject)&&!D.has(q.subject)&&!D.has(q.object));N=Qe(N,o);let pe=`${N.length} remembered fact${N.length===1?"":"s"} about ${$e}${Te?" (including its known subtypes)":""}:`,{lines:re,grouped:fe}=tb(N,z,D,{indent:" "});if(fe)return{...fe,text:`${pe}
177
+ ${fe.text}`,...F?{weakOnly:!0}:{}};let be=re.slice(0,je),Ce=re.slice(je),ue=Ce.length?`
178
+ \u2026and ${Ce.length} more \u2014 say 'more' to see them.`:"";return{text:`${pe}
179
+ ${be.join(`
180
+ `)}${ue}`,replace:!0,...Ce.length?{pending:{items:Ce.map(q=>q.trim()),noun:"facts"}}:{},...F?{weakOnly:!0}:{}}}return null}async function yR(e,t){let n=await Ir(e,t);if(!n)return null;let s=(e?.byId?.get?.(n.id)||(e?.individuals||[]).find(o=>o?.id===n.id))?.class;return s&&Xg[s]?Xg[s][0]:null}function ra(e,t){let n=[];if(!e||!t)return n;let s=new Set([t]),o=t;for(let r=0;r<$R;r+=1){let i=null;for(let a of e.relations||[])if(vR.test(`${a?.prop||""} ${a?.predicate||""}`)&&(i=(a.edges||[]).find(l=>l?.subject===o)||null,i))break;if(!i||s.has(i.object))break;s.add(i.object),n.push({id:i.object,label:i.objectLabel||i.object}),o=i.object}return n}async function Ob(e,t,n,s,o=null,r=null,i={},a=null){return Cb(await xR(e,t,n,s,o,r,i,a),n,t)}async function xR(e,t,n,s,o=null,r=null,i={},a=null){if(!s)return null;let l;try{({normFactTerm:l}=await Promise.resolve().then(()=>(Je(),us)))}catch{return null}let c=String(t).trim();if(o){let C=c.match(ms);if(C){let I=await Ir(o,C[1]);if(I){let O=Y(l,en(C[2])),N=ra(o,I.id).find(W=>[...Y(l,W.label)].some(H=>O.has(H)));if(N)return{text:`yes \u2014 the code graph says ${I.label} inherits ${N.label}.`,replace:!0};let F=await Ir(o,en(C[2]));if(F&&ra(o,F.id).some(W=>W.id===I.id))return{text:`I can't confirm that \u2014 the code graph's stored direction runs the other way: ${F.label} inherits ${I.label}. An inheritance doesn't reverse.`,replace:!0,miss:!0}}}}let u=c.replace(/^(?:actually|really|honestly|yeah\s+nah)\s*,?\s+/i,""),d=await ot(e,a);if(!d.length){if(!ms.test(u)&&!uu.test(u)){let I=u.match(db);if(I){let O=I[1].trim(),N=Gn.test(O)?r||null:O;if(N&&!/^there\b/i.test(N)&&!n?.parsed&&!fb.test(O)&&!pb.test(O)&&!Qg.test(I[2].trim()))return mb(N,I[2].trim().toLowerCase())}}let C=u.match(ms)||du(c);if(!(C&&!/^there\b/i.test(C[1].trim())||sb.test(c)))return null}let f=d.filter(C=>Vn.has(C.predicate)),p=(C,I)=>I.trust-C.trust,m=C=>{let I=C.map(oe),O=I.slice(0,je),N=I.slice(je),F=N.length?`
181
+ \u2026and ${N.length} more \u2014 say 'more' to see them.`:"";return{text:O.join(`
182
+ `)+F,replace:!0,...N.length?{pending:{items:N,noun:"facts"}}:{}}};if(wR.test(c)){let C=Qe(f.length?f:d,i);return C.length?m(C):null}let h=u.match(uu);if(h){let C=h[1].trim(),I=Gn.test(C)?r||null:C,O=h[2].trim().toLowerCase(),N=h[3].trim();if(I&&!pu.has(O)){let F=Zl(d),{findIsaChain:W}=await Promise.resolve().then(()=>(Bt(),on)),H=Te=>{let pe=String(Te||"").trim().toLowerCase(),re=[];for(let fe of d){let be=ru(fe.predicate);if(!be)continue;if(be===pe){re.push({fact:fe,aliasFacts:[]});continue}let Ce=eu(W,be,new Set([pe]),F,{maxHops:2});if(!Ce)continue;let ue=Ce.map(q=>d.find(se=>se.predicate===Lr&&se.subject===q.subject&&se.object===q.object));ue.every(Boolean)&&re.push({fact:fe,aliasFacts:ue})}return re},{loadMemory:ae,findRuleByName:ce,resolveRelationChase:K}=await Promise.resolve().then(()=>(Je(),us)),{findActionPath:Z}=await Promise.resolve().then(()=>(_s(),Gr)),V=await ae(e),te=await K(V,O,I,N,{relationFactsFor:H,renderFactLine:oe,factPhrase:It,factTermVariants:Y,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Ql,findActionPath:Z});return te?{text:`yes \u2014 ${te.citation.join("; ")}`,replace:!0}:H(O).length>0||!!ce(V,O)?{text:`I know the '${O}' relation, but I can't confirm ${I} is the ${O} of ${N} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${O}' yet.`,replace:!0}}}let g=aa(u).match(_b)||Rb(u,C=>{let I=Y(l,C);return d.some(O=>I.has(O.subject)||I.has(O.object))});if(g){let C=g[1].trim().toLowerCase(),I=g[2].trim(),O=Gn.test(I)?r||null:I;if(O&&!pu.has(C)){let N=Zl(d),{findIsaChain:F}=await Promise.resolve().then(()=>(Bt(),on)),W=Te=>{let pe=String(Te||"").trim().toLowerCase(),re=[];for(let fe of d){let be=ru(fe.predicate);if(!be)continue;if(be===pe){re.push({fact:fe,aliasFacts:[]});continue}let Ce=eu(F,be,new Set([pe]),N,{maxHops:2});if(!Ce)continue;let ue=Ce.map(q=>d.find(se=>se.predicate===Lr&&se.subject===q.subject&&se.object===q.object));ue.every(Boolean)&&re.push({fact:fe,aliasFacts:ue})}return re},{loadMemory:H,findRuleByName:ae,resolveRelationChaseReverse:ce}=await Promise.resolve().then(()=>(Je(),us)),K=await H(e),{findReachableSet:Z}=await Promise.resolve().then(()=>(_s(),Gr)),ne=await ce(K,C,O,{relationFactsFor:W,renderFactLine:oe,factPhrase:It,factTermVariants:Y,byTrust:p,rows:d,HAS_PROPERTY_PREDICATE:Ql,findReachableSet:Z});return ne.length?{text:ne.map(pe=>`${pe.subject} \u2014 ${pe.citation.join("; ")}`).join(`
183
+ `),replace:!0}:W(C).length>0||!!ae(K,C)?{text:/^what\b/i.test(aa(u))?`I don't know what the ${C} of ${O} is from what you've told me.`:`I don't know anyone who is the ${C} of ${O} from what you've told me.`,replace:!0}:{text:`I don't know a relation or rule called '${C}' yet.`,replace:!0}}}{let C=u.match(kR);if(C){let I=Y(l,C[1]),O=Qe(d.filter(N=>I.has(N.subject)||I.has(N.object)),i);if(O.length){let N=O.map(oe),F=N.slice(0,je),W=N.slice(je),H=W.length?`
184
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:F.join(`
185
+ `)+H,replace:!0,...W.length?{pending:{items:W,noun:"facts"}}:{}}}}}let b=u.match(M_);if(b){let C=wu(b[1].trim().toLowerCase()),I=b[2].trim(),O=Gn.test(I)?r||null:I;if(O){let{loadMemory:N,findRuleByName:F,RULE_KIND_PROP:W,RULE_KIND_RECURSIVE:H}=await Promise.resolve().then(()=>(Je(),us)),ae=await N(e),ce=F(ae,C),K=ce?.attributes?.find(Z=>Z.prop===W)?.value;if(ce&&K===H){let Z=ce.attributes.find(te=>te.prop==="mgx:ruleBaseCase")?.value,V=ce.attributes.find(te=>te.prop==="mgx:ruleRecStep")?.value,ne=l(O);if(Z&&V&&ne){let te=Zl(d),{findIsaChain:$e}=await Promise.resolve().then(()=>(Bt(),on)),Te=Ce=>{let ue=String(Ce||"").trim().toLowerCase(),q=[];for(let se of d){let Ze=ru(se.predicate);if(!Ze)continue;if(Ze===ue){q.push({fact:se,aliasFacts:[]});continue}let De=eu($e,Ze,new Set([ue]),te,{maxHops:2});if(!De)continue;let Ve=De.map(Jt=>d.find(Qt=>Qt.predicate===Lr&&Qt.subject===Jt.subject&&Qt.object===Jt.object));Ve.every(Boolean)&&q.push({fact:se,aliasFacts:Ve})}return q},{findReachableSet:pe}=await Promise.resolve().then(()=>(_s(),Gr)),be=pe({entity:ne,hop:0},Ce=>{let ue=Ce.hop===0?Z:V;return Te(ue).filter(q=>q.fact.subject===Ce.entity).map(q=>({action:q,nextState:{entity:q.fact.object,hop:Ce.hop+1}}))},{maxDepth:20,stateKey:Ce=>Ce.entity});if(be.length)return{text:be.map(({node:ue,path:q})=>{let se=new Set,Ze=[];for(let De of q.actions){Ze.push(oe(De.fact));for(let Ve of De.aliasFacts){let Jt=Ve.id||`${Ve.subject}|${Ve.predicate}|${Ve.object}`;se.has(Jt)||(se.add(Jt),Ze.push(`${It(Ve)}${Ve.provenance?` (source: ${Ve.provenance})`:""}`))}}return`${ue.entity} \u2014 ${Ze.join("; ")}`}).join(`
186
+ `),replace:!0}}}return null}}let y=c.match(sb),w=c.match(ms)||du(c)||y&&`is ${y[1].trim()} a ${y[2].trim()}`.match(ms);if(w){let C=Y(l,en(w[2])),I=r&&Gn.test(w[1].trim())?r:w[1],O=new Set(Y(l,I));if([...O].some(B=>C.has(B))){let B=en(w[2]).trim();return{text:`yes \u2014 ${Mo(B)} ${B} is ${Mo(B)} ${B}, trivially: every kind is a kind of itself.`,replace:!0}}let N=await yR(o,I);if(N)for(let B of Y(l,N))O.add(B);let{findIsaChain:F,deriveDisjointViolations:W,SUBCLASS_PREDICATE:H,TYPE_PREDICATE:ae,DISJOINT_PREDICATE:ce}=await Promise.resolve().then(()=>(Bt(),on)),K=Ks,Z=f.filter(B=>B.predicate===H&&K(B)),V=f.filter(B=>B.predicate===ae&&K(B)),ne=Z.map(B=>[B.subject,B.object]),te=V.map(B=>[B.subject,B.object]),$e=f.filter(B=>B.predicate===H),Te=f.filter(B=>B.predicate===ae),pe=Te.map(B=>[B.subject,B.object]),re=$e.map(B=>[B.subject,B.object]),fe=d.filter(B=>B.predicate===ce&&K(B)),be=fe.map(B=>[B.subject,B.object]),Ce=fe.length?W(pe.concat(re),re,be,{budget:20,focus:new Set([...O,...C])}):[],ue=B=>{let we=Ce.find(Ne=>Ne.subject===B&&C.has(Ne.object));if(!we)return null;let ye=f.filter(Ne=>C.has(Ne.object)&&(Ne.subject===we.viaClass||Ne.subject===we.subject)).sort(p)[0],_e=fe.find(Ne=>Ne.subject===we.viaClass&&Ne.object===we.object||Ne.subject===we.object&&Ne.object===we.viaClass);return!ye||!_e?null:A_(ye,_e)},q=f.filter(B=>O.has(B.subject)&&C.has(B.object)).sort(p)[0],se=d.filter(B=>B.predicate===vi&&O.has(B.subject)&&C.has(B.object)).sort(p)[0],Ze=fe.find(B=>O.has(B.subject)&&C.has(B.object)||O.has(B.object)&&C.has(B.subject));if(q&&!se){let B=ue(q.subject);if(B)return B}let De=Sb(q,se||Ze);if(De)return De;if(fe.length){let B=_e=>{let Ne=new Set(_e),Rt=new Set(_e);for(let Oe=0;Oe<8&&Rt.size;Oe+=1){let ve=new Set;for(let[rt,gs]of re)Rt.has(rt)&&!Ne.has(gs)&&ve.add(gs);if(!ve.size)break;for(let rt of ve)Ne.add(rt);Rt=ve}return Ne},we=B(C),ye=Ce.find(_e=>O.has(_e.subject)&&we.has(_e.object)&&!B([_e.viaClass]).has(_e.object)&&!B([_e.object]).has(_e.viaClass));if(ye){let _e=f.filter(ve=>O.has(ve.subject)&&ve.object===ye.viaClass).sort(p)[0],Ne=fe.find(ve=>ve.subject===ye.viaClass&&ve.object===ye.object||ve.subject===ye.object&&ve.object===ye.viaClass),Rt=!C.has(ye.object),Oe=Rt?f.filter(ve=>C.has(ve.subject)&&ve.object===ye.object).sort(p)[0]:null;if(_e&&Ne&&(!Rt||Oe)){let ve=en(w[2]).trim();return{text:`no \u2014 ${[_e,...Oe?[Oe]:[]].map(oe).join("; ")}; and ${It(Ne)}${Ne.provenance?` (source: ${Ne.provenance})`:""} \u2014 so ${I} can never be ${Mo(ve)} ${ve}.`,replace:!0}}}}let Ve=await Ir(o,I);if(Ve){let B=new Map;for(let ye of ra(o,Ve.id))for(let _e of Y(l,ye.label))!O.has(_e)&&!B.has(_e)&&B.set(_e,ye.label);let we=f.filter(ye=>B.has(ye.subject)&&C.has(ye.object)).sort(p)[0];if(we)return{text:`yes \u2014 the code graph says ${Ve.label} inherits ${B.get(we.subject)}, and ${oe(we)}`,replace:!0}}let Jt=B=>(B.predicate===H?Z:V).find(we=>we.subject===B.subject&&we.object===B.object);for(let B of O){let we=F(B,C,te,ne,{maxHops:2});if(!we)continue;let ye=ue(B);if(ye)return ye;let _e=we.map(Jt);if(_e.every(Boolean))return{text:`yes \u2014 ${sa(_e)}`,replace:!0}}let Qt=B=>(B.predicate===H?$e:Te).find(we=>we.subject===B.subject&&we.object===B.object);for(let B of O){let we=F(B,C,pe,re,{maxHops:2});if(!we)continue;let ye=ue(B);if(ye)return ye;let _e=we.map(Qt);if(_e.every(Boolean)&&_e.some(K))return{text:`yes \u2014 ${sa(_e)}`,replace:!0}}let Gt=I.match(/^(.*\S)\s+not$/i),Lt=Gt&&[Gt[0],r&&Gn.test(Gt[1].trim())?r:Gt[1]];if(Lt){let B=Y(l,Lt[1]),we=C,ye=f.filter(Oe=>B.has(Oe.subject)&&we.has(Oe.object)).sort(p)[0];if(ye)return{text:`no \u2014 ${oe(ye)}`,replace:!0};let _e=fe.find(Oe=>B.has(Oe.subject)&&we.has(Oe.object)||B.has(Oe.object)&&we.has(Oe.subject));if(_e)return{text:`yes \u2014 ${oe(_e)}`,replace:!0};let Ne=Lt[1].trim(),Rt=en(w[2]).trim();return{text:`I can't confirm that either way \u2014 nothing I remember links ${Ne} and ${Rt}. If no ${Ne} is a ${Rt}, teach me: "no ${Ne} is a ${Rt}".`,replace:!0,miss:!0}}if(fe.length){let B=W(te.concat(ne),ne,be,{budget:10});for(let we of O){let ye=B.find(Oe=>Oe.subject===we&&C.has(Oe.object));if(!ye)continue;let _e=V.concat(Z).find(Oe=>Oe.subject===ye.subject&&Oe.object===ye.viaType),Ne=fe.find(Oe=>Oe.subject===ye.viaClass&&Oe.object===ye.object||Oe.subject===ye.object&&Oe.object===ye.viaClass),Rt=[_e,Ne].filter(Boolean).map(oe);return{text:`no \u2014 ${Rt.length?Rt.join("; "):`${ye.viaClass} and ${ye.object} are disjoint.`}`,replace:!0}}}let{deriveSomeValuesFromApplication:Nr,ON_PROPERTY_PREDICATE:S,SOME_VALUES_FROM_PREDICATE:le,deriveSomeValuesFromSubsumption:Ae,ENTAILED_SCM_SVF_PROVENANCE:En,SCM_SVF_RULE_CONFIDENCE:Qs,entailedTrustFrom:xu}=await Promise.resolve().then(()=>(Bt(),on)),ku=d.filter(B=>B.predicate===S&&K(B)),Eu=d.filter(B=>B.predicate===le&&K(B));if(ku.length&&Eu.length){let B=new Map(Eu.map(ve=>[ve.subject,ve.object])),we=ku.map(ve=>({restriction:ve.subject,property:ve.object,target:B.get(ve.subject)})).filter(ve=>ve.target),ye=new Set([H,ae,ce,S,le,"owl:intersectionOf"]),_e=d.filter(ve=>K(ve)&&!ye.has(ve.predicate)),Ne=_e.map(ve=>[ve.subject,ve.predicate,ve.object]),Rt=Nr(Ne,te,ne,we,{budget:10});for(let ve of O){let rt=Rt.find(ln=>ln.subject===ve&&C.has(ln.object));if(!rt)continue;let gs=_e.find(ln=>ln.subject===rt.subject&&ln.predicate===rt.viaProperty&&ln.object===rt.viaValue),bs=V.find(ln=>ln.subject===rt.viaValue&&ln.object===rt.viaType),Fo=[gs,bs].filter(Boolean).map(oe);return{text:`yes \u2014 ${Fo.length?Fo.join("; "):`${rt.subject} ${rt.viaProperty} ${rt.viaValue}, and ${rt.viaValue} is a ${rt.viaType}.`}`,replace:!0}}let Oe=we.length>1?Ae(we,ne,{budget:10}):[];if(Oe.length){let ve=ne.concat(Oe.map(Ee=>[Ee.subject,Ee.object])),rt=new Map(we.map(Ee=>[Ee.restriction,Ee])),gs=new Map;for(let Ee of d)gs.set(`${Ee.subject}\0${Ee.predicate}\0${Ee.object}`,Ee.trust);let bs=(Ee,hn,Nt)=>gs.get(`${Ee}\0${hn}\0${Nt}`),Fo=new Map;for(let Ee of Oe){let hn=rt.get(Ee.subject),Nt=rt.get(Ee.object),Vt=[hn&&bs(Ee.subject,S,hn.property),bs(Ee.subject,le,Ee.viaY1),Nt&&bs(Ee.object,S,Nt.property),bs(Ee.object,le,Ee.viaY2),bs(Ee.viaY1,H,Ee.viaY2)].filter(Zb=>typeof Zb=="number"),Pr=xu(Vt,Qs);Pr!==null&&Fo.set(`${Ee.subject}\0${Ee.object}`,Pr)}let ln=Ee=>{if(Ee.predicate!==H)return V.find(Vt=>Vt.subject===Ee.subject&&Vt.object===Ee.object);let hn=Z.find(Vt=>Vt.subject===Ee.subject&&Vt.object===Ee.object);if(hn)return hn;let Nt=Oe.find(Vt=>Vt.subject===Ee.subject&&Vt.object===Ee.object);return Nt?{subject:Nt.subject,predicate:H,object:Nt.object,provenance:En,trust:Fo.get(`${Nt.subject}\0${Nt.object}`)}:void 0};for(let Ee of O){let hn=F(Ee,C,te,ve,{maxHops:3});if(!hn)continue;let Nt=hn.map(ln);if(Nt.every(Boolean)){let Vt=xu(Nt.map(Pr=>Pr.trust),1);return{text:`yes \u2014 ${sa(Nt)}`,replace:!0,...Vt!==null?{trust:Vt}:{}}}}}}let Jb=Y(l,I),Su=f.filter(B=>Jb.has(B.subject)).sort(p),hs=I.trim(),Mr=en(w[2]).trim(),Qb=[...O].some(B=>F(B,C,te,ne,{maxHops:P_}));if(Su.length){let B=Su.slice(0,3).map(oe).join("; "),we=Qb?`The facts to settle it are here, but the chain is longer than I follow while answering. Run "/syllogise ${hs}", then ask me again.`:`If it's true, teach me: "${hs} is a kind of ${Mr}".`;return{text:`I can't confirm that \u2014 nothing I remember says ${hs} is a ${Mr}. I do know: ${B}. ${we}`,replace:!0,miss:!0}}let ju=f.filter(B=>O.has(B.object)&&C.has(B.subject)).sort(p)[0];return ju?{text:`I can't confirm that \u2014 what I know runs the other way: ${oe(ju)}. A kind doesn't reverse. If it's true, teach me: "every ${hs} is a ${Mr}".`,replace:!0,miss:!0}:!Ve&&!N&&!c_(hs)&&!d.some(B=>O.has(B.subject)||O.has(B.object))?{text:`I can't confirm that \u2014 I don't know "${hs}" at all yet. If it's true, teach me: "${hs} is a kind of ${Mr}".`,replace:!0,miss:!0}:null}let $=c.match(dR);if($){let[,C,I,O]=$,{SUBCLASS_PREDICATE:N,ON_PROPERTY_PREDICATE:F,buildCardinalityRestrictions:W,proveCardinalityAtLeast:H,CARDINALITY_RULE_CONFIDENCE:ae,entailedTrustFrom:ce}=await Promise.resolve().then(()=>(Bt(),on)),K=Ks,Z=f.filter(te=>te.predicate===N&&K(te)).map(te=>[te.subject,te.object]),V=d.filter(te=>(te.predicate===F||ub.has(te.predicate))&&K(te)),ne=W(V);if(ne.length){let te=Y(l,C.trim()),$e=Y(l,O.trim()),Te=Number(I),pe=nb(te,$e,(re,fe)=>H(Z,ne,re,fe,Te,{}));if(pe){let re=d.find(se=>se.predicate===N&&se.subject===pe.viaClass&&se.object===pe.viaRestriction),fe=re?.provenance?` (source: ${re.provenance})`:"",be=pe.kind==="exactly"?"exactly":"at least",Ce=(se,Ze)=>`${se}${Ze===1?"":"s"}`,ue=[re?.trust,...V.filter(se=>se.subject===pe.viaRestriction).map(se=>se.trust),...pe.viaClass!==pe.subject?[f.find(se=>se.predicate===N&&se.subject===pe.subject&&se.object===pe.viaClass)?.trust]:[]].filter(se=>typeof se=="number"),q=ce(ue,ae);return{text:`yes \u2014 every ${pe.viaClass} has ${be} ${pe.n} ${Ce(pe.object,pe.n)}${fe}, so at least ${Te} follows.`,replace:!0,...q!==null?{trust:q}:{}}}}}let j=c.match(pR);if(j){let[,C,I]=j,{SUBCLASS_PREDICATE:O,ON_PROPERTY_PREDICATE:N,buildCardinalityRestrictions:F,proveMaxCardinalityZeroDenial:W,CAX_MAXC0_RULE_CONFIDENCE:H,entailedTrustFrom:ae}=await Promise.resolve().then(()=>(Bt(),on)),ce=Ks,K=f.filter(ne=>ne.predicate===O&&ce(ne)).map(ne=>[ne.subject,ne.object]),Z=d.filter(ne=>(ne.predicate===N||ub.has(ne.predicate))&&ce(ne)),V=F(Z);if(V.length){let ne=Y(l,C.trim()),te=Y(l,I.trim()),$e=nb(ne,te,(Te,pe)=>W(K,V,Te,pe,{}));if($e){let Te=d.find(be=>be.predicate===O&&be.subject===$e.viaClass&&be.object===$e.viaRestriction),pe=Te?.provenance?` (source: ${Te.provenance})`:"",re=[Te?.trust,...Z.filter(be=>be.subject===$e.viaRestriction).map(be=>be.trust),...$e.viaClass!==$e.subject?[f.find(be=>be.predicate===O&&be.subject===$e.subject&&be.object===$e.viaClass)?.trust]:[]].filter(be=>typeof be=="number"),fe=ae(re,H);return{text:`no \u2014 every ${$e.viaClass} has at most 0 ${$e.object}${pe}.`,replace:!0,...fe!==null?{trust:fe}:{}}}}}let v=c.match(fR);if(v){let C=Y(l,v[1]),I=d.filter(O=>O.predicate===Jl&&C.has(O.subject)).sort(p);return I.length?m(I):null}let E=u.match(mR);if(E){let[,C,I]=E,O=Y(l,C.trim()),N=Y(l,I.replace(/^an?\s+/i,"").trim()),F=d.filter(W=>W.predicate===Jl&&N.has(W.subject)&&O.has(W.object)).sort(p)[0];return F?{text:`yes \u2014 ${oe(F)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} owns/maintains ${I.trim()}.`,replace:!0}}let k=u.match(hR);if(k){let[,C,I]=k,O=Y(l,C.replace(/^an?\s+/i,"").trim()),N=Y(l,I.trim()),F=d.filter(W=>W.predicate===Jl&&O.has(W.subject)&&N.has(W.object)).sort(p)[0];return F?{text:`yes \u2014 ${oe(F)}`,replace:!0}:{text:`no \u2014 no remembered fact says ${C.trim().toLowerCase()} is owned by ${I.trim()}.`,replace:!0}}let _=u.match(gR);if(_){let[,C,I]=_,O=Y(l,C.trim()),N=Y(l,`${I.trim()} method`),F=d.filter(W=>W.predicate===zs&&O.has(W.subject)&&N.has(W.object)).sort(p)[0];return F?{text:`yes \u2014 ${oe(F)}`,replace:!0}:null}let R=u.match(bR);if(R){let C=Y(l,R[1].trim()),I=d.filter(O=>O.predicate===zs&&C.has(O.subject)&&/ method$/.test(O.object)).sort(p);return I.length?m(I):null}let x=u.match(db);if(x){let C=x[1].trim(),I=fb.test(C)||pb.test(C)?null:Gn.test(C)?r||null:C,O=x[2].trim().toLowerCase();if(I){let N=Y(l,I),F=new Map,W=null;if(o){let V=await Ir(o,I);if(W=V,V)for(let ne of ra(o,V.id))for(let te of Y(l,ne.label))!N.has(te)&&!F.has(te)&&F.set(te,ne.label),N.add(te)}let H=V=>V.predicate===Ql&&l(V.object)===O||V.predicate===`tmct:${O}`&&V.object==="true",ae=l(I).split(/\s+/).filter(V=>V.length>=4&&!jb.has(V)),ce=V=>ae.some(ne=>new Set(String(V.subject||"").split(/\s+/)).has(ne)),K=V=>N.has(V.subject)||ae.length&&ce(V),Z=d.filter(V=>K(V)&&H(V)).sort(p)[0];if(Z){let V=F.get(Z.subject);return{text:V?`yes \u2014 the code graph says ${W.label} inherits ${V}, and ${oe(Z)}`:`yes \u2014 ${oe(Z)}`,replace:!0}}{let{findIsaChain:V,SUBCLASS_PREDICATE:ne,TYPE_PREDICATE:te}=await Promise.resolve().then(()=>(Bt(),on)),$e=Ks,Te=d.filter(ue=>ue.predicate===ne&&$e(ue)),pe=d.filter(ue=>ue.predicate===te&&$e(ue)),re=Te.map(ue=>[ue.subject,ue.object]),fe=pe.map(ue=>[ue.subject,ue.object]),be=ue=>(ue.predicate===ne?Te:pe).find(q=>q.subject===ue.subject&&q.object===ue.object),Ce=Y(l,O);for(let ue of N){let q=V(ue,Ce,fe,re,{maxHops:2});if(!q)continue;let se=q.map(be);if(se.every(Boolean))return{text:`yes \u2014 ${sa(se)}`,replace:!0}}}if(d.some(K)&&!n?.parsed)return{text:`I don't have a fact saying ${C_(I)} is ${O}.`,replace:!0};if(!n?.parsed&&!Qg.test(O))return mb(I,O)}}let T=fu(c).match(g_);if(T&&!nu.test(c)){let[,C,I,O]=T,N=I.toLowerCase();if(!tu.test(N)&&!ou.test(N)){let F=C.trim(),W=y_(await su(N),O),H=W.object.replace(/^an?\s+/i,"").trim();if(F&&H){let ae=W.predicate,ce=Y(l,F),K=Y(l,H),Z=[ae,Eo(ae)],V=d.filter(te=>Z.includes(te.predicate)&&ce.has(te.subject)&&K.has(te.object)).sort(p)[0];if(V)return{text:`${Gf(V.predicate)?"no":"yes"} \u2014 ${oe(V)}`,replace:!0,generalVerbQuery:!0};let ne=d.filter(te=>Z.includes(te.predicate)&&ce.has(te.subject));if(ne.length){let te=ne.slice(0,3).map(oe).join("; ");return{text:`I can't confirm that \u2014 nothing I remember says ${It({subject:F,predicate:ae,object:H})}. I do know: ${te}.`,replace:!0,miss:!0}}return null}}}let M=c.match(b_);if(M&&!nu.test(c)){let[,C,I]=M,[O,N]=I.toLowerCase().split(/\s+/);if(!tu.test(O)&&!ou.test(O)){let F=C.trim();if(F){let W=await su(O);N&&/^mgx:[a-z]+$/.test(W)&&(W=`${W}-${N}`);let H=Y(l,F),ae=[W,Eo(W)],ce=Qe(d.filter(K=>ae.includes(K.predicate)&&H.has(K.subject)),i);if(ce.length)return{...m(ce),generalVerbQuery:!0}}}}let A=c.match(/^(?:what|who)\s+([a-z]+)\s+(on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside)\s+(.+?)[?.!\s]*$/i);if(A&&!nu.test(c)){let[,C,I,O]=A,N=C.toLowerCase();if(!tu.test(N)&&!ou.test(N)&&!h_.test(N)){let F=await su(N);/^mgx:[a-z]+$/.test(F)&&(F=`${F}-${I.toLowerCase()}`);let W=Y(l,O.replace(/^(?:an?|the)\s+/i,"").trim()),H=Qe(d.filter(ae=>ae.predicate===F&&W.has(ae.object)),i);if(H.length)return{...m(H),generalVerbQuery:!0}}}let P=c.match(lR);if(P){let C=Y(l,P[1]),I=Qe(d.filter(ae=>C.has(ae.subject)||C.has(ae.object)),i);if(!I.length)return null;let O=C.has(I[0].subject)?I[0].subject:I[0].object,N=I.map(ae=>` ${oe(ae)}`),F=N.slice(0,je),W=N.slice(je),H=W.length?`
187
+ \u2026and ${W.length} more \u2014 say 'more' to see them.`:"";return{text:`${I.length} remembered fact${I.length===1?"":"s"} about ${O}:
188
+ ${F.join(`
189
+ `)}${H}`,replace:!0,...W.length?{pending:{items:W.map(ae=>ae.trim()),noun:"facts"}}:{}}}let G=n?.parsed?.shape==="meta"?n.parsed.object:null,J=!1,ee=c.match(uR);if(ee)G=ee[1],J=!0;else if(!G&&!n?.parsed){let C=c.match(/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i);C&&(G=C[1])}if(!G)return null;let ie=Y(l,G),D=Qe(f.filter(C=>ie.has(C.subject)),i),z=Qe(f.filter(C=>ie.has(C.object)),i),U=J?D.length?D:z:z.length?z:D;return U.length?m(U):null}function au(e){let t=e.sourceTypes||[];return t.length===0||t.some(n=>n!=="corpusWeak")}var hu,c_,cn,na,Yg,hb,GB,Xg,l_,VB,qB,gb,bb,wb,u_,Jg,HB,KB,YB,XB,JB,bu,QB,d_,Ke,Jl,Ql,Lr,p_,Ks,ZB,eU,tU,nU,sU,oU,rU,iU,aU,cU,lU,uU,dU,pU,fU,Qg,f_,ca,m_,mU,hU,yu,yb,gU,bU,wU,tu,nu,h_,yU,g_,b_,ou,w_,v_,vU,vb,$b,$_,$U,xU,kU,EU,Po,SU,jU,_U,xb,RU,AU,x_,TU,CU,OU,Ys,Zg,vu,It,E_,j_,__,oa,O_,jb,IU,uu,_b,I_,L_,aa,N_,M_,ms,Vn,P_,F_,D_,pu,sb,z_,je,B_,U_,W_,G_,V_,q_,ob,H_,K_,Y_,X_,J_,Q_,ib,Ab,eR,tR,sR,oR,rR,iR,lb,aR,lR,uR,dR,pR,ub,fR,mR,hR,gR,bR,db,Gn,pb,fb,mb,wR,vR,$R,LU,Ib,kR,NU,cu,mu,ER,MU,PU,Lb,FU,DU,zU,BU,UU,la,WU,GU,VU,qU,SR,HU,KU,ta=L(()=>{ze();Bh();Mt();Ie();os();Gi();Vi();qo();Cl();Gh();Je();Wc();Il();Hh();An();Jn();po();si();Rl();Al();Qo();Gs();Ha();Hi();Qh();Zh();Pl();eg();Fl();tg();ng();Qi();yl();Sg();Ag();Lo();Gg();oi(void 0);ni(Wi);hu=new Set(["it","this","that","here"]),c_=e=>hu.has(String(e||"").trim().toLowerCase()),cn={imports:"understand a dependency/import relationship",uses:"understand a dependency/usage relationship (imports and/or calls)",calls:"understand a call relationship",callsSymbol:"understand a call relationship",defines:"locate what a module/class defines",contains:"understand class membership (methods/attributes)",tests:"assess test coverage",inherits:"understand a class hierarchy/inheritance relationship",touches:"understand commit/change history",touchesSymbol:"understand commit/change history",cochange:"understand change-coupling between modules",reexports:"understand a module's public exports/API surface",serves:"understand which component provides or backs another",denotes:"understand which vocabulary term names a code entity"},na=e=>e?`${String(e).toLowerCase()}(s)`:"entities",Yg="look up a taught fact about a subject/verb/object";hb={find:{tool:"tmct_search",arg:"query",help:"lexical search across the graph"},search:{tool:"tmct_search",arg:"query",help:"alias of /find"},context:{tool:"tmct_context",arg:"symbol",help:"the sized edit bundle for a symbol (start here to change code)"},snippet:{tool:"tmct_snippet",arg:"symbol",help:"exact source of one function/class/method"},describe:{tool:"tmct_describe",arg:"symbol",help:"a symbol's definition, kind and relations"},signature:{tool:"tmct_signature",arg:"symbol",help:"a symbol's signature only"},members:{tool:"tmct_members",arg:"class",help:"the methods/attributes of a class"},subclasses:{tool:"tmct_subclasses",arg:"class",help:"the subclasses of a class"},impact:{tool:"tmct_impact",arg:"module",help:"what a change to this module or symbol reaches (impact closure)"},callers:{tool:"tmct_callers",arg:"symbol",help:"functions that call this symbol"},callees:{tool:"tmct_callees",arg:"symbol",help:"functions this symbol calls"},tests:{tool:"tmct_tests_for",arg:"symbol",help:"the tests covering this symbol"},untested:{tool:"tmct_untested",arg:null,help:"symbols with no covering test"},history:{tool:"tmct_history",arg:"symbol",help:"the commit history of this symbol"},exports:{tool:"tmct_exports",arg:"module",help:"a module's public exports"},arch:{tool:"tmct_architecture",arg:"package",help:"the architecture overview (optional package filter)",optional:!0}},GB=new Set(["stats","memory","focus",...Object.keys(hb)]),Xg={Class:["class","classes"],Function:["function","functions"],Module:["module","modules"],Package:["package","packages"],Method:["method","methods"],Attribute:["attribute","attributes"],GlobalVariable:["variable","variables"],Commit:["commit","commits"],Session:["session","sessions"]},l_=new Set(["have","has","holds","hold"]),VB=new RegExp(`\\b(?:${[...Object.keys(de),...Object.keys(Hn)].filter(e=>!l_.has(e)).sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})\\b`,"i"),qB=new Set([...zh.map(e=>e.name),...Object.values(hb).map(e=>e.tool)]),gb=new Set(["hi","hello","hey","yo","hiya","howdy","sup","greetings","g'day","gday","hey there","hi there","hello there","good morning","good afternoon","good evening","morning","alright","you alright","alright mate","morning all","yeah nah","hey y'all","howdy there","hiya there","good day","good day to you","salutations","good to meet you","pleased to meet you","yo yo","ayy","wassup","sup fam","heya","hiya!","gm","ge"]),bb=new Set(["thanks","thank you","thankyou","thx","ty","ta","cheers","nice one","much appreciated","cool thanks","many thanks","much obliged","ta very much","cheers mate","cheers for that","tks","sweet thanks","nice","brilliant","ta for that","cheers, that's everything for now, thanks","that's everything for now, thanks","that's all for now, thanks"]),wb=new Set(["bye","goodbye","quit","exit","see ya","see you","cya","later","farewell","peace","peace out","im off","i'm off","gtg","gotta go","catch you later","farewell then"]),u_=new Set(["ok","okay","cool","aight","fair enough","got it","gotcha","noted","sounds good","sure","cool cool","right","haha ok fair enough"]),Jg=e=>e.replace(/(.)\1+/g,"$1");HB=gu(gb),KB=gu(bb),YB=gu(wb),XB=new RegExp(`^(?:${[...u_].map(Xe).join("|")})\\s+(.+)$`,"i"),JB=[...gb,...bb,...wb,"what can you do","what do you do","help","how do you work","who are you","what are you","what is your name"],bu="(?:[a-z]+er|better|worse|(?:more|less)\\s+[a-z]+)",QB=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are)\\s+(${bu})\\s+than\\s+(.+)$`,"i"),d_=new RegExp(`^(?:is|are)\\s+(.+?)\\s+(${bu})\\s+than\\s+(.+?)[?.!\\s]*$`,"i"),Ke="on|in|at|onto|upon|under|over|beside|near|behind|above|below|inside|outside",Jl="mgx:ownedBy",Ql="mgx:hasProperty",Lr="rdfs:subClassOf",p_=new Set(["operator","teach","entailed"]),Ks=e=>!!e.sourceTypes?.some(t=>p_.has(t));ZB=new RegExp(`^you\\s+(?:can|may)\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),eU=new RegExp(`^an?\\s+([a-z][\\w-]*)\\s+(?:can|may)\\s+be\\s+([a-z]+)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)[.!?]*$`,"i"),tU=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*nothing\\s+may\\s+([a-z]+)\\s+(${Ke})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),nU=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+must\\s+be\\s+(${bu})\\s+than\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),sU=new RegExp(`^([a-z]+ing)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)\\s+makes\\s+(?:it|the\\s+([a-z][\\w-]*))\\s+([a-z]+)\\s+(${Ke})\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),oU=new RegExp(`^to\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)\\s*,?\\s*the\\s+([a-z][\\w-]*)\\s+may\\s+not\\s+be\\s+with\\s+the\\s+([a-z][\\w-]*)\\s+without\\s+the\\s+([a-z][\\w-]*)[.!?]*$`,"i"),rU=new RegExp(`^the\\s+goal\\s+is\\s+that\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ke})\\s+([\\w-]+)[.!?]*$`,"i"),iU=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+to\\s+([a-z]+)\\s+(${Ke})\\s+([\\w-]+)[.!?]*$`,"i"),aU=new RegExp(`^(?:the\\s+goal\\s+is\\s+for|i\\s+want)\\s+(?:(every|each|all)\\s+)?([\\w-]+)\\s+(${Ke})\\s+([\\w-]+)[.!?]*$`,"i"),cU=new RegExp(`^(?:can|could)\\s+you\\s+([a-z]+)\\s+an?\\s+([a-z][\\w-]*)\\s+(${Ke})\\s+an?\\s+([a-z][\\w-]*)[?.!]*$`,"i"),lU=new RegExp(`^(?:get|put|place|stack)\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ke})\\s+([\\w-]+)[?.!]*$`,"i"),uU=new RegExp(`^the\\s+goal\\s+is\\s+(?:(every|each|all|both)\\s+)?(?:the\\s+)?([\\w-]+?)\\s+(${Ke})\\s+([\\w-]+)[?.!]*$`,"i"),dU=new RegExp(`^(?:(every|each|all)\\s+)?([\\w-]+)\\s+([a-z]+s)\\s+(${Ke})\\s+([\\w-]+)$`,"i"),pU=new RegExp(`^(?:what|who)\\s+([a-z']+)\\s+(${Ke})\\s+(.+?)[?.!\\s]*$`,"i"),fU=new RegExp(`^what\\s+(?:does|do|is)\\s+([\\w-]+)\\s+([a-z]+)(?:\\s+(${Ke}))?[?.!\\s]*$`,"i"),Qg=/^(?:anywhere|everywhere|nowhere|somewhere)$/i,f_=new Set(["bus","gas","plus","minus","surplus","lens","bias","atlas","canvas","virus","bonus","campus","census","chorus","circus","focus","status","iris","genius","sinus","walrus","cactus","fungus","radius","nucleus","alias","crocus","abacus","syllabus","octopus","platypus"]);ca="(?:(?:usually|often|sometimes|rarely|always|typically|generally|occasionally|frequently|normally|regularly|commonly|mostly|currently|still|also|really|actually|closely|strongly|directly)\\s+)?",m_="(?:cannot|can't|can not|does not|doesn't|do not|don't|never)",mU=new RegExp(`^(.+?)\\s+(${m_})\\s+(.+)$`,"i"),hU=new RegExp(`^([\\w'-]+)\\s+${ca}([a-z]+)\\s+(.+?)[.!?]*$`,"i"),yu="connected|related|associated|linked|based|derived|composed|made|used|known|located|found|involved|concerned",yb="with|to|from|by|of|in|on|for|as|about|into",gU=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(?:is|are|was|were)\\s+${ca}(${yu})\\s+(${yb})\\s+(.+)$`,"i"),bU=new RegExp(`^(?:the\\s+|an?\\s+)?([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+(is|are|was|were)\\s+(?:an?\\s+)?([\\w'-]+)\\s+(${yu})\\s+(${yb})\\s+(.+)$`,"i"),wU=new RegExp(`^(?:the\\s+|an?\\s+)([\\w'-]+(?:\\s+[\\w'-]+)?)\\s+([a-z]+)\\s+(${Ke})\\s+(.+?)[.!?]*$`,"i"),tu=/^(?:is|are|am|owns|maintains)$/i,nu=/\b(?:is|are|am|owns|maintains)\b/i,h_=new RegExp("^(?:i|me|you|he|him|she|her|it|we|us|they|them|my|your|his|its|our|their|mine|yours|hers|ours|theirs|this|that|these|those|a|an|the|every|each|all|some|any|no|both|either|neither|in|on|at|to|from|by|with|for|of|about|into|onto|over|under|near|before|after|during|through|up|down|off|out|above|below|between|among|against|without|within|along|across|behind|beyond|upon|toward|towards|per|and|but|or|if|because|although|though|while|when|since|unless|until|whether|so|nor|than|as|what|who|whom|whose|which|where|why|how)$","i"),yU=new RegExp(`^(?:${xs.filter(e=>!/\s/.test(e)).join("|")})$`,"i");g_=new RegExp(`^(?:does|did)\\s+([\\w'-]+)\\s+${ca}([a-z]+)\\s+(.+?)[?.!\\s]*$`,"i"),b_=new RegExp(`^what\\s+(?:does|did)\\s+([\\w'-]+)\\s+${ca}([a-z]+(?:\\s+(?:${Ke}))?)[?.!\\s]*$`,"i"),ou=/^(?:be|own|maintain)$/i,w_=new RegExp(`^(${Ke})\\s+(.+)$`,"i");v_=["first","second","third","then","next","finally","later","meanwhile","afterward","afterwards"],vU=new RegExp(`^(?:${v_.join("|")})\\b\\s*,?\\s+`,"i"),vb=Object.freeze(["you","i","it","they","he","she","we"]),$b=Object.freeze(["you're","i'm","it's","they're","he's","she's","we're"]),$_=Object.freeze([...$b,...vb]),$U=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(${$_.join("|")})\\s+\\S+`,"i"),xU=new RegExp(`^(?:every\\s+|each\\s+|all\\s+|some\\s+|a few\\s+|a\\s+|an\\s+)?(?:(${vb.join("|")})\\s+(?:is|are|am|was|were)|(${$b.join("|")}))\\s+(?:an?\\s+)?[\\w'-]+[.!?]*$`,"i"),kU=new RegExp(`^([\\w-]+)\\s+([a-z]+)s\\s+(${Ke})\\s+([\\w-]+)$`,"i"),EU=new RegExp(`^forget\\s+(?:that\\s+)?([\\w-]+)\\s+([a-z]+)s\\s+(${Ke})\\s+([\\w-]+)$`,"i"),Po="(?:\\s+(?:exactly|really|actually|truly|anyway|internally|properly))?",SU=new RegExp(`^what\\s+does\\s+(.+?)${Po}\\s+do${Po}\\??$`,"i"),jU=new RegExp(`^what\\s+(.+?)${Po}\\s+does${Po}\\??$`,"i"),_U=new RegExp(`^what(?:'s|s|\\s+is)\\s+(.+?)${Po}\\s+do${Po}\\??$`,"i"),xb="([A-Za-z][\\w'.-]*(?:\\s+[A-Za-z][\\w'.-]*){0,3})",RU=new RegExp(`^who\\s+(?:is|was)\\s+${xb}$`,"i"),AU=new RegExp(`^what\\s+(?:did|has)\\s+${xb}\\s+(?:touch(?:ed)?|chang(?:e|ed)|work(?:ed)?\\s+on|commit(?:ted)?)$`,"i"),x_="(?:good|bad|clean|messy|ugly|nice|great|terrible|awful|solid|elegant|readable|maintainable|well[- ]written|well[- ]structured|spaghetti|ok|okay|decent|healthy)",TU=new RegExp(`^is\\s+(?:this|the)\\s+code(?:base)?\\s+(?:any\\s+)?${x_}\\b`,"i"),CU=new RegExp("^(?:what\\s+time\\s+is\\s+it(?:\\s+(?:now|right\\s+now))?|what(?:'s|s|\\s+is)\\s+the\\s+time(?:\\s+(?:now|right\\s+now))?|what\\s+day\\s+is\\s+it(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+(?:the\\s+)?(?:day|date)(?:\\s+today)?|what(?:'s|s|\\s+is)\\s+today'?s\\s+date|what(?:'s|s|\\s+is)\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?|how'?s\\s+the\\s+weather(?:\\s+like)?(?:\\s+(?:today|outside))?)\\??$","i");OU=new Set([...Object.keys(de).flatMap(e=>e.split(/[\s-]+/)),...Zt,...un,"owns","maintains"].filter(e=>e.length>=3)),Ys={"rdfs:subClassOf":"is a kind of","mgxneg:subClassOf":"is not a kind of","rdf:type":"is a","owl:disjointWith":"is not a","mgx:partOf":"is part of","mgx:hasA":"has","mgx:usedFor":"is used for","mgx:capableOf":"can","mgx:atLocation":"is found in","mgx:causes":"causes","mgx:hasProperty":"is","mgx:madeOf":"is made of","mgx:receivesAction":"can be","mgx:createdBy":"is created by","mgx:mannerOf":"is a way to","mgx:desires":"wants","mgx:locatedNear":"is typically near","mgx:motivatedByGoal":"is motivated by","mgx:obstructedBy":"can be prevented by","mgx:causesDesire":"makes you want to","mgx:hasSubevent":"involves","mgx:hasFirstSubevent":"begins with","mgx:hasLastSubevent":"ends with","mgx:hasPrerequisite":"requires","mgx:ownedBy":"is owned by","mgx:rendersAs":"renders as","mgx:synonym":"means the same as","mgx:antonym":"is the opposite of","mgx:similarTo":"is similar to","mgx:relatedTo":"is related to","mgx:symbolOf":"is a symbol of","mgx:currently-in":"is in","mgx:located-in":"is in","mgx:fixed-in":"is fixed in","mgx:stands-locked-in":"stands locked in","mgx:works-in":"works in"},Zg=new Set(["mgx:hidden-in","mgx:is-objective","mgx:unlocks-with","mgx:is-npc","mgx:acts-on-turn","mgx:acts-toward","mgx:is-container","mgx:is-open"]),vu=new Set(["mgx:currently-in","mgx:located-in","mgx:fixed-in","mgx:stands-locked-in","mgx:works-in"]);It=e=>`${e.subject} ${Eb(e.predicate)} ${e.object}`;E_=Object.entries(Ys).filter(([e])=>!vu.has(e)).map(([e,t])=>{let n=/^(?:is|are)\s+(.+)$/i.exec(t);return n?{predicate:e,marker:n[1].trim().toLowerCase()}:null}).filter(e=>e&&e.marker.length>1).sort((e,t)=>t.marker.length-e.marker.length);j_=/ \(source: [^)]*\)$/;__=8;oa=null;O_=/^(?:every|each|all|any)\s+/i;jb=new Set(["module","modules","class","classes","function","functions","method","methods","handler","handlers","controller","controllers","service","services","component","components","flow","flows","thing","things","item","items","object","objects","commit","commits"]),IU=new Set([["interpreter","compiler"],["string","thread"],["heart","kernel"],["battalion","heap"],["bash","sock"],["command","skill"],["docker","longshoreman"],["name","list"],["list","number"]].map(([e,t])=>[e,t].sort().join("|"))),uu=/^(?:is|are|was|were)\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,_b=/^(?:who|what)\s+(?:is|are)\s+(?:the|an?)\s+([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,I_=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]+(?:\s+[A-Z][\w-]*)?)'s\s+([a-z][\w-]*)[?.!\s]*$/i,L_=/^(who|what)'?s\s+/i,aa=e=>String(e).replace(L_,(t,n)=>`${n} is `),N_=/^(?:who|what)\s+(?:is|are|was|were)\s+([\w-]{2,}?)s\s+([a-z][\w-]*)[?.!\s]*$/i;M_=/^list\s+(?:the\s+|all\s+)?([a-z][\w-]*)\s+of\s+([\w'-]+(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,ms=/^(?:is|are)\s+(?:an?\s+)?(.+?)\s+(?:a\s+kind\s+of|a\s+type\s+of|an?)\s+(.+?)[?.!\s]*$/i,Vn=new Set(["rdfs:subClassOf","rdf:type"]),P_=6,F_=/^why\s+(?=(?:is|are)\b)/i,D_=/^explain\s+how\s+you\s+know\s+(?:that\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i;pu=new Set(["kind","sort","type","subclass","superclass"]),sb=/^(?:so\s+)?(.+?)\s+(?:is|are)\s+(?:an?\s+)?(.+?)\s*,?\s*(?:now\s+)?(?:right|correct|yeah)\??$/i,z_=/^(?:what\s+do\s+you\s+know\s+about|what(?:'s|s|\s+is)\s+in\s+your\s+memory\s+about|what\s+do\s+you\s+remember\s+about)\s+(.+?)[?.!\s]*$/i,je=32,B_=/^(?:can|could)\s+(all\s+|every\s+)?(?:an?\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z]+)[?.!\s]*$/i,U_=/^(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+have\s+(?:an?\s+|the\s+)?(.+?)[?.!\s]*$/i,W_=/^what\s+can\s+(?:an?\s+)?(.+?)\s+do[?.!\s]*$/i,G_=/^what\s+has\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,V_=/^what\s+(?:(?:can\s+be|is)\s+used\s+for|is\s+for)\s+(.+?)[?.!\s]*$/i,q_=/^where(?:'s|\s+is|\s+are)\s+(.+?)(?:\s+now)?\s*[?.!]*$/i,ob=/^mgx:[a-z]+-(?:on|in|at|inside|under|below|above|near|beside|behind|by)$/,H_=new RegExp(`^what(?:'s|\\s+is|\\s+are)\\s+(${Ke})\\s+(.+?)\\s*[?.!]*$`,"i"),K_=/^what\s+([a-z][\w-]*)\s+(?:does|do)\s+(?:an?\s+|the\s+)?(.+?)\s+([a-z][a-z-]*)\s*[?.!]*$/i,Y_=/^(?:do|does)\s+(all\s+|every\s+)?(?:an?\s+|the\s+)?([\w'-]+(?:\s+[\w'-]+)*?)\s+([a-z-]+)[?.!\s]*$/i,X_=/^what\s+can\s+(?!be\s)(.+?)[?.!\s]*$/i,J_=/^what\s+(?:cannot|can't|cant|can\s+not)\s+(.+?)[?.!\s]*$/i,Q_=/^(?:which|what)\s+([\w'-]+(?:\s+[\w'-]+)*?)\s+can\s+(.+?)[?.!\s]*$/i;ib=e=>String(e||"").replace(/\s+/g," ").trim();Ab="(?:most|least)\\s+[a-z][\\w-]*|[a-z][\\w-]*est|best|worst",eR=new RegExp(`^which\\s+([\\w'-]+)\\s+(?:is|are)\\s+(?:the\\s+)?(${Ab})[?.!\\s]*$`,"i"),tR=new RegExp(`^what(?:'s|s|\\s+is)\\s+the\\s+(${Ab})\\s+([\\w'-]+)[?.!\\s]*$`,"i");sR=new Set(["rdfs:subClassOf","rdf:type","mgx:hasA","mgx:capableOf","mgx:usedFor","mgx:ownedBy","owl:disjointWith","mgx:hasProperty","mgx:receivesAction"]),oR=Object.entries(Ys).filter(([e])=>!sR.has(e)&&!vu.has(e)).map(([e,t])=>({predicate:e,re:new RegExp(`^what\\s+${Xe(t)}\\s+(.+?)[?.!\\s]*$`,"i")})).sort((e,t)=>t.re.source.length-e.re.source.length),rR=new Set(["rdfs:subClassOf","rdf:type","owl:disjointWith","mgx:hasProperty","mgx:hasA","mgx:capableOf","mgx:ownedBy"]),iR=Object.entries(Ys).filter(([e])=>!rR.has(e)&&!vu.has(e)).map(([e,t])=>{let n;if(t==="can be")n=new RegExp("^can\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+be\\s+(.+?)[?.!\\s]*$","i");else if(t.startsWith("is ")){let s=Xe(t.slice(3));n=new RegExp(`^(?:is|are)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${s}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}else{let[s,...o]=t.split(" "),r=[kb(s),...o].map(Xe).join("\\s+");n=new RegExp(`^(?:does|do)\\s+(?:an?\\s+|the\\s+)?(.+?)\\s+${r}\\s+(?:an?\\s+|the\\s+)?(.+?)[?.!\\s]*$`,"i")}return{predicate:e,phrase:t,re:n}}).sort((e,t)=>t.re.source.length-e.re.source.length),lb=/^what\s+(?:inherits?\s+(?:from\s+)?(?:an?\s+)?|is\s+(?:an?\s+)?(?:kind|sort|type)\s+of\s+|is\s+(?:an?\s+)?subclass\s+of\s+)(.+?)[?.!\s]*$/i,aR=new Set(["changed","change","changes","updated","modified","happened","occurred"]);lR=/^what\s+(?:did|have)\s+(?:i|we|you)\s+(?:told|tell|said|say)\s+(?:you|me|us)?\s*about\s+(.+?)[?.!\s]*$/i,uR=/^what\s+kind\s+of\s+(?:thing|class|type|category|entity)?\s*(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,dR=/^does\s+every\s+(.+?)\s+have\s+at\s+least\s+(\d+)\s+(.+?)[?.!\s]*$/i,pR=/^does\s+an?\s+(.+?)\s+have\s+an?\s+(.+?)[?.!\s]*$/i,ub=new Set(["owl:cardinality","owl:minCardinality","owl:maxCardinality","owl:onClass"]),fR=/^who\s+(?:owns|maintains)\s+(.+?)[?.!\s]*$/i,mR=/^(?:does|did)\s+([\w'-]+)\s+(?:owns?|maintains?)\s+(.+?)[?.!\s]*$/i,hR=/^(?:is|are|was|were)\s+(.+?)\s+owned\s+by\s+([A-Za-z][\w'-]*(?:\s+[A-Z][\w'-]*)?)[?.!\s]*$/i,gR=/^(?:does|did)\s+([\w'-]+)\s+(?:has|have)\s+an?\s+([a-z][\w-]*)\s+method[?.!\s]*$/i,bR=/^what\s+methods\s+does\s+([\w'-]+)\s+have[?.!\s]*$/i,db=/^(?:is|are|was|were)\s+(.+?)\s+([A-Za-z][\w-]*)[?.!\s]*$/i,Gn=/^(?:it|this|that)$/i,pb=/^(?:it|this|that)(?:\s+one)?\s+(?:before|after)\b/i,fb=/^(?:you|i|they|he|she|we)\b/i,mb=(e,t)=>({text:`I don't know anything about "${e}" yet \u2014 teach me directly, e.g. "remember that ${ia(e)} is ${t}".`,replace:!0}),wR=/^(?:what\s+(?:did|have)\s+(?:i|we)\s+(?:told?|tell|said?|say)\s+(?:you|me|us)?(?:\s+(?:last\s+time|before|earlier|previously|already))?|what\s+facts?\s+do\s+you\s+(?:know|have|remember)|what\s+do\s+you\s+(?:know|remember)|what\s+have\s+you\s+(?:learned|learnt|remembered))[?.!\s]*$/i;vR=/inherit|supertype|subclass|extend|specializ/i,$R=8;LU=new RegExp(`\\b(?:${[...hu].join("|")})\\b`,"i"),Ib=/^what\s+(?:is|are)\s+(?:an?\s+)?(.+?)[?.!\s]*$/i,kR=/^who\s+(?:is|are|was|were)\s+(?:an?\s+|the\s+)?([\w'-]+)[?.!\s]*$/i;NU=new RegExp(`^(?:(?:the|a|an)\\s+)?(.+?)\\s+(${Object.keys(Ue).join("|")})$`,"i"),cu="(?:(?:can|could|would)\\s+you\\s+(?:please\\s+)?)?(?:(?:show|give)\\s+(?:me|us)\\s+|describe\\s+|explain\\s+|what(?:'s|s|\\s+is)\\s+)?",mu="(?:of|for)\\s+(?:this|the)\\s+(?:app|codebase|repo|repository|project|code)",ER=`(?:\\s+${mu})?`,MU=[new RegExp(`^${cu}the\\s+architecture(?:\\s+(?:overview|map|diagram))?${ER}(?:\\s+here)?\\??$`,"i"),new RegExp(`^${cu}architecture\\s+(?:${mu}|overview|map|diagram)\\??$`,"i"),new RegExp(`^${cu}(?:(?:an?|the)\\s+)?(?:overview|map|diagram)\\s+${mu}(?:\\s+here)?\\??$`,"i")],PU={find:"locate a specific named entity",search:"locate a specific named entity",context:"gather the sized edit bundle for a symbol before changing code",snippet:"view a symbol's exact source",describe:"look up a symbol's definition and relations",signature:"view a symbol's signature",members:cn.contains,subclasses:cn.inherits,impact:"understand what a change to this module would reach (impact closure)",callers:cn.calls,callees:cn.calls,tests:cn.tests,untested:cn.tests,history:cn.touches,exports:cn.reexports,arch:"understand the overall architecture (package/module boundaries)",capabilities:"see what /plan can plan over \u2014 built-in query tools and taught actions",syllogise:"materialize the entailed facts that follow from what's remembered about one term",wiki:"toggle the live Wikipedia supplement for questions nothing local can answer",export:"write the memory store to a file, in the standard JSONL shape",ingest:"read a local text file and store every fact the recognizer grounds from it"},Lb="(?:changed?|modif(?:y|ied)|edits?|edited|touch(?:es|ed)?|updates?|updated|alters?|altered|deletes?|deleted|removes?|removed|drops?|dropped)",FU=new RegExp(`^what\\s+(?:would|will|might|could|does|do)?\\s*(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|is\\s+impacted|be\\s+impacted)\\s+if\\s+(?:i|we|you|one|someone)\\s+${Lb}\\s+(?:the\\s+)?(.+?)[?.!\\s]*$`,"i"),DU=new RegExp(`^if\\s+(?:i|we|you|one|someone)\\s+${Lb}\\s+(?:the\\s+)?(.+?),?\\s+what\\s+(?:would\\s+|will\\s+|might\\s+|could\\s+|does\\s+|do\\s+)?(?:breaks?|fails?|happens?|stops?\\s+working|is\\s+affected|are\\s+affected|gets?\\s+affected|be\\s+affected|would\\s+break|will\\s+break)[?.!\\s]*$`,"i"),zU=new RegExp("^what\\s+(?:is|are|gets?|would\\s+be|will\\s+be)\\s+(?:affected|impacted|broken)\\s+(?:by|when|if)\\s+(?:i\\s+|we\\s+|you\\s+)?(?:chang(?:e|es|ing)|edit(?:s|ing)?|modif(?:y|ies|ying)|touch(?:es|ing)?|updat(?:e|es|ing)|delet(?:e|es|ing)|remov(?:e|es|ing)|a\\s+change\\s+to)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),BU=new RegExp("^(?:(?:can|could)\\s+(?:i|we|you|one|someone)\\s+safely|is\\s+it\\s+safe\\s+to)\\s+(?:change|edit|modify|touch|update|alter|delete|remove|drop)\\s+(?:the\\s+)?(.+?)[?.!\\s]*$","i"),UU=new RegExp("^(?:what(?:'s|\\s+is)\\s+the\\s+)?(?:blast\\s+radius|impact)\\s+(?:of|for)\\s+(?:chang(?:ing|es)\\s+|editing\\s+|modifying\\s+|touching\\s+|updating\\s+|deleting\\s+|removing\\s+)?(?:the\\s+)?(.+?)[?.!\\s]*$","i"),la="as\\s+(?:its|the|an?)?\\s*(?:base\\s+class|parent\\s+class|base|parent)",WU=new RegExp(`^(.+?)\\s+uses?\\s+(?:which\\s+[\\w'-]+|what)\\s+${la}\\s*\\??$`,"i"),GU=new RegExp(`^what\\s+(?:does|do|did)\\s+(.+?)\\s+uses?\\s+${la}\\s*\\??$`,"i"),VU=new RegExp(`^(?:does|do|did)\\s+(.+?)\\s+uses?\\s+(.+?)\\s+${la}\\s*\\??$`,"i"),qU=new RegExp(`^(.+?)\\s+uses?\\s+(.+?)\\s+${la}\\s*[.!]*$`,"i"),SR=Object.freeze([...hu].filter(e=>e!=="here").concat("they")),HU=new RegExp(`^((?:is|are|can|could|does|do)\\s+|what\\s+(?:is|are)\\s+)(${SR.join("|")})\\b(\\s+\\S.*)?$`,"i"),KU=Q(".tmct","memory","corpus-seed.json")});ta();Je();Ss();Qi();var ua={uninformativeClassMaxShare:.35,uninformativeClassMinSubjects:12,entailedDepthPenalty:.2,minoritySensePenalty:.5,minScore:.05,groupSplitThreshold:4,openerConceptCount:2,maxObjectsPerBodySentence:4,maxBodySentences:4,closerRootCount:2,budget:{chatReply:5,researchPanel:10,cliDigest:12,ledgerTerm:8}};var Pb=Object.freeze({"rdfs:subClassOf":"isa","rdf:type":"isa","mgx:atLocation":"location","mgx:locatedNear":"location","mgx:partOf":"partOf","mgx:capableOf":"capableOf","mgx:usedFor":"usedFor"}),Xs=Object.freeze(["isa","location","partOf","capableOf","usedFor","other"]),da=e=>Pb[e]||"other",_R=e=>Math.max(0,Math.min(1,e));function Nb(e){let t=(e.sourceTypes||[]).map(n=>Ko[n]??0);return t.length?Math.max(...t):typeof e.trust=="number"&&e.trust>0?e.trust:Ko.entailed}function RR(e){return Array.isArray(e.environments)&&e.environments.length?!0:(e.sourceTypes||[]).includes("entailed")}function Mb(e,t){let n=Number(t?.totalSubjects)||0;return n<=0?0:(Number(t?.classSubjectCounts?.[e])||0)/n}function Fb(e,t,n={},s={}){let o={...ua,...s.config||{}},r=Number.isInteger(s.budget)?s.budget:o.budget.chatReply,i=(t||[]).filter(v=>v&&v.object&&v.object!==e),a=[],l=(Number(n?.totalSubjects)||0)>=o.uninformativeClassMinSubjects,c=[];for(let v of i){if(da(v.predicate)==="isa"){let E=Mb(v.object,n);if(l&&E>o.uninformativeClassMaxShare){a.push({row:v,family:"isa",reason:"uninformative-class",share:E});continue}}c.push(v)}let u=c.filter(v=>da(v.predicate)==="isa").map(v=>v.object),d=Ji(u,{subClassEdges:n.subClassEdges||[],disjointEdges:n.disjointEdges||[]}),f=new Map,p=new Map;for(let v of d.clusters){let E=0;for(let k of v.objects){p.set(k,v.label);let _=c.find(R=>R.object===k&&da(R.predicate)==="isa");E+=_?Nb(_):0}f.set(v.label,E)}let m=null,h=-1;for(let[v,E]of[...f].sort((k,_)=>k[0].localeCompare(_[0])))E>h&&(h=E,m=v);let g=[];for(let v of c){let E=da(v.predicate),k=Nb(v),_={provenance:k};if(RR(v)&&(k-=o.entailedDepthPenalty,_.entailed=!0),E==="isa"){let x=.6+.4*(1-Mb(v.object,n));k*=x,_.informativeness=x;let T=p.get(v.object);m&&T&&T!==m&&(k-=o.minoritySensePenalty,_.minoritySense=T)}k=_R(k),g.push({row:v,family:E,score:k,reasons:_})}let b=[];for(let v of g)v.score<o.minScore?a.push({row:v.row,family:v.family,reason:"below-floor",score:v.score}):b.push(v);let y=new Map;for(let v of b)y.has(v.family)||y.set(v.family,[]),y.get(v.family).push(v);for(let v of y.values())v.sort((E,k)=>k.score-E.score||E.row.object.localeCompare(k.row.object));let w=Xs.filter(v=>y.has(v)).concat([...y.keys()].filter(v=>!Xs.includes(v)).sort()),$=[],j=!1;for(;$.length<r&&!j;){j=!0;for(let v of w){let E=y.get(v);if(E&&E.length&&($.push(E.shift()),j=!1,$.length>=r))break}}for(let v of w)for(let E of y.get(v)||[])a.push({row:E.row,family:E.family,reason:"over-budget",score:E.score});return $.sort((v,E)=>{let k=Xs.indexOf(v.family),_=Xs.indexOf(E.family);return k-_||E.score-v.score||v.row.object.localeCompare(E.row.object)}),{term:e,selected:$,cut:a,senses:{split:d.split,clusters:d.clusters,dominantLabel:m}}}ai();Yt();var AR=new Set(["isa","location","partOf","capableOf","usedFor"]),TR=new Set(["single","several","chained","group","closer"]),Db=(e,t)=>`${e}:${t}`;function $u(e){let t=new Map;for(let n of e||[]){if(!n||typeof n.family!="string"||!AR.has(n.family)||typeof n.form!="string"||!TR.has(n.form)||typeof n.template!="string"||!n.template.trim())continue;let s=Db(n.family,n.form);t.has(s)||t.set(s,{family:n.family,form:n.form,templates:[]});let o=t.get(s);o.templates.includes(n.template)||o.templates.push(n.template)}return t}var Js=e=>`${fo(e)} ${e}`;function CR(e){let t=(e||[]).map(o=>String(o||"").trim()).filter(Boolean);if(!t.length)return"";let n=Js(t[0]),s=t.slice(1);return s.length?`${n}, and so ${tr(s.map(Js))}`:n}function OR(e,t,n,s){let o=String(e||"").trim(),r=(t||[]).map(l=>String(l||"").trim()).filter(Boolean),i=r[0]||"",a=String(s||"").trim();return{TERM:o,TERM_CAP:mo(o),A_TERM:Js(o),A_TERM_CAP:mo(Js(o)),TERMS:ii(o),TERMS_CAP:mo(ii(o)),PRONOUN:"it",PRONOUN_CAP:"It",PARENT:a,A_PARENT:a?Js(a):"",OBJECT:i,A_OBJECT:i?Js(i):"",OBJECTS_A:tr(r.map(Js)),OBJECTS_PLURAL:tr(r.map(ii)),OBJECTS_RAW:tr(r),CHAIN:CR(n&&n.length?n:r.slice(0,1))}}function IR(e,t){return String(e).replace(/\{([A-Z_]+)\}/g,(n,s)=>s in t?t[s]:"").replace(/\s+/g," ").replace(/\s+([.,;])/g,"$1").trim()}function qn(e,t,n,s={}){let o=(n||[]).filter(Boolean);if(!o.length)return null;let r=s.term??o[0].subject??"",i=s.form||(o.length>1?"several":"single"),a=e instanceof Map?e.get(Db(t,i)):null,l=a?a.templates:null;if(!l||!l.length)return null;let c=s.variantSeed??"",u=wi(`${r}|${t}|${i}|${c}`)%l.length,d=s.objectsOverride||o.map(p=>p.object),f=IR(l[u],OR(r,d,s.chain,s.parent));return f?{text:f,rows:o,family:t,form:i}:null}ai();var LR=Xs.filter(e=>e!=="isa"&&e!=="other");function NR(e){let t=new Map;for(let n of e||[])t.has(n.family)||t.set(n.family,[]),t.get(n.family).push(n.row);return t}function zb(e,t){let n=Math.max(1,Math.trunc(t)||1),s=[];for(let o=0;o<(e||[]).length;o+=n)s.push(e.slice(o,o+n));return s}function MR(e,t){let n=l=>(t?.[l.object]||[])[1]||null,s=new Map;for(let l of e||[]){let c=n(l);c&&s.set(c,(s.get(c)||0)+1)}let o=new Map,r=[],i=[];for(let l of e||[]){let c=n(l);c&&s.get(c)>=2?(o.has(c)||(o.set(c,[]),r.push(c)),o.get(c).push(l)):i.push(l)}let a=r.map(l=>({parent:l,rows:o.get(l)}));return i.length&&a.push({parent:null,rows:i}),a}function PR(e,t,n){let s=new Map,o=new Map;for(let l of t||[]){let c=e?.[l.object];if(!Array.isArray(c)||c.length<2)continue;let u=c[c.length-1];!u||u===l.object||(s.set(u,(s.get(u)||0)+1),o.has(u)||o.set(u,[]),o.get(u).push(l))}let r=[...s.keys()].sort((l,c)=>s.get(c)-s.get(l)||l.localeCompare(c)).slice(0,Math.max(0,n)),i=[],a=new Set;for(let l of r)for(let c of o.get(l)||[])a.has(c.id)||(a.add(c.id),i.push(c));return{roots:r,rows:i}}function FR(e,t,n,s,o){let r=[];if(!e.length)return r;if(e.length===1){let f=t[e[0].object],p=f&&f.length>1?"chained":"single",m=qn(s,"isa",e,{term:n,form:p,chain:f});return m&&r.push({...m,role:"names-term",paragraph:"definition"}),r}if(e.length<=o.groupSplitThreshold){let f=qn(s,"isa",e,{term:n,form:"several"});return f&&r.push({...f,role:"names-term",paragraph:"definition"}),r}let i=e.slice(0,o.openerConceptCount),a=e.slice(o.openerConceptCount),l=qn(s,"isa",i,{term:n,form:i.length>1?"several":"single",variantSeed:n});l&&r.push({...l,role:"names-term",paragraph:"definition"});let c=[];for(let f of MR(a,t))for(let p of zb(f.rows,o.maxObjectsPerBodySentence))c.push({parent:f.parent,rows:p});if(c.length>o.maxBodySentences){let f=c.slice(0,o.maxBodySentences),p=f[f.length-1];for(let m of c.slice(o.maxBodySentences))p.rows=p.rows.concat(m.rows);p.parent=null,c=f}for(let f of c){let p=f.parent?qn(s,"isa",f.rows,{term:n,form:"group",parent:f.parent,variantSeed:f.parent}):qn(s,"isa",f.rows,{term:n,form:"several",variantSeed:n});p&&r.push({...p,role:"describes-isa",paragraph:"definition"})}let{roots:u,rows:d}=PR(t,e,o.closerRootCount);if(u.length){let f=qn(s,"isa",d.length?d:e,{term:n,form:"closer",objectsOverride:u,variantSeed:n});f&&r.push({...f,role:"closes-isa",paragraph:"definition"})}return r}function DR(e,t){if(!e.length)return;let n=e[0];if(/\bnames-term\b/.test(n.role))return;let s=mo(`${fo(t)} ${t}`);n.text=n.text.replace(/^It\b/,s),n.role="names-term"}function zR(e,t){let n=[],s=null,o=null;for(let r of e)(!s||r.paragraph!==o||s.length>=t)&&(s=[],o=r.paragraph,n.push(s)),s.push(r);return n.map(r=>({sentences:r,text:r.map(i=>i.text).join(" ")}))}function Bb(e,t,n={}){let s=e?.term||"",o=Number.isInteger(n.maxSentencesPerParagraph)?n.maxSentencesPerParagraph:3,r=n.chains||{},i={...ua,...n.config||{}},a=NR(e?.selected||[]),l=[];for(let u of FR(a.get("isa")||[],r,s,t,i))l.push(u);for(let u of LR){let d=a.get(u);if(!(!d||!d.length))for(let f of zb(d,i.maxObjectsPerBodySentence)){let p=qn(t,u,f,{term:s});p&&l.push({...p,role:"describes",paragraph:"description"})}}DR(l,s);let c=new Map;for(let u of l)for(let d of u.rows)c.has(d.id)||c.set(d.id,d);return{term:s,sentences:l,paragraphs:zR(l,o),provenanceRows:[...c.values()]}}var BR=e=>({subject:e.subject,predicate:e.predicate,object:e.object,sourceTypes:e.sourceTypes||[],provenance:e.provenance||""});function UR(e){let t=new Set,n=[];for(let s of e||[]){let o=s.provenance||(s.sourceTypes||[]).join(",");!o||t.has(o)||(t.add(o),n.push({provenance:s.provenance||"",sourceTypes:s.sourceTypes||[]}))}return n}var WR=Object.freeze({facts:"show the facts",chains:"show the chains"});function GR(e,t){let n=[...(e?.selected||[]).map(o=>o.row),...(e?.cut||[]).map(o=>o.row)].filter(Boolean),s=Object.entries(t||{}).filter(([,o])=>Array.isArray(o)&&o.length>1).map(([o,r])=>({object:o,chain:r}));return{escapes:WR,facts:n.map(BR),factCount:n.length,chains:s}}function Ub(e,t,n={}){let s=t?.term||e?.term||"";return{kind:"term-article",term:s,headline:s,paragraphs:(t?.paragraphs||[]).map(o=>o.text).filter(Boolean),body:t?.paragraphs||[],sources:UR(t?.provenanceRows||[]),detail:GR(e,n.chains),provenanceRows:t?.provenanceRows||[]}}function Wb(e,t,n={},s=new Map,o={}){let r=Fb(e,t,n,o),i=Bb(r,s,o);return Ub(r,i,o)}Qi();var Gb=new Set(["rdfs:subClassOf","rdf:type"]);function Vb(e){let t=new Map,n=new Set,s=[],o=[];for(let i of e||[])!i||!i.predicate||(Gb.has(i.predicate)?(n.add(i.subject),t.has(i.object)||t.set(i.object,new Set),t.get(i.object).add(i.subject),s.push([i.subject,i.object])):i.predicate==="owl:disjointWith"&&o.push([i.subject,i.object]));let r={};for(let[i,a]of t)r[i]=a.size;return{classSubjectCounts:r,totalSubjects:n.size,subClassEdges:s,disjointEdges:o}}function qb(e,t,n=6){let s=Ar(e||[]),o={};for(let r of t||[]){if(r in o)continue;let i=Xi(r,s,{cap:n});i.length>1&&(o[r]=i)}return o}function Hb(e){let t=[],n=new Set;for(let s of e||[])!s||!Gb.has(s.predicate)||n.has(s.object)||(n.add(s.object),t.push(s.object));return t}Je();ta();function VR(e,t,n,s,o={}){let r=$u(s||[]);if(!r||r.size===0)return null;let i=t||[],a=Vb(n||i),l=qb(a.subClassEdges,Hb(i));return Wb(e,i,a,r,{...o,chains:l})}function Kb(e,t,n,s={}){let o=Ct(e||{individuals:[],objectProperties:[]}),r=Y(X,t),i=o.filter(l=>r.has(l.subject));if(!i.length)return null;let a=VR(t,i,o,n,s);return qR(a)}function qR(e){if(!e||!Array.isArray(e.paragraphs)||!e.paragraphs.length)return null;let t=e.detail&&Array.isArray(e.detail.facts)?e.detail.facts:[];return{term:e.term||"",paragraphs:e.paragraphs.slice(),sources:[...new Set((e.sources||[]).map(n=>n.provenance).filter(Boolean))],facts:t,factCount:e.detail&&Number.isInteger(e.detail.factCount)?e.detail.factCount:t.length}}var HR="no session is open on this page yet \u2014 await tmct.open() first",Yb=Symbol.for("tmct.surface.fallback");function Xb({open:e,ask:t=null,plan:n=null,turn:s=null,page:o={},fallback:r=!1,target:i=globalThis}={}){if(typeof e!="function")throw new Error("publishTmctSurface: `open` must be this page's session factory");let a=i.tmct;if(r&&a&&!a[Yb])return a;let l=null,c=()=>{if(!l)throw new Error(HR);return l},u={async open(...d){return l=await e(...d),l},get session(){return l},async turn(d,f){let p=c();return s?s(d,f,p):typeof p.turn!="function"?{answer:"this page runs no conversational turn \u2014 see tmct.session for what it does run",end:!1,record:null,plan:null,research:null}:p.turn(d,f)},async ask(d,f){return t?t(d,f,c()):{answer:"this page has no separate ask route \u2014 it answers questions through tmct.turn()",data:void 0,miss:!0}},async plan(d,f){return n?n(d,f,c()):{refused:!0,why:"this page's bundle carries no capability planner",driver:null,calls:[],composed:null,observed:null}},page:o,fallback:r};return u[Yb]=r,i.tmct=u,u}function KR({payload:e=null}={}){let t=Ni();return e&&(t.payload=e),{memoryDir:t}}async function YR(e,t,n){let s=null;try{s=await Tb(n.memoryDir,e,null,!0,{})}catch{s=null}if(!(s&&s.text))try{s=await Ob(n.memoryDir,e,null,!0,null)}catch{s=null}return s&&s.text?{answer:s.text,data:s,miss:!1}:{answer:null,data:null,miss:!0}}Xb({open:KR,ask:YR,page:{normFactTerm:X,digestTermFromPayloadBrowser:Kb},fallback:!0});})();