@nostale/cli 0.1.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.
Files changed (174) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -0
  3. package/assets/docker-compose.server.yml +70 -0
  4. package/dist/commands/config/generation.js +23 -0
  5. package/dist/commands/config/providers.js +138 -0
  6. package/dist/commands/config/sources.js +145 -0
  7. package/dist/commands/config/templates.js +117 -0
  8. package/dist/commands/config/tokens.js +83 -0
  9. package/dist/commands/config.js +43 -0
  10. package/dist/commands/doctor.js +98 -0
  11. package/dist/commands/setup.js +5 -0
  12. package/dist/commands/start.js +23 -0
  13. package/dist/commands/status.js +17 -0
  14. package/dist/commands/stop.js +16 -0
  15. package/dist/index.js +23 -0
  16. package/dist/lib/api-config.js +21 -0
  17. package/dist/lib/env-writer.js +41 -0
  18. package/dist/lib/http.js +117 -0
  19. package/dist/lib/install-root.js +75 -0
  20. package/dist/lib/paths.js +12 -0
  21. package/dist/lib/ports.js +19 -0
  22. package/dist/lib/process-manager.js +151 -0
  23. package/dist/lib/repo-root.js +34 -0
  24. package/dist/lib/wizard.js +267 -0
  25. package/dist/tui/prompts.js +54 -0
  26. package/package.json +69 -0
  27. package/services/mcp-server/index.cjs +48326 -0
  28. package/services/migrations/001_init_rag_v1.sql +128 -0
  29. package/services/migrations/002_doc_lifecycle.sql +96 -0
  30. package/services/migrations/004_mcp_tokens.sql +11 -0
  31. package/services/migrations/005_settings.sql +28 -0
  32. package/services/migrations/006_document_sources.sql +14 -0
  33. package/services/migrations/007_generation_settings.sql +9 -0
  34. package/services/migrations/008_llm_provider_configs_unique.sql +5 -0
  35. package/services/wasm/tree-sitter-c.wasm +0 -0
  36. package/services/wasm/tree-sitter-c_sharp.wasm +0 -0
  37. package/services/wasm/tree-sitter-cpp.wasm +0 -0
  38. package/services/wasm/tree-sitter-dart.wasm +0 -0
  39. package/services/wasm/tree-sitter-go.wasm +0 -0
  40. package/services/wasm/tree-sitter-java.wasm +0 -0
  41. package/services/wasm/tree-sitter-javascript.wasm +0 -0
  42. package/services/wasm/tree-sitter-kotlin.wasm +0 -0
  43. package/services/wasm/tree-sitter-php.wasm +0 -0
  44. package/services/wasm/tree-sitter-python.wasm +0 -0
  45. package/services/wasm/tree-sitter-rust.wasm +0 -0
  46. package/services/wasm/tree-sitter-tsx.wasm +0 -0
  47. package/services/wasm/tree-sitter-typescript.wasm +0 -0
  48. package/services/wasm/tree-sitter.wasm +0 -0
  49. package/services/wiki-api/index.cjs +82370 -0
  50. package/services/wiki-web/.output/nitro.json +15 -0
  51. package/services/wiki-web/.output/public/_nuxt/68caad34b1e80fa12b3a.4Cpu5VkB.woff +0 -0
  52. package/services/wiki-web/.output/public/_nuxt/6b042d50787d4a81d659.D7JGeKLp.svg +1835 -0
  53. package/services/wiki-web/.output/public/_nuxt/9065bfe481020b04b68a.CMveUrS1.woff2 +0 -0
  54. package/services/wiki-web/.output/public/_nuxt/B5j-AdCY.js +1 -0
  55. package/services/wiki-web/.output/public/_nuxt/BAgZ2ZFT.js +1 -0
  56. package/services/wiki-web/.output/public/_nuxt/BcxnhBGC.js +1 -0
  57. package/services/wiki-web/.output/public/_nuxt/BeIDAJKt.js +1 -0
  58. package/services/wiki-web/.output/public/_nuxt/BebqDWPm.js +1 -0
  59. package/services/wiki-web/.output/public/_nuxt/CFx_Wb7e.js +1 -0
  60. package/services/wiki-web/.output/public/_nuxt/CSEkmdhK.js +1 -0
  61. package/services/wiki-web/.output/public/_nuxt/CXYMfke_.js +1 -0
  62. package/services/wiki-web/.output/public/_nuxt/Cap3hpB7.js +1 -0
  63. package/services/wiki-web/.output/public/_nuxt/Ckd7UvSj.js +3 -0
  64. package/services/wiki-web/.output/public/_nuxt/D0DJQL09.js +1 -0
  65. package/services/wiki-web/.output/public/_nuxt/DRDlUXmk.js +66 -0
  66. package/services/wiki-web/.output/public/_nuxt/DW42QLqA.js +1 -0
  67. package/services/wiki-web/.output/public/_nuxt/DdDtdYim.js +1 -0
  68. package/services/wiki-web/.output/public/_nuxt/Dm1y7TW1.js +1 -0
  69. package/services/wiki-web/.output/public/_nuxt/DptiLPkM.js +4 -0
  70. package/services/wiki-web/.output/public/_nuxt/QFl-TMXl.js +1 -0
  71. package/services/wiki-web/.output/public/_nuxt/_id_.JvKV2jiN.css +1 -0
  72. package/services/wiki-web/.output/public/_nuxt/a9c9056a643325579e2a.CCNAgZDa.ttf +0 -0
  73. package/services/wiki-web/.output/public/_nuxt/bojElwT6.js +1 -0
  74. package/services/wiki-web/.output/public/_nuxt/builds/latest.json +1 -0
  75. package/services/wiki-web/.output/public/_nuxt/builds/meta/f68e5546-2919-478b-b4ad-702826e8383c.json +1 -0
  76. package/services/wiki-web/.output/public/_nuxt/d495aba62101f856c80f.DJ4Lg1TH.eot +0 -0
  77. package/services/wiki-web/.output/public/_nuxt/entry.isoIPAS3.css +1 -0
  78. package/services/wiki-web/.output/public/_nuxt/f8QtLg7g.js +1 -0
  79. package/services/wiki-web/.output/public/_nuxt/nhMvlSQm.js +1 -0
  80. package/services/wiki-web/.output/public/_nuxt/pFBugkEL.js +1 -0
  81. package/services/wiki-web/.output/public/_nuxt/plus-jakarta-sans-latin-ext-wght-normal.DmpS2jIq.woff2 +0 -0
  82. package/services/wiki-web/.output/public/_nuxt/plus-jakarta-sans-latin-wght-normal.eXO_dkmS.woff2 +0 -0
  83. package/services/wiki-web/.output/public/_nuxt/plus-jakarta-sans-vietnamese-wght-normal.qRpaaN48.woff2 +0 -0
  84. package/services/wiki-web/.output/public/favicon.svg +6 -0
  85. package/services/wiki-web/.output/public/robots.txt +2 -0
  86. package/services/wiki-web/.output/server/chunks/_/error-500.mjs +19 -0
  87. package/services/wiki-web/.output/server/chunks/_/error-500.mjs.map +1 -0
  88. package/services/wiki-web/.output/server/chunks/build/client.precomputed.mjs +4 -0
  89. package/services/wiki-web/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  90. package/services/wiki-web/.output/server/chunks/nitro/nitro.mjs +5352 -0
  91. package/services/wiki-web/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  92. package/services/wiki-web/.output/server/chunks/routes/api-proxy/_...path_.mjs +34 -0
  93. package/services/wiki-web/.output/server/chunks/routes/api-proxy/_...path_.mjs.map +1 -0
  94. package/services/wiki-web/.output/server/chunks/routes/renderer.mjs +369 -0
  95. package/services/wiki-web/.output/server/chunks/routes/renderer.mjs.map +1 -0
  96. package/services/wiki-web/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  97. package/services/wiki-web/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  98. package/services/wiki-web/.output/server/index.mjs +10 -0
  99. package/services/wiki-web/.output/server/index.mjs.map +1 -0
  100. package/services/wiki-web/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
  101. package/services/wiki-web/.output/server/node_modules/@babel/parser/package.json +50 -0
  102. package/services/wiki-web/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
  103. package/services/wiki-web/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  104. package/services/wiki-web/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  105. package/services/wiki-web/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  106. package/services/wiki-web/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  107. package/services/wiki-web/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  108. package/services/wiki-web/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
  109. package/services/wiki-web/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  110. package/services/wiki-web/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
  111. package/services/wiki-web/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  112. package/services/wiki-web/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
  113. package/services/wiki-web/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  114. package/services/wiki-web/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
  115. package/services/wiki-web/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  116. package/services/wiki-web/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  117. package/services/wiki-web/.output/server/node_modules/@vue/shared/package.json +47 -0
  118. package/services/wiki-web/.output/server/node_modules/devalue/index.js +4 -0
  119. package/services/wiki-web/.output/server/node_modules/devalue/package.json +40 -0
  120. package/services/wiki-web/.output/server/node_modules/devalue/src/base64.js +60 -0
  121. package/services/wiki-web/.output/server/node_modules/devalue/src/constants.js +12 -0
  122. package/services/wiki-web/.output/server/node_modules/devalue/src/parse.js +283 -0
  123. package/services/wiki-web/.output/server/node_modules/devalue/src/stringify.js +401 -0
  124. package/services/wiki-web/.output/server/node_modules/devalue/src/uneval.js +552 -0
  125. package/services/wiki-web/.output/server/node_modules/devalue/src/utils.js +160 -0
  126. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  127. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  128. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  129. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  130. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  131. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  132. package/services/wiki-web/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  133. package/services/wiki-web/.output/server/node_modules/entities/package.json +120 -0
  134. package/services/wiki-web/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  135. package/services/wiki-web/.output/server/node_modules/estree-walker/package.json +37 -0
  136. package/services/wiki-web/.output/server/node_modules/hookable/dist/index.mjs +257 -0
  137. package/services/wiki-web/.output/server/node_modules/hookable/package.json +53 -0
  138. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  139. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  140. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  141. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  142. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  143. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  144. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  145. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  146. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  147. package/services/wiki-web/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  148. package/services/wiki-web/.output/server/node_modules/source-map-js/package.json +71 -0
  149. package/services/wiki-web/.output/server/node_modules/source-map-js/source-map.js +8 -0
  150. package/services/wiki-web/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  151. package/services/wiki-web/.output/server/node_modules/ufo/package.json +48 -0
  152. package/services/wiki-web/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  153. package/services/wiki-web/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  154. package/services/wiki-web/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  155. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
  156. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  157. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
  158. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  159. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
  160. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  161. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
  162. package/services/wiki-web/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  163. package/services/wiki-web/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  164. package/services/wiki-web/.output/server/node_modules/unhead/package.json +105 -0
  165. package/services/wiki-web/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  166. package/services/wiki-web/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  167. package/services/wiki-web/.output/server/node_modules/vue/index.js +7 -0
  168. package/services/wiki-web/.output/server/node_modules/vue/index.mjs +1 -0
  169. package/services/wiki-web/.output/server/node_modules/vue/package.json +112 -0
  170. package/services/wiki-web/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  171. package/services/wiki-web/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
  172. package/services/wiki-web/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
  173. package/services/wiki-web/.output/server/package.json +26 -0
  174. package/services/wiki-worker/index.cjs +66661 -0
@@ -0,0 +1 @@
1
+ import{_ as B,a as h}from"./BcxnhBGC.js";import{d as U,D as q,o as g,c as x,a as s,e as t,w as n,u as o,h as m,i as v,b,t as w,_ as A,f as D,g as d,B as E}from"./DptiLPkM.js";import{_ as I}from"./pFBugkEL.js";import{_ as M}from"./D0DJQL09.js";const T={class:"mx-auto flex min-h-[80vh] max-w-sm flex-col justify-center"},j={key:0,class:"flex flex-col gap-1.5"},H={class:"flex flex-col gap-1.5"},L={class:"flex flex-col gap-1.5"},P={key:1,class:"text-sm text-destructive"},K=U({__name:"login",setup(R){const V=q(),a=d("signin"),p=d(""),l=d(""),i=d(""),u=d("");function k(){a.value=a.value==="signin"?"signup":"signin",u.value=""}async function C(){u.value="";const c=a.value==="signin"?await V.signIn.email({email:l.value,password:i.value}):await V.signUp.email({email:l.value,password:i.value,name:p.value});if(c.error){u.value=c.error.message??"Authentication failed";return}await E("/wiki")}return(c,e)=>{const _=B,f=h,y=A,S=I,N=M;return g(),x("div",T,[e[6]||(e[6]=s("div",{class:"mb-8 text-center"},[s("h1",{class:"text-2xl font-bold tracking-tight text-foreground"},"NoStale"),s("p",{class:"mt-1 text-sm text-muted-foreground"},"Sign in to browse the wiki")],-1)),t(N,{class:"shadow-soft"},{default:n(()=>[t(S,{class:"pt-5"},{default:n(()=>[s("form",{class:"flex flex-col gap-4",onSubmit:D(C,["prevent"])},[o(a)==="signup"?(g(),x("div",j,[t(_,{for:"name"},{default:n(()=>[...e[3]||(e[3]=[m("Name",-1)])]),_:1}),t(f,{id:"name",modelValue:o(p),"onUpdate:modelValue":e[0]||(e[0]=r=>v(p)?p.value=r:null),type:"text",autocomplete:"name"},null,8,["modelValue"])])):b("",!0),s("div",H,[t(_,{for:"email"},{default:n(()=>[...e[4]||(e[4]=[m("Email",-1)])]),_:1}),t(f,{id:"email",modelValue:o(l),"onUpdate:modelValue":e[1]||(e[1]=r=>v(l)?l.value=r:null),type:"email",required:"",autocomplete:"email"},null,8,["modelValue"])]),s("div",L,[t(_,{for:"password"},{default:n(()=>[...e[5]||(e[5]=[m("Password",-1)])]),_:1}),t(f,{id:"password",modelValue:o(i),"onUpdate:modelValue":e[2]||(e[2]=r=>v(i)?i.value=r:null),type:"password",required:"",autocomplete:"current-password"},null,8,["modelValue"])]),o(u)?(g(),x("p",P,w(o(u)),1)):b("",!0),t(y,{type:"submit",class:"mt-1 w-full"},{default:n(()=>[m(w(o(a)==="signin"?"Sign in":"Sign up"),1)]),_:1}),t(y,{type:"button",variant:"link",class:"self-center",onClick:k},{default:n(()=>[m(w(o(a)==="signin"?"Need an account? Sign up":"Have an account? Sign in"),1)]),_:1})],32)]),_:1})]),_:1})])}}});export{K as default};
@@ -0,0 +1 @@
1
+ import{d as a,a6 as n,o,c as s,B as _}from"./DptiLPkM.js";const m=a({__name:"index",async setup(c){let e,t;return[e,t]=n(()=>_("/wiki")),await e,t(),(r,i)=>(o(),s("div"))}});export{m as default};
@@ -0,0 +1 @@
1
+ import{d as l,o as a,c as n,p as r,u as c,z as u,A as p,E as m,k as f,G as _,H as b}from"./DptiLPkM.js";const g=["for"],x=l({__name:"Label",props:{class:{},for:{}},setup(s){const o=s;return(e,d)=>(a(),n("label",{for:o.for,class:r(c(u)("text-sm font-medium leading-none text-foreground",o.class))},[p(e.$slots,"default")],10,g))}}),k=Object.assign(x,{__name:"Label"}),h=["type","required","autocomplete","placeholder"],v=l({__name:"Input",props:b({class:{},type:{},required:{type:Boolean},autocomplete:{},placeholder:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const o=m(s,"modelValue"),e=s;return(d,t)=>f((a(),n("input",{"onUpdate:modelValue":t[0]||(t[0]=i=>o.value=i),type:e.type??"text",required:e.required,autocomplete:e.autocomplete,placeholder:e.placeholder,class:r(c(u)("flex h-11 w-full rounded-md border border-input bg-card px-3 py-2 text-base ring-offset-background transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",e.class))},null,10,h)),[[_,o.value]])}}),q=Object.assign(v,{__name:"Input"});export{k as _,q as a};
@@ -0,0 +1 @@
1
+ import{d as s,o,c as d,p as i,u as r,z as c,A as p,C as u}from"./DptiLPkM.js";const l=s({__name:"Badge",props:{variant:{},class:{}},setup(e){const t=u("inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",draft:"border-transparent bg-muted text-muted-foreground",needs_review:"border-transparent bg-warning/20 text-warning",approved:"border-transparent bg-success/15 text-success",stale:"border-transparent bg-destructive/15 text-destructive",regenerating:"border-transparent bg-primary/15 text-primary"}},defaultVariants:{variant:"default"}}),a=e;return(n,g)=>(o(),d("span",{class:i(r(c)(r(t)({variant:e.variant}),a.class))},[p(n.$slots,"default")],2))}}),m=Object.assign(l,{__name:"Badge"});export{m as _};
@@ -0,0 +1 @@
1
+ import{_ as F}from"./D0DJQL09.js";import{d as q,x as A,o as e,c as r,a as n,k as C,v as L,u as s,i as M,F as u,r as p,j as y,w as _,b,g as T,t as m,h as j,y as g,q as $}from"./DptiLPkM.js";import{a as w}from"./nhMvlSQm.js";import{u as E}from"./Dm1y7TW1.js";const V={class:"mb-4 flex items-center gap-2 text-sm"},R=["value"],S={key:0,class:"text-sm text-muted-foreground"},z={key:1,class:"text-sm text-muted-foreground"},K={key:2,class:"text-sm text-destructive"},G=["viewBox"],Q=["x1","y1","x2","y2"],U=["cx","cy","fill"],W=["x","y"],H={key:1,class:"text-sm text-muted-foreground"},J={class:"flex flex-col gap-2"},O={class:"text-foreground"},X={key:1,class:"text-muted-foreground"},Y={key:3,class:"text-muted-foreground"},Z={class:"text-muted-foreground"},tt={key:0,class:"py-4 text-center text-sm text-muted-foreground"},f=480,at=q({__name:"index",setup(et){const h=E(),{data:k}=w({queryKey:["projects"],queryFn:()=>h.get("/projects")}),a=T("");A(()=>{const l=k.value?.[0];!a.value&&l&&(a.value=l.project)});const{data:c,isPending:N,isError:I}=w({queryKey:g(()=>["graph",a.value]),queryFn:()=>h.get(`/projects/${a.value}/graph`),enabled:g(()=>!!a.value)}),D={symbol:"oklch(0.52 0.16 55)",file:"oklch(0.6 0.16 162)",route:"oklch(0.75 0.16 80)",table:"oklch(0.58 0.22 27)"};function P(l){return D[l]??"oklch(0.55 0.02 256)"}const d=g(()=>{const l=c.value?.nodes??[],o=f/2,x=f/2-40,i={};return l.forEach((t,B)=>{const v=2*Math.PI*B/Math.max(l.length,1);i[t.id]={x:o+x*Math.cos(v),y:o+x*Math.sin(v)}}),i});return(l,o)=>{const x=F,i=$;return e(),r("div",null,[o[7]||(o[7]=n("h1",{class:"mb-4 text-xl font-bold tracking-tight text-foreground"},"Graph explorer",-1)),n("label",V,[o[1]||(o[1]=n("span",{class:"text-muted-foreground"},"Project",-1)),C(n("select",{"onUpdate:modelValue":o[0]||(o[0]=t=>M(a)?a.value=t:null),class:"h-9 rounded-md border border-input bg-card px-2 text-sm"},[(e(!0),r(u,null,p(s(k),t=>(e(),r("option",{key:t.project,value:t.project},m(t.project),9,R))),128))],512),[[L,s(a)]])]),s(a)?s(N)?(e(),r("p",z,"Loading…")):s(I)?(e(),r("p",K,"Failed to load graph.")):s(c)?(e(),r(u,{key:3},[s(c).nodes.length?(e(),y(x,{key:0,class:"max-w-[480px] p-2 shadow-sm"},{default:_(()=>[(e(),r("svg",{viewBox:`0 0 ${f} ${f}`,class:"text-foreground"},[(e(!0),r(u,null,p(s(c).edges,t=>(e(),r("line",{key:t.id,x1:s(d)[t.fromNodeId]?.x,y1:s(d)[t.fromNodeId]?.y,x2:s(d)[t.toNodeId]?.x,y2:s(d)[t.toNodeId]?.y,class:"stroke-border"},null,8,Q))),128)),(e(!0),r(u,null,p(s(c).nodes,t=>(e(),r("g",{key:t.id},[n("circle",{cx:s(d)[t.id]?.x,cy:s(d)[t.id]?.y,r:"6",fill:P(t.nodeType)},null,8,U),n("text",{x:s(d)[t.id]?.x,y:(s(d)[t.id]?.y??0)+18,"text-anchor":"middle","font-size":"10",fill:"currentColor"},m(t.nodeName),9,W)]))),128))],8,G))]),_:1})):(e(),r("p",H,"No graph data for this project yet.")),o[6]||(o[6]=n("h2",{class:"mb-3 mt-6 text-base font-semibold text-foreground"},"Traceability: feature to TDD to PRD to code",-1)),n("div",J,[(e(!0),r(u,null,p(s(c).traceabilityLinks,t=>(e(),r("div",{key:t.feature,class:"rounded-xl border bg-card px-4 py-3 text-sm shadow-sm"},[n("strong",O,m(t.feature),1),o[4]||(o[4]=n("span",{class:"text-muted-foreground"}," - TDD: ",-1)),t.tddArtifactId?(e(),y(i,{key:0,to:`/documents/${t.tddArtifactId}/diff`,class:"text-primary hover:underline"},{default:_(()=>[...o[2]||(o[2]=[j("view",-1)])]),_:1},8,["to"])):(e(),r("span",X,"none")),o[5]||(o[5]=n("span",{class:"text-muted-foreground"}," - PRD: ",-1)),t.prdArtifactId?(e(),y(i,{key:2,to:`/documents/${t.prdArtifactId}/diff`,class:"text-primary hover:underline"},{default:_(()=>[...o[3]||(o[3]=[j("view",-1)])]),_:1},8,["to"])):(e(),r("span",Y,"none")),n("span",Z," - code: "+m(t.codeSourcePaths.length)+" file(s)",1)]))),128)),s(c).traceabilityLinks.length===0?(e(),r("p",tt,"No traceability links yet.")):b("",!0)])],64)):b("",!0):(e(),r("p",S,"Pick a project to explore its graph."))])}}});export{at as default};
@@ -0,0 +1 @@
1
+ import{_ as K}from"./BeIDAJKt.js";import{_ as N,a as A}from"./BcxnhBGC.js";import{d as B,o as d,c as r,a as t,u as n,F as b,r as k,e as l,w as a,t as u,h as i,k as V,v as D,n as z,_ as F,b as L,f as M,g as Q,l as $}from"./DptiLPkM.js";import{_ as G}from"./pFBugkEL.js";import{_ as R}from"./D0DJQL09.js";import{u as T,a as E}from"./nhMvlSQm.js";import{u as I}from"./Dm1y7TW1.js";const O={key:0,class:"mb-6 overflow-x-auto rounded-xl border bg-card shadow-sm"},P={class:"w-full min-w-[480px] text-sm"},W={class:"px-4 py-3"},H={class:"px-4 py-3"},J={class:"px-4 py-3 font-medium"},X={class:"px-4 py-3"},Y={class:"px-4 py-3"},Z={key:1,class:"mb-6 text-sm text-muted-foreground"},ee={class:"flex flex-col gap-1.5"},te={class:"flex flex-col gap-1.5"},oe={class:"flex flex-col gap-1.5"},se={class:"rounded-xl border p-4"},le={class:"flex items-center gap-1.5 whitespace-nowrap text-sm text-muted-foreground"},ne=["onUpdate:modelValue"],ae={class:"flex items-center gap-3"},de={key:0,class:"text-sm text-success"},_e=B({__name:"index",setup(re){const g=I(),w=T(),x=Q(!1),{data:y}=E({queryKey:["document-templates"],queryFn:()=>g.get("/settings/templates")}),s=$({project:"",docKind:"tdd",name:"",sections:[{key:"",title:"",guidance:"",required:!0}]});function h(){s.sections.push({key:"",title:"",guidance:"",required:!0})}async function C(){x.value=!1;const m=s.sections.map(e=>({...e,key:e.key||j(e.title)}));await g.post("/settings/templates",{project:s.project||null,docKind:s.docKind,name:s.name,sections:m}),x.value=!0,await w.invalidateQueries({queryKey:["document-templates"]})}function j(m){return m.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}return(m,e)=>{const q=K,f=N,c=A,_=F,S=G,U=R;return d(),r("div",null,[e[13]||(e[13]=t("h1",{class:"text-xl font-bold tracking-tight text-foreground"},"Settings: Document Templates",-1)),e[14]||(e[14]=t("p",{class:"mb-4 mt-1 text-sm text-muted-foreground"}," Override the default `.agent/prompts/` section structure per project, or globally (leave project blank). Resolution order: project override → global override → default. ",-1)),n(y)?.length?(d(),r("div",O,[t("table",P,[e[3]||(e[3]=t("thead",null,[t("tr",{class:"border-b text-left text-xs uppercase tracking-wide text-muted-foreground"},[t("th",{class:"px-4 py-3"},"Scope"),t("th",{class:"px-4 py-3"},"Kind"),t("th",{class:"px-4 py-3"},"Name"),t("th",{class:"px-4 py-3"},"Sections"),t("th",{class:"px-4 py-3"},"Active")])],-1)),t("tbody",null,[(d(!0),r(b,null,k(n(y),o=>(d(),r("tr",{key:o.id,class:"border-b last:border-0"},[t("td",W,u(o.project??"global"),1),t("td",H,u(o.docKind.toUpperCase()),1),t("td",J,u(o.name),1),t("td",X,u(o.sections.length),1),t("td",Y,[l(q,{variant:o.isActive?"approved":"draft"},{default:a(()=>[i(u(o.isActive?"yes":"no"),1)]),_:2},1032,["variant"])])]))),128))])])])):(d(),r("p",Z,"No custom templates yet. Generation uses the default `.agent/prompts/` structure.")),e[15]||(e[15]=t("h2",{class:"mb-3 text-base font-semibold text-foreground"},"New template",-1)),l(U,{class:"max-w-2xl shadow-sm"},{default:a(()=>[l(S,{class:"pt-5"},{default:a(()=>[t("form",{class:"flex flex-col gap-4",onSubmit:M(C,["prevent"])},[t("div",ee,[l(f,{for:"tmpl-project"},{default:a(()=>[...e[4]||(e[4]=[i("Project (blank = global override)",-1)])]),_:1}),l(c,{id:"tmpl-project",modelValue:n(s).project,"onUpdate:modelValue":e[0]||(e[0]=o=>n(s).project=o),type:"text",placeholder:"demo-repo"},null,8,["modelValue"])]),t("div",te,[l(f,{for:"tmpl-kind"},{default:a(()=>[...e[5]||(e[5]=[i("Doc kind",-1)])]),_:1}),V(t("select",{id:"tmpl-kind","onUpdate:modelValue":e[1]||(e[1]=o=>n(s).docKind=o),class:"h-11 rounded-md border border-input bg-card px-3 text-base"},[...e[6]||(e[6]=[t("option",{value:"tdd"},"tdd",-1),t("option",{value:"prd"},"prd",-1)])],512),[[D,n(s).docKind]])]),t("div",oe,[l(f,{for:"tmpl-name"},{default:a(()=>[...e[7]||(e[7]=[i("Name",-1)])]),_:1}),l(c,{id:"tmpl-name",modelValue:n(s).name,"onUpdate:modelValue":e[2]||(e[2]=o=>n(s).name=o),type:"text",required:"",placeholder:"my-custom-structure"},null,8,["modelValue"])]),t("fieldset",se,[e[11]||(e[11]=t("legend",{class:"px-1 text-sm font-medium text-foreground"},"Sections",-1)),(d(!0),r(b,null,k(n(s).sections,(o,v)=>(d(),r("div",{key:v,class:"mb-2 flex items-center gap-2"},[l(c,{modelValue:o.title,"onUpdate:modelValue":p=>o.title=p,type:"text",placeholder:"Section title",required:"",class:"flex-1"},null,8,["modelValue","onUpdate:modelValue"]),l(c,{modelValue:o.guidance,"onUpdate:modelValue":p=>o.guidance=p,type:"text",placeholder:"Guidance for the writer",class:"flex-1"},null,8,["modelValue","onUpdate:modelValue"]),t("label",le,[V(t("input",{"onUpdate:modelValue":p=>o.required=p,type:"checkbox",class:"accent-primary"},null,8,ne),[[z,o.required]]),e[8]||(e[8]=i(" required ",-1))]),l(_,{type:"button",variant:"ghost",size:"sm",onClick:p=>n(s).sections.splice(v,1)},{default:a(()=>[...e[9]||(e[9]=[i("Remove",-1)])]),_:1},8,["onClick"])]))),128)),l(_,{type:"button",variant:"outline",size:"sm",onClick:h},{default:a(()=>[...e[10]||(e[10]=[i("+ Add section",-1)])]),_:1})]),t("div",ae,[l(_,{type:"submit"},{default:a(()=>[...e[12]||(e[12]=[i("Save",-1)])]),_:1}),n(x)?(d(),r("p",de,"Saved.")):L("",!0)])],32)]),_:1})]),_:1})])}}});export{_e as default};
@@ -0,0 +1 @@
1
+ import{_ as E}from"./BeIDAJKt.js";import{d as L,x as P,o,c as n,a as t,k as h,v as w,u as l,i as j,F as _,r as f,b as v,g as C,y,t as d,e as V,w as i,h as p,q as Q,j as q,_ as z}from"./DptiLPkM.js";import{u as M,a as F}from"./nhMvlSQm.js";import{u as R}from"./Dm1y7TW1.js";const T={class:"mb-4 flex flex-wrap gap-4"},W={class:"flex items-center gap-2 text-sm"},G=["value"],H={class:"flex items-center gap-2 text-sm"},I=["value"],J={key:0,class:"text-sm text-muted-foreground"},O={key:1,class:"text-sm text-destructive"},X={key:2,class:"overflow-x-auto rounded-xl border bg-card shadow-sm"},Y={class:"w-full min-w-[640px] text-sm"},Z={class:"px-4 py-3 font-medium"},tt={class:"px-4 py-3"},et={class:"px-4 py-3"},st={class:"px-4 py-3"},ot={class:"px-4 py-3"},nt={class:"px-4 py-3 text-muted-foreground"},at={class:"px-4 py-3"},rt={class:"flex items-center gap-2"},lt={key:0},mt=L({__name:"index",setup(dt){const $=["draft","needs_review","approved","stale","regenerating"],c=R(),B=M(),{data:g}=F({queryKey:["projects"],queryFn:()=>c.get("/projects")}),a=C(""),u=C("");P(()=>{const r=g.value?.[0];!a.value&&r&&(a.value=r.project)});const{data:N,isPending:A,isError:D}=F({queryKey:y(()=>["documents",a.value]),queryFn:()=>c.get(`/projects/${a.value}/documents`),enabled:y(()=>!!a.value)}),m=y(()=>(N.value??[]).filter(r=>!u.value||r.status===u.value));async function b(r,e){await c.post(`/documents/${r}/review`,{action:e}),await B.invalidateQueries({queryKey:["documents",a.value]})}function K(r){const[e,x]=r.split(" ");return`${e} ${x?.slice(0,5)??""}`}return(r,e)=>{const x=E,S=Q,k=z;return o(),n("div",null,[e[10]||(e[10]=t("h1",{class:"mb-4 text-xl font-bold tracking-tight text-foreground"},"Documents dashboard",-1)),t("div",T,[t("label",W,[e[2]||(e[2]=t("span",{class:"text-muted-foreground"},"Project",-1)),h(t("select",{"onUpdate:modelValue":e[0]||(e[0]=s=>j(a)?a.value=s:null),class:"h-9 rounded-md border border-input bg-card px-2 text-sm"},[(o(!0),n(_,null,f(l(g),s=>(o(),n("option",{key:s.project,value:s.project},d(s.project),9,G))),128))],512),[[w,l(a)]])]),t("label",H,[e[4]||(e[4]=t("span",{class:"text-muted-foreground"},"Status",-1)),h(t("select",{"onUpdate:modelValue":e[1]||(e[1]=s=>j(u)?u.value=s:null),class:"h-9 rounded-md border border-input bg-card px-2 text-sm"},[e[3]||(e[3]=t("option",{value:""},"All",-1)),(o(),n(_,null,f($,s=>t("option",{key:s,value:s},d(s),9,I)),64))],512),[[w,l(u)]])])]),l(A)?(o(),n("p",J,"Loading…")):l(D)?(o(),n("p",O,"Failed to load documents.")):(o(),n("div",X,[t("table",Y,[e[9]||(e[9]=t("thead",null,[t("tr",{class:"border-b text-left text-xs uppercase tracking-wide text-muted-foreground"},[t("th",{class:"px-4 py-3"},"Kind"),t("th",{class:"px-4 py-3"},"Module"),t("th",{class:"px-4 py-3"},"Feature"),t("th",{class:"px-4 py-3"},"Status"),t("th",{class:"px-4 py-3"},"Version"),t("th",{class:"px-4 py-3"},"Updated"),t("th",{class:"px-4 py-3"},"Actions")])],-1)),t("tbody",null,[(o(!0),n(_,null,f(l(m),s=>(o(),n("tr",{key:s.id,class:"border-b last:border-0"},[t("td",Z,d(s.docKind.toUpperCase()),1),t("td",tt,d(s.module),1),t("td",et,d(s.feature),1),t("td",st,[V(x,{variant:s.status},{default:i(()=>[p(d(s.status),1)]),_:2},1032,["variant"])]),t("td",ot,"v"+d(s.currentVersion),1),t("td",nt,d(K(s.updatedAt)),1),t("td",at,[t("div",rt,[V(S,{to:`/documents/${s.id}/diff`,class:"text-sm text-primary hover:underline"},{default:i(()=>[...e[5]||(e[5]=[p("Diff",-1)])]),_:1},8,["to"]),s.status==="needs_review"?(o(),q(k,{key:0,size:"sm",variant:"secondary",onClick:U=>b(s.id,"approve")},{default:i(()=>[...e[6]||(e[6]=[p("Approve",-1)])]),_:1},8,["onClick"])):v("",!0),s.status==="needs_review"?(o(),q(k,{key:1,size:"sm",variant:"outline",onClick:U=>b(s.id,"reject")},{default:i(()=>[...e[7]||(e[7]=[p("Reject",-1)])]),_:1},8,["onClick"])):v("",!0)])])]))),128)),l(m)&&l(m).length===0?(o(),n("tr",lt,[...e[8]||(e[8]=[t("td",{colspan:"7",class:"px-4 py-8 text-center text-muted-foreground"},"No documents match this filter.",-1)])])):v("",!0)])])]))])}}});export{mt as default};
@@ -0,0 +1 @@
1
+ import{d as s,o as a,c as o,p as t,u as c,z as l}from"./DptiLPkM.js";const r=s({__name:"Skeleton",props:{class:{}},setup(e){const n=e;return(_,m)=>(a(),o("div",{class:t(c(l)("animate-pulse rounded-md bg-muted",n.class))},null,2))}}),u=Object.assign(r,{__name:"Skeleton"});export{u as _};
@@ -0,0 +1 @@
1
+ import{d as v,s as b,o as s,c as o,e as l,w as p,q as w,a as t,t as r,u as n,F as u,r as _,b as C,h as m,B as N}from"./DptiLPkM.js";import{_ as V}from"./CXYMfke_.js";import{_ as B}from"./BeIDAJKt.js";import{a as F}from"./nhMvlSQm.js";import{u as $}from"./Dm1y7TW1.js";const j={class:"mb-4 mt-1 text-xl font-bold tracking-tight text-foreground"},T={key:0,class:"flex flex-col gap-2"},q={key:1,class:"text-sm text-destructive"},K={key:2,class:"overflow-x-auto rounded-xl border bg-card shadow-sm"},S={class:"w-full min-w-[640px] text-sm"},A=["onClick"],E={class:"px-4 py-3 font-medium"},L={class:"px-4 py-3"},P={class:"px-4 py-3"},U={class:"px-4 py-3"},D={class:"px-4 py-3"},M={class:"px-4 py-3 text-muted-foreground"},Q={key:0},X=v({__name:"index",setup(R){const d=b().params.project,x=$(),{data:i,isPending:f,isError:y}=F({queryKey:["documents",d],queryFn:()=>x.get(`/projects/${d}/documents`)});return(c,a)=>{const h=w,g=V,k=B;return s(),o("div",null,[l(h,{to:"/wiki",class:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"},{default:p(()=>[...a[0]||(a[0]=[t("i",{class:"lni lni-arrow-left"},null,-1),m(" Projects ",-1)])]),_:1}),t("h1",j,r(n(d)),1),n(f)?(s(),o("div",T,[(s(),o(u,null,_(4,e=>l(g,{key:e,class:"h-11"})),64))])):n(y)?(s(),o("p",q,"Failed to load documents.")):(s(),o("div",K,[t("table",S,[a[2]||(a[2]=t("thead",null,[t("tr",{class:"border-b text-left text-xs uppercase tracking-wide text-muted-foreground"},[t("th",{class:"px-4 py-3"},"Kind"),t("th",{class:"px-4 py-3"},"Module"),t("th",{class:"px-4 py-3"},"Feature"),t("th",{class:"px-4 py-3"},"Status"),t("th",{class:"px-4 py-3"},"Version"),t("th",{class:"px-4 py-3"},"Updated")])],-1)),t("tbody",null,[(s(!0),o(u,null,_(n(i),e=>(s(),o("tr",{key:e.id,class:"cursor-pointer border-b last:border-0 hover:bg-accent",onClick:z=>("navigateTo"in c?c.navigateTo:n(N))(`/wiki/${n(d)}/${e.id}`)},[t("td",E,r(e.docKind.toUpperCase()),1),t("td",L,r(e.module),1),t("td",P,r(e.feature),1),t("td",U,[l(k,{variant:e.status},{default:p(()=>[m(r(e.status),1)]),_:2},1032,["variant"])]),t("td",D,"v"+r(e.currentVersion),1),t("td",M,r(e.updatedAt),1)],8,A))),128)),n(i)&&n(i).length===0?(s(),o("tr",Q,[...a[1]||(a[1]=[t("td",{colspan:"6",class:"px-4 py-8 text-center text-muted-foreground"},"No documents yet.",-1)])])):C("",!0)])])]))])}}});export{X as default};
@@ -0,0 +1,3 @@
1
+ import{d as S,s as A,x as E,o as s,c as o,e as K,w as U,q as M,u as n,t as x,b as R,F as h,a as d,k as N,v as k,i as w,r as y,g as V,y as T,h as $,p as z}from"./DptiLPkM.js";import{a as F}from"./nhMvlSQm.js";import{u as O}from"./Dm1y7TW1.js";const P={key:0,class:"mb-4 mt-1 text-xl font-bold tracking-tight text-foreground"},Q={key:1,class:"text-sm text-muted-foreground"},W={key:2,class:"text-sm text-destructive"},j={class:"mb-4 flex flex-wrap gap-4"},G={class:"flex items-center gap-2 text-sm"},H=["value"],I={class:"flex items-center gap-2 text-sm"},J=["value"],X={key:0,class:"text-sm text-muted-foreground"},Y={key:1,class:"overflow-auto rounded-xl border bg-card font-mono text-sm"},ne=S({__name:"diff",setup(Z){const g=A().params.id,_=O(),{data:b}=F({queryKey:["document",g],queryFn:()=>_.get(`/documents/${g}`)}),{data:a,isPending:q,isError:B}=F({queryKey:["document-versions",g],queryFn:()=>_.get(`/documents/${g}/versions`)}),c=V(null),p=V(null);E(()=>{if(a.value&&a.value.length>=2&&c.value===null){const i=[...a.value].sort((t,r)=>t.versionNumber-r.versionNumber),e=i.at(-2),u=i.at(-1);e&&u&&(c.value=e.versionNumber,p.value=u.versionNumber)}});const C=T(()=>{const i=a.value?.find(u=>u.versionNumber===c.value)?.content??"",e=a.value?.find(u=>u.versionNumber===p.value)?.content??"";return L(i.split(`
2
+ `),e.split(`
3
+ `))});function L(i,e){const u=new Set(i),t=new Set(e),r=[],D=Math.max(i.length,e.length);let v=0,f=0;for(;v<i.length||f<e.length;){const l=i[v],m=e[f];if(l!==void 0&&m!==void 0&&l===m?(r.push({type:"same",text:l}),v+=1,f+=1):l!==void 0&&!t.has(l)?(r.push({type:"removed",text:l}),v+=1):m!==void 0&&!u.has(m)?(r.push({type:"added",text:m}),f+=1):(l!==void 0&&(r.push({type:"removed",text:l}),v+=1),m!==void 0&&(r.push({type:"added",text:m}),f+=1)),r.length>D*4)break}return r}return(i,e)=>{const u=M;return s(),o("div",null,[K(u,{to:"/documents",class:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"},{default:U(()=>[...e[2]||(e[2]=[d("i",{class:"lni lni-arrow-left"},null,-1),$(" Documents ",-1)])]),_:1}),n(b)?(s(),o("h1",P,x(n(b).feature)+" - "+x(n(b).docKind.toUpperCase()),1)):R("",!0),n(q)?(s(),o("p",Q,"Loading…")):n(B)?(s(),o("p",W,"Failed to load versions.")):(s(),o(h,{key:3},[d("div",j,[d("label",G,[e[3]||(e[3]=d("span",{class:"text-muted-foreground"},"From",-1)),N(d("select",{"onUpdate:modelValue":e[0]||(e[0]=t=>w(c)?c.value=t:null),class:"h-9 rounded-md border border-input bg-card px-2 text-sm"},[(s(!0),o(h,null,y(n(a),t=>(s(),o("option",{key:t.versionNumber,value:t.versionNumber},"v"+x(t.versionNumber),9,H))),128))],512),[[k,n(c),void 0,{number:!0}]])]),d("label",I,[e[4]||(e[4]=d("span",{class:"text-muted-foreground"},"To",-1)),N(d("select",{"onUpdate:modelValue":e[1]||(e[1]=t=>w(p)?p.value=t:null),class:"h-9 rounded-md border border-input bg-card px-2 text-sm"},[(s(!0),o(h,null,y(n(a),t=>(s(),o("option",{key:t.versionNumber,value:t.versionNumber},"v"+x(t.versionNumber),9,J))),128))],512),[[k,n(p),void 0,{number:!0}]])])]),n(a)&&n(a).length<2?(s(),o("p",X,"Only one version exists yet, nothing to diff against.")):(s(),o("div",Y,[(s(!0),o(h,null,y(n(C),(t,r)=>(s(),o("div",{key:r,class:z(["whitespace-pre-wrap px-3",{"bg-success/15":t.type==="added","bg-destructive/15 line-through":t.type==="removed"}])},x(t.text||" "),3))),128))]))],64))])}}});export{ne as default};
@@ -0,0 +1 @@
1
+ import{d as o,o as n,c as r,p as t,u as c,z as d,A as l}from"./DptiLPkM.js";const _=o({__name:"Card",props:{class:{}},setup(s){const e=s;return(a,p)=>(n(),r("div",{class:t(c(d)("rounded-xl border bg-card text-card-foreground shadow-sm",e.class))},[l(a.$slots,"default")],2))}}),u=Object.assign(_,{__name:"Card"});export{u as _};
@@ -0,0 +1,66 @@
1
+ import{d as Lr,s as Nr,o as Ze,c as St,e as Xe,w as Ve,u as ee,q as Cr,j as Dr,b as Pr,a as xn,h as _n,t as Qe,y as Mr}from"./DptiLPkM.js";import{_ as zr,a as $r}from"./DW42QLqA.js";import{_ as vr}from"./pFBugkEL.js";import{_ as Ur}from"./D0DJQL09.js";import{a as Fr}from"./nhMvlSQm.js";import{u as Br}from"./Dm1y7TW1.js";function Mt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ge=Mt();function Gn(t){ge=t}var fe={exec:()=>null};function ye(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function x(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(v.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var Hr=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),v={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ye(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ye(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ye(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:ye(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:ye(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ye(t=>new RegExp(`^ {0,${t}}>`))},Gr=/^(?:[ \t]*(?:\n|$))+/,Wr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ue=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qn=x(Wn).replace(/bull/g,zt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Yr=x(Wn).replace(/bull/g,zt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$t=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zr=/^[^\n]+/,vt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Xr=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vr=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,zt).getRegex(),rt="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ut=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qr=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ut).replace("tag",rt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jn=t=>x($t).replace("hr",Ue).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rt).getRegex(),Kr=jn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Jr=jn(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/),es=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jr).getRegex(),Ft={blockquote:es,code:Wr,def:Xr,fences:qr,heading:jr,hr:Ue,html:Qr,lheading:qn,list:Vr,newline:Gr,paragraph:Kr,table:fe,text:Zr},yn=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ue).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rt).getRegex(),ts={...Ft,lheading:Yr,table:yn,paragraph:x($t).replace("hr",Ue).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",rt).getRegex()},ns={...Ft,html:x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ut).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x($t).replace("hr",Ue).replace("heading",` *#{1,6} *[^
2
+ ]`).replace("lheading",qn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ss=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yn=/^( {2,}|\\)\n(?!\s*$)/,is=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ae=/[\p{P}\p{S}]/u,st=/[\s\p{P}\p{S}]/u,Bt=/[^\s\p{P}\p{S}]/u,os=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,st).getRegex(),Zn=/(?!~)[\p{P}\p{S}]/u,ls=/(?!~)[\s\p{P}\p{S}]/u,as=/(?:[^\s\p{P}\p{S}]|~)/u,cs=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Hr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Xn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,us=x(Xn,"u").replace(/punct/g,Ae).getRegex(),ps=x(Xn,"u").replace(/punct/g,Zn).getRegex(),Vn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hs=x(Vn,"gu").replace(/notPunctSpace/g,Bt).replace(/punctSpace/g,st).replace(/punct/g,Ae).getRegex(),fs=x(Vn,"gu").replace(/notPunctSpace/g,as).replace(/punctSpace/g,ls).replace(/punct/g,Zn).getRegex(),ds=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Bt).replace(/punctSpace/g,st).replace(/punct/g,Ae).getRegex(),gs=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ae).getRegex(),ms="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ks=x(ms,"gu").replace(/notPunctSpace/g,Bt).replace(/punctSpace/g,st).replace(/punct/g,Ae).getRegex(),bs=x(/\\(punct)/,"gu").replace(/punct/g,Ae).getRegex(),Ts=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),xs=x(Ut).replace("(?:-->|$)","-->").getRegex(),_s=x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",xs).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),et=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ys=x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",et).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qn=x(/^!?\[(label)\]\[(ref)\]/).replace("label",et).replace("ref",vt).getRegex(),Kn=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",vt).getRegex(),ws=x("reflink|nolink(?!\\()","g").replace("reflink",Qn).replace("nolink",Kn).getRegex(),wn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ht={_backpedal:fe,anyPunctuation:bs,autolink:Ts,blockSkip:cs,br:Yn,code:ss,del:fe,delLDelim:fe,delRDelim:fe,emStrongLDelim:us,emStrongRDelimAst:hs,emStrongRDelimUnd:ds,escape:rs,link:ys,nolink:Kn,punctuation:os,reflink:Qn,reflinkSearch:ws,tag:_s,text:is,url:fe},Ss={...Ht,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",et).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",et).getRegex()},Lt={...Ht,emStrongRDelimAst:fs,emStrongLDelim:ps,delLDelim:gs,delRDelim:ks,url:x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wn).getRegex()},As={...Lt,br:x(Yn).replace("{2,}","*").getRegex(),text:x(Lt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ke={normal:Ft,gfm:ts,pedantic:ns},De={normal:Ht,gfm:Lt,breaks:As,pedantic:Ss},Es={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sn=t=>Es[t];function Q(t,e){if(e){if(v.escapeTest.test(t))return t.replace(v.escapeReplace,Sn)}else if(v.escapeTestNoEncode.test(t))return t.replace(v.escapeReplaceNoEncode,Sn);return t}function An(t){try{t=encodeURI(t).replace(v.percentDecode,"%")}catch{return null}return t}function En(t,e){let n=t.replace(v.findPipe,(o,a,c)=>{let p=!1,u=a;for(;--u>=0&&c[u]==="\\";)p=!p;return p?"|":" |"}),s=n.split(v.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(v.slashPipe,"|");return s}function oe(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function Rn(t){let e=t.split(`
3
+ `),n=e.length-1;for(;n>=0&&v.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
4
+ `)}function Rs(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Is(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let o=4-n%4;s+=" ".repeat(o),n+=o}else s+=r,n++;return s}function In(t,e,n,s,r){let o=e.href,a=e.title||null,c=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:c,tokens:s.inlineTokens(c)};return s.state.inLink=!1,p}function Os(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
5
+ `).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[c]=a;return c.length>=r.length?o.slice(r.length):o}).join(`
6
+ `)}var tt=class{options;rules;lexer;constructor(t){this.options=t||ge}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:Rn(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=Os(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=oe(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:oe(e[0],`
7
+ `),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:oe(e[0],`
8
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=oe(e[0],`
9
+ `).split(`
10
+ `),s="",r="",o=[];for(;n.length>0;){let a=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),a=!0;else if(!a)c.push(n[p]);else break;n=n.slice(p);let u=c.join(`
11
+ `),m=u.replace(this.rules.other.blockquoteSetextReplace,`
12
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
13
+ ${u}`:u,r=r?`${r}
14
+ ${m}`:m;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=d,n.length===0)break;let k=o.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let S=k,y=S.raw+`
15
+ `+n.join(`
16
+ `),H=this.blockquote(y);o[o.length-1]=H,s=s.substring(0,s.length-S.raw.length)+H.raw,r=r.substring(0,r.length-S.text.length)+H.text;break}else if(k?.type==="list"){let S=k,y=S.raw+`
17
+ `+n.join(`
18
+ `),H=this.list(y);o[o.length-1]=H,s=s.substring(0,s.length-k.raw.length)+H.raw,r=r.substring(0,r.length-S.raw.length)+H.raw,n=y.substring(o.at(-1).raw.length).split(`
19
+ `);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let o=this.rules.other.listItemRegex(n),a=!1;for(;t;){let p=!1,u="",m="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let d=Is(e[2].split(`
20
+ `,1)[0],e[1].length),k=t.split(`
21
+ `,1)[0],S=!d.trim(),y=0;if(this.options.pedantic?(y=2,m=d.trimStart()):S?y=e[1].length+1:(y=d.search(this.rules.other.nonSpaceChar),y=y>4?1:y,m=d.slice(y),y+=e[1].length),S&&this.rules.other.blankLine.test(k)&&(u+=k+`
22
+ `,t=t.substring(k.length+1),p=!0),!p){let H=this.rules.other.nextBulletRegex(y),te=this.rules.other.hrRegex(y),ne=this.rules.other.fencesBeginRegex(y),Ee=this.rules.other.headingBeginRegex(y),Re=this.rules.other.htmlBeginRegex(y),U=this.rules.other.blockquoteBeginRegex(y);for(;t;){let G=t.split(`
23
+ `,1)[0],L;if(k=G,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),L=k):L=k.replace(this.rules.other.tabCharGlobal," "),ne.test(k)||Ee.test(k)||Re.test(k)||U.test(k)||H.test(k)||te.test(k))break;if(L.search(this.rules.other.nonSpaceChar)>=y||!k.trim())m+=`
24
+ `+L.slice(y);else{if(S||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ne.test(d)||Ee.test(d)||te.test(d))break;m+=`
25
+ `+k}S=!k.trim(),u+=G+`
26
+ `,t=t.substring(G.length+1),d=L.slice(y)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),r.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),r.raw+=u}let c=r.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let p of r.items){this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]);let u=p.tokens[0];if(p.task&&(u?.type==="text"||u?.type==="paragraph")){p.text=p.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let m=this.rules.other.listTaskCheckbox.exec(p.raw);if(m){let d={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};p.checked=d.checked,r.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=d.raw+p.tokens[0].raw,p.tokens[0].text=d.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(d)):p.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):p.tokens.unshift(d)}}else p.task&&(p.task=!1);if(!r.loose){let m=p.tokens.filter(k=>k.type==="space"),d=m.length>0&&m.some(k=>this.rules.other.anyLine.test(k.raw));r.loose=d}}if(r.loose)for(let p of r.items){p.loose=!0;for(let u of p.tokens)u.type==="text"&&(u.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Rn(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:oe(e[0],`
27
+ `),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=En(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
28
+ `):[],o={type:"table",raw:oe(e[0],`
29
+ `),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<n.length;a++)o.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:o.align[a]});for(let a of r)o.rows.push(En(a,o.header.length).map((c,p)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[p]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:oe(e[0],`
30
+ `),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
31
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=oe(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=Rs(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),In(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[s.toLowerCase()];if(!r){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return In(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,o,a,c=r,p=0,u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+r);(s=u.exec(e))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){p+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+p);let m=[...s[0]][0].length,d=t.slice(0,r+s.index+m+a);if(Math.min(r,a)%2){let S=d.slice(1,-1);return{type:"em",raw:d,text:S,tokens:this.lexer.inlineTokens(S)}}let k=d.slice(2,-2);return{type:"strong",raw:d,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,o,a,c=r,p=this.rules.inline.delRDelim;for(p.lastIndex=0,e=e.slice(-1*t.length+r);(s=p.exec(e))!==null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(a=[...o].length,a!==r))continue;if(s[3]||s[4]){c+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c);let u=[...s[0]][0].length,m=t.slice(0,r+s.index+u+a),d=m.slice(r,-r);return{type:"del",raw:m,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},j=class Nt{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ge,this.options.tokenizer=this.options.tokenizer||new tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:v,block:Ke.normal,inline:De.normal};this.options.pedantic?(n.block=Ke.pedantic,n.inline=De.pedantic):this.options.gfm&&(n.block=Ke.gfm,this.options.breaks?n.inline=De.breaks:n.inline=De.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ke,inline:De}}static lex(e,n){return new Nt(n).lex(e)}static lexInline(e,n){return new Nt(n).inlineTokens(e)}lex(e){e=e.replace(v.carriageReturn,`
32
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(v.tabCharGlobal," ").replace(v.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let o;if(this.options.extensions?.block?.some(c=>(o=c.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=n.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
33
+ `:n.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=n.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
34
+ `)?"":`
35
+ `)+o.raw,c.text+=`
36
+ `+o.text,this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=n.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
37
+ `)?"":`
38
+ `)+o.raw,c.text+=`
39
+ `+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let a=e;if(this.options.extensions?.startBlock){let c=1/0,p=e.slice(1),u;this.options.extensions.startBlock.forEach(m=>{u=m.call({lexer:this},p),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(a=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let c=n.at(-1);s&&c?.type==="paragraph"?(c.raw+=(c.raw.endsWith(`
40
+ `)?"":`
41
+ `)+o.raw,c.text+=`
42
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o),s=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=n.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
43
+ `)?"":`
44
+ `)+o.raw,c.text+=`
45
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=e,r=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)o=r[2]?r[2].length:0,s=s.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let a=!1,c="",p=1/0;for(;e;){if(e.length<p)p=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(c=""),a=!1;let u;if(this.options.extensions?.inline?.some(d=>(u=d.call({lexer:this},e,n))?(e=e.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(u.raw.length);let d=n.at(-1);u.type==="text"&&d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(e,s,c)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(e)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(e,s,c)){e=e.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(e)){e=e.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(e))){e=e.substring(u.raw.length),n.push(u);continue}let m=e;if(this.options.extensions?.startInline){let d=1/0,k=e.slice(1),S;this.options.extensions.startInline.forEach(y=>{S=y.call({lexer:this},k),typeof S=="number"&&S>=0&&(d=Math.min(d,S))}),d<1/0&&d>=0&&(m=e.substring(0,d+1))}if(u=this.tokenizer.inlineText(m)){e=e.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(c=u.raw.slice(-1)),a=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},nt=class{options;parser;constructor(t){this.options=t||ge}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(v.notSpaceStart)?.[0],r=t.replace(v.endingNewline,"")+`
46
+ `;return s?'<pre><code class="language-'+Q(s)+'">'+(n?r:Q(r,!0))+`</code></pre>
47
+ `:"<pre><code>"+(n?r:Q(r,!0))+`</code></pre>
48
+ `}blockquote({tokens:t}){return`<blockquote>
49
+ ${this.parser.parse(t)}</blockquote>
50
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
51
+ `}hr(t){return`<hr>
52
+ `}list(t){let e=t.ordered,n=t.start,s="";for(let a=0;a<t.items.length;a++){let c=t.items[a];s+=this.listitem(c)}let r=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
53
+ `+s+"</"+r+`>
54
+ `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
55
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
56
+ `}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let s="";for(let r=0;r<t.rows.length;r++){let o=t.rows[r];n="";for(let a=0;a<o.length;a++)n+=this.tablecell(o[a]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
57
+ <thead>
58
+ `+e+`</thead>
59
+ `+s+`</table>
60
+ `}tablerow({text:t}){return`<tr>
61
+ ${t}</tr>
62
+ `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
63
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Q(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let s=this.parser.parseInline(n),r=An(t);if(r===null)return s;t=r;let o='<a href="'+t+'"';return e&&(o+=' title="'+Q(e)+'"'),o+=">"+s+"</a>",o}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=An(t);if(r===null)return Q(n);t=r;let o=`<img src="${t}" alt="${Q(n)}"`;return e&&(o+=` title="${Q(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Q(t.text)}},Gt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Y=class Ct{options;renderer;textRenderer;constructor(e){this.options=e||ge,this.options.renderer=this.options.renderer||new nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Gt}static parse(e,n){return new Ct(n).parse(e)}static parseInline(e,n){return new Ct(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let a=r,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=c||"";continue}}let o=r;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){s+=c||"";continue}}let a=o;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"checkbox":{s+=n.checkbox(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{let c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},$e=class{options;block;constructor(t){this.options=t||ge}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?j.lex:j.lexInline}provideParser(t=this.block){return t?Y.parse:Y.parseInline}},Ls=class{defaults=Mt();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Y;Renderer=nt;TextRenderer=Gt;Lexer=j;Tokenizer=tt;Hooks=$e;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let o of r.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let a of o)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let a=r[o].flat(1/0);n=n.concat(this.walkTokens(a,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=e.renderers[r.name];o?e.renderers[r.name]=function(...a){let c=r.renderer.apply(this,a);return c===!1&&(c=o.apply(this,a)),c}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new nt(this.defaults);for(let o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,c=n.renderer[a],p=r[a];r[a]=(...u)=>{let m=c.apply(r,u);return m===!1&&(m=p.apply(r,u)),m||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new tt(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,c=n.tokenizer[a],p=r[a];r[a]=(...u)=>{let m=c.apply(r,u);return m===!1&&(m=p.apply(r,u)),m}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new $e;for(let o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,c=n.hooks[a],p=r[a];$e.passThroughHooks.has(o)?r[a]=u=>{if(this.defaults.async&&$e.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await c.call(r,u);return p.call(r,d)})();let m=c.call(r,u);return p.call(r,m)}:r[a]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await c.apply(r,u);return d===!1&&(d=await p.apply(r,u)),d})();let m=c.apply(r,u);return m===!1&&(m=p.apply(r,u)),m}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(a){let c=[];return c.push(o.call(this,a)),r&&(c=c.concat(r.call(this,a))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return j.lex(t,e??this.defaults)}parser(t,e){return Y.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(e):e,c=await(r.hooks?await r.hooks.provideLexer(t):t?j.lex:j.lexInline)(a,r),p=r.hooks?await r.hooks.processAllTokens(c):c;r.walkTokens&&await Promise.all(this.walkTokens(p,r.walkTokens));let u=await(r.hooks?await r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(p,r);return r.hooks?await r.hooks.postprocess(u):u})().catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer(t):t?j.lex:j.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let c=(r.hooks?r.hooks.provideParser(t):t?Y.parse:Y.parseInline)(a,r);return r.hooks&&(c=r.hooks.postprocess(c)),c}catch(a){return o(a)}}}onError(t,e){return n=>{if(n.message+=`
64
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Q(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},de=new Ls;function w(t,e){return de.parse(t,e)}w.options=w.setOptions=function(t){return de.setOptions(t),w.defaults=de.defaults,Gn(w.defaults),w};w.getDefaults=Mt;w.defaults=ge;w.use=function(...t){return de.use(...t),w.defaults=de.defaults,Gn(w.defaults),w};w.walkTokens=function(t,e){return de.walkTokens(t,e)};w.parseInline=de.parseInline;w.Parser=Y;w.parser=Y.parse;w.Renderer=nt;w.TextRenderer=Gt;w.Lexer=j;w.lexer=j.lex;w.Tokenizer=tt;w.Hooks=$e;w.parse=w;w.options;w.setOptions;w.use;w.walkTokens;w.parseInline;Y.parse;j.lex;function On(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,s=Array(e);n<e;n++)s[n]=t[n];return s}function Ns(t){if(Array.isArray(t))return t}function Cs(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var s,r,o,a,c=[],p=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(p=(s=o.call(n)).done)&&(c.push(s.value),c.length!==e);p=!0);}catch(m){u=!0,r=m}finally{try{if(!p&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return c}}function Ds(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
65
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ps(t,e){return Ns(t)||Cs(t,e)||Ms(t,e)||Ds()}function Ms(t,e){if(t){if(typeof t=="string")return On(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?On(t,e):void 0}}const Jn=Object.entries,Ln=Object.setPrototypeOf,zs=Object.isFrozen,$s=Object.getPrototypeOf,vs=Object.getOwnPropertyDescriptor;let z=Object.freeze,$=Object.seal,Se=Object.create,er=typeof Reflect<"u"&&Reflect,Dt=er.apply,Pt=er.construct;z||(z=function(e){return e});$||($=function(e){return e});Dt||(Dt=function(e,n){for(var s=arguments.length,r=new Array(s>2?s-2:0),o=2;o<s;o++)r[o-2]=arguments[o];return e.apply(n,r)});Pt||(Pt=function(e){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];return new e(...s)});const Pe=C(Array.prototype.forEach),Us=C(Array.prototype.lastIndexOf),Nn=C(Array.prototype.pop),we=C(Array.prototype.push),Fs=C(Array.prototype.splice),ae=Array.isArray,ve=C(String.prototype.toLowerCase),At=C(String.prototype.toString),Cn=C(String.prototype.match),Me=C(String.prototype.replace),Dn=C(String.prototype.indexOf),Bs=C(String.prototype.trim),Hs=C(Number.prototype.toString),Gs=C(Boolean.prototype.toString),Pn=typeof BigInt>"u"?null:C(BigInt.prototype.toString),Mn=typeof Symbol>"u"?null:C(Symbol.prototype.toString),P=C(Object.prototype.hasOwnProperty),ze=C(Object.prototype.toString),M=C(RegExp.prototype.test),he=Ws(TypeError);function C(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];return Dt(t,e,s)}}function Ws(t){return function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return Pt(t,n)}}function T(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve;if(Ln&&Ln(t,null),!ae(e))return t;let s=e.length;for(;s--;){let r=e[s];if(typeof r=="string"){const o=n(r);o!==r&&(zs(e)||(e[s]=o),r=o)}t[r]=!0}return t}function qs(t){for(let e=0;e<t.length;e++)P(t,e)||(t[e]=null);return t}function B(t){const e=Se(null);for(const s of Jn(t)){var n=Ps(s,2);const r=n[0],o=n[1];P(t,r)&&(ae(o)?e[r]=qs(o):o&&typeof o=="object"&&o.constructor===Object?e[r]=B(o):e[r]=o)}return e}function js(t){switch(typeof t){case"string":return t;case"number":return Hs(t);case"boolean":return Gs(t);case"bigint":return Pn?Pn(t):"0";case"symbol":return Mn?Mn(t):"Symbol()";case"undefined":return ze(t);case"function":case"object":{if(t===null)return ze(t);const e=t,n=K(e,"toString");if(typeof n=="function"){const s=n(e);return typeof s=="string"?s:ze(s)}return ze(t)}default:return ze(t)}}function K(t,e){for(;t!==null;){const s=vs(t,e);if(s){if(s.get)return C(s.get);if(typeof s.value=="function")return C(s.value)}t=$s(t)}function n(){return null}return n}function Ys(t){try{return M(t,""),!0}catch{return!1}}const zn=z(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Et=z(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Rt=z(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zs=z(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),It=z(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Xs=z(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$n=z(["#text"]),vn=z(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ot=z(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Un=z(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Je=z(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vs=$(/{{[\w\W]*|^[\w\W]*}}/g),Qs=$(/<%[\w\W]*|^[\w\W]*%>/g),Ks=$(/\${[\w\W]*/g),Js=$(/^data-[\-\w.\u00B7-\uFFFF]+$/),ei=$(/^aria-[\-\w]+$/),Fn=$(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ti=$(/^(?:\w+script|data):/i),ni=$(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ri=$(/^html$/i),si=$(/^[a-z][.\w]*(-[.\w]+)+$/i),Bn=$(/<[/\w!]/g),ii=$(/<[/\w]/g),oi=$(/<\/no(script|embed|frames)/i),li=$(/\/>/i),V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ai=function(){return typeof window>"u"?null:window},ci=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const o="dompurify"+(s?"#"+s:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Hn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},le=function(e,n,s,r){return P(e,n)&&ae(e[n])?T(r.base?B(r.base):{},e[n],r.transform):s};function tr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ai();const e=f=>tr(f);if(e.version="3.4.11",e.removed=[],!t||!t.document||t.document.nodeType!==V.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const s=n,r=s.currentScript;t.DocumentFragment;const o=t.HTMLTemplateElement,a=t.Node,c=t.Element,p=t.NodeFilter,u=t.NamedNodeMap;u===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const m=t.DOMParser,d=t.trustedTypes,k=c.prototype,S=K(k,"cloneNode"),y=K(k,"remove"),H=K(k,"nextSibling"),te=K(k,"childNodes"),ne=K(k,"parentNode"),Ee=K(k,"shadowRoot"),Re=K(k,"attributes"),U=a&&a.prototype?K(a.prototype,"nodeType"):null,G=a&&a.prototype?K(a.prototype,"nodeName"):null;if(typeof o=="function"){const f=n.createElement("template");f.content&&f.content.ownerDocument&&(n=f.content.ownerDocument)}let L,ce="",it,Wt=!1,Ie=0;const qt=function(){if(Ie>0)throw he('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},me=function(i){qt(),Ie++;try{return L.createHTML(i)}finally{Ie--}},nr=function(i){qt(),Ie++;try{return L.createScriptURL(i)}finally{Ie--}},rr=function(){return Wt||(it=ci(d,r),Wt=!0),it},Fe=n,ot=Fe.implementation,jt=Fe.createNodeIterator,sr=Fe.createDocumentFragment,ir=Fe.getElementsByTagName,or=s.importNode;let O=Hn();e.isSupported=typeof Jn=="function"&&typeof ne=="function"&&ot&&ot.createHTMLDocument!==void 0;const lr=Vs,ar=Qs,cr=Ks,ur=Js,pr=ei,hr=ti,Yt=ni,fr=si;let Zt=Fn,A=null;const Xt=T({},[...zn,...Et,...Rt,...It,...$n]);let E=null;const Vt=T({},[...vn,...Ot,...Un,...Je]);let R=Object.seal(Se(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,Qt=null;const re=Object.seal(Se(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Kt=!0,lt=!0,Jt=!1,en=!0,se=!1,Le=!0,ue=!1,at=!1,ct=null,ut=null,pt=!1,ke=!1,Be=!1,He=!1,tn=!0,nn=!1;const rn="user-content-";let ht=!0,ft=!1,be={},Z=null;const dt=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let sn=null;const on=T({},["audio","video","img","source","image","track"]);let gt=null;const ln=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",X="http://www.w3.org/1999/xhtml";let Te=X,mt=!1,kt=null;const dr=T({},[Ge,We,X],At),an=z(["mi","mo","mn","ms","mtext"]);let bt=T({},an);const cn=z(["annotation-xml"]);let Tt=T({},cn);const gr=T({},["title","style","font","a","script"]);let Ne=null;const mr=["application/xhtml+xml","text/html"],kr="text/html";let I=null,xe=null;const br=n.createElement("form"),un=function(i){return i instanceof RegExp||i instanceof Function},xt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(xe&&xe===i)return;(!i||typeof i!="object")&&(i={}),i=B(i),Ne=mr.indexOf(i.PARSER_MEDIA_TYPE)===-1?kr:i.PARSER_MEDIA_TYPE,I=Ne==="application/xhtml+xml"?At:ve,A=le(i,"ALLOWED_TAGS",Xt,{transform:I}),E=le(i,"ALLOWED_ATTR",Vt,{transform:I}),kt=le(i,"ALLOWED_NAMESPACES",dr,{transform:At}),gt=le(i,"ADD_URI_SAFE_ATTR",ln,{transform:I,base:ln}),sn=le(i,"ADD_DATA_URI_TAGS",on,{transform:I,base:on}),Z=le(i,"FORBID_CONTENTS",dt,{transform:I}),Oe=le(i,"FORBID_TAGS",B({}),{transform:I}),Qt=le(i,"FORBID_ATTR",B({}),{transform:I}),be=P(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?B(i.USE_PROFILES):i.USE_PROFILES:!1,Kt=i.ALLOW_ARIA_ATTR!==!1,lt=i.ALLOW_DATA_ATTR!==!1,Jt=i.ALLOW_UNKNOWN_PROTOCOLS||!1,en=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=i.SAFE_FOR_TEMPLATES||!1,Le=i.SAFE_FOR_XML!==!1,ue=i.WHOLE_DOCUMENT||!1,ke=i.RETURN_DOM||!1,Be=i.RETURN_DOM_FRAGMENT||!1,He=i.RETURN_TRUSTED_TYPE||!1,pt=i.FORCE_BODY||!1,tn=i.SANITIZE_DOM!==!1,nn=i.SANITIZE_NAMED_PROPS||!1,ht=i.KEEP_CONTENT!==!1,ft=i.IN_PLACE||!1,Zt=Ys(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:Fn,Te=typeof i.NAMESPACE=="string"?i.NAMESPACE:X,bt=P(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&typeof i.MATHML_TEXT_INTEGRATION_POINTS=="object"?B(i.MATHML_TEXT_INTEGRATION_POINTS):T({},an),Tt=P(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&typeof i.HTML_INTEGRATION_POINTS=="object"?B(i.HTML_INTEGRATION_POINTS):T({},cn);const l=P(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING=="object"?B(i.CUSTOM_ELEMENT_HANDLING):Se(null);if(R=Se(null),P(l,"tagNameCheck")&&un(l.tagNameCheck)&&(R.tagNameCheck=l.tagNameCheck),P(l,"attributeNameCheck")&&un(l.attributeNameCheck)&&(R.attributeNameCheck=l.attributeNameCheck),P(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(R.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),$(R),se&&(lt=!1),Be&&(ke=!0),be&&(A=T({},$n),E=Se(null),be.html===!0&&(T(A,zn),T(E,vn)),be.svg===!0&&(T(A,Et),T(E,Ot),T(E,Je)),be.svgFilters===!0&&(T(A,Rt),T(E,Ot),T(E,Je)),be.mathMl===!0&&(T(A,It),T(E,Un),T(E,Je))),re.tagCheck=null,re.attributeCheck=null,P(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?re.tagCheck=i.ADD_TAGS:ae(i.ADD_TAGS)&&(A===Xt&&(A=B(A)),T(A,i.ADD_TAGS,I))),P(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?re.attributeCheck=i.ADD_ATTR:ae(i.ADD_ATTR)&&(E===Vt&&(E=B(E)),T(E,i.ADD_ATTR,I))),P(i,"ADD_URI_SAFE_ATTR")&&ae(i.ADD_URI_SAFE_ATTR)&&T(gt,i.ADD_URI_SAFE_ATTR,I),P(i,"FORBID_CONTENTS")&&ae(i.FORBID_CONTENTS)&&(Z===dt&&(Z=B(Z)),T(Z,i.FORBID_CONTENTS,I)),P(i,"ADD_FORBID_CONTENTS")&&ae(i.ADD_FORBID_CONTENTS)&&(Z===dt&&(Z=B(Z)),T(Z,i.ADD_FORBID_CONTENTS,I)),ht&&(A["#text"]=!0),ue&&T(A,["html","head","body"]),A.table&&(T(A,["tbody"]),delete Oe.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const h=L;L=i.TRUSTED_TYPES_POLICY;try{ce=me("")}catch(g){throw L=h,g}}else i.TRUSTED_TYPES_POLICY===null?(L=void 0,ce=""):(L===void 0&&(L=rr()),L&&typeof ce=="string"&&(ce=me("")));z&&z(i),xe=i},pn=T({},[...Et,...Rt,...Zs]),hn=T({},[...It,...Xs]),Tr=function(i,l,h){return l.namespaceURI===X?i==="svg":l.namespaceURI===Ge?i==="svg"&&(h==="annotation-xml"||bt[h]):!!pn[i]},xr=function(i,l,h){return l.namespaceURI===X?i==="math":l.namespaceURI===We?i==="math"&&Tt[h]:!!hn[i]},_r=function(i,l,h){return l.namespaceURI===We&&!Tt[h]||l.namespaceURI===Ge&&!bt[h]?!1:!hn[i]&&(gr[i]||!pn[i])},yr=function(i){let l=ne(i);(!l||!l.tagName)&&(l={namespaceURI:Te,tagName:"template"});const h=ve(i.tagName),g=ve(l.tagName);return kt[i.namespaceURI]?i.namespaceURI===We?Tr(h,l,g):i.namespaceURI===Ge?xr(h,l,g):i.namespaceURI===X?_r(h,l,g):!!(Ne==="application/xhtml+xml"&&kt[i.namespaceURI]):!1},ie=function(i){we(e.removed,{element:i});try{ne(i).removeChild(i)}catch{if(y(i),!ne(i))throw he("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},fn=function(i){const l=te(i);if(l){const g=[];Pe(l,b=>{we(g,b)}),Pe(g,b=>{try{y(b)}catch{}})}const h=Re(i);if(h)for(let g=h.length-1;g>=0;--g){const b=h[g],_=b&&b.name;if(typeof _=="string")try{i.removeAttribute(_)}catch{}}},pe=function(i,l){try{we(e.removed,{attribute:l.getAttributeNode(i),from:l})}catch{we(e.removed,{attribute:null,from:l})}if(l.removeAttribute(i),i==="is")if(ke||Be)try{ie(l)}catch{}else try{l.setAttribute(i,"")}catch{}},wr=function(i){const l=Re(i);if(l)for(let h=l.length-1;h>=0;--h){const g=l[h],b=g&&g.name;if(!(typeof b!="string"||E[I(b)]))try{i.removeAttribute(b)}catch{}}},Sr=function(i){const l=[i];for(;l.length>0;){const h=l.pop();(U?U(h):h.nodeType)===V.element&&wr(h);const b=te(h);if(b)for(let _=b.length-1;_>=0;--_)l.push(b[_])}},dn=function(i){let l=null,h=null;if(pt)i="<remove></remove>"+i;else{const _=Cn(i,/^[\r\n\t ]+/);h=_&&_[0]}Ne==="application/xhtml+xml"&&Te===X&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const g=L?me(i):i;if(Te===X)try{l=new m().parseFromString(g,Ne)}catch{}if(!l||!l.documentElement){l=ot.createDocument(Te,"template",null);try{l.documentElement.innerHTML=mt?ce:g}catch{}}const b=l.body||l.documentElement;return i&&h&&b.insertBefore(n.createTextNode(h),b.childNodes[0]||null),Te===X?ir.call(l,ue?"html":"body")[0]:ue?l.documentElement:b},gn=function(i){return jt.call(i.ownerDocument||i,i,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},qe=function(i){return i=Me(i,lr," "),i=Me(i,ar," "),i=Me(i,cr," "),i},_t=function(i){var l;i.normalize();const h=jt.call(i.ownerDocument||i,i,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let g=h.nextNode();for(;g;)g.data=qe(g.data),g=h.nextNode();const b=(l=i.querySelectorAll)===null||l===void 0?void 0:l.call(i,"template");b&&Pe(b,_=>{_e(_.content)&&_t(_.content)})},je=function(i){const l=G?G(i):null;return typeof l!="string"||I(l)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==Re(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==U(i)||i.childNodes!==te(i)},_e=function(i){if(!U||typeof i!="object"||i===null)return!1;try{return U(i)===V.documentFragment}catch{return!1}},Ce=function(i){if(!U||typeof i!="object"||i===null)return!1;try{return typeof U(i)=="number"}catch{return!1}};function J(f,i,l){f.length!==0&&Pe(f,h=>{h.call(e,i,l,xe)})}const Ar=function(i,l){return!!(Le&&i.hasChildNodes()&&!Ce(i.firstElementChild)&&M(Bn,i.textContent)&&M(Bn,i.innerHTML)||Le&&i.namespaceURI===X&&l==="style"&&Ce(i.firstElementChild)||i.nodeType===V.processingInstruction||Le&&i.nodeType===V.comment&&M(ii,i.data))},Er=function(i,l){if(!Oe[l]&&bn(l)&&(R.tagNameCheck instanceof RegExp&&M(R.tagNameCheck,l)||R.tagNameCheck instanceof Function&&R.tagNameCheck(l)))return!1;if(ht&&!Z[l]){const h=ne(i),g=te(i);if(g&&h){const b=g.length;for(let _=b-1;_>=0;--_){const D=ft?g[_]:S(g[_],!0);h.insertBefore(D,H(i))}}}return ie(i),!0},mn=function(i){if(J(O.beforeSanitizeElements,i,null),je(i))return ie(i),!0;const l=I(G?G(i):i.nodeName);if(J(O.uponSanitizeElement,i,{tagName:l,allowedTags:A}),Ar(i,l))return ie(i),!0;if(Oe[l]||!(re.tagCheck instanceof Function&&re.tagCheck(l))&&!A[l])return Er(i,l);if((U?U(i):i.nodeType)===V.element&&!yr(i)||(l==="noscript"||l==="noembed"||l==="noframes")&&M(oi,i.innerHTML))return ie(i),!0;if(se&&i.nodeType===V.text){const g=qe(i.textContent);i.textContent!==g&&(we(e.removed,{element:i.cloneNode()}),i.textContent=g)}return J(O.afterSanitizeElements,i,null),!1},kn=function(i,l,h){if(Qt[l]||tn&&(l==="id"||l==="name")&&(h in n||h in br))return!1;const g=E[l]||re.attributeCheck instanceof Function&&re.attributeCheck(l,i);if(!(lt&&M(ur,l))){if(!(Kt&&M(pr,l))){if(g){if(!gt[l]){if(!M(Zt,Me(h,Yt,""))){if(!((l==="src"||l==="xlink:href"||l==="href")&&i!=="script"&&Dn(h,"data:")===0&&sn[i])){if(!(Jt&&!M(hr,Me(h,Yt,"")))){if(h)return!1}}}}}else if(!(bn(i)&&(R.tagNameCheck instanceof RegExp&&M(R.tagNameCheck,i)||R.tagNameCheck instanceof Function&&R.tagNameCheck(i))&&(R.attributeNameCheck instanceof RegExp&&M(R.attributeNameCheck,l)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(l,i))||l==="is"&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&M(R.tagNameCheck,h)||R.tagNameCheck instanceof Function&&R.tagNameCheck(h))))return!1}}return!0},Rr=T({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),bn=function(i){return!Rr[ve(i)]&&M(fr,i)},Ir=function(i,l,h,g){if(L&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!h)switch(d.getAttributeType(i,l)){case"TrustedHTML":return me(g);case"TrustedScriptURL":return nr(g)}return g},Or=function(i,l,h,g){try{h?i.setAttributeNS(h,l,g):i.setAttribute(l,g),je(i)?ie(i):Nn(e.removed)}catch{pe(l,i)}},Tn=function(i){J(O.beforeSanitizeAttributes,i,null);const l=i.attributes;if(!l||je(i))return;const h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0};let g=l.length;const b=I(i.nodeName);for(;g--;){const _=l[g],D=_.name,N=_.namespaceURI,W=_.value,q=I(D),wt=W;let F=D==="value"?wt:Bs(wt);if(h.attrName=q,h.attrValue=F,h.keepAttr=!0,h.forceKeepAttr=void 0,J(O.uponSanitizeAttribute,i,h),F=h.attrValue,nn&&(q==="id"||q==="name")&&Dn(F,rn)!==0&&(pe(D,i),F=rn+F),Le&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,F)){pe(D,i);continue}if(q==="attributename"&&Cn(F,"href")){pe(D,i);continue}if(!h.forceKeepAttr){if(!h.keepAttr){pe(D,i);continue}if(!en&&M(li,F)){pe(D,i);continue}if(se&&(F=qe(F)),!kn(b,q,F)){pe(D,i);continue}F=Ir(b,q,N,F),F!==wt&&Or(i,D,N,F)}}J(O.afterSanitizeAttributes,i,null)},Ye=function(i){let l=null;const h=gn(i);for(J(O.beforeSanitizeShadowDOM,i,null);l=h.nextNode();)if(J(O.uponSanitizeShadowNode,l,null),mn(l),Tn(l),_e(l.content)&&Ye(l.content),(U?U(l):l.nodeType)===V.element){const b=Ee(l);_e(b)&&(yt(b),Ye(b))}J(O.afterSanitizeShadowDOM,i,null)},yt=function(i){const l=[{node:i,shadow:null}];for(;l.length>0;){const h=l.pop();if(h.shadow){Ye(h.shadow);continue}const g=h.node,_=(U?U(g):g.nodeType)===V.element,D=te(g);if(D)for(let N=D.length-1;N>=0;--N)l.push({node:D[N],shadow:null});if(_){const N=G?G(g):null;if(typeof N=="string"&&I(N)==="template"){const W=g.content;_e(W)&&l.push({node:W,shadow:null})}}if(_){const N=Ee(g);_e(N)&&l.push({node:null,shadow:N},{node:N,shadow:null})}}};return e.sanitize=function(f){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,h=null,g=null,b=null;if(mt=!f,mt&&(f="<!-->"),typeof f!="string"&&!Ce(f)&&(f=js(f),typeof f!="string"))throw he("dirty is not a string, aborting");if(!e.isSupported)return f;at?(A=ct,E=ut):xt(i),(O.uponSanitizeElement.length>0||O.uponSanitizeAttribute.length>0)&&(A=B(A)),O.uponSanitizeAttribute.length>0&&(E=B(E)),e.removed=[];const _=ft&&typeof f!="string"&&Ce(f);if(_){const W=G?G(f):f.nodeName;if(typeof W=="string"){const q=I(W);if(!A[q]||Oe[q])throw he("root node is forbidden and cannot be sanitized in-place")}if(je(f))throw he("root node is clobbered and cannot be sanitized in-place");try{yt(f)}catch(q){throw fn(f),q}}else if(Ce(f))l=dn("<!---->"),h=l.ownerDocument.importNode(f,!0),h.nodeType===V.element&&h.nodeName==="BODY"||h.nodeName==="HTML"?l=h:l.appendChild(h),yt(h);else{if(!ke&&!se&&!ue&&f.indexOf("<")===-1)return L&&He?me(f):f;if(l=dn(f),!l)return ke?null:He?ce:""}l&&pt&&ie(l.firstChild);const D=gn(_?f:l);try{for(;g=D.nextNode();)mn(g),Tn(g),_e(g.content)&&Ye(g.content)}catch(W){throw _&&fn(f),W}if(_)return Pe(e.removed,W=>{W.element&&Sr(W.element)}),se&&_t(f),f;if(ke){if(se&&_t(l),Be)for(b=sr.call(l.ownerDocument);l.firstChild;)b.appendChild(l.firstChild);else b=l;return(E.shadowroot||E.shadowrootmode)&&(b=or.call(s,b,!0)),b}let N=ue?l.outerHTML:l.innerHTML;return ue&&A["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&M(ri,l.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
66
+ `+N),se&&(N=qe(N)),L&&He?me(N):N},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xt(f),at=!0,ct=A,ut=E},e.clearConfig=function(){xe=null,at=!1,ct=null,ut=null,L=it,ce=""},e.isValidAttribute=function(f,i,l){xe||xt({});const h=I(f),g=I(i);return kn(h,g,l)},e.addHook=function(f,i){typeof i=="function"&&P(O,f)&&we(O[f],i)},e.removeHook=function(f,i){if(P(O,f)){if(i!==void 0){const l=Us(O[f],i);return l===-1?void 0:Fs(O[f],l,1)[0]}return Nn(O[f])}},e.removeHooks=function(f){P(O,f)&&(O[f]=[])},e.removeAllHooks=function(){O=Hn()},e}var ui=tr();const pi={key:0,class:"mt-4 text-sm text-muted-foreground"},hi={key:1,class:"mt-4 text-sm text-destructive"},fi={class:"text-sm text-muted-foreground"},di=Lr({__name:"[id]",setup(t){const e=Nr(),n=e.params.project,s=e.params.id,r=Br(),{data:o,isPending:a,isError:c}=Fr({queryKey:["document",s],queryFn:()=>r.get(`/documents/${s}`)}),p=Mr(()=>o.value?.content?ui.sanitize(w.parse(o.value.content,{async:!1})):"<p><em>No content yet.</em></p>");return(u,m)=>{const d=Cr,k=zr,S=$r,y=vr,H=Ur;return Ze(),St("div",null,[Xe(d,{to:`/wiki/${ee(n)}`,class:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"},{default:Ve(()=>[m[0]||(m[0]=xn("i",{class:"lni lni-arrow-left"},null,-1)),_n(" "+Qe(ee(n)),1)]),_:1},8,["to"]),ee(a)?(Ze(),St("p",pi,"Loading…")):ee(c)?(Ze(),St("p",hi,"Failed to load document.")):ee(o)?(Ze(),Dr(H,{key:2,class:"mt-3 shadow-soft"},{default:Ve(()=>[Xe(S,{class:"flex flex-row items-center justify-between space-y-0"},{default:Ve(()=>[Xe(k,{class:"text-lg"},{default:Ve(()=>[_n(Qe(ee(o).feature)+" - "+Qe(ee(o).docKind.toUpperCase()),1)]),_:1}),xn("span",fi,"v"+Qe(ee(o).currentVersion),1)]),_:1}),Xe(y,{class:"doc-content",innerHTML:ee(p)},null,8,["innerHTML"])]),_:1})):Pr("",!0)])}}}),gi=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},yi=gi(di,[["__scopeId","data-v-6d006d9d"]]);export{yi as default};
@@ -0,0 +1 @@
1
+ import{d as n,o as t,c as o,p as c,u as r,z as l,A as _}from"./DptiLPkM.js";const d=n({__name:"CardTitle",props:{class:{}},setup(s){const e=s;return(a,p)=>(t(),o("h3",{class:c(r(l)("font-semibold leading-none tracking-tight",e.class))},[_(a.$slots,"default")],2))}}),u=Object.assign(d,{__name:"CardTitle"}),i=n({__name:"CardHeader",props:{class:{}},setup(s){const e=s;return(a,p)=>(t(),o("div",{class:c(r(l)("flex flex-col space-y-1.5 p-5",e.class))},[_(a.$slots,"default")],2))}}),f=Object.assign(i,{__name:"CardHeader"});export{u as _,f as a};
@@ -0,0 +1 @@
1
+ import{_ as C}from"./BeIDAJKt.js";import{d as A,o,c as n,a as e,u as r,t as l,b as k,F as B,r as V,e as i,w as u,i as L,_ as q,f as N,g as y,h as p,j as Q}from"./DptiLPkM.js";import{_ as S,a as F}from"./BcxnhBGC.js";import{u as K,a as M}from"./nhMvlSQm.js";import{u as R}from"./Dm1y7TW1.js";const T={key:0,class:"mb-4 flex flex-col gap-1.5 rounded-xl border bg-warning/10 px-4 py-3"},U={class:"break-all font-mono text-sm"},$={key:1,class:"mb-6 overflow-x-auto rounded-xl border bg-card shadow-sm"},D={class:"w-full min-w-[480px] text-sm"},E={class:"px-4 py-3 font-medium"},I={class:"px-4 py-3 text-muted-foreground"},P={class:"px-4 py-3 text-muted-foreground"},j={class:"px-4 py-3"},z={class:"px-4 py-3"},G={key:2,class:"mb-6 text-sm text-muted-foreground"},W={class:"flex flex-1 flex-col gap-1.5"},te=A({__name:"index",setup(H){const c=R(),x=K(),a=y(""),m=y(""),{data:_}=M({queryKey:["mcp-tokens"],queryFn:()=>c.get("/settings/mcp-tokens")});async function b(){const d=await c.post("/settings/mcp-tokens",{label:a.value||null});m.value=d.token,a.value="",await x.invalidateQueries({queryKey:["mcp-tokens"]})}async function g(d){await c.post(`/settings/mcp-tokens/${d}/revoke`,{}),await x.invalidateQueries({queryKey:["mcp-tokens"]})}return(d,t)=>{const v=C,f=q,w=S,h=F;return o(),n("div",null,[t[6]||(t[6]=e("h1",{class:"text-xl font-bold tracking-tight text-foreground"},"Settings: MCP Access Tokens",-1)),t[7]||(t[7]=e("p",{class:"mb-4 mt-1 text-sm text-muted-foreground"}," Add this as a remote MCP server in Claude Code / Claude Desktop / Cursor: point it at the mcp-server URL and use the token below as a Bearer token. Each token is personal, revoking it only affects your own access. ",-1)),r(m)?(o(),n("div",T,[t[1]||(t[1]=e("strong",{class:"text-sm text-foreground"},"Copy this now, it will not be shown again:",-1)),e("code",U,l(r(m)),1)])):k("",!0),r(_)?.length?(o(),n("div",$,[e("table",D,[t[3]||(t[3]=e("thead",null,[e("tr",{class:"border-b text-left text-xs uppercase tracking-wide text-muted-foreground"},[e("th",{class:"px-4 py-3"},"Label"),e("th",{class:"px-4 py-3"},"Created"),e("th",{class:"px-4 py-3"},"Last used"),e("th",{class:"px-4 py-3"},"Status"),e("th",{class:"px-4 py-3"})])],-1)),e("tbody",null,[(o(!0),n(B,null,V(r(_),s=>(o(),n("tr",{key:s.id,class:"border-b last:border-0"},[e("td",E,l(s.label??"unlabeled"),1),e("td",I,l(s.createdAt),1),e("td",P,l(s.lastUsedAt??"never"),1),e("td",j,[i(v,{variant:s.revokedAt?"stale":"approved"},{default:u(()=>[p(l(s.revokedAt?"revoked":"active"),1)]),_:2},1032,["variant"])]),e("td",z,[s.revokedAt?k("",!0):(o(),Q(f,{key:0,variant:"ghost",size:"sm",onClick:J=>g(s.id)},{default:u(()=>[...t[2]||(t[2]=[p("Revoke",-1)])]),_:1},8,["onClick"]))])]))),128))])])])):(o(),n("p",G,"No tokens yet.")),e("form",{class:"flex max-w-md items-end gap-3",onSubmit:N(b,["prevent"])},[e("div",W,[i(w,{for:"token-label"},{default:u(()=>[...t[4]||(t[4]=[p("Label",-1)])]),_:1}),i(h,{id:"token-label",modelValue:r(a),"onUpdate:modelValue":t[0]||(t[0]=s=>L(a)?a.value=s:null),type:"text",placeholder:"laptop, CI, etc."},null,8,["modelValue"])]),i(f,{type:"submit"},{default:u(()=>[...t[5]||(t[5]=[p("Generate token",-1)])]),_:1})],32)])}}});export{te as default};
@@ -0,0 +1 @@
1
+ function a(){async function r(n){const t=await fetch(`/api-proxy${n}`,{credentials:"include"});if(!t.ok)throw new Error(`${t.status} ${t.statusText} on ${n}`);return t.json()}async function s(n,t,e){const o=await fetch(`/api-proxy${t}`,{method:n,credentials:"include",headers:{"content-type":"application/json"},body:e!==void 0?JSON.stringify(e):void 0});if(!o.ok)throw new Error(`${o.status} ${o.statusText} on ${t}`);return o.json()}async function i(n,t){const e=await fetch(`/api-proxy${n}`,{method:"POST",credentials:"include",body:t});if(!e.ok)throw new Error(`${e.status} ${e.statusText} on ${n}`);return e.json()}return{get:r,put:(n,t)=>s("PUT",n,t),post:(n,t)=>s("POST",n,t),upload:i}}export{a as u};