MCPcopy Create free account
hub / github.com/Railly/agentfiles / ut

Function ut

main.js:1–1  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

1var ra=Object.defineProperty;var Cn=Object.getOwnPropertyDescriptor;var jn=Object.getOwnPropertyNames;var En=Object.prototype.hasOwnProperty;var Rn=(a,e)=>{for(var t in e)ra(a,t,{get:e[t],enumerable:!0})},Ln=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jn(e))!En.call(a,i)&&i!==t&&ra(a,i,{get:()=>e[i],enumerable:!(s=Cn(e,i))||s.enumerable});return a};var Yn=a=>Ln(ra({},"__esModule",{value:!0}),a);var bc={};Rn(bc,{default:()=>ia});module.exports=Yn(bc);var Xn=require("obsidian");var wn=require("obsidian");var J=require("obsidian");function vs(){try{let a=window.require;return typeof a!="function"?null:a("electron")?.shell??null}catch{return null}}function ut(a){let e=vs();if(e){e.openExternal(a);return}window.open(a,"_blank")}function ht(a){let e=vs();e&&e.showItemInFolder(a)}var mt=require("os"),L=require("fs"),S=require("path"),k=(0,mt.homedir)(),Ye=(0,mt.platform)()==="win32",Le=process.env.XDG_CONFIG_HOME||(Ye?(0,S.join)(k,".config"):(0,S.join)(k,".config")),na=new Map;function $s(){na.clear()}function se(a,e){let t=na.get(a);if(t!==void 0)return t;let s=e();return na.set(a,s),s}function He(a){if(Ye){let e=process.env.ProgramFiles||"C:\\Program Files",t=process.env.LOCALAPPDATA||(0,S.join)(k,"AppData","Local");return(0,L.existsSync)((0,S.join)(e,a))||(0,L.existsSync)((0,S.join)(t,"Programs",a))}return(0,L.existsSync)(`/Applications/${a}.app`)||(0,L.existsSync)((0,S.join)(k,"Applications",`${a}.app`))}function ke(a){let e=Ye?[`${a}.cmd`,`${a}.exe`,a]:[a],t=[];if(Ye){let i=process.env.APPDATA||(0,S.join)(k,"AppData","Roaming");t.push((0,S.join)(i,"npm"),(0,S.join)(k,".bun","bin"),(0,S.join)(k,"AppData","Local","npm"))}else t.push("/usr/local/bin","/opt/homebrew/bin",(0,S.join)(k,".local","bin"));for(let i of t)for(let r of e)if((0,L.existsSync)((0,S.join)(i,r)))return!0;let s=Ye?(0,S.join)(k,"AppData","Roaming","nvm"):(0,S.join)(k,".nvm","versions","node");try{for(let i of(0,L.readdirSync)(s)){let r=Ye?(0,S.join)(s,i):(0,S.join)(s,i,"bin");for(let n of e)if((0,L.existsSync)((0,S.join)(r,n)))return!0}}catch{}return!1}var W=[{id:"claude-code",name:"Claude Code",color:"#f97316",icon:"brain",paths:[{baseDir:(0,S.join)(k,".claude","skills"),type:"skill",pattern:"directory-with-skillmd"},{baseDir:(0,S.join)(k,".claude","commands"),type:"command",pattern:"flat-md"}],agentPaths:[{baseDir:(0,S.join)(k,".claude","agents"),type:"agent",pattern:"flat-md"}],isInstalled:()=>se("claude-code",()=>(0,L.existsSync)((0,S.join)(k,".claude","settings.json"))||(0,L.existsSync)((0,S.join)(k,".claude","CLAUDE.md"))||ke("claude"))},{id:"cursor",name:"Cursor",color:"#3b82f6",icon:"mouse-pointer",paths:[{baseDir:(0,S.join)(k,".cursor","skills"),type:"skill",pattern:"directory-with-skillmd"},{baseDir:(0,S.join)(k,".cursor","rules"),type:"rule",pattern:"flat-md"}],agentPaths:[{baseDir:(0,S.join)(k,".cursor","agents"),type:"agent",pattern:"flat-md"}],isInstalled:()=>se("cursor",()=>He("Cursor")||(0,L.existsSync)((0,S.join)(k,".cursor","argv.json")))},{id:"windsurf",name:"Windsurf",color:"#14b8a6",icon:"wind",paths:[{baseDir:(0,S.join)(k,".codeium","windsurf","memories"),type:"memory",pattern:"flat-md"},{baseDir:(0,S.join)(k,".windsurf","rules"),type:"rule",pattern:"flat-md"}],agentPaths:[],isInstalled:()=>se("windsurf",()=>He("Windsurf")||(0,L.existsSync)((0,S.join)(k,".codeium","windsurf","argv.json")))},{id:"codex",name:"Codex",color:"#22c55e",icon:"book",paths:[{baseDir:(0,S.join)(k,".codex","skills"),type:"skill",pattern:"directory-with-skillmd"},{baseDir:(0,S.join)(k,".codex","prompts"),type:"command",pattern:"flat-md"},{baseDir:(0,S.join)(k,".codex","memories"),type:"memory",pattern:"flat-md"}],agentPaths:[{baseDir:(0,S.join)(k,".codex","agents"),type:"agent",pattern:"flat-md"}],isInstalled:()=>se("codex",()=>(0,L.existsSync)((0,S.join)(k,".codex","config.toml"))||(0,L.existsSync)((0,S.join)(k,".codex","auth.json"))||ke("codex"))},{id:"copilot",name:"Copilot",color:"#a855f7",icon:"plane",paths:[{baseDir:(0,S.join)(k,".copilot","skills"),type:"skill",pattern:"directory-with-skillmd"}],agentPaths:[],isInstalled:()=>se("copilot",()=>(0,L.existsSync)((0,S.join)(k,".copilot"))||ke("copilot"))},{id:"amp",name:"Amp",color:"#ec4899",icon:"zap",paths:[{baseDir:(0,S.join)(Le,"amp","skills"),type:"skill",pattern:"directory-with-skillmd"}],agentPaths:[],isInstalled:()=>se("amp",()=>(0,L.existsSync)((0,S.join)(Le,"amp","config.json"))||(0,L.existsSync)((0,S.join)(Le,"amp","settings.json"))||ke("amp"))},{id:"opencode",name:"OpenCode",color:"#ef4444",icon:"terminal",paths:[{baseDir:(0,S.join)(Le,"opencode","skills"),type:"skill",pattern:"directory-with-skillmd"}],agentPaths:[],isInstalled:()=>se("opencode",()=>He("OpenCode")||(0,L.existsSync)((0,S.join)(Le,"opencode","opencode.json"))||(0,L.existsSync)((0,S.join)(Le,"opencode","opencode.jsonc"))||ke("opencode"))},{id:"pi",name:"Pi",color:"#06b6d4",icon:"sparkles",paths:[{baseDir:(0,S.join)(k,".pi","agent","skills"),type:"skill",pattern:"directory-with-skillmd"}],agentPaths:[],isInstalled:()=>se("pi",()=>ke("pi"))},{id:"antigravity",name:"Antigravity",color:"#ef4444",icon:"arrow-up-circle",paths:[{baseDir:(0,S.join)(k,".gemini","antigravity","skills"),type:"skill",pattern:"directory-with-skillmd"}],agentPaths:[],isInstalled:()=>se("antigravity",()=>He("Antigravity")||(0,L.existsSync)((0,S.join)(k,".gemini","antigravity","skills"))||ke("antigravity"))},{id:"claude-desktop",name:"Claude Desktop",color:"#f97316",icon:"monitor",paths:[],agentPaths:[],isInstalled:()=>se("claude-desktop",()=>He("Claude"))},{id:"global-agents",name:"Global",color:"#a3e635",icon:"globe",paths:[{baseDir:(0,S.join)(k,".agents","skills"),type:"skill",pattern:"directory-with-skillmd"}],agentPaths:[],isInstalled:()=>se("global-agents",()=>(0,L.existsSync)((0,S.join)(k,".agents","skills")))},{id:"aider",name:"Aider",color:"#eab308",icon:"wrench",paths:[],agentPaths:[],isInstalled:()=>se("aider",()=>ke("aider"))}];var I={"claude-code":{viewBox:"0 0 24 24",paths:'<path d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z" fill="currentColor"/>'},cursor:{viewBox:"0 0 466.73 532.09",paths:'<path d="M457.43 125.94 244.42 2.96a22.127 22.127 0 0 0-22.12 0L9.3 125.94C3.55 129.26 0 135.4 0 142.05v247.99c0 6.65 3.55 12.79 9.3 16.11l213.01 122.98a22.127 22.127 0 0 0 22.12 0l213.01-122.98c5.75-3.32 9.3-9.46 9.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11h-.01Zm-13.38 26.05L238.42 508.15c-1.39 2.4-5.06 1.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87 145.67c-2.4-1.39-1.42-5.06 1.36-5.06h411.26c5.84 0 9.49 6.33 6.57 11.39h-.01Z" fill="currentColor"/>'},windsurf:{viewBox:"0 0 24 24",paths:'<path d="M23.55 5.067c-1.2038-.002-2.1806.973-2.1806 2.1765v4.8676c0 .972-.8035 1.7594-1.7597 1.7594-.568 0-1.1352-.286-1.4718-.7659l-4.9713-7.1003c-.4125-.5896-1.0837-.941-1.8103-.941-1.1334 0-2.1533.9635-2.1533 2.153v4.8957c0 .972-.7969 1.7594-1.7596 1.7594-.57 0-1.1363-.286-1.4728-.7658L.4076 5.1598C.2822 4.9798 0 5.0688 0 5.2882v4.2452c0 .2147.0656.4228.1884.599l5.4748 7.8183c.3234.462.8006.8052 1.3509.9298 1.3771.313 2.6446-.747 2.6446-2.0977v-4.893c0-.972.7875-1.7593 1.7596-1.7593h.003a1.798 1.798 0 0 1 1.4718.7658l4.9723 7.0994c.4135.5905 1.05.941 1.8093.941 1.1587 0 2.1515-.9645 2.1515-2.153v-4.8948c0-.972.7875-1.7594 1.7596-1.7594h.194a.22.22 0 0 0 .2204-.2202v-4.622a.22.22 0 0 0-.2203-.2203Z" fill="currentColor"/>'},codex:{viewBox:"0 0 24 24",paths:'<path d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z" fill="currentColor"/>'},copilot:{viewBox:"0 0 24 24",paths:'<path d="M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z" fill="currentColor"/>'},opencode:{viewBox:"0 0 24 36",paths:'<path d="M18 30H6V18H18V30Z" fill="currentColor" opacity="0.4"/><path d="M18 12H6V30H18V12ZM24 36H0V6H24V36Z" fill="currentColor" opacity="0.6"/>'},"claude-desktop":{viewBox:"0 0 24 24",paths:'<path d="M4.709 12.739l3.986-7.639a.209.209 0 01.37 0l3.987 7.639a.209.209 0 01-.185.308H4.894a.209.209 0 01-.185-.308zm6.262-10.658L5.158 13.376a.209.209 0 00.185.308h11.628a.209.209 0 00.185-.308L11.341 2.08a.209.209 0 00-.37 0z" fill="currentColor"/>'},"global-agents":{viewBox:"0 0 24 24",paths:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" fill="currentColor"/>'},goose:{viewBox:"0 0 24 24",paths:'<path d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z" fill="currentColor"/>'},cline:{viewBox:"0 0 24 24",paths:'<path d="M17.035 3.991c2.75 0 4.98 2.24 4.98 5.003v1.667l1.45 2.896a1.01 1.01 0 01-.002.909l-1.448 2.864v1.668c0 2.762-2.23 5.002-4.98 5.002H7.074c-2.751 0-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01 1.01 0 01-.003-.927l1.482-2.887V8.994c0-2.763 2.23-5.003 4.98-5.003h9.962zM8.265 9.6a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 004.547 0v-4.042A2.274 2.274 0 008.265 9.6zm7.326 0a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 104.548 0v-4.042A2.274 2.274 0 0015.59 9.6z" fill="currentColor"/><path d="M12.054 5.558a2.779 2.779 0 100-5.558 2.779 2.779 0 000 5.558z" fill="currentColor"/>'},continue:{viewBox:"0 0 26 24",paths:'<path d="M20.5286 3.26811L19.1512 5.65694L22.6328 11.6849C22.6582 11.7306 22.6735 11.7866 22.6735 11.8374C22.6735 11.8882 22.6582 11.9441 22.6328 11.9899L19.1512 18.0229L20.5286 20.4117L25.4791 11.8374L20.5286 3.26303V3.26811ZM18.6176 5.3469L19.995 2.95807H17.2402L15.8628 5.3469H18.6227H18.6176ZM15.8577 5.96697L19.075 11.5324H21.8298L18.6176 5.96697H15.8577ZM18.6176 17.7179L21.8298 12.1474H19.075L15.8577 17.7179H18.6176ZM15.8577 18.338L17.2351 20.7167H19.9899L18.6125 18.338H15.8526H15.8577ZM6.52098 21.3063L2.77002 15.1207H0.0152482L4.9657 23.69H14.8615L13.4841 21.3063H6.52606H6.52098ZM14.0178 20.9962L15.3952 23.38L16.7726 20.9911L15.3952 18.6023L14.0178 20.9911V20.9962ZM14.8615 18.2974H8.43712L7.05973 20.6862H13.4841L14.8615 18.2974ZM7.89836 17.9924L4.68108 12.4219L3.30369 14.8107L6.52098 20.3812L7.89836 17.9924ZM0.0101654 14.5007H2.76494L4.14232 12.1118H1.39263L0.0101654 14.5007ZM6.24143 2.5413L13.474 2.38882H13.474L14.8514 0H4.95045L0 8.57435H2.75477L6.23127 2.54638L6.24143 2.5413ZM4.14232 11.5782L2.76494 9.18934H0.0101654L1.38755 11.5782H4.14232ZM6.51081 3.31386L3.29861 8.8793L4.67599 11.2681L7.8882 5.70268L6.51081 3.31386ZM13.4791 3.00382H7.04448L8.42187 5.39264H14.8564L13.4791 3.00382ZM15.3952 5.0826L16.7675 2.69886L15.3952 0.310038L14.0178 2.69378L15.3952 5.0826Z" fill="currentColor"/>'},"roo-code":{viewBox:"0 0 96 96",paths:'<path d="M78.99,21.9l-1.73,6.24c-.09.33-.44.52-.77.42l-28.11-8.71c-.19-.06-.41-.02-.56.11l-28.95,23.22c-.08.07-.18.11-.29.13l-17.25,2.66c-.31.05-.53.32-.52.63l.11,2.47c.01.31.26.56.57.58l20.08,1.23c.11,0,.22-.02.31-.06l14.64-7.4c.21-.11.46-.08.64.06l9.37,7.03c.16.12.25.3.24.49l-.09,11.65c0,.13.04.25.11.35l14.74,21.15c.11.16.3.26.5.26h5.03c.46,0,.76-.5.54-.9l-10.87-19.92c-.1-.18-.1-.4,0-.58l5.51-10.48c.06-.11.15-.2.26-.26l19.56-9.92c.2-.1.43-.09.62.04l5.6,3.73c.1.07.22.1.34.1h5.15c.48,0,.77-.52.52-.93l-14.2-23.52c-.28-.46-.97-.36-1.11.15Z" fill="currentColor"/>'},replit:{viewBox:"0 0 24 24",paths:'<path d="M11.878 7.761H3.482A1.469 1.469 0 012 6.304V1.457C2 .644 2.67 0 3.482 0h6.913c.827 0 1.483.658 1.483 1.457v6.304zM20.882 16.215h-8.995V7.75h8.995c.87 0 1.588.717 1.588 1.586v5.294c0 .885-.717 1.586-1.588 1.586zM10.395 24H3.482C2.67 24 2 23.343 2 22.546v-4.853c0-.797.67-1.454 1.482-1.454h8.396v6.307c0 .797-.67 1.454-1.483 1.454z" fill="currentColor"/>'},"gemini-cli":{viewBox:"0 0 24 24",paths:'<path d="M11.538.392C11.722-.1 12.434-.093 12.608.407l.486 1.412A14.956 14.956 0 0022.135 10.9l1.569.569c.5.181.501.887.002 1.069l-1.573.576A14.953 14.953 0 0013.24 22.01l-.616 1.677c-.182.496-.884.497-1.068.002l-.643-1.731A14.953 14.953 0 002.05 13.127l-1.601-.588c-.496-.182-.497-.883-.002-1.067l1.633-.607A14.955 14.955 0 0010.895 2.14l.643-1.739v-.01z" fill="currentColor"/>'},amp:{viewBox:"0 0 21 21",paths:'<path d="M3.769 18.302l4.73-4.797 1.72 6.535 2.5-.684-2.49-9.489-9.338-2.529-.665 2.555 6.425 1.746-4.71 4.789 1.828 1.874z" fill="currentColor"/><path d="M17.407 12.741l2.5-.683-2.49-9.489-9.339-2.529-.664 2.555 7.885 2.142 2.108 8.004z" fill="currentColor"/><path d="M13.818 16.388l2.5-.684-2.49-9.488-9.339-2.53-.664 2.556 7.885 2.142 2.108 8.004z" fill="currentColor"/>'},antigravity:{viewBox:"0 0 112 96",paths:'<path d="M89.7 93.7c4.667 3.5 11.667 1.167 5.25-5.25C75.7 69.778 79.783 18.445 55.866 18.445S36.033 69.778 16.783 88.445c-7 7-.417 8.75 4.25 5.25 18.083-12.25 16.916-33.834 33.833-33.834s16.834 21.584 34.834 33.834z" fill="currentColor"/>'}};function ne(a,e,t=16){let s=I[e];if(!s)return;let i=createSvg("svg");i.setAttribute("viewBox",s.viewBox),i.setAttribute("width",String(t)),i.setAttribute("height",String(t)),i.setAttribute("fill","none"),i.classList.add("as-tool-svg");let n=new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${s.paths}</svg>`,"image/svg+xml");for(let o of Array.from(n.documentElement.childNodes))i.appendChild(i.ownerDocument.importNode(o,!0));a.appendChild(i)}var ft=class{containerEl;store;onToggleDashboard;onToggleMarketplace;onCreateSkill;onToggleConversations;conversationStore;dashboardActive=!1;marketplaceActive=!1;conversationsActive=!1;constructor(e,t,s,i,r,n,o){this.containerEl=e,this.store=t,this.onToggleDashboard=s,this.onToggleMarketplace=i,this.onCreateSkill=r,this.onToggleConversations=n||(()=>{}),this.conversationStore=o||null}setDashboardActive(e){this.dashboardActive=e}setMarketplaceActive(e){this.marketplaceActive=e}setConversationsActive(e){this.conversationsActive=e}render(){this.containerEl.empty(),this.containerEl.addClass("as-sidebar"),this.renderLibrarySection(),this.conversationsActive&&this.conversationStore?this.renderConversationFilters():(this.renderTypeSection(),this.renderToolSection(),this.renderProjectSection(),this.renderCollectionSection(),this.store.hasSkillkit||this.renderSkillkitCta())}renderSection(e,t){let s=this.containerEl.createDiv("as-sidebar-section");s.createDiv({cls:"as-sidebar-title",text:e});for(let i of t){let r=s.createDiv("as-sidebar-item");!this.dashboardActive&&this.isActive(i.filter)&&r.addClass("is-active");let n=r.createSpan("as-sidebar-icon");(0,J.setIcon)(n,i.icon),r.createSpan({cls:"as-sidebar-label",text:i.label}),i.count!==void 0&&r.createSpan({cls:"as-sidebar-count",text:String(i.count)}),r.addEventListener("click",()=>{this.dashboardActive&&this.onToggleDashboard(),this.marketplaceActive&&this.onToggleMarketplace(),this.store.setFilter(i.filter)})}}renderTypeSection(){let e=this.store.getTypeCounts(),s=[{label:"Skills",icon:"sparkles",type:"skill"},{label:"Commands",icon:"terminal",type:"command"},{label:"Agents",icon:"bot",type:"agent"},{label:"Rules",icon:"scroll",type:"rule"}].filter(i=>e.has(i.type)).map(i=>({label:i.label,icon:i.icon,filter:{kind:"type",type:i.type},count:e.get(i.type)||0}));s.length>0&&this.renderSection("Types",s)}renderToolSection(){let e=this.store.getToolCounts(),t=W.filter(i=>i.isInstalled()&&e.has(i.id));if(t.length===0)return;let s=this.containerEl.createDiv("as-sidebar-section");s.createDiv({cls:"as-sidebar-title",text:"Tools"});for(let i of t){let r={kind:"tool",toolId:i.id},n=s.createDiv("as-sidebar-item");!this.dashboardActive&&this.isActive(r)&&n.addClass("is-active");let o=n.createSpan("as-sidebar-icon");I[i.id]?ne(o,i.id,14):(0,J.setIcon)(o,i.icon),n.createSpan({cls:"as-sidebar-label",text:i.name}),n.createSpan({cls:"as-sidebar-count",text:String(e.get(i.id)||0)}),n.addEventListener("click",()=>{this.dashboardActive&&this.onToggleDashboard(),this.store.setFilter(r)})}}renderProjectSection(){let e=this.store.getProjectCounts();if(e.size===0)return;let t=[];for(let[s,i]of e)t.push({label:s,icon:"folder-git-2",filter:{kind:"project",project:s},count:i});t.sort((s,i)=>s.label.localeCompare(i.label)),this.renderSection("Projects",t)}renderCollectionSection(){let e=this.containerEl.createDiv("as-sidebar-section");e.createDiv({cls:"as-sidebar-title",text:"Collections"});let t=new Set;for(let s of this.store.allItems)for(let i of s.collections)t.add(i);if(t.size===0){e.createDiv({cls:"as-sidebar-empty",text:"No collections yet"});return}for(let s of t){let i={kind:"collection",name:s},r=e.createDiv("as-sidebar-item");!this.dashboardActive&&this.isActive(i)&&r.addClass("is-active");let n=r.createSpan("as-sidebar-icon");(0,J.setIcon)(n,"folder"),r.createSpan({cls:"as-sidebar-label",text:s}),r.addEventListener("click",()=>{this.dashboardActive&&this.onToggleDashboard(),this.store.setFilter(i)})}}renderLibrarySection(){let e=this.containerEl.createDiv("as-sidebar-section");e.createDiv({cls:"as-sidebar-title",text:"Library"});let t=[{label:"All Skills",icon:"layers",filter:{kind:"all"}},{label:"Favorites",icon:"star",filter:{kind:"favorites"}}],s=this.dashboardActive||this.marketplaceActive||this.conversationsActive;for(let p of t){let u=e.createDiv("as-sidebar-item");!s&&this.isActive(p.filter)&&u.addClass("is-active");let g=u.createSpan("as-sidebar-icon");(0,J.setIcon)(g,p.icon),u.createSpan({cls:"as-sidebar-label",text:p.label}),u.addEventListener("click",()=>{this.dashboardActive&&this.onToggleDashboard(),this.marketplaceActive&&this.onToggleMarketplace(),this.conversationsActive&&this.onToggleConversations(),this.store.setFilter(p.filter)})}let i=e.createDiv("as-sidebar-item");this.dashboardActive&&i.addClass("is-active");let r=i.createSpan("as-sidebar-icon");(0,J.setIcon)(r,"bar-chart-2"),i.createSpan({cls:"as-sidebar-label",text:"Dashboard"}),i.addEventListener("click",()=>{this.marketplaceActive&&this.onToggleMarketplace(),this.conversationsActive&&this.onToggleConversations(),this.dashboardActive||this.onToggleDashboard()});let n=e.createDiv("as-sidebar-item");this.marketplaceActive&&n.addClass("is-active");let o=n.createSpan("as-sidebar-icon");(0,J.setIcon)(o,"shopping-bag"),n.createSpan({cls:"as-sidebar-label",text:"Marketplace"}),n.addEventListener("click",()=>{this.dashboardActive&&this.onToggleDashboard(),this.conversationsActive&&this.onToggleConversations(),this.marketplaceActive||this.onToggleMarketplace()});let l=e.createDiv("as-sidebar-item");this.conversationsActive&&l.addClass("is-active");let O=l.createSpan("as-sidebar-icon");(0,J.setIcon)(O,"message-circle"),l.createSpan({cls:"as-sidebar-label",text:"Conversations"}),l.addEventListener("click",()=>{this.dashboardActive&&this.onToggleDashboard(),this.marketplaceActive&&this.onToggleMarketplace(),this.conversationsActive||this.onToggleConversations()});let c=e.createDiv("as-sidebar-item as-sidebar-create"),d=c.createSpan("as-sidebar-icon");(0,J.setIcon)(d,"plus"),c.createSpan({cls:"as-sidebar-label",text:"Create"}),c.addEventListener("click",()=>this.onCreateSkill())}renderSkillkitCta(){let e=this.containerEl.createDiv("as-skillkit-cta"),t=e.createDiv("as-skillkit-icon");(0,J.setIcon)(t,"bar-chart-2"),e.createDiv({cls:"as-skillkit-title",text:"Unlock analytics"}),e.createDiv({cls:"as-skillkit-desc",text:"Install skillkit to see usage stats, stale badges, and heavy skill warnings."}),e.createDiv("as-skillkit-cmd").createEl("code",{text:"npm i -g @crafter/skillkit"}),e.createEl("a",{cls:"as-skillkit-link",text:"Learn more",href:"https://www.npmjs.com/package/@crafter/skillkit"}).addEventListener("click",r=>{r.preventDefault(),ut("https://www.npmjs.com/package/@crafter/skillkit")})}renderConversationFilters(){if(!this.conversationStore)return;let e=this.conversationStore.getProjectCounts();if(e.size>0){let t=this.containerEl.createDiv("as-sidebar-section");t.createDiv({cls:"as-sidebar-title",text:"Projects"});let s=t.createDiv("as-sidebar-item"),i=this.conversationStore.filter;i.kind==="all-conversations"&&s.addClass("is-active");let r=s.createSpan("as-sidebar-icon");(0,J.setIcon)(r,"layers"),s.createSpan({cls:"as-sidebar-label",text:"All"}),s.createSpan({cls:"as-sidebar-count",text:String(this.conversationStore.allItems.length)}),s.addEventListener("click",()=>{this.conversationStore.setFilter({kind:"all-conversations"})});let n=t.createDiv("as-sidebar-item");i.kind==="conversation-favorites"&&n.addClass("is-active");let o=n.createSpan("as-sidebar-icon");(0,J.setIcon)(o,"star"),n.createSpan({cls:"as-sidebar-label",text:"Favorites"}),n.addEventListener("click",()=>{this.conversationStore.setFilter({kind:"conversation-favorites"})});for(let[l,O]of Array.from(e.entries()).sort((c,d)=>d[1]-c[1])){let c=t.createDiv("as-sidebar-item");i.kind==="conversation-project"&&i.project===l&&c.addClass("is-active");let d=c.createSpan("as-sidebar-icon");(0,J.setIcon)(d,"folder-git-2"),c.createSpan({cls:"as-sidebar-label",text:l}),c.createSpan({cls:"as-sidebar-count",text:String(O)}),c.addEventListener("click",()=>{this.conversationStore.setFilter({kind:"conversation-project",project:l})})}}}isActive(e){let t=this.store.filter;return t.kind!==e.kind?!1:t.kind==="tool"&&e.kind==="tool"?t.toolId===e.toolId:t.kind==="type"&&e.kind==="type"?t.type===e.type:t.kind==="collection"&&e.kind==="collection"?t.name===e.name:t.kind==="project"&&e.kind==="project"?t.project===e.project:!0}};var Pe=require("obsidian");var gt=class{containerEl;store;onSelect;selectedId=null;inputEl=null;listEl=null;typeFilter=null;sortBy="name";openDropdown=null;menuDropdownEl=null;outsideClickCleanup=null;constructor(e,t,s){this.containerEl=e,this.store=t,this.onSelect=s}setSelected(e){this.selectedId=e}render(){if(!this.inputEl){this.containerEl.empty(),this.containerEl.addClass("as-list");let e=this.containerEl.createDiv("as-search");this.inputEl=e.createEl("input",{type:"text",placeholder:"Search skills...",cls:"as-search-input"}),this.inputEl.addEventListener("input",()=>{this.store.setSearch(this.inputEl.value)});let t=e.createDiv("as-conv-search-actions"),s=t.createEl("button",{cls:"as-conv-icon-btn"}),i=s.createSpan("as-conv-icon-btn-icon");(0,Pe.setIcon)(i,"file-search"),s.setAttribute("aria-label","Search file content"),this.store.deepSearch&&s.addClass("has-active"),s.addEventListener("click",()=>{this.store.setDeepSearch(!this.store.deepSearch),s.toggleClass("has-active",this.store.deepSearch)});let r=t.createDiv("as-conv-dropdown-wrap"),n=r.createEl("button",{cls:"as-conv-icon-btn"}),o=n.createSpan("as-conv-icon-btn-icon");(0,Pe.setIcon)(o,"sliders-horizontal"),n.setAttribute("aria-label","Filter & sort"),(this.typeFilter||this.sortBy!=="name")&&n.addClass("has-active"),this.menuDropdownEl=r.createDiv("as-conv-dropdown as-conv-dropdown-wide"),this.renderMenuDropdown(),n.addEventListener("click",l=>{if(l.stopPropagation(),this.openDropdown==="menu")this.closeDropdown();else{this.closeDropdown(),this.openDropdown="menu",this.menuDropdownEl?.addClass("is-open");let O=c=>{r.contains(c.target)||this.closeDropdown()};window.setTimeout(()=>activeDocument.addEventListener("click",O),0),this.outsideClickCleanup=()=>activeDocument.removeEventListener("click",O)}}),this.listEl=this.containerEl.createDiv("as-list-items")}this.inputEl.value=this.store.searchQuery,this.renderList()}closeDropdown(){this.openDropdown=null,this.menuDropdownEl?.removeClass("is-open"),this.outsideClickCleanup&&(this.outsideClickCleanup(),this.outsideClickCleanup=null)}renderMenuDropdown(){if(!this.menuDropdownEl)return;this.menuDropdownEl.empty(),this.menuDropdownEl.createDiv("as-conv-dropdown-header").setText("Sort");let t=[{label:"Name",value:"name",icon:"arrow-up-az"},{label:"Usage",value:"usage",icon:"trending-up"}];for(let r of t){let n=this.menuDropdownEl.createDiv(`as-conv-dropdown-item ${this.sortBy===r.value?"is-active":""}`),o=n.createSpan("as-conv-dropdown-check");this.sortBy===r.value&&(0,Pe.setIcon)(o,"check"),n.createSpan({cls:"as-conv-dropdown-item-label",text:r.label}),n.addEventListener("click",l=>{l.stopPropagation(),this.sortBy=r.value,this.updateMenuBtnState(),this.renderMenuDropdown(),this.renderList()})}this.menuDropdownEl.createDiv("as-conv-dropdown-header").setText("Filter");let i=[{id:null,label:"All"},{id:"stale",label:"Stale"},{id:"heavy",label:"Heavy"},{id:"oversized",label:"Oversized"},{id:"conflict",label:"Conflicts"}];for(let r of i){let n=this.typeFilter===r.id,o=this.menuDropdownEl.createDiv(`as-conv-dropdown-item ${n?"is-active":""}`),l=o.createSpan("as-conv-dropdown-check");n&&(0,Pe.setIcon)(l,"check"),o.createSpan({cls:"as-conv-dropdown-item-label",text:r.label}),o.addEventListener("click",O=>{O.stopPropagation(),this.typeFilter=r.id,this.updateMenuBtnState(),this.renderMenuDropdown(),this.renderList()})}}updateMenuBtnState(){let e=this.containerEl.querySelector(".as-conv-dropdown-wrap .as-conv-icon-btn");if(e){let t=this.typeFilter!==null||this.sortBy!=="name";e.toggleClass("has-active",t)}}renderList(){if(!this.listEl)return;this.listEl.empty();let e=this.store.filteredItems;if(this.typeFilter)switch(this.typeFilter){case"stale":e=e.filter(t=>t.usage?.isStale);break;case"heavy":e=e.filter(t=>t.usage?.isHeavy);break;case"oversized":e=e.filter(t=>t.warnings?.oversized);break;case"conflict":e=e.filter(t=>t.conflicts&&t.conflicts.length>0);break}if(this.sortBy==="usage"&&(e=[...e].sort((t,s)=>(s.usage?.uses??0)-(t.usage?.uses??0))),this.typeFilter){let t={stale:"Stale",heavy:"Heavy",oversized:"Oversized",conflict:"Conflict"},s=this.listEl.createDiv("as-active-filter");s.createSpan({text:`Showing: ${t[this.typeFilter]??this.typeFilter}`}),s.createSpan({cls:"as-filter-clear",text:"Clear"}).addEventListener("click",()=>{this.typeFilter=null,this.updateMenuBtnState(),this.renderList()})}if(e.length===0){this.listEl.createDiv({cls:"as-list-empty",text:"No skills found"});return}for(let t of e)this.renderCard(this.listEl,t)}renderCard(e,t){let s=e.createDiv("as-skill-card");t.id===this.selectedId&&s.addClass("is-selected");let i=s.createDiv("as-skill-header");if(i.createSpan({cls:"as-skill-name",text:t.name}),t.isFavorite){let n=i.createSpan("as-skill-star");(0,Pe.setIcon)(n,"star")}t.description&&s.createDiv({cls:"as-skill-desc",text:t.description.length>80?t.description.slice(0,80)+"...":t.description});let r=s.createDiv("as-skill-meta");r.createSpan({cls:`as-type-tag as-type-${t.type}`,text:t.type});for(let n of t.tools){let o=W.find(O=>O.id===n);if(!o)continue;let l=r.createSpan("as-tool-badge");l.title=o.name,l.setAttribute("aria-label",o.name),l.setCssProps({"--tool-color":o.color}),I[n]?ne(l,n,12):l.addClass("as-tool-badge-dot")}t.usage&&(t.usage.uses>0&&r.createSpan({cls:"as-usage-badge",text:`${t.usage.uses}`,attr:{"aria-label":`Used ${t.usage.uses} times`}}),t.usage.isStale&&r.createSpan({cls:"as-badge-stale",text:"stale"}),t.usage.isHeavy&&r.createSpan({cls:"as-badge-heavy",text:"heavy"})),t.warnings?.oversized&&r.createSpan({cls:"as-badge-warn",text:"oversized"}),t.conflicts&&t.conflicts.length>0&&r.createSpan({cls:"as-badge-conflict",text:"conflict"}),s.addEventListener("click",()=>{this.selectedId=t.id,this.onSelect(t)}),s.addEventListener("contextmenu",n=>{n.preventDefault();let o=new Pe.Menu;o.addItem(l=>l.setTitle("Reveal in system explorer").setIcon("folder-open").onClick(()=>ht(t.filePath))),o.addItem(l=>l.setTitle("Copy file path").setIcon("copy").onClick(()=>navigator.clipboard.writeText(t.filePath))),o.showAtMouseEvent(n)})}};var M=require("obsidian"),Wr=require("fs");var Xe=require("child_process"),oe=require("fs"),v=require("path"),Qt=require("os"),Dn=new Set(["Read","Write","Edit","MultiEdit","Bash","Glob","Grep","WebSearch","WebFetch","TodoRead","TodoWrite","Task","Agent","Skill","LSP","NotebookEdit","AskFollowupQuestion","AttemptCompletion","SearchReplace","InsertCodeBlock","ReadImages","ExecuteCommand","ListFiles","SearchFiles","ReadFile","WriteFile","ReplaceInFile","ListCodeDefinitionNames","BrowserAction","UseMcp","shell","shell_command","update_plan","create_plan","read_file","write_file","execute_command","spawn_agent","write_stdin","multi_tool_use.parallel"]);function zn(a){return!(Dn.has(a)||a.startsWith("mcp__")||a.startsWith("mcp_"))}var x=(0,Qt.homedir)(),B=(0,Qt.platform)()==="win32",An=(0,v.join)(x,".skillkit","analytics.db"),oa=B?["skillkit.cmd","skillkit.exe","skillkit"]:["skillkit"];function St(){let a=[];if(B){let t=process.env.APPDATA||(0,v.join)(x,"AppData","Roaming");a.push((0,v.join)(t,"npm"),(0,v.join)(x,".bun","bin"),(0,v.join)(x,"AppData","Local","npm"))}else a.push("/usr/local/bin","/opt/homebrew/bin",(0,v.join)(x,".local","bin"),(0,v.join)(x,".bun","bin"),(0,v.join)(x,".local","share","pnpm"),(0,v.join)(x,".volta","bin"),(0,v.join)(x,".yarn","bin"),(0,v.join)(x,".config","yarn","global","node_modules",".bin"),(0,v.join)(x,".fnm","aliases","default","bin"),(0,v.join)(x,".asdf","shims"),(0,v.join)(x,".proto","bin"));let e=B?(0,v.join)(x,"AppData","Roaming","nvm"):(0,v.join)(x,".nvm","versions","node");try{for(let t of(0,oe.readdirSync)(e))a.push(B?(0,v.join)(e,t):(0,v.join)(e,t,"bin"))}catch{}if(!B){let t=(0,v.join)(x,".local","share","mise","installs");for(let s of["node","bun"])try{for(let i of(0,oe.readdirSync)((0,v.join)(t,s)))a.push((0,v.join)(t,s,i,"bin"))}catch{}}return[...a,process.env.PATH||""].join(v.delimiter)}function bs(a){try{return(0,Xe.execSync)(`"${a}" help`,{encoding:"utf-8",timeout:5e3,env:{...process.env,NO_COLOR:"1",PATH:St()},stdio:["pipe","pipe","pipe"],shell:B?"cmd.exe":void 0}).includes("Analytics for AI agent skills")}catch{return!1}}function Mn(){let a=[],e=[];if(B){let s=process.env.APPDATA||(0,v.join)(x,"AppData","Roaming");e.push((0,v.join)(s,"npm"),(0,v.join)(x,".bun","bin"),(0,v.join)(x,"AppData","Local","npm"))}else e.push("/usr/local/bin","/opt/homebrew/bin",(0,v.join)(x,".local","bin"),(0,v.join)(x,".bun","bin"),(0,v.join)(x,".local","share","mise","shims"),(0,v.join)(x,".local","share","pnpm"),(0,v.join)(x,".volta","bin"),(0,v.join)(x,".yarn","bin"),(0,v.join)(x,".config","yarn","global","node_modules",".bin"),(0,v.join)(x,".fnm","aliases","default","bin"),(0,v.join)(x,".asdf","shims"),(0,v.join)(x,".proto","bin"));for(let s of e)for(let i of oa){let r=(0,v.join)(s,i);(0,oe.existsSync)(r)&&a.push(r)}let t=B?(0,v.join)(x,"AppData","Roaming","nvm"):(0,v.join)(x,".nvm","versions","node");try{for(let s of(0,oe.readdirSync)(t)){let i=B?(0,v.join)(t,s):(0,v.join)(t,s,"bin");for(let r of oa){let n=(0,v.join)(i,r);(0,oe.existsSync)(n)&&a.push(n)}}}catch{}if(!B){let s=(0,v.join)(x,".local","share","mise","installs");for(let i of["node","bun"])try{for(let r of(0,oe.readdirSync)((0,v.join)(s,i))){let n=(0,v.join)(s,i,r,"bin","skillkit");(0,oe.existsSync)(n)&&a.push(n)}}catch{}}if(a.length===0&&!B){let s=[["pnpm","bin","-g"],["yarn","global","bin"],["npm","bin","-g"]];for(let i of s)try{let r=(0,Xe.execSync)(i.join(" "),{encoding:"utf-8",timeout:5e3,stdio:["pipe","pipe","pipe"]}).trim();if(r)for(let n of oa){let o=(0,v.join)(r,n);if((0,oe.existsSync)(o)&&bs(o))return o}}catch{}}for(let s of a)if(bs(s))return s;return null}var la;function vt(){return la===void 0&&(la=Mn()),la}function K(){return vt()!==null||(0,oe.existsSync)(An)}function De(a){let e=vt();if(!e)return null;try{let t=(0,Xe.execSync)(`${e} ${a} --json`,{encoding:"utf-8",timeout:15e3,env:{...process.env,NO_COLOR:"1",PATH:St()},stdio:["pipe","pipe","pipe"],shell:B?"cmd.exe":void 0}).trim();return ks(t)}catch{return null}}function ks(a){let e=a.indexOf("{"),t=a.indexOf("["),s=e===-1?t:t===-1?e:Math.min(e,t);return s===-1?null:JSON.parse(a.slice(s))}function Oa(a){let e=vt();return e?new Promise(t=>{(0,Xe.exec)(`${e} ${a} --json`,{encoding:"utf-8",timeout:15e3,env:{...process.env,NO_COLOR:"1",PATH:St()},shell:B?"cmd.exe":void 0},(s,i)=>{if(s){t(null);return}try{t(ks(String(i).trim()))}catch{t(null)}})}):Promise.resolve(null)}function Ps(a){if(!K())return[];let e=De(`trace --list --skill ${a} --limit 5`);return Array.isArray(e)?e.map(t=>({traceId:t.trace_id,timestamp:t.timestamp,tokens:t.tokens_total,cost:t.cost_estimate,duration:t.duration_ms,model:t.model||"unknown"})):[]}async function ys(){let a=new Map;if(!K())return a;let e=await Oa("stats");if(!e?.top_skills)return a;let t=Date.now();for(let s of e.top_skills){if(!zn(s.name))continue;let i=s.daily.length>0?s.daily[s.daily.length-1]?.date:null,r=null;i&&(r=Math.floor((t-new Date(i).getTime())/(1e3*60*60*24))),a.set(s.name,{uses:s.total,lastUsed:i||null,daysSinceUsed:r,isStale:r!==null&&r>30,isHeavy:!1,daily:s.daily})}return a}async function ws(){let a=new Map;if(!K())return a;let e=await Oa("conflicts --dry-run");if(!e||!("pairs"in e))return a;for(let t of e.pairs)a.has(t.skill_a)||a.set(t.skill_a,[]),a.has(t.skill_b)||a.set(t.skill_b,[]),a.get(t.skill_a).push({skillName:t.skill_b,similarity:t.similarity}),a.get(t.skill_b).push({skillName:t.skill_a,similarity:t.similarity});return a}async function xs(){if(!K())return{oversized:[],longDesc:[]};let a=await Oa("health");return a?.warnings?{oversized:a.warnings.oversized||[],longDesc:a.warnings.long_descriptions||[]}:{oversized:[],longDesc:[]}}function ze(a){let e=vt();if(!e)return{success:!1,output:"skillkit not found"};try{return{success:!0,output:(0,Xe.execSync)(`${e} ${a}`,{encoding:"utf-8",timeout:3e4,env:{...process.env,NO_COLOR:"1",PATH:St()},stdio:["pipe","pipe","pipe"],shell:B?"cmd.exe":void 0}).trim()}}catch(t){return{success:!1,output:t instanceof Error?t.message:"unknown error"}}}function ca(a){if(!a)return"never";let e=Date.now()-new Date(a).getTime(),t=Math.floor(e/6e4);if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let i=Math.floor(s/24);return i<30?`${i}d ago`:`${Math.floor(i/30)}mo ago`}function Zs(a,e,t=48,s=16){if(e.length===0)return;let i=Math.max(...e,1),r=e.map((l,O)=>{let c=O/(e.length-1||1)*t,d=s-l/i*s;return`${c.toFixed(1)},${d.toFixed(1)}`}),n=createSvg("svg");n.setAttribute("viewBox",`0 0 ${t} ${s}`),n.setAttribute("width",String(t)),n.setAttribute("height",String(s)),n.classList.add("as-sparkline");let o=createSvg("polyline");o.setAttribute("points",r.join(" ")),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.5"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),n.appendChild(o),a.appendChild(n)}var Ts=require("obsidian");function _e(a,e,t,s){new da(a,e,t,s).open()}var da=class extends Ts.Modal{title;message;onConfirm;constructor(e,t,s,i){super(e),this.title=t,this.message=s,this.onConfirm=i}onOpen(){let{contentEl:e}=this;e.addClass("as-confirm-modal"),e.createEl("p",{cls:"as-confirm-title",text:this.title}),e.createEl("p",{cls:"as-confirm-message",text:this.message});let t=e.createDiv("as-confirm-buttons");t.createEl("button",{cls:"as-confirm-cancel",text:"Cancel"}).addEventListener("click",()=>this.close()),t.createEl("button",{cls:"as-confirm-action mod-warning",text:"Confirm"}).addEventListener("click",()=>{this.close(),this.onConfirm()})}onClose(){this.contentEl.empty()}};var q=require("@codemirror/view"),Ar=require("@codemirror/state"),pe=require("@codemirror/language"),we=require("@codemirror/commands"),Rt=require("@codemirror/autocomplete"),Mr=require("@codemirror/search"),Lt=require("@codemirror/lint");var V=require("@codemirror/state"),Et=require("@codemirror/view"),_=require("@codemirror/language"),kr=require("@codemirror/autocomplete");var j=require("@lezer/common"),$=require("@lezer/highlight"),kt=class a{static create(e,t,s,i,r){let n=i+(i<<8)+e+(t<<4)|0;return new a(e,t,s,n,r,[],[])}constructor(e,t,s,i,r,n,o){this.type=e,this.value=t,this.from=s,this.hash=i,this.end=r,this.children=n,this.positions=o,this.hashProp=[[j.NodeProp.contextHash,i]]}addChild(e,t){e.prop(j.NodeProp.contextHash)!=this.hash&&(e=new j.Tree(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let s=this.children.length-1;return s>=0&&(t=Math.max(t,this.positions[s]+this.children[s].length+this.from)),new j.Tree(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,r,n)=>new j.Tree(j.NodeType.none,i,r,n,this.hashProp)})}},h;(function(a){a[a.Document=1]="Document",a[a.CodeBlock=2]="CodeBlock",a[a.FencedCode=3]="FencedCode",a[a.Blockquote=4]="Blockquote",a[a.HorizontalRule=5]="HorizontalRule",a[a.BulletList=6]="BulletList",a[a.OrderedList=7]="OrderedList",a[a.ListItem=8]="ListItem",a[a.ATXHeading1=9]="ATXHeading1",a[a.ATXHeading2=10]="ATXHeading2",a[a.ATXHeading3=11]="ATXHeading3",a[a.ATXHeading4=12]="ATXHeading4",a[a.ATXHeading5=13]="ATXHeading5",a[a.ATXHeading6=14]="ATXHeading6",a[a.SetextHeading1=15]="SetextHeading1",a[a.SetextHeading2=16]="SetextHeading2",a[a.HTMLBlock=17]="HTMLBlock",a[a.LinkReference=18]="LinkReference",a[a.Paragraph=19]="Paragraph",a[a.CommentBlock=20]="CommentBlock",a[a.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",a[a.Escape=22]="Escape",a[a.Entity=23]="Entity",a[a.HardBreak=24]="HardBreak",a[a.Emphasis=25]="Emphasis",a[a.StrongEmphasis=26]="StrongEmphasis",a[a.Link=27]="Link",a[a.Image=28]="Image",a[a.InlineCode=29]="InlineCode",a[a.HTMLTag=30]="HTMLTag",a[a.Comment=31]="Comment",a[a.ProcessingInstruction=32]="ProcessingInstruction",a[a.Autolink=33]="Autolink",a[a.HeaderMark=34]="HeaderMark",a[a.QuoteMark=35]="QuoteMark",a[a.ListMark=36]="ListMark",a[a.LinkMark=37]="LinkMark",a[a.EmphasisMark=38]="EmphasisMark",a[a.CodeMark=39]="CodeMark",a[a.CodeText=40]="CodeText",a[a.CodeInfo=41]="CodeInfo",a[a.LinkTitle=42]="LinkTitle",a[a.LinkLabel=43]="LinkLabel",a[a.URL=44]="URL"})(h||(h={}));var ha=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},ma=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Ke(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,s=0){for(let i=t;i<e;i++)s+=this.text.charCodeAt(i)==9?4-s%4:1;return s}findColumn(e){let t=0;for(let s=0;t<this.text.length&&s<e;t++)s+=this.text.charCodeAt(t)==9?4-s%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}};function Xs(a,e,t){if(t.pos==t.text.length||a!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let s=(a.type==h.OrderedList?xa:wa)(t,e,!1);return s>0&&(a.type!=h.BulletList||ya(t,e,!1)<0)&&t.text.charCodeAt(t.pos+s-1)==a.value}var Ms={[h.Blockquote](a,e,t){return t.next!=62?!1:(t.markers.push(y(h.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(ie(t.text.charCodeAt(t.pos+1))?2:1)),a.end=e.lineStart+t.text.length,!0)},[h.ListItem](a,e,t){return t.indent<t.baseIndent+a.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+a.value),!0)},[h.OrderedList]:Xs,[h.BulletList]:Xs,[h.Document](){return!0}};function ie(a){return a==32||a==9||a==10||a==13}function Ke(a,e=0){for(;e<a.length&&ie(a.charCodeAt(e));)e++;return e}function _s(a,e,t){for(;e>t&&ie(a.charCodeAt(e-1));)e--;return e}function Vs(a){if(a.next!=96&&a.next!=126)return-1;let e=a.pos+1;for(;e<a.text.length&&a.text.charCodeAt(e)==a.next;)e++;if(e<a.pos+3)return-1;if(a.next==96){for(let t=e;t<a.text.length;t++)if(a.text.charCodeAt(t)==96)return-1}return e}function qs(a){return a.next!=62?-1:a.text.charCodeAt(a.pos+1)==32?2:1}function ya(a,e,t){if(a.next!=42&&a.next!=45&&a.next!=95)return-1;let s=1;for(let i=a.pos+1;i<a.text.length;i++){let r=a.text.charCodeAt(i);if(r==a.next)s++;else if(!ie(r))return-1}return t&&a.next==45&&Gs(a)>-1&&a.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(Fs.SetextHeading)>-1||s<3?-1:1}function Ws(a,e){for(let t=a.stack.length-1;t>=0;t--)if(a.stack[t].type==e)return!0;return!1}function wa(a,e,t){return(a.next==45||a.next==43||a.next==42)&&(a.pos==a.text.length-1||ie(a.text.charCodeAt(a.pos+1)))&&(!t||Ws(e,h.BulletList)||a.skipSpace(a.pos+2)<a.text.length)?1:-1}function xa(a,e,t){let s=a.pos,i=a.next;for(;i>=48&&i<=57;){s++;if(s==a.text.length)return-1;i=a.text.charCodeAt(s)}return s==a.pos||s>a.pos+9||i!=46&&i!=41||s<a.text.length-1&&!ie(a.text.charCodeAt(s+1))||t&&!Ws(e,h.OrderedList)&&(a.skipSpace(s+1)==a.text.length||s>a.pos+1||a.next!=49)?-1:s+1-a.pos}function Is(a){if(a.next!=35)return-1;let e=a.pos+1;for(;e<a.text.length&&a.text.charCodeAt(e)==35;)e++;if(e<a.text.length&&a.text.charCodeAt(e)!=32)return-1;let t=e-a.pos;return t>6?-1:t}function Gs(a){if(a.next!=45&&a.next!=61||a.indent>=a.baseIndent+4)return-1;let e=a.pos+1;for(;e<a.text.length&&a.text.charCodeAt(e)==a.next;)e++;let t=e;for(;e<a.text.length&&ie(a.text.charCodeAt(e));)e++;return e==a.text.length?t:-1}var fa=/^[ \t]*$/,Us=/-->/,Ns=/\?>/,ga=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Us],[/^\s*<\?/,Ns],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,fa],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,fa]];function Bs(a,e,t){if(a.next!=60)return-1;let s=a.text.slice(a.pos);for(let i=0,r=ga.length-(t?1:0);i<r;i++)if(ga[i][0].test(s))return i;return-1}function Cs(a,e){let t=a.countIndent(e,a.pos,a.indent),s=a.countIndent(a.skipSpace(e),e,t);return s>=t+5?t+1:s}function ye(a,e,t){let s=a.length-1;s>=0&&a[s].to==e&&a[s].type==h.CodeText?a[s].to=t:a.push(y(h.CodeText,e,t))}var $t={LinkReference:void 0,IndentedCode(a,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let s=e.findColumn(t),i=a.lineStart+s,r=a.lineStart+e.text.length,n=[],o=[];for(ye(n,i,r);a.nextLine()&&e.depth>=a.stack.length;)if(e.pos==e.text.length){ye(o,a.lineStart-1,a.lineStart);for(let l of e.markers)o.push(l)}else{if(e.indent<t)break;{if(o.length){for(let O of o)O.type==h.CodeText?ye(n,O.from,O.to):n.push(O);o=[]}ye(n,a.lineStart-1,a.lineStart);for(let O of e.markers)n.push(O);r=a.lineStart+e.text.length;let l=a.lineStart+e.findColumn(e.baseIndent+4);l<r&&ye(n,l,r)}}return o.length&&(o=o.filter(l=>l.type!=h.CodeText),o.length&&(e.markers=o.concat(e.markers))),a.addNode(a.buffer.writeElements(n,-i).finish(h.CodeBlock,r-i),i),!0},FencedCode(a,e){let t=Vs(e);if(t<0)return!1;let s=a.lineStart+e.pos,i=e.next,r=t-e.pos,n=e.skipSpace(t),o=_s(e.text,e.text.length,n),l=[y(h.CodeMark,s,s+r)];n<o&&l.push(y(h.CodeInfo,a.lineStart+n,a.lineStart+o));for(let O=!0,c=!0,d=!1;a.nextLine()&&e.depth>=a.stack.length;O=!1){let p=e.pos;if(e.indent-e.baseIndent<4)for(;p<e.text.length&&e.text.charCodeAt(p)==i;)p++;if(p-e.pos>=r&&e.skipSpace(p)==e.text.length){for(let u of e.markers)l.push(u);c&&d&&ye(l,a.lineStart-1,a.lineStart),l.push(y(h.CodeMark,a.lineStart+e.pos,a.lineStart+p)),a.nextLine();break}else{d=!0,O||(ye(l,a.lineStart-1,a.lineStart),c=!1);for(let f of e.markers)l.push(f);let u=a.lineStart+e.basePos,g=a.lineStart+e.text.length;u<g&&(ye(l,u,g),c=!1)}}return a.addNode(a.buffer.writeElements(l,-s).finish(h.FencedCode,a.prevLineEnd()-s),s),!0},Blockquote(a,e){let t=qs(e);return t<0?!1:(a.startContext(h.Blockquote,e.pos),a.addNode(h.QuoteMark,a.lineStart+e.pos,a.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(a,e){if(ya(e,a,!1)<0)return!1;let t=a.lineStart+e.pos;return a.nextLine(),a.addNode(h.HorizontalRule,t),!0},BulletList(a,e){let t=wa(e,a,!1);if(t<0)return!1;a.block.type!=h.BulletList&&a.startContext(h.BulletList,e.basePos,e.next);let s=Cs(e,e.pos+1);return a.startContext(h.ListItem,e.basePos,s-e.baseIndent),a.addNode(h.ListMark,a.lineStart+e.pos,a.lineStart+e.pos+t),e.moveBaseColumn(s),null},OrderedList(a,e){let t=xa(e,a,!1);if(t<0)return!1;a.block.type!=h.OrderedList&&a.startContext(h.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let s=Cs(e,e.pos+t);return a.startContext(h.ListItem,e.basePos,s-e.baseIndent),a.addNode(h.ListMark,a.lineStart+e.pos,a.lineStart+e.pos+t),e.moveBaseColumn(s),null},ATXHeading(a,e){let t=Is(e);if(t<0)return!1;let s=e.pos,i=a.lineStart+s,r=_s(e.text,e.text.length,s),n=r;for(;n>s&&e.text.charCodeAt(n-1)==e.next;)n--;(n==r||n==s||!ie(e.text.charCodeAt(n-1)))&&(n=e.text.length);let o=a.buffer.write(h.HeaderMark,0,t).writeElements(a.parser.parseInline(e.text.slice(s+t+1,n),i+t+1),-i);n<e.text.length&&o.write(h.HeaderMark,n-s,r-s);let l=o.finish(h.ATXHeading1-1+t,e.text.length-s);return a.nextLine(),a.addNode(l,i),!0},HTMLBlock(a,e){let t=Bs(e,a,!1);if(t<0)return!1;let s=a.lineStart+e.pos,i=ga[t][1],r=[],n=i!=fa;for(;!i.test(e.text)&&a.nextLine();){if(e.depth<a.stack.length){n=!1;break}for(let O of e.markers)r.push(O)}n&&a.nextLine();let o=i==Us?h.CommentBlock:i==Ns?h.ProcessingInstructionBlock:h.HTMLBlock,l=a.prevLineEnd();return a.addNode(a.buffer.writeElements(r,-s).finish(o,l-s),s),!0},SetextHeading:void 0},Qa=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,s){if(this.stage==-1)return!1;let i=s.content+`
2`+t.scrub(),r=this.advance(i);return r>-1&&r<i.length?this.complete(e,s,r):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Ke(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,s){return e.addLeafElement(t,y(h.LinkReference,this.start,this.start+s,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(si(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(y(h.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(ti(e,Ke(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Ke(e,this.pos),s=0;if(t>this.pos){let i=ai(e,t,this.start);if(i){let r=pa(e,i.to-this.start);r>0&&(this.nextStage(i),s=r)}}return s||(s=pa(e,this.pos)),s>0&&s<e.length?s:-1}else return pa(e,this.pos)}}};function pa(a,e){for(;e<a.length;e++){let t=a.charCodeAt(e);if(t==10)break;if(!ie(t))return-1}return e}var Sa=class{nextLine(e,t,s){let i=t.depth<e.stack.length?-1:Gs(t),r=t.next;if(i<0)return!1;let n=y(h.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(s,y(r==61?h.SetextHeading1:h.SetextHeading2,s.start,e.prevLineEnd(),[...e.parser.parseInline(s.content,s.start),n])),!0}finish(){return!1}},Fs={LinkReference(a,e){return e.content.charCodeAt(0)==91?new Qa(e):null},SetextHeading(){return new Sa}},Vn=[(a,e)=>Is(e)>=0,(a,e)=>Vs(e)>=0,(a,e)=>qs(e)>=0,(a,e)=>wa(e,a,!0)>=0,(a,e)=>xa(e,a,!0)>=0,(a,e)=>ya(e,a,!0)>=0,(a,e)=>Bs(e,a,!0)>=0],qn={text:"",end:0},va=class{constructor(e,t,s,i){this.parser=e,this.input=t,this.ranges=i,this.line=new ma,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=kt.create(h.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=s.length?new ka(s,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let s=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;s<e.markers.length&&(!i||e.markers[s].from<i.end);){let r=e.markers[s++];this.addNode(r.type,r.from,r.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let s of this.parser.blockParsers)if(s){let i=s(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new ha(this.lineStart+e.pos,e.text.slice(e.pos));for(let s of this.parser.leafBlockParsers)if(s){let i=s(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let s of this.parser.endLeafBlock)if(s(this,e,t))break e}for(let s of t.parsers)if(s.nextLine(this,e,t))return null;t.content+=`
3`+e.scrub();for(let s of e.markers)t.marks.push(s)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=ii(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=qn;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let s=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let r=this.ranges[i].from,n=this.lineChunkAt(r);t.end=r+n.length,t.text=t.text.slice(0,this.ranges[i-1].to-s)+n,s=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:s}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=s,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],r=this.parser.skipContextMarkup[i.type];if(!r)throw new Error("Unhandled block context "+h[i.type]);let n=this.line.markers.length;if(!r(i,this,e)){this.line.markers.length>n&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),s;if(this.input.lineChunks)s=t==`
4`?"":t;else{let i=t.indexOf(`

Callers 2

renderSkillkitCtaMethod · 0.85
renderNoSkillkitMethod · 0.85

Calls 2

vsFunction · 0.85
openExternalMethod · 0.80

Tested by

no test coverage detected