@skill-map/cli 0.50.0 → 0.50.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.
@@ -1,4 +1,4 @@
1
- import{a as Nt,c as Lt,d as y,e as Rt}from"./chunk-OYCCFH2S.js";import{A as jt,a as vt,b as xt,c as Ct,d as wt,h as kt,o as St,p as Pt,q as Et,r as Mt,s as Tt,t as Ot,u as ce,v as de,w as It,x as Ft,y as Te,z as Oe}from"./chunk-4N5LGWJ4.js";import{B as Pe,C as Ee,N as yt,R as Me,S as le,V as X,W as U,c as oe,ca as Dt,ea as At,fa as Ie,j as ye,k as ke,m as ht,p as _t,q as Se,s as re,t as se,u as ae,v as ft,x as he,y as bt}from"./chunk-DOWLJNMD.js";import"./chunk-4SG4352Z.js";import{h as ut,i as mt}from"./chunk-WMGW2UAL.js";import{$ as et,$a as K,Ab as at,Db as L,Dc as ze,Ea as nt,Eb as W,Ec as pt,Fa as J,Fb as w,Ha as o,Hb as d,J as Qe,K as be,Kb as lt,L as Ye,Lb as ct,Mb as ve,N as Je,Nb as xe,P as k,Sb as Ve,Tb as G,U as Ze,Ub as dt,V as E,Vb as me,W as M,Wa as z,Wb as l,Xa as it,Xb as f,Yb as p,Za as ot,Zb as R,_a as rt,ba as tt,fc as ie,ga as u,hc as gt,ia as B,ib as v,ka as Re,lb as m,mb as h,nb as st,ob as q,oc as Ce,pb as A,qb as N,rb as _,rc as b,sb as c,sc as we,tb as a,tc as $,ub as O,vb as x,wb as C,xb as ne}from"./chunk-VJ57LHDR.js";import{a as H,b as Y}from"./chunk-WCABR6TI.js";function kn(t,r){if(t&1&&(x(0,"p",6),l(1),C()),t&2){let e=d();o(),R(" ",e.texts.aboutErrorPrefix," ",e.loadError()," ")}}var Vt=(()=>{class t{dataSource=k(X);updateCheck=k(Lt);theme=k(Ie);visible=$.required();texts=y;health=u(null);loadError=u(null);markSrc=b(()=>this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");cliVersion=b(()=>this.updateCheck.current()??this.health()?.implVersion??this.texts.aboutUnknown);specVersion=b(()=>this.health()?.specVersion??this.texts.aboutLoading);schemaVersion=b(()=>this.health()?.schemaVersion??this.texts.aboutLoading);cwd=b(()=>this.health()?.cwd??this.texts.aboutLoading);dbDisplay=b(()=>{let e=this.health();return e?this.texts.aboutDbValue(e.db,Sn(e.dbPath,e.cwd)):this.texts.aboutLoading});constructor(){B(()=>{this.visible()&&this.health()===null&&this.load()})}async load(){this.loadError.set(null);try{let e=await this.dataSource.health();this.health.set(e)}catch(e){let i=e instanceof U||e instanceof Error?e.message:String(e);this.loadError.set(i)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-about"]],inputs:{visible:[1,"visible"]},decls:57,vars:25,consts:[["aria-labelledby","settings-about-heading","data-testid","settings-about",1,"settings-about"],[1,"settings-about__header"],["alt","","aria-hidden","true","data-testid","settings-about-logo",1,"settings-about__logo",3,"src"],[1,"settings-about__heading-text"],["id","settings-about-heading",1,"settings-about__title"],[1,"settings-about__intro"],["data-testid","settings-about-error",1,"settings-about__error"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-star",1,"settings-about__star",3,"href"],["aria-hidden","true",1,"fa-solid","fa-star","settings-about__star-icon"],[1,"settings-about__star-text"],[1,"settings-about__star-heading"],[1,"settings-about__star-body"],[1,"settings-about__star-cta"],["aria-hidden","true",1,"fa-solid","fa-star"],[1,"settings-about__list"],[1,"settings-about__row"],[1,"settings-about__label"],[1,"settings-about__value"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-website",1,"settings-about__link",3,"href"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-github",1,"settings-about__link",3,"href"],["data-testid","settings-about-cli",1,"settings-about__value"],["data-testid","settings-about-spec",1,"settings-about__value"],["data-testid","settings-about-schema",1,"settings-about__value"],["data-testid","settings-about-cwd",1,"settings-about__value"],["data-testid","settings-about-db",1,"settings-about__value"]],template:function(i,n){i&1&&(x(0,"section",0)(1,"header",1),ne(2,"img",2),x(3,"div",3)(4,"h2",4),l(5),C(),x(6,"p",5),l(7),C()()(),m(8,kn,2,2,"p",6),x(9,"a",7),ne(10,"i",8),x(11,"span",9)(12,"span",10),l(13),C(),x(14,"span",11),l(15),C()(),x(16,"span",12),ne(17,"i",13),l(18),C()(),x(19,"dl",14)(20,"div",15)(21,"dt",16),l(22),C(),x(23,"dd",17)(24,"a",18),l(25),C()()(),x(26,"div",15)(27,"dt",16),l(28),C(),x(29,"dd",17)(30,"a",19),l(31),C()()(),x(32,"div",15)(33,"dt",16),l(34),C(),x(35,"dd",20),l(36),C()(),x(37,"div",15)(38,"dt",16),l(39),C(),x(40,"dd",21),l(41),C()(),x(42,"div",15)(43,"dt",16),l(44),C(),x(45,"dd",22),l(46),C()(),x(47,"div",15)(48,"dt",16),l(49),C(),x(50,"dd",23),l(51),C()(),x(52,"div",15)(53,"dt",16),l(54),C(),x(55,"dd",24),l(56),C()()()()),i&2&&(o(2),W("src",n.markSrc(),J),o(3),p(" ",n.texts.aboutHeading," "),o(2),f(n.texts.aboutIntro),o(),h(n.loadError()?8:-1),o(),W("href",n.texts.aboutGithubUrl,J),v("aria-label",n.texts.aboutStarA11y),o(4),f(n.texts.aboutStarHeading),o(2),f(n.texts.aboutStarBody),o(3),p(" ",n.texts.aboutStarCta," "),o(4),f(n.texts.aboutWebsiteLabel),o(2),W("href",n.texts.aboutWebsiteUrl,J),o(),f(n.texts.aboutWebsiteUrl),o(3),f(n.texts.aboutGithubLabel),o(2),W("href",n.texts.aboutGithubUrl,J),o(),f(n.texts.aboutGithubUrl),o(3),f(n.texts.aboutCliLabel),o(2),p(" ",n.cliVersion()," "),o(3),f(n.texts.aboutSpecLabel),o(2),p(" ",n.specVersion()," "),o(3),f(n.texts.aboutSchemaLabel),o(2),p(" ",n.schemaVersion()," "),o(3),f(n.texts.aboutFolderLabel),o(2),p(" ",n.cwd()," "),o(3),f(n.texts.aboutDbLabel),o(2),p(" ",n.dbDisplay()," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-about[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.settings-about__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.settings-about__logo[_ngcontent-%COMP%]{width:64px;height:64px;flex-shrink:0}.settings-about__heading-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:0}.settings-about__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-about__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-about__error[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:var(--p-border-radius);background:var(--p-message-error-background);color:var(--p-message-error-color);font-size:.875rem}.settings-about__list[_ngcontent-%COMP%]{margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-about__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:180px 1fr;align-items:baseline;gap:.75rem;padding:.5rem .75rem;border-radius:var(--p-border-radius)}.settings-about__row[_ngcontent-%COMP%]:nth-child(odd){background:var(--p-content-hover-background)}.settings-about__label[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-muted-color)}.settings-about__value[_ngcontent-%COMP%]{margin:0;font-family:var(--p-monospace-font-family);font-size:.875rem;word-break:break-all}.settings-about__link[_ngcontent-%COMP%]{color:var(--p-primary-color);text-decoration:none}.settings-about__link[_ngcontent-%COMP%]:hover, .settings-about__link[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.settings-about__star[_ngcontent-%COMP%]{--star-accent: #f4b400;display:flex;align-items:center;gap:.875rem;padding:.875rem 1rem;border-radius:var(--p-border-radius);border:1px solid color-mix(in oklab,var(--star-accent) 45%,transparent);background:color-mix(in oklab,var(--star-accent) 12%,transparent);color:var(--p-text-color);text-decoration:none;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}.settings-about__star[_ngcontent-%COMP%]:hover, .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 22%,transparent);border-color:color-mix(in oklab,var(--star-accent) 70%,transparent);transform:translateY(-1px);outline:none}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 18%,transparent);border-color:color-mix(in oklab,var(--star-accent) 55%,transparent)}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 30%,transparent);border-color:var(--star-accent)}.settings-about__star-icon[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--star-accent);flex-shrink:0}.settings-about__star-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-about__star-heading[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.settings-about__star-body[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-text-muted-color);line-height:1.4}.settings-about__star-cta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-radius:var(--sm-radius-pill);background:var(--star-accent);color:#1a1a1a;font-weight:600;font-size:.8125rem;white-space:nowrap;flex-shrink:0}.settings-about__star[_ngcontent-%COMP%]:hover .settings-about__star-cta[_ngcontent-%COMP%], .settings-about__star[_ngcontent-%COMP%]:focus-visible .settings-about__star-cta[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 88%,white)}"],changeDetection:0})}return t})();function Sn(t,r){if(!t||!r)return t;let e=r.replace(/[/\\]+$/,"");return t.startsWith(e)?t.slice(e.length).replace(/^[/\\]+/,""):t}var Fe=(()=>{class t{ownerSig=u(null);dirtyCount=b(()=>{let e=this.ownerSig();return e?e.dirtyIds().size:0});register(e){this.ownerSig.set(e)}deregister(e){this.ownerSig()===e&&this.ownerSig.set(null)}async applyChanges(){let e=this.ownerSig();return e?e.applyChanges():{ok:!1}}discardChanges(){this.ownerSig()?.discardChanges()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var zt={schemaVersion:1,entries:[{version:"0.50.0",date:"2026-06-02",kind:"user-facing",highlights:[{body:`The Files and Map tabs are gone: skill-map opens on one screen, file tree left, graph right. Tick files or folders (or the 0/1/2 depth buttons) to pick what the map shows; the tree's map icon isolates a node's whole chain. "Re-arrange layout" tidies just what's visible.`,packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.49.0",date:"2026-06-02",kind:"user-facing",highlights:[{body:"**New workspace view**: the file list, graph, and inspector now share one screen. Drag the divider to resize the file rail, click a file to focus its node on the map, and use the tree checkboxes to choose which nodes the map shows (`Show all` clears the selection).",packages:["@skill-map/cli"]}]},{version:"0.48.0",date:"2026-05-31",kind:"user-facing",highlights:[{body:"**Card footer icon order restored.** The status icons in the bottom-right of each card are back to their previous order: lifecycle/stability first, then the stale indicator, then warnings and errors on the far right.",packages:["@skill-map/cli"]},{body:"`sm plugins create` now takes the extension kind as a required first argument: `sm plugins create <kind> <plugin-id>` (kinds: provider, extractor, analyzer, action, formatter, hook). Previously it only scaffolded extractors.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"After `sm tutorial`, start the tutorial by typing `run the tutorial` (or `ejecuta el tutorial`), matching the website. The master tutorial uses `run the master tutorial` / `ejecuta el tutorial maestro`.",packages:["@skill-map/cli"]}]},{version:"0.47.1",date:"2026-05-31",kind:"internal",highlights:[]},{version:"0.47.0",date:"2026-05-31",kind:"user-facing",highlights:[{body:"skill-map now notices when your local DB schema is out of date (not just an older version): `sm scan` and `sm serve` offer to rebuild the cache, and read commands warn instead of failing with a confusing database error.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Settings \u2192 Plugins now has a unified filter bar (All, then Built-in / Project, then the kinds), so you can quickly isolate your project's own plugins and extensions from the built-ins.",packages:["@skill-map/cli"]},{body:"**Pick your tokenizer.** `tokenizer` in settings.json now selects the encoder for token counts: `cl100k_base` (default, GPT-4) or `o200k_base` (GPT-4o). Any other value is ignored with a warning. Changing it recomputes counts on the next scan.",packages:["@skill-map/cli","@skill-map/spec"]},{body:'When the dev server stops, the UI now shows a "connection lost" banner with a Reconnect button instead of failing silently, and it refreshes automatically once the connection is back.',packages:["@skill-map/cli"]}]},{version:"0.46.0",date:"2026-05-31",kind:"user-facing",highlights:[{body:"`sm scan` no longer glues the `Auto-detected activeProvider` notice onto the results line. The auto-detect message now prints on its own line, right above the scan summary.",packages:["@skill-map/cli"]},{body:"`sm plugins --help` (and `db`, `config`, `job`, and the other command groups) now print a tidy overview with a one-line description and a list of their subcommands, matching the look of `sm scan --help`, instead of a terse internal list.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Config cleanup.** Several settings.json keys that never did anything (`i18n`, `providers`, `history`, `autoMigrate`, `scan.followSymlinks`, per-plugin `config` / `extensions`) were removed. If still present they are now ignored and reported with a warning on load.",packages:["@skill-map/cli","@skill-map/spec"]},{body:'`sm plugins list` / `show` and the Settings \u2192 Plugins UI now consistently say "plugin" instead of "bundle". The only place "bundle" remains is the name for toggling a whole plugin (all its extensions) at once.',packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.45.1",date:"2026-05-30",kind:"internal",highlights:[]},{version:"0.45.0",date:"2026-05-30",kind:"user-facing",highlights:[{body:"`sm tutorial` can now target other agents: `--for agent-skills` (open-standard layout, used by Antigravity and OpenAI Codex) or `--for claude` (default). It now requires an empty directory: run it in a fresh folder, or pass `--force` to seed into the current one.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.44.0",date:"2026-05-30",kind:"user-facing",highlights:[{body:"Under the Antigravity lens, `sm scan` now warns when a `.agents/skills` skill shadows a built-in `agy` slash command (e.g. a skill named `goal` collides with `/goal`), so you can rename it before the runtime silently ignores the file.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"skill-map can now report crashes anonymously to help fix bugs, and it is OFF by default. Turn it on or off in Settings, or set `SKILL_MAP_TELEMETRY=0` to force it off. File contents, paths, and your settings are never sent.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"skill-map can now share anonymous usage (which commands and views you use) to guide development, OFF by default. Toggle CLI usage, UI usage, and error reports independently in Settings, or set `SKILL_MAP_TELEMETRY=0` to force all off. Files and paths are never sent.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.43.0",date:"2026-05-29",kind:"user-facing",highlights:[{body:"The skill-map website and in-app links (Settings, About and the demo banner) now point to **skill-map.ai** (previously skill-map.dev). Spec schema URLs are now `https://skill-map.ai/spec/v0/...`.",packages:["@skill-map/cli","@skill-map/spec","@skill-map/web"]},{body:"Claude skills and commands now show their `disallowed-tools` in the inspector. Tags come only from `.sm` sidecars now: the `sm list --tag-source` flag is removed and cards show a single tag style. Agent Skills `license` / `compatibility` / `metadata` fields are recognized.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"After updating skill-map, the next `sm scan` rebuilds the local database when it was created by an older version (your `.sm` sidecar files are never touched). On a terminal it asks first; pass `--yes` to skip the prompt.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.42.0",date:"2026-05-28",kind:"user-facing",highlights:[{body:"The lens picker in **Settings \u2192 Project** now lists exactly the providers installed in your project. The phantom **Gemini** and **Cursor** options are gone, and **OpenAI Codex** / **Antigravity** now show their correct name and colour on node cards.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.41.0",date:"2026-05-27",kind:"user-facing",highlights:[{body:"New `--max-nodes <N>` on `sm scan` / `sm watch` / `sm serve` caps how many files the walker accepts (default 256, bidirectional). Past the limit, a persistent banner links to **Settings \u2192 Project** to trim `.skillmapignore`.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm -version` and `sm -help` now suggest `--version` / `--help` consistently, even from a directory with no skill-map project.",packages:["@skill-map/cli"]}]},{version:"0.40.1",date:"2026-05-26",kind:"user-facing",highlights:[{body:"Update chip copies the install command on click. Settings copy polished across General + Project. Path is now the second column in the list view. Filtered-empty views unified across List + Graph with a Reset button. Matrix theme retints dropdowns and toggle buttons.",packages:["@skill-map/cli"]}]},{version:"0.40.0",date:"2026-05-26",kind:"user-facing",highlights:[{body:"**Changelog tab is now bounded.** The Settings \u2192 Changelog tab shows the most recent 10 releases and links out to the full changelog on GitHub for older entries.",packages:["@skill-map/cli"]},{body:"Plugins no longer have a bundle-level switch; each extension toggles on its own. `sm plugins disable <bundle>` cascades across the bundle's extensions (multi-extension bundles need `--yes`). The kind filter narrows extensions inside matched bundles instead of leaking siblings.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Cleaner Plugins view.** Settings \u2192 Plugins and `sm plugins show <bundle>` no longer print a per-extension version chip for built-in plugins (they all share the CLI version). External (user-authored) plugins are unchanged and still show per-extension semver.",packages:["@skill-map/cli"]},{body:'`sm scan` summary now splits findings per severity (`N errors \xB7 M warnings \xB7 K info`), colored and collapsed when zero. The graph view gains a third palette to filter cards with errors / warnings; the perf-HUD says "links" instead of "edges".',packages:["@skill-map/cli"]},{body:"**List view** is live. Click **List** in the topbar for a sortable, filterable table of every node (Kind, Name, Tags, Path, Tokens, Stability, Stale, Issues). Click a row to inspect on the graph. Graph card chips now share the same icons as the list.",packages:["@skill-map/cli"]},{body:'Graph cards drop the corner badge for routine warnings; count + tooltip stay on the footer chip. Broken refs now escalate `sm scan` to exit 1 (were exit 0). `sm init` prints the "no provider markers" advisory as a two-line yellow `\u26A0` block.',packages:["@skill-map/cli","@skill-map/spec"]},{body:'`sm check --analyzers <id>` now errors with the valid id list when mistyped, instead of silently saying "No issues." `/invoke` and `@mention` links from any markdown body now contribute to the target\'s `IN`. `sm plugins doctor` summary spells out its bundle + extension split.',packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.39.0",date:"2026-05-25",kind:"user-facing",highlights:[{body:"Renamed `core/field-unknown` to `core/annotation-field-unknown` so the sidecar typo-guard rule groups with the other `core/annotation-*` rules. Update references in `settings.json` or `sm check --analyzers <id>` to the new name.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Renamed 14 built-in extension ids to a `<area>-<detail>` shape (e.g. `core/broken-ref` is now `core/reference-broken`). If you reference these by qualified id in `settings.json` or via `sm check --analyzers <id>`, update to the new names.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"In dev builds the topbar and the `sm serve` banner now show only the `dev` marker instead of pairing it with the published version number.",packages:["@skill-map/cli"]},{body:"When a scan adds or removes nodes, the graph view animates the camera to frame the new layout, refreshes auto positions so nodes never land on top of each other, and keeps your manually-dragged pins where you put them.",packages:["@skill-map/cli"]},{body:"`sm` log lines now lead with a coloured glyph per level (`\u26A0 WARN`, `\u2715 ERROR`, `\u2139 INFO`) so advisories stand out from the rest of the output.",packages:["@skill-map/cli"]},{body:"In Settings, expanding a bundle plugin (claude, antigravity, openai, agent-skills) now shows the correct per-extension state and the toggles persist, the next scan honours them. `sm plugins list` reflects effective state too.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Plugins always list `core` first across CLI, BFF, and Settings; the project path stays visible in the topbar (truncated with `\u2026` on the LEFT so the project name reaches the eye); and the SPA reconnects on its own when `sm serve` restarts.",packages:["@skill-map/cli"]},{body:'`sm list` IN counts and the inspector\'s "Linked nodes \u2192 INCOMING" now include every `@mention` and `/invoke`, not just markdown links. `sm plugins doctor` no longer raises a spurious `claude/agent` warning on a clean install.',packages:["@skill-map/cli"]}]},{version:"0.38.0",date:"2026-05-24",kind:"user-facing",highlights:[{body:"`sm <verb> --json` now also suppresses info banners on stderr, keeping both streams clean for piping into `jq`.",packages:["@skill-map/cli"]}]},{version:"0.37.0",date:"2026-05-23",kind:"user-facing",highlights:[{body:"`sm scan` now warns once when provider markers on disk drifted since `activeProvider` was set (e.g. you added `.codex/` after picking the `claude` lens). Run `sm config set activeProvider <id>` to switch the lens, or ignore the warn and keep going, it never blocks the scan.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Clearer CLI errors.** Errors from `sm serve`, `bump`, `db`, `plugins`, `refresh`, `list`, `watch`, `graph`, `hooks`, and `sidecar` now print a `\u2715` headline plus a dim hint on the next line. Fixes a `sm refresh` persist-failure that rendered `{{glyph}}` literally.",packages:["@skill-map/cli"]},{body:"`sm` now detects when the local `.skill-map/` DB was written by an incompatible CLI version: newer minor or different major refuses to open with a clear hint; older same-major prints a one-shot warning and continues. Defensive parse errors include the same hint.",packages:["@skill-map/cli"]},{body:'`sm init --force` now also resets the DB (was overwriting only the config files). Solves the "Failed to read scan rows" crash on the first auto-scan when re-initialising a project that already had a DB from an older CLI version.',packages:["@skill-map/cli"]},{body:"**Two scan-time bugs fixed.** Resolved `/slash` and `@mention` links now correctly land at confidence `1.0` (were stuck at the emit floor), and the markdown-link extractor no longer flags `[label](path)` shown inside backticks or fenced code blocks as broken references.",packages:["@skill-map/cli"]},{body:"Cross-provider files (e.g. a `.codex/agents/*.toml` while the lens is `claude`) are no longer claimed by the foreign provider. They surface as plain markdown / unclassified instead, matching how the agent itself would see them at runtime.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Card chips for incoming / outgoing links no longer count self-loops, so a node that links back to itself stops showing inflated 1 in / 1 out. The `core/self-loop` analyzer still surfaces the self-reference as a warning, only the misleading count goes away.",packages:["@skill-map/cli"]},{body:"**CLI + inspector polish.** `sm init` now prompts for the active lens when markers compete; `sm config set activeProvider` rejects unknown ids upfront; error blocks across the CLI gain a `\u2715` glyph + hint; the inspector hides self-loops and paints kinds in their canonical colour.",packages:["@skill-map/cli"]},{body:'**Inspector overhaul.** Links show numeric confidence, a Findings list, per-row issue chips, and per-site "Occurs at" lines. New "External references" section. Self-loops hidden by default. Two new analyzers flag redundant multi-form references and self-loops.',packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm scan` now warns when two extractors detect overlapping byte ranges. The graph keeps the winner; the issue panel explains which detection lost and why, so a markdown link wrapping an `@`-directive no longer looks like silent disappearing intent.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.36.0",date:"2026-05-22",kind:"user-facing",highlights:[{body:"**Gemini CLI support retired.** Antigravity CLI projects (Google's May 2026 replacement) scan via the open-standard `.agents/skills/` paths under the existing `agent-skills` lens. Run `sm config set activeProvider antigravity` to flag a project as Antigravity-flavoured.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Files whose name shadows a built-in are flagged.** A file like `.claude/commands/help.md` now emits a `warn` (Claude's runtime ignores it for its own `/help`), and incoming `/help` edges resolve to it at confidence `0.1` instead of `1.0`.",packages:["@skill-map/cli","@skill-map/spec"]}]}]};var Bt=zt;var En=(t,r)=>r.version;function Mn(t,r){if(t&1&&(x(0,"p",3),l(1),C()),t&2){let e=d();o(),p(" ",e.texts.changelogEmpty," ")}}function Tn(t,r){if(t&1&&(x(0,"p",12),l(1),C()),t&2){let e=d(3);o(),p(" ",e.texts.changelogInternalRelease," ")}}function On(t,r){if(t&1&&(x(0,"li",17),l(1),C()),t&2){let e=r.$implicit;o(),f(e)}}function In(t,r){if(t&1&&(x(0,"ul",16),A(1,On,2,1,"li",17,q),C()),t&2){let e=d().$implicit,i=d(4);v("aria-label",i.texts.changelogAffectedPackages),o(),N(e.packages)}}function Fn(t,r){if(t&1&&(x(0,"li",14),ne(1,"div",15),m(2,In,3,1,"ul",16),C()),t&2){let e=r.$implicit;o(),W("innerHTML",e.bodyHtml,nt),o(),h(e.packages.length?2:-1)}}function jn(t,r){if(t&1&&(x(0,"ul",13),A(1,Fn,3,2,"li",14,st),C()),t&2){let e=d().$implicit;o(),N(e.highlights)}}function Dn(t,r){if(t&1&&(x(0,"li",8)(1,"header",9)(2,"span",10),l(3),C(),x(4,"span",11),l(5),C()(),m(6,Tn,2,1,"p",12)(7,jn,3,0,"ul",13),C()),t&2){let e=r.$implicit;G("settings-changelog__entry--internal",e.kind==="internal"),v("data-testid","settings-changelog-entry-"+e.version),o(3),p("v",e.version),o(2),f(e.date),o(),h(e.kind==="internal"?6:7)}}function An(t,r){if(t&1&&(x(0,"ol",4),A(1,Dn,8,6,"li",7,En),C()),t&2){let e=d();o(),N(e.entries())}}var Nn=10,$t=(()=>{class t{markdown=k(jt);texts=y;entries=u([]);hasEntries=b(()=>this.entries().length>0);ngOnInit(){this.renderAll()}async renderAll(){let e=[],i=Bt.entries.slice(0,Nn);for(let n of i){let s=[];for(let g of n.highlights)s.push({bodyHtml:await this.markdown.render(g.body),packages:g.packages});e.push({version:n.version,date:this.formatDate(n.date),kind:n.kind,highlights:s})}this.entries.set(e)}formatDate(e){let i=new Date(e+"T00:00:00Z");return Number.isNaN(i.getTime())?e:new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(i)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-changelog"]],decls:11,vars:7,consts:[["data-testid","settings-changelog",1,"settings-changelog"],["id","settings-changelog-heading",1,"settings-changelog__title"],[1,"settings-changelog__intro"],["data-testid","settings-changelog-empty",1,"settings-changelog__empty"],["role","list",1,"settings-changelog__list"],["data-testid","settings-changelog-footer",1,"settings-changelog__footer"],["target","_blank","rel","noopener noreferrer",1,"settings-changelog__footer-link",3,"href"],[1,"settings-changelog__entry",3,"settings-changelog__entry--internal"],[1,"settings-changelog__entry"],[1,"settings-changelog__entry-header"],[1,"settings-changelog__version"],[1,"settings-changelog__date"],[1,"settings-changelog__internal-body"],["role","list",1,"settings-changelog__highlights"],[1,"settings-changelog__highlight"],[1,"settings-changelog__highlight-body",3,"innerHTML"],["role","list",1,"settings-changelog__packages"],[1,"settings-changelog__package"]],template:function(i,n){i&1&&(x(0,"section",0)(1,"h2",1),l(2),C(),x(3,"p",2),l(4),C(),m(5,Mn,2,1,"p",3)(6,An,3,0,"ol",4),x(7,"p",5),l(8),x(9,"a",6),l(10),C()()()),i&2&&(v("aria-labelledby","settings-changelog-heading"),o(2),p(" ",n.texts.changelogHeading," "),o(2),f(n.texts.changelogIntro),o(),h(n.hasEntries()?6:5),o(3),p(" ",n.texts.changelogFooterText," "),o(),W("href",n.texts.changelogFooterUrl,J),o(),p(" ",n.texts.changelogFooterLinkLabel," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-changelog__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-changelog__empty[_ngcontent-%COMP%]{margin:1.5rem 0 0;font-size:.9rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1.25rem}.settings-changelog__entry[_ngcontent-%COMP%]{border-left:2px solid var(--p-primary-color);padding:.25rem 0 .25rem .85rem}.settings-changelog__entry--internal[_ngcontent-%COMP%]{border-left-color:var(--sm-border)}.settings-changelog__entry-header[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.6rem;margin-bottom:.45rem}.settings-changelog__version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.95rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__date[_ngcontent-%COMP%]{font-size:.78rem;color:var(--sm-text-muted)}.settings-changelog__internal-body[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__highlights[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}.settings-changelog__highlight[_ngcontent-%COMP%]{font-size:.88rem;line-height:1.5;color:var(--p-text-color)}.settings-changelog__highlight-body[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p+p{margin-top:.45rem}[_nghost-%COMP%] .settings-changelog__highlight-body code{font-family:var(--sm-font-mono);font-size:.82rem;padding:.05rem .3rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color)}[_nghost-%COMP%] .settings-changelog__highlight-body a{color:var(--p-primary-color);text-decoration:underline}[_nghost-%COMP%] .settings-changelog__highlight-body strong{font-weight:600}.settings-changelog__packages[_ngcontent-%COMP%]{list-style:none;margin:.4rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.3rem}.settings-changelog__package[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--sm-text-muted);border:1px solid var(--sm-border);line-height:1.4}.settings-changelog__footer[_ngcontent-%COMP%]{margin:1.75rem 0 0;padding-top:1rem;border-top:1px solid var(--sm-border);font-size:.82rem;color:var(--sm-text-muted);text-align:center}.settings-changelog__footer-link[_ngcontent-%COMP%]{margin-left:.3rem;color:var(--p-primary-color);text-decoration:none;font-weight:500}.settings-changelog__footer-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})}return t})();var Gt=`
1
+ import{a as Nt,c as Lt,d as y,e as Rt}from"./chunk-OYCCFH2S.js";import{A as jt,a as vt,b as xt,c as Ct,d as wt,h as kt,o as St,p as Pt,q as Et,r as Mt,s as Tt,t as Ot,u as ce,v as de,w as It,x as Ft,y as Te,z as Oe}from"./chunk-4N5LGWJ4.js";import{B as Pe,C as Ee,N as yt,R as Me,S as le,V as X,W as U,c as oe,ca as Dt,ea as At,fa as Ie,j as ye,k as ke,m as ht,p as _t,q as Se,s as re,t as ae,u as se,v as ft,x as he,y as bt}from"./chunk-DOWLJNMD.js";import"./chunk-4SG4352Z.js";import{h as ut,i as mt}from"./chunk-WMGW2UAL.js";import{$ as et,$a as K,Ab as st,Db as L,Dc as ze,Ea as nt,Eb as W,Ec as pt,Fa as J,Fb as w,Ha as o,Hb as d,J as Qe,K as be,Kb as lt,L as Ye,Lb as ct,Mb as ve,N as Je,Nb as xe,P as k,Sb as Ve,Tb as G,U as Ze,Ub as dt,V as E,Vb as me,W as M,Wa as z,Wb as l,Xa as it,Xb as f,Yb as p,Za as ot,Zb as R,_a as rt,ba as tt,fc as ie,ga as u,hc as gt,ia as B,ib as v,ka as Re,lb as m,mb as h,nb as at,ob as q,oc as Ce,pb as A,qb as N,rb as _,rc as b,sb as c,sc as we,tb as s,tc as $,ub as O,vb as x,wb as C,xb as ne}from"./chunk-VJ57LHDR.js";import{a as H,b as Y}from"./chunk-WCABR6TI.js";function kn(t,r){if(t&1&&(x(0,"p",6),l(1),C()),t&2){let e=d();o(),R(" ",e.texts.aboutErrorPrefix," ",e.loadError()," ")}}var Vt=(()=>{class t{dataSource=k(X);updateCheck=k(Lt);theme=k(Ie);visible=$.required();texts=y;health=u(null);loadError=u(null);markSrc=b(()=>this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");cliVersion=b(()=>this.updateCheck.current()??this.health()?.implVersion??this.texts.aboutUnknown);specVersion=b(()=>this.health()?.specVersion??this.texts.aboutLoading);schemaVersion=b(()=>this.health()?.schemaVersion??this.texts.aboutLoading);cwd=b(()=>this.health()?.cwd??this.texts.aboutLoading);dbDisplay=b(()=>{let e=this.health();return e?this.texts.aboutDbValue(e.db,Sn(e.dbPath,e.cwd)):this.texts.aboutLoading});constructor(){B(()=>{this.visible()&&this.health()===null&&this.load()})}async load(){this.loadError.set(null);try{let e=await this.dataSource.health();this.health.set(e)}catch(e){let i=e instanceof U||e instanceof Error?e.message:String(e);this.loadError.set(i)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-about"]],inputs:{visible:[1,"visible"]},decls:57,vars:25,consts:[["aria-labelledby","settings-about-heading","data-testid","settings-about",1,"settings-about"],[1,"settings-about__header"],["alt","","aria-hidden","true","data-testid","settings-about-logo",1,"settings-about__logo",3,"src"],[1,"settings-about__heading-text"],["id","settings-about-heading",1,"settings-about__title"],[1,"settings-about__intro"],["data-testid","settings-about-error",1,"settings-about__error"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-star",1,"settings-about__star",3,"href"],["aria-hidden","true",1,"fa-solid","fa-star","settings-about__star-icon"],[1,"settings-about__star-text"],[1,"settings-about__star-heading"],[1,"settings-about__star-body"],[1,"settings-about__star-cta"],["aria-hidden","true",1,"fa-solid","fa-star"],[1,"settings-about__list"],[1,"settings-about__row"],[1,"settings-about__label"],[1,"settings-about__value"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-website",1,"settings-about__link",3,"href"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-github",1,"settings-about__link",3,"href"],["data-testid","settings-about-cli",1,"settings-about__value"],["data-testid","settings-about-spec",1,"settings-about__value"],["data-testid","settings-about-schema",1,"settings-about__value"],["data-testid","settings-about-cwd",1,"settings-about__value"],["data-testid","settings-about-db",1,"settings-about__value"]],template:function(i,n){i&1&&(x(0,"section",0)(1,"header",1),ne(2,"img",2),x(3,"div",3)(4,"h2",4),l(5),C(),x(6,"p",5),l(7),C()()(),m(8,kn,2,2,"p",6),x(9,"a",7),ne(10,"i",8),x(11,"span",9)(12,"span",10),l(13),C(),x(14,"span",11),l(15),C()(),x(16,"span",12),ne(17,"i",13),l(18),C()(),x(19,"dl",14)(20,"div",15)(21,"dt",16),l(22),C(),x(23,"dd",17)(24,"a",18),l(25),C()()(),x(26,"div",15)(27,"dt",16),l(28),C(),x(29,"dd",17)(30,"a",19),l(31),C()()(),x(32,"div",15)(33,"dt",16),l(34),C(),x(35,"dd",20),l(36),C()(),x(37,"div",15)(38,"dt",16),l(39),C(),x(40,"dd",21),l(41),C()(),x(42,"div",15)(43,"dt",16),l(44),C(),x(45,"dd",22),l(46),C()(),x(47,"div",15)(48,"dt",16),l(49),C(),x(50,"dd",23),l(51),C()(),x(52,"div",15)(53,"dt",16),l(54),C(),x(55,"dd",24),l(56),C()()()()),i&2&&(o(2),W("src",n.markSrc(),J),o(3),p(" ",n.texts.aboutHeading," "),o(2),f(n.texts.aboutIntro),o(),h(n.loadError()?8:-1),o(),W("href",n.texts.aboutGithubUrl,J),v("aria-label",n.texts.aboutStarA11y),o(4),f(n.texts.aboutStarHeading),o(2),f(n.texts.aboutStarBody),o(3),p(" ",n.texts.aboutStarCta," "),o(4),f(n.texts.aboutWebsiteLabel),o(2),W("href",n.texts.aboutWebsiteUrl,J),o(),f(n.texts.aboutWebsiteUrl),o(3),f(n.texts.aboutGithubLabel),o(2),W("href",n.texts.aboutGithubUrl,J),o(),f(n.texts.aboutGithubUrl),o(3),f(n.texts.aboutCliLabel),o(2),p(" ",n.cliVersion()," "),o(3),f(n.texts.aboutSpecLabel),o(2),p(" ",n.specVersion()," "),o(3),f(n.texts.aboutSchemaLabel),o(2),p(" ",n.schemaVersion()," "),o(3),f(n.texts.aboutFolderLabel),o(2),p(" ",n.cwd()," "),o(3),f(n.texts.aboutDbLabel),o(2),p(" ",n.dbDisplay()," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-about[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.settings-about__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.settings-about__logo[_ngcontent-%COMP%]{width:64px;height:64px;flex-shrink:0}.settings-about__heading-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:0}.settings-about__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-about__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-about__error[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:var(--p-border-radius);background:var(--p-message-error-background);color:var(--p-message-error-color);font-size:.875rem}.settings-about__list[_ngcontent-%COMP%]{margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-about__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:180px 1fr;align-items:baseline;gap:.75rem;padding:.5rem .75rem;border-radius:var(--p-border-radius)}.settings-about__row[_ngcontent-%COMP%]:nth-child(odd){background:var(--p-content-hover-background)}.settings-about__label[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-muted-color)}.settings-about__value[_ngcontent-%COMP%]{margin:0;font-family:var(--p-monospace-font-family);font-size:.875rem;word-break:break-all}.settings-about__link[_ngcontent-%COMP%]{color:var(--p-primary-color);text-decoration:none}.settings-about__link[_ngcontent-%COMP%]:hover, .settings-about__link[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.settings-about__star[_ngcontent-%COMP%]{--star-accent: #f4b400;display:flex;align-items:center;gap:.875rem;padding:.875rem 1rem;border-radius:var(--p-border-radius);border:1px solid color-mix(in oklab,var(--star-accent) 45%,transparent);background:color-mix(in oklab,var(--star-accent) 12%,transparent);color:var(--p-text-color);text-decoration:none;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}.settings-about__star[_ngcontent-%COMP%]:hover, .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 22%,transparent);border-color:color-mix(in oklab,var(--star-accent) 70%,transparent);transform:translateY(-1px);outline:none}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 18%,transparent);border-color:color-mix(in oklab,var(--star-accent) 55%,transparent)}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 30%,transparent);border-color:var(--star-accent)}.settings-about__star-icon[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--star-accent);flex-shrink:0}.settings-about__star-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-about__star-heading[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.settings-about__star-body[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-text-muted-color);line-height:1.4}.settings-about__star-cta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-radius:var(--sm-radius-pill);background:var(--star-accent);color:#1a1a1a;font-weight:600;font-size:.8125rem;white-space:nowrap;flex-shrink:0}.settings-about__star[_ngcontent-%COMP%]:hover .settings-about__star-cta[_ngcontent-%COMP%], .settings-about__star[_ngcontent-%COMP%]:focus-visible .settings-about__star-cta[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 88%,white)}"],changeDetection:0})}return t})();function Sn(t,r){if(!t||!r)return t;let e=r.replace(/[/\\]+$/,"");return t.startsWith(e)?t.slice(e.length).replace(/^[/\\]+/,""):t}var Fe=(()=>{class t{ownerSig=u(null);dirtyCount=b(()=>{let e=this.ownerSig();return e?e.dirtyIds().size:0});register(e){this.ownerSig.set(e)}deregister(e){this.ownerSig()===e&&this.ownerSig.set(null)}async applyChanges(){let e=this.ownerSig();return e?e.applyChanges():{ok:!1}}discardChanges(){this.ownerSig()?.discardChanges()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var zt={schemaVersion:1,entries:[{version:"0.50.1",date:"2026-06-04",kind:"user-facing",highlights:[{body:"The redundant-reference finding now reads with shorter, more direct wording so the duplicated target and where it appears are easier to scan at a glance.",packages:["@skill-map/cli"]},{body:`The map palettes now count only the nodes you've curated visible. Selecting a hidden file no longer jumps the camera to empty space, and "Re-arrange layout" only asks to confirm when you have moved nodes yourself.`,packages:["@skill-map/cli"]}]},{version:"0.50.0",date:"2026-06-02",kind:"user-facing",highlights:[{body:`The Files and Map tabs are gone: skill-map opens on one screen, file tree left, graph right. Tick files or folders (or the 0/1/2 depth buttons) to pick what the map shows; the tree's map icon isolates a node's whole chain. "Re-arrange layout" tidies just what's visible.`,packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.49.0",date:"2026-06-02",kind:"user-facing",highlights:[{body:"**New workspace view**: the file list, graph, and inspector now share one screen. Drag the divider to resize the file rail, click a file to focus its node on the map, and use the tree checkboxes to choose which nodes the map shows (`Show all` clears the selection).",packages:["@skill-map/cli"]}]},{version:"0.48.0",date:"2026-05-31",kind:"user-facing",highlights:[{body:"**Card footer icon order restored.** The status icons in the bottom-right of each card are back to their previous order: lifecycle/stability first, then the stale indicator, then warnings and errors on the far right.",packages:["@skill-map/cli"]},{body:"`sm plugins create` now takes the extension kind as a required first argument: `sm plugins create <kind> <plugin-id>` (kinds: provider, extractor, analyzer, action, formatter, hook). Previously it only scaffolded extractors.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"After `sm tutorial`, start the tutorial by typing `run the tutorial` (or `ejecuta el tutorial`), matching the website. The master tutorial uses `run the master tutorial` / `ejecuta el tutorial maestro`.",packages:["@skill-map/cli"]}]},{version:"0.47.1",date:"2026-05-31",kind:"internal",highlights:[]},{version:"0.47.0",date:"2026-05-31",kind:"user-facing",highlights:[{body:"skill-map now notices when your local DB schema is out of date (not just an older version): `sm scan` and `sm serve` offer to rebuild the cache, and read commands warn instead of failing with a confusing database error.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Settings \u2192 Plugins now has a unified filter bar (All, then Built-in / Project, then the kinds), so you can quickly isolate your project's own plugins and extensions from the built-ins.",packages:["@skill-map/cli"]},{body:"**Pick your tokenizer.** `tokenizer` in settings.json now selects the encoder for token counts: `cl100k_base` (default, GPT-4) or `o200k_base` (GPT-4o). Any other value is ignored with a warning. Changing it recomputes counts on the next scan.",packages:["@skill-map/cli","@skill-map/spec"]},{body:'When the dev server stops, the UI now shows a "connection lost" banner with a Reconnect button instead of failing silently, and it refreshes automatically once the connection is back.',packages:["@skill-map/cli"]}]},{version:"0.46.0",date:"2026-05-31",kind:"user-facing",highlights:[{body:"`sm scan` no longer glues the `Auto-detected activeProvider` notice onto the results line. The auto-detect message now prints on its own line, right above the scan summary.",packages:["@skill-map/cli"]},{body:"`sm plugins --help` (and `db`, `config`, `job`, and the other command groups) now print a tidy overview with a one-line description and a list of their subcommands, matching the look of `sm scan --help`, instead of a terse internal list.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Config cleanup.** Several settings.json keys that never did anything (`i18n`, `providers`, `history`, `autoMigrate`, `scan.followSymlinks`, per-plugin `config` / `extensions`) were removed. If still present they are now ignored and reported with a warning on load.",packages:["@skill-map/cli","@skill-map/spec"]},{body:'`sm plugins list` / `show` and the Settings \u2192 Plugins UI now consistently say "plugin" instead of "bundle". The only place "bundle" remains is the name for toggling a whole plugin (all its extensions) at once.',packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.45.1",date:"2026-05-30",kind:"internal",highlights:[]},{version:"0.45.0",date:"2026-05-30",kind:"user-facing",highlights:[{body:"`sm tutorial` can now target other agents: `--for agent-skills` (open-standard layout, used by Antigravity and OpenAI Codex) or `--for claude` (default). It now requires an empty directory: run it in a fresh folder, or pass `--force` to seed into the current one.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.44.0",date:"2026-05-30",kind:"user-facing",highlights:[{body:"Under the Antigravity lens, `sm scan` now warns when a `.agents/skills` skill shadows a built-in `agy` slash command (e.g. a skill named `goal` collides with `/goal`), so you can rename it before the runtime silently ignores the file.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"skill-map can now report crashes anonymously to help fix bugs, and it is OFF by default. Turn it on or off in Settings, or set `SKILL_MAP_TELEMETRY=0` to force it off. File contents, paths, and your settings are never sent.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"skill-map can now share anonymous usage (which commands and views you use) to guide development, OFF by default. Toggle CLI usage, UI usage, and error reports independently in Settings, or set `SKILL_MAP_TELEMETRY=0` to force all off. Files and paths are never sent.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.43.0",date:"2026-05-29",kind:"user-facing",highlights:[{body:"The skill-map website and in-app links (Settings, About and the demo banner) now point to **skill-map.ai** (previously skill-map.dev). Spec schema URLs are now `https://skill-map.ai/spec/v0/...`.",packages:["@skill-map/cli","@skill-map/spec","@skill-map/web"]},{body:"Claude skills and commands now show their `disallowed-tools` in the inspector. Tags come only from `.sm` sidecars now: the `sm list --tag-source` flag is removed and cards show a single tag style. Agent Skills `license` / `compatibility` / `metadata` fields are recognized.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"After updating skill-map, the next `sm scan` rebuilds the local database when it was created by an older version (your `.sm` sidecar files are never touched). On a terminal it asks first; pass `--yes` to skip the prompt.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.42.0",date:"2026-05-28",kind:"user-facing",highlights:[{body:"The lens picker in **Settings \u2192 Project** now lists exactly the providers installed in your project. The phantom **Gemini** and **Cursor** options are gone, and **OpenAI Codex** / **Antigravity** now show their correct name and colour on node cards.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.41.0",date:"2026-05-27",kind:"user-facing",highlights:[{body:"New `--max-nodes <N>` on `sm scan` / `sm watch` / `sm serve` caps how many files the walker accepts (default 256, bidirectional). Past the limit, a persistent banner links to **Settings \u2192 Project** to trim `.skillmapignore`.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm -version` and `sm -help` now suggest `--version` / `--help` consistently, even from a directory with no skill-map project.",packages:["@skill-map/cli"]}]},{version:"0.40.1",date:"2026-05-26",kind:"user-facing",highlights:[{body:"Update chip copies the install command on click. Settings copy polished across General + Project. Path is now the second column in the list view. Filtered-empty views unified across List + Graph with a Reset button. Matrix theme retints dropdowns and toggle buttons.",packages:["@skill-map/cli"]}]},{version:"0.40.0",date:"2026-05-26",kind:"user-facing",highlights:[{body:"**Changelog tab is now bounded.** The Settings \u2192 Changelog tab shows the most recent 10 releases and links out to the full changelog on GitHub for older entries.",packages:["@skill-map/cli"]},{body:"Plugins no longer have a bundle-level switch; each extension toggles on its own. `sm plugins disable <bundle>` cascades across the bundle's extensions (multi-extension bundles need `--yes`). The kind filter narrows extensions inside matched bundles instead of leaking siblings.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Cleaner Plugins view.** Settings \u2192 Plugins and `sm plugins show <bundle>` no longer print a per-extension version chip for built-in plugins (they all share the CLI version). External (user-authored) plugins are unchanged and still show per-extension semver.",packages:["@skill-map/cli"]},{body:'`sm scan` summary now splits findings per severity (`N errors \xB7 M warnings \xB7 K info`), colored and collapsed when zero. The graph view gains a third palette to filter cards with errors / warnings; the perf-HUD says "links" instead of "edges".',packages:["@skill-map/cli"]},{body:"**List view** is live. Click **List** in the topbar for a sortable, filterable table of every node (Kind, Name, Tags, Path, Tokens, Stability, Stale, Issues). Click a row to inspect on the graph. Graph card chips now share the same icons as the list.",packages:["@skill-map/cli"]},{body:'Graph cards drop the corner badge for routine warnings; count + tooltip stay on the footer chip. Broken refs now escalate `sm scan` to exit 1 (were exit 0). `sm init` prints the "no provider markers" advisory as a two-line yellow `\u26A0` block.',packages:["@skill-map/cli","@skill-map/spec"]},{body:'`sm check --analyzers <id>` now errors with the valid id list when mistyped, instead of silently saying "No issues." `/invoke` and `@mention` links from any markdown body now contribute to the target\'s `IN`. `sm plugins doctor` summary spells out its bundle + extension split.',packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.39.0",date:"2026-05-25",kind:"user-facing",highlights:[{body:"Renamed `core/field-unknown` to `core/annotation-field-unknown` so the sidecar typo-guard rule groups with the other `core/annotation-*` rules. Update references in `settings.json` or `sm check --analyzers <id>` to the new name.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Renamed 14 built-in extension ids to a `<area>-<detail>` shape (e.g. `core/broken-ref` is now `core/reference-broken`). If you reference these by qualified id in `settings.json` or via `sm check --analyzers <id>`, update to the new names.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"In dev builds the topbar and the `sm serve` banner now show only the `dev` marker instead of pairing it with the published version number.",packages:["@skill-map/cli"]},{body:"When a scan adds or removes nodes, the graph view animates the camera to frame the new layout, refreshes auto positions so nodes never land on top of each other, and keeps your manually-dragged pins where you put them.",packages:["@skill-map/cli"]},{body:"`sm` log lines now lead with a coloured glyph per level (`\u26A0 WARN`, `\u2715 ERROR`, `\u2139 INFO`) so advisories stand out from the rest of the output.",packages:["@skill-map/cli"]},{body:"In Settings, expanding a bundle plugin (claude, antigravity, openai, agent-skills) now shows the correct per-extension state and the toggles persist, the next scan honours them. `sm plugins list` reflects effective state too.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Plugins always list `core` first across CLI, BFF, and Settings; the project path stays visible in the topbar (truncated with `\u2026` on the LEFT so the project name reaches the eye); and the SPA reconnects on its own when `sm serve` restarts.",packages:["@skill-map/cli"]},{body:'`sm list` IN counts and the inspector\'s "Linked nodes \u2192 INCOMING" now include every `@mention` and `/invoke`, not just markdown links. `sm plugins doctor` no longer raises a spurious `claude/agent` warning on a clean install.',packages:["@skill-map/cli"]}]},{version:"0.38.0",date:"2026-05-24",kind:"user-facing",highlights:[{body:"`sm <verb> --json` now also suppresses info banners on stderr, keeping both streams clean for piping into `jq`.",packages:["@skill-map/cli"]}]},{version:"0.37.0",date:"2026-05-23",kind:"user-facing",highlights:[{body:"`sm scan` now warns once when provider markers on disk drifted since `activeProvider` was set (e.g. you added `.codex/` after picking the `claude` lens). Run `sm config set activeProvider <id>` to switch the lens, or ignore the warn and keep going, it never blocks the scan.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Clearer CLI errors.** Errors from `sm serve`, `bump`, `db`, `plugins`, `refresh`, `list`, `watch`, `graph`, `hooks`, and `sidecar` now print a `\u2715` headline plus a dim hint on the next line. Fixes a `sm refresh` persist-failure that rendered `{{glyph}}` literally.",packages:["@skill-map/cli"]},{body:"`sm` now detects when the local `.skill-map/` DB was written by an incompatible CLI version: newer minor or different major refuses to open with a clear hint; older same-major prints a one-shot warning and continues. Defensive parse errors include the same hint.",packages:["@skill-map/cli"]},{body:'`sm init --force` now also resets the DB (was overwriting only the config files). Solves the "Failed to read scan rows" crash on the first auto-scan when re-initialising a project that already had a DB from an older CLI version.',packages:["@skill-map/cli"]},{body:"**Two scan-time bugs fixed.** Resolved `/slash` and `@mention` links now correctly land at confidence `1.0` (were stuck at the emit floor), and the markdown-link extractor no longer flags `[label](path)` shown inside backticks or fenced code blocks as broken references.",packages:["@skill-map/cli"]},{body:"Cross-provider files (e.g. a `.codex/agents/*.toml` while the lens is `claude`) are no longer claimed by the foreign provider. They surface as plain markdown / unclassified instead, matching how the agent itself would see them at runtime.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Card chips for incoming / outgoing links no longer count self-loops, so a node that links back to itself stops showing inflated 1 in / 1 out. The `core/self-loop` analyzer still surfaces the self-reference as a warning, only the misleading count goes away.",packages:["@skill-map/cli"]},{body:"**CLI + inspector polish.** `sm init` now prompts for the active lens when markers compete; `sm config set activeProvider` rejects unknown ids upfront; error blocks across the CLI gain a `\u2715` glyph + hint; the inspector hides self-loops and paints kinds in their canonical colour.",packages:["@skill-map/cli"]},{body:'**Inspector overhaul.** Links show numeric confidence, a Findings list, per-row issue chips, and per-site "Occurs at" lines. New "External references" section. Self-loops hidden by default. Two new analyzers flag redundant multi-form references and self-loops.',packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm scan` now warns when two extractors detect overlapping byte ranges. The graph keeps the winner; the issue panel explains which detection lost and why, so a markdown link wrapping an `@`-directive no longer looks like silent disappearing intent.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.36.0",date:"2026-05-22",kind:"user-facing",highlights:[{body:"**Gemini CLI support retired.** Antigravity CLI projects (Google's May 2026 replacement) scan via the open-standard `.agents/skills/` paths under the existing `agent-skills` lens. Run `sm config set activeProvider antigravity` to flag a project as Antigravity-flavoured.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Files whose name shadows a built-in are flagged.** A file like `.claude/commands/help.md` now emits a `warn` (Claude's runtime ignores it for its own `/help`), and incoming `/help` edges resolve to it at confidence `0.1` instead of `1.0`.",packages:["@skill-map/cli","@skill-map/spec"]}]}]};var Bt=zt;var En=(t,r)=>r.version;function Mn(t,r){if(t&1&&(x(0,"p",3),l(1),C()),t&2){let e=d();o(),p(" ",e.texts.changelogEmpty," ")}}function Tn(t,r){if(t&1&&(x(0,"p",12),l(1),C()),t&2){let e=d(3);o(),p(" ",e.texts.changelogInternalRelease," ")}}function On(t,r){if(t&1&&(x(0,"li",17),l(1),C()),t&2){let e=r.$implicit;o(),f(e)}}function In(t,r){if(t&1&&(x(0,"ul",16),A(1,On,2,1,"li",17,q),C()),t&2){let e=d().$implicit,i=d(4);v("aria-label",i.texts.changelogAffectedPackages),o(),N(e.packages)}}function Fn(t,r){if(t&1&&(x(0,"li",14),ne(1,"div",15),m(2,In,3,1,"ul",16),C()),t&2){let e=r.$implicit;o(),W("innerHTML",e.bodyHtml,nt),o(),h(e.packages.length?2:-1)}}function jn(t,r){if(t&1&&(x(0,"ul",13),A(1,Fn,3,2,"li",14,at),C()),t&2){let e=d().$implicit;o(),N(e.highlights)}}function Dn(t,r){if(t&1&&(x(0,"li",8)(1,"header",9)(2,"span",10),l(3),C(),x(4,"span",11),l(5),C()(),m(6,Tn,2,1,"p",12)(7,jn,3,0,"ul",13),C()),t&2){let e=r.$implicit;G("settings-changelog__entry--internal",e.kind==="internal"),v("data-testid","settings-changelog-entry-"+e.version),o(3),p("v",e.version),o(2),f(e.date),o(),h(e.kind==="internal"?6:7)}}function An(t,r){if(t&1&&(x(0,"ol",4),A(1,Dn,8,6,"li",7,En),C()),t&2){let e=d();o(),N(e.entries())}}var Nn=10,$t=(()=>{class t{markdown=k(jt);texts=y;entries=u([]);hasEntries=b(()=>this.entries().length>0);ngOnInit(){this.renderAll()}async renderAll(){let e=[],i=Bt.entries.slice(0,Nn);for(let n of i){let a=[];for(let g of n.highlights)a.push({bodyHtml:await this.markdown.render(g.body),packages:g.packages});e.push({version:n.version,date:this.formatDate(n.date),kind:n.kind,highlights:a})}this.entries.set(e)}formatDate(e){let i=new Date(e+"T00:00:00Z");return Number.isNaN(i.getTime())?e:new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(i)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-changelog"]],decls:11,vars:7,consts:[["data-testid","settings-changelog",1,"settings-changelog"],["id","settings-changelog-heading",1,"settings-changelog__title"],[1,"settings-changelog__intro"],["data-testid","settings-changelog-empty",1,"settings-changelog__empty"],["role","list",1,"settings-changelog__list"],["data-testid","settings-changelog-footer",1,"settings-changelog__footer"],["target","_blank","rel","noopener noreferrer",1,"settings-changelog__footer-link",3,"href"],[1,"settings-changelog__entry",3,"settings-changelog__entry--internal"],[1,"settings-changelog__entry"],[1,"settings-changelog__entry-header"],[1,"settings-changelog__version"],[1,"settings-changelog__date"],[1,"settings-changelog__internal-body"],["role","list",1,"settings-changelog__highlights"],[1,"settings-changelog__highlight"],[1,"settings-changelog__highlight-body",3,"innerHTML"],["role","list",1,"settings-changelog__packages"],[1,"settings-changelog__package"]],template:function(i,n){i&1&&(x(0,"section",0)(1,"h2",1),l(2),C(),x(3,"p",2),l(4),C(),m(5,Mn,2,1,"p",3)(6,An,3,0,"ol",4),x(7,"p",5),l(8),x(9,"a",6),l(10),C()()()),i&2&&(v("aria-labelledby","settings-changelog-heading"),o(2),p(" ",n.texts.changelogHeading," "),o(2),f(n.texts.changelogIntro),o(),h(n.hasEntries()?6:5),o(3),p(" ",n.texts.changelogFooterText," "),o(),W("href",n.texts.changelogFooterUrl,J),o(),p(" ",n.texts.changelogFooterLinkLabel," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-changelog__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-changelog__empty[_ngcontent-%COMP%]{margin:1.5rem 0 0;font-size:.9rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1.25rem}.settings-changelog__entry[_ngcontent-%COMP%]{border-left:2px solid var(--p-primary-color);padding:.25rem 0 .25rem .85rem}.settings-changelog__entry--internal[_ngcontent-%COMP%]{border-left-color:var(--sm-border)}.settings-changelog__entry-header[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.6rem;margin-bottom:.45rem}.settings-changelog__version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.95rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__date[_ngcontent-%COMP%]{font-size:.78rem;color:var(--sm-text-muted)}.settings-changelog__internal-body[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__highlights[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}.settings-changelog__highlight[_ngcontent-%COMP%]{font-size:.88rem;line-height:1.5;color:var(--p-text-color)}.settings-changelog__highlight-body[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p+p{margin-top:.45rem}[_nghost-%COMP%] .settings-changelog__highlight-body code{font-family:var(--sm-font-mono);font-size:.82rem;padding:.05rem .3rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color)}[_nghost-%COMP%] .settings-changelog__highlight-body a{color:var(--p-primary-color);text-decoration:underline}[_nghost-%COMP%] .settings-changelog__highlight-body strong{font-weight:600}.settings-changelog__packages[_ngcontent-%COMP%]{list-style:none;margin:.4rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.3rem}.settings-changelog__package[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--sm-text-muted);border:1px solid var(--sm-border);line-height:1.4}.settings-changelog__footer[_ngcontent-%COMP%]{margin:1.75rem 0 0;padding-top:1rem;border-top:1px solid var(--sm-border);font-size:.82rem;color:var(--sm-text-muted);text-align:center}.settings-changelog__footer-link[_ngcontent-%COMP%]{margin-left:.3rem;color:var(--p-primary-color);text-decoration:none;font-weight:500}.settings-changelog__footer-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})}return t})();var Gt=`
2
2
  .p-toggleswitch {
3
3
  display: inline-block;
4
4
  width: dt('toggleswitch.width');
@@ -112,12 +112,12 @@ import{a as Nt,c as Lt,d as y,e as Rt}from"./chunk-OYCCFH2S.js";import{A as jt,a
112
112
  .p-toggleswitch.p-disabled .p-toggleswitch-handle {
113
113
  background: dt('toggleswitch.handle.disabled.background');
114
114
  }
115
- `;var Ln=["handle"],Rn=["input"],Vn=t=>({checked:t});function zn(t,r){t&1&&at(0)}function Bn(t,r){if(t&1&&K(0,zn,1,0,"ng-container",3),t&2){let e=d();_("ngTemplateOutlet",e.handleTemplate||e._handleTemplate)("ngTemplateOutletContext",gt(2,Vn,e.checked()))}}var $n=`
115
+ `;var Ln=["handle"],Rn=["input"],Vn=t=>({checked:t});function zn(t,r){t&1&&st(0)}function Bn(t,r){if(t&1&&K(0,zn,1,0,"ng-container",3),t&2){let e=d();_("ngTemplateOutlet",e.handleTemplate||e._handleTemplate)("ngTemplateOutletContext",gt(2,Vn,e.checked()))}}var $n=`
116
116
  ${Gt}
117
117
 
118
118
  p-toggleswitch.ng-invalid.ng-dirty > .p-toggleswitch-slider {
119
119
  border-color: dt('toggleswitch.invalid.border.color');
120
120
  }
121
- `,Gn={root:{position:"relative"}},Un={root:({instance:t})=>["p-toggleswitch p-component",{"p-toggleswitch p-component":!0,"p-toggleswitch-checked":t.checked(),"p-disabled":t.$disabled(),"p-invalid":t.invalid()}],input:"p-toggleswitch-input",slider:"p-toggleswitch-slider",handle:"p-toggleswitch-handle"},Ut=(()=>{class t extends ht{name="toggleswitch";style=$n;classes=Un;inlineStyles=Gn;static \u0275fac=(()=>{let e;return function(n){return(e||(e=Re(t)))(n||t)}})();static \u0275prov=be({token:t,factory:t.\u0275fac})}return t})();var Ht=new Je("TOGGLESWITCH_INSTANCE"),Hn={provide:_t,useExisting:Qe(()=>ge),multi:!0},ge=(()=>{class t extends kt{componentName="ToggleSwitch";$pcToggleSwitch=k(Ht,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=k(he,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;tabindex;inputId;readonly;trueValue=!0;falseValue=!1;ariaLabel;size=$();ariaLabelledBy;autofocus;onChange=new tt;input;handleTemplate;_handleTemplate;focused=!1;_componentStyle=k(Ut);templates;onHostClick(e){this.onClick(e)}onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="handle"?this._handleTemplate=e.template:this._handleTemplate=e.template})}onClick(e){!this.$disabled()&&!this.readonly&&(this.writeModelValue(this.checked()?this.falseValue:this.trueValue),this.onModelChange(this.modelValue()),this.onChange.emit({originalEvent:e,checked:this.modelValue()}),this.input.nativeElement.focus())}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}checked(){return this.modelValue()===this.trueValue}writeControlValue(e,i){i(e),this.cd.markForCheck()}get dataP(){return this.cn({checked:this.checked(),disabled:this.$disabled(),invalid:this.invalid()})}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Re(t)))(n||t)}})();static \u0275cmp=z({type:t,selectors:[["p-toggleswitch"],["p-toggleSwitch"],["p-toggle-switch"]],contentQueries:function(i,n,s){if(i&1&&lt(s,Ln,4)(s,ye,4),i&2){let g;ve(g=xe())&&(n.handleTemplate=g.first),ve(g=xe())&&(n.templates=g)}},viewQuery:function(i,n){if(i&1&&ct(Rn,5),i&2){let s;ve(s=xe())&&(n.input=s.first)}},hostVars:7,hostBindings:function(i,n){i&1&&w("click",function(g){return n.onHostClick(g)}),i&2&&(v("data-p-checked",n.checked())("data-p-disabled",n.$disabled())("data-p",n.dataP),dt(n.sx("root")),me(n.cn(n.cx("root"),n.styleClass)))},inputs:{styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",pt],inputId:"inputId",readonly:[2,"readonly","readonly",ze],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",size:[1,"size"],ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",ze]},outputs:{onChange:"onChange"},features:[ie([Hn,Ut,{provide:Ht,useExisting:t},{provide:ft,useExisting:t}]),ot([he]),rt],decls:5,vars:22,consts:[["input",""],["type","checkbox","role","switch",3,"focus","blur","checked","pAutoFocus","pBind"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&(c(0,"input",1,0),w("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),a(),c(2,"div",2)(3,"div",2),m(4,Bn,1,4,"ng-container"),a()()),i&2&&(me(n.cx("input")),_("checked",n.checked())("pAutoFocus",n.autofocus)("pBind",n.ptm("input")),v("id",n.inputId)("required",n.required()?"":void 0)("disabled",n.$disabled()?"":void 0)("aria-checked",n.checked())("aria-labelledby",n.ariaLabelledBy)("aria-label",n.ariaLabel)("name",n.name())("tabindex",n.tabindex),o(2),me(n.cx("slider")),_("pBind",n.ptm("slider")),v("data-p",n.dataP),o(),me(n.cx("handle")),_("pBind",n.ptm("handle")),v("data-p",n.dataP),o(),h(n.handleTemplate||n._handleTemplate?4:-1))},dependencies:[mt,ut,yt,ke,bt,he],encapsulation:2,changeDetection:0})}return t})(),je=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=it({type:t});static \u0275inj=Ye({imports:[ge,ke,ke]})}return t})();var Kn=(t,r)=>r.key;function qn(t,r){if(t&1&&(c(0,"p-message",3),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.general.loadErrorPrefix," ",r," ")}}function Wn(t,r){if(t&1&&(c(0,"p-message",4),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.general.saveErrorPrefix," ",r," ")}}function Xn(t,r){t&1&&(c(0,"div",15),l(1),a()),t&2&&(o(),f(r))}function Qn(t,r){if(t&1){let e=L();c(0,"li",6)(1,"div",8)(2,"div",9),l(3),a(),c(4,"div",10),l(5),a(),m(6,Xn,2,1,"div",15),a(),c(7,"p-toggleswitch",16),w("ngModelChange",function(n){let s=E(e).$implicit,g=d();return M(g.onToggle(s,n))}),a()()}if(t&2){let e,i=r.$implicit,n=d();v("data-testid","settings-general-row-"+i.key),o(3),f(n.toggleLabel(i.key)),o(2),p(" ",n.toggleDescription(i.key)," "),o(),h((e=n.toggleHint(i.key))?6:-1,e),o(),_("ngModel",n.valueOf(i))("disabled",n.loading()||n.isPending(i.key)||n.preferences()===null),v("data-testid","settings-general-toggle-"+i.key)}}function Yn(t,r){if(t&1&&(c(0,"span",17),l(1),a()),t&2){let e=r.$implicit;o(),p(" ",e.label," ")}}var Jn=[{key:"updateCheck.enabled",read:t=>t.updateCheck.enabled,patch:t=>({updateCheck:{enabled:t}})},{key:"telemetry",read:t=>t.telemetry.errorsEnabled&&t.telemetry.usageCliEnabled&&t.telemetry.usageUiEnabled,patch:t=>({telemetry:{errorsEnabled:t,usageCliEnabled:t,usageUiEnabled:t}})}],De="none";function Zn(t){return t===null?De:t}function ei(t){return t===De?null:t}var Qt=(()=>{class t{dataSource=k(X);themeService=k(Ie);visible=$.required();texts=y;toggles=Jn;extraThemeOptions=[{value:De,label:y.general.extraTheme.options.none.label,description:y.general.extraTheme.options.none.description},...At.map(e=>({value:e.id,label:e.label,description:e.description}))];extraThemeWire=b(()=>Zn(this.themeService.extraTheme()));loading=u(!1);loadError=u(null);saveError=u(null);preferences=u(null);pending=u(new Set);constructor(){B(()=>{this.visible()&&this.refresh()})}toggleLabel(e){return y.general.toggles[e].label}toggleDescription(e){return y.general.toggles[e].description}toggleHint(e){let i=y.general.toggles[e];return"hint"in i?i.hint:null}valueOf(e){let i=this.preferences();return i?e.read(i):!1}isPending(e){return this.pending().has(e)}onToggle(e,i){this.runToggle(e,i)}onExtraThemeChange(e){this.themeService.setExtraTheme(ei(e??De))}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let e=await this.dataSource.getPreferences();this.preferences.set(e)}catch(e){this.loadError.set(qt(e)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runToggle(e,i){if(this.pending().has(e.key))return;let n=new Set(this.pending());n.add(e.key),this.pending.set(n),this.saveError.set(null);try{let s=await this.dataSource.setPreferences(e.patch(i));this.preferences.set(s)}catch(s){this.saveError.set(qt(s))}finally{let s=new Set(this.pending());s.delete(e.key),this.pending.set(s)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-general"]],inputs:{visible:[1,"visible"]},decls:22,vars:12,consts:[["data-testid","settings-general",1,"settings-general"],["id","settings-general-heading",1,"settings-general__title"],[1,"settings-general__intro"],["severity","error","data-testid","settings-general-load-error",3,"closable"],["severity","error","data-testid","settings-general-save-error",3,"closable"],["role","list",1,"settings-general__list"],[1,"settings-general__row"],["data-testid","settings-general-row-extra-theme",1,"settings-general__row"],[1,"settings-general__row-text"],[1,"settings-general__row-label"],[1,"settings-general__row-description"],["optionLabel","label","optionValue","value","data-testid","settings-general-extra-theme",3,"ngModelChange","options","ngModel","allowEmpty"],["pTemplate","item"],["data-testid","settings-general-storage-hint",1,"settings-general__storage-hint"],[1,"settings-general__storage-hint-path"],[1,"settings-general__row-hint"],[3,"ngModelChange","ngModel","disabled"],["data-testid","settings-general-extra-theme-option"]],template:function(i,n){if(i&1&&(c(0,"section",0)(1,"h2",1),l(2),a(),c(3,"p",2),l(4),a(),m(5,qn,2,3,"p-message",3),m(6,Wn,2,3,"p-message",4),c(7,"ul",5),A(8,Qn,8,7,"li",6,Kn),c(10,"li",7)(11,"div",8)(12,"div",9),l(13),a(),c(14,"div",10),l(15),a()(),c(16,"p-selectbutton",11),w("ngModelChange",function(g){return n.onExtraThemeChange(g)}),K(17,Yn,2,1,"ng-template",12),a()()(),c(18,"p",13),l(19),c(20,"code",14),l(21),a()()()),i&2){let s,g;v("aria-labelledby","settings-general-heading"),o(2),p(" ",n.texts.general.heading," "),o(2),f(n.texts.general.intro),o(),h((s=n.loadError())?5:-1,s),o(),h((g=n.saveError())?6:-1,g),o(2),N(n.toggles),o(5),p(" ",n.texts.general.extraTheme.label," "),o(2),p(" ",n.texts.general.extraTheme.description," "),o(),_("options",n.extraThemeOptions)("ngModel",n.extraThemeWire())("allowEmpty",!1),o(3),p(" ",n.texts.general.storageHintLabel," "),o(2),f(n.texts.general.storageHintPath)}},dependencies:[ae,re,se,de,ce,ye,Ot,Tt,je,ge],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-general__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-general__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-general__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1rem}.settings-general__row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background)}.settings-general__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-general__row[_ngcontent-%COMP%] p-toggleswitch[_ngcontent-%COMP%]{flex-shrink:0}.settings-general__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-general__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-general__row-hint[_ngcontent-%COMP%]{margin-top:.2rem;font-size:.75rem;font-style:italic;color:var(--sm-text-muted)}.settings-general__storage-hint[_ngcontent-%COMP%]{margin:2rem 0 0;font-size:.75rem;line-height:1.5;color:var(--sm-text-muted);opacity:.65}.settings-general__storage-hint-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.72rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}"],changeDetection:0})}return t})();function qt(t){return t instanceof U||t instanceof Error?t.message:String(t)}var Ae={provider:"#7C3AED",extractor:"#A78BFA",analyzer:"#5FD17C",action:"#00C853",formatter:"#5BC0EB",hook:"#FFB627"};function Yt(t){let r=t.toLowerCase();return Ae[r]??"currentColor"}var Jt=["all",...Object.keys(Ae)],Zt=Object.keys(Ae),en=["all","built-in","project"],tn=["built-in","project"],Ne=["core","claude","antigravity","openai","agent-skills"];function Q(t,r){return`${t}/${r}`}function Be(t){let r=new Map;for(let e of t)if(!Le(e.status)&&e.extensions)for(let i of e.extensions)r.set(Q(e.id,i.id),i.enabled);return r}function $e(t){let r=t.target;return!r||typeof r.closest!="function"?!1:r.closest('label, button, input, [role="switch"], p-toggleswitch')!==null}function nn(t,r){if(ti(t,r))return[t];if(!t.extensions)return[];let e=t.extensions.filter(i=>ni(i,r));return e.length===0?[]:[Y(H({},t),{extensions:e})]}function on(t,r){if(!t.extensions)return[];let e=t.extensions.filter(i=>i.kind.toLowerCase()===r);return e.length===0?[]:[Y(H({},t),{extensions:e})]}function rn(t,r){return r==="all"?[t]:t.source===r?[t]:[]}function sn(t){if(t.locked)return[];if(!t.extensions)return[t];let r=t.extensions.filter(e=>!e.locked);return r.length===0?[]:[Y(H({},t),{extensions:r})]}function an(t){return t.slice().sort((e,i)=>{let n=Ne.indexOf(e.id),s=Ne.indexOf(i.id),g=n>=0?n:Ne.length,S=s>=0?s:Ne.length;return g!==S?g-S:e.id.localeCompare(i.id)}).map(e=>{if(!e.extensions)return e;let i=e.extensions.slice().sort((n,s)=>n.id.localeCompare(s.id));return Y(H({},e),{extensions:i})})}function ti(t,r){return!!(t.id.toLowerCase().includes(r)||t.description&&t.description.toLowerCase().includes(r))}function ni(t,r){return!!(t.id.toLowerCase().includes(r)||t.description&&t.description.toLowerCase().includes(r))}function Le(t){return t==="incompatible-spec"||t==="invalid-manifest"||t==="load-error"||t==="id-collision"}function Ge(t){return t instanceof U||t instanceof Error?t.message:String(t)}function ln(t,r){return Le(t.status)?r.statusFailure[t.status]??t.status:t.status==="enabled"?r.enabledLabel:r.disabledLabel}function cn(t,r){switch(t){case"built-in":return r.sourceBuiltIn;case"project":return r.sourceProject}}var Ue="sm.settings.plugins.collapsed",He="sm.settings.plugins.kind-filter",Ke="sm.settings.plugins.source-filter";function dn(){let t=null;try{t=localStorage.getItem(Ue)}catch{return new Set}if(!t)return new Set;let r;try{r=JSON.parse(t)}catch{return new Set}if(!Array.isArray(r))return new Set;let e=new Set;for(let i of r)typeof i=="string"&&i.length>0&&e.add(i);return e}function gn(t){try{if(t.size===0){localStorage.removeItem(Ue);return}localStorage.setItem(Ue,JSON.stringify([...t]))}catch{}}function pn(){let t=null;try{t=localStorage.getItem(He)}catch{return"all"}return t&&Jt.includes(t)?t:"all"}function un(t){try{if(t==="all"){localStorage.removeItem(He);return}localStorage.setItem(He,t)}catch{}}function mn(){let t=null;try{t=localStorage.getItem(Ke)}catch{return"all"}return t&&en.includes(t)?t:"all"}function hn(t){try{if(t==="all"){localStorage.removeItem(Ke);return}localStorage.setItem(Ke,t)}catch{}}function qe(){Ze(qe);let t=u(dn());B(()=>gn(t()));let r=i=>{let n=new Set(t());n.has(i)?n.delete(i):n.add(i),t.set(n)},e=i=>!t().has(i);return{collapsed:t.asReadonly(),toggleExpanded:r,isExpanded:e}}function _n(t){let r=u(""),e=b(()=>r().trim().length>0),i=u(pn()),n=b(()=>i()!=="all"),s=u(mn()),g=b(()=>s()!=="all"),S=b(()=>i()==="all"&&s()==="all");B(()=>un(i())),B(()=>hn(s()));let V=b(()=>an(t.plugins().flatMap(sn))),te=b(()=>{let F=r().trim().toLowerCase(),P=s(),I=i(),j=V();return P!=="all"&&(j=j.flatMap(D=>rn(D,P))),I!=="all"&&(j=j.flatMap(D=>on(D,I))),F.length>0&&(j=j.flatMap(D=>nn(D,F))),j});return{searchText:r,searchActive:e,kindFilter:i,setKindFilter:F=>{i.set(F)},toggleKindFilter:F=>{i.set(i()===F?"all":F)},isKindFilterActive:F=>i()===F,kindFilterActive:n,kindFilterChips:Zt,sourceFilter:s,setSourceFilter:F=>{s.set(F)},toggleSourceFilter:F=>{s.set(s()===F?"all":F)},isSourceFilterActive:F=>s()===F,sourceFilterActive:g,sourceFilterChips:tn,allFilterActive:S,resetFilters:()=>{i.set("all"),s.set("all")},visiblePlugins:V,filteredPlugins:te}}var ii=new Set(["claude","antigravity","openai","agent-skills","core"]),oi="external_plugin";function ri(t){let r=t.indexOf("/"),e=r>0?t.slice(0,r):t;return ii.has(e)?t:oi}function We(t){let r=new Set;for(let e of t)r.add(ri(e));return[...r].sort()}function fn(t){let r=u(!1),e=u(null),i=u(null),n=u([]),s=u(new Map),g=u(new Map),S=u(!1),V=b(()=>{let P=s(),I=g(),j=new Set;for(let[D,T]of I)P.get(D)!==T&&j.add(D);return j}),te=b(()=>V().size>0),pe=b(()=>n().some(P=>Le(P.status))),ue=b(()=>{let P=g();for(let I of n()){if(I.startsAsDisabled!==!0)continue;let j=I.extensions??[];for(let D of j)if(P.get(Q(I.id,D.id))===!0)return!0}return!1});return{plugins:n,loading:r,loadError:e,toggleError:i,applying:S,hasFailureRows:pe,originalState:s,pendingState:g,dirtyIds:V,hasPendingChanges:te,restartRecommended:ue,pendingEnabled:P=>g().get(P)??!1,isDirty:P=>V().has(P),refresh:async()=>{r.set(!0),e.set(null),i.set(null);try{let P=await t.dataSource.listPlugins();n.set([...P.items]);let I=Be(P.items);s.set(I),g.set(new Map(I))}catch(P){e.set(Ge(P)),n.set([]),s.set(new Map),g.set(new Map)}finally{r.set(!1)}},onExtensionToggle:(P,I,j)=>{if(S())return;let D=Q(P,I.id),T=new Map(g());T.set(D,j),g.set(T)},applyChanges:async()=>{if(S())return{ok:!1};let P=V();if(P.size===0)return{ok:!1};let I=[],j=g();for(let T of P)I.push({id:T,enabled:j.get(T)??!1});S.set(!0),i.set(null);let D=!1;try{let T=await t.dataSource.applyPluginChanges(I);n.set([...T.items]);let Xe=Be(T.items);s.set(Xe),g.set(new Map(Xe)),t.scanTrigger.run(),D=!0}catch(T){i.set(Ge(T))}finally{S.set(!1)}return D&&Dt("plugin.apply",{enabled:We(I.filter(T=>T.enabled).map(T=>T.id)),disabled:We(I.filter(T=>!T.enabled).map(T=>T.id))}),{ok:D}},discardChanges:()=>{g.set(new Map(s())),i.set(null)}}}var bn=(t,r)=>r.id;function li(t,r){if(t&1&&l(0),t&2){let e=d();p(" ",e.texts.pluginsKindFilterAll," ")}}function ci(t,r){if(t&1&&l(0),t&2){let e=d().$implicit,i=d(2);p(" ",i.sourceLabel(e)," ")}}function di(t,r){if(t&1){let e=L();c(0,"p-togglebutton",19),w("ngModelChange",function(){let n=E(e).$implicit,s=d(2);return M(s.toggleSourceFilter(n))}),K(1,ci,1,1,"ng-template",null,0,Ce),a()}if(t&2){let e=r.$implicit,i=d(2);_("ngModel",i.isSourceFilterActive(e))("ariaLabel",i.texts.pluginsSourceFilterOptionA11y(e,!i.isSourceFilterActive(e))),v("data-testid","settings-plugins-source-chip-"+e)}}function gi(t,r){if(t&1&&(c(0,"span",17),l(1,"|"),a(),A(2,di,3,3,"p-togglebutton",18,q),c(4,"span",17),l(5,"|"),a()),t&2){let e=d();o(2),N(e.sourceFilterChips)}}function pi(t,r){if(t&1&&l(0),t&2){let e=d().$implicit;p(" ",e," ")}}function ui(t,r){if(t&1){let e=L();c(0,"p-togglebutton",20),w("ngModelChange",function(){let n=E(e).$implicit,s=d();return M(s.toggleKindFilter(n))}),K(1,pi,1,1,"ng-template",null,0,Ce),a()}if(t&2){let e=r.$implicit,i=d();Ve("--kind-color",i.kindTint(e)),_("ngModel",i.isKindFilterActive(e))("ariaLabel",i.texts.pluginsKindFilterOptionA11y(e,!i.isKindFilterActive(e))),v("data-testid","settings-plugins-kind-chip-"+e)}}function mi(t,r){if(t&1&&(c(0,"p-message",12),l(1),a()),t&2){let e=d();_("closable",!1),o(),p(" ",e.texts.unsavedChangesMessage(e.dirtyIds().size)," ")}}function hi(t,r){if(t&1&&(c(0,"p",13),O(1,"i",21),l(2),a()),t&2){let e=d();o(2),p(" ",e.texts.loading," ")}}function _i(t,r){if(t&1&&(c(0,"p-message",14),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.errorPrefix," ",e.loadError()," ")}}function fi(t,r){if(t&1&&(c(0,"p",15),l(1),a()),t&2){let e=d();o(),p(" ",e.texts.empty," ")}}function bi(t,r){if(t&1){let e=L();c(0,"p-message",25),w("onClose",function(){E(e);let n=d(2);return M(n.toggleError.set(null))}),l(1),a()}if(t&2){let e=d(2);_("closable",!0),o(),R(" ",e.texts.toggleErrorPrefix," ",e.toggleError()," ")}}function vi(t,r){if(t&1&&(c(0,"p",26),O(1,"i",28),l(2),a()),t&2){let e=d(3);o(2),p(" ",e.texts.pluginsSearchEmpty(e.searchText())," ")}}function xi(t,r){if(t&1&&(c(0,"p",27),O(1,"i",29),l(2),a()),t&2){let e=d(3);o(2),p(" ",e.texts.pluginsProjectEmpty," ")}}function Ci(t,r){if(t&1&&m(0,vi,3,1,"p",26)(1,xi,3,1,"p",27),t&2){let e=d(2);h(e.searchActive()?0:e.sourceFilter()==="project"&&!e.kindFilterActive()?1:-1)}}function wi(t,r){if(t&1){let e=L();c(0,"button",44),w("click",function(n){E(e);let s=d().$implicit;return d(2).toggleExpanded(s.id),M(n.stopPropagation())}),O(1,"i",45),a()}if(t&2){let e=d().$implicit,i=d(2);v("aria-expanded",i.isExpanded(e.id))("aria-label",i.isExpanded(e.id)?i.texts.collapseLabel:i.texts.expandLabel)("data-testid","settings-plugin-expand-"+e.id),o(),G("fa-chevron-down",i.isExpanded(e.id))("fa-chevron-right",!i.isExpanded(e.id))}}function yi(t,r){t&1&&O(0,"span",33)}function ki(t,r){if(t&1&&(c(0,"span",38),l(1),a()),t&2){let e=d().$implicit;o(),p("v",e.version)}}function Si(t,r){if(t&1&&(c(0,"span",39),O(1,"i",46),l(2),a()),t&2){let e=d().$implicit,i=d(2);_("title",i.texts.lockedTooltip),v("data-testid","settings-row-locked-"+e.id),o(2),p(" ",i.texts.lockedLabel," ")}}function Pi(t,r){if(t&1&&(c(0,"p",40),l(1),a()),t&2){let e=d().$implicit;o(),f(e.description)}}function Ei(t,r){if(t&1&&(c(0,"span",41),l(1),a()),t&2){let e=d().$implicit;o(),f(e.reason)}}function Mi(t,r){if(t&1&&(c(0,"p",42),O(1,"i",47),l(2),a()),t&2){let e=d().$implicit,i=d(2);v("data-testid","settings-row-starts-disabled-"+e.id),o(2),p(" ",i.texts.startsAsDisabledRowHint," ")}}function Ti(t,r){if(t&1&&(c(0,"span",55),l(1),a()),t&2){let e=d().$implicit;o(),p("v",e.version)}}function Oi(t,r){if(t&1&&(c(0,"span",39),O(1,"i",46),l(2),a()),t&2){let e=d().$implicit,i=d(2).$implicit,n=d(2);_("title",n.texts.lockedTooltip),v("data-testid","settings-extrow-locked-"+i.id+"-"+e.id),o(2),p(" ",n.texts.lockedLabel," ")}}function Ii(t,r){if(t&1&&(c(0,"p",56),l(1),a()),t&2){let e=d().$implicit;o(),f(e.description)}}function Fi(t,r){if(t&1){let e=L();c(0,"li",49),w("click",function(n){let s=E(e).$implicit,g=d(2).$implicit,S=d(2);return M(S.onSubrowClick(g.id,s,n))})("keydown.enter",function(n){let s=E(e).$implicit,g=d(2).$implicit,S=d(2);return M(S.onSubrowClick(g.id,s,n))})("keydown.space",function(n){let s=E(e).$implicit,g=d(2).$implicit,S=d(2);return n.preventDefault(),M(S.onSubrowClick(g.id,s,n))}),c(1,"div",50)(2,"div",51),O(3,"span",52),c(4,"span",53),l(5),a(),c(6,"span",54),l(7),a(),m(8,Ti,2,1,"span",55),m(9,Oi,3,3,"span",39),a(),m(10,Ii,2,1,"p",56),a(),c(11,"p-toggleswitch",57),w("ngModelChange",function(n){let s=E(e).$implicit,g=d(2).$implicit,S=d(2);return M(S.onExtensionToggle(g.id,s,n))}),a()()}if(t&2){let e=r.$implicit,i=d(2).$implicit,n=d(2);G("is-clickable",n.extensionToggleInteractive(e))("is-dirty",n.isDirty(n.qualifiedExt(i.id,e.id))),v("aria-label",n.texts.a11y.extensionRow(n.qualifiedExt(i.id,e.id)))("data-testid","settings-extrow-"+i.id+"-"+e.id),o(3),G("settings-plugins__dirty-dot--visible",n.isDirty(n.qualifiedExt(i.id,e.id))),v("data-testid","settings-extrow-dirty-"+i.id+"-"+e.id),o(2),f(e.id),o(),Ve("--kind-color",n.kindTint(e.kind)),o(),f(e.kind),o(),h(i.source==="project"?8:-1),o(),h(e.locked?9:-1),o(),h(e.description?10:-1),o(),_("ngModel",n.pendingEnabled(n.qualifiedExt(i.id,e.id)))("disabled",n.applying()||!!e.locked)("ariaLabel",n.texts.a11y.extensionToggle(n.qualifiedExt(i.id,e.id),!n.pendingEnabled(n.qualifiedExt(i.id,e.id)))),v("data-testid","settings-ext-toggle-"+i.id+"-"+e.id)}}function ji(t,r){if(t&1&&(c(0,"ul",43),A(1,Fi,12,20,"li",48,bn),a()),t&2){let e=d().$implicit;v("data-testid","settings-extensions-"+e.id),o(),N(e.extensions)}}function Di(t,r){if(t&1){let e=L();c(0,"li",30)(1,"div",31),w("click",function(n){let s=E(e).$implicit,g=d(2);return M(g.onRowClick(s,n))})("keydown.enter",function(n){let s=E(e).$implicit,g=d(2);return M(g.onRowClick(s,n))})("keydown.space",function(n){let s=E(e).$implicit,g=d(2);return n.preventDefault(),M(g.onRowClick(s,n))}),m(2,wi,2,7,"button",32)(3,yi,1,0,"span",33),c(4,"div",34)(5,"div",35)(6,"span",36),l(7),a(),c(8,"span",37),l(9),a(),m(10,ki,2,1,"span",38),m(11,Si,3,3,"span",39),a(),m(12,Pi,2,1,"p",40),m(13,Ei,2,1,"span",41),m(14,Mi,3,2,"p",42),a()(),m(15,ji,3,1,"ul",43),a()}if(t&2){let e=r.$implicit,i=d(2);G("is-clickable",i.rowIsClickable(e)),v("data-testid","settings-row-"+e.id),o(),v("aria-label",i.texts.a11y.pluginRow(e.id)),o(),h(i.canExpandExtensions(e)?2:3),o(5),f(e.id),o(2),f(i.sourceLabel(e.source)),o(),h(e.source==="project"&&e.version?10:-1),o(),h(e.locked?11:-1),o(),h(e.description?12:-1),o(),h(e.reason?13:-1),o(),h(i.showStartsAsDisabledHint(e)?14:-1),o(),h(i.canExpandExtensions(e)&&i.isExpanded(e.id)?15:-1)}}function Ai(t,r){if(t&1&&(m(0,bi,2,3,"p-message",22),m(1,Ci,2,1),c(2,"ul",23),A(3,Di,16,13,"li",24,bn),a()),t&2){let e=d();h(e.toggleError()?0:-1),o(),h(e.filteredPlugins().length===0?1:-1),o(2),N(e.filteredPlugins())}}function Ni(t,r){if(t&1&&(c(0,"em",58),l(1),a()),t&2){let e=d(2);o(),p(" ",e.texts.startsAsDisabledFooterHint," ")}}function Li(t,r){if(t&1){let e=L();c(0,"footer",16),m(1,Ni,2,1,"em",58),c(2,"p-button",59),w("onClick",function(){E(e);let n=d();return M(n.discardChanges())}),a(),c(3,"p-button",60),w("onClick",function(){E(e);let n=d();return M(n.applyChanges())}),a()()}if(t&2){let e=d();o(),h(e.restartRecommended()?1:-1),o(),_("text",!0)("label",e.texts.discardChanges)("ariaLabel",e.texts.discardA11y)("disabled",e.applying()),o(),_("label",e.texts.applyAndClose)("ariaLabel",e.texts.applyA11y)("disabled",e.applying())("loading",e.applying())}}var vn=(()=>{class t{dataSource=k(X);scanTrigger=k(Rt);buffer=k(Fe);destroyRef=k(et);visible=$.required();applied=we();texts=y;pluginState=fn({dataSource:this.dataSource,scanTrigger:this.scanTrigger});plugins=this.pluginState.plugins;loading=this.pluginState.loading;loadError=this.pluginState.loadError;toggleError=this.pluginState.toggleError;applying=this.pluginState.applying;hasFailureRows=this.pluginState.hasFailureRows;originalState=this.pluginState.originalState;pendingState=this.pluginState.pendingState;dirtyIds=this.pluginState.dirtyIds;hasPendingChanges=this.pluginState.hasPendingChanges;restartRecommended=this.pluginState.restartRecommended;pluginCollapse=qe();collapsed=this.pluginCollapse.collapsed;pluginFilter=_n({plugins:this.plugins});searchText=this.pluginFilter.searchText;searchActive=this.pluginFilter.searchActive;kindFilter=this.pluginFilter.kindFilter;kindFilterActive=this.pluginFilter.kindFilterActive;kindFilterChips=this.pluginFilter.kindFilterChips;sourceFilter=this.pluginFilter.sourceFilter;sourceFilterActive=this.pluginFilter.sourceFilterActive;sourceFilterChips=this.pluginFilter.sourceFilterChips;allFilterActive=this.pluginFilter.allFilterActive;visiblePlugins=this.pluginFilter.visiblePlugins;filteredPlugins=this.pluginFilter.filteredPlugins;hasProjectPlugins=b(()=>this.plugins().some(e=>e.source==="project"));constructor(){B(()=>{this.visible()&&this.pluginState.refresh()});let e={dirtyIds:this.pluginState.dirtyIds,applyChanges:async()=>{let i=await this.pluginState.applyChanges();return i.ok&&this.applied.emit(),i},discardChanges:()=>this.pluginState.discardChanges()};this.buffer.register(e),this.destroyRef.onDestroy(()=>this.buffer.deregister(e))}toggleKindFilter(e){this.pluginFilter.toggleKindFilter(e)}isKindFilterActive(e){return this.pluginFilter.isKindFilterActive(e)}toggleSourceFilter(e){this.pluginFilter.toggleSourceFilter(e)}isSourceFilterActive(e){return this.pluginFilter.isSourceFilterActive(e)}resetFilters(){this.pluginFilter.resetFilters()}toggleExpanded(e){this.pluginCollapse.toggleExpanded(e)}isExpanded(e){return this.pluginCollapse.isExpanded(e)}pendingEnabled(e){return this.pluginState.pendingEnabled(e)}isDirty(e){return this.pluginState.isDirty(e)}showStartsAsDisabledHint(e){return!e.startsAsDisabled||!e.extensions?!1:e.extensions.some(i=>this.pendingEnabled(Q(e.id,i.id)))}onExtensionToggle(e,i,n){this.pluginState.onExtensionToggle(e,i,n)}async applyChanges(){(await this.pluginState.applyChanges()).ok&&this.applied.emit()}discardChanges(){this.pluginState.discardChanges()}canExpandExtensions(e){return(e.extensions?.length??0)>0}extensionToggleInteractive(e){return!e.locked}rowIsClickable(e){return this.canExpandExtensions(e)}onRowClick(e,i){$e(i)||this.canExpandExtensions(e)&&this.toggleExpanded(e.id)}onSubrowClick(e,i,n){if($e(n)||!this.extensionToggleInteractive(i))return;let s=Q(e,i.id);this.onExtensionToggle(e,i,!this.pendingEnabled(s))}statusLabel(e){return ln(e,this.texts)}sourceLabel(e){return cn(e,this.texts)}qualifiedExt(e,i){return Q(e,i)}kindTint(e){return Yt(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-plugins"]],inputs:{visible:[1,"visible"]},outputs:{applied:"applied"},decls:23,vars:12,consts:[["content",""],["aria-labelledby","settings-plugins-heading",1,"settings-plugins"],[1,"settings-plugins__scroll"],[1,"settings-plugins__header"],["id","settings-plugins-heading",1,"settings-plugins__title"],[1,"settings-plugins__intro"],["iconPosition","left",1,"settings-plugins__search"],["styleClass","fa-solid fa-magnifying-glass"],["pInputText","","type","text","data-testid","settings-plugins-search",3,"ngModelChange","placeholder","ngModel"],["role","group","data-testid","settings-plugins-filter",1,"settings-plugins__filter"],["styleClass","settings-plugins__source-chip is-all","data-testid","settings-plugins-filter-all",3,"ngModelChange","ngModel","ariaLabel"],["styleClass","settings-plugins__kind-chip",3,"ngModel","--kind-color","ariaLabel"],["severity","warn","styleClass","settings-plugins__banner","data-testid","settings-banner-unsaved",3,"closable"],["data-testid","settings-loading",1,"settings-plugins__hint"],["severity","error","data-testid","settings-error",3,"closable"],["data-testid","settings-empty",1,"settings-plugins__hint"],["data-testid","settings-plugins-footer",1,"settings-plugins__footer"],["aria-hidden","true",1,"settings-plugins__filter-divider"],["styleClass","settings-plugins__source-chip",3,"ngModel","ariaLabel"],["styleClass","settings-plugins__source-chip",3,"ngModelChange","ngModel","ariaLabel"],["styleClass","settings-plugins__kind-chip",3,"ngModelChange","ngModel","ariaLabel"],["aria-hidden","true",1,"fa-solid","fa-spinner","fa-spin"],["severity","error","data-testid","settings-toggle-error",3,"closable"],["role","list",1,"settings-plugins__list"],[1,"settings-plugins__row",3,"is-clickable"],["severity","error","data-testid","settings-toggle-error",3,"onClose","closable"],["data-testid","settings-search-empty",1,"settings-plugins__hint"],["data-testid","settings-project-empty",1,"settings-plugins__hint"],["aria-hidden","true",1,"fa-solid","fa-magnifying-glass"],["aria-hidden","true",1,"fa-solid","fa-folder-open"],[1,"settings-plugins__row"],["role","button","tabindex","0",1,"settings-plugins__row-main",3,"click","keydown.enter","keydown.space"],["type","button",1,"settings-plugins__expand"],["aria-hidden","true",1,"settings-plugins__expand-spacer"],[1,"settings-plugins__row-text"],[1,"settings-plugins__row-headline"],[1,"settings-plugins__row-id"],[1,"settings-plugins__row-source"],[1,"settings-plugins__row-version"],[1,"settings-plugins__row-locked",3,"title"],[1,"settings-plugins__row-description"],[1,"settings-plugins__row-reason"],[1,"settings-plugins__row-hint"],["role","list",1,"settings-plugins__sublist"],["type","button",1,"settings-plugins__expand",3,"click"],["aria-hidden","true",1,"fa-solid"],["aria-hidden","true",1,"fa-solid","fa-lock"],["aria-hidden","true",1,"fa-solid","fa-triangle-exclamation"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"is-clickable","is-dirty"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"click","keydown.enter","keydown.space"],[1,"settings-plugins__subrow-text"],[1,"settings-plugins__subrow-headline"],["aria-hidden","true",1,"settings-plugins__dirty-dot"],[1,"settings-plugins__subrow-id"],[1,"settings-plugins__subrow-kind"],[1,"settings-plugins__subrow-version"],[1,"settings-plugins__subrow-description"],[3,"ngModelChange","ngModel","disabled","ariaLabel"],["data-testid","settings-plugins-restart-hint",1,"settings-plugins__footer-hint"],["severity","secondary","data-testid","settings-plugins-discard",3,"onClick","text","label","ariaLabel","disabled"],["data-testid","settings-plugins-apply",3,"onClick","label","ariaLabel","disabled","loading"]],template:function(i,n){i&1&&(c(0,"section",1)(1,"div",2)(2,"header",3)(3,"h2",4),l(4),a(),c(5,"p",5),l(6),a()(),c(7,"p-iconfield",6),O(8,"p-inputicon",7),c(9,"input",8),w("ngModelChange",function(g){return n.searchText.set(g)}),a()(),c(10,"div",9)(11,"p-togglebutton",10),w("ngModelChange",function(){return n.resetFilters()}),K(12,li,1,1,"ng-template",null,0,Ce),a(),m(14,gi,6,0),A(15,ui,3,5,"p-togglebutton",11,q),a(),m(17,mi,2,2,"p-message",12),m(18,hi,3,1,"p",13)(19,_i,2,3,"p-message",14)(20,fi,2,1,"p",15)(21,Ai,5,2),a(),m(22,Li,4,9,"footer",16),a()),i&2&&(o(4),p(" ",n.texts.pluginsHeading," "),o(2),f(n.texts.pluginsIntro),o(3),_("placeholder",n.texts.pluginsSearchPlaceholder)("ngModel",n.searchText()),v("aria-label",n.texts.pluginsSearchA11y),o(),v("aria-label",n.texts.pluginsFilterA11y),o(),_("ngModel",n.allFilterActive())("ariaLabel",n.texts.pluginsFilterAllA11y),o(3),h(n.hasProjectPlugins()?14:-1),o(),N(n.kindFilterChips),o(2),h(n.hasPendingChanges()?17:-1),o(),h(n.loading()?18:n.loadError()?19:n.plugins().length===0?20:21),o(4),h(n.hasPendingChanges()?22:-1))},dependencies:[ae,Se,re,se,le,Me,xt,vt,wt,Ct,Ee,Pe,de,ce,Mt,Et,je,ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;--kind-color: var(--p-text-color)}.settings-plugins[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.settings-plugins__scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:1.25rem 1.5rem;display:flex;flex-direction:column;gap:.75rem;min-height:0}.settings-plugins__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.settings-plugins__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-plugins__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__search[_ngcontent-%COMP%]{display:block;width:100%}.settings-plugins__search[_ngcontent-%COMP%] :where(input[_ngcontent-%COMP%]){width:100%}.settings-plugins__filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem}.settings-plugins__kind-chip[_ngcontent-%COMP%], .settings-plugins__source-chip[_ngcontent-%COMP%]{--p-togglebutton-padding: .25rem .625rem;--p-togglebutton-content-padding: 0;--p-togglebutton-content-checked-background: transparent;--p-togglebutton-content-checked-shadow: none;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 8%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 18%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 80%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 35%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 55%, transparent);--p-togglebutton-checked-border-color: var(--chip-accent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-50);font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:lowercase}.settings-plugins__kind-chip[_ngcontent-%COMP%]{--chip-accent: var(--kind-color)}.settings-plugins__source-chip[_ngcontent-%COMP%]{--chip-accent: var(--p-primary-color)}.settings-plugins__source-chip.is-all[_ngcontent-%COMP%]{--chip-accent: var(--p-text-muted-color)}.settings-plugins__filter-divider[_ngcontent-%COMP%]{align-self:center;color:var(--p-text-muted-color);-webkit-user-select:none;user-select:none}.app-dark[_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__source-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__source-chip[_ngcontent-%COMP%]{--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 14%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 26%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 50%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-900)}.settings-plugins__banner[_ngcontent-%COMP%]{display:block}.settings-plugins__banner-body[_ngcontent-%COMP%]{font-weight:400}.settings-plugins__hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;padding:1rem 0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-plugins__row[_ngcontent-%COMP%]{border:1px solid var(--p-content-border-color);border-radius:var(--p-border-radius);background:var(--p-content-background);padding:.75rem .875rem;display:flex;flex-direction:column;gap:.5rem}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__row.is-failed[_ngcontent-%COMP%]{border-color:var(--p-message-error-border-color);background:var(--p-message-error-background)}.settings-plugins__row.is-extension-plugin[_ngcontent-%COMP%]{background:var(--p-content-background)}.settings-plugins__row-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem}.settings-plugins__expand[_ngcontent-%COMP%], .settings-plugins__expand-spacer[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.settings-plugins__expand[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;color:var(--p-text-muted-color);border-radius:var(--p-border-radius)}.settings-plugins__expand[_ngcontent-%COMP%]:hover{color:var(--p-text-color);background:var(--p-content-hover-background)}.settings-plugins__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__row-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__row-id[_ngcontent-%COMP%]{font-weight:600;font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-kind[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap}.settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 8%,transparent);border:1px solid color-mix(in oklab,var(--p-text-color) 18%,transparent);color:var(--p-text-color)}.app-dark[_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 14%,transparent);border-color:color-mix(in oklab,var(--p-text-color) 28%,transparent)}.settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--kind-color) 38%,transparent);color:color-mix(in oklab,var(--kind-color) 70%,var(--p-surface-900))}.app-dark[_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 22%,transparent);border-color:color-mix(in oklab,var(--kind-color) 55%,transparent);color:color-mix(in oklab,var(--kind-color) 80%,var(--p-surface-50))}.settings-plugins__row-status[_ngcontent-%COMP%]{font-weight:500}.settings-plugins__row-locked[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap;background:color-mix(in oklab,var(--p-message-warn-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--p-message-warn-color) 35%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 70%,var(--p-surface-900))}.settings-plugins__row-locked[_ngcontent-%COMP%] > .pi[_ngcontent-%COMP%]{font-size:.7rem}.app-dark[_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-message-warn-color) 22%,transparent);border-color:color-mix(in oklab,var(--p-message-warn-color) 55%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 85%,var(--p-surface-50))}.settings-plugins__row-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8125rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__row-reason[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-message-error-color);font-family:var(--p-monospace-font-family);margin-top:.25rem}.settings-plugins__sublist[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.5rem 0 0 1.75rem;display:flex;flex-direction:column;gap:.25rem;border-top:1px dashed var(--p-content-border-color)}.settings-plugins__subrow[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.375rem .5rem;border-radius:var(--p-border-radius)}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__subrow-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__subrow-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__subrow-id[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.875rem}.settings-plugins__subrow-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__dirty-dot[_ngcontent-%COMP%]{position:absolute;left:-.75rem;top:50%;transform:translateY(-50%);width:.5rem;height:.5rem;border-radius:50%;background:var(--p-warn-color);visibility:hidden}.settings-plugins__dirty-dot--visible[_ngcontent-%COMP%]{visibility:visible}.settings-plugins__row-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-warn-color)}.settings-plugins__row-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-top:.125rem}.settings-plugins__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border-top:1px solid var(--p-content-border-color);background:var(--p-content-background)}.settings-plugins__footer-hint[_ngcontent-%COMP%]{font-style:italic;font-size:.75rem;line-height:1.4;color:var(--p-warn-color);margin-right:auto}"],changeDetection:0})}return t})();function Vi(t,r){if(t&1&&(c(0,"p-message",4),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function zi(t,r){if(t&1&&(c(0,"p-message",5),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Bi(t,r){t&1&&(c(0,"p-message",6),l(1),a()),t&2&&(_("closable",!1),o(),p(" ",r," "))}function $i(t,r){if(t&1&&(c(0,"span",12),l(1),a()),t&2){let e=d();o(),f(e.texts.project.activeProviderSourceAutodetect)}}function Gi(t,r){if(t&1&&(c(0,"span",12),l(1),a()),t&2){let e=d();o(),f(e.texts.project.activeProviderSourceNone)}}function Ui(t,r){if(t&1&&(c(0,"span",12),l(1),a()),t&2){let e=d(),i=d();o(),R(" ",i.texts.project.activeProviderDetectedPrefix," ",e," ")}}function Hi(t,r){t&1&&m(0,Ui,2,2,"span",12),t&2&&h(r.length>0?0:-1)}function Ki(t,r){if(t&1&&(c(0,"p-message",15),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function qi(t,r){if(t&1&&(c(0,"p-message",16),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Wi(t,r){if(t&1){let e=L();c(0,"li",19)(1,"span",27),l(2),a(),c(3,"p-button",28),w("onClick",function(){let n=E(e).$implicit,s=d();return M(s.onReferencePathRemove(n))}),a()()}if(t&2){let e=r.$implicit,i=d();o(2),f(e),o(),_("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.referencePaths")),v("data-testid","settings-project-reference-paths-remove")}}function Xi(t,r){if(t&1&&(c(0,"p-message",22),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function Qi(t,r){if(t&1&&(c(0,"p-message",23),l(1),a()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Yi(t,r){if(t&1){let e=L();c(0,"li",19)(1,"span",27),l(2),a(),c(3,"p-button",28),w("onClick",function(){let n=E(e).$implicit,s=d();return M(s.onIgnorePatternRemove(n))}),a()()}if(t&2){let e=r.$implicit,i=d();o(2),f(e),o(),_("label",i.texts.project.removeIgnorePatternLabel)("outlined",!0)("disabled",i.isPending("ignore.patterns")),v("data-testid","settings-project-ignore-patterns-remove")}}var Ji=/[\n\r\x00-\x1F\x7F]/,xn=(()=>{class t{dataSource=k(X);confirmation=k(oe);providerRegistry=k(Nt);visible=$.required();texts=y;loading=u(!1);loadError=u(null);saveError=u(null);preferences=u(null);pending=u(new Set);newReferencePath=u("");referencePaths=b(()=>this.preferences()?.scan.referencePaths??[]);ignoreLoadError=u(null);ignoreSaveError=u(null);ignoreEnvelope=u(null);newIgnorePattern=u("");ignorePatterns=b(()=>this.ignoreEnvelope()?.patterns??[]);activeProviderEnvelope=u(null);activeProviderLoadError=u(null);activeProviderSaveError=u(null);activeProviderSwitchAnnouncement=u(null);providerOptions=b(()=>[{id:"",label:y.project.activeProviderEmptyOption},...this.providerRegistry.providers().map(e=>({id:e.id,label:e.label}))]);activeProviderValue=b(()=>this.activeProviderEnvelope()?.activeProvider??"");activeProviderDetectedLabel=b(()=>(this.activeProviderEnvelope()?.detected??[]).join(", "));activeProviderSource=b(()=>this.activeProviderEnvelope()?.source??"none");constructor(){B(()=>{this.visible()&&(this.refresh(),this.refreshIgnore(),this.refreshActiveProvider())})}isPending(e){return this.pending().has(e)}onReferencePathAdd(){let e=this.newReferencePath().trim();if(e.length===0)return;if(e.includes(",")){this.saveError.set(this.texts.project.commaForbidden);return}let i=[...this.referencePaths(),e];this.runPatch("scan.referencePaths",{scan:{referencePaths:i}}).then(n=>{n&&this.newReferencePath.set("")})}onReferencePathRemove(e){let i=this.referencePaths().filter(n=>n!==e);this.runPatch("scan.referencePaths",{scan:{referencePaths:[...i]}})}onIgnorePatternAdd(){let e=this.newIgnorePattern().trim();if(e.length===0){this.ignoreSaveError.set(this.texts.project.ignorePatternEmpty);return}if(Ji.test(e)){this.ignoreSaveError.set(this.texts.project.ignorePatternHasControlChar);return}let i=this.ignorePatterns();if(i.includes(e)){this.ignoreSaveError.set(this.texts.project.ignorePatternDuplicate);return}let n=[...i,e];this.runIgnorePatch({patterns:n}).then(s=>{s&&this.newIgnorePattern.set("")})}onIgnorePatternRemove(e){let i=this.ignorePatterns().filter(n=>n!==e);this.runIgnorePatch({patterns:[...i]})}onActiveProviderChange(e){e===""||e===this.activeProviderValue()||this.confirmActiveProviderSwitch(e,async()=>{await this.runActiveProviderSwitch(e)})}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let e=await this.dataSource.getProjectPreferences();this.preferences.set(e)}catch(e){this.loadError.set(ee(e)),this.preferences.set(null)}finally{this.loading.set(!1)}}async refreshIgnore(){this.ignoreLoadError.set(null),this.ignoreSaveError.set(null);try{let e=await this.dataSource.getProjectIgnore();this.ignoreEnvelope.set(e)}catch(e){this.ignoreLoadError.set(ee(e)),this.ignoreEnvelope.set(null)}}async refreshActiveProvider(){this.activeProviderLoadError.set(null),this.activeProviderSaveError.set(null);try{let e=await this.dataSource.getActiveProvider();this.activeProviderEnvelope.set(e)}catch(e){this.activeProviderLoadError.set(ee(e)),this.activeProviderEnvelope.set(null)}}async runActiveProviderSwitch(e){this.activeProviderSaveError.set(null),this.activeProviderSwitchAnnouncement.set(null);try{let i=await this.dataSource.setActiveProvider(e);this.activeProviderEnvelope.set({activeProvider:i.activeProvider,detected:i.detected,source:i.source});let n=i.switch.dropped;if(n===null)this.activeProviderSwitchAnnouncement.set(this.texts.project.activeProviderSwitchedNoDb);else{let s=this.texts.project;this.activeProviderSwitchAnnouncement.set(`${s.activeProviderSwitchedPrefix} ${n.tableCount} ${s.activeProviderSwitchedSuffix}`)}}catch(i){this.activeProviderSaveError.set(ee(i))}}confirmActiveProviderSwitch(e,i){this.confirmation.confirm({header:this.texts.project.activeProviderConfirmHeader,message:this.texts.project.activeProviderConfirmIntro,acceptLabel:this.texts.project.activeProviderConfirmAccept,rejectLabel:this.texts.project.activeProviderConfirmReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{i()},reject:()=>{let n=this.activeProviderEnvelope();n&&this.activeProviderEnvelope.set(H({},n))}})}async runPatch(e,i){if(this.pending().has(e))return!1;let n=new Set(this.pending());n.add(e),this.pending.set(n),this.saveError.set(null);let s=!1;try{let g=await this.dataSource.setProjectPreferences(i);this.preferences.set(g),s=!0}catch(g){if(g instanceof U&&g.code==="confirm-required"){let S=g.paths??[];this.confirmDialog(S,async()=>{try{let V=await this.dataSource.setProjectPreferences(Y(H({},i),{confirm:!0}));this.preferences.set(V),this.newReferencePath.set("")}catch(V){this.saveError.set(ee(V))}})}else this.saveError.set(ee(g))}finally{let g=new Set(this.pending());g.delete(e),this.pending.set(g)}return s}async runIgnorePatch(e){let i="ignore.patterns";if(this.pending().has(i))return!1;let n=new Set(this.pending());n.add(i),this.pending.set(n),this.ignoreSaveError.set(null);let s=!1;try{let g=await this.dataSource.setProjectIgnore(e);this.ignoreEnvelope.set(g),s=!0}catch(g){this.ignoreSaveError.set(ee(g))}finally{let g=new Set(this.pending());g.delete(i),this.pending.set(g)}return s}confirmDialog(e,i){this.confirmation.confirm({header:y.project.confirmDialogHeader,message:y.project.confirmDialogIntro+`
121
+ `,Gn={root:{position:"relative"}},Un={root:({instance:t})=>["p-toggleswitch p-component",{"p-toggleswitch p-component":!0,"p-toggleswitch-checked":t.checked(),"p-disabled":t.$disabled(),"p-invalid":t.invalid()}],input:"p-toggleswitch-input",slider:"p-toggleswitch-slider",handle:"p-toggleswitch-handle"},Ut=(()=>{class t extends ht{name="toggleswitch";style=$n;classes=Un;inlineStyles=Gn;static \u0275fac=(()=>{let e;return function(n){return(e||(e=Re(t)))(n||t)}})();static \u0275prov=be({token:t,factory:t.\u0275fac})}return t})();var Ht=new Je("TOGGLESWITCH_INSTANCE"),Hn={provide:_t,useExisting:Qe(()=>ge),multi:!0},ge=(()=>{class t extends kt{componentName="ToggleSwitch";$pcToggleSwitch=k(Ht,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=k(he,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;tabindex;inputId;readonly;trueValue=!0;falseValue=!1;ariaLabel;size=$();ariaLabelledBy;autofocus;onChange=new tt;input;handleTemplate;_handleTemplate;focused=!1;_componentStyle=k(Ut);templates;onHostClick(e){this.onClick(e)}onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="handle"?this._handleTemplate=e.template:this._handleTemplate=e.template})}onClick(e){!this.$disabled()&&!this.readonly&&(this.writeModelValue(this.checked()?this.falseValue:this.trueValue),this.onModelChange(this.modelValue()),this.onChange.emit({originalEvent:e,checked:this.modelValue()}),this.input.nativeElement.focus())}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}checked(){return this.modelValue()===this.trueValue}writeControlValue(e,i){i(e),this.cd.markForCheck()}get dataP(){return this.cn({checked:this.checked(),disabled:this.$disabled(),invalid:this.invalid()})}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Re(t)))(n||t)}})();static \u0275cmp=z({type:t,selectors:[["p-toggleswitch"],["p-toggleSwitch"],["p-toggle-switch"]],contentQueries:function(i,n,a){if(i&1&&lt(a,Ln,4)(a,ye,4),i&2){let g;ve(g=xe())&&(n.handleTemplate=g.first),ve(g=xe())&&(n.templates=g)}},viewQuery:function(i,n){if(i&1&&ct(Rn,5),i&2){let a;ve(a=xe())&&(n.input=a.first)}},hostVars:7,hostBindings:function(i,n){i&1&&w("click",function(g){return n.onHostClick(g)}),i&2&&(v("data-p-checked",n.checked())("data-p-disabled",n.$disabled())("data-p",n.dataP),dt(n.sx("root")),me(n.cn(n.cx("root"),n.styleClass)))},inputs:{styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",pt],inputId:"inputId",readonly:[2,"readonly","readonly",ze],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",size:[1,"size"],ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",ze]},outputs:{onChange:"onChange"},features:[ie([Hn,Ut,{provide:Ht,useExisting:t},{provide:ft,useExisting:t}]),ot([he]),rt],decls:5,vars:22,consts:[["input",""],["type","checkbox","role","switch",3,"focus","blur","checked","pAutoFocus","pBind"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&(c(0,"input",1,0),w("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),s(),c(2,"div",2)(3,"div",2),m(4,Bn,1,4,"ng-container"),s()()),i&2&&(me(n.cx("input")),_("checked",n.checked())("pAutoFocus",n.autofocus)("pBind",n.ptm("input")),v("id",n.inputId)("required",n.required()?"":void 0)("disabled",n.$disabled()?"":void 0)("aria-checked",n.checked())("aria-labelledby",n.ariaLabelledBy)("aria-label",n.ariaLabel)("name",n.name())("tabindex",n.tabindex),o(2),me(n.cx("slider")),_("pBind",n.ptm("slider")),v("data-p",n.dataP),o(),me(n.cx("handle")),_("pBind",n.ptm("handle")),v("data-p",n.dataP),o(),h(n.handleTemplate||n._handleTemplate?4:-1))},dependencies:[mt,ut,yt,ke,bt,he],encapsulation:2,changeDetection:0})}return t})(),je=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=it({type:t});static \u0275inj=Ye({imports:[ge,ke,ke]})}return t})();var Kn=(t,r)=>r.key;function qn(t,r){if(t&1&&(c(0,"p-message",3),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.general.loadErrorPrefix," ",r," ")}}function Wn(t,r){if(t&1&&(c(0,"p-message",4),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.general.saveErrorPrefix," ",r," ")}}function Xn(t,r){t&1&&(c(0,"div",15),l(1),s()),t&2&&(o(),f(r))}function Qn(t,r){if(t&1){let e=L();c(0,"li",6)(1,"div",8)(2,"div",9),l(3),s(),c(4,"div",10),l(5),s(),m(6,Xn,2,1,"div",15),s(),c(7,"p-toggleswitch",16),w("ngModelChange",function(n){let a=E(e).$implicit,g=d();return M(g.onToggle(a,n))}),s()()}if(t&2){let e,i=r.$implicit,n=d();v("data-testid","settings-general-row-"+i.key),o(3),f(n.toggleLabel(i.key)),o(2),p(" ",n.toggleDescription(i.key)," "),o(),h((e=n.toggleHint(i.key))?6:-1,e),o(),_("ngModel",n.valueOf(i))("disabled",n.loading()||n.isPending(i.key)||n.preferences()===null),v("data-testid","settings-general-toggle-"+i.key)}}function Yn(t,r){if(t&1&&(c(0,"span",17),l(1),s()),t&2){let e=r.$implicit;o(),p(" ",e.label," ")}}var Jn=[{key:"updateCheck.enabled",read:t=>t.updateCheck.enabled,patch:t=>({updateCheck:{enabled:t}})},{key:"telemetry",read:t=>t.telemetry.errorsEnabled&&t.telemetry.usageCliEnabled&&t.telemetry.usageUiEnabled,patch:t=>({telemetry:{errorsEnabled:t,usageCliEnabled:t,usageUiEnabled:t}})}],De="none";function Zn(t){return t===null?De:t}function ei(t){return t===De?null:t}var Qt=(()=>{class t{dataSource=k(X);themeService=k(Ie);visible=$.required();texts=y;toggles=Jn;extraThemeOptions=[{value:De,label:y.general.extraTheme.options.none.label,description:y.general.extraTheme.options.none.description},...At.map(e=>({value:e.id,label:e.label,description:e.description}))];extraThemeWire=b(()=>Zn(this.themeService.extraTheme()));loading=u(!1);loadError=u(null);saveError=u(null);preferences=u(null);pending=u(new Set);constructor(){B(()=>{this.visible()&&this.refresh()})}toggleLabel(e){return y.general.toggles[e].label}toggleDescription(e){return y.general.toggles[e].description}toggleHint(e){let i=y.general.toggles[e];return"hint"in i?i.hint:null}valueOf(e){let i=this.preferences();return i?e.read(i):!1}isPending(e){return this.pending().has(e)}onToggle(e,i){this.runToggle(e,i)}onExtraThemeChange(e){this.themeService.setExtraTheme(ei(e??De))}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let e=await this.dataSource.getPreferences();this.preferences.set(e)}catch(e){this.loadError.set(qt(e)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runToggle(e,i){if(this.pending().has(e.key))return;let n=new Set(this.pending());n.add(e.key),this.pending.set(n),this.saveError.set(null);try{let a=await this.dataSource.setPreferences(e.patch(i));this.preferences.set(a)}catch(a){this.saveError.set(qt(a))}finally{let a=new Set(this.pending());a.delete(e.key),this.pending.set(a)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-general"]],inputs:{visible:[1,"visible"]},decls:22,vars:12,consts:[["data-testid","settings-general",1,"settings-general"],["id","settings-general-heading",1,"settings-general__title"],[1,"settings-general__intro"],["severity","error","data-testid","settings-general-load-error",3,"closable"],["severity","error","data-testid","settings-general-save-error",3,"closable"],["role","list",1,"settings-general__list"],[1,"settings-general__row"],["data-testid","settings-general-row-extra-theme",1,"settings-general__row"],[1,"settings-general__row-text"],[1,"settings-general__row-label"],[1,"settings-general__row-description"],["optionLabel","label","optionValue","value","data-testid","settings-general-extra-theme",3,"ngModelChange","options","ngModel","allowEmpty"],["pTemplate","item"],["data-testid","settings-general-storage-hint",1,"settings-general__storage-hint"],[1,"settings-general__storage-hint-path"],[1,"settings-general__row-hint"],[3,"ngModelChange","ngModel","disabled"],["data-testid","settings-general-extra-theme-option"]],template:function(i,n){if(i&1&&(c(0,"section",0)(1,"h2",1),l(2),s(),c(3,"p",2),l(4),s(),m(5,qn,2,3,"p-message",3),m(6,Wn,2,3,"p-message",4),c(7,"ul",5),A(8,Qn,8,7,"li",6,Kn),c(10,"li",7)(11,"div",8)(12,"div",9),l(13),s(),c(14,"div",10),l(15),s()(),c(16,"p-selectbutton",11),w("ngModelChange",function(g){return n.onExtraThemeChange(g)}),K(17,Yn,2,1,"ng-template",12),s()()(),c(18,"p",13),l(19),c(20,"code",14),l(21),s()()()),i&2){let a,g;v("aria-labelledby","settings-general-heading"),o(2),p(" ",n.texts.general.heading," "),o(2),f(n.texts.general.intro),o(),h((a=n.loadError())?5:-1,a),o(),h((g=n.saveError())?6:-1,g),o(2),N(n.toggles),o(5),p(" ",n.texts.general.extraTheme.label," "),o(2),p(" ",n.texts.general.extraTheme.description," "),o(),_("options",n.extraThemeOptions)("ngModel",n.extraThemeWire())("allowEmpty",!1),o(3),p(" ",n.texts.general.storageHintLabel," "),o(2),f(n.texts.general.storageHintPath)}},dependencies:[se,re,ae,de,ce,ye,Ot,Tt,je,ge],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-general__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-general__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-general__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1rem}.settings-general__row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background)}.settings-general__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-general__row[_ngcontent-%COMP%] p-toggleswitch[_ngcontent-%COMP%]{flex-shrink:0}.settings-general__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-general__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-general__row-hint[_ngcontent-%COMP%]{margin-top:.2rem;font-size:.75rem;font-style:italic;color:var(--sm-text-muted)}.settings-general__storage-hint[_ngcontent-%COMP%]{margin:2rem 0 0;font-size:.75rem;line-height:1.5;color:var(--sm-text-muted);opacity:.65}.settings-general__storage-hint-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.72rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}"],changeDetection:0})}return t})();function qt(t){return t instanceof U||t instanceof Error?t.message:String(t)}var Ae={provider:"#7C3AED",extractor:"#A78BFA",analyzer:"#5FD17C",action:"#00C853",formatter:"#5BC0EB",hook:"#FFB627"};function Yt(t){let r=t.toLowerCase();return Ae[r]??"currentColor"}var Jt=["all",...Object.keys(Ae)],Zt=Object.keys(Ae),en=["all","built-in","project"],tn=["built-in","project"],Ne=["core","claude","antigravity","openai","agent-skills"];function Q(t,r){return`${t}/${r}`}function Be(t){let r=new Map;for(let e of t)if(!Le(e.status)&&e.extensions)for(let i of e.extensions)r.set(Q(e.id,i.id),i.enabled);return r}function $e(t){let r=t.target;return!r||typeof r.closest!="function"?!1:r.closest('label, button, input, [role="switch"], p-toggleswitch')!==null}function nn(t,r){if(ti(t,r))return[t];if(!t.extensions)return[];let e=t.extensions.filter(i=>ni(i,r));return e.length===0?[]:[Y(H({},t),{extensions:e})]}function on(t,r){if(!t.extensions)return[];let e=t.extensions.filter(i=>i.kind.toLowerCase()===r);return e.length===0?[]:[Y(H({},t),{extensions:e})]}function rn(t,r){return r==="all"?[t]:t.source===r?[t]:[]}function an(t){if(t.locked)return[];if(!t.extensions)return[t];let r=t.extensions.filter(e=>!e.locked);return r.length===0?[]:[Y(H({},t),{extensions:r})]}function sn(t){return t.slice().sort((e,i)=>{let n=Ne.indexOf(e.id),a=Ne.indexOf(i.id),g=n>=0?n:Ne.length,S=a>=0?a:Ne.length;return g!==S?g-S:e.id.localeCompare(i.id)}).map(e=>{if(!e.extensions)return e;let i=e.extensions.slice().sort((n,a)=>n.id.localeCompare(a.id));return Y(H({},e),{extensions:i})})}function ti(t,r){return!!(t.id.toLowerCase().includes(r)||t.description&&t.description.toLowerCase().includes(r))}function ni(t,r){return!!(t.id.toLowerCase().includes(r)||t.description&&t.description.toLowerCase().includes(r))}function Le(t){return t==="incompatible-spec"||t==="invalid-manifest"||t==="load-error"||t==="id-collision"}function Ge(t){return t instanceof U||t instanceof Error?t.message:String(t)}function ln(t,r){return Le(t.status)?r.statusFailure[t.status]??t.status:t.status==="enabled"?r.enabledLabel:r.disabledLabel}function cn(t,r){switch(t){case"built-in":return r.sourceBuiltIn;case"project":return r.sourceProject}}var Ue="sm.settings.plugins.collapsed",He="sm.settings.plugins.kind-filter",Ke="sm.settings.plugins.source-filter";function dn(){let t=null;try{t=localStorage.getItem(Ue)}catch{return new Set}if(!t)return new Set;let r;try{r=JSON.parse(t)}catch{return new Set}if(!Array.isArray(r))return new Set;let e=new Set;for(let i of r)typeof i=="string"&&i.length>0&&e.add(i);return e}function gn(t){try{if(t.size===0){localStorage.removeItem(Ue);return}localStorage.setItem(Ue,JSON.stringify([...t]))}catch{}}function pn(){let t=null;try{t=localStorage.getItem(He)}catch{return"all"}return t&&Jt.includes(t)?t:"all"}function un(t){try{if(t==="all"){localStorage.removeItem(He);return}localStorage.setItem(He,t)}catch{}}function mn(){let t=null;try{t=localStorage.getItem(Ke)}catch{return"all"}return t&&en.includes(t)?t:"all"}function hn(t){try{if(t==="all"){localStorage.removeItem(Ke);return}localStorage.setItem(Ke,t)}catch{}}function qe(){Ze(qe);let t=u(dn());B(()=>gn(t()));let r=i=>{let n=new Set(t());n.has(i)?n.delete(i):n.add(i),t.set(n)},e=i=>!t().has(i);return{collapsed:t.asReadonly(),toggleExpanded:r,isExpanded:e}}function _n(t){let r=u(""),e=b(()=>r().trim().length>0),i=u(pn()),n=b(()=>i()!=="all"),a=u(mn()),g=b(()=>a()!=="all"),S=b(()=>i()==="all"&&a()==="all");B(()=>un(i())),B(()=>hn(a()));let V=b(()=>sn(t.plugins().flatMap(an))),te=b(()=>{let F=r().trim().toLowerCase(),P=a(),I=i(),j=V();return P!=="all"&&(j=j.flatMap(D=>rn(D,P))),I!=="all"&&(j=j.flatMap(D=>on(D,I))),F.length>0&&(j=j.flatMap(D=>nn(D,F))),j});return{searchText:r,searchActive:e,kindFilter:i,setKindFilter:F=>{i.set(F)},toggleKindFilter:F=>{i.set(i()===F?"all":F)},isKindFilterActive:F=>i()===F,kindFilterActive:n,kindFilterChips:Zt,sourceFilter:a,setSourceFilter:F=>{a.set(F)},toggleSourceFilter:F=>{a.set(a()===F?"all":F)},isSourceFilterActive:F=>a()===F,sourceFilterActive:g,sourceFilterChips:tn,allFilterActive:S,resetFilters:()=>{i.set("all"),a.set("all")},visiblePlugins:V,filteredPlugins:te}}var ii=new Set(["claude","antigravity","openai","agent-skills","core"]),oi="external_plugin";function ri(t){let r=t.indexOf("/"),e=r>0?t.slice(0,r):t;return ii.has(e)?t:oi}function We(t){let r=new Set;for(let e of t)r.add(ri(e));return[...r].sort()}function fn(t){let r=u(!1),e=u(null),i=u(null),n=u([]),a=u(new Map),g=u(new Map),S=u(!1),V=b(()=>{let P=a(),I=g(),j=new Set;for(let[D,T]of I)P.get(D)!==T&&j.add(D);return j}),te=b(()=>V().size>0),pe=b(()=>n().some(P=>Le(P.status))),ue=b(()=>{let P=g();for(let I of n()){if(I.startsAsDisabled!==!0)continue;let j=I.extensions??[];for(let D of j)if(P.get(Q(I.id,D.id))===!0)return!0}return!1});return{plugins:n,loading:r,loadError:e,toggleError:i,applying:S,hasFailureRows:pe,originalState:a,pendingState:g,dirtyIds:V,hasPendingChanges:te,restartRecommended:ue,pendingEnabled:P=>g().get(P)??!1,isDirty:P=>V().has(P),refresh:async()=>{r.set(!0),e.set(null),i.set(null);try{let P=await t.dataSource.listPlugins();n.set([...P.items]);let I=Be(P.items);a.set(I),g.set(new Map(I))}catch(P){e.set(Ge(P)),n.set([]),a.set(new Map),g.set(new Map)}finally{r.set(!1)}},onExtensionToggle:(P,I,j)=>{if(S())return;let D=Q(P,I.id),T=new Map(g());T.set(D,j),g.set(T)},applyChanges:async()=>{if(S())return{ok:!1};let P=V();if(P.size===0)return{ok:!1};let I=[],j=g();for(let T of P)I.push({id:T,enabled:j.get(T)??!1});S.set(!0),i.set(null);let D=!1;try{let T=await t.dataSource.applyPluginChanges(I);n.set([...T.items]);let Xe=Be(T.items);a.set(Xe),g.set(new Map(Xe)),t.scanTrigger.run(),D=!0}catch(T){i.set(Ge(T))}finally{S.set(!1)}return D&&Dt("plugin.apply",{enabled:We(I.filter(T=>T.enabled).map(T=>T.id)),disabled:We(I.filter(T=>!T.enabled).map(T=>T.id))}),{ok:D}},discardChanges:()=>{g.set(new Map(a())),i.set(null)}}}var bn=(t,r)=>r.id;function li(t,r){if(t&1&&l(0),t&2){let e=d();p(" ",e.texts.pluginsKindFilterAll," ")}}function ci(t,r){if(t&1&&l(0),t&2){let e=d().$implicit,i=d(2);p(" ",i.sourceLabel(e)," ")}}function di(t,r){if(t&1){let e=L();c(0,"p-togglebutton",19),w("ngModelChange",function(){let n=E(e).$implicit,a=d(2);return M(a.toggleSourceFilter(n))}),K(1,ci,1,1,"ng-template",null,0,Ce),s()}if(t&2){let e=r.$implicit,i=d(2);_("ngModel",i.isSourceFilterActive(e))("ariaLabel",i.texts.pluginsSourceFilterOptionA11y(e,!i.isSourceFilterActive(e))),v("data-testid","settings-plugins-source-chip-"+e)}}function gi(t,r){if(t&1&&(c(0,"span",17),l(1,"|"),s(),A(2,di,3,3,"p-togglebutton",18,q),c(4,"span",17),l(5,"|"),s()),t&2){let e=d();o(2),N(e.sourceFilterChips)}}function pi(t,r){if(t&1&&l(0),t&2){let e=d().$implicit;p(" ",e," ")}}function ui(t,r){if(t&1){let e=L();c(0,"p-togglebutton",20),w("ngModelChange",function(){let n=E(e).$implicit,a=d();return M(a.toggleKindFilter(n))}),K(1,pi,1,1,"ng-template",null,0,Ce),s()}if(t&2){let e=r.$implicit,i=d();Ve("--kind-color",i.kindTint(e)),_("ngModel",i.isKindFilterActive(e))("ariaLabel",i.texts.pluginsKindFilterOptionA11y(e,!i.isKindFilterActive(e))),v("data-testid","settings-plugins-kind-chip-"+e)}}function mi(t,r){if(t&1&&(c(0,"p-message",12),l(1),s()),t&2){let e=d();_("closable",!1),o(),p(" ",e.texts.unsavedChangesMessage(e.dirtyIds().size)," ")}}function hi(t,r){if(t&1&&(c(0,"p",13),O(1,"i",21),l(2),s()),t&2){let e=d();o(2),p(" ",e.texts.loading," ")}}function _i(t,r){if(t&1&&(c(0,"p-message",14),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.errorPrefix," ",e.loadError()," ")}}function fi(t,r){if(t&1&&(c(0,"p",15),l(1),s()),t&2){let e=d();o(),p(" ",e.texts.empty," ")}}function bi(t,r){if(t&1){let e=L();c(0,"p-message",25),w("onClose",function(){E(e);let n=d(2);return M(n.toggleError.set(null))}),l(1),s()}if(t&2){let e=d(2);_("closable",!0),o(),R(" ",e.texts.toggleErrorPrefix," ",e.toggleError()," ")}}function vi(t,r){if(t&1&&(c(0,"p",26),O(1,"i",28),l(2),s()),t&2){let e=d(3);o(2),p(" ",e.texts.pluginsSearchEmpty(e.searchText())," ")}}function xi(t,r){if(t&1&&(c(0,"p",27),O(1,"i",29),l(2),s()),t&2){let e=d(3);o(2),p(" ",e.texts.pluginsProjectEmpty," ")}}function Ci(t,r){if(t&1&&m(0,vi,3,1,"p",26)(1,xi,3,1,"p",27),t&2){let e=d(2);h(e.searchActive()?0:e.sourceFilter()==="project"&&!e.kindFilterActive()?1:-1)}}function wi(t,r){if(t&1){let e=L();c(0,"button",44),w("click",function(n){E(e);let a=d().$implicit;return d(2).toggleExpanded(a.id),M(n.stopPropagation())}),O(1,"i",45),s()}if(t&2){let e=d().$implicit,i=d(2);v("aria-expanded",i.isExpanded(e.id))("aria-label",i.isExpanded(e.id)?i.texts.collapseLabel:i.texts.expandLabel)("data-testid","settings-plugin-expand-"+e.id),o(),G("fa-chevron-down",i.isExpanded(e.id))("fa-chevron-right",!i.isExpanded(e.id))}}function yi(t,r){t&1&&O(0,"span",33)}function ki(t,r){if(t&1&&(c(0,"span",38),l(1),s()),t&2){let e=d().$implicit;o(),p("v",e.version)}}function Si(t,r){if(t&1&&(c(0,"span",39),O(1,"i",46),l(2),s()),t&2){let e=d().$implicit,i=d(2);_("title",i.texts.lockedTooltip),v("data-testid","settings-row-locked-"+e.id),o(2),p(" ",i.texts.lockedLabel," ")}}function Pi(t,r){if(t&1&&(c(0,"p",40),l(1),s()),t&2){let e=d().$implicit;o(),f(e.description)}}function Ei(t,r){if(t&1&&(c(0,"span",41),l(1),s()),t&2){let e=d().$implicit;o(),f(e.reason)}}function Mi(t,r){if(t&1&&(c(0,"p",42),O(1,"i",47),l(2),s()),t&2){let e=d().$implicit,i=d(2);v("data-testid","settings-row-starts-disabled-"+e.id),o(2),p(" ",i.texts.startsAsDisabledRowHint," ")}}function Ti(t,r){if(t&1&&(c(0,"span",55),l(1),s()),t&2){let e=d().$implicit;o(),p("v",e.version)}}function Oi(t,r){if(t&1&&(c(0,"span",39),O(1,"i",46),l(2),s()),t&2){let e=d().$implicit,i=d(2).$implicit,n=d(2);_("title",n.texts.lockedTooltip),v("data-testid","settings-extrow-locked-"+i.id+"-"+e.id),o(2),p(" ",n.texts.lockedLabel," ")}}function Ii(t,r){if(t&1&&(c(0,"p",56),l(1),s()),t&2){let e=d().$implicit;o(),f(e.description)}}function Fi(t,r){if(t&1){let e=L();c(0,"li",49),w("click",function(n){let a=E(e).$implicit,g=d(2).$implicit,S=d(2);return M(S.onSubrowClick(g.id,a,n))})("keydown.enter",function(n){let a=E(e).$implicit,g=d(2).$implicit,S=d(2);return M(S.onSubrowClick(g.id,a,n))})("keydown.space",function(n){let a=E(e).$implicit,g=d(2).$implicit,S=d(2);return n.preventDefault(),M(S.onSubrowClick(g.id,a,n))}),c(1,"div",50)(2,"div",51),O(3,"span",52),c(4,"span",53),l(5),s(),c(6,"span",54),l(7),s(),m(8,Ti,2,1,"span",55),m(9,Oi,3,3,"span",39),s(),m(10,Ii,2,1,"p",56),s(),c(11,"p-toggleswitch",57),w("ngModelChange",function(n){let a=E(e).$implicit,g=d(2).$implicit,S=d(2);return M(S.onExtensionToggle(g.id,a,n))}),s()()}if(t&2){let e=r.$implicit,i=d(2).$implicit,n=d(2);G("is-clickable",n.extensionToggleInteractive(e))("is-dirty",n.isDirty(n.qualifiedExt(i.id,e.id))),v("aria-label",n.texts.a11y.extensionRow(n.qualifiedExt(i.id,e.id)))("data-testid","settings-extrow-"+i.id+"-"+e.id),o(3),G("settings-plugins__dirty-dot--visible",n.isDirty(n.qualifiedExt(i.id,e.id))),v("data-testid","settings-extrow-dirty-"+i.id+"-"+e.id),o(2),f(e.id),o(),Ve("--kind-color",n.kindTint(e.kind)),o(),f(e.kind),o(),h(i.source==="project"?8:-1),o(),h(e.locked?9:-1),o(),h(e.description?10:-1),o(),_("ngModel",n.pendingEnabled(n.qualifiedExt(i.id,e.id)))("disabled",n.applying()||!!e.locked)("ariaLabel",n.texts.a11y.extensionToggle(n.qualifiedExt(i.id,e.id),!n.pendingEnabled(n.qualifiedExt(i.id,e.id)))),v("data-testid","settings-ext-toggle-"+i.id+"-"+e.id)}}function ji(t,r){if(t&1&&(c(0,"ul",43),A(1,Fi,12,20,"li",48,bn),s()),t&2){let e=d().$implicit;v("data-testid","settings-extensions-"+e.id),o(),N(e.extensions)}}function Di(t,r){if(t&1){let e=L();c(0,"li",30)(1,"div",31),w("click",function(n){let a=E(e).$implicit,g=d(2);return M(g.onRowClick(a,n))})("keydown.enter",function(n){let a=E(e).$implicit,g=d(2);return M(g.onRowClick(a,n))})("keydown.space",function(n){let a=E(e).$implicit,g=d(2);return n.preventDefault(),M(g.onRowClick(a,n))}),m(2,wi,2,7,"button",32)(3,yi,1,0,"span",33),c(4,"div",34)(5,"div",35)(6,"span",36),l(7),s(),c(8,"span",37),l(9),s(),m(10,ki,2,1,"span",38),m(11,Si,3,3,"span",39),s(),m(12,Pi,2,1,"p",40),m(13,Ei,2,1,"span",41),m(14,Mi,3,2,"p",42),s()(),m(15,ji,3,1,"ul",43),s()}if(t&2){let e=r.$implicit,i=d(2);G("is-clickable",i.rowIsClickable(e)),v("data-testid","settings-row-"+e.id),o(),v("aria-label",i.texts.a11y.pluginRow(e.id)),o(),h(i.canExpandExtensions(e)?2:3),o(5),f(e.id),o(2),f(i.sourceLabel(e.source)),o(),h(e.source==="project"&&e.version?10:-1),o(),h(e.locked?11:-1),o(),h(e.description?12:-1),o(),h(e.reason?13:-1),o(),h(i.showStartsAsDisabledHint(e)?14:-1),o(),h(i.canExpandExtensions(e)&&i.isExpanded(e.id)?15:-1)}}function Ai(t,r){if(t&1&&(m(0,bi,2,3,"p-message",22),m(1,Ci,2,1),c(2,"ul",23),A(3,Di,16,13,"li",24,bn),s()),t&2){let e=d();h(e.toggleError()?0:-1),o(),h(e.filteredPlugins().length===0?1:-1),o(2),N(e.filteredPlugins())}}function Ni(t,r){if(t&1&&(c(0,"em",58),l(1),s()),t&2){let e=d(2);o(),p(" ",e.texts.startsAsDisabledFooterHint," ")}}function Li(t,r){if(t&1){let e=L();c(0,"footer",16),m(1,Ni,2,1,"em",58),c(2,"p-button",59),w("onClick",function(){E(e);let n=d();return M(n.discardChanges())}),s(),c(3,"p-button",60),w("onClick",function(){E(e);let n=d();return M(n.applyChanges())}),s()()}if(t&2){let e=d();o(),h(e.restartRecommended()?1:-1),o(),_("text",!0)("label",e.texts.discardChanges)("ariaLabel",e.texts.discardA11y)("disabled",e.applying()),o(),_("label",e.texts.applyAndClose)("ariaLabel",e.texts.applyA11y)("disabled",e.applying())("loading",e.applying())}}var vn=(()=>{class t{dataSource=k(X);scanTrigger=k(Rt);buffer=k(Fe);destroyRef=k(et);visible=$.required();applied=we();texts=y;pluginState=fn({dataSource:this.dataSource,scanTrigger:this.scanTrigger});plugins=this.pluginState.plugins;loading=this.pluginState.loading;loadError=this.pluginState.loadError;toggleError=this.pluginState.toggleError;applying=this.pluginState.applying;hasFailureRows=this.pluginState.hasFailureRows;originalState=this.pluginState.originalState;pendingState=this.pluginState.pendingState;dirtyIds=this.pluginState.dirtyIds;hasPendingChanges=this.pluginState.hasPendingChanges;restartRecommended=this.pluginState.restartRecommended;pluginCollapse=qe();collapsed=this.pluginCollapse.collapsed;pluginFilter=_n({plugins:this.plugins});searchText=this.pluginFilter.searchText;searchActive=this.pluginFilter.searchActive;kindFilter=this.pluginFilter.kindFilter;kindFilterActive=this.pluginFilter.kindFilterActive;kindFilterChips=this.pluginFilter.kindFilterChips;sourceFilter=this.pluginFilter.sourceFilter;sourceFilterActive=this.pluginFilter.sourceFilterActive;sourceFilterChips=this.pluginFilter.sourceFilterChips;allFilterActive=this.pluginFilter.allFilterActive;visiblePlugins=this.pluginFilter.visiblePlugins;filteredPlugins=this.pluginFilter.filteredPlugins;hasProjectPlugins=b(()=>this.plugins().some(e=>e.source==="project"));constructor(){B(()=>{this.visible()&&this.pluginState.refresh()});let e={dirtyIds:this.pluginState.dirtyIds,applyChanges:async()=>{let i=await this.pluginState.applyChanges();return i.ok&&this.applied.emit(),i},discardChanges:()=>this.pluginState.discardChanges()};this.buffer.register(e),this.destroyRef.onDestroy(()=>this.buffer.deregister(e))}toggleKindFilter(e){this.pluginFilter.toggleKindFilter(e)}isKindFilterActive(e){return this.pluginFilter.isKindFilterActive(e)}toggleSourceFilter(e){this.pluginFilter.toggleSourceFilter(e)}isSourceFilterActive(e){return this.pluginFilter.isSourceFilterActive(e)}resetFilters(){this.pluginFilter.resetFilters()}toggleExpanded(e){this.pluginCollapse.toggleExpanded(e)}isExpanded(e){return this.pluginCollapse.isExpanded(e)}pendingEnabled(e){return this.pluginState.pendingEnabled(e)}isDirty(e){return this.pluginState.isDirty(e)}showStartsAsDisabledHint(e){return!e.startsAsDisabled||!e.extensions?!1:e.extensions.some(i=>this.pendingEnabled(Q(e.id,i.id)))}onExtensionToggle(e,i,n){this.pluginState.onExtensionToggle(e,i,n)}async applyChanges(){(await this.pluginState.applyChanges()).ok&&this.applied.emit()}discardChanges(){this.pluginState.discardChanges()}canExpandExtensions(e){return(e.extensions?.length??0)>0}extensionToggleInteractive(e){return!e.locked}rowIsClickable(e){return this.canExpandExtensions(e)}onRowClick(e,i){$e(i)||this.canExpandExtensions(e)&&this.toggleExpanded(e.id)}onSubrowClick(e,i,n){if($e(n)||!this.extensionToggleInteractive(i))return;let a=Q(e,i.id);this.onExtensionToggle(e,i,!this.pendingEnabled(a))}statusLabel(e){return ln(e,this.texts)}sourceLabel(e){return cn(e,this.texts)}qualifiedExt(e,i){return Q(e,i)}kindTint(e){return Yt(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-plugins"]],inputs:{visible:[1,"visible"]},outputs:{applied:"applied"},decls:23,vars:12,consts:[["content",""],["aria-labelledby","settings-plugins-heading",1,"settings-plugins"],[1,"settings-plugins__scroll"],[1,"settings-plugins__header"],["id","settings-plugins-heading",1,"settings-plugins__title"],[1,"settings-plugins__intro"],["iconPosition","left",1,"settings-plugins__search"],["styleClass","fa-solid fa-magnifying-glass"],["pInputText","","type","text","data-testid","settings-plugins-search",3,"ngModelChange","placeholder","ngModel"],["role","group","data-testid","settings-plugins-filter",1,"settings-plugins__filter"],["styleClass","settings-plugins__source-chip is-all","data-testid","settings-plugins-filter-all",3,"ngModelChange","ngModel","ariaLabel"],["styleClass","settings-plugins__kind-chip",3,"ngModel","--kind-color","ariaLabel"],["severity","warn","styleClass","settings-plugins__banner","data-testid","settings-banner-unsaved",3,"closable"],["data-testid","settings-loading",1,"settings-plugins__hint"],["severity","error","data-testid","settings-error",3,"closable"],["data-testid","settings-empty",1,"settings-plugins__hint"],["data-testid","settings-plugins-footer",1,"settings-plugins__footer"],["aria-hidden","true",1,"settings-plugins__filter-divider"],["styleClass","settings-plugins__source-chip",3,"ngModel","ariaLabel"],["styleClass","settings-plugins__source-chip",3,"ngModelChange","ngModel","ariaLabel"],["styleClass","settings-plugins__kind-chip",3,"ngModelChange","ngModel","ariaLabel"],["aria-hidden","true",1,"fa-solid","fa-spinner","fa-spin"],["severity","error","data-testid","settings-toggle-error",3,"closable"],["role","list",1,"settings-plugins__list"],[1,"settings-plugins__row",3,"is-clickable"],["severity","error","data-testid","settings-toggle-error",3,"onClose","closable"],["data-testid","settings-search-empty",1,"settings-plugins__hint"],["data-testid","settings-project-empty",1,"settings-plugins__hint"],["aria-hidden","true",1,"fa-solid","fa-magnifying-glass"],["aria-hidden","true",1,"fa-solid","fa-folder-open"],[1,"settings-plugins__row"],["role","button","tabindex","0",1,"settings-plugins__row-main",3,"click","keydown.enter","keydown.space"],["type","button",1,"settings-plugins__expand"],["aria-hidden","true",1,"settings-plugins__expand-spacer"],[1,"settings-plugins__row-text"],[1,"settings-plugins__row-headline"],[1,"settings-plugins__row-id"],[1,"settings-plugins__row-source"],[1,"settings-plugins__row-version"],[1,"settings-plugins__row-locked",3,"title"],[1,"settings-plugins__row-description"],[1,"settings-plugins__row-reason"],[1,"settings-plugins__row-hint"],["role","list",1,"settings-plugins__sublist"],["type","button",1,"settings-plugins__expand",3,"click"],["aria-hidden","true",1,"fa-solid"],["aria-hidden","true",1,"fa-solid","fa-lock"],["aria-hidden","true",1,"fa-solid","fa-triangle-exclamation"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"is-clickable","is-dirty"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"click","keydown.enter","keydown.space"],[1,"settings-plugins__subrow-text"],[1,"settings-plugins__subrow-headline"],["aria-hidden","true",1,"settings-plugins__dirty-dot"],[1,"settings-plugins__subrow-id"],[1,"settings-plugins__subrow-kind"],[1,"settings-plugins__subrow-version"],[1,"settings-plugins__subrow-description"],[3,"ngModelChange","ngModel","disabled","ariaLabel"],["data-testid","settings-plugins-restart-hint",1,"settings-plugins__footer-hint"],["severity","secondary","data-testid","settings-plugins-discard",3,"onClick","text","label","ariaLabel","disabled"],["data-testid","settings-plugins-apply",3,"onClick","label","ariaLabel","disabled","loading"]],template:function(i,n){i&1&&(c(0,"section",1)(1,"div",2)(2,"header",3)(3,"h2",4),l(4),s(),c(5,"p",5),l(6),s()(),c(7,"p-iconfield",6),O(8,"p-inputicon",7),c(9,"input",8),w("ngModelChange",function(g){return n.searchText.set(g)}),s()(),c(10,"div",9)(11,"p-togglebutton",10),w("ngModelChange",function(){return n.resetFilters()}),K(12,li,1,1,"ng-template",null,0,Ce),s(),m(14,gi,6,0),A(15,ui,3,5,"p-togglebutton",11,q),s(),m(17,mi,2,2,"p-message",12),m(18,hi,3,1,"p",13)(19,_i,2,3,"p-message",14)(20,fi,2,1,"p",15)(21,Ai,5,2),s(),m(22,Li,4,9,"footer",16),s()),i&2&&(o(4),p(" ",n.texts.pluginsHeading," "),o(2),f(n.texts.pluginsIntro),o(3),_("placeholder",n.texts.pluginsSearchPlaceholder)("ngModel",n.searchText()),v("aria-label",n.texts.pluginsSearchA11y),o(),v("aria-label",n.texts.pluginsFilterA11y),o(),_("ngModel",n.allFilterActive())("ariaLabel",n.texts.pluginsFilterAllA11y),o(3),h(n.hasProjectPlugins()?14:-1),o(),N(n.kindFilterChips),o(2),h(n.hasPendingChanges()?17:-1),o(),h(n.loading()?18:n.loadError()?19:n.plugins().length===0?20:21),o(4),h(n.hasPendingChanges()?22:-1))},dependencies:[se,Se,re,ae,le,Me,xt,vt,wt,Ct,Ee,Pe,de,ce,Mt,Et,je,ge],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;--kind-color: var(--p-text-color)}.settings-plugins[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.settings-plugins__scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:1.25rem 1.5rem;display:flex;flex-direction:column;gap:.75rem;min-height:0}.settings-plugins__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.settings-plugins__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-plugins__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__search[_ngcontent-%COMP%]{display:block;width:100%}.settings-plugins__search[_ngcontent-%COMP%] :where(input[_ngcontent-%COMP%]){width:100%}.settings-plugins__filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.375rem}.settings-plugins__kind-chip[_ngcontent-%COMP%], .settings-plugins__source-chip[_ngcontent-%COMP%]{--p-togglebutton-padding: .25rem .625rem;--p-togglebutton-content-padding: 0;--p-togglebutton-content-checked-background: transparent;--p-togglebutton-content-checked-shadow: none;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 8%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 18%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 80%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 35%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 55%, transparent);--p-togglebutton-checked-border-color: var(--chip-accent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-50);font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:lowercase}.settings-plugins__kind-chip[_ngcontent-%COMP%]{--chip-accent: var(--kind-color)}.settings-plugins__source-chip[_ngcontent-%COMP%]{--chip-accent: var(--p-primary-color)}.settings-plugins__source-chip.is-all[_ngcontent-%COMP%]{--chip-accent: var(--p-text-muted-color)}.settings-plugins__filter-divider[_ngcontent-%COMP%]{align-self:center;color:var(--p-text-muted-color);-webkit-user-select:none;user-select:none}.app-dark[_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__source-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__source-chip[_ngcontent-%COMP%]{--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 14%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 26%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 50%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-900)}.settings-plugins__banner[_ngcontent-%COMP%]{display:block}.settings-plugins__banner-body[_ngcontent-%COMP%]{font-weight:400}.settings-plugins__hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;padding:1rem 0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-plugins__row[_ngcontent-%COMP%]{border:1px solid var(--p-content-border-color);border-radius:var(--p-border-radius);background:var(--p-content-background);padding:.75rem .875rem;display:flex;flex-direction:column;gap:.5rem}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__row.is-failed[_ngcontent-%COMP%]{border-color:var(--p-message-error-border-color);background:var(--p-message-error-background)}.settings-plugins__row.is-extension-plugin[_ngcontent-%COMP%]{background:var(--p-content-background)}.settings-plugins__row-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem}.settings-plugins__expand[_ngcontent-%COMP%], .settings-plugins__expand-spacer[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.settings-plugins__expand[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;color:var(--p-text-muted-color);border-radius:var(--p-border-radius)}.settings-plugins__expand[_ngcontent-%COMP%]:hover{color:var(--p-text-color);background:var(--p-content-hover-background)}.settings-plugins__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__row-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__row-id[_ngcontent-%COMP%]{font-weight:600;font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-kind[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap}.settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 8%,transparent);border:1px solid color-mix(in oklab,var(--p-text-color) 18%,transparent);color:var(--p-text-color)}.app-dark[_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 14%,transparent);border-color:color-mix(in oklab,var(--p-text-color) 28%,transparent)}.settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--kind-color) 38%,transparent);color:color-mix(in oklab,var(--kind-color) 70%,var(--p-surface-900))}.app-dark[_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 22%,transparent);border-color:color-mix(in oklab,var(--kind-color) 55%,transparent);color:color-mix(in oklab,var(--kind-color) 80%,var(--p-surface-50))}.settings-plugins__row-status[_ngcontent-%COMP%]{font-weight:500}.settings-plugins__row-locked[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap;background:color-mix(in oklab,var(--p-message-warn-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--p-message-warn-color) 35%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 70%,var(--p-surface-900))}.settings-plugins__row-locked[_ngcontent-%COMP%] > .pi[_ngcontent-%COMP%]{font-size:.7rem}.app-dark[_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-message-warn-color) 22%,transparent);border-color:color-mix(in oklab,var(--p-message-warn-color) 55%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 85%,var(--p-surface-50))}.settings-plugins__row-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8125rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__row-reason[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-message-error-color);font-family:var(--p-monospace-font-family);margin-top:.25rem}.settings-plugins__sublist[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.5rem 0 0 1.75rem;display:flex;flex-direction:column;gap:.25rem;border-top:1px dashed var(--p-content-border-color)}.settings-plugins__subrow[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.375rem .5rem;border-radius:var(--p-border-radius)}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__subrow-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__subrow-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__subrow-id[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.875rem}.settings-plugins__subrow-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__dirty-dot[_ngcontent-%COMP%]{position:absolute;left:-.75rem;top:50%;transform:translateY(-50%);width:.5rem;height:.5rem;border-radius:50%;background:var(--p-warn-color);visibility:hidden}.settings-plugins__dirty-dot--visible[_ngcontent-%COMP%]{visibility:visible}.settings-plugins__row-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-warn-color)}.settings-plugins__row-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-top:.125rem}.settings-plugins__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border-top:1px solid var(--p-content-border-color);background:var(--p-content-background)}.settings-plugins__footer-hint[_ngcontent-%COMP%]{font-style:italic;font-size:.75rem;line-height:1.4;color:var(--p-warn-color);margin-right:auto}"],changeDetection:0})}return t})();function Vi(t,r){if(t&1&&(c(0,"p-message",4),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function zi(t,r){if(t&1&&(c(0,"p-message",5),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Bi(t,r){t&1&&(c(0,"p-message",6),l(1),s()),t&2&&(_("closable",!1),o(),p(" ",r," "))}function $i(t,r){if(t&1&&(c(0,"span",12),l(1),s()),t&2){let e=d();o(),f(e.texts.project.activeProviderSourceAutodetect)}}function Gi(t,r){if(t&1&&(c(0,"span",12),l(1),s()),t&2){let e=d();o(),f(e.texts.project.activeProviderSourceNone)}}function Ui(t,r){if(t&1&&(c(0,"span",12),l(1),s()),t&2){let e=d(),i=d();o(),R(" ",i.texts.project.activeProviderDetectedPrefix," ",e," ")}}function Hi(t,r){t&1&&m(0,Ui,2,2,"span",12),t&2&&h(r.length>0?0:-1)}function Ki(t,r){if(t&1&&(c(0,"p-message",15),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function qi(t,r){if(t&1&&(c(0,"p-message",16),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Wi(t,r){if(t&1){let e=L();c(0,"li",19)(1,"span",27),l(2),s(),c(3,"p-button",28),w("onClick",function(){let n=E(e).$implicit,a=d();return M(a.onReferencePathRemove(n))}),s()()}if(t&2){let e=r.$implicit,i=d();o(2),f(e),o(),_("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.referencePaths")),v("data-testid","settings-project-reference-paths-remove")}}function Xi(t,r){if(t&1&&(c(0,"p-message",22),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function Qi(t,r){if(t&1&&(c(0,"p-message",23),l(1),s()),t&2){let e=d();_("closable",!1),o(),R(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Yi(t,r){if(t&1){let e=L();c(0,"li",19)(1,"span",27),l(2),s(),c(3,"p-button",28),w("onClick",function(){let n=E(e).$implicit,a=d();return M(a.onIgnorePatternRemove(n))}),s()()}if(t&2){let e=r.$implicit,i=d();o(2),f(e),o(),_("label",i.texts.project.removeIgnorePatternLabel)("outlined",!0)("disabled",i.isPending("ignore.patterns")),v("data-testid","settings-project-ignore-patterns-remove")}}var Ji=/[\n\r\x00-\x1F\x7F]/,xn=(()=>{class t{dataSource=k(X);confirmation=k(oe);providerRegistry=k(Nt);visible=$.required();texts=y;loading=u(!1);loadError=u(null);saveError=u(null);preferences=u(null);pending=u(new Set);newReferencePath=u("");referencePaths=b(()=>this.preferences()?.scan.referencePaths??[]);ignoreLoadError=u(null);ignoreSaveError=u(null);ignoreEnvelope=u(null);newIgnorePattern=u("");ignorePatterns=b(()=>this.ignoreEnvelope()?.patterns??[]);activeProviderEnvelope=u(null);activeProviderLoadError=u(null);activeProviderSaveError=u(null);activeProviderSwitchAnnouncement=u(null);providerOptions=b(()=>[{id:"",label:y.project.activeProviderEmptyOption},...this.providerRegistry.providers().map(e=>({id:e.id,label:e.label}))]);activeProviderValue=b(()=>this.activeProviderEnvelope()?.activeProvider??"");activeProviderDetectedLabel=b(()=>(this.activeProviderEnvelope()?.detected??[]).join(", "));activeProviderSource=b(()=>this.activeProviderEnvelope()?.source??"none");constructor(){B(()=>{this.visible()&&(this.refresh(),this.refreshIgnore(),this.refreshActiveProvider())})}isPending(e){return this.pending().has(e)}onReferencePathAdd(){let e=this.newReferencePath().trim();if(e.length===0)return;if(e.includes(",")){this.saveError.set(this.texts.project.commaForbidden);return}let i=[...this.referencePaths(),e];this.runPatch("scan.referencePaths",{scan:{referencePaths:i}}).then(n=>{n&&this.newReferencePath.set("")})}onReferencePathRemove(e){let i=this.referencePaths().filter(n=>n!==e);this.runPatch("scan.referencePaths",{scan:{referencePaths:[...i]}})}onIgnorePatternAdd(){let e=this.newIgnorePattern().trim();if(e.length===0){this.ignoreSaveError.set(this.texts.project.ignorePatternEmpty);return}if(Ji.test(e)){this.ignoreSaveError.set(this.texts.project.ignorePatternHasControlChar);return}let i=this.ignorePatterns();if(i.includes(e)){this.ignoreSaveError.set(this.texts.project.ignorePatternDuplicate);return}let n=[...i,e];this.runIgnorePatch({patterns:n}).then(a=>{a&&this.newIgnorePattern.set("")})}onIgnorePatternRemove(e){let i=this.ignorePatterns().filter(n=>n!==e);this.runIgnorePatch({patterns:[...i]})}onActiveProviderChange(e){e===""||e===this.activeProviderValue()||this.confirmActiveProviderSwitch(e,async()=>{await this.runActiveProviderSwitch(e)})}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let e=await this.dataSource.getProjectPreferences();this.preferences.set(e)}catch(e){this.loadError.set(ee(e)),this.preferences.set(null)}finally{this.loading.set(!1)}}async refreshIgnore(){this.ignoreLoadError.set(null),this.ignoreSaveError.set(null);try{let e=await this.dataSource.getProjectIgnore();this.ignoreEnvelope.set(e)}catch(e){this.ignoreLoadError.set(ee(e)),this.ignoreEnvelope.set(null)}}async refreshActiveProvider(){this.activeProviderLoadError.set(null),this.activeProviderSaveError.set(null);try{let e=await this.dataSource.getActiveProvider();this.activeProviderEnvelope.set(e)}catch(e){this.activeProviderLoadError.set(ee(e)),this.activeProviderEnvelope.set(null)}}async runActiveProviderSwitch(e){this.activeProviderSaveError.set(null),this.activeProviderSwitchAnnouncement.set(null);try{let i=await this.dataSource.setActiveProvider(e);this.activeProviderEnvelope.set({activeProvider:i.activeProvider,detected:i.detected,source:i.source});let n=i.switch.dropped;if(n===null)this.activeProviderSwitchAnnouncement.set(this.texts.project.activeProviderSwitchedNoDb);else{let a=this.texts.project;this.activeProviderSwitchAnnouncement.set(`${a.activeProviderSwitchedPrefix} ${n.tableCount} ${a.activeProviderSwitchedSuffix}`)}}catch(i){this.activeProviderSaveError.set(ee(i))}}confirmActiveProviderSwitch(e,i){this.confirmation.confirm({header:this.texts.project.activeProviderConfirmHeader,message:this.texts.project.activeProviderConfirmIntro,acceptLabel:this.texts.project.activeProviderConfirmAccept,rejectLabel:this.texts.project.activeProviderConfirmReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{i()},reject:()=>{let n=this.activeProviderEnvelope();n&&this.activeProviderEnvelope.set(H({},n))}})}async runPatch(e,i){if(this.pending().has(e))return!1;let n=new Set(this.pending());n.add(e),this.pending.set(n),this.saveError.set(null);let a=!1;try{let g=await this.dataSource.setProjectPreferences(i);this.preferences.set(g),a=!0}catch(g){if(g instanceof U&&g.code==="confirm-required"){let S=g.paths??[];this.confirmDialog(S,async()=>{try{let V=await this.dataSource.setProjectPreferences(Y(H({},i),{confirm:!0}));this.preferences.set(V),this.newReferencePath.set("")}catch(V){this.saveError.set(ee(V))}})}else this.saveError.set(ee(g))}finally{let g=new Set(this.pending());g.delete(e),this.pending.set(g)}return a}async runIgnorePatch(e){let i="ignore.patterns";if(this.pending().has(i))return!1;let n=new Set(this.pending());n.add(i),this.pending.set(n),this.ignoreSaveError.set(null);let a=!1;try{let g=await this.dataSource.setProjectIgnore(e);this.ignoreEnvelope.set(g),a=!0}catch(g){this.ignoreSaveError.set(ee(g))}finally{let g=new Set(this.pending());g.delete(i),this.pending.set(g)}return a}confirmDialog(e,i){this.confirmation.confirm({header:y.project.confirmDialogHeader,message:y.project.confirmDialogIntro+`
122
122
  `+e.map(n=>`\u2022 ${n}`).join(`
123
- `),acceptLabel:y.project.confirmDialogAccept,rejectLabel:y.project.confirmDialogReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{i()}})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-project"]],inputs:{visible:[1,"visible"]},features:[ie([oe])],decls:58,vars:36,consts:[["data-testid","settings-project",1,"settings-project"],["id","settings-project-heading",1,"settings-project__title"],[1,"settings-project__intro"],[1,"settings-project__intro-path"],["severity","error","data-testid","settings-project-active-provider-load-error",3,"closable"],["severity","error","data-testid","settings-project-active-provider-save-error",3,"closable"],["severity","info","data-testid","settings-project-active-provider-switch-announce",3,"closable"],["data-testid","settings-project-active-provider-row",1,"settings-project__list-row"],[1,"settings-project__row-text"],[1,"settings-project__row-label"],[1,"settings-project__row-description"],[1,"settings-project__row-meta"],[1,"settings-project__meta-line"],[1,"settings-project__add-row"],["optionLabel","label","optionValue","id","appendTo","body","data-testid","settings-project-active-provider-select",1,"settings-project__provider-select",3,"ngModelChange","options","ngModel"],["severity","error","data-testid","settings-project-load-error",3,"closable"],["severity","error","data-testid","settings-project-save-error",3,"closable"],["data-testid","settings-project-reference-paths-row",1,"settings-project__list-row"],["role","list",1,"settings-project__path-list"],[1,"settings-project__path-item"],["type","text","pInputText","","data-testid","settings-project-reference-paths-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-reference-paths-add",3,"onClick","label","disabled"],["severity","error","data-testid","settings-project-ignore-load-error",3,"closable"],["severity","error","data-testid","settings-project-ignore-save-error",3,"closable"],["data-testid","settings-project-ignore-patterns-row",1,"settings-project__list-row"],["type","text","pInputText","","data-testid","settings-project-ignore-patterns-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-ignore-patterns-add",3,"onClick","label","disabled"],[1,"settings-project__path-text"],["severity","secondary","size","small",3,"onClick","label","outlined","disabled"]],template:function(i,n){if(i&1&&(c(0,"section",0)(1,"h2",1),l(2),a(),c(3,"p",2),l(4),c(5,"code",3),l(6),a(),l(7),a(),m(8,Vi,2,3,"p-message",4),m(9,zi,2,3,"p-message",5),m(10,Bi,2,2,"p-message",6),c(11,"div",7)(12,"div",8)(13,"div",9),l(14),a(),c(15,"div",10),l(16),a(),c(17,"div",11),m(18,$i,2,1,"span",12)(19,Gi,2,1,"span",12),m(20,Hi,1,1),a()(),c(21,"div",13)(22,"p-select",14),w("ngModelChange",function(g){return n.onActiveProviderChange(g)}),a()()(),m(23,Ki,2,3,"p-message",15),m(24,qi,2,3,"p-message",16),c(25,"div",17)(26,"div",8)(27,"div",9),l(28),a(),c(29,"div",10),l(30),a()(),c(31,"ul",18),A(32,Wi,4,5,"li",19,q),a(),c(34,"div",13)(35,"input",20),w("ngModelChange",function(g){return n.newReferencePath.set(g)})("keydown.enter",function(){return n.onReferencePathAdd()}),a(),c(36,"p-button",21),w("onClick",function(){return n.onReferencePathAdd()}),a()()(),m(37,Xi,2,3,"p-message",22),m(38,Qi,2,3,"p-message",23),c(39,"div",24)(40,"div",8)(41,"div",9),l(42),a(),c(43,"div",10),l(44),c(45,"code",3),l(46),a(),l(47),c(48,"code",3),l(49),a(),l(50),a()(),c(51,"ul",18),A(52,Yi,4,5,"li",19,q),a(),c(54,"div",13)(55,"input",25),w("ngModelChange",function(g){return n.newIgnorePattern.set(g)})("keydown.enter",function(){return n.onIgnorePatternAdd()}),a(),c(56,"p-button",26),w("onClick",function(){return n.onIgnorePatternAdd()}),a()()(),O(57,"p-confirmdialog"),a()),i&2){let s,g,S,V,te,pe,ue,_e,fe;v("aria-labelledby","settings-project-heading"),o(2),p(" ",n.texts.project.heading," "),o(2),p(" ",n.texts.project.introPrefix," "),o(2),f(n.texts.project.introPath),o(),p("",n.texts.project.introSuffix," "),o(),h((s=n.activeProviderLoadError())?8:-1,s),o(),h((g=n.activeProviderSaveError())?9:-1,g),o(),h((S=n.activeProviderSwitchAnnouncement())?10:-1,S),o(4),f(n.texts.project.activeProviderLabel),o(2),p(" ",n.texts.project.activeProviderDescription," "),o(2),h((V=n.activeProviderSource())==="autodetect"?18:V==="none"?19:-1),o(2),h((te=n.activeProviderDetectedLabel())?20:-1,te),o(2),_("options",n.providerOptions())("ngModel",n.activeProviderValue()),o(),h((pe=n.loadError())?23:-1,pe),o(),h((ue=n.saveError())?24:-1,ue),o(4),f(n.texts.project.referencePathsLabel),o(2),p(" ",n.texts.project.referencePathsDescription," "),o(2),N(n.referencePaths()),o(3),_("ngModel",n.newReferencePath())("placeholder",n.texts.project.referencePathsPlaceholder)("disabled",n.isPending("scan.referencePaths")),o(),_("label",n.texts.project.addPathLabel)("disabled",n.isPending("scan.referencePaths")||n.newReferencePath().trim().length===0),o(),h((_e=n.ignoreLoadError())?37:-1,_e),o(),h((fe=n.ignoreSaveError())?38:-1,fe),o(4),f(n.texts.project.ignorePatternsLabel),o(2),p(" ",n.texts.project.ignorePatternsDescriptionPrefix," "),o(2),f(n.texts.project.ignorePatternsDescriptionFile),o(),p(" ",n.texts.project.ignorePatternsDescriptionMiddle," "),o(2),f(n.texts.project.ignorePatternsDescriptionGitignore),o(),p(" ",n.texts.project.ignorePatternsDescriptionSuffix," "),o(2),N(n.ignorePatterns()),o(3),_("ngModel",n.newIgnorePattern())("placeholder",n.texts.project.ignorePatternsPlaceholder)("disabled",n.isPending("ignore.patterns")),o(),_("label",n.texts.project.addIgnorePatternLabel)("disabled",n.isPending("ignore.patterns")||n.newIgnorePattern().trim().length===0)}},dependencies:[ae,Se,re,se,le,Me,Oe,Te,Ee,Pe,de,ce,Pt,St],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-project__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-project__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-project__intro-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.8rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}[_nghost-%COMP%] p-message[_ngcontent-%COMP%]{display:block;margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%] > p-toggleswitch[_ngcontent-%COMP%]{flex:0 0 auto;align-self:center}.settings-project__list-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-project__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-project__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-project__path-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.settings-project__path-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.4rem .6rem;border-radius:.35rem;background:var(--p-content-hover-background)}.settings-project__path-text[_ngcontent-%COMP%]{font-family:var(--p-font-family-mono);font-size:.8rem;word-break:break-all;flex:1 1 auto}.settings-project__add-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.settings-project__add-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1 1 auto;font-family:var(--p-font-family-mono);font-size:.8rem}.settings-project__row-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;font-size:.75rem;color:var(--p-text-muted-color)}.settings-project__meta-line[_ngcontent-%COMP%]{line-height:1.3}.settings-project__provider-select[_ngcontent-%COMP%]{flex:1 1 auto}.settings-project__provider-select[_ngcontent-%COMP%] .p-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return t})();function ee(t){return t instanceof U||t instanceof Error?t.message:String(t)}var Zi=(t,r)=>r.id;function eo(t,r){if(t&1){let e=L();c(0,"li")(1,"button",6),w("click",function(){let n=E(e).$implicit,s=d();return M(s.selectSection(n.id))}),c(2,"span",7),l(3),a()()()}if(t&2){let e=r.$implicit,i=d();o(),G("is-active",i.activeSection()===e.id),v("aria-current",i.activeSection()===e.id?"page":null)("data-testid","settings-nav-"+e.id),o(2),f(e.label)}}function to(t,r){if(t&1){let e=L();c(0,"sm-settings-plugins",8),w("applied",function(){E(e);let n=d();return M(n.onPluginsApplied())}),a()}if(t&2){let e=d();_("visible",e.pluginsVisible())}}function no(t,r){if(t&1&&O(0,"sm-settings-general",5),t&2){let e=d();_("visible",e.generalVisible())}}function io(t,r){if(t&1&&O(0,"sm-settings-project",5),t&2){let e=d();_("visible",e.projectVisible())}}function oo(t,r){if(t&1&&O(0,"sm-settings-about",5),t&2){let e=d();_("visible",e.aboutVisible())}}function ro(t,r){t&1&&O(0,"sm-settings-changelog")}var so=[{id:"general",label:y.sections.general},{id:"project",label:y.sections.project},{id:"plugins",label:y.sections.plugins},{id:"changelog",label:y.sections.changelog},{id:"about",label:y.sections.about}],As=(()=>{class t{visible=$.required();visibleChange=we();confirmation=k(oe);buffer=k(Fe);texts=y;sections=so;activeSection=u("plugins");pluginsVisible=b(()=>this.visible()&&this.activeSection()==="plugins");generalVisible=b(()=>this.visible()&&this.activeSection()==="general");projectVisible=b(()=>this.visible()&&this.activeSection()==="project");aboutVisible=b(()=>this.visible()&&this.activeSection()==="about");onVisibleChange(e){if(e){this.visibleChange.emit(!0);return}let i=this.buffer.dirtyCount();if(i===0){this.visibleChange.emit(!1);return}this.confirmation.confirm({header:this.texts.confirmCloseTitle,message:this.texts.confirmCloseBody(i),acceptLabel:this.texts.applyAndClose,rejectLabel:this.texts.discardChanges,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{this.buffer.applyChanges()},reject:()=>{this.buffer.discardChanges(),this.visibleChange.emit(!1)}})}selectSection(e){this.activeSection.set(e)}onPluginsApplied(){this.visibleChange.emit(!1)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-modal"]],inputs:{visible:[1,"visible"]},outputs:{visibleChange:"visibleChange"},features:[ie([oe])],decls:13,vars:10,consts:[["styleClass","settings-modal__dialog","contentStyleClass","settings-modal__content","data-testid","settings-modal",3,"visibleChange","visible","modal","draggable","resizable","closable","closeOnEscape","dismissableMask","header"],[1,"settings-modal__layout"],["data-testid","settings-modal-sidebar",1,"settings-modal__sidebar"],["role","list",1,"settings-modal__sidebar-list"],["data-testid","settings-modal-main",1,"settings-modal__main"],[3,"visible"],["type","button",1,"settings-modal__sidebar-item",3,"click"],[1,"settings-modal__sidebar-label"],[3,"applied","visible"]],template:function(i,n){if(i&1&&(c(0,"p-dialog",0),w("visibleChange",function(g){return n.onVisibleChange(g)}),c(1,"div",1)(2,"nav",2)(3,"ul",3),A(4,eo,4,5,"li",null,Zi),a()(),c(6,"div",4),m(7,to,1,1,"sm-settings-plugins",5)(8,no,1,1,"sm-settings-general",5)(9,io,1,1,"sm-settings-project",5)(10,oo,1,1,"sm-settings-about",5)(11,ro,1,0,"sm-settings-changelog"),a()(),O(12,"p-confirmdialog"),a()),i&2){let s;_("visible",n.visible())("modal",!0)("draggable",!1)("resizable",!1)("closable",!0)("closeOnEscape",!0)("dismissableMask",!0)("header",n.texts.modalTitle),o(2),v("aria-label",n.texts.modalTitle),o(2),N(n.sections),o(3),h((s=n.activeSection())==="plugins"?7:s==="general"?8:s==="project"?9:s==="about"?10:s==="changelog"?11:-1)}},dependencies:[le,Oe,Te,Ft,It,Vt,$t,Qt,vn,xn],styles:["[_nghost-%COMP%]{display:contents;--p-message-error-color: #fca5a5;--p-message-error-background: color-mix(in srgb, #ef4444 14%, transparent);--p-message-error-border-color: color-mix(in srgb, #ef4444 45%, transparent)}[_nghost-%COMP%] .settings-modal__dialog{width:1024px;height:720px;max-width:92vw;max-height:90vh}[_nghost-%COMP%] .settings-modal__content{padding:0;height:100%;display:flex;flex-direction:column;overflow:hidden}.settings-modal__layout[_ngcontent-%COMP%]{flex:1;display:grid;grid-template-columns:200px 1fr;min-height:0}.settings-modal__sidebar[_ngcontent-%COMP%]{border-right:1px solid var(--p-content-border-color);background:var(--p-content-background);padding:.5rem;overflow-y:auto}.settings-modal__sidebar-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.125rem}.settings-modal__sidebar-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;border-radius:var(--p-border-radius);background:transparent;color:var(--p-text-color);font:inherit;text-align:left;cursor:pointer;transition:background .15s ease,color .15s ease}.settings-modal__sidebar-item[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-modal__sidebar-item.is-active[_ngcontent-%COMP%]{background:var(--p-highlight-background);color:var(--p-highlight-color)}.settings-modal__sidebar-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-modal__main[_ngcontent-%COMP%]{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}.settings-modal__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}"],changeDetection:0})}return t})();export{As as SettingsModal};
123
+ `),acceptLabel:y.project.confirmDialogAccept,rejectLabel:y.project.confirmDialogReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{i()}})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-project"]],inputs:{visible:[1,"visible"]},features:[ie([oe])],decls:58,vars:36,consts:[["data-testid","settings-project",1,"settings-project"],["id","settings-project-heading",1,"settings-project__title"],[1,"settings-project__intro"],[1,"settings-project__intro-path"],["severity","error","data-testid","settings-project-active-provider-load-error",3,"closable"],["severity","error","data-testid","settings-project-active-provider-save-error",3,"closable"],["severity","info","data-testid","settings-project-active-provider-switch-announce",3,"closable"],["data-testid","settings-project-active-provider-row",1,"settings-project__list-row"],[1,"settings-project__row-text"],[1,"settings-project__row-label"],[1,"settings-project__row-description"],[1,"settings-project__row-meta"],[1,"settings-project__meta-line"],[1,"settings-project__add-row"],["optionLabel","label","optionValue","id","appendTo","body","data-testid","settings-project-active-provider-select",1,"settings-project__provider-select",3,"ngModelChange","options","ngModel"],["severity","error","data-testid","settings-project-load-error",3,"closable"],["severity","error","data-testid","settings-project-save-error",3,"closable"],["data-testid","settings-project-reference-paths-row",1,"settings-project__list-row"],["role","list",1,"settings-project__path-list"],[1,"settings-project__path-item"],["type","text","pInputText","","data-testid","settings-project-reference-paths-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-reference-paths-add",3,"onClick","label","disabled"],["severity","error","data-testid","settings-project-ignore-load-error",3,"closable"],["severity","error","data-testid","settings-project-ignore-save-error",3,"closable"],["data-testid","settings-project-ignore-patterns-row",1,"settings-project__list-row"],["type","text","pInputText","","data-testid","settings-project-ignore-patterns-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-ignore-patterns-add",3,"onClick","label","disabled"],[1,"settings-project__path-text"],["severity","secondary","size","small",3,"onClick","label","outlined","disabled"]],template:function(i,n){if(i&1&&(c(0,"section",0)(1,"h2",1),l(2),s(),c(3,"p",2),l(4),c(5,"code",3),l(6),s(),l(7),s(),m(8,Vi,2,3,"p-message",4),m(9,zi,2,3,"p-message",5),m(10,Bi,2,2,"p-message",6),c(11,"div",7)(12,"div",8)(13,"div",9),l(14),s(),c(15,"div",10),l(16),s(),c(17,"div",11),m(18,$i,2,1,"span",12)(19,Gi,2,1,"span",12),m(20,Hi,1,1),s()(),c(21,"div",13)(22,"p-select",14),w("ngModelChange",function(g){return n.onActiveProviderChange(g)}),s()()(),m(23,Ki,2,3,"p-message",15),m(24,qi,2,3,"p-message",16),c(25,"div",17)(26,"div",8)(27,"div",9),l(28),s(),c(29,"div",10),l(30),s()(),c(31,"ul",18),A(32,Wi,4,5,"li",19,q),s(),c(34,"div",13)(35,"input",20),w("ngModelChange",function(g){return n.newReferencePath.set(g)})("keydown.enter",function(){return n.onReferencePathAdd()}),s(),c(36,"p-button",21),w("onClick",function(){return n.onReferencePathAdd()}),s()()(),m(37,Xi,2,3,"p-message",22),m(38,Qi,2,3,"p-message",23),c(39,"div",24)(40,"div",8)(41,"div",9),l(42),s(),c(43,"div",10),l(44),c(45,"code",3),l(46),s(),l(47),c(48,"code",3),l(49),s(),l(50),s()(),c(51,"ul",18),A(52,Yi,4,5,"li",19,q),s(),c(54,"div",13)(55,"input",25),w("ngModelChange",function(g){return n.newIgnorePattern.set(g)})("keydown.enter",function(){return n.onIgnorePatternAdd()}),s(),c(56,"p-button",26),w("onClick",function(){return n.onIgnorePatternAdd()}),s()()(),O(57,"p-confirmdialog"),s()),i&2){let a,g,S,V,te,pe,ue,_e,fe;v("aria-labelledby","settings-project-heading"),o(2),p(" ",n.texts.project.heading," "),o(2),p(" ",n.texts.project.introPrefix," "),o(2),f(n.texts.project.introPath),o(),p("",n.texts.project.introSuffix," "),o(),h((a=n.activeProviderLoadError())?8:-1,a),o(),h((g=n.activeProviderSaveError())?9:-1,g),o(),h((S=n.activeProviderSwitchAnnouncement())?10:-1,S),o(4),f(n.texts.project.activeProviderLabel),o(2),p(" ",n.texts.project.activeProviderDescription," "),o(2),h((V=n.activeProviderSource())==="autodetect"?18:V==="none"?19:-1),o(2),h((te=n.activeProviderDetectedLabel())?20:-1,te),o(2),_("options",n.providerOptions())("ngModel",n.activeProviderValue()),o(),h((pe=n.loadError())?23:-1,pe),o(),h((ue=n.saveError())?24:-1,ue),o(4),f(n.texts.project.referencePathsLabel),o(2),p(" ",n.texts.project.referencePathsDescription," "),o(2),N(n.referencePaths()),o(3),_("ngModel",n.newReferencePath())("placeholder",n.texts.project.referencePathsPlaceholder)("disabled",n.isPending("scan.referencePaths")),o(),_("label",n.texts.project.addPathLabel)("disabled",n.isPending("scan.referencePaths")||n.newReferencePath().trim().length===0),o(),h((_e=n.ignoreLoadError())?37:-1,_e),o(),h((fe=n.ignoreSaveError())?38:-1,fe),o(4),f(n.texts.project.ignorePatternsLabel),o(2),p(" ",n.texts.project.ignorePatternsDescriptionPrefix," "),o(2),f(n.texts.project.ignorePatternsDescriptionFile),o(),p(" ",n.texts.project.ignorePatternsDescriptionMiddle," "),o(2),f(n.texts.project.ignorePatternsDescriptionGitignore),o(),p(" ",n.texts.project.ignorePatternsDescriptionSuffix," "),o(2),N(n.ignorePatterns()),o(3),_("ngModel",n.newIgnorePattern())("placeholder",n.texts.project.ignorePatternsPlaceholder)("disabled",n.isPending("ignore.patterns")),o(),_("label",n.texts.project.addIgnorePatternLabel)("disabled",n.isPending("ignore.patterns")||n.newIgnorePattern().trim().length===0)}},dependencies:[se,Se,re,ae,le,Me,Oe,Te,Ee,Pe,de,ce,Pt,St],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-project__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-project__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-project__intro-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.8rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}[_nghost-%COMP%] p-message[_ngcontent-%COMP%]{display:block;margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%] > p-toggleswitch[_ngcontent-%COMP%]{flex:0 0 auto;align-self:center}.settings-project__list-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-project__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-project__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-project__path-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.settings-project__path-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.4rem .6rem;border-radius:.35rem;background:var(--p-content-hover-background)}.settings-project__path-text[_ngcontent-%COMP%]{font-family:var(--p-font-family-mono);font-size:.8rem;word-break:break-all;flex:1 1 auto}.settings-project__add-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.settings-project__add-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1 1 auto;font-family:var(--p-font-family-mono);font-size:.8rem}.settings-project__row-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;font-size:.75rem;color:var(--p-text-muted-color)}.settings-project__meta-line[_ngcontent-%COMP%]{line-height:1.3}.settings-project__provider-select[_ngcontent-%COMP%]{flex:1 1 auto}.settings-project__provider-select[_ngcontent-%COMP%] .p-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return t})();function ee(t){return t instanceof U||t instanceof Error?t.message:String(t)}var Zi=(t,r)=>r.id;function eo(t,r){if(t&1){let e=L();c(0,"li")(1,"button",6),w("click",function(){let n=E(e).$implicit,a=d();return M(a.selectSection(n.id))}),c(2,"span",7),l(3),s()()()}if(t&2){let e=r.$implicit,i=d();o(),G("is-active",i.activeSection()===e.id),v("aria-current",i.activeSection()===e.id?"page":null)("data-testid","settings-nav-"+e.id),o(2),f(e.label)}}function to(t,r){if(t&1){let e=L();c(0,"sm-settings-plugins",8),w("applied",function(){E(e);let n=d();return M(n.onPluginsApplied())}),s()}if(t&2){let e=d();_("visible",e.pluginsVisible())}}function no(t,r){if(t&1&&O(0,"sm-settings-general",5),t&2){let e=d();_("visible",e.generalVisible())}}function io(t,r){if(t&1&&O(0,"sm-settings-project",5),t&2){let e=d();_("visible",e.projectVisible())}}function oo(t,r){if(t&1&&O(0,"sm-settings-about",5),t&2){let e=d();_("visible",e.aboutVisible())}}function ro(t,r){t&1&&O(0,"sm-settings-changelog")}var ao=[{id:"general",label:y.sections.general},{id:"project",label:y.sections.project},{id:"plugins",label:y.sections.plugins},{id:"changelog",label:y.sections.changelog},{id:"about",label:y.sections.about}],Aa=(()=>{class t{visible=$.required();visibleChange=we();confirmation=k(oe);buffer=k(Fe);texts=y;sections=ao;activeSection=u("plugins");pluginsVisible=b(()=>this.visible()&&this.activeSection()==="plugins");generalVisible=b(()=>this.visible()&&this.activeSection()==="general");projectVisible=b(()=>this.visible()&&this.activeSection()==="project");aboutVisible=b(()=>this.visible()&&this.activeSection()==="about");onVisibleChange(e){if(e){this.visibleChange.emit(!0);return}let i=this.buffer.dirtyCount();if(i===0){this.visibleChange.emit(!1);return}this.confirmation.confirm({header:this.texts.confirmCloseTitle,message:this.texts.confirmCloseBody(i),acceptLabel:this.texts.applyAndClose,rejectLabel:this.texts.discardChanges,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{this.buffer.applyChanges()},reject:()=>{this.buffer.discardChanges(),this.visibleChange.emit(!1)}})}selectSection(e){this.activeSection.set(e)}onPluginsApplied(){this.visibleChange.emit(!1)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=z({type:t,selectors:[["sm-settings-modal"]],inputs:{visible:[1,"visible"]},outputs:{visibleChange:"visibleChange"},features:[ie([oe])],decls:13,vars:10,consts:[["styleClass","settings-modal__dialog","contentStyleClass","settings-modal__content","data-testid","settings-modal",3,"visibleChange","visible","modal","draggable","resizable","closable","closeOnEscape","dismissableMask","header"],[1,"settings-modal__layout"],["data-testid","settings-modal-sidebar",1,"settings-modal__sidebar"],["role","list",1,"settings-modal__sidebar-list"],["data-testid","settings-modal-main",1,"settings-modal__main"],[3,"visible"],["type","button",1,"settings-modal__sidebar-item",3,"click"],[1,"settings-modal__sidebar-label"],[3,"applied","visible"]],template:function(i,n){if(i&1&&(c(0,"p-dialog",0),w("visibleChange",function(g){return n.onVisibleChange(g)}),c(1,"div",1)(2,"nav",2)(3,"ul",3),A(4,eo,4,5,"li",null,Zi),s()(),c(6,"div",4),m(7,to,1,1,"sm-settings-plugins",5)(8,no,1,1,"sm-settings-general",5)(9,io,1,1,"sm-settings-project",5)(10,oo,1,1,"sm-settings-about",5)(11,ro,1,0,"sm-settings-changelog"),s()(),O(12,"p-confirmdialog"),s()),i&2){let a;_("visible",n.visible())("modal",!0)("draggable",!1)("resizable",!1)("closable",!0)("closeOnEscape",!0)("dismissableMask",!0)("header",n.texts.modalTitle),o(2),v("aria-label",n.texts.modalTitle),o(2),N(n.sections),o(3),h((a=n.activeSection())==="plugins"?7:a==="general"?8:a==="project"?9:a==="about"?10:a==="changelog"?11:-1)}},dependencies:[le,Oe,Te,Ft,It,Vt,$t,Qt,vn,xn],styles:["[_nghost-%COMP%]{display:contents;--p-message-error-color: #fca5a5;--p-message-error-background: color-mix(in srgb, #ef4444 14%, transparent);--p-message-error-border-color: color-mix(in srgb, #ef4444 45%, transparent)}[_nghost-%COMP%] .settings-modal__dialog{width:1024px;height:720px;max-width:92vw;max-height:90vh}[_nghost-%COMP%] .settings-modal__content{padding:0;height:100%;display:flex;flex-direction:column;overflow:hidden}.settings-modal__layout[_ngcontent-%COMP%]{flex:1;display:grid;grid-template-columns:200px 1fr;min-height:0}.settings-modal__sidebar[_ngcontent-%COMP%]{border-right:1px solid var(--p-content-border-color);background:var(--p-content-background);padding:.5rem;overflow-y:auto}.settings-modal__sidebar-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.125rem}.settings-modal__sidebar-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;border-radius:var(--p-border-radius);background:transparent;color:var(--p-text-color);font:inherit;text-align:left;cursor:pointer;transition:background .15s ease,color .15s ease}.settings-modal__sidebar-item[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-modal__sidebar-item.is-active[_ngcontent-%COMP%]{background:var(--p-highlight-background);color:var(--p-highlight-color)}.settings-modal__sidebar-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-modal__main[_ngcontent-%COMP%]{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}.settings-modal__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}"],changeDetection:0})}return t})();export{Aa as SettingsModal};