Files
Snap.Hutao.Docs/assets/component-b8605721.js

54 lines
93 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var an=Object.defineProperty;var rn=(l,t,n)=>t in l?an(l,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[t]=n;var wt=(l,t,n)=>(rn(l,typeof t!="symbol"?t+"":t,n),n);import{a as _,g as Ne,h as U,f as et,i as ve,j as sn,o as m,c as w,F as te,k as se,n as yt,l as ut,u as on,m as X,r as cn,p as j,q as ke,s as T,t as M,v as J,d as ee,x as N,y as Le,z as pt,A as un,B as qe,C as pn,D as hn,E as dn,G as bt,b as Ce,H as gn,I as fn,J as mn,K as vn,L as kn}from"./app-a686e86a.js";var Be=new Map;function wn(l){var t=Be.get(l);t&&t.destroy()}function yn(l){var t=Be.get(l);t&&t.update()}var De=null;typeof window>"u"?((De=function(l){return l}).destroy=function(l){return l},De.update=function(l){return l}):((De=function(l,t){return l&&Array.prototype.forEach.call(l.length?l:[l],function(n){return function(e){if(e&&e.nodeName&&e.nodeName==="TEXTAREA"&&!Be.has(e)){var i,a=null,r=window.getComputedStyle(e),s=(i=e.value,function(){d({testForHeightReduction:i===""||!e.value.startsWith(i),restoreTextAlign:null}),i=e.value}),u=(function(p){e.removeEventListener("autosize:destroy",u),e.removeEventListener("autosize:update",c),e.removeEventListener("input",s),window.removeEventListener("resize",c),Object.keys(p).forEach(function(g){return e.style[g]=p[g]}),Be.delete(e)}).bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",u),e.addEventListener("autosize:update",c),e.addEventListener("input",s),window.addEventListener("resize",c),e.style.overflowX="hidden",e.style.wordWrap="break-word",Be.set(e,{destroy:u,update:c}),c()}function d(p){var g,h,E=p.restoreTextAlign,o=E===void 0?null:E,f=p.testForHeightReduction,R=f===void 0||f,z=r.overflowY;if(e.scrollHeight!==0&&(r.resize==="vertical"?e.style.resize="none":r.resize==="both"&&(e.style.resize="horizontal"),R&&(g=function($){for(var V=[];$&&$.parentNode&&$.parentNode instanceof Element;)$.parentNode.scrollTop&&V.push([$.parentNode,$.parentNode.scrollTop]),$=$.parentNode;return function(){return V.forEach(function(O){var P=O[0],ie=O[1];P.style.scrollBehavior="auto",P.scrollTop=ie,P.style.scrollBehavior=null})}}(e),e.style.height=""),h=r.boxSizing==="content-box"?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),r.maxHeight!=="none"&&h>parseFloat(r.maxHeight)?(r.overflowY==="hidden"&&(e.style.overflow="scroll"),h=parseFloat(r.maxHeight)):r.overflowY!=="hidden"&&(e.style.overflow="hidden"),e.style.height=h+"px",o&&(e.style.textAlign=o),g&&g(),a!==h&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=h),z!==r.overflow&&!o)){var I=r.textAlign;r.overflow==="hidden"&&(e.style.textAlign=I==="start"?"end":"start"),d({restoreTextAlign:I,testForHeightReduction:!0})}}function c(){d({testForHeightReduction:!0,restoreTextAlign:null})}}(n)}),l}).destroy=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],wn),l},De.update=function(l){return l&&Array.prototype.forEach.call(l.length?l:[l],yn),l});var xt=De;function Vt(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _e=Vt();function bn(l){_e=l}const Ft=/[&<>"']/,xn=new RegExp(Ft.source,"g"),Wt=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,$n=new RegExp(Wt.source,"g"),Cn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$t=l=>Cn[l];function Y(l,t){if(t){if(Ft.test(l))return l.replace(xn,$t)}else if(Wt.test(l))return l.replace($n,$t);return l}const _n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function qt(l){return l.replace(_n,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const zn=/(^|[^\[])\^/g;function W(l,t){l=typeof l=="string"?l:l.source,t=t||"";const n={replace:(e,i)=>(i=i.source||i,i=i.replace(zn,"$1"),l=l.replace(e,i),n),getRegex:()=>new RegExp(l,t)};return n}const Rn=/[^\w:]/g,Sn=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ct(l,t,n){if(l){let e;try{e=decodeURIComponent(qt(n)).replace(Rn,"").toLowerCase()}catch{return null}if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}t&&!Sn.test(n)&&(n=An(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const Ze={},Ln=/^[^:]+:\/*[^/]*$/,In=/^([^:]+:)[\s\S]*$/,En=/^([^:]+:\/*[^/]*)[\s\S]*$/;function An(l,t){Ze[" "+l]||(Ln.test(l)?Ze[" "+l]=l+"/":Ze[" "+l]=Ge(l,"/",!0)),l=Ze[" "+l];const n=l.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:l.replace(In,"$1")+t:t.charAt(0)==="/"?n?t:l.replace(En,"$1")+t:l+t}const Xe={exec:function(){}};function _t(l,t){const n=l.replace(/\|/g,(a,r,s)=>{let u=!1,d=r;for(;--d>=0&&s[d]==="\\";)u=!u;return u?"|":" |"}),e=n.split(/ \|/);let i=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),e.length>t)e.splice(t);else for(;e.length<t;)e.push("");for(;i<e.length;i++)e[i]=e[i].trim().replace(/\\\|/g,"|");return e}function Ge(l,t,n){const e=l.length;if(e===0)return"";let i=0;for(;i<e;){const a=l.charAt(e-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return l.slice(0,e-i)}function Tn(l,t){if(l.indexOf(t[1])===-1)return-1;const n=l.length;let e=0,i=0;for(;i<n;i++)if(l[i]==="\\")i++;else if(l[i]===t[0])e++;else if(l[i]===t[1]&&(e--,e<0))return i;return-1}function jn(l){l&&l.sanitize&&!l.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function zt(l,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=l),t>>=1,l+=l;return n+l}function Rt(l,t,n,e){const i=t.href,a=t.title?Y(t.title):null,r=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){e.state.inLink=!0;const s={type:"link",raw:n,href:i,title:a,text:r,tokens:e.inlineTokens(r)};return e.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:a,text:Y(r)}}function Un(l,t){const n=l.match(/^(\s+)(?:```)/);if(n===null)return t;const e=n[1];return t.split(`
`).map(i=>{const a=i.match(/^\s+/);if(a===null)return i;const[r]=a;return r.length>=e.length?i.slice(e.length):i}).join(`
`)}class ht{constructor(t){this.options=t||_e}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const e=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Ge(e,`
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const e=n[0],i=Un(e,n[3]||"");return{type:"code",raw:e,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let e=n[2].trim();if(/#$/.test(e)){const i=Ge(e,"#");(this.options.pedantic||!i||/ $/.test(i))&&(e=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const e=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const a=this.lexer.blockTokens(e);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:a,text:e}}}list(t){let n=this.rules.block.list.exec(t);if(n){let e,i,a,r,s,u,d,c,p,g,h,E,o=n[1].trim();const f=o.length>1,R={type:"list",raw:"",ordered:f,start:f?+o.slice(0,-1):"",loose:!1,items:[]};o=f?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=f?o:"[*+-]");const z=new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(E=!1,!(!(n=z.exec(t))||this.rules.block.hr.test(t)));){if(e=n[0],t=t.substring(e.length),c=n[2].split(`
`,1)[0].replace(/^\t+/,$=>" ".repeat(3*$.length)),p=t.split(`
`,1)[0],this.options.pedantic?(r=2,h=c.trimLeft()):(r=n[2].search(/[^ ]/),r=r>4?1:r,h=c.slice(r),r+=n[1].length),u=!1,!c&&/^ *$/.test(p)&&(e+=p+`
`,t=t.substring(p.length+1),E=!0),!E){const $=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),V=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),O=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),P=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);for(;t&&(g=t.split(`
`,1)[0],p=g,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(O.test(p)||P.test(p)||$.test(p)||V.test(t)));){if(p.search(/[^ ]/)>=r||!p.trim())h+=`
`+p.slice(r);else{if(u||c.search(/[^ ]/)>=4||O.test(c)||P.test(c)||V.test(c))break;h+=`
`+p}!u&&!p.trim()&&(u=!0),e+=g+`
`,t=t.substring(g.length+1),c=p.slice(r)}}R.loose||(d?R.loose=!0:/\n *\n *$/.test(e)&&(d=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(a=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),R.items.push({type:"list_item",raw:e,task:!!i,checked:a,loose:!1,text:h}),R.raw+=e}R.items[R.items.length-1].raw=e.trimRight(),R.items[R.items.length-1].text=h.trimRight(),R.raw=R.raw.trimRight();const I=R.items.length;for(s=0;s<I;s++)if(this.lexer.state.top=!1,R.items[s].tokens=this.lexer.blockTokens(R.items[s].text,[]),!R.loose){const $=R.items[s].tokens.filter(O=>O.type==="space"),V=$.length>0&&$.some(O=>/\n.*\n/.test(O.raw));R.loose=V}if(R.loose)for(s=0;s<I;s++)R.items[s].loose=!0;return R}}html(t){const n=this.rules.block.html.exec(t);if(n){const e={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(n[0]):Y(n[0]);e.type="paragraph",e.text=i,e.tokens=this.lexer.inline(i)}return e}}def(t){const n=this.rules.block.def.exec(t);if(n){const e=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",a=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:e,raw:n[0],href:i,title:a}}}table(t){const n=this.rules.block.table.exec(t);if(n){const e={type:"table",header:_t(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(e.header.length===e.align.length){e.raw=n[0];let i=e.align.length,a,r,s,u;for(a=0;a<i;a++)/^ *-+: *$/.test(e.align[a])?e.align[a]="right":/^ *:-+: *$/.test(e.align[a])?e.align[a]="center":/^ *:-+ *$/.test(e.align[a])?e.align[a]="left":e.align[a]=null;for(i=e.rows.length,a=0;a<i;a++)e.rows[a]=_t(e.rows[a],e.header.length).map(d=>({text:d}));for(i=e.header.length,r=0;r<i;r++)e.header[r].tokens=this.lexer.inline(e.header[r].text);for(i=e.rows.length,r=0;r<i;r++)for(u=e.rows[r],s=0;s<u.length;s++)u[s].tokens=this.lexer.inline(u[s].text);return e}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const e=n[1].charAt(n[1].length-1)===`
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:e,tokens:this.lexer.inline(e)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:Y(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Y(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const e=n[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const r=Ge(e.slice(0,-1),"\\");if((e.length-r.length)%2===0)return}else{const r=Tn(n[2],"()");if(r>-1){const u=(n[0].indexOf("!")===0?5:4)+n[1].length+r;n[2]=n[2].substring(0,r),n[0]=n[0].substring(0,u).trim(),n[3]=""}}let i=n[2],a="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);r&&(i=r[1],a=r[3])}else a=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(e)?i=i.slice(1):i=i.slice(1,-1)),Rt(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:a&&a.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let e;if((e=this.rules.inline.reflink.exec(t))||(e=this.rules.inline.nolink.exec(t))){let i=(e[2]||e[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const a=e[0].charAt(0);return{type:"text",raw:a,text:a}}return Rt(e,i,e[0],this.lexer)}}emStrong(t,n,e=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&e.match(/[\p{L}\p{N}]/u))return;const a=i[1]||i[2]||"";if(!a||a&&(e===""||this.rules.inline.punctuation.exec(e))){const r=i[0].length-1;let s,u,d=r,c=0;const p=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+r);(i=p.exec(n))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(u=s.length,i[3]||i[4]){d+=u;continue}else if((i[5]||i[6])&&r%3&&!((r+u)%3)){c+=u;continue}if(d-=u,d>0)continue;u=Math.min(u,u+d+c);const g=t.slice(0,r+i.index+(i[0].length-s.length)+u);if(Math.min(r,u)%2){const E=g.slice(1,-1);return{type:"em",raw:g,text:E,tokens:this.lexer.inlineTokens(E)}}const h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let e=n[2].replace(/\n/g," ");const i=/[^ ]/.test(e),a=/^ /.test(e)&&/ $/.test(e);return i&&a&&(e=e.substring(1,e.length-1)),e=Y(e,!0),{type:"codespan",raw:n[0],text:e}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const e=this.rules.inline.autolink.exec(t);if(e){let i,a;return e[2]==="@"?(i=Y(this.options.mangle?n(e[1]):e[1]),a="mailto:"+i):(i=Y(e[1]),a=i),{type:"link",raw:e[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let e;if(e=this.rules.inline.url.exec(t)){let i,a;if(e[2]==="@")i=Y(this.options.mangle?n(e[0]):e[0]),a="mailto:"+i;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])[0];while(r!==e[0]);i=Y(e[0]),e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const e=this.rules.inline.text.exec(t);if(e){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Y(e[0]):e[0]:i=Y(this.options.smartypants?n(e[0]):e[0]),{type:"text",raw:e[0],text:i}}}}const x={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {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|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Xe,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};x._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;x._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;x.def=W(x.def).replace("label",x._label).replace("title",x._title).getRegex();x.bullet=/(?:[*+-]|\d{1,9}[.)])/;x.listItemStart=W(/^( *)(bull) */).replace("bull",x.bullet).getRegex();x.list=W(x.list).replace(/bull/g,x.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+x.def.source+")").getRegex();x._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";x._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;x.html=W(x.html,"i").replace("comment",x._comment).replace("tag",x._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();x.paragraph=W(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").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",x._tag).getRegex();x.blockquote=W(x.blockquote).replace("paragraph",x.paragraph).getRegex();x.normal={...x};x.gfm={...x.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};x.gfm.table=W(x.gfm.table).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",x._tag).getRegex();x.gfm.paragraph=W(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",x.gfm.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",x._tag).getRegex();x.pedantic={...x.normal,html:W(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",x._comment).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:Xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:W(x.normal._paragraph).replace("hr",x.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",x.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const k={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Xe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Xe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};k._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";k.punctuation=W(k.punctuation).replace(/punctuation/g,k._punctuation).getRegex();k.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;k.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;k._comment=W(x._comment).replace("(?:-->|$)","-->").getRegex();k.emStrong.lDelim=W(k.emStrong.lDelim).replace(/punct/g,k._punctuation).getRegex();k.emStrong.rDelimAst=W(k.emStrong.rDelimAst,"g").replace(/punct/g,k._punctuation).getRegex();k.emStrong.rDelimUnd=W(k.emStrong.rDelimUnd,"g").replace(/punct/g,k._punctuation).getRegex();k._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;k._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;k._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])?)+(?![-_])/;k.autolink=W(k.autolink).replace("scheme",k._scheme).replace("email",k._email).getRegex();k._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;k.tag=W(k.tag).replace("comment",k._comment).replace("attribute",k._attribute).getRegex();k._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;k._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;k._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;k.link=W(k.link).replace("label",k._label).replace("href",k._href).replace("title",k._title).getRegex();k.reflink=W(k.reflink).replace("label",k._label).replace("ref",x._label).getRegex();k.nolink=W(k.nolink).replace("ref",x._label).getRegex();k.reflinkSearch=W(k.reflinkSearch,"g").replace("reflink",k.reflink).replace("nolink",k.nolink).getRegex();k.normal={...k};k.pedantic={...k.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:W(/^!?\[(label)\]\((.*?)\)/).replace("label",k._label).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",k._label).getRegex()};k.gfm={...k.normal,escape:W(k.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};k.gfm.url=W(k.gfm.url,"i").replace("email",k.gfm._extended_email).getRegex();k.breaks={...k.gfm,br:W(k.br).replace("{2,}","*").getRegex(),text:W(k.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function Mn(l){return l.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function St(l){let t="",n,e;const i=l.length;for(n=0;n<i;n++)e=l.charCodeAt(n),Math.random()>.5&&(e="x"+e.toString(16)),t+="&#"+e+";";return t}class we{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||_e,this.options.tokenizer=this.options.tokenizer||new ht,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:x.normal,inline:k.normal};this.options.pedantic?(n.block=x.pedantic,n.inline=k.pedantic):this.options.gfm&&(n.block=x.gfm,this.options.breaks?n.inline=k.breaks:n.inline=k.gfm),this.tokenizer.rules=n}static get rules(){return{block:x,inline:k}}static lex(t,n){return new we(n).lex(t)}static lexInline(t,n){return new we(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,u,d)=>u+" ".repeat(d.length));let e,i,a,r;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(e=s.call({lexer:this},t,n))?(t=t.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.space(t)){t=t.substring(e.raw.length),e.raw.length===1&&n.length>0?n[n.length-1].raw+=`
`:n.push(e);continue}if(e=this.tokenizer.code(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+e.raw,i.text+=`
`+e.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(e);continue}if(e=this.tokenizer.fences(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.heading(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.hr(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.blockquote(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.list(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.html(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.def(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+e.raw,i.text+=`
`+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});continue}if(e=this.tokenizer.table(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.lheading(t)){t=t.substring(e.raw.length),n.push(e);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const u=t.slice(1);let d;this.options.extensions.startBlock.forEach(function(c){d=c.call({lexer:this},u),typeof d=="number"&&d>=0&&(s=Math.min(s,d))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(e=this.tokenizer.paragraph(a))){i=n[n.length-1],r&&i.type==="paragraph"?(i.raw+=`
`+e.raw,i.text+=`
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(e),r=a.length!==t.length,t=t.substring(e.raw.length);continue}if(e=this.tokenizer.text(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
`+e.raw,i.text+=`
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(e);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let e,i,a,r=t,s,u,d;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+zt("a",s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,s.index)+"["+zt("a",s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.escapedEmSt.exec(r))!=null;)r=r.slice(0,s.index+s[0].length-2)+"++"+r.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(u||(d=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(e=c.call({lexer:this},t,n))?(t=t.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.escape(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.tag(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&e.type==="text"&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):n.push(e);continue}if(e=this.tokenizer.link(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(e.raw.length),i=n[n.length-1],i&&e.type==="text"&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):n.push(e);continue}if(e=this.tokenizer.emStrong(t,r,d)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.codespan(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.br(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.del(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.autolink(t,St)){t=t.substring(e.raw.length),n.push(e);continue}if(!this.state.inLink&&(e=this.tokenizer.url(t,St))){t=t.substring(e.raw.length),n.push(e);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const p=t.slice(1);let g;this.options.extensions.startInline.forEach(function(h){g=h.call({lexer:this},p),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(a=t.substring(0,c+1))}if(e=this.tokenizer.inlineText(a,Mn)){t=t.substring(e.raw.length),e.raw.slice(-1)!=="_"&&(d=e.raw.slice(-1)),u=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):n.push(e);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class dt{constructor(t){this.options=t||_e}code(t,n,e){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const a=this.options.highlight(t,i);a!=null&&a!==t&&(e=!0,t=a)}return t=t.replace(/\n$/,"")+`
`,i?'<pre><code class="'+this.options.langPrefix+Y(i)+'">'+(e?t:Y(t,!0))+`</code></pre>
`:"<pre><code>"+(e?t:Y(t,!0))+`</code></pre>
`}blockquote(t){return`<blockquote>
${t}</blockquote>
`}html(t){return t}heading(t,n,e,i){if(this.options.headerIds){const a=this.options.headerPrefix+i.slug(e);return`<h${n} id="${a}">${t}</h${n}>
`}return`<h${n}>${t}</h${n}>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(t,n,e){const i=n?"ol":"ul",a=n&&e!==1?' start="'+e+'"':"";return"<"+i+a+`>
`+t+"</"+i+`>
`}listitem(t){return`<li>${t}</li>
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+t+`</thead>
`+n+`</table>
`}tablerow(t){return`<tr>
${t}</tr>
`}tablecell(t,n){const e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,n,e){if(t=Ct(this.options.sanitize,this.options.baseUrl,t),t===null)return e;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+e+"</a>",i}image(t,n,e){if(t=Ct(this.options.sanitize,this.options.baseUrl,t),t===null)return e;let i=`<img src="${t}" alt="${e}"`;return n&&(i+=` title="${n}"`),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class Zt{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,e){return""+e}image(t,n,e){return""+e}br(){return""}}class Kt{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let e=t,i=0;if(this.seen.hasOwnProperty(e)){i=this.seen[t];do i++,e=t+"-"+i;while(this.seen.hasOwnProperty(e))}return n||(this.seen[t]=i,this.seen[e]=0),e}slug(t,n={}){const e=this.serialize(t);return this.getNextSafeSlug(e,n.dryrun)}}class ye{constructor(t){this.options=t||_e,this.options.renderer=this.options.renderer||new dt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Zt,this.slugger=new Kt}static parse(t,n){return new ye(n).parse(t)}static parseInline(t,n){return new ye(n).parseInline(t)}parse(t,n=!0){let e="",i,a,r,s,u,d,c,p,g,h,E,o,f,R,z,I,$,V,O;const P=t.length;for(i=0;i<P;i++){if(h=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&(O=this.options.extensions.renderers[h.type].call({parser:this},h),O!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){e+=O||"";continue}switch(h.type){case"space":continue;case"hr":{e+=this.renderer.hr();continue}case"heading":{e+=this.renderer.heading(this.parseInline(h.tokens),h.depth,qt(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{e+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(p="",c="",s=h.header.length,a=0;a<s;a++)c+=this.renderer.tablecell(this.parseInline(h.header[a].tokens),{header:!0,align:h.align[a]});for(p+=this.renderer.tablerow(c),g="",s=h.rows.length,a=0;a<s;a++){for(d=h.rows[a],c="",u=d.length,r=0;r<u;r++)c+=this.renderer.tablecell(this.parseInline(d[r].tokens),{header:!1,align:h.align[r]});g+=this.renderer.tablerow(c)}e+=this.renderer.table(p,g);continue}case"blockquote":{g=this.parse(h.tokens),e+=this.renderer.blockquote(g);continue}case"list":{for(E=h.ordered,o=h.start,f=h.loose,s=h.items.length,g="",a=0;a<s;a++)z=h.items[a],I=z.checked,$=z.task,R="",z.task&&(V=this.renderer.checkbox(I),f?z.tokens.length>0&&z.tokens[0].type==="paragraph"?(z.tokens[0].text=V+" "+z.tokens[0].text,z.tokens[0].tokens&&z.tokens[0].tokens.length>0&&z.tokens[0].tokens[0].type==="text"&&(z.tokens[0].tokens[0].text=V+" "+z.tokens[0].tokens[0].text)):z.tokens.unshift({type:"text",text:V}):R+=V),R+=this.parse(z.tokens,f),g+=this.renderer.listitem(R,$,I);e+=this.renderer.list(g,E,o);continue}case"html":{e+=this.renderer.html(h.text);continue}case"paragraph":{e+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(g=h.tokens?this.parseInline(h.tokens):h.text;i+1<P&&t[i+1].type==="text";)h=t[++i],g+=`
`+(h.tokens?this.parseInline(h.tokens):h.text);e+=n?this.renderer.paragraph(g):g;continue}default:{const ie='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error(ie);return}else throw new Error(ie)}}}return e}parseInline(t,n){n=n||this.renderer;let e="",i,a,r;const s=t.length;for(i=0;i<s;i++){if(a=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[a.type]&&(r=this.options.extensions.renderers[a.type].call({parser:this},a),r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type))){e+=r||"";continue}switch(a.type){case"escape":{e+=n.text(a.text);break}case"html":{e+=n.html(a.text);break}case"link":{e+=n.link(a.href,a.title,this.parseInline(a.tokens,n));break}case"image":{e+=n.image(a.href,a.title,a.text);break}case"strong":{e+=n.strong(this.parseInline(a.tokens,n));break}case"em":{e+=n.em(this.parseInline(a.tokens,n));break}case"codespan":{e+=n.codespan(a.text);break}case"br":{e+=n.br();break}case"del":{e+=n.del(this.parseInline(a.tokens,n));break}case"text":{e+=n.text(a.text);break}default:{const u='Token with "'+a.type+'" type was not found.';if(this.options.silent){console.error(u);return}else throw new Error(u)}}}return e}}class Ye{constructor(t){this.options=t||_e}preprocess(t){return t}postprocess(t){return t}}wt(Ye,"passThroughHooks",new Set(["preprocess","postprocess"]));function Dn(l,t,n){return e=>{if(e.message+=`
Please report this to https://github.com/markedjs/marked.`,l){const i="<p>An error occurred:</p><pre>"+Y(e.message+"",!0)+"</pre>";if(t)return Promise.resolve(i);if(n){n(null,i);return}return i}if(t)return Promise.reject(e);if(n){n(e);return}throw e}}function Gt(l,t){return(n,e,i)=>{typeof e=="function"&&(i=e,e=null);const a={...e};e={...b.defaults,...a};const r=Dn(e.silent,e.async,i);if(typeof n>"u"||n===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(jn(e),e.hooks&&(e.hooks.options=e),i){const s=e.highlight;let u;try{e.hooks&&(n=e.hooks.preprocess(n)),u=l(n,e)}catch(p){return r(p)}const d=function(p){let g;if(!p)try{e.walkTokens&&b.walkTokens(u,e.walkTokens),g=t(u,e),e.hooks&&(g=e.hooks.postprocess(g))}catch(h){p=h}return e.highlight=s,p?r(p):i(null,g)};if(!s||s.length<3||(delete e.highlight,!u.length))return d();let c=0;b.walkTokens(u,function(p){p.type==="code"&&(c++,setTimeout(()=>{s(p.text,p.lang,function(g,h){if(g)return d(g);h!=null&&h!==p.text&&(p.text=h,p.escaped=!0),c--,c===0&&d()})},0))}),c===0&&d();return}if(e.async)return Promise.resolve(e.hooks?e.hooks.preprocess(n):n).then(s=>l(s,e)).then(s=>e.walkTokens?Promise.all(b.walkTokens(s,e.walkTokens)).then(()=>s):s).then(s=>t(s,e)).then(s=>e.hooks?e.hooks.postprocess(s):s).catch(r);try{e.hooks&&(n=e.hooks.preprocess(n));const s=l(n,e);e.walkTokens&&b.walkTokens(s,e.walkTokens);let u=t(s,e);return e.hooks&&(u=e.hooks.postprocess(u)),u}catch(s){return r(s)}}}function b(l,t,n){return Gt(we.lex,ye.parse)(l,t,n)}b.options=b.setOptions=function(l){return b.defaults={...b.defaults,...l},bn(b.defaults),b};b.getDefaults=Vt;b.defaults=_e;b.use=function(...l){const t=b.defaults.extensions||{renderers:{},childTokens:{}};l.forEach(n=>{const e={...n};if(e.async=b.defaults.async||e.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const a=t.renderers[i.name];a?t.renderers[i.name]=function(...r){let s=i.renderer.apply(this,r);return s===!1&&(s=a.apply(this,r)),s}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].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]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),e.extensions=t),n.renderer){const i=b.defaults.renderer||new dt;for(const a in n.renderer){const r=i[a];i[a]=(...s)=>{let u=n.renderer[a].apply(i,s);return u===!1&&(u=r.apply(i,s)),u}}e.renderer=i}if(n.tokenizer){const i=b.defaults.tokenizer||new ht;for(const a in n.tokenizer){const r=i[a];i[a]=(...s)=>{let u=n.tokenizer[a].apply(i,s);return u===!1&&(u=r.apply(i,s)),u}}e.tokenizer=i}if(n.hooks){const i=b.defaults.hooks||new Ye;for(const a in n.hooks){const r=i[a];Ye.passThroughHooks.has(a)?i[a]=s=>{if(b.defaults.async)return Promise.resolve(n.hooks[a].call(i,s)).then(d=>r.call(i,d));const u=n.hooks[a].call(i,s);return r.call(i,u)}:i[a]=(...s)=>{let u=n.hooks[a].apply(i,s);return u===!1&&(u=r.apply(i,s)),u}}e.hooks=i}if(n.walkTokens){const i=b.defaults.walkTokens;e.walkTokens=function(a){let r=[];return r.push(n.walkTokens.call(this,a)),i&&(r=r.concat(i.call(this,a))),r}}b.setOptions(e)})};b.walkTokens=function(l,t){let n=[];for(const e of l)switch(n=n.concat(t.call(b,e)),e.type){case"table":{for(const i of e.header)n=n.concat(b.walkTokens(i.tokens,t));for(const i of e.rows)for(const a of i)n=n.concat(b.walkTokens(a.tokens,t));break}case"list":{n=n.concat(b.walkTokens(e.items,t));break}default:b.defaults.extensions&&b.defaults.extensions.childTokens&&b.defaults.extensions.childTokens[e.type]?b.defaults.extensions.childTokens[e.type].forEach(function(i){n=n.concat(b.walkTokens(e[i],t))}):e.tokens&&(n=n.concat(b.walkTokens(e.tokens,t)))}return n};b.parseInline=Gt(we.lexInline,ye.parseInline);b.Parser=ye;b.parser=ye.parse;b.Renderer=dt;b.TextRenderer=Zt;b.Lexer=we;b.lexer=we.lex;b.Tokenizer=ht;b.Slugger=Kt;b.Hooks=Ye;b.parse=b;b.options;b.setOptions;b.use;b.walkTokens;b.parseInline;ye.parse;we.lex;const Lt=({size:l})=>N("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:l,height:l},[N("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),N("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),Bn=()=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},N("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),On=()=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},N("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),Pn=()=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[N("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),N("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),Nn=({active:l=!1})=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[N("path",{d:"M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z"+(l?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"),fill:l?"red":"currentColor"})]),Hn=()=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[N("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),N("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),Vn=()=>N("svg",{width:"16",height:"16",ariaHidden:"true"},N("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),Fn=()=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},N("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),Wn=()=>N("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},N("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),qn=()=>N("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},N("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),Oe=({size:l=100})=>N("svg",{width:l,height:l,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},N("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},N("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Zn=()=>N("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[N("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),N("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]),Qt={"Content-Type":"application/json"},ct=(l,t="")=>{if(typeof l=="object"&&l.errno)throw new TypeError(`${t} failed with ${l.errno}: ${l.errmsg}`);return l},It=({serverURL:l,lang:t,path:n,type:e,action:i})=>fetch(`${l}/article?lang=${t}`,{method:"POST",headers:Qt,body:JSON.stringify({path:n,type:e,action:i})}).then(a=>a.json()),Qe=({serverURL:l,lang:t,token:n,objectId:e,comment:i})=>fetch(`${l}/comment/${e}?lang=${t}`,{method:"PUT",headers:{...Qt,Authorization:`Bearer ${n}`},body:JSON.stringify(i)}).then(a=>a.json()).then(a=>ct(a,"Update comment"));let Et=null;const Xt=()=>Et||(Et=Le("WALINE_LIKE",[]));let At=null;const Kn=()=>At??(At=Le("WALINE_REACTION",{}));var Je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yt={},Se={},Pe={},Gn=Je&&Je.__awaiter||function(l,t,n,e){return new(n||(n=Promise))(function(i,a){function r(d){try{u(e.next(d))}catch(c){a(c)}}function s(d){try{u(e.throw(d))}catch(c){a(c)}}function u(d){var c;d.done?i(d.value):(c=d.value,c instanceof n?c:new n(function(p){p(c)})).then(r,s)}u((e=e.apply(l,t||[])).next())})},Qn=Je&&Je.__generator||function(l,t){var n,e,i,a,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,e&&(i=2&c[0]?e.return:c[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,c[1])).done)return i;switch(e=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,e=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(l,r)}catch(p){c=[6,p],e=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([u,d])}}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.ReCaptchaInstance=void 0;var Xn=function(){function l(t,n,e){this.siteKey=t,this.recaptchaID=n,this.recaptcha=e,this.styleContainer=null}return l.prototype.execute=function(t){return Gn(this,void 0,void 0,function(){return Qn(this,function(n){return[2,this.recaptcha.enterprise?this.recaptcha.enterprise.execute(this.recaptchaID,{action:t}):this.recaptcha.execute(this.recaptchaID,{action:t})]})})},l.prototype.getSiteKey=function(){return this.siteKey},l.prototype.hideBadge=function(){this.styleContainer===null&&(this.styleContainer=document.createElement("style"),this.styleContainer.innerHTML=".grecaptcha-badge{visibility:hidden !important;}",document.head.appendChild(this.styleContainer))},l.prototype.showBadge=function(){this.styleContainer!==null&&(document.head.removeChild(this.styleContainer),this.styleContainer=null)},l}();Pe.ReCaptchaInstance=Xn,Object.defineProperty(Se,"__esModule",{value:!0}),Se.getInstance=Se.load=void 0;var me,Yn=Pe;(function(l){l[l.NOT_LOADED=0]="NOT_LOADED",l[l.LOADING=1]="LOADING",l[l.LOADED=2]="LOADED"})(me||(me={}));var Tt=function(){function l(){}return l.load=function(t,n){if(n===void 0&&(n={}),typeof document>"u")return Promise.reject(new Error("This is a library for the browser!"));if(l.getLoadingState()===me.LOADED)return l.instance.getSiteKey()===t?Promise.resolve(l.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(l.getLoadingState()===me.LOADING)return t!==l.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(i,a){l.successfulLoadingConsumers.push(function(r){return i(r)}),l.errorLoadingRunnable.push(function(r){return a(r)})});l.instanceSiteKey=t,l.setLoadingState(me.LOADING);var e=new l;return new Promise(function(i,a){e.loadScript(t,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then(function(){l.setLoadingState(me.LOADED);var r=e.doExplicitRender(grecaptcha,t,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),s=new Yn.ReCaptchaInstance(t,r,grecaptcha);l.successfulLoadingConsumers.forEach(function(u){return u(s)}),l.successfulLoadingConsumers=[],n.autoHideBadge&&s.hideBadge(),l.instance=s,i(s)}).catch(function(r){l.errorLoadingRunnable.forEach(function(s){return s(r)}),l.errorLoadingRunnable=[],a(r)})})},l.getInstance=function(){return l.instance},l.setLoadingState=function(t){l.loadingState=t},l.getLoadingState=function(){return l.loadingState===null?me.NOT_LOADED:l.loadingState},l.prototype.loadScript=function(t,n,e,i,a){var r=this;n===void 0&&(n=!1),e===void 0&&(e=!1),i===void 0&&(i={}),a===void 0&&(a="");var s=document.createElement("script");s.setAttribute("recaptcha-v3-script","");var u="https://www.google.com/recaptcha/api.js";n&&(u=e?"https://recaptcha.net/recaptcha/enterprise.js":"https://recaptcha.net/recaptcha/api.js"),e&&(u="https://www.google.com/recaptcha/enterprise.js"),a&&(u=a),i.render&&(i.render=void 0);var d=this.buildQueryString(i);return s.src=u+"?render=explicit"+d,new Promise(function(c,p){s.addEventListener("load",r.waitForScriptToLoad(function(){c(s)},e),!1),s.onerror=function(g){l.setLoadingState(me.NOT_LOADED),p(g)},document.head.appendChild(s)})},l.prototype.buildQueryString=function(t){return Object.keys(t).length<1?"":"&"+Object.keys(t).filter(function(n){return!!t[n]}).map(function(n){return n+"="+t[n]}).join("&")},l.prototype.waitForScriptToLoad=function(t,n){var e=this;return function(){window.grecaptcha===void 0?setTimeout(function(){e.waitForScriptToLoad(t,n)},l.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready(function(){t()}):window.grecaptcha.ready(function(){t()})}},l.prototype.doExplicitRender=function(t,n,e,i){var a={sitekey:n,badge:e.badge,size:e.size,tabindex:e.tabindex};return e.container?i?t.enterprise.render(e.container,a):t.render(e.container,a):i?t.enterprise.render(a):t.render(a)},l.loadingState=null,l.instance=null,l.instanceSiteKey=null,l.successfulLoadingConsumers=[],l.errorLoadingRunnable=[],l.SCRIPT_LOAD_DELAY=25,l}();Se.load=Tt.load,Se.getInstance=Tt.getInstance,function(l){Object.defineProperty(l,"__esModule",{value:!0}),l.ReCaptchaInstance=l.getInstance=l.load=void 0;var t=Se;Object.defineProperty(l,"load",{enumerable:!0,get:function(){return t.load}}),Object.defineProperty(l,"getInstance",{enumerable:!0,get:function(){return t.getInstance}});var n=Pe;Object.defineProperty(l,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})}(Yt);const jt={};let Ut=null;const gt=()=>Ut??(Ut=Le("WALINE_USER",{})),Jn={key:0,class:"wl-reaction"},ei=["textContent"],ti={class:"wl-reaction-list"},ni=["onClick"],ii={class:"wl-reaction-img"},li=["src","alt"],ai=["textContent"],ri=["textContent"];var si=Ne({__name:"ArticleReaction",setup(l,{expose:t}){t();const n=Kn(),e=ut("config"),i=U(-1),a=U([]),r=X(()=>e.value.locale),s=X(()=>e.value.reaction.length>0),u=X(()=>{const{reaction:p,path:g}=e.value;return p.map((h,E)=>({icon:h,desc:r.value[`reaction${E}`],active:n.value[g]===E}))});let d;const c=async()=>{if(s.value){const{serverURL:p,lang:g,path:h,reaction:E}=e.value,o=new AbortController;d=o.abort.bind(o);const f=await(({serverURL:R,lang:z,paths:I,type:$,signal:V})=>fetch(`${R}/article?path=${encodeURIComponent(I.join(","))}&type=${encodeURIComponent($.join(","))}&lang=${z}`,{signal:V}).then(O=>O.json()))({serverURL:p,lang:g,paths:[h],type:E.map((R,z)=>`reaction${z}`),signal:o.signal});if(Array.isArray(f)||typeof f=="number")return;a.value=E.map((R,z)=>f[`reaction${z}`])}};return et(()=>{ve(()=>[e.value.serverURL,e.value.path],()=>{c()},{immediate:!0})}),pt(()=>d==null?void 0:d()),(p,g)=>u.value.length?(m(),w("div",Jn,[_("div",{class:"wl-reaction-title",textContent:M(r.value.reactionTitle)},null,8,ei),_("ul",ti,[(m(!0),w(te,null,se(u.value,({active:h,icon:E,desc:o},f)=>(m(),w("li",{key:f,class:J(["wl-reaction-item",{active:h}]),onClick:R=>(async z=>{if(i.value===-1){const{serverURL:I,lang:$,path:V}=e.value,O=n.value[V];i.value=z,O!==void 0&&(await It({serverURL:I,lang:$,path:V,type:`reaction${O}`,action:"desc"}),a.value[O]=Math.max(a.value[O]-1,0)),O!==z&&(await It({serverURL:I,lang:$,path:V,type:`reaction${z}`}),a.value[z]=(a.value[z]||0)+1),O===z?delete n.value[V]:n.value[V]=z,i.value=-1}})(f)},[_("div",ii,[_("img",{src:E,alt:o},null,8,li),i.value===f?(m(),ke(T(Oe),{key:0,class:"wl-reaction-loading"})):(m(),w("div",{key:1,class:"wl-reaction-votes",textContent:M(a.value[f]||0)},null,8,ai))]),_("div",{class:"wl-reaction-text",textContent:M(o)},null,8,ri)],10,ni))),128))])])):j("v-if",!0)}}),He=(l,t)=>{const n=l.__vccOpts||l;for(const[e,i]of t)n[e]=i;return n},oi=He(si,[["__file","ArticleReaction.vue"]]);const ci=["data-index"],ui=["src","title","onClick"];var pi=He(Ne({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(l,{expose:t}){const n=l;t();let e=null;const i=U(null),a=U({}),r=U([]),s=()=>{const p=Math.floor((i.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return p>0?p:1},u=async p=>{var h;if(p>=n.items.length)return;await mn();const g=Array.from(((h=i.value)==null?void 0:h.children)||[]).reduce((E,o)=>o.getBoundingClientRect().height<E.getBoundingClientRect().height?o:E);r.value[Number(g.dataset.index)].push(p),await u(p+1)},d=async(p=!1)=>{if(r.value.length===s()&&!p)return;var g;r.value=(g=s(),new Array(g).fill(null).map(()=>[]));const h=window.scrollY;await u(0),window.scrollTo({top:h})},c=p=>{a.value[p.target.src]=!0};return et(()=>{d(!0),e=new ResizeObserver(()=>{d()}),e.observe(i.value),ve(()=>[n.items],()=>{a.value={},d(!0)}),ve(()=>[n.columnWidth,n.gap],()=>{d()})}),sn(()=>e.unobserve(i.value)),(p,g)=>(m(),w("div",{ref_key:"wall",ref:i,class:"wl-gallery",style:yt({gap:`${p.gap}px`})},[(m(!0),w(te,null,se(r.value,(h,E)=>(m(),w("div",{key:E,class:"wl-gallery-column","data-index":E,style:yt({gap:`${p.gap}px`})},[(m(!0),w(te,null,se(h,o=>(m(),w(te,{key:o},[a.value[p.items[o].src]?j("v-if",!0):(m(),ke(T(Oe),{key:0,size:36,style:{margin:"20px auto"}})),_("img",{class:"wl-gallery-item",src:p.items[o].src,title:p.items[o].title,loading:"lazy",onLoad:c,onClick:f=>p.$emit("insert",`![](${p.items[o].src})`)},null,40,ui)],64))),128))],12,ci))),128))],4))}}),[["__file","ImageWall.vue"]]);const hi=l=>{try{l=decodeURI(l)}catch{}return l},Jt=(l="")=>l.replace(/\/$/u,""),en=l=>/^(https?:)?\/\//.test(l),di=["nick","mail","link"],Mt=l=>l.filter(t=>di.includes(t)),Dt=["//unpkg.com/@waline/emojis@1.1.0/weibo"],gi=["//unpkg.com/@waline/emojis/tieba/tieba_agree.png","//unpkg.com/@waline/emojis/tieba/tieba_look_down.png","//unpkg.com/@waline/emojis/tieba/tieba_sunglasses.png","//unpkg.com/@waline/emojis/tieba/tieba_pick_nose.png","//unpkg.com/@waline/emojis/tieba/tieba_awkward.png","//unpkg.com/@waline/emojis/tieba/tieba_sleep.png"],fi=l=>new Promise((t,n)=>{if(l.size>128e3)return n(new Error("File too large! File size limit 128KB"));const e=new FileReader;e.readAsDataURL(l),e.onload=()=>{var i;return t(((i=e.result)==null?void 0:i.toString())||"")},e.onerror=n}),mi=l=>l===!0?'<p class="wl-tex">TeX is not available in preview</p>':'<span class="wl-tex">TeX is not available in preview</span>',vi=l=>{const t=async(n,e={})=>fetch(`https://api.giphy.com/v1/gifs/${n}?${new URLSearchParams({lang:l,limit:"20",rating:"g",api_key:"6CIMLkNMMOhRcXPoMCPkFy4Ybk2XUiMp",...e}).toString()}`).then(i=>i.json()).then(({data:i})=>i.map(a=>({title:a.title,src:a.images.downsized_medium.url})));return{search:n=>t("search",{q:n,offset:"0"}),default:()=>t("trending",{}),more:(n,e=0)=>t("search",{q:n,offset:e.toString()})}},ki=new RegExp(`(${/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source}|${/</.source})|((?:${/(?:^|\s)\/\/(.+?)$/gm.source})|(?:${/\/\*([\S\s]*?)\*\//gm.source}))`,"gmi"),Bt=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"],tt={},wi=l=>{let t=0;return l.replace(ki,(n,e,i)=>{if(i)return`<span style="color: slategray">${i}</span>`;if(e==="<")return"&lt;";let a;tt[e]?a=tt[e]:(a=Bt[t],tt[e]=a);const r=`<span style="color: #${a}">${e}</span>`;return t=++t%Bt.length,r})},yi=["nick","nickError","mail","mailError","link","optional","placeholder","sofa","submit","like","cancelLike","reply","cancelReply","comment","refresh","more","preview","emoji","uploadImage","seconds","minutes","hours","days","now","uploading","login","logout","admin","sticky","word","wordHint","anonymous","level0","level1","level2","level3","level4","level5","gif","gifSearchPlaceholder","profile","approved","waiting","spam","unsticky","oldest","latest","hottest","reactionTitle"],Ie=l=>Object.fromEntries(l.map((t,n)=>[yi[n],t]));var nt=Ie(["NickName","NickName cannot be less than 3 bytes.","E-Mail","Please confirm your email address.","Website","Optional","Comment here...","No comment yet.","Submit","Like","Cancel like","Reply","Cancel reply","Comments","Refresh","Load More...","Preview","Emoji","Upload Image","seconds ago","minutes ago","hours ago","days ago","just now","Uploading","Login","logout","Admin","Sticky","Words",`Please input comments between $0 and $1 words!
Current word number: $2`,"Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest","What do you think?"]),Ke=Ie(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード",`コメントは $0 から $1 ワードの間でなければなりません!
現在の単語番号: $2`,"匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順","どう思いますか?"]),Ot=Ie(["Apelido","Apelido não pode ser menor que 3 bytes.","E-Mail","Por favor, confirme seu endereço de e-mail.","Website","Opcional","Comente aqui...","Nenhum comentário, ainda.","Enviar","Like","Cancel like","Responder","Cancelar resposta","Comentários","Refrescar","Carregar Mais...","Visualizar","Emoji","Enviar Imagem","segundos atrás","minutos atrás","horas atrás","dias atrás","agora mesmo","Enviando","Entrar","Sair","Admin","Sticky","Palavras",`Favor enviar comentário com $0 a $1 palavras!
Número de palavras atuais: $2`,"Anônimo","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Pesquisar GIF","informação pessoal","Aprovado","Espera","Spam","Unsticky","Mais velho","Mais recentes","Mais quente","O que você acha?"]),it=Ie(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова",`Пожалуйста, введите комментарии от $0 до $1 слов!
Номер текущего слова: $2`,"Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий","Что вы думаете?"]),lt=Ie(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字",`评论字数应在 $0 $1 字之间
当前字数$2`,"匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度","你认为这篇文章怎么样?"]),Pt=Ie(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎留言","來發留言吧~","送出","喜歡","取消喜歡","回覆","取消回覆","留言","重整","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登入","登出","管理者","置頂","字",`留言字數應在 $0 $1 字之間
目前字數$2`,"匿名","潛水","冒泡","吐槽","活躍","多話","傳說","表情包","搜尋表情包","個人資料","通過","待審核","垃圾","取消置頂","最早","最新","熱門","你認為這篇文章怎麼樣?"]);const at={zh:lt,"zh-cn":lt,"zh-CN":lt,"zh-tw":Pt,"zh-TW":Pt,en:nt,"en-US":nt,"en-us":nt,jp:Ke,ja:Ke,"jp-jp":Ke,"jp-JP":Ke,"pt-br":Ot,"pt-BR":Ot,ru:it,"ru-ru":it,"ru-RU":it},bi=l=>{const t=Jt(l);return en(t)?t:`https://${t}`},xi=l=>Array.isArray(l)?l:!!l&&[0,l],rt=(l,t)=>typeof l=="function"?l:l!==!1&&t,st="{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bgcolor:#1e1e1e;--waline-bgcolor-light:#272727;--waline-bgcolor-hover: #444;--waline-border-color:#333;--waline-disable-bgcolor:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bgcolor:#272727;--waline-info-color:#666}",ot=(l,t)=>{let n=l.toString();for(;n.length<t;)n="0"+n;return n},$i=(l,t,n)=>{if(!l)return"";const e=typeof l=="string"?new Date(l.indexOf(" ")!==-1?l.replace(/-/g,"/"):l):l,i=t.getTime()-e.getTime(),a=Math.floor(i/864e5);if(a===0){const r=i%864e5,s=Math.floor(r/36e5);if(s===0){const u=r%36e5,d=Math.floor(u/6e4);if(d===0){const c=u%6e4;return`${Math.round(c/1e3)} ${n.seconds}`}return`${d} ${n.minutes}`}return`${s} ${n.hours}`}return a<0?n.now:a<8?`${a} ${n.days}`:(r=>{const s=ot(r.getDate(),2),u=ot(r.getMonth()+1,2);return`${ot(r.getFullYear(),2)}-${u}-${s}`})(e)},Ci=/^[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])?)*$/,_i=l=>{const t=Le("WALINE_EMOJI",{}),n=!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(l);if(n){const e=t.value[l];if(e)return Promise.resolve(e)}return fetch(`${l}/info.json`).then(e=>e.json()).then(e=>{const i={folder:l,...e};return n&&(t.value[l]=i),i})},Nt=(l,t="",n="",e="")=>`${t?`${t}/`:""}${n}${l}${e?`.${e}`:""}`,zi=l=>l.type.includes("image"),Ht=l=>{const t=Array.from(l).find(zi);return t?t.getAsFile():null},Ri=/\$.*?\$/,Si=/^\$(.*?)\$/,Li=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,tn=(l="",t={})=>l.replace(/:(.+?):/g,(n,e)=>t[e]?`<img class="wl-emoji" src="${t[e]}" alt="${e}">`:n),Ii=(l,{emojiMap:t,highlighter:n,texRenderer:e})=>{if(b.setOptions({highlight:n||void 0,breaks:!0,smartLists:!0,smartypants:!0}),e){const i=(a=>[{name:"blockMath",level:"block",tokenizer(r){const s=Li.exec(r);if(s!==null)return{type:"html",raw:s[0],text:a(!0,s[1])}}},{name:"inlineMath",level:"inline",start(r){const s=r.search(Ri);return s!==-1?s:r.length},tokenizer(r){const s=Si.exec(r);if(s!==null)return{type:"html",raw:s[0],text:a(!1,s[1])}}}])(e);b.use({extensions:i})}return b.parse(tn(l,t))},Ei={class:"wl-comment"},Ai={key:0,class:"wl-login-info"},Ti={class:"wl-avatar"},ji=["title"],Ui=["title"],Mi=["src"],Di=["title","textContent"],Bi={class:"wl-panel"},Oi=["for","textContent"],Pi=["id","onUpdate:modelValue","name","type"],Ni=["placeholder"],Hi={class:"wl-preview"},Vi=_("hr",null,null,-1),Fi=["innerHTML"],Wi={class:"wl-footer"},qi={class:"wl-actions"},Zi={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},Ki=["title"],Gi=["title"],Qi=["title"],Xi=["title"],Yi={class:"wl-info"},Ji=_("div",{class:"wl-captcha-container"},null,-1),el={class:"wl-text-number"},tl={key:0},nl=["textContent"],il=["textContent"],ll=["disabled"],al=["placeholder"],rl={key:1,class:"wl-loading"},sl={key:0,class:"wl-tab-wrapper"},ol=["title","onClick"],cl=["src","alt"],ul={key:0,class:"wl-tabs"},pl=["onClick"],hl=["src","alt","title"],dl=["title"];var gl=Ne({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(l,{expose:t,emit:n}){const e=l;t();const i=ut("config"),a=Le("WALINE_COMMENT_BOX_EDITOR",""),r=Le("WALINE_USER_META",{nick:"",mail:"",link:""}),s=gt(),u=U({}),d=U(null),c=U(null),p=U(null),g=U(null),h=U(null),E=U(null),o=U(null),f=U({tabs:[],map:{}}),R=U(0),z=U(!1),I=U(!1),$=U(!1),V=U(""),O=U(0),P=un({loading:!0,list:[]}),ie=U(0),ge=U(!1),Ve=U(""),pe=U(!1),S=U(!1),A=X(()=>i.value.locale),D=X(()=>{var y;return!!((y=s.value)!=null&&y.token)}),K=X(()=>i.value.imageUploader!==!1),F=y=>{const v=d.value,L=v.selectionStart,B=v.selectionEnd||0,C=v.scrollTop;a.value=v.value.substring(0,L)+y+v.value.substring(B,v.value.length),v.focus(),v.selectionStart=L+y.length,v.selectionEnd=L+y.length,v.scrollTop=C},ne=y=>{const v=y.key;(y.ctrlKey||y.metaKey)&&v==="Enter"&&ze()},G=y=>{const v=`![${i.value.locale.uploading} ${y.name}]()`;return F(v),pe.value=!0,Promise.resolve().then(()=>i.value.imageUploader(y)).then(L=>{a.value=a.value.replace(v,`\r
![${y.name}](${L})`)}).catch(L=>{alert(L.message),a.value=a.value.replace(v,"")}).then(()=>{pe.value=!1})},le=y=>{var v;if((v=y.dataTransfer)!=null&&v.items){const L=Ht(y.dataTransfer.items);L&&K.value&&(G(L),y.preventDefault())}},oe=y=>{if(y.clipboardData){const v=Ht(y.clipboardData.items);v&&K.value&&G(v)}},be=()=>{const y=c.value;y.files&&K.value&&G(y.files[0]).then(()=>{y.value=""})},ze=async()=>{var We,Te,je,ft,mt,vt;const{serverURL:y,lang:v,login:L,wordLimit:B,requiredMeta:C,recaptchaV3Key:H,turnstileKey:q}=i.value,Q=await(async()=>{if(!navigator)return"";const{userAgentData:fe}=navigator;let de=navigator.userAgent;if(!fe||fe.platform!=="Windows")return de;const{platformVersion:ue}=await fe.getHighEntropyValues(["platformVersion"]);return ue&&parseInt(ue.split(".")[0])>=13&&(de=de.replace("Windows NT 10.0","Windows NT 11.0")),de})(),Z={comment:Ve.value,nick:r.value.nick,mail:r.value.mail,link:r.value.link,url:i.value.path,ua:Q};if((We=s.value)!=null&&We.token)Z.nick=s.value.display_name,Z.mail=s.value.email,Z.link=s.value.url;else{if(L==="force")return;if(C.indexOf("nick")>-1&&!Z.nick)return(Te=u.value.nick)==null||Te.focus(),alert(A.value.nickError);if(C.indexOf("mail")>-1&&!Z.mail||Z.mail&&(he=Z.mail,!Ci.test(he)))return(je=u.value.mail)==null||je.focus(),alert(A.value.mailError);Z.nick||(Z.nick=A.value.anonymous)}var he;if(Z.comment){if(!ge.value)return alert(A.value.wordHint.replace("$0",B[0].toString()).replace("$1",B[1].toString()).replace("$2",O.value.toString()));Z.comment=tn(Z.comment,f.value.map),e.replyId&&e.rootId&&(Z.pid=e.replyId,Z.rid=e.rootId,Z.at=e.replyUser),pe.value=!0;try{H&&(Z.recaptchaV3=await(ue=>{const Ue=jt[ue]??(jt[ue]=Yt.load(ue,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:re=>Ue.then(Me=>Me.execute(re))}})(H).execute("social")),q&&(Z.turnstile=await(ae=q,{execute:async ue=>{const{load:Ue}=vn("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1});await Ue();const re=window==null?void 0:window.turnstile;return new Promise(Me=>{re==null||re.ready(()=>{re==null||re.render(".wl-captcha-container",{sitekey:ae,action:ue,size:"compact",callback:Me})})})}}).execute("social"));const fe={serverURL:y,lang:v,token:(ft=s.value)==null?void 0:ft.token,comment:Z},de=await(e.edit?Qe({objectId:e.edit.objectId,...fe}):(({serverURL:ue,lang:Ue,token:re,comment:Me})=>{const kt={"Content-Type":"application/json"};return re&&(kt.Authorization=`Bearer ${re}`),fetch(`${ue}/comment?lang=${Ue}`,{method:"POST",headers:kt,body:JSON.stringify(Me)}).then(ln=>ln.json())})(fe));if(pe.value=!1,de.errmsg)return alert(de.errmsg);n("submit",de.data),a.value="",V.value="",e.replyId&&n("cancelReply"),(mt=e.edit)!=null&&mt.objectId&&n("cancelEdit")}catch(fe){pe.value=!1,alert(fe.message)}var ae}else(vt=d.value)==null||vt.focus()},Ee=y=>{y.preventDefault();const{lang:v,serverURL:L}=i.value;(({lang:B,serverURL:C})=>{const H=(window.innerWidth-450)/2,q=(window.innerHeight-450)/2,Q=window.open(`${C}/ui/login?lng=${encodeURIComponent(B)}`,"_blank",`width=450,height=450,left=${H},top=${q},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);return Q==null||Q.postMessage({type:"TOKEN",data:null},"*"),new Promise(Z=>{const he=({data:ae})=>{ae&&typeof ae=="object"&&ae.type==="userInfo"&&ae.data.token&&(Q==null||Q.close(),window.removeEventListener("message",he),Z(ae.data))};window.addEventListener("message",he)})})({serverURL:L,lang:v}).then(B=>{s.value=B,(B.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(B)),n("log")})},Ae=()=>{s.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),n("log")},xe=y=>{y.preventDefault();const{lang:v,serverURL:L}=i.value,B=(window.innerWidth-800)/2,C=(window.innerHeight-800)/2,H=new URLSearchParams({lng:v,token:s.value.token}),q=window.open(`${L}/ui/profile?${H.toString()}`,"_blank",`width=800,height=800,left=${B},top=${C},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);q==null||q.postMessage({type:"TOKEN",data:s.value.token},"*")},$e=y=>{var v,L,B,C;(v=p.value)!=null&&v.contains(y.target)||(L=g.value)!=null&&L.contains(y.target)||(z.value=!1),(B=h.value)!=null&&B.contains(y.target)||(C=E.value)!=null&&C.contains(y.target)||(I.value=!1)},ce=async y=>{var Q;const{scrollTop:v,clientHeight:L,scrollHeight:B}=y.target,C=(L+v)/B,H=i.value.search,q=((Q=o.value)==null?void 0:Q.value)||"";C<.9||P.loading||S.value||(P.loading=!0,(H.more&&P.list.length?await H.more(q,P.list.length):await H.search(q)).length?P.list=[...P.list,...H.more&&P.list.length?await H.more(q,P.list.length):await H.search(q)]:S.value=!0,P.loading=!1,setTimeout(()=>{y.target.scrollTop=v},50))},Re=kn(y=>{P.list=[],S.value=!1,ce(y)},300);ve([i,O],([y,v])=>{const{wordLimit:L}=y;L?v<L[0]&&L[0]!==0?(ie.value=L[0],ge.value=!1):v>L[1]?(ie.value=L[1],ge.value=!1):(ie.value=L[1],ge.value=!0):(ie.value=0,ge.value=!0)},{immediate:!0});const Fe=({data:y})=>{y&&y.type==="profile"&&(s.value={...s.value,...y.data},[localStorage,sessionStorage].filter(v=>v.getItem("WALINE_USER")).forEach(v=>v.setItem("WALINE_USER",JSON.stringify(s))))};return et(()=>{var y;document.body.addEventListener("click",$e),window.addEventListener("message",Fe),(y=e.edit)!=null&&y.objectId&&(a.value=e.edit.orig),ve(I,async v=>{if(!v)return;const L=i.value.search;o.value&&(o.value.value=""),P.loading=!0,P.list=L.default?await L.default():await L.search(""),P.loading=!1}),ve(()=>a.value,v=>{const{highlighter:L,texRenderer:B}=i.value;Ve.value=v,V.value=Ii(v,{emojiMap:f.value.map,highlighter:L,texRenderer:B}),O.value=(C=>{var H,q;return(((H=(Q=>Q.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu))(C))==null?void 0:H.reduce((Q,Z)=>Q+(Z.trim()===""?0:Z.trim().split(/\s+/u).length),0))||0)+(((q=(Q=>Q.match(/[\u4E00-\u9FD5]/gu))(C))==null?void 0:q.length)||0)})(v),v?xt(d.value):xt.destroy(d.value)},{immediate:!0}),ve(()=>i.value.emoji,v=>{return(L=v,Promise.all(L.map(B=>typeof B=="string"?_i(Jt(B)):Promise.resolve(B))).then(B=>{const C={tabs:[],map:{}};return B.forEach(H=>{const{name:q,folder:Q,icon:Z,prefix:he,type:ae,items:We}=H;C.tabs.push({name:q,icon:Nt(Z,Q,he,ae),items:We.map(Te=>{const je=`${he||""}${Te}`;return C.map[je]=Nt(Te,Q,he,ae),je})})}),C})).then(B=>{f.value=B});var L},{immediate:!0})}),pt(()=>{document.body.removeEventListener("click",$e),window.removeEventListener("message",Fe)}),(y,v)=>{var L,B;return m(),w("div",Ei,[T(i).login!=="disable"&&D.value&&!((L=y.edit)!=null&&L.objectId)?(m(),w("div",Ai,[_("div",Ti,[_("button",{type:"submit",class:"wl-logout-btn",title:A.value.logout,onClick:Ae},[ee(T(Lt),{size:14})],8,ji),_("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:A.value.profile,onClick:xe},[_("img",{src:T(s).avatar,alt:"avatar"},null,8,Mi)],8,Ui)]),_("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:A.value.profile,onClick:xe,textContent:M(T(s).display_name)},null,8,Di)])):j("v-if",!0),_("div",Bi,[T(i).login!=="force"&&T(i).meta.length&&!D.value?(m(),w("div",{key:0,class:J(["wl-header",`item${T(i).meta.length}`])},[(m(!0),w(te,null,se(T(i).meta,C=>(m(),w("div",{key:C,class:"wl-header-item"},[_("label",{for:`wl-${C}`,textContent:M(A.value[C]+(T(i).requiredMeta.includes(C)||!T(i).requiredMeta.length?"":`(${A.value.optional})`))},null,8,Oi),qe(_("input",{id:`wl-${C}`,ref_for:!0,ref:H=>{H&&(u.value[C]=H)},"onUpdate:modelValue":H=>T(r)[C]=H,class:J(["wl-input",`wl-${C}`]),name:C,type:C==="mail"?"email":"text"},null,10,Pi),[[pn,T(r)[C]]])]))),128))],2)):j("v-if",!0),qe(_("textarea",{id:"wl-edit",ref_key:"editorRef",ref:d,"onUpdate:modelValue":v[0]||(v[0]=C=>dn(a)?a.value=C:null),class:"wl-editor",placeholder:y.replyUser?`@${y.replyUser}`:A.value.placeholder,onKeydown:ne,onDrop:le,onPaste:oe},null,40,Ni),[[hn,T(a)]]),qe(_("div",Hi,[Vi,_("h4",null,M(A.value.preview)+":",1),_("div",{class:"wl-content",innerHTML:V.value},null,8,Fi)],512),[[bt,$.value]]),_("div",Wi,[_("div",qi,[_("a",Zi,[ee(T(Vn))]),qe(_("button",{ref_key:"emojiButtonRef",ref:p,type:"button",class:J(["wl-action",{active:z.value}]),title:A.value.emoji,onClick:v[1]||(v[1]=C=>z.value=!z.value)},[ee(T(On))],10,Ki),[[bt,f.value.tabs.length]]),T(i).search?(m(),w("button",{key:0,ref_key:"gifButtonRef",ref:h,type:"button",class:J(["wl-action",{active:I.value}]),title:A.value.gif,onClick:v[2]||(v[2]=C=>I.value=!I.value)},[ee(T(Zn))],10,Gi)):j("v-if",!0),_("input",{id:"wl-image-upload",ref_key:"imageUploadRef",ref:c,class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:be},null,544),K.value?(m(),w("label",{key:1,for:"wl-image-upload",class:"wl-action",title:A.value.uploadImage},[ee(T(Pn))],8,Qi)):j("v-if",!0),_("button",{type:"button",class:J(["wl-action",{active:$.value}]),title:A.value.preview,onClick:v[3]||(v[3]=C=>$.value=!$.value)},[ee(T(Hn))],10,Xi)]),_("div",Yi,[Ji,_("div",el,[Ce(M(O.value)+" ",1),T(i).wordLimit?(m(),w("span",tl,[Ce("  /  "),_("span",{class:J({illegal:!ge.value}),textContent:M(ie.value)},null,10,nl)])):j("v-if",!0),Ce("  "+M(A.value.word),1)]),T(i).login==="disable"||D.value?j("v-if",!0):(m(),w("button",{key:0,type:"button",class:"wl-btn",onClick:Ee,textContent:M(A.value.login)},null,8,il)),T(i).login!=="force"||D.value?(m(),w("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:pe.value,onClick:ze},[pe.value?(m(),ke(T(Oe),{key:0,size:16})):(m(),w(te,{key:1},[Ce(M(A.value.submit),1)],64))],8,ll)):j("v-if",!0)]),_("div",{ref_key:"gifPopupRef",ref:E,class:J(["wl-gif-popup",{display:I.value}])},[_("input",{ref_key:"gifSearchInputRef",ref:o,type:"text",placeholder:A.value.gifSearchPlaceholder,onInput:v[4]||(v[4]=(...C)=>T(Re)&&T(Re)(...C))},null,40,al),P.list.length?(m(),ke(pi,{key:0,items:P.list,"column-width":200,gap:6,onInsert:v[5]||(v[5]=C=>F(C)),onScroll:ce},null,8,["items"])):j("v-if",!0),P.loading?(m(),w("div",rl,[ee(T(Oe),{size:30})])):j("v-if",!0)],2),_("div",{ref_key:"emojiPopupRef",ref:g,class:J(["wl-emoji-popup",{display:z.value}])},[(m(!0),w(te,null,se(f.value.tabs,(C,H)=>(m(),w(te,{key:C.name},[H===R.value?(m(),w("div",sl,[(m(!0),w(te,null,se(C.items,q=>(m(),w("button",{key:q,type:"button",title:q,onClick:Q=>F(`:${q}:`)},[z.value?(m(),w("img",{key:0,class:"wl-emoji",src:f.value.map[q],alt:q,loading:"lazy",referrerPolicy:"no-referrer"},null,8,cl)):j("v-if",!0)],8,ol))),128))])):j("v-if",!0)],64))),128)),f.value.tabs.length>1?(m(),w("div",ul,[(m(!0),w(te,null,se(f.value.tabs,(C,H)=>(m(),w("button",{key:C.name,type:"button",class:J(["wl-tab",{active:R.value===H}]),onClick:q=>R.value=H},[_("img",{class:"wl-emoji",src:C.icon,alt:C.name,title:C.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,hl)],10,pl))),128))])):j("v-if",!0)],2)])]),y.replyId||(B=y.edit)!=null&&B.objectId?(m(),w("button",{key:1,type:"button",class:"wl-close",title:A.value.cancelReply,onClick:v[6]||(v[6]=C=>y.$emit(y.replyId?"cancelReply":"cancelEdit"))},[ee(T(Lt),{size:24})],8,dl)):j("v-if",!0)])}}}),nn=He(gl,[["__file","CommentBox.vue"]]);const fl=["id"],ml={class:"wl-user","aria-hidden":"true"},vl=["src"],kl={class:"wl-card"},wl={class:"wl-head"},yl=["href"],bl={key:1,class:"wl-nick"},xl=["textContent"],$l=["textContent"],Cl=["textContent"],_l=["textContent"],zl=["textContent"],Rl={class:"wl-comment-actions"},Sl=["title"],Ll=["textContent"],Il=["title"],El={class:"wl-meta","aria-hidden":"true"},Al=["data-value","textContent"],Tl=["data-value","textContent"],jl=["data-value","textContent"],Ul=["innerHTML"],Ml={key:1,class:"wl-admin-actions"},Dl={class:"wl-comment-status"},Bl=["disabled","onClick","textContent"],Ol={key:3,class:"wl-quote"};var Pl=He(Ne({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(l){const t=l,n=["approved","waiting","spam"],e=ut("config"),i=Xt(),a=on(),r=gt(),s=X(()=>e.value.locale),u=X(()=>{const{link:o}=t.comment;return o?en(o)?o:`https://${o}`:""}),d=X(()=>i.value.includes(t.comment.objectId)),c=X(()=>$i(t.comment.insertedAt,a.value,s.value)),p=X(()=>r.value.type==="administrator"),g=X(()=>t.comment.user_id&&r.value.objectId===t.comment.user_id),h=X(()=>{var o;return t.comment.objectId===((o=t.reply)==null?void 0:o.objectId)}),E=X(()=>{var o;return t.comment.objectId===((o=t.edit)==null?void 0:o.objectId)});return(o,f)=>{var z;const R=cn("CommentCard",!0);return m(),w("div",{id:o.comment.objectId,class:"wl-card-item"},[_("div",ml,[o.comment.avatar?(m(),w("img",{key:0,src:o.comment.avatar},null,8,vl)):j("v-if",!0),o.comment.type?(m(),ke(T(qn),{key:1})):j("v-if",!0)]),_("div",kl,[_("div",wl,[u.value?(m(),w("a",{key:0,class:"wl-nick",href:u.value,target:"_blank",rel:"nofollow noopener noreferrer"},M(o.comment.nick),9,yl)):(m(),w("span",bl,M(o.comment.nick),1)),o.comment.type==="administrator"?(m(),w("span",{key:2,class:"wl-badge",textContent:M(s.value.admin)},null,8,xl)):j("v-if",!0),o.comment.label?(m(),w("span",{key:3,class:"wl-badge",textContent:M(o.comment.label)},null,8,$l)):j("v-if",!0),o.comment.sticky?(m(),w("span",{key:4,class:"wl-badge",textContent:M(s.value.sticky)},null,8,Cl)):j("v-if",!0),o.comment.level!==void 0&&o.comment.level>=0?(m(),w("span",{key:5,class:J(`wl-badge level${o.comment.level}`),textContent:M(s.value[`level${o.comment.level}`]||`Level ${o.comment.level}`)},null,10,_l)):j("v-if",!0),_("span",{class:"wl-time",textContent:M(c.value)},null,8,zl),_("div",Rl,[p.value||g.value?(m(),w("button",{key:0,type:"button",class:"wl-edit",onClick:f[0]||(f[0]=()=>o.$emit("edit",o.comment))},[ee(T(Wn))])):j("v-if",!0),p.value||g.value?(m(),w("button",{key:1,type:"button",class:"wl-delete",onClick:f[1]||(f[1]=I=>o.$emit("delete",o.comment))},[ee(T(Bn))])):j("v-if",!0),_("button",{type:"button",class:"wl-like",title:d.value?s.value.cancelLike:s.value.like,onClick:f[2]||(f[2]=I=>o.$emit("like",o.comment))},[ee(T(Nn),{active:d.value},null,8,["active"]),"like"in o.comment?(m(),w("span",{key:0,textContent:M(o.comment.like)},null,8,Ll)):j("v-if",!0)],8,Sl),_("button",{type:"button",class:J(["wl-reply",{active:h.value}]),title:h.value?s.value.cancelReply:s.value.reply,onClick:f[3]||(f[3]=I=>o.$emit("reply",h.value?null:o.comment))},[ee(T(Fn))],10,Il)])]),_("div",El,[o.comment.addr?(m(),w("span",{key:0,class:"wl-addr","data-value":o.comment.addr,textContent:M(o.comment.addr)},null,8,Al)):j("v-if",!0),o.comment.browser?(m(),w("span",{key:1,class:"wl-browser","data-value":o.comment.browser,textContent:M(o.comment.browser)},null,8,Tl)):j("v-if",!0),o.comment.os?(m(),w("span",{key:2,class:"wl-os","data-value":o.comment.os,textContent:M(o.comment.os)},null,8,jl)):j("v-if",!0)]),E.value?j("v-if",!0):(m(),w("div",{key:0,class:"wl-content",innerHTML:o.comment.comment},null,8,Ul)),p.value&&!E.value?(m(),w("div",Ml,[_("span",Dl,[(m(),w(te,null,se(n,I=>_("button",{key:I,type:"submit",class:J(`wl-btn wl-${I}`),disabled:o.comment.status===I,onClick:$=>o.$emit("status",{status:I,comment:o.comment}),textContent:M(s.value[I])},null,10,Bl)),64))]),p.value&&!o.comment.rid?(m(),w("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:f[4]||(f[4]=I=>o.$emit("sticky",o.comment))},M(o.comment.sticky?s.value.unsticky:s.value.sticky),1)):j("v-if",!0)])):j("v-if",!0),h.value||E.value?(m(),w("div",{key:2,class:J({"wl-reply-wrapper":h.value,"wl-edit-wrapper":E.value})},[ee(nn,{edit:o.edit,"reply-id":(z=o.reply)==null?void 0:z.objectId,"reply-user":o.comment.nick,"root-id":o.rootId,onLog:f[5]||(f[5]=I=>o.$emit("log")),onCancelReply:f[6]||(f[6]=I=>o.$emit("reply",null)),onCancelEdit:f[7]||(f[7]=I=>o.$emit("edit",null)),onSubmit:f[8]||(f[8]=I=>o.$emit("submit",I))},null,8,["edit","reply-id","reply-user","root-id"])],2)):j("v-if",!0),o.comment.children?(m(),w("div",Ol,[(m(!0),w(te,null,se(o.comment.children,I=>(m(),ke(R,{key:I.objectId,comment:I,reply:o.reply,edit:o.edit,"root-id":o.rootId,onLog:f[9]||(f[9]=$=>o.$emit("log")),onDelete:f[10]||(f[10]=$=>o.$emit("delete",$)),onEdit:f[11]||(f[11]=$=>o.$emit("edit",$)),onLike:f[12]||(f[12]=$=>o.$emit("like",$)),onReply:f[13]||(f[13]=$=>o.$emit("reply",$)),onStatus:f[14]||(f[14]=$=>o.$emit("status",$)),onSticky:f[15]||(f[15]=$=>o.$emit("sticky",$)),onSubmit:f[16]||(f[16]=$=>o.$emit("submit",$))},null,8,["comment","reply","edit","root-id"]))),128))])):j("v-if",!0)])],8,fl)}}}),[["__file","CommentCard.vue"]]);const Nl="2.15.8",Hl={"data-waline":""},Vl={class:"wl-meta-head"},Fl={class:"wl-count"},Wl=["textContent"],ql={class:"wl-sort"},Zl=["onClick"],Kl={class:"wl-cards"},Gl={key:1,class:"wl-operation"},Ql=["textContent"],Xl={key:0,class:"wl-loading"},Yl=["textContent"],Jl={key:2,class:"wl-operation"},ea=["textContent"],ta={key:3,class:"wl-power"},na=_("a",{href:"https://github.com/walinejs/waline",target:"_blank",rel:"noopener noreferrer"}," Waline ",-1);var ia=Ne({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(l){const t=l,n={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},e=Object.keys(n),i=gt(),a=Xt(),r=U("loading"),s=U(0),u=U(1),d=U(0),c=X(()=>(({serverURL:S,path:A=location.pathname,lang:D=typeof navigator>"u"?"en-US":navigator.language,locale:K,emoji:F=Dt,meta:ne=["nick","mail","link"],requiredMeta:G=[],dark:le=!1,pageSize:oe=10,wordLimit:be,imageUploader:ze,highlighter:Ee,texRenderer:Ae,copyright:xe=!0,login:$e="enable",search:ce,reaction:Re,recaptchaV3Key:Fe="",turnstileKey:y="",commentSorting:v="latest",...L})=>({serverURL:bi(S),path:hi(A),locale:{...at[D]||at["en-US"],...typeof K=="object"?K:{}},wordLimit:xi(be),meta:Mt(ne),requiredMeta:Mt(G),imageUploader:rt(ze,fi),highlighter:rt(Ee,wi),texRenderer:rt(Ae,mi),lang:Object.keys(at).includes(D)?D:"en-US",dark:le,emoji:typeof F=="boolean"?F?Dt:[]:F,pageSize:oe,login:$e,copyright:xe,search:ce!==!1&&(typeof ce=="object"?ce:vi(D)),recaptchaV3Key:Fe,turnstileKey:y,reaction:Array.isArray(Re)?Re:Re===!0?gi:[],commentSorting:v,...L}))(t)),p=U(c.value.commentSorting),g=U([]),h=U(null),E=U(null),o=X(()=>{return typeof(S=c.value.dark)=="string"?S==="auto"?`@media(prefers-color-scheme:dark){body${st}}`:`${S}${st}`:S===!0?`:root${st}`:"";var S}),f=X(()=>c.value.locale);let R;gn(o,{id:"waline-darkmode"});const z=S=>{var ne;const{serverURL:A,path:D,pageSize:K}=c.value,F=new AbortController;r.value="loading",R==null||R(),(({serverURL:G,lang:le,path:oe,page:be,pageSize:ze,sortBy:Ee,signal:Ae,token:xe})=>{const $e={};return xe&&($e.Authorization=`Bearer ${xe}`),fetch(`${G}/comment?path=${encodeURIComponent(oe)}&pageSize=${ze}&page=${be}&lang=${le}&sortBy=${Ee}`,{signal:Ae,headers:$e}).then(ce=>ce.json()).then(ce=>ct(ce,"Get comment data"))})({serverURL:A,lang:c.value.lang,path:D,pageSize:K,sortBy:n[p.value],page:S,signal:F.signal,token:(ne=i.value)==null?void 0:ne.token}).then(G=>{r.value="success",s.value=G.count,g.value.push(...G.data),u.value=S,d.value=G.totalPages}).catch(G=>{G.name!=="AbortError"&&(console.error(G.message),r.value="error")}),R=F.abort.bind(F)},I=()=>z(u.value+1),$=()=>{s.value=0,g.value=[],z(1)},V=S=>{h.value=S},O=S=>{E.value=S},P=S=>{if(E.value)E.value.comment=S.comment,E.value.orig=S.orig;else if(S.rid){const A=g.value.find(({objectId:D})=>D===S.rid);if(!A)return;Array.isArray(A.children)||(A.children=[]),A.children.push(S)}else g.value.unshift(S),s.value+=1},ie=async({comment:S,status:A})=>{var F;if(S.status===A)return;const{serverURL:D,lang:K}=c.value;await Qe({serverURL:D,lang:K,token:(F=i.value)==null?void 0:F.token,objectId:S.objectId,comment:{status:A}}),S.status=A},ge=async S=>{var K;if(S.rid)return;const{serverURL:A,lang:D}=c.value;await Qe({serverURL:A,lang:D,token:(K=i.value)==null?void 0:K.token,objectId:S.objectId,comment:{sticky:S.sticky?0:1}}),S.sticky=!S.sticky},Ve=async({objectId:S})=>{var K;if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:A,lang:D}=c.value;await(({serverURL:F,lang:ne,token:G,objectId:le})=>fetch(`${F}/comment/${le}?lang=${ne}`,{method:"DELETE",headers:{Authorization:`Bearer ${G}`}}).then(oe=>oe.json()).then(oe=>ct(oe,"Delete comment")))({serverURL:A,lang:D,token:(K=i.value)==null?void 0:K.token,objectId:S}),g.value.some((F,ne)=>F.objectId===S?(g.value=g.value.filter((G,le)=>le!==ne),!0):F.children.some((G,le)=>G.objectId===S&&(g.value[ne].children=F.children.filter((oe,be)=>be!==le),!0)))},pe=async S=>{var ne;const{serverURL:A,lang:D}=c.value,{objectId:K}=S,F=a.value.includes(K);await Qe({serverURL:A,lang:D,objectId:K,token:(ne=i.value)==null?void 0:ne.token,comment:{like:!F}}),F?a.value=a.value.filter(G=>G!==K):(a.value=[...a.value,K],a.value.length>50&&(a.value=a.value.slice(-50))),S.like=(S.like||0)+(F?-1:1)};return fn("config",c),et(()=>{ve(()=>[t.serverURL,t.path],()=>$(),{immediate:!0})}),pt(()=>R==null?void 0:R()),(S,A)=>(m(),w("div",Hl,[ee(oi),h.value?j("v-if",!0):(m(),ke(nn,{key:0,onLog:$,onSubmit:P})),_("div",Vl,[_("div",Fl,[s.value?(m(),w("span",{key:0,class:"wl-num",textContent:M(s.value)},null,8,Wl)):j("v-if",!0),Ce(" "+M(f.value.comment),1)]),_("ul",ql,[(m(!0),w(te,null,se(T(e),D=>(m(),w("li",{key:D,class:J([D===p.value?"active":""]),onClick:K=>(F=>{p.value!==F&&(p.value=F,$())})(D)},M(f.value[D]),11,Zl))),128))])]),_("div",Kl,[(m(!0),w(te,null,se(g.value,D=>(m(),ke(Pl,{key:D.objectId,"root-id":D.objectId,comment:D,reply:h.value,edit:E.value,onLog:$,onReply:V,onEdit:O,onSubmit:P,onStatus:ie,onDelete:Ve,onSticky:ge,onLike:pe},null,8,["root-id","comment","reply","edit"]))),128))]),r.value==="error"?(m(),w("div",Gl,[_("button",{type:"button",class:"wl-btn",onClick:$,textContent:M(f.value.refresh)},null,8,Ql)])):(m(),w(te,{key:2},[r.value==="loading"?(m(),w("div",Xl,[ee(T(Oe),{size:30})])):g.value.length?u.value<d.value?(m(),w("div",Jl,[_("button",{type:"button",class:"wl-btn",onClick:I,textContent:M(f.value.more)},null,8,ea)])):j("v-if",!0):(m(),w("div",{key:1,class:"wl-empty",textContent:M(f.value.sofa)},null,8,Yl))],64)),c.value.copyright?(m(),w("div",ta,[Ce(" Powered by "),na,Ce(" v"+M(T(Nl)),1)])):j("v-if",!0)]))}}),ra=He(ia,[["__file","WalineComment.vue"]]);export{ra as Waline,Nl as version};