diff --git a/public/js/main.js b/public/js/main.js index 79260d43..b7048c51 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -38,7 +38,7 @@ $('.itp-index:odd').attr("style", "float: right;width:48%;"); //文章图片懒加载 lazyLoadInit({ coverColor: "white", - coverDiv: "
优世界·一个记录生活点滴的小站
", + coverDiv: "
优世界·一个记录生活点滴的小站
", offsetBottom: 0, offsetTopm: 0, showTime: 1100 diff --git a/public/js/mypjax.js b/public/js/mypjax.js index b33e78bf..706166f9 100644 --- a/public/js/mypjax.js +++ b/public/js/mypjax.js @@ -158,7 +158,7 @@ document.addEventListener("pjax:success", function () { lazyimg_pjax() lazyLoadInit({ coverColor: "white", - coverDiv: "
优世界·一个记录生活点滴的小站
", + coverDiv: "
优世界·一个记录生活点滴的小站
", offsetBottom: 0, offsetTopm: 0, showTime: 1100 diff --git a/public/js/waline.js b/public/js/waline.js index 62266c0c..9d50b3db 100644 --- a/public/js/waline.js +++ b/public/js/waline.js @@ -25,5 +25,5 @@ var Wh=Object.defineProperty,qh=(e,t,n)=>t in e?Wh(e,t,{enumerable:!0,configurab * @vue/runtime-dom v3.4.27 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const si=Symbol("_vod"),ai=Symbol("_vsh"),ci={beforeMount(e,{value:t},{transition:n}){e[si]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ui(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ui(e,!0),r.enter(e)):r.leave(e,(()=>{ui(e,!1)})):ui(e,t))},beforeUnmount(e,{value:t}){ui(e,t)}};function ui(e,t){e.style.display=t?e[si]:"none",e[ai]=!t}const pi=Symbol(""),di=/(^|;)\s*display\s*:/;const hi=/\s*!important$/;function fi(e,t,n){if(fe(n))n.forEach((n=>fi(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=mi[t];if(n)return n;let r=Ae(t);if("filter"!==r&&r in e)return mi[t]=r;r=je(r);for(let n=0;n{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ln(function(e,t){if(fe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Si(),n}(r,o);yi(e,n,l,s)}else l&&(function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,l,s),i[t]=void 0)}}const ki=/(?:Once|Passive|Capture)$/;let xi=0;const Ci=Promise.resolve(),Si=()=>xi||(Ci.then((()=>xi=0)),xi=Date.now());const $i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Ri=e=>{const t=e.props["onUpdate:modelValue"]||!1;return fe(t)?e=>Pe(t,e):t};function Li(e){e.target.composing=!0}function Ii(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ei=Symbol("_assign"),Ai={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[Ei]=Ri(o);const i=r||o.props&&"number"===o.props.type;yi(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),i&&(r=Fe(r)),e[Ei](r)})),n&&yi(e,"change",(()=>{e.value=e.value.trim()})),t||(yi(e,"compositionstart",Li),yi(e,"compositionend",Ii),yi(e,"change",Ii))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},i){if(e[Ei]=Ri(i),e.composing)return;const l=t??"";(!o&&"number"!==e.type||/^0\d/.test(e.value)?e.value:Fe(e.value))!==l&&(document.activeElement===e&&"range"!==e.type&&(n||r&&e.value.trim()===l)||(e.value=l))}},Ti={deep:!0,created(e,t,n){e[Ei]=Ri(n),yi(e,"change",(()=>{const t=e._modelValue,n=Pi(e),r=e.checked,o=e[Ei];if(fe(t)){const e=Je(t,n),i=-1!==e;if(r&&!i)o(t.concat(n));else if(!r&&i){const n=[...t];n.splice(e,1),o(n)}}else if(me(t)){const e=new Set(t);r?e.add(n):e.delete(n),o(e)}else o(Ui(e,r))}))},mounted:zi,beforeUpdate(e,t,n){e[Ei]=Ri(n),zi(e,t,n)}};function zi(e,{value:t,oldValue:n},r){e._modelValue=t,fe(t)?e.checked=Je(t,r.props.value)>-1:me(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Xe(t,Ui(e,!0)))}const ji={created(e,{value:t},n){e.checked=Xe(t,n.props.value),e[Ei]=Ri(n),yi(e,"change",(()=>{e[Ei](Pi(e))}))},beforeUpdate(e,{value:t,oldValue:n},r){e[Ei]=Ri(r),t!==n&&(e.checked=Xe(t,r.props.value))}},Oi={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=me(t);yi(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?Fe(Pi(e)):Pi(e)));e[Ei](e.multiple?o?new Set(t):t:t[0]),e._assigning=!0,Nn((()=>{e._assigning=!1}))})),e[Ei]=Ri(r)},mounted(e,{value:t,modifiers:{number:n}}){Mi(e,t)},beforeUpdate(e,t,n){e[Ei]=Ri(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Mi(e,t)}};function Mi(e,t,n){const r=e.multiple,o=fe(t);if(!r||o||me(t)){for(let n=0,i=e.options.length;nString(e)===String(l))):Je(t,l)>-1}else i.selected=t.has(l);else if(Xe(Pi(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}!r&&-1!==e.selectedIndex&&(e.selectedIndex=-1)}}function Pi(e){return"_value"in e?e._value:e.value}function Ui(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ni={created(e,t,n){Fi(e,t,n,null,"created")},mounted(e,t,n){Fi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Fi(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Fi(e,t,n,r,"updated")}};function Fi(e,t,n,r,o){const i=function(e,t){switch(e){case"SELECT":return Oi;case"TEXTAREA":return Ai;default:switch(t){case"checkbox":return Ti;case"radio":return ji;default:return Ai}}}(e.tagName,n.props&&n.props.type)[o];i&&i(e,t,n,r)}const Vi=ue({patchProp:(e,t,n,r,o,i,l,s,a)=>{const c="svg"===o;"class"===t?function(e,t,n){const r=e[li];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,c):"style"===t?function(e,t,n){const r=e.style,o=we(n);let i=!1;if(n&&!o){if(t)if(we(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&fi(r,t,"")}else for(const e in t)null==n[e]&&fi(r,e,"");for(const e in n)"display"===e&&(i=!0),fi(r,e,n[e])}else if(o){if(t!==n){const e=r[pi];e&&(n+=";"+e),r.cssText=n,i=di.test(n)}}else t&&e.removeAttribute("style");si in e&&(e[si]=i?r.display:"",e[ai]&&(r.display="none"))}(e,n,r):ae(t)?ce(t)||bi(e,t,0,r,l):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&$i(t)&&ye(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!$i(t)||!we(n))&&t in e}(e,t,r,c))?function(e,t,n,r,o,i,l){if("innerHTML"===t||"textContent"===t)return r&&l(r,o,i),void(e[t]=n??"");const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const r=n??"";return(("OPTION"===s?e.getAttribute("value")||"":e.value)!==r||!("_value"in e))&&(e.value=r),null==n&&e.removeAttribute(t),void(e._value=n)}let a=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=Qe(n):null==n&&"string"===r?(n="",a=!0):"number"===r&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}(e,t,r,i,l,s,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,o){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(vi,t.slice(6,t.length)):e.setAttributeNS(vi,t,n);else{const r=Ke(t);null==n||r&&!Qe(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,c))}},ii);let Di;const Hi=(...e)=>{const t=(Di||(Di=ao(Vi))).createApp(...e),{mount:n}=t;return t.mount=e=>{const r=function(e){return we(e)?document.querySelector(e):e}(e);if(!r)return;const o=t._component;!ye(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function Bi(e){return!!it()&&(function(e){nt&&nt.cleanups.push(e)}(e),!0)}function Wi(e){return"function"==typeof e?e():Cn(e)}const qi=typeof window<"u"&&typeof document<"u",Gi=Object.prototype.toString,Zi=e=>"[object Object]"===Gi.call(e),Ki=()=>{};function Qi(e,t){return function(...n){return new Promise(((r,o)=>{Promise.resolve(e((()=>t.apply(this,n)),{fn:t,thisArg:this,args:n})).then(r).catch(o)}))}}const Xi=e=>e();function Ji(e){return Do()}function Yi(e,t=200,n={}){return Qi(function(e,t={}){let n,r,o=Ki;const i=e=>{clearTimeout(e),o(),o=Ki};return l=>{const s=Wi(e),a=Wi(t.maxWait);return n&&i(n),s<=0||void 0!==a&&a<=0?(r&&(i(r),r=null),Promise.resolve(l())):new Promise(((e,c)=>{o=t.rejectOnCancel?c:e,a&&!r&&(r=setTimeout((()=>{n&&i(n),r=null,e(l())}),a)),n=setTimeout((()=>{r&&i(r),r=null,e(l())}),s)}))}}(t,n),e)}function el(e,t,n={}){const{eventFilter:r=Xi,...o}=n;return pr(e,Qi(r,t),o)}function tl(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:i,pause:l,resume:s,isActive:a}=function(e=Xi){const t=bn(!0);return{isActive:sn(t),pause:function(){t.value=!1},resume:function(){t.value=!0},eventFilter:(...n)=>{t.value&&e(...n)}}}(r);return{stop:el(e,t,{...o,eventFilter:i}),pause:l,resume:s,isActive:a}}function nl(e,t=!0,n){Ji()?br(e,n):t?e():Nn(e)}function rl(e){var t;const n=Wi(e);return null!=(t=null==n?void 0:n.$el)?t:n}const ol=qi?window:void 0,il=qi?window.document:void 0;function ll(...e){let t,n,r,o;if("string"==typeof e[0]||Array.isArray(e[0])?([n,r,o]=e,t=ol):[t,n,r,o]=e,!t)return Ki;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],l=()=>{i.forEach((e=>e())),i.length=0},s=pr((()=>[rl(t),Wi(o)]),(([e,t])=>{if(l(),!e)return;const o=Zi(t)?{...t}:t;i.push(...n.flatMap((t=>r.map((n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,o))))))}),{immediate:!0,flush:"post"}),a=()=>{s(),l()};return Bi(a),a}const sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},al="__vueuse_ssr_handlers__",cl=(al in sl||(sl[al]=sl[al]||{}),sl[al]);const ul={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},pl="vueuse-storage";function dl(e,t,n,r={}){var o;const{flush:i="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:a=!0,mergeDefaults:c=!1,shallow:u,window:p=ol,eventFilter:d,onError:h=(e=>{console.error(e)}),initOnMounted:f}=r,g=(u?kn:bn)("function"==typeof t?t():t);if(!n)try{n=function(e,t){return cl[e]||t}("getDefaultStorage",(()=>{var e;return null==(e=ol)?void 0:e.localStorage}))()}catch(e){h(e)}if(!n)return g;const m=Wi(t),v=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(m),y=null!=(o=r.serializer)?o:ul[v],{pause:w,resume:b}=tl(g,(()=>function(t){try{const r=n.getItem(e);if(null==t)k(r,null),n.removeItem(e);else{const o=y.write(t);r!==o&&(n.setItem(e,o),k(r,o))}}catch(e){h(e)}}(g.value)),{flush:i,deep:l,eventFilter:d});function k(t,r){p&&p.dispatchEvent(new CustomEvent(pl,{detail:{key:e,oldValue:t,newValue:r,storageArea:n}}))}function x(t){if(!t||t.storageArea===n){if(t&&null==t.key)return void(g.value=m);if(!t||t.key===e){w();try{(null==t?void 0:t.newValue)!==y.write(g.value)&&(g.value=function(t){const r=t?t.newValue:n.getItem(e);if(null==r)return a&&null!=m&&n.setItem(e,y.write(m)),m;if(!t&&c){const e=y.read(r);return"function"==typeof c?c(e,m):"object"!==v||Array.isArray(e)?e:{...m,...e}}return"string"!=typeof r?r:y.read(r)}(t))}catch(e){h(e)}finally{t?Nn(b):b()}}}}function _(e){x(e.detail)}return p&&s&&nl((()=>{ll(p,"storage",x),ll(p,pl,_),f&&x()})),f||x(),g}function hl(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=bn(new Date),o=()=>r.value=new Date,i="requestAnimationFrame"===n?function(e,t={}){const{immediate:n=!0,fpsLimit:r,window:o=ol}=t,i=bn(!1),l=r?1e3/r:null;let s=0,a=null;function c(t){if(!i.value||!o)return;s||(s=t);const n=t-s;l&&n{l.value&&qi&&c()})));return Bi(a),{isActive:l,pause:a,resume:c}}(o,n,{immediate:!0});return t?{now:r,...i}:r}function fl(e,t=Ki,n={}){const{immediate:r=!0,manual:o=!1,type:i="text/javascript",async:l=!0,crossOrigin:s,referrerPolicy:a,noModule:c,defer:u,document:p=il,attrs:d={}}=n,h=bn(null);let f=null;const g=(n=!0)=>(f||(f=(n=>new Promise(((r,o)=>{const f=e=>(h.value=e,r(e),e);if(!p)return void r(!1);let g=!1,m=p.querySelector(`script[src="${Wi(e)}"]`);m?m.hasAttribute("data-loaded")&&f(m):(m=p.createElement("script"),m.type=i,m.async=l,m.src=Wi(e),u&&(m.defer=u),s&&(m.crossOrigin=s),c&&(m.noModule=c),a&&(m.referrerPolicy=a),Object.entries(d).forEach((([e,t])=>null==m?void 0:m.setAttribute(e,t))),g=!0),m.addEventListener("error",(e=>o(e))),m.addEventListener("abort",(e=>o(e))),m.addEventListener("load",(()=>{m.setAttribute("data-loaded","true"),t(m),f(m)})),g&&(m=p.head.appendChild(m)),n||f(m)})))(n)),f),m=()=>{if(!p)return;f=null,h.value&&(h.value=null);const t=p.querySelector(`script[src="${Wi(e)}"]`);t&&p.head.removeChild(t)};return r&&!o&&nl(g),o||function(e,t){Ji()&&_r(e,t)}(m),{scriptTag:h,load:g,unload:m}}let gl=0;const ml=(e,t="",n="",r="")=>`${t?`${t}/`:""}${n}${e}${r?`.${r}`:""}`,vl=e=>Promise.all(e.map((e=>J(e)?(e=>{const t=dl("WALINE_EMOJI",{}),n=(e=>!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(e))(e);if(n){const n=t.value[e];if(n)return Promise.resolve(n)}return fetch(`${e}/info.json`).then((e=>e.json())).then((r=>{const o={folder:e,...r};return n&&(t.value[e]=o),o}))})(G(e)):Promise.resolve(e)))).then((e=>{const t={tabs:[],map:{}};return e.forEach((e=>{const{name:n,folder:r,icon:o,prefix:i="",type:l,items:s}=e;t.tabs.push({name:n,icon:ml(o,r,i,l),items:s.map((e=>{const n=`${i}${e}`;return t.map[n]=ml(e,r,i,l),n}))})})),t})),yl=e=>{"AbortError"!==e.name&&console.error(e.message)},wl=e=>e instanceof HTMLElement?e:J(e)?document.querySelector(e):null,bl=e=>e.type.includes("image"),kl=e=>{const t=Array.from(e).find(bl);return t?t.getAsFile():null};function xl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _l={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Cl(e){_l=e}const Sl=/[&<>"']/,$l=new RegExp(Sl.source,"g"),Rl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ll=new RegExp(Rl.source,"g"),Il={"&":"&","<":"<",">":">",'"':""","'":"'"},El=e=>Il[e];function Al(e,t){if(t){if(Sl.test(e))return e.replace($l,El)}else if(Rl.test(e))return e.replace(Ll,El);return e}const Tl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const zl=/(^|[^\[])\^/g;function jl(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(zl,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function Ol(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Ml={exec:()=>null};function Pl(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Ul(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Ul(e,"#");(this.options.pedantic||!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=Ul(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let l="",s="",a=!1;for(;e;){let n=!1;if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,s=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,s=r.slice(u),u+=t[1].length);let p=!1;if(!r&&/^ *$/.test(c)&&(l+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const a=e.split("\n",1)[0];if(c=a,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(c)||i.test(c)||t.test(c)||n.test(e))break;if(c.search(/[^ ]/)>=u||!c.trim())s+="\n"+c.slice(u);else{if(p||r.search(/[^ ]/)>=4||o.test(r)||i.test(r)||n.test(r))break;s+="\n"+c}!p&&!c.trim()&&(p=!0),l+=a+"\n",e=e.substring(a.length+1),r=c.slice(u)}}o.loose||(a?o.loose=!0:/\n *\n *$/.test(l)&&(a=!0));let d,h=null;this.options.gfm&&(h=/^\[[ xX]\] /.exec(s),h&&(d="[ ] "!==h[0],s=s.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:l,task:!!h,checked:d,loose:!1,text:s,tokens:[]}),o.raw+=l}o.items[o.items.length-1].raw=l.trimEnd(),o.items[o.items.length-1].text=s.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=Pl(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(const e of n)i.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)i.rows.push(Pl(e,i.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Al(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Ul(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),Nl(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Nl(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let o,i,l=n,s=0;const a="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){l+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+s);const t=[...r[0]][0].length,a=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Al(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Al(t[1]),n="mailto:"+e):(e=Al(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=Al(n[0]),r="mailto:"+e;else{let o;do{o=n[0],n[0]=(null==(t=this.rules.inline._backpedal.exec(n[0]))?void 0:t[0])??""}while(o!==n[0]);e=Al(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Al(t[0]),{type:"text",raw:t[0],text:e}}}}const Vl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dl=/(?:[*+-]|\d{1,9}[.)])/,Hl=jl(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Dl).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Bl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ql=jl(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gl=jl(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dl).getRegex(),Zl="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/|$))/,Ql=jl("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Kl).replace("tag",Zl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xl=jl(Bl).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Zl).getRegex(),Jl={blockquote:jl(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xl).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ql,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Vl,html:Ql,lheading:Hl,list:Gl,newline:/^(?: *(?:\n|$))+/,paragraph:Xl,table:Ml,text:/^[^\n]+/},Yl=jl("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Zl).getRegex(),es={...Jl,table:Yl,paragraph:jl(Bl).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Yl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Zl).getRegex()},ts={...Jl,html:jl("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ml,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:jl(Bl).replace("hr",Vl).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Hl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ns=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rs=/^( {2,}|\\)\n(?!\s*$)/,os="\\p{P}\\p{S}",is=jl(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,os).getRegex(),ls=jl(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,os).getRegex(),ss=jl("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,os).getRegex(),as=jl("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,os).getRegex(),cs=jl(/\\([punct])/,"gu").replace(/punct/g,os).getRegex(),us=jl(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ps=jl(Kl).replace("(?:--\x3e|$)","--\x3e").getRegex(),ds=jl("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ps).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fs=jl(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",hs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gs=jl(/^!?\[(label)\]\[(ref)\]/).replace("label",hs).replace("ref",Wl).getRegex(),ms=jl(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),vs={_backpedal:Ml,anyPunctuation:cs,autolink:us,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:rs,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Ml,emStrongLDelim:ls,emStrongRDelimAst:ss,emStrongRDelimUnd:as,escape:ns,link:fs,nolink:ms,punctuation:is,reflink:gs,reflinkSearch:jl("reflink|nolink(?!\\()","g").replace("reflink",gs).replace("nolink",ms).getRegex(),tag:ds,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,i,l,s,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,i.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(s=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,s)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),l=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class Cs{options;constructor(e){this.options=e||_l}code(e,t,n){var r;const o=null==(r=(t||"").match(/^\S*/))?void 0:r[0];return e=e.replace(/\n$/,"")+"\n",o?'
'+(n?e:Al(e,!0))+"
\n":"
"+(n?e:Al(e,!0))+"
\n"}blockquote(e){return`
\n${e}
\n`}html(e,t){return e}heading(e,t,n){return`${e}\n`}hr(){return"
\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e,t,n){return`
  • ${e}
  • \n`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){const r=Ol(e);if(null===r)return n;let o='
    ",o}image(e,t,n){const r=Ol(e);if(null===r)return n;let o=`${n}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")));continue}case"code":{const e=o;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=o;let t="",r="";for(let t=0;t0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(n.tokens,i),l+=this.renderer.listitem(s,o,!!r)}n+=this.renderer.list(l,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let i=o,l=i.tokens?this.parseInline(i.tokens):i.text;for(;r+1{const r=e[n].flat(1/0);o=o.concat(this.walkTokens(r,t))})):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Cs(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Fl(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Rs;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],i=t[r];Rs.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const n=o.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _s.lex(e,t??this.defaults)}parser(e,t){return $s.parse(e,t??this.defaults)}}t=new WeakSet,n=function(e,t){return(n,i)=>{const l={...i},s={...this.defaults,...l};!0===this.defaults.async&&!1===l.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const a=_i(this,r,o).call(this,!!s.silent,!!s.async);if(typeof n>"u"||null===n)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return a(e)}}},r=new WeakSet,o=function(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+Al(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}};const Is=new Ls;function Es(e,t){return Is.parse(e,t)}function As(e){return(e||"").match(/\S*/)[0]}function Ts(e){return t=>{"string"==typeof t&&t!==e.text&&(e.escaped=!0,e.text=t)}}Es.options=Es.setOptions=function(e){return Is.setOptions(e),Es.defaults=Is.defaults,Cl(Es.defaults),Es},Es.getDefaults=xl,Es.defaults=_l,Es.use=function(...e){return Is.use(...e),Es.defaults=Is.defaults,Cl(Es.defaults),Es},Es.walkTokens=function(e,t){return Is.walkTokens(e,t)},Es.parseInline=Is.parseInline,Es.Parser=$s,Es.parser=$s.parse,Es.Renderer=Cs,Es.TextRenderer=Ss,Es.Lexer=_s,Es.lexer=_s.lex,Es.Tokenizer=Fl,Es.Hooks=Rs,Es.parse=Es;const zs=/[&<>"']/,js=new RegExp(zs.source,"g"),Os=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ms=new RegExp(Os.source,"g"),Ps={"&":"&","<":"<",">":">",'"':""","'":"'"},Us=e=>Ps[e];function Ns(e,t){if(t){if(zs.test(e))return e.replace(js,Us)}else if(Os.test(e))return e.replace(Ms,Us);return e}const Fs=/\$.*?\$/,Vs=/^\$(.*?)\$/,Ds=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,Hs=(e="",t={})=>e.replace(/:(.+?):/g,((e,n)=>t[n]?`${n}`:e)),Bs=(e,{emojiMap:t,highlighter:n,texRenderer:r})=>{const o=new Ls;if(o.setOptions({breaks:!0}),n&&o.use(function(e){if("function"==typeof e&&(e={highlight:e}),!e||"function"!=typeof e.highlight)throw new Error("Must provide highlight function");return"string"!=typeof e.langPrefix&&(e.langPrefix="language-"),{async:!!e.async,walkTokens(t){if("code"!==t.type)return;const n=As(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||"")).then(Ts(t));const r=e.highlight(t.text,n,t.lang||"");if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Ts(t)(r)},renderer:{code(t,n,r){const o=As(n),i=o?` class="${e.langPrefix}${Ns(o)}"`:"";return t=t.replace(/\n$/,""),`
    ${r?t:Ns(t,!0)}\n
    `}}}}({highlight:n})),r){const e=(e=>[{name:"blockMath",level:"block",tokenizer(t){const n=Ds.exec(t);if(null!==n)return{type:"html",raw:n[0],text:e(!0,n[1])}}},{name:"inlineMath",level:"inline",start(e){const t=e.search(Fs);return-1!==t?t:e.length},tokenizer(t){const n=Vs.exec(t);if(null!==n)return{type:"html",raw:n[0],text:e(!1,n[1])}}}])(r);o.use({extensions:e})}return o.parse(Hs(e,t))},Ws=e=>{const{path:t}=e.dataset;return null!=t&&t.length?t:null},qs=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:r=navigator.language})=>{const o=new AbortController,i=document.querySelectorAll(n);return i.length&&f({serverURL:K(e),paths:Array.from(i).map((e=>q(Ws(e)??t))),lang:r,signal:o.signal}).then((e=>{i.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(yl),o.abort.bind(o)},Gs=({size:e})=>ti("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:e,height:e},[ti("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"}),ti("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"})]),Zs=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),Ks=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),Qs=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ti("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"}),ti("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"})]),Xs=({active:e=!1})=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ti("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"+(e?"":"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:e?"red":"currentColor"})]),Js=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ti("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"}),ti("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"})]),Ys=()=>ti("svg",{width:"16",height:"16",ariaHidden:"true"},ti("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"})),ea=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),ta=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),na=()=>ti("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},ti("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"})),ra=({size:e=100})=>ti("svg",{width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},ti("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},ti("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),oa=()=>ti("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[ti("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"}),ti("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"})]);let ia=null;const la=()=>ia??(ia=dl("WALINE_LIKE",[]));let sa=null;var aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ca={},ua={},pa={},da=aa&&aa.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function l(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(l,s)}a((r=r.apply(e,t||[])).next())}))},ha=aa&&aa.__generator||function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,r=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"u")return Promise.reject(new Error("This is a library for the browser!"));if(e.getLoadingState()===ga.LOADED)return e.instance.getSiteKey()===t?Promise.resolve(e.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(e.getLoadingState()===ga.LOADING)return t!==e.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise((function(t,n){e.successfulLoadingConsumers.push((function(e){return t(e)})),e.errorLoadingRunnable.push((function(e){return n(e)}))}));e.instanceSiteKey=t,e.setLoadingState(ga.LOADING);var r=new e;return new Promise((function(o,i){r.loadScript(t,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then((function(){e.setLoadingState(ga.LOADED);var i=r.doExplicitRender(grecaptcha,t,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),l=new va.ReCaptchaInstance(t,i,grecaptcha);e.successfulLoadingConsumers.forEach((function(e){return e(l)})),e.successfulLoadingConsumers=[],n.autoHideBadge&&l.hideBadge(),e.instance=l,o(l)})).catch((function(t){e.errorLoadingRunnable.forEach((function(e){return e(t)})),e.errorLoadingRunnable=[],i(t)}))}))},e.getInstance=function(){return e.instance},e.setLoadingState=function(t){e.loadingState=t},e.getLoadingState=function(){return null===e.loadingState?ga.NOT_LOADED:e.loadingState},e.prototype.loadScript=function(t,n,r,o,i){var l=this;void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o={}),void 0===i&&(i="");var s=document.createElement("script");s.setAttribute("recaptcha-v3-script","");var a="https://www.google.com/recaptcha/api.js";n&&(a=r?"https://recaptcha.net/recaptcha/enterprise.js":"https://recaptcha.net/recaptcha/api.js"),r&&(a="https://www.google.com/recaptcha/enterprise.js"),i&&(a=i),o.render&&(o.render=void 0);var c=this.buildQueryString(o);return s.src=a+"?render=explicit"+c,new Promise((function(t,n){s.addEventListener("load",l.waitForScriptToLoad((function(){t(s)}),r),!1),s.onerror=function(t){e.setLoadingState(ga.NOT_LOADED),n(t)},document.head.appendChild(s)}))},e.prototype.buildQueryString=function(e){return Object.keys(e).length<1?"":"&"+Object.keys(e).filter((function(t){return!!e[t]})).map((function(t){return t+"="+e[t]})).join("&")},e.prototype.waitForScriptToLoad=function(t,n){var r=this;return function(){void 0===window.grecaptcha?setTimeout((function(){r.waitForScriptToLoad(t,n)}),e.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready((function(){t()})):window.grecaptcha.ready((function(){t()}))}},e.prototype.doExplicitRender=function(e,t,n,r){var o={sitekey:t,badge:n.badge,size:n.size,tabindex:n.tabindex};return n.container?r?e.enterprise.render(n.container,o):e.render(n.container,o):r?e.enterprise.render(o):e.render(o)},e.loadingState=null,e.instance=null,e.instanceSiteKey=null,e.successfulLoadingConsumers=[],e.errorLoadingRunnable=[],e.SCRIPT_LOAD_DELAY=25,e}();ua.load=ya.load,ua.getInstance=ya.getInstance,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReCaptchaInstance=e.getInstance=e.load=void 0;var t=ua;Object.defineProperty(e,"load",{enumerable:!0,get:function(){return t.load}}),Object.defineProperty(e,"getInstance",{enumerable:!0,get:function(){return t.getInstance}});var n=pa;Object.defineProperty(e,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})}(ca);const wa={};let ba=null;const ka=()=>ba??(ba=dl("WALINE_USER",{}));var xa=mr({__name:"ArticleReaction",setup(e,{expose:t}){t();const n=sa??(sa=dl("WALINE_REACTION",{})),r=Vr("config"),o=bn(-1),i=bn([]),l=ei((()=>r.value.locale)),s=ei((()=>r.value.reaction.length>0)),u=ei((()=>{const{reaction:e,path:t}=r.value;return e.map(((e,r)=>({icon:e,desc:l.value[`reaction${r}`],active:n.value[t]===r})))}));let p;const d=async()=>{if(!s.value)return;const{serverURL:e,lang:t,path:n,reaction:o}=r.value,l=new AbortController;p=l.abort.bind(l);const c=await a({serverURL:e,lang:t,paths:[n],type:o.map(((e,t)=>`reaction${t}`)),signal:l.signal});i.value=o.map(((e,t)=>c[0][`reaction${t}`]))};br((()=>{pr((()=>[r.value.serverURL,r.value.path]),(()=>{d()}),{immediate:!0})})),_r((()=>null==p?void 0:p()));const h={reactionStorage:n,config:r,votingIndex:o,voteNumbers:i,locale:l,isReactionEnabled:s,reactionsInfo:u,get abort(){return p},set abort(e){p=e},fetchReaction:d,vote:async e=>{if(-1===o.value){const{serverURL:t,lang:l,path:s}=r.value,a=n.value[s];o.value=e,void 0!==a&&(await c({serverURL:t,lang:l,path:s,type:`reaction${a}`,action:"desc"}),i.value[a]=Math.max(i.value[a]-1,0)),a!==e&&(await c({serverURL:t,lang:l,path:s,type:`reaction${e}`}),i.value[e]=(i.value[e]||0)+1),a===e?delete n.value[s]:n.value[s]=e,o.value=-1}},get LoadingIcon(){return ra}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),_a=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n};const Ca={key:0,class:"wl-reaction"},Sa=["textContent"],$a={class:"wl-reaction-list"},Ra=["onClick"],La={class:"wl-reaction-img"},Ia=["src","alt"],Ea=["textContent"],Aa=["textContent"];var Ta=_a(xa,[["render",function(e,t,n,r,o,i){return r.reactionsInfo.length?(bo(),Co("div",Ca,[Eo("div",{class:"wl-reaction-title",textContent:Ye(r.locale.reactionTitle)},null,8,Sa),Eo("ul",$a,[(bo(!0),Co(fo,null,Cr(r.reactionsInfo,(({active:e,icon:t,desc:n},o)=>(bo(),Co("li",{key:o,class:Ze(["wl-reaction-item",{active:e}]),onClick:e=>r.vote(o)},[Eo("div",La,[Eo("img",{src:t,alt:n},null,8,Ia),r.votingIndex===o?(bo(),So(r.LoadingIcon,{key:0,class:"wl-reaction-loading"})):(bo(),Co("div",{key:1,class:"wl-reaction-votes",textContent:Ye(r.voteNumbers[o]||0)},null,8,Ea))]),Eo("div",{class:"wl-reaction-text",textContent:Ye(n)},null,8,Aa)],10,Ra)))),128))])])):jo("v-if",!0)}],["__file","ArticleReaction.vue"]]),za=new Map;function ja(e){var t=za.get(e);t&&t.destroy()}function Oa(e){var t=za.get(e);t&&t.update()}var Ma=null;typeof window>"u"?((Ma=function(e){return e}).destroy=function(e){return e},Ma.update=function(e){return e}):((Ma=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!za.has(e)){var t,n=null,r=window.getComputedStyle(e),o=(t=e.value,function(){l({testForHeightReduction:""===t||!e.value.startsWith(t),restoreTextAlign:null}),t=e.value}),i=function(t){e.removeEventListener("autosize:destroy",i),e.removeEventListener("autosize:update",s),e.removeEventListener("input",o),window.removeEventListener("resize",s),Object.keys(t).forEach((function(n){return e.style[n]=t[n]})),za.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",i),e.addEventListener("autosize:update",s),e.addEventListener("input",o),window.addEventListener("resize",s),e.style.overflowX="hidden",e.style.wordWrap="break-word",za.set(e,{destroy:i,update:s}),s()}function l(t){var o,i,s=t.restoreTextAlign,a=void 0===s?null:s,c=t.testForHeightReduction,u=void 0===c||c,p=r.overflowY;if(0!==e.scrollHeight&&("vertical"===r.resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],n=e[1];t.style.scrollBehavior="auto",t.scrollTop=n,t.style.scrollBehavior=null}))}}(e),e.style.height=""),i="content-box"===r.boxSizing?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&i>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(e.style.overflow="scroll"),i=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(e.style.overflow="hidden"),e.style.height=i+"px",a&&(e.style.textAlign=a),o&&o(),n!==i&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=i),p!==r.overflow&&!a)){var d=r.textAlign;"hidden"===r.overflow&&(e.style.textAlign="start"===d?"end":"start"),l({restoreTextAlign:d,testForHeightReduction:!0})}}function s(){l({testForHeightReduction:!0,restoreTextAlign:null})}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],ja),e},Ma.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Oa),e});var Pa=Ma,Ua=mr({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(e,{expose:t}){const n=e;t();let r=null;const o=bn(null),i=bn({}),l=bn([]),s=()=>{const e=Math.floor((o.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return e>0?e:1},a=e=>new Array(e).fill(null).map((()=>[])),c=async e=>{var t;if(e>=n.items.length)return;await Nn();const r=Array.from((null==(t=o.value)?void 0:t.children)??[]).reduce(((e,t)=>t.getBoundingClientRect().height{if(l.value.length===s()&&!e)return;l.value=a(s());const t=window.scrollY;await c(0),window.scrollTo({top:t})};br((()=>{u(!0),r=new ResizeObserver((()=>{u()})),r.observe(o.value),pr((()=>[n.items]),(()=>{i.value={},u(!0)})),pr((()=>[n.columnWidth,n.gap]),(()=>{u()}))})),kr((()=>r.unobserve(o.value)));const p={props:n,get resizeObserver(){return r},set resizeObserver(e){r=e},wall:o,state:i,columns:l,getColumnCount:s,createColumns:a,fillColumns:c,redraw:u,imageLoad:e=>{i.value[e.target.src]=!0},get LoadingIcon(){return ra}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}});const Na=["data-index"],Fa=["src","title","onClick"];var Va=_a(Ua,[["render",function(e,t,n,r,o,i){return bo(),Co("div",{ref:"wall",class:"wl-gallery",style:He({gap:`${n.gap}px`})},[(bo(!0),Co(fo,null,Cr(r.columns,((t,o)=>(bo(),Co("div",{key:o,class:"wl-gallery-column","data-index":o,style:He({gap:`${n.gap}px`})},[(bo(!0),Co(fo,null,Cr(t,(t=>(bo(),Co(fo,{key:t},[r.state[n.items[t].src]?jo("v-if",!0):(bo(),So(r.LoadingIcon,{key:0,size:36,style:{margin:"20px auto"}})),Eo("img",{class:"wl-gallery-item",src:n.items[t].src,title:n.items[t].title,loading:"lazy",onLoad:r.imageLoad,onClick:r=>e.$emit("insert",`![](${n.items[t].src})`)},null,40,Fa)],64)))),128))],12,Na)))),128))],4)}],["__file","ImageWall.vue"]]),Da=mr({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(e,{expose:t,emit:n}){t();const r=e,o=n,i=Vr("config"),l=dl("WALINE_COMMENT_BOX_EDITOR",""),s=dl("WALINE_USER_META",{nick:"",mail:"",link:""}),a=ka(),c=bn({}),u=bn(null),d=bn(null),f=bn(null),m=bn(null),v=bn(null),y=bn(null),w=bn(null),b=bn({tabs:[],map:{}}),k=bn(0),x=bn(!1),_=bn(!1),C=bn(!1),S=bn(""),$=bn(0),R=ln({loading:!0,list:[]}),L=bn(0),I=bn(!1),E=bn(""),A=bn(!1),T=bn(!1),z=ei((()=>i.value.locale)),j=ei((()=>{var e;return!(null==(e=a.value)||!e.token)})),O=ei((()=>!1!==i.value.imageUploader)),M=e=>{const t=u.value,n=t.selectionStart,r=t.selectionEnd||0,o=t.scrollTop;l.value=t.value.substring(0,n)+e+t.value.substring(r,t.value.length),t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,t.scrollTop=o},P=e=>{const t=`![${i.value.locale.uploading} ${e.name}]()`;return M(t),A.value=!0,Promise.resolve().then((()=>i.value.imageUploader(e))).then((n=>{l.value=l.value.replace(t,`\r\n![${e.name}](${n})`)})).catch((e=>{alert(e.message),l.value=l.value.replace(t,"")})).then((()=>{A.value=!1}))},U=async()=>{var e,t,n,d,f,g;const{serverURL:m,lang:v,login:y,wordLimit:w,requiredMeta:k,recaptchaV3Key:x,turnstileKey:_}=i.value,C=await(async()=>{if(!navigator)return"";const{userAgentData:e}=navigator;let t=navigator.userAgent;if(!e||"Windows"!==e.platform)return t;const{platformVersion:n}=await e.getHighEntropyValues(["platformVersion"]);return n&&parseInt(n.split(".")[0])>=13&&(t=t.replace("Windows NT 10.0","Windows NT 11.0")),t})(),R={comment:E.value,nick:s.value.nick,mail:s.value.mail,link:s.value.link,url:i.value.path,ua:C};if(!r.edit)if(null!=(e=a.value)&&e.token)R.nick=a.value.display_name,R.mail=a.value.email,R.link=a.value.url;else{if("force"===y)return;if(k.indexOf("nick")>-1&&!R.nick)return null==(t=c.value.nick)||t.focus(),alert(z.value.nickError);if(k.indexOf("mail")>-1&&!R.mail||R.mail&&!(e=>ne.test(e))(R.mail))return null==(n=c.value.mail)||n.focus(),alert(z.value.mailError);R.nick||(R.nick=z.value.anonymous)}if(R.comment){if(!I.value)return alert(z.value.wordHint.replace("$0",w[0].toString()).replace("$1",w[1].toString()).replace("$2",$.value.toString()));R.comment=Hs(R.comment,b.value.map),r.replyId&&r.rootId&&(R.pid=r.replyId,R.rid=r.rootId,R.at=r.replyUser),A.value=!0;try{x&&(R.recaptchaV3=await(e=>{const t=wa[e]??(wa[e]=ca.load(e,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:e=>t.then((t=>t.execute(e)))}})(x).execute("social")),_&&(R.turnstile=await(e=>({execute:async t=>{const{load:n}=fl("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1});await n();const r=null==window?void 0:window.turnstile;return new Promise((n=>{null==r||r.ready((()=>{null==r||r.render(".wl-captcha-container",{sitekey:e,action:t,size:"compact",callback:n})}))}))}}))(_).execute("social"));const e={serverURL:m,lang:v,token:null==(f=a.value)?void 0:f.token,comment:R},t=await(r.edit?h({objectId:r.edit.objectId,...e}):p(e));if(A.value=!1,t.errmsg)return alert(t.errmsg);o("submit",t.data),l.value="",S.value="",await Nn(),r.replyId&&o("cancelReply"),null!=(g=r.edit)&&g.objectId&&o("cancelEdit")}catch(e){A.value=!1,alert(e.message)}}else null==(d=u.value)||d.focus()},N=e=>{var t,n,r,o;null!=(t=f.value)&&t.contains(e.target)||null!=(n=m.value)&&n.contains(e.target)||(x.value=!1),null!=(r=v.value)&&r.contains(e.target)||null!=(o=y.value)&&o.contains(e.target)||(_.value=!1)},F=async e=>{var t;const{scrollTop:n,clientHeight:r,scrollHeight:o}=e.target,l=(r+n)/o,s=i.value.search,a=(null==(t=w.value)?void 0:t.value)??"";l<.9||R.loading||T.value||(R.loading=!0,(s.more&&R.list.length?await s.more(a,R.list.length):await s.search(a)).length?R.list=[...R.list,...s.more&&R.list.length?await s.more(a,R.list.length):await s.search(a)]:T.value=!0,R.loading=!1,setTimeout((()=>{e.target.scrollTop=n}),50))},V=Yi((e=>{R.list=[],T.value=!1,F(e)}),300);pr([i,$],(([e,t])=>{const{wordLimit:n}=e;n?tn[1]?(L.value=n[1],I.value=!1):(L.value=n[1],I.value=!0):(L.value=0,I.value=!0)}),{immediate:!0}),ll("click",N),ll("message",(({data:e})=>{!e||"profile"!==e.type||(a.value={...a.value,...e.data},[localStorage,sessionStorage].filter((e=>e.getItem("WALINE_USER"))).forEach((e=>e.setItem("WALINE_USER",JSON.stringify(a)))))})),pr(_,(async e=>{var t;if(!e)return;const n=i.value.search;w.value&&(w.value.value=""),R.loading=!0,R.list=await((null==(t=n.default)?void 0:t.call(n))??n.search("")),R.loading=!1})),br((()=>{var e;null!=(e=r.edit)&&e.objectId&&(l.value=r.edit.orig),pr((()=>l.value),(e=>{const{highlighter:t,texRenderer:n}=i.value;E.value=e,S.value=Bs(e,{emojiMap:b.value.map,highlighter:t,texRenderer:n}),$.value=(e=>{var t,n;return((null==(t=(e=>e.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu))(e))?void 0:t.reduce(((e,t)=>e+(["",",","."].includes(t.trim())?0:t.trim().split(/\s+/u).length)),0))??0)+((null==(n=(e=>e.match(/[\u4E00-\u9FD5]/gu))(e))?void 0:n.length)??0)})(e),e?Pa(u.value):Pa.destroy(u.value)}),{immediate:!0}),pr((()=>i.value.emoji),(e=>vl(e).then((e=>{b.value=e}))),{immediate:!0})}));const D={props:r,emit:o,config:i,editor:l,userMeta:s,userInfo:a,inputRefs:c,editorRef:u,imageUploadRef:d,emojiButtonRef:f,emojiPopupRef:m,gifButtonRef:v,gifPopupRef:y,gifSearchInputRef:w,emoji:b,emojiTabIndex:k,showEmoji:x,showGif:_,showPreview:C,previewText:S,wordNumber:$,searchResults:R,wordLimit:L,isWordNumberLegal:I,content:E,isSubmitting:A,isImageListEnd:T,locale:z,isLogin:j,canUploadImage:O,insert:M,onKeyDown:e=>{const t=e.key;(e.ctrlKey||e.metaKey)&&"Enter"===t&&U()},uploadImage:P,onDrop:e=>{var t;if(null!=(t=e.dataTransfer)&&t.items){const t=kl(e.dataTransfer.items);t&&O.value&&(P(t),e.preventDefault())}},onPaste:e=>{if(e.clipboardData){const t=kl(e.clipboardData.items);t&&O.value&&P(t)}},onChange:()=>{const e=d.value;e.files&&O.value&&P(e.files[0]).then((()=>{e.value=""}))},submitComment:U,onLogin:e=>{e.preventDefault();const{lang:t,serverURL:n}=i.value;g({serverURL:n,lang:t}).then((e=>{a.value=e,(e.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(e)),o("log")}))},onLogout:()=>{a.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),o("log")},onProfile:e=>{e.preventDefault();const{lang:t,serverURL:n}=i.value,r=(window.innerWidth-800)/2,o=(window.innerHeight-800)/2,l=new URLSearchParams({lng:t,token:a.value.token}),s=window.open(`${n}/ui/profile?${l.toString()}`,"_blank",`width=800,height=800,left=${r},top=${o},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);null==s||s.postMessage({type:"TOKEN",data:a.value.token},"*")},popupHandler:N,onImageWallScroll:F,onGifSearch:V,get CloseIcon(){return Gs},get EmojiIcon(){return Ks},get GifIcon(){return oa},get ImageIcon(){return Qs},get LoadingIcon(){return ra},get MarkdownIcon(){return Ys},get PreviewIcon(){return Js},ImageWall:Va};return Object.defineProperty(D,"__isScriptSetup",{enumerable:!1,value:!0}),D}});const Ha={key:0,class:"wl-login-info"},Ba={class:"wl-avatar"},Wa=["title"],qa=["title"],Ga=["src"],Za=["title","textContent"],Ka={class:"wl-panel"},Qa=["for","textContent"],Xa=["id","onUpdate:modelValue","name","type"],Ja=["placeholder"],Ya={class:"wl-preview"},ec=Eo("hr",null,null,-1),tc=["innerHTML"],nc={class:"wl-footer"},rc={class:"wl-actions"},oc={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},ic=["title"],lc=["title"],sc=["title"],ac=["title"],cc={class:"wl-info"},uc=Eo("div",{class:"wl-captcha-container"},null,-1),pc={class:"wl-text-number"},dc={key:0},hc=["textContent"],fc=["textContent"],gc=["disabled"],mc=["placeholder"],vc={key:1,class:"wl-loading"},yc={key:0,class:"wl-tab-wrapper"},wc=["title","onClick"],bc=["src","alt"],kc={key:0,class:"wl-tabs"},xc=["onClick"],_c=["src","alt","title"],Cc=["title"];var Sc=_a(Da,[["render",function(e,t,n,r,o,i){var l,s;return bo(),Co("div",{key:r.userInfo.token,class:"wl-comment"},["disable"===r.config.login||!r.isLogin||null!=(l=n.edit)&&l.objectId?jo("v-if",!0):(bo(),Co("div",Ha,[Eo("div",Ba,[Eo("button",{type:"submit",class:"wl-logout-btn",title:r.locale.logout,onClick:r.onLogout},[Ao(r.CloseIcon,{size:14})],8,Wa),Eo("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile},[Eo("img",{src:r.userInfo.avatar,alt:"avatar"},null,8,Ga)],8,qa)]),Eo("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile,textContent:Ye(r.userInfo.display_name)},null,8,Za)])),Eo("div",Ka,["force"!==r.config.login&&r.config.meta.length&&!r.isLogin?(bo(),Co("div",{key:0,class:Ze(["wl-header",`item${r.config.meta.length}`])},[(bo(!0),Co(fo,null,Cr(r.config.meta,(e=>(bo(),Co("div",{key:e,class:"wl-header-item"},[Eo("label",{for:`wl-${e}`,textContent:Ye(r.locale[e]+(r.config.requiredMeta.includes(e)||!r.config.requiredMeta.length?"":`(${r.locale.optional})`))},null,8,Qa),fr(Eo("input",{id:`wl-${e}`,ref_for:!0,ref:t=>{t&&(r.inputRefs[e]=t)},"onUpdate:modelValue":t=>r.userMeta[e]=t,class:Ze(["wl-input",`wl-${e}`]),name:e,type:"mail"===e?"email":"text"},null,10,Xa),[[Ni,r.userMeta[e]]])])))),128))],2)):jo("v-if",!0),fr(Eo("textarea",{id:"wl-edit",ref:"editorRef","onUpdate:modelValue":t[0]||(t[0]=e=>r.editor=e),class:"wl-editor",placeholder:n.replyUser?`@${n.replyUser}`:r.locale.placeholder,onKeydown:r.onKeyDown,onDrop:r.onDrop,onPaste:r.onPaste},null,40,Ja),[[Ai,r.editor]]),fr(Eo("div",Ya,[ec,Eo("h4",null,Ye(r.locale.preview)+":",1),Eo("div",{class:"wl-content",innerHTML:r.previewText},null,8,tc)],512),[[ci,r.showPreview]]),Eo("div",nc,[Eo("div",rc,[Eo("a",oc,[Ao(r.MarkdownIcon)]),fr(Eo("button",{ref:"emojiButtonRef",type:"button",class:Ze(["wl-action",{active:r.showEmoji}]),title:r.locale.emoji,onClick:t[1]||(t[1]=e=>r.showEmoji=!r.showEmoji)},[Ao(r.EmojiIcon)],10,ic),[[ci,r.emoji.tabs.length]]),r.config.search?(bo(),Co("button",{key:0,ref:"gifButtonRef",type:"button",class:Ze(["wl-action",{active:r.showGif}]),title:r.locale.gif,onClick:t[2]||(t[2]=e=>r.showGif=!r.showGif)},[Ao(r.GifIcon)],10,lc)):jo("v-if",!0),Eo("input",{id:"wl-image-upload",ref:"imageUploadRef",class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:r.onChange},null,544),r.canUploadImage?(bo(),Co("label",{key:1,for:"wl-image-upload",class:"wl-action",title:r.locale.uploadImage},[Ao(r.ImageIcon)],8,sc)):jo("v-if",!0),Eo("button",{type:"button",class:Ze(["wl-action",{active:r.showPreview}]),title:r.locale.preview,onClick:t[3]||(t[3]=e=>r.showPreview=!r.showPreview)},[Ao(r.PreviewIcon)],10,ac)]),Eo("div",cc,[uc,Eo("div",pc,[zo(Ye(r.wordNumber)+" ",1),r.config.wordLimit?(bo(),Co("span",dc,[zo("  /  "),Eo("span",{class:Ze({illegal:!r.isWordNumberLegal}),textContent:Ye(r.wordLimit)},null,10,hc)])):jo("v-if",!0),zo("  "+Ye(r.locale.word),1)]),"disable"===r.config.login||r.isLogin?jo("v-if",!0):(bo(),Co("button",{key:0,type:"button",class:"wl-btn",onClick:r.onLogin,textContent:Ye(r.locale.login)},null,8,fc)),"force"!==r.config.login||r.isLogin?(bo(),Co("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:r.isSubmitting,onClick:r.submitComment},[r.isSubmitting?(bo(),So(r.LoadingIcon,{key:0,size:16})):(bo(),Co(fo,{key:1},[zo(Ye(r.locale.submit),1)],64))],8,gc)):jo("v-if",!0)]),Eo("div",{ref:"gifPopupRef",class:Ze(["wl-gif-popup",{display:r.showGif}])},[Eo("input",{ref:"gifSearchInputRef",type:"text",placeholder:r.locale.gifSearchPlaceholder,onInput:t[4]||(t[4]=(...e)=>r.onGifSearch&&r.onGifSearch(...e))},null,40,mc),r.searchResults.list.length?(bo(),So(r.ImageWall,{key:0,items:r.searchResults.list,"column-width":200,gap:6,onInsert:t[5]||(t[5]=e=>r.insert(e)),onScroll:r.onImageWallScroll},null,8,["items"])):jo("v-if",!0),r.searchResults.loading?(bo(),Co("div",vc,[Ao(r.LoadingIcon,{size:30})])):jo("v-if",!0)],2),Eo("div",{ref:"emojiPopupRef",class:Ze(["wl-emoji-popup",{display:r.showEmoji}])},[(bo(!0),Co(fo,null,Cr(r.emoji.tabs,((e,t)=>(bo(),Co(fo,{key:e.name},[t===r.emojiTabIndex?(bo(),Co("div",yc,[(bo(!0),Co(fo,null,Cr(e.items,(e=>(bo(),Co("button",{key:e,type:"button",title:e,onClick:t=>r.insert(`:${e}:`)},[r.showEmoji?(bo(),Co("img",{key:0,class:"wl-emoji",src:r.emoji.map[e],alt:e,loading:"lazy",referrerPolicy:"no-referrer"},null,8,bc)):jo("v-if",!0)],8,wc)))),128))])):jo("v-if",!0)],64)))),128)),r.emoji.tabs.length>1?(bo(),Co("div",kc,[(bo(!0),Co(fo,null,Cr(r.emoji.tabs,((e,t)=>(bo(),Co("button",{key:e.name,type:"button",class:Ze(["wl-tab",{active:r.emojiTabIndex===t}]),onClick:e=>r.emojiTabIndex=t},[Eo("img",{class:"wl-emoji",src:e.icon,alt:e.name,title:e.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,_c)],10,xc)))),128))])):jo("v-if",!0)],2)])]),n.replyId||null!=(s=n.edit)&&s.objectId?(bo(),Co("button",{key:1,type:"button",class:"wl-close",title:r.locale.cancelReply,onClick:t[6]||(t[6]=e=>n.replyId?r.emit("cancelReply"):r.emit("cancelEdit"))},[Ao(r.CloseIcon,{size:24})],8,Cc)):jo("v-if",!0)])}],["__file","CommentBox.vue"]]),$c=mr({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(e,{expose:t,emit:n}){t();const r=e,o=n,i=Vr("config"),l=la(),s=hl(),a=ka(),c=ei((()=>i.value.locale)),u=ei((()=>{const{link:e}=r.comment;return e?Z(e)?e:`https://${e}`:""})),p=ei((()=>l.value.includes(r.comment.objectId))),d=ei((()=>te(new Date(r.comment.time),s.value,c.value))),h=ei((()=>"administrator"===a.value.type)),f=ei((()=>r.comment.user_id&&a.value.objectId===r.comment.user_id)),g=ei((()=>{var e;return r.comment.objectId===(null==(e=r.reply)?void 0:e.objectId)})),m=ei((()=>{var e;return r.comment.objectId===(null==(e=r.edit)?void 0:e.objectId)})),v={props:r,emit:o,commentStatus:["approved","waiting","spam"],config:i,likes:l,now:s,userInfo:a,locale:c,link:u,like:p,time:d,isAdmin:h,isOwner:f,isReplyingCurrent:g,isEditingCurrent:m,CommentBox:Sc,get DeleteIcon(){return Zs},get EditIcon(){return ta},get LikeIcon(){return Xs},get ReplyIcon(){return ea},get VerifiedIcon(){return na}};return Object.defineProperty(v,"__isScriptSetup",{enumerable:!1,value:!0}),v}});const Rc=["id"],Lc={class:"wl-user","aria-hidden":"true"},Ic=["src"],Ec={class:"wl-card"},Ac={class:"wl-head"},Tc=["href"],zc={key:1,class:"wl-nick"},jc=["textContent"],Oc=["textContent"],Mc=["textContent"],Pc=["textContent"],Uc=["textContent"],Nc={class:"wl-comment-actions"},Fc=["title"],Vc=["title"],Dc={class:"wl-meta","aria-hidden":"true"},Hc=["data-value","textContent"],Bc={key:0,class:"wl-content"},Wc={key:0},qc=["href"],Gc=Eo("span",null,": ",-1),Zc=["innerHTML"],Kc={key:1,class:"wl-admin-actions"},Qc={class:"wl-comment-status"},Xc=["disabled","onClick","textContent"],Jc={key:3,class:"wl-quote"};var Yc=_a($c,[["render",function(e,t,n,r,o,i){var l;const s=or("CommentCard",!0);return bo(),Co("div",{id:n.comment.objectId,class:"wl-card-item"},[Eo("div",Lc,[n.comment.avatar?(bo(),Co("img",{key:0,class:"wl-user-avatar",src:n.comment.avatar},null,8,Ic)):jo("v-if",!0),n.comment.type?(bo(),So(r.VerifiedIcon,{key:1})):jo("v-if",!0)]),Eo("div",Ec,[Eo("div",Ac,[r.link?(bo(),Co("a",{key:0,class:"wl-nick",href:r.link,target:"_blank",rel:"nofollow noopener noreferrer"},Ye(n.comment.nick),9,Tc)):(bo(),Co("span",zc,Ye(n.comment.nick),1)),"administrator"===n.comment.type?(bo(),Co("span",{key:2,class:"wl-badge",textContent:Ye(r.locale.admin)},null,8,jc)):jo("v-if",!0),n.comment.label?(bo(),Co("span",{key:3,class:"wl-badge",textContent:Ye(n.comment.label)},null,8,Oc)):jo("v-if",!0),n.comment.sticky?(bo(),Co("span",{key:4,class:"wl-badge",textContent:Ye(r.locale.sticky)},null,8,Mc)):jo("v-if",!0),"number"==typeof n.comment.level?(bo(),Co("span",{key:5,class:Ze(`wl-badge level${n.comment.level}`),textContent:Ye(r.locale[`level${n.comment.level}`]||`Level ${n.comment.level}`)},null,10,Pc)):jo("v-if",!0),Eo("span",{class:"wl-time",textContent:Ye(r.time)},null,8,Uc),Eo("div",Nc,[r.isAdmin||r.isOwner?(bo(),Co(fo,{key:0},[Eo("button",{type:"button",class:"wl-edit",onClick:t[0]||(t[0]=e=>r.emit("edit",n.comment))},[Ao(r.EditIcon)]),Eo("button",{type:"button",class:"wl-delete",onClick:t[1]||(t[1]=e=>r.emit("delete",n.comment))},[Ao(r.DeleteIcon)])],64)):jo("v-if",!0),Eo("button",{type:"button",class:"wl-like",title:r.like?r.locale.cancelLike:r.locale.like,onClick:t[2]||(t[2]=e=>r.emit("like",n.comment))},[Ao(r.LikeIcon,{active:r.like},null,8,["active"]),zo(" "+Ye("like"in n.comment?n.comment.like:""),1)],8,Fc),Eo("button",{type:"button",class:Ze(["wl-reply",{active:r.isReplyingCurrent}]),title:r.isReplyingCurrent?r.locale.cancelReply:r.locale.reply,onClick:t[3]||(t[3]=e=>r.emit("reply",r.isReplyingCurrent?null:n.comment))},[Ao(r.ReplyIcon)],10,Vc)])]),Eo("div",Dc,[(bo(),Co(fo,null,Cr(["addr","browser","os"],(e=>(bo(),Co(fo,null,[n.comment[e]?(bo(),Co("span",{key:e,class:Ze(`wl-${e}`),"data-value":n.comment[e],textContent:Ye(n.comment[e])},null,10,Hc)):jo("v-if",!0)],64)))),64))]),r.isEditingCurrent?jo("v-if",!0):(bo(),Co("div",Bc,[n.comment.reply_user?(bo(),Co("p",Wc,[Eo("a",{href:"#"+n.comment.pid},"@"+Ye(n.comment.reply_user.nick),9,qc),Gc])):jo("v-if",!0),Eo("div",{innerHTML:n.comment.comment},null,8,Zc)])),r.isAdmin&&!r.isEditingCurrent?(bo(),Co("div",Kc,[Eo("span",Qc,[(bo(),Co(fo,null,Cr(r.commentStatus,(e=>Eo("button",{key:e,type:"submit",class:Ze(`wl-btn wl-${e}`),disabled:n.comment.status===e,onClick:t=>r.emit("status",{status:e,comment:n.comment}),textContent:Ye(r.locale[e])},null,10,Xc))),64))]),r.isAdmin&&!("rid"in n.comment)?(bo(),Co("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:t[4]||(t[4]=e=>r.emit("sticky",n.comment))},Ye(n.comment.sticky?r.locale.unsticky:r.locale.sticky),1)):jo("v-if",!0)])):jo("v-if",!0),r.isReplyingCurrent||r.isEditingCurrent?(bo(),Co("div",{key:2,class:Ze({"wl-reply-wrapper":r.isReplyingCurrent,"wl-edit-wrapper":r.isEditingCurrent})},[Ao(r.CommentBox,{edit:n.edit,"reply-id":null==(l=n.reply)?void 0:l.objectId,"reply-user":n.comment.nick,"root-id":n.rootId,onLog:t[5]||(t[5]=e=>r.emit("log")),onCancelReply:t[6]||(t[6]=e=>r.emit("reply",null)),onCancelEdit:t[7]||(t[7]=e=>r.emit("edit",null)),onSubmit:t[8]||(t[8]=e=>r.emit("submit",e))},null,8,["edit","reply-id","reply-user","root-id"])],2)):jo("v-if",!0),"children"in n.comment?(bo(),Co("div",Jc,[(bo(!0),Co(fo,null,Cr(n.comment.children,(e=>(bo(),So(s,{key:e.objectId,comment:e,reply:n.reply,edit:n.edit,"root-id":n.rootId,onLog:t[9]||(t[9]=e=>r.emit("log")),onDelete:t[10]||(t[10]=e=>r.emit("delete",e)),onEdit:t[11]||(t[11]=e=>r.emit("edit",e)),onLike:t[12]||(t[12]=e=>r.emit("like",e)),onReply:t[13]||(t[13]=e=>r.emit("reply",e)),onStatus:t[14]||(t[14]=e=>r.emit("status",e)),onSticky:t[15]||(t[15]=e=>r.emit("sticky",e)),onSubmit:t[16]||(t[16]=e=>r.emit("submit",e))},null,8,["comment","reply","edit","root-id"])))),128))])):jo("v-if",!0)])],8,Rc)}],["__file","CommentCard.vue"]]);const eu="3.3.0";var tu=mr({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(e,{expose:t}){t();const n=e,r={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},o=Object.keys(r),i=ka(),l=la(),s=bn("loading"),a=bn(0),c=bn(1),p=bn(0),f=ei((()=>(({serverURL:e,path:t=location.pathname,lang:n=(typeof navigator>"u"?"en-US":navigator.language),locale:r,emoji:o=x,meta:i=["nick","mail","link"],requiredMeta:l=[],dark:s=!1,pageSize:a=10,wordLimit:c,imageUploader:u,highlighter:p,texRenderer:d,copyright:h=!0,login:f="enable",search:g,reaction:m,recaptchaV3Key:v="",turnstileKey:y="",commentSorting:w="latest",...b})=>({serverURL:K(e),path:q(t),lang:W(n),locale:{...B(W(n)),..."object"==typeof r?r:{}},wordLimit:Q(c),meta:k(i),requiredMeta:k(l),imageUploader:X(u,C),highlighter:X(p,E),texRenderer:X(d,S),dark:s,emoji:"boolean"==typeof o?o?x:[]:o,pageSize:a,login:f,copyright:h,search:!1!==g&&("object"==typeof g?g:$(n)),recaptchaV3Key:v,turnstileKey:y,reaction:Array.isArray(m)?m:!0===m?_:[],commentSorting:w,...b}))(n))),g=bn(f.value.commentSorting),m=bn([]),v=bn(null),y=bn(null),w=ei((()=>(e=>J(e)?"auto"===e?`@media(prefers-color-scheme:dark){body${Y}}`:`${e}${Y}`:!0===e?`:root${Y}`:"")(f.value.dark))),b=ei((()=>f.value.locale));let R;!function(e,t={}){const n=bn(!1),{document:r=il,immediate:o=!0,manual:i=!1,id:l="vueuse_styletag_"+ ++gl}=t,s=bn(e);let a=()=>{};const c=()=>{if(!r)return;const e=r.getElementById(l)||r.createElement("style");e.isConnected||(e.id=l,t.media&&(e.media=t.media),r.head.appendChild(e)),!n.value&&(a=pr(s,(t=>{e.textContent=t}),{immediate:!0}),n.value=!0)},u=()=>{!r||!n.value||(a(),r.head.removeChild(r.getElementById(l)),n.value=!1)};o&&!i&&nl(c),i||Bi(u),sn(n)}(w,{id:"waline-darkmode"});const L=e=>{var t;const{serverURL:n,path:o,pageSize:l}=f.value,d=new AbortController;s.value="loading",null==R||R(),u({serverURL:n,lang:f.value.lang,path:o,pageSize:l,sortBy:r[g.value],page:e,signal:d.signal,token:null==(t=i.value)?void 0:t.token}).then((t=>{s.value="success",a.value=t.count,m.value.push(...t.data),c.value=e,p.value=t.totalPages})).catch((e=>{"AbortError"!==e.name&&(console.error(e.message),s.value="error")})),R=d.abort.bind(d)},I=()=>{a.value=0,m.value=[],L(1)};(function(e,t){if(Vo){let n=Vo.provides;const r=Vo.parent&&Vo.parent.provides;r===n&&(n=Vo.provides=Object.create(r)),n[e]=t}})("config",f),br((()=>{pr((()=>[n.serverURL,n.path]),(()=>I()),{immediate:!0})})),_r((()=>null==R?void 0:R()));const A={props:n,sortKeyMap:r,sortingMethods:o,userInfo:i,likeStorage:l,status:s,count:a,page:c,totalPages:p,config:f,commentSortingRef:g,data:m,reply:v,edit:y,darkmodeStyle:w,i18n:b,get abort(){return R},set abort(e){R=e},getCommentData:L,loadMore:()=>L(c.value+1),refresh:I,onSortByChange:e=>{g.value!==e&&(g.value=e,I())},onReply:e=>{v.value=e},onEdit:e=>{y.value=e},onSubmit:e=>{if(y.value)y.value.comment=e.comment,y.value.orig=e.orig;else if("rid"in e){const t=m.value.find((({objectId:t})=>t===e.rid));if(!t)return;Array.isArray(t.children)||(t.children=[]),t.children.push(e)}else m.value.unshift(e),a.value+=1},onStatusChange:async({comment:e,status:t})=>{var n;if(e.status===t)return;const{serverURL:r,lang:o}=f.value;await h({serverURL:r,lang:o,token:null==(n=i.value)?void 0:n.token,objectId:e.objectId,comment:{status:t}}),e.status=t},onSticky:async e=>{var t;if("rid"in e)return;const{serverURL:n,lang:r}=f.value;await h({serverURL:n,lang:r,token:null==(t=i.value)?void 0:t.token,objectId:e.objectId,comment:{sticky:e.sticky?0:1}}),e.sticky=!e.sticky},onDelete:async({objectId:e})=>{var t;if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:n,lang:r}=f.value;await d({serverURL:n,lang:r,token:null==(t=i.value)?void 0:t.token,objectId:e}),m.value.some(((t,n)=>t.objectId===e?(m.value=m.value.filter(((e,t)=>t!==n)),!0):t.children.some(((r,o)=>r.objectId===e&&(m.value[n].children=t.children.filter(((e,t)=>t!==o)),!0)))))},onLike:async e=>{var t;const{serverURL:n,lang:r}=f.value,{objectId:o}=e,s=l.value.includes(o);await h({serverURL:n,lang:r,objectId:o,token:null==(t=i.value)?void 0:t.token,comment:{like:!s}}),s?l.value=l.value.filter((e=>e!==o)):(l.value=[...l.value,o],l.value.length>50&&(l.value=l.value.slice(-50))),e.like=(e.like||0)+(s?-1:1)},Reaction:Ta,CommentBox:Sc,CommentCard:Yc,get LoadingIcon(){return ra},get version(){return eu}};return Object.defineProperty(A,"__isScriptSetup",{enumerable:!1,value:!0}),A}});const nu={"data-waline":""},ru={class:"wl-meta-head"},ou={class:"wl-count"},iu=["textContent"],lu={class:"wl-sort"},su=["onClick"],au={class:"wl-cards"},cu={key:1,class:"wl-operation"},uu=["textContent"],pu={key:2,class:"wl-loading"},du=["textContent"],hu={key:4,class:"wl-operation"},fu=["textContent"],gu={key:5,class:"wl-power"},mu=Eo("a",{href:"https://github.com/walinejs/waline",target:"_blank",rel:"noopener noreferrer"}," Waline ",-1);var vu=_a(tu,[["render",function(e,t,n,r,o,i){return bo(),Co("div",nu,[Ao(r.Reaction),r.reply||r.edit?jo("v-if",!0):(bo(),So(r.CommentBox,{key:0,onLog:r.refresh,onSubmit:r.onSubmit})),Eo("div",ru,[Eo("div",ou,[r.count?(bo(),Co("span",{key:0,class:"wl-num",textContent:Ye(r.count)},null,8,iu)):jo("v-if",!0),zo(" "+Ye(r.i18n.comment),1)]),Eo("ul",lu,[(bo(!0),Co(fo,null,Cr(r.sortingMethods,(e=>(bo(),Co("li",{key:e,class:Ze([e===r.commentSortingRef?"active":""]),onClick:t=>r.onSortByChange(e)},Ye(r.i18n[e]),11,su)))),128))])]),Eo("div",au,[(bo(!0),Co(fo,null,Cr(r.data,(e=>(bo(),So(r.CommentCard,{key:e.objectId,"root-id":e.objectId,comment:e,reply:r.reply,edit:r.edit,onLog:r.refresh,onReply:r.onReply,onEdit:r.onEdit,onSubmit:r.onSubmit,onStatus:r.onStatusChange,onDelete:r.onDelete,onSticky:r.onSticky,onLike:r.onLike},null,8,["root-id","comment","reply","edit"])))),128))]),"error"===r.status?(bo(),Co("div",cu,[Eo("button",{type:"button",class:"wl-btn",onClick:r.refresh,textContent:Ye(r.i18n.refresh)},null,8,uu)])):"loading"===r.status?(bo(),Co("div",pu,[Ao(r.LoadingIcon,{size:30})])):r.data.length?r.page{t.forEach(((t,n)=>{const r=e[n].time;"number"==typeof r&&(t.innerText=r.toString())}))},wu=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-pageview-count",update:r=!0,lang:o=navigator.language})=>{const i=new AbortController,l=Array.from(document.querySelectorAll(n)),s=e=>{const n=Ws(e);return null!==n&&t!==n},a=n=>m({serverURL:K(e),paths:n.map((e=>Ws(e)??t)),lang:o,signal:i.signal}).then((e=>yu(e,n))).catch(yl);if(r){const n=l.filter((e=>!s(e))),r=l.filter(s);v({serverURL:K(e),path:t,lang:o}).then((e=>yu(e,n))),r.length&&a(r)}else a(l);return i.abort.bind(i)};e.RecentComments=({el:e,serverURL:t,count:n,lang:r=navigator.language})=>{var o;const i=ka(),l=wl(e),s=new AbortController;return y({serverURL:t,count:n,lang:r,signal:s.signal,token:null==(o=i.value)?void 0:o.token}).then((e=>l&&e.length?(l.innerHTML=`
    `,{comments:e,destroy:()=>{s.abort(),l.innerHTML=""}}):{comments:e,destroy:()=>s.abort()}))},e.UserList=({el:e,serverURL:t,count:n,locale:r,lang:o=navigator.language,mode:i="list"})=>{const l=wl(e),s=new AbortController;return w({serverURL:t,pageSize:n,lang:o,signal:s.signal}).then((e=>l&&e.length?(r={...B(o),..."object"==typeof r?r:{}},l.innerHTML=``,{users:e,destroy:()=>{s.abort(),l.innerHTML=""}}):{users:e,destroy:()=>s.abort()}))},e.addComment=p,e.commentCount=qs,e.defaultLocales=H,e.deleteComment=d,e.fetchCommentCount=f,e.getArticleCounter=a,e.getComment=u,e.getPageview=m,e.getRecentComment=y,e.getUserList=w,e.init=({el:e="#waline",path:t=window.location.pathname,comment:n=!1,pageview:r=!1,...o})=>{const i=e?wl(e):null;if(e&&!i)throw new Error("Option 'el' do not match any domElement!");if(!o.serverURL)throw new Error("Option 'serverURL' is missing!");const l=ln({...o}),s=ln({comment:n,pageview:r,path:t}),a=i?Hi((()=>ti(vu,{path:s.path,...l}))):null;a&&a.mount(i);const c=cr((()=>{s.comment&&qs({serverURL:l.serverURL,path:s.path,...J(s.comment)?{selector:s.comment}:{}})})),u=cr((()=>{s.pageview&&wu({serverURL:l.serverURL,path:s.path,...J(s.pageview)?{selector:s.pageview}:{}})}));return{el:i,update:({comment:e,pageview:t,path:n=window.location.pathname,...r}={})=>{Object.entries(r).forEach((([e,t])=>{l[e]=t})),s.path=n,void 0!==e&&(s.comment=e),void 0!==t&&(s.pageview=t)},destroy:()=>{null==a||a.unmount(),c(),u()}}},e.login=g,e.pageviewCount=wu,e.updateArticleCounter=c,e.updateComment=h,e.updatePageview=v,e.version=eu})); +**/const si=Symbol("_vod"),ai=Symbol("_vsh"),ci={beforeMount(e,{value:t},{transition:n}){e[si]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ui(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ui(e,!0),r.enter(e)):r.leave(e,(()=>{ui(e,!1)})):ui(e,t))},beforeUnmount(e,{value:t}){ui(e,t)}};function ui(e,t){e.style.display=t?e[si]:"none",e[ai]=!t}const pi=Symbol(""),di=/(^|;)\s*display\s*:/;const hi=/\s*!important$/;function fi(e,t,n){if(fe(n))n.forEach((n=>fi(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=mi[t];if(n)return n;let r=Ae(t);if("filter"!==r&&r in e)return mi[t]=r;r=je(r);for(let n=0;n{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ln(function(e,t){if(fe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Si(),n}(r,o);yi(e,n,l,s)}else l&&(function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,l,s),i[t]=void 0)}}const ki=/(?:Once|Passive|Capture)$/;let xi=0;const Ci=Promise.resolve(),Si=()=>xi||(Ci.then((()=>xi=0)),xi=Date.now());const $i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Ri=e=>{const t=e.props["onUpdate:modelValue"]||!1;return fe(t)?e=>Pe(t,e):t};function Li(e){e.target.composing=!0}function Ii(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ei=Symbol("_assign"),Ai={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[Ei]=Ri(o);const i=r||o.props&&"number"===o.props.type;yi(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),i&&(r=Fe(r)),e[Ei](r)})),n&&yi(e,"change",(()=>{e.value=e.value.trim()})),t||(yi(e,"compositionstart",Li),yi(e,"compositionend",Ii),yi(e,"change",Ii))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},i){if(e[Ei]=Ri(i),e.composing)return;const l=t??"";(!o&&"number"!==e.type||/^0\d/.test(e.value)?e.value:Fe(e.value))!==l&&(document.activeElement===e&&"range"!==e.type&&(n||r&&e.value.trim()===l)||(e.value=l))}},Ti={deep:!0,created(e,t,n){e[Ei]=Ri(n),yi(e,"change",(()=>{const t=e._modelValue,n=Pi(e),r=e.checked,o=e[Ei];if(fe(t)){const e=Je(t,n),i=-1!==e;if(r&&!i)o(t.concat(n));else if(!r&&i){const n=[...t];n.splice(e,1),o(n)}}else if(me(t)){const e=new Set(t);r?e.add(n):e.delete(n),o(e)}else o(Ui(e,r))}))},mounted:zi,beforeUpdate(e,t,n){e[Ei]=Ri(n),zi(e,t,n)}};function zi(e,{value:t,oldValue:n},r){e._modelValue=t,fe(t)?e.checked=Je(t,r.props.value)>-1:me(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Xe(t,Ui(e,!0)))}const ji={created(e,{value:t},n){e.checked=Xe(t,n.props.value),e[Ei]=Ri(n),yi(e,"change",(()=>{e[Ei](Pi(e))}))},beforeUpdate(e,{value:t,oldValue:n},r){e[Ei]=Ri(r),t!==n&&(e.checked=Xe(t,r.props.value))}},Oi={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=me(t);yi(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?Fe(Pi(e)):Pi(e)));e[Ei](e.multiple?o?new Set(t):t:t[0]),e._assigning=!0,Nn((()=>{e._assigning=!1}))})),e[Ei]=Ri(r)},mounted(e,{value:t,modifiers:{number:n}}){Mi(e,t)},beforeUpdate(e,t,n){e[Ei]=Ri(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Mi(e,t)}};function Mi(e,t,n){const r=e.multiple,o=fe(t);if(!r||o||me(t)){for(let n=0,i=e.options.length;nString(e)===String(l))):Je(t,l)>-1}else i.selected=t.has(l);else if(Xe(Pi(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}!r&&-1!==e.selectedIndex&&(e.selectedIndex=-1)}}function Pi(e){return"_value"in e?e._value:e.value}function Ui(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ni={created(e,t,n){Fi(e,t,n,null,"created")},mounted(e,t,n){Fi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Fi(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Fi(e,t,n,r,"updated")}};function Fi(e,t,n,r,o){const i=function(e,t){switch(e){case"SELECT":return Oi;case"TEXTAREA":return Ai;default:switch(t){case"checkbox":return Ti;case"radio":return ji;default:return Ai}}}(e.tagName,n.props&&n.props.type)[o];i&&i(e,t,n,r)}const Vi=ue({patchProp:(e,t,n,r,o,i,l,s,a)=>{const c="svg"===o;"class"===t?function(e,t,n){const r=e[li];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,c):"style"===t?function(e,t,n){const r=e.style,o=we(n);let i=!1;if(n&&!o){if(t)if(we(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&fi(r,t,"")}else for(const e in t)null==n[e]&&fi(r,e,"");for(const e in n)"display"===e&&(i=!0),fi(r,e,n[e])}else if(o){if(t!==n){const e=r[pi];e&&(n+=";"+e),r.cssText=n,i=di.test(n)}}else t&&e.removeAttribute("style");si in e&&(e[si]=i?r.display:"",e[ai]&&(r.display="none"))}(e,n,r):ae(t)?ce(t)||bi(e,t,0,r,l):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&$i(t)&&ye(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!$i(t)||!we(n))&&t in e}(e,t,r,c))?function(e,t,n,r,o,i,l){if("innerHTML"===t||"textContent"===t)return r&&l(r,o,i),void(e[t]=n??"");const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const r=n??"";return(("OPTION"===s?e.getAttribute("value")||"":e.value)!==r||!("_value"in e))&&(e.value=r),null==n&&e.removeAttribute(t),void(e._value=n)}let a=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=Qe(n):null==n&&"string"===r?(n="",a=!0):"number"===r&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}(e,t,r,i,l,s,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,o){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(vi,t.slice(6,t.length)):e.setAttributeNS(vi,t,n);else{const r=Ke(t);null==n||r&&!Qe(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,c))}},ii);let Di;const Hi=(...e)=>{const t=(Di||(Di=ao(Vi))).createApp(...e),{mount:n}=t;return t.mount=e=>{const r=function(e){return we(e)?document.querySelector(e):e}(e);if(!r)return;const o=t._component;!ye(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function Bi(e){return!!it()&&(function(e){nt&&nt.cleanups.push(e)}(e),!0)}function Wi(e){return"function"==typeof e?e():Cn(e)}const qi=typeof window<"u"&&typeof document<"u",Gi=Object.prototype.toString,Zi=e=>"[object Object]"===Gi.call(e),Ki=()=>{};function Qi(e,t){return function(...n){return new Promise(((r,o)=>{Promise.resolve(e((()=>t.apply(this,n)),{fn:t,thisArg:this,args:n})).then(r).catch(o)}))}}const Xi=e=>e();function Ji(e){return Do()}function Yi(e,t=200,n={}){return Qi(function(e,t={}){let n,r,o=Ki;const i=e=>{clearTimeout(e),o(),o=Ki};return l=>{const s=Wi(e),a=Wi(t.maxWait);return n&&i(n),s<=0||void 0!==a&&a<=0?(r&&(i(r),r=null),Promise.resolve(l())):new Promise(((e,c)=>{o=t.rejectOnCancel?c:e,a&&!r&&(r=setTimeout((()=>{n&&i(n),r=null,e(l())}),a)),n=setTimeout((()=>{r&&i(r),r=null,e(l())}),s)}))}}(t,n),e)}function el(e,t,n={}){const{eventFilter:r=Xi,...o}=n;return pr(e,Qi(r,t),o)}function tl(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:i,pause:l,resume:s,isActive:a}=function(e=Xi){const t=bn(!0);return{isActive:sn(t),pause:function(){t.value=!1},resume:function(){t.value=!0},eventFilter:(...n)=>{t.value&&e(...n)}}}(r);return{stop:el(e,t,{...o,eventFilter:i}),pause:l,resume:s,isActive:a}}function nl(e,t=!0,n){Ji()?br(e,n):t?e():Nn(e)}function rl(e){var t;const n=Wi(e);return null!=(t=null==n?void 0:n.$el)?t:n}const ol=qi?window:void 0,il=qi?window.document:void 0;function ll(...e){let t,n,r,o;if("string"==typeof e[0]||Array.isArray(e[0])?([n,r,o]=e,t=ol):[t,n,r,o]=e,!t)return Ki;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],l=()=>{i.forEach((e=>e())),i.length=0},s=pr((()=>[rl(t),Wi(o)]),(([e,t])=>{if(l(),!e)return;const o=Zi(t)?{...t}:t;i.push(...n.flatMap((t=>r.map((n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,o))))))}),{immediate:!0,flush:"post"}),a=()=>{s(),l()};return Bi(a),a}const sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},al="__vueuse_ssr_handlers__",cl=(al in sl||(sl[al]=sl[al]||{}),sl[al]);const ul={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},pl="vueuse-storage";function dl(e,t,n,r={}){var o;const{flush:i="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:a=!0,mergeDefaults:c=!1,shallow:u,window:p=ol,eventFilter:d,onError:h=(e=>{console.error(e)}),initOnMounted:f}=r,g=(u?kn:bn)("function"==typeof t?t():t);if(!n)try{n=function(e,t){return cl[e]||t}("getDefaultStorage",(()=>{var e;return null==(e=ol)?void 0:e.localStorage}))()}catch(e){h(e)}if(!n)return g;const m=Wi(t),v=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(m),y=null!=(o=r.serializer)?o:ul[v],{pause:w,resume:b}=tl(g,(()=>function(t){try{const r=n.getItem(e);if(null==t)k(r,null),n.removeItem(e);else{const o=y.write(t);r!==o&&(n.setItem(e,o),k(r,o))}}catch(e){h(e)}}(g.value)),{flush:i,deep:l,eventFilter:d});function k(t,r){p&&p.dispatchEvent(new CustomEvent(pl,{detail:{key:e,oldValue:t,newValue:r,storageArea:n}}))}function x(t){if(!t||t.storageArea===n){if(t&&null==t.key)return void(g.value=m);if(!t||t.key===e){w();try{(null==t?void 0:t.newValue)!==y.write(g.value)&&(g.value=function(t){const r=t?t.newValue:n.getItem(e);if(null==r)return a&&null!=m&&n.setItem(e,y.write(m)),m;if(!t&&c){const e=y.read(r);return"function"==typeof c?c(e,m):"object"!==v||Array.isArray(e)?e:{...m,...e}}return"string"!=typeof r?r:y.read(r)}(t))}catch(e){h(e)}finally{t?Nn(b):b()}}}}function _(e){x(e.detail)}return p&&s&&nl((()=>{ll(p,"storage",x),ll(p,pl,_),f&&x()})),f||x(),g}function hl(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=bn(new Date),o=()=>r.value=new Date,i="requestAnimationFrame"===n?function(e,t={}){const{immediate:n=!0,fpsLimit:r,window:o=ol}=t,i=bn(!1),l=r?1e3/r:null;let s=0,a=null;function c(t){if(!i.value||!o)return;s||(s=t);const n=t-s;l&&n{l.value&&qi&&c()})));return Bi(a),{isActive:l,pause:a,resume:c}}(o,n,{immediate:!0});return t?{now:r,...i}:r}function fl(e,t=Ki,n={}){const{immediate:r=!0,manual:o=!1,type:i="text/javascript",async:l=!0,crossOrigin:s,referrerPolicy:a,noModule:c,defer:u,document:p=il,attrs:d={}}=n,h=bn(null);let f=null;const g=(n=!0)=>(f||(f=(n=>new Promise(((r,o)=>{const f=e=>(h.value=e,r(e),e);if(!p)return void r(!1);let g=!1,m=p.querySelector(`script[src="${Wi(e)}"]`);m?m.hasAttribute("data-loaded")&&f(m):(m=p.createElement("script"),m.type=i,m.async=l,m.src=Wi(e),u&&(m.defer=u),s&&(m.crossOrigin=s),c&&(m.noModule=c),a&&(m.referrerPolicy=a),Object.entries(d).forEach((([e,t])=>null==m?void 0:m.setAttribute(e,t))),g=!0),m.addEventListener("error",(e=>o(e))),m.addEventListener("abort",(e=>o(e))),m.addEventListener("load",(()=>{m.setAttribute("data-loaded","true"),t(m),f(m)})),g&&(m=p.head.appendChild(m)),n||f(m)})))(n)),f),m=()=>{if(!p)return;f=null,h.value&&(h.value=null);const t=p.querySelector(`script[src="${Wi(e)}"]`);t&&p.head.removeChild(t)};return r&&!o&&nl(g),o||function(e,t){Ji()&&_r(e,t)}(m),{scriptTag:h,load:g,unload:m}}let gl=0;const ml=(e,t="",n="",r="")=>`${t?`${t}/`:""}${n}${e}${r?`.${r}`:""}`,vl=e=>Promise.all(e.map((e=>J(e)?(e=>{const t=dl("WALINE_EMOJI",{}),n=(e=>!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(e))(e);if(n){const n=t.value[e];if(n)return Promise.resolve(n)}return fetch(`${e}/info.json`).then((e=>e.json())).then((r=>{const o={folder:e,...r};return n&&(t.value[e]=o),o}))})(G(e)):Promise.resolve(e)))).then((e=>{const t={tabs:[],map:{}};return e.forEach((e=>{const{name:n,folder:r,icon:o,prefix:i="",type:l,items:s}=e;t.tabs.push({name:n,icon:ml(o,r,i,l),items:s.map((e=>{const n=`${i}${e}`;return t.map[n]=ml(e,r,i,l),n}))})})),t})),yl=e=>{"AbortError"!==e.name&&console.error(e.message)},wl=e=>e instanceof HTMLElement?e:J(e)?document.querySelector(e):null,bl=e=>e.type.includes("image"),kl=e=>{const t=Array.from(e).find(bl);return t?t.getAsFile():null};function xl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _l={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Cl(e){_l=e}const Sl=/[&<>"']/,$l=new RegExp(Sl.source,"g"),Rl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ll=new RegExp(Rl.source,"g"),Il={"&":"&","<":"<",">":">",'"':""","'":"'"},El=e=>Il[e];function Al(e,t){if(t){if(Sl.test(e))return e.replace($l,El)}else if(Rl.test(e))return e.replace(Ll,El);return e}const Tl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const zl=/(^|[^\[])\^/g;function jl(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(zl,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function Ol(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Ml={exec:()=>null};function Pl(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Ul(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Ul(e,"#");(this.options.pedantic||!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=Ul(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let l="",s="",a=!1;for(;e;){let n=!1;if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,s=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,s=r.slice(u),u+=t[1].length);let p=!1;if(!r&&/^ *$/.test(c)&&(l+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const a=e.split("\n",1)[0];if(c=a,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(c)||i.test(c)||t.test(c)||n.test(e))break;if(c.search(/[^ ]/)>=u||!c.trim())s+="\n"+c.slice(u);else{if(p||r.search(/[^ ]/)>=4||o.test(r)||i.test(r)||n.test(r))break;s+="\n"+c}!p&&!c.trim()&&(p=!0),l+=a+"\n",e=e.substring(a.length+1),r=c.slice(u)}}o.loose||(a?o.loose=!0:/\n *\n *$/.test(l)&&(a=!0));let d,h=null;this.options.gfm&&(h=/^\[[ xX]\] /.exec(s),h&&(d="[ ] "!==h[0],s=s.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:l,task:!!h,checked:d,loose:!1,text:s,tokens:[]}),o.raw+=l}o.items[o.items.length-1].raw=l.trimEnd(),o.items[o.items.length-1].text=s.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=Pl(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(const e of n)i.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)i.rows.push(Pl(e,i.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Al(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Ul(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),Nl(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Nl(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let o,i,l=n,s=0;const a="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=a.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){l+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+s);const t=[...r[0]][0].length,a=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Al(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Al(t[1]),n="mailto:"+e):(e=Al(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=Al(n[0]),r="mailto:"+e;else{let o;do{o=n[0],n[0]=(null==(t=this.rules.inline._backpedal.exec(n[0]))?void 0:t[0])??""}while(o!==n[0]);e=Al(n[0]),r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Al(t[0]),{type:"text",raw:t[0],text:e}}}}const Vl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Dl=/(?:[*+-]|\d{1,9}[.)])/,Hl=jl(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Dl).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Bl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ql=jl(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gl=jl(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dl).getRegex(),Zl="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/|$))/,Ql=jl("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Kl).replace("tag",Zl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xl=jl(Bl).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Zl).getRegex(),Jl={blockquote:jl(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xl).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ql,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Vl,html:Ql,lheading:Hl,list:Gl,newline:/^(?: *(?:\n|$))+/,paragraph:Xl,table:Ml,text:/^[^\n]+/},Yl=jl("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Zl).getRegex(),es={...Jl,table:Yl,paragraph:jl(Bl).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Yl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Zl).getRegex()},ts={...Jl,html:jl("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ml,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:jl(Bl).replace("hr",Vl).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Hl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ns=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rs=/^( {2,}|\\)\n(?!\s*$)/,os="\\p{P}\\p{S}",is=jl(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,os).getRegex(),ls=jl(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,os).getRegex(),ss=jl("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,os).getRegex(),as=jl("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,os).getRegex(),cs=jl(/\\([punct])/,"gu").replace(/punct/g,os).getRegex(),us=jl(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ps=jl(Kl).replace("(?:--\x3e|$)","--\x3e").getRegex(),ds=jl("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ps).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,fs=jl(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",hs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gs=jl(/^!?\[(label)\]\[(ref)\]/).replace("label",hs).replace("ref",Wl).getRegex(),ms=jl(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),vs={_backpedal:Ml,anyPunctuation:cs,autolink:us,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:rs,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Ml,emStrongLDelim:ls,emStrongRDelimAst:ss,emStrongRDelimUnd:as,escape:ns,link:fs,nolink:ms,punctuation:is,reflink:gs,reflinkSearch:jl("reflink|nolink(?!\\()","g").replace("reflink",gs).replace("nolink",ms).getRegex(),tag:ds,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,i,l,s,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,i.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(s=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,s)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),l=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class Cs{options;constructor(e){this.options=e||_l}code(e,t,n){var r;const o=null==(r=(t||"").match(/^\S*/))?void 0:r[0];return e=e.replace(/\n$/,"")+"\n",o?'
    '+(n?e:Al(e,!0))+"
    \n":"
    "+(n?e:Al(e,!0))+"
    \n"}blockquote(e){return`
    \n${e}
    \n`}html(e,t){return e}heading(e,t,n){return`${e}\n`}hr(){return"
    \n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e,t,n){return`
  • ${e}
  • \n`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){const r=Ol(e);if(null===r)return n;let o='
    ",o}image(e,t,n){const r=Ol(e);if(null===r)return n;let o=`${n}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")));continue}case"code":{const e=o;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=o;let t="",r="";for(let t=0;t0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(n.tokens,i),l+=this.renderer.listitem(s,o,!!r)}n+=this.renderer.list(l,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let i=o,l=i.tokens?this.parseInline(i.tokens):i.text;for(;r+1{const r=e[n].flat(1/0);o=o.concat(this.walkTokens(r,t))})):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Cs(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Fl(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Rs;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],i=t[r];Rs.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const n=o.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _s.lex(e,t??this.defaults)}parser(e,t){return $s.parse(e,t??this.defaults)}}t=new WeakSet,n=function(e,t){return(n,i)=>{const l={...i},s={...this.defaults,...l};!0===this.defaults.async&&!1===l.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const a=_i(this,r,o).call(this,!!s.silent,!!s.async);if(typeof n>"u"||null===n)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return a(e)}}},r=new WeakSet,o=function(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+Al(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}};const Is=new Ls;function Es(e,t){return Is.parse(e,t)}function As(e){return(e||"").match(/\S*/)[0]}function Ts(e){return t=>{"string"==typeof t&&t!==e.text&&(e.escaped=!0,e.text=t)}}Es.options=Es.setOptions=function(e){return Is.setOptions(e),Es.defaults=Is.defaults,Cl(Es.defaults),Es},Es.getDefaults=xl,Es.defaults=_l,Es.use=function(...e){return Is.use(...e),Es.defaults=Is.defaults,Cl(Es.defaults),Es},Es.walkTokens=function(e,t){return Is.walkTokens(e,t)},Es.parseInline=Is.parseInline,Es.Parser=$s,Es.parser=$s.parse,Es.Renderer=Cs,Es.TextRenderer=Ss,Es.Lexer=_s,Es.lexer=_s.lex,Es.Tokenizer=Fl,Es.Hooks=Rs,Es.parse=Es;const zs=/[&<>"']/,js=new RegExp(zs.source,"g"),Os=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ms=new RegExp(Os.source,"g"),Ps={"&":"&","<":"<",">":">",'"':""","'":"'"},Us=e=>Ps[e];function Ns(e,t){if(t){if(zs.test(e))return e.replace(js,Us)}else if(Os.test(e))return e.replace(Ms,Us);return e}const Fs=/\$.*?\$/,Vs=/^\$(.*?)\$/,Ds=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,Hs=(e="",t={})=>e.replace(/:(.+?):/g,((e,n)=>t[n]?`${n}`:e)),Bs=(e,{emojiMap:t,highlighter:n,texRenderer:r})=>{const o=new Ls;if(o.setOptions({breaks:!0}),n&&o.use(function(e){if("function"==typeof e&&(e={highlight:e}),!e||"function"!=typeof e.highlight)throw new Error("Must provide highlight function");return"string"!=typeof e.langPrefix&&(e.langPrefix="language-"),{async:!!e.async,walkTokens(t){if("code"!==t.type)return;const n=As(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||"")).then(Ts(t));const r=e.highlight(t.text,n,t.lang||"");if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Ts(t)(r)},renderer:{code(t,n,r){const o=As(n),i=o?` class="${e.langPrefix}${Ns(o)}"`:"";return t=t.replace(/\n$/,""),`
    ${r?t:Ns(t,!0)}\n
    `}}}}({highlight:n})),r){const e=(e=>[{name:"blockMath",level:"block",tokenizer(t){const n=Ds.exec(t);if(null!==n)return{type:"html",raw:n[0],text:e(!0,n[1])}}},{name:"inlineMath",level:"inline",start(e){const t=e.search(Fs);return-1!==t?t:e.length},tokenizer(t){const n=Vs.exec(t);if(null!==n)return{type:"html",raw:n[0],text:e(!1,n[1])}}}])(r);o.use({extensions:e})}return o.parse(Hs(e,t))},Ws=e=>{const{path:t}=e.dataset;return null!=t&&t.length?t:null},qs=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:r=navigator.language})=>{const o=new AbortController,i=document.querySelectorAll(n);return i.length&&f({serverURL:K(e),paths:Array.from(i).map((e=>q(Ws(e)??t))),lang:r,signal:o.signal}).then((e=>{i.forEach(((t,n)=>{t.innerText=e[n].toString()}))})).catch(yl),o.abort.bind(o)},Gs=({size:e})=>ti("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:e,height:e},[ti("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"}),ti("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"})]),Zs=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),Ks=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),Qs=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ti("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"}),ti("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"})]),Xs=({active:e=!1})=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ti("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"+(e?"":"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:e?"red":"currentColor"})]),Js=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[ti("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"}),ti("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"})]),Ys=()=>ti("svg",{width:"16",height:"16",ariaHidden:"true"},ti("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"})),ea=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),ta=()=>ti("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},ti("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"})),na=()=>ti("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},ti("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"})),ra=({size:e=100})=>ti("svg",{width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},ti("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},ti("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),oa=()=>ti("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[ti("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"}),ti("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"})]);let ia=null;const la=()=>ia??(ia=dl("WALINE_LIKE",[]));let sa=null;var aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ca={},ua={},pa={},da=aa&&aa.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function l(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(l,s)}a((r=r.apply(e,t||[])).next())}))},ha=aa&&aa.__generator||function(e,t){var n,r,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,r=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"u")return Promise.reject(new Error("This is a library for the browser!"));if(e.getLoadingState()===ga.LOADED)return e.instance.getSiteKey()===t?Promise.resolve(e.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(e.getLoadingState()===ga.LOADING)return t!==e.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise((function(t,n){e.successfulLoadingConsumers.push((function(e){return t(e)})),e.errorLoadingRunnable.push((function(e){return n(e)}))}));e.instanceSiteKey=t,e.setLoadingState(ga.LOADING);var r=new e;return new Promise((function(o,i){r.loadScript(t,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then((function(){e.setLoadingState(ga.LOADED);var i=r.doExplicitRender(grecaptcha,t,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),l=new va.ReCaptchaInstance(t,i,grecaptcha);e.successfulLoadingConsumers.forEach((function(e){return e(l)})),e.successfulLoadingConsumers=[],n.autoHideBadge&&l.hideBadge(),e.instance=l,o(l)})).catch((function(t){e.errorLoadingRunnable.forEach((function(e){return e(t)})),e.errorLoadingRunnable=[],i(t)}))}))},e.getInstance=function(){return e.instance},e.setLoadingState=function(t){e.loadingState=t},e.getLoadingState=function(){return null===e.loadingState?ga.NOT_LOADED:e.loadingState},e.prototype.loadScript=function(t,n,r,o,i){var l=this;void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o={}),void 0===i&&(i="");var s=document.createElement("script");s.setAttribute("recaptcha-v3-script","");var a="https://www.google.com/recaptcha/api.js";n&&(a=r?"https://recaptcha.net/recaptcha/enterprise.js":"https://recaptcha.net/recaptcha/api.js"),r&&(a="https://www.google.com/recaptcha/enterprise.js"),i&&(a=i),o.render&&(o.render=void 0);var c=this.buildQueryString(o);return s.src=a+"?render=explicit"+c,new Promise((function(t,n){s.addEventListener("load",l.waitForScriptToLoad((function(){t(s)}),r),!1),s.onerror=function(t){e.setLoadingState(ga.NOT_LOADED),n(t)},document.head.appendChild(s)}))},e.prototype.buildQueryString=function(e){return Object.keys(e).length<1?"":"&"+Object.keys(e).filter((function(t){return!!e[t]})).map((function(t){return t+"="+e[t]})).join("&")},e.prototype.waitForScriptToLoad=function(t,n){var r=this;return function(){void 0===window.grecaptcha?setTimeout((function(){r.waitForScriptToLoad(t,n)}),e.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready((function(){t()})):window.grecaptcha.ready((function(){t()}))}},e.prototype.doExplicitRender=function(e,t,n,r){var o={sitekey:t,badge:n.badge,size:n.size,tabindex:n.tabindex};return n.container?r?e.enterprise.render(n.container,o):e.render(n.container,o):r?e.enterprise.render(o):e.render(o)},e.loadingState=null,e.instance=null,e.instanceSiteKey=null,e.successfulLoadingConsumers=[],e.errorLoadingRunnable=[],e.SCRIPT_LOAD_DELAY=25,e}();ua.load=ya.load,ua.getInstance=ya.getInstance,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReCaptchaInstance=e.getInstance=e.load=void 0;var t=ua;Object.defineProperty(e,"load",{enumerable:!0,get:function(){return t.load}}),Object.defineProperty(e,"getInstance",{enumerable:!0,get:function(){return t.getInstance}});var n=pa;Object.defineProperty(e,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})}(ca);const wa={};let ba=null;const ka=()=>ba??(ba=dl("WALINE_USER",{}));var xa=mr({__name:"ArticleReaction",setup(e,{expose:t}){t();const n=sa??(sa=dl("WALINE_REACTION",{})),r=Vr("config"),o=bn(-1),i=bn([]),l=ei((()=>r.value.locale)),s=ei((()=>r.value.reaction.length>0)),u=ei((()=>{const{reaction:e,path:t}=r.value;return e.map(((e,r)=>({icon:e,desc:l.value[`reaction${r}`],active:n.value[t]===r})))}));let p;const d=async()=>{if(!s.value)return;const{serverURL:e,lang:t,path:n,reaction:o}=r.value,l=new AbortController;p=l.abort.bind(l);const c=await a({serverURL:e,lang:t,paths:[n],type:o.map(((e,t)=>`reaction${t}`)),signal:l.signal});i.value=o.map(((e,t)=>c[0][`reaction${t}`]))};br((()=>{pr((()=>[r.value.serverURL,r.value.path]),(()=>{d()}),{immediate:!0})})),_r((()=>null==p?void 0:p()));const h={reactionStorage:n,config:r,votingIndex:o,voteNumbers:i,locale:l,isReactionEnabled:s,reactionsInfo:u,get abort(){return p},set abort(e){p=e},fetchReaction:d,vote:async e=>{if(-1===o.value){const{serverURL:t,lang:l,path:s}=r.value,a=n.value[s];o.value=e,void 0!==a&&(await c({serverURL:t,lang:l,path:s,type:`reaction${a}`,action:"desc"}),i.value[a]=Math.max(i.value[a]-1,0)),a!==e&&(await c({serverURL:t,lang:l,path:s,type:`reaction${e}`}),i.value[e]=(i.value[e]||0)+1),a===e?delete n.value[s]:n.value[s]=e,o.value=-1}},get LoadingIcon(){return ra}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),_a=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n};const Ca={key:0,class:"wl-reaction"},Sa=["textContent"],$a={class:"wl-reaction-list"},Ra=["onClick"],La={class:"wl-reaction-img"},Ia=["src","alt"],Ea=["textContent"],Aa=["textContent"];var Ta=_a(xa,[["render",function(e,t,n,r,o,i){return r.reactionsInfo.length?(bo(),Co("div",Ca,[Eo("div",{class:"wl-reaction-title",textContent:Ye(r.locale.reactionTitle)},null,8,Sa),Eo("ul",$a,[(bo(!0),Co(fo,null,Cr(r.reactionsInfo,(({active:e,icon:t,desc:n},o)=>(bo(),Co("li",{key:o,class:Ze(["wl-reaction-item",{active:e}]),onClick:e=>r.vote(o)},[Eo("div",La,[Eo("img",{src:t,alt:n},null,8,Ia),r.votingIndex===o?(bo(),So(r.LoadingIcon,{key:0,class:"wl-reaction-loading"})):(bo(),Co("div",{key:1,class:"wl-reaction-votes",textContent:Ye(r.voteNumbers[o]||0)},null,8,Ea))]),Eo("div",{class:"wl-reaction-text",textContent:Ye(n)},null,8,Aa)],10,Ra)))),128))])])):jo("v-if",!0)}],["__file","ArticleReaction.vue"]]),za=new Map;function ja(e){var t=za.get(e);t&&t.destroy()}function Oa(e){var t=za.get(e);t&&t.update()}var Ma=null;typeof window>"u"?((Ma=function(e){return e}).destroy=function(e){return e},Ma.update=function(e){return e}):((Ma=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!za.has(e)){var t,n=null,r=window.getComputedStyle(e),o=(t=e.value,function(){l({testForHeightReduction:""===t||!e.value.startsWith(t),restoreTextAlign:null}),t=e.value}),i=function(t){e.removeEventListener("autosize:destroy",i),e.removeEventListener("autosize:update",s),e.removeEventListener("input",o),window.removeEventListener("resize",s),Object.keys(t).forEach((function(n){return e.style[n]=t[n]})),za.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",i),e.addEventListener("autosize:update",s),e.addEventListener("input",o),window.addEventListener("resize",s),e.style.overflowX="hidden",e.style.wordWrap="break-word",za.set(e,{destroy:i,update:s}),s()}function l(t){var o,i,s=t.restoreTextAlign,a=void 0===s?null:s,c=t.testForHeightReduction,u=void 0===c||c,p=r.overflowY;if(0!==e.scrollHeight&&("vertical"===r.resize?e.style.resize="none":"both"===r.resize&&(e.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],n=e[1];t.style.scrollBehavior="auto",t.scrollTop=n,t.style.scrollBehavior=null}))}}(e),e.style.height=""),i="content-box"===r.boxSizing?e.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):e.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&i>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(e.style.overflow="scroll"),i=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(e.style.overflow="hidden"),e.style.height=i+"px",a&&(e.style.textAlign=a),o&&o(),n!==i&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),n=i),p!==r.overflow&&!a)){var d=r.textAlign;"hidden"===r.overflow&&(e.style.textAlign="start"===d?"end":"start"),l({restoreTextAlign:d,testForHeightReduction:!0})}}function s(){l({testForHeightReduction:!0,restoreTextAlign:null})}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],ja),e},Ma.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],Oa),e});var Pa=Ma,Ua=mr({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(e,{expose:t}){const n=e;t();let r=null;const o=bn(null),i=bn({}),l=bn([]),s=()=>{const e=Math.floor((o.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return e>0?e:1},a=e=>new Array(e).fill(null).map((()=>[])),c=async e=>{var t;if(e>=n.items.length)return;await Nn();const r=Array.from((null==(t=o.value)?void 0:t.children)??[]).reduce(((e,t)=>t.getBoundingClientRect().height{if(l.value.length===s()&&!e)return;l.value=a(s());const t=window.scrollY;await c(0),window.scrollTo({top:t})};br((()=>{u(!0),r=new ResizeObserver((()=>{u()})),r.observe(o.value),pr((()=>[n.items]),(()=>{i.value={},u(!0)})),pr((()=>[n.columnWidth,n.gap]),(()=>{u()}))})),kr((()=>r.unobserve(o.value)));const p={props:n,get resizeObserver(){return r},set resizeObserver(e){r=e},wall:o,state:i,columns:l,getColumnCount:s,createColumns:a,fillColumns:c,redraw:u,imageLoad:e=>{i.value[e.target.src]=!0},get LoadingIcon(){return ra}};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}});const Na=["data-index"],Fa=["src","title","onClick"];var Va=_a(Ua,[["render",function(e,t,n,r,o,i){return bo(),Co("div",{ref:"wall",class:"wl-gallery",style:He({gap:`${n.gap}px`})},[(bo(!0),Co(fo,null,Cr(r.columns,((t,o)=>(bo(),Co("div",{key:o,class:"wl-gallery-column","data-index":o,style:He({gap:`${n.gap}px`})},[(bo(!0),Co(fo,null,Cr(t,(t=>(bo(),Co(fo,{key:t},[r.state[n.items[t].src]?jo("v-if",!0):(bo(),So(r.LoadingIcon,{key:0,size:36,style:{margin:"20px auto"}})),Eo("img",{class:"wl-gallery-item",src:n.items[t].src,title:n.items[t].title,loading:"lazy",onLoad:r.imageLoad,onClick:r=>e.$emit("insert",`![](${n.items[t].src})`)},null,40,Fa)],64)))),128))],12,Na)))),128))],4)}],["__file","ImageWall.vue"]]),Da=mr({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(e,{expose:t,emit:n}){t();const r=e,o=n,i=Vr("config"),l=dl("WALINE_COMMENT_BOX_EDITOR",""),s=dl("WALINE_USER_META",{nick:"",mail:"",link:""}),a=ka(),c=bn({}),u=bn(null),d=bn(null),f=bn(null),m=bn(null),v=bn(null),y=bn(null),w=bn(null),b=bn({tabs:[],map:{}}),k=bn(0),x=bn(!1),_=bn(!1),C=bn(!1),S=bn(""),$=bn(0),R=ln({loading:!0,list:[]}),L=bn(0),I=bn(!1),E=bn(""),A=bn(!1),T=bn(!1),z=ei((()=>i.value.locale)),j=ei((()=>{var e;return!(null==(e=a.value)||!e.token)})),O=ei((()=>!1!==i.value.imageUploader)),M=e=>{const t=u.value,n=t.selectionStart,r=t.selectionEnd||0,o=t.scrollTop;l.value=t.value.substring(0,n)+e+t.value.substring(r,t.value.length),t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,t.scrollTop=o},P=e=>{const t=`![${i.value.locale.uploading} ${e.name}]()`;return M(t),A.value=!0,Promise.resolve().then((()=>i.value.imageUploader(e))).then((n=>{l.value=l.value.replace(t,`\r\n![${e.name}](${n})`)})).catch((e=>{alert(e.message),l.value=l.value.replace(t,"")})).then((()=>{A.value=!1}))},U=async()=>{var e,t,n,d,f,g;const{serverURL:m,lang:v,login:y,wordLimit:w,requiredMeta:k,recaptchaV3Key:x,turnstileKey:_}=i.value,C=await(async()=>{if(!navigator)return"";const{userAgentData:e}=navigator;let t=navigator.userAgent;if(!e||"Windows"!==e.platform)return t;const{platformVersion:n}=await e.getHighEntropyValues(["platformVersion"]);return n&&parseInt(n.split(".")[0])>=13&&(t=t.replace("Windows NT 10.0","Windows NT 11.0")),t})(),R={comment:E.value,nick:s.value.nick,mail:s.value.mail,link:s.value.link,url:i.value.path,ua:C};if(!r.edit)if(null!=(e=a.value)&&e.token)R.nick=a.value.display_name,R.mail=a.value.email,R.link=a.value.url;else{if("force"===y)return;if(k.indexOf("nick")>-1&&!R.nick)return null==(t=c.value.nick)||t.focus(),alert(z.value.nickError);if(k.indexOf("mail")>-1&&!R.mail||R.mail&&!(e=>ne.test(e))(R.mail))return null==(n=c.value.mail)||n.focus(),alert(z.value.mailError);R.nick||(R.nick=z.value.anonymous)}if(R.comment){if(!I.value)return alert(z.value.wordHint.replace("$0",w[0].toString()).replace("$1",w[1].toString()).replace("$2",$.value.toString()));R.comment=Hs(R.comment,b.value.map),r.replyId&&r.rootId&&(R.pid=r.replyId,R.rid=r.rootId,R.at=r.replyUser),A.value=!0;try{x&&(R.recaptchaV3=await(e=>{const t=wa[e]??(wa[e]=ca.load(e,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:e=>t.then((t=>t.execute(e)))}})(x).execute("social")),_&&(R.turnstile=await(e=>({execute:async t=>{const{load:n}=fl("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1});await n();const r=null==window?void 0:window.turnstile;return new Promise((n=>{null==r||r.ready((()=>{null==r||r.render(".wl-captcha-container",{sitekey:e,action:t,size:"compact",callback:n})}))}))}}))(_).execute("social"));const e={serverURL:m,lang:v,token:null==(f=a.value)?void 0:f.token,comment:R},t=await(r.edit?h({objectId:r.edit.objectId,...e}):p(e));if(A.value=!1,t.errmsg)return alert(t.errmsg);o("submit",t.data),l.value="",S.value="",await Nn(),r.replyId&&o("cancelReply"),null!=(g=r.edit)&&g.objectId&&o("cancelEdit")}catch(e){A.value=!1,alert(e.message)}}else null==(d=u.value)||d.focus()},N=e=>{var t,n,r,o;null!=(t=f.value)&&t.contains(e.target)||null!=(n=m.value)&&n.contains(e.target)||(x.value=!1),null!=(r=v.value)&&r.contains(e.target)||null!=(o=y.value)&&o.contains(e.target)||(_.value=!1)},F=async e=>{var t;const{scrollTop:n,clientHeight:r,scrollHeight:o}=e.target,l=(r+n)/o,s=i.value.search,a=(null==(t=w.value)?void 0:t.value)??"";l<.9||R.loading||T.value||(R.loading=!0,(s.more&&R.list.length?await s.more(a,R.list.length):await s.search(a)).length?R.list=[...R.list,...s.more&&R.list.length?await s.more(a,R.list.length):await s.search(a)]:T.value=!0,R.loading=!1,setTimeout((()=>{e.target.scrollTop=n}),50))},V=Yi((e=>{R.list=[],T.value=!1,F(e)}),300);pr([i,$],(([e,t])=>{const{wordLimit:n}=e;n?tn[1]?(L.value=n[1],I.value=!1):(L.value=n[1],I.value=!0):(L.value=0,I.value=!0)}),{immediate:!0}),ll("click",N),ll("message",(({data:e})=>{!e||"profile"!==e.type||(a.value={...a.value,...e.data},[localStorage,sessionStorage].filter((e=>e.getItem("WALINE_USER"))).forEach((e=>e.setItem("WALINE_USER",JSON.stringify(a)))))})),pr(_,(async e=>{var t;if(!e)return;const n=i.value.search;w.value&&(w.value.value=""),R.loading=!0,R.list=await((null==(t=n.default)?void 0:t.call(n))??n.search("")),R.loading=!1})),br((()=>{var e;null!=(e=r.edit)&&e.objectId&&(l.value=r.edit.orig),pr((()=>l.value),(e=>{const{highlighter:t,texRenderer:n}=i.value;E.value=e,S.value=Bs(e,{emojiMap:b.value.map,highlighter:t,texRenderer:n}),$.value=(e=>{var t,n;return((null==(t=(e=>e.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu))(e))?void 0:t.reduce(((e,t)=>e+(["",",","."].includes(t.trim())?0:t.trim().split(/\s+/u).length)),0))??0)+((null==(n=(e=>e.match(/[\u4E00-\u9FD5]/gu))(e))?void 0:n.length)??0)})(e),e?Pa(u.value):Pa.destroy(u.value)}),{immediate:!0}),pr((()=>i.value.emoji),(e=>vl(e).then((e=>{b.value=e}))),{immediate:!0})}));const D={props:r,emit:o,config:i,editor:l,userMeta:s,userInfo:a,inputRefs:c,editorRef:u,imageUploadRef:d,emojiButtonRef:f,emojiPopupRef:m,gifButtonRef:v,gifPopupRef:y,gifSearchInputRef:w,emoji:b,emojiTabIndex:k,showEmoji:x,showGif:_,showPreview:C,previewText:S,wordNumber:$,searchResults:R,wordLimit:L,isWordNumberLegal:I,content:E,isSubmitting:A,isImageListEnd:T,locale:z,isLogin:j,canUploadImage:O,insert:M,onKeyDown:e=>{const t=e.key;(e.ctrlKey||e.metaKey)&&"Enter"===t&&U()},uploadImage:P,onDrop:e=>{var t;if(null!=(t=e.dataTransfer)&&t.items){const t=kl(e.dataTransfer.items);t&&O.value&&(P(t),e.preventDefault())}},onPaste:e=>{if(e.clipboardData){const t=kl(e.clipboardData.items);t&&O.value&&P(t)}},onChange:()=>{const e=d.value;e.files&&O.value&&P(e.files[0]).then((()=>{e.value=""}))},submitComment:U,onLogin:e=>{e.preventDefault();const{lang:t,serverURL:n}=i.value;g({serverURL:n,lang:t}).then((e=>{a.value=e,(e.remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(e)),o("log")}))},onLogout:()=>{a.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),o("log")},onProfile:e=>{e.preventDefault();const{lang:t,serverURL:n}=i.value,r=(window.innerWidth-800)/2,o=(window.innerHeight-800)/2,l=new URLSearchParams({lng:t,token:a.value.token}),s=window.open(`${n}/ui/profile?${l.toString()}`,"_blank",`width=800,height=800,left=${r},top=${o},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);null==s||s.postMessage({type:"TOKEN",data:a.value.token},"*")},popupHandler:N,onImageWallScroll:F,onGifSearch:V,get CloseIcon(){return Gs},get EmojiIcon(){return Ks},get GifIcon(){return oa},get ImageIcon(){return Qs},get LoadingIcon(){return ra},get MarkdownIcon(){return Ys},get PreviewIcon(){return Js},ImageWall:Va};return Object.defineProperty(D,"__isScriptSetup",{enumerable:!1,value:!0}),D}});const Ha={key:0,class:"wl-login-info"},Ba={class:"wl-avatar"},Wa=["title"],qa=["title"],Ga=["src"],Za=["title","textContent"],Ka={class:"wl-panel"},Qa=["for","textContent"],Xa=["id","onUpdate:modelValue","name","type"],Ja=["placeholder"],Ya={class:"wl-preview"},ec=Eo("hr",null,null,-1),tc=["innerHTML"],nc={class:"wl-footer"},rc={class:"wl-actions"},oc={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},ic=["title"],lc=["title"],sc=["title"],ac=["title"],cc={class:"wl-info"},uc=Eo("div",{class:"wl-captcha-container"},null,-1),pc={class:"wl-text-number"},dc={key:0},hc=["textContent"],fc=["textContent"],gc=["disabled"],mc=["placeholder"],vc={key:1,class:"wl-loading"},yc={key:0,class:"wl-tab-wrapper"},wc=["title","onClick"],bc=["src","alt"],kc={key:0,class:"wl-tabs"},xc=["onClick"],_c=["src","alt","title"],Cc=["title"];var Sc=_a(Da,[["render",function(e,t,n,r,o,i){var l,s;return bo(),Co("div",{key:r.userInfo.token,class:"wl-comment"},["disable"===r.config.login||!r.isLogin||null!=(l=n.edit)&&l.objectId?jo("v-if",!0):(bo(),Co("div",Ha,[Eo("div",Ba,[Eo("button",{type:"submit",class:"wl-logout-btn",title:r.locale.logout,onClick:r.onLogout},[Ao(r.CloseIcon,{size:14})],8,Wa),Eo("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile},[Eo("img",{src:r.userInfo.avatar,alt:"avatar"},null,8,Ga)],8,qa)]),Eo("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile,textContent:Ye(r.userInfo.display_name)},null,8,Za)])),Eo("div",Ka,["force"!==r.config.login&&r.config.meta.length&&!r.isLogin?(bo(),Co("div",{key:0,class:Ze(["wl-header",`item${r.config.meta.length}`])},[(bo(!0),Co(fo,null,Cr(r.config.meta,(e=>(bo(),Co("div",{key:e,class:"wl-header-item"},[Eo("label",{for:`wl-${e}`,textContent:Ye(r.locale[e]+(r.config.requiredMeta.includes(e)||!r.config.requiredMeta.length?"":`(${r.locale.optional})`))},null,8,Qa),fr(Eo("input",{id:`wl-${e}`,ref_for:!0,ref:t=>{t&&(r.inputRefs[e]=t)},"onUpdate:modelValue":t=>r.userMeta[e]=t,class:Ze(["wl-input",`wl-${e}`]),name:e,type:"mail"===e?"email":"text"},null,10,Xa),[[Ni,r.userMeta[e]]])])))),128))],2)):jo("v-if",!0),fr(Eo("textarea",{id:"wl-edit",ref:"editorRef","onUpdate:modelValue":t[0]||(t[0]=e=>r.editor=e),class:"wl-editor",placeholder:n.replyUser?`@${n.replyUser}`:r.locale.placeholder,onKeydown:r.onKeyDown,onDrop:r.onDrop,onPaste:r.onPaste},null,40,Ja),[[Ai,r.editor]]),fr(Eo("div",Ya,[ec,Eo("h4",null,Ye(r.locale.preview)+":",1),Eo("div",{class:"wl-content",innerHTML:r.previewText},null,8,tc)],512),[[ci,r.showPreview]]),Eo("div",nc,[Eo("div",rc,[Eo("a",oc,[Ao(r.MarkdownIcon)]),fr(Eo("button",{ref:"emojiButtonRef",type:"button",class:Ze(["wl-action",{active:r.showEmoji}]),title:r.locale.emoji,onClick:t[1]||(t[1]=e=>r.showEmoji=!r.showEmoji)},[Ao(r.EmojiIcon)],10,ic),[[ci,r.emoji.tabs.length]]),r.config.search?(bo(),Co("button",{key:0,ref:"gifButtonRef",type:"button",class:Ze(["wl-action",{active:r.showGif}]),title:r.locale.gif,onClick:t[2]||(t[2]=e=>r.showGif=!r.showGif)},[Ao(r.GifIcon)],10,lc)):jo("v-if",!0),Eo("input",{id:"wl-image-upload",ref:"imageUploadRef",class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:r.onChange},null,544),r.canUploadImage?(bo(),Co("label",{key:1,for:"wl-image-upload",class:"wl-action",title:r.locale.uploadImage},[Ao(r.ImageIcon)],8,sc)):jo("v-if",!0),Eo("button",{type:"button",class:Ze(["wl-action",{active:r.showPreview}]),title:r.locale.preview,onClick:t[3]||(t[3]=e=>r.showPreview=!r.showPreview)},[Ao(r.PreviewIcon)],10,ac)]),Eo("div",cc,[uc,Eo("div",pc,[zo(Ye(r.wordNumber)+" ",1),r.config.wordLimit?(bo(),Co("span",dc,[zo("  /  "),Eo("span",{class:Ze({illegal:!r.isWordNumberLegal}),textContent:Ye(r.wordLimit)},null,10,hc)])):jo("v-if",!0),zo("  "+Ye(r.locale.word),1)]),"disable"===r.config.login||r.isLogin?jo("v-if",!0):(bo(),Co("button",{key:0,type:"button",class:"wl-btn",onClick:r.onLogin,textContent:Ye(r.locale.login)},null,8,fc)),"force"!==r.config.login||r.isLogin?(bo(),Co("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:r.isSubmitting,onClick:r.submitComment},[r.isSubmitting?(bo(),So(r.LoadingIcon,{key:0,size:16})):(bo(),Co(fo,{key:1},[zo(Ye(r.locale.submit),1)],64))],8,gc)):jo("v-if",!0)]),Eo("div",{ref:"gifPopupRef",class:Ze(["wl-gif-popup",{display:r.showGif}])},[Eo("input",{ref:"gifSearchInputRef",type:"text",placeholder:r.locale.gifSearchPlaceholder,onInput:t[4]||(t[4]=(...e)=>r.onGifSearch&&r.onGifSearch(...e))},null,40,mc),r.searchResults.list.length?(bo(),So(r.ImageWall,{key:0,items:r.searchResults.list,"column-width":200,gap:6,onInsert:t[5]||(t[5]=e=>r.insert(e)),onScroll:r.onImageWallScroll},null,8,["items"])):jo("v-if",!0),r.searchResults.loading?(bo(),Co("div",vc,[Ao(r.LoadingIcon,{size:30})])):jo("v-if",!0)],2),Eo("div",{ref:"emojiPopupRef",class:Ze(["wl-emoji-popup",{display:r.showEmoji}])},[(bo(!0),Co(fo,null,Cr(r.emoji.tabs,((e,t)=>(bo(),Co(fo,{key:e.name},[t===r.emojiTabIndex?(bo(),Co("div",yc,[(bo(!0),Co(fo,null,Cr(e.items,(e=>(bo(),Co("button",{key:e,type:"button",title:e,onClick:t=>r.insert(`:${e}:`)},[r.showEmoji?(bo(),Co("img",{key:0,class:"wl-emoji",src:r.emoji.map[e],alt:e,loading:"lazy",referrerPolicy:"no-referrer"},null,8,bc)):jo("v-if",!0)],8,wc)))),128))])):jo("v-if",!0)],64)))),128)),r.emoji.tabs.length>1?(bo(),Co("div",kc,[(bo(!0),Co(fo,null,Cr(r.emoji.tabs,((e,t)=>(bo(),Co("button",{key:e.name,type:"button",class:Ze(["wl-tab",{active:r.emojiTabIndex===t}]),onClick:e=>r.emojiTabIndex=t},[Eo("img",{class:"wl-emoji",src:e.icon,alt:e.name,title:e.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,_c)],10,xc)))),128))])):jo("v-if",!0)],2)])]),n.replyId||null!=(s=n.edit)&&s.objectId?(bo(),Co("button",{key:1,type:"button",class:"wl-close",title:r.locale.cancelReply,onClick:t[6]||(t[6]=e=>n.replyId?r.emit("cancelReply"):r.emit("cancelEdit"))},[Ao(r.CloseIcon,{size:24})],8,Cc)):jo("v-if",!0)])}],["__file","CommentBox.vue"]]),$c=mr({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(e,{expose:t,emit:n}){t();const r=e,o=n,i=Vr("config"),l=la(),s=hl(),a=ka(),c=ei((()=>i.value.locale)),u=ei((()=>{const{link:e}=r.comment;return e?Z(e)?e:`https://${e}`:""})),p=ei((()=>l.value.includes(r.comment.objectId))),d=ei((()=>te(new Date(r.comment.time),s.value,c.value))),h=ei((()=>"administrator"===a.value.type)),f=ei((()=>r.comment.user_id&&a.value.objectId===r.comment.user_id)),g=ei((()=>{var e;return r.comment.objectId===(null==(e=r.reply)?void 0:e.objectId)})),m=ei((()=>{var e;return r.comment.objectId===(null==(e=r.edit)?void 0:e.objectId)})),v={props:r,emit:o,commentStatus:["approved","waiting","spam"],config:i,likes:l,now:s,userInfo:a,locale:c,link:u,like:p,time:d,isAdmin:h,isOwner:f,isReplyingCurrent:g,isEditingCurrent:m,CommentBox:Sc,get DeleteIcon(){return Zs},get EditIcon(){return ta},get LikeIcon(){return Xs},get ReplyIcon(){return ea},get VerifiedIcon(){return na}};return Object.defineProperty(v,"__isScriptSetup",{enumerable:!1,value:!0}),v}});const Rc=["id"],Lc={class:"wl-user","aria-hidden":"true","uk-scrollspy":"target: > .wl-user-avatar; cls: uk-animation-fade; delay: 100"},Ic=["src"],Ec={class:"wl-card"},Ac={class:"wl-head"},Tc=["href"],zc={key:1,class:"wl-nick"},jc=["textContent"],Oc=["textContent"],Mc=["textContent"],Pc=["textContent"],Uc=["textContent"],Nc={class:"wl-comment-actions"},Fc=["title"],Vc=["title"],Dc={class:"wl-meta","aria-hidden":"true"},Hc=["data-value","textContent"],Bc={key:0,class:"wl-content"},Wc={key:0},qc=["href"],Gc=Eo("span",null,": ",-1),Zc=["innerHTML"],Kc={key:1,class:"wl-admin-actions"},Qc={class:"wl-comment-status"},Xc=["disabled","onClick","textContent"],Jc={key:3,class:"wl-quote"};var Yc=_a($c,[["render",function(e,t,n,r,o,i){var l;const s=or("CommentCard",!0);return bo(),Co("div",{id:n.comment.objectId,class:"wl-card-item"},[Eo("div",Lc,[n.comment.avatar?(bo(),Co("img",{key:0,class:"wl-user-avatar",src:n.comment.avatar},null,8,Ic)):jo("v-if",!0),n.comment.type?(bo(),So(r.VerifiedIcon,{key:1})):jo("v-if",!0)]),Eo("div",Ec,[Eo("div",Ac,[r.link?(bo(),Co("a",{key:0,class:"wl-nick",href:r.link,target:"_blank",rel:"nofollow noopener noreferrer"},Ye(n.comment.nick),9,Tc)):(bo(),Co("span",zc,Ye(n.comment.nick),1)),"administrator"===n.comment.type?(bo(),Co("span",{key:2,class:"wl-badge",textContent:Ye(r.locale.admin)},null,8,jc)):jo("v-if",!0),n.comment.label?(bo(),Co("span",{key:3,class:"wl-badge",textContent:Ye(n.comment.label)},null,8,Oc)):jo("v-if",!0),n.comment.sticky?(bo(),Co("span",{key:4,class:"wl-badge",textContent:Ye(r.locale.sticky)},null,8,Mc)):jo("v-if",!0),"number"==typeof n.comment.level?(bo(),Co("span",{key:5,class:Ze(`wl-badge level${n.comment.level}`),textContent:Ye(r.locale[`level${n.comment.level}`]||`Level ${n.comment.level}`)},null,10,Pc)):jo("v-if",!0),Eo("span",{class:"wl-time",textContent:Ye(r.time)},null,8,Uc),Eo("div",Nc,[r.isAdmin||r.isOwner?(bo(),Co(fo,{key:0},[Eo("button",{type:"button",class:"wl-edit",onClick:t[0]||(t[0]=e=>r.emit("edit",n.comment))},[Ao(r.EditIcon)]),Eo("button",{type:"button",class:"wl-delete",onClick:t[1]||(t[1]=e=>r.emit("delete",n.comment))},[Ao(r.DeleteIcon)])],64)):jo("v-if",!0),Eo("button",{type:"button",class:"wl-like",title:r.like?r.locale.cancelLike:r.locale.like,onClick:t[2]||(t[2]=e=>r.emit("like",n.comment))},[Ao(r.LikeIcon,{active:r.like},null,8,["active"]),zo(" "+Ye("like"in n.comment?n.comment.like:""),1)],8,Fc),Eo("button",{type:"button",class:Ze(["wl-reply",{active:r.isReplyingCurrent}]),title:r.isReplyingCurrent?r.locale.cancelReply:r.locale.reply,onClick:t[3]||(t[3]=e=>r.emit("reply",r.isReplyingCurrent?null:n.comment))},[Ao(r.ReplyIcon)],10,Vc)])]),Eo("div",Dc,[(bo(),Co(fo,null,Cr(["addr","browser","os"],(e=>(bo(),Co(fo,null,[n.comment[e]?(bo(),Co("span",{key:e,class:Ze(`wl-${e}`),"data-value":n.comment[e],textContent:Ye(n.comment[e])},null,10,Hc)):jo("v-if",!0)],64)))),64))]),r.isEditingCurrent?jo("v-if",!0):(bo(),Co("div",Bc,[n.comment.reply_user?(bo(),Co("p",Wc,[Eo("a",{href:"#"+n.comment.pid},"@"+Ye(n.comment.reply_user.nick),9,qc),Gc])):jo("v-if",!0),Eo("div",{innerHTML:n.comment.comment},null,8,Zc)])),r.isAdmin&&!r.isEditingCurrent?(bo(),Co("div",Kc,[Eo("span",Qc,[(bo(),Co(fo,null,Cr(r.commentStatus,(e=>Eo("button",{key:e,type:"submit",class:Ze(`wl-btn wl-${e}`),disabled:n.comment.status===e,onClick:t=>r.emit("status",{status:e,comment:n.comment}),textContent:Ye(r.locale[e])},null,10,Xc))),64))]),r.isAdmin&&!("rid"in n.comment)?(bo(),Co("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:t[4]||(t[4]=e=>r.emit("sticky",n.comment))},Ye(n.comment.sticky?r.locale.unsticky:r.locale.sticky),1)):jo("v-if",!0)])):jo("v-if",!0),r.isReplyingCurrent||r.isEditingCurrent?(bo(),Co("div",{key:2,class:Ze({"wl-reply-wrapper":r.isReplyingCurrent,"wl-edit-wrapper":r.isEditingCurrent})},[Ao(r.CommentBox,{edit:n.edit,"reply-id":null==(l=n.reply)?void 0:l.objectId,"reply-user":n.comment.nick,"root-id":n.rootId,onLog:t[5]||(t[5]=e=>r.emit("log")),onCancelReply:t[6]||(t[6]=e=>r.emit("reply",null)),onCancelEdit:t[7]||(t[7]=e=>r.emit("edit",null)),onSubmit:t[8]||(t[8]=e=>r.emit("submit",e))},null,8,["edit","reply-id","reply-user","root-id"])],2)):jo("v-if",!0),"children"in n.comment?(bo(),Co("div",Jc,[(bo(!0),Co(fo,null,Cr(n.comment.children,(e=>(bo(),So(s,{key:e.objectId,comment:e,reply:n.reply,edit:n.edit,"root-id":n.rootId,onLog:t[9]||(t[9]=e=>r.emit("log")),onDelete:t[10]||(t[10]=e=>r.emit("delete",e)),onEdit:t[11]||(t[11]=e=>r.emit("edit",e)),onLike:t[12]||(t[12]=e=>r.emit("like",e)),onReply:t[13]||(t[13]=e=>r.emit("reply",e)),onStatus:t[14]||(t[14]=e=>r.emit("status",e)),onSticky:t[15]||(t[15]=e=>r.emit("sticky",e)),onSubmit:t[16]||(t[16]=e=>r.emit("submit",e))},null,8,["comment","reply","edit","root-id"])))),128))])):jo("v-if",!0)])],8,Rc)}],["__file","CommentCard.vue"]]);const eu="3.3.0";var tu=mr({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(e,{expose:t}){t();const n=e,r={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},o=Object.keys(r),i=ka(),l=la(),s=bn("loading"),a=bn(0),c=bn(1),p=bn(0),f=ei((()=>(({serverURL:e,path:t=location.pathname,lang:n=(typeof navigator>"u"?"en-US":navigator.language),locale:r,emoji:o=x,meta:i=["nick","mail","link"],requiredMeta:l=[],dark:s=!1,pageSize:a=10,wordLimit:c,imageUploader:u,highlighter:p,texRenderer:d,copyright:h=!0,login:f="enable",search:g,reaction:m,recaptchaV3Key:v="",turnstileKey:y="",commentSorting:w="latest",...b})=>({serverURL:K(e),path:q(t),lang:W(n),locale:{...B(W(n)),..."object"==typeof r?r:{}},wordLimit:Q(c),meta:k(i),requiredMeta:k(l),imageUploader:X(u,C),highlighter:X(p,E),texRenderer:X(d,S),dark:s,emoji:"boolean"==typeof o?o?x:[]:o,pageSize:a,login:f,copyright:h,search:!1!==g&&("object"==typeof g?g:$(n)),recaptchaV3Key:v,turnstileKey:y,reaction:Array.isArray(m)?m:!0===m?_:[],commentSorting:w,...b}))(n))),g=bn(f.value.commentSorting),m=bn([]),v=bn(null),y=bn(null),w=ei((()=>(e=>J(e)?"auto"===e?`@media(prefers-color-scheme:dark){body${Y}}`:`${e}${Y}`:!0===e?`:root${Y}`:"")(f.value.dark))),b=ei((()=>f.value.locale));let R;!function(e,t={}){const n=bn(!1),{document:r=il,immediate:o=!0,manual:i=!1,id:l="vueuse_styletag_"+ ++gl}=t,s=bn(e);let a=()=>{};const c=()=>{if(!r)return;const e=r.getElementById(l)||r.createElement("style");e.isConnected||(e.id=l,t.media&&(e.media=t.media),r.head.appendChild(e)),!n.value&&(a=pr(s,(t=>{e.textContent=t}),{immediate:!0}),n.value=!0)},u=()=>{!r||!n.value||(a(),r.head.removeChild(r.getElementById(l)),n.value=!1)};o&&!i&&nl(c),i||Bi(u),sn(n)}(w,{id:"waline-darkmode"});const L=e=>{var t;const{serverURL:n,path:o,pageSize:l}=f.value,d=new AbortController;s.value="loading",null==R||R(),u({serverURL:n,lang:f.value.lang,path:o,pageSize:l,sortBy:r[g.value],page:e,signal:d.signal,token:null==(t=i.value)?void 0:t.token}).then((t=>{s.value="success",a.value=t.count,m.value.push(...t.data),c.value=e,p.value=t.totalPages})).catch((e=>{"AbortError"!==e.name&&(console.error(e.message),s.value="error")})),R=d.abort.bind(d)},I=()=>{a.value=0,m.value=[],L(1)};(function(e,t){if(Vo){let n=Vo.provides;const r=Vo.parent&&Vo.parent.provides;r===n&&(n=Vo.provides=Object.create(r)),n[e]=t}})("config",f),br((()=>{pr((()=>[n.serverURL,n.path]),(()=>I()),{immediate:!0})})),_r((()=>null==R?void 0:R()));const A={props:n,sortKeyMap:r,sortingMethods:o,userInfo:i,likeStorage:l,status:s,count:a,page:c,totalPages:p,config:f,commentSortingRef:g,data:m,reply:v,edit:y,darkmodeStyle:w,i18n:b,get abort(){return R},set abort(e){R=e},getCommentData:L,loadMore:()=>L(c.value+1),refresh:I,onSortByChange:e=>{g.value!==e&&(g.value=e,I())},onReply:e=>{v.value=e},onEdit:e=>{y.value=e},onSubmit:e=>{if(y.value)y.value.comment=e.comment,y.value.orig=e.orig;else if("rid"in e){const t=m.value.find((({objectId:t})=>t===e.rid));if(!t)return;Array.isArray(t.children)||(t.children=[]),t.children.push(e)}else m.value.unshift(e),a.value+=1},onStatusChange:async({comment:e,status:t})=>{var n;if(e.status===t)return;const{serverURL:r,lang:o}=f.value;await h({serverURL:r,lang:o,token:null==(n=i.value)?void 0:n.token,objectId:e.objectId,comment:{status:t}}),e.status=t},onSticky:async e=>{var t;if("rid"in e)return;const{serverURL:n,lang:r}=f.value;await h({serverURL:n,lang:r,token:null==(t=i.value)?void 0:t.token,objectId:e.objectId,comment:{sticky:e.sticky?0:1}}),e.sticky=!e.sticky},onDelete:async({objectId:e})=>{var t;if(!confirm("Are you sure you want to delete this comment?"))return;const{serverURL:n,lang:r}=f.value;await d({serverURL:n,lang:r,token:null==(t=i.value)?void 0:t.token,objectId:e}),m.value.some(((t,n)=>t.objectId===e?(m.value=m.value.filter(((e,t)=>t!==n)),!0):t.children.some(((r,o)=>r.objectId===e&&(m.value[n].children=t.children.filter(((e,t)=>t!==o)),!0)))))},onLike:async e=>{var t;const{serverURL:n,lang:r}=f.value,{objectId:o}=e,s=l.value.includes(o);await h({serverURL:n,lang:r,objectId:o,token:null==(t=i.value)?void 0:t.token,comment:{like:!s}}),s?l.value=l.value.filter((e=>e!==o)):(l.value=[...l.value,o],l.value.length>50&&(l.value=l.value.slice(-50))),e.like=(e.like||0)+(s?-1:1)},Reaction:Ta,CommentBox:Sc,CommentCard:Yc,get LoadingIcon(){return ra},get version(){return eu}};return Object.defineProperty(A,"__isScriptSetup",{enumerable:!1,value:!0}),A}});const nu={"data-waline":""},ru={class:"wl-meta-head"},ou={class:"wl-count"},iu=["textContent"],lu={class:"wl-sort"},su=["onClick"],au={"class":"wl-cards","uk-scrollspy":"target: > .wl-user-avatar,.wl-head,.wl-meta,.wl-content; cls: uk-animation-fade; delay: 100"},cu={key:1,class:"wl-operation"},uu=["textContent"],pu={key:2,class:"wl-loading"},du=["textContent"],hu={key:4,class:"wl-operation"},fu=["textContent"],gu={key:5,class:"wl-power"},mu=Eo("a",{href:"https://github.com/walinejs/waline",target:"_blank",rel:"noopener noreferrer"}," Waline ",-1);var vu=_a(tu,[["render",function(e,t,n,r,o,i){return bo(),Co("div",nu,[Ao(r.Reaction),r.reply||r.edit?jo("v-if",!0):(bo(),So(r.CommentBox,{key:0,onLog:r.refresh,onSubmit:r.onSubmit})),Eo("div",ru,[Eo("div",ou,[r.count?(bo(),Co("span",{key:0,class:"wl-num",textContent:Ye(r.count)},null,8,iu)):jo("v-if",!0),zo(" "+Ye(r.i18n.comment),1)]),Eo("ul",lu,[(bo(!0),Co(fo,null,Cr(r.sortingMethods,(e=>(bo(),Co("li",{key:e,class:Ze([e===r.commentSortingRef?"active":""]),onClick:t=>r.onSortByChange(e)},Ye(r.i18n[e]),11,su)))),128))])]),Eo("div",au,[(bo(!0),Co(fo,null,Cr(r.data,(e=>(bo(),So(r.CommentCard,{key:e.objectId,"root-id":e.objectId,comment:e,reply:r.reply,edit:r.edit,onLog:r.refresh,onReply:r.onReply,onEdit:r.onEdit,onSubmit:r.onSubmit,onStatus:r.onStatusChange,onDelete:r.onDelete,onSticky:r.onSticky,onLike:r.onLike},null,8,["root-id","comment","reply","edit"])))),128))]),"error"===r.status?(bo(),Co("div",cu,[Eo("button",{type:"button",class:"wl-btn",onClick:r.refresh,textContent:Ye(r.i18n.refresh)},null,8,uu)])):"loading"===r.status?(bo(),Co("div",pu,[Ao(r.LoadingIcon,{size:30})])):r.data.length?r.page{t.forEach(((t,n)=>{const r=e[n].time;"number"==typeof r&&(t.innerText=r.toString())}))},wu=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-pageview-count",update:r=!0,lang:o=navigator.language})=>{const i=new AbortController,l=Array.from(document.querySelectorAll(n)),s=e=>{const n=Ws(e);return null!==n&&t!==n},a=n=>m({serverURL:K(e),paths:n.map((e=>Ws(e)??t)),lang:o,signal:i.signal}).then((e=>yu(e,n))).catch(yl);if(r){const n=l.filter((e=>!s(e))),r=l.filter(s);v({serverURL:K(e),path:t,lang:o}).then((e=>yu(e,n))),r.length&&a(r)}else a(l);return i.abort.bind(i)};e.RecentComments=({el:e,serverURL:t,count:n,lang:r=navigator.language})=>{var o;const i=ka(),l=wl(e),s=new AbortController;return y({serverURL:t,count:n,lang:r,signal:s.signal,token:null==(o=i.value)?void 0:o.token}).then((e=>l&&e.length?(l.innerHTML=`
    `,{comments:e,destroy:()=>{s.abort(),l.innerHTML=""}}):{comments:e,destroy:()=>s.abort()}))},e.UserList=({el:e,serverURL:t,count:n,locale:r,lang:o=navigator.language,mode:i="list"})=>{const l=wl(e),s=new AbortController;return w({serverURL:t,pageSize:n,lang:o,signal:s.signal}).then((e=>l&&e.length?(r={...B(o),..."object"==typeof r?r:{}},l.innerHTML=``,{users:e,destroy:()=>{s.abort(),l.innerHTML=""}}):{users:e,destroy:()=>s.abort()}))},e.addComment=p,e.commentCount=qs,e.defaultLocales=H,e.deleteComment=d,e.fetchCommentCount=f,e.getArticleCounter=a,e.getComment=u,e.getPageview=m,e.getRecentComment=y,e.getUserList=w,e.init=({el:e="#waline",path:t=window.location.pathname,comment:n=!1,pageview:r=!1,...o})=>{const i=e?wl(e):null;if(e&&!i)throw new Error("Option 'el' do not match any domElement!");if(!o.serverURL)throw new Error("Option 'serverURL' is missing!");const l=ln({...o}),s=ln({comment:n,pageview:r,path:t}),a=i?Hi((()=>ti(vu,{path:s.path,...l}))):null;a&&a.mount(i);const c=cr((()=>{s.comment&&qs({serverURL:l.serverURL,path:s.path,...J(s.comment)?{selector:s.comment}:{}})})),u=cr((()=>{s.pageview&&wu({serverURL:l.serverURL,path:s.path,...J(s.pageview)?{selector:s.pageview}:{}})}));return{el:i,update:({comment:e,pageview:t,path:n=window.location.pathname,...r}={})=>{Object.entries(r).forEach((([e,t])=>{l[e]=t})),s.path=n,void 0!==e&&(s.comment=e),void 0!==t&&(s.pageview=t)},destroy:()=>{null==a||a.unmount(),c(),u()}}},e.login=g,e.pageviewCount=wu,e.updateArticleCounter=c,e.updateComment=h,e.updatePageview=v,e.version=eu})); //# sourceMappingURL=/sm/53273ec713e7ae8578aed1246196aefb7086af8e86f7ea5b789e0ea4610e4f6e.map \ No newline at end of file diff --git a/public/links/index.html b/public/links/index.html index 25a8c605..76951f27 100644 --- a/public/links/index.html +++ b/public/links/index.html @@ -65,239 +65,239 @@
    -
    +
    -