@skill-map/cli 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +244 -200
- package/dist/cli.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +1969 -1961
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/chunk-2W3RSIZM.js +1 -0
- package/dist/ui/{chunk-GJJZ5QH6.js → chunk-DWG7CV5P.js} +1 -1
- package/dist/ui/chunk-JVJ4QSO5.js +107 -0
- package/dist/ui/chunk-KHERXP5A.js +61 -0
- package/dist/ui/chunk-MGTS4JDZ.js +1 -0
- package/dist/ui/chunk-MVSNYBW2.js +251 -0
- package/dist/ui/chunk-O7JJFUMD.js +123 -0
- package/dist/ui/{chunk-STE4Z72W.js → chunk-RIDAAD4I.js} +1 -1
- package/dist/ui/chunk-YEWLFFFB.js +135 -0
- package/dist/ui/{chunk-BMAKIDAV.js → chunk-YUNWCUTD.js} +31 -31
- package/dist/ui/{chunk-2TPMJJYQ.js → chunk-ZM3N6TZQ.js} +2 -2
- package/dist/ui/chunk-ZR2E2QJ4.js +965 -0
- package/dist/ui/index.html +3 -3
- package/dist/ui/main-T42DPEJX.js +2 -0
- package/dist/ui/{styles-ALBMEXCF.css → styles-YEWJTI4X.css} +1 -1
- package/package.json +2 -2
- package/dist/ui/chunk-4BVLXZO3.js +0 -61
- package/dist/ui/chunk-I7EELB7M.js +0 -1
- package/dist/ui/chunk-K47RR2IO.js +0 -251
- package/dist/ui/chunk-KRNW54CI.js +0 -5
- package/dist/ui/chunk-NJ4PSNK3.js +0 -965
- package/dist/ui/chunk-OU26UMVW.js +0 -237
- package/dist/ui/chunk-QGRY6MDS.js +0 -123
- package/dist/ui/chunk-SCSYN7U2.js +0 -1
- package/dist/ui/main-CVCJMGY5.js +0 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import{b as Dt,c as w,d as At,e as jt}from"./chunk-MGTS4JDZ.js";import{a as Ct,b as wt,c as ke,d as Se,e as Mt}from"./chunk-ZM3N6TZQ.js";import{a as Ee,b as Me,c as Tt,d as It,e as Ot,f as Ft,g as oe,h as re}from"./chunk-DWG7CV5P.js";import{e as kt,f as Pe,h as te,i as ne,j as ie,l as St,m as Pt,n as Et}from"./chunk-YEWLFFFB.js";import{$a as at,Aa as be,Ac as Z,Gb as J,Hc as bt,I as Qe,Ib as gt,Ic as Ce,J as Xe,Ja as _,K as Ye,Kc as ft,M as Je,Ma as h,Na as b,Nc as xt,O as M,Oa as rt,Pa as Q,Pb as pt,Qa as O,Ra as F,S as Ze,Sa as f,Sb as y,T as k,Ta as l,Tc as vt,U as S,Ua as s,Uc as ue,Va as T,Vb as ye,Vc as yt,Wa as u,Wb as V,Xa as m,Xb as ut,Ya as Y,_ as et,ad as we,bc as Re,bd as ee,ca as v,cb as I,cc as mt,da as N,db as X,eb as C,fa as Ve,gb as a,hd as H,id as B,ja as tt,jb as st,ka as ge,kb as lt,lb as fe,mb as xe,na as r,nc as _t,ob as dt,oc as ht,pb as ct,rb as Le,sb as $,tb as ve,ub as pe,va as A,vb as d,wa as nt,wb as p,xb as x,ya as it,yb as R,za as ot}from"./chunk-ZR2E2QJ4.js";import"./chunk-3R7E3HPC.js";import{a as q,b as W}from"./chunk-Q7L6LLAK.js";function sn(t,n){if(t&1&&(u(0,"p",6),d(1),m()),t&2){let e=a();r(),R(" ",e.texts.aboutErrorPrefix," ",e.loadError()," ")}}var Te=class t{dataSource=M(H);updateCheck=M(Dt);theme=M(jt);visible=V.required();texts=w;health=v(null);loadError=v(null);markSrc=y(()=>this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");cliVersion=y(()=>this.updateCheck.current()??this.health()?.implVersion??this.texts.aboutUnknown);specVersion=y(()=>this.health()?.specVersion??this.texts.aboutLoading);schemaVersion=y(()=>this.health()?.schemaVersion??this.texts.aboutLoading);scope=y(()=>this.health()?.scope??this.texts.aboutLoading);cwd=y(()=>this.health()?.cwd??this.texts.aboutLoading);dbDisplay=y(()=>{let n=this.health();return n?this.texts.aboutDbValue(n.db,ln(n.dbPath,n.cwd)):this.texts.aboutLoading});homeDir=y(()=>this.health()?.homeDir??this.texts.aboutLoading);constructor(){N(()=>{this.visible()&&this.health()===null&&this.load()})}async load(){this.loadError.set(null);try{let n=await this.dataSource.health();this.health.set(n)}catch(n){let e=n instanceof B||n instanceof Error?n.message:String(n);this.loadError.set(e)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["sm-settings-about"]],inputs:{visible:[1,"visible"]},decls:67,vars:29,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-scope",1,"settings-about__value"],["data-testid","settings-about-cwd",1,"settings-about__value"],["data-testid","settings-about-db",1,"settings-about__value"],["data-testid","settings-about-home",1,"settings-about__value"]],template:function(e,i){e&1&&(u(0,"section",0)(1,"header",1),Y(2,"img",2),u(3,"div",3)(4,"h2",4),d(5),m(),u(6,"p",5),d(7),m()()(),h(8,sn,2,2,"p",6),u(9,"a",7),Y(10,"i",8),u(11,"span",9)(12,"span",10),d(13),m(),u(14,"span",11),d(15),m()(),u(16,"span",12),Y(17,"i",13),d(18),m()(),u(19,"dl",14)(20,"div",15)(21,"dt",16),d(22),m(),u(23,"dd",17)(24,"a",18),d(25),m()()(),u(26,"div",15)(27,"dt",16),d(28),m(),u(29,"dd",17)(30,"a",19),d(31),m()()(),u(32,"div",15)(33,"dt",16),d(34),m(),u(35,"dd",20),d(36),m()(),u(37,"div",15)(38,"dt",16),d(39),m(),u(40,"dd",21),d(41),m()(),u(42,"div",15)(43,"dt",16),d(44),m(),u(45,"dd",22),d(46),m()(),u(47,"div",15)(48,"dt",16),d(49),m(),u(50,"dd",23),d(51),m()(),u(52,"div",15)(53,"dt",16),d(54),m(),u(55,"dd",24),d(56),m()(),u(57,"div",15)(58,"dt",16),d(59),m(),u(60,"dd",25),d(61),m()(),u(62,"div",15)(63,"dt",16),d(64),m(),u(65,"dd",26),d(66),m()()()()),e&2&&(r(2),X("src",i.markSrc(),ge),r(3),x(" ",i.texts.aboutHeading," "),r(2),p(i.texts.aboutIntro),r(),b(i.loadError()?8:-1),r(),X("href",i.texts.aboutGithubUrl,ge),_("aria-label",i.texts.aboutStarA11y),r(4),p(i.texts.aboutStarHeading),r(2),p(i.texts.aboutStarBody),r(3),x(" ",i.texts.aboutStarCta," "),r(4),p(i.texts.aboutWebsiteLabel),r(2),X("href",i.texts.aboutWebsiteUrl,ge),r(),p(i.texts.aboutWebsiteUrl),r(3),p(i.texts.aboutGithubLabel),r(2),X("href",i.texts.aboutGithubUrl,ge),r(),p(i.texts.aboutGithubUrl),r(3),p(i.texts.aboutCliLabel),r(2),x(" ",i.cliVersion()," "),r(3),p(i.texts.aboutSpecLabel),r(2),x(" ",i.specVersion()," "),r(3),p(i.texts.aboutSchemaLabel),r(2),x(" ",i.schemaVersion()," "),r(3),p(i.texts.aboutScopeLabel),r(2),x(" ",i.scope()," "),r(3),p(i.texts.aboutFolderLabel),r(2),x(" ",i.cwd()," "),r(3),p(i.texts.aboutDbLabel),r(2),x(" ",i.dbDisplay()," "),r(3),p(i.texts.aboutHomeLabel),r(2),x(" ",i.homeDir()," "))},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})};function ln(t,n){if(!t||!n)return t;let e=n.replace(/[/\\]+$/,"");return t.startsWith(e)?t.slice(e.length).replace(/^[/\\]+/,""):t}var Nt={schemaVersion:1,entries:[{version:"0.24.0",date:"2026-05-13",kind:"user-facing",highlights:[{body:"**CLI flags fixed.** `sm refresh`, `sm watch`, `sm jobs prune` now honor `--db` / `-g`. `sm watch` and `sm scan --watch` honor `--no-color`. `sm scan --watch` names the conflicting flag on combo errors. `sm conformance run` progress moved to stderr; `--quiet` silences it.",packages:["@skill-map/cli"]}]},{version:"0.23.1",date:"2026-05-12",kind:"user-facing",highlights:[{body:"Inspector chips and the hero card now render their variant styling (link, warn, broken, danger, hero accent border). They had silently been rendering as bare defaults since PrimeNG 21 changed how `[styleClass]` is applied to chip and card hosts.",packages:["@skill-map/cli"]}]},{version:"0.23.0",date:"2026-05-12",kind:"user-facing",highlights:[{body:'Node inspector will split actions into "Applicable" (always available) and "Recommended" (per finding). First pairing: stale sidecar recommends running `bump`. UI hookup lands in the next iteration; the spec field ships first.',packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm plugins create <id> -g` now scaffolds under `~/.skill-map/plugins/<id>` instead of the project dir. The flag was advertised in `--help` but previously ignored.",packages:["@skill-map/cli"]},{body:"`sm refresh`, `sm plugins doctor`, and `sm conformance run` now respect `--json` for machine-readable output. `sm graph --format json` is a new format that emits the full ScanResult. CI / scripts can parse these instead of the human text.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm serve` now rejects browser requests whose `Host` or `Origin` is not a loopback name. Closes a DNS-rebinding lane where a malicious page could trigger scans or settings writes. `--dev-cors` still works for Vite-style dev UIs on a different loopback port.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm` now refuses to grant the `.sm` write consent (or apply `scan.extraFolders` / `scan.referencePaths`) from user-level config. The first prompt re-appears per project. Move stray values into `<project>/.skill-map/settings.local.json` (gitignored).",packages:["@skill-map/cli"]}]},{version:"0.22.0",date:"2026-05-12",kind:"user-facing",highlights:[{body:'The "include HOME" toggle is gone. To scan paths outside the project, list them in **Extra folders to scan** (renamed from *Extra roots*). If you had `scan.includeHome: true`, add the paths you actually need (e.g. `~/.claude/agents`), not one click anymore.',packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.21.0",date:"2026-05-10",kind:"user-facing",highlights:[{body:"Expanded node cards now show the file path above the description and a provider chip (Claude, Gemini, Open Skills). Favorite toggle uses a star instead of a heart.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Disabling a plugin now removes its card chips from the UI immediately. Previously the chips lingered until the next `sm scan`, making the toggle look broken.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"The card footer is cleaner: the three outgoing counters (`@`-mentions, markdown links, `/`-commands) share a single `\u2193` arrow glyph on the left, and the URL counter keeps its link glyph on the right. Three legacy hardcoded chips (in / out links, external URLs) were removed.",packages:["@skill-map/cli"]},{body:"`sm plugins show core/<ext>` now resolves like `enable`/`disable` do, and `sm plugins list` marks individually-disabled extensions with `\u2715`. The `sm tutorial` content is realigned with the v0.20.0 verbs (no more `sm graph --root` / `sm export --kind` / `kind: hook` claims).",packages:["@skill-map/cli"]},{body:"The view slot `card.footer.left.counter` was renamed to `card.footer.left`, symmetrical with `card.footer.right`. Plugin authors using the old literal in `plugin.json` need to update it; the scaffolder emits the new name automatically.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"The topbar now shows the full project path under the **skill-map** wordmark, so a screenshot or a quick glance at the UI is always self-identifying. Previously only the last folder segment was shown, and projects scanned from their own root saw no path at all.",packages:["@skill-map/cli"]}]},{version:"0.20.0",date:"2026-05-10",kind:"user-facing",highlights:[{body:'**Update-check is now a user preference.** Whether you see "Update available" notifications no longer depends on the project you are scanning. The toggle moved to **Settings \u2192 General**; the CLI equivalent is `sm config set -g updateCheck.enabled <bool>`.',packages:["@skill-map/cli"]},{body:"**`sm scan` now flags orphan job files.** A new check scans `.skill-map/jobs/` for MD files that no DB row references and reports each as a `warn` issue. To delete the files, run `sm bump prune --orphan-files` (unchanged).",packages:["@skill-map/cli"]},{body:"**`sm scan -g` now scans your HOME directory.** Run `sm scan -g` (without positional roots) to walk every active provider's HOME dir, typically `~/.claude`, `~/.gemini`, `~/.agents`, using the global config + DB.",packages:["@skill-map/cli"]},{body:"**Three new privacy-sensitive project settings** in Settings \u2192 Project: *include HOME provider directories*, *extra scan roots*, and *reference paths for link validation*. Every change that expands disk access beyond your project root requires explicit confirmation.",packages:["@skill-map/cli"]},{body:'**Reset Layout uses a proper dialog.** The "Reset all node positions" action used to fire a browser-native `confirm()` popup; it now uses the in-app dialog style with a destructive-styled "Reset" button and a "Cancel" escape.',packages:["@skill-map/cli"]},{body:'**Plugins can be locked by the host.** Settings \u2192 Plugins shows a "Locked" pill on plugins marked as mandatory (today only `core/markdown`, the universal `.md` fallback). The toggle stays visible but disabled, with a tooltip explaining why.',packages:["@skill-map/cli"]}]},{version:"0.19.0",date:"2026-05-09",kind:"user-facing",highlights:[{body:"**Settings \u2192 Changelog.** The Changelog tab in Settings now lists what's new in skill-map: one entry per release, newest first, bullet points for the user-facing changes. Bundled with the demo so it's available offline too.",packages:["@skill-map/cli"]},{body:"**Tags zoom-to-matching.** Clicking a tag chip in the inspector now pans + zooms the graph to fit every node that carries the tag. Click the same chip again to clear the selection and return to the previous view.",packages:["@skill-map/cli"]}]},{version:"0.18.0",date:"2026-05-07",kind:"user-facing",highlights:[{body:"**Bump sidecars in batch.** New `sm bump --pending` walks every node whose `.sm` sidecar reports drift and refreshes them in one pass. Single-node `sm bump <path>` also lands.",packages:["@skill-map/cli"]},{body:'**Annotation field dropped: `released`.** Redundant with `audit.lastBumpedAt`. The inspector and node card now read the activity timestamp from the `audit:` block, no more confusion between "officially released" and "last bumped".',packages:["@skill-map/cli"]}]},{version:"0.17.0",date:"2026-04-29",kind:"user-facing",highlights:[{body:"**Per-node chips in the graph card and inspector.** Plugins can now decorate nodes with counters, alerts, and key-value rows. Two come built-in: external-URL count per node, and in/out link counts.",packages:["@skill-map/cli"]},{body:"**Multi-provider graphs.** Claude, Gemini, and the open-standard `agent-skills` flavour now coexist in the same graph. Cards paint with each Provider's accent; the kind palette in the graph view filters on the actual node kind names.",packages:["@skill-map/cli"]}]}]};var Vt=Nt;var cn=(t,n)=>n.version;function gn(t,n){if(t&1&&(u(0,"p",3),d(1),m()),t&2){let e=a();r(),x(" ",e.texts.changelogEmpty," ")}}function pn(t,n){if(t&1&&(u(0,"p",10),d(1),m()),t&2){let e=a(3);r(),x(" ",e.texts.changelogInternalRelease," ")}}function un(t,n){if(t&1&&(u(0,"li",15),d(1),m()),t&2){let e=n.$implicit;r(),p(e)}}function mn(t,n){if(t&1&&(u(0,"ul",14),O(1,un,2,1,"li",15,Q),m()),t&2){let e=a().$implicit,i=a(4);_("aria-label",i.texts.changelogAffectedPackages),r(),F(e.packages)}}function _n(t,n){if(t&1&&(u(0,"li",12),Y(1,"div",13),h(2,mn,3,1,"ul",14),m()),t&2){let e=n.$implicit;r(),X("innerHTML",e.bodyHtml,tt),r(),b(e.packages.length?2:-1)}}function hn(t,n){if(t&1&&(u(0,"ul",11),O(1,_n,3,2,"li",12,rt),m()),t&2){let e=a().$implicit;r(),F(e.highlights)}}function bn(t,n){if(t&1&&(u(0,"li",6)(1,"header",7)(2,"span",8),d(3),m(),u(4,"span",9),d(5),m()(),h(6,pn,2,1,"p",10)(7,hn,3,0,"ul",11),m()),t&2){let e=n.$implicit;$("settings-changelog__entry--internal",e.kind==="internal"),_("data-testid","settings-changelog-entry-"+e.version),r(3),x("v",e.version),r(2),p(e.date),r(),b(e.kind==="internal"?6:7)}}function fn(t,n){if(t&1&&(u(0,"ol",4),O(1,bn,8,6,"li",5,cn),m()),t&2){let e=a();r(),F(e.entries())}}var Ie=class t{markdown=M(Mt);texts=w;entries=v([]);hasEntries=y(()=>this.entries().length>0);ngOnInit(){this.renderAll()}async renderAll(){let n=[];for(let e of Vt.entries){let i=[];for(let o of e.highlights)i.push({bodyHtml:await this.markdown.render(o.body),packages:o.packages});n.push({version:e.version,date:this.formatDate(e.date),kind:e.kind,highlights:i})}this.entries.set(n)}formatDate(n){let e=new Date(n+"T00:00:00Z");return Number.isNaN(e.getTime())?n:new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(e)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["sm-settings-changelog"]],decls:7,vars:4,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"],[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(e,i){e&1&&(u(0,"section",0)(1,"h2",1),d(2),m(),u(3,"p",2),d(4),m(),h(5,gn,2,1,"p",3)(6,fn,3,0,"ol",4),m()),e&2&&(_("aria-labelledby","settings-changelog-heading"),r(2),x(" ",i.texts.changelogHeading," "),r(2),p(i.texts.changelogIntro),r(),b(i.hasEntries()?6:5))},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}"],changeDetection:0})};var Lt=`
|
|
2
|
+
.p-toggleswitch {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: dt('toggleswitch.width');
|
|
5
|
+
height: dt('toggleswitch.height');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.p-toggleswitch-input {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
appearance: none;
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
inset-inline-start: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
opacity: 0;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
outline: 0 none;
|
|
21
|
+
border-radius: dt('toggleswitch.border.radius');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.p-toggleswitch-slider {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
border-width: dt('toggleswitch.border.width');
|
|
29
|
+
border-style: solid;
|
|
30
|
+
border-color: dt('toggleswitch.border.color');
|
|
31
|
+
background: dt('toggleswitch.background');
|
|
32
|
+
transition:
|
|
33
|
+
background dt('toggleswitch.transition.duration'),
|
|
34
|
+
color dt('toggleswitch.transition.duration'),
|
|
35
|
+
border-color dt('toggleswitch.transition.duration'),
|
|
36
|
+
outline-color dt('toggleswitch.transition.duration'),
|
|
37
|
+
box-shadow dt('toggleswitch.transition.duration');
|
|
38
|
+
border-radius: dt('toggleswitch.border.radius');
|
|
39
|
+
outline-color: transparent;
|
|
40
|
+
box-shadow: dt('toggleswitch.shadow');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.p-toggleswitch-handle {
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: 50%;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
49
|
+
background: dt('toggleswitch.handle.background');
|
|
50
|
+
color: dt('toggleswitch.handle.color');
|
|
51
|
+
width: dt('toggleswitch.handle.size');
|
|
52
|
+
height: dt('toggleswitch.handle.size');
|
|
53
|
+
inset-inline-start: dt('toggleswitch.gap');
|
|
54
|
+
margin-block-start: calc(-1 * calc(dt('toggleswitch.handle.size') / 2));
|
|
55
|
+
border-radius: dt('toggleswitch.handle.border.radius');
|
|
56
|
+
transition:
|
|
57
|
+
background dt('toggleswitch.transition.duration'),
|
|
58
|
+
color dt('toggleswitch.transition.duration'),
|
|
59
|
+
inset-inline-start dt('toggleswitch.slide.duration'),
|
|
60
|
+
box-shadow dt('toggleswitch.slide.duration');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
|
|
64
|
+
background: dt('toggleswitch.checked.background');
|
|
65
|
+
border-color: dt('toggleswitch.checked.border.color');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {
|
|
69
|
+
background: dt('toggleswitch.handle.checked.background');
|
|
70
|
+
color: dt('toggleswitch.handle.checked.color');
|
|
71
|
+
inset-inline-start: calc(dt('toggleswitch.width') - calc(dt('toggleswitch.handle.size') + dt('toggleswitch.gap')));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {
|
|
75
|
+
background: dt('toggleswitch.hover.background');
|
|
76
|
+
border-color: dt('toggleswitch.hover.border.color');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {
|
|
80
|
+
background: dt('toggleswitch.handle.hover.background');
|
|
81
|
+
color: dt('toggleswitch.handle.hover.color');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {
|
|
85
|
+
background: dt('toggleswitch.checked.hover.background');
|
|
86
|
+
border-color: dt('toggleswitch.checked.hover.border.color');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {
|
|
90
|
+
background: dt('toggleswitch.handle.checked.hover.background');
|
|
91
|
+
color: dt('toggleswitch.handle.checked.hover.color');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {
|
|
95
|
+
box-shadow: dt('toggleswitch.focus.ring.shadow');
|
|
96
|
+
outline: dt('toggleswitch.focus.ring.width') dt('toggleswitch.focus.ring.style') dt('toggleswitch.focus.ring.color');
|
|
97
|
+
outline-offset: dt('toggleswitch.focus.ring.offset');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.p-toggleswitch.p-invalid > .p-toggleswitch-slider {
|
|
101
|
+
border-color: dt('toggleswitch.invalid.border.color');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.p-toggleswitch.p-disabled {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.p-toggleswitch.p-disabled .p-toggleswitch-slider {
|
|
109
|
+
background: dt('toggleswitch.disabled.background');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.p-toggleswitch.p-disabled .p-toggleswitch-handle {
|
|
113
|
+
background: dt('toggleswitch.handle.disabled.background');
|
|
114
|
+
}
|
|
115
|
+
`;var xn=["handle"],vn=["input"],yn=t=>({checked:t});function Cn(t,n){t&1&&at(0)}function wn(t,n){if(t&1&&be(0,Cn,1,0,"ng-container",3),t&2){let e=a();f("ngTemplateOutlet",e.handleTemplate||e._handleTemplate)("ngTemplateOutletContext",gt(2,yn,e.checked()))}}var kn=`
|
|
116
|
+
${Lt}
|
|
117
|
+
|
|
118
|
+
p-toggleswitch.ng-invalid.ng-dirty > .p-toggleswitch-slider {
|
|
119
|
+
border-color: dt('toggleswitch.invalid.border.color');
|
|
120
|
+
}
|
|
121
|
+
`,Sn={root:{position:"relative"}},Pn={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"},Rt=(()=>{class t extends ft{name="toggleswitch";style=kn;classes=Pn;inlineStyles=Sn;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Ve(t)))(o||t)}})();static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})();var zt=new Je("TOGGLESWITCH_INSTANCE"),En={provide:kt,useExisting:Qe(()=>se),multi:!0},se=(()=>{class t extends St{componentName="ToggleSwitch";$pcToggleSwitch=M(zt,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=M(ue,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;tabindex;inputId;readonly;trueValue=!0;falseValue=!1;ariaLabel;size=V();ariaLabelledBy;autofocus;onChange=new et;input;handleTemplate;_handleTemplate;focused=!1;_componentStyle=M(Rt);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(o){return(e||(e=Ve(t)))(o||t)}})();static \u0275cmp=A({type:t,selectors:[["p-toggleswitch"],["p-toggleSwitch"],["p-toggle-switch"]],contentQueries:function(i,o,c){if(i&1&&st(c,xn,4)(c,bt,4),i&2){let g;fe(g=xe())&&(o.handleTemplate=g.first),fe(g=xe())&&(o.templates=g)}},viewQuery:function(i,o){if(i&1&<(vn,5),i&2){let c;fe(c=xe())&&(o.input=c.first)}},hostVars:7,hostBindings:function(i,o){i&1&&C("click",function(g){return o.onHostClick(g)}),i&2&&(_("data-p-checked",o.checked())("data-p-disabled",o.$disabled())("data-p",o.dataP),ve(o.sx("root")),pe(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",mt],inputId:"inputId",readonly:[2,"readonly","readonly",Re],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",size:[1,"size"],ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",Re]},outputs:{onChange:"onChange"},features:[J([En,Rt,{provide:zt,useExisting:t},{provide:xt,useExisting:t}]),it([ue]),ot],decls:5,vars:22,consts:[["input",""],["type","checkbox","role","switch",3,"focus","blur","checked","pAutoFocus","pBind"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(l(0,"input",1,0),C("focus",function(){return o.onFocus()})("blur",function(){return o.onBlur()}),s(),l(2,"div",2)(3,"div",2),h(4,wn,1,4,"ng-container"),s()()),i&2&&(pe(o.cx("input")),f("checked",o.checked())("pAutoFocus",o.autofocus)("pBind",o.ptm("input")),_("id",o.inputId)("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0)("aria-checked",o.checked())("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("name",o.name())("tabindex",o.tabindex),r(2),pe(o.cx("slider")),f("pBind",o.ptm("slider")),_("data-p",o.dataP),r(),pe(o.cx("handle")),f("pBind",o.ptm("handle")),_("data-p",o.dataP),r(),b(o.handleTemplate||o._handleTemplate?4:-1))},dependencies:[ht,_t,vt,Ce,yt,ue],encapsulation:2,changeDetection:0})}return t})(),Oe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=nt({type:t});static \u0275inj=Ye({imports:[se,Ce,Ce]})}return t})();var Mn=(t,n)=>n.key;function Tn(t,n){if(t&1&&(l(0,"p-message",3),d(1),s()),t&2){let e=a();f("closable",!1),r(),R(" ",e.texts.general.loadErrorPrefix," ",n," ")}}function In(t,n){if(t&1&&(l(0,"p-message",4),d(1),s()),t&2){let e=a();f("closable",!1),r(),R(" ",e.texts.general.saveErrorPrefix," ",n," ")}}function On(t,n){if(t&1){let e=I();l(0,"li",6)(1,"div",7)(2,"div",8),d(3),s(),l(4,"div",9),d(5),s()(),l(6,"p-toggleswitch",10),C("ngModelChange",function(o){let c=k(e).$implicit,g=a();return S(g.onToggle(c,o))}),s()()}if(t&2){let e=n.$implicit,i=a();_("data-testid","settings-general-row-"+e.key),r(3),p(i.toggleLabel(e.key)),r(2),x(" ",i.toggleDescription(e.key)," "),r(),f("ngModel",i.valueOf(e))("disabled",i.loading()||i.isPending(e.key)||i.preferences()===null),_("data-testid","settings-general-toggle-"+e.key)}}var Fn=[{key:"updateCheck.enabled",read:t=>t.updateCheck.enabled,patch:t=>({updateCheck:{enabled:t}})}],Fe=class t{dataSource=M(H);visible=V.required();texts=w;toggles=Fn;loading=v(!1);loadError=v(null);saveError=v(null);preferences=v(null);pending=v(new Set);constructor(){N(()=>{this.visible()&&this.refresh()})}toggleLabel(n){return w.general.toggles[n].label}toggleDescription(n){return w.general.toggles[n].description}valueOf(n){let e=this.preferences();return e?n.read(e):!1}isPending(n){return this.pending().has(n)}onToggle(n,e){this.runToggle(n,e)}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let n=await this.dataSource.getPreferences();this.preferences.set(n)}catch(n){this.loadError.set(Kt(n)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runToggle(n,e){if(this.pending().has(n.key))return;let i=new Set(this.pending());i.add(n.key),this.pending.set(i),this.saveError.set(null);try{let o=await this.dataSource.setPreferences(n.patch(e));this.preferences.set(o)}catch(o){this.saveError.set(Kt(o))}finally{let o=new Set(this.pending());o.delete(n.key),this.pending.set(o)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["sm-settings-general"]],inputs:{visible:[1,"visible"]},decls:10,vars:5,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"],[1,"settings-general__row-text"],[1,"settings-general__row-label"],[1,"settings-general__row-description"],[3,"ngModelChange","ngModel","disabled"]],template:function(e,i){if(e&1&&(l(0,"section",0)(1,"h2",1),d(2),s(),l(3,"p",2),d(4),s(),h(5,Tn,2,3,"p-message",3),h(6,In,2,3,"p-message",4),l(7,"ul",5),O(8,On,7,6,"li",6,Mn),s()()),e&2){let o,c;_("aria-labelledby","settings-general-heading"),r(2),x(" ",i.texts.general.heading," "),r(2),p(i.texts.general.intro),r(),b((o=i.loadError())?5:-1,o),r(),b((c=i.saveError())?6:-1,c),r(2),F(i.toggles)}},dependencies:[ie,te,ne,re,oe,Oe,se],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-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}"],changeDetection:0})};function Kt(t){return t instanceof B||t instanceof Error?t.message:String(t)}var ze={provider:"#7C3AED",extractor:"#A78BFA",analyzer:"#5FD17C",action:"#00C853",formatter:"#5BC0EB",hook:"#FFB627"};function Gt(t){let n=t.toLowerCase();return ze[n]??"currentColor"}var je=["all",...Object.keys(ze)],De=["claude","gemini","agent-skills","core"],Ae=["provider","extractor","analyzer","action","formatter","hook"];function le(t,n){return`${t}/${n}`}function Be(t){let n=new Map;for(let e of t)if(!de(e.status)){if(e.granularity==="bundle"){n.set(e.id,e.status==="enabled");continue}if(e.granularity==="extension"&&e.extensions)for(let i of e.extensions)n.set(le(e.id,i.id),i.enabled)}return n}function Ke(t){let n=t.target;return!n||typeof n.closest!="function"?!1:n.closest('label, button, input, [role="switch"], p-toggleswitch')!==null}function Ut(t,n){if(Dn(t,n))return[t];if(t.granularity!=="extension"||!t.extensions)return[];let e=t.extensions.filter(i=>An(i,n));return e.length===0?[]:[W(q({},t),{extensions:e})]}function qt(t,n){if(t.granularity==="bundle")return t.kinds.some(i=>i.toLowerCase()===n)?[t]:[];if(!t.extensions)return[];let e=t.extensions.filter(i=>i.kind.toLowerCase()===n);return e.length===0?[]:[W(q({},t),{extensions:e})]}function Wt(t){if(t.locked)return[];if(t.granularity!=="extension"||!t.extensions)return[t];let n=t.extensions.filter(e=>!e.locked);return n.length===0?[]:[W(q({},t),{extensions:n})]}function Qt(t){return t.slice().sort((e,i)=>{let o=De.indexOf(e.id),c=De.indexOf(i.id),g=o>=0?o:De.length,P=c>=0?c:De.length;return g!==P?g-P:e.id.localeCompare(i.id)}).map(e=>{if(e.granularity!=="extension"||!e.extensions)return e;let i=e.extensions.slice().sort((o,c)=>{let g=Ae.indexOf(o.kind.toLowerCase()),P=Ae.indexOf(c.kind.toLowerCase()),K=g>=0?g:Ae.length,L=P>=0?P:Ae.length;return K!==L?K-L:o.id.localeCompare(c.id)});return W(q({},e),{extensions:i})})}function Dn(t,n){return!!(t.id.toLowerCase().includes(n)||t.description&&t.description.toLowerCase().includes(n))}function An(t,n){return!!(t.id.toLowerCase().includes(n)||t.description&&t.description.toLowerCase().includes(n))}function de(t){return t==="incompatible-spec"||t==="invalid-manifest"||t==="load-error"||t==="id-collision"}function $e(t){return t instanceof B||t instanceof Error?t.message:String(t)}function Xt(t,n){return de(t.status)?n.statusFailure[t.status]??t.status:t.status==="enabled"?n.enabledLabel:n.disabledLabel}function Yt(t,n){switch(t){case"built-in":return n.sourceBuiltIn;case"project":return n.sourceProject;case"global":return n.sourceGlobal}}var He="sm.settings.plugins.collapsed",Ge="sm.settings.plugins.kind-filter";function Jt(){let t=null;try{t=localStorage.getItem(He)}catch{return new Set}if(!t)return new Set;let n;try{n=JSON.parse(t)}catch{return new Set}if(!Array.isArray(n))return new Set;let e=new Set;for(let i of n)typeof i=="string"&&i.length>0&&e.add(i);return e}function Zt(t){try{if(t.size===0){localStorage.removeItem(He);return}localStorage.setItem(He,JSON.stringify([...t]))}catch{}}function en(){let t=null;try{t=localStorage.getItem(Ge)}catch{return"all"}return t&&je.includes(t)?t:"all"}function tn(t){try{if(t==="all"){localStorage.removeItem(Ge);return}localStorage.setItem(Ge,t)}catch{}}function Ue(){Ze(Ue);let t=v(Jt());N(()=>Zt(t()));let n=i=>{let o=new Set(t());o.has(i)?o.delete(i):o.add(i),t.set(o)},e=i=>!t().has(i);return{collapsed:t.asReadonly(),toggleExpanded:n,isExpanded:e}}function nn(t){let n=v(""),e=y(()=>n().trim().length>0),i=v(en()),o=y(()=>i()!=="all");N(()=>tn(i()));let c=y(()=>Qt(t.plugins().flatMap(Wt))),g=y(()=>{let L=n().trim().toLowerCase(),_e=i(),G=c();return _e!=="all"&&(G=G.flatMap(he=>qt(he,_e))),L.length>0&&(G=G.flatMap(he=>Ut(he,L))),G});return{searchText:n,searchActive:e,kindFilter:i,setKindFilter:L=>{i.set(L)},isKindFilterActive:L=>i()===L,kindFilterActive:o,kindFilterOptions:je,visiblePlugins:c,filteredPlugins:g}}function on(t){let n=v(!1),e=v(null),i=v(null),o=v([]),c=v(new Map),g=v(new Map),P=v(!1),K=y(()=>{let E=c(),D=g(),z=new Set;for(let[U,j]of D)E.get(U)!==j&&z.add(U);return z}),L=y(()=>K().size>0),_e=y(()=>o().some(E=>de(E.status))),G=y(()=>{let E=g();for(let D of o())if(D.startsAsDisabled===!0&&E.get(D.id)===!0)return!0;return!1});return{plugins:o,loading:n,loadError:e,toggleError:i,applying:P,hasFailureRows:_e,originalState:c,pendingState:g,dirtyIds:K,hasPendingChanges:L,restartRecommended:G,pendingEnabled:E=>g().get(E)??!1,isDirty:E=>K().has(E),refresh:async()=>{n.set(!0),e.set(null),i.set(null);try{let E=await t.dataSource.listPlugins();o.set([...E.items]);let D=Be(E.items);c.set(D),g.set(new Map(D))}catch(E){e.set($e(E)),o.set([]),c.set(new Map),g.set(new Map)}finally{n.set(!1)}},onBundleToggle:(E,D)=>{if(P())return;let z=new Map(g());z.set(E.id,D),g.set(z)},onExtensionToggle:(E,D,z)=>{if(P())return;let U=le(E,D.id),j=new Map(g());j.set(U,z),g.set(j)},applyChanges:async()=>{if(P())return{ok:!1};let E=K();if(E.size===0)return{ok:!1};let D=[],z=g();for(let j of E)D.push({id:j,enabled:z.get(j)??!1});P.set(!0),i.set(null);let U=!1;try{let j=await t.dataSource.applyPluginChanges(D);o.set([...j.items]);let We=Be(j.items);c.set(We),g.set(new Map(We)),t.scanTrigger.run(),U=!0}catch(j){i.set($e(j))}finally{P.set(!1)}return{ok:U}},discardChanges:()=>{g.set(new Map(c())),i.set(null)}}}var rn=(t,n)=>n.id;function Vn(t,n){if(t&1&&d(0),t&2){let e=a().$implicit,i=a();x(" ",e==="all"?i.texts.pluginsKindFilterAll:e," ")}}function Ln(t,n){if(t&1){let e=I();l(0,"p-togglebutton",16),C("ngModelChange",function(){let o=k(e).$implicit,c=a();return S(c.setKindFilter(o))}),be(1,Vn,1,1,"ng-template",null,0,pt),s()}if(t&2){let e=n.$implicit,i=a();Le("--kind-color",e==="all"?null:i.kindTint(e)),f("ngModel",i.isKindFilterActive(e))("styleClass","settings-plugins__kind-chip"+(e==="all"?" is-all":""))("ariaLabel",i.texts.pluginsKindFilterOptionA11y(e,!i.isKindFilterActive(e))),_("data-testid","settings-plugins-kind-chip-"+e)}}function Rn(t,n){if(t&1&&(l(0,"p-message",11),d(1),s()),t&2){let e=a();f("closable",!1),r(),x(" ",e.texts.unsavedChangesMessage(e.dirtyIds().size)," ")}}function zn(t,n){if(t&1&&(l(0,"p",12),T(1,"i",17),d(2),s()),t&2){let e=a();r(2),x(" ",e.texts.loading," ")}}function Bn(t,n){if(t&1&&(l(0,"p-message",13),d(1),s()),t&2){let e=a();f("closable",!1),r(),R(" ",e.texts.errorPrefix," ",e.loadError()," ")}}function Kn(t,n){if(t&1&&(l(0,"p",14),d(1),s()),t&2){let e=a();r(),x(" ",e.texts.empty," ")}}function $n(t,n){if(t&1){let e=I();l(0,"p-message",22),C("onClose",function(){k(e);let o=a(2);return S(o.toggleError.set(null))}),d(1),s()}if(t&2){let e=a(2);f("closable",!0),r(),R(" ",e.texts.toggleErrorPrefix," ",e.toggleError()," ")}}function Hn(t,n){if(t&1&&(l(0,"p",19),T(1,"i",23),d(2),s()),t&2){let e=a(2);r(2),x(" ",e.texts.pluginsSearchEmpty(e.searchText())," ")}}function Gn(t,n){if(t&1){let e=I();l(0,"button",41),C("click",function(o){k(e);let c=a().$implicit;return a(2).toggleExpanded(c.id),S(o.stopPropagation())}),T(1,"i",42),s()}if(t&2){let e=a().$implicit,i=a(2);_("aria-expanded",i.isExpanded(e.id))("aria-label",i.isExpanded(e.id)?i.texts.collapseLabel:i.texts.expandLabel)("data-testid","settings-bundle-expand-"+e.id),r(),$("fa-chevron-down",i.isExpanded(e.id))("fa-chevron-right",!i.isExpanded(e.id))}}function Un(t,n){t&1&&T(0,"span",27)}function qn(t,n){if(t&1&&T(0,"span",30),t&2){let e=a().$implicit;_("data-testid","settings-row-dirty-"+e.id)}}function Wn(t,n){if(t&1&&(l(0,"span",33),d(1),s()),t&2){let e=a().$implicit;r(),x("v",e.version)}}function Qn(t,n){if(t&1&&(l(0,"span",34),T(1,"i",43),d(2),s()),t&2){let e=a().$implicit,i=a(2);f("title",i.texts.lockedTooltip),_("data-testid","settings-row-locked-"+e.id),r(2),x(" ",i.texts.lockedLabel," ")}}function Xn(t,n){if(t&1&&(l(0,"span",35),d(1),s()),t&2){let e=a().$implicit,i=a(2);r(),p(i.statusLabel(e))}}function Yn(t,n){if(t&1&&(l(0,"p",36),d(1),s()),t&2){let e=a().$implicit;r(),p(e.description)}}function Jn(t,n){if(t&1&&(l(0,"span",37),d(1),s()),t&2){let e=a().$implicit;r(),p(e.reason)}}function Zn(t,n){if(t&1&&(l(0,"p",38),T(1,"i",44),d(2),s()),t&2){let e=a().$implicit,i=a(2);_("data-testid","settings-row-starts-disabled-"+e.id),r(2),x(" ",i.texts.startsAsDisabledRowHint," ")}}function ei(t,n){if(t&1){let e=I();l(0,"p-toggleswitch",45),C("ngModelChange",function(o){k(e);let c=a().$implicit,g=a(2);return S(g.onBundleToggle(c,o))}),s()}if(t&2){let e=a().$implicit,i=a(2);f("ngModel",i.pendingEnabled(e.id))("disabled",i.applying()||!!e.locked)("ariaLabel",i.texts.a11y.pluginToggle(e.id,!i.pendingEnabled(e.id))),_("data-testid","settings-toggle-"+e.id)}}function ti(t,n){if(t&1&&T(0,"span",30),t&2){let e=a().$implicit,i=a(2).$implicit;_("data-testid","settings-extrow-dirty-"+i.id+"-"+e.id)}}function ni(t,n){if(t&1&&(l(0,"span",34),T(1,"i",43),d(2),s()),t&2){let e=a().$implicit,i=a(2).$implicit,o=a(2);f("title",o.texts.lockedTooltip),_("data-testid","settings-extrow-locked-"+i.id+"-"+e.id),r(2),x(" ",o.texts.lockedLabel," ")}}function ii(t,n){if(t&1&&(l(0,"p",53),d(1),s()),t&2){let e=a().$implicit;r(),p(e.description)}}function oi(t,n){if(t&1){let e=I();l(0,"li",47),C("click",function(o){let c=k(e).$implicit,g=a(2).$implicit,P=a(2);return S(P.onSubrowClick(g.id,c,o))})("keydown.enter",function(o){let c=k(e).$implicit,g=a(2).$implicit,P=a(2);return S(P.onSubrowClick(g.id,c,o))})("keydown.space",function(o){let c=k(e).$implicit,g=a(2).$implicit,P=a(2);return o.preventDefault(),S(P.onSubrowClick(g.id,c,o))}),l(1,"div",48)(2,"div",49),h(3,ti,1,1,"span",30),l(4,"span",50),d(5),s(),l(6,"span",51),d(7),s(),l(8,"span",52),d(9),s(),h(10,ni,3,3,"span",34),s(),h(11,ii,2,1,"p",53),s(),l(12,"p-toggleswitch",45),C("ngModelChange",function(o){let c=k(e).$implicit,g=a(2).$implicit,P=a(2);return S(P.onExtensionToggle(g.id,c,o))}),s()()}if(t&2){let e=n.$implicit,i=a(2).$implicit,o=a(2);$("is-clickable",o.extensionToggleInteractive(e))("is-dirty",o.isDirty(o.qualifiedExt(i.id,e.id))),_("aria-label",o.texts.a11y.extensionRow(o.qualifiedExt(i.id,e.id)))("data-testid","settings-extrow-"+i.id+"-"+e.id),r(3),b(o.isDirty(o.qualifiedExt(i.id,e.id))?3:-1),r(2),p(e.id),r(),Le("--kind-color",o.kindTint(e.kind)),r(),p(e.kind),r(2),x("v",e.version),r(),b(e.locked?10:-1),r(),b(e.description?11:-1),r(),f("ngModel",o.pendingEnabled(o.qualifiedExt(i.id,e.id)))("disabled",o.applying()||!!e.locked)("ariaLabel",o.texts.a11y.extensionToggle(o.qualifiedExt(i.id,e.id),!o.pendingEnabled(o.qualifiedExt(i.id,e.id)))),_("data-testid","settings-ext-toggle-"+i.id+"-"+e.id)}}function ri(t,n){if(t&1&&(l(0,"ul",40),O(1,oi,13,18,"li",46,rn),s()),t&2){let e=a().$implicit;_("data-testid","settings-extensions-"+e.id),r(),F(e.extensions)}}function ai(t,n){if(t&1){let e=I();l(0,"li",24)(1,"div",25),C("click",function(o){let c=k(e).$implicit,g=a(2);return S(g.onRowClick(c,o))})("keydown.enter",function(o){let c=k(e).$implicit,g=a(2);return S(g.onRowClick(c,o))})("keydown.space",function(o){let c=k(e).$implicit,g=a(2);return o.preventDefault(),S(g.onRowClick(c,o))}),h(2,Gn,2,7,"button",26)(3,Un,1,0,"span",27),l(4,"div",28)(5,"div",29),h(6,qn,1,1,"span",30),l(7,"span",31),d(8),s(),l(9,"span",32),d(10),s(),h(11,Wn,2,1,"span",33),h(12,Qn,3,3,"span",34),h(13,Xn,2,1,"span",35),s(),h(14,Yn,2,1,"p",36),h(15,Jn,2,1,"span",37),h(16,Zn,3,2,"p",38),s(),h(17,ei,1,4,"p-toggleswitch",39),s(),h(18,ri,3,1,"ul",40),s()}if(t&2){let e=n.$implicit,i=a(2);$("is-extension-bundle",e.granularity==="extension")("is-failed",!i.canToggleBundle(e)&&e.granularity==="bundle")("is-clickable",i.rowIsClickable(e))("is-dirty",e.granularity==="bundle"&&i.isDirty(e.id)),_("data-testid","settings-row-"+e.id),r(),_("aria-label",i.texts.a11y.pluginRow(e.id)),r(),b(e.granularity==="extension"&&(e.extensions!=null&&e.extensions.length)?2:3),r(4),b(e.granularity==="bundle"&&i.isDirty(e.id)?6:-1),r(2),p(e.id),r(2),p(i.sourceLabel(e.source)),r(),b(e.version?11:-1),r(),b(e.locked?12:-1),r(),b(!i.canToggleBundle(e)&&e.granularity==="bundle"?13:-1),r(),b(e.description?14:-1),r(),b(e.reason?15:-1),r(),b(i.showStartsAsDisabledHint(e)?16:-1),r(),b(i.canToggleBundle(e)?17:-1),r(),b(e.granularity==="extension"&&(e.extensions!=null&&e.extensions.length)&&i.isExpanded(e.id)?18:-1)}}function si(t,n){if(t&1&&(h(0,$n,2,3,"p-message",18),h(1,Hn,3,1,"p",19),l(2,"ul",20),O(3,ai,19,22,"li",21,rn),s()),t&2){let e=a();b(e.toggleError()?0:-1),r(),b(e.searchActive()&&e.filteredPlugins().length===0?1:-1),r(2),F(e.filteredPlugins())}}function li(t,n){if(t&1&&(l(0,"em",54),d(1),s()),t&2){let e=a(2);r(),x(" ",e.texts.startsAsDisabledFooterHint," ")}}function di(t,n){if(t&1){let e=I();l(0,"footer",15),h(1,li,2,1,"em",54),l(2,"p-button",55),C("onClick",function(){k(e);let o=a();return S(o.discardChanges())}),s(),l(3,"p-button",56),C("onClick",function(){k(e);let o=a();return S(o.applyChanges())}),s()()}if(t&2){let e=a();r(),b(e.restartRecommended()?1:-1),r(),f("text",!0)("label",e.texts.discardChanges)("ariaLabel",e.texts.discardA11y)("disabled",e.applying()),r(),f("label",e.texts.applyAndClose)("ariaLabel",e.texts.applyA11y)("disabled",e.applying())("loading",e.applying())}}var ce=class t{dataSource=M(H);scanTrigger=M(At);visible=V.required();applied=ye();texts=w;pluginState=on({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=Ue();collapsed=this.pluginCollapse.collapsed;pluginFilter=nn({plugins:this.plugins});searchText=this.pluginFilter.searchText;searchActive=this.pluginFilter.searchActive;kindFilter=this.pluginFilter.kindFilter;kindFilterActive=this.pluginFilter.kindFilterActive;kindFilterOptions=this.pluginFilter.kindFilterOptions;visiblePlugins=this.pluginFilter.visiblePlugins;filteredPlugins=this.pluginFilter.filteredPlugins;constructor(){N(()=>{this.visible()&&this.pluginState.refresh()})}setKindFilter(n){this.pluginFilter.setKindFilter(n)}isKindFilterActive(n){return this.pluginFilter.isKindFilterActive(n)}toggleExpanded(n){this.pluginCollapse.toggleExpanded(n)}isExpanded(n){return this.pluginCollapse.isExpanded(n)}pendingEnabled(n){return this.pluginState.pendingEnabled(n)}isDirty(n){return this.pluginState.isDirty(n)}showStartsAsDisabledHint(n){return n.startsAsDisabled?this.pendingEnabled(n.id):!1}onBundleToggle(n,e){this.pluginState.onBundleToggle(n,e)}onExtensionToggle(n,e,i){this.pluginState.onExtensionToggle(n,e,i)}async applyChanges(){(await this.pluginState.applyChanges()).ok&&this.applied.emit()}discardChanges(){this.pluginState.discardChanges()}canToggleBundle(n){return n.granularity==="extension"?!1:!de(n.status)}bundleToggleInteractive(n){return this.canToggleBundle(n)&&!n.locked}extensionToggleInteractive(n){return!n.locked}rowIsClickable(n){return!!(this.bundleToggleInteractive(n)||n.granularity==="extension"&&(n.extensions?.length??0)>0)}onRowClick(n,e){if(!Ke(e)){if(this.bundleToggleInteractive(n)){this.onBundleToggle(n,!this.pendingEnabled(n.id));return}n.granularity==="extension"&&(n.extensions?.length??0)>0&&this.toggleExpanded(n.id)}}onSubrowClick(n,e,i){if(Ke(i)||!this.extensionToggleInteractive(e))return;let o=le(n,e.id);this.onExtensionToggle(n,e,!this.pendingEnabled(o))}statusLabel(n){return Xt(n,this.texts)}sourceLabel(n){return Yt(n,this.texts)}qualifiedExt(n,e){return le(n,e)}kindTint(n){return Gt(n)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["sm-settings-plugins"]],inputs:{visible:[1,"visible"]},outputs:{applied:"applied"},decls:19,vars:9,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-kind-filter",1,"settings-plugins__kind-filter"],[3,"ngModel","styleClass","--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"],[3,"ngModelChange","ngModel","styleClass","ariaLabel"],["aria-hidden","true",1,"fa-solid","fa-spinner","fa-spin"],["severity","error","data-testid","settings-toggle-error",3,"closable"],["data-testid","settings-search-empty",1,"settings-plugins__hint"],["role","list",1,"settings-plugins__list"],[1,"settings-plugins__row",3,"is-extension-bundle","is-failed","is-clickable","is-dirty"],["severity","error","data-testid","settings-toggle-error",3,"onClose","closable"],["aria-hidden","true",1,"fa-solid","fa-magnifying-glass"],[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"],["aria-hidden","true",1,"settings-plugins__dirty-dot"],[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-status"],[1,"settings-plugins__row-description"],[1,"settings-plugins__row-reason"],[1,"settings-plugins__row-hint"],[3,"ngModel","disabled","ariaLabel"],["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"],[3,"ngModelChange","ngModel","disabled","ariaLabel"],["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"],[1,"settings-plugins__subrow-id"],[1,"settings-plugins__subrow-kind"],[1,"settings-plugins__subrow-version"],[1,"settings-plugins__subrow-description"],["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(e,i){e&1&&(l(0,"section",1)(1,"div",2)(2,"header",3)(3,"h2",4),d(4),s(),l(5,"p",5),d(6),s()(),l(7,"p-iconfield",6),T(8,"p-inputicon",7),l(9,"input",8),C("ngModelChange",function(c){return i.searchText.set(c)}),s()(),l(10,"div",9),O(11,Ln,3,6,"p-togglebutton",10,Q),s(),h(13,Rn,2,2,"p-message",11),h(14,zn,3,1,"p",12)(15,Bn,2,3,"p-message",13)(16,Kn,2,1,"p",14)(17,si,5,2),s(),h(18,di,4,9,"footer",15),s()),e&2&&(r(4),x(" ",i.texts.pluginsHeading," "),r(2),p(i.texts.pluginsIntro),r(3),f("placeholder",i.texts.pluginsSearchPlaceholder)("ngModel",i.searchText()),_("aria-label",i.texts.pluginsSearchA11y),r(),_("aria-label",i.texts.pluginsKindFilterA11y),r(),F(i.kindFilterOptions),r(2),b(i.hasPendingChanges()?13:-1),r(),b(i.loading()?14:i.loadError()?15:i.plugins().length===0?16:17),r(4),b(i.hasPendingChanges()?18:-1))},dependencies:[ie,Pe,te,ne,ee,we,It,Tt,Ft,Ot,Me,Ee,re,oe,Et,Pt,Oe,se],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.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__kind-filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.375rem}.settings-plugins__kind-chip[_ngcontent-%COMP%]{--chip-accent: var(--kind-color, var(--p-text-color));--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}.app-dark[_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__kind-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-bundle[_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}.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, var(--p-text-color)) 14%,transparent);border:1px solid color-mix(in oklab,var(--kind-color, var(--p-text-color)) 38%,transparent);color:color-mix(in oklab,var(--kind-color, var(--p-text-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, var(--p-text-color)) 22%,transparent);border-color:color-mix(in oklab,var(--kind-color, var(--p-text-color)) 55%,transparent);color:color-mix(in oklab,var(--kind-color, var(--p-text-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}.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%]{display:inline-block;width:.5rem;height:.5rem;border-radius:50%;background:var(--p-warn-color);flex-shrink:0}.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})};function gi(t,n){if(t&1&&(l(0,"p-message",3),d(1),s()),t&2){let e=a();f("closable",!1),r(),R(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function pi(t,n){if(t&1&&(l(0,"p-message",4),d(1),s()),t&2){let e=a();f("closable",!1),r(),R(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function ui(t,n){if(t&1){let e=I();l(0,"li",10)(1,"span",17),d(2),s(),l(3,"p-button",18),C("onClick",function(){let o=k(e).$implicit,c=a();return S(c.onExtraFolderRemove(o))}),s()()}if(t&2){let e=n.$implicit,i=a();r(2),p(e),r(),f("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.extraFolders")),_("data-testid","settings-project-extra-folders-remove")}}function mi(t,n){if(t&1){let e=I();l(0,"li",10)(1,"span",17),d(2),s(),l(3,"p-button",18),C("onClick",function(){let o=k(e).$implicit,c=a();return S(c.onReferencePathRemove(o))}),s()()}if(t&2){let e=n.$implicit,i=a();r(2),p(e),r(),f("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.referencePaths")),_("data-testid","settings-project-reference-paths-remove")}}var Ne=class t{dataSource=M(H);confirmation=M(Z);visible=V.required();texts=w;loading=v(!1);loadError=v(null);saveError=v(null);preferences=v(null);pending=v(new Set);newExtraFolder=v("");newReferencePath=v("");extraFolders=y(()=>this.preferences()?.scan.extraFolders??[]);referencePaths=y(()=>this.preferences()?.scan.referencePaths??[]);constructor(){N(()=>{this.visible()&&this.refresh()})}isPending(n){return this.pending().has(n)}onExtraFolderAdd(){let n=this.newExtraFolder().trim();if(n.length===0)return;let e=[...this.extraFolders(),n];this.runPatch("scan.extraFolders",{scan:{extraFolders:e}}).then(()=>{this.newExtraFolder.set("")})}onExtraFolderRemove(n){let e=this.extraFolders().filter(i=>i!==n);this.runPatch("scan.extraFolders",{scan:{extraFolders:[...e]}})}onReferencePathAdd(){let n=this.newReferencePath().trim();if(n.length===0)return;let e=[...this.referencePaths(),n];this.runPatch("scan.referencePaths",{scan:{referencePaths:e}}).then(()=>{this.newReferencePath.set("")})}onReferencePathRemove(n){let e=this.referencePaths().filter(i=>i!==n);this.runPatch("scan.referencePaths",{scan:{referencePaths:[...e]}})}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let n=await this.dataSource.getProjectPreferences();this.preferences.set(n)}catch(n){this.loadError.set(qe(n)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runPatch(n,e){if(this.pending().has(n))return;let i=new Set(this.pending());i.add(n),this.pending.set(i),this.saveError.set(null);try{let o=await this.dataSource.setProjectPreferences(e);this.preferences.set(o)}catch(o){if(o instanceof B&&o.code==="confirm-required"){let c=o.paths??[];this.confirmDialog(c,async()=>{try{let g=await this.dataSource.setProjectPreferences(W(q({},e),{confirm:!0}));this.preferences.set(g)}catch(g){this.saveError.set(qe(g))}})}else this.saveError.set(qe(o))}finally{let o=new Set(this.pending());o.delete(n),this.pending.set(o)}}confirmDialog(n,e){this.confirmation.confirm({header:w.project.confirmDialogHeader,message:w.project.confirmDialogIntro+`
|
|
122
|
+
`+n.map(i=>`\u2022 ${i}`).join(`
|
|
123
|
+
`),acceptLabel:w.project.confirmDialogAccept,rejectLabel:w.project.confirmDialogReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{e()}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["sm-settings-project"]],inputs:{visible:[1,"visible"]},features:[J([Z])],decls:32,vars:19,consts:[["data-testid","settings-project",1,"settings-project"],["id","settings-project-heading",1,"settings-project__title"],[1,"settings-project__intro"],["severity","error","data-testid","settings-project-load-error",3,"closable"],["severity","error","data-testid","settings-project-save-error",3,"closable"],["data-testid","settings-project-extra-folders-row",1,"settings-project__list-row"],[1,"settings-project__row-text"],[1,"settings-project__row-label"],[1,"settings-project__row-description"],["role","list",1,"settings-project__path-list"],[1,"settings-project__path-item"],[1,"settings-project__add-row"],["type","text","pInputText","","data-testid","settings-project-extra-folders-input",3,"ngModelChange","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-extra-folders-add",3,"onClick","label","disabled"],["data-testid","settings-project-reference-paths-row",1,"settings-project__list-row"],["type","text","pInputText","","data-testid","settings-project-reference-paths-input",3,"ngModelChange","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-reference-paths-add",3,"onClick","label","disabled"],[1,"settings-project__path-text"],["severity","secondary","size","small",3,"onClick","label","outlined","disabled"]],template:function(e,i){if(e&1&&(l(0,"section",0)(1,"h2",1),d(2),s(),l(3,"p",2),d(4),s(),h(5,gi,2,3,"p-message",3),h(6,pi,2,3,"p-message",4),l(7,"div",5)(8,"div",6)(9,"div",7),d(10),s(),l(11,"div",8),d(12),s()(),l(13,"ul",9),O(14,ui,4,5,"li",10,Q),s(),l(16,"div",11)(17,"input",12),C("ngModelChange",function(c){return i.newExtraFolder.set(c)}),s(),l(18,"p-button",13),C("onClick",function(){return i.onExtraFolderAdd()}),s()()(),l(19,"div",14)(20,"div",6)(21,"div",7),d(22),s(),l(23,"div",8),d(24),s()(),l(25,"ul",9),O(26,mi,4,5,"li",10,Q),s(),l(28,"div",11)(29,"input",15),C("ngModelChange",function(c){return i.newReferencePath.set(c)}),s(),l(30,"p-button",16),C("onClick",function(){return i.onReferencePathAdd()}),s()()(),T(31,"p-confirmdialog"),s()),e&2){let o,c;_("aria-labelledby","settings-project-heading"),r(2),x(" ",i.texts.project.heading," "),r(2),p(i.texts.project.intro),r(),b((o=i.loadError())?5:-1,o),r(),b((c=i.saveError())?6:-1,c),r(4),p(i.texts.project.extraFoldersLabel),r(2),x(" ",i.texts.project.extraFoldersDescription," "),r(2),F(i.extraFolders()),r(3),f("ngModel",i.newExtraFolder())("placeholder",i.texts.project.extraFoldersPlaceholder)("disabled",i.isPending("scan.extraFolders")),r(),f("label",i.texts.project.addPathLabel)("disabled",i.isPending("scan.extraFolders")||i.newExtraFolder().trim().length===0),r(4),p(i.texts.project.referencePathsLabel),r(2),x(" ",i.texts.project.referencePathsDescription," "),r(2),F(i.referencePaths()),r(3),f("ngModel",i.newReferencePath())("placeholder",i.texts.project.referencePathsPlaceholder)("disabled",i.isPending("scan.referencePaths")),r(),f("label",i.texts.project.addPathLabel)("disabled",i.isPending("scan.referencePaths")||i.newReferencePath().trim().length===0)}},dependencies:[ie,Pe,te,ne,ee,we,Se,ke,Me,Ee,re,oe],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__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}"],changeDetection:0})};function qe(t){return t instanceof B||t instanceof Error?t.message:String(t)}var _i=(t,n)=>n.id;function hi(t,n){if(t&1){let e=I();l(0,"li")(1,"button",6),C("click",function(){let o=k(e).$implicit,c=a();return S(c.selectSection(o.id))}),l(2,"span",7),d(3),s()()()}if(t&2){let e=n.$implicit,i=a();r(),$("is-active",i.activeSection()===e.id),_("aria-current",i.activeSection()===e.id?"page":null)("data-testid","settings-nav-"+e.id),r(2),p(e.label)}}function bi(t,n){if(t&1){let e=I();l(0,"sm-settings-plugins",8),C("applied",function(){k(e);let o=a();return S(o.onPluginsApplied())}),s()}if(t&2){let e=a();f("visible",e.pluginsVisible())}}function fi(t,n){if(t&1&&T(0,"sm-settings-general",5),t&2){let e=a();f("visible",e.generalVisible())}}function xi(t,n){if(t&1&&T(0,"sm-settings-project",5),t&2){let e=a();f("visible",e.projectVisible())}}function vi(t,n){if(t&1&&T(0,"sm-settings-about",5),t&2){let e=a();f("visible",e.aboutVisible())}}function yi(t,n){t&1&&T(0,"sm-settings-changelog")}var Ci=[{id:"general",label:w.sections.general},{id:"project",label:w.sections.project},{id:"plugins",label:w.sections.plugins},{id:"changelog",label:w.sections.changelog},{id:"about",label:w.sections.about}],an=class t{visible=V.required();visibleChange=ye();confirmation=M(Z);pluginsPanel=ut(ce);texts=w;sections=Ci;activeSection=v("plugins");dialogStyle={width:"1024px",height:"720px",maxWidth:"92vw",maxHeight:"90vh"};pluginsVisible=y(()=>this.visible()&&this.activeSection()==="plugins");generalVisible=y(()=>this.visible()&&this.activeSection()==="general");projectVisible=y(()=>this.visible()&&this.activeSection()==="project");aboutVisible=y(()=>this.visible()&&this.activeSection()==="about");onVisibleChange(n){if(n){this.visibleChange.emit(!0);return}let e=this.pluginsPanel(),i=e?.dirtyIds().size??0;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:()=>{e?.applyChanges()},reject:()=>{e?.discardChanges(),this.visibleChange.emit(!1)}})}selectSection(n){this.activeSection.set(n)}onPluginsApplied(){this.visibleChange.emit(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["sm-settings-modal"]],viewQuery:function(e,i){e&1&&dt(i.pluginsPanel,ce,5),e&2&&ct()},inputs:{visible:[1,"visible"]},outputs:{visibleChange:"visibleChange"},features:[J([Z])],decls:13,vars:12,consts:[["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(e,i){if(e&1&&(l(0,"p-dialog",0),C("visibleChange",function(c){return i.onVisibleChange(c)}),l(1,"div",1)(2,"nav",2)(3,"ul",3),O(4,hi,4,5,"li",null,_i),s()(),l(6,"div",4),h(7,bi,1,1,"sm-settings-plugins",5)(8,fi,1,1,"sm-settings-general",5)(9,xi,1,1,"sm-settings-project",5)(10,vi,1,1,"sm-settings-about",5)(11,yi,1,0,"sm-settings-changelog"),s()(),T(12,"p-confirmdialog"),s()),e&2){let o;ve(i.dialogStyle),f("visible",i.visible())("modal",!0)("draggable",!1)("resizable",!1)("closable",!0)("closeOnEscape",!0)("dismissableMask",!0)("header",i.texts.modalTitle),r(2),_("aria-label",i.texts.modalTitle),r(2),F(i.sections),r(3),b((o=i.activeSection())==="plugins"?7:o==="general"?8:o==="project"?9:o==="about"?10:o==="changelog"?11:-1)}},dependencies:[ee,Se,ke,wt,Ct,Te,Ie,Fe,ce,Ne],styles:["[_nghost-%COMP%]{display:contents}[_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})};export{an as SettingsModal};
|
|
@@ -13,4 +13,4 @@ import{d as ou}from"./chunk-Q7L6LLAK.js";var Mu={};ou(Mu,{arrayReplaceAt:()=>Bu,
|
|
|
13
13
|
`:">",c};Q.prototype.renderInline=function(u,e,r){let n="",t=this.rules;for(let c=0,i=u.length;c<i;c++){let o=u[c].type;typeof t[o]<"u"?n+=t[o](u,c,e,r,this):n+=this.renderToken(u,c,e)}return n};Q.prototype.renderInlineAsText=function(u,e,r){let n="";for(let t=0,c=u.length;t<c;t++)switch(u[t].type){case"text":n+=u[t].content;break;case"image":n+=this.renderInlineAsText(u[t].children,e,r);break;case"html_inline":case"html_block":n+=u[t].content;break;case"softbreak":case"hardbreak":n+=`
|
|
14
14
|
`;break;default:}return n};Q.prototype.render=function(u,e,r){let n="",t=this.rules;for(let c=0,i=u.length;c<i;c++){let o=u[c].type;o==="inline"?n+=this.renderInline(u[c].children,e,r):typeof t[o]<"u"?n+=t[o](u,c,e,r,this):n+=this.renderToken(u,c,e,r)}return n};var $0=Q;function T(){this.__rules__=[],this.__cache__=null}T.prototype.__find__=function(u){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===u)return e;return-1};T.prototype.__compile__=function(){let u=this,e=[""];u.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),u.__cache__={},e.forEach(function(r){u.__cache__[r]=[],u.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||u.__cache__[r].push(n.fn))})})};T.prototype.at=function(u,e,r){let n=this.__find__(u),t=r||{};if(n===-1)throw new Error("Parser rule not found: "+u);this.__rules__[n].fn=e,this.__rules__[n].alt=t.alt||[],this.__cache__=null};T.prototype.before=function(u,e,r,n){let t=this.__find__(u),c=n||{};if(t===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(t,0,{name:e,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};T.prototype.after=function(u,e,r,n){let t=this.__find__(u),c=n||{};if(t===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(t+1,0,{name:e,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};T.prototype.push=function(u,e,r){let n=r||{};this.__rules__.push({name:u,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null};T.prototype.enable=function(u,e){Array.isArray(u)||(u=[u]);let r=[];return u.forEach(function(n){let t=this.__find__(n);if(t<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[t].enabled=!0,r.push(n)},this),this.__cache__=null,r};T.prototype.enableOnly=function(u,e){Array.isArray(u)||(u=[u]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(u,e)};T.prototype.disable=function(u,e){Array.isArray(u)||(u=[u]);let r=[];return u.forEach(function(n){let t=this.__find__(n);if(t<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[t].enabled=!1,r.push(n)},this),this.__cache__=null,r};T.prototype.getRules=function(u){return this.__cache__===null&&this.__compile__(),this.__cache__[u]||[]};var $=T;function Y(u,e,r){this.type=u,this.tag=e,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Y.prototype.attrIndex=function(e){if(!this.attrs)return-1;let r=this.attrs;for(let n=0,t=r.length;n<t;n++)if(r[n][0]===e)return n;return-1};Y.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};Y.prototype.attrSet=function(e,r){let n=this.attrIndex(e),t=[e,r];n<0?this.attrPush(t):this.attrs[n]=t};Y.prototype.attrGet=function(e){let r=this.attrIndex(e),n=null;return r>=0&&(n=this.attrs[r][1]),n};Y.prototype.attrJoin=function(e,r){let n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};var z=Y;function G0(u,e,r){this.src=u,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}G0.prototype.Token=z;var W0=G0;var mr=/\r\n?|\n/g,xr=/\0/g;function Nu(u){let e;e=u.src.replace(mr,`
|
|
15
15
|
`),e=e.replace(xr,"\uFFFD"),u.src=e}function Ou(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function Hu(u){let e=u.tokens;for(let r=0,n=e.length;r<n;r++){let t=e[r];t.type==="inline"&&u.md.inline.parse(t.content,u.md,u.env,t.children)}}function _r(u){return/^<a[>\s]/i.test(u)}function gr(u){return/^<\/a\s*>/i.test(u)}function Uu(u){let e=u.tokens;if(u.md.options.linkify)for(let r=0,n=e.length;r<n;r++){if(e[r].type!=="inline"||!u.md.linkify.pretest(e[r].content))continue;let t=e[r].children,c=0;for(let i=t.length-1;i>=0;i--){let o=t[i];if(o.type==="link_close"){for(i--;t[i].level!==o.level&&t[i].type!=="link_open";)i--;continue}if(o.type==="html_inline"&&(_r(o.content)&&c>0&&c--,gr(o.content)&&c++),!(c>0)&&o.type==="text"&&u.md.linkify.test(o.content)){let a=o.content,s=u.md.linkify.match(a),l=[],d=o.level,b=0;s.length>0&&s[0].index===0&&i>0&&t[i-1].type==="text_special"&&(s=s.slice(1));for(let p=0;p<s.length;p++){let f=s[p].url,g=u.md.normalizeLink(f);if(!u.md.validateLink(g))continue;let D=s[p].text;s[p].schema?s[p].schema==="mailto:"&&!/^mailto:/i.test(D)?D=u.md.normalizeLinkText("mailto:"+D).replace(/^mailto:/,""):D=u.md.normalizeLinkText(D):D=u.md.normalizeLinkText("http://"+D).replace(/^http:\/\//,"");let E=s[p].index;if(E>b){let _=new u.Token("text","",0);_.content=a.slice(b,E),_.level=d,l.push(_)}let h=new u.Token("link_open","a",1);h.attrs=[["href",g]],h.level=d++,h.markup="linkify",h.info="auto",l.push(h);let x=new u.Token("text","",0);x.content=D,x.level=d,l.push(x);let m=new u.Token("link_close","a",-1);m.level=--d,m.markup="linkify",m.info="auto",l.push(m),b=s[p].lastIndex}if(b<a.length){let p=new u.Token("text","",0);p.content=a.slice(b),p.level=d,l.push(p)}e[r].children=t=Bu(t,i,l)}}}}var J0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,kr=/\((c|tm|r)\)/i,Dr=/\((c|tm|r)\)/ig,Cr={c:"\xA9",r:"\xAE",tm:"\u2122"};function Er(u,e){return Cr[e.toLowerCase()]}function Ar(u){let e=0;for(let r=u.length-1;r>=0;r--){let n=u[r];n.type==="text"&&!e&&(n.content=n.content.replace(Dr,Er)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function yr(u){let e=0;for(let r=u.length-1;r>=0;r--){let n=u[r];n.type==="text"&&!e&&J0.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function ju(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(kr.test(u.tokens[e].content)&&Ar(u.tokens[e].children),J0.test(u.tokens[e].content)&&yr(u.tokens[e].children))}var Fr=/['"]/,X0=/['"]/g,Q0="\u2019";function ku(u,e,r){return u.slice(0,e)+r+u.slice(e+1)}function wr(u,e){let r,n=[];for(let t=0;t<u.length;t++){let c=u[t],i=u[t].level;for(r=n.length-1;r>=0&&!(n[r].level<=i);r--);if(n.length=r+1,c.type!=="text")continue;let o=c.content,a=0,s=o.length;u:for(;a<s;){X0.lastIndex=a;let l=X0.exec(o);if(!l)break;let d=!0,b=!0;a=l.index+1;let p=l[0]==="'",f=32;if(l.index-1>=0)f=o.charCodeAt(l.index-1);else for(r=t-1;r>=0&&!(u[r].type==="softbreak"||u[r].type==="hardbreak");r--)if(u[r].content){f=u[r].content.charCodeAt(u[r].content.length-1);break}let g=32;if(a<s)g=o.charCodeAt(a);else for(r=t+1;r<u.length&&!(u[r].type==="softbreak"||u[r].type==="hardbreak");r++)if(u[r].content){g=u[r].content.charCodeAt(0);break}let D=V(f)||j(String.fromCharCode(f)),E=V(g)||j(String.fromCharCode(g)),h=U(f),x=U(g);if(x?d=!1:E&&(h||D||(d=!1)),h?b=!1:D&&(x||E||(b=!1)),g===34&&l[0]==='"'&&f>=48&&f<=57&&(b=d=!1),d&&b&&(d=D,b=E),!d&&!b){p&&(c.content=ku(c.content,l.index,Q0));continue}if(b)for(r=n.length-1;r>=0;r--){let m=n[r];if(n[r].level<i)break;if(m.single===p&&n[r].level===i){m=n[r];let _,C;p?(_=e.md.options.quotes[2],C=e.md.options.quotes[3]):(_=e.md.options.quotes[0],C=e.md.options.quotes[1]),c.content=ku(c.content,l.index,C),u[m.token].content=ku(u[m.token].content,m.pos,_),a+=C.length-1,m.token===t&&(a+=_.length-1),o=c.content,s=o.length,n.length=r;continue u}}d?n.push({token:t,pos:l.index,single:p,level:i}):b&&p&&(c.content=ku(c.content,l.index,Q0))}}}function Vu(u){if(u.md.options.typographer)for(let e=u.tokens.length-1;e>=0;e--)u.tokens[e].type!=="inline"||!Fr.test(u.tokens[e].content)||wr(u.tokens[e].children,u)}function Zu(u){let e,r,n=u.tokens,t=n.length;for(let c=0;c<t;c++){if(n[c].type!=="inline")continue;let i=n[c].children,o=i.length;for(e=0;e<o;e++)i[e].type==="text_special"&&(i[e].type="text");for(e=r=0;e<o;e++)i[e].type==="text"&&e+1<o&&i[e+1].type==="text"?i[e+1].content=i[e].content+i[e+1].content:(e!==r&&(i[r]=i[e]),r++);e!==r&&(i.length=r)}}var $u=[["normalize",Nu],["block",Ou],["inline",Hu],["linkify",Uu],["replacements",ju],["smartquotes",Vu],["text_join",Zu]];function Gu(){this.ruler=new $;for(let u=0;u<$u.length;u++)this.ruler.push($u[u][0],$u[u][1])}Gu.prototype.process=function(u){let e=this.ruler.getRules("");for(let r=0,n=e.length;r<n;r++)e[r](u)};Gu.prototype.State=W0;var Y0=Gu;function q(u,e,r,n){this.src=u,this.md=e,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let t=this.src;for(let c=0,i=0,o=0,a=0,s=t.length,l=!1;i<s;i++){let d=t.charCodeAt(i);if(!l)if(k(d)){o++,d===9?a+=4-a%4:a++;continue}else l=!0;(d===10||i===s-1)&&(d!==10&&i++,this.bMarks.push(c),this.eMarks.push(i),this.tShift.push(o),this.sCount.push(a),this.bsCount.push(0),l=!1,o=0,a=0,c=i+1)}this.bMarks.push(t.length),this.eMarks.push(t.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}q.prototype.push=function(u,e,r){let n=new z(u,e,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};q.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};q.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};q.prototype.skipSpaces=function(e){for(let r=this.src.length;e<r;e++){let n=this.src.charCodeAt(e);if(!k(n))break}return e};q.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!k(this.src.charCodeAt(--e)))return e+1;return e};q.prototype.skipChars=function(e,r){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===r;e++);return e};q.prototype.skipCharsBack=function(e,r,n){if(e<=n)return e;for(;e>n;)if(r!==this.src.charCodeAt(--e))return e+1;return e};q.prototype.getLines=function(e,r,n,t){if(e>=r)return"";let c=new Array(r-e);for(let i=0,o=e;o<r;o++,i++){let a=0,s=this.bMarks[o],l=s,d;for(o+1<r||t?d=this.eMarks[o]+1:d=this.eMarks[o];l<d&&a<n;){let b=this.src.charCodeAt(l);if(k(b))b===9?a+=4-(a+this.bsCount[o])%4:a++;else if(l-s<this.tShift[o])a++;else break;l++}a>n?c[i]=new Array(a-n+1).join(" ")+this.src.slice(l,d):c[i]=this.src.slice(l,d)}return c.join("")};q.prototype.Token=z;var K0=q;var vr=65536;function Wu(u,e){let r=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];return u.src.slice(r,n)}function ue(u){let e=[],r=u.length,n=0,t=u.charCodeAt(n),c=!1,i=0,o="";for(;n<r;)t===124&&(c?(o+=u.substring(i,n-1),i=n):(e.push(o+u.substring(i,n)),o="",i=n+1)),c=t===92,n++,t=u.charCodeAt(n);return e.push(o+u.substring(i)),e}function Ju(u,e,r,n){if(e+2>r)return!1;let t=e+1;if(u.sCount[t]<u.blkIndent||u.sCount[t]-u.blkIndent>=4)return!1;let c=u.bMarks[t]+u.tShift[t];if(c>=u.eMarks[t])return!1;let i=u.src.charCodeAt(c++);if(i!==124&&i!==45&&i!==58||c>=u.eMarks[t])return!1;let o=u.src.charCodeAt(c++);if(o!==124&&o!==45&&o!==58&&!k(o)||i===45&&k(o))return!1;for(;c<u.eMarks[t];){let m=u.src.charCodeAt(c);if(m!==124&&m!==45&&m!==58&&!k(m))return!1;c++}let a=Wu(u,e+1),s=a.split("|"),l=[];for(let m=0;m<s.length;m++){let _=s[m].trim();if(!_){if(m===0||m===s.length-1)continue;return!1}if(!/^:?-+:?$/.test(_))return!1;_.charCodeAt(_.length-1)===58?l.push(_.charCodeAt(0)===58?"center":"right"):_.charCodeAt(0)===58?l.push("left"):l.push("")}if(a=Wu(u,e).trim(),a.indexOf("|")===-1||u.sCount[e]-u.blkIndent>=4)return!1;s=ue(a),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop();let d=s.length;if(d===0||d!==l.length)return!1;if(n)return!0;let b=u.parentType;u.parentType="table";let p=u.md.block.ruler.getRules("blockquote"),f=u.push("table_open","table",1),g=[e,0];f.map=g;let D=u.push("thead_open","thead",1);D.map=[e,e+1];let E=u.push("tr_open","tr",1);E.map=[e,e+1];for(let m=0;m<s.length;m++){let _=u.push("th_open","th",1);l[m]&&(_.attrs=[["style","text-align:"+l[m]]]);let C=u.push("inline","",0);C.content=s[m].trim(),C.children=[],u.push("th_close","th",-1)}u.push("tr_close","tr",-1),u.push("thead_close","thead",-1);let h,x=0;for(t=e+2;t<r&&!(u.sCount[t]<u.blkIndent);t++){let m=!1;for(let C=0,A=p.length;C<A;C++)if(p[C](u,t,r,!0)){m=!0;break}if(m||(a=Wu(u,t).trim(),!a)||u.sCount[t]-u.blkIndent>=4||(s=ue(a),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop(),x+=d-s.length,x>vr))break;if(t===e+2){let C=u.push("tbody_open","tbody",1);C.map=h=[e+2,0]}let _=u.push("tr_open","tr",1);_.map=[t,t+1];for(let C=0;C<d;C++){let A=u.push("td_open","td",1);l[C]&&(A.attrs=[["style","text-align:"+l[C]]]);let S=u.push("inline","",0);S.content=s[C]?s[C].trim():"",S.children=[],u.push("td_close","td",-1)}u.push("tr_close","tr",-1)}return h&&(u.push("tbody_close","tbody",-1),h[1]=t),u.push("table_close","table",-1),g[1]=t,u.parentType=b,u.line=t,!0}function Xu(u,e,r){if(u.sCount[e]-u.blkIndent<4)return!1;let n=e+1,t=n;for(;n<r;){if(u.isEmpty(n)){n++;continue}if(u.sCount[n]-u.blkIndent>=4){n++,t=n;continue}break}u.line=t;let c=u.push("code_block","code",0);return c.content=u.getLines(e,t,4+u.blkIndent,!1)+`
|
|
16
|
-
`,c.map=[e,u.line],!0}function Qu(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||t+3>c)return!1;let i=u.src.charCodeAt(t);if(i!==126&&i!==96)return!1;let o=t;t=u.skipChars(t,i);let a=t-o;if(a<3)return!1;let s=u.src.slice(o,t),l=u.src.slice(t,c);if(i===96&&l.indexOf(String.fromCharCode(i))>=0)return!1;if(n)return!0;let d=e,b=!1;for(;d++,!(d>=r||(t=o=u.bMarks[d]+u.tShift[d],c=u.eMarks[d],t<c&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(t)===i&&!(u.sCount[d]-u.blkIndent>=4)&&(t=u.skipChars(t,i),!(t-o<a)&&(t=u.skipSpaces(t),!(t<c)))){b=!0;break}a=u.sCount[e],u.line=d+(b?1:0);let p=u.push("fence","code",0);return p.info=l,p.content=u.getLines(e+1,d,a,!0),p.markup=s,p.map=[e,u.line],!0}function Yu(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e],i=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(t)!==62)return!1;if(n)return!0;let o=[],a=[],s=[],l=[],d=u.md.block.ruler.getRules("blockquote"),b=u.parentType;u.parentType="blockquote";let p=!1,f;for(f=e;f<r;f++){let x=u.sCount[f]<u.blkIndent;if(t=u.bMarks[f]+u.tShift[f],c=u.eMarks[f],t>=c)break;if(u.src.charCodeAt(t++)===62&&!x){let _=u.sCount[f]+1,C,A;u.src.charCodeAt(t)===32?(t++,_++,A=!1,C=!0):u.src.charCodeAt(t)===9?(C=!0,(u.bsCount[f]+_)%4===3?(t++,_++,A=!1):A=!0):C=!1;let S=_;for(o.push(u.bMarks[f]),u.bMarks[f]=t;t<c;){let P=u.src.charCodeAt(t);if(k(P))P===9?S+=4-(S+u.bsCount[f]+(A?1:0))%4:S++;else break;t++}p=t>=c,a.push(u.bsCount[f]),u.bsCount[f]=u.sCount[f]+1+(C?1:0),s.push(u.sCount[f]),u.sCount[f]=S-_,l.push(u.tShift[f]),u.tShift[f]=t-u.bMarks[f];continue}if(p)break;let m=!1;for(let _=0,C=d.length;_<C;_++)if(d[_](u,f,r,!0)){m=!0;break}if(m){u.lineMax=f,u.blkIndent!==0&&(o.push(u.bMarks[f]),a.push(u.bsCount[f]),l.push(u.tShift[f]),s.push(u.sCount[f]),u.sCount[f]-=u.blkIndent);break}o.push(u.bMarks[f]),a.push(u.bsCount[f]),l.push(u.tShift[f]),s.push(u.sCount[f]),u.sCount[f]=-1}let g=u.blkIndent;u.blkIndent=0;let D=u.push("blockquote_open","blockquote",1);D.markup=">";let E=[e,0];D.map=E,u.md.block.tokenize(u,e,f);let h=u.push("blockquote_close","blockquote",-1);h.markup=">",u.lineMax=i,u.parentType=b,E[1]=u.line;for(let x=0;x<l.length;x++)u.bMarks[x+e]=o[x],u.tShift[x+e]=l[x],u.sCount[x+e]=s[x],u.bsCount[x+e]=a[x];return u.blkIndent=g,!0}function Ku(u,e,r,n){let t=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.bMarks[e]+u.tShift[e],i=u.src.charCodeAt(c++);if(i!==42&&i!==45&&i!==95)return!1;let o=1;for(;c<t;){let s=u.src.charCodeAt(c++);if(s!==i&&!k(s))return!1;s===i&&o++}if(o<3)return!1;if(n)return!0;u.line=e+1;let a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(o+1).join(String.fromCharCode(i)),!0}function ee(u,e){let r=u.eMarks[e],n=u.bMarks[e]+u.tShift[e],t=u.src.charCodeAt(n++);if(t!==42&&t!==45&&t!==43)return-1;if(n<r){let c=u.src.charCodeAt(n);if(!k(c))return-1}return n}function re(u,e){let r=u.bMarks[e]+u.tShift[e],n=u.eMarks[e],t=r;if(t+1>=n)return-1;let c=u.src.charCodeAt(t++);if(c<48||c>57)return-1;for(;;){if(t>=n)return-1;if(c=u.src.charCodeAt(t++),c>=48&&c<=57){if(t-r>=10)return-1;continue}if(c===41||c===46)break;return-1}return t<n&&(c=u.src.charCodeAt(t),!k(c))?-1:t}function Sr(u,e){let r=u.level+2;for(let n=e+2,t=u.tokens.length-2;n<t;n++)u.tokens[n].level===r&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function u0(u,e,r,n){let t,c,i,o,a=e,s=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let l=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(l=!0);let d,b,p;if((p=re(u,a))>=0){if(d=!0,i=u.bMarks[a]+u.tShift[a],b=Number(u.src.slice(i,p-1)),l&&b!==1)return!1}else if((p=ee(u,a))>=0)d=!1;else return!1;if(l&&u.skipSpaces(p)>=u.eMarks[a])return!1;if(n)return!0;let f=u.src.charCodeAt(p-1),g=u.tokens.length;d?(o=u.push("ordered_list_open","ol",1),b!==1&&(o.attrs=[["start",b]])):o=u.push("bullet_list_open","ul",1);let D=[a,0];o.map=D,o.markup=String.fromCharCode(f);let E=!1,h=u.md.block.ruler.getRules("list"),x=u.parentType;for(u.parentType="list";a<r;){c=p,t=u.eMarks[a];let m=u.sCount[a]+p-(u.bMarks[a]+u.tShift[a]),_=m;for(;c<t;){let G=u.src.charCodeAt(c);if(G===9)_+=4-(_+u.bsCount[a])%4;else if(G===32)_++;else break;c++}let C=c,A;C>=t?A=1:A=_-m,A>4&&(A=1);let S=m+A;o=u.push("list_item_open","li",1),o.markup=String.fromCharCode(f);let P=[a,0];o.map=P,d&&(o.info=u.src.slice(i,p-1));let uu=u.tight,yu=u.tShift[a],Se=u.sCount[a],Te=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=S,u.tight=!0,u.tShift[a]=C-u.bMarks[a],u.sCount[a]=_,C>=t&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,r):u.md.block.tokenize(u,a,r,!0),(!u.tight||E)&&(s=!1),E=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=Te,u.tShift[a]=yu,u.sCount[a]=Se,u.tight=uu,o=u.push("list_item_close","li",-1),o.markup=String.fromCharCode(f),a=u.line,P[1]=a,a>=r||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let v0=!1;for(let G=0,Le=h.length;G<Le;G++)if(h[G](u,a,r,!0)){v0=!0;break}if(v0)break;if(d){if(p=re(u,a),p<0)break;i=u.bMarks[a]+u.tShift[a]}else if(p=ee(u,a),p<0)break;if(f!==u.src.charCodeAt(p-1))break}return d?o=u.push("ordered_list_close","ol",-1):o=u.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(f),D[1]=a,u.line=a,u.parentType=x,s&&Sr(u,g),!0}function e0(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e],i=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(t)!==91)return!1;function o(h){let x=u.lineMax;if(h>=x||u.isEmpty(h))return null;let m=!1;if(u.sCount[h]-u.blkIndent>3&&(m=!0),u.sCount[h]<0&&(m=!0),!m){let A=u.md.block.ruler.getRules("reference"),S=u.parentType;u.parentType="reference";let P=!1;for(let uu=0,yu=A.length;uu<yu;uu++)if(A[uu](u,h,x,!0)){P=!0;break}if(u.parentType=S,P)return null}let _=u.bMarks[h]+u.tShift[h],C=u.eMarks[h];return u.src.slice(_,C+1)}let a=u.src.slice(t,c+1);c=a.length;let s=-1;for(t=1;t<c;t++){let h=a.charCodeAt(t);if(h===91)return!1;if(h===93){s=t;break}else if(h===10){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}else if(h===92&&(t++,t<c&&a.charCodeAt(t)===10)){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}}if(s<0||a.charCodeAt(s+1)!==58)return!1;for(t=s+2;t<c;t++){let h=a.charCodeAt(t);if(h===10){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}else if(!k(h))break}let l=u.md.helpers.parseLinkDestination(a,t,c);if(!l.ok)return!1;let d=u.md.normalizeLink(l.str);if(!u.md.validateLink(d))return!1;t=l.pos;let b=t,p=i,f=t;for(;t<c;t++){let h=a.charCodeAt(t);if(h===10){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}else if(!k(h))break}let g=u.md.helpers.parseLinkTitle(a,t,c);for(;g.can_continue;){let h=o(i);if(h===null)break;a+=h,t=c,c=a.length,i++,g=u.md.helpers.parseLinkTitle(a,t,c,g)}let D;for(t<c&&f!==t&&g.ok?(D=g.str,t=g.pos):(D="",t=b,i=p);t<c;){let h=a.charCodeAt(t);if(!k(h))break;t++}if(t<c&&a.charCodeAt(t)!==10&&D)for(D="",t=b,i=p;t<c;){let h=a.charCodeAt(t);if(!k(h))break;t++}if(t<c&&a.charCodeAt(t)!==10)return!1;let E=Z(a.slice(1,s));return E?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[E]>"u"&&(u.env.references[E]={title:D,href:d}),u.line=i),!0):!1}var te=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var Tr="[a-zA-Z_:][a-zA-Z0-9:._-]*",Lr="[^\"'=<>`\\x00-\\x20]+",qr="'[^']*'",Br='"[^"]*"',Mr="(?:"+Lr+"|"+qr+"|"+Br+")",Rr="(?:\\s+"+Tr+"(?:\\s*=\\s*"+Mr+")?)",ne="<[A-Za-z][A-Za-z0-9\\-]*"+Rr+"*\\s*\\/?>",ce="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ir="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",zr="<[?][\\s\\S]*?[?]>",Pr="<![A-Za-z][^>]*>",Nr="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",oe=new RegExp("^(?:"+ne+"|"+ce+"|"+Ir+"|"+zr+"|"+Pr+"|"+Nr+")"),ie=new RegExp("^(?:"+ne+"|"+ce+")");var K=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+te.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ie.source+"\\s*$"),/^$/,!1]];function r0(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(t)!==60)return!1;let i=u.src.slice(t,c),o=0;for(;o<K.length&&!K[o][0].test(i);o++);if(o===K.length)return!1;if(n)return K[o][2];let a=e+1;if(!K[o][1].test(i)){for(;a<r&&!(u.sCount[a]<u.blkIndent);a++)if(t=u.bMarks[a]+u.tShift[a],c=u.eMarks[a],i=u.src.slice(t,c),K[o][1].test(i)){i.length!==0&&a++;break}}u.line=a;let s=u.push("html_block","",0);return s.map=[e,a],s.content=u.getLines(e,a,u.blkIndent,!0),!0}function t0(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let i=u.src.charCodeAt(t);if(i!==35||t>=c)return!1;let o=1;for(i=u.src.charCodeAt(++t);i===35&&t<c&&o<=6;)o++,i=u.src.charCodeAt(++t);if(o>6||t<c&&!k(i))return!1;if(n)return!0;c=u.skipSpacesBack(c,t);let a=u.skipCharsBack(c,35,t);a>t&&k(u.src.charCodeAt(a-1))&&(c=a),u.line=e+1;let s=u.push("heading_open","h"+String(o),1);s.markup="########".slice(0,o),s.map=[e,u.line];let l=u.push("inline","",0);l.content=u.src.slice(t,c).trim(),l.map=[e,u.line],l.children=[];let d=u.push("heading_close","h"+String(o),-1);return d.markup="########".slice(0,o),!0}function n0(u,e,r){let n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;let t=u.parentType;u.parentType="paragraph";let c=0,i,o=e+1;for(;o<r&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3)continue;if(u.sCount[o]>=u.blkIndent){let p=u.bMarks[o]+u.tShift[o],f=u.eMarks[o];if(p<f&&(i=u.src.charCodeAt(p),(i===45||i===61)&&(p=u.skipChars(p,i),p=u.skipSpaces(p),p>=f))){c=i===61?1:2;break}}if(u.sCount[o]<0)continue;let b=!1;for(let p=0,f=n.length;p<f;p++)if(n[p](u,o,r,!0)){b=!0;break}if(b)break}if(!c)return!1;let a=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o+1;let s=u.push("heading_open","h"+String(c),1);s.markup=String.fromCharCode(i),s.map=[e,u.line];let l=u.push("inline","",0);l.content=a,l.map=[e,u.line-1],l.children=[];let d=u.push("heading_close","h"+String(c),-1);return d.markup=String.fromCharCode(i),u.parentType=t,!0}function c0(u,e,r){let n=u.md.block.ruler.getRules("paragraph"),t=u.parentType,c=e+1;for(u.parentType="paragraph";c<r&&!u.isEmpty(c);c++){if(u.sCount[c]-u.blkIndent>3||u.sCount[c]<0)continue;let s=!1;for(let l=0,d=n.length;l<d;l++)if(n[l](u,c,r,!0)){s=!0;break}if(s)break}let i=u.getLines(e,c,u.blkIndent,!1).trim();u.line=c;let o=u.push("paragraph_open","p",1);o.map=[e,u.line];let a=u.push("inline","",0);return a.content=i,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=t,!0}var Du=[["table",Ju,["paragraph","reference"]],["code",Xu],["fence",Qu,["paragraph","reference","blockquote","list"]],["blockquote",Yu,["paragraph","reference","blockquote","list"]],["hr",Ku,["paragraph","reference","blockquote","list"]],["list",u0,["paragraph","reference","blockquote"]],["reference",e0],["html_block",r0,["paragraph","reference","blockquote"]],["heading",t0,["paragraph","reference","blockquote"]],["lheading",n0],["paragraph",c0]];function Cu(){this.ruler=new $;for(let u=0;u<Du.length;u++)this.ruler.push(Du[u][0],Du[u][1],{alt:(Du[u][2]||[]).slice()})}Cu.prototype.tokenize=function(u,e,r){let n=this.ruler.getRules(""),t=n.length,c=u.md.options.maxNesting,i=e,o=!1;for(;i<r&&(u.line=i=u.skipEmptyLines(i),!(i>=r||u.sCount[i]<u.blkIndent));){if(u.level>=c){u.line=r;break}let a=u.line,s=!1;for(let l=0;l<t;l++)if(s=n[l](u,i,r,!1),s){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");u.tight=!o,u.isEmpty(u.line-1)&&(o=!0),i=u.line,i<r&&u.isEmpty(i)&&(o=!0,i++,u.line=i)}};Cu.prototype.parse=function(u,e,r,n){if(!u)return;let t=new this.State(u,e,r,n);this.tokenize(t,t.line,t.lineMax)};Cu.prototype.State=K0;var ae=Cu;function nu(u,e,r,n){this.src=u,this.env=r,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}nu.prototype.pushPending=function(){let u=new z("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u};nu.prototype.push=function(u,e,r){this.pending&&this.pushPending();let n=new z(u,e,r),t=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],t={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(t),n};nu.prototype.scanDelims=function(u,e){let r=this.posMax,n=this.src.charCodeAt(u),t=u>0?this.src.charCodeAt(u-1):32,c=u;for(;c<r&&this.src.charCodeAt(c)===n;)c++;let i=c-u,o=c<r?this.src.charCodeAt(c):32,a=V(t)||j(String.fromCharCode(t)),s=V(o)||j(String.fromCharCode(o)),l=U(t),d=U(o),b=!d&&(!s||l||a),p=!l&&(!a||d||s);return{can_open:b&&(e||!p||a),can_close:p&&(e||!b||s),length:i}};nu.prototype.Token=z;var se=nu;function Or(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function o0(u,e){let r=u.pos;for(;r<u.posMax&&!Or(u.src.charCodeAt(r));)r++;return r===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,r)),u.pos=r,!0)}var Hr=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function i0(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;let r=u.pos,n=u.posMax;if(r+3>n||u.src.charCodeAt(r)!==58||u.src.charCodeAt(r+1)!==47||u.src.charCodeAt(r+2)!==47)return!1;let t=u.pending.match(Hr);if(!t)return!1;let c=t[1],i=u.md.linkify.matchAtStart(u.src.slice(r-c.length));if(!i)return!1;let o=i.url;if(o.length<=c.length)return!1;o=o.replace(/\*+$/,"");let a=u.md.normalizeLink(o);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-c.length);let s=u.push("link_open","a",1);s.attrs=[["href",a]],s.markup="linkify",s.info="auto";let l=u.push("text","",0);l.content=u.md.normalizeLinkText(o);let d=u.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return u.pos+=o.length-c.length,!0}function a0(u,e){let r=u.pos;if(u.src.charCodeAt(r)!==10)return!1;let n=u.pending.length-1,t=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let c=n-1;for(;c>=1&&u.pending.charCodeAt(c-1)===32;)c--;u.pending=u.pending.slice(0,c),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(r++;r<t&&k(u.src.charCodeAt(r));)r++;return u.pos=r,!0}var s0=[];for(let u=0;u<256;u++)s0.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){s0[u.charCodeAt(0)]=1});function l0(u,e){let r=u.pos,n=u.posMax;if(u.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let t=u.src.charCodeAt(r);if(t===10){for(e||u.push("hardbreak","br",0),r++;r<n&&(t=u.src.charCodeAt(r),!!k(t));)r++;return u.pos=r,!0}let c=u.src[r];if(t>=55296&&t<=56319&&r+1<n){let o=u.src.charCodeAt(r+1);o>=56320&&o<=57343&&(c+=u.src[r+1],r++)}let i="\\"+c;if(!e){let o=u.push("text_special","",0);t<256&&s0[t]!==0?o.content=c:o.content=i,o.markup=i,o.info="escape"}return u.pos=r+1,!0}function f0(u,e){let r=u.pos;if(u.src.charCodeAt(r)!==96)return!1;let t=r;r++;let c=u.posMax;for(;r<c&&u.src.charCodeAt(r)===96;)r++;let i=u.src.slice(t,r),o=i.length;if(u.backticksScanned&&(u.backticks[o]||0)<=t)return e||(u.pending+=i),u.pos+=o,!0;let a=r,s;for(;(s=u.src.indexOf("`",a))!==-1;){for(a=s+1;a<c&&u.src.charCodeAt(a)===96;)a++;let l=a-s;if(l===o){if(!e){let d=u.push("code_inline","code",0);d.markup=i,d.content=u.src.slice(r,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[l]=s}return u.backticksScanned=!0,e||(u.pending+=i),u.pos+=o,!0}function Ur(u,e){let r=u.pos,n=u.src.charCodeAt(r);if(e||n!==126)return!1;let t=u.scanDelims(u.pos,!0),c=t.length,i=String.fromCharCode(n);if(c<2)return!1;let o;c%2&&(o=u.push("text","",0),o.content=i,c--);for(let a=0;a<c;a+=2)o=u.push("text","",0),o.content=i+i,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:t.can_open,close:t.can_close});return u.pos+=t.length,!0}function le(u,e){let r,n=[],t=e.length;for(let c=0;c<t;c++){let i=e[c];if(i.marker!==126||i.end===-1)continue;let o=e[i.end];r=u.tokens[i.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=u.tokens[o.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",u.tokens[o.token-1].type==="text"&&u.tokens[o.token-1].content==="~"&&n.push(o.token-1)}for(;n.length;){let c=n.pop(),i=c+1;for(;i<u.tokens.length&&u.tokens[i].type==="s_close";)i++;i--,c!==i&&(r=u.tokens[i],u.tokens[i]=u.tokens[c],u.tokens[c]=r)}}function jr(u){let e=u.tokens_meta,r=u.tokens_meta.length;le(u,u.delimiters);for(let n=0;n<r;n++)e[n]&&e[n].delimiters&&le(u,e[n].delimiters)}var d0={tokenize:Ur,postProcess:jr};function Vr(u,e){let r=u.pos,n=u.src.charCodeAt(r);if(e||n!==95&&n!==42)return!1;let t=u.scanDelims(u.pos,n===42);for(let c=0;c<t.length;c++){let i=u.push("text","",0);i.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:t.length,token:u.tokens.length-1,end:-1,open:t.can_open,close:t.can_close})}return u.pos+=t.length,!0}function fe(u,e){let r=e.length;for(let n=r-1;n>=0;n--){let t=e[n];if(t.marker!==95&&t.marker!==42||t.end===-1)continue;let c=e[t.end],i=n>0&&e[n-1].end===t.end+1&&e[n-1].marker===t.marker&&e[n-1].token===t.token-1&&e[t.end+1].token===c.token+1,o=String.fromCharCode(t.marker),a=u.tokens[t.token];a.type=i?"strong_open":"em_open",a.tag=i?"strong":"em",a.nesting=1,a.markup=i?o+o:o,a.content="";let s=u.tokens[c.token];s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(u.tokens[e[n-1].token].content="",u.tokens[e[t.end+1].token].content="",n--)}}function Zr(u){let e=u.tokens_meta,r=u.tokens_meta.length;fe(u,u.delimiters);for(let n=0;n<r;n++)e[n]&&e[n].delimiters&&fe(u,e[n].delimiters)}var p0={tokenize:Vr,postProcess:Zr};function b0(u,e){let r,n,t,c,i="",o="",a=u.pos,s=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;let l=u.pos,d=u.posMax,b=u.pos+1,p=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(p<0)return!1;let f=p+1;if(f<d&&u.src.charCodeAt(f)===40){for(s=!1,f++;f<d&&(r=u.src.charCodeAt(f),!(!k(r)&&r!==10));f++);if(f>=d)return!1;if(a=f,t=u.md.helpers.parseLinkDestination(u.src,f,u.posMax),t.ok){for(i=u.md.normalizeLink(t.str),u.md.validateLink(i)?f=t.pos:i="",a=f;f<d&&(r=u.src.charCodeAt(f),!(!k(r)&&r!==10));f++);if(t=u.md.helpers.parseLinkTitle(u.src,f,u.posMax),f<d&&a!==f&&t.ok)for(o=t.str,f=t.pos;f<d&&(r=u.src.charCodeAt(f),!(!k(r)&&r!==10));f++);}(f>=d||u.src.charCodeAt(f)!==41)&&(s=!0),f++}if(s){if(typeof u.env.references>"u")return!1;if(f<d&&u.src.charCodeAt(f)===91?(a=f+1,f=u.md.helpers.parseLinkLabel(u,f),f>=0?n=u.src.slice(a,f++):f=p+1):f=p+1,n||(n=u.src.slice(b,p)),c=u.env.references[Z(n)],!c)return u.pos=l,!1;i=c.href,o=c.title}if(!e){u.pos=b,u.posMax=p;let g=u.push("link_open","a",1),D=[["href",i]];g.attrs=D,o&&D.push(["title",o]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=f,u.posMax=d,!0}function h0(u,e){let r,n,t,c,i,o,a,s,l="",d=u.pos,b=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;let p=u.pos+2,f=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(f<0)return!1;if(c=f+1,c<b&&u.src.charCodeAt(c)===40){for(c++;c<b&&(r=u.src.charCodeAt(c),!(!k(r)&&r!==10));c++);if(c>=b)return!1;for(s=c,o=u.md.helpers.parseLinkDestination(u.src,c,u.posMax),o.ok&&(l=u.md.normalizeLink(o.str),u.md.validateLink(l)?c=o.pos:l=""),s=c;c<b&&(r=u.src.charCodeAt(c),!(!k(r)&&r!==10));c++);if(o=u.md.helpers.parseLinkTitle(u.src,c,u.posMax),c<b&&s!==c&&o.ok)for(a=o.str,c=o.pos;c<b&&(r=u.src.charCodeAt(c),!(!k(r)&&r!==10));c++);else a="";if(c>=b||u.src.charCodeAt(c)!==41)return u.pos=d,!1;c++}else{if(typeof u.env.references>"u")return!1;if(c<b&&u.src.charCodeAt(c)===91?(s=c+1,c=u.md.helpers.parseLinkLabel(u,c),c>=0?t=u.src.slice(s,c++):c=f+1):c=f+1,t||(t=u.src.slice(p,f)),i=u.env.references[Z(t)],!i)return u.pos=d,!1;l=i.href,a=i.title}if(!e){n=u.src.slice(p,f);let g=[];u.md.inline.parse(n,u.md,u.env,g);let D=u.push("image","img",0),E=[["src",l],["alt",""]];D.attrs=E,D.children=g,D.content=n,a&&E.push(["title",a])}return u.pos=c,u.posMax=b,!0}var $r=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Gr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function m0(u,e){let r=u.pos;if(u.src.charCodeAt(r)!==60)return!1;let n=u.pos,t=u.posMax;for(;;){if(++r>=t)return!1;let i=u.src.charCodeAt(r);if(i===60)return!1;if(i===62)break}let c=u.src.slice(n+1,r);if(Gr.test(c)){let i=u.md.normalizeLink(c);if(!u.md.validateLink(i))return!1;if(!e){let o=u.push("link_open","a",1);o.attrs=[["href",i]],o.markup="autolink",o.info="auto";let a=u.push("text","",0);a.content=u.md.normalizeLinkText(c);let s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=c.length+2,!0}if($r.test(c)){let i=u.md.normalizeLink("mailto:"+c);if(!u.md.validateLink(i))return!1;if(!e){let o=u.push("link_open","a",1);o.attrs=[["href",i]],o.markup="autolink",o.info="auto";let a=u.push("text","",0);a.content=u.md.normalizeLinkText(c);let s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=c.length+2,!0}return!1}function Wr(u){return/^<a[>\s]/i.test(u)}function Jr(u){return/^<\/a\s*>/i.test(u)}function Xr(u){let e=u|32;return e>=97&&e<=122}function x0(u,e){if(!u.md.options.html)return!1;let r=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=r)return!1;let t=u.src.charCodeAt(n+1);if(t!==33&&t!==63&&t!==47&&!Xr(t))return!1;let c=u.src.slice(n).match(oe);if(!c)return!1;if(!e){let i=u.push("html_inline","",0);i.content=c[0],Wr(i.content)&&u.linkLevel++,Jr(i.content)&&u.linkLevel--}return u.pos+=c[0].length,!0}var Qr=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Yr=/^&([a-z][a-z0-9]{1,31});/i;function _0(u,e){let r=u.pos,n=u.posMax;if(u.src.charCodeAt(r)!==38||r+1>=n)return!1;if(u.src.charCodeAt(r+1)===35){let c=u.src.slice(r).match(Qr);if(c){if(!e){let i=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),o=u.push("text_special","",0);o.content=gu(i)?tu(i):tu(65533),o.markup=c[0],o.info="entity"}return u.pos+=c[0].length,!0}}else{let c=u.src.slice(r).match(Yr);if(c){let i=N(c[0]);if(i!==c[0]){if(!e){let o=u.push("text_special","",0);o.content=i,o.markup=c[0],o.info="entity"}return u.pos+=c[0].length,!0}}}return!1}function de(u){let e={},r=u.length;if(!r)return;let n=0,t=-2,c=[];for(let i=0;i<r;i++){let o=u[i];if(c.push(0),(u[n].marker!==o.marker||t!==o.token-1)&&(n=i),t=o.token,o.length=o.length||0,!o.close)continue;e.hasOwnProperty(o.marker)||(e[o.marker]=[-1,-1,-1,-1,-1,-1]);let a=e[o.marker][(o.open?3:0)+o.length%3],s=n-c[n]-1,l=s;for(;s>a;s-=c[s]+1){let d=u[s];if(d.marker===o.marker&&d.open&&d.end<0){let b=!1;if((d.close||o.open)&&(d.length+o.length)%3===0&&(d.length%3!==0||o.length%3!==0)&&(b=!0),!b){let p=s>0&&!u[s-1].open?c[s-1]+1:0;c[i]=i-s+p,c[s]=p,o.open=!1,d.end=i,d.close=!1,l=-1,t=-2;break}}}l!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=l)}}function g0(u){let e=u.tokens_meta,r=u.tokens_meta.length;de(u.delimiters);for(let n=0;n<r;n++)e[n]&&e[n].delimiters&&de(e[n].delimiters)}function k0(u){let e,r,n=0,t=u.tokens,c=u.tokens.length;for(e=r=0;e<c;e++)t[e].nesting<0&&n--,t[e].level=n,t[e].nesting>0&&n++,t[e].type==="text"&&e+1<c&&t[e+1].type==="text"?t[e+1].content=t[e].content+t[e+1].content:(e!==r&&(t[r]=t[e]),r++);e!==r&&(t.length=r)}var D0=[["text",o0],["linkify",i0],["newline",a0],["escape",l0],["backticks",f0],["strikethrough",d0.tokenize],["emphasis",p0.tokenize],["link",b0],["image",h0],["autolink",m0],["html_inline",x0],["entity",_0]],C0=[["balance_pairs",g0],["strikethrough",d0.postProcess],["emphasis",p0.postProcess],["fragments_join",k0]];function cu(){this.ruler=new $;for(let u=0;u<D0.length;u++)this.ruler.push(D0[u][0],D0[u][1]);this.ruler2=new $;for(let u=0;u<C0.length;u++)this.ruler2.push(C0[u][0],C0[u][1])}cu.prototype.skipToken=function(u){let e=u.pos,r=this.ruler.getRules(""),n=r.length,t=u.md.options.maxNesting,c=u.cache;if(typeof c[e]<"u"){u.pos=c[e];return}let i=!1;if(u.level<t){for(let o=0;o<n;o++)if(u.level++,i=r[o](u,!0),u.level--,i){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;i||u.pos++,c[e]=u.pos};cu.prototype.tokenize=function(u){let e=this.ruler.getRules(""),r=e.length,n=u.posMax,t=u.md.options.maxNesting;for(;u.pos<n;){let c=u.pos,i=!1;if(u.level<t){for(let o=0;o<r;o++)if(i=e[o](u,!1),i){if(c>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()};cu.prototype.parse=function(u,e,r,n){let t=new this.State(u,e,r,n);this.tokenize(t);let c=this.ruler2.getRules(""),i=c.length;for(let o=0;o<i;o++)c[o](t)};cu.prototype.State=se;var pe=cu;function be(u){let e={};u=u||{},e.src_Any=du.source,e.src_Cc=pu.source,e.src_Z=hu.source,e.src_P=J.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");let r="[><\uFF5C]";return e.src_pseudo_letter="(?:(?!"+r+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+r+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function E0(u){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){u[n]=r[n]})}),u}function Au(u){return Object.prototype.toString.call(u)}function Kr(u){return Au(u)==="[object String]"}function ut(u){return Au(u)==="[object Object]"}function et(u){return Au(u)==="[object RegExp]"}function he(u){return Au(u)==="[object Function]"}function rt(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var xe={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function tt(u){return Object.keys(u||{}).reduce(function(e,r){return e||xe.hasOwnProperty(r)},!1)}var nt={"http:":{validate:function(u,e,r){let n=u.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,r){let n=u.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,r){let n=u.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},ct="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",ot="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function it(u){u.__index__=-1,u.__text_cache__=""}function at(u){return function(e,r){let n=e.slice(r);return u.test(n)?n.match(u)[0].length:0}}function me(){return function(u,e){e.normalize(u)}}function Eu(u){let e=u.re=be(u.__opts__),r=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||r.push(ct),r.push(e.src_xn),e.src_tlds=r.join("|");function n(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let t=[];u.__compiled__={};function c(o,a){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+a)}Object.keys(u.__schemas__).forEach(function(o){let a=u.__schemas__[o];if(a===null)return;let s={validate:null,link:null};if(u.__compiled__[o]=s,ut(a)){et(a.validate)?s.validate=at(a.validate):he(a.validate)?s.validate=a.validate:c(o,a),he(a.normalize)?s.normalize=a.normalize:a.normalize?c(o,a):s.normalize=me();return}if(Kr(a)){t.push(o);return}c(o,a)}),t.forEach(function(o){u.__compiled__[u.__schemas__[o]]&&(u.__compiled__[o].validate=u.__compiled__[u.__schemas__[o]].validate,u.__compiled__[o].normalize=u.__compiled__[u.__schemas__[o]].normalize)}),u.__compiled__[""]={validate:null,normalize:me()};let i=Object.keys(u.__compiled__).filter(function(o){return o.length>0&&u.__compiled__[o]}).map(rt).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+i+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+i+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),it(u)}function st(u,e){let r=u.__index__,n=u.__last_index__,t=u.__text_cache__.slice(r,n);this.schema=u.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=t,this.text=t,this.url=t}function A0(u,e){let r=new st(u,e);return u.__compiled__[r.schema].normalize(r,u),r}function w(u,e){if(!(this instanceof w))return new w(u,e);e||tt(u)&&(e=u,u={}),this.__opts__=E0({},xe,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=E0({},nt,u),this.__compiled__={},this.__tlds__=ot,this.__tlds_replaced__=!1,this.re={},Eu(this)}w.prototype.add=function(e,r){return this.__schemas__[e]=r,Eu(this),this};w.prototype.set=function(e){return this.__opts__=E0(this.__opts__,e),this};w.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let r,n,t,c,i,o,a,s,l;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(r=a.exec(e))!==null;)if(c=this.testSchemaAt(e,r[2],a.lastIndex),c){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=e.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&(t=e.match(this.re.email_fuzzy))!==null&&(i=t.index+t[1].length,o=t.index+t[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=o))),this.__index__>=0};w.prototype.pretest=function(e){return this.re.pretest.test(e)};w.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0};w.prototype.match=function(e){let r=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(r.push(A0(this,n)),n=this.__last_index__);let t=n?e.slice(n):e;for(;this.test(t);)r.push(A0(this,n)),t=t.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};w.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let r=this.re.schema_at_start.exec(e);if(!r)return null;let n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,A0(this,0)):null};w.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,t,c){return n!==c[t-1]}).reverse(),Eu(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Eu(this),this)};w.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};w.prototype.onCompile=function(){};var _e=w;var lt=/^xn--/,ft=/[^\0-\x7F]/,dt=/[\x2E\u3002\uFF0E\uFF61]/g,pt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y0=35,B=Math.floor,F0=String.fromCharCode;function O(u){throw new RangeError(pt[u])}function bt(u,e){let r=[],n=u.length;for(;n--;)r[n]=e(u[n]);return r}function ke(u,e){let r=u.split("@"),n="";r.length>1&&(n=r[0]+"@",u=r[1]),u=u.replace(dt,".");let t=u.split("."),c=bt(t,e).join(".");return n+c}function De(u){let e=[],r=0,n=u.length;for(;r<n;){let t=u.charCodeAt(r++);if(t>=55296&&t<=56319&&r<n){let c=u.charCodeAt(r++);(c&64512)==56320?e.push(((t&1023)<<10)+(c&1023)+65536):(e.push(t),r--)}else e.push(t)}return e}var ht=u=>String.fromCodePoint(...u),mt=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:36},ge=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},Ce=function(u,e,r){let n=0;for(u=r?B(u/700):u>>1,u+=B(u/e);u>y0*26>>1;n+=36)u=B(u/y0);return B(n+(y0+1)*u/(u+38))},Ee=function(u){let e=[],r=u.length,n=0,t=128,c=72,i=u.lastIndexOf("-");i<0&&(i=0);for(let o=0;o<i;++o)u.charCodeAt(o)>=128&&O("not-basic"),e.push(u.charCodeAt(o));for(let o=i>0?i+1:0;o<r;){let a=n;for(let l=1,d=36;;d+=36){o>=r&&O("invalid-input");let b=mt(u.charCodeAt(o++));b>=36&&O("invalid-input"),b>B((2147483647-n)/l)&&O("overflow"),n+=b*l;let p=d<=c?1:d>=c+26?26:d-c;if(b<p)break;let f=36-p;l>B(2147483647/f)&&O("overflow"),l*=f}let s=e.length+1;c=Ce(n-a,s,a==0),B(n/s)>2147483647-t&&O("overflow"),t+=B(n/s),n%=s,e.splice(n++,0,t)}return String.fromCodePoint(...e)},Ae=function(u){let e=[];u=De(u);let r=u.length,n=128,t=0,c=72;for(let a of u)a<128&&e.push(F0(a));let i=e.length,o=i;for(i&&e.push("-");o<r;){let a=2147483647;for(let l of u)l>=n&&l<a&&(a=l);let s=o+1;a-n>B((2147483647-t)/s)&&O("overflow"),t+=(a-n)*s,n=a;for(let l of u)if(l<n&&++t>2147483647&&O("overflow"),l===n){let d=t;for(let b=36;;b+=36){let p=b<=c?1:b>=c+26?26:b-c;if(d<p)break;let f=d-p,g=36-p;e.push(F0(ge(p+f%g,0))),d=B(f/g)}e.push(F0(ge(d,0))),c=Ce(t,s,o===i),t=0,++o}++t,++n}return e.join("")},xt=function(u){return ke(u,function(e){return lt.test(e)?Ee(e.slice(4).toLowerCase()):e})},_t=function(u){return ke(u,function(e){return ft.test(e)?"xn--"+Ae(e):e})},gt={version:"2.3.1",ucs2:{decode:De,encode:ht},decode:Ee,encode:Ae,toASCII:_t,toUnicode:xt};var w0=gt;var ye={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var Fe={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var we={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var kt={default:ye,zero:Fe,commonmark:we},Dt=/^(vbscript|javascript|file|data):/,Ct=/^data:image\/(gif|png|jpeg|webp);/;function Et(u){let e=u.trim().toLowerCase();return Dt.test(e)?Ct.test(e):!0}var ve=["http:","https:","mailto:"];function At(u){let e=ru(u,!0);if(e.hostname&&(!e.protocol||ve.indexOf(e.protocol)>=0))try{e.hostname=w0.toASCII(e.hostname)}catch{}return su(W(e))}function yt(u){let e=ru(u,!0);if(e.hostname&&(!e.protocol||ve.indexOf(e.protocol)>=0))try{e.hostname=w0.toUnicode(e.hostname)}catch{}return eu(W(e),eu.defaultChars+"%")}function v(u,e){if(!(this instanceof v))return new v(u,e);e||_u(u)||(e=u||{},u="default"),this.inline=new pe,this.block=new ae,this.core=new Y0,this.renderer=new $0,this.linkify=new _e,this.validateLink=Et,this.normalizeLink=At,this.normalizeLinkText=yt,this.utils=Mu,this.helpers=X({},Pu),this.options={},this.configure(u),e&&this.set(e)}v.prototype.set=function(u){return X(this.options,u),this};v.prototype.configure=function(u){let e=this;if(_u(u)){let r=u;if(u=kt[r],!u)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(r){u.components[r].rules&&e[r].ruler.enableOnly(u.components[r].rules),u.components[r].rules2&&e[r].ruler2.enableOnly(u.components[r].rules2)}),this};v.prototype.enable=function(u,e){let r=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.enable(u,!0))},this),r=r.concat(this.inline.ruler2.enable(u,!0));let n=u.filter(function(t){return r.indexOf(t)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};v.prototype.disable=function(u,e){let r=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(u,!0))},this),r=r.concat(this.inline.ruler2.disable(u,!0));let n=u.filter(function(t){return r.indexOf(t)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};v.prototype.use=function(u){let e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this};v.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");let r=new this.core.State(u,this,e);return this.core.process(r),r.tokens};v.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)};v.prototype.parseInline=function(u,e){let r=new this.core.State(u,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};v.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var Ft=v;export{Ft as default};
|
|
16
|
+
`,c.map=[e,u.line],!0}function Qu(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||t+3>c)return!1;let i=u.src.charCodeAt(t);if(i!==126&&i!==96)return!1;let o=t;t=u.skipChars(t,i);let a=t-o;if(a<3)return!1;let s=u.src.slice(o,t),l=u.src.slice(t,c);if(i===96&&l.indexOf(String.fromCharCode(i))>=0)return!1;if(n)return!0;let d=e,b=!1;for(;d++,!(d>=r||(t=o=u.bMarks[d]+u.tShift[d],c=u.eMarks[d],t<c&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(t)===i&&!(u.sCount[d]-u.blkIndent>=4)&&(t=u.skipChars(t,i),!(t-o<a)&&(t=u.skipSpaces(t),!(t<c)))){b=!0;break}a=u.sCount[e],u.line=d+(b?1:0);let p=u.push("fence","code",0);return p.info=l,p.content=u.getLines(e+1,d,a,!0),p.markup=s,p.map=[e,u.line],!0}function Yu(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e],i=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(t)!==62)return!1;if(n)return!0;let o=[],a=[],s=[],l=[],d=u.md.block.ruler.getRules("blockquote"),b=u.parentType;u.parentType="blockquote";let p=!1,f;for(f=e;f<r;f++){let x=u.sCount[f]<u.blkIndent;if(t=u.bMarks[f]+u.tShift[f],c=u.eMarks[f],t>=c)break;if(u.src.charCodeAt(t++)===62&&!x){let _=u.sCount[f]+1,C,A;u.src.charCodeAt(t)===32?(t++,_++,A=!1,C=!0):u.src.charCodeAt(t)===9?(C=!0,(u.bsCount[f]+_)%4===3?(t++,_++,A=!1):A=!0):C=!1;let S=_;for(o.push(u.bMarks[f]),u.bMarks[f]=t;t<c;){let P=u.src.charCodeAt(t);if(k(P))P===9?S+=4-(S+u.bsCount[f]+(A?1:0))%4:S++;else break;t++}p=t>=c,a.push(u.bsCount[f]),u.bsCount[f]=u.sCount[f]+1+(C?1:0),s.push(u.sCount[f]),u.sCount[f]=S-_,l.push(u.tShift[f]),u.tShift[f]=t-u.bMarks[f];continue}if(p)break;let m=!1;for(let _=0,C=d.length;_<C;_++)if(d[_](u,f,r,!0)){m=!0;break}if(m){u.lineMax=f,u.blkIndent!==0&&(o.push(u.bMarks[f]),a.push(u.bsCount[f]),l.push(u.tShift[f]),s.push(u.sCount[f]),u.sCount[f]-=u.blkIndent);break}o.push(u.bMarks[f]),a.push(u.bsCount[f]),l.push(u.tShift[f]),s.push(u.sCount[f]),u.sCount[f]=-1}let g=u.blkIndent;u.blkIndent=0;let D=u.push("blockquote_open","blockquote",1);D.markup=">";let E=[e,0];D.map=E,u.md.block.tokenize(u,e,f);let h=u.push("blockquote_close","blockquote",-1);h.markup=">",u.lineMax=i,u.parentType=b,E[1]=u.line;for(let x=0;x<l.length;x++)u.bMarks[x+e]=o[x],u.tShift[x+e]=l[x],u.sCount[x+e]=s[x],u.bsCount[x+e]=a[x];return u.blkIndent=g,!0}function Ku(u,e,r,n){let t=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.bMarks[e]+u.tShift[e],i=u.src.charCodeAt(c++);if(i!==42&&i!==45&&i!==95)return!1;let o=1;for(;c<t;){let s=u.src.charCodeAt(c++);if(s!==i&&!k(s))return!1;s===i&&o++}if(o<3)return!1;if(n)return!0;u.line=e+1;let a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(o+1).join(String.fromCharCode(i)),!0}function ee(u,e){let r=u.eMarks[e],n=u.bMarks[e]+u.tShift[e],t=u.src.charCodeAt(n++);if(t!==42&&t!==45&&t!==43)return-1;if(n<r){let c=u.src.charCodeAt(n);if(!k(c))return-1}return n}function re(u,e){let r=u.bMarks[e]+u.tShift[e],n=u.eMarks[e],t=r;if(t+1>=n)return-1;let c=u.src.charCodeAt(t++);if(c<48||c>57)return-1;for(;;){if(t>=n)return-1;if(c=u.src.charCodeAt(t++),c>=48&&c<=57){if(t-r>=10)return-1;continue}if(c===41||c===46)break;return-1}return t<n&&(c=u.src.charCodeAt(t),!k(c))?-1:t}function Sr(u,e){let r=u.level+2;for(let n=e+2,t=u.tokens.length-2;n<t;n++)u.tokens[n].level===r&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function u0(u,e,r,n){let t,c,i,o,a=e,s=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let l=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(l=!0);let d,b,p;if((p=re(u,a))>=0){if(d=!0,i=u.bMarks[a]+u.tShift[a],b=Number(u.src.slice(i,p-1)),l&&b!==1)return!1}else if((p=ee(u,a))>=0)d=!1;else return!1;if(l&&u.skipSpaces(p)>=u.eMarks[a])return!1;if(n)return!0;let f=u.src.charCodeAt(p-1),g=u.tokens.length;d?(o=u.push("ordered_list_open","ol",1),b!==1&&(o.attrs=[["start",b]])):o=u.push("bullet_list_open","ul",1);let D=[a,0];o.map=D,o.markup=String.fromCharCode(f);let E=!1,h=u.md.block.ruler.getRules("list"),x=u.parentType;for(u.parentType="list";a<r;){c=p,t=u.eMarks[a];let m=u.sCount[a]+p-(u.bMarks[a]+u.tShift[a]),_=m;for(;c<t;){let G=u.src.charCodeAt(c);if(G===9)_+=4-(_+u.bsCount[a])%4;else if(G===32)_++;else break;c++}let C=c,A;C>=t?A=1:A=_-m,A>4&&(A=1);let S=m+A;o=u.push("list_item_open","li",1),o.markup=String.fromCharCode(f);let P=[a,0];o.map=P,d&&(o.info=u.src.slice(i,p-1));let uu=u.tight,yu=u.tShift[a],Se=u.sCount[a],Te=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=S,u.tight=!0,u.tShift[a]=C-u.bMarks[a],u.sCount[a]=_,C>=t&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,r):u.md.block.tokenize(u,a,r,!0),(!u.tight||E)&&(s=!1),E=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=Te,u.tShift[a]=yu,u.sCount[a]=Se,u.tight=uu,o=u.push("list_item_close","li",-1),o.markup=String.fromCharCode(f),a=u.line,P[1]=a,a>=r||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let v0=!1;for(let G=0,Le=h.length;G<Le;G++)if(h[G](u,a,r,!0)){v0=!0;break}if(v0)break;if(d){if(p=re(u,a),p<0)break;i=u.bMarks[a]+u.tShift[a]}else if(p=ee(u,a),p<0)break;if(f!==u.src.charCodeAt(p-1))break}return d?o=u.push("ordered_list_close","ol",-1):o=u.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(f),D[1]=a,u.line=a,u.parentType=x,s&&Sr(u,g),!0}function e0(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e],i=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(t)!==91)return!1;function o(h){let x=u.lineMax;if(h>=x||u.isEmpty(h))return null;let m=!1;if(u.sCount[h]-u.blkIndent>3&&(m=!0),u.sCount[h]<0&&(m=!0),!m){let A=u.md.block.ruler.getRules("reference"),S=u.parentType;u.parentType="reference";let P=!1;for(let uu=0,yu=A.length;uu<yu;uu++)if(A[uu](u,h,x,!0)){P=!0;break}if(u.parentType=S,P)return null}let _=u.bMarks[h]+u.tShift[h],C=u.eMarks[h];return u.src.slice(_,C+1)}let a=u.src.slice(t,c+1);c=a.length;let s=-1;for(t=1;t<c;t++){let h=a.charCodeAt(t);if(h===91)return!1;if(h===93){s=t;break}else if(h===10){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}else if(h===92&&(t++,t<c&&a.charCodeAt(t)===10)){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}}if(s<0||a.charCodeAt(s+1)!==58)return!1;for(t=s+2;t<c;t++){let h=a.charCodeAt(t);if(h===10){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}else if(!k(h))break}let l=u.md.helpers.parseLinkDestination(a,t,c);if(!l.ok)return!1;let d=u.md.normalizeLink(l.str);if(!u.md.validateLink(d))return!1;t=l.pos;let b=t,p=i,f=t;for(;t<c;t++){let h=a.charCodeAt(t);if(h===10){let x=o(i);x!==null&&(a+=x,c=a.length,i++)}else if(!k(h))break}let g=u.md.helpers.parseLinkTitle(a,t,c);for(;g.can_continue;){let h=o(i);if(h===null)break;a+=h,t=c,c=a.length,i++,g=u.md.helpers.parseLinkTitle(a,t,c,g)}let D;for(t<c&&f!==t&&g.ok?(D=g.str,t=g.pos):(D="",t=b,i=p);t<c;){let h=a.charCodeAt(t);if(!k(h))break;t++}if(t<c&&a.charCodeAt(t)!==10&&D)for(D="",t=b,i=p;t<c;){let h=a.charCodeAt(t);if(!k(h))break;t++}if(t<c&&a.charCodeAt(t)!==10)return!1;let E=Z(a.slice(1,s));return E?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[E]>"u"&&(u.env.references[E]={title:D,href:d}),u.line=i),!0):!1}var te=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var Tr="[a-zA-Z_:][a-zA-Z0-9:._-]*",Lr="[^\"'=<>`\\x00-\\x20]+",qr="'[^']*'",Br='"[^"]*"',Mr="(?:"+Lr+"|"+qr+"|"+Br+")",Rr="(?:\\s+"+Tr+"(?:\\s*=\\s*"+Mr+")?)",ne="<[A-Za-z][A-Za-z0-9\\-]*"+Rr+"*\\s*\\/?>",ce="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ir="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",zr="<[?][\\s\\S]*?[?]>",Pr="<![A-Za-z][^>]*>",Nr="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",oe=new RegExp("^(?:"+ne+"|"+ce+"|"+Ir+"|"+zr+"|"+Pr+"|"+Nr+")"),ie=new RegExp("^(?:"+ne+"|"+ce+")");var K=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+te.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ie.source+"\\s*$"),/^$/,!1]];function r0(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(t)!==60)return!1;let i=u.src.slice(t,c),o=0;for(;o<K.length&&!K[o][0].test(i);o++);if(o===K.length)return!1;if(n)return K[o][2];let a=e+1;if(!K[o][1].test(i)){for(;a<r&&!(u.sCount[a]<u.blkIndent);a++)if(t=u.bMarks[a]+u.tShift[a],c=u.eMarks[a],i=u.src.slice(t,c),K[o][1].test(i)){i.length!==0&&a++;break}}u.line=a;let s=u.push("html_block","",0);return s.map=[e,a],s.content=u.getLines(e,a,u.blkIndent,!0),!0}function t0(u,e,r,n){let t=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let i=u.src.charCodeAt(t);if(i!==35||t>=c)return!1;let o=1;for(i=u.src.charCodeAt(++t);i===35&&t<c&&o<=6;)o++,i=u.src.charCodeAt(++t);if(o>6||t<c&&!k(i))return!1;if(n)return!0;c=u.skipSpacesBack(c,t);let a=u.skipCharsBack(c,35,t);a>t&&k(u.src.charCodeAt(a-1))&&(c=a),u.line=e+1;let s=u.push("heading_open","h"+String(o),1);s.markup="########".slice(0,o),s.map=[e,u.line];let l=u.push("inline","",0);l.content=u.src.slice(t,c).trim(),l.map=[e,u.line],l.children=[];let d=u.push("heading_close","h"+String(o),-1);return d.markup="########".slice(0,o),!0}function n0(u,e,r){let n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;let t=u.parentType;u.parentType="paragraph";let c=0,i,o=e+1;for(;o<r&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3)continue;if(u.sCount[o]>=u.blkIndent){let p=u.bMarks[o]+u.tShift[o],f=u.eMarks[o];if(p<f&&(i=u.src.charCodeAt(p),(i===45||i===61)&&(p=u.skipChars(p,i),p=u.skipSpaces(p),p>=f))){c=i===61?1:2;break}}if(u.sCount[o]<0)continue;let b=!1;for(let p=0,f=n.length;p<f;p++)if(n[p](u,o,r,!0)){b=!0;break}if(b)break}if(!c)return!1;let a=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o+1;let s=u.push("heading_open","h"+String(c),1);s.markup=String.fromCharCode(i),s.map=[e,u.line];let l=u.push("inline","",0);l.content=a,l.map=[e,u.line-1],l.children=[];let d=u.push("heading_close","h"+String(c),-1);return d.markup=String.fromCharCode(i),u.parentType=t,!0}function c0(u,e,r){let n=u.md.block.ruler.getRules("paragraph"),t=u.parentType,c=e+1;for(u.parentType="paragraph";c<r&&!u.isEmpty(c);c++){if(u.sCount[c]-u.blkIndent>3||u.sCount[c]<0)continue;let s=!1;for(let l=0,d=n.length;l<d;l++)if(n[l](u,c,r,!0)){s=!0;break}if(s)break}let i=u.getLines(e,c,u.blkIndent,!1).trim();u.line=c;let o=u.push("paragraph_open","p",1);o.map=[e,u.line];let a=u.push("inline","",0);return a.content=i,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=t,!0}var Du=[["table",Ju,["paragraph","reference"]],["code",Xu],["fence",Qu,["paragraph","reference","blockquote","list"]],["blockquote",Yu,["paragraph","reference","blockquote","list"]],["hr",Ku,["paragraph","reference","blockquote","list"]],["list",u0,["paragraph","reference","blockquote"]],["reference",e0],["html_block",r0,["paragraph","reference","blockquote"]],["heading",t0,["paragraph","reference","blockquote"]],["lheading",n0],["paragraph",c0]];function Cu(){this.ruler=new $;for(let u=0;u<Du.length;u++)this.ruler.push(Du[u][0],Du[u][1],{alt:(Du[u][2]||[]).slice()})}Cu.prototype.tokenize=function(u,e,r){let n=this.ruler.getRules(""),t=n.length,c=u.md.options.maxNesting,i=e,o=!1;for(;i<r&&(u.line=i=u.skipEmptyLines(i),!(i>=r||u.sCount[i]<u.blkIndent));){if(u.level>=c){u.line=r;break}let a=u.line,s=!1;for(let l=0;l<t;l++)if(s=n[l](u,i,r,!1),s){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");u.tight=!o,u.isEmpty(u.line-1)&&(o=!0),i=u.line,i<r&&u.isEmpty(i)&&(o=!0,i++,u.line=i)}};Cu.prototype.parse=function(u,e,r,n){if(!u)return;let t=new this.State(u,e,r,n);this.tokenize(t,t.line,t.lineMax)};Cu.prototype.State=K0;var ae=Cu;function nu(u,e,r,n){this.src=u,this.env=r,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}nu.prototype.pushPending=function(){let u=new z("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u};nu.prototype.push=function(u,e,r){this.pending&&this.pushPending();let n=new z(u,e,r),t=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],t={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(t),n};nu.prototype.scanDelims=function(u,e){let r=this.posMax,n=this.src.charCodeAt(u),t=u>0?this.src.charCodeAt(u-1):32,c=u;for(;c<r&&this.src.charCodeAt(c)===n;)c++;let i=c-u,o=c<r?this.src.charCodeAt(c):32,a=V(t)||j(String.fromCharCode(t)),s=V(o)||j(String.fromCharCode(o)),l=U(t),d=U(o),b=!d&&(!s||l||a),p=!l&&(!a||d||s);return{can_open:b&&(e||!p||a),can_close:p&&(e||!b||s),length:i}};nu.prototype.Token=z;var se=nu;function Or(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function o0(u,e){let r=u.pos;for(;r<u.posMax&&!Or(u.src.charCodeAt(r));)r++;return r===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,r)),u.pos=r,!0)}var Hr=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function i0(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;let r=u.pos,n=u.posMax;if(r+3>n||u.src.charCodeAt(r)!==58||u.src.charCodeAt(r+1)!==47||u.src.charCodeAt(r+2)!==47)return!1;let t=u.pending.match(Hr);if(!t)return!1;let c=t[1],i=u.md.linkify.matchAtStart(u.src.slice(r-c.length));if(!i)return!1;let o=i.url;if(o.length<=c.length)return!1;let a=o.length;for(;a>0&&o.charCodeAt(a-1)===42;)a--;a!==o.length&&(o=o.slice(0,a));let s=u.md.normalizeLink(o);if(!u.md.validateLink(s))return!1;if(!e){u.pending=u.pending.slice(0,-c.length);let l=u.push("link_open","a",1);l.attrs=[["href",s]],l.markup="linkify",l.info="auto";let d=u.push("text","",0);d.content=u.md.normalizeLinkText(o);let b=u.push("link_close","a",-1);b.markup="linkify",b.info="auto"}return u.pos+=o.length-c.length,!0}function a0(u,e){let r=u.pos;if(u.src.charCodeAt(r)!==10)return!1;let n=u.pending.length-1,t=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let c=n-1;for(;c>=1&&u.pending.charCodeAt(c-1)===32;)c--;u.pending=u.pending.slice(0,c),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(r++;r<t&&k(u.src.charCodeAt(r));)r++;return u.pos=r,!0}var s0=[];for(let u=0;u<256;u++)s0.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){s0[u.charCodeAt(0)]=1});function l0(u,e){let r=u.pos,n=u.posMax;if(u.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let t=u.src.charCodeAt(r);if(t===10){for(e||u.push("hardbreak","br",0),r++;r<n&&(t=u.src.charCodeAt(r),!!k(t));)r++;return u.pos=r,!0}let c=u.src[r];if(t>=55296&&t<=56319&&r+1<n){let o=u.src.charCodeAt(r+1);o>=56320&&o<=57343&&(c+=u.src[r+1],r++)}let i="\\"+c;if(!e){let o=u.push("text_special","",0);t<256&&s0[t]!==0?o.content=c:o.content=i,o.markup=i,o.info="escape"}return u.pos=r+1,!0}function f0(u,e){let r=u.pos;if(u.src.charCodeAt(r)!==96)return!1;let t=r;r++;let c=u.posMax;for(;r<c&&u.src.charCodeAt(r)===96;)r++;let i=u.src.slice(t,r),o=i.length;if(u.backticksScanned&&(u.backticks[o]||0)<=t)return e||(u.pending+=i),u.pos+=o,!0;let a=r,s;for(;(s=u.src.indexOf("`",a))!==-1;){for(a=s+1;a<c&&u.src.charCodeAt(a)===96;)a++;let l=a-s;if(l===o){if(!e){let d=u.push("code_inline","code",0);d.markup=i,d.content=u.src.slice(r,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[l]=s}return u.backticksScanned=!0,e||(u.pending+=i),u.pos+=o,!0}function Ur(u,e){let r=u.pos,n=u.src.charCodeAt(r);if(e||n!==126)return!1;let t=u.scanDelims(u.pos,!0),c=t.length,i=String.fromCharCode(n);if(c<2)return!1;let o;c%2&&(o=u.push("text","",0),o.content=i,c--);for(let a=0;a<c;a+=2)o=u.push("text","",0),o.content=i+i,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:t.can_open,close:t.can_close});return u.pos+=t.length,!0}function le(u,e){let r,n=[],t=e.length;for(let c=0;c<t;c++){let i=e[c];if(i.marker!==126||i.end===-1)continue;let o=e[i.end];r=u.tokens[i.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=u.tokens[o.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",u.tokens[o.token-1].type==="text"&&u.tokens[o.token-1].content==="~"&&n.push(o.token-1)}for(;n.length;){let c=n.pop(),i=c+1;for(;i<u.tokens.length&&u.tokens[i].type==="s_close";)i++;i--,c!==i&&(r=u.tokens[i],u.tokens[i]=u.tokens[c],u.tokens[c]=r)}}function jr(u){let e=u.tokens_meta,r=u.tokens_meta.length;le(u,u.delimiters);for(let n=0;n<r;n++)e[n]&&e[n].delimiters&&le(u,e[n].delimiters)}var d0={tokenize:Ur,postProcess:jr};function Vr(u,e){let r=u.pos,n=u.src.charCodeAt(r);if(e||n!==95&&n!==42)return!1;let t=u.scanDelims(u.pos,n===42);for(let c=0;c<t.length;c++){let i=u.push("text","",0);i.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:t.length,token:u.tokens.length-1,end:-1,open:t.can_open,close:t.can_close})}return u.pos+=t.length,!0}function fe(u,e){let r=e.length;for(let n=r-1;n>=0;n--){let t=e[n];if(t.marker!==95&&t.marker!==42||t.end===-1)continue;let c=e[t.end],i=n>0&&e[n-1].end===t.end+1&&e[n-1].marker===t.marker&&e[n-1].token===t.token-1&&e[t.end+1].token===c.token+1,o=String.fromCharCode(t.marker),a=u.tokens[t.token];a.type=i?"strong_open":"em_open",a.tag=i?"strong":"em",a.nesting=1,a.markup=i?o+o:o,a.content="";let s=u.tokens[c.token];s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(u.tokens[e[n-1].token].content="",u.tokens[e[t.end+1].token].content="",n--)}}function Zr(u){let e=u.tokens_meta,r=u.tokens_meta.length;fe(u,u.delimiters);for(let n=0;n<r;n++)e[n]&&e[n].delimiters&&fe(u,e[n].delimiters)}var p0={tokenize:Vr,postProcess:Zr};function b0(u,e){let r,n,t,c,i="",o="",a=u.pos,s=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;let l=u.pos,d=u.posMax,b=u.pos+1,p=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(p<0)return!1;let f=p+1;if(f<d&&u.src.charCodeAt(f)===40){for(s=!1,f++;f<d&&(r=u.src.charCodeAt(f),!(!k(r)&&r!==10));f++);if(f>=d)return!1;if(a=f,t=u.md.helpers.parseLinkDestination(u.src,f,u.posMax),t.ok){for(i=u.md.normalizeLink(t.str),u.md.validateLink(i)?f=t.pos:i="",a=f;f<d&&(r=u.src.charCodeAt(f),!(!k(r)&&r!==10));f++);if(t=u.md.helpers.parseLinkTitle(u.src,f,u.posMax),f<d&&a!==f&&t.ok)for(o=t.str,f=t.pos;f<d&&(r=u.src.charCodeAt(f),!(!k(r)&&r!==10));f++);}(f>=d||u.src.charCodeAt(f)!==41)&&(s=!0),f++}if(s){if(typeof u.env.references>"u")return!1;if(f<d&&u.src.charCodeAt(f)===91?(a=f+1,f=u.md.helpers.parseLinkLabel(u,f),f>=0?n=u.src.slice(a,f++):f=p+1):f=p+1,n||(n=u.src.slice(b,p)),c=u.env.references[Z(n)],!c)return u.pos=l,!1;i=c.href,o=c.title}if(!e){u.pos=b,u.posMax=p;let g=u.push("link_open","a",1),D=[["href",i]];g.attrs=D,o&&D.push(["title",o]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=f,u.posMax=d,!0}function h0(u,e){let r,n,t,c,i,o,a,s,l="",d=u.pos,b=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;let p=u.pos+2,f=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(f<0)return!1;if(c=f+1,c<b&&u.src.charCodeAt(c)===40){for(c++;c<b&&(r=u.src.charCodeAt(c),!(!k(r)&&r!==10));c++);if(c>=b)return!1;for(s=c,o=u.md.helpers.parseLinkDestination(u.src,c,u.posMax),o.ok&&(l=u.md.normalizeLink(o.str),u.md.validateLink(l)?c=o.pos:l=""),s=c;c<b&&(r=u.src.charCodeAt(c),!(!k(r)&&r!==10));c++);if(o=u.md.helpers.parseLinkTitle(u.src,c,u.posMax),c<b&&s!==c&&o.ok)for(a=o.str,c=o.pos;c<b&&(r=u.src.charCodeAt(c),!(!k(r)&&r!==10));c++);else a="";if(c>=b||u.src.charCodeAt(c)!==41)return u.pos=d,!1;c++}else{if(typeof u.env.references>"u")return!1;if(c<b&&u.src.charCodeAt(c)===91?(s=c+1,c=u.md.helpers.parseLinkLabel(u,c),c>=0?t=u.src.slice(s,c++):c=f+1):c=f+1,t||(t=u.src.slice(p,f)),i=u.env.references[Z(t)],!i)return u.pos=d,!1;l=i.href,a=i.title}if(!e){n=u.src.slice(p,f);let g=[];u.md.inline.parse(n,u.md,u.env,g);let D=u.push("image","img",0),E=[["src",l],["alt",""]];D.attrs=E,D.children=g,D.content=n,a&&E.push(["title",a])}return u.pos=c,u.posMax=b,!0}var $r=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Gr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function m0(u,e){let r=u.pos;if(u.src.charCodeAt(r)!==60)return!1;let n=u.pos,t=u.posMax;for(;;){if(++r>=t)return!1;let i=u.src.charCodeAt(r);if(i===60)return!1;if(i===62)break}let c=u.src.slice(n+1,r);if(Gr.test(c)){let i=u.md.normalizeLink(c);if(!u.md.validateLink(i))return!1;if(!e){let o=u.push("link_open","a",1);o.attrs=[["href",i]],o.markup="autolink",o.info="auto";let a=u.push("text","",0);a.content=u.md.normalizeLinkText(c);let s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=c.length+2,!0}if($r.test(c)){let i=u.md.normalizeLink("mailto:"+c);if(!u.md.validateLink(i))return!1;if(!e){let o=u.push("link_open","a",1);o.attrs=[["href",i]],o.markup="autolink",o.info="auto";let a=u.push("text","",0);a.content=u.md.normalizeLinkText(c);let s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=c.length+2,!0}return!1}function Wr(u){return/^<a[>\s]/i.test(u)}function Jr(u){return/^<\/a\s*>/i.test(u)}function Xr(u){let e=u|32;return e>=97&&e<=122}function x0(u,e){if(!u.md.options.html)return!1;let r=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=r)return!1;let t=u.src.charCodeAt(n+1);if(t!==33&&t!==63&&t!==47&&!Xr(t))return!1;let c=u.src.slice(n).match(oe);if(!c)return!1;if(!e){let i=u.push("html_inline","",0);i.content=c[0],Wr(i.content)&&u.linkLevel++,Jr(i.content)&&u.linkLevel--}return u.pos+=c[0].length,!0}var Qr=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Yr=/^&([a-z][a-z0-9]{1,31});/i;function _0(u,e){let r=u.pos,n=u.posMax;if(u.src.charCodeAt(r)!==38||r+1>=n)return!1;if(u.src.charCodeAt(r+1)===35){let c=u.src.slice(r).match(Qr);if(c){if(!e){let i=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),o=u.push("text_special","",0);o.content=gu(i)?tu(i):tu(65533),o.markup=c[0],o.info="entity"}return u.pos+=c[0].length,!0}}else{let c=u.src.slice(r).match(Yr);if(c){let i=N(c[0]);if(i!==c[0]){if(!e){let o=u.push("text_special","",0);o.content=i,o.markup=c[0],o.info="entity"}return u.pos+=c[0].length,!0}}}return!1}function de(u){let e={},r=u.length;if(!r)return;let n=0,t=-2,c=[];for(let i=0;i<r;i++){let o=u[i];if(c.push(0),(u[n].marker!==o.marker||t!==o.token-1)&&(n=i),t=o.token,o.length=o.length||0,!o.close)continue;e.hasOwnProperty(o.marker)||(e[o.marker]=[-1,-1,-1,-1,-1,-1]);let a=e[o.marker][(o.open?3:0)+o.length%3],s=n-c[n]-1,l=s;for(;s>a;s-=c[s]+1){let d=u[s];if(d.marker===o.marker&&d.open&&d.end<0){let b=!1;if((d.close||o.open)&&(d.length+o.length)%3===0&&(d.length%3!==0||o.length%3!==0)&&(b=!0),!b){let p=s>0&&!u[s-1].open?c[s-1]+1:0;c[i]=i-s+p,c[s]=p,o.open=!1,d.end=i,d.close=!1,l=-1,t=-2;break}}}l!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=l)}}function g0(u){let e=u.tokens_meta,r=u.tokens_meta.length;de(u.delimiters);for(let n=0;n<r;n++)e[n]&&e[n].delimiters&&de(e[n].delimiters)}function k0(u){let e,r,n=0,t=u.tokens,c=u.tokens.length;for(e=r=0;e<c;e++)t[e].nesting<0&&n--,t[e].level=n,t[e].nesting>0&&n++,t[e].type==="text"&&e+1<c&&t[e+1].type==="text"?t[e+1].content=t[e].content+t[e+1].content:(e!==r&&(t[r]=t[e]),r++);e!==r&&(t.length=r)}var D0=[["text",o0],["linkify",i0],["newline",a0],["escape",l0],["backticks",f0],["strikethrough",d0.tokenize],["emphasis",p0.tokenize],["link",b0],["image",h0],["autolink",m0],["html_inline",x0],["entity",_0]],C0=[["balance_pairs",g0],["strikethrough",d0.postProcess],["emphasis",p0.postProcess],["fragments_join",k0]];function cu(){this.ruler=new $;for(let u=0;u<D0.length;u++)this.ruler.push(D0[u][0],D0[u][1]);this.ruler2=new $;for(let u=0;u<C0.length;u++)this.ruler2.push(C0[u][0],C0[u][1])}cu.prototype.skipToken=function(u){let e=u.pos,r=this.ruler.getRules(""),n=r.length,t=u.md.options.maxNesting,c=u.cache;if(typeof c[e]<"u"){u.pos=c[e];return}let i=!1;if(u.level<t){for(let o=0;o<n;o++)if(u.level++,i=r[o](u,!0),u.level--,i){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;i||u.pos++,c[e]=u.pos};cu.prototype.tokenize=function(u){let e=this.ruler.getRules(""),r=e.length,n=u.posMax,t=u.md.options.maxNesting;for(;u.pos<n;){let c=u.pos,i=!1;if(u.level<t){for(let o=0;o<r;o++)if(i=e[o](u,!1),i){if(c>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()};cu.prototype.parse=function(u,e,r,n){let t=new this.State(u,e,r,n);this.tokenize(t);let c=this.ruler2.getRules(""),i=c.length;for(let o=0;o<i;o++)c[o](t)};cu.prototype.State=se;var pe=cu;function be(u){let e={};u=u||{},e.src_Any=du.source,e.src_Cc=pu.source,e.src_Z=hu.source,e.src_P=J.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");let r="[><\uFF5C]";return e.src_pseudo_letter="(?:(?!"+r+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+r+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function E0(u){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){u[n]=r[n]})}),u}function Au(u){return Object.prototype.toString.call(u)}function Kr(u){return Au(u)==="[object String]"}function ut(u){return Au(u)==="[object Object]"}function et(u){return Au(u)==="[object RegExp]"}function he(u){return Au(u)==="[object Function]"}function rt(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var xe={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function tt(u){return Object.keys(u||{}).reduce(function(e,r){return e||xe.hasOwnProperty(r)},!1)}var nt={"http:":{validate:function(u,e,r){let n=u.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,r){let n=u.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,r){let n=u.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},ct="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",ot="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function it(u){u.__index__=-1,u.__text_cache__=""}function at(u){return function(e,r){let n=e.slice(r);return u.test(n)?n.match(u)[0].length:0}}function me(){return function(u,e){e.normalize(u)}}function Eu(u){let e=u.re=be(u.__opts__),r=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||r.push(ct),r.push(e.src_xn),e.src_tlds=r.join("|");function n(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let t=[];u.__compiled__={};function c(o,a){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+a)}Object.keys(u.__schemas__).forEach(function(o){let a=u.__schemas__[o];if(a===null)return;let s={validate:null,link:null};if(u.__compiled__[o]=s,ut(a)){et(a.validate)?s.validate=at(a.validate):he(a.validate)?s.validate=a.validate:c(o,a),he(a.normalize)?s.normalize=a.normalize:a.normalize?c(o,a):s.normalize=me();return}if(Kr(a)){t.push(o);return}c(o,a)}),t.forEach(function(o){u.__compiled__[u.__schemas__[o]]&&(u.__compiled__[o].validate=u.__compiled__[u.__schemas__[o]].validate,u.__compiled__[o].normalize=u.__compiled__[u.__schemas__[o]].normalize)}),u.__compiled__[""]={validate:null,normalize:me()};let i=Object.keys(u.__compiled__).filter(function(o){return o.length>0&&u.__compiled__[o]}).map(rt).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+i+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+i+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),it(u)}function st(u,e){let r=u.__index__,n=u.__last_index__,t=u.__text_cache__.slice(r,n);this.schema=u.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=t,this.text=t,this.url=t}function A0(u,e){let r=new st(u,e);return u.__compiled__[r.schema].normalize(r,u),r}function w(u,e){if(!(this instanceof w))return new w(u,e);e||tt(u)&&(e=u,u={}),this.__opts__=E0({},xe,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=E0({},nt,u),this.__compiled__={},this.__tlds__=ot,this.__tlds_replaced__=!1,this.re={},Eu(this)}w.prototype.add=function(e,r){return this.__schemas__[e]=r,Eu(this),this};w.prototype.set=function(e){return this.__opts__=E0(this.__opts__,e),this};w.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let r,n,t,c,i,o,a,s,l;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(r=a.exec(e))!==null;)if(c=this.testSchemaAt(e,r[2],a.lastIndex),c){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=e.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&(t=e.match(this.re.email_fuzzy))!==null&&(i=t.index+t[1].length,o=t.index+t[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=o))),this.__index__>=0};w.prototype.pretest=function(e){return this.re.pretest.test(e)};w.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0};w.prototype.match=function(e){let r=[],n=0;this.__index__>=0&&this.__text_cache__===e&&(r.push(A0(this,n)),n=this.__last_index__);let t=n?e.slice(n):e;for(;this.test(t);)r.push(A0(this,n)),t=t.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};w.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;let r=this.re.schema_at_start.exec(e);if(!r)return null;let n=this.testSchemaAt(e,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,A0(this,0)):null};w.prototype.tlds=function(e,r){return e=Array.isArray(e)?e:[e],r?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,t,c){return n!==c[t-1]}).reverse(),Eu(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Eu(this),this)};w.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};w.prototype.onCompile=function(){};var _e=w;var lt=/^xn--/,ft=/[^\0-\x7F]/,dt=/[\x2E\u3002\uFF0E\uFF61]/g,pt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y0=35,B=Math.floor,F0=String.fromCharCode;function O(u){throw new RangeError(pt[u])}function bt(u,e){let r=[],n=u.length;for(;n--;)r[n]=e(u[n]);return r}function ke(u,e){let r=u.split("@"),n="";r.length>1&&(n=r[0]+"@",u=r[1]),u=u.replace(dt,".");let t=u.split("."),c=bt(t,e).join(".");return n+c}function De(u){let e=[],r=0,n=u.length;for(;r<n;){let t=u.charCodeAt(r++);if(t>=55296&&t<=56319&&r<n){let c=u.charCodeAt(r++);(c&64512)==56320?e.push(((t&1023)<<10)+(c&1023)+65536):(e.push(t),r--)}else e.push(t)}return e}var ht=u=>String.fromCodePoint(...u),mt=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:36},ge=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},Ce=function(u,e,r){let n=0;for(u=r?B(u/700):u>>1,u+=B(u/e);u>y0*26>>1;n+=36)u=B(u/y0);return B(n+(y0+1)*u/(u+38))},Ee=function(u){let e=[],r=u.length,n=0,t=128,c=72,i=u.lastIndexOf("-");i<0&&(i=0);for(let o=0;o<i;++o)u.charCodeAt(o)>=128&&O("not-basic"),e.push(u.charCodeAt(o));for(let o=i>0?i+1:0;o<r;){let a=n;for(let l=1,d=36;;d+=36){o>=r&&O("invalid-input");let b=mt(u.charCodeAt(o++));b>=36&&O("invalid-input"),b>B((2147483647-n)/l)&&O("overflow"),n+=b*l;let p=d<=c?1:d>=c+26?26:d-c;if(b<p)break;let f=36-p;l>B(2147483647/f)&&O("overflow"),l*=f}let s=e.length+1;c=Ce(n-a,s,a==0),B(n/s)>2147483647-t&&O("overflow"),t+=B(n/s),n%=s,e.splice(n++,0,t)}return String.fromCodePoint(...e)},Ae=function(u){let e=[];u=De(u);let r=u.length,n=128,t=0,c=72;for(let a of u)a<128&&e.push(F0(a));let i=e.length,o=i;for(i&&e.push("-");o<r;){let a=2147483647;for(let l of u)l>=n&&l<a&&(a=l);let s=o+1;a-n>B((2147483647-t)/s)&&O("overflow"),t+=(a-n)*s,n=a;for(let l of u)if(l<n&&++t>2147483647&&O("overflow"),l===n){let d=t;for(let b=36;;b+=36){let p=b<=c?1:b>=c+26?26:b-c;if(d<p)break;let f=d-p,g=36-p;e.push(F0(ge(p+f%g,0))),d=B(f/g)}e.push(F0(ge(d,0))),c=Ce(t,s,o===i),t=0,++o}++t,++n}return e.join("")},xt=function(u){return ke(u,function(e){return lt.test(e)?Ee(e.slice(4).toLowerCase()):e})},_t=function(u){return ke(u,function(e){return ft.test(e)?"xn--"+Ae(e):e})},gt={version:"2.3.1",ucs2:{decode:De,encode:ht},decode:Ee,encode:Ae,toASCII:_t,toUnicode:xt};var w0=gt;var ye={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var Fe={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var we={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var kt={default:ye,zero:Fe,commonmark:we},Dt=/^(vbscript|javascript|file|data):/,Ct=/^data:image\/(gif|png|jpeg|webp);/;function Et(u){let e=u.trim().toLowerCase();return Dt.test(e)?Ct.test(e):!0}var ve=["http:","https:","mailto:"];function At(u){let e=ru(u,!0);if(e.hostname&&(!e.protocol||ve.indexOf(e.protocol)>=0))try{e.hostname=w0.toASCII(e.hostname)}catch{}return su(W(e))}function yt(u){let e=ru(u,!0);if(e.hostname&&(!e.protocol||ve.indexOf(e.protocol)>=0))try{e.hostname=w0.toUnicode(e.hostname)}catch{}return eu(W(e),eu.defaultChars+"%")}function v(u,e){if(!(this instanceof v))return new v(u,e);e||_u(u)||(e=u||{},u="default"),this.inline=new pe,this.block=new ae,this.core=new Y0,this.renderer=new $0,this.linkify=new _e,this.validateLink=Et,this.normalizeLink=At,this.normalizeLinkText=yt,this.utils=Mu,this.helpers=X({},Pu),this.options={},this.configure(u),e&&this.set(e)}v.prototype.set=function(u){return X(this.options,u),this};v.prototype.configure=function(u){let e=this;if(_u(u)){let r=u;if(u=kt[r],!u)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(r){u.components[r].rules&&e[r].ruler.enableOnly(u.components[r].rules),u.components[r].rules2&&e[r].ruler2.enableOnly(u.components[r].rules2)}),this};v.prototype.enable=function(u,e){let r=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.enable(u,!0))},this),r=r.concat(this.inline.ruler2.enable(u,!0));let n=u.filter(function(t){return r.indexOf(t)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};v.prototype.disable=function(u,e){let r=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(u,!0))},this),r=r.concat(this.inline.ruler2.disable(u,!0));let n=u.filter(function(t){return r.indexOf(t)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};v.prototype.use=function(u){let e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this};v.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");let r=new this.core.State(u,this,e);return this.core.process(r),r.tokens};v.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)};v.prototype.parseInline=function(u,e){let r=new this.core.State(u,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};v.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var Ft=v;export{Ft as default};
|