MindMap/frontend/dist/assets/index-d78cd498.js

695 lines
586 KiB
JavaScript
Raw Normal View History

var _d=Object.defineProperty;var Od=(t,e,r)=>e in t?_d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var je=(t,e,r)=>(Od(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();/**
* @vue/shared v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function wa(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const Ve={},Cn=[],tr=()=>{},Rc=()=>!1,Is=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),xa=t=>t.startsWith("onUpdate:"),yt=Object.assign,ka=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Ld=Object.prototype.hasOwnProperty,Be=(t,e)=>Ld.call(t,e),Ae=Array.isArray,Mn=t=>_s(t)==="[object Map]",Ic=t=>_s(t)==="[object Set]",Ne=t=>typeof t=="function",ct=t=>typeof t=="string",Qr=t=>typeof t=="symbol",rt=t=>t!==null&&typeof t=="object",_c=t=>(rt(t)||Ne(t))&&Ne(t.then)&&Ne(t.catch),Oc=Object.prototype.toString,_s=t=>Oc.call(t),zd=t=>_s(t).slice(8,-1),Lc=t=>_s(t)==="[object Object]",Sa=t=>ct(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Qn=wa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Os=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},$d=/-(\w)/g,Gr=Os(t=>t.replace($d,(e,r)=>r?r.toUpperCase():"")),Fd=/\B([A-Z])/g,en=Os(t=>t.replace(Fd,"-$1").toLowerCase()),zc=Os(t=>t.charAt(0).toUpperCase()+t.slice(1)),ai=Os(t=>t?`on${zc(t)}`:""),Wr=(t,e)=>!Object.is(t,e),Y0=(t,...e)=>{for(let r=0;r<t.length;r++)t[r](...e)},$c=(t,e,r,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})},Bi=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let zo;const Ls=()=>zo||(zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function On(t){if(Ae(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],s=ct(n)?qd(n):On(n);if(s)for(const i in s)e[i]=s[i]}return e}else if(ct(t)||rt(t))return t}const Bd=/;(?![^(]*\))/g,Pd=/:([^]+)/,Hd=/\/\*[^]*?\*\//g;function qd(t){const e={};return t.replace(Hd,"").split(Bd).forEach(r=>{if(r){const n=r.split(Pd);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Ln(t){let e="";if(ct(t))e=t;else if(Ae(t))for(let r=0;r<t.length;r++){const n=Ln(t[r]);n&&(e+=n+" ")}else if(rt(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}const jd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ud=wa(jd);function Fc(t){return!!t||t===""}const Bc=t=>!!(t&&t.__v_isRef===!0),ur=t=>ct(t)?t:t==null?"":Ae(t)||rt(t)&&(t.toString===Oc||!Ne(t.toString))?Bc(t)?ur(t.value):JSON.stringify(t,Pc,2):String(t),Pc=(t,e)=>Bc(e)?Pc(t,e.value):Mn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,s],i)=>(r[oi(n,i)+" =>"]=s,r),{})}:Ic(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>oi(r))}:Qr(e)?oi(e):rt(e)&&!Ae(e)&&!Lc(e)?String(e):e,oi=(t,e="")=>{var r;return Qr(t)?`Symbol(${(r=t.description)!=null?r:e})`:t};/**
* @vue/reactivity v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let It;class Vd{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=It,!e&&It&&(this.index=(It.scopes||(It.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].pause();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].resume();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].resume()}}run(e){if(this._active){const r=It;try{return It=this,e()}finally{It=r}}}on(){++this._on===1&&(this.prevScope=It,It=this)}off(){this._on>0&&--this._on===0&&(It=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(this.effects.length=0,r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Wd(){return It}let Xe;const li=new WeakSet;class Hc{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,It&&It.active&&It.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,li.has(this)&&(li.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,$o(this),Uc(this);const e=Xe,r=rr;Xe=this,rr=!0;try{return this.fn()}finally{Vc(this),Xe=e,rr=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Aa(e);this.deps=this.depsTail=void 0,$o(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?li.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Pi(this)&&this.run()}get dirty(){return Pi(this)}}let qc=0,e0,t0;function jc(t,e=!1){if(t.flags|=8,e){t.next=t0,t0=t;return}t.next=e0,e0=t}function Ta(){qc++}function Ea(){if(--qc>0)return;if(t0){let e=t0;for(t0=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;e0;){let e=e0;for(e0=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function Uc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Vc(t){let e,r=t.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Aa(n),Gd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}t.deps=e,t.depsTail=r}function Pi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Wc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Wc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===c0)||(t.globalVersion=c0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Pi(t))))return;t.flags|=2;const e=t.dep,r=Xe,n=rr;Xe=t,rr=!0;try{Uc(t);const s=t.fn(t._value);(e.version===0||Wr(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Xe=r,rr=n,Vc(t),t.flags&=-3}}function Aa(t,e=!1){const{dep:r,prevSub:n,nextSub:s}=t;if(n&&(n.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)Aa(i,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Gd(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let rr=!0;const Gc=[];function Rr(){Gc.push(rr),rr=!1}function Ir(){const t=Gc.pop();rr=t===void 0?!0:t}function $o(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Xe;Xe=void 0;try{e()}finally{Xe=r}}}let c0=0;class Kd{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=t
* @vue/runtime-core v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function b0(t,e,r,n){try{return n?t(...n):t()}catch(s){$s(s,e,r)}}function mr(t,e,r,n){if(Ne(t)){const s=b0(t,e,r,n);return s&&_c(s)&&s.catch(i=>{$s(i,e,r)}),s}if(Ae(t)){const s=[];for(let i=0;i<t.length;i++)s.push(mr(t[i],e,r,n));return s}}function $s(t,e,r,n=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||Ve;if(e){let o=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;o;){const d=o.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](t,l,c)===!1)return}o=o.parent}if(i){Rr(),b0(i,null,10,[t,l,c]),Ir();return}}xh(t,r,s,n,a)}function xh(t,e,r,n=!0,s=!1){if(s)throw t;console.error(t)}const At=[];let cr=-1;const Dn=[];let qr=null,Tn=0;const nu=Promise.resolve();let us=null;function X0(t){const e=us||nu;return t?e.then(this?t.bind(this):t):e}function kh(t){let e=cr+1,r=At.length;for(;e<r;){const n=e+r>>>1,s=At[n],i=d0(s);i<t||i===t&&s.flags&2?e=n+1:r=n}return e}function Ia(t){if(!(t.flags&1)){const e=d0(t),r=At[At.length-1];!r||!(t.flags&2)&&e>=d0(r)?At.push(t):At.splice(kh(e),0,t),t.flags|=1,su()}}function su(){us||(us=nu.then(au))}function Sh(t){Ae(t)?Dn.push(...t):qr&&t.id===-1?qr.splice(Tn+1,0,t):t.flags&1||(Dn.push(t),t.flags|=1),su()}function Bo(t,e,r=cr+1){for(;r<At.length;r++){const n=At[r];if(n&&n.flags&2){if(t&&n.id!==t.uid)continue;At.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function iu(t){if(Dn.length){const e=[...new Set(Dn)].sort((r,n)=>d0(r)-d0(n));if(Dn.length=0,qr){qr.push(...e);return}for(qr=e,Tn=0;Tn<qr.length;Tn++){const r=qr[Tn];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}qr=null,Tn=0}}const d0=t=>t.id==null?t.flags&2?-1:1/0:t.id;function au(t){const e=tr;try{for(cr=0;cr<At.length;cr++){const r=At[cr];r&&!(r.flags&8)&&(r.flags&4&&(r.flags&=-2),b0(r,r.i,r.i?15:14),r.flags&4||(r.flags&=-2))}}finally{for(;cr<At.length;cr++){const r=At[cr];r&&(r.flags&=-2)}cr=-1,At.length=0,iu(),us=null,(At.length||Dn.length)&&au()}}let jt=null,ou=null;function ds(t){const e=jt;return jt=t,ou=t&&t.type.__scopeId||null,e}function Th(t,e=jt,r){if(!e||t._n)return t;const n=(...s)=>{n._d&&Go(-1);const i=ds(e);let a;try{a=t(...s)}finally{ds(i),n._d&&Go(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function hs(t,e){if(jt===null)return t;const r=Hs(jt),n=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[i,a,o,l=Ve]=e[s];i&&(Ne(i)&&(i={mounted:i,updated:i}),i.deep&&Ar(a),n.push({dir:i,instance:r,value:a,oldValue:void 0,arg:o,modifiers:l}))}return t}function sn(t,e,r,n){const s=t.dirs,i=e&&e.dirs;for(let a=0;a<s.length;a++){const o=s[a];i&&(o.oldValue=i[a].value);let l=o.dir[n];l&&(Rr(),mr(l,r,8,[t.el,o,t,e]),Ir())}}const Eh=Symbol("_vte"),Ah=t=>t.__isTeleport,Ch=Symbol("_leaveCb");function _a(t,e){t.shapeFlag&6&&t.component?(t.transition=e,_a(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function lu(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function r0(t,e,r,n,s=!1){if(Ae(t)){t.forEach((b,y)=>r0(b,e&&(Ae(e)?e[y]:e),r,n,s));return}if(n0(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&r0(t,e,r,n.component.subTree);return}const i=n.shapeFlag&4?Hs(n.component):n.el,a=s?null:i,{i:o,r:l}=t,c=e&&e.r,d=o.refs===Ve?o.refs={}:o.refs,f=o.setupState,p=Fe(f),v=f===Ve?Rc:b=>Be(p,b);if(c!=null&&c!==l){if(ct(c))d[c]=null,v(c)&&(f[c]=null);else if(kt(c)){c.value=null;const b=e;b.k&&(d[b.k]=null)}}if(Ne(l))b0(l,o,12,[a,d]);else{const b=ct(l),y=kt(l);if(b||y){const w=()=>{if(t.f){const M=b?v(l)?f[l]:d[l]:l.value;if(s)Ae(M)&&ka(M,i);else if(Ae(M))M.includes(i)||M.push(i);else if(b)d[l]=[i],v(l)&&(f[l]=d[l]);else{const S=[i];l.value=S,t.k&&(d[t.k]=S)}}else b?(d[l]=a,v(l)&&(f[l]=a)):y&&(l.value=a,t.k&&(d[t.k]=a))};a?(w.id=-1,zt(w,r)):w()}}}Ls().requestIdleCallback;Ls().cancelIdleCallback;const n0=t=>!!t.type.__asyncLoader,cu=t=>t.type.__isKeepAlive;function Mh(t,e){uu(t,"a",e)}function Nh(t,e){uu(t,"da",e)}function uu(t,e,r=Ct){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.p
* @vue/runtime-dom v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Yi;const Zo=typeof window<"u"&&window.trustedTypes;if(Zo)try{Yi=Zo.createPolicy("vue",{createHTML:t=>t})}catch{}const Lu=Yi?t=>Yi.createHTML(t):t=>t,Rf="http://www.w3.org/2000/svg",If="http://www.w3.org/1998/Math/MathML",kr=typeof document<"u"?document:null,Qo=kr&&kr.createElement("template"),_f={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e==="svg"?kr.createElementNS(Rf,t):e==="mathml"?kr.createElementNS(If,t):r?kr.createElement(t,{is:r}):kr.createElement(t);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>kr.createTextNode(t),createComment:t=>kr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>kr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const a=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Qo.innerHTML=Lu(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const o=Qo.content;if(n==="svg"||n==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}e.insertBefore(o,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},Of=Symbol("_vtc");function Lf(t,e,r){const n=t[Of];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const ms=Symbol("_vod"),zu=Symbol("_vsh"),zf={name:"show",beforeMount(t,{value:e},{transition:r}){t[ms]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Vn(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Vn(t,!0),n.enter(t)):n.leave(t,()=>{Vn(t,!1)}):Vn(t,e))},beforeUnmount(t,{value:e}){Vn(t,e)}};function Vn(t,e){t.style.display=e?t[ms]:"none",t[zu]=!e}const $f=Symbol(""),Ff=/(^|;)\s*display\s*:/;function Bf(t,e,r){const n=t.style,s=ct(r);let i=!1;if(r&&!s){if(e)if(ct(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&es(n,o,"")}else for(const a in e)r[a]==null&&es(n,a,"");for(const a in r)a==="display"&&(i=!0),es(n,a,r[a])}else if(s){if(e!==r){const a=n[$f];a&&(r+=";"+a),n.cssText=r,i=Ff.test(r)}}else e&&t.removeAttribute("style");ms in t&&(t[ms]=i?n.display:"",t[zu]&&(n.display="none"))}const el=/\s*!important$/;function es(t,e,r){if(Ae(r))r.forEach(n=>es(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=Pf(t,e);el.test(r)?t.setProperty(en(n),r.replace(el,""),"important"):t[n]=r}}const tl=["Webkit","Moz","ms"],pi={};function Pf(t,e){const r=pi[e];if(r)return r;let n=Gr(e);if(n!=="filter"&&n in t)return pi[e]=n;n=zc(n);for(let s=0;s<tl.length;s++){const i=tl[s]+n;if(i in t)return pi[e]=i}return e}const rl="http://www.w3.org/1999/xlink";function nl(t,e,r,n,s,i=Ud(e)){n&&e.startsWith("xlink:")?r==null?t.removeAttributeNS(rl,e.slice(6,e.length)):t.setAttributeNS(rl,e,r):r==null||i&&!Fc(r)?t.removeAttribute(e):t.setAttribute(e,i?"":Qr(r)?String(r):r)}function sl(t,e,r,n,s){if(e==="innerHTML"||e==="textContent"){r!=null&&(t[e]=e==="innerHTML"?Lu(r):r);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const o=i==="OPTION"?t.getAttribute("value")||"":t.value,l=r==null?t.type==="checkbox"?"on":"":String(r);(o!==l||!("_value"in t))&&(t.value=l),r==null&&t.removeAttribute(e),t._value=r;return}let a=!1;if(r===""||r==null){const o=typeof t[e];o==="boolean"?r=Fc(r):r==null&&o==="string"?(r="",a=!0):o==="number"&&(r=0,a=!0)}try{t[e]=r}catch{}a&&t.removeAttribute(s||e)}function En(t,e,r,n){t.addEventListener(e,r,n)}function Hf(t,e,r,n){t.removeEventListener(e,r,n)}const il=Symbol("_vei");function qf(t,e,r,n,s=null){const i=t[il]||(t[il]={}),a=i[e];if(n&&a)a.value=n;else{const[o,l]=jf(e);if(n){const c=i[e]=Wf(n,s);En(t,o,c,l)}else a&&(Hf(t,o,a,l),i[e]=void 0)}}const al=/(?:Once|Passive|Capture)$/;function jf(t
color:${s.color};
padding:${s.padding};
margin:${s.margin};
font:${s.font};
background-color:${s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor};
border-radius:${s.borderRadius};`,this.direction===0&&(e.style.right="0"),Bu(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",i=>{i.stopPropagation();const a=i.key;if(a==="Enter"||a==="Tab"){if(i.shiftKey)return;i.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var i;if(!e)return;const a=((i=e.textContent)==null?void 0:i.trim())||"";a===""?r.topic=n:(r.topic=a,this.markdown?t.text.innerHTML=this.markdown(r.topic,r):t.text.textContent=a),e.remove(),a!==n&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:r,origin:n}))})},Ga=function(t){const e=Ft.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},fn=document,Wt="http://www.w3.org/2000/svg",Zi=function(t,e,r,n={}){const{anchor:s="middle",color:i,dataType:a}=n,o=document.createElementNS(Wt,"text");return vt(o,{"text-anchor":s,x:e+"",y:r+"",fill:i||(s==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},Pu=function(t,e,r){const n=fn.createElementNS(Wt,"path");return vt(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},Jn=function(t){const e=fn.createElementNS(Wt,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},fl=function(){const t=fn.createElementNS(Wt,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},Tp=function(t,e,r,n){const s=fn.createElementNS(Wt,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((i,a)=>{const o=i.d,l=fn.createElementNS(Wt,"path"),c={d:o,stroke:(n==null?void 0:n.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(n==null?void 0:n.strokeLinecap)||"cap","stroke-width":String((n==null?void 0:n.strokeWidth)||"2")};(n==null?void 0:n.opacity)!==void 0&&(c.opacity=String(n.opacity)),vt(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const d=fn.createElementNS(Wt,"path");vt(d,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),s.appendChild(d),s.appendChild(l),s[i.name]=l}),s},Hu=function(t,e,r){if(!e)return;const n=fn.createElement("div");t.nodes.appendChild(n);const s=e.innerHTML;n.id="input-box",n.textContent=s,n.contentEditable="plaintext-only",n.spellcheck=!1;const i=e.getBBox();n.style.cssText=`
min-width:${Math.max(88,i.width)}px;
position:absolute;
left:${i.x}px;
top:${i.y}px;
padding: 2px 4px;
margin: -2px -4px;
`,Bu(n),t.scrollIntoView(n),n.addEventListener("keydown",a=>{a.stopPropagation();const o=a.key;if(o==="Enter"||o==="Tab"){if(a.shiftKey)return;a.preventDefault(),n.blur(),t.container.focus()}}),n.addEventListener("blur",()=>{var a;if(!n)return;const o=((a=n.textContent)==null?void 0:a.trim())||"";o===""?r.label=s:r.label=o,n.remove(),o!==s&&(e.innerHTML=r.label,"parent"in r?t.bus.fire("operation",{name:"finishEditSummary",obj:r}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:r}))})},Ep=function(t){const e=this.map.querySelector("me-root"),r=e.offsetTop,n=e.offsetLeft,s=e.offsetWidth,i=e.offsetHeight,a=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let o=0;o<a.length;o++){const l=a[o],c=l.querySelector("me-tpc"),{offsetLeft:d,offsetTop:f}=rn(this.nodes,c),p=c.offsetWidth,v=c.offsetHeight,b=l.parentNode.className,y=this.generateMainBranch({pT:r,pL:n,pW:s,pH:i,cT:f,cL:d,cW:p,cH:v,direction:b,containerHeight:this.nodes.offsetHeight}),w=this.theme.palette,M=c.nodeObj.branchColor||w[o%w.length];if(c.style.borderColor=M,this.lines.appendChild(Pu(y,M,"3")),t&&t!==l)continue;const S=Jn("subLines"),E=l.lastChild;E.tagName==="svg"&&E.remove(),l.appendChild(S),qu(this,S,M,l,b,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},qu=function(t,e,r,n,s,i){const a=n.firstChild,o=n.children[1].children;if(o.length===0)return;const l=a.offsetTop,c=a.offsetLeft,d=a.offsetWidth,f=a.offsetHeight;for(let p=0;p<o.length;p++){const v=o[p],b=v.firstChild,y=b.offsetTop,w=b.offsetLeft,M=b.offsetWidth,S=b.offsetHeight,E=b.firstChild.nodeObj.branchColor||r,D=t.generateSubBranch({pT:l,pL:c,pW:d,pH:f,cT:y,cL:w,cW:M,cH:S,direction:s,isFirst:i});e.appendChild(Pu(D,E,"2"));const I=b.children[1];if(I){if(!I.expanded)continue}else continue;qu(t,e,E,v,s)}},pl={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},ml={cn:pl,zh_CN:pl,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",linkBidirectional:"雙向連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",linkBidirectional:"Двунаправленная ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",linkBidirectional:"双方向リンク",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",linkBidirectional:"Link bidirecional",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi ge
.topic { font-family: Arial, sans-serif; font-size: 14px; color: #333; }
.markdown-content { font-size: 12px; line-height: 1.3; }
/* 表格样式 */
.markdown-table {
border-collapse: collapse;
width: 100%;
margin: 4px 0;
font-size: 11px;
border: 1px solid #e0e0e0;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
background-color: #fafafa;
overflow: hidden;
white-space: normal;
}
.markdown-table th,
.markdown-table td {
border: 1px solid #e0e0e0;
padding: 8px 12px;
text-align: left;
vertical-align: top;
position: relative;
white-space: normal;
}
.markdown-table th {
background-color: #f5f5f5;
font-weight: 600;
color: #333;
text-align: center;
border-bottom: 1px solid #d0d0d0;
}
.markdown-table td {
background-color: #fff;
}
.markdown-table tr:nth-child(even) td {
background-color: #f8f8f8;
}
.markdown-table tr:hover td {
background-color: #f0f8ff;
}
/* 移除多余的边框,保持简洁 */
.markdown-table th:not(:last-child),
.markdown-table td:not(:last-child) {
border-right: 1px solid #e0e0e0;
}
.markdown-table tr:not(:last-child) td {
border-bottom: 1px solid #e0e0e0;
}
`,i=await e.exportSvg(!1,s);if(!i)return;const a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=`${n}.${t}`,o.click(),URL.revokeObjectURL(a)}catch{alert(`导出${t.toUpperCase()}失败请重试`)}},qp={side:_p,left:Op,right:Lp,full:zp,living:$p,zoomin:Fp,zoomout:Bp,exportSvg:Pp},Ur=(t,e)=>{const r=document.createElement("span");return r.id=t,r.innerHTML=qp[e],r};function jp(t){try{const e=document.createElement("div"),r=Ur("fullscreen","full"),n=Ur("toCenter","living"),s=Ur("zoomout","zoomout"),i=Ur("zoomin","zoomin"),a=Ur("exportSvg","exportSvg");a.title="导出SVG矢量图";const o=document.createElement("span");return o.innerText="100%",e.appendChild(r),e.appendChild(n),e.appendChild(s),e.appendChild(i),e.appendChild(a),e.className="mind-elixir-toolbar rb",r.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},n.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},a.onclick=()=>{Hp("svg")(t)},setTimeout(()=>{const l=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function Up(t){const e=document.createElement("div"),r=Ur("tbltl","left"),n=Ur("tbltr","right"),s=Ur("tblts","side");return e.appendChild(r),e.appendChild(n),e.appendChild(s),e.className="mind-elixir-toolbar lt",r.onclick=()=>{t.initLeft()},n.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function Vp(t){try{if(!t.container)return;const e=jp(t),r=Up(t);t.container.append(e),t.container.append(r)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */class Wp{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,r){const n=this._listeners.get(e)??new Set;return this._listeners.set(e,n),n.add(r),this}removeEventListener(e,r){var n;return(n=this._listeners.get(e))==null||n.delete(r),this}dispatchEvent(e,...r){let n=!0;for(const s of this._listeners.get(e)??[])n=s(...r)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}}const vl=(t,e="px")=>typeof t=="number"?t+e:t,Fr=({style:t},e,r)=>{if(typeof e=="object")for(const[n,s]of Object.entries(e))s!==void 0&&(t[n]=vl(s));else r!==void 0&&(t[e]=vl(r))},bl=(t=0,e=0,r=0,n=0)=>{const s={x:t,y:e,width:r,height:n,top:e,left:t,right:t+r,bottom:e+n};return{...s,toJSON:()=>JSON.stringify(s)}},Gp=t=>{let e,r=-1,n=!1;return{next:(...s)=>{e=s,n||(n=!0,r=requestAnimationFrame(()=>{t(...e),n=!1}))},cancel:()=>{cancelAnimationFrame(r),n=!1}}},yl=(t,e,r="touch")=>{switch(r){case"center":{const n=e.left+e.width/2,s=e.top+e.height/2;return n>=t.left&&n<=t.right&&s>=t.top&&s<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},Kp=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Yp=()=>"safari"in window,ta=t=>Array.isArray(t)?t:[t],ju=t=>(e,r,n,s={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),r=ta(r),e=ta(e);for(const i of e)if(i)for(const a of r)i[t](a,n,{capture:!1,...s})},Br=ju("addEventListener"),Zt=ju("removeEventListener"),O0=t=>{var e;const{clientX:r,clientY:n,target:s}=((e=t.touches)==null?void 0:e[0])??t;return{x:r,y:n,target:s}},xn=(t,e=document)=>ta(t).map(r=>typeof r=="string"?Array.from(e.querySelectorAll(r)):r instanceof Element?r:null).flat().filter(Boolean),Xp=(t,e)=>e.some(r=>typeof r=="number"?t.button===r:typeof r=="object"?r.button!==t.button?!1:r.modifiers.every(n=>{switch(n){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:on,max:wl,min:xl,ceil:kl}=Math,Sl=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Uu=class extends Wp{constructor(e){var r,n,s,i,a;super(),this._selection=Sl(),th
`),o=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,l=parseFloat(e.fontSize);return a.forEach((c,d)=>{const f=document.createElementNS(Kt,"text");vt(f,{x:r+parseInt(e.paddingLeft)+"",y:n+parseInt(e.paddingTop)+l+o*d+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),f.innerHTML=c,s.appendChild(f)}),s}function ym(t,e,r,n){return e1(t,e,r,n)}function wm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Kt,"rect");return vt(i,{x:n+"",y:s+"",rx:r.borderRadius,ry:r.borderRadius,width:r.width,height:r.height,fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.borderWidth}),i}function z0(t,e,r=!1){const n=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=rn(t.nodes,e),a=document.createElementNS(Kt,"rect");vt(a,{x:s+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth});const o=document.createElementNS(Kt,"g");o.appendChild(a);let l;return r?l=ym(e,n,s,i):l=e1(e,n,s,i),o.appendChild(l),o}function xm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Kt,"a"),a=document.createElementNS(Kt,"text");return vt(a,{x:n+"",y:s+parseInt(r.fontSize)+"","text-anchor":"start","font-family":r.fontFamily,"font-size":`${r.fontSize}`,"font-weight":`${r.fontWeight}`,fill:`${r.color}`}),a.innerHTML=e.textContent,i.appendChild(a),i.setAttribute("href",e.href),i}async function km(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=rn(t.nodes,e),i=document.createElementNS(Kt,"image"),a=t.imageProxy?t.imageProxy(e.src):e.src,o=Math.min(parseInt(r.width)||300,300),l=Math.min(parseInt(r.height)||200,200);try{const c=await Sm(a);vt(i,{x:n+"",y:s+"",width:o+"",height:l+"",href:c})}catch{vt(i,{x:n+"",y:s+"",width:o+"",height:l+"",href:a})}return i}function Sm(t){return new Promise((e,r)=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{try{const s=document.createElement("canvas");s.width=n.width,s.height=n.height;const i=s.getContext("2d");if(!i){r(new Error("Failed to get canvas context"));return}i.drawImage(n,0,0);const a=s.toDataURL("image/png");e(a)}catch(s){r(s)}},n.onerror=()=>{r(new Error("Failed to load image"))},n.src=t})}const $0=100,Tm='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',Em=async(t,e=!1)=>{var r,n,s;const i=t.nodes,a=i.offsetHeight+$0*2,o=i.offsetWidth+$0*2,l=bm(a+"px",o+"px"),c=document.createElementNS(Kt,"svg"),d=document.createElementNS(Kt,"rect");vt(d,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(d),i.querySelectorAll(".subLines").forEach(y=>{const w=y.cloneNode(!0),{offsetLeft:M,offsetTop:S}=rn(i,y.parentElement);w.setAttribute("x",`${M}`),w.setAttribute("y",`${S}`),c.appendChild(w)});const f=(r=i.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=i.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const v=(s=i.querySelector(".summary"))==null?void 0:s.cloneNode(!0);v&&c.appendChild(v),i.querySelectorAll("me-tpc").forEach(y=>{if(y.nodeObj.dangerouslySetInnerHTML)c.appendChild(z0(t,y,!e));else{c.appendChild(wm(t,y));const w=!!(y.text&&y.text.innerHTML&&y.text.innerHTML!==y.text.textContent);c.appendChild(z0(t,y,e?!1:w))}}),i.querySelectorAll(".tags > span").forEach(y=>{c.appendChild(z0(t,y))}),i.querySelectorAll(".icons > span").forEach(y=>{c.appendChild(z0(t,y))}),i.querySelectorAll(".hyper-link").forEach(y=>{c.appendChild(xm(t,y))});const b=Array.from(i.querySelectorAll("img")).map(async y=>await km(t,y));return(await Promise.all(b)).forEach(y=>{c.appendChild(y)}),vt(c,{x:$0+"",y:$0+"",overflow:"visible"}),l.appendChild(c),l},Am=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),Tm+t.outerHTML);function Cm(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=s=>{e(s.target.result)},n.onerror=s=>{r(s)},n.re
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||e[r]&&B2[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Il=Symbol("internals");function Gn(t){return t&&String(t).trim().toLowerCase()}function rs(t){return t===!1||t==null?t:P.isArray(t)?t.map(rs):String(t)}function H2(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const q2=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wi(t,e,r,n,s){if(P.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!P.isString(e)){if(P.isString(n))return e.indexOf(n)!==-1;if(P.isRegExp(n))return n.test(e)}}function j2(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function U2(t,e){const r=P.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,i,a){return this[n].call(this,e,s,i,a)},configurable:!0})})}class Ks{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function i(o,l,c){const d=Gn(l);if(!d)throw new Error("header name must be a non-empty string");const f=P.findKey(s,d);(!f||s[f]===void 0||c===!0||c===void 0&&s[f]!==!1)&&(s[f||l]=rs(o))}const a=(o,l)=>P.forEach(o,(c,d)=>i(c,d,l));if(P.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(P.isString(e)&&(e=e.trim())&&!q2(e))a(P2(e),r);else if(P.isObject(e)&&P.isIterable(e)){let o={},l,c;for(const d of e){if(!P.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[c=d[0]]=(l=o[c])?P.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(o,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Gn(e),e){const n=P.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return H2(s);if(P.isFunction(r))return r.call(this,s,n);if(P.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Gn(e),e){const n=P.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||wi(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function i(a){if(a=Gn(a),a){const o=P.findKey(n,a);o&&(!r||wi(n,n[o],o,r))&&(delete n[o],s=!0)}}return P.isArray(e)?e.forEach(i):i(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!e||wi(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const r=this,n={};return P.forEach(this,(s,i)=>{const a=P.findKey(n,i);if(a){r[a]=rs(s),delete r[i];return}const o=e?j2(i):String(i).trim();o!==i&&delete r[i],r[o]=rs(s),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return P.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&P.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[Il]=this[Il]={accessors:{}}).accessors,s=this.prototype;function i(a){const o=Gn(a);n[o]||(U2(s,a),n[o]=!0)}return P.isArray(e)?e.forEach(i):i(e),this}}Ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(Ks.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});P.freezeMethods(Ks);const nr=Ks;function xi(t,e){const r=this||to,n=e||r,s=nr.from(n.headers);let i=n.data;return P.forEach(t,function(o){i=o.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function v1(t){return!!(t&&t.__CANCEL__)}function Pn(t,e,r){Me.call(this,t??"canceled",Me.ERR_CANCELED,e,r),this.name="CanceledError"}P.inherits(Pn,Me,{__CANCEL__:!0});function b1(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Me("Request failed with status code "+r.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function V2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function W2(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=n[i];a||(a=c),r[s]=l,n[s]=c;let f=i,p=0;for(;f!==s;)p+=r[f++],f=f%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-a<e)return;const v=d&&c-d;return v?Math.round(p*1e3/v):void 0}}function G2(t,e){let r=0,n=1e3/e,s,i;const a=(c,d=Date.now())=>{r=d,s=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?a(c,d):(s=c,i||(i=setTimeout(()=>{i=null,a(s)},n-f)))},()=>s&&a(s)]}const xs=(t,e,r=3)=>{let n=0;const s=W2(50,250);return G2(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-n,c=s(l),d=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&d?(o-a)/c:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},r)},_l=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ol=t=>(...e)=>P.asap(()=>t(...e)),K2=xt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,xt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,Y2=xt.hasStandardBrowserEnv?{write(t,e,r,n,s,i){const a=[t+"="+encodeURIComponent(e)];P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function X2(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function J2(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function y1(t,e,r){let n=!X2(e);return t&&(n||r==!1)?J2(t,e):e}const Ll=t=>t instanceof nr?{...t}:t;function pn(t,e){e=e||{};const r={};function n(c,d,f,p){return P.isPlainObject(c)&&P.isPlainObject(d)?P.merge.call({caseless:p},c,d):P.isPlainObject(d)?P.merge({},d):P.isArray(d)?d.slice():d}function s(c,d,f,p){if(P.isUndefined(d)){if(!P.isUndefined(c))return n(void 0,c,f,p)}else return n(c,d,f,p)}function i(c,d){if(!P.isUndefined(d))return n(void 0,d)}function a(c,d){if(P.isUndefined(d)){if(!P.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function o(c,d,f){if(f in e)return n(c,d);if(f in t)return n(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cance
`+i.map(Fl).join(`
`):" "+Fl(i[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:aa};function ki(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pn(null,t)}function Bl(t){return ki(t),t.headers=nr.from(t.headers),t.data=xi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),S1.getAdapter(t.adapter||to.adapter)(t).then(function(n){return ki(t),n.data=xi.call(t,t.transformResponse,n),n.headers=nr.from(n.headers),n},function(n){return v1(n)||(ki(t),n&&n.response&&(n.response.data=xi.call(t,t.transformResponse,n.response),n.response.headers=nr.from(n.response.headers))),Promise.reject(n)})}const T1="1.11.0",Xs={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Xs[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pl={};Xs.transitional=function(e,r,n){function s(i,a){return"[Axios v"+T1+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,o)=>{if(e===!1)throw new Me(s(a," has been removed"+(r?" in "+r:"")),Me.ERR_DEPRECATED);return r&&!Pl[a]&&(Pl[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,a,o):!0}};Xs.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function d3(t,e,r){if(typeof t!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const i=n[s],a=e[i];if(a){const o=t[i],l=o===void 0||a(o,i,t);if(l!==!0)throw new Me("option "+i+" must be "+l,Me.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Me("Unknown option "+i,Me.ERR_BAD_OPTION)}}const ns={assertOptions:d3,validators:Xs},or=ns.validators;class Ss{constructor(e){this.defaults=e||{},this.interceptors={request:new Rl,response:new Rl}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=pn(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&ns.assertOptions(n,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),s!=null&&(P.isFunction(s)?r.paramsSerializer={serialize:s}:ns.assertOptions(s,{encode:or.function,serialize:or.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ns.assertOptions(r,{baseUrl:or.spelling("baseURL"),withXsrfToken:or.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&P.merge(i.common,i[r.method]);i&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=nr.concat(a,i);const o=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,o.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let d,f=0,p;if(!l){const b=[Bl.bind(this),void 0];for(b.unshift(...o),b.push(...c),p=b.length,d=Promise.resolve(r);f<p;)d=d.then(b[f++],b[f++]);return d}p=o.length;let v=r;for(f=0;f<p;){const b=o[f++],y=o[f++];try{v=b(v)}catch(w){y.call(this,w);break}}try{d=Bl.call(this,v)}catch(b){return Promise.reject(b)}for(f=0,p=c.length;f<p;)d=d.then(c[f++],c[f++]);return d}getUri(e){e=pn(this.defaults,e);const r=y1(e.baseURL,e.url,e.allowAbsoluteUrls);return p1(r,e.params,e.paramsSerializer)}}P.forEach(["delete","get","head","options"],function(e){Ss.prototype[e]=function(r,n){return this.request(pn(n||{},{method:e,url:r,data:(n||{}).data}))}});P.forEach(["post","put","patch"],function(e){function r(n){return function(i,a,o){return this.request(pn(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Ss.prototype[e]=r(),Ss.prototype[e+"Form"]=r(!0)});const ss=Ss;class ro{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(o=>{n.subscribe(o),i=o}).then(s);return a.cancel=function(){n.unsubscribe(i)},a},e(function(i,a,o){n.reason||(n.reason=new Pn(i,a,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new ro(function(s){e=s}),cancel:e}}}const h3=ro;function f3(t){return function(r){return t.apply(null,r)}}function p3(t){return P.isObject(t)&&t.isAxiosError===!0}const oa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFiel
]`).replace("lheading",M1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},D3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,R3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,D1=/^( {2,}|\\)\n(?!\s*$)/,I3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zs=/[\p{P}\p{S}]/u,co=/[\s\p{P}\p{S}]/u,R1=/[^\s\p{P}\p{S}]/u,_3=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,co).getRegex(),I1=/(?!~)[\p{P}\p{S}]/u,O3=/(?!~)[\s\p{P}\p{S}]/u,L3=/(?:[^\s\p{P}\p{S}]|~)/u,z3=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,_1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$3=Pe(_1,"u").replace(/punct/g,Zs).getRegex(),F3=Pe(_1,"u").replace(/punct/g,I1).getRegex(),O1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",B3=Pe(O1,"gu").replace(/notPunctSpace/g,R1).replace(/punctSpace/g,co).replace(/punct/g,Zs).getRegex(),P3=Pe(O1,"gu").replace(/notPunctSpace/g,L3).replace(/punctSpace/g,O3).replace(/punct/g,I1).getRegex(),H3=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,R1).replace(/punctSpace/g,co).replace(/punct/g,Zs).getRegex(),q3=Pe(/\\(punct)/,"gu").replace(/punct/g,Zs).getRegex(),j3=Pe(/^<(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(),U3=Pe(oo).replace("(?:-->|$)","-->").getRegex(),V3=Pe("^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",U3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ts=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,W3=Pe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ts).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),L1=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ts).replace("ref",ao).getRegex(),z1=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ao).getRegex(),G3=Pe("reflink|nolink(?!\\()","g").replace("reflink",L1).replace("nolink",z1).getRegex(),uo={_backpedal:o0,anyPunctuation:q3,autolink:j3,blockSkip:z3,br:D1,code:R3,del:o0,emStrongLDelim:$3,emStrongRDelimAst:B3,emStrongRDelimUnd:H3,escape:D3,link:W3,nolink:z1,punctuation:_3,reflink:L1,reflinkSearch:G3,tag:V3,text:I3,url:o0},K3={...uo,link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ts).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ts).getRegex()},la={...uo,emStrongRDelimAst:P3,emStrongLDelim:F3,url:Pe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Y3={...la,br:Pe(D1).replace("{2,}","*").getRegex(),text:Pe(la.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},F0={normal:lo,gfm:M3,pedantic:N3},Kn={normal:uo,gfm:la,breaks:Y3,pedantic:K3},X3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"
`).map(i=>{let a=i.match(r.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=s.length?i.slice(s.length):i}).join(`
`)}var Es=class{constructor(t){je(this,"options");je(this,"rules");je(this,"lexer");this.options=t||vn}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Yn(r,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=Z3(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Yn(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Yn(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Yn(e[0],`
`).split(`
`),n="",s="",i=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),a=!0;else if(!a)o.push(r[l]);else break;r=r.slice(l);let c=o.join(`
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${c}`:c,s=s?`${s}
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,b=v.raw+`
`+r.join(`
`),y=this.blockquote(b);i[i.length-1]=y,n=n.substring(0,n.length-v.raw.length)+y.raw,s=s.substring(0,s.length-v.text.length)+y.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,b=v.raw+`
`+r.join(`
`),y=this.list(b);i[i.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,s=s.substring(0,s.length-v.raw.length)+y.raw,r=b.substring(i.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:s}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let i=this.rules.other.listItemRegex(r),a=!1;for(;t;){let l=!1,c="",d="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let f=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),p=t.split(`
`,1)[0],v=!f.trim(),b=0;if(this.options.pedantic?(b=2,d=f.trimStart()):v?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=f.slice(b),b+=e[1].length),v&&this.rules.other.blankLine.test(p)&&(c+=p+`
`,t=t.substring(p.length+1),l=!0),!l){let M=this.rules.other.nextBulletRegex(b),S=this.rules.other.hrRegex(b),E=this.rules.other.fencesBeginRegex(b),D=this.rules.other.headingBeginRegex(b),I=this.rules.other.htmlBeginRegex(b);for(;t;){let O=t.split(`
`,1)[0],$;if(p=O,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),$=p):$=p.replace(this.rules.other.tabCharGlobal," "),E.test(p)||D.test(p)||I.test(p)||M.test(p)||S.test(p))break;if($.search(this.rules.other.nonSpaceChar)>=b||!p.trim())d+=`
`+$.slice(b);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(f)||D.test(f)||S.test(f))break;d+=`
`+p}!v&&!p.trim()&&(v=!0),c+=O+`
`,t=t.substring(O.length+1),f=$.slice(b)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let y=null,w;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(w=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!y,checked:w,loose:!1,text:d,tokens:[]}),s.raw+=c}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l=0;l<s.items.length;l++)if(this.lexer.state.top=!1,s.items[l].tokens=this.lexer.blockTokens(s.items[l].text,[]),!s.loose){let c=s.items[l].tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let l=0;l<s.items.length;l++)s.items[l].loose=!0;return s}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:s}}}table(t){var a;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Ul(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<r.length;o++)i.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:i.align[o]});for(let o of s)i.rows.push(Ul(o,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Yn(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=J3(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],s=i[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Vl(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Vl(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,a,o=s,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+s);(n=c.exec(e))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&s%3&&!((s+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let d=[...n[0]][0].length,f=t.slice(0,s+n.index+d+a);if(Math.min(s,a)%2){let v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Cr=class ca{constructor(e){je(this,"tokens");je(this,"
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var s,i,a;for(this.options.pedantic&&(e=e.replace(Mt.tabCharGlobal," ").replace(Mt.spaceLine,""));e;){let o;if((i=(s=this.options.extensions)==null?void 0:s.block)!=null&&i.some(c=>(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,d=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var o,l,c;let n=e,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a="";for(;e;){i||(a=""),i=!1;let d;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(p=>(d=p.call({lexer:this},e,r))?(e=e.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let p=r.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(e,n,a)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),r.push(d);continue}let f=e;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0,v=e.slice(1),b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},v),typeof b=="number"&&b>=0&&(p=Math.min(p,b))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(a=d.raw.slice(-1)),i=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},As=class{constructor(t){je(this,"options");je(this,"parser");this.options=t||vn}space(t){return""}code({text:t,lang:e,escaped:r}){var i;let n=(i=(e||"").match(Mt.notSpaceStart))==null?void 0:i[0],s=t.replace(Mt.endingNewline,"")+`
`;return n?'<pre><code class="language-'+lr(n)+'">'+(r?s:lr(s,!0))+`</code></pre>
`:"<pre><code>"+(r?s:lr(s,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a<t.items.length;a++){let o=t.items[a];n+=this.listitem(o)}let s=e?"ol":"ul",i=e&&r!==1?' start="'+r+'"':"";return"<"+s+i+`>
`+n+"</"+s+`>
`}listitem(t){var r;let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+lr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);e+=this.tablerow({text:r});let n="";for(let s=0;s<t.rows.length;s++){let i=t.rows[s];r="";for(let a=0;a<i.length;a++)r+=this.tablecell(i[a]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+n+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${lr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),s=jl(t);if(s===null)return n;t=s;let i='<a href="'+t+'"';return e&&(i+=' title="'+lr(e)+'"'),i+=">"+n+"</a>",i}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=jl(t);if(s===null)return lr(r);t=s;let i=`<img src="${t}" alt="${r}"`;return e&&(i+=` title="${lr(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:lr(t.text)}},ho=class{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""}},Mr=class ua{constructor(e){je(this,"options");je(this,"renderer");je(this,"textRenderer");this.options=e||vn,this.options.renderer=this.options.renderer||new As,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ho}static parse(e,r){return new ua(r).parse(e)}static parseInline(e,r){return new ua(r).parseInline(e)}parse(e,r=!0){var s,i;let n="";for(let a=0;a<e.length;a++){let o=e[a];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[o.type]){let c=o,d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){n+=d||"";continue}}let l=o;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"def":{n+=this.renderer.def(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let c=l,d=this.renderer.text(c);for(;a+1<e.length&&e[a+1].type==="text";)c=e[++a],d+=`
`+this.renderer.text(c);r?n+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):n+=d;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,r=this.renderer){var s,i;let n="";for(let a=0;a<e.length;a++){let o=e[a];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=c||"";continue}}let l=o;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},Fi,is=(Fi=class{constructor(t){je(this,"options");je(this,"block");this.options=t||vn}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Cr.lex:Cr.lexInline}provideParser(){return this.block?Mr.parse:Mr.parseInline}},je(Fi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Fi),Q3=class{constructor(...t){je(this,"defaults",no());je(this,"options",this.setOptions);je(this,"parse",this.parseMarkdown(!0));je(this,"parseInline",this.parseMarkdown(!1));je(this,"Parser",Mr);je(this,"Renderer",As);je(this,"TextRenderer",ho);je(this,"Lexer",Cr);je(this,"Tokenizer",Es);je(this,"Hooks",is);this.use(...t)}walkTokens(t,e){var n,s;let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let a=i;for(let o of a.header)r=r.concat(this.walkTokens(o.tokens,e));for(let o of a.rows)for(let l of o)r=r.concat(this.walkTokens(l.tokens,e));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,e));break}default:{let a=i;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);r=r.concat(this.walkTokens(l,e))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=e.renderers[s.name];i?e.renderers[s.name]=function(...a){let o=s.renderer.apply(this,a);return o===!1&&(o=i.apply(this,a)),o}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[s.level];i?i.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),r.renderer){let s=this.defaults.renderer||new As(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,o=r.renderer[a],l=s[a];s[a]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d||""}}n.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Es(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,o=r.tokenizer[a],l=s[a];s[a]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}n.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new is;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].include
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+lr(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},mn=new Q3;function ze(t,e){return mn.parse(t,e)}ze.options=ze.setOptions=function(t){return mn.setOptions(t),ze.defaults=mn.defaults,A1(ze.defaults),ze};ze.getDefaults=no;ze.defaults=vn;ze.use=function(...t){return mn.use(...t),ze.defaults=mn.defaults,A1(ze.defaults),ze};ze.walkTokens=function(t,e){return mn.walkTokens(t,e)};ze.parseInline=mn.parseInline;ze.Parser=Mr;ze.parser=Mr.parse;ze.Renderer=As;ze.TextRenderer=ho;ze.Lexer=Cr;ze.lexer=Cr.lex;ze.Tokenizer=Es;ze.Hooks=is;ze.parse=ze;ze.options;ze.setOptions;ze.use;ze.walkTokens;ze.parseInline;Mr.parse;Cr.lex;var Wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function w8(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var $1={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function S(E){return E instanceof l?new l(E.type,S(E.content),E.alias):Array.isArray(E)?E.map(S):E.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++i}),S.__id},clone:function S(E,D){D=D||{};var I,O;switch(o.util.type(E)){case"Object":if(O=o.util.objId(E),D[O])return D[O];I={},D[O]=I;for(var $ in E)E.hasOwnProperty($)&&(I[$]=S(E[$],D));return I;case"Array":return O=o.util.objId(E),D[O]?D[O]:(I=[],D[O]=I,E.forEach(function(K,G){I[G]=S(K,D)}),I);default:return E}},getLanguage:function(S){for(;S;){var E=s.exec(S.className);if(E)return E[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,E){S.className=S.className.replace(RegExp(s,"gi"),""),S.classList.add("language-"+E)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(I){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack)||[])[1];if(S){var E=document.getElementsByTagName("script");for(var D in E)if(E[D].src==S)return E[D]}return null}},isActive:function(S,E,D){for(var I="no-"+E;S;){var O=S.classList;if(O.contains(E))return!0;if(O.contains(I))return!1;S=S.parentElement}return!!D}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(S,E){var D=o.util.clone(o.languages[S]);for(var I in E)D[I]=E[I];return D},insertBefore:function(S,E,D,I){I=I||o.languages;var O=I[S],$={};for(var K in O)if(O.hasOwnProperty(K)){if(K==E)for(var G in D)D.hasOwnProperty(G)&&($[G]=D[G]);D.hasOwnProperty(K)||($[K]=O[K])}var pe=I[S];return I[S]=$,o.languages.DFS(o.languages,function(ye,Ee){Ee===pe&&ye!=S&&(this[ye]=$)}),$},DFS:function S(E,D,I,O){O=O||{};var $=o.util.objId;for(var K in E)if(E.hasOwnProperty(K)){D.call(E,K,E[K],I||K);var G=E[K],pe=o.util.type(G);pe==="Object"&&!O[$(G)]?(O[$(G)]=!0,S(G,D,null,O)):pe==="Array"&&!O[$(G)]&&(O[$(G)]=!0,S(G,D,K,O))}}},plugins:{},highlightAll:function(S,E){o.highlightAllUnder(document,S,E)},highlightAllUnder:function(S,E,D){var I={callback:D,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",I),I.elements=Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)),o.hooks.run("before-all-elements-highlight",I);for(var O=0,$;$=I.elements[O++];)o.highlightElement($,E===!0,I.callback)},highlightElement:function(S,E,D){var I=o.util.getLanguage(S),O=o.languages[I];o.util.setLanguage(S,I);var $=S.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&o.util.setLanguage($,I);var K=S.textContent,G={element:S,language:I,grammar:O,code:K};function pe(Ee){G.highlightedCode=Ee,o.hooks.run("before-insert",G),G.element.innerHTML=G.highlightedCode,o.hooks.run("after-highlight",G),o.hooks.run("complete",G),D&&D.call(G.element)}if(o.hooks.run("before-sanity-check",G),$=G.element.parentElement,$&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!G.code){o.hooks.run("complete",G),D&&D.call(G.element);return}if(o.hooks.run("before-highlight",G),!G.grammar){pe(o.util.encode(G.code));return}if(E&&n.Worker){var ye=new Worker(o.filename);ye.onmessage=function(Ee){pe(Ee.data)},ye.postMessage(JSON.stringify({language:G.language,code:G.code,immediateClose:!0}))}else pe(o.highlight(G.code,G.grammar,G.language))},highlight:function(S,E,D){var I={code:S,grammar:E,language:D};if(o.hooks.run("before-tokenize",I),!I.grammar)throw new Error('The language "'+I.language+'" has no grammar.');return I.tokens=o.tokenize(I.code,I.grammar),o.hooks.run("after-tokenize",I),l.stringify(o.util.encode(I.tokens),I.language)},tokenize:function(S,E){var D=E.rest;if(D){for(var I in D)E[I]=D[I];delete E.rest}var O=new f;return p(O,
`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(G+1))}M.textContent=O,r.highlightElement(M)},function(O){w.setAttribute(o,d),M.textContent=O})}}),r.plugins.fileHighlight={highlight:function(w){for(var M=(w||document).querySelectorAll(f),S=0,E;E=M[S++];)r.highlightElement(E)}};var b=!1;r.fileHighlight=function(){b||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),b=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})($1);var t6=$1.exports;const Gl=e6(t6);class $t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new $t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Gt{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Gt(r,$t.range(this,e))}}class re{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,s,i,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;s=a.start,i=a.end,s===o.length?n+=" at end of input: ":n+=" at position "+(s+1)+": ";var l=o.slice(s,i).replace(/[^]/g,"$&̲"),c;s>15?c="…"+o.slice(s-15,s):c=o.slice(0,s);var d;i+15<o.length?d=o.slice(i,i+15)+"…":d=o.slice(i),n+=c+l+d}var f=new Error(n);return f.name="ParseError",f.__proto__=re.prototype,f.position=s,s!=null&&i!=null&&(f.length=i-s),f.rawMessage=e,f}}re.prototype.__proto__=Error.prototype;var r6=function(e,r){return e.indexOf(r)!==-1},n6=function(e,r){return e===void 0?r:e},s6=/([A-Z])/g,i6=function(e){return e.replace(s6,"-$1").toLowerCase()},a6={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},o6=/[&><"']/g;function l6(t){return String(t).replace(o6,e=>a6[e])}var F1=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},c6=function(e){var r=F1(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},u6=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},d6=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},be={contains:r6,deflt:n6,escape:l6,hyphenate:i6,getBaseElem:F1,isCharacterBox:c6,protocolFromUrl:d6},as={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-a
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},x6=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},k6=function(e,r){return"M983 "+(10+e+r)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},S6=function(e,r){return"M424,"+(2398+e+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
h400000v`+(40+e)+"h-400000z"},T6=function(e,r){return"M473,"+(2713+e+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},E6=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},A6=function(e,r,n){var s=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},C6=function(e,r,n){r=1e3*r;var s="";switch(e){case"sqrtMain":s=w6(r,Sn);break;case"sqrtSize1":s=x6(r,Sn);break;case"sqrtSize2":s=k6(r,Sn);break;case"sqrtSize3":s=S6(r,Sn);break;case"sqrtSize4":s=T6(r,Sn);break;case"sqrtTall":s=A6(r,Sn,n)}return s},M6=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},Kl={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},N6=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class E0{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return be.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=r=>r.toText();return this.children.map(e).join("")}}var fr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.755
`+$+" children.");for(var ye=0;ye<$;ye++){var Ee=new Jr(E[ye]),Ge=new _r([Ee],{width:"400em",height:ae(O),viewBox:"0 0 "+o+" "+I,preserveAspectRatio:G[ye]+" slice"}),qe=z.makeSvgSpan([K[ye]],[Ge],r);if($===1)return{span:qe,minWidth:D,height:O};qe.style.height=ae(O),M.push(qe)}return{span:z.makeSpan(["stretchy"],M,r),minWidth:D,height:O}}}var{span:s,minWidth:i,height:a}=n();return s.height=a,s.style.height=ae(a),i>0&&(s.style.minWidth=ae(i)),s},p5=function(e,r,n,s,i){var a,o=e.height+e.depth+n+s;if(/fbox|color|angl/.test(r)){if(a=z.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new _r(c,{width:"100%",height:ae(o)});a=z.makeSvgSpan([],[d],i)}return a.height=o,a.style.height=ae(o),a},Lr={encloseSpan:p5,mathMLnode:u5,svgSpan:f5};function De(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function wo(t){var e=ti(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function ti(t){return t&&(t.type==="atom"||B6.hasOwnProperty(t.type))?t:null}var xo=(t,e)=>{var r,n,s;t&&t.type==="supsub"?(n=De(t.base,"accent"),r=n.base,t.base=r,s=$6(Le(t,e)),t.base=n):(n=De(t,"accent"),r=n.base);var i=Le(r,e.havingCrampedStyle()),a=n.isShifty&&be.isCharacterBox(r),o=0;if(a){var l=be.getBaseElem(r),c=Le(l,e.havingCrampedStyle());o=Zl(c).skew}var d=n.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Lr.svgSpan(n,e),p=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ae(2*o)+")",marginLeft:ae(2*o)}:void 0}]},e);else{var v,b;n.label==="\\vec"?(v=z.staticSvg("vec",e),b=z.svgData.vec[1]):(v=z.makeOrd({mode:n.mode,text:n.label},e,"textord"),v=Zl(v),v.italic=0,b=v.width,d&&(f+=v.depth)),p=z.makeSpan(["accent-body"],[v]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),f=i.height);var w=o;y||(w-=b/2),p.style.left=ae(w),n.label==="\\textcircled"&&(p.style.top=".2em"),p=z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var M=z.makeSpan(["mord","accent"],[p],e);return s?(s.children[0]=M,s.height=Math.max(M.height,s.height),s.classes[0]="mord",s):M},ed=(t,e)=>{var r=t.isStretchy?Lr.mathMLnode(t.label):new ee.MathNode("mo",[Xt(t.label,t.mode)]),n=new ee.MathNode("mover",[We(t.base,e),r]);return n.setAttribute("accent","true"),n},m5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ce({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Rs(e[0]),n=!m5.test(t.funcName),s=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:s,base:r}},htmlBuilder:xo,mathmlBuilder:ed});ce({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:xo,mathmlBuilder:ed});ce({type:"accentUnder",names:["\\underleftarrow","\
]`,q5="\\\\[a-zA-Z@]+",j5="\\\\[^\uD800-\uDFFF]",U5="("+q5+")"+Cd+"*",V5=`\\\\(
|[ \r ]+
?)[ \r ]*`,ya="[̀-ͯ]",W5=new RegExp(ya+"+$"),G5="("+Cd+"+)|"+(V5+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ya+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ya+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+U5)+("|"+j5+")");class Sc{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(G5,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Gt("EOF",new $t(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new re("Unexpected character: '"+e[r]+"'",new Gt(e[r],new $t(this,r,r+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=e.indexOf(`
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Gt(s,new $t(this,r,this.tokenRegex.lastIndex))}}class K5{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new re("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var Y5=gd;g("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});g("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});g("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});g("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});g("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});g("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");g("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Tc={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};g("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new re("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Tc[e.text],n==null||n>=r)throw new re("Invalid base-"+r+" digit "+e.text);for(var s;(s=Tc[t.future().text])!=null&&s<r;)n*=r,n+=s,t.popToken()}return"\\@char{"+n+"}"});var No=(t,e,r,n)=>{var s=t.consumeArg().tokens;if(s.length!==1)throw new re("\\newcommand's first argument must be a macro name");var i=s[0].text,a=t.isDefined(i);if(a&&!e)throw new re("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new re("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=t.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new re("Invalid number of arguments: "+l);o=parseInt(l),s=t.consumeArg().tokens}return a&&n||t.macros.set(i,{tokens:s,numArgs:o}),""};g("\\newcommand",t=>No(t,!1,!0,!1));g("\\renewcommand",t=>No(t,!0,!1,!1));g("\\providecommand",t=>No(t,!0,!0,!0));g("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});g("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});g("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Vr[r],Je.math[r],Je.text[r]),""});g("\\bgroup","{");g("\\egroup","}");g("~","\\nobreakspace");g("\\lq","`");g("\\rq","'");g("\\aa","\\r a");g("\\AA","\\r A");g("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");g("\\copyright","\\TextOrMath{
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:s}}Cc.hasOwnProperty(r[0])&&!Je[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=Cc[r[0]]+r.slice(1));var i=W5.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var a;if(Je[this.mode][r]){this.settings.strict&&this.mode==="math"&&pa.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Je[this.mode][r].group,l=$t.range(e),c;if(F6.hasOwnProperty(o)){var d=o;c={type:"atom",mode:this.mode,family:d,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};a=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(B1(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:$t.range(e),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var p=i[0][f];if(!$i[p])throw new re("Unknown accent ' "+p+"'",e);var v=$i[p][this.mode]||$i[p].text;if(!v)throw new re("Accent "+p+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:$t.range(e),label:v,isStretchy:!1,isShifty:!0,base:a}}return a}}ii.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Ro=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new ii(e,r);delete n.gullet.macros.current["\\df@tag"];var s=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new re("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:n.subparse([new Gt("\\df@tag")])}]}return s},Rd=function(e,r,n){r.textContent="";var s=Io(e,n).toNode();r.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Rd=function(){throw new re("KaTeX doesn't work in quirks mode.")});var J5=function(e,r){var n=Io(e,r).toMarkup();return n},Z5=function(e,r){var n=new fo(r);return Ro(e,n)},Id=function(e,r,n){if(n.throwOnError||!(e instanceof re))throw e;var s=z.makeSpan(["katex-error"],[new Yt(r)]);return s.setAttribute("title",e.toString()),s.setAttribute("style","color:"+n.errorColor),s},Io=function(e,r){var n=new fo(r);try{var s=Ro(e,n);return o5(s,e,n)}catch(i){return Id(i,e,n)}},Q5=function(e,r){var n=new fo(r);try{var s=Ro(e,n);return l5(s,e,n)}catch(i){return Id(i,e,n)}},e7="0.16.22",t7={Span:A0,Anchor:go,SymbolNode:Yt,SvgNode:_r,PathNode:Jr,LineNode:fa},Mc={version:e7,render:Rd,renderToString:J5,ParseError:re,SETTINGS_SCHEMA:as,__parse:Z5,__renderToDomTree:Io,__renderToHTMLTree:Q5,__setFontMetrics:D6,__defineSymbol:u,__defineFunction:ce,__defineMacro:g,__domTree:t7};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\
`);let r=!1,n=!1;for(const a of e){const o=a.trim();o.includes("|")&&o.split("|").length>=3&&(r=!0),o.includes("|")&&o.includes("-")&&/^[\s\|\-\:]+$/.test(o)&&(n=!0)}const s=(t.match(/\|/g)||[]).length,i=s>=6;return r&&n||r&&i||r&&s>=4},a7=t=>!t||typeof t!="string"?!1:i7(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(r=>r.test(t)),K0=t=>!t||typeof t!="string"?t||"":a7(t)||t.includes("|")?v0(t):t;const _o=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},o7={class:"mindmap-container"},l7={key:0,class:"welcome-page"},c7={class:"ai-input-content"},u7=["disabled","onKeydown"],d7={class:"ai-input-actions"},h7=["disabled"],f7=["disabled"],p7={key:0},m7={key:1},g7={key:3,class:"save-controls"},v7={__name:"MindMap",setup(t,{expose:e}){const r=Oe(null),n=Oe(null),s=Oe(null),i=Oe({}),a=Oe({}),o=Oe(null),l=Oe(1),c=Oe(!0),d=Oe(!1),f=Oe(!1),p=Oe(null),v=Oe(""),b=Oe(!1);Oe(new Map),Oe(!1),Oe({x:0,y:0}),Oe(null);const y=()=>{c.value=!0,r.value&&(r.value.innerHTML=""),n.value&&(n.value=null)},w=()=>{c.value=!1},M=()=>{c.value=!1},S=()=>{if(!n.value||!r.value)return null;try{const k=r.value.querySelector(".map-canvas");if(k){const A=k.style.transform,_=n.value.scaleVal||1;return console.log("📍 保存位置:",{transform:A,scaleVal:_}),{transform:A,scaleVal:_}}}catch(k){console.warn("保存位置失败:",k)}return null},E=k=>{if(!(!k||!r.value||!n.value))try{const A=r.value.querySelector(".map-canvas");A&&k.transform&&(A.style.setProperty("transform",k.transform,"important"),k.scaleVal&&n.value.scaleVal!==k.scaleVal&&(n.value.scaleVal=k.scaleVal),A.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:k.transform,scaleVal:k.scaleVal}))}catch(A){console.warn("恢复位置失败:",A)}},D=async(k,A=!1,_=!0)=>{try{const q=A?S():null;q?console.log("📍 保存当前位置用于保持原位:",q):!A&&!_&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",k),console.log("🔍 数据字段:",Object.keys(k||{})),k&&k.id?(o.value=k.id,console.log("🔍 设置当前思维导图ID (data.id):",k.id)):k&&k.mindmapId?(o.value=k.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",k.mindmapId)):k&&k.nodeData&&k.nodeData.mindmapId?(o.value=k.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",k.nodeData.mindmapId)):k&&k.nodeData&&k.nodeData.mindmap_id?(o.value=k.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",k.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(k||{})),k&&k.nodeData&&console.log("🔍 nodeData字段:",Object.keys(k.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",o.value),w(),await X0(),r.value||(console.warn("⚠️ 思维导图容器未准备好等待DOM更新..."),await new Promise(Q=>setTimeout(Q,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){console.log("🔍 创建Mind Elixir实例设置markdown函数"),n.value=new gt({el:r.value,direction:gt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(Y,F)=>Y.includes("|")||Y.includes("**")||Y.includes("`")||Y.includes("#")||Y.includes("![")?K0(Y):Y,imageProxy:Y=>Y.startsWith("http://")||Y.startsWith("https://")?Y:Y.startsWith("/")?window.location.origin+Y:window.location.origin+"/"+Y}),console.log("✅ Mind Elixir实例创建完成markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",k);const Q=n.value.init(k);console.log("✅ Mind Elixir实例创建成功初始化结果:",Q),q?(E(q),console.log("📍 初始化后立即恢复位置")):!A&&!_&&console.log("📍 跳过根节点居中,等待居中新节点")}else{console.warn("⚠
font-size: 11px;
color: #666;
margin-top: 6px;
padding: 6px 8px;
background: rgba(0, 0, 0, 0.03);
border-radius: 4px;
max-width: 250px;
word-wrap: break-word;
line-height: 1.3;
border-left: 3px solid #e0e0e0;
display: block;
`,A.appendChild(he));const fe=Y.data.des;fe.length>150?(he.textContent=fe.substring(0,150)+"...",he.title=fe):he.textContent=fe}})},1e3)},O=()=>{try{if(n.value&&n.value.toCenter){n.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const k=r.value;if(!k)return;const A=k.querySelector(".map-canvas");if(!A)return;const _=A.querySelectorAll("me-tpc");if(_.length===0)return;let q=1/0,Q=-1/0,Y=1/0,F=-1/0;_.forEach(M0=>{const yn=M0.getBoundingClientRect(),N0=k.getBoundingClientRect(),Oo=yn.left-N0.left,Lo=yn.top-N0.top;q=Math.min(q,Oo),Q=Math.max(Q,Oo+yn.width),Y=Math.min(Y,Lo),F=Math.max(F,Lo+yn.height)});const he=(q+Q)/2,fe=(Y+F)/2,ge=k.clientWidth/2,Ie=k.clientHeight/2,$e=ge-he,mt=Ie-fe;A.style.transform=`translate(${$e}px, ${mt}px)`,A.style.opacity="1",A.style.transition="opacity 0.3s ease";const Rt=100,Jt=Math.max($e,Rt),yr=Math.max(mt,Rt);A.style.transform=`translate(${Jt}px, ${yr}px)`,A.style.opacity="1",A.style.visibility="visible"}catch{}},$=async k=>{if(!(!n.value||!k))try{console.log("🎯 开始处理新节点:",k);let A=null,_=0;const q=5;for(;!A&&_<q;)A=n.value.findEle(k),A||(_++,await new Promise(Q=>setTimeout(Q,50)));A?(console.log("✅ 找到节点元素:",A),n.value.scrollIntoView&&(n.value.scrollIntoView(A),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{n.value.beginEdit&&(n.value.beginEdit(A),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",k)}catch(A){console.error("❌ 居中显示节点失败:",A)}},K=()=>{if(!s.value)return;if(n.value&&n.value.getNodeById)try{const A=n.value.getNodeById(s.value.id);if(A){const _=A.getBoundingClientRect(),q=r.value.getBoundingClientRect(),Q=_.left-q.left+_.width/2,Y=_.bottom-q.top+10;i.value={left:`${Q}px`,top:`${Y}px`};return}}catch{}let k=document.querySelector(`[data-id="${s.value.id}"]`);if(k||(k=document.querySelector(`.topic[data-id="${s.value.id}"]`)),k||(k=document.querySelector(`[data-node-id="${s.value.id}"]`)),k||(k=document.querySelector(`[data-nodeid="me${s.value.id}"]`)),!k){const A=document.querySelectorAll("me-tpc");for(const _ of A)if(_.getAttribute("data-nodeid")===`me${s.value.id}`){k=_;break}}if(!k){const A=document.querySelectorAll(".topic");for(const _ of A)if(_.textContent.trim()===s.value.topic){k=_;break}}if(k){const A=k.getBoundingClientRect(),_=r.value.getBoundingClientRect(),q=A.left-_.left+A.width/2,Q=A.bottom-_.top+10;i.value={left:`${q}px`,top:`${Q}px`}}else i.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},G=async()=>{s.value&&(await Z(s.value),s.value=null)},pe=async()=>{s.value&&(await ie(s.value),s.value=null)},ye=async()=>{s.value&&(await we(s.value),s.value=null)},Ee=async()=>{if(!s.value)return;console.log("Ask AI for node:",s.value);const k=parseFloat(i.value.left)||0,A=parseFloat(i.value.top)||0;a.value={left:`${k}px`,top:`${A+60}px`,transform:"translateX(-50%)"},f.value=!0,p.value=s.value},Ge=()=>{f.value=!1,p.value=null,v.value="",b.value=!1,s.value=null},qe=k=>{if(!k)return"";const A=[];return k.parent&&k.parent.topic&&A.push(`父节点: ${k.parent.topic}`),k.parent&&k.parent.parent&&k.parent.parent.topic&&A.push(`祖父节点: ${k.parent.parent.topic}`),A.join(" | ")},st=k=>{k.ctrlKey||k.metaKey||(k.preventDefault(),_e())},_e=async()=>{if(!(!v.value.trim()||!p.value||b.value)){b.value=!0;try{const k="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",A=`节点信息
当前节点${p.value.topic}
上下文${qe(p.value)}
用户问题${v.value}
请给出详细的回答回答应该
1. 直接回答用户的问题
2. 提供具体的建议或改进方案
3. 保持专业和有用的语调
4. 回答长度适中便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:k,userPrompt:A});const _=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:k,user_prompt:A,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);let q="";const Q=_.body.getReader(),Y=new TextDecoder;let F="";for(;;){const{done:he,value:fe}=await Q.read();if(he)break;F+=Y.decode(fe,{stream:!0});const ge=F.split(`
`);F=ge.pop()||"";for(const Ie of ge)if(Ie.startsWith("data: "))try{const $e=JSON.parse(Ie.slice(6));if($e.type==="chunk")q+=$e.content;else if($e.type==="error")throw new Error($e.content)}catch($e){console.warn("解析流式数据失败:",$e)}}await Ze(p.value,v.value,q),Ge()}catch(k){console.error("AI请求失败:",k),alert("AI请求失败请稍后重试")}finally{b.value=!1}}},Ce=k=>k.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(A,_)=>{if(_.includes(":")){const q=_.split(":");if(q.length>1)return`${q[0]}: ${q.slice(1).join(":")}`}return`${_}`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
`).replace(/\n/g,`
`),ve=(k,A,_)=>{const q=k.split(`
`);let Q=_,Y=[];for(let F=0;F<q.length;F++){const fe=q[F].trim(),ge=fe.match(/^[-*+]\s*【(.+)】/);if(ge){const Ie=ge[1].trim(),$e={id:`node_${Q++}`,topic:Ie,children:[],level:(A.level||0)+1,data:{}};let mt=[],Rt=F+1;for(;Rt<q.length;){const Jt=q[Rt].trim();if(Jt.match(/^[-*+]\s*【(.+)】/))break;const M0=Jt.match(/^[-*+]\s+(.+)$/);if(M0){const yn=M0[1].trim(),N0=Ce(yn);mt.push("• "+N0)}Rt++}if(mt.length>0){const Jt=Ce(mt.join(`
`));$e.topic=$e.topic+`
`+Jt}A.children.push($e),F=Rt-1}else fe&&Y.push(fe)}if(Y.length>0){const F=Y.join(`
`).trim();F&&F.split(`
`).filter(fe=>fe.trim()).forEach(fe=>{const ge=Ce(fe.trim());if(ge){const Ie={id:`node_${Q++}`,topic:ge,children:[],level:(A.level||0)+1,data:{}};A.children.push(Ie)}})}return{nodeCounter:Q}},Ke=k=>{const A=k.split(`
`);let _=null;const q=[];let Q=0,Y=[];if(A.forEach((F,he)=>{const fe=F.trim(),ge=fe.match(/^(#{1,6})\s+(.+)$/);if(ge){if(Y.length>0&&q.length>0){const Jt=Y.join(`
`).trim();Jt&&(Q=ve(Jt,q[q.length-1],Q).nodeCounter),Y=[]}const Ie=ge[1].length,$e=ge[2].trim(),mt=Ce($e),Rt={id:`node_${Q++}`,topic:mt,children:[],level:Ie,data:{}};if(Ie===1&&!_)_=Rt,q.length=0,q.push(_);else{for(;q.length>1&&q[q.length-1].level>=Ie;)q.pop();q.length>0&&q[q.length-1].children.push(Rt),q.push(Rt)}}else fe&&Y.push(fe)}),Y.length>0&&q.length>0){const F=Y.join(`
`).trim();F&&(Q=ve(F,q[q.length-1],Q).nodeCounter)}return _||(_={id:"root",topic:"根节点",children:[],data:{}}),_},Ze=async(k,A,_)=>{var q,Q,Y;try{const he=(yr=>yr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
`).trim())(_),fe=`# ${A}
${he}`,ge=Ke(fe),Ie={title:A,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:k.id,isRoot:!1},$e=[];if(ge.children&&ge.children.length>0&&ge.children.forEach(yr=>{$e.push({title:yr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",o.value),!o.value)throw new Error("没有找到当前思维导图ID无法创建节点");const mt=await it.addNodes(o.value,[Ie]);if(!mt.data||!mt.data.success)throw new Error("AI父节点创建失败");const Rt=(Y=(Q=(q=mt.data.data)==null?void 0:q.nodes)==null?void 0:Q[0])==null?void 0:Y.id;if(!Rt)throw new Error("无法获取创建的父节点ID");$e.forEach(yr=>{yr.parentId=Rt});let Jt=null;if($e.length>0&&(Jt=await it.addNodes(o.value,$e)),mt.data&&mt.data.success)await oe();else throw new Error("AI父节点创建失败")}catch(F){console.error("创建AI节点失败:",F),alert("创建AI回答节点失败: "+F.message)}},Ye=async()=>{if(s.value){try{const k=s.value.topic||s.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(k),me();else{const A=document.createElement("textarea");A.value=k,A.style.position="fixed",A.style.left="-999999px",A.style.top="-999999px",document.body.appendChild(A),A.focus(),A.select();const _=document.execCommand("copy");document.body.removeChild(A),_?me():St()}}catch{St()}s.value=null}},me=()=>{const k=document.createElement("div");k.textContent="文本已复制到剪贴板",k.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #4CAF50;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`;const A=document.createElement("style");A.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
`,document.head.appendChild(A),document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k),A.parentNode&&A.parentNode.removeChild(A)},3e3)},St=()=>{const k=document.createElement("div");k.textContent="复制失败,请手动复制",k.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #f44336;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},3e3)},ot=(k,A="success")=>{const _=document.createElement("div");_.textContent=k;const q=A==="success"?"#4CAF50":A==="error"?"#f44336":"#ff9800";_.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: ${q};
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(_),setTimeout(()=>{_.parentNode&&_.parentNode.removeChild(_)},2e3)},ft=()=>{const k=document.createElement("div");k.textContent="✅ 节点编辑已保存",k.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #4CAF50;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},2e3)},pt=()=>{const k=document.createElement("div");k.textContent="❌ 节点编辑保存失败",k.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #f44336;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(k),setTimeout(()=>{k.parentNode&&k.parentNode.removeChild(k)},3e3)},lt=async k=>{try{console.log("🎯 处理节点拖拽操作:",k.name),console.log("📦 操作详情:",{name:k.name,objs:k.objs,toObj:k.toObj}),setTimeout(async()=>{var A;try{const _=k.objs||[],q=k.toObj;if(!_.length||!q){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${_.length} 个节点的父子关系`);let Q=null;k.name==="moveNodeIn"?(Q=q.id,console.log(`📌 拖入操作新父节点为 ${Q}`)):(k.name==="moveNodeBefore"||k.name==="moveNodeAfter")&&(Q=((A=q.parent)==null?void 0:A.id)||null,console.log(`📌 拖到兄弟位置新父节点为 ${Q||"根节点"}`));const Y=_.map(async ge=>{try{console.log(`🔄 更新节点 ${ge.id} 的父节点为 ${Q||"根节点"}`);const Ie=await it.updateNode(ge.id,{newParentId:Q});return Ie.data&&Ie.data.success?(console.log(` 节点 ${ge.id} 父子关系更新成功`),{success:!0,nodeId:ge.id}):(console.warn(` 节点 ${ge.id} 父子关系更新失败:`,Ie),{success:!1,nodeId:ge.id})}catch(Ie){return console.error(` 节点 ${ge.id} 父子关系更新失败:`,Ie),{success:!1,nodeId:ge.id,error:Ie}}}),F=await Promise.all(Y),he=F.filter(ge=>ge.success).length,fe=F.filter(ge=>!ge.success).length;console.log(`📊 拖拽保存结果: ${he} 成功, ${fe} 失败`)}catch(_){console.error("❌ 保存拖拽后的结构失败:",_),ot("❌ 节点拖拽保存失败","error")}},500)}catch(A){console.error("❌ 处理节点拖拽操作失败:",A)}},U=async k=>{try{const A=k.obj;A?await V(A):console.error("无法解析编辑操作:",k)}catch(A){console.error("处理编辑完成失败:",A)}},V=async k=>{var A,_;try{if(!o.value){console.error("无法获取思维导图ID");return}const q=await it.updateNode(k.id,{newTitle:k.topic,newDes:((A=k.data)==null?void 0:A.des)||"",newParentId:k.parentId||((_=k.parent)==null?void 0:_.id)});q.data&&q.data.success?ft():(console.error("更新节点编辑失败:",q.data),pt())}catch(q){console.error("更新节点编辑失败:",q),pt()}},Z=async k=>{var A;try{await x();const _=o.value||k.mindmap_id||k.mindmapId;if(!_){console.error("无法获取思维导图ID");return}const q=await it.addNodes(_,[{title:"新子节点",des:"子节点描述",parentId:k.id}]);if(q.data&&q.data.success){const Q=((A=q.data.data)==null?void 0:A.nodes)||[];if(Q.length>0){const Y=Q[0];try{await new Promise(he=>setTimeout(he,800));const F=await it.getMindmap(_);if(F.data&&F.data.nodeData){await D(F.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",Y.id),await $(Y.id)}catch(he){console.error("居中显示新节点失败:",he)}}else throw new Error("无法获取思维导图数据")}catch(F){console.error("刷新思维导图失败:",F)}}}}catch(_){console.error("添加子节点失败:",_)}},ie=async k=>{var A;try{await x(),console.log("添加兄弟节点到API:",k.id),console.log("节点信息:",{id:k.id,parentId:k.parentId,parent:k.parent,mindmap_id:k.mindmap_id,mindmapId:k.mindmapId});const _=o.value||k.mindmap_id||k.mindmapId;if(!_){console.error("无法获取思维导图ID");return}let q=k.parentId;!q&&k.parent&&(q=k.parent.id);const Q=await it.addNodes(_,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:q}]);if(console.log("添加兄弟节点响应:",Q),Q.data&&Q.data.success){const Y=((A=Q.data.data)==null?void 0:A.nodes)||[];if(Y.length>0){const F=Y[0];console.log("新创建的兄弟节点:",F),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const he=await it.getMindmap(_);if(he.data&&he.data.nodeData){await D(he.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",F.id),await $(F.id)}catch(fe){console.error("居中显示新节点失败:",fe)}}else throw new Error("无法获取思维导图数据")}catch(he){console.error("重新初始化失败,使用完整重新加载:",he);const fe=await it.getMindmap(_);fe.data&&fe.data.nodeData&&await D(fe.data,!0,!1)}}}}catch(_){console.error("添加兄弟节点失败:",_)}}
1. 提取主要主题和关键概念
2. 组织成层次分明的结构
3. 使用清晰的标题和子标题
4. 保持内容的逻辑性和完整性
5. 对于长文档请确保完整处理所有内容不要截断
6. **重要如果原文档中包含图片请按以下方式处理
- 识别图片在文档中的位置和上下文
- 根据图片内容生成准确的描述文字
- 在相应位置插入图片占位符![图片描述](图片路径)
- 图片描述要准确反映图片内容图片路径可以是相对路径或占位符
- 确保图片占位符放在逻辑上合适的位置**
7. **重要如果原文档中包含表格请完整保留表格结构
- 保持表格的Markdown格式
- 确保所有表格行都被包含
- 不要省略任何表格内容**
8. **重要确保内容完整性
- 不要截断任何内容
- 保持原文的完整性
- 所有重要信息都要包含在思维导图中**
9. 输出格式直接输出Markdown内容不要添加任何说明文字或代码块标记`,Z=`请分析以下文档内容并生成结构化Markdown
${U}`;await ye(V,Z),await Ge(),ot(b.value.name,i.value),setTimeout(async()=>{try{await Ye()}catch(ie){console.error("自动保存失败:",ie)}},1500)}catch(U){console.error("从文件生成Markdown失败:",U),me("生成失败: "+U.message,"error")}finally{o.value=!1}},$=U=>new Promise(async(V,Z)=>{try{const ie=U.type.includes("text")||U.name.endsWith(".txt")||U.name.endsWith(".md"),we=U.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||U.type==="application/msword"||U.name.endsWith(".docx")||U.name.endsWith(".doc"),x=U.type==="application/pdf"||U.name.endsWith(".pdf");if(ie){const N=new FileReader;N.onload=L=>V(L.target.result),N.onerror=()=>Z(new Error("文本文件读取失败")),N.readAsText(U)}else if(we){const N=await K(U);V(N)}else if(x){const N=await G(U);V(N)}else{const N=new FileReader;N.onload=L=>V(L.target.result),N.onerror=()=>Z(new Error("文件读取失败")),N.readAsText(U)}}catch(ie){Z(ie)}}),K=async U=>{try{if(U.name.endsWith(".docx")){const V=await Dc(()=>import("./index-d31726c8.js").then(we=>we.i),[]),Z=await U.arrayBuffer();return(await V.extractRawText({arrayBuffer:Z})).value}else if(U.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式或安装相应的解析库")}catch(V){throw new Error(`Office文档解析失败: ${V.message}`)}},G=async U=>{try{const V=await Dc(()=>import("./pdf-fbea91e0.js"),[]);V.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const Z=await U.arrayBuffer(),ie=await V.getDocument({data:Z}).promise;let we="";for(let x=1;x<=ie.numPages;x++){const H=(await(await ie.getPage(x)).getTextContent()).items.map(B=>B.str).join(" ");we+=H+`
`}return we}catch(V){throw new Error(`PDF文件解析失败: ${V.message}`)}},pe=U=>U&&U.replace(/^好的[,]?作为.*?专家[,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^好的[,]?作为.*?专业的.*?专家[,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^以下是.*?结构化的.*?思维导图[:]\s*/i,"").replace(/^以下是.*?Markdown.*?思维导图[:]\s*/i,"").replace(/^以下是.*?Markdown.*?格式.*?思维导图[:]\s*/i,"").replace(/^```(?:markdown)?\s*/gm,"").replace(/```\s*$/gm,"").replace(/^「」`markdown\s*/gm,"").replace(/^`\s*/gm,"").replace(/^\s*「」`markdown\s*/gm,"").replace(/^\s*`\s*/gm,"").replace(/^作为.*?专家[,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^我已.*?分析.*?内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^根据.*?文档内容.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^基于.*?文档.*?生成了以下.*?思维导图[:]\s*/i,"").replace(/^以下是.*?分析.*?结果[:]\s*/i,"").replace(/^以下是.*?整理.*?结果[:]\s*/i,"").replace(/^以下是.*?结构化.*?内容[:]\s*/i,"").replace(/\n{3,}/g,`
`).trim(),ye=async(U,V)=>{const ie=U||`你是一位Markdown格式转换专家你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式请遵循以下步骤
提取主标题 识别文章最顶层的主标题通常为文章题目或书名并使用Markdown的 # 级别表示
识别层级标题 从文章内容中提取所有层级的内容标题从主标题后的第一个标题开始Level 1 Level 4判断层级依据
视觉与结构特征 如独立成行/位置行首格式加粗编号如 1., 1.1, (1), -
语义逻辑 标题之间的包含和并列关系
在Markdown中使用相应标题级别
Level 1 标题用 ##
Level 2 标题用 ###
Level 3 标题用 ####
Level 4 标题用 #####
精确保留原文标题文字不得修改概括或润色
处理正文内容 对于每个标题下的正文内容区块从该标题后开始直到下一个同级或更高级别标题前
直接保留原文文本但根据内容结构适当格式化为Markdown
如果内容是列表如项目符号或编号列表使用Markdown列表语法例如 - 用于无序列表1. 用于有序列表
保持段落和换行不变
**重要如果原文档中包含图片请按以下方式处理
1. 识别图片在文档中的位置和上下文
2. 根据图片内容生成准确的描述文字
3. 在相应位置插入图片占位符![图片描述](图片路径)
4. 图片描述要准确反映图片内容图片路径可以是相对路径或占位符
5. 确保图片占位符放在逻辑上合适的位置**
输出格式 输出必须是纯Markdown格式的文本不得包含任何额外说明JSON或非Markdown元素确保输出与示例风格一致直接输出Markdown内容不要添加任何说明文字`,we=V||"请将以下内容转换为结构化的Markdown格式";try{const x=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:ie,user_prompt:we,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);const N=x.body.getReader(),L=new TextDecoder;let H="",B=0;for(;;){const{done:j,value:te}=await N.read();if(j)break;H+=L.decode(te,{stream:!0});const ne=H.split(`
`);H=ne.pop()||"";for(const se of ne)if(se.startsWith("data: "))try{const W=JSON.parse(se.slice(6));if(W.type==="start")me("AI开始生成内容...","info");else if(W.type==="chunk"){if(B++,i.value+=W.content,B%5===0)try{const oe=pe(i.value),le=_e(oe);a.value=JSON.stringify(le,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:le,title:le.topic||"AI生成中...",source:"ai-streaming",chunkCount:B}}))}catch(oe){console.warn("⚠️ 实时转换JSON失败:",oe)}}else if(W.type==="end"){me("AI内容生成完成","success");try{const oe=pe(i.value);console.log("🎯 最终内容长度:",oe.length),console.log("🎯 最终内容预览:",oe.substring(0,500)+"...");const le=qe(oe);console.log(`🖼 最终统计共发现 ${le.length} 张图片`);const de=_e(oe);a.value=JSON.stringify(de,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:de,title:de.topic||"AI生成完成",source:"ai-final",chunkCount:B}}))}catch(oe){console.error("⚠️ 最终处理失败:",oe)}}else if(W.type==="error")throw new Error(W.content)}catch(W){console.warn("解析流式数据失败:",W)}}}catch(x){throw console.error("流式AI API调用失败:",x),x}},Ee=U=>{if(U.includes("|")&&U.includes("-")){const V=U.split(`
`);let Z=!1,ie=!1;for(const we of V){const x=we.trim();x.includes("|")&&x.split("|").length>=3&&(Z=!0),x.includes("|")&&x.includes("-")&&/^[\s\|\-\:]+$/.test(x)&&(ie=!0)}if(Z&&ie)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),U}return U.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(V,Z)=>{if(Z.includes(":")){const ie=Z.split(":");if(ie.length>1)return`${ie[0]}: ${ie.slice(1).join(":")}`}return`${Z}`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"[图片: $1]").replace(/\n\n/g,`
`).replace(/\n/g,`
`).split(`
`).map(V=>V.length>80?V.substring(0,77)+"...":V).join(`
`).trim()},Ge=async()=>{if(!i.value.trim()){me("请输入Markdown内容","error");return}l.value=!0;try{const U=pe(i.value),V=_e(U);a.value=JSON.stringify(V,null,2)}catch(U){console.error("转换失败:",U),me("转换失败请检查Markdown格式","error")}finally{l.value=!1}},qe=U=>{const V=/!\[([^\]]*)\]\(([^)]+)\)/g,Z=[];let ie;for(;(ie=V.exec(U))!==null;){const we=ie[2],x=ie[1]||"";we&&we.trim()&&(we.startsWith("http")||we.startsWith("data:")||we.startsWith("/"))?(Z.push({alt:x,url:we.trim(),fullMatch:ie[0]}),console.log(` 有效图片URL: ${we}`)):console.warn(` 跳过无效的图片URL: ${we}`)}return console.log(`🔍 从内容中提取到 ${Z.length} 张图片:`,Z),Z},st=U=>U.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"").trim(),_e=U=>{const V=U.split(`
`);let Z=null;const ie=[];let we=0,x=[];if(V.forEach((N,L)=>{const H=N.trim(),B=H.match(/^(#{1,6})\s+(.+)$/);if(B){if(x.length>0&&ie.length>0){const oe=x.join(`
`).trim();oe&&(we=Ce(oe,ie[ie.length-1],we).nodeCounter),x=[]}const j=B[1].length,te=B[2].trim(),ne=qe(te),se=st(Ee(te));ne.length>0&&console.log(`🖼 在标题中发现 ${ne.length} 张图片: ${te}`);const W={id:`node_${we++}`,topic:se,children:[],level:j,data:{}};if(ne.length>0){const oe=ne[0];oe.url&&oe.url.trim()!==""?(W.image={url:oe.url,width:200,height:150,fit:"contain"},console.log(` 成功为标题节点设置图片: ${oe.url}`)):console.error("❌ 标题图片URL无效:",oe)}if(j===1&&!Z)Z=W,ie.length=0,ie.push(Z);else{for(;ie.length>1&&ie[ie.length-1].level>=j;)ie.pop();ie.length>0&&ie[ie.length-1].children.push(W),ie.push(W)}}else H&&x.push(H)}),x.length>0&&ie.length>0){const N=x.join(`
`).trim();N&&(N.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",N.substring(0,200)+"..."),we=Ce(N,ie[ie.length-1],we).nodeCounter)}return Z||(Z={id:"root",topic:"根节点",children:[],data:{}}),Z},Ce=(U,V,Z)=>{const ie=qe(U);if(ie.length>0){console.log(`🖼 在内容中发现 ${ie.length} 张图片`),ie.forEach((H,B)=>{console.log(`🖼 处理图片 ${B+1}:`,{alt:H.alt,url:H.url,urlLength:H.url.length});const j={id:`node_${Z++}`,topic:H.alt||`图片 ${B+1}`,children:[],level:(V.level||0)+1,image:{url:H.url,width:200,height:150,fit:"contain"},data:{}};if(!j.image.url||j.image.url.trim()===""){console.error(` 图片节点 ${B+1} URL为空:`,j);return}V.children.push(j),console.log(` 成功创建图片节点: ${j.topic} - ${H.url}`)});const L=st(U);return L.trim()&&(Z=Ce(L,V,Z).nodeCounter),{nodeCounter:Z}}if(ve(U)){console.log("🎯 检测到表格内容,创建表格节点");const L=v0(U);console.log("🎯 表格HTML内容:",L);const H={id:`node_${Z++}`,topic:"",dangerouslySetInnerHTML:L,children:[],level:(V.level||0)+1,data:{}};return V.children.push(H),{nodeCounter:Z}}const we=U.split(`
`);let x=Z,N=[];for(let L=0;L<we.length;L++){const B=we[L].trim(),j=B.match(/^[-*+]\s*【(.+)】/);if(j){const te=j[1].trim(),ne={id:`node_${x++}`,topic:te,children:[],level:(V.level||0)+1,data:{}};let se=[],W=L+1;for(;W<we.length;){const oe=we[W].trim();if(oe.match(/^[-*+]\s*【(.+)】/))break;const de=oe.match(/^[-*+]\s+(.+)$/);if(de){const Se=de[1].trim(),Re=Ee(Se);se.push("• "+Re)}W++}if(se.length>0){const oe=Ee(se.join(`
`));ne.topic=ne.topic+`
`+oe}V.children.push(ne),L=W-1}else B&&N.push(B)}if(N.length>0){const L=N.join(`
`).trim();if(L)if(ve(L)){console.log("🎯 检测到表格内容,创建表格节点");const H=v0(L);console.log("🎯 表格HTML内容:",H);const B={id:`node_${x++}`,topic:"",dangerouslySetInnerHTML:H,children:[],level:(V.level||0)+1,data:{}};V.children.push(B)}else L.split(`
`).filter(B=>B.trim()).forEach(B=>{const j=Ee(B.trim());if(j){const te={id:`node_${x++}`,topic:j,children:[],level:(V.level||0)+1,data:{}};V.children.push(te)}})}return{nodeCounter:x}},ve=U=>{if(!U||typeof U!="string")return!1;U.includes("|")&&console.log("🔍 检查表格内容:",U.substring(0,200)+"...");const V=U.split(`
`);let Z=!1,ie=!1;for(const L of V){const H=L.trim();H.includes("|")&&H.split("|").length>=3&&(Z=!0,console.log("✅ 找到表格行:",H)),H.includes("|")&&H.includes("-")&&/^[\s\|\-\:]+$/.test(H)&&(ie=!0,console.log("✅ 找到分隔符行:",H))}const we=(U.match(/\|/g)||[]).length,x=we>=4,N=Z&&ie||Z&&x;return console.log("🔍 表格检测结果:",{hasTableRow:Z,hasSeparator:ie,pipeCount:we,hasMultiplePipes:x,result:N}),N},Ke=async()=>{if(!i.value){me("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(i.value),me("Markdown已复制到剪贴板","success")}catch{const V=document.createElement("textarea");V.value=i.value,document.body.appendChild(V),V.select(),document.execCommand("copy"),V.remove(),me("Markdown已复制到剪贴板","success")}},Ze=async()=>{try{await navigator.clipboard.writeText(a.value),me("JSON已复制到剪贴板","success")}catch(U){console.error("复制失败:",U),me("复制失败","error")}},Ye=async()=>{if(!a.value){me("请先生成或转换JSON数据","error");return}try{const U=JSON.parse(a.value),V=U.topic||U.title||`AI生成的思维导图_${new Date().toLocaleString()}`,Z=new CustomEvent("save-preview-to-database",{detail:{data:U,title:V,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(Z),setTimeout(()=>{me("思维导图已保存成功!","success"),b.value=null,v.value&&(v.value.value="")},2e3)}catch(U){console.error("JSON解析失败:",U),me("JSON格式错误请检查数据","error")}},me=(U,V="info")=>{const Z=document.createElement("div");switch(Z.className=`notification notification-${V}`,Z.textContent=U,Z.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
padding: 12px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
max-width: 300px;
word-wrap: break-word;
`,V){case"success":Z.style.background="#4CAF50",Z.style.color="white";break;case"error":Z.style.background="#f44336",Z.style.color="white";break;case"info":default:Z.style.background="#2196F3",Z.style.color="white";break}if(!document.querySelector("#notification-styles")){const ie=document.createElement("style");ie.id="notification-styles",ie.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
from { transform: translateX(0); opacity: 1; }
to { transform: translateX(100%); opacity: 0; }
}
`,document.head.appendChild(ie)}document.body.appendChild(Z),setTimeout(()=>{Z.style.animation="slideOut 0.3s ease",setTimeout(()=>{Z.parentNode&&Z.parentNode.removeChild(Z)},300)},3e3)},St=()=>{i.value="",a.value="",me("内容已清空","info")},ot=(U,V,Z=null)=>{const ie={title:U,content:V,mindmapId:Z,timestamp:new Date};c.value.unshift(ie),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},ft=async U=>{U.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:U.mindmapId,title:U.title}})):(i.value=U.content,await Ge(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:U.content,json:a.value,title:U.title}})))},pt=U=>new Date(U).toLocaleString("zh-CN");Oa(()=>{const U=localStorage.getItem("ai-sidebar-history");if(U)try{c.value=JSON.parse(U)}catch(V){console.error("加载历史记录失败:",V)}window.addEventListener("add-to-history",V=>{const{title:Z,content:ie,timestamp:we}=V.detail;ot(Z,ie,null)}),window.addEventListener("mindmap-saved",V=>{const{mindmapId:Z,title:ie,timestamp:we}=V.detail,x=c.value.find(N=>N.title===ie||N.timestamp&&Math.abs(N.timestamp-we)<5e3);x?(x.mindmapId=Z,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):ot(ie,"",Z)}),i0(s,(V,Z)=>{}),i0(i,(V,Z)=>{})});const lt=async()=>{try{const U=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!U.ok)throw new Error(`HTTP error! status: ${U.status}`);const V=U.body.getReader(),Z=new TextDecoder;let ie="";for(;;){const{done:we,value:x}=await V.read();if(we)break;ie+=Z.decode(x,{stream:!0});const N=ie.split(`
`);ie=N.pop()||"";for(const L of N)if(L.startsWith("data: "))try{const H=JSON.parse(L.slice(6))}catch(H){console.warn("解析测试数据失败:",H)}}}catch(U){console.error("❌ 测试流式API失败:",U)}};return window.testStreamAPI=lt,(U,V)=>(He(),Ue("div",x7,[J("div",{class:"sidebar-toggle",onClick:y,title:n.value?"展开AI助手":"折叠AI助手",style:On({left:n.value?"10px":"420px"})},[n.value?(He(),Ue("svg",S7,[...V[1]||(V[1]=[J("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(He(),Ue("svg",T7,[...V[2]||(V[2]=[J("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,k7),J("div",{class:Ln(["ai-sidebar",{"sidebar-collapsed":n.value}])},[hs(J("div",E7,[V[12]||(V[12]=J("div",{class:"sidebar-header"},[J("h3",null,"🤖 AI 助手"),J("p",null,"文档转思维导图工具"),J("div",{class:"collapse-hint"},[J("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),J("div",A7,[V[6]||(V[6]=J("h4",null,"📁 生成思维导图",-1)),J("div",C7,[V[4]||(V[4]=J("label",null,"上传文件:",-1)),J("div",{class:"file-upload-area",onDrop:M,onDragover:S,onDragleave:E},[J("input",{type:"file",ref_key:"fileInput",ref:v,onChange:w,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),J("div",{class:Ln(["file-upload-placeholder",{"drag-over":d.value}])},[...V[3]||(V[3]=[J("span",{class:"upload-icon"},"📎",-1),J("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),J("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),b.value?(He(),Ue("div",M7,[J("div",N7,[J("div",D7,[J("span",R7,"📄 "+ur(b.value.name),1),J("span",I7,"("+ur(I(b.value.size))+")",1)]),J("button",{onClick:D,class:"btn-remove",title:"删除文件"},[...V[5]||(V[5]=[J("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[J("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):Sr("",!0),J("div",_7,[J("button",{onClick:O,disabled:!b.value||o.value,class:"btn-primary"},[o.value?(He(),Ue("span",L7,"AI生成中...")):(He(),Ue("span",z7,"AI生成思维导图"))],8,O7)])]),c.value.length>0?(He(),Ue("div",$7,[V[7]||(V[7]=J("h4",null,"📚 历史记录",-1)),J("div",F7,[(He(!0),Ue(er,null,du(c.value,(Z,ie)=>(He(),Ue("div",{key:ie,class:"history-item",onClick:we=>ft(Z)},[J("div",P7,ur(Z.title),1),J("div",H7,ur(pt(Z.timestamp)),1)],8,B7))),128))])])):Sr("",!0),J("div",q7,[V[9]||(V[9]=J("h4",null,"📝 AI生成的Markdown结果",-1)),J("div",j7,[V[8]||(V[8]=J("label",null,"Markdown内容",-1)),hs(J("textarea",{"onUpdate:modelValue":V[0]||(V[0]=Z=>i.value=Z),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Pa,i.value]])]),J("div",U7,[J("button",{onClick:Ge,disabled:l.value,class:"btn-secondary"},[l.value?(He(),Ue("span",W7,"转换中...")):(He(),Ue("span",G7,"🔄 转换为JSON"))],8,V7),J("button",{onClick:St,class:"btn-clear"},"清空"),J("button",{onClick:Ke,class:"btn-copy"},"📋 复制Markdown")])]),J("div",K7,[V[11]||(V[11]=J("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(He(),Ue("div",Y7,[V[10]||(V[10]=J("div",{class:"spinner"},null,-1)),J("span",null,ur(p.value),1)])):Sr("",!0),J("div",X7,[J("pre",J7,ur(a.value||"JSON转换结果将显示在这里"),1),J("div",Z7,[J("button",{onClick:Ze,class:"btn-copy"},"📋 复制JSON"),J("button",{onClick:Ye,disabled:f.value,class:"btn-copy"},ur(f.value?"处理中...":"👁️ 预览"),9,Q7)])])])],512),[[zf,!n.value]])],2)]))}},t8=_o(e8,[["__scopeId","data-v-db77628b"]]);const r8={class:"markdown-test"},n8={class:"test-section"},s8={class:"test-section"},i8=["innerHTML"],a8={class:"test-section"},o8={class:"test-cases"},l8=["onClick"],c8={__name:"MarkdownTest",setup(t){const e=Oe(`# 测试标题
这是一个**粗体***斜体*的测试
## 表格测试
| 产品 | 价格 | 库存 |
|------|------|------|
| 苹果 | 4 | 100 |
| 香蕉 | 2 | 50 |
## 代码测试
\`\`\`javascript
function hello() {
console.log('Hello World!');
}
\`\`\`
行内代码\`const name = 'test'\`
## 列表测试
- 项目1
- 项目2
- 子项目2.1
- 子项目2.2
- 项目3
## 链接测试
- [GitHub](https://github.com)
- [Vue.js](https://vuejs.org)`),r=Oe([{name:"基础表格",content:`# 产品价格表
| 产品 | 价格 |
|------|------|
| 苹果 | 4 |
| 香蕉 | 2 |`},{name:"复杂表格",content:`# 技术栈对比
| 技术 | 前端 | 后端 | 数据库 |
|------|------|------|--------|
| Vue.js | | | |
| Django | | | |
| PostgreSQL | | | |`},{name:"代码块",content:`# 代码示例
\`\`\`javascript
function markdownToJSON(markdown) {
const lines = markdown.split('\\n');
// 处理逻辑...
return result;
}
\`\`\``},{name:"混合内容",content:`# 混合内容测试
这是一个包含**粗体***斜体*\`行内代码\`的段落。
## 表格
| 功能 | 状态 | 说明 |
|------|------|------|
| 表格渲染 | | 支持markdown表格 |
| 代码高亮 | | 支持代码块 |
## 代码
\`\`\`python
def hello_world():
print("Hello, World!")
\`\`\``}]),n=Ou(()=>{if(!e.value)return"";try{return v0(e.value)}catch(a){return`<div class="error">渲染失败: ${a.message}</div>`}}),s=()=>{},i=a=>{e.value=a.content};return(a,o)=>(He(),Ue("div",r8,[o[4]||(o[4]=J("h2",null,"Markdown渲染测试",-1)),J("div",n8,[o[1]||(o[1]=J("h3",null,"输入Markdown内容",-1)),hs(J("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Pa,e.value]])]),J("div",s8,[o[2]||(o[2]=J("h3",null,"渲染结果",-1)),J("div",{class:"rendered-content",innerHTML:n.value},null,8,i8)]),J("div",a8,[o[3]||(o[3]=J("h3",null,"测试用例",-1)),J("button",{onClick:s,class:"test-btn"},"加载测试用例"),J("div",o8,[(He(!0),Ue(er,null,du(r.value,(l,c)=>(He(),Ue("button",{key:c,onClick:d=>i(l),class:"test-case-btn"},ur(l.name),9,l8))),128))])])]))}},u8=_o(c8,[["__scopeId","data-v-68a00828"]]);const d8={id:"app"},h8={class:"test-mode-toggle",style:{display:"none"}},f8={key:0,class:"test-mode"},p8={key:1},m8={class:"main-content"},g8={__name:"App",setup(t){const e=Oe(null),r=Oe(!1),n=()=>{r.value=!r.value},s=()=>{e.value&&e.value.showMindMapPage()};return(i,a)=>(He(),Ue("div",d8,[a[0]||(a[0]=Ru("« ",-1)),J("div",h8,[J("button",{onClick:n,class:"test-btn"},ur(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(He(),Ue("div",f8,[Ht(u8)])):(He(),Ue("div",p8,[Ht(t8,{onStartRealtimeGeneration:s}),J("div",m8,[Ht(b7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};rp(g8).mount("#app");export{Dc as _,Wl as c,w8 as g};