comp-hub 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +137 -75
- package/dist/website/dist/assets/{atom-one-dark-C8u-1dd1.js → atom-one-dark-aMfJu-hk.js} +1 -1
- package/dist/website/dist/assets/index-2cysFTTE.css +1 -0
- package/dist/website/dist/assets/index-87m2Wftx.css +1 -0
- package/dist/website/dist/assets/index-B12IVxVV.css +1 -0
- package/dist/website/dist/assets/index-B1R7DNzO.css +1 -0
- package/dist/website/dist/assets/index-B61WTTtp.js +44 -0
- package/dist/website/dist/assets/index-BOnnhQqp.css +1 -0
- package/dist/website/dist/assets/index-BSb1uSBL.js +2 -0
- package/dist/website/dist/assets/index-BWDPcdWt.js +1 -0
- package/dist/website/dist/assets/index-BYAQTeXA.js +1 -0
- package/dist/website/dist/assets/index-BjGqxMN6.css +1 -0
- package/dist/website/dist/assets/index-BuFxFJw1.css +1 -0
- package/dist/website/dist/assets/index-C1fCMB5k.js +1 -0
- package/dist/website/dist/assets/index-CMr4JE7V.css +1 -0
- package/dist/website/dist/assets/index-Cc65KVUv.js +1 -0
- package/dist/website/dist/assets/index-CdWXO9ks.css +1 -0
- package/dist/website/dist/assets/index-Chuc3OfG.js +1 -0
- package/dist/website/dist/assets/index-CiSHamh1.js +1 -0
- package/dist/website/dist/assets/index-CpaidDnm.js +1 -0
- package/dist/website/dist/assets/index-CwAYbppF.js +1 -0
- package/dist/website/dist/assets/index-D5P-Yy2I.js +12 -0
- package/dist/website/dist/assets/index-D78Sz09p.js +1 -0
- package/dist/website/dist/assets/index-DFuMZ0ql.css +1 -0
- package/dist/website/dist/assets/index-DKN8ltfk.js +1 -0
- package/dist/website/dist/assets/index-DNnfZ7vg.css +1 -0
- package/dist/website/dist/assets/index-DYUz6zdp.js +1 -0
- package/dist/website/dist/assets/index-Dew-flDA.js +1 -0
- package/dist/website/dist/assets/index-DxJFvPw9.css +1 -0
- package/dist/website/dist/assets/index-EebI1yOz.js +1 -0
- package/dist/website/dist/assets/index-GoF1OoI9.css +1 -0
- package/dist/website/dist/assets/index-KqzTrDok.js +1 -0
- package/dist/website/dist/assets/index-NX1eicbZ.js +1 -0
- package/dist/website/dist/assets/index-Ryu1xniP.css +1 -0
- package/dist/website/dist/assets/index-qujOd5FX.css +1 -0
- package/dist/website/dist/assets/index-t4XQj1rr.css +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-6lOySOvP.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-9q1_a3OQ.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-BUyFf_gF.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-CB3tNpVF.js +15 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-CpUUpoSy.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-D1o31Fod.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-DU220ftM.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-DlDI5LmF.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_style_index_0_lang-CZANkEpb.js +60 -0
- package/dist/website/dist/assets/index.vue_vue_type_style_index_0_lang-YSSKcfms.js +382 -0
- package/dist/website/dist/assets/index.vue_vue_type_style_index_0_lang-ttbwuGxx.js +1 -0
- package/dist/website/dist/assets/md5-COdWCHop.js +1 -0
- package/dist/website/dist/assets/moment-gesK-bst.css +1 -0
- package/dist/website/dist/assets/moment-qaLPUuUy.js +4 -0
- package/dist/website/dist/assets/useCompEditStore-DIv2Hbkz.js +1 -0
- package/dist/website/dist/assets/useCompEditStore-Z_9v-nSk.css +1 -0
- package/dist/website/dist/assets/useTeamHeaders-Cjz3Gcsp.js +1 -0
- package/dist/website/dist/assets/v1Keyword-B9dqykoe.js +1 -0
- package/dist/website/dist/assets/v1Module-lEataczS.js +1 -0
- package/dist/website/dist/index.html +2 -3
- package/dist/website/dist/md/COMP_REPEAT.md +20 -20
- package/package.json +1 -1
- package/dist/website/dist/assets/avatar-zrZu7Mp7.png +0 -0
- package/dist/website/dist/assets/index-8cEtbT3O.js +0 -1
- package/dist/website/dist/assets/index-B9WN-WSz.css +0 -17
- package/dist/website/dist/assets/index-BDuN8NeP.js +0 -135
- package/dist/website/dist/assets/index-BOfoxPL-.js +0 -1
- package/dist/website/dist/assets/index-BVOHuBIX.css +0 -1
- package/dist/website/dist/assets/index-BXnL5GlT.js +0 -1
- package/dist/website/dist/assets/index-BbU2mVcC.js +0 -404
- package/dist/website/dist/assets/index-C0SGaR4J.js +0 -2
- package/dist/website/dist/assets/index-C8LSpT-z.css +0 -1
- package/dist/website/dist/assets/index-CB7JXyjj.css +0 -1
- package/dist/website/dist/assets/index-CCTatqst.css +0 -1
- package/dist/website/dist/assets/index-CLMaeILH.js +0 -1
- package/dist/website/dist/assets/index-CczN5fLz.css +0 -1
- package/dist/website/dist/assets/index-DC7eamiy.js +0 -1
- package/dist/website/dist/assets/index-DH9qVX3y.js +0 -1
- package/dist/website/dist/assets/index-DYP7pi_n.css +0 -32
- package/dist/website/dist/assets/index-DctCZKbD.css +0 -1
- package/dist/website/dist/assets/index-DhKRQfS3.js +0 -1
- package/dist/website/dist/assets/index-DjnoPitg.js +0 -10
- package/dist/website/dist/assets/index-Dndizr_2.js +0 -1
- package/dist/website/dist/assets/index-Dt0F6rkY.js +0 -1
- package/dist/website/dist/assets/index-Dy-UmOsw.js +0 -1
- package/dist/website/dist/assets/index-SRPHXpr5.js +0 -1
- package/dist/website/dist/assets/index-fiBRIyYr.css +0 -1
- package/dist/website/dist/assets/index-uKMYdTxR.css +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-BaKY9guh.js +0 -15
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-BrlIS8wK.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-C54Zykk3.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-CGqaVhym.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-CXaPCvf4.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-FvgCOROY.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_style_index_0_lang-BBsxZQZT.js +0 -61
- package/dist/website/dist/assets/md5-CMJCUOOG.js +0 -6
- package/dist/website/dist/font/demo.css +0 -539
- package/dist/website/dist/font/demo_index.html +0 -303
- package/dist/website/dist/font/iconfont.css +0 -35
- package/dist/website/dist/font/iconfont.js +0 -1
- package/dist/website/dist/font/iconfont.json +0 -44
- package/dist/website/dist/font/iconfont.ttf +0 -0
- package/dist/website/dist/font/iconfont.woff +0 -0
- package/dist/website/dist/font/iconfont.woff2 +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a,b as u}from"./index-D5P-Yy2I.js";import{d as w,i as g,k as y,C as S,x as M,D as b,c as T,a as D,o as R}from"./index-B61WTTtp.js";const _={class:"size-full"},P={ref:"canvas",class:"size-full bg-[#333436]"},k=w({__name:"index",setup(A){const d=g("canvas"),o=y(!1);let n=null;class x{rangeR;r;rSpeed;cvs;ctx;x;y;xSpeed;ySpeed;lastMoveTime;fillStyle;maxTimeDiff=100;constructor({cvs:t,ctx:e}){this.rangeR=[3,7],this.r=a(this.rangeR[0],this.rangeR[1]),this.rSpeed=a(-1,1),this.cvs=t,this.ctx=e,this.x=a(0+this.r,this.cvs.width-this.r),this.y=a(0+this.r,this.cvs.height-this.r),this.xSpeed=a(-10,10),this.ySpeed=a(-10,10),this.lastMoveTime=null,this.fillStyle=u()}setLastMoveTime(t){this.lastMoveTime=t}draw(){if(this.lastMoveTime){const i=Date.now()-this.lastMoveTime,s=Math.min(i,this.maxTimeDiff)/1e3;let h=this.x+s*this.xSpeed,c=this.y+s*this.ySpeed,l=this.r+s*this.rSpeed;l<=this.rangeR[0]?(l=this.rangeR[0],this.rSpeed=Math.abs(this.rSpeed)):l>=this.rangeR[1]&&(l=this.rangeR[1],this.rSpeed=-Math.abs(this.rSpeed)),h-this.r<0?(h=this.r,this.xSpeed=Math.abs(this.xSpeed)):h+this.r>this.cvs.width&&(h=this.cvs.width-this.r,this.xSpeed=-Math.abs(this.xSpeed)),c-this.r<0?(c=this.r,this.ySpeed=Math.abs(this.ySpeed)):c+this.r>this.cvs.height&&(c=this.cvs.height-this.r,this.ySpeed=-Math.abs(this.ySpeed)),this.x=h,this.y=c,this.r=l}const t=Math.max(0,this.r);this.ctx.beginPath(),this.ctx.arc(this.x,this.y,t,0,2*Math.PI),this.ctx.fillStyle=this.fillStyle,this.ctx.fill(),this.lastMoveTime=Date.now()}}class p{points;maxDis;cvs;ctx;constructor({pointNumber:t=30,maxDis:e=100,cvs:i,ctx:s}){this.points=new Array(t).fill(0).map(()=>new x({cvs:i,ctx:s})),this.maxDis=e,this.cvs=i,this.ctx=s}resetPointsTime(){const t=Date.now();this.points.forEach(e=>{e.setLastMoveTime(t)})}draw(){if(o.value){if(document.hidden){setTimeout(()=>this.draw(),100);return}requestAnimationFrame(()=>this.draw()),this.ctx.clearRect(0,0,this.cvs.width,this.cvs.height);for(const[t,e]of this.points.entries()){e.draw();for(const i of this.points.slice(t+1)){const s=Math.sqrt((e.x-i.x)**2+(e.y-i.y)**2);isNaN(s)||s>this.maxDis||(this.ctx.beginPath(),this.ctx.moveTo(e.x,e.y),this.ctx.lineTo(i.x,i.y),this.ctx.strokeStyle=`rgba(200,200,200,${Math.max(0,Math.min(1,1-s/this.maxDis))})`,this.ctx.stroke(),this.ctx.closePath())}}}}}function v(){if(!d.value)return;console.log("渲染动画"),o.value=!0;const r=1920,t=110*window.innerWidth/r,e=80*window.innerWidth/r,i=d.value,s=i.getContext("2d");if(!s)return;const h=window.devicePixelRatio||1;i.width=window.innerWidth*h,i.height=window.innerHeight*h,s.scale(h,h),n=new p({pointNumber:Math.floor(t),maxDis:Math.floor(e),cvs:i,ctx:s}),n.draw()}const m=S(v,200);function f(){document.hidden?o.value=!1:d.value&&n&&(o.value=!0,n.resetPointsTime(),n.draw())}return window.addEventListener("resize",m),document.addEventListener("visibilitychange",f),M(()=>{m()}),b(()=>{o.value=!1,window.removeEventListener("resize",m),document.removeEventListener("visibilitychange",f),n=null}),(r,t)=>(R(),T("div",_,[D("canvas",P,null,512)]))}});export{k as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as r}from"./index-D5P-Yy2I.js";import{d as c,r as l,c as i,aI as p,b as d,w as f,f as m,E as u,a as x,t as _,o as y}from"./index-B61WTTtp.js";const C={class:"flex items-center gap-[10px]"},k=c({__name:"index",props:{text:{type:String,default:""}},setup(t){const o=t;async function a(){const e=await r(o.text);e&&u.success(e)}return(e,s)=>{const n=l("el-button");return y(),i("div",C,[p(e.$slots,"default",{},()=>[x("span",null,_(t.text),1)]),d(n,{size:"small",onClick:a},{default:f(()=>[...s[0]||(s[0]=[m("复制",-1)])]),_:1})])}}});export{k as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aA as v,d as _,k as w,m as x,bM as b,r as y,B as C,w as i,b as h,f as T,t as k,ai as B,o as S}from"./index-B61WTTtp.js";async function N(n,l){return v("/__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:n})}const V=_({__name:"index",props:{type:{default:"primary"},disabled:{type:Boolean,default:!1},text:{default:"获取验证码"},countdownText:{default:"{n}秒后重试"},duration:{default:60}},emits:["send","finish"],setup(n,{expose:l,emit:r}){const a=n,s=r,e=w(0);let t=null;const u=x(()=>e.value>0?a.countdownText.replace("{n}",e.value.toString()):a.text),d=()=>{e.value=a.duration,t=window.setInterval(()=>{e.value--,e.value<=0&&(clearInterval(t),t=null,s("finish"))},1e3)},c=async o=>{a.disabled||e.value>0||(o.start(),s("send",{end:o.end,startCountdown:d}))};return b(()=>{t&&(clearInterval(t),t=null)}),l({startCountdown:d,getCountdown:()=>e.value}),(o,g)=>{const p=y("el-button");return S(),C(B,null,{default:i(({instance:f,loading:m})=>[h(p,{type:n.type,loading:m,disabled:n.disabled||e.value>0,onClick:I=>c(f),class:"whitespace-nowrap"},{default:i(()=>[T(k(u.value),1)]),_:1},8,["type","loading","disabled","onClick"])]),_:1})}}});export{V as _,N as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aA as t,d as l,h as _,aI as u,bU as f,r as h,c as y,b as C,Z as v,H as T,bV as g,E as p,o as S}from"./index-B61WTTtp.js";async function O(e,o){return t("/__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function b(e,o){return t("/__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function w(e,o){return t("/__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function x(e,o){return t("/__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function E(e,o){return t("/__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function M(e,o){return t("/__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function k(e,o){return t("/__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function R(e,o){return t("/__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}async function U(e,o){return t("/__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...o||{}})}async function B(e,o){return t("/__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...o||{}})}async function V(e,o){return t("/__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:e,...o||{}})}async function A(e,o){return t("/__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:e})}const D=l({__name:"index",setup(e){const o=_();function r(){const a=o.isRealUserLogin();return a||o.logoutDialog(),a}return(a,c)=>u(a.$slots,"default",{isLogin:r})}}),$={class:"size-full"},F=l({__name:"index",emits:["select"],setup(e,{emit:o}){const r=o,c="/api/v1/vuefinder",m={selectionMode:"single",driver:new f({baseURL:c,url:{list:"/list"}}),features:{search:!1,upload:!1,delete:!1,rename:!1,preview:!1,edit:!1,archive:!1,unarchive:!1,newfile:!1,newfolder:!1,fullscreen:!1,download:!1,language:!0,move:!1,copy:!1,history:!1,theme:!1,pinned:!1},contextMenuItems:[...g,{id:"select-folder",title:()=>"选择",action:(i,n)=>{if(n.length>1){p.error("不支持多选");return}const{type:s="dir"}=n[0];if(s!=="dir"){p.error("只能选择文件夹");return}r("select",n[0])},show:(i,n)=>{const{target:s,items:d}=n;return d.length>1?!1:s?.type==="dir"}}],config:{initialPath:T.dirname},locale:"zhCN"};return(i,n)=>{const s=h("VueFinder");return S(),y("div",$,[C(s,v({id:"vuefinder"},m),null,16)])}}});export{D as _,V as a,x as b,A as c,M as d,k as e,R as f,w as g,b as h,F as i,O as j,U as k,E as l,B as m};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{H as W}from"./atom-one-dark-aMfJu-hk.js";import{d as qe,g as pt,G as gt,k as ie,D as Dt,y as Ue,aO as ft,c as Ze,a as le,aI as Ge,ae as mt,C as Ft,o as fe,i as bt,B as kt,w as Et,p as Ct,ab as At,ao as xt}from"./index-B61WTTtp.js";function Ee(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var G=Ee();function je(t){G=t}var J={exec:()=>null};function F(t,e=""){let r=typeof t=="string"?t:t.source,s={replace:(n,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(S.caret,"$1"),r=r.replace(n,i),s},getRegex:()=>new RegExp(r,e)};return s}var wt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),S={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,listReplaceTabs:/^\t+/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},yt=/^(?:[ \t]*(?:\n|$))+/,St=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Bt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,te=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Tt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ce=/(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=F(Qe).replace(/bull/g,Ce).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(),vt=F(Qe).replace(/bull/g,Ce).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(),Ae=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_t=/^[^\n]+/,xe=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rt=F(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Nt=F(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ce).getRegex(),ce="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",we=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$t=F("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\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",we).replace("tag",ce).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),We=F(Ae).replace("hr",te).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"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex(),Lt=F(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",We).getRegex(),ye={blockquote:Lt,code:St,def:Rt,fences:Bt,heading:Tt,hr:te,html:$t,lheading:Xe,list:Nt,newline:yt,paragraph:We,table:J,text:_t},_e=F("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",te).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex(),It={...ye,lheading:vt,table:_e,paragraph:F(Ae).replace("hr",te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex()},Ot={...ye,html:F(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",we).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:J,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:F(Ae).replace("hr",te).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",Xe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Mt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ke=/^( {2,}|\\)\n(?!\s*$)/,Pt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,de=/[\p{P}\p{S}]/u,Se=/[\s\p{P}\p{S}]/u,Ve=/[^\s\p{P}\p{S}]/u,Ht=F(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Se).getRegex(),Ye=/(?!~)[\p{P}\p{S}]/u,qt=/(?!~)[\s\p{P}\p{S}]/u,Ut=/(?:[^\s\p{P}\p{S}]|~)/u,Zt=F(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Je=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Gt=F(Je,"u").replace(/punct/g,de).getRegex(),jt=F(Je,"u").replace(/punct/g,Ye).getRegex(),et="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qt=F(et,"gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,Se).replace(/punct/g,de).getRegex(),Xt=F(et,"gu").replace(/notPunctSpace/g,Ut).replace(/punctSpace/g,qt).replace(/punct/g,Ye).getRegex(),Wt=F("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,Se).replace(/punct/g,de).getRegex(),Kt=F(/\\(punct)/,"gu").replace(/punct/g,de).getRegex(),Vt=F(/^<(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(),Yt=F(we).replace("(?:-->|$)","-->").getRegex(),Jt=F("^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",Yt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ae=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,en=F(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ae).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tt=F(/^!?\[(label)\]\[(ref)\]/).replace("label",ae).replace("ref",xe).getRegex(),nt=F(/^!?\[(ref)\](?:\[\])?/).replace("ref",xe).getRegex(),tn=F("reflink|nolink(?!\\()","g").replace("reflink",tt).replace("nolink",nt).getRegex(),Re=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Be={_backpedal:J,anyPunctuation:Kt,autolink:Vt,blockSkip:Zt,br:Ke,code:Mt,del:J,emStrongLDelim:Gt,emStrongRDelimAst:Qt,emStrongRDelimUnd:Wt,escape:zt,link:en,nolink:nt,punctuation:Ht,reflink:tt,reflinkSearch:tn,tag:Jt,text:Pt,url:J},nn={...Be,link:F(/^!?\[(label)\]\((.*?)\)/).replace("label",ae).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae).getRegex()},me={...Be,emStrongRDelimAst:Xt,emStrongLDelim:jt,url:F(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Re).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:F(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Re).getRegex()},rn={...me,br:F(Ke).replace("{2,}","*").getRegex(),text:F(me.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},se={normal:ye,gfm:It,pedantic:Ot},K={normal:Be,gfm:me,breaks:rn,pedantic:nn},sn={"&":"&","<":"<",">":">",'"':""","'":"'"},Ne=t=>sn[t];function M(t,e){if(e){if(S.escapeTest.test(t))return t.replace(S.escapeReplace,Ne)}else if(S.escapeTestNoEncode.test(t))return t.replace(S.escapeReplaceNoEncode,Ne);return t}function $e(t){try{t=encodeURI(t).replace(S.percentDecode,"%")}catch{return null}return t}function Le(t,e){let r=t.replace(S.findPipe,(l,i,u)=>{let a=!1,o=i;for(;--o>=0&&u[o]==="\\";)a=!a;return a?"|":" |"}),s=r.split(S.splitPipe),n=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(;n<s.length;n++)s[n]=s[n].trim().replace(S.slashPipe,"|");return s}function V(t,e,r){let s=t.length;if(s===0)return"";let n=0;for(;n<s&&t.charAt(s-n-1)===e;)n++;return t.slice(0,s-n)}function ln(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])r++;else if(t[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function Ie(t,e,r,s,n){let l=e.href,i=e.title||null,u=t[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:u,tokens:s.inlineTokens(u)};return s.state.inLink=!1,a}function an(t,e,r){let s=t.match(r.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
|
|
3
|
+
`).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[u]=i;return u.length>=n.length?l.slice(n.length):l}).join(`
|
|
4
|
+
`)}var oe=class{options;rules;lexer;constructor(t){this.options=t||G}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 r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:V(r,`
|
|
5
|
+
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],s=an(r,e[3]||"",this.rules);return{type:"code",raw:r,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 r=e[2].trim();if(this.rules.other.endingHash.test(r)){let s=V(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:V(e[0],`
|
|
6
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=V(e[0],`
|
|
7
|
+
`).split(`
|
|
8
|
+
`),s="",n="",l=[];for(;r.length>0;){let i=!1,u=[],a;for(a=0;a<r.length;a++)if(this.rules.other.blockquoteStart.test(r[a]))u.push(r[a]),i=!0;else if(!i)u.push(r[a]);else break;r=r.slice(a);let o=u.join(`
|
|
9
|
+
`),c=o.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
11
|
+
${o}`:o,n=n?`${n}
|
|
12
|
+
${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,l,!0),this.lexer.state.top=h,r.length===0)break;let d=l.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let D=d,g=D.raw+`
|
|
13
|
+
`+r.join(`
|
|
14
|
+
`),k=this.blockquote(g);l[l.length-1]=k,s=s.substring(0,s.length-D.raw.length)+k.raw,n=n.substring(0,n.length-D.text.length)+k.text;break}else if(d?.type==="list"){let D=d,g=D.raw+`
|
|
15
|
+
`+r.join(`
|
|
16
|
+
`),k=this.list(g);l[l.length-1]=k,s=s.substring(0,s.length-d.raw.length)+k.raw,n=n.substring(0,n.length-D.raw.length)+k.raw,r=g.substring(l.at(-1).raw.length).split(`
|
|
17
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:l,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),s=r.length>1,n={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let l=this.rules.other.listItemRegex(r),i=!1;for(;t;){let a=!1,o="",c="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;o=e[0],t=t.substring(o.length);let h=e[2].split(`
|
|
18
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),d=t.split(`
|
|
19
|
+
`,1)[0],D=!h.trim(),g=0;if(this.options.pedantic?(g=2,c=h.trimStart()):D?g=e[1].length+1:(g=e[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,c=h.slice(g),g+=e[1].length),D&&this.rules.other.blankLine.test(d)&&(o+=d+`
|
|
20
|
+
`,t=t.substring(d.length+1),a=!0),!a){let k=this.rules.other.nextBulletRegex(g),w=this.rules.other.hrRegex(g),L=this.rules.other.fencesBeginRegex(g),y=this.rules.other.headingBeginRegex(g),P=this.rules.other.htmlBeginRegex(g);for(;t;){let v=t.split(`
|
|
21
|
+
`,1)[0],T;if(d=v,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),T=d):T=d.replace(this.rules.other.tabCharGlobal," "),L.test(d)||y.test(d)||P.test(d)||k.test(d)||w.test(d))break;if(T.search(this.rules.other.nonSpaceChar)>=g||!d.trim())c+=`
|
|
22
|
+
`+T.slice(g);else{if(D||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(h)||y.test(h)||w.test(h))break;c+=`
|
|
23
|
+
`+d}!D&&!d.trim()&&(D=!0),o+=v+`
|
|
24
|
+
`,t=t.substring(v.length+1),h=T.slice(g)}}n.loose||(i?n.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(i=!0)),n.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=o}let u=n.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let a of n.items){if(this.lexer.state.top=!1,a.tokens=this.lexer.blockTokens(a.text,[]),a.task){if(a.text=a.text.replace(this.rules.other.listReplaceTask,""),a.tokens[0]?.type==="text"||a.tokens[0]?.type==="paragraph"){a.tokens[0].raw=a.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),a.tokens[0].text=a.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let o=this.rules.other.listTaskCheckbox.exec(a.raw);if(o){let c={type:"checkbox",raw:o[0]+" ",checked:o[0]!=="[ ]"};a.checked=c.checked,n.loose?a.tokens[0]&&["paragraph","text"].includes(a.tokens[0].type)&&"tokens"in a.tokens[0]&&a.tokens[0].tokens?(a.tokens[0].raw=c.raw+a.tokens[0].raw,a.tokens[0].text=c.raw+a.tokens[0].text,a.tokens[0].tokens.unshift(c)):a.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):a.tokens.unshift(c)}}if(!n.loose){let o=a.tokens.filter(h=>h.type==="space"),c=o.length>0&&o.some(h=>this.rules.other.anyLine.test(h.raw));n.loose=c}}if(n.loose)for(let a of n.items){a.loose=!0;for(let o of a.tokens)o.type==="text"&&(o.type="paragraph")}return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=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"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:s,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Le(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
+
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?l.align.push("right"):this.rules.other.tableAlignCenter.test(i)?l.align.push("center"):this.rules.other.tableAlignLeft.test(i)?l.align.push("left"):l.align.push(null);for(let i=0;i<r.length;i++)l.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:l.align[i]});for(let i of n)l.rows.push(Le(i,l.header.length).map((u,a)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:l.align[a]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
26
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}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 r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=V(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=ln(e[2],"()");if(l===-2)return;if(l>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],n=l[3])}else n=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(r)?s=s.slice(1):s=s.slice(1,-1)),Ie(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return Ie(r,n,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...s[0]].length-1,l,i,u=n,a=0,o=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*t.length+n);(s=o.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(i=[...l].length,s[3]||s[4]){u+=i;continue}else if((s[5]||s[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(u-=i,u>0)continue;i=Math.min(i,i+u+a);let c=[...s[0]][0].length,h=t.slice(0,n+s.index+c+i);if(Math.min(n,i)%2){let D=h.slice(1,-1);return{type:"em",raw:h,text:D,tokens:this.lexer.inlineTokens(D)}}let d=h.slice(2,-2);return{type:"strong",raw:h,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,s;return e[2]==="@"?(r=e[1],s="mailto:"+r):(r=e[1],s=r),{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,s;if(e[2]==="@")r=e[0],s="mailto:"+r;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);r=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},N=class Fe{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G,this.options.tokenizer=this.options.tokenizer||new oe,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 r={other:S,block:se.normal,inline:K.normal};this.options.pedantic?(r.block=se.pedantic,r.inline=K.pedantic):this.options.gfm&&(r.block=se.gfm,this.options.breaks?r.inline=K.breaks:r.inline=K.gfm),this.tokenizer.rules=r}static get rules(){return{block:se,inline:K}}static lex(e,r){return new Fe(r).lex(e)}static lexInline(e,r){return new Fe(r).inlineTokens(e)}lex(e){e=e.replace(S.carriageReturn,`
|
|
27
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],s=!1){for(this.options.pedantic&&(e=e.replace(S.tabCharGlobal," ").replace(S.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(i=>(n=i.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let i=r.at(-1);n.raw.length===1&&i!==void 0?i.raw+=`
|
|
28
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
29
|
+
`)?"":`
|
|
30
|
+
`)+n.raw,i.text+=`
|
|
31
|
+
`+n.text,this.inlineQueue.at(-1).src=i.text):r.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
32
|
+
`)?"":`
|
|
33
|
+
`)+n.raw,i.text+=`
|
|
34
|
+
`+n.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),r.push(n);continue}let l=e;if(this.options.extensions?.startBlock){let i=1/0,u=e.slice(1),a;this.options.extensions.startBlock.forEach(o=>{a=o.call({lexer:this},u),typeof a=="number"&&a>=0&&(i=Math.min(i,a))}),i<1/0&&i>=0&&(l=e.substring(0,i+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let i=r.at(-1);s&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
|
|
35
|
+
`)?"":`
|
|
36
|
+
`)+n.raw,i.text+=`
|
|
37
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(n),s=l.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
38
|
+
`)?"":`
|
|
39
|
+
`)+n.raw,i.text+=`
|
|
40
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(n);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let s=e,n=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)a.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)l=n[2]?n[2].length:0,s=s.slice(0,n.index+l)+"["+"a".repeat(n[0].length-l-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,u="";for(;e;){i||(u=""),i=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=r.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(a=this.tokenizer.emStrong(e,s,u)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),r.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),r.push(a);continue}let o=e;if(this.options.extensions?.startInline){let c=1/0,h=e.slice(1),d;this.options.extensions.startInline.forEach(D=>{d=D.call({lexer:this},h),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(o)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(u=a.raw.slice(-1)),i=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):r.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},ue=class{options;parser;constructor(t){this.options=t||G}space(t){return""}code({text:t,lang:e,escaped:r}){let s=(e||"").match(S.notSpaceStart)?.[0],n=t.replace(S.endingNewline,"")+`
|
|
41
|
+
`;return s?'<pre><code class="language-'+M(s)+'">'+(r?n:M(n,!0))+`</code></pre>
|
|
42
|
+
`:"<pre><code>"+(r?n:M(n,!0))+`</code></pre>
|
|
43
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
44
|
+
${this.parser.parse(t)}</blockquote>
|
|
45
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
46
|
+
`}hr(t){return`<hr>
|
|
47
|
+
`}list(t){let e=t.ordered,r=t.start,s="";for(let i=0;i<t.items.length;i++){let u=t.items[i];s+=this.listitem(u)}let n=e?"ol":"ul",l=e&&r!==1?' start="'+r+'"':"";return"<"+n+l+`>
|
|
48
|
+
`+s+"</"+n+`>
|
|
49
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
50
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
51
|
+
`}table(t){let e="",r="";for(let n=0;n<t.header.length;n++)r+=this.tablecell(t.header[n]);e+=this.tablerow({text:r});let s="";for(let n=0;n<t.rows.length;n++){let l=t.rows[n];r="";for(let i=0;i<l.length;i++)r+=this.tablecell(l[i]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
52
|
+
<thead>
|
|
53
|
+
`+e+`</thead>
|
|
54
|
+
`+s+`</table>
|
|
55
|
+
`}tablerow({text:t}){return`<tr>
|
|
56
|
+
${t}</tr>
|
|
57
|
+
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
58
|
+
`}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>${M(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let s=this.parser.parseInline(r),n=$e(t);if(n===null)return s;t=n;let l='<a href="'+t+'"';return e&&(l+=' title="'+M(e)+'"'),l+=">"+s+"</a>",l}image({href:t,title:e,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let n=$e(t);if(n===null)return M(r);t=n;let l=`<img src="${t}" alt="${r}"`;return e&&(l+=` title="${M(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:M(t.text)}},Te=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}},$=class be{options;renderer;textRenderer;constructor(e){this.options=e||G,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Te}static parse(e,r){return new be(r).parse(e)}static parseInline(e,r){return new be(r).parseInline(e)}parse(e){let r="";for(let s=0;s<e.length;s++){let n=e[s];if(this.options.extensions?.renderers?.[n.type]){let i=n,u=this.options.extensions.renderers[i.type].call({parser:this},i);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){r+=u||"";continue}}let l=n;switch(l.type){case"space":{r+=this.renderer.space(l);break}case"hr":{r+=this.renderer.hr(l);break}case"heading":{r+=this.renderer.heading(l);break}case"code":{r+=this.renderer.code(l);break}case"table":{r+=this.renderer.table(l);break}case"blockquote":{r+=this.renderer.blockquote(l);break}case"list":{r+=this.renderer.list(l);break}case"checkbox":{r+=this.renderer.checkbox(l);break}case"html":{r+=this.renderer.html(l);break}case"def":{r+=this.renderer.def(l);break}case"paragraph":{r+=this.renderer.paragraph(l);break}case"text":{r+=this.renderer.text(l);break}default:{let i='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return r}parseInline(e,r=this.renderer){let s="";for(let n=0;n<e.length;n++){let l=e[n];if(this.options.extensions?.renderers?.[l.type]){let u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=u||"";continue}}let i=l;switch(i.type){case"escape":{s+=r.text(i);break}case"html":{s+=r.html(i);break}case"link":{s+=r.link(i);break}case"image":{s+=r.image(i);break}case"checkbox":{s+=r.checkbox(i);break}case"strong":{s+=r.strong(i);break}case"em":{s+=r.em(i);break}case"codespan":{s+=r.codespan(i);break}case"br":{s+=r.br(i);break}case"del":{s+=r.del(i);break}case"text":{s+=r.text(i);break}default:{let u='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return s}},Y=class{options;block;constructor(t){this.options=t||G}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(){return this.block?N.lex:N.lexInline}provideParser(){return this.block?$.parse:$.parseInline}},on=class{defaults=Ee();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=$;Renderer=ue;TextRenderer=Te;Lexer=N;Tokenizer=oe;Hooks=Y;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let s of t)switch(r=r.concat(e.call(this,s)),s.type){case"table":{let n=s;for(let l of n.header)r=r.concat(this.walkTokens(l.tokens,e));for(let l of n.rows)for(let i of l)r=r.concat(this.walkTokens(i.tokens,e));break}case"list":{let n=s;r=r.concat(this.walkTokens(n.items,e));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let i=n[l].flat(1/0);r=r.concat(this.walkTokens(i,e))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let l=e.renderers[n.name];l?e.renderers[n.name]=function(...i){let u=n.renderer.apply(this,i);return u===!1&&(u=l.apply(this,i)),u}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[n.level];l?l.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),r.renderer){let n=this.defaults.renderer||new ue(this.defaults);for(let l in r.renderer){if(!(l in n))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,u=r.renderer[i],a=n[i];n[i]=(...o)=>{let c=u.apply(n,o);return c===!1&&(c=a.apply(n,o)),c||""}}s.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new oe(this.defaults);for(let l in r.tokenizer){if(!(l in n))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,u=r.tokenizer[i],a=n[i];n[i]=(...o)=>{let c=u.apply(n,o);return c===!1&&(c=a.apply(n,o)),c}}s.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new Y;for(let l in r.hooks){if(!(l in n))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,u=r.hooks[i],a=n[i];Y.passThroughHooks.has(l)?n[i]=o=>{if(this.defaults.async&&Y.passThroughHooksRespectAsync.has(l))return(async()=>{let h=await u.call(n,o);return a.call(n,h)})();let c=u.call(n,o);return a.call(n,c)}:n[i]=(...o)=>{if(this.defaults.async)return(async()=>{let h=await u.apply(n,o);return h===!1&&(h=await a.apply(n,o)),h})();let c=u.apply(n,o);return c===!1&&(c=a.apply(n,o)),c}}s.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,l=r.walkTokens;s.walkTokens=function(i){let u=[];return u.push(l.call(this,i)),n&&(u=u.concat(n.call(this,i))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return N.lex(t,e??this.defaults)}parser(t,e){return $.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let s={...r},n={...this.defaults,...s},l=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return l(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 l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let i=n.hooks?await n.hooks.preprocess(e):e,u=await(n.hooks?await n.hooks.provideLexer():t?N.lex:N.lexInline)(i,n),a=n.hooks?await n.hooks.processAllTokens(u):u;n.walkTokens&&await Promise.all(this.walkTokens(a,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser():t?$.parse:$.parseInline)(a,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(l);try{n.hooks&&(e=n.hooks.preprocess(e));let i=(n.hooks?n.hooks.provideLexer():t?N.lex:N.lexInline)(e,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let u=(n.hooks?n.hooks.provideParser():t?$.parse:$.parseInline)(i,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(i){return l(i)}}}onError(t,e){return r=>{if(r.message+=`
|
|
59
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+M(r.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},Z=new on;function b(t,e){return Z.parse(t,e)}b.options=b.setOptions=function(t){return Z.setOptions(t),b.defaults=Z.defaults,je(b.defaults),b};b.getDefaults=Ee;b.defaults=G;b.use=function(...t){return Z.use(...t),b.defaults=Z.defaults,je(b.defaults),b};b.walkTokens=function(t,e){return Z.walkTokens(t,e)};b.parseInline=Z.parseInline;b.Parser=$;b.parser=$.parse;b.Renderer=ue;b.TextRenderer=Te;b.Lexer=N;b.lexer=N.lex;b.Tokenizer=oe;b.Hooks=Y;b.parse=b;b.options;b.setOptions;b.use;b.walkTokens;b.parseInline;$.parse;N.lex;function Oe(t){const e=t.regex,r=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},l={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=t.inherit(l,{begin:/\(/,end:/\)/}),u=t.inherit(t.APOS_STRING_MODE,{className:"string"}),a=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),o={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[l,a,u,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[l,i,a,u]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[o],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[o],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(r,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:o}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const ze="[A-Za-z$_][0-9A-Za-z$_]*",un=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],cn=["true","false","null","undefined","NaN","Infinity"],rt=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],st=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],it=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],dn=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],hn=[].concat(it,rt,st);function pn(t){const e=t.regex,r=(x,{after:I})=>{const z="</"+x[0].slice(1);return x.input.indexOf(z,I)!==-1},s=ze,n={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(x,I)=>{const z=x[0].length+x.index,Q=x.input[z];if(Q==="<"||Q===","){I.ignoreMatch();return}Q===">"&&(r(x,{after:z})||I.ignoreMatch());let B;const re=x.input.substring(z);if(B=re.match(/^\s*=/)){I.ignoreMatch();return}if((B=re.match(/^\s+extends\s+/))&&B.index===0){I.ignoreMatch();return}}},u={$pattern:ze,keyword:un,literal:cn,built_in:hn,"variable.language":dn},a="[0-9](_?[0-9])*",o=`\\.(${a})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${c})((${o})|\\.)?|(${o}))[eE][+-]?(${a})\\b`},{begin:`\\b(${c})\\b((${o})\\b|\\.)?|(${o})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},D={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,d]},y={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},P=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,D,g,k,w,{match:/\$\d+/},h];d.contains=P.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(P)});const v=[].concat(y,d.contains),T=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(v)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:T},q={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,e.concat(s,"(",e.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},j={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rt,...st]}},he={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},p={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},f={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function E(x){return e.concat("(?!",x.join("|"),")")}const C={match:e.concat(/\b/,E([...it,"super","import"].map(x=>`${x}\\s*\\(`)),s,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:e.concat(/\./,e.lookahead(e.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},ne="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",pe={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ne)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:j},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),he,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,D,g,k,w,y,{match:/\$\d+/},h,j,{scope:"attr",match:s+e.lookahead(":"),relevance:0},pe,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,t.REGEXP_MODE,{className:"function",begin:ne,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:n.begin,end:n.end},{match:l},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},p,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},C,f,q,X,{match:/\$[(.]/}]}}const gn=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Dn=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],fn=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],mn=[...Dn,...fn],Fn=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),bn=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),kn=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),En=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Cn(t){const e=t.regex,r=gn(t),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n="and or not only",l=/@-?\w[\w]*(-\w+)*/,i="[a-zA-Z-][a-zA-Z0-9_-]*",u=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,s,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+i,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+bn.join("|")+")"},{begin:":(:)?("+kn.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+En.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:l},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:n,attribute:Fn.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+mn.join("|")+")\\b"}]}}const An=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,xn=Object.hasOwnProperty;class lt{constructor(){this.occurrences,this.reset()}slug(e,r){const s=this;let n=wn(e,r===!0);const l=n;for(;xn.call(s.occurrences,n);)s.occurrences[l]++,n=l+"-"+s.occurrences[l];return s.occurrences[n]=0,n}reset(){this.occurrences=Object.create(null)}}function wn(t,e){return typeof t!="string"?"":(e||(t=t.toLowerCase()),t.replace(An,"").replace(/ /g,"-"))}let at=new lt,ot=[];const yn=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Sn(t){return t.replace(yn,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function Bn({prefix:t="",globalSlugs:e=!1}={}){return{headerIds:!1,hooks:{preprocess(r){return e||Tn(),r}},useNewRenderer:!0,renderer:{heading({tokens:r,depth:s}){const n=this.parser.parseInline(r),l=Sn(n).trim().replace(/<[!\/a-z].*?>/gi,""),i=s,u=`${t}${at.slug(l.toLowerCase())}`,a={level:i,text:n,id:u,raw:l};return ot.push(a),`<h${i} id="${u}">${n}</h${i}>
|
|
60
|
+
`}}}}function Tn(){ot=[],at=new lt}function vn(t){const e=[].forEach,r=[].some,s=typeof window<"u"&&document.body,n=" ";let l,i=!0,u=0;function a(p,f){const E=f.appendChild(c(p));if(p.children.length){const C=h(p.isCollapsed);p.children.forEach(A=>{a(A,C)}),E.appendChild(C)}}function o(p,f){const C=h(!1);if(f.forEach(A=>{a(A,C)}),l=p||l,l!==null)return l.firstChild&&l.removeChild(l.firstChild),f.length===0?l:l.appendChild(C)}function c(p){const f=document.createElement("li"),E=document.createElement("a");return t.listItemClass&&f.setAttribute("class",t.listItemClass),t.onClick&&(E.onclick=t.onClick),t.includeTitleTags&&E.setAttribute("title",p.textContent),t.includeHtml&&p.childNodes.length?e.call(p.childNodes,C=>{E.appendChild(C.cloneNode(!0))}):E.textContent=p.textContent,E.setAttribute("href",`${t.basePath}#${p.id}`),E.setAttribute("class",`${t.linkClass+n}node-name--${p.nodeName}${n}${t.extraLinkClasses}`),f.appendChild(E),f}function h(p){const f=t.orderedList?"ol":"ul",E=document.createElement(f);let C=t.listClass+n+t.extraListClasses;return p&&(C=C+n+t.collapsibleClass,C=C+n+t.isCollapsedClass),E.setAttribute("class",C),E}function d(){const p=q(),f=document.querySelector(t.positionFixedSelector);t.fixedSidebarOffset==="auto"&&(t.fixedSidebarOffset=l.offsetTop),p>t.fixedSidebarOffset?f.className.indexOf(t.positionFixedClass)===-1&&(f.className+=n+t.positionFixedClass):f.className=f.className.replace(n+t.positionFixedClass,"")}function D(p){let f=0;return p!==null&&(f=p.offsetTop,t.hasInnerContainers&&(f+=D(p.offsetParent))),f}function g(p,f){return p&&p.className!==f&&(p.className=f),p}function k(p,f){t.positionFixedSelector&&d();const E=p,C=f?.target?.getAttribute?f?.target?.getAttribute("href"):null,A=C&&C.charAt(0)==="#"?v(C.replace("#","")):!1,X=i||A;if(f&&u<5&&u++,X&&l&&E.length>0){const ne=j(E),pe=l.querySelector(`.${t.activeLinkClass}`),x=ne.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1"),I=window.location.hash.replace("#","");let z=x;const Q=T();C&&A?z=C.replace("#",""):I&&I!==x&&Q&&(v(x)||u<=2)&&(z=I);const B=l.querySelector(`.${t.linkClass}[href="${t.basePath}#${z}"]`);if(pe===B)return;const re=l.querySelectorAll(`.${t.linkClass}`);e.call(re,H=>{g(H,H.className.replace(n+t.activeLinkClass,""))});const dt=l.querySelectorAll(`.${t.listItemClass}`);e.call(dt,H=>{g(H,H.className.replace(n+t.activeListItemClass,""))}),B&&B.className.indexOf(t.activeLinkClass)===-1&&(B.className+=n+t.activeLinkClass);const ge=B?.parentNode;ge&&ge.className.indexOf(t.activeListItemClass)===-1&&(ge.className+=n+t.activeListItemClass);const ht=l.querySelectorAll(`.${t.listClass}.${t.collapsibleClass}`);e.call(ht,H=>{H.className.indexOf(t.isCollapsedClass)===-1&&(H.className+=n+t.isCollapsedClass)}),B?.nextSibling&&B.nextSibling.className.indexOf(t.isCollapsedClass)!==-1&&g(B.nextSibling,B.nextSibling.className.replace(n+t.isCollapsedClass,"")),w(B?.parentNode.parentNode)}}function w(p){return p&&p.className.indexOf(t.collapsibleClass)!==-1&&p.className.indexOf(t.isCollapsedClass)!==-1?(g(p,p.className.replace(n+t.isCollapsedClass,"")),w(p.parentNode.parentNode)):p}function L(p){const f=p.target||p.srcElement;typeof f.className!="string"||f.className.indexOf(t.linkClass)===-1||(i=!1)}function y(){i=!0}function P(){return i}function v(p){const f=O();return(document?.getElementById(p)).offsetTop>f.offsetHeight-f.clientHeight*1.4-t.bottomModeThreshold}function T(){const p=O(),f=p.scrollHeight>p.clientHeight,E=q()+p.clientHeight>p.offsetHeight-t.bottomModeThreshold;return f&&E}function O(){let p;return t.scrollContainer&&document.querySelector(t.scrollContainer)?p=document.querySelector(t.scrollContainer):p=document.documentElement||s,p}function q(){return O()?.scrollTop||0}function j(p,f=q()){let E;return r.call(p,(C,A)=>{if(D(C)>f+t.headingsOffset+10){const X=A===0?A:A-1;return E=p[X],!0}if(A===p.length-1)return E=p[p.length-1],!0}),E}function he(p){const f=q(),E=j(p,f),C=T();if((!E||f<5)&&!C)window.location.hash==="#"||window.location.hash===""||window.history.pushState(null,null,"#");else if(E&&!C){const A=`#${E.id}`;window.location.hash!==A&&window.history.pushState(null,null,A)}}return{enableTocAnimation:y,disableTocAnimation:L,render:o,updateToc:k,getCurrentlyHighlighting:P,getTopHeader:j,getScrollTop:q,updateUrlHashForHeader:he}}const _n={tocSelector:".js-toc",tocElement:null,contentSelector:".js-toc-content",contentElement:null,headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(t){},headingsOffset:1,enableUrlHashUpdateOnScroll:!1,scrollHandlerType:"auto",scrollHandlerTimeout:50,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(t){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollingWrapper:null,tocScrollOffset:30,bottomModeThreshold:30};function Rn(t){const e=[].reduce;function r(o){return o[o.length-1]}function s(o){return+o.nodeName.toUpperCase().replace("H","")}function n(o){try{return o instanceof window.HTMLElement||o instanceof window.parent.HTMLElement}catch{return o instanceof window.HTMLElement}}function l(o){if(!n(o))return o;if(t.ignoreHiddenElements&&(!o.offsetHeight||!o.offsetParent))return null;const c=o.getAttribute("data-heading-label")||(t.headingLabelCallback?String(t.headingLabelCallback(o.innerText)):(o.innerText||o.textContent).trim()),h={id:o.id,children:[],nodeName:o.nodeName,headingLevel:s(o),textContent:c};return t.includeHtml&&(h.childNodes=o.childNodes),t.headingObjectCallback?t.headingObjectCallback(h,o):h}function i(o,c){const h=l(o),d=h.headingLevel;let D=c,g=r(D);const k=g?g.headingLevel:0;let w=d-k;for(;w>0&&(g=r(D),!(g&&d===g.headingLevel));)g&&g.children!==void 0&&(D=g.children),w--;return d>=t.collapseDepth&&(h.isCollapsed=!0),D.push(h),D}function u(o,c){let h=c;t.ignoreSelector&&(h=c.split(",").map(function(D){return`${D.trim()}:not(${t.ignoreSelector})`}));try{return o.querySelectorAll(h)}catch{return console.warn(`Headers not found with selector: ${h}`),null}}function a(o){return e.call(o,function(h,d){const D=l(d);return D&&i(D,h.nest),h},{nest:[]})}return{nestHeadingsArray:a,selectHeadings:u}}function Nn(t){var e=t.duration,r=t.offset;if(typeof window>"u"||typeof location>"u")return;var s=location.hash?i(location.href):location.href;n();function n(){document.body.addEventListener("click",a,!1);function a(o){!l(o.target)||o.target.className.indexOf("no-smooth-scroll")>-1||o.target.href.charAt(o.target.href.length-2)==="#"&&o.target.href.charAt(o.target.href.length-1)==="!"||o.target.className.indexOf(t.linkClass)===-1||$n(o.target.hash,{duration:e,offset:r,callback:function(){u(o.target.hash)}})}}function l(a){return a.tagName.toLowerCase()==="a"&&(a.hash.length>0||a.href.charAt(a.href.length-1)==="#")&&(i(a.href)===s||i(a.href)+"#"===s)}function i(a){return a.slice(0,a.lastIndexOf("#"))}function u(a){var o=document.getElementById(a.substring(1));o&&(/^(?:a|select|input|button|textarea)$/i.test(o.tagName)||(o.tabIndex=-1),o.focus())}}function $n(t,e){var r=window.pageYOffset,s={duration:e.duration,offset:e.offset||0,callback:e.callback,easing:e.easing||h},n=document.querySelector('[id="'+decodeURI(t).split("#").join("")+'"]')||document.querySelector('[id="'+t.split("#").join("")+'"]'),l=typeof t=="string"?s.offset+(t?n&&n.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):t,i=typeof s.duration=="function"?s.duration(l):s.duration,u,a;requestAnimationFrame(function(d){u=d,o(d)});function o(d){a=d-u,window.scrollTo(0,s.easing(a,r,l,i)),a<i?requestAnimationFrame(o):c()}function c(){window.scrollTo(0,r+l),typeof s.callback=="function"&&s.callback()}function h(d,D,g,k){return d/=k/2,d<1?g/2*d*d+D:(d--,-g/2*(d*(d-2)-1)+D)}}function Ln(t){const e=t.tocScrollingWrapper||t.tocElement||document.querySelector(t.tocSelector);if(e&&e.scrollHeight>e.clientHeight){const r=e.querySelector(`.${t.activeListItemClass}`);if(r){const n=r.offsetTop-t.tocScrollOffset;e.scrollTop=n>0?n:0}}}let m={},_,De,U,R,ee;function ut(t){let e=!1;m=zn(_n,t||{}),m.scrollSmooth&&(m.duration=m.scrollSmoothDuration,m.offset=m.scrollSmoothOffset,Nn(m)),_=vn(m),De=Rn(m),ve();const r=Pn(m);if(r===null)return;const s=ct(m);if(s===null||(U=De.selectHeadings(r,m.headingSelector),U===null))return;const l=De.nestHeadingsArray(U).nest;if(!m.skipRendering)_.render(s,l);else return this;let i=!1;const u=m.scrollHandlerTimeout||m.throttleTimeout;R=((c,h)=>Mn(c,h,m.scrollHandlerType))(c=>{_.updateToc(U,c),!m.disableTocScrollSync&&!i&&Ln(m),m.enableUrlHashUpdateOnScroll&&e&&_.getCurrentlyHighlighting()&&_.updateUrlHashForHeader(U);const h=c?.target?.scrollingElement?.scrollTop===0;(c&&(c.eventPhase===0||c.currentTarget===null)||h)&&(_.updateToc(U),m.scrollEndCallback?.(c))},u),e||(R(),e=!0),window.onhashchange=window.onscrollend=c=>{R(c)},m.scrollContainer&&document.querySelector(m.scrollContainer)?(document.querySelector(m.scrollContainer).addEventListener("scroll",R,!1),document.querySelector(m.scrollContainer).addEventListener("resize",R,!1)):(document.addEventListener("scroll",R,!1),document.addEventListener("resize",R,!1));let o=null;ee=ke(c=>{i=!0,m.scrollSmooth&&_.disableTocAnimation(c),_.updateToc(U,c),o&&clearTimeout(o),o=setTimeout(()=>{_.enableTocAnimation()},m.scrollSmoothDuration),setTimeout(()=>{i=!1},m.scrollSmoothDuration+100)},m.throttleTimeout),m.scrollContainer&&document.querySelector(m.scrollContainer)?document.querySelector(m.scrollContainer).addEventListener("click",ee,!1):document.addEventListener("click",ee,!1)}function ve(){const t=ct(m);t!==null&&(m.skipRendering||t&&(t.innerHTML=""),m.scrollContainer&&document.querySelector(m.scrollContainer)?(document.querySelector(m.scrollContainer).removeEventListener("scroll",R,!1),document.querySelector(m.scrollContainer).removeEventListener("resize",R,!1),_&&document.querySelector(m.scrollContainer).removeEventListener("click",ee,!1)):(document.removeEventListener("scroll",R,!1),document.removeEventListener("resize",R,!1),_&&document.removeEventListener("click",ee,!1)))}function In(t){ve(),ut(t||m)}const On=Object.prototype.hasOwnProperty;function zn(...t){const e={};for(let r=0;r<t.length;r++){const s=t[r];for(const n in s)On.call(s,n)&&(e[n]=s[n])}return e}function ke(t,e,r){e||(e=250);let s,n;return function(...l){const i=this,u=+new Date;s&&u<s+e?(clearTimeout(n),n=setTimeout(()=>{s=u,t.apply(i,l)},e)):(s=u,t.apply(i,l))}}function Me(t,e){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>t.apply(this,s),e)}}function Mn(t,e,r="auto"){switch(r){case"debounce":return Me(t,e);case"throttle":return ke(t,e);default:return e<334?Me(t,e):ke(t,e)}}function Pn(t){try{return t.contentElement||document.querySelector(t.contentSelector)}catch{return console.warn(`Contents element not found: ${t.contentSelector}`),null}}function ct(t){try{return t.tocElement||document.querySelector(t.tocSelector)}catch{return console.warn(`TOC element not found: ${t.tocSelector}`),null}}const Pe={destroy:ve,init:ut,refresh:In},Hn=qe({__name:"index",props:{contentSelector:{type:String,default:""},headingSelector:{type:String,default:"h1,h2,h3,h4,h5,h6"},scrollContainer:{type:String,default:""},stickyTopDistance:{type:Number,default:0}},setup(t,{expose:e}){const r=t,s=pt(),n=gt(),l=ie(!1),i=async()=>{Pe.destroy();const h=document.querySelector(r.contentSelector);if(!h)return;const d=document.querySelector(r.scrollContainer);d&&(d.addEventListener("scroll",Ft(u,300)),Pe.init({tocSelector:"#toc",contentSelector:r.contentSelector,headingSelector:r.headingSelector,collapseDepth:6,onClick:function(D){D.preventDefault(),D.stopPropagation();const g=D.target.getAttribute("href"),k=h.querySelector(g);k&&(l.value=!0,d.scrollTo({top:k.offsetTop-r.stickyTopDistance,behavior:"smooth"}),c(g))}}),o())};function u(){console.log("滚动结束!"),l.value=!1}const a=()=>{const h=r.headingSelector.split(",").map(D=>`${r.contentSelector} ${D.trim()}`).join(",");return document.querySelectorAll(h)},o=()=>{const h=document.querySelector(r.contentSelector),d=document.querySelector(r.scrollContainer);if(!d||!h)return;const D=a();if(!D.length)return;let g="";const k=new IntersectionObserver(w=>{const L=[];if(w.forEach(y=>{y.isIntersecting&&L.push(y.target)}),L.length>0){L.sort((P,v)=>P.getBoundingClientRect().top-v.getBoundingClientRect().top);const y=L[0]?.id??"";y&&y!==g&&!l.value&&(g=y,s.replace({...n,hash:`#${g}`}))}},{root:d,rootMargin:"0px 0px -80% 0px",threshold:0});return D.forEach(w=>{k.observe(w)}),()=>{k.disconnect()}},c=h=>{document.querySelectorAll("#toc a.toc-link").forEach(D=>{const g=D.closest("li.toc-list-item"),k=D.getAttribute("href")===h;D.classList.toggle("is-active-link",k),g&&g.classList.toggle("is-active-li",k)})};return Dt(()=>{o()}),Ue(()=>n.hash,async h=>{h&&c(h)},{immediate:!0}),ft(()=>{c(n.hash)}),e({initToc:i}),(h,d)=>(fe(),Ze("div",null,[le("nav",{id:"toc",class:"sticky",style:mt({top:t.stickyTopDistance+"px"})},null,4),Ge(h.$slots,"default")]))}}),qn={class:"flex-1 p-[10px] flex flex-col overflow-auto"},Un={class:"md-content break-all"},Zn=["innerHTML"],Gn={key:0},He="组件没有配置README.md文件",Xn=qe({__name:"index",props:{src:{type:String,default:""},showToc:{type:Boolean,default:!1},scrollContainer:{type:String,default:""},stickyTopDistance:{type:Number,default:0}},setup(t){W.registerLanguage("xml",Oe),W.registerLanguage("js",pn),W.registerLanguage("css",Cn),W.registerLanguage("vue",Oe),b.use(Bn({prefix:""}));const e=t,r=ie(""),s=bt("tocbotContainer"),n=ie(!1),l=ie(!1);async function i(){try{if(n.value=!1,!e.src){r.value=He,l.value=!0;return}const a=await(await fetch(e.src)).text();try{if(JSON.parse(a).code===404){r.value=He,l.value=!0;return}}catch(o){console.log("README.md不能解析成json,说明是md内容,正常渲染",o.message)}r.value=await b.parse(a),await xt(),W.highlightAll(),e.showToc&&s.value?.initToc()}catch(u){r.value="加载失败:"+u.message,l.value=!0}finally{n.value=!0}}return Ue(()=>e.src,()=>{i()},{immediate:!0}),(u,a)=>(fe(),kt(Hn,{stickyTopDistance:t.stickyTopDistance,contentSelector:".md-content",scrollContainer:t.scrollContainer||".prose",class:"flex items-start p-[5px]",ref:"tocbotContainer"},{default:Et(()=>[le("div",qn,[le("div",Un,[le("div",{class:At(["prose",{empty:l.value}]),innerHTML:r.value},null,10,Zn)]),n.value?(fe(),Ze("div",Gn,[Ge(u.$slots,"footer")])):Ct("",!0)])]),_:3},8,["stickyTopDistance","scrollContainer"]))}});export{Xn as _};
|