vendor: 4,589 bytes, line 1
1var e=Object.defineProperty,t=(t,n,s)=>((t,n,s)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s)(t,"symbol"!=typeof n?n+"":n,s);import{aq as n,bh as s,b1 as r,bi as i,r as l,j as a,m as o,D as c,a as h,bj as u,O as p,y as d,bk as g,aY as f,u as k,d as x,M as w}from"./index-DfCPROKl.js";import{C as m}from"./index-EiBMV5kv.js";/* empty css */let b={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function y(e){b=e}const $={exec:()=>null};function v(e,t=""){let n="string"==typeof e?e:e.source;const s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(R.caret,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}const R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,T=/(?:[*+-]|\d{1,9}[.)])/,j=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,z=v(j).replace(/bull/g,T).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),A=v(j).replace(/bull/g,T).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),C=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,L=/(?!\s*\])(?:\\.|[^\[\]\\])+/,I=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",L).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_=v(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,T).getRegex(),N="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",P=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,E=v("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
1)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",P).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B=v(C).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),q={blockquote:v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",B).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:I,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:S,html:E,lheading:z,list:_,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:B,table:$,text:/^[^\n]+/},M=v("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),O={...q,lheading:A,table:M,paragraph:v(C).replace("hr",S).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",M).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},Z={...q,html:v("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",P).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v(C).replace("hr",S).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q=/^( {2,}|\\)\n(?!\s*$)/,D=/[\p{P}\p{S}]/u,F=/[\s\p{P}\p{S}]/u,H=/[^\s\p{P}\p{S}]/u,G=v(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,F).getRegex(),V=/(?!~)[\p{P}\p{S}]/u,W=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,X=v(W,"u").replace(/punct/g,D).getRegex(),K=v(W,"u").replace(/punct/g,V).getRegex(),U="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Y=v(U,"gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,F).replace(/punct/g,D).getRegex(),J=v(U,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,V).getRegex(),ee=v("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,H).replace(/punctSpace/g,F).replace(/punct/g,D).getRegex(),te=v(/\\(punct)/,"gu").replace(/punct/g,D).getRegex(),ne=v(/^<(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(),se=v(P).replace("(?:--\x3e|$)","--\x3e").getRegex(),re=v("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",se).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ie=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le=v(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ie).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ae=v(/^!?\[(label)\]\[(ref)\]/).replace("label",ie).replace("ref",L).getRegex(),oe=v(/^!?\[(ref)\](?:\[\])?/).replace("ref",L).getRegex(),ce={_backpedal:$,anyPunctuation:te,autolink:ne,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:Q,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:$,emStrongLDelim:X,emStrongRDelimAst:Y,emStrongRDelimUnd:ee,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}
vendor: 34,054 bytes, line 1
1~])/,link:le,nolink:oe,punctuation:G,reflink:ae,reflinkSearch:v("reflink|nolink(?!\\()","g").replace("reflink",ae).replace("nolink",oe).getRegex(),tag:re,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:$},he={...ce,link:v(/^!?\[(label)\]\((.*?)\)/).replace("label",ie).getRegex(),reflink:v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie).getRegex()},ue={...ce,emStrongRDelimAst:J,emStrongLDelim:K,url:v(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},pe={...ue,br:v(Q).replace("{2,}","*").getRegex(),text:v(ue.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},de={normal:q,gfm:O,pedantic:Z},ge={normal:ce,gfm:ue,breaks:pe,pedantic:he},fe={"&":"&","<":"<",">":">",'"':""","'":"'"},ke=e=>fe[e];function xe(e,t){if(t){if(R.escapeTest.test(e))return e.replace(R.escapeReplace,ke)}else if(R.escapeTestNoEncode.test(e))return e.replace(R.escapeReplaceNoEncode,ke);return e}function we(e){try{e=encodeURI(e).replace(R.percentDecode,"%")}catch{return null}return e}function me(e,t){var n;const s=e.replace(R.findPipe,((e,t,n)=>{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"})).split(R.splitPipe);let r=0;if(s[0].trim()||s.shift(),s.length>0&&!(null==(n=s.at(-1))?void 0:n.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(R.slashPipe,"|");return s}function be(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r<s&&e.charAt(s-r-1)===t;)r++;return e.slice(0,s-r)}function ye(e,t,n,s,r){const i=t.href,l=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:n,href:i,title:l,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:l,text:a}}class $e{constructor(e){t(this,"options"),t(this,"rules"),t(this,"lexer"),this.options=e||b}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:be(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(null===s)return t;const r=s[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[s]=t;return s.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);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(this.rules.other.endingHash.test(e)){const t=be(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.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:be(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=be(t[0],"\n").split("\n"),n="",s="";const r=[];for(;e.length>0;){let t=!1;const i=[];let l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))i.push(e[l]),t=!0;else{if(t)break;i.push(e[l])}e=e.slice(l);const a=i.join("\n"),o=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,s=s?`${s}\n${o}`:o;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(o,r,!0),this.lexer.state.top=c,0===e.length)break;const h=r.at(-1);if("code"===(null==h?void 0:h.type))break;if("blockquote"===(null==h?void 0:h.type)){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);r[r.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,s=s.substring(0,s.length-t.text.length)+l.text;break}if("list"!==(null==h?void 0:h.type));else{const t=h,i=t.raw+"\n"+e.join("\n"),l=this.list(i);r[r.length-1]=l,n=n.substring(0,n.length-h.raw.length)+l.raw,s=s.substring(0,s.length-t.raw.length)+l.raw,e=i.substring(r.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let l=!1;for(;e;){let n=!1,s="",a="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let o=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],h=!o.trim(),u=0;if(this.options.pedantic?(u=2,a=o.trimStart()):h?u=t[1].length+1:(u=t[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,a=o.slice(u),u+=t[1].length),h&&this.rules.other.blankLine.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(u),n=this.rules.other.hrRegex(u),r=this.rules.other.fencesBeginRegex(u),i=this.rules.other.headingBeginRegex(u),l=this.rules.other.htmlBeginRegex(u);for(;e;){const p=e.split("\n",1)[0];let d;if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),r.test(c))break;if(i.test(c))break;if(l.test(c))break;if(t.test(c))break;if(n.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!c.trim())a+="\n"+d.slice(u);else{if(h)break;if(o.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(o))break;if(i.test(o))break;if(n.test(o))break;a+="\n"+c}h||c.trim()||(h=!0),s+=p+"\n",e=e.substring(p.length+1),o=d.slice(u)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let p,d=null;this.options.gfm&&(d=this.rules.other.listIsTask.exec(a),d&&(p="[ ] "!==d[0],a=a.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:s,task:!!d,checked:p,loose:!1,text:a,tokens:[]}),r.raw+=s}const a=r.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=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:s}}}table(e){var t;const n=this.rules.block.table.exec(e);if(!n)return;if(!this.rules.other.tableDelimiter.test(n[2]))return;const s=me(n[1]),r=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(null==(t=n[3])?void 0:t.trim())?n[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],l={type:"table",raw:n[0],header:[],align:[],rows:[]};if(s.length===r.length){for(const e of r)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e<s.length;e++)l.header.push({text:s[e],tokens:this.lexer.inline(s[e]),header:!0,align:l.align[e]});for(const e of i)l.rows.push(me(e,l.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[t]}))));return l}}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:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.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&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=be(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 s=0;s<e.length;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return-1}(t[2],"()");if(e>-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],s="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ye(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer,this.rules)}}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(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ye(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(s&&(!s[3]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!s[1]&&!s[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...s[0]].length-1;let r,i,l=n,a=0;const o="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=o.exec(t));){if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!r)continue;if(i=[...r].length,s[3]||s[4]){l+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+a);const t=[...s[0]][0].length,o=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}const c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&s&&(e=e.substring(1,e.length-1)),{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=t[1],n="mailto:"+e):(e=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,s;if("@"===n[2])e=n[0],s="mailto:"+e;else{let r;do{r=n[0],n[0]=(null==(t=this.rules.inline._backpedal.exec(n[0]))?void 0:t[0])??""}while(r!==n[0]);e=n[0],s="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class ve{constructor(e){t(this,"tokens"),t(this,"options"),t(this,"state"),t(this,"tokenizer"),t(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||b,this.options.tokenizer=this.options.tokenizer||new $e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:R,block:de.normal,inline:ge.normal};this.options.pedantic?(n.block=de.pedantic,n.inline=ge.pedantic):this.options.gfm&&(n.block=de.gfm,this.options.breaks?n.inline=ge.breaks:n.inline=ge.gfm),this.tokenizer.rules=n}static get rules(){return{block:de,inline:ge}}static lex(e,t){return new ve(t).lex(e)}static lexInline(e,t){return new ve(t).inlineTokens(e)}lex(e){e=e.replace(R.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var s,r,i;for(this.options.pedantic&&(e=e.replace(R.tabCharGlobal," ").replace(R.spaceLine,""));e;){let l;if(null==(r=null==(s=this.options.extensions)?void 0:s.block)?void 0:r.some((n=>!!(l=n.call({lexer:this},e,t))&&(e=e.substring(l.raw.length),t.push(l),!0))))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);const n=t.at(-1);1===l.raw.length&&void 0!==n?n.raw+="\n":t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+l.raw,n.text+="\n"+l.text,this.inlineQueue.at(-1).src=n.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+l.raw,n.text+="\n"+l.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let a=e;if(null==(i=this.options.extensions)?void 0:i.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){const s=t.at(-1);n&&"paragraph"===(null==s?void 0:s.type)?(s.raw+="\n"+l.raw,s.text+="\n"+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(l),n=a.length!==e.length,e=e.substring(l.raw.length)}else if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+="\n"+l.raw,n.text+="\n"+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(l)}else 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=[]){var n,s,r;let i=e,l=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(l=this.tokenizer.rules.inline.reflinkSearch.exec(i));)e.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(l=this.tokenizer.rules.inline.blockSkip.exec(i));)i=i.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(l=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,l.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a=!1,o="";for(;e;){let l;if(a||(o=""),a=!1,null==(s=null==(n=this.options.extensions)?void 0:n.inline)?void 0:s.some((n=>!!(l=n.call({lexer:this},e,t))&&(e=e.substring(l.raw.length),t.push(l),!0))))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);const n=t.at(-1);"text"===l.type&&"text"===(null==n?void 0:n.type)?(n.raw+=l.raw,n.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,i,o)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let c=e;if(null==(r=this.options.extensions)?void 0:r.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(l=this.tokenizer.inlineText(c)){e=e.substring(l.raw.length),"_"!==l.raw.slice(-1)&&(o=l.raw.slice(-1)),a=!0;const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=l.raw,n.text+=l.text):t.push(l)}else 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 Re{constructor(e){t(this,"options"),t(this,"parser"),this.options=e||b}space(e){return""}code({text:e,lang:t,escaped:n}){var s;const r=null==(s=(t||"").match(R.notSpaceStart))?void 0:s[0],i=e.replace(R.endingNewline,"")+"\n";return r?'<pre><code class="language-'+xe(r)+'">'+(n?i:xe(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:xe(i,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let i=0;i<e.items.length;i++){const t=e.items[i];s+=this.listitem(t)}const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+s+"</"+r+">\n"}listitem(e){var t;let n="";if(e.task){const s=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=s+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=s+" "+xe(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):n+=s+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`<li>${n}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){const t=e.rows[r];n="";for(let e=0;e<t.length;e++)n+=this.tablecell(t[e]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+s+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${xe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=we(e);if(null===r)return s;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+xe(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n}){const s=we(e);if(null===s)return xe(n);let r=`<img src="${e=s}" alt="${n}"`;return t&&(r+=` title="${xe(t)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:xe(e.text)}}class Se{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class Te{constructor(e){t(this,"options"),t(this,"renderer"),t(this,"textRenderer"),this.options=e||b,this.options.renderer=this.options.renderer||new Re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Se}static parse(e,t){return new Te(t).parse(e)}static parseInline(e,t){return new Te(t).parseInline(e)}parse(e,t=!0){var n,s;let r="";for(let i=0;i<e.length;i++){const l=e[i];if(null==(s=null==(n=this.options.extensions)?void 0:n.renderers)?void 0:s[l.type]){const e=l,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){r+=t||"";continue}}const a=l;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let n=a,s=this.renderer.text(n);for(;i+1<e.length&&"text"===e[i+1].type;)n=e[++i],s+="\n"+this.renderer.text(n);r+=t?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}parseInline(e,t=this.renderer){var n,s;let r="";for(let i=0;i<e.length;i++){const l=e[i];if(null==(s=null==(n=this.options.extensions)?void 0:n.renderers)?void 0:s[l.type]){const e=this.options.extensions.renderers[l.type].call({parser:this},l);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){r+=e||"";continue}}const a=l;switch(a.type){case"escape":case"text":r+=t.text(a);break;case"html":r+=t.html(a);break;case"link":r+=t.link(a);break;case"image":r+=t.image(a);break;case"strong":r+=t.strong(a);break;case"em":r+=t.em(a);break;case"codespan":r+=t.codespan(a);break;case"br":r+=t.br(a);break;case"del":r+=t.del(a);break;default:{const e='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return r}}class je{constructor(e){t(this,"options"),t(this,"block"),this.options=e||b}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ve.lex:ve.lexInline}provideParser(){return this.block?Te.parse:Te.parseInline}}t(je,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));const ze=new class{constructor(...e){t(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),t(this,"options",this.setOptions),t(this,"parse",this.parseMarkdown(!0)),t(this,"parseInline",this.parseMarkdown(!1)),t(this,"Parser",Te),t(this,"Renderer",Re),t(this,"TextRenderer",Se),t(this,"Lexer",ve),t(this,"Tokenizer",$e),t(this,"Hooks",je),this.use(...e)}walkTokens(e,t){var n,s;let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const e=i;for(const n of e.header)r=r.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)r=r.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=i;r=r.concat(this.walkTokens(e.items,t));break}default:{const e=i;(null==(s=null==(n=this.defaults.extensions)?void 0:n.childTokens)?void 0:s[e.type])?this.defaults.extensions.childTokens[e.type].forEach((n=>{const s=e[n].flat(1/0);r=r.concat(this.walkTokens(s,t))})):e.tokens&&(r=r.concat(this.walkTokens(e.tokens,t)))}}return r}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 s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}: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 Re(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,r=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $e(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 s=n,r=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new je;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,r=e.hooks[s],i=t[s];je.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then((e=>i.call(t,e)));const n=r.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.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 ve.lex(e,t??this.defaults)}parser(e,t){return Te.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const l=r.hooks?r.hooks.provideLexer():e?ve.lex:ve.lexInline,a=r.hooks?r.hooks.provideParser():e?Te.parse:Te.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>l(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>a(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let e=l(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let n=a(e,r);return r.hooks&&(n=r.hooks.postprocess(n)),n}catch(o){return i(o)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+xe(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ae(e,t){return ze.parse(e,t)}Ae.options=Ae.setOptions=function(e){return ze.setOptions(e),Ae.defaults=ze.defaults,y(Ae.defaults),Ae},Ae.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},Ae.defaults=b,Ae.use=function(...e){return ze.use(...e),Ae.defaults=ze.defaults,y(Ae.defaults),Ae},Ae.walkTokens=function(e,t){return ze.walkTokens(e,t)},Ae.parseInline=ze.parseInline,Ae.Parser=Te,Ae.parser=Te.parse,Ae.Renderer=Re,Ae.TextRenderer=Se,Ae.Lexer=ve,Ae.lexer=ve.lex,Ae.Tokenizer=$e,Ae.Hooks=je,Ae.parse=Ae,Ae.options,Ae.setOptions,Ae.use,Ae.walkTokens,Ae.parseInline,Te.parse,ve.lex;const Ce={escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g},Le={"&":"&","<":"<",">":">",'"':""","'":"'"},Ie=e=>Le[e],_e=e=>["xs","sm"].includes(e);function Ne(e,t){switch(console.log("MAPPER TOKEN",e,t),e.type){case"link":return qe(e);case"image":return Be(e);case"text":return t||[",",", ",":",": "].includes(e.text)?Qe(e):e.tokens&&e.tokens.length>0?Pe(e):Ze(e);case"br":return e.tokens&&e.tokens.length>0?Pe(e):Fe(e);case"hr":return e.tokens&&e.tokens.length>0?Pe(e):He(e);case"strong":return Me(e);case"space":return e.tokens&&e.tokens.length>0?Pe(e):De(e);case"heading":return e.tokens&&e.tokens.length>0?Pe(e):Ve(e);case"html":return e.tokens&&e.tokens.length>0?Pe(e):We(e);case"em":return Oe(e);case"list":return Ge(e);case"codespan":return`<span class='tw-font-semibold'>${e.text}</span>`;default:return console.warn("UNKNOWN TOKEN",e),"<div></div>"}}document.addEventListener("click",(e=>{const t=e.target.closest("a");if(t&&t.classList.contains("marked-custom-link")){e.preventDefault();const l=t.href;_e(n())&&window.postMessage({type:"close-assistant"},window.location.origin),s(t)?r(l):i(e,{to:l})}}));const Pe=e=>((null==e?void 0:e.tokens)||[]).map((e=>Ne(e))).join(""),Ee=e=>((null==e?void 0:e.tokens)||[]).map((e=>Ne(e,!0))).join(""),Be=e=>(console.log("RenderImage",e),`\n <div class="tw-relative">\n <img src="${e.href}" class="tw-object-cover tw-min-h-[200px] tw-max-h-[200px]" width="200" alt="${e.text}" />\n </div>\n `),qe=e=>{const t=Ee(e);return console.log("RenderLink",e),`<a class="marked-custom-link" data-text="${e.href}" href="${e.href}">${t}</a>`},Me=e=>{const t=Ee(e);return console.log("RenderStrong",e),`<strong>${t}</strong>`},Oe=e=>{const t=Ee(e);return console.log("rendererEm",e),`<em>${t}</em>`},Ze=e=>(console.log("RenderText",e),`<p>${e.text}</p>`),Qe=e=>{return console.log("RenderInlineText",e),"tokens"in e&&e.tokens?Ee(e):"escaped"in e&&e.escaped?e.text:(t=e.text,Ce.escapeTestNoEncode.test(t)?t.replace(Ce.escapeReplaceNoEncode,Ie):t);var t},De=e=>(console.log("RenderSpace",e),"<br />"),Fe=e=>(console.log("RenderBr",e),"<br />"),He=e=>(console.log("RenderHr",e),"<hr />"),Ge=e=>{const t=e.ordered?"ol":"ul";return`<${t}>${e.items.map((e=>`<li>${Ee(e)}</li>`)).join("")}</${t}>`},Ve=e=>(console.log("RenderHeading",e),`<p class="tw-font-bold">${e.text}</p>`),We=e=>e.raw,Xe=new Ae.Renderer,Ke=(Ue=Xe,e=>Ae.parse(e,{renderer:Ue,gfm:!0,breaks:!0}));var Ue;Xe.heading=Ve,Xe.paragraph=e=>`<p>${Ee(e)}</p>`,Xe.link=qe,Xe.image=Be,Xe.strong=Me,Xe.space=De,Xe.text=Ze,Xe.br=Fe,Xe.hr=He,Xe.table=e=>(console.log("RenderTable",e),`<table><thead><tr>${e.header.map((e=>`<th>${Pe(e)}</th>`))}</tr></thead><tbody>${e.rows.map((e=>`<tr>${e.map((e=>`<td>${Pe(e)}</td>`))}</tr>`))}</tbody></table>`),Xe.list=Ge,Xe.html=We,Xe.em=Oe;const Ye=e=>Ke(e||""),Je=l.forwardRef(((e,t)=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`icon ${e.className||""}`,ref:t,...e,children:a.jsx("path",{d:"M7.48505 14.4464C7.61785 14.5863 7.80378 14.6666 7.99858 14.6666C8.19338 14.6666 8.37638 14.5863 8.51218 14.4464L13.4708 9.20831C13.7424 8.92258 13.7306 8.47025 13.4472 8.19938C13.1638 7.92858 12.7153 7.93751 12.4467 8.22318L8.70698 12.1696V2.0476C8.70698 1.65177 8.39118 1.33331 7.99858 1.33331C7.60605 1.33331 7.29025 1.65177 7.29025 2.0476V12.1696L3.55353 8.22025C3.28199 7.93451 2.8363 7.92558 2.55295 8.19638C2.2696 8.46725 2.26074 8.91965 2.52934 9.20531L7.48798 14.4434L7.48505 14.4464Z",fill:"currentColor"})}))),et=({text:e="A"})=>a.jsx(a.Fragment,{children:a.jsx("div",{className:"tw-relative tw-inline-flex tw-items-center tw-justify-center tw-h-[40px] tw-min-h-[40px] tw-w-[40px] tw-min-w-[40px] tw-overflow-hidden tw-bg-neutral200 tw-rounded-full tw-mr
1-[16px]",children:a.jsx("span",{className:"tw-font-semibold tw-text-neutral900",children:e})})}),tt=h.memo((({content:e,role:t,id:n})=>{const s="typing"===n;return a.jsx("div",{className:"tw-max-w-[100%] tw-ml-[-1px] tw-px-[0px] tw-py-[10px] tw-flex tw-row "+("user"===t?"tw-justify-end":"tw-justify-start"),children:a.jsx("div",{className:"tw-text-[14px] tw-pr-[16px] tw-pl-[16px] tw-w-fit "+("user"===t?"tw-max-w-[calc(100%-50px)]":""),children:"system"===t?a.jsxs("div",{className:"tw-flex",children:[a.jsx(et,{}),a.jsx("div",{className:"tw-markdown-content tw-font-medium "+(s?"tw-content-center tw-italic tw-text-neutral600 tw-font-normal":""),dangerouslySetInnerHTML:{__html:Ye(e||"")},style:{overflowWrap:"anywhere"}})]}):a.jsx("p",{className:"tw-font-medium tw-rounded-tl-[8px] tw-rounded-tr-[8px] tw-rounded-bl-[8px] tw-bg-[#F2F3FD] tw-p-[10px]",children:e})})})}));function nt(){const e=o();return a.jsx("div",{style:{minHeight:"1px"},ref:t=>{e["assistant.chatBottomRef"]=t}})}function st({showScrollButton:e}){const t=o();return e&&a.jsx("div",{className:"twa-absolute twa-bottom-[0px] twa-w-fit",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",bottom:"4px",width:"40px",height:"40px",alignContent:"center",justifyItems:"center"},children:a.jsx(m,{ariaLabel:"scroll-down-btn",size:"xxxs",variant:"text",onClick:()=>{t["assistant.chatBottomRef"]&&t["assistant.chatBottomRef"].scrollIntoView({behavior:"smooth",block:"end"})},icon:a.jsx(Je,{width:16,height:16}),className:"tw-border tw-border-neutral300 tw-bg-white",style:{boxShadow:"rgba(0, 0, 0, 0.35) 0px 2px 4px"}})})}const rt=c.assistant.defaultMessages,it=()=>{var e;const t=o();t.useWatch(["assistant.messages","assistant.isFetching","assistant.loading"]);const n=l.useRef(null),[s,r]=l.useState(!1),i=()=>{if(!n.current)return;const{scrollTop:e,scrollHeight:t,clientHeight:s}=n.current;r(!(e+s>=t-10))};return l.useEffect((()=>{const e=n.current;if(e)return i(),e.addEventListener("scroll",i),()=>e.removeEventListener("scroll",i)}),[t["assistant.messages"]]),(null==(e=t["assistant.messages"])?void 0:e.length)||t["assistant.isFetching"]||t["assistant.loading"]?a.jsxs("div",{ref:n,className:"tw-overflow-y-scroll tw-w-full tw-flex tw-flex-col tw-justify-start tw-flex-grow-[1]",children:[t["assistant.messages"].map((e=>a.jsx(tt,{id:e.id,role:e.role,content:e.content[0].text},e.id))),t["assistant.isFetching"]&&a.jsx(tt,{role:"system",content:"typing the answer to your question ...",id:"typing"}),a.jsx(st,{showScrollButton:s}),a.jsx(nt,{})]}):a.jsxs("div",{className:"tw-h-[100%] tw-flex tw-flex-col tw-items-start tw-pl-[16px] tw-pr-[16px] tw-sm:tw-pr-[0px] tw-justify-center",children:[a.jsx(et,{}),a.jsx("div",{className:"tw-flex tw-flex-col tw-mt-[16px]",children:rt.map((e=>a.jsx("p",{className:"tw-tracking-[-0.5px] tw-typog-[bodymd] tw-font-medium tw-text-start tw-text-neutral900 tw-leading-[22px]",children:e},e)))})]})},lt=l.forwardRef(((e,t)=>a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`icon ${e.className||""}`,ref:t,...e,children:[a.jsx("path",{d:"M18 10L12 4L8.5 7.5L6 10",stroke:"currentColor",strokeWidth:"4",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M12 19V6",stroke:"currentColor",strokeWidth:"4",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})));let at=e=>crypto.getRandomValues(new Uint8Array(e));const ot=e=>[{type:"text",text:e}],ct=(e,t)=>({id:((e,t=21)=>((e,t,n)=>{let s=(2<<Math.log2(61))-1,r=-~(1.6*s*t/62);return(i=t)=>{let l="";for(;;){let t=n(r),a=0|r;for(;a--;)if(l+=e[t[a]&s]||"",l.length>=i)return l}}})("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",0|t,at))(0,7)(),createdAt:(new Date).toISOString(),role:e,content:ot(t)});function ht({className:e=""}){const t=o();t.useWatch(["assistant.userQuery","assistant.loading"]);const n=(()=>{const e=o(),t=(()=>{const e=o();return(t=100)=>setTimeout((()=>e["assistant.chatBottomRef"].scrollIntoView({behavior:"smooth",block:"end"})),t)})(),n=l.useCallback((async()=>{try{const s=new AbortController,r=null==s?void 0:s.signal;e["assistant.abortControllerRef"]=s,e["assistant.loading"]=!0,e["assistant.isFetching"]=!0;const i=e["assistant.messages"],l=e["assistant.threadId"],a=i[i.length-1],o=await fetch(u("/assistant/chat"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a,threadId:l}),signal:r});let c="";const h=async function*(t){if(!t)return;const n=t.getReader(),s=new TextDecoder;let r="";try{for(;;){const{done:t,value:i}=await n.read();if(t)return e["assistant.loading"]=!1,void(e["assistant.isFetching"]=!1);r+=s.decode(i,{stream:!0});const l=r.split("\n\n");r=l.pop()??"";for(const e of l){const t=e.split("\n");for(const e of t)e.startsWith("data: ")&&(yield e.slice(6))}}}catch(i){console.warn("sse iterator error",i)}finally{n.releaseLock()}}(o.body);for await(const u of h){if(null==r?void 0:r.aborted){console.log("Request aborted");break}try{e["assistant.isFetching"]&&(e["assistant.isFetching"]=!1),c+=u;const n=[...e["assistant.messages"]],s=n.length-1,r=n[s];"user"===r.role?n.push(ct("system",c)):n[s]={...r,content:ot(c)},e["assistant.messages"]=n,t()}catch(n){console.error("error during chunk parse","chunk",u,"rawText",c,"e",n)}}t(500)}catch(n){console.error("Failed to read stream",n),e["assistant.loading"]=!1,e["assistant.isFetching"]=!1}}),[]);return l.useCallback((()=>{e["assistant.loading"]||(e["assistant.messages"]=[...e["assistant.messages"],ct("user",e["assistant.userQuery"])],t(),n())}),[])})(),s=l.useCallback((e=>{const n=e.target.value;t["assistant.userQuery"]=n}),[]),r=l.useRef(null),i=e=>{if(s(e),r.current){r.current.style.height="auto";const e=Math.floor(r.current.scrollHeight/25);r.current.style.height=e<=5?`${r.current.scrollHeight}px`:"125px"}};return l.useEffect((()=>{i({target:{value:t["assistant.userQuery"]}})}),[t["assistant.userQuery"]]),a.jsx("div",{className:`${e} tw-bg-white tw-flex tw-h-[auto] tw-sticky tw-bottom-0 tw-mx-[16px] tw-my-[12px]`,children:a.jsxs("div",{className:"tw-w-full tw-flex tw-justify-between tw-items-end",children:[a.jsx(p.Control,{ref:r,value:t["assistant.userQuery"],type:"text",className:"scrollbar2 tw-rounded-[8px] assistant-input tw-h-[100%] tw-mr-[16px] tw-resize-none",onInput:i,onKeyDown:e=>{t["assistant.userQuery"].length>0&&("Enter"!==e.key&&13!==e.keyCode||e.shiftKey||(n(),d.flushSync((()=>{var e;t["assistant.userQuery"]="",null==(e=null==r?void 0:r.current)||e.blur()}))))},placeholder:"Ask something",disabled:t["assistant.loading"],as:"textarea",rows:1}),a.jsx(m,{disabled:t["assistant.loading"],onClick:t["assistant.loading"]?void 0:()=>{t["assistant.userQuery"].length>0&&(n(),t["assistant.userQuery"]="")},variant:"primary",icon:a.jsx(lt,{width:32,height:32})})]})})}const ut=()=>{o();const e=g();return a.jsxs("div",{className:"tw-w-[100%] tw-sticky tw-top-0 tw-z-[10] tw-flex tw-justify-between tw-items-center tw-px-[16px] tw-py-[12px] tw-border-b tw-border-neutral200",children:[a.jsx("p",{className:"tw-typog-[bodylg] t
1w-font-semibold",children:c.assistant.name}),a.jsx("button",{className:"tw-flex tw-justify-center tw-items-center tw-w-[32px] tw-h-[32px]",onClick:e,children:a.jsx(f,{width:12,height:12})})]})},pt=e=>{const t=document.body.classList;if(e){const e=window.scrollY;document.body.style.setProperty("--scroll-y",`-${e}px`),t.add("fixed-body-hide-y-scroll")}else{const e=-1*parseInt(document.body.style.getPropertyValue("--scroll-y")||"0");t.remove("fixed-body-hide-y-scroll"),window.scrollTo(0,e)}},dt=({children:e})=>{const t=o();return t.useRef("assistant.chatBottomRef",null),t.useRef("assistant.messages",[]),t.useRef("assistant.loading",!1),t.useRef("assistant.isFetching",!1),t.useRef("assistant.userQuery",""),t.useRef("assistant.threadIdLoading",!1),t.useRef("assistant.threadId",null),t.useRef("assistant.abortControllerRef",null),e};function gt({isOpen:e,isMobile:t}){o();const n=g();return a.jsx("div",{className:"tw-xs:tw-block tw-sm:tw-hidden",children:a.jsxs(w,{show:e,onHide:n,style:t?{width:"1136px",paddingLeft:0}:{},className:(t?"scrollbar2 custom-modal-assistant-mobile":"custom-modal-assistant")+" tw-lg:tw-overflow-hidden",contentClassName:"tw-flex",children:[a.jsx("div",{className:"tw-sticky tw-top-0 tw-left-0 tw-flex tw-flex-col tw-items-center tw-justify-between tw-bg-white",children:a.jsx(ut,{})}),a.jsx("div",{className:"tw-flex tw-flex-col tw-relative tw-h-[100%] tw-overflow-y-hidden tw-overflow-x-hidden tw-overscroll-contain tw-pt-[10px]",children:a.jsx(it,{})}),a.jsx("hr",{className:"tw-w-full tw-text-neutral300 tw-mt-[12px]"}),a.jsx(ht,{})]})})}function ft({isOpen:e}){const t=l.useRef(null);return a.jsx("div",{ref:t,className:`assistant-modal-container1 assistant-shadow ${e?"tw-block":"tw-hidden"} tw-overflow-hidden`,children:a.jsxs("div",{className:"tw-flex tw-flex-col tw-relative tw-h-[100%]",children:[a.jsx(ut,{}),a.jsx("div",{className:"tw-flex tw-flex-col tw-relative tw-h-[100%] tw-overflow-y-hidden tw-overflow-x-hidden tw-overscroll-contain tw-pt-[10px]",children:a.jsx(it,{})}),a.jsx("hr",{className:"tw-w-full tw-text-neutral300 tw-mt-[12px]"}),a.jsx(ht,{})]})})}function kt({isOpen:e}){const t=o(),n=(()=>{const e=o(),t=k();return l.useCallback((()=>(e["assistant.threadIdLoading"]=!0,t("/assistant/init",{},((t,n)=>{e["assistant.threadIdLoading"]=!0,!t&&n&&(e["assistant.threadId"]=n.threadId)})))),[])})();l.useEffect((()=>{t["assistant.threadId"]||n()}),[]);const s=x(),r=_e(s);return l.useEffect((()=>(pt(r&&e),()=>{pt(!1)})),[e,r]),a.jsx(a.Fragment,{children:r?a.jsx(gt,{isOpen:e,isMobile:r}):a.jsx(ft,{isOpen:e})})}function xt({isOpen:e}){return a.jsx(dt,{children:e?a.jsx(kt,{isOpen:e}):null})}export{xt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.