var Hn=Object.defineProperty;var Bn=(a,e,t)=>e in a?Hn(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var E=(a,e,t)=>(Bn(a,typeof e!="symbol"?e+"":e,t),t);import{v as Gn,ad as Wn,_ as jn}from"./index.7ba276e1.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as qn,r as Zn,w as Yn,o as Xn,bW as Vn,bI as Qn,C as ke,D as nt,aI as q,aH as Z,u as Jn,G as qt,aM as he,aN as Ne,aK as Zt,aJ as Yt,aE as Xt,bX as Kn,b8 as ei,bh as ti,bK as ni,bO as ii}from"./arco.9755215d.js";import{g as si}from"./vue.e23f7fca.js";import{u as ri}from"./loading.3855ec1d.js";import{L as oi}from"./index.b12bb178.js";import{S as li}from"./index.ad00038a.js";import"./chart.e5f26fc3.js";import"./slot.820141bd.js";function pt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let re=pt();function pn(a){re=a}const hn=/[&<>"']/,ai=new RegExp(hn.source,"g"),fn=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ci=new RegExp(fn.source,"g"),ui={"&":"&","<":"<",">":">",'"':""","'":"'"},Vt=a=>ui[a];function U(a,e){if(e){if(hn.test(a))return a.replace(ai,Vt)}else if(fn.test(a))return a.replace(ci,Vt);return a}const pi=/(^|[^\[])\^/g;function T(a,e){let t=typeof a=="string"?a:a.source;e=e||"";const n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(pi,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function Qt(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}const Ae={exec:()=>null};function Jt(a,e){const t=a.replace(/\|/g,(i,r,l)=>{let c=!1,h=r;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const i=s.match(/^\s+/);if(i===null)return s;const[r]=i;return r.length>=n.length?s.slice(n.length):s}).join(` `)}class Ue{constructor(e){E(this,"options");E(this,"rules");E(this,"lexer");this.options=e||re}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:be(n,` `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=fi(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=be(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:be(t[0],` `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=be(t[0],` `).split(` `),s="",i="";const r=[];for(;n.length>0;){let l=!1;const c=[];let h;for(h=0;h/.test(n[h]))c.push(n[h]),l=!0;else if(!l)c.push(n[h]);else break;n=n.slice(h);const p=c.join(` `),m=p.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` $1`).replace(/^ {0,3}>[ \t]?/gm,"");s=s?`${s} ${p}`:p,i=i?`${i} ${m}`:m;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,r,!0),this.lexer.state.top=g,n.length===0)break;const x=r[r.length-1];if((x==null?void 0:x.type)==="code")break;if((x==null?void 0:x.type)==="blockquote"){const b=x,_=b.raw+` `+n.join(` `),O=this.blockquote(_);r[r.length-1]=O,s=s.substring(0,s.length-b.raw.length)+O.raw,i=i.substring(0,i.length-b.text.length)+O.text;break}else if((x==null?void 0:x.type)==="list"){const b=x,_=b.raw+` `+n.join(` `),O=this.list(_);r[r.length-1]=O,s=s.substring(0,s.length-x.raw.length)+O.raw,i=i.substring(0,i.length-b.raw.length)+O.raw,n=_.substring(r[r.length-1].raw.length).split(` `);continue}}return{type:"blockquote",raw:s,tokens:r,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let l=!1;for(;e;){let c=!1,h="",p="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let m=t[2].split(` `,1)[0].replace(/^\t+/,j=>" ".repeat(3*j.length)),g=e.split(` `,1)[0],x=!m.trim(),b=0;if(this.options.pedantic?(b=2,p=m.trimStart()):x?b=t[1].length+1:(b=t[2].search(/[^ ]/),b=b>4?1:b,p=m.slice(b),b+=t[1].length),x&&/^[ \t]*$/.test(g)&&(h+=g+` `,e=e.substring(g.length+1),c=!0),!c){const j=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,b-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),X=new RegExp(`^ {0,${Math.min(3,b-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,b-1)}}#`),H=new RegExp(`^ {0,${Math.min(3,b-1)}}<[a-z].*>`,"i");for(;e;){const z=e.split(` `,1)[0];let te;if(g=z,this.options.pedantic?(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),te=g):te=g.replace(/\t/g," "),X.test(g)||A.test(g)||H.test(g)||j.test(g)||M.test(g))break;if(te.search(/[^ ]/)>=b||!g.trim())p+=` `+te.slice(b);else{if(x||m.replace(/\t/g," ").search(/[^ ]/)>=4||X.test(m)||A.test(m)||M.test(m))break;p+=` `+g}!x&&!g.trim()&&(x=!0),h+=z+` `,e=e.substring(z.length+1),m=te.slice(b)}}i.loose||(l?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(h)&&(l=!0));let _=null,O;this.options.gfm&&(_=/^\[[ xX]\] /.exec(p),_&&(O=_[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:h,task:!!_,checked:O,loose:!1,text:p,tokens:[]}),i.raw+=h}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;cm.type==="space"),p=h.length>0&&h.some(m=>/\n.*\n/.test(m.raw));i.loose=p}if(i.loose)for(let c=0;c$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=Jt(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` `):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const l of s)/^ *-+: *$/.test(l)?r.align.push("right"):/^ *:-+: *$/.test(l)?r.align.push("center"):/^ *:-+ *$/.test(l)?r.align.push("left"):r.align.push(null);for(let l=0;l({text:c,tokens:this.lexer.inline(c),header:!1,align:r.align[h]})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===` `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:U(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const r=be(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=hi(t[2],"()");if(r>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],i=r[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),Kt(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),i=t[s.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return Kt(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...s[0]].length-1;let l,c,h=r,p=0;const m=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*e.length+r);(s=m.exec(t))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(c=[...l].length,s[3]||s[4]){h+=c;continue}else if((s[5]||s[6])&&r%3&&!((r+c)%3)){p+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+p);const g=[...s[0]][0].length,x=e.slice(0,r+s.index+g+c);if(Math.min(r,c)%2){const _=x.slice(1,-1);return{type:"em",raw:x,text:_,tokens:this.lexer.inlineTokens(_)}}const b=x.slice(2,-2);return{type:"strong",raw:x,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return s&&i&&(n=n.substring(1,n.length-1)),n=U(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=U(t[1]),s="mailto:"+n):(n=U(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,s;let t;if(t=this.rules.inline.url.exec(e)){let i,r;if(t[2]==="@")i=U(t[0]),r="mailto:"+i;else{let l;do l=t[0],t[0]=(s=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?s:"";while(l!==t[0]);i=U(t[0]),t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=U(t[0]),{type:"text",raw:t[0],text:n}}}}const di=/^(?:[ \t]*(?:\n|$))+/,mi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ki=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dn=/(?:[*+-]|\d{1,9}[.)])/,mn=T(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,dn).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/).getRegex(),ht=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,bi=/^[^\n]+/,ft=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xi=T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ft).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_i=T(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,dn).getRegex(),Be="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",dt=/|$))/,wi=T("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",dt).replace("tag",Be).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gn=T(ht).replace("hr",Se).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Be).getRegex(),Ti=T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gn).getRegex(),mt={blockquote:Ti,code:mi,def:xi,fences:gi,heading:ki,hr:Se,html:wi,lheading:mn,list:_i,newline:di,paragraph:gn,table:Ae,text:bi},en=T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Se).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Be).getRegex(),Ei={...mt,table:en,paragraph:T(ht).replace("hr",Se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",en).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Be).getRegex()},yi={...mt,html:T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dt).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ae,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:T(ht).replace("hr",Se).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",mn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},kn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ai=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bn=/^( {2,}|\\)\n(?!\s*$)/,Ri=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Ii=T(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Le).getRegex(),Oi=T("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Le).getRegex(),Di=T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Le).getRegex(),Ci=T(/\\([punct])/,"gu").replace(/punct/g,Le).getRegex(),Mi=T(/^<(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(),Ni=T(dt).replace("(?:-->|$)","-->").getRegex(),vi=T("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ni).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fe=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Pi=T(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Fe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xn=T(/^!?\[(label)\]\[(ref)\]/).replace("label",Fe).replace("ref",ft).getRegex(),_n=T(/^!?\[(ref)\](?:\[\])?/).replace("ref",ft).getRegex(),$i=T("reflink|nolink(?!\\()","g").replace("reflink",xn).replace("nolink",_n).getRegex(),gt={_backpedal:Ae,anyPunctuation:Ci,autolink:Mi,blockSkip:Li,br:bn,code:Ai,del:Ae,emStrongLDelim:Ii,emStrongRDelimAst:Oi,emStrongRDelimUnd:Di,escape:kn,link:Pi,nolink:_n,punctuation:Si,reflink:xn,reflinkSearch:$i,tag:vi,text:Ri,url:Ae},zi={...gt,link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",Fe).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fe).getRegex()},at={...gt,escape:T(kn).replace("])","~|])").getRegex(),url:T(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\(s=l.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))){if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length),s.raw.length===1&&t.length>0?t[t.length-1].raw+=` `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` `+s.raw,i.text+=` `+s.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` `+s.raw,i.text+=` `+s.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(r=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0;const c=e.slice(1);let h;this.options.extensions.startBlock.forEach(p=>{h=p.call({lexer:this},c),typeof h=="number"&&h>=0&&(l=Math.min(l,h))}),l<1/0&&l>=0&&(r=e.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){i=t[t.length-1],n&&(i==null?void 0:i.type)==="paragraph"?(i.raw+=` `+s.raw,i.text+=` `+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&i.type==="text"?(i.raw+=` `+s.raw,i.text+=` `+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(s);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,i,r=e,l,c,h;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)p.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,l.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(c||(h=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(n=p.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,h)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let p=1/0;const m=e.slice(1);let g;this.options.extensions.startInline.forEach(x=>{g=x.call({lexer:this},m),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(i=e.substring(0,p+1))}if(n=this.tokenizer.inlineText(i)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(h=n.raw.slice(-1)),c=!0,s=t[t.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}}class He{constructor(e){E(this,"options");E(this,"parser");this.options=e||re}space(e){return""}code({text:e,lang:t,escaped:n}){var r;const s=(r=(t||"").match(/^\S*/))==null?void 0:r[0],i=e.replace(/\n$/,"")+` `;return s?'
'+(n?i:U(i,!0))+`
`:"
"+(n?i:U(i,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){const t=e.ordered,n=e.start;let s="";for(let l=0;l `+s+" `}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let t="",n="";for(let i=0;i${s}`),` `+t+` `+s+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),i=Qt(e);if(i===null)return s;e=i;let r='
    ",r}image({href:e,title:t,text:n}){const s=Qt(e);if(s===null)return n;e=s;let i=`${n}{const h=l[c].flat(1/0);n=n.concat(this.walkTokens(h,t))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const r=t.renderers[i.name];r?t.renderers[i.name]=function(...l){let c=i.renderer.apply(this,l);return c===!1&&(c=r.apply(this,l)),c}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[i.level];r?r.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),s.extensions=t),n.renderer){const i=this.defaults.renderer||new He(this.defaults);for(const r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const l=r,c=n.renderer[l],h=i[l];i[l]=(...p)=>{let m=c.apply(i,p);return m===!1&&(m=h.apply(i,p)),m||""}}s.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Ue(this.defaults);for(const r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const l=r,c=n.tokenizer[l],h=i[l];i[l]=(...p)=>{let m=c.apply(i,p);return m===!1&&(m=h.apply(i,p)),m}}s.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Re;for(const r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const l=r,c=n.hooks[l],h=i[l];Re.passThroughHooks.has(r)?i[l]=p=>{if(this.defaults.async)return Promise.resolve(c.call(i,p)).then(g=>h.call(i,g));const m=c.call(i,p);return h.call(i,m)}:i[l]=(...p)=>{let m=c.apply(i,p);return m===!1&&(m=h.apply(i,p)),m}}s.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,r=n.walkTokens;s.walkTokens=function(l){let c=[];return c.push(r.call(this,l)),i&&(c=c.concat(i.call(this,l))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return B.lex(e,t!=null?t:this.defaults)}parser(e,t){return G.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(n,s)=>{const i={...s},r={...this.defaults,...i},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.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 n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const c=r.hooks?r.hooks.provideLexer():e?B.lex:B.lexInline,h=r.hooks?r.hooks.provideParser():e?G.parse:G.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(p=>c(p,r)).then(p=>r.hooks?r.hooks.processAllTokens(p):p).then(p=>r.walkTokens?Promise.all(this.walkTokens(p,r.walkTokens)).then(()=>p):p).then(p=>h(p,r)).then(p=>r.hooks?r.hooks.postprocess(p):p).catch(l);try{r.hooks&&(n=r.hooks.preprocess(n));let p=c(n,r);r.hooks&&(p=r.hooks.processAllTokens(p)),r.walkTokens&&this.walkTokens(p,r.walkTokens);let m=h(p,r);return r.hooks&&(m=r.hooks.postprocess(m)),m}catch(p){return l(p)}}}onError(e,t){return n=>{if(n.message+=` Please report this to https://github.com/markedjs/marked.`,e){const s="

    An error occurred:

    "+U(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const se=new Fi;function w(a,e){return se.parse(a,e)}w.options=w.setOptions=function(a){return se.setOptions(a),w.defaults=se.defaults,pn(w.defaults),w};w.getDefaults=pt;w.defaults=re;w.use=function(...a){return se.use(...a),w.defaults=se.defaults,pn(w.defaults),w};w.walkTokens=function(a,e){return se.walkTokens(a,e)};w.parseInline=se.parseInline;w.Parser=G;w.parser=G.parse;w.Renderer=He;w.TextRenderer=kt;w.Lexer=B;w.lexer=B.lex;w.Tokenizer=Ue;w.Hooks=Re;w.parse=w;w.options;w.setOptions;w.use;w.walkTokens;w.parseInline;G.parse;B.lex;/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:wn,setPrototypeOf:tn,isFrozen:Hi,getPrototypeOf:Bi,getOwnPropertyDescriptor:Gi}=Object;let{freeze:P,seal:W,create:Tn}=Object,{apply:ct,construct:ut}=typeof Reflect<"u"&&Reflect;P||(P=function(e){return e});W||(W=function(e){return e});ct||(ct=function(e,t,n){return e.apply(t,n)});ut||(ut=function(e,t){return new e(...t)});const Pe=F(Array.prototype.forEach),nn=F(Array.prototype.pop),_e=F(Array.prototype.push),ze=F(String.prototype.toLowerCase),it=F(String.prototype.toString),sn=F(String.prototype.match),we=F(String.prototype.replace),Wi=F(String.prototype.indexOf),ji=F(String.prototype.trim),Y=F(Object.prototype.hasOwnProperty),v=F(RegExp.prototype.test),Te=qi(TypeError);function F(a){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:ze;tn&&tn(a,null);let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){const i=t(s);i!==s&&(Hi(e)||(e[n]=i),s=i)}a[s]=!0}return a}function Zi(a){for(let e=0;e/gm),Ji=W(/\${[\w\W]*}/gm),Ki=W(/^data-[\-\w.\u00B7-\uFFFF]/),es=W(/^aria-[\-\w]+$/),En=W(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ts=W(/^(?:\w+script|data):/i),ns=W(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yn=W(/^html$/i),is=W(/^[a-z][.\w]*(-[.\w]+)+$/i);var cn=Object.freeze({__proto__:null,MUSTACHE_EXPR:Vi,ERB_EXPR:Qi,TMPLIT_EXPR:Ji,DATA_ATTR:Ki,ARIA_ATTR:es,IS_ALLOWED_URI:En,IS_SCRIPT_OR_DATA:ts,ATTR_WHITESPACE:ns,DOCTYPE_NAME:yn,CUSTOM_ELEMENT:is});const ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ss=function(){return typeof window>"u"?null:window},rs=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const s="data-tt-policy-suffix";t&&t.hasAttribute(s)&&(n=t.getAttribute(s));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function An(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ss();const e=d=>An(d);if(e.version="3.1.7",e.removed=[],!a||!a.document||a.document.nodeType!==ye.document)return e.isSupported=!1,e;let{document:t}=a;const n=t,s=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:r,Node:l,Element:c,NodeFilter:h,NamedNodeMap:p=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:x}=a,b=c.prototype,_=Ee(b,"cloneNode"),O=Ee(b,"remove"),j=Ee(b,"nextSibling"),M=Ee(b,"childNodes"),X=Ee(b,"parentNode");if(typeof r=="function"){const d=t.createElement("template");d.content&&d.content.ownerDocument&&(t=d.content.ownerDocument)}let A,H="";const{implementation:z,createNodeIterator:te,createDocumentFragment:Rn,getElementsByTagName:Sn}=t,{importNode:Ln}=n;let V={};e.isSupported=typeof wn=="function"&&typeof X=="function"&&z&&z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ge,ERB_EXPR:We,TMPLIT_EXPR:je,DATA_ATTR:In,ARIA_ATTR:On,IS_SCRIPT_OR_DATA:Dn,ATTR_WHITESPACE:bt,CUSTOM_ELEMENT:Cn}=cn;let{IS_ALLOWED_URI:xt}=cn,S=null;const _t=k({},[...rn,...st,...rt,...ot,...on]);let L=null;const wt=k({},[...ln,...lt,...an,...$e]);let R=Object.seal(Tn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),fe=null,qe=null,Tt=!0,Ze=!0,Et=!1,yt=!0,oe=!1,Ye=!0,ne=!1,Xe=!1,Ve=!1,le=!1,Ie=!1,Oe=!1,At=!0,Rt=!1;const Mn="user-content-";let Qe=!0,de=!1,ae={},ce=null;const St=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Lt=null;const It=k({},["audio","video","img","source","image","track"]);let Je=null;const Ot=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),De="http://www.w3.org/1998/Math/MathML",Ce="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml";let ue=K,Ke=!1,et=null;const Nn=k({},[De,Ce,K],it);let me=null;const vn=["application/xhtml+xml","text/html"],Pn="text/html";let I=null,pe=null;const $n=t.createElement("form"),Dt=function(o){return o instanceof RegExp||o instanceof Function},tt=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(pe&&pe===o)){if((!o||typeof o!="object")&&(o={}),o=ie(o),me=vn.indexOf(o.PARSER_MEDIA_TYPE)===-1?Pn:o.PARSER_MEDIA_TYPE,I=me==="application/xhtml+xml"?it:ze,S=Y(o,"ALLOWED_TAGS")?k({},o.ALLOWED_TAGS,I):_t,L=Y(o,"ALLOWED_ATTR")?k({},o.ALLOWED_ATTR,I):wt,et=Y(o,"ALLOWED_NAMESPACES")?k({},o.ALLOWED_NAMESPACES,it):Nn,Je=Y(o,"ADD_URI_SAFE_ATTR")?k(ie(Ot),o.ADD_URI_SAFE_ATTR,I):Ot,Lt=Y(o,"ADD_DATA_URI_TAGS")?k(ie(It),o.ADD_DATA_URI_TAGS,I):It,ce=Y(o,"FORBID_CONTENTS")?k({},o.FORBID_CONTENTS,I):St,fe=Y(o,"FORBID_TAGS")?k({},o.FORBID_TAGS,I):{},qe=Y(o,"FORBID_ATTR")?k({},o.FORBID_ATTR,I):{},ae=Y(o,"USE_PROFILES")?o.USE_PROFILES:!1,Tt=o.ALLOW_ARIA_ATTR!==!1,Ze=o.ALLOW_DATA_ATTR!==!1,Et=o.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,oe=o.SAFE_FOR_TEMPLATES||!1,Ye=o.SAFE_FOR_XML!==!1,ne=o.WHOLE_DOCUMENT||!1,le=o.RETURN_DOM||!1,Ie=o.RETURN_DOM_FRAGMENT||!1,Oe=o.RETURN_TRUSTED_TYPE||!1,Ve=o.FORCE_BODY||!1,At=o.SANITIZE_DOM!==!1,Rt=o.SANITIZE_NAMED_PROPS||!1,Qe=o.KEEP_CONTENT!==!1,de=o.IN_PLACE||!1,xt=o.ALLOWED_URI_REGEXP||En,ue=o.NAMESPACE||K,R=o.CUSTOM_ELEMENT_HANDLING||{},o.CUSTOM_ELEMENT_HANDLING&&Dt(o.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(R.tagNameCheck=o.CUSTOM_ELEMENT_HANDLING.tagNameCheck),o.CUSTOM_ELEMENT_HANDLING&&Dt(o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(R.attributeNameCheck=o.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(R.allowCustomizedBuiltInElements=o.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),oe&&(Ze=!1),Ie&&(le=!0),ae&&(S=k({},on),L=[],ae.html===!0&&(k(S,rn),k(L,ln)),ae.svg===!0&&(k(S,st),k(L,lt),k(L,$e)),ae.svgFilters===!0&&(k(S,rt),k(L,lt),k(L,$e)),ae.mathMl===!0&&(k(S,ot),k(L,an),k(L,$e))),o.ADD_TAGS&&(S===_t&&(S=ie(S)),k(S,o.ADD_TAGS,I)),o.ADD_ATTR&&(L===wt&&(L=ie(L)),k(L,o.ADD_ATTR,I)),o.ADD_URI_SAFE_ATTR&&k(Je,o.ADD_URI_SAFE_ATTR,I),o.FORBID_CONTENTS&&(ce===St&&(ce=ie(ce)),k(ce,o.FORBID_CONTENTS,I)),Qe&&(S["#text"]=!0),ne&&k(S,["html","head","body"]),S.table&&(k(S,["tbody"]),delete fe.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw Te('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Te('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=o.TRUSTED_TYPES_POLICY,H=A.createHTML("")}else A===void 0&&(A=rs(x,s)),A!==null&&typeof H=="string"&&(H=A.createHTML(""));P&&P(o),pe=o}},Ct=k({},["mi","mo","mn","ms","mtext"]),Mt=k({},["annotation-xml"]),zn=k({},["title","style","font","a","script"]),Nt=k({},[...st,...rt,...Yi]),vt=k({},[...ot,...Xi]),Un=function(o){let u=X(o);(!u||!u.tagName)&&(u={namespaceURI:ue,tagName:"template"});const f=ze(o.tagName),y=ze(u.tagName);return et[o.namespaceURI]?o.namespaceURI===Ce?u.namespaceURI===K?f==="svg":u.namespaceURI===De?f==="svg"&&(y==="annotation-xml"||Ct[y]):Boolean(Nt[f]):o.namespaceURI===De?u.namespaceURI===K?f==="math":u.namespaceURI===Ce?f==="math"&&Mt[y]:Boolean(vt[f]):o.namespaceURI===K?u.namespaceURI===Ce&&!Mt[y]||u.namespaceURI===De&&!Ct[y]?!1:!vt[f]&&(zn[f]||!Nt[f]):!!(me==="application/xhtml+xml"&&et[o.namespaceURI]):!1},Q=function(o){_e(e.removed,{element:o});try{X(o).removeChild(o)}catch{O(o)}},Me=function(o,u){try{_e(e.removed,{attribute:u.getAttributeNode(o),from:u})}catch{_e(e.removed,{attribute:null,from:u})}if(u.removeAttribute(o),o==="is"&&!L[o])if(le||Ie)try{Q(u)}catch{}else try{u.setAttribute(o,"")}catch{}},Pt=function(o){let u=null,f=null;if(Ve)o=""+o;else{const D=sn(o,/^[\r\n\t ]+/);f=D&&D[0]}me==="application/xhtml+xml"&&ue===K&&(o=''+o+"");const y=A?A.createHTML(o):o;if(ue===K)try{u=new g().parseFromString(y,me)}catch{}if(!u||!u.documentElement){u=z.createDocument(ue,"template",null);try{u.documentElement.innerHTML=Ke?H:y}catch{}}const C=u.body||u.documentElement;return o&&f&&C.insertBefore(t.createTextNode(f),C.childNodes[0]||null),ue===K?Sn.call(u,ne?"html":"body")[0]:ne?u.documentElement:C},$t=function(o){return te.call(o.ownerDocument||o,o,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},zt=function(o){return o instanceof m&&(typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||!(o.attributes instanceof p)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function")},Ut=function(o){return typeof l=="function"&&o instanceof l},ee=function(o,u,f){!V[o]||Pe(V[o],y=>{y.call(e,u,f,pe)})},Ft=function(o){let u=null;if(ee("beforeSanitizeElements",o,null),zt(o))return Q(o),!0;const f=I(o.nodeName);if(ee("uponSanitizeElement",o,{tagName:f,allowedTags:S}),o.hasChildNodes()&&!Ut(o.firstElementChild)&&v(/<[/\w]/g,o.innerHTML)&&v(/<[/\w]/g,o.textContent)||o.nodeType===ye.progressingInstruction||Ye&&o.nodeType===ye.comment&&v(/<[/\w]/g,o.data))return Q(o),!0;if(!S[f]||fe[f]){if(!fe[f]&&Bt(f)&&(R.tagNameCheck instanceof RegExp&&v(R.tagNameCheck,f)||R.tagNameCheck instanceof Function&&R.tagNameCheck(f)))return!1;if(Qe&&!ce[f]){const y=X(o)||o.parentNode,C=M(o)||o.childNodes;if(C&&y){const D=C.length;for(let $=D-1;$>=0;--$){const J=_(C[$],!0);J.__removalCount=(o.__removalCount||0)+1,y.insertBefore(J,j(o))}}}return Q(o),!0}return o instanceof c&&!Un(o)||(f==="noscript"||f==="noembed"||f==="noframes")&&v(/<\/no(script|embed|frames)/i,o.innerHTML)?(Q(o),!0):(oe&&o.nodeType===ye.text&&(u=o.textContent,Pe([Ge,We,je],y=>{u=we(u,y," ")}),o.textContent!==u&&(_e(e.removed,{element:o.cloneNode()}),o.textContent=u)),ee("afterSanitizeElements",o,null),!1)},Ht=function(o,u,f){if(At&&(u==="id"||u==="name")&&(f in t||f in $n))return!1;if(!(Ze&&!qe[u]&&v(In,u))){if(!(Tt&&v(On,u))){if(!L[u]||qe[u]){if(!(Bt(o)&&(R.tagNameCheck instanceof RegExp&&v(R.tagNameCheck,o)||R.tagNameCheck instanceof Function&&R.tagNameCheck(o))&&(R.attributeNameCheck instanceof RegExp&&v(R.attributeNameCheck,u)||R.attributeNameCheck instanceof Function&&R.attributeNameCheck(u))||u==="is"&&R.allowCustomizedBuiltInElements&&(R.tagNameCheck instanceof RegExp&&v(R.tagNameCheck,f)||R.tagNameCheck instanceof Function&&R.tagNameCheck(f))))return!1}else if(!Je[u]){if(!v(xt,we(f,bt,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&o!=="script"&&Wi(f,"data:")===0&&Lt[o])){if(!(Et&&!v(Dn,we(f,bt,"")))){if(f)return!1}}}}}}return!0},Bt=function(o){return o!=="annotation-xml"&&sn(o,Cn)},Gt=function(o){ee("beforeSanitizeAttributes",o,null);const{attributes:u}=o;if(!u)return;const f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L};let y=u.length;for(;y--;){const C=u[y],{name:D,namespaceURI:$,value:J}=C,ge=I(D);let N=D==="value"?J:ji(J);if(f.attrName=ge,f.attrValue=N,f.keepAttr=!0,f.forceKeepAttr=void 0,ee("uponSanitizeAttribute",o,f),N=f.attrValue,f.forceKeepAttr||(Me(D,o),!f.keepAttr))continue;if(!yt&&v(/\/>/i,N)){Me(D,o);continue}oe&&Pe([Ge,We,je],jt=>{N=we(N,jt," ")});const Wt=I(o.nodeName);if(!!Ht(Wt,ge,N)){if(Rt&&(ge==="id"||ge==="name")&&(Me(D,o),N=Mn+N),Ye&&v(/((--!?|])>)|<\/(style|title)/i,N)){Me(D,o);continue}if(A&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!$)switch(x.getAttributeType(Wt,ge)){case"TrustedHTML":{N=A.createHTML(N);break}case"TrustedScriptURL":{N=A.createScriptURL(N);break}}try{$?o.setAttributeNS($,D,N):o.setAttribute(D,N),zt(o)?Q(o):nn(e.removed)}catch{}}}ee("afterSanitizeAttributes",o,null)},Fn=function d(o){let u=null;const f=$t(o);for(ee("beforeSanitizeShadowDOM",o,null);u=f.nextNode();)ee("uponSanitizeShadowNode",u,null),!Ft(u)&&(u.content instanceof i&&d(u.content),Gt(u));ee("afterSanitizeShadowDOM",o,null)};return e.sanitize=function(d){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,f=null,y=null,C=null;if(Ke=!d,Ke&&(d=""),typeof d!="string"&&!Ut(d))if(typeof d.toString=="function"){if(d=d.toString(),typeof d!="string")throw Te("dirty is not a string, aborting")}else throw Te("toString is not a function");if(!e.isSupported)return d;if(Xe||tt(o),e.removed=[],typeof d=="string"&&(de=!1),de){if(d.nodeName){const J=I(d.nodeName);if(!S[J]||fe[J])throw Te("root node is forbidden and cannot be sanitized in-place")}}else if(d instanceof l)u=Pt(""),f=u.ownerDocument.importNode(d,!0),f.nodeType===ye.element&&f.nodeName==="BODY"||f.nodeName==="HTML"?u=f:u.appendChild(f);else{if(!le&&!oe&&!ne&&d.indexOf("<")===-1)return A&&Oe?A.createHTML(d):d;if(u=Pt(d),!u)return le?null:Oe?H:""}u&&Ve&&Q(u.firstChild);const D=$t(de?d:u);for(;y=D.nextNode();)Ft(y)||(y.content instanceof i&&Fn(y.content),Gt(y));if(de)return d;if(le){if(Ie)for(C=Rn.call(u.ownerDocument);u.firstChild;)C.appendChild(u.firstChild);else C=u;return(L.shadowroot||L.shadowrootmode)&&(C=Ln.call(n,C,!0)),C}let $=ne?u.outerHTML:u.innerHTML;return ne&&S["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&v(yn,u.ownerDocument.doctype.name)&&($=" `+$),oe&&Pe([Ge,We,je],J=>{$=we($,J," ")}),A&&Oe?A.createHTML($):$},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tt(d),Xe=!0},e.clearConfig=function(){pe=null,Xe=!1},e.isValidAttribute=function(d,o,u){pe||tt({});const f=I(d),y=I(o);return Ht(f,y,u)},e.addHook=function(d,o){typeof o=="function"&&(V[d]=V[d]||[],_e(V[d],o))},e.removeHook=function(d){if(V[d])return nn(V[d])},e.removeHooks=function(d){V[d]&&(V[d]=[])},e.removeAllHooks=function(){V={}},e}var un=An();const os={class:"container"},ls={name:"DIY"},as=qn({...ls,setup(a){const e=si(),{t}=Gn.exports.useI18n(),n=()=>{e.push({path:"/tool/flash",query:{url:"https://k5.vicicode.cn/diyapi/LOSEHU"+i.flag.join("")+".bin?v="+new Date().getTime()}})},s=()=>{fetch("https://k5.vicicode.cn/diyapi/LOSEHU"+i.flag.join("")+".bin?v="+new Date().getTime()).then(h=>h.blob()).then(h=>{const p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download="LOSEHU-CUSTOM-"+i.flag.join("")+".bin",document.body.appendChild(m),m.click(),document.body.removeChild(m)})},i=Zn({versions:[],flag:[],disMatrix:[],disName:[],showSort:[],readme:""});Yn(()=>[...i.flag],()=>{r()});const r=()=>{i.flag.map((h,p)=>{i.disMatrix[p].forEach((m,g)=>{i.versions.indexOf("LOSEHU"+i.flag.join("").substring(0,p)+g+i.flag.join("").substring(p+1)+".bin")==-1?i.disMatrix[p].set(g,!0):i.disMatrix[p].set(g,!1)})})},{loading:l,setLoading:c}=ri(!0);return Xn(async()=>{c(!0);let h=await(await fetch("https://k5.vicicode.cn/diyapi/function.json?v="+new Date().getTime())).text();h=JSON.parse(h);let p=[],m=[];h.map(_=>{p[_[_.length-1]-1]=_,m.push(_[_.length-1]-1)}),h=p;let g=[],x=[];h.map(_=>{let O=new Map,j=new Map;for(let M=_[0]*2+1;M<_[0]*3+1;M++)O.set(_[M],!1),t("idea.diy")!=="LOSEHU DIY"?j.set(_[M],_[M-_[0]-_[0]]):j.set(_[M],_[M-_[0]]);g.push(O),x.push(j)}),i.flag=new Array(h.length).fill("0"),i.disName=x,i.disMatrix=g,i.showSort=m;const b=await(await fetch("https://k5.vicicode.cn/diyapi/version.json?v="+new Date().getTime())).text();i.versions=JSON.parse(b),r(),c(!1),t("menu.dashboard")=="CPS"?i.readme=un.sanitize(await w.parse(await(await fetch("https://k5.vicicode.cn/diyapi/README_en.md?v="+new Date().getTime())).text())):i.readme=un.sanitize(await w.parse(await(await fetch("https://k5.vicicode.cn/diyapi/README.md?v="+new Date().getTime())).text())),i.readme=i.readme.replaceAll('href="./README_en.md"',""),i.readme=i.readme.replaceAll('href="./README.md"',""),i.readme=i.readme.replaceAll("losehu/uv-k5-firmware-chinese/blob/main/payment/show.png","losehu/uv-k5-firmware-chinese/blob/main/payment/show.png?raw=true"),i.readme=i.readme.replaceAll("/images/c1.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c1.JPG?raw=true"),i.readme=i.readme.replaceAll("/images/c2.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c2.JPG?raw=true"),i.readme=i.readme.replaceAll("/images/c3.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c3.JPG?raw=true"),i.readme=i.readme.replaceAll("/images/c4.JPG","https://github.com/losehu/uv-k5-firmware-custom/blob/main/images/c4.JPG?raw=true"),i.readme=i.readme.replaceAll("a href",'a target="_blank" href')}),(h,p)=>{const m=Wn,g=oi,x=Vn,b=Kn,_=ei,O=ti,j=li,M=Qn,X=ni,A=ii;return ke(),nt("div",os,[q(m,{items:[h.$t("menu.workshop"),h.$t("idea.diy")]},null,8,["items"]),q(A,{gutter:20,align:"stretch"},{default:Z(()=>[q(X,{span:24},{default:Z(()=>[q(M,{class:"general-card",title:h.$t("idea.diy"),loading:Jn(l)},{default:Z(()=>[q(j,{direction:"vertical"},{default:Z(()=>[qt("div",null,[he(Ne(h.$t("oi")),1),q(g,{theme:"primary",href:"https://github.com/losehu/uv-k5-firmware-custom",target:"_blank"},{default:Z(()=>[he("https://github.com/losehu/uv-k5-firmware-custom")]),_:1})]),(ke(!0),nt(Zt,null,Yt(i.showSort,H=>(ke(),Xt(b,{modelValue:i.flag[H],"onUpdate:modelValue":z=>i.flag[H]=z,type:"button"},{default:Z(()=>[(ke(!0),nt(Zt,null,Yt(i.disMatrix[H],z=>(ke(),Xt(x,{value:z[0],disabled:z[1]},{default:Z(()=>[he(Ne(i.disName[H].get(z[0])),1)]),_:2},1032,["value","disabled"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"]))),256)),qt("div",null,[q(_,{type:"primary",onClick:n},{default:Z(()=>[he(Ne(h.$t("diy.generate")),1)]),_:1}),he("\xA0\xA0 "),q(O,{onClick:s},{default:Z(()=>[he(Ne(h.$t("global.download")),1)]),_:1})])]),_:1})]),_:1},8,["title","loading"])]),_:1})]),_:1}),q(A,{gutter:20,align:"stretch",style:{"margin-top":"10px"}},{default:Z(()=>[q(X,{span:24},{default:Z(()=>[q(M,{style:{padding:"20px"},class:"general-card",innerHTML:i.readme},null,8,["innerHTML"])]),_:1})]),_:1})])}}});const Ts=jn(as,[["__scopeId","data-v-1f652876"]]);export{Ts as default};