222 lines
278 KiB
JavaScript
222 lines
278 KiB
JavaScript
var Ha=Object.defineProperty;var Fa=(e,t,n)=>t in e?Ha(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>(Fa(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();/**
|
||
* @vue/shared v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**//*! #__NO_SIDE_EFFECTS__ */function Hi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ce={},dn=[],Qe=()=>{},Ir=()=>!1,Oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fi=e=>e.startsWith("onUpdate:"),Se=Object.assign,Ui=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ua=Object.prototype.hasOwnProperty,ne=(e,t)=>Ua.call(e,t),K=Array.isArray,un=e=>Io(e)==="[object Map]",Dr=e=>Io(e)==="[object Set]",G=e=>typeof e=="function",ke=e=>typeof e=="string",jt=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",Pr=e=>(ge(e)||G(e))&&G(e.then)&&G(e.catch),jr=Object.prototype.toString,Io=e=>jr.call(e),qa=e=>Io(e).slice(8,-1),zr=e=>Io(e)==="[object Object]",qi=e=>ke(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Tn=Hi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Do=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Va=/-(\w)/g,It=Do(e=>e.replace(Va,(t,n)=>n?n.toUpperCase():"")),Wa=/\B([A-Z])/g,en=Do(e=>e.replace(Wa,"-$1").toLowerCase()),Br=Do(e=>e.charAt(0).toUpperCase()+e.slice(1)),ti=Do(e=>e?`on${Br(e)}`:""),Ot=(e,t)=>!Object.is(e,t),ro=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Hr=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},yi=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ss;const Po=()=>Ss||(Ss=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qn(e){if(K(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=ke(o)?Za(o):qn(o);if(i)for(const s in i)t[s]=i[s]}return t}else if(ke(e)||ge(e))return e}const Ya=/;(?![^(]*\))/g,Ka=/:([^]+)/,Ja=/\/\*[^]*?\*\//g;function Za(e){const t={};return e.replace(Ja,"").split(Ya).forEach(n=>{if(n){const o=n.split(Ka);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Gt(e){let t="";if(ke(e))t=e;else if(K(e))for(let n=0;n<e.length;n++){const o=Gt(e[n]);o&&(t+=o+" ")}else if(ge(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ga="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Xa=Hi(Ga);function Fr(e){return!!e||e===""}const Ur=e=>!!(e&&e.__v_isRef===!0),vt=e=>ke(e)?e:e==null?"":K(e)||ge(e)&&(e.toString===jr||!G(e.toString))?Ur(e)?vt(e.value):JSON.stringify(e,qr,2):String(e),qr=(e,t)=>Ur(t)?qr(e,t.value):un(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],s)=>(n[ni(o,s)+" =>"]=i,n),{})}:Dr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ni(n))}:jt(t)?ni(t):ge(t)&&!K(t)&&!zr(t)?String(t):t,ni=(e,t="")=>{var n;return jt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
||
* @vue/reactivity v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let je;class Qa{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=je,!t&&je&&(this.index=(je.scopes||(je.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=je;try{return je=this,t()}finally{je=n}}}on(){++this._on===1&&(this.prevScope=je,je=this)}off(){this._on>0&&--this._on===0&&(je=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function ec(){return je}let fe;const oi=new WeakSet;class Vr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,je&&je.active&&je.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,oi.has(this)&&(oi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Yr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ms(this),Kr(this);const t=fe,n=et;fe=this,et=!0;try{return this.fn()}finally{Jr(this),fe=t,et=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Yi(t);this.deps=this.depsTail=void 0,Ms(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?oi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){vi(this)&&this.run()}get dirty(){return vi(this)}}let Wr=0,An,Ln;function Yr(e,t=!1){if(e.flags|=8,t){e.next=Ln,Ln=e;return}e.next=An,An=e}function Vi(){Wr++}function Wi(){if(--Wr>0)return;if(Ln){let t=Ln;for(Ln=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;An;){let t=An;for(An=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Kr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Jr(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),Yi(o),tc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function vi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Zr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Zr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===jn)||(e.globalVersion=jn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!vi(e))))return;e.flags|=2;const t=e.dep,n=fe,o=et;fe=e,et=!0;try{Kr(e);const i=e.fn(e._value);(t.version===0||Ot(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{fe=n,et=o,Jr(e),e.flags&=-3}}function Yi(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)Yi(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function tc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let et=!0;const Gr=[];function Ct(){Gr.push(et),et=!1}function St(){const e=Gr.pop();et=e===void 0?!0:e}function Ms(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=fe;fe=void 0;try{t()}finally{fe=n}}}let jn=0;class nc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ki{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!fe||!et||fe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==fe)n=this.activeLink=new nc(fe,this),fe.deps?(n.prevDep=fe.depsTail,fe.depsTail.nextDep=n,fe.depsTail=n):fe.deps=fe.depsTail=n,Xr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=fe.depsTail,n.nextDep=void 0,fe.depsTail.nextDep=n,fe.depsTail=n,fe.deps===n&&(fe.deps=o)}return n}trigger(t){this.version++,jn++,this.notify(t)}notify(t){Vi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Wi()}}}function Xr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Xr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xi=new WeakMap,Kt=Symbol(""),wi=Symbol(""),zn=Symbol("");function Ne(e,t,n){if(et&&fe){let o=xi.get(e);o||xi.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new Ki),i.map=o,i.key=n),i.track()}}function wt(e,t,n,o,i,s){const r=xi.get(e);if(!r){jn++;return}const l=a=>{a&&a.trigger()};if(Vi(),t==="clear")r.forEach(l);else{const a=K(e),d=a&&qi(n);if(a&&n==="length"){const c=Number(o);r.forEach((u,f)=>{(f==="length"||f===zn||!jt(f)&&f>=c)&&l(u)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),d&&l(r.get(zn)),t){case"add":a?d&&l(r.get("length")):(l(r.get(Kt)),un(e)&&l(r.get(wi)));break;case"delete":a||(l(r.get(Kt)),un(e)&&l(r.get(wi)));break;case"set":un(e)&&l(r.get(Kt));break}}Wi()}function nn(e){const t=te(e);return t===e?t:(Ne(t,"iterate",zn),Ye(e)?t:t.map(Ce))}function jo(e){return Ne(e=te(e),"iterate",zn),e}const oc={__proto__:null,[Symbol.iterator](){return ii(this,Symbol.iterator,Ce)},concat(...e){return nn(this).concat(...e.map(t=>K(t)?nn(t):t))},entries(){return ii(this,"entries",e=>(e[1]=Ce(e[1]),e))},every(e,t){return yt(this,"every",e,t,void 0,arguments)},filter(e,t){return yt(this,"filter",e,t,n=>n.map(Ce),arguments)},find(e,t){return yt(this,"find",e,t,Ce,arguments)},findIndex(e,t){return yt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yt(this,"findLast",e,t,Ce,arguments)},findLastIndex(e,t){return yt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yt(this,"forEach",e,t,void 0,arguments)},includes(...e){return si(this,"includes",e)},indexOf(...e){return si(this,"indexOf",e)},join(e){return nn(this).join(e)},lastIndexOf(...e){return si(this,"lastIndexOf",e)},map(e,t){return yt(this,"map",e,t,void 0,arguments)},pop(){return xn(this,"pop")},push(...e){return xn(this,"push",e)},reduce(e,...t){return Ns(this,"reduce",e,t)},reduceRight(e,...t){return Ns(this,"reduceRight",e,t)},shift(){return xn(this,"shift")},some(e,t){return yt(this,"some",e,t,void 0,arguments)},splice(...e){return xn(this,"splice",e)},toReversed(){return nn(this).toReversed()},toSorted(e){return nn(this).toSorted(e)},toSpliced(...e){return nn(this).toSpliced(...e)},unshift(...e){return xn(this,"unshift",e)},values(){return ii(this,"values",Ce)}};function ii(e,t,n){const o=jo(e),i=o[t]();return o!==e&&!Ye(e)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=n(s.value)),s}),i}const ic=Array.prototype;function yt(e,t,n,o,i,s){const r=jo(e),l=r!==e&&!Ye(e),a=r[t];if(a!==ic[t]){const u=a.apply(e,s);return l?Ce(u):u}let d=n;r!==e&&(l?d=function(u,f){return n.call(this,Ce(u),f,e)}:n.length>2&&(d=function(u,f){return n.call(this,u,f,e)}));const c=a.call(r,d,o);return l&&i?i(c):c}function Ns(e,t,n,o){const i=jo(e);let s=n;return i!==e&&(Ye(e)?n.length>3&&(s=function(r,l,a){return n.call(this,r,l,a,e)}):s=function(r,l,a){return n.call(this,r,Ce(l),a,e)}),i[t](s,...o)}function si(e,t,n){const o=te(e);Ne(o,"iterate",zn);const i=o[t](...n);return(i===-1||i===!1)&&Xi(n[0])?(n[0]=te(n[0]),o[t](...n)):i}function xn(e,t,n=[]){Ct(),Vi();const o=te(e)[t].apply(e,n);return Wi(),St(),o}const sc=Hi("__proto__,__v_isRef,__isVue"),Qr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(jt));function rc(e){jt(e)||(e=String(e));const t=te(this);return Ne(t,"has",e),t.hasOwnProperty(e)}class el{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(i?s?gc:il:s?ol:nl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=K(t);if(!i){let a;if(r&&(a=oc[n]))return a;if(n==="hasOwnProperty")return rc}const l=Reflect.get(t,n,Le(t)?t:o);return(jt(n)?Qr.has(n):sc(n))||(i||Ne(t,"get",n),s)?l:Le(l)?r&&qi(n)?l:l.value:ge(l)?i?sl(l):Zi(l):l}}class tl extends el{constructor(t=!1){super(!1,t)}set(t,n,o,i){let s=t[n];if(!this._isShallow){const a=Dt(s);if(!Ye(o)&&!Dt(o)&&(s=te(s),o=te(o)),!K(t)&&Le(s)&&!Le(o))return a||(s.value=o),!0}const r=K(t)&&qi(n)?Number(n)<t.length:ne(t,n),l=Reflect.set(t,n,o,Le(t)?t:i);return t===te(i)&&(r?Ot(o,s)&&wt(t,"set",n,o):wt(t,"add",n,o)),l}deleteProperty(t,n){const o=ne(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&wt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!jt(n)||!Qr.has(n))&&Ne(t,"has",n),o}ownKeys(t){return Ne(t,"iterate",K(t)?"length":Kt),Reflect.ownKeys(t)}}class lc extends el{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const ac=new tl,cc=new lc,dc=new tl(!0);const ki=e=>e,eo=e=>Reflect.getPrototypeOf(e);function uc(e,t,n){return function(...o){const i=this.__v_raw,s=te(i),r=un(s),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,d=i[e](...o),c=n?ki:t?bo:Ce;return!t&&Ne(s,"iterate",a?wi:Kt),{next(){const{value:u,done:f}=d.next();return f?{value:u,done:f}:{value:l?[c(u[0]),c(u[1])]:c(u),done:f}},[Symbol.iterator](){return this}}}}function to(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function fc(e,t){const n={get(i){const s=this.__v_raw,r=te(s),l=te(i);e||(Ot(i,l)&&Ne(r,"get",i),Ne(r,"get",l));const{has:a}=eo(r),d=t?ki:e?bo:Ce;if(a.call(r,i))return d(s.get(i));if(a.call(r,l))return d(s.get(l));s!==r&&s.get(i)},get size(){const i=this.__v_raw;return!e&&Ne(te(i),"iterate",Kt),i.size},has(i){const s=this.__v_raw,r=te(s),l=te(i);return e||(Ot(i,l)&&Ne(r,"has",i),Ne(r,"has",l)),i===l?s.has(i):s.has(i)||s.has(l)},forEach(i,s){const r=this,l=r.__v_raw,a=te(l),d=t?ki:e?bo:Ce;return!e&&Ne(a,"iterate",Kt),l.forEach((c,u)=>i.call(s,d(c),d(u),r))}};return Se(n,e?{add:to("add"),set:to("set"),delete:to("delete"),clear:to("clear")}:{add(i){!t&&!Ye(i)&&!Dt(i)&&(i=te(i));const s=te(this);return eo(s).has.call(s,i)||(s.add(i),wt(s,"add",i,i)),this},set(i,s){!t&&!Ye(s)&&!Dt(s)&&(s=te(s));const r=te(this),{has:l,get:a}=eo(r);let d=l.call(r,i);d||(i=te(i),d=l.call(r,i));const c=a.call(r,i);return r.set(i,s),d?Ot(s,c)&&wt(r,"set",i,s):wt(r,"add",i,s),this},delete(i){const s=te(this),{has:r,get:l}=eo(s);let a=r.call(s,i);a||(i=te(i),a=r.call(s,i)),l&&l.call(s,i);const d=s.delete(i);return a&&wt(s,"delete",i,void 0),d},clear(){const i=te(this),s=i.size!==0,r=i.clear();return s&&wt(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=uc(i,e,t)}),n}function Ji(e,t){const n=fc(e,t);return(o,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(ne(n,i)&&i in o?n:o,i,s)}const hc={get:Ji(!1,!1)},pc={get:Ji(!1,!0)},mc={get:Ji(!0,!1)};const nl=new WeakMap,ol=new WeakMap,il=new WeakMap,gc=new WeakMap;function bc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function yc(e){return e.__v_skip||!Object.isExtensible(e)?0:bc(qa(e))}function Zi(e){return Dt(e)?e:Gi(e,!1,ac,hc,nl)}function vc(e){return Gi(e,!1,dc,pc,ol)}function sl(e){return Gi(e,!0,cc,mc,il)}function Gi(e,t,n,o,i){if(!ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=yc(e);if(s===0)return e;const r=i.get(e);if(r)return r;const l=new Proxy(e,s===2?o:n);return i.set(e,l),l}function fn(e){return Dt(e)?fn(e.__v_raw):!!(e&&e.__v_isReactive)}function Dt(e){return!!(e&&e.__v_isReadonly)}function Ye(e){return!!(e&&e.__v_isShallow)}function Xi(e){return e?!!e.__v_raw:!1}function te(e){const t=e&&e.__v_raw;return t?te(t):e}function xc(e){return!ne(e,"__v_skip")&&Object.isExtensible(e)&&Hr(e,"__v_skip",!0),e}const Ce=e=>ge(e)?Zi(e):e,bo=e=>ge(e)?sl(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function he(e){return wc(e,!1)}function wc(e,t){return Le(e)?e:new kc(e,t)}class kc{constructor(t,n){this.dep=new Ki,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:te(t),this._value=n?t:Ce(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Ye(t)||Dt(t);t=o?t:te(t),Ot(t,n)&&(this._rawValue=t,this._value=o?t:Ce(t),this.dep.trigger())}}function _c(e){return Le(e)?e.value:e}const Ec={get:(e,t,n)=>t==="__v_raw"?e:_c(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return Le(i)&&!Le(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function rl(e){return fn(e)?e:new Proxy(e,Ec)}class Cc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ki(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&fe!==this)return Yr(this,!0),!0}get value(){const t=this.dep.track();return Zr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Sc(e,t,n=!1){let o,i;return G(e)?o=e:(o=e.get,i=e.set),new Cc(o,i,n)}const no={},yo=new WeakMap;let qt;function Mc(e,t=!1,n=qt){if(n){let o=yo.get(n);o||yo.set(n,o=[]),o.push(e)}}function Nc(e,t,n=ce){const{immediate:o,deep:i,once:s,scheduler:r,augmentJob:l,call:a}=n,d=T=>i?T:Ye(T)||i===!1||i===0?kt(T,1):kt(T);let c,u,f,y,b=!1,x=!1;if(Le(e)?(u=()=>e.value,b=Ye(e)):fn(e)?(u=()=>d(e),b=!0):K(e)?(x=!0,b=e.some(T=>fn(T)||Ye(T)),u=()=>e.map(T=>{if(Le(T))return T.value;if(fn(T))return d(T);if(G(T))return a?a(T,2):T()})):G(e)?t?u=a?()=>a(e,2):e:u=()=>{if(f){Ct();try{f()}finally{St()}}const T=qt;qt=c;try{return a?a(e,3,[y]):e(y)}finally{qt=T}}:u=Qe,t&&i){const T=u,F=i===!0?1/0:i;u=()=>kt(T(),F)}const v=ec(),M=()=>{c.stop(),v&&v.active&&Ui(v.effects,c)};if(s&&t){const T=t;t=(...F)=>{T(...F),M()}}let R=x?new Array(e.length).fill(no):no;const O=T=>{if(!(!(c.flags&1)||!c.dirty&&!T))if(t){const F=c.run();if(i||b||(x?F.some((W,X)=>Ot(W,R[X])):Ot(F,R))){f&&f();const W=qt;qt=c;try{const X=[F,R===no?void 0:x&&R[0]===no?[]:R,y];R=F,a?a(t,3,X):t(...X)}finally{qt=W}}}else c.run()};return l&&l(O),c=new Vr(u),c.scheduler=r?()=>r(O,!1):O,y=T=>Mc(T,!1,c),f=c.onStop=()=>{const T=yo.get(c);if(T){if(a)a(T,4);else for(const F of T)F();yo.delete(c)}},t?o?O(!0):R=c.run():r?r(O.bind(null,!0),!0):c.run(),M.pause=c.pause.bind(c),M.resume=c.resume.bind(c),M.stop=M,M}function kt(e,t=1/0,n){if(t<=0||!ge(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Le(e))kt(e.value,t,n);else if(K(e))for(let o=0;o<e.length;o++)kt(e[o],t,n);else if(Dr(e)||un(e))e.forEach(o=>{kt(o,t,n)});else if(zr(e)){for(const o in e)kt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&kt(e[o],t,n)}return e}/**
|
||
* @vue/runtime-core v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function Vn(e,t,n,o){try{return o?e(...o):e()}catch(i){zo(i,t,n)}}function pt(e,t,n,o){if(G(e)){const i=Vn(e,t,n,o);return i&&Pr(i)&&i.catch(s=>{zo(s,t,n)}),i}if(K(e)){const i=[];for(let s=0;s<e.length;s++)i.push(pt(e[s],t,n,o));return i}}function zo(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||ce;if(t){let l=t.parent;const a=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,a,d)===!1)return}l=l.parent}if(s){Ct(),Vn(s,null,10,[e,a,d]),St();return}}Tc(e,n,i,o,r)}function Tc(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Re=[];let dt=-1;const hn=[];let Lt=null,ln=0;const ll=Promise.resolve();let vo=null;function al(e){const t=vo||ll;return e?t.then(this?e.bind(this):e):t}function Ac(e){let t=dt+1,n=Re.length;for(;t<n;){const o=t+n>>>1,i=Re[o],s=Bn(i);s<e||s===e&&i.flags&2?t=o+1:n=o}return t}function Qi(e){if(!(e.flags&1)){const t=Bn(e),n=Re[Re.length-1];!n||!(e.flags&2)&&t>=Bn(n)?Re.push(e):Re.splice(Ac(t),0,e),e.flags|=1,cl()}}function cl(){vo||(vo=ll.then(ul))}function Lc(e){K(e)?hn.push(...e):Lt&&e.id===-1?Lt.splice(ln+1,0,e):e.flags&1||(hn.push(e),e.flags|=1),cl()}function Ts(e,t,n=dt+1){for(;n<Re.length;n++){const o=Re[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Re.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function dl(e){if(hn.length){const t=[...new Set(hn)].sort((n,o)=>Bn(n)-Bn(o));if(hn.length=0,Lt){Lt.push(...t);return}for(Lt=t,ln=0;ln<Lt.length;ln++){const n=Lt[ln];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Lt=null,ln=0}}const Bn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ul(e){const t=Qe;try{for(dt=0;dt<Re.length;dt++){const n=Re[dt];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Vn(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;dt<Re.length;dt++){const n=Re[dt];n&&(n.flags&=-2)}dt=-1,Re.length=0,dl(),vo=null,(Re.length||hn.length)&&ul()}}let We=null,fl=null;function xo(e){const t=We;return We=e,fl=e&&e.type.__scopeId||null,t}function $c(e,t=We,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&js(-1);const s=xo(t);let r;try{r=e(...i)}finally{xo(s),o._d&&js(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function As(e,t){if(We===null)return e;const n=Uo(We),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[s,r,l,a=ce]=t[i];s&&(G(s)&&(s={mounted:s,updated:s}),s.deep&&kt(r),o.push({dir:s,instance:n,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function Ht(e,t,n,o){const i=e.dirs,s=t&&t.dirs;for(let r=0;r<i.length;r++){const l=i[r];s&&(l.oldValue=s[r].value);let a=l.dir[o];a&&(Ct(),pt(a,n,8,[e.el,l,e,t]),St())}}const Rc=Symbol("_vte"),Oc=e=>e.__isTeleport,Ic=Symbol("_leaveCb");function es(e,t){e.shapeFlag&6&&e.component?(e.transition=t,es(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function hl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function $n(e,t,n,o,i=!1){if(K(e)){e.forEach((b,x)=>$n(b,t&&(K(t)?t[x]:t),n,o,i));return}if(Rn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&$n(e,t,n,o.component.subTree);return}const s=o.shapeFlag&4?Uo(o.component):o.el,r=i?null:s,{i:l,r:a}=e,d=t&&t.r,c=l.refs===ce?l.refs={}:l.refs,u=l.setupState,f=te(u),y=u===ce?Ir:b=>ne(f,b);if(d!=null&&d!==a){if(ke(d))c[d]=null,y(d)&&(u[d]=null);else if(Le(d)){d.value=null;const b=t;b.k&&(c[b.k]=null)}}if(G(a))Vn(a,l,12,[r,c]);else{const b=ke(a),x=Le(a);if(b||x){const v=()=>{if(e.f){const M=b?y(a)?u[a]:c[a]:a.value;if(i)K(M)&&Ui(M,s);else if(K(M))M.includes(s)||M.push(s);else if(b)c[a]=[s],y(a)&&(u[a]=c[a]);else{const R=[s];a.value=R,e.k&&(c[e.k]=R)}}else b?(c[a]=r,y(a)&&(u[a]=r)):x&&(a.value=r,e.k&&(c[e.k]=r))};r?(v.id=-1,Fe(v,n)):v()}}}Po().requestIdleCallback;Po().cancelIdleCallback;const Rn=e=>!!e.type.__asyncLoader,pl=e=>e.type.__isKeepAlive;function Dc(e,t){ml(e,"a",t)}function Pc(e,t){ml(e,"da",t)}function ml(e,t,n=Oe){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Bo(t,o,n),n){let i=n.parent;for(;i&&i.parent;)pl(i.parent.vnode)&&jc(o,t,n,i),i=i.parent}}function jc(e,t,n,o){const i=Bo(t,e,o,!0);ns(()=>{Ui(o[t],i)},n)}function Bo(e,t,n=Oe,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{Ct();const l=Wn(n),a=pt(t,n,e,r);return l(),St(),a});return o?i.unshift(s):i.push(s),s}}const Mt=e=>(t,n=Oe)=>{(!Fn||e==="sp")&&Bo(e,(...o)=>t(...o),n)},zc=Mt("bm"),ts=Mt("m"),Bc=Mt("bu"),Hc=Mt("u"),Fc=Mt("bum"),ns=Mt("um"),Uc=Mt("sp"),qc=Mt("rtg"),Vc=Mt("rtc");function Wc(e,t=Oe){Bo("ec",e,t)}const Yc=Symbol.for("v-ndc");function Kc(e,t,n,o){let i;const s=n&&n[o],r=K(e);if(r||ke(e)){const l=r&&fn(e);let a=!1,d=!1;l&&(a=!Ye(e),d=Dt(e),e=jo(e)),i=new Array(e.length);for(let c=0,u=e.length;c<u;c++)i[c]=t(a?d?bo(Ce(e[c])):Ce(e[c]):e[c],c,void 0,s&&s[c])}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,s&&s[l])}else if(ge(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,s&&s[a]));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,d=l.length;a<d;a++){const c=l[a];i[a]=t(e[c],c,a,s&&s[a])}}else i=[];return n&&(n[o]=i),i}const _i=e=>e?Il(e)?Uo(e):_i(e.parent):null,On=Se(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>_i(e.parent),$root:e=>_i(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>os(e),$forceUpdate:e=>e.f||(e.f=()=>{Qi(e.update)}),$nextTick:e=>e.n||(e.n=al.bind(e.proxy)),$watch:e=>gd.bind(e)}),ri=(e,t)=>e!==ce&&!e.__isScriptSetup&&ne(e,t),Jc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:s,accessCache:r,type:l,appContext:a}=e;let d;if(t[0]!=="$"){const y=r[t];if(y!==void 0)switch(y){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(ri(o,t))return r[t]=1,o[t];if(i!==ce&&ne(i,t))return r[t]=2,i[t];if((d=e.propsOptions[0])&&ne(d,t))return r[t]=3,s[t];if(n!==ce&&ne(n,t))return r[t]=4,n[t];Ei&&(r[t]=0)}}const c=On[t];let u,f;if(c)return t==="$attrs"&&Ne(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ce&&ne(n,t))return r[t]=4,n[t];if(f=a.config.globalProperties,ne(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:s}=e;return ri(i,t)?(i[t]=n,!0):o!==ce&&ne(o,t)?(o[t]=n,!0):ne(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:s,type:r}},l){let a,d;return!!(n[l]||e!==ce&&l[0]!=="$"&&ne(e,l)||ri(t,l)||(a=s[0])&&ne(a,l)||ne(o,l)||ne(On,l)||ne(i.config.globalProperties,l)||(d=r.__cssModules)&&d[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ls(e){return K(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ei=!0;function Zc(e){const t=os(e),n=e.proxy,o=e.ctx;Ei=!1,t.beforeCreate&&$s(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:r,watch:l,provide:a,inject:d,created:c,beforeMount:u,mounted:f,beforeUpdate:y,updated:b,activated:x,deactivated:v,beforeDestroy:M,beforeUnmount:R,destroyed:O,unmounted:T,render:F,renderTracked:W,renderTriggered:X,errorCaptured:de,serverPrefetch:pe,expose:Ee,inheritAttrs:ot,components:Nt,directives:gt,filters:bt}=t;if(d&&Gc(d,o,null),r)for(const le in r){const ee=r[le];G(ee)&&(o[le]=ee.bind(n))}if(i){const le=i.call(n,n);ge(le)&&(e.data=Zi(le))}if(Ei=!0,s)for(const le in s){const ee=s[le],Je=G(ee)?ee.bind(n,n):G(ee.get)?ee.get.bind(n,n):Qe,it=!G(ee)&&G(ee.set)?ee.set.bind(n):Qe,Ve=zd({get:Je,set:it});Object.defineProperty(o,le,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:De=>Ve.value=De})}if(l)for(const le in l)gl(l[le],o,n,le);if(a){const le=G(a)?a.call(n):a;Reflect.ownKeys(le).forEach(ee=>{od(ee,le[ee])})}c&&$s(c,e,"c");function Z(le,ee){K(ee)?ee.forEach(Je=>le(Je.bind(n))):ee&&le(ee.bind(n))}if(Z(zc,u),Z(ts,f),Z(Bc,y),Z(Hc,b),Z(Dc,x),Z(Pc,v),Z(Wc,de),Z(Vc,W),Z(qc,X),Z(Fc,R),Z(ns,T),Z(Uc,pe),K(Ee))if(Ee.length){const le=e.exposed||(e.exposed={});Ee.forEach(ee=>{Object.defineProperty(le,ee,{get:()=>n[ee],set:Je=>n[ee]=Je,enumerable:!0})})}else e.exposed||(e.exposed={});F&&e.render===Qe&&(e.render=F),ot!=null&&(e.inheritAttrs=ot),Nt&&(e.components=Nt),gt&&(e.directives=gt),pe&&hl(e)}function Gc(e,t,n=Qe){K(e)&&(e=Ci(e));for(const o in e){const i=e[o];let s;ge(i)?"default"in i?s=lo(i.from||o,i.default,!0):s=lo(i.from||o):s=lo(i),Le(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[o]=s}}function $s(e,t,n){pt(K(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function gl(e,t,n,o){let i=o.includes(".")?Tl(n,o):()=>n[o];if(ke(e)){const s=t[e];G(s)&&In(i,s)}else if(G(e))In(i,e.bind(n));else if(ge(e))if(K(e))e.forEach(s=>gl(s,t,n,o));else{const s=G(e.handler)?e.handler.bind(n):t[e.handler];G(s)&&In(i,s,e)}}function os(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(d=>wo(a,d,r,!0)),wo(a,t,r)),ge(t)&&s.set(t,a),a}function wo(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&wo(e,s,n,!0),i&&i.forEach(r=>wo(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=Xc[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Xc={data:Rs,props:Os,emits:Os,methods:Mn,computed:Mn,beforeCreate:$e,created:$e,beforeMount:$e,mounted:$e,beforeUpdate:$e,updated:$e,beforeDestroy:$e,beforeUnmount:$e,destroyed:$e,unmounted:$e,activated:$e,deactivated:$e,errorCaptured:$e,serverPrefetch:$e,components:Mn,directives:Mn,watch:ed,provide:Rs,inject:Qc};function Rs(e,t){return t?e?function(){return Se(G(e)?e.call(this,this):e,G(t)?t.call(this,this):t)}:t:e}function Qc(e,t){return Mn(Ci(e),Ci(t))}function Ci(e){if(K(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $e(e,t){return e?[...new Set([].concat(e,t))]:t}function Mn(e,t){return e?Se(Object.create(null),e,t):t}function Os(e,t){return e?K(e)&&K(t)?[...new Set([...e,...t])]:Se(Object.create(null),Ls(e),Ls(t??{})):t}function ed(e,t){if(!e)return t;if(!t)return e;const n=Se(Object.create(null),e);for(const o in t)n[o]=$e(e[o],t[o]);return n}function bl(){return{app:null,config:{isNativeTag:Ir,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let td=0;function nd(e,t){return function(o,i=null){G(o)||(o=Se({},o)),i!=null&&!ge(i)&&(i=null);const s=bl(),r=new WeakSet,l=[];let a=!1;const d=s.app={_uid:td++,_component:o,_props:i,_container:null,_context:s,_instance:null,version:Bd,get config(){return s.config},set config(c){},use(c,...u){return r.has(c)||(c&&G(c.install)?(r.add(c),c.install(d,...u)):G(c)&&(r.add(c),c(d,...u))),d},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),d},component(c,u){return u?(s.components[c]=u,d):s.components[c]},directive(c,u){return u?(s.directives[c]=u,d):s.directives[c]},mount(c,u,f){if(!a){const y=d._ceVNode||Ke(o,i);return y.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),u&&t?t(y,c):e(y,c,f),a=!0,d._container=c,c.__vue_app__=d,Uo(y.component)}},onUnmount(c){l.push(c)},unmount(){a&&(pt(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,u){return s.provides[c]=u,d},runWithContext(c){const u=pn;pn=d;try{return c()}finally{pn=u}}};return d}}let pn=null;function od(e,t){if(Oe){let n=Oe.provides;const o=Oe.parent&&Oe.parent.provides;o===n&&(n=Oe.provides=Object.create(o)),n[e]=t}}function lo(e,t,n=!1){const o=Rd();if(o||pn){let i=pn?pn._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&G(t)?t.call(o&&o.proxy):t}}const yl={},vl=()=>Object.create(yl),xl=e=>Object.getPrototypeOf(e)===yl;function id(e,t,n,o=!1){const i={},s=vl();e.propsDefaults=Object.create(null),wl(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=o?i:vc(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function sd(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,l=te(i),[a]=e.propsOptions;let d=!1;if((o||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let u=0;u<c.length;u++){let f=c[u];if(Ho(e.emitsOptions,f))continue;const y=t[f];if(a)if(ne(s,f))y!==s[f]&&(s[f]=y,d=!0);else{const b=It(f);i[b]=Si(a,l,b,y,e,!1)}else y!==s[f]&&(s[f]=y,d=!0)}}}else{wl(e,t,i,s)&&(d=!0);let c;for(const u in l)(!t||!ne(t,u)&&((c=en(u))===u||!ne(t,c)))&&(a?n&&(n[u]!==void 0||n[c]!==void 0)&&(i[u]=Si(a,l,u,void 0,e,!0)):delete i[u]);if(s!==l)for(const u in s)(!t||!ne(t,u))&&(delete s[u],d=!0)}d&&wt(e.attrs,"set","")}function wl(e,t,n,o){const[i,s]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(Tn(a))continue;const d=t[a];let c;i&&ne(i,c=It(a))?!s||!s.includes(c)?n[c]=d:(l||(l={}))[c]=d:Ho(e.emitsOptions,a)||(!(a in o)||d!==o[a])&&(o[a]=d,r=!0)}if(s){const a=te(n),d=l||ce;for(let c=0;c<s.length;c++){const u=s[c];n[u]=Si(i,a,u,d[u],e,!ne(d,u))}}return r}function Si(e,t,n,o,i,s){const r=e[n];if(r!=null){const l=ne(r,"default");if(l&&o===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&G(a)){const{propsDefaults:d}=i;if(n in d)o=d[n];else{const c=Wn(i);o=d[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}r[0]&&(s&&!l?o=!1:r[1]&&(o===""||o===en(n))&&(o=!0))}return o}const rd=new WeakMap;function kl(e,t,n=!1){const o=n?rd:t.propsCache,i=o.get(e);if(i)return i;const s=e.props,r={},l=[];let a=!1;if(!G(e)){const c=u=>{a=!0;const[f,y]=kl(u,t,!0);Se(r,f),y&&l.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return ge(e)&&o.set(e,dn),dn;if(K(s))for(let c=0;c<s.length;c++){const u=It(s[c]);Is(u)&&(r[u]=ce)}else if(s)for(const c in s){const u=It(c);if(Is(u)){const f=s[c],y=r[u]=K(f)||G(f)?{type:f}:Se({},f),b=y.type;let x=!1,v=!0;if(K(b))for(let M=0;M<b.length;++M){const R=b[M],O=G(R)&&R.name;if(O==="Boolean"){x=!0;break}else O==="String"&&(v=!1)}else x=G(b)&&b.name==="Boolean";y[0]=x,y[1]=v,(x||ne(y,"default"))&&l.push(u)}}const d=[r,l];return ge(e)&&o.set(e,d),d}function Is(e){return e[0]!=="$"&&!Tn(e)}const is=e=>e==="_"||e==="_ctx"||e==="$stable",ss=e=>K(e)?e.map(ht):[ht(e)],ld=(e,t,n)=>{if(t._n)return t;const o=$c((...i)=>ss(t(...i)),n);return o._c=!1,o},_l=(e,t,n)=>{const o=e._ctx;for(const i in e){if(is(i))continue;const s=e[i];if(G(s))t[i]=ld(i,s,o);else if(s!=null){const r=ss(s);t[i]=()=>r}}},El=(e,t)=>{const n=ss(t);e.slots.default=()=>n},Cl=(e,t,n)=>{for(const o in t)(n||!is(o))&&(e[o]=t[o])},ad=(e,t,n)=>{const o=e.slots=vl();if(e.vnode.shapeFlag&32){const i=t._;i?(Cl(o,t,n),n&&Hr(o,"_",i,!0)):_l(t,o)}else t&&El(e,t)},cd=(e,t,n)=>{const{vnode:o,slots:i}=e;let s=!0,r=ce;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:Cl(i,t,n):(s=!t.$stable,_l(t,i)),r=t}else t&&(El(e,t),r={default:1});if(s)for(const l in i)!is(l)&&r[l]==null&&delete i[l]},Fe=_d;function dd(e){return ud(e)}function ud(e,t){const n=Po();n.__VUE__=!0;const{insert:o,remove:i,patchProp:s,createElement:r,createText:l,createComment:a,setText:d,setElementText:c,parentNode:u,nextSibling:f,setScopeId:y=Qe,insertStaticContent:b}=e,x=(h,g,k,C=null,E=null,S=null,P=void 0,z=null,B=!!g.dynamicChildren)=>{if(h===g)return;h&&!wn(h,g)&&(C=w(h),De(h,E,S,!0),h=null),g.patchFlag===-2&&(B=!1,g.dynamicChildren=null);const{type:N,ref:q,shapeFlag:H}=g;switch(N){case Fo:v(h,g,k,C);break;case Pt:M(h,g,k,C);break;case ao:h==null&&R(g,k,C,P);break;case ft:Nt(h,g,k,C,E,S,P,z,B);break;default:H&1?F(h,g,k,C,E,S,P,z,B):H&6?gt(h,g,k,C,E,S,P,z,B):(H&64||H&128)&&N.process(h,g,k,C,E,S,P,z,B,V)}q!=null&&E?$n(q,h&&h.ref,S,g||h,!g):q==null&&h&&h.ref!=null&&$n(h.ref,null,S,h,!0)},v=(h,g,k,C)=>{if(h==null)o(g.el=l(g.children),k,C);else{const E=g.el=h.el;g.children!==h.children&&d(E,g.children)}},M=(h,g,k,C)=>{h==null?o(g.el=a(g.children||""),k,C):g.el=h.el},R=(h,g,k,C)=>{[h.el,h.anchor]=b(h.children,g,k,C,h.el,h.anchor)},O=({el:h,anchor:g},k,C)=>{let E;for(;h&&h!==g;)E=f(h),o(h,k,C),h=E;o(g,k,C)},T=({el:h,anchor:g})=>{let k;for(;h&&h!==g;)k=f(h),i(h),h=k;i(g)},F=(h,g,k,C,E,S,P,z,B)=>{g.type==="svg"?P="svg":g.type==="math"&&(P="mathml"),h==null?W(g,k,C,E,S,P,z,B):pe(h,g,E,S,P,z,B)},W=(h,g,k,C,E,S,P,z)=>{let B,N;const{props:q,shapeFlag:H,transition:U,dirs:Y}=h;if(B=h.el=r(h.type,S,q&&q.is,q),H&8?c(B,h.children):H&16&&de(h.children,B,null,C,E,li(h,S),P,z),Y&&Ht(h,null,C,"created"),X(B,h,h.scopeId,P,C),q){for(const ue in q)ue!=="value"&&!Tn(ue)&&s(B,ue,null,q[ue],S,C);"value"in q&&s(B,"value",null,q.value,S),(N=q.onVnodeBeforeMount)&&rt(N,C,h)}Y&&Ht(h,null,C,"beforeMount");const Q=fd(E,U);Q&&U.beforeEnter(B),o(B,g,k),((N=q&&q.onVnodeMounted)||Q||Y)&&Fe(()=>{N&&rt(N,C,h),Q&&U.enter(B),Y&&Ht(h,null,C,"mounted")},E)},X=(h,g,k,C,E)=>{if(k&&y(h,k),C)for(let S=0;S<C.length;S++)y(h,C[S]);if(E){let S=E.subTree;if(g===S||Ll(S.type)&&(S.ssContent===g||S.ssFallback===g)){const P=E.vnode;X(h,P,P.scopeId,P.slotScopeIds,E.parent)}}},de=(h,g,k,C,E,S,P,z,B=0)=>{for(let N=B;N<h.length;N++){const q=h[N]=z?$t(h[N]):ht(h[N]);x(null,q,g,k,C,E,S,P,z)}},pe=(h,g,k,C,E,S,P)=>{const z=g.el=h.el;let{patchFlag:B,dynamicChildren:N,dirs:q}=g;B|=h.patchFlag&16;const H=h.props||ce,U=g.props||ce;let Y;if(k&&Ft(k,!1),(Y=U.onVnodeBeforeUpdate)&&rt(Y,k,g,h),q&&Ht(g,h,k,"beforeUpdate"),k&&Ft(k,!0),(H.innerHTML&&U.innerHTML==null||H.textContent&&U.textContent==null)&&c(z,""),N?Ee(h.dynamicChildren,N,z,k,C,li(g,E),S):P||ee(h,g,z,null,k,C,li(g,E),S,!1),B>0){if(B&16)ot(z,H,U,k,E);else if(B&2&&H.class!==U.class&&s(z,"class",null,U.class,E),B&4&&s(z,"style",H.style,U.style,E),B&8){const Q=g.dynamicProps;for(let ue=0;ue<Q.length;ue++){const ie=Q[ue],Pe=H[ie],Me=U[ie];(Me!==Pe||ie==="value")&&s(z,ie,Pe,Me,E,k)}}B&1&&h.children!==g.children&&c(z,g.children)}else!P&&N==null&&ot(z,H,U,k,E);((Y=U.onVnodeUpdated)||q)&&Fe(()=>{Y&&rt(Y,k,g,h),q&&Ht(g,h,k,"updated")},C)},Ee=(h,g,k,C,E,S,P)=>{for(let z=0;z<g.length;z++){const B=h[z],N=g[z],q=B.el&&(B.type===ft||!wn(B,N)||B.shapeFlag&198)?u(B.el):k;x(B,N,q,null,C,E,S,P,!0)}},ot=(h,g,k,C,E)=>{if(g!==k){if(g!==ce)for(const S in g)!Tn(S)&&!(S in k)&&s(h,S,g[S],null,E,C);for(const S in k){if(Tn(S))continue;const P=k[S],z=g[S];P!==z&&S!=="value"&&s(h,S,z,P,E,C)}"value"in k&&s(h,"value",g.value,k.value,E)}},Nt=(h,g,k,C,E,S,P,z,B)=>{const N=g.el=h?h.el:l(""),q=g.anchor=h?h.anchor:l("");let{patchFlag:H,dynamicChildren:U,slotScopeIds:Y}=g;Y&&(z=z?z.concat(Y):Y),h==null?(o(N,k,C),o(q,k,C),de(g.children||[],k,q,E,S,P,z,B)):H>0&&H&64&&U&&h.dynamicChildren?(Ee(h.dynamicChildren,U,k,E,S,P,z),(g.key!=null||E&&g===E.subTree)&&Sl(h,g,!0)):ee(h,g,k,q,E,S,P,z,B)},gt=(h,g,k,C,E,S,P,z,B)=>{g.slotScopeIds=z,h==null?g.shapeFlag&512?E.ctx.activate(g,k,C,P,B):bt(g,k,C,E,S,P,B):Bt(h,g,B)},bt=(h,g,k,C,E,S,P)=>{const z=h.component=$d(h,C,E);if(pl(h)&&(z.ctx.renderer=V),Od(z,!1,P),z.asyncDep){if(E&&E.registerDep(z,Z,P),!h.el){const B=z.subTree=Ke(Pt);M(null,B,g,k),h.placeholder=B.el}}else Z(z,h,g,k,E,S,P)},Bt=(h,g,k)=>{const C=g.component=h.component;if(wd(h,g,k))if(C.asyncDep&&!C.asyncResolved){le(C,g,k);return}else C.next=g,C.update();else g.el=h.el,C.vnode=g},Z=(h,g,k,C,E,S,P)=>{const z=()=>{if(h.isMounted){let{next:H,bu:U,u:Y,parent:Q,vnode:ue}=h;{const Be=Ml(h);if(Be){H&&(H.el=ue.el,le(h,H,P)),Be.asyncDep.then(()=>{h.isUnmounted||z()});return}}let ie=H,Pe;Ft(h,!1),H?(H.el=ue.el,le(h,H,P)):H=ue,U&&ro(U),(Pe=H.props&&H.props.onVnodeBeforeUpdate)&&rt(Pe,Q,H,ue),Ft(h,!0);const Me=ai(h),Ze=h.subTree;h.subTree=Me,x(Ze,Me,u(Ze.el),w(Ze),h,E,S),H.el=Me.el,ie===null&&kd(h,Me.el),Y&&Fe(Y,E),(Pe=H.props&&H.props.onVnodeUpdated)&&Fe(()=>rt(Pe,Q,H,ue),E)}else{let H;const{el:U,props:Y}=g,{bm:Q,m:ue,parent:ie,root:Pe,type:Me}=h,Ze=Rn(g);if(Ft(h,!1),Q&&ro(Q),!Ze&&(H=Y&&Y.onVnodeBeforeMount)&&rt(H,ie,g),Ft(h,!0),U&&se){const Be=()=>{h.subTree=ai(h),se(U,h.subTree,h,E,null)};Ze&&Me.__asyncHydrate?Me.__asyncHydrate(U,h,Be):Be()}else{Pe.ce&&Pe.ce._def.shadowRoot!==!1&&Pe.ce._injectChildStyle(Me);const Be=h.subTree=ai(h);x(null,Be,k,C,h,E,S),g.el=Be.el}if(ue&&Fe(ue,E),!Ze&&(H=Y&&Y.onVnodeMounted)){const Be=g;Fe(()=>rt(H,ie,Be),E)}(g.shapeFlag&256||ie&&Rn(ie.vnode)&&ie.vnode.shapeFlag&256)&&h.a&&Fe(h.a,E),h.isMounted=!0,g=k=C=null}};h.scope.on();const B=h.effect=new Vr(z);h.scope.off();const N=h.update=B.run.bind(B),q=h.job=B.runIfDirty.bind(B);q.i=h,q.id=h.uid,B.scheduler=()=>Qi(q),Ft(h,!0),N()},le=(h,g,k)=>{g.component=h;const C=h.vnode.props;h.vnode=g,h.next=null,sd(h,g.props,C,k),cd(h,g.children,k),Ct(),Ts(h),St()},ee=(h,g,k,C,E,S,P,z,B=!1)=>{const N=h&&h.children,q=h?h.shapeFlag:0,H=g.children,{patchFlag:U,shapeFlag:Y}=g;if(U>0){if(U&128){it(N,H,k,C,E,S,P,z,B);return}else if(U&256){Je(N,H,k,C,E,S,P,z,B);return}}Y&8?(q&16&&m(N,E,S),H!==N&&c(k,H)):q&16?Y&16?it(N,H,k,C,E,S,P,z,B):m(N,E,S,!0):(q&8&&c(k,""),Y&16&&de(H,k,C,E,S,P,z,B))},Je=(h,g,k,C,E,S,P,z,B)=>{h=h||dn,g=g||dn;const N=h.length,q=g.length,H=Math.min(N,q);let U;for(U=0;U<H;U++){const Y=g[U]=B?$t(g[U]):ht(g[U]);x(h[U],Y,k,null,E,S,P,z,B)}N>q?m(h,E,S,!0,!1,H):de(g,k,C,E,S,P,z,B,H)},it=(h,g,k,C,E,S,P,z,B)=>{let N=0;const q=g.length;let H=h.length-1,U=q-1;for(;N<=H&&N<=U;){const Y=h[N],Q=g[N]=B?$t(g[N]):ht(g[N]);if(wn(Y,Q))x(Y,Q,k,null,E,S,P,z,B);else break;N++}for(;N<=H&&N<=U;){const Y=h[H],Q=g[U]=B?$t(g[U]):ht(g[U]);if(wn(Y,Q))x(Y,Q,k,null,E,S,P,z,B);else break;H--,U--}if(N>H){if(N<=U){const Y=U+1,Q=Y<q?g[Y].el:C;for(;N<=U;)x(null,g[N]=B?$t(g[N]):ht(g[N]),k,Q,E,S,P,z,B),N++}}else if(N>U)for(;N<=H;)De(h[N],E,S,!0),N++;else{const Y=N,Q=N,ue=new Map;for(N=Q;N<=U;N++){const He=g[N]=B?$t(g[N]):ht(g[N]);He.key!=null&&ue.set(He.key,N)}let ie,Pe=0;const Me=U-Q+1;let Ze=!1,Be=0;const vn=new Array(Me);for(N=0;N<Me;N++)vn[N]=0;for(N=Y;N<=H;N++){const He=h[N];if(Pe>=Me){De(He,E,S,!0);continue}let st;if(He.key!=null)st=ue.get(He.key);else for(ie=Q;ie<=U;ie++)if(vn[ie-Q]===0&&wn(He,g[ie])){st=ie;break}st===void 0?De(He,E,S,!0):(vn[st-Q]=N+1,st>=Be?Be=st:Ze=!0,x(He,g[st],k,null,E,S,P,z,B),Pe++)}const _s=Ze?hd(vn):dn;for(ie=_s.length-1,N=Me-1;N>=0;N--){const He=Q+N,st=g[He],Es=g[He+1],Cs=He+1<q?Es.el||Es.placeholder:C;vn[N]===0?x(null,st,k,Cs,E,S,P,z,B):Ze&&(ie<0||N!==_s[ie]?Ve(st,k,Cs,2):ie--)}}},Ve=(h,g,k,C,E=null)=>{const{el:S,type:P,transition:z,children:B,shapeFlag:N}=h;if(N&6){Ve(h.component.subTree,g,k,C);return}if(N&128){h.suspense.move(g,k,C);return}if(N&64){P.move(h,g,k,V);return}if(P===ft){o(S,g,k);for(let H=0;H<B.length;H++)Ve(B[H],g,k,C);o(h.anchor,g,k);return}if(P===ao){O(h,g,k);return}if(C!==2&&N&1&&z)if(C===0)z.beforeEnter(S),o(S,g,k),Fe(()=>z.enter(S),E);else{const{leave:H,delayLeave:U,afterLeave:Y}=z,Q=()=>{h.ctx.isUnmounted?i(S):o(S,g,k)},ue=()=>{S._isLeaving&&S[Ic](!0),H(S,()=>{Q(),Y&&Y()})};U?U(S,Q,ue):ue()}else o(S,g,k)},De=(h,g,k,C=!1,E=!1)=>{const{type:S,props:P,ref:z,children:B,dynamicChildren:N,shapeFlag:q,patchFlag:H,dirs:U,cacheIndex:Y}=h;if(H===-2&&(E=!1),z!=null&&(Ct(),$n(z,null,k,h,!0),St()),Y!=null&&(g.renderCache[Y]=void 0),q&256){g.ctx.deactivate(h);return}const Q=q&1&&U,ue=!Rn(h);let ie;if(ue&&(ie=P&&P.onVnodeBeforeUnmount)&&rt(ie,g,h),q&6)p(h.component,k,C);else{if(q&128){h.suspense.unmount(k,C);return}Q&&Ht(h,null,g,"beforeUnmount"),q&64?h.type.remove(h,g,k,V,C):N&&!N.hasOnce&&(S!==ft||H>0&&H&64)?m(N,g,k,!1,!0):(S===ft&&H&384||!E&&q&16)&&m(B,g,k),C&&A(h)}(ue&&(ie=P&&P.onVnodeUnmounted)||Q)&&Fe(()=>{ie&&rt(ie,g,h),Q&&Ht(h,null,g,"unmounted")},k)},A=h=>{const{type:g,el:k,anchor:C,transition:E}=h;if(g===ft){L(k,C);return}if(g===ao){T(h);return}const S=()=>{i(k),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(h.shapeFlag&1&&E&&!E.persisted){const{leave:P,delayLeave:z}=E,B=()=>P(k,S);z?z(h.el,S,B):B()}else S()},L=(h,g)=>{let k;for(;h!==g;)k=f(h),i(h),h=k;i(g)},p=(h,g,k)=>{const{bum:C,scope:E,job:S,subTree:P,um:z,m:B,a:N}=h;Ds(B),Ds(N),C&&ro(C),E.stop(),S&&(S.flags|=8,De(P,h,g,k)),z&&Fe(z,g),Fe(()=>{h.isUnmounted=!0},g)},m=(h,g,k,C=!1,E=!1,S=0)=>{for(let P=S;P<h.length;P++)De(h[P],g,k,C,E)},w=h=>{if(h.shapeFlag&6)return w(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const g=f(h.anchor||h.el),k=g&&g[Rc];return k?f(k):g};let D=!1;const j=(h,g,k)=>{h==null?g._vnode&&De(g._vnode,null,null,!0):x(g._vnode||null,h,g,null,null,null,k),g._vnode=h,D||(D=!0,Ts(),dl(),D=!1)},V={p:x,um:De,m:Ve,r:A,mt:bt,mc:de,pc:ee,pbc:Ee,n:w,o:e};let I,se;return t&&([I,se]=t(V)),{render:j,hydrate:I,createApp:nd(j,I)}}function li({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ft({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Sl(e,t,n=!1){const o=e.children,i=t.children;if(K(o)&&K(i))for(let s=0;s<o.length;s++){const r=o[s];let l=i[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[s]=$t(i[s]),l.el=r.el),!n&&l.patchFlag!==-2&&Sl(r,l)),l.type===Fo&&l.patchFlag!==-1&&(l.el=r.el),l.type===Pt&&!l.el&&(l.el=r.el)}}function hd(e){const t=e.slice(),n=[0];let o,i,s,r,l;const a=e.length;for(o=0;o<a;o++){const d=e[o];if(d!==0){if(i=n[n.length-1],e[i]<d){t[o]=i,n.push(o);continue}for(s=0,r=n.length-1;s<r;)l=s+r>>1,e[n[l]]<d?s=l+1:r=l;d<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function Ml(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ml(t)}function Ds(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const pd=Symbol.for("v-scx"),md=()=>lo(pd);function In(e,t,n){return Nl(e,t,n)}function Nl(e,t,n=ce){const{immediate:o,deep:i,flush:s,once:r}=n,l=Se({},n),a=t&&o||!t&&s!=="post";let d;if(Fn){if(s==="sync"){const y=md();d=y.__watcherHandles||(y.__watcherHandles=[])}else if(!a){const y=()=>{};return y.stop=Qe,y.resume=Qe,y.pause=Qe,y}}const c=Oe;l.call=(y,b,x)=>pt(y,c,b,x);let u=!1;s==="post"?l.scheduler=y=>{Fe(y,c&&c.suspense)}:s!=="sync"&&(u=!0,l.scheduler=(y,b)=>{b?y():Qi(y)}),l.augmentJob=y=>{t&&(y.flags|=4),u&&(y.flags|=2,c&&(y.id=c.uid,y.i=c))};const f=Nc(e,t,l);return Fn&&(d?d.push(f):a&&f()),f}function gd(e,t,n){const o=this.proxy,i=ke(e)?e.includes(".")?Tl(o,e):()=>o[e]:e.bind(o,o);let s;G(t)?s=t:(s=t.handler,n=t);const r=Wn(this),l=Nl(i,s.bind(o),n);return r(),l}function Tl(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}const bd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${It(t)}Modifiers`]||e[`${en(t)}Modifiers`];function yd(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||ce;let i=n;const s=t.startsWith("update:"),r=s&&bd(o,t.slice(7));r&&(r.trim&&(i=n.map(c=>ke(c)?c.trim():c)),r.number&&(i=n.map(yi)));let l,a=o[l=ti(t)]||o[l=ti(It(t))];!a&&s&&(a=o[l=ti(en(t))]),a&&pt(a,e,6,i);const d=o[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,pt(d,e,6,i)}}function Al(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(i!==void 0)return i;const s=e.emits;let r={},l=!1;if(!G(e)){const a=d=>{const c=Al(d,t,!0);c&&(l=!0,Se(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(ge(e)&&o.set(e,null),null):(K(s)?s.forEach(a=>r[a]=null):Se(r,s),ge(e)&&o.set(e,r),r)}function Ho(e,t){return!e||!Oo(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,en(t))||ne(e,t))}function ai(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[s],slots:r,attrs:l,emit:a,render:d,renderCache:c,props:u,data:f,setupState:y,ctx:b,inheritAttrs:x}=e,v=xo(e);let M,R;try{if(n.shapeFlag&4){const T=i||o,F=T;M=ht(d.call(F,T,c,u,y,f,b)),R=l}else{const T=t;M=ht(T.length>1?T(u,{attrs:l,slots:r,emit:a}):T(u,null)),R=t.props?l:vd(l)}}catch(T){Dn.length=0,zo(T,e,1),M=Ke(Pt)}let O=M;if(R&&x!==!1){const T=Object.keys(R),{shapeFlag:F}=O;T.length&&F&7&&(s&&T.some(Fi)&&(R=xd(R,s)),O=mn(O,R,!1,!0))}return n.dirs&&(O=mn(O,null,!1,!0),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&es(O,n.transition),M=O,xo(v),M}const vd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Oo(n))&&((t||(t={}))[n]=e[n]);return t},xd=(e,t)=>{const n={};for(const o in e)(!Fi(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function wd(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:l,patchFlag:a}=t,d=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?Ps(o,r,d):!!r;if(a&8){const c=t.dynamicProps;for(let u=0;u<c.length;u++){const f=c[u];if(r[f]!==o[f]&&!Ho(d,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===r?!1:o?r?Ps(o,r,d):!0:!!r;return!1}function Ps(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const s=o[i];if(t[s]!==e[s]&&!Ho(n,s))return!0}return!1}function kd({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ll=e=>e.__isSuspense;function _d(e,t){t&&t.pendingBranch?K(e)?t.effects.push(...e):t.effects.push(e):Lc(e)}const ft=Symbol.for("v-fgt"),Fo=Symbol.for("v-txt"),Pt=Symbol.for("v-cmt"),ao=Symbol.for("v-stc"),Dn=[];let qe=null;function be(e=!1){Dn.push(qe=e?null:[])}function Ed(){Dn.pop(),qe=Dn[Dn.length-1]||null}let Hn=1;function js(e,t=!1){Hn+=e,e<0&&qe&&t&&(qe.hasOnce=!0)}function $l(e){return e.dynamicChildren=Hn>0?qe||dn:null,Ed(),Hn>0&&qe&&qe.push(e),e}function ye(e,t,n,o,i,s){return $l($(e,t,n,o,i,s,!0))}function Cd(e,t,n,o,i){return $l(Ke(e,t,n,o,i,!0))}function Rl(e){return e?e.__v_isVNode===!0:!1}function wn(e,t){return e.type===t.type&&e.key===t.key}const Ol=({key:e})=>e??null,co=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ke(e)||Le(e)||G(e)?{i:We,r:e,k:t,f:!!n}:e:null);function $(e,t=null,n=null,o=0,i=null,s=e===ft?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ol(t),ref:t&&co(t),scopeId:fl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:We};return l?(rs(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=ke(n)?8:16),Hn>0&&!r&&qe&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&qe.push(a),a}const Ke=Sd;function Sd(e,t=null,n=null,o=0,i=null,s=!1){if((!e||e===Yc)&&(e=Pt),Rl(e)){const l=mn(e,t,!0);return n&&rs(l,n),Hn>0&&!s&&qe&&(l.shapeFlag&6?qe[qe.indexOf(e)]=l:qe.push(l)),l.patchFlag=-2,l}if(jd(e)&&(e=e.__vccOpts),t){t=Md(t);let{class:l,style:a}=t;l&&!ke(l)&&(t.class=Gt(l)),ge(a)&&(Xi(a)&&!K(a)&&(a=Se({},a)),t.style=qn(a))}const r=ke(e)?1:Ll(e)?128:Oc(e)?64:ge(e)?4:G(e)?2:0;return $(e,t,n,o,i,r,s,!0)}function Md(e){return e?Xi(e)||xl(e)?Se({},e):e:null}function mn(e,t,n=!1,o=!1){const{props:i,ref:s,patchFlag:r,children:l,transition:a}=e,d=t?Td(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ol(d),ref:t&&t.ref?n&&s?K(s)?s.concat(co(t)):[s,co(t)]:co(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ft?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mn(e.ssContent),ssFallback:e.ssFallback&&mn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&es(c,a.clone(c)),c}function Nd(e=" ",t=0){return Ke(Fo,null,e,t)}function ci(e,t){const n=Ke(ao,null,e);return n.staticCount=t,n}function Rt(e="",t=!1){return t?(be(),Cd(Pt,null,e)):Ke(Pt,null,e)}function ht(e){return e==null||typeof e=="boolean"?Ke(Pt):K(e)?Ke(ft,null,e.slice()):Rl(e)?$t(e):Ke(Fo,null,String(e))}function $t(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mn(e)}function rs(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(K(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),rs(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!xl(t)?t._ctx=We:i===3&&We&&(We.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else G(t)?(t={default:t,_ctx:We},n=32):(t=String(t),o&64?(n=16,t=[Nd(t)]):n=8);e.children=t,e.shapeFlag|=n}function Td(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=Gt([t.class,o.class]));else if(i==="style")t.style=qn([t.style,o.style]);else if(Oo(i)){const s=t[i],r=o[i];r&&s!==r&&!(K(s)&&s.includes(r))&&(t[i]=s?[].concat(s,r):r)}else i!==""&&(t[i]=o[i])}return t}function rt(e,t,n,o=null){pt(e,t,7,[n,o])}const Ad=bl();let Ld=0;function $d(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||Ad,s={uid:Ld++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Qa(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:kl(o,i),emitsOptions:Al(o,i),emit:null,emitted:null,propsDefaults:ce,inheritAttrs:o.inheritAttrs,ctx:ce,data:ce,props:ce,attrs:ce,slots:ce,refs:ce,setupState:ce,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=yd.bind(null,s),e.ce&&e.ce(s),s}let Oe=null;const Rd=()=>Oe||We;let ko,Mi;{const e=Po(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),s=>{i.length>1?i.forEach(r=>r(s)):i[0](s)}};ko=t("__VUE_INSTANCE_SETTERS__",n=>Oe=n),Mi=t("__VUE_SSR_SETTERS__",n=>Fn=n)}const Wn=e=>{const t=Oe;return ko(e),e.scope.on(),()=>{e.scope.off(),ko(t)}},zs=()=>{Oe&&Oe.scope.off(),ko(null)};function Il(e){return e.vnode.shapeFlag&4}let Fn=!1;function Od(e,t=!1,n=!1){t&&Mi(t);const{props:o,children:i}=e.vnode,s=Il(e);id(e,o,s,t),ad(e,i,n||t);const r=s?Id(e,t):void 0;return t&&Mi(!1),r}function Id(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Jc);const{setup:o}=n;if(o){Ct();const i=e.setupContext=o.length>1?Pd(e):null,s=Wn(e),r=Vn(o,e,0,[e.props,i]),l=Pr(r);if(St(),s(),(l||e.sp)&&!Rn(e)&&hl(e),l){if(r.then(zs,zs),t)return r.then(a=>{Bs(e,a,t)}).catch(a=>{zo(a,e,0)});e.asyncDep=r}else Bs(e,r,t)}else Dl(e,t)}function Bs(e,t,n){G(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=rl(t)),Dl(e,n)}let Hs;function Dl(e,t,n){const o=e.type;if(!e.render){if(!t&&Hs&&!o.render){const i=o.template||os(e).template;if(i){const{isCustomElement:s,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,d=Se(Se({isCustomElement:s,delimiters:l},r),a);o.render=Hs(i,d)}}e.render=o.render||Qe}{const i=Wn(e);Ct();try{Zc(e)}finally{St(),i()}}}const Dd={get(e,t){return Ne(e,"get",""),e[t]}};function Pd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Dd),slots:e.slots,emit:e.emit,expose:t}}function Uo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(rl(xc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in On)return On[n](e)},has(t,n){return n in t||n in On}})):e.proxy}function jd(e){return G(e)&&"__vccOpts"in e}const zd=(e,t)=>Sc(e,t,Fn),Bd="3.5.20";/**
|
||
* @vue/runtime-dom v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let Ni;const Fs=typeof window<"u"&&window.trustedTypes;if(Fs)try{Ni=Fs.createPolicy("vue",{createHTML:e=>e})}catch{}const Pl=Ni?e=>Ni.createHTML(e):e=>e,Hd="http://www.w3.org/2000/svg",Fd="http://www.w3.org/1998/Math/MathML",xt=typeof document<"u"?document:null,Us=xt&&xt.createElement("template"),Ud={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?xt.createElementNS(Hd,e):t==="mathml"?xt.createElementNS(Fd,e):n?xt.createElement(e,{is:n}):xt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>xt.createTextNode(e),createComment:e=>xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>xt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Us.innerHTML=Pl(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=Us.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},qd=Symbol("_vtc");function Vd(e,t,n){const o=e[qd];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _o=Symbol("_vod"),jl=Symbol("_vsh"),Wd={name:"show",beforeMount(e,{value:t},{transition:n}){e[_o]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):kn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),kn(e,!0),o.enter(e)):o.leave(e,()=>{kn(e,!1)}):kn(e,t))},beforeUnmount(e,{value:t}){kn(e,t)}};function kn(e,t){e.style.display=t?e[_o]:"none",e[jl]=!t}const Yd=Symbol(""),Kd=/(^|;)\s*display\s*:/;function Jd(e,t,n){const o=e.style,i=ke(n);let s=!1;if(n&&!i){if(t)if(ke(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&uo(o,l,"")}else for(const r in t)n[r]==null&&uo(o,r,"");for(const r in n)r==="display"&&(s=!0),uo(o,r,n[r])}else if(i){if(t!==n){const r=o[Yd];r&&(n+=";"+r),o.cssText=n,s=Kd.test(n)}}else t&&e.removeAttribute("style");_o in e&&(e[_o]=s?o.display:"",e[jl]&&(o.display="none"))}const qs=/\s*!important$/;function uo(e,t,n){if(K(n))n.forEach(o=>uo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Zd(e,t);qs.test(n)?e.setProperty(en(o),n.replace(qs,""),"important"):e[o]=n}}const Vs=["Webkit","Moz","ms"],di={};function Zd(e,t){const n=di[t];if(n)return n;let o=It(t);if(o!=="filter"&&o in e)return di[t]=o;o=Br(o);for(let i=0;i<Vs.length;i++){const s=Vs[i]+o;if(s in e)return di[t]=s}return t}const Ws="http://www.w3.org/1999/xlink";function Ys(e,t,n,o,i,s=Xa(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ws,t.slice(6,t.length)):e.setAttributeNS(Ws,t,n):n==null||s&&!Fr(n)?e.removeAttribute(t):e.setAttribute(t,s?"":jt(n)?String(n):n)}function Ks(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Pl(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Fr(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(i||t)}function an(e,t,n,o){e.addEventListener(t,n,o)}function Gd(e,t,n,o){e.removeEventListener(t,n,o)}const Js=Symbol("_vei");function Xd(e,t,n,o,i=null){const s=e[Js]||(e[Js]={}),r=s[t];if(o&&r)r.value=o;else{const[l,a]=Qd(t);if(o){const d=s[t]=nu(o,i);an(e,l,d,a)}else r&&(Gd(e,l,r,a),s[t]=void 0)}}const Zs=/(?:Once|Passive|Capture)$/;function Qd(e){let t;if(Zs.test(e)){t={};let o;for(;o=e.match(Zs);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):en(e.slice(2)),t]}let ui=0;const eu=Promise.resolve(),tu=()=>ui||(eu.then(()=>ui=0),ui=Date.now());function nu(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;pt(ou(o,n.value),t,5,[o])};return n.value=e,n.attached=tu(),n}function ou(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const Gs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,iu=(e,t,n,o,i,s)=>{const r=i==="svg";t==="class"?Vd(e,o,r):t==="style"?Jd(e,n,o):Oo(t)?Fi(t)||Xd(e,t,n,o,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):su(e,t,o,r))?(Ks(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ys(e,t,o,r,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ke(o))?Ks(e,It(t),o,s,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Ys(e,t,o,r))};function su(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Gs(t)&&G(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Gs(t)&&ke(n)?!1:t in e}const Xs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return K(t)?n=>ro(t,n):t};function ru(e){e.target.composing=!0}function Qs(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const fi=Symbol("_assign"),lu={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[fi]=Xs(i);const s=o||i.props&&i.props.type==="number";an(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=yi(l)),e[fi](l)}),n&&an(e,"change",()=>{e.value=e.value.trim()}),t||(an(e,"compositionstart",ru),an(e,"compositionend",Qs),an(e,"change",Qs))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:s}},r){if(e[fi]=Xs(r),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?yi(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},au=Se({patchProp:iu},Ud);let er;function cu(){return er||(er=dd(au))}const du=(...e)=>{const t=cu().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=fu(o);if(!i)return;const s=t._component;!G(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,uu(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function uu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function fu(e){return ke(e)?document.querySelector(e):e}(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2em}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>div,.map-container me-tpc>span,.map-container me-tpc>img{pointer-events:none}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();(function(e){var t,n,o,i,s,r,l='<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>',a=(a=document.getElementsByTagName("script"))[a.length-1].getAttribute("data-injectcss");if(a&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(c){console&&console.log(c)}}function d(){s||(s=!0,o())}t=function(){var c,u,f,y;(y=document.createElement("div")).innerHTML=l,l=null,(f=y.getElementsByTagName("svg")[0])&&(f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.width=0,f.style.height=0,f.style.overflow="hidden",c=f,(u=document.body).firstChild?(y=c,(f=u.firstChild).parentNode.insertBefore(y,f)):u.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=t,i=e.document,s=!1,(r=function(){try{i.documentElement.doScroll("left")}catch{return void setTimeout(r,50)}d()})(),i.onreadystatechange=function(){i.readyState=="complete"&&(i.onreadystatechange=null,d())})})(window);const Xe=0,Vt=1,Yn=2,ut=30,lt=8,zl={name:"Latte",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}},Bl={name:"Dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--color":"#cccccc","--bgcolor":"#252526","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969"}};function Eo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}const hu=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Co=function(e,t){if(t.id===e)return t;if(t.children&&t.children.length){for(let n=0;n<t.children.length;n++){const o=Co(e,t.children[n]);if(o)return o}return null}else return null},mt=(e,t)=>{if(e.parent=t,e.children)for(let n=0;n<e.children.length;n++)mt(e.children[n],e)};function Hl(e){if(e.id=Kn(),e.children)for(let t=0;t<e.children.length;t++)Hl(e.children[t])}const pu=(e,t)=>{let n=Date.now();return function(...o){Date.now()-n>=t&&(e(...o),n=Date.now())}};function Fl(e,t,n,o){const i=o-t,s=e-n;let r=Math.atan(Math.abs(i)/Math.abs(s))/3.14*180;s<0&&i>0&&(r=180-r),s<0&&i<0&&(r=180+r),s>0&&i<0&&(r=360-r);const l=15,a=30,d=r+a,c=r-a;return{x1:n+Math.cos(Math.PI*d/180)*l,y1:o-Math.sin(Math.PI*d/180)*l,x2:n+Math.cos(Math.PI*c/180)*l,y2:o-Math.sin(Math.PI*c/180)*l}}function Kn(){return(new Date().getTime().toString(16)+Math.random().toString(16).substr(2)).substr(2,16)}const mu=function(){const e=Kn();return{topic:this.newTopicName,id:e}};function gu(e,t){let n=!0;for(;t.parent;){if(t.parent===e){n=!1;break}t=t.parent}return n}function Ul(e){return JSON.parse(JSON.stringify(e,(t,n)=>{if(t!=="parent")return n}))}const gn=(e,t)=>{let n=0,o=0;for(;t&&t!==e;)n+=t.offsetLeft,o+=t.offsetTop,t=t.offsetParent;return{offsetLeft:n,offsetTop:o}},we=(e,t)=>{for(const n in t)e.setAttribute(n,t[n])},Ti=e=>e?e.tagName==="ME-TPC":!1,Ge={moved:!1,mousedown:!1,onMove(e,t){if(this.mousedown){this.moved=!0;const n=e.movementX,o=e.movementY;t.scrollTo(t.scrollLeft-n,t.scrollTop-o)}},clear(){this.moved=!1,this.mousedown=!1}};function bu(e){e.map.addEventListener("click",t=>{var n,o;if(t.button!==0)return;if((n=e.helper1)!=null&&n.moved){e.helper1.clear();return}if((o=e.helper2)!=null&&o.moved){e.helper2.clear();return}if(Ge.moved){Ge.clear();return}e.unselectNode(),e.unselectNodes(),e.unselectSummary(),e.unselectLink();const i=t.target;if(i.tagName==="ME-EPD")e.expandNode(i.previousSibling);else if(e.editable)Ti(i)?e.selectNode(i,!1,t):i.tagName==="text"?i.dataset.type==="custom-link"?e.selectLink(i.parentElement):e.selectSummary(i.parentElement):i.className==="circle"||e.hideLinkController&&e.hideLinkController();else return}),e.map.addEventListener("dblclick",t=>{if(t.preventDefault(),!e.editable)return;const n=t.target;Ti(n)?e.beginEdit(n):n.tagName==="text"&&(n.dataset.type==="custom-link"?e.editCutsomLinkLabel(n.parentElement):e.editSummary(n.parentElement))}),e.map.addEventListener("mousemove",t=>{t.target.contentEditable!=="true"&&Ge.onMove(t,e.container)}),e.map.addEventListener("mousedown",t=>{const n=e.mouseSelectionButton===0?2:0;t.button===n&&t.target.contentEditable!=="true"&&(Ge.moved=!1,Ge.mousedown=!0)}),e.map.addEventListener("mouseleave",t=>{const n=e.mouseSelectionButton===0?2:0;t.button===n&&Ge.clear()}),e.map.addEventListener("mouseup",t=>{const n=e.mouseSelectionButton===0?2:0;t.button===n&&Ge.clear()}),e.map.addEventListener("contextmenu",t=>{t.preventDefault()})}const yu={create(){return{handlers:{},showHandler:function(){console.log(this.handlers)},addListener:function(e,t){this.handlers[e]===void 0&&(this.handlers[e]=[]),this.handlers[e].push(t)},fire:function(e,...t){if(this.handlers[e]instanceof Array){const n=this.handlers[e];for(let o=0;o<n.length;o++)n[o](...t)}},removeListener:function(e,t){if(!this.handlers[e])return;const n=this.handlers[e];if(!t)n.length=0;else if(n.length)for(let o=0;o<n.length;o++)n[o]===t&&this.handlers[e].splice(o,1)}}}},So=document,vu=function(){console.time("layout"),this.nodes.innerHTML="";const e=this.createTopic(this.nodeData);ls(e,this.nodeData),e.draggable=!1;const t=So.createElement("me-root");t.appendChild(e);const n=this.nodeData.children||[];if(this.direction===Yn){let o=0,i=0;n.map(s=>{s.direction===Xe?o+=1:s.direction===Vt?i+=1:o<=i?(s.direction=Xe,o+=1):(s.direction=Vt,i+=1)})}xu(this,n,t),console.timeEnd("layout")},xu=function(e,t,n){const o=So.createElement("me-main");o.className="lhs";const i=So.createElement("me-main");i.className="rhs";for(let s=0;s<t.length;s++){const r=t[s],{grp:l}=e.createWrapper(r);e.direction===Yn?r.direction===Xe?o.appendChild(l):i.appendChild(l):e.direction===Xe?o.appendChild(l):i.appendChild(l)}e.nodes.appendChild(o),e.nodes.appendChild(n),e.nodes.appendChild(i),e.nodes.appendChild(e.lines)},wu=function(e,t){const n=So.createElement("me-children");for(let o=0;o<t.length;o++){const i=t[o],{grp:s}=e.createWrapper(i);n.appendChild(s)}return n},Ue=document,ve=(e,t)=>{const n=(t?t.mindElixirBox:Ue).querySelector(`[data-nodeid=me${e}]`);if(!n)throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);return n},ls=function(e,t){if(e.innerHTML="",t.style&&(e.style.color=t.style.color||"",e.style.background=t.style.background||"",e.style.fontSize=t.style.fontSize+"px",e.style.fontWeight=t.style.fontWeight||"normal"),t.branchColor&&(e.style.borderColor=t.branchColor),t.image){const n=t.image;if(n.url&&n.width&&n.height){const o=Ue.createElement("img");o.src=n.url,o.style.width=n.width+"px",o.style.height=n.height+"px",e.appendChild(o),e.image=o}else console.warn("image url/width/height are required")}else e.image&&(e.image=void 0);{const n=Ue.createElement("span");n.className="text",n.textContent=t.topic,e.appendChild(n),e.text=n}if(t.hyperLink){const n=Ue.createElement("a");n.className="hyper-link",n.target="_blank",n.innerText="🔗",n.href=t.hyperLink,e.appendChild(n),e.linkContainer=n}else e.linkContainer&&(e.linkContainer=void 0);if(t.icons&&t.icons.length){const n=Ue.createElement("span");n.className="icons",n.innerHTML=t.icons.map(o=>`<span>${Eo(o)}</span>`).join(""),e.appendChild(n),e.icons=n}else e.icons&&(e.icons=void 0);if(t.tags&&t.tags.length){const n=Ue.createElement("div");n.className="tags",n.innerHTML=t.tags.map(o=>`<span>${Eo(o)}</span>`).join(""),e.appendChild(n),e.tags=n}else e.tags&&(e.tags=void 0)},ku=function(e,t){const n=Ue.createElement("me-wrapper"),{p:o,tpc:i}=this.createParent(e);if(n.appendChild(o),!t&&e.children&&e.children.length>0){const s=qo(e.expanded);if(o.appendChild(s),e.expanded!==!1){const r=wu(this,e.children);n.appendChild(r)}}return{grp:n,top:o,tpc:i}},_u=function(e){const t=Ue.createElement("me-parent"),n=this.createTopic(e);return ls(n,e),t.appendChild(n),{p:t,tpc:n}},Eu=function(e){const t=Ue.createElement("me-children");return t.append(...e),t},Cu=function(e){const t=Ue.createElement("me-tpc");return t.nodeObj=e,t.dataset.nodeid="me"+e.id,t.draggable=this.draggable,t};function ql(e){const t=Ue.createRange();t.selectNodeContents(e);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(t))}const Su=function(e){if(console.time("editTopic"),!e)return;const t=Ue.createElement("div"),n=e.text.textContent;e.appendChild(t),t.id="input-box",t.textContent=n,t.contentEditable="true",t.spellcheck=!1,t.style.cssText=`min-width:${e.offsetWidth-8}px;`,this.direction===Xe&&(t.style.right="0"),t.focus(),ql(t),this.bus.fire("operation",{name:"beginEdit",obj:e.nodeObj}),t.addEventListener("keydown",o=>{o.stopPropagation();const i=o.key;if(i==="Enter"||i==="Tab"){if(o.shiftKey)return;o.preventDefault(),t==null||t.blur(),this.map.focus()}}),t.addEventListener("blur",()=>{var o;if(!t)return;const i=e.nodeObj,s=((o=t.textContent)==null?void 0:o.trim())||"";console.log(s),s===""?i.topic=n:i.topic=s,t.remove(),s!==n&&(e.text.textContent=i.topic,this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:i,origin:n}))}),console.timeEnd("editTopic")},qo=function(e){const t=Ue.createElement("me-epd");return t.expanded=e!==!1,t.className=e!==!1?"minus":"",t},Jt=document,Zt="http://www.w3.org/2000/svg",Mu=function(e,t){const n=Jt.createElementNS(Zt,"path");return n.setAttribute("d",e),n.setAttribute("stroke",t||"#666"),n.setAttribute("fill","none"),n.setAttribute("stroke-width","3"),n},Nn=function(e){const t=Jt.createElementNS(Zt,"svg");return t.setAttribute("class",e),t.setAttribute("overflow","visible"),t},tr=function(){const e=Jt.createElementNS(Zt,"line");return e.setAttribute("stroke","#bbb"),e.setAttribute("fill","none"),e.setAttribute("stroke-width","2"),e},Nu=function(e,t){const n=Jt.createElementNS(Zt,"path");return n.setAttribute("d",e),n.setAttribute("stroke",t||"#555"),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","square"),n.setAttribute("stroke-width","2"),n},Tu=function(e,t){const n={stroke:"rgb(235, 95, 82)",fill:"none","stroke-linecap":"cap","stroke-width":"2"},o=Jt.createElementNS(Zt,"g"),i=Jt.createElementNS(Zt,"path"),s=Jt.createElementNS(Zt,"path");return we(s,{d:t,...n}),we(i,{d:e,...n,"stroke-dasharray":"8,2"}),o.appendChild(i),o.appendChild(s),o},Vl=function(e,t,n){if(console.time("editSummary"),!t)return;const o=document.createElement("div");e.nodes.appendChild(o);const i=t.innerHTML;o.id="input-box",o.textContent=i,o.contentEditable="true",o.spellcheck=!1;const s=t.getAttribute("x")+"px",r=t.getAttribute("y")+"px";o.style.cssText=`min-width:${100-8}px;position:absolute;left:${s};top:${r};`;const l=t.getAttribute("text-anchor");l==="end"?o.style.cssText+="transform: translate(-100%, -100%);":l==="middle"?o.style.cssText+="transform: translate(-50%, -100%);":o.style.cssText+="transform: translate(0, -100%);",o.focus(),ql(o),o.addEventListener("keydown",a=>{a.stopPropagation();const d=a.key;if(d==="Enter"||d==="Tab"){if(a.shiftKey)return;a.preventDefault(),o.blur(),e.map.focus()}}),o.addEventListener("blur",()=>{o&&n(o)}),console.timeEnd("editSummary")};let Wl=Kl;const Au=function(e){console.time("linkDiv");const t=this.map.querySelector("me-root");this.nodes.style.top=`${1e4-this.nodes.offsetHeight/2}px`,this.nodes.style.left=`${1e4-t.offsetLeft-t.offsetWidth/2}px`;const n=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="",Wl=this.subLinkStyle===2?Ru:Kl;for(let o=0;o<n.length;o++){const i=n[o],s=i.querySelector("me-tpc"),r=i.firstChild,l=i.parentNode.className;let a=t.offsetLeft+t.offsetWidth/2;const d=t.offsetTop+t.offsetHeight/2;let c;const u=this.theme.palette,f=s.nodeObj.branchColor||u[o%u.length],{offsetLeft:y,offsetTop:b}=gn(this.nodes,r);l==="lhs"?c=y+r.offsetWidth:c=y;const x=b+r.offsetHeight/2;let v="";if(this.mainLinkStyle===2)this.direction===Yn&&(l==="lhs"?a=a-t.offsetWidth/6:a=a+t.offsetWidth/6),v=Lu({x1:a,y1:d,x2:c,y2:x});else{const R=(1-Math.abs(x-i.parentElement.offsetTop-i.parentElement.offsetHeight/2)/i.parentElement.offsetHeight)*.25*(t.offsetWidth/2);l==="lhs"?a=a-t.offsetWidth/10-R:a=a+t.offsetWidth/10+R,v=$u({x1:a,y1:d,x2:c,y2:x})}this.lines.appendChild(Mu(v,f));const M=i.children[0].children[1];if(M&&(M.style.top=(M.parentNode.offsetHeight-M.offsetHeight)/2+"px",l==="lhs"?M.style.left="-10px":M.style.right="-10px"),!(e&&e!==i)&&i.childElementCount){const R=Nn("subLines"),O=i.lastChild;O.tagName==="svg"&&O.remove(),i.appendChild(R);const T=i.firstChild,F=i.children[1].children,W=Yl(F,T,l,!0);R.appendChild(Nu(W,f))}}this.renderCustomLink(),this.renderSummary(),console.timeEnd("linkDiv")},Yl=function(e,t,n,o){let i="";const s=t.offsetTop,r=t.offsetLeft,l=t.offsetWidth,a=t.offsetHeight;for(let d=0;d<e.length;d++){const c=e[d],u=c.firstChild,f=u.offsetTop,y=u.offsetLeft,b=u.offsetWidth,x=u.offsetHeight;i+=Wl({pT:s,pL:r,pW:l,pH:a,cT:f,cL:y,cW:b,cH:x,direction:n,isFirst:o});const v=u.children[1];if(v){if(v.style.bottom=-(v.offsetHeight/2)+"px",n==="lhs"?v.style.left="10px":n==="rhs"&&(v.style.right="10px"),!v.expanded)continue}else continue;const M=c.children[1].children;M.length>0&&(i+=Yl(M,u,n))}return i};function Lu({x1:e,y1:t,x2:n,y2:o}){return`M ${e} ${t} V ${o>t?o-20:o+20} C ${e} ${o} ${e} ${o} ${n>e?e+20:e-20} ${o} H ${n}`}function $u({x1:e,y1:t,x2:n,y2:o}){return`M ${e} ${t} Q ${e} ${o} ${n} ${o}`}function Ru({pT:e,pL:t,pW:n,pH:o,cT:i,cL:s,cW:r,cH:l,direction:a,isFirst:d}){let c;d?c=e+o/2:c=e+o;const u=i+l;let f=0,y=0,b=0;return a==="lhs"?(f=t+ut,y=s,b=s+r):a==="rhs"&&(f=t+n-ut,y=s+r,b=s),u<c+50&&u>c-50?`M ${f} ${c} H ${b} V ${u} H ${y}`:u>=c?`M ${f} ${c} H ${b} V ${u-lt} A ${lt} ${lt} 0 0 ${f>y?1:0} ${f>y?b-lt:b+lt} ${u} H ${y}`:`M ${f} ${c} H ${b} V ${u+lt} A ${lt} ${lt} 0 0 ${f>y?0:1} ${f>y?b-lt:b+lt} ${u} H ${y}`}function Kl({pT:e,pL:t,pW:n,pH:o,cT:i,cL:s,cW:r,cH:l,direction:a,isFirst:d}){let c=0,u=0;d?c=e+o/2:c=e+o;const f=i+l;let y=0,b=0,x=0;const v=Math.min(Math.abs(c-f)/800,1.2)*ut;return a==="lhs"?(x=t,y=x+ut,b=x-ut,u=s+ut,`M ${y} ${c} C ${x} ${c} ${x+v} ${f} ${b} ${f} H ${u}`):(x=t+n,y=x-ut,b=x+ut,u=s+r-ut,`M ${y} ${c} C ${x} ${c} ${x-v} ${f} ${b} ${f} H ${u}`)}const nr={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",clickTips:"请点击目标节点",summary:"摘要"},or={cn:nr,zh_CN:nr,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",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",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",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",clickTips:"Favor clicar no item alvo",summary:"Resumo"}};function Ou(e,t){const n=O=>{const T=document.createElement("div");return T.innerText=O,T.className="tips",T},o=(O,T,F)=>{const W=document.createElement("li");return W.id=O,W.innerHTML=`<span>${Eo(T)}</span><span>${Eo(F)}</span>`,W},i=or[e.locale]?e.locale:"en",s=or[i],r=o("cm-add_child",s.addChild,"tab"),l=o("cm-add_parent",s.addParent,""),a=o("cm-add_sibling",s.addSibling,"enter"),d=o("cm-remove_child",s.removeNode,"delete"),c=o("cm-fucus",s.focus,""),u=o("cm-unfucus",s.cancelFocus,""),f=o("cm-up",s.moveUp,"PgUp"),y=o("cm-down",s.moveDown,"Pgdn"),b=o("cm-down",s.link,""),x=o("cm-down",s.summary,""),v=document.createElement("ul");if(v.className="menu-list",v.appendChild(r),v.appendChild(l),v.appendChild(a),v.appendChild(d),(!t||t.focus)&&(v.appendChild(c),v.appendChild(u)),v.appendChild(f),v.appendChild(y),v.appendChild(x),(!t||t.link)&&v.appendChild(b),t&&t.extend)for(let O=0;O<t.extend.length;O++){const T=t.extend[O],F=o(T.name,T.name,T.key||"");v.appendChild(F),F.onclick=W=>{T.onclick(W)}}const M=document.createElement("div");M.className="context-menu",M.appendChild(v),M.hidden=!0,e.container.append(M);let R=!0;e.container.oncontextmenu=function(O){if(O.preventDefault(),!e.editable)return;const T=O.target;if(Ti(T)){T.parentElement.tagName==="ME-ROOT"?R=!0:R=!1,R?(c.className="disabled",f.className="disabled",y.className="disabled",l.className="disabled",a.className="disabled",d.className="disabled"):(c.className="",f.className="",y.className="",l.className="",a.className="",d.className=""),e.currentNodes||e.selectNode(T),M.hidden=!1,Ge.mousedown&&(Ge.mousedown=!1),v.style.top="",v.style.bottom="",v.style.left="",v.style.right="";const F=v.getBoundingClientRect(),W=v.offsetHeight,X=v.offsetWidth,de=O.clientY-F.top,pe=O.clientX-F.left;W+de>window.innerHeight?(v.style.top="",v.style.bottom="0px"):(v.style.bottom="",v.style.top=de+15+"px"),X+pe>window.innerWidth?(v.style.left="",v.style.right="0px"):(v.style.right="",v.style.left=pe+10+"px")}},M.onclick=O=>{O.target===M&&(M.hidden=!0)},r.onclick=()=>{e.addChild(),M.hidden=!0},l.onclick=()=>{e.insertParent(),M.hidden=!0},a.onclick=()=>{R||(e.insertSibling(),M.hidden=!0)},d.onclick=()=>{R||(e.removeNode(),M.hidden=!0)},c.onclick=()=>{R||(e.focusNode(e.currentNode),M.hidden=!0)},u.onclick=()=>{e.cancelFocus(),M.hidden=!0},f.onclick=()=>{R||(e.moveUpNode(),M.hidden=!0)},y.onclick=()=>{R||(e.moveDownNode(),M.hidden=!0)},b.onclick=()=>{M.hidden=!0;const O=e.currentNode,T=n(s.clickTips);e.container.appendChild(T),e.map.addEventListener("click",F=>{F.preventDefault(),T.remove();const W=F.target;W.parentElement.tagName==="ME-PARENT"||W.parentElement.tagName==="ME-ROOT"?e.createLink(O,W):console.log("link cancel")},{once:!0})},x.onclick=()=>{M.hidden=!0,e.createSummary(),e.unselectNodes()}}const Iu=e=>{const t=e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");e.selectNode(t[Math.ceil(t.length/2)-1])},Du=e=>{const t=e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");e.selectNode(t[Math.ceil(t.length/2)-1])},ir=e=>{e.selectNode(e.map.querySelector("me-root>me-tpc"))};function Pu(e){const t={13:n=>{n.shiftKey?e.insertBefore():e.insertSibling()},9:()=>{e.addChild()},112:()=>{e.toCenter()},113:()=>{e.beginEdit()},38:n=>{if(n.altKey)e.moveUpNode();else{if(n.metaKey||n.ctrlKey)return e.initSide();e.selectPrevSibling()}},40:n=>{n.altKey?e.moveDownNode():e.selectNextSibling()},37:n=>{var o;if(n.metaKey||n.ctrlKey)return e.initLeft();if(!e.currentNode)return;const i=e.currentNode.nodeObj,s=e.currentNode.offsetParent.offsetParent.parentElement;e.currentNode.nodeObj.root?Iu(e):s.className==="rhs"?(o=i.parent)!=null&&o.root?ir(e):e.selectParent():s.className==="lhs"&&e.selectFirstChild()},39:n=>{var o;if(n.metaKey||n.ctrlKey)return e.initRight();if(!e.currentNode)return;const i=e.currentNode.nodeObj,s=e.currentNode.offsetParent.offsetParent.parentElement;i.root?Du(e):s.className==="lhs"?(o=i.parent)!=null&&o.root?ir(e):e.selectParent():s.className==="rhs"&&e.selectFirstChild()},33(){e.moveUpNode()},34(){e.moveDownNode()},67:n=>{(n.metaKey||n.ctrlKey)&&(e.waitCopy=e.currentNode)},86:n=>{!e.waitCopy||!e.currentNode||(n.metaKey||n.ctrlKey)&&(e.copyNode(e.waitCopy,e.currentNode),e.waitCopy=null)},187:n=>{if(n.metaKey||n.ctrlKey){if(e.scaleVal>1.6)return;e.scale(e.scaleVal+=.2)}},189:n=>{if(n.metaKey||n.ctrlKey){if(e.scaleVal<.6)return;e.scale(e.scaleVal-=.2)}},48:n=>{(n.metaKey||n.ctrlKey)&&e.scale(1)}};e.map.onkeydown=n=>{if(n.preventDefault(),!!e.editable&&n.target===n.currentTarget)if(n.keyCode===8||n.keyCode===46)e.currentLink?e.removeLink():e.currentSummary?e.removeSummary(e.currentSummary.summaryObj.id):e.currentNode?e.removeNode():e.currentNodes&&e.removeNodes(e.currentNodes);else{const o=t[n.keyCode];o&&o(n)}}}function ju(e,t){const n=(f,y)=>{const b=document.createElement("div");return b.id=f,b.innerHTML=`<svg class="icon" aria-hidden="true">
|
||
<use xlink:href="#icon-${y}"></use>
|
||
</svg>`,b},o=n("cm-add_child","zijiedian"),i=n("cm-add_sibling","tongjijiedian-"),s=n("cm-remove_child","shanchu2"),r=n("cm-up","rising"),l=n("cm-down","falling"),a=n("cm-edit","edit"),d=document.createElement("ul");if(d.className="menu-list",t&&t.extend)for(let f=0;f<t.extend.length;f++){const y=t.extend[f],b=n(y.name,y.name);d.appendChild(b),b.onclick=x=>{y.onclick(x)}}const c=document.createElement("mmenu");c.className="mobile-menu",c.appendChild(o),c.appendChild(i),c.appendChild(s),c.appendChild(r),c.appendChild(l),c.appendChild(a),c.hidden=!0,e.container.append(c);let u=!0;e.bus.addListener("unselectNode",function(){c.hidden=!0}),e.bus.addListener("selectNode",function(f){c.hidden=!1,f.root?u=!0:u=!1}),c.onclick=f=>{f.target===c&&(c.hidden=!0)},o.onclick=()=>{e.addChild()},i.onclick=()=>{u||e.insertSibling()},s.onclick=()=>{u||e.removeNode()},r.onclick=f=>{u||e.moveUpNode()},l.onclick=f=>{u||e.moveDownNode()},a.onclick=f=>{e.beginEdit()}}const Ai=document,zu=function(e,t){if(!t)return Li(e),e;const n=e.getElementsByClassName("insert-preview"),o=`insert-preview ${t} show`;if(n.length>0)n[0].className=o;else{const i=Ai.createElement("div");i.className=o,e.appendChild(i)}return e},Li=function(e){if(!e)return;const t=e.getElementsByClassName("insert-preview");for(const n of t||[])n.remove()},sr=function(e,t){const n=t.parentElement.parentElement.contains(e);return e&&e.tagName==="ME-TPC"&&e!==t&&!n&&e.nodeObj.root!==!0},Bu=function(e){const t=document.createElement("div");return t.className="mind-elixir-ghost",e.map.appendChild(t),t};function Hu(e){let t=null,n=null,o=null;const i=Bu(e),s=12;e.map.addEventListener("dragstart",r=>{var l;const a=r.target;if((a==null?void 0:a.tagName)!=="ME-TPC"){r.preventDefault();return}t=a,t.parentElement.parentElement.style.opacity="0.5",i.innerHTML=t.innerHTML,(l=r.dataTransfer)==null||l.setDragImage(i,0,0),Ge.clear()}),e.map.addEventListener("dragend",async r=>{if(!t)return;t.parentElement.parentElement.style.opacity="1";const l=r.target;if(l.style.opacity="",!o)return;Li(o);const a=t.nodeObj;switch(n){case"before":e.moveNodeBefore(t,o),e.selectNode(ve(a.id));break;case"after":e.moveNodeAfter(t,o),e.selectNode(ve(a.id));break;case"in":e.moveNode(t,o);break}t=null}),e.map.addEventListener("dragover",pu(function(r){if(!t)return;Li(o);const l=Ai.elementFromPoint(r.clientX,r.clientY-s);if(sr(l,t)){o=l;const a=l.getBoundingClientRect().y;r.clientY>a+l.clientHeight?n="after":r.clientY>a+l.clientHeight/2&&(n="in")}else{const a=Ai.elementFromPoint(r.clientX,r.clientY+s);if(sr(a,t)){o=a;const d=a.getBoundingClientRect().y;r.clientY<d?n="before":r.clientY<d+a.clientHeight/2&&(n="in")}else n=o=null}o&&zu(o,n)},200))}const Fu=function(e){return["createSummary","removeSummary","finishEditSummary"].includes(e.name)?{type:"summary",value:e.obj.id}:["createCustomLink","removeCustomLink","finishEditCustomLinkLabel"].includes(e.name)?{type:"customLink",value:e.obj.id}:["removeNodes"].includes(e.name)?{type:"nodes",value:e.objs.map(t=>t.id)}:{type:"node",value:e.obj.id}};function Uu(e){let t=[],n=-1,o=e.getData();e.bus.addListener("operation",i=>{if(i.name==="beginEdit")return;t=t.slice(0,n+1);const s=e.getData();t.push({prev:o,currentObject:Fu(i),next:s}),o=s,n=t.length-1}),e.undo=function(){if(n>-1){const i=t[n];o=i.prev,e.refresh(i.prev),i.currentObject.type==="node"&&e.selectNode(ve(i.currentObject.value)),n--,console.log("current",o)}},e.redo=function(){if(n<t.length-1){n++;const i=t[n];o=i.next,e.refresh(i.next),i.currentObject.type==="node"&&e.selectNode(ve(i.currentObject.value))}},e.map.addEventListener("keydown",i=>{(i.metaKey||i.ctrlKey)&&i.shiftKey&&i.key==="Z"?e.redo():(i.metaKey||i.ctrlKey)&&i.key==="z"&&e.undo()})}const Wt=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=`<svg class="icon" aria-hidden="true">
|
||
<use xlink:href="#icon-${t}"></use>
|
||
</svg>`,n};function qu(e){const t=document.createElement("div"),n=Wt("fullscreen","full"),o=Wt("toCenter","living"),i=Wt("zoomout","move"),s=Wt("zoomin","add"),r=document.createElement("span");return r.innerText="100%",t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(s),t.className="mind-elixir-toolbar rb",n.onclick=()=>{e.container.requestFullscreen()},o.onclick=()=>{e.toCenter()},i.onclick=()=>{e.scaleVal<.6||e.scale(e.scaleVal-=.2)},s.onclick=()=>{e.scaleVal>1.6||e.scale(e.scaleVal+=.2)},t}function Vu(e){const t=document.createElement("div"),n=Wt("tbltl","left"),o=Wt("tbltr","right"),i=Wt("tblts","side");return t.appendChild(n),t.appendChild(o),t.appendChild(i),t.className="mind-elixir-toolbar lt",n.onclick=()=>{e.initLeft()},o.onclick=()=>{e.initRight()},i.onclick=()=>{e.initSide()},t}function Wu(e){e.container.append(qu(e)),e.container.append(Vu(e))}/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */var Yu=Object.defineProperty,Ku=(e,t,n)=>t in e?Yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,me=(e,t,n)=>(Ku(e,typeof t!="symbol"?t+"":t,n),n);class Ju{constructor(){me(this,"_listeners",new Map),me(this,"on",this.addEventListener),me(this,"off",this.removeEventListener),me(this,"emit",this.dispatchEvent)}addEventListener(t,n){const o=this._listeners.get(t)??new Set;return this._listeners.set(t,o),o.add(n),this}removeEventListener(t,n){var o;return(o=this._listeners.get(t))==null||o.delete(n),this}dispatchEvent(t,...n){let o=!0;for(const i of this._listeners.get(t)??[])o=i(...n)!==!1&&o;return o}unbindAllListeners(){this._listeners.clear()}}const rr=(e,t="px")=>typeof e=="number"?e+t:e;function Tt({style:e},t,n){if(typeof t=="object")for(const[o,i]of Object.entries(t))i!==void 0&&(e[o]=rr(i));else n!==void 0&&(e[t]=rr(n))}function Jl(e){return(t,n,o,i={})=>{t instanceof HTMLCollection||t instanceof NodeList?t=Array.from(t):Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);for(const s of t)for(const r of n)s[e](r,o,{capture:!1,...i});return[t,n,o,i]}}const on=Jl("addEventListener"),At=Jl("removeEventListener"),oo=e=>{var t;const{clientX:n,clientY:o,target:i}=((t=e.touches)==null?void 0:t[0])??e;return{x:n,y:o,target:i}};function lr(e,t,n="touch"){switch(n){case"center":{const o=t.left+t.width/2,i=t.top+t.height/2;return o>=e.left&&o<=e.right&&i>=e.top&&i<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}}function sn(e,t=document){const n=Array.isArray(e)?e:[e];let o=[];for(let i=0,s=n.length;i<s;i++){const r=n[i];typeof r=="string"?o=o.concat(Array.from(t.querySelectorAll(r))):r instanceof Element&&o.push(r)}return o}const Zu=()=>matchMedia("(hover: none), (pointer: coarse)").matches,Gu=()=>"safari"in window,Xu=e=>{let t,n=-1,o=!1;return{next(...i){t=i,o||(o=!0,n=requestAnimationFrame(()=>{e(...t),o=!1}))},cancel(){cancelAnimationFrame(n),o=!1}}},{abs:Ut,max:ar,min:cr,ceil:dr}=Math;let Zl=class extends Ju{constructor(t){var n,o,i,s,r;super(),me(this,"_options"),me(this,"_selection",{stored:[],selected:[],touched:[],changed:{added:[],removed:[]}}),me(this,"_area"),me(this,"_clippingElement"),me(this,"_targetElement"),me(this,"_targetRect"),me(this,"_selectables",[]),me(this,"_latestElement"),me(this,"_areaRect",new DOMRect),me(this,"_areaLocation",{y1:0,x2:0,y2:0,x1:0}),me(this,"_singleClick",!0),me(this,"_frame"),me(this,"_scrollAvailable",!0),me(this,"_scrollingActive",!1),me(this,"_scrollSpeed",{x:0,y:0}),me(this,"_scrollDelta",{x:0,y:0}),me(this,"disable",this._bindStartEvents.bind(this,!1)),me(this,"enable",this._bindStartEvents),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",...t.behaviour,startThreshold:(n=t.behaviour)!=null&&n.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(o=t.behaviour)==null?void 0:o.scrolling,startScrollMargins:{x:0,y:0,...(s=(i=t.behaviour)==null?void 0:i.scrolling)==null?void 0:s.startScrollMargins}}},features:{range:!0,touch:!0,...t.features,singleTap:{allow:!0,intersect:"native",...(r=t.features)==null?void 0:r.singleTap}}};for(const c of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[c]=="function"&&(this[c]=this[c].bind(this));const{document:l,selectionAreaClass:a,selectionContainerClass:d}=this._options;this._area=l.createElement("div"),this._clippingElement=l.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(a),d&&this._clippingElement.classList.add(d),Tt(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),Tt(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Xu(c=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",c),this._redrawSelectionArea()}),this.enable()}_bindStartEvents(t=!0){const{document:n,features:o}=this._options,i=t?on:At;i(n,"mousedown",this._onTapStart),o.touch&&i(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:o,y:i,target:s}=oo(t),{_options:r}=this,{document:l}=this._options,a=s.getBoundingClientRect(),d=sn(r.startAreas,r.document),c=sn(r.boundaries,r.document);this._targetElement=c.find(y=>lr(y.getBoundingClientRect(),a));const u=t.composedPath();if(!this._targetElement||!d.find(y=>u.includes(y))||!c.find(y=>u.includes(y))||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:o,y1:i,x2:0,y2:0};const f=l.scrollingElement??l.body;this._scrollDelta={x:f.scrollLeft,y:f.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),on(l,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),on(l,["mouseup","touchcancel","touchend"],this._onTapStop),on(l,"scroll",this._onScroll)}_onSingleTap(t){const{singleTap:{intersect:n},range:o}=this._options.features,i=oo(t);let s;if(n==="native")s=i.target;else if(n==="touch"){this.resolveSelectables();const{x:l,y:a}=i;s=this._selectables.find(d=>{const{right:c,left:u,top:f,bottom:y}=d.getBoundingClientRect();return l<c&&l>u&&a<y&&a>f})}if(!s)return;for(this.resolveSelectables();!this._selectables.includes(s);){if(!s.parentElement)return;s=s.parentElement}const{stored:r}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&o&&this._latestElement){const l=this._latestElement,[a,d]=l.compareDocumentPosition(s)&4?[s,l]:[l,s],c=[...this._selectables.filter(u=>u.compareDocumentPosition(a)&4&&u.compareDocumentPosition(d)&2),a,d];this.select(c),this._latestElement=l}else r.includes(s)&&(r.length===1||t.ctrlKey||r.every(l=>this._selection.stored.includes(l)))?this.deselect(s):(this.select(s),this._latestElement=s);this._emitEvent("stop",t)}_delayedTapMove(t){const{container:n,document:o,behaviour:{startThreshold:i}}=this._options,{x1:s,y1:r}=this._areaLocation,{x:l,y:a}=oo(t);if(typeof i=="number"&&Ut(l+a-(s+r))>=i||typeof i=="object"&&Ut(l-s)>=i.x||Ut(a-r)>=i.y){if(At(o,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){At(o,["mouseup","touchcancel","touchend"],this._onTapStop);return}on(o,["mousemove","touchmove"],this._onTapMove,{passive:!1}),Tt(this._area,"display","block"),sn(n,o)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(on(o,"wheel",this._manualScroll,{passive:!1}),this._selectables=this._selectables.filter(d=>this._targetElement.contains(d))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:o}=this,i=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(Tt(t,{top:i.top,left:i.left,width:i.width,height:i.height}),Tt(o,{marginTop:-i.top,marginLeft:-i.left})):(Tt(t,{top:0,left:0,width:"100%",height:"100%"}),Tt(o,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{x:n,y:o}=oo(t),{_scrollSpeed:i,_areaLocation:s,_options:r,_frame:l}=this,{speedDivider:a}=r.behaviour.scrolling,d=this._targetElement;if(s.x2=n,s.y2=o,this._scrollAvailable&&!this._scrollingActive&&(i.y||i.x)){this._scrollingActive=!0;const c=()=>{if(!i.x&&!i.y){this._scrollingActive=!1;return}const{scrollTop:u,scrollLeft:f}=d;i.y&&(d.scrollTop+=dr(i.y/a),s.y1-=d.scrollTop-u),i.x&&(d.scrollLeft+=dr(i.x/a),s.x1-=d.scrollLeft-f),l.next(t),requestAnimationFrame(c)};requestAnimationFrame(c)}else l.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&Zu()||this._scrollAvailable&&Gu())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:o,scrollLeft:i}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-i,this._areaLocation.y1+=t.y-o,t.x=i,t.y=o,this._setupSelectionArea(),this._frame.next(null)}_manualScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.deltaY?t.deltaY>0?1:-1:0,i=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=o*n,this._scrollSpeed.x+=i*n,this._onTapMove(t),t.preventDefault()}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_areaRect:o,_targetElement:i,_options:s}=this,{scrollTop:r,scrollHeight:l,clientHeight:a,scrollLeft:d,scrollWidth:c,clientWidth:u}=i,f=this._targetRect,{x1:y,y1:b}=n;let{x2:x,y2:v}=n;const{behaviour:{scrolling:{startScrollMargins:M}}}=s;x<f.left+M.x?(t.x=d?-Ut(f.left-x+M.x):0,x=x<f.left?f.left:x):x>f.right-M.x?(t.x=c-d-u?Ut(f.left+f.width-x-M.x):0,x=x>f.right?f.right:x):t.x=0,v<f.top+M.y?(t.y=r?-Ut(f.top-v+M.y):0,v=v<f.top?f.top:v):v>f.bottom-M.y?(t.y=l-r-a?Ut(f.top+f.height-v-M.y):0,v=v>f.bottom?f.bottom:v):t.y=0;const R=cr(y,x),O=cr(b,v),T=ar(y,x),F=ar(b,v);o.x=R,o.y=O,o.width=T-R,o.height=F-O}_redrawSelectionArea(){const{x:t,y:n,width:o,height:i}=this._areaRect,{style:s}=this._area;s.left=`${t}px`,s.top=`${n}px`,s.width=`${o}px`,s.height=`${i}px`}_onTapStop(t,n){var o;const{document:i,features:s}=this._options,{_singleClick:r}=this;At(i,["mousemove","touchmove"],this._delayedTapMove),At(i,["touchmove","mousemove"],this._onTapMove),At(i,["mouseup","touchcancel","touchend"],this._onTapStop),At(i,"scroll",this._onScroll),this._keepSelection(),t&&r&&s.singleTap.allow?this._onSingleTap(t):!r&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,this._scrollAvailable&&At(i,"wheel",this._manualScroll,{passive:!0}),this._clippingElement.remove(),(o=this._frame)==null||o.cancel(),Tt(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:o,_areaRect:i}=this,{stored:s,selected:r,touched:l}=o,{intersect:a,overlap:d}=n.behaviour,c=d==="invert",u=[],f=[],y=[];for(let x=0;x<t.length;x++){const v=t[x];if(lr(i,v.getBoundingClientRect(),a)){if(r.includes(v))s.includes(v)&&!l.includes(v)&&l.push(v);else if(c&&s.includes(v)){y.push(v);continue}else f.push(v);u.push(v)}}c&&f.push(...s.filter(x=>!r.includes(x)));const b=d==="keep";for(let x=0;x<r.length;x++){const v=r[x];!u.includes(v)&&!(b&&s.includes(v))&&y.push(v)}o.selected=u,o.changed={added:f,removed:y},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:o,changed:i,touched:s,stored:r}=n,l=o.filter(a=>!r.includes(a));switch(t.behaviour.overlap){case"drop":{n.stored=[...l,...r.filter(a=>!s.includes(a))];break}case"invert":{n.stored=[...l,...r.filter(a=>!i.removed.includes(a))];break}case"keep":{n.stored=[...r,...o.filter(a=>!r.includes(a))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=sn(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:o,stored:i,changed:s}=this._selection;s.added=[],s.removed.push(...o,...t?i:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection={stored:t?[]:i,selected:[],touched:[],changed:{added:[],removed:[]}}}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,n=!1){const{changed:o,selected:i,stored:s}=this._selection,r=sn(t,this._options.document).filter(l=>!i.includes(l)&&!s.includes(l));return s.push(...r),i.push(...r),o.added.push(...r),o.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),r}deselect(t,n=!1){const{selected:o,stored:i,changed:s}=this._selection,r=sn(t,this._options.document).filter(l=>o.includes(l)||i.includes(l));r.length&&(this._selection.stored=i.filter(l=>!r.includes(l)),this._selection.selected=o.filter(l=>!r.includes(l)),this._selection.changed.added=[],this._selection.changed.removed.push(...r.filter(l=>!s.removed.includes(l))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)))}};me(Zl,"version","3.3.1");function Qu(e){const t=new Zl({selectables:[".map-container me-tpc"],boundaries:[e.container],container:"body",behaviour:{scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:n})=>{if(n.button!==e.mouseSelectionButton||n.target.tagName==="ME-TPC"||n.target.id==="input-box"||n.target.className==="circle")return!1;const o=t.getSelectionArea();return o.style.background="#4f90f22d",o.style.border="1px solid #4f90f2",o.parentElement&&(o.parentElement.style.zIndex="9999"),!0}).on("start",({event:n})=>{!n.ctrlKey&&!n.metaKey&&(e.unselectNode(),e.unselectNodes(),e.unselectSummary(),e.unselectLink(),t.clearSelection(!0,!0))}).on("move",({store:{changed:{added:n,removed:o}}})=>{Ge.moved=!0;for(const i of n)i.classList.add("selected");for(const i of o)i.classList.remove("selected")}).on("stop",({store:{stored:n}})=>{e.selectNodes(n)});e.selection=t}const ef=function(e,t=!0){this.theme=e;const n=this.theme.cssVar,o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i];this.mindElixirBox.style.setProperty(s,n[s])}t&&this.refresh()};function Gl(e){return{nodeData:e.isFocusMode?e.nodeDataBackup:e.nodeData,linkData:e.linkData,summaries:e.summaries,direction:e.direction,theme:e.theme}}const tf=function(e,t,n){if(e){if(console.time("selectNode"),typeof e=="string"){const o=ve(e);return o?this.selectNode(o):void 0}this.currentNode&&(this.currentNode.className=""),e.className="selected",e.scrollIntoView({block:"nearest",inline:"nearest"}),this.currentNode=e,t?this.bus.fire("selectNewNode",e.nodeObj):this.bus.fire("selectNode",e.nodeObj,n),console.timeEnd("selectNode")}},nf=function(){this.currentNode&&(this.currentNode.className=""),this.currentNode=null,this.bus.fire("unselectNode")},of=function(e){if(e){console.time("selectNodes");for(const t of e)t.className="selected";this.currentNodes=e,this.bus.fire("selectNodes",e.map(t=>t.nodeObj)),console.timeEnd("selectNodes")}},sf=function(){if(this.currentNodes)for(const e of this.currentNodes)e.classList.remove("selected");this.currentNodes=null,this.bus.fire("unselectNodes")},rf=function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const e=this.currentNode.parentElement.parentElement.nextSibling;let t;if(e)t=e.firstChild.firstChild;else return!1;return this.selectNode(t),!0},lf=function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return!1;const e=this.currentNode.parentElement.parentElement.previousSibling;let t;if(e)t=e.firstChild.firstChild;else return!1;return this.selectNode(t),!0},af=function(){if(!this.currentNode)return;const e=this.currentNode.parentElement.nextSibling;if(e&&e.firstChild){const t=e.firstChild.firstChild.firstChild;this.selectNode(t)}},cf=function(){if(!this.currentNode||this.currentNode.dataset.nodeid==="meroot")return;const e=this.currentNode.parentElement.parentElement.parentElement.previousSibling;if(e){const t=e.firstChild;this.selectNode(t)}},df=function(){const e=Gl(this);return JSON.stringify(e,(t,n)=>{if(!(t==="parent"&&typeof n!="string"))return n})},uf=function(){return JSON.parse(this.getDataString())},ff=function(){const e=Gl(this).nodeData;let t="# "+e.topic+`
|
||
|
||
`;function n(o,i){for(let s=0;s<o.length;s++)i<=6?t+="".padStart(i,"#")+" "+o[s].topic+`
|
||
|
||
`:t+="".padStart(i-7," ")+"- "+o[s].topic+`
|
||
`,o[s].children&&n(o[s].children||[],i+1)}return n(e.children||[],2),t},hf=function(){this.editable=!0},pf=function(){this.editable=!1},mf=function(e){this.scaleVal=e,this.map.style.transform="scale("+e+")"},gf=function(){this.container.scrollTo(1e4-this.container.offsetWidth/2,1e4-this.container.offsetHeight/2)},bf=function(e){e(this)},yf=function(e){e.nodeObj.root||(this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=e.nodeObj,this.nodeData.root=!0,this.initRight(),this.toCenter())},vf=function(){this.isFocusMode=!1,this.tempDirection!==null&&(delete this.nodeData.root,this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},xf=function(){this.direction=0,this.refresh()},wf=function(){this.direction=1,this.refresh()},kf=function(){this.direction=2,this.refresh()},_f=function(e){this.locale=e,this.refresh()},Ef=function(e,t){const n=e.nodeObj;typeof t=="boolean"?n.expanded=t:n.expanded!==!1?n.expanded=!1:n.expanded=!0,this.layout(),this.linkDiv(),this.bus.fire("expandNode",n)},Cf=function(e){e&&(e=JSON.parse(JSON.stringify(e)),this.nodeData=e.nodeData,this.linkData=e.linkData||{},this.summaries=e.summaries||[]),mt(this.nodeData),this.layout(),this.linkDiv()},Sf=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:vf,disableEdit:pf,enableEdit:hf,expandNode:Ef,focusNode:yf,getData:uf,getDataMd:ff,getDataString:df,initLeft:xf,initRight:wf,initSide:kf,install:bf,refresh:Cf,scale:mf,selectFirstChild:af,selectNextSibling:rf,selectNode:tf,selectNodes:of,selectParent:cf,selectPrevSibling:lf,setLocale:_f,toCenter:gf,unselectNode:nf,unselectNodes:sf},Symbol.toStringTag,{value:"Module"})),zt=e=>{var t;const n=(t=e.parent)==null?void 0:t.children,o=n.indexOf(e);return{siblings:n,index:o}};function Mf(e){const{siblings:t,index:n}=zt(e),o=t[n];n===0?(t[n]=t[t.length-1],t[t.length-1]=o):(t[n]=t[n-1],t[n-1]=o)}function Nf(e){const{siblings:t,index:n}=zt(e),o=t[n];n===t.length-1?(t[n]=t[0],t[0]=o):(t[n]=t[n+1],t[n+1]=o)}function Jn(e){const{siblings:t,index:n}=zt(e);return t.splice(n,1),t.length}function Tf(e,t){const{siblings:n,index:o}=zt(e);n.splice(o+1,0,t)}function Af(e,t){const{siblings:n,index:o}=zt(e);n.splice(o,0,t)}function Lf(e,t){const{siblings:n,index:o}=zt(e);n[o]=t,t.children=[e]}function $f(e,t){Jn(e),t.children?t.children.push(e):t.children=[e]}function Rf(e,t){e.direction!==void 0&&(e.direction=t.direction),Jn(e);const{siblings:n,index:o}=zt(t);n.splice(o,0,e)}function Of(e,t){e.direction!==void 0&&(e.direction=t.direction),Jn(e);const{siblings:n,index:o}=zt(t);n.splice(o+1,0,e)}const Xl=function(e,t){var n,o;if(e===Xe)return Xe;if(e===Vt)return Vt;if(e===Yn){const i=((n=document.querySelector(".lhs"))==null?void 0:n.childElementCount)||0,s=((o=document.querySelector(".rhs"))==null?void 0:o.childElementCount)||0;return i<=s?(t.direction=Xe,Xe):(t.direction=Vt,Vt)}},Ql=function(e,t){var n,o;if(!e)return null;const i=e.nodeObj;i.expanded===!1&&(this.expandNode(e,!0),e=ve(i.id));const s=t||this.generateNewObj();i.children?i.children.push(s):i.children=[s],mt(this.nodeData);const r=e.parentElement,{grp:l,top:a}=this.createWrapper(s);if(r.tagName==="ME-PARENT"){if(r.children[1])r.nextSibling.appendChild(l);else{const d=this.createChildren([l]);r.appendChild(qo(!0)),r.insertAdjacentElement("afterend",d)}this.linkDiv(l.offsetParent)}else r.tagName==="ME-ROOT"&&(Xl(this.direction,s)===Xe?(n=document.querySelector(".lhs"))==null||n.appendChild(l):(o=document.querySelector(".rhs"))==null||o.appendChild(l),this.linkDiv());return{newTop:a,newNodeObj:s}},ea=function(e,t){const n=e.parentNode;if(t===0){const o=n.parentNode.parentNode;o.tagName!=="ME-MAIN"&&o.previousSibling.children[1].remove()}n.parentNode.remove()},Vo=function(e){const t=e.parentElement.parentElement.lastElementChild;(t==null?void 0:t.tagName)==="svg"&&(t==null||t.remove())},If=function(e,t){console.log(t);const n=e.nodeObj,o=Ul(n);o.style&&t.style&&(t.style=Object.assign(o.style,t.style));const i=Object.assign(n,t);ls(e,i),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:i,origin:o})},Df=function(e,t){var n,o,i;const s=e||this.currentNode;if(!s)return;const r=s.nodeObj;if(r.root===!0){this.addChild();return}else if(((n=r.parent)==null?void 0:n.root)===!0&&((i=(o=r.parent)==null?void 0:o.children)==null?void 0:i.length)===1){this.addChild(ve(r.parent.id));return}const l=t||this.generateNewObj();Tf(r,l),mt(this.nodeData);const a=s.parentElement;console.time("insertSibling_DOM");const{grp:d,top:c}=this.createWrapper(l);a.parentNode.parentNode.insertBefore(d,a.parentNode.nextSibling),this.linkDiv(d.offsetParent),t||this.editTopic(c.firstChild),this.selectNode(c.firstChild,!0),console.timeEnd("insertSibling_DOM"),this.bus.fire("operation",{name:"insertSibling",obj:l})},Pf=function(e,t){const n=e||this.currentNode;if(!n)return;const o=n.nodeObj;if(o.root===!0){this.addChild();return}const i=t||this.generateNewObj();Af(o,i),mt(this.nodeData);const s=n.parentElement;console.time("insertSibling_DOM");const{grp:r,top:l}=this.createWrapper(i);s.parentNode.parentNode.insertBefore(r,s.parentNode),this.linkDiv(r.offsetParent),t||this.editTopic(l.firstChild),this.selectNode(l.firstChild,!0),console.timeEnd("insertSibling_DOM"),this.bus.fire("operation",{name:"insertBefore",obj:i})},jf=function(e,t){const n=e||this.currentNode;if(!n)return;Vo(n);const o=n.nodeObj;if(o.root===!0)return;const i=t||this.generateNewObj();Lf(o,i),mt(this.nodeData);const s=n.parentElement.parentElement;console.time("insertParent_DOM");const{grp:r,top:l}=this.createWrapper(i,!0);l.appendChild(qo(!0)),s.insertAdjacentElement("afterend",r);const a=this.createChildren([s]);l.insertAdjacentElement("afterend",a),this.linkDiv(),t||this.editTopic(l.firstChild),this.selectNode(l.firstChild,!0),console.timeEnd("insertParent_DOM"),this.bus.fire("operation",{name:"insertParent",obj:i})},zf=function(e,t){console.time("addChild");const n=e||this.currentNode;if(!n)return;const o=Ql.call(this,n,t);if(!o)return;const{newTop:i,newNodeObj:s}=o;this.bus.fire("operation",{name:"addChild",obj:s}),console.timeEnd("addChild"),t||this.editTopic(i.firstChild),this.selectNode(i.firstChild,!0)},Bf=function(e,t){console.time("copyNode");const n=Ul(e.nodeObj);Hl(n);const o=Ql.call(this,t,n);if(!o)return;const{newNodeObj:i}=o;console.timeEnd("copyNode"),this.bus.fire("operation",{name:"copyNode",obj:i})},Hf=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;Mf(n);const o=t.parentNode.parentNode;o.parentNode.insertBefore(o,o.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},Ff=function(e){const t=e||this.currentNode;if(!t)return;const n=t.nodeObj;Nf(n);const o=t.parentNode.parentNode;o.nextSibling?o.nextSibling.insertAdjacentElement("afterend",o):o.parentNode.prepend(o),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:n})},Uf=function(e){var t;const n=e||this.currentNode;if(!n)return;const o=n.nodeObj;if(o.root===!0)throw new Error("Can not remove root node");const i=o.parent.children,s=i.findIndex(l=>l===o),r=Jn(o);if(ea(n,r),i.length!==0){const l=i[s]||i[s-1];this.selectNode(ve(l.id))}else this.selectNode(ve(o.parent.id));this.linkDiv(),this.bus.fire("operation",{name:"removeNode",obj:o,originIndex:s,originParentId:(t=o==null?void 0:o.parent)==null?void 0:t.id})},qf=function(e){for(const t of e){const n=t.nodeObj;if(n.root===!0)continue;const o=Jn(n);ea(t,o)}this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:e.map(t=>t.nodeObj)})},Vf=function(e,t){var n;const o=e.nodeObj,i=t.nodeObj,s=(n=o==null?void 0:o.parent)==null?void 0:n.id;if(i.expanded===!1&&(this.expandNode(t,!0),e=ve(o.id),t=ve(i.id)),!gu(o,i)){console.warn("Invalid move");return}console.time("moveNode"),$f(o,i),mt(this.nodeData);const r=e.parentElement,l=t.parentElement;if(l.tagName==="ME-PARENT")if(Vo(e),l.children[1])l.nextSibling.appendChild(r.parentElement);else{const a=this.createChildren([r.parentElement]);l.appendChild(qo(!0)),l.parentElement.insertBefore(a,l.nextSibling)}else l.tagName==="ME-ROOT"&&(Xl(this.direction,o),l.nextSibling.appendChild(r.parentElement));this.linkDiv(),this.bus.fire("operation",{name:"moveNode",obj:o,toObj:i,originParentId:s}),console.timeEnd("moveNode")},Wf=function(e,t){var n;const o=e.nodeObj,i=t.nodeObj,s=(n=o.parent)==null?void 0:n.id;Rf(o,i),mt(this.nodeData),Vo(e);const r=e.parentElement.parentNode;t.parentElement.parentNode.insertAdjacentElement("beforebegin",r),this.linkDiv(),this.bus.fire("operation",{name:"moveNodeBefore",obj:o,toObj:i,originParentId:s})},Yf=function(e,t){var n;const o=e.nodeObj,i=t.nodeObj,s=(n=o.parent)==null?void 0:n.id;Of(o,i),mt(this.nodeData),Vo(e);const r=e.parentElement.parentNode;t.parentElement.parentNode.insertAdjacentElement("afterend",r),this.linkDiv(),this.bus.fire("operation",{name:"moveNodeAfter",obj:o,toObj:i,originParentId:s})},Kf=function(e){const t=e||this.currentNode;t&&this.editTopic(t)},Jf=function(e,t){e.text.textContent=t,e.nodeObj.topic=t,this.linkDiv()},ta=Object.freeze(Object.defineProperty({__proto__:null,addChild:zf,beginEdit:Kf,copyNode:Bf,insertBefore:Pf,insertParent:jf,insertSibling:Df,moveDownNode:Ff,moveNode:Vf,moveNodeAfter:Yf,moveNodeBefore:Wf,moveUpNode:Hf,removeNode:Uf,removeNodes:qf,reshapeNode:If,setNodeTopic:Jf},Symbol.toStringTag,{value:"Module"})),Zf=function(e){return{dom:e,moved:!1,mousedown:!1,handleMouseMove(t){this.mousedown&&(this.moved=!0,this.cb&&this.cb(t.movementX,t.movementY))},handleMouseDown(t){t.button===0&&(this.mousedown=!0)},handleClear(t){this.mousedown=!1},cb:null,init(t,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),t.addEventListener("mousemove",this.handleMouseMove),t.addEventListener("mouseleave",this.handleClear),t.addEventListener("mouseup",this.handleClear),this.dom.addEventListener("mousedown",this.handleMouseDown)},destory(t){t.removeEventListener("mousemove",this.handleMouseMove),t.removeEventListener("mouseleave",this.handleClear),t.removeEventListener("mouseup",this.handleClear),this.dom.removeEventListener("mousedown",this.handleMouseDown)},clear(){this.moved=!1,this.mousedown=!1}}},ur={create:Zf};function Mo(e,t,n){const{offsetLeft:o,offsetTop:i}=gn(e.nodes,t),s=t.offsetWidth,r=t.offsetHeight,l=o+s/2,a=i+r/2,d=l+n.x,c=a+n.y;return{w:s,h:r,cx:l,cy:a,ctrlX:d,ctrlY:c}}function cn(e){let t,n;const o=(e.cy-e.ctrlY)/(e.ctrlX-e.cx);return o>e.h/e.w||o<-e.h/e.w?e.cy-e.ctrlY<0?(t=e.cx-e.h/2/o,n=e.cy+e.h/2):(t=e.cx+e.h/2/o,n=e.cy-e.h/2):e.cx-e.ctrlX<0?(t=e.cx+e.w/2,n=e.cy-e.w*o/2):(t=e.cx-e.w/2,n=e.cy+e.w*o/2),{x:t,y:n}}const Gf=function(e,t,n,o){const i=document.createElementNS("http://www.w3.org/2000/svg","text");return we(i,{"text-anchor":"middle",x:t+"",y:n+"",fill:o||"#666"}),i.dataset.type="custom-link",i.innerHTML=e,i},Xf=function(e,t,n,o){if(!e||!t)return;const i=performance.now(),s=Mo(this,e,n.delta1),r=Mo(this,t,n.delta2),{x:l,y:a}=cn(s),{ctrlX:d,ctrlY:c}=s,{ctrlX:u,ctrlY:f}=r,{x:y,y:b}=cn(r),x=Fl(u,f,y,b),v=Tu(`M ${l} ${a} C ${d} ${c} ${u} ${f} ${y} ${b}`,`M ${x.x1} ${x.y1} L ${y} ${b} L ${x.x2} ${x.y2}`),M=l/8+d*3/8+u*3/8+y/8,R=a/8+c*3/8+f*3/8+b/8,O=Gf(n.label,M,R,this.theme.cssVar["--color"]);v.appendChild(O),v.linkObj=n,v.dataset.linkid=n.id,this.linkSvgGroup.appendChild(v),o||(this.linkData[n.id]=n,this.currentLink=v,this.showLinkController(n,s,r));const T=performance.now();console.log(`DrawCustomLink Execution time: ${T-i} ms`)},Qf=function(e,t){const n={id:Kn(),label:"Custom Link",from:e.nodeObj.id,to:t.nodeObj.id,delta1:{x:0,y:-200},delta2:{x:0,y:-200}};this.drawCustomLink(e,t,n),this.bus.fire("operation",{name:"createCustomLink",obj:n})},eh=function(e){let t;if(e?t=e:t=this.currentLink,!t)return;this.hideLinkController();const n=t.linkObj.id;delete this.linkData[n],t.remove(),this.bus.fire("operation",{name:"removeCustomLink",obj:{id:n}})},th=function(e){this.currentLink=e;const t=e.linkObj,n=ve(t.from),o=ve(t.to),i=Mo(this,n,t.delta1),s=Mo(this,o,t.delta2);this.showLinkController(t,i,s)},nh=function(){this.currentLink=null,this.hideLinkController()},oh=function(){this.linkController.style.display="none",this.P2.style.display="none",this.P3.style.display="none"},ih=function(e,t,n){var o;this.linkController.style.display="initial",this.P2.style.display="initial",this.P3.style.display="initial",this.nodes.appendChild(this.linkController),this.nodes.appendChild(this.P2),this.nodes.appendChild(this.P3);let{x:i,y:s}=cn(t),{ctrlX:r,ctrlY:l}=t,{ctrlX:a,ctrlY:d}=n,{x:c,y:u}=cn(n);this.P2.style.cssText=`top:${l}px;left:${r}px;`,this.P3.style.cssText=`top:${d}px;left:${a}px;`,we(this.line1,{x1:i+"",y1:s+"",x2:r+"",y2:l+""}),we(this.line2,{x1:a+"",y1:d+"",x2:c+"",y2:u+""}),this.helper1&&(this.helper1.destory(this.map),(o=this.helper2)==null||o.destory(this.map)),this.helper1=ur.create(this.P2),this.helper2=ur.create(this.P3),this.helper1.init(this.map,(f,y)=>{var b;r=r+f/this.scaleVal,l=l+y/this.scaleVal;const x=cn({...t,ctrlX:r,ctrlY:l});i=x.x,s=x.y;const v=i/8+r*3/8+a*3/8+c/8,M=s/8+l*3/8+d*3/8+u/8;this.P2.style.top=l+"px",this.P2.style.left=r+"px",(b=this.currentLink)==null||b.children[0].setAttribute("d",`M ${i} ${s} C ${r} ${l} ${a} ${d} ${c} ${u}`),we(this.currentLink.children[2],{x:v+"",y:M+""}),we(this.line1,{x1:i+"",y1:s+"",x2:r+"",y2:l+""}),e.delta1.x=r-t.cx,e.delta1.y=l-t.cy}),this.helper2.init(this.map,(f,y)=>{var b,x;a=a+f/this.scaleVal,d=d+y/this.scaleVal;const v=cn({...n,ctrlX:a,ctrlY:d});c=v.x,u=v.y;const M=i/8+r*3/8+a*3/8+c/8,R=s/8+l*3/8+d*3/8+u/8,O=Fl(a,d,c,u);this.P3.style.top=d+"px",this.P3.style.left=a+"px",(b=this.currentLink)==null||b.children[0].setAttribute("d",`M ${i} ${s} C ${r} ${l} ${a} ${d} ${c} ${u}`),(x=this.currentLink)==null||x.children[1].setAttribute("d",`M ${O.x1} ${O.y1} L ${c} ${u} L ${O.x2} ${O.y2}`),we(this.currentLink.children[2],{x:M+"",y:R+""}),we(this.line2,{x1:a+"",y1:d+"",x2:c+"",y2:u+""}),e.delta2.x=a-n.cx,e.delta2.y=d-n.cy})};function sh(){this.linkSvgGroup.innerHTML="";for(const e in this.linkData){const t=this.linkData[e];try{this.drawCustomLink(ve(t.from),ve(t.to),t,!0)}catch{console.warn("Node may not be expanded")}}this.nodes.appendChild(this.linkSvgGroup)}function rh(e){if(console.time("editSummary"),!e)return;const t=e.children[2];console.log(t,e),Vl(this,t,n=>{var o;const i=e.linkObj,s=((o=n.textContent)==null?void 0:o.trim())||"";s===""?i.label=origin:i.label=s,n.remove(),s!==origin&&(t.innerHTML=i.label,this.linkDiv(),this.bus.fire("operation",{name:"finishEditCustomLinkLabel",obj:i}))}),console.timeEnd("editSummary")}function lh(){for(const e in this.linkData){const t=this.linkData[e];(!Co(t.from,this.nodeData)||!Co(t.to,this.nodeData))&&delete this.linkData[t.id]}}const ah=Object.freeze(Object.defineProperty({__proto__:null,createLink:Qf,drawCustomLink:Xf,editCutsomLinkLabel:rh,hideLinkController:oh,removeLink:eh,renderCustomLink:sh,selectLink:th,showLinkController:ih,tidyCustomLink:lh,unselectLink:nh},Symbol.toStringTag,{value:"Module"})),ch=function(e){var t,n;if(e.length===0)throw new Error("No selected node.");if(e.length===1){const c=e[0].nodeObj,u=e[0].nodeObj.parent;if(!u)throw new Error("Can not select root node.");const f=u.children.findIndex(y=>c===y);return{parent:u.id,start:f,end:f}}let o=0;const i=e.map(c=>{let u=c.nodeObj;const f=[];for(;u.parent;){const y=u.parent,b=y.children,x=b==null?void 0:b.indexOf(u);u=y,f.unshift({node:u,index:x})}return f.length>o&&(o=f.length),f});let s=0;e:for(;s<o;s++){const c=(t=i[0][s])==null?void 0:t.node;for(let u=1;u<i.length;u++)if(((n=i[u][s])==null?void 0:n.node)!==c)break e}if(!s)throw new Error("Can not select root node.");const r=i.map(c=>c[s-1].index).sort(),l=r[0]||0,a=r[r.length-1]||0,d=i[0][s-1].node;if(d.root)throw new Error("Please select nodes in the same main topic.");return{parent:d.id,start:l,end:a}},dh=function(e){const t=document.createElementNS("http://www.w3.org/2000/svg","g");return t.setAttribute("id",e),t},fr=function(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg","path");return we(n,{d:e,stroke:t||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},hr=function(e,t,n,o,i){const s=document.createElementNS("http://www.w3.org/2000/svg","text");return we(s,{"text-anchor":o,x:t+"",y:n+"",fill:i||"#666"}),s.innerHTML=e,s},uh=e=>ve(e).parentElement.parentElement,fh=function({parent:e,start:t}){var n,o;const i=ve(e),s=i.nodeObj;let r;return s.root===!0?r=(n=ve(s.children[t].id).closest("me-main"))==null?void 0:n.className:r=(o=i.closest("me-main"))==null?void 0:o.className,r},na=function(e,t){var n;const{id:o,text:i,parent:s,start:r,end:l}=t,a=e.nodes,d=ve(s).nodeObj,c=fh(t);let u=1/0,f=0,y=0,b=0;for(let W=r;W<=l;W++){const X=(n=d.children)==null?void 0:n[W];if(!X)return console.warn("Child not found"),e.removeSummary(o),null;const de=uh(X.id),{offsetLeft:pe,offsetTop:Ee}=gn(a,de);W===r&&(y=Ee),W===l&&(b=Ee+de.offsetHeight),pe<u&&(u=pe),de.offsetWidth+pe>f&&(f=de.offsetWidth+pe)}let x,v;const M=y+10,R=b+10,O=(M+R)/2,T=e.theme.cssVar["--color"];c==="lhs"?(x=fr(`M ${u+10} ${M} c -5 0 -10 5 -10 10 L ${u} ${R-10} c 0 5 5 10 10 10 M ${u} ${O} h -10`,T),v=hr(i,u-20,O+6,"end",T)):(x=fr(`M ${f-10} ${M} c 5 0 10 5 10 10 L ${f} ${R-10} c 0 5 -5 10 -10 10 M ${f} ${O} h 10`,T),v=hr(i,f+20,O+6,"start",T));const F=dh("s-"+o);return F.appendChild(x),F.appendChild(v),F.summaryObj=t,e.summarySvg.appendChild(F),F},hh=function(){let e=[];this.currentNode?e=[this.currentNode]:this.currentNodes&&(e=this.currentNodes);const{parent:t,start:n,end:o}=ch(e),i={id:Kn(),parent:t,start:n,end:o,text:"summary"},s=na(this,i);this.summaries.push(i),this.editSummary(s),this.bus.fire("operation",{name:"createSummary",obj:i})},ph=function(e){var t;const n=this.summaries.findIndex(o=>o.id===e);n>-1&&(this.summaries.splice(n,1),(t=document.querySelector("#s-"+e))==null||t.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:e}})},mh=function(e){const t=e.children[1].getBBox(),n=6,o=3,i=document.createElementNS("http://www.w3.org/2000/svg","rect");we(i,{x:t.x-n+"",y:t.y-n+"",width:t.width+n*2+"",height:t.height+n*2+"",rx:o+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),i.classList.add("selected"),e.appendChild(i),this.currentSummary=e},gh=function(){var e,t;(t=(e=this.currentSummary)==null?void 0:e.querySelector("rect"))==null||t.remove(),this.currentSummary=null},bh=function(){this.summarySvg.innerHTML="",this.summaries.forEach(e=>{try{na(this,e)}catch{console.warn("Node may not be expanded")}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},yh=function(e){if(console.time("editSummary"),!e)return;const t=e.childNodes[1];Vl(this,t,n=>{var o;const i=e.summaryObj,s=((o=n.textContent)==null?void 0:o.trim())||"";s===""?i.text=origin:i.text=s,n.remove(),s!==origin&&(t.innerHTML=i.text,this.linkDiv(),this.bus.fire("operation",{name:"finishEditSummary",obj:i}))}),console.timeEnd("editSummary")},vh=Object.freeze(Object.defineProperty({__proto__:null,createSummary:hh,editSummary:yh,removeSummary:ph,renderSummary:bh,selectSummary:mh,unselectSummary:gh},Symbol.toStringTag,{value:"Module"}));function xh(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg","svg");return we(n,{version:"1.1",xmlns:"http://www.w3.org/2000/svg",height:e,width:t}),n}function wh(e,t){return(parseInt(e)-parseInt(t))/2}function kh(e,t,n,o){const i=document.createElementNS("http://www.w3.org/2000/svg","g");let s="";return e.text?s=e.text.textContent:s=e.childNodes[0].textContent,s.split(`
|
||
`).forEach((r,l)=>{const a=document.createElementNS("http://www.w3.org/2000/svg","text");we(a,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+wh(t.lineHeight,t.fontSize)*(l+1)+parseFloat(t.fontSize)*(l+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),a.innerHTML=r,i.appendChild(a)}),i}function _h(e,t,n,o){let i="";e.text?i=e.text.textContent:i=e.childNodes[0].textContent;const s=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");we(s,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const r=document.createElement("div");return we(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),r.innerHTML=i,s.appendChild(r),s}function hi(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:i,offsetTop:s}=gn(e.nodes,t),r=document.createElementNS("http://www.w3.org/2000/svg","rect");we(r,{x:i+"",y:s+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const l=document.createElementNS("http://www.w3.org/2000/svg","g");l.appendChild(r);let a;return n?a=_h(t,o,i,s):a=kh(t,o,i,s),l.appendChild(a),l}function Eh(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:i}=gn(e.nodes,t),s=document.createElementNS("http://www.w3.org/2000/svg","a"),r=document.createElementNS("http://www.w3.org/2000/svg","text");return we(r,{x:o+"",y:i+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=t.textContent,s.appendChild(r),s.setAttribute("href",t.href),s}const io=100,Ch='<?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">',oa=(e,t=!1)=>{var n,o,i;const s=e.nodes,r=s.offsetHeight+io*2,l=s.offsetWidth+io*2,a=xh(r+"px",l+"px"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),c=document.createElementNS("http://www.w3.org/2000/svg","rect");we(c,{x:"0",y:"0",width:`${l}`,height:`${r}`,fill:e.theme.cssVar["--bgcolor"]}),a.appendChild(c),s.querySelectorAll(".subLines").forEach(b=>{const x=b.cloneNode(!0),{offsetLeft:v,offsetTop:M}=gn(s,b.parentElement);x.setAttribute("x",`${v}`),x.setAttribute("y",`${M}`),d.appendChild(x)});const u=(n=s.querySelector(".lines"))==null?void 0:n.cloneNode(!0);u&&d.appendChild(u);const f=(o=s.querySelector(".topiclinks"))==null?void 0:o.cloneNode(!0);f&&d.appendChild(f);const y=(i=s.querySelector(".summary"))==null?void 0:i.cloneNode(!0);return y&&d.appendChild(y),s.querySelectorAll("me-tpc").forEach(b=>{d.appendChild(hi(e,b,!t))}),s.querySelectorAll(".tags > span").forEach(b=>{d.appendChild(hi(e,b))}),s.querySelectorAll(".icons > span").forEach(b=>{d.appendChild(hi(e,b))}),s.querySelectorAll(".hyper-link").forEach(b=>{d.appendChild(Eh(e,b))}),we(d,{x:io+"",y:io+"",overflow:"visible"}),a.appendChild(d),Ch+a.outerHTML};function Sh(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=i=>{t(i.target.result)},o.onerror=i=>{n(i)},o.readAsDataURL(e)})}const Mh=function(e=!1){const t=oa(this,e);return new Blob([t],{type:"image/svg+xml"})},Nh=async function(e=!1){const t=oa(this,e),n=new Blob([t],{type:"image/svg+xml"}),o=await Sh(n);return new Promise((i,s)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const l=document.createElement("canvas");l.width=r.width,l.height=r.height,l.getContext("2d").drawImage(r,0,0),l.toBlob(i,"image/png",1)},r.src=o,r.onerror=s})},Th=Object.freeze(Object.defineProperty({__proto__:null,exportPng:Nh,exportSvg:Mh},Symbol.toStringTag,{value:"Module"}));function Ah(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const pr=Object.keys(ta),ia={};for(let e=0;e<pr.length;e++){const t=pr[e];ia[t]=Ah(ta[t],t)}const Lh={getObjById:Co,generateNewObj:mu,layout:vu,linkDiv:Au,editTopic:Su,createWrapper:ku,createParent:_u,createChildren:Eu,createTopic:Cu,findEle:ve,changeTheme:ef,...Sf,...ia,...ah,...vh,...Th,init(e){if(!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,mt(this.nodeData),this.linkData=e.linkData||{},this.summaries=e.summaries||[],this.tidyCustomLink(),this.toolBar&&Wu(this),this.keypress&&Pu(this),this.editable&&Qu(this),hu()&&this.mobileMenu?ju(this):this.contextMenu&&Ou(this,this.contextMenuOption),this.draggable&&Hu(this),this.allowUndo&&Uu(this),this.toCenter(),this.layout(),this.linkDiv()}},_n=document;function Te({el:e,direction:t,locale:n,draggable:o,editable:i,contextMenu:s,contextMenuOption:r,toolBar:l,keypress:a,mouseSelectionButton:d,before:c,newTopicName:u,allowUndo:f,mainLinkStyle:y,subLinkStyle:b,overflowHidden:x,mobileMenu:v,theme:M}){console.log("ME_version "+Te.version,this);let R=null;const O=Object.prototype.toString.call(e);if(O==="[object HTMLDivElement]"?R=e:O==="[object String]"&&(R=document.querySelector(e)),!R)throw new Error("MindElixir: el is not a valid element");R.className+=" mind-elixir",R.innerHTML="",R.style.setProperty("--gap",ut+"px"),this.mindElixirBox=R,this.before=c||{},this.locale=n||"en",this.contextMenuOption=r,this.contextMenu=s===void 0?!0:s,this.toolBar=l===void 0?!0:l,this.keypress=a===void 0?!0:a,this.mouseSelectionButton=d||0,this.mobileMenu=v||!1,this.direction=typeof t=="number"?t:1,this.draggable=o===void 0?!0:o,this.newTopicName=u||"new node",this.editable=i===void 0?!0:i,this.allowUndo=f===void 0?!1:f,this.currentNode=null,this.currentLink=null,this.scaleVal=1,this.tempDirection=null,this.mainLinkStyle=y||0,this.subLinkStyle=b||0,this.overflowHidden=x||!1,this.bus=yu.create(),this.container=_n.createElement("div"),this.container.className="map-container";const T=window.matchMedia("(prefers-color-scheme: dark)");this.theme=M||(T.matches?Bl:zl);const F=_n.createElement("div");F.className="map-canvas",this.map=F,this.map.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.mindElixirBox.appendChild(this.container),this.nodes=_n.createElement("me-nodes"),this.nodes.className="main-node-container",this.lines=Nn("lines"),this.summarySvg=Nn("summary"),this.linkController=Nn("linkcontroller"),this.P2=_n.createElement("div"),this.P3=_n.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=tr(),this.line2=tr(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=Nn("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":bu(this)}Te.prototype=Lh;Te.LEFT=Xe;Te.RIGHT=Vt;Te.SIDE=Yn;Te.THEME=zl;Te.DARK_THEME=Bl;Te.version="3.3.2";Te.E=ve;Te.new=e=>({nodeData:{id:Kn(),topic:e||"new topic",root:!0,children:[]},linkData:{}});function sa(e,t){return function(){return e.apply(t,arguments)}}const{toString:$h}=Object.prototype,{getPrototypeOf:as}=Object,{iterator:Wo,toStringTag:ra}=Symbol,Yo=(e=>t=>{const n=$h.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nt=e=>(e=e.toLowerCase(),t=>Yo(t)===e),Ko=e=>t=>typeof t===e,{isArray:bn}=Array,Un=Ko("undefined");function Zn(e){return e!==null&&!Un(e)&&e.constructor!==null&&!Un(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const la=nt("ArrayBuffer");function Rh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&la(e.buffer),t}const Oh=Ko("string"),ze=Ko("function"),aa=Ko("number"),Gn=e=>e!==null&&typeof e=="object",Ih=e=>e===!0||e===!1,fo=e=>{if(Yo(e)!=="object")return!1;const t=as(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ra in e)&&!(Wo in e)},Dh=e=>{if(!Gn(e)||Zn(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ph=nt("Date"),jh=nt("File"),zh=nt("Blob"),Bh=nt("FileList"),Hh=e=>Gn(e)&&ze(e.pipe),Fh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ze(e.append)&&((t=Yo(e))==="formdata"||t==="object"&&ze(e.toString)&&e.toString()==="[object FormData]"))},Uh=nt("URLSearchParams"),[qh,Vh,Wh,Yh]=["ReadableStream","Request","Response","Headers"].map(nt),Kh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,i;if(typeof e!="object"&&(e=[e]),bn(e))for(o=0,i=e.length;o<i;o++)t.call(null,e[o],o,e);else{if(Zn(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let l;for(o=0;o<r;o++)l=s[o],t.call(null,e[l],l,e)}}function ca(e,t){if(Zn(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,i;for(;o-- >0;)if(i=n[o],t===i.toLowerCase())return i;return null}const Yt=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),da=e=>!Un(e)&&e!==Yt;function $i(){const{caseless:e}=da(this)&&this||{},t={},n=(o,i)=>{const s=e&&ca(t,i)||i;fo(t[s])&&fo(o)?t[s]=$i(t[s],o):fo(o)?t[s]=$i({},o):bn(o)?t[s]=o.slice():t[s]=o};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Xn(arguments[o],n);return t}const Jh=(e,t,n,{allOwnKeys:o}={})=>(Xn(t,(i,s)=>{n&&ze(i)?e[s]=sa(i,n):e[s]=i},{allOwnKeys:o}),e),Zh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gh=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xh=(e,t,n,o)=>{let i,s,r;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)r=i[s],(!o||o(r,e,t))&&!l[r]&&(t[r]=e[r],l[r]=!0);e=n!==!1&&as(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},ep=e=>{if(!e)return null;if(bn(e))return e;let t=e.length;if(!aa(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tp=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&as(Uint8Array)),np=(e,t)=>{const o=(e&&e[Wo]).call(e);let i;for(;(i=o.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},op=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},ip=nt("HTMLFormElement"),sp=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,i){return o.toUpperCase()+i}),mr=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rp=nt("RegExp"),ua=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Xn(n,(i,s)=>{let r;(r=t(i,s,e))!==!1&&(o[s]=r||i)}),Object.defineProperties(e,o)},lp=e=>{ua(e,(t,n)=>{if(ze(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(ze(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ap=(e,t)=>{const n={},o=i=>{i.forEach(s=>{n[s]=!0})};return bn(e)?o(e):o(String(e).split(t)),n},cp=()=>{},dp=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function up(e){return!!(e&&ze(e.append)&&e[ra]==="FormData"&&e[Wo])}const fp=e=>{const t=new Array(10),n=(o,i)=>{if(Gn(o)){if(t.indexOf(o)>=0)return;if(Zn(o))return o;if(!("toJSON"in o)){t[i]=o;const s=bn(o)?[]:{};return Xn(o,(r,l)=>{const a=n(r,i+1);!Un(a)&&(s[l]=a)}),t[i]=void 0,s}}return o};return n(e,0)},hp=nt("AsyncFunction"),pp=e=>e&&(Gn(e)||ze(e))&&ze(e.then)&&ze(e.catch),fa=((e,t)=>e?setImmediate:t?((n,o)=>(Yt.addEventListener("message",({source:i,data:s})=>{i===Yt&&s===n&&o.length&&o.shift()()},!1),i=>{o.push(i),Yt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ze(Yt.postMessage)),mp=typeof queueMicrotask<"u"?queueMicrotask.bind(Yt):typeof process<"u"&&process.nextTick||fa,gp=e=>e!=null&&ze(e[Wo]),_={isArray:bn,isArrayBuffer:la,isBuffer:Zn,isFormData:Fh,isArrayBufferView:Rh,isString:Oh,isNumber:aa,isBoolean:Ih,isObject:Gn,isPlainObject:fo,isEmptyObject:Dh,isReadableStream:qh,isRequest:Vh,isResponse:Wh,isHeaders:Yh,isUndefined:Un,isDate:Ph,isFile:jh,isBlob:zh,isRegExp:rp,isFunction:ze,isStream:Hh,isURLSearchParams:Uh,isTypedArray:tp,isFileList:Bh,forEach:Xn,merge:$i,extend:Jh,trim:Kh,stripBOM:Zh,inherits:Gh,toFlatObject:Xh,kindOf:Yo,kindOfTest:nt,endsWith:Qh,toArray:ep,forEachEntry:np,matchAll:op,isHTMLForm:ip,hasOwnProperty:mr,hasOwnProp:mr,reduceDescriptors:ua,freezeMethods:lp,toObjectSet:ap,toCamelCase:sp,noop:cp,toFiniteNumber:dp,findKey:ca,global:Yt,isContextDefined:da,isSpecCompliantForm:up,toJSONObject:fp,isAsyncFn:hp,isThenable:pp,setImmediate:fa,asap:mp,isIterable:gp};function J(e,t,n,o,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),i&&(this.response=i,this.status=i.status?i.status:null)}_.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_.toJSONObject(this.config),code:this.code,status:this.status}}});const ha=J.prototype,pa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pa[e]={value:e}});Object.defineProperties(J,pa);Object.defineProperty(ha,"isAxiosError",{value:!0});J.from=(e,t,n,o,i,s)=>{const r=Object.create(ha);return _.toFlatObject(e,r,function(a){return a!==Error.prototype},l=>l!=="isAxiosError"),J.call(r,e.message,t,n,o,i),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const bp=null;function Ri(e){return _.isPlainObject(e)||_.isArray(e)}function ma(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function gr(e,t,n){return e?e.concat(t).map(function(i,s){return i=ma(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function yp(e){return _.isArray(e)&&!e.some(Ri)}const vp=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function Jo(e,t,n){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!_.isUndefined(v[x])});const o=n.metaTokens,i=n.visitor||c,s=n.dots,r=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(i))throw new TypeError("visitor must be a function");function d(b){if(b===null)return"";if(_.isDate(b))return b.toISOString();if(_.isBoolean(b))return b.toString();if(!a&&_.isBlob(b))throw new J("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(b)||_.isTypedArray(b)?a&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function c(b,x,v){let M=b;if(b&&!v&&typeof b=="object"){if(_.endsWith(x,"{}"))x=o?x:x.slice(0,-2),b=JSON.stringify(b);else if(_.isArray(b)&&yp(b)||(_.isFileList(b)||_.endsWith(x,"[]"))&&(M=_.toArray(b)))return x=ma(x),M.forEach(function(O,T){!(_.isUndefined(O)||O===null)&&t.append(r===!0?gr([x],T,s):r===null?x:x+"[]",d(O))}),!1}return Ri(b)?!0:(t.append(gr(v,x,s),d(b)),!1)}const u=[],f=Object.assign(vp,{defaultVisitor:c,convertValue:d,isVisitable:Ri});function y(b,x){if(!_.isUndefined(b)){if(u.indexOf(b)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(b),_.forEach(b,function(M,R){(!(_.isUndefined(M)||M===null)&&i.call(t,M,_.isString(R)?R.trim():R,x,f))===!0&&y(M,x?x.concat(R):[R])}),u.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return y(e),t}function br(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function cs(e,t){this._pairs=[],e&&Jo(e,this,t)}const ga=cs.prototype;ga.append=function(t,n){this._pairs.push([t,n])};ga.toString=function(t){const n=t?function(o){return t.call(this,o,br)}:br;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function xp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ba(e,t,n){if(!t)return e;const o=n&&n.encode||xp;_.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=_.isURLSearchParams(t)?t.toString():new cs(t,n).toString(o),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class wp{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_.forEach(this.handlers,function(o){o!==null&&t(o)})}}const yr=wp,ya={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kp=typeof URLSearchParams<"u"?URLSearchParams:cs,_p=typeof FormData<"u"?FormData:null,Ep=typeof Blob<"u"?Blob:null,Cp={isBrowser:!0,classes:{URLSearchParams:kp,FormData:_p,Blob:Ep},protocols:["http","https","file","blob","url","data"]},ds=typeof window<"u"&&typeof document<"u",Oi=typeof navigator=="object"&&navigator||void 0,Sp=ds&&(!Oi||["ReactNative","NativeScript","NS"].indexOf(Oi.product)<0),Mp=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Np=ds&&window.location.href||"http://localhost",Tp=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ds,hasStandardBrowserEnv:Sp,hasStandardBrowserWebWorkerEnv:Mp,navigator:Oi,origin:Np},Symbol.toStringTag,{value:"Module"})),Ae={...Tp,...Cp};function Ap(e,t){return Jo(e,new Ae.classes.URLSearchParams,{visitor:function(n,o,i,s){return Ae.isNode&&_.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Lp(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $p(e){const t={},n=Object.keys(e);let o;const i=n.length;let s;for(o=0;o<i;o++)s=n[o],t[s]=e[s];return t}function va(e){function t(n,o,i,s){let r=n[s++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),a=s>=n.length;return r=!r&&_.isArray(i)?i.length:r,a?(_.hasOwnProp(i,r)?i[r]=[i[r],o]:i[r]=o,!l):((!i[r]||!_.isObject(i[r]))&&(i[r]=[]),t(n,o,i[r],s)&&_.isArray(i[r])&&(i[r]=$p(i[r])),!l)}if(_.isFormData(e)&&_.isFunction(e.entries)){const n={};return _.forEachEntry(e,(o,i)=>{t(Lp(o),i,n,0)}),n}return null}function Rp(e,t,n){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const us={transitional:ya,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",i=o.indexOf("application/json")>-1,s=_.isObject(t);if(s&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return i?JSON.stringify(va(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t)||_.isReadableStream(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Ap(t,this.formSerializer).toString();if((l=_.isFileList(t))||o.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Jo(l?{"files[]":t}:t,a&&new a,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),Rp(t)):t}],transformResponse:[function(t){const n=this.transitional||us.transitional,o=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_.isResponse(t)||_.isReadableStream(t))return t;if(t&&_.isString(t)&&(o&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(r)throw l.name==="SyntaxError"?J.from(l,J.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ae.classes.FormData,Blob:Ae.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],e=>{us.headers[e]={}});const fs=us,Op=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ip=e=>{const t={};let n,o,i;return e&&e.split(`
|
||
`).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),o=r.substring(i+1).trim(),!(!n||t[n]&&Op[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},vr=Symbol("internals");function En(e){return e&&String(e).trim().toLowerCase()}function ho(e){return e===!1||e==null?e:_.isArray(e)?e.map(ho):String(e)}function Dp(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const Pp=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pi(e,t,n,o,i){if(_.isFunction(o))return o.call(this,t,n);if(i&&(t=n),!!_.isString(t)){if(_.isString(o))return t.indexOf(o)!==-1;if(_.isRegExp(o))return o.test(t)}}function jp(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function zp(e,t){const n=_.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(i,s,r){return this[o].call(this,t,i,s,r)},configurable:!0})})}class Zo{constructor(t){t&&this.set(t)}set(t,n,o){const i=this;function s(l,a,d){const c=En(a);if(!c)throw new Error("header name must be a non-empty string");const u=_.findKey(i,c);(!u||i[u]===void 0||d===!0||d===void 0&&i[u]!==!1)&&(i[u||a]=ho(l))}const r=(l,a)=>_.forEach(l,(d,c)=>s(d,c,a));if(_.isPlainObject(t)||t instanceof this.constructor)r(t,n);else if(_.isString(t)&&(t=t.trim())&&!Pp(t))r(Ip(t),n);else if(_.isObject(t)&&_.isIterable(t)){let l={},a,d;for(const c of t){if(!_.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[d=c[0]]=(a=l[d])?_.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}r(l,n)}else t!=null&&s(n,t,o);return this}get(t,n){if(t=En(t),t){const o=_.findKey(this,t);if(o){const i=this[o];if(!n)return i;if(n===!0)return Dp(i);if(_.isFunction(n))return n.call(this,i,o);if(_.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=En(t),t){const o=_.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||pi(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let i=!1;function s(r){if(r=En(r),r){const l=_.findKey(o,r);l&&(!n||pi(o,o[l],l,n))&&(delete o[l],i=!0)}}return _.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let o=n.length,i=!1;for(;o--;){const s=n[o];(!t||pi(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,o={};return _.forEach(this,(i,s)=>{const r=_.findKey(o,s);if(r){n[r]=ho(i),delete n[s];return}const l=t?jp(s):String(s).trim();l!==s&&delete n[s],n[l]=ho(i),o[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _.forEach(this,(o,i)=>{o!=null&&o!==!1&&(n[i]=t&&_.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(i=>o.set(i)),o}static accessor(t){const o=(this[vr]=this[vr]={accessors:{}}).accessors,i=this.prototype;function s(r){const l=En(r);o[l]||(zp(i,r),o[l]=!0)}return _.isArray(t)?t.forEach(s):s(t),this}}Zo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(Zo.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});_.freezeMethods(Zo);const tt=Zo;function mi(e,t){const n=this||fs,o=t||n,i=tt.from(o.headers);let s=o.data;return _.forEach(e,function(l){s=l.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function xa(e){return!!(e&&e.__CANCEL__)}function yn(e,t,n){J.call(this,e??"canceled",J.ERR_CANCELED,t,n),this.name="CanceledError"}_.inherits(yn,J,{__CANCEL__:!0});function wa(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Bp(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hp(e,t){e=e||10;const n=new Array(e),o=new Array(e);let i=0,s=0,r;return t=t!==void 0?t:1e3,function(a){const d=Date.now(),c=o[s];r||(r=d),n[i]=a,o[i]=d;let u=s,f=0;for(;u!==i;)f+=n[u++],u=u%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-r<t)return;const y=c&&d-c;return y?Math.round(f*1e3/y):void 0}}function Fp(e,t){let n=0,o=1e3/t,i,s;const r=(d,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const c=Date.now(),u=c-n;u>=o?r(d,c):(i=d,s||(s=setTimeout(()=>{s=null,r(i)},o-u)))},()=>i&&r(i)]}const No=(e,t,n=3)=>{let o=0;const i=Hp(50,250);return Fp(s=>{const r=s.loaded,l=s.lengthComputable?s.total:void 0,a=r-o,d=i(a),c=r<=l;o=r;const u={loaded:r,total:l,progress:l?r/l:void 0,bytes:a,rate:d||void 0,estimated:d&&l&&c?(l-r)/d:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(u)},n)},xr=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},wr=e=>(...t)=>_.asap(()=>e(...t)),Up=Ae.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ae.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ae.origin),Ae.navigator&&/(msie|trident)/i.test(Ae.navigator.userAgent)):()=>!0,qp=Ae.hasStandardBrowserEnv?{write(e,t,n,o,i,s){const r=[e+"="+encodeURIComponent(t)];_.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),_.isString(o)&&r.push("path="+o),_.isString(i)&&r.push("domain="+i),s===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ka(e,t,n){let o=!Vp(t);return e&&(o||n==!1)?Wp(e,t):t}const kr=e=>e instanceof tt?{...e}:e;function Xt(e,t){t=t||{};const n={};function o(d,c,u,f){return _.isPlainObject(d)&&_.isPlainObject(c)?_.merge.call({caseless:f},d,c):_.isPlainObject(c)?_.merge({},c):_.isArray(c)?c.slice():c}function i(d,c,u,f){if(_.isUndefined(c)){if(!_.isUndefined(d))return o(void 0,d,u,f)}else return o(d,c,u,f)}function s(d,c){if(!_.isUndefined(c))return o(void 0,c)}function r(d,c){if(_.isUndefined(c)){if(!_.isUndefined(d))return o(void 0,d)}else return o(void 0,c)}function l(d,c,u){if(u in t)return o(d,c);if(u in e)return o(void 0,d)}const a={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(d,c,u)=>i(kr(d),kr(c),u,!0)};return _.forEach(Object.keys({...e,...t}),function(c){const u=a[c]||i,f=u(e[c],t[c],c);_.isUndefined(f)&&u!==l||(n[c]=f)}),n}const _a=e=>{const t=Xt({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:r,auth:l}=t;t.headers=r=tt.from(r),t.url=ba(ka(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let a;if(_.isFormData(n)){if(Ae.hasStandardBrowserEnv||Ae.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((a=r.getContentType())!==!1){const[d,...c]=a?a.split(";").map(u=>u.trim()).filter(Boolean):[];r.setContentType([d||"multipart/form-data",...c].join("; "))}}if(Ae.hasStandardBrowserEnv&&(o&&_.isFunction(o)&&(o=o(t)),o||o!==!1&&Up(t.url))){const d=i&&s&&qp.read(s);d&&r.set(i,d)}return t},Yp=typeof XMLHttpRequest<"u",Kp=Yp&&function(e){return new Promise(function(n,o){const i=_a(e);let s=i.data;const r=tt.from(i.headers).normalize();let{responseType:l,onUploadProgress:a,onDownloadProgress:d}=i,c,u,f,y,b;function x(){y&&y(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function M(){if(!v)return;const O=tt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),F={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:O,config:e,request:v};wa(function(X){n(X),x()},function(X){o(X),x()},F),v=null}"onloadend"in v?v.onloadend=M:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(M)},v.onabort=function(){v&&(o(new J("Request aborted",J.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new J("Network Error",J.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const F=i.transitional||ya;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),o(new J(T,F.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,v)),v=null},s===void 0&&r.setContentType(null),"setRequestHeader"in v&&_.forEach(r.toJSON(),function(T,F){v.setRequestHeader(F,T)}),_.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),l&&l!=="json"&&(v.responseType=i.responseType),d&&([f,b]=No(d,!0),v.addEventListener("progress",f)),a&&v.upload&&([u,y]=No(a),v.upload.addEventListener("progress",u),v.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(c=O=>{v&&(o(!O||O.type?new yn(null,e,v):O),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const R=Bp(i.url);if(R&&Ae.protocols.indexOf(R)===-1){o(new J("Unsupported protocol "+R+":",J.ERR_BAD_REQUEST,e));return}v.send(s||null)})},Jp=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,i;const s=function(d){if(!i){i=!0,l();const c=d instanceof Error?d:this.reason;o.abort(c instanceof J?c:new yn(c instanceof Error?c.message:c))}};let r=t&&setTimeout(()=>{r=null,s(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t);const l=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:a}=o;return a.unsubscribe=()=>_.asap(l),a}},Zp=Jp,Gp=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let o=0,i;for(;o<n;)i=o+t,yield e.slice(o,i),o=i},Xp=async function*(e,t){for await(const n of Qp(e))yield*Gp(n,t)},Qp=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},_r=(e,t,n,o)=>{const i=Xp(e,t);let s=0,r,l=a=>{r||(r=!0,o&&o(a))};return new ReadableStream({async pull(a){try{const{done:d,value:c}=await i.next();if(d){l(),a.close();return}let u=c.byteLength;if(n){let f=s+=u;n(f)}a.enqueue(new Uint8Array(c))}catch(d){throw l(d),d}},cancel(a){return l(a),i.return()}},{highWaterMark:2})},Go=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ea=Go&&typeof ReadableStream=="function",e0=Go&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ca=(e,...t)=>{try{return!!e(...t)}catch{return!1}},t0=Ea&&Ca(()=>{let e=!1;const t=new Request(Ae.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Er=64*1024,Ii=Ea&&Ca(()=>_.isReadableStream(new Response("").body)),To={stream:Ii&&(e=>e.body)};Go&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!To[t]&&(To[t]=_.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,o)})})})(new Response);const n0=async e=>{if(e==null)return 0;if(_.isBlob(e))return e.size;if(_.isSpecCompliantForm(e))return(await new Request(Ae.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_.isArrayBufferView(e)||_.isArrayBuffer(e))return e.byteLength;if(_.isURLSearchParams(e)&&(e=e+""),_.isString(e))return(await e0(e)).byteLength},o0=async(e,t)=>{const n=_.toFiniteNumber(e.getContentLength());return n??n0(t)},i0=Go&&(async e=>{let{url:t,method:n,data:o,signal:i,cancelToken:s,timeout:r,onDownloadProgress:l,onUploadProgress:a,responseType:d,headers:c,withCredentials:u="same-origin",fetchOptions:f}=_a(e);d=d?(d+"").toLowerCase():"text";let y=Zp([i,s&&s.toAbortSignal()],r),b;const x=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let v;try{if(a&&t0&&n!=="get"&&n!=="head"&&(v=await o0(c,o))!==0){let F=new Request(t,{method:"POST",body:o,duplex:"half"}),W;if(_.isFormData(o)&&(W=F.headers.get("content-type"))&&c.setContentType(W),F.body){const[X,de]=xr(v,No(wr(a)));o=_r(F.body,Er,X,de)}}_.isString(u)||(u=u?"include":"omit");const M="credentials"in Request.prototype;b=new Request(t,{...f,signal:y,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:M?u:void 0});let R=await fetch(b,f);const O=Ii&&(d==="stream"||d==="response");if(Ii&&(l||O&&x)){const F={};["status","statusText","headers"].forEach(pe=>{F[pe]=R[pe]});const W=_.toFiniteNumber(R.headers.get("content-length")),[X,de]=l&&xr(W,No(wr(l),!0))||[];R=new Response(_r(R.body,Er,X,()=>{de&&de(),x&&x()}),F)}d=d||"text";let T=await To[_.findKey(To,d)||"text"](R,e);return!O&&x&&x(),await new Promise((F,W)=>{wa(F,W,{data:T,headers:tt.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:b})})}catch(M){throw x&&x(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,e,b),{cause:M.cause||M}):J.from(M,M&&M.code,e,b)}}),Di={http:bp,xhr:Kp,fetch:i0};_.forEach(Di,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Cr=e=>`- ${e}`,s0=e=>_.isFunction(e)||e===null||e===!1,Sa={getAdapter:e=>{e=_.isArray(e)?e:[e];const{length:t}=e;let n,o;const i={};for(let s=0;s<t;s++){n=e[s];let r;if(o=n,!s0(n)&&(o=Di[(r=String(n)).toLowerCase()],o===void 0))throw new J(`Unknown adapter '${r}'`);if(o)break;i[r||"#"+s]=o}if(!o){const s=Object.entries(i).map(([l,a])=>`adapter ${l} `+(a===!1?"is not supported by the environment":"is not available in the build"));let r=t?s.length>1?`since :
|
||
`+s.map(Cr).join(`
|
||
`):" "+Cr(s[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return o},adapters:Di};function gi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yn(null,e)}function Sr(e){return gi(e),e.headers=tt.from(e.headers),e.data=mi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Sa.getAdapter(e.adapter||fs.adapter)(e).then(function(o){return gi(e),o.data=mi.call(e,e.transformResponse,o),o.headers=tt.from(o.headers),o},function(o){return xa(o)||(gi(e),o&&o.response&&(o.response.data=mi.call(e,e.transformResponse,o.response),o.response.headers=tt.from(o.response.headers))),Promise.reject(o)})}const Ma="1.11.0",Xo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xo[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const Mr={};Xo.transitional=function(t,n,o){function i(s,r){return"[Axios v"+Ma+"] Transitional option '"+s+"'"+r+(o?". "+o:"")}return(s,r,l)=>{if(t===!1)throw new J(i(r," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!Mr[r]&&(Mr[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,l):!0}};Xo.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function r0(e,t,n){if(typeof e!="object")throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let i=o.length;for(;i-- >0;){const s=o[i],r=t[s];if(r){const l=e[s],a=l===void 0||r(l,s,e);if(a!==!0)throw new J("option "+s+" must be "+a,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+s,J.ERR_BAD_OPTION)}}const po={assertOptions:r0,validators:Xo},at=po.validators;class Ao{constructor(t){this.defaults=t||{},this.interceptors={request:new yr,response:new yr}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
||
`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xt(this.defaults,n);const{transitional:o,paramsSerializer:i,headers:s}=n;o!==void 0&&po.assertOptions(o,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),i!=null&&(_.isFunction(i)?n.paramsSerializer={serialize:i}:po.assertOptions(i,{encode:at.function,serialize:at.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),po.assertOptions(n,{baseUrl:at.spelling("baseURL"),withXsrfToken:at.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&_.merge(s.common,s[n.method]);s&&_.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=tt.concat(r,s);const l=[];let a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(a=a&&x.synchronous,l.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let c,u=0,f;if(!a){const b=[Sr.bind(this),void 0];for(b.unshift(...l),b.push(...d),f=b.length,c=Promise.resolve(n);u<f;)c=c.then(b[u++],b[u++]);return c}f=l.length;let y=n;for(u=0;u<f;){const b=l[u++],x=l[u++];try{y=b(y)}catch(v){x.call(this,v);break}}try{c=Sr.call(this,y)}catch(b){return Promise.reject(b)}for(u=0,f=d.length;u<f;)c=c.then(d[u++],d[u++]);return c}getUri(t){t=Xt(this.defaults,t);const n=ka(t.baseURL,t.url,t.allowAbsoluteUrls);return ba(n,t.params,t.paramsSerializer)}}_.forEach(["delete","get","head","options"],function(t){Ao.prototype[t]=function(n,o){return this.request(Xt(o||{},{method:t,url:n,data:(o||{}).data}))}});_.forEach(["post","put","patch"],function(t){function n(o){return function(s,r,l){return this.request(Xt(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Ao.prototype[t]=n(),Ao.prototype[t+"Form"]=n(!0)});const mo=Ao;class hs{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(i=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](i);o._listeners=null}),this.promise.then=i=>{let s;const r=new Promise(l=>{o.subscribe(l),s=l}).then(i);return r.cancel=function(){o.unsubscribe(s)},r},t(function(s,r,l){o.reason||(o.reason=new yn(s,r,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new hs(function(i){t=i}),cancel:t}}}const l0=hs;function a0(e){return function(n){return e.apply(null,n)}}function c0(e){return _.isObject(e)&&e.isAxiosError===!0}const Pi={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,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pi).forEach(([e,t])=>{Pi[t]=e});const d0=Pi;function Na(e){const t=new mo(e),n=sa(mo.prototype.request,t);return _.extend(n,mo.prototype,t,{allOwnKeys:!0}),_.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Na(Xt(e,i))},n}const _e=Na(fs);_e.Axios=mo;_e.CanceledError=yn;_e.CancelToken=l0;_e.isCancel=xa;_e.VERSION=Ma;_e.toFormData=Jo;_e.AxiosError=J;_e.Cancel=_e.CanceledError;_e.all=function(t){return Promise.all(t)};_e.spread=a0;_e.isAxiosError=c0;_e.mergeConfig=Xt;_e.AxiosHeaders=tt;_e.formToJSON=e=>va(_.isHTMLForm(e)?new FormData(e):e);_e.getAdapter=Sa.getAdapter;_e.HttpStatusCode=d0;_e.default=_e;const u0=_e,f0="http://127.0.0.1:8000/api",rn=u0.create({baseURL:f0,timeout:1e4,headers:{"Content-Type":"application/json"}}),xe={createMindmap:(e="思维导图",t=null)=>rn.post("/mindMaps",{title:e,data:t}),getMindmap:e=>rn.get(`/mindMaps/${e}`),getAllMindmaps:()=>rn.get("/mindmaps"),addNodes:(e,t)=>rn.post("/mindMaps/addNodes",{mindMapId:e,nodes:t}),updateNode:(e,t)=>rn.patch("/mindMaps/updateNode",{id:e,...t}),deleteNodes:e=>rn.delete("/mindMaps/deleteNodes",{data:{nodeIds:e}})};const Ta=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},h0={class:"mindmap-container"},p0={class:"zoom-level"},m0={key:0,class:"welcome-page"},g0={key:2,class:"save-controls"},b0={__name:"MindMap",setup(e,{expose:t}){const n=he(null),o=he(null),i=he(null),s=he({}),r=he(null),l=he(1),a=he(!0),d=he(!1);he(new Map),he(!1),he({x:0,y:0}),he(null);const c=()=>{a.value=!0,n.value&&(n.value.innerHTML=""),o.value&&(o.value=null)},u=()=>{a.value=!1},f=()=>{if(!o.value||!n.value)return null;try{const p=n.value.querySelector("canvas");if(p)return{transform:p.style.transform}}catch(p){console.warn("保存位置失败:",p)}return null},y=p=>{if(!(!p||!n.value))try{const m=n.value.querySelector("canvas");m&&p.transform&&(m.style.transform=p.transform,console.log("✅ 已恢复思维导图位置"))}catch(m){console.warn("恢复位置失败:",m)}},b=async(p,m=!1)=>{try{const w=m?f():null;console.log("🔍 loadMindmapData 被调用,数据:",p),console.log("🔍 数据字段:",Object.keys(p||{})),p&&p.id?(r.value=p.id,console.log("🔍 设置当前思维导图ID (data.id):",p.id)):p&&p.mindmapId?(r.value=p.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",p.mindmapId)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(p||{}))),console.log("🔍 设置后的 currentMindmapId.value:",r.value),u(),await al(),n.value||(console.warn("⚠️ 思维导图容器未准备好,等待DOM更新..."),await new Promise(D=>setTimeout(D,100)),n.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(n.value){o.value=new Te({el:n.value,direction:Te.RIGHT,draggable:!0,contextMenu:!0,toolBar:!0,nodeMenu:!1,keypress:!0,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1});const D=o.value.init(p);console.log("✅ Mind Elixir实例创建成功")}else{console.warn("⚠️ 容器未准备好,延迟创建Mind Elixir实例..."),setTimeout(()=>{if(n.value){o.value=new Te({el:n.value,direction:Te.RIGHT,draggable:!0,contextMenu:!0,toolBar:!0,nodeMenu:!1,keypress:!0,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1});const D=o.value.init(p);console.log("✅ Mind Elixir实例延迟创建成功"),setTimeout(()=>{m&&w?y(w):x(),bt()},300)}},200);return}}catch(D){console.warn("⚠️ Mind Elixir实例创建失败,尝试延迟创建:",D),setTimeout(()=>{try{if(n.value){o.value=new Te({el:n.value,direction:Te.RIGHT,draggable:!0,contextMenu:!0,toolBar:!0,nodeMenu:!1,keypress:!0,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1});const j=o.value.init(p);console.log("✅ Mind Elixir实例重试创建成功"),setTimeout(()=>{m&&w?y(w):x(),bt()},300)}}catch(j){console.error("❌ Mind Elixir实例重试创建失败:",j)}},500);return}setTimeout(()=>{m&&w?y(w):x(),u(),bt(),setTimeout(m&&w?()=>{y(w)}:()=>{x(),console.log("🔄 思维导图二次居中完成")},500)},100)}catch{}},x=()=>{try{const p=n.value;if(!p)return;const m=p.querySelector(".map-canvas");if(!m)return;const w=m.querySelectorAll("me-tpc");if(w.length===0)return;let D=1/0,j=-1/0,V=1/0,I=-1/0;w.forEach(B=>{const N=B.getBoundingClientRect(),q=p.getBoundingClientRect(),H=N.left-q.left,U=N.top-q.top;D=Math.min(D,H),j=Math.max(j,H+N.width),V=Math.min(V,U),I=Math.max(I,U+N.height)});const se=(D+j)/2,h=(V+I)/2,g=p.clientWidth/2,k=p.clientHeight/2,C=g-se,E=k-h;m.style.transform=`translate(${C}px, ${E}px)`,m.style.opacity="1",m.style.transition="opacity 0.3s ease";const S=100,P=Math.max(C,S),z=Math.max(E,S);m.style.transform=`translate(${P}px, ${z}px)`,m.style.opacity="1",m.style.visibility="visible",console.log("🎯 思维导图已居中,边距:",S,"偏移:",{x:P,y:z})}catch{}},v=()=>{if(!i.value)return;if(o.value&&o.value.getNodeById)try{const m=o.value.getNodeById(i.value.id);if(m){const w=m.getBoundingClientRect(),D=n.value.getBoundingClientRect(),j=w.left-D.left+w.width/2,V=w.bottom-D.top+10;s.value={left:`${j}px`,top:`${V}px`};return}}catch{}let p=document.querySelector(`[data-id="${i.value.id}"]`);if(p||(p=document.querySelector(`.topic[data-id="${i.value.id}"]`)),p||(p=document.querySelector(`[data-node-id="${i.value.id}"]`)),p||(p=document.querySelector(`[data-nodeid="me${i.value.id}"]`)),!p){const m=document.querySelectorAll("me-tpc");for(const w of m)if(w.getAttribute("data-nodeid")===`me${i.value.id}`){p=w;break}}if(!p){const m=document.querySelectorAll(".topic");for(const w of m)if(w.textContent.trim()===i.value.topic){p=w;break}}if(!p){const m=document.querySelectorAll("*");for(const w of m)if(w.textContent&&w.textContent.trim()===i.value.topic){if(w.tagName==="ME-TPC"){p=w;break}if(w.closest("me-tpc")){p=w;break}if(w.classList.contains("topic")||w.closest(".topic")){p=w.closest(".topic")||w;break}}}if(p){const m=p.getBoundingClientRect(),w=n.value.getBoundingClientRect(),D=m.left-w.left+m.width/2,j=m.bottom-w.top+10;s.value={left:`${D}px`,top:`${j}px`}}else s.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},M=async()=>{i.value&&(await X(i.value),i.value=null)},R=async()=>{i.value&&(await de(i.value),i.value=null)},O=async()=>{i.value&&(await pe(i.value),i.value=null)},T=async()=>{if(i.value){try{const p=i.value.topic||i.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(p),console.log("文本已复制到剪贴板:",p),F();else{const m=document.createElement("textarea");m.value=p,m.style.position="fixed",m.style.left="-999999px",m.style.top="-999999px",document.body.appendChild(m),m.focus(),m.select();const w=document.execCommand("copy");document.body.removeChild(m),w?F():W()}}catch{W()}i.value=null}},F=()=>{const p=document.createElement("div");p.textContent="文本已复制到剪贴板",p.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 m=document.createElement("style");m.textContent=`
|
||
@keyframes slideIn {
|
||
from { transform: translateX(100%); opacity: 0; }
|
||
to { transform: translateX(0); opacity: 1; }
|
||
}
|
||
`,document.head.appendChild(m),document.body.appendChild(p),setTimeout(()=>{p.parentNode&&p.parentNode.removeChild(p),m.parentNode&&m.parentNode.removeChild(m)},3e3)},W=()=>{const p=document.createElement("div");p.textContent="复制失败,请手动复制",p.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(p),setTimeout(()=>{p.parentNode&&p.parentNode.removeChild(p)},3e3)},X=async p=>{var m;try{await Ee(),console.log("添加子节点到API:",p.id),console.log("父节点信息:",{id:p.id,mindmap_id:p.mindmap_id,mindmapId:p.mindmapId});const w=r.value||p.mindmap_id||p.mindmapId;if(!w){console.error("无法获取思维导图ID");return}const D=await xe.addNodes(w,{title:"新子节点",des:"子节点描述",parentId:p.id});if(console.log("添加子节点响应:",D),D.data&&D.data.success){const j=((m=D.data.data)==null?void 0:m.nodes)||[];if(j.length>0){const V=j[0];console.log("新创建的子节点:",V),console.log("🎯 使用loadMindmapData刷新思维导图显示新节点...");try{const I=f();await new Promise(h=>setTimeout(h,800));const se=await xe.getMindmap(w);if(se.data&&se.data.nodeData)await b(se.data,!0),console.log("✅ 思维导图刷新成功"),setTimeout(async()=>{try{const h=await xe.getMindmap(w);if(h.data&&h.data.nodeData){const g=C=>{if(C.id===V.id)return C;if(C.children)for(const E of C.children){const S=g(E);if(S)return S}return null},k=g(h.data.nodeData);k&&o.value&&(console.log("找到新节点,进入编辑模式:",k),o.value.editText(k))}}catch(h){console.error("查找新节点失败:",h)}},1e3);else throw new Error("无法获取思维导图数据")}catch(I){console.error("刷新思维导图失败:",I)}}}}catch(w){console.error("添加子节点失败:",w)}},de=async p=>{var m;try{await Ee(),console.log("添加兄弟节点到API:",p.id),console.log("节点信息:",{id:p.id,parentId:p.parentId,parent:p.parent,mindmap_id:p.mindmap_id,mindmapId:p.mindmapId});const w=r.value||p.mindmap_id||p.mindmapId;if(!w){console.error("无法获取思维导图ID");return}let D=p.parentId;!D&&p.parent&&(D=p.parent.id);const j=await xe.addNodes(w,{title:"新兄弟节点",des:"兄弟节点描述",parentId:D});if(console.log("添加兄弟节点响应:",j),j.data&&j.data.success){const V=((m=j.data.data)==null?void 0:m.nodes)||[];if(V.length>0){const I=V[0];console.log("新创建的兄弟节点:",I),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const se=f(),h=await xe.getMindmap(w);if(h.data&&h.data.nodeData)await b(h.data,!0),console.log("✅ 思维导图刷新成功"),setTimeout(async()=>{try{const g=await xe.getMindmap(w);if(g.data&&g.data.nodeData){const k=E=>{if(E.id===I.id)return E;if(E.children)for(const S of E.children){const P=k(S);if(P)return P}return null},C=k(g.data.nodeData);C&&o.value&&(console.log("找到新节点,进入编辑模式:",C),o.value.editText(C))}}catch(g){console.error("查找新节点失败:",g)}},1e3);else throw new Error("无法获取思维导图数据")}catch(se){console.error("重新初始化失败,使用完整重新加载:",se);const h=await xe.getMindmap(w);h.data&&h.data.nodeData&&await b(h.data,!0)}}}}catch(w){console.error("添加兄弟节点失败:",w)}},pe=async p=>{try{await Ee(),console.log("删除节点从API:",p.id);const m=await xe.deleteNodes([p.id]);if(console.log("删除节点响应:",m),m.data&&m.data.success){const w=r.value||p.mindmap_id||p.mindmapId;if(w){const D=await xe.getMindmap(w);D.data&&D.data.nodeData&&(await b(D.data,!0),setTimeout(async()=>{try{console.log("重新加载思维导图数据...");const j=await xe.getMindmap(w);j.data&&j.data.nodeData&&(await b(j.data,!0),console.log("思维导图数据重新加载成功"))}catch(j){console.error("重新加载思维导图失败:",j)}},1500))}}}catch(m){console.error("删除节点失败:",m)}},Ee=async()=>{const p=n.value;if(p){const m=p.querySelector("input:focus");if(m&&i.value){const w=m.value;w!==i.value.topic&&w.trim()!==""&&(console.log("保存当前编辑:",w),i.value.topic=w,await ot(i.value))}}},ot=async p=>{var m,w,D,j,V;try{console.log("保存Mind Elixir编辑,节点ID:",p.id),console.log("编辑内容:",{newTitle:p.topic,newDes:((m=p.data)==null?void 0:m.des)||""});const I=String(p.id),se=await xe.updateNode(I,{newTitle:p.topic,newDes:((w=p.data)==null?void 0:w.des)||""});console.log("更新节点API响应:",se),console.log("节点编辑已保存到后端"),setTimeout(async()=>{try{console.log("重新加载思维导图数据...");const h=r.value||p.mindmapId||p.mindmap_id;if(h){const g=await xe.getMindmap(h);g.data&&g.data.nodeData&&(await b(g.data),console.log("思维导图数据重新加载成功"))}}catch(h){console.error("重新加载思维导图失败:",h)}},2e3)}catch(I){console.error("保存Mind Elixir编辑失败:",I),console.error("错误详情:",(D=I.response)==null?void 0:D.data),alert("保存编辑失败: "+(((V=(j=I.response)==null?void 0:j.data)==null?void 0:V.detail)||I.message))}},Nt=p=>{console.log("打开编辑模态框:",p),o.value.editText(p)},gt=async(p,m,w)=>{var D,j,V;try{console.log("开始创建节点:",p.topic,"父节点ID:",w);const I=await xe.addNodes(m,{title:p.topic||p.title||"无标题",des:((D=p.data)==null?void 0:D.des)||p.description||"",parentId:w});if(console.log("创建节点响应:",I),I.data&&I.data.success){const h=(V=(((j=I.data.data)==null?void 0:j.nodes)||[])[0])==null?void 0:V.id;if(console.log("当前节点ID:",h),p.children&&p.children.length>0){console.log("开始创建子节点,数量:",p.children.length);for(const g of p.children)await gt(g,m,h)}else console.log("节点没有子节点,创建完成")}else console.error("创建节点失败,响应:",I)}catch(I){console.error("创建节点失败:",I)}},bt=()=>{if(!o.value)return;console.log("绑定事件监听器..."),n.value.addEventListener("wheel",w=>{if(w.ctrlKey||w.metaKey){w.preventDefault();const D=w.deltaY>0?.9:1.1,j=Math.max(.3,Math.min(3,l.value*D));if(o.value){const V=n.value.querySelector(".map-container");V&&(V.style.transform=`scale(${j})`,l.value=j,localStorage.setItem("mindmap-zoom-level",j.toString()))}}}),o.value.bus.addListener("select",w=>{console.log("select事件触发:",w),i.value=w,setTimeout(()=>{(!s.value.left||s.value.left==="50%")&&v()},200)}),o.value.bus.addListener("selectNode",w=>{console.log("selectNode事件触发:",w),i.value=w,setTimeout(()=>{(!s.value.left||s.value.left==="50%")&&v()},200)}),o.value.bus.addListener("scale",w=>{Math.abs(w-1)<.01&&Math.abs(l.value-1)>.01&&setTimeout(()=>{ee()},50)});const p=setInterval(()=>{l.value!==1&&n.value&&Je()},100);window.zoomIntervalId=p;let m=0;n.value.addEventListener("click",w=>{const D=Date.now();if(D-m<100)return;m=D;const j=w.target,V=j.closest("me-tpc")||j.closest(".topic")||j.classList.contains("topic")||j.tagName==="ME-TPC";if(i.value&&V){const I=n.value.getBoundingClientRect(),se=w.clientX-I.left,h=w.clientY-I.top+50;s.value={left:`${se}px`,top:`${h}px`}}else V||(i.value=null)}),o.value.bus.addListener("edit",w=>{console.log("edit事件触发:",w),Nt(w)}),o.value.bus.addListener("addChild",w=>{console.log("添加子节点:",w),X(w)}),o.value.bus.addListener("addSibling",w=>{console.log("添加兄弟节点:",w),de(w)}),o.value.bus.addListener("removeNode",w=>{console.log("删除节点:",w),pe(w)})},Bt=()=>{if(o.value){const p=Math.min(l.value*1.2,3),m=n.value.querySelector(".map-container");m&&(m.style.transform=`scale(${p})`,l.value=p,localStorage.setItem("mindmap-zoom-level",p.toString()))}},Z=()=>{if(o.value){const p=Math.max(l.value/1.2,.3),m=n.value.querySelector(".map-container");m&&(m.style.transform=`scale(${p})`,l.value=p,localStorage.setItem("mindmap-zoom-level",p.toString()))}},le=()=>{if(o.value){const p=n.value.querySelector(".map-container");p&&(p.style.transform="scale(1)",l.value=1,localStorage.setItem("mindmap-zoom-level","1"))}},ee=()=>{if(o.value){const p=localStorage.getItem("mindmap-zoom-level");if(p){const m=parseFloat(p);if(m>=.3&&m<=3){const w=n.value.querySelector(".map-container");w&&(w.style.transform=`scale(${m})`,l.value=m)}}}},Je=()=>{if(o.value&&l.value!==1&&n.value){const p=n.value.querySelector(".map-container");p&&(p.style.transform=`scale(${l.value})`)}},it=async()=>{var p;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",o.value),console.log("🔍 currentMindmapId.value:",r.value),console.log("🔍 mindmapEl.value:",n.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",a.value),console.log("🔍 - 是否有思维导图容器:",!!n.value),console.log("🔍 - MindElixir实例状态:",!!o.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),o.value&&o.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",o.value.data),console.log("🔍 - 数据字段:",Object.keys(o.value.data)),console.log("🔍 - 是否有nodeData:",!!o.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!o.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!o.value||!r.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!o.value),console.warn("🔍 currentMindmapId.value 状态:",!!r.value),o.value&&o.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",o.value.data),o.value.data.id?(r.value=o.value.data.id,console.log("🔍 从MindElixir数据中获取到ID:",o.value.data.id)):o.value.data.mindmapId&&(r.value=o.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",o.value.data.mindmapId))),!r.value&&o.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(o.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(o.value))),o.value.getData){const m=o.value.getData();console.log("🔍 通过getData()获取的数据:",m),m&&m.nodeData&&(console.log("🔍 nodeData详情:",m.nodeData),m.nodeData.id?(r.value=m.nodeData.id,console.log("🔍 从nodeData.id获取到ID:",m.nodeData.id)):m.nodeData.mindmapId?(r.value=m.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",m.nodeData.mindmapId)):(console.log("🔍 nodeData中没有找到ID字段"),console.log("🔍 nodeData字段:",Object.keys(m.nodeData)))),!r.value&&m&&(console.log("🔍 检查其他可能的ID字段..."),m.id?(r.value=m.id,console.log("🔍 从data.id获取到ID:",m.id)):m.mindmapId&&(r.value=m.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",m.mindmapId)))}o.value.mindElixirData&&(console.log("🔍 mindElixirData:",o.value.mindElixirData),o.value.mindElixirData.id&&(r.value=o.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",o.value.mindElixirData.id)))}if(!r.value){console.warn("⚠️ 仍然无法获取思维导图ID,无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",r.value),console.log("🔍 MindElixir实例:",o.value);let m=null;if(o.value&&o.value.getData?(m=o.value.getData(),console.log("🔍 通过getData()获取的数据:",m)):(m=o.value.data,console.log("🔍 通过data属性获取的数据:",m)),!m){console.warn("⚠️ MindElixir数据为空");return}let w=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",m.nodeData),console.log("🔍 - currentData.nodes:",m.nodes),console.log("🔍 - currentData.nodeData.children:",(p=m.nodeData)==null?void 0:p.children);const D=I=>{I&&I.id&&(w.push(I),console.log(`🔍 收集节点: ${I.id} - ${I.topic||I.content||"无标题"}`),I.children&&I.children.length>0&&I.children.forEach(se=>D(se)))};if(m.nodeData)D(m.nodeData),console.log("🔍 从根节点收集到节点数量:",w.length);else if(m.nodes&&Array.isArray(m.nodes))m.nodes.forEach(I=>D(I)),console.log("🔍 从nodes数组收集到节点数量:",w.length);else if(Array.isArray(m))m.forEach(I=>D(I)),console.log("🔍 从currentData数组收集到节点数量:",w.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(m));return}if(w.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",w),console.log("🔍 节点数量:",w.length),console.log("🔍 节点数据类型:",Array.isArray(w)?"数组":typeof w);const j=[];if(w.forEach((I,se)=>{if(console.log(`🔍 处理节点 ${se}:`,I),I&&I.id){const h=I.topic||I.content||I.text||"",g=I.x||I.offsetX||0,k=I.y||I.offsetY||0;console.log(`🔍 节点 ${I.id} 内容:`,h,"位置:",{x:g,y:k});const C={content:h,position:{x:g,y:k}};(I.parentId||I.parent)&&(C.parentId=I.parentId||I.parent,console.log(`🔍 节点 ${I.id} 父节点:`,C.parentId)),console.log(`🔍 准备保存节点 ${I.id}:`,C),j.push(xe.updateNode(I.id,C).then(E=>{console.log(`✅ 节点 ${I.id} 保存成功:`,E)}).catch(E=>{console.error(`❌ 节点 ${I.id} 保存失败:`,E)}))}else console.warn(`⚠️ 节点 ${se} 缺少ID:`,I)}),console.log("🔍 准备保存的节点数量:",j.length),j.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const V=await Promise.all(j);console.log("🔍 保存结果:",V),console.log("🎉 思维导图保存完成!"),console.log("🔄 保存完成,开始自动刷新..."),await Ve()}catch(m){console.error("❌ 保存思维导图失败:",m)}},Ve=async()=>{if(!r.value){console.warn("⚠️ 没有当前思维导图ID,无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const p=await xe.getMindmap(r.value);p.data&&p.data.nodeData?(console.log("✅ 获取到最新数据,开始刷新显示..."),await b(p.data,!0),console.log("🎉 思维导图刷新完成!")):console.warn("⚠️ 无法获取思维导图数据")}catch(p){console.error("❌ 刷新思维导图失败:",p)}},De=async(p,m)=>{try{const w=await xe.createMindmap(m||"预览思维导图",p);if(console.log("🔄 创建思维导图响应:",w),w.data&&w.data.id){const D=w.data.id;if(console.log("🎉 创建思维导图成功,新思维导图的ID是:",D),console.log("📊 响应数据详情:",w.data),w.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),r.value=D,u(),await b(w.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:D,title:m,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const j=await xe.getMindmap(D);j.data&&j.data.nodeData&&(await b(j.data),console.log("✅ 思维导图数据重新加载成功"))}catch(j){console.error("❌ 重新加载思维导图失败:",j)}},1500);else{console.log("🔧 需要递归创建节点"),await gt(p,D,null),console.log("📥 开始加载新创建的思维导图,ID:",D);const j=await xe.getMindmap(D);console.log("🔄 加载思维导图响应:",j),j.data&&j.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),r.value=D,u(),await b(j.data),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:D,title:m,timestamp:Date.now()}})),setTimeout(async()=>{try{console.log("🔄 重新加载思维导图数据...");const V=await xe.getMindmap(D);V.data&&V.data.nodeData&&(await b(V.data),console.log("✅ 思维导图数据重新加载成功"))}catch(V){console.error("❌ 重新加载思维导图失败:",V)}},1500)):console.error("❌ 获取思维导图数据失败:",j)}}}catch(w){console.error("❌ 保存预览数据到数据库失败:",w)}},A=async p=>{try{if(console.log("📚 开始从历史记录加载思维导图:",p.title),u(),p.mindmapId){console.log("🎯 使用思维导图ID加载:",p.mindmapId);const m=await xe.getMindmap(p.mindmapId);if(m.data&&m.data.nodeData)await b(m.data);else throw new Error("无法获取思维导图数据")}else if(p.json)console.log("📊 使用历史记录中的JSON数据"),await b(p.json);else if(p.markdown){console.log("📝 使用历史记录中的Markdown数据,尝试转换为JSON");try{const m=await convertMarkdownToJSON(p.markdown);if(m)await b(m);else throw new Error("Markdown转换失败")}catch(m){console.error("Markdown转换失败:",m)}}}catch(m){console.error("❌ 从历史记录加载思维导图失败:",m)}};ts(async()=>{window.addEventListener("save-preview-to-database",p=>{console.log("🎯 收到保存到数据库事件:",p.detail),console.log("📋 事件详情 - 标题:",p.detail.title,"来源:",p.detail.source,"时间戳:",new Date(p.detail.timestamp).toLocaleString()),De(p.detail.data,p.detail.title)}),window.addEventListener("loadMindmapFromHistory",p=>{console.log("📚 收到从历史记录加载思维导图事件:",p.detail),console.log("🔍 事件数据详情:",p.detail),A(p.detail)}),window.addEventListener("ai-sidebar-toggle",p=>{console.log("🤖 AI侧边栏折叠状态变化:",p.detail.isCollapsed),d.value=p.detail.isCollapsed}),c()});const L=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null)};return ns(()=>{L()}),t({cleanupIntervals:L}),(p,m)=>(be(),ye("div",h0,[$("div",{class:Gt(["zoom-controls",{"welcome-mode":a.value}])},[$("button",{onClick:Bt,class:"zoom-btn",title:"放大"},[...m[0]||(m[0]=[ci('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-0a362741><circle cx="11" cy="11" r="8" data-v-0a362741></circle><path d="m21 21-4.35-4.35" data-v-0a362741></path><path d="M11 8v6" data-v-0a362741></path><path d="M8 11h6" data-v-0a362741></path></svg>',1)])]),$("button",{onClick:Z,class:"zoom-btn",title:"缩小"},[...m[1]||(m[1]=[$("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[$("circle",{cx:"11",cy:"11",r:"8"}),$("path",{d:"m21 21-4.35-4.35"}),$("path",{d:"M8 11h6"})],-1)])]),$("button",{onClick:le,class:"zoom-btn",title:"重置缩放"},[...m[2]||(m[2]=[ci('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-0a362741><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-0a362741></path><path d="M21 3v5h-5" data-v-0a362741></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-0a362741></path><path d="M3 21v-5h5" data-v-0a362741></path></svg>',1)])]),$("span",p0,vt(Math.round(l.value*100))+"%",1)],2),a.value?(be(),ye("div",m0,[$("div",{class:Gt(["welcome-content",{"ai-sidebar-collapsed":d.value}])},[...m[3]||(m[3]=[ci('<div class="welcome-header" data-v-0a362741><h1 data-v-0a362741>🧠 思维导图工具</h1><p class="welcome-subtitle" data-v-0a362741>可视化您的想法,构建知识体系</p></div><div class="welcome-features" data-v-0a362741><div class="feature-item" data-v-0a362741><div class="feature-icon" data-v-0a362741>🎯</div><div class="feature-text" data-v-0a362741><h3 data-v-0a362741>智能AI生成</h3><p data-v-0a362741>上传文档,AI自动生成思维导图结构</p></div></div><div class="feature-item" data-v-0a362741><div class="feature-icon" data-v-0a362741>✏️</div><div class="feature-text" data-v-0a362741><h3 data-v-0a362741>灵活编辑</h3><p data-v-0a362741>拖拽节点,自由调整思维导图布局</p></div></div><div class="feature-item" data-v-0a362741><div class="feature-icon" data-v-0a362741>💾</div><div class="feature-text" data-v-0a362741><h3 data-v-0a362741>云端存储</h3><p data-v-0a362741>自动保存,多设备同步访问</p></div></div></div><div class="welcome-tips" data-v-0a362741><p data-v-0a362741>💡 提示:使用左侧AI侧边栏可以快速生成思维导图内容</p></div>',3)])],2)])):(be(),ye("div",{key:1,ref_key:"mindmapEl",ref:n,class:"mindmap-el"},null,512)),a.value?Rt("",!0):(be(),ye("div",g0,[$("button",{onClick:it,class:"save-btn",title:"保存思维导图"},[...m[4]||(m[4]=[$("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[$("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),$("polyline",{points:"17,21 17,13 7,13 7,21"}),$("polyline",{points:"7,3 7,8 15,8"})],-1),$("span",null,"保存",-1)])]),$("button",{onClick:Ve,class:"refresh-btn",title:"刷新思维导图"},[...m[5]||(m[5]=[$("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[$("path",{d:"M1 4v6h6"}),$("path",{d:"M23 20v-6h-6"}),$("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"})],-1),$("span",null,"刷新",-1)])])])),i.value?(be(),ye("div",{key:3,class:"context-menu",style:qn(s.value)},[i.value.parentId||i.value.parent?(be(),ye("div",{key:0,class:"context-menu-item",onClick:R,title:"Add a sibling card"},[...m[6]||(m[6]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[$("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.9001 4.5C9.9001 5.74264 8.89274 6.75 7.6501 6.75C6.64263 6.75 5.78981 6.08785 5.5031 5.175H2.7001V11.025H5.4001V9.9C5.4001 8.90589 6.11644 8.1 7.0001 8.1H15.0501C15.9338 8.1 16.6501 8.90589 16.6501 9.9V13.95C16.6501 14.9441 15.9338 15.75 15.0501 15.75H7.0001C6.11644 15.75 5.4001 14.9441 5.4001 13.95V12.375H2.2501C1.75304 12.375 1.3501 11.7471 1.3501 11.475V4.725C1.3501 4.22794 1.75304 3.825 2.2501 3.825H5.5031C5.78981 2.91215 6.64263 2.25 7.6501 2.25C8.89274 2.25 9.9001 3.25736 9.9001 4.5ZM15.0501 9.9H7.0001V13.95H15.0501V9.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])])):Rt("",!0),$("div",{class:"context-menu-item",onClick:M,title:"Add a child card"},[...m[7]||(m[7]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[$("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9501 6.63691H8.35014V11.3619H15.9501V6.63691ZM8.35014 4.83691C7.46649 4.83691 6.75014 5.6428 6.75014 6.63691V8.32441H4.84719C4.56048 7.41157 3.70766 6.74941 2.7002 6.74941C1.45755 6.74941 0.450195 7.75677 0.450195 8.99941C0.450195 10.2421 1.45755 11.2494 2.7002 11.2494C3.70766 11.2494 4.56048 10.5873 4.84719 9.67441H6.75014V11.3619C6.75014 12.356 7.46649 13.1619 8.35014 13.1619H15.9501C16.8338 13.1619 17.5501 12.356 17.5501 11.3619V6.63691C17.5501 5.6428 16.8338 4.83691 15.9501 4.83691H8.35014Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),$("div",{class:"context-menu-item",onClick:T,title:"Copy text"},[...m[8]||(m[8]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[$("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.4503 2.99952C16.4016 2.18908 15.7289 1.54688 14.9062 1.54688H6.46875L6.37452 1.5497C5.56408 1.5984 4.92188 2.27108 4.92188 3.09375V3.54688C4.92188 3.68495 5.0338 3.79688 5.17188 3.79688H6.35938C6.49745 3.79688 6.60938 3.68495 6.60938 3.54688V3.375L6.61309 3.34276C6.62766 3.28063 6.68343 3.23438 6.75 3.23438H14.625L14.6572 3.23809C14.7261 3.23438 14.7656 3.30029 14.7656 3.375V11.25L14.7619 11.2822C14.7473 11.3444 14.6916 11.3906 14.625 11.3906H14.4531C14.3151 11.3906 14.2031 11.5026 14.2031 11.6406V12.8281C14.2031 12.9662 14.3151 13.0781 14.4531 13.0781H14.9062L15.0005 13.0753C15.8109 13.0266 16.4531 12.3539 16.4531 11.5312V3.09375L16.4503 2.99952ZM11.5312 4.92188H3.09375C2.23943 4.92188 1.54688 5.61443 1.54688 6.46875V14.9062C1.54688 15.7606 2.23943 16.4531 3.09375 16.4531H11.5312C12.3856 16.4531 13.0781 15.7606 13.0781 14.9062V6.46875C13.0781 5.61443 12.3856 4.92188 11.5312 4.92188ZM3.37032 6.615H11.2635C11.3361 6.615 11.395 6.6739 11.395 6.74655V14.6397C11.395 14.7124 11.3361 14.7712 11.2635 14.7712H3.37032C3.29767 14.7712 3.23877 14.7124 3.23877 14.6397V6.74655C3.23877 6.6739 3.29767 6.615 3.37032 6.615ZM4.5 8.5C4.5 8.27909 4.67909 8.1 4.9 8.1H9.725C9.94591 8.1 10.125 8.27909 10.125 8.5V9.5C10.125 9.72091 9.94591 9.9 9.725 9.9H4.9C4.67909 9.9 4.5 9.72091 4.5 9.5V8.5ZM4.9 11.475C4.67909 11.475 4.5 11.6541 4.5 11.875V12.875C4.5 13.0959 4.67909 13.275 4.9 13.275H9.725C9.94591 13.275 10.125 13.0959 10.125 12.875V11.875C10.125 11.6541 9.94591 11.475 9.725 11.475H4.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),$("div",{class:"context-menu-item delete",onClick:O,title:"Delete"},[...m[9]||(m[9]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[$("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z",fill:"currentColor"}),$("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z",fill:"currentColor"})],-1)])])],4)):Rt("",!0)]))}},y0=Ta(b0,[["__scopeId","data-v-0a362741"]]),v0="modulepreload",x0=function(e){return"/"+e},Nr={},Tr=function(t,n,o){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=x0(s),s in Nr)return;Nr[s]=!0;const r=s.endsWith(".css"),l=r?'[rel="stylesheet"]':"";if(!!o)for(let c=i.length-1;c>=0;c--){const u=i[c];if(u.href===s&&(!r||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const d=document.createElement("link");if(d.rel=r?"stylesheet":v0,r||(d.as="script",d.crossOrigin=""),d.href=s,document.head.appendChild(d),r)return new Promise((c,u)=>{d.addEventListener("load",c),d.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=s,window.dispatchEvent(r),!r.defaultPrevented)throw s})};function ps(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tn=ps();function Aa(e){tn=e}var Pn={exec:()=>null};function oe(e,t=""){let n=typeof e=="string"?e:e.source,o={replace:(i,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(Ie.caret,"$1"),n=n.replace(i,r),o},getRegex:()=>new RegExp(n,t)};return o}var Ie={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},w0=/^(?:[ \t]*(?:\n|$))+/,k0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,E0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ms=/(?:[*+-]|\d{1,9}[.)])/,La=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$a=oe(La).replace(/bull/g,ms).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),C0=oe(La).replace(/bull/g,ms).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),gs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,S0=/^[^\n]+/,bs=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,M0=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),N0=oe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ms).getRegex(),Qo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ys=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,T0=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ys).replace("tag",Qo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ra=oe(gs).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex(),A0=oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ra).getRegex(),vs={blockquote:A0,code:k0,def:M0,fences:_0,heading:E0,hr:Qn,html:T0,lheading:$a,list:N0,newline:w0,paragraph:Ra,table:Pn,text:S0},Ar=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex(),L0={...vs,lheading:C0,table:Ar,paragraph:oe(gs).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ar).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qo).getRegex()},$0={...vs,html:oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ys).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Pn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(gs).replace("hr",Qn).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",$a).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,O0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Oa=/^( {2,}|\\)\n(?!\s*$)/,I0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ei=/[\p{P}\p{S}]/u,xs=/[\s\p{P}\p{S}]/u,Ia=/[^\s\p{P}\p{S}]/u,D0=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xs).getRegex(),Da=/(?!~)[\p{P}\p{S}]/u,P0=/(?!~)[\s\p{P}\p{S}]/u,j0=/(?:[^\s\p{P}\p{S}]|~)/u,z0=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Pa=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,B0=oe(Pa,"u").replace(/punct/g,ei).getRegex(),H0=oe(Pa,"u").replace(/punct/g,Da).getRegex(),ja="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F0=oe(ja,"gu").replace(/notPunctSpace/g,Ia).replace(/punctSpace/g,xs).replace(/punct/g,ei).getRegex(),U0=oe(ja,"gu").replace(/notPunctSpace/g,j0).replace(/punctSpace/g,P0).replace(/punct/g,Da).getRegex(),q0=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ia).replace(/punctSpace/g,xs).replace(/punct/g,ei).getRegex(),V0=oe(/\\(punct)/,"gu").replace(/punct/g,ei).getRegex(),W0=oe(/^<(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(),Y0=oe(ys).replace("(?:-->|$)","-->").getRegex(),K0=oe("^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",Y0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Lo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,J0=oe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Lo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),za=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",Lo).replace("ref",bs).getRegex(),Ba=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",bs).getRegex(),Z0=oe("reflink|nolink(?!\\()","g").replace("reflink",za).replace("nolink",Ba).getRegex(),ws={_backpedal:Pn,anyPunctuation:V0,autolink:W0,blockSkip:z0,br:Oa,code:O0,del:Pn,emStrongLDelim:B0,emStrongRDelimAst:F0,emStrongRDelimUnd:q0,escape:R0,link:J0,nolink:Ba,punctuation:D0,reflink:za,reflinkSearch:Z0,tag:K0,text:I0,url:Pn},G0={...ws,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",Lo).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Lo).getRegex()},ji={...ws,emStrongRDelimAst:U0,emStrongLDelim:H0,url:oe(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},X0={...ji,br:oe(Oa).replace("{2,}","*").getRegex(),text:oe(ji.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},so={normal:vs,gfm:L0,pedantic:$0},Cn={normal:ws,gfm:ji,breaks:X0,pedantic:G0},Q0={"&":"&","<":"<",">":">",'"':""","'":"'"},Lr=e=>Q0[e];function ct(e,t){if(t){if(Ie.escapeTest.test(e))return e.replace(Ie.escapeReplace,Lr)}else if(Ie.escapeTestNoEncode.test(e))return e.replace(Ie.escapeReplaceNoEncode,Lr);return e}function $r(e){try{e=encodeURI(e).replace(Ie.percentDecode,"%")}catch{return null}return e}function Rr(e,t){var s;let n=e.replace(Ie.findPipe,(r,l,a)=>{let d=!1,c=l;for(;--c>=0&&a[c]==="\\";)d=!d;return d?"|":" |"}),o=n.split(Ie.splitPipe),i=0;if(o[0].trim()||o.shift(),o.length>0&&!((s=o.at(-1))!=null&&s.trim())&&o.pop(),t)if(o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(Ie.slashPipe,"|");return o}function Sn(e,t,n){let o=e.length;if(o===0)return"";let i=0;for(;i<o;){let s=e.charAt(o-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return e.slice(0,o-i)}function em(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let o=0;o<e.length;o++)if(e[o]==="\\")o++;else if(e[o]===t[0])n++;else if(e[o]===t[1]&&(n--,n<0))return o;return n>0?-2:-1}function Or(e,t,n,o,i){let s=t.href,r=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");o.state.inLink=!0;let a={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:r,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,a}function tm(e,t,n){let o=e.match(n.other.indentCodeCompensation);if(o===null)return t;let i=o[1];return t.split(`
|
||
`).map(s=>{let r=s.match(n.other.beginningSpace);if(r===null)return s;let[l]=r;return l.length>=i.length?s.slice(i.length):s}).join(`
|
||
`)}var $o=class{constructor(e){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=e||tn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Sn(n,`
|
||
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],o=tm(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:o}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let o=Sn(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(n=o.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Sn(t[0],`
|
||
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Sn(t[0],`
|
||
`).split(`
|
||
`),o="",i="",s=[];for(;n.length>0;){let r=!1,l=[],a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))l.push(n[a]),r=!0;else if(!r)l.push(n[a]);else break;n=n.slice(a);let d=l.join(`
|
||
`),c=d.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
|
||
${d}`:d,i=i?`${i}
|
||
${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=u,n.length===0)break;let f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let y=f,b=y.raw+`
|
||
`+n.join(`
|
||
`),x=this.blockquote(b);s[s.length-1]=x,o=o.substring(0,o.length-y.raw.length)+x.raw,i=i.substring(0,i.length-y.text.length)+x.text;break}else if((f==null?void 0:f.type)==="list"){let y=f,b=y.raw+`
|
||
`+n.join(`
|
||
`),x=this.list(b);s[s.length-1]=x,o=o.substring(0,o.length-f.raw.length)+x.raw,i=i.substring(0,i.length-y.raw.length)+x.raw,n=b.substring(s.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:o,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),o=n.length>1,i={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");let s=this.rules.other.listItemRegex(n),r=!1;for(;e;){let a=!1,d="",c="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let u=t[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),f=e.split(`
|
||
`,1)[0],y=!u.trim(),b=0;if(this.options.pedantic?(b=2,c=u.trimStart()):y?b=t[1].length+1:(b=t[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,c=u.slice(b),b+=t[1].length),y&&this.rules.other.blankLine.test(f)&&(d+=f+`
|
||
`,e=e.substring(f.length+1),a=!0),!a){let M=this.rules.other.nextBulletRegex(b),R=this.rules.other.hrRegex(b),O=this.rules.other.fencesBeginRegex(b),T=this.rules.other.headingBeginRegex(b),F=this.rules.other.htmlBeginRegex(b);for(;e;){let W=e.split(`
|
||
`,1)[0],X;if(f=W,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),X=f):X=f.replace(this.rules.other.tabCharGlobal," "),O.test(f)||T.test(f)||F.test(f)||M.test(f)||R.test(f))break;if(X.search(this.rules.other.nonSpaceChar)>=b||!f.trim())c+=`
|
||
`+X.slice(b);else{if(y||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||O.test(u)||T.test(u)||R.test(u))break;c+=`
|
||
`+f}!y&&!f.trim()&&(y=!0),d+=W+`
|
||
`,e=e.substring(W.length+1),u=X.slice(b)}}i.loose||(r?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(r=!0));let x=null,v;this.options.gfm&&(x=this.rules.other.listIsTask.exec(c),x&&(v=x[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:d,task:!!x,checked:v,loose:!1,text:c,tokens:[]}),i.raw+=d}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let a=0;a<i.items.length;a++)if(this.lexer.state.top=!1,i.items[a].tokens=this.lexer.blockTokens(i.items[a].text,[]),!i.loose){let d=i.items[a].tokens.filter(u=>u.type==="space"),c=d.length>0&&d.some(u=>this.rules.other.anyLine.test(u.raw));i.loose=c}if(i.loose)for(let a=0;a<i.items.length;a++)i.items[a].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:o,title:i}}}table(e){var r;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Rr(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(r=t[3])!=null&&r.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<n.length;l++)s.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:s.align[l]});for(let l of i)s.rows.push(Rr(l,s.header.length).map((a,d)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[d]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
||
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Sn(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=em(t[2],"()");if(s===-2)return;if(s>-1){let r=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let o=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(o);s&&(o=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),Or(t,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[o.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Or(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...o[0]].length-1,s,r,l=i,a=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(o=d.exec(t))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(r=[...s].length,o[3]||o[4]){l+=r;continue}else if((o[5]||o[6])&&i%3&&!((i+r)%3)){a+=r;continue}if(l-=r,l>0)continue;r=Math.min(r,r+l+a);let c=[...o[0]][0].length,u=e.slice(0,i+o.index+c+r);if(Math.min(i,r)%2){let y=u.slice(1,-1);return{type:"em",raw:u,text:y,tokens:this.lexer.inlineTokens(y)}}let f=u.slice(2,-2);return{type:"strong",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,o;return t[2]==="@"?(n=t[1],o="mailto:"+n):(n=t[1],o=n),{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let o,i;if(t[2]==="@")o=t[0],i="mailto:"+o;else{let s;do s=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(s!==t[0]);o=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},_t=class zi{constructor(t){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"tokenizer");ae(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||tn,this.options.tokenizer=this.options.tokenizer||new $o,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ie,block:so.normal,inline:Cn.normal};this.options.pedantic?(n.block=so.pedantic,n.inline=Cn.pedantic):this.options.gfm&&(n.block=so.gfm,this.options.breaks?n.inline=Cn.breaks:n.inline=Cn.gfm),this.tokenizer.rules=n}static get rules(){return{block:so,inline:Cn}}static lex(t,n){return new zi(n).lex(t)}static lexInline(t,n){return new zi(n).inlineTokens(t)}lex(t){t=t.replace(Ie.carriageReturn,`
|
||
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let o=this.inlineQueue[n];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],o=!1){var i,s,r;for(this.options.pedantic&&(t=t.replace(Ie.tabCharGlobal," ").replace(Ie.spaceLine,""));t;){let l;if((s=(i=this.options.extensions)==null?void 0:i.block)!=null&&s.some(d=>(l=d.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let d=n.at(-1);l.raw.length===1&&d!==void 0?d.raw+=`
|
||
`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
||
`)?"":`
|
||
`)+l.raw,d.text+=`
|
||
`+l.text,this.inlineQueue.at(-1).src=d.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
||
`)?"":`
|
||
`)+l.raw,d.text+=`
|
||
`+l.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},n.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let a=t;if((r=this.options.extensions)!=null&&r.startBlock){let d=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},c),typeof u=="number"&&u>=0&&(d=Math.min(d,u))}),d<1/0&&d>=0&&(a=t.substring(0,d+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){let d=n.at(-1);o&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
|
||
`)?"":`
|
||
`)+l.raw,d.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(l),o=a.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
|
||
`)?"":`
|
||
`)+l.raw,d.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):n.push(l);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,a,d;let o=t,i=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)c.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,i.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,r="";for(;t;){s||(r=""),s=!1;let c;if((a=(l=this.options.extensions)==null?void 0:l.inline)!=null&&a.some(f=>(c=f.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let f=n.at(-1);c.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(t,o,r)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),n.push(c);continue}let u=t;if((d=this.options.extensions)!=null&&d.startInline){let f=1/0,y=t.slice(1),b;this.options.extensions.startInline.forEach(x=>{b=x.call({lexer:this},y),typeof b=="number"&&b>=0&&(f=Math.min(f,b))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(c=this.tokenizer.inlineText(u)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(r=c.raw.slice(-1)),s=!0;let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):n.push(c);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},Ro=class{constructor(e){ae(this,"options");ae(this,"parser");this.options=e||tn}space(e){return""}code({text:e,lang:t,escaped:n}){var s;let o=(s=(t||"").match(Ie.notSpaceStart))==null?void 0:s[0],i=e.replace(Ie.endingNewline,"")+`
|
||
`;return o?'<pre><code class="language-'+ct(o)+'">'+(n?i:ct(i,!0))+`</code></pre>
|
||
`:"<pre><code>"+(n?i:ct(i,!0))+`</code></pre>
|
||
`}blockquote({tokens:e}){return`<blockquote>
|
||
${this.parser.parse(e)}</blockquote>
|
||
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
||
`}hr(e){return`<hr>
|
||
`}list(e){let t=e.ordered,n=e.start,o="";for(let r=0;r<e.items.length;r++){let l=e.items[r];o+=this.listitem(l)}let i=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
|
||
`+o+"</"+i+`>
|
||
`}listitem(e){var n;let t="";if(e.task){let o=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=o+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=o+" "+ct(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):t+=o+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
||
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
||
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let o="";for(let i=0;i<e.rows.length;i++){let s=e.rows[i];n="";for(let r=0;r<s.length;r++)n+=this.tablecell(s[r]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
|
||
<thead>
|
||
`+t+`</thead>
|
||
`+o+`</table>
|
||
`}tablerow({text:e}){return`<tr>
|
||
${e}</tr>
|
||
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ct(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let o=this.parser.parseInline(n),i=$r(e);if(i===null)return o;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+ct(t)+'"'),s+=">"+o+"</a>",s}image({href:e,title:t,text:n,tokens:o}){o&&(n=this.parser.parseInline(o,this.parser.textRenderer));let i=$r(e);if(i===null)return ct(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${ct(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ct(e.text)}},ks=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""}},Et=class Bi{constructor(t){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=t||tn,this.options.renderer=this.options.renderer||new Ro,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ks}static parse(t,n){return new Bi(n).parse(t)}static parseInline(t,n){return new Bi(n).parseInline(t)}parse(t,n=!0){var i,s;let o="";for(let r=0;r<t.length;r++){let l=t[r];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[l.type]){let d=l,c=this.options.extensions.renderers[d.type].call({parser:this},d);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){o+=c||"";continue}}let a=l;switch(a.type){case"space":{o+=this.renderer.space(a);continue}case"hr":{o+=this.renderer.hr(a);continue}case"heading":{o+=this.renderer.heading(a);continue}case"code":{o+=this.renderer.code(a);continue}case"table":{o+=this.renderer.table(a);continue}case"blockquote":{o+=this.renderer.blockquote(a);continue}case"list":{o+=this.renderer.list(a);continue}case"html":{o+=this.renderer.html(a);continue}case"def":{o+=this.renderer.def(a);continue}case"paragraph":{o+=this.renderer.paragraph(a);continue}case"text":{let d=a,c=this.renderer.text(d);for(;r+1<t.length&&t[r+1].type==="text";)d=t[++r],c+=`
|
||
`+this.renderer.text(d);n?o+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):o+=c;continue}default:{let d='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return o}parseInline(t,n=this.renderer){var i,s;let o="";for(let r=0;r<t.length;r++){let l=t[r];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[l.type]){let d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){o+=d||"";continue}}let a=l;switch(a.type){case"escape":{o+=n.text(a);break}case"html":{o+=n.html(a);break}case"link":{o+=n.link(a);break}case"image":{o+=n.image(a);break}case"strong":{o+=n.strong(a);break}case"em":{o+=n.em(a);break}case"codespan":{o+=n.codespan(a);break}case"br":{o+=n.br(a);break}case"del":{o+=n.del(a);break}case"text":{o+=n.text(a);break}default:{let d='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return o}},bi,go=(bi=class{constructor(e){ae(this,"options");ae(this,"block");this.options=e||tn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?_t.lex:_t.lexInline}provideParser(){return this.block?Et.parse:Et.parseInline}},ae(bi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),bi),nm=class{constructor(...e){ae(this,"defaults",ps());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",Et);ae(this,"Renderer",Ro);ae(this,"TextRenderer",ks);ae(this,"Lexer",_t);ae(this,"Tokenizer",$o);ae(this,"Hooks",go);this.use(...e)}walkTokens(e,t){var o,i;let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{let r=s;for(let l of r.header)n=n.concat(this.walkTokens(l.tokens,t));for(let l of r.rows)for(let a of l)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=s;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[r.type]?this.defaults.extensions.childTokens[r.type].forEach(l=>{let a=r[l].flat(1/0);n=n.concat(this.walkTokens(a,t))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...r){let l=i.renderer.apply(this,r);return l===!1&&(l=s.apply(this,r)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),o.extensions=t),n.renderer){let i=this.defaults.renderer||new Ro(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let r=s,l=n.renderer[r],a=i[r];i[r]=(...d)=>{let c=l.apply(i,d);return c===!1&&(c=a.apply(i,d)),c||""}}o.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new $o(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let r=s,l=n.tokenizer[r],a=i[r];i[r]=(...d)=>{let c=l.apply(i,d);return c===!1&&(c=a.apply(i,d)),c}}o.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new go;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let r=s,l=n.hooks[r],a=i[r];go.passThroughHooks.has(s)?i[r]=d=>{if(this.defaults.async)return Promise.resolve(l.call(i,d)).then(u=>a.call(i,u));let c=l.call(i,d);return a.call(i,c)}:i[r]=(...d)=>{let c=l.apply(i,d);return c===!1&&(c=a.apply(i,d)),c}}o.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;o.walkTokens=function(r){let l=[];return l.push(s.call(this,r)),i&&(l=l.concat(i.call(this,r))),l}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _t.lex(e,t??this.defaults)}parser(e,t){return Et.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let o={...n},i={...this.defaults,...o},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&o.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let r=i.hooks?i.hooks.provideLexer():e?_t.lex:_t.lexInline,l=i.hooks?i.hooks.provideParser():e?Et.parse:Et.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(a=>r(a,i)).then(a=>i.hooks?i.hooks.processAllTokens(a):a).then(a=>i.walkTokens?Promise.all(this.walkTokens(a,i.walkTokens)).then(()=>a):a).then(a=>l(a,i)).then(a=>i.hooks?i.hooks.postprocess(a):a).catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let a=r(t,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let d=l(a,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(a){return s(a)}}}onError(e,t){return n=>{if(n.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,e){let o="<p>An error occurred:</p><pre>"+ct(n.message+"",!0)+"</pre>";return t?Promise.resolve(o):o}if(t)return Promise.reject(n);throw n}}},Qt=new nm;function re(e,t){return Qt.parse(e,t)}re.options=re.setOptions=function(e){return Qt.setOptions(e),re.defaults=Qt.defaults,Aa(re.defaults),re};re.getDefaults=ps;re.defaults=tn;re.use=function(...e){return Qt.use(...e),re.defaults=Qt.defaults,Aa(re.defaults),re};re.walkTokens=function(e,t){return Qt.walkTokens(e,t)};re.parseInline=Qt.parseInline;re.Parser=Et;re.parser=Et.parse;re.Renderer=Ro;re.TextRenderer=ks;re.Lexer=_t;re.lexer=_t.lex;re.Tokenizer=$o;re.Hooks=go;re.parse=re;re.options;re.setOptions;re.use;re.walkTokens;re.parseInline;Et.parse;_t.lex;const om={class:"ai-sidebar-wrapper"},im=["title"],sm={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},rm={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},lm={class:"sidebar-content"},am={class:"section"},cm={class:"input-group"},dm={key:0,class:"file-info"},um={class:"file-details"},fm={class:"file-info-left"},hm={class:"file-name"},pm={class:"file-size"},mm={class:"button-group file-action-buttons"},gm=["disabled"],bm={key:0},ym={key:1},vm={key:0,class:"section"},xm={class:"input-group"},wm={class:"button-group"},km=["disabled"],_m={key:0},Em={key:1},Cm={key:1,class:"section",style:{display:"none"}},Sm={key:0,class:"processing-status"},Mm={class:"result-container"},Nm={class:"json-result"},Tm={class:"button-group"},Am=["disabled"],Lm={key:2,class:"section"},$m={class:"history-list"},Rm=["onClick"],Om={class:"history-title"},Im={class:"history-time"},Dm={__name:"AISidebar",setup(e){const t=he(!1),n=he(""),o=he(""),i=he(""),s=he(!1),r=he(!1),l=he([]),a=he(!1);he(""),he("");const d=he(!1),c=he(""),u=he(null),f=he(null),y=()=>{t.value=!t.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:t.value}}))},b=A=>{const L=A.target.files[0];L&&(f.value=L,Z("文件上传成功!","success"))},x=A=>{A.preventDefault(),a.value=!1;const L=A.dataTransfer.files;if(L.length>0){const p=L[0],m=[".txt",".md",".doc",".docx",".pdf"],w="."+p.name.split(".").pop().toLowerCase();m.includes(w)?(f.value=p,Z("文件拖拽上传成功!","success")):Z("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},v=A=>{A.preventDefault(),a.value=!0},M=A=>{A.preventDefault(),a.value=!1},R=()=>{f.value=null,u.value&&(u.value.value="")},O=A=>{if(A===0)return"0 Bytes";const L=1024,p=["Bytes","KB","MB","GB"],m=Math.floor(Math.log(A)/Math.log(L));return parseFloat((A/Math.pow(L,m)).toFixed(2))+" "+p[m]},T=async()=>{if(!f.value){Z("请先上传文件","error");return}s.value=!0;try{const A=await F(f.value);console.log("📄 文件内容预览:",A.substring(0,200)+"...");const L="你是一个专业的文档分析专家。请分析上传的文档内容,生成结构化的Markdown格式思维导图。要求:1. 提取主要主题和关键概念 2. 组织成层次分明的结构 3. 使用清晰的标题和子标题 4. 保持内容的逻辑性和完整性",p=`请分析以下文档内容并生成结构化Markdown:
|
||
|
||
${A}`;console.log("🤖 系统提示词:",L),console.log("👤 用户提示词预览:",p.substring(0,200)+"...");const m=await de(L,p);o.value=m,console.log("📝 生成Markdown成功!内容长度:",m.length,"字符"),await Ee(),Z("AI生成Markdown成功!正在自动保存...","success"),setTimeout(async()=>{try{await Bt()}catch(w){console.error("自动保存失败:",w),Z("自动保存失败,请手动点击预览按钮","error")}},1500)}catch(A){console.error("从文件生成Markdown失败:",A),Z("生成失败: "+A.message,"error")}finally{s.value=!1}},F=A=>new Promise(async(L,p)=>{try{const m=A.type.includes("text")||A.name.endsWith(".txt")||A.name.endsWith(".md"),w=A.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||A.type==="application/msword"||A.name.endsWith(".docx")||A.name.endsWith(".doc"),D=A.type==="application/pdf"||A.name.endsWith(".pdf");if(m){const j=new FileReader;j.onload=V=>L(V.target.result),j.onerror=()=>p(new Error("文本文件读取失败")),j.readAsText(A)}else if(w){const j=await W(A);L(j)}else if(D){const j=await X(A);L(j)}else{const j=new FileReader;j.onload=V=>L(V.target.result),j.onerror=()=>p(new Error("文件读取失败")),j.readAsText(A)}}catch(m){p(m)}}),W=async A=>{try{if(A.name.endsWith(".docx")){const L=await Tr(()=>import("./index-32a026a7.js").then(w=>w.i),[]),p=await A.arrayBuffer();return(await L.extractRawText({arrayBuffer:p})).value}else if(A.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式,或安装相应的解析库")}catch(L){throw new Error(`Office文档解析失败: ${L.message}`)}},X=async A=>{try{const L=await Tr(()=>import("./pdf-1d729f32.js"),[]);L.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const p=await A.arrayBuffer(),m=await L.getDocument({data:p}).promise;let w="";for(let D=1;D<=m.numPages;D++){const I=(await(await m.getPage(D)).getTextContent()).items.map(se=>se.str).join(" ");w+=I+`
|
||
`}return w}catch(L){throw new Error(`PDF文件解析失败: ${L.message}`)}},de=async(A,L)=>{const m=A||`你是一位Markdown格式转换专家。你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式。请遵循以下步骤:
|
||
|
||
提取主标题: 识别文章最顶层的主标题(通常为文章题目或书名),并使用Markdown的 # 级别表示。
|
||
|
||
识别层级标题: 从文章内容中提取所有层级的内容标题(从主标题后的第一个标题开始,Level 1 至 Level 4)。判断层级依据:
|
||
|
||
视觉与结构特征: 如独立成行/段、位置(行首)、格式(加粗、编号如 1., 1.1, (1), - 等)。
|
||
|
||
语义逻辑: 标题之间的包含和并列关系。
|
||
|
||
在Markdown中,使用相应标题级别:
|
||
|
||
Level 1 标题用 ##
|
||
|
||
Level 2 标题用 ###
|
||
|
||
Level 3 标题用 ####
|
||
|
||
Level 4 标题用 #####
|
||
|
||
精确保留原文标题文字,不得修改、概括或润色。
|
||
|
||
处理正文内容: 对于每个标题下的正文内容区块(从该标题后开始,直到下一个同级或更高级别标题前):
|
||
|
||
直接保留原文文本,但根据内容结构适当格式化为Markdown。
|
||
|
||
如果内容是列表(如项目符号或编号列表),使用Markdown列表语法(例如 - 用于无序列表,1. 用于有序列表)。
|
||
|
||
保持段落和换行不变。
|
||
|
||
输出格式: 输出必须是纯Markdown格式的文本,不得包含任何额外说明、JSON或非Markdown元素。确保输出与示例风格一致。`,w=L||"请将以下内容转换为结构化的Markdown格式:";try{console.log("🚀 开始调用AI API..."),console.log("📋 系统提示词:",m.substring(0,100)+"..."),console.log("👤 用户提示词:",w.substring(0,100)+"..."),Z("AI正在分析文档,请耐心等待(最多2分钟)...","info");const D=new AbortController,j=setTimeout(()=>D.abort(),12e4),V=await fetch("http://127.0.0.1:8000/api/ai/generate-markdown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:m,user_prompt:w,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"}),signal:D.signal});if(clearTimeout(j),!V.ok)throw new Error(`HTTP error! status: ${V.status}`);const I=await V.json();return console.log("📡 AI API响应:",I),I.success&&I.markdown?(console.log("✅ 从success.markdown获取内容"),I.markdown):I.markdown?(console.log("✅ 从markdown字段获取内容"),I.markdown):I.content?(console.log("✅ 从content字段获取内容"),I.content):(console.error("❌ AI API响应格式错误:",I),"生成失败,请重试")}catch(D){throw D.name==="AbortError"?new Error("AI API请求超时(2分钟),文档可能较复杂,请重试或尝试上传较小的文档"):(console.error("AI API调用失败:",D),new Error(`AI API调用失败: ${D.message}`))}},pe=A=>A.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(L,p)=>{if(p.includes(":")){const m=p.split(":");if(m.length>1)return`【${m[0]}】: ${m.slice(1).join(":")}`}return`【${p}】`}).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,`
|
||
`),Ee=async()=>{if(!o.value.trim()){Z("请输入Markdown内容","error");return}r.value=!0;try{const A=Nt(o.value);i.value=JSON.stringify(A,null,2),console.log("🔄 生成JSON成功!节点数量:",ot(A),"JSON长度:",i.value.length,"字符")}catch(A){console.error("转换失败:",A),Z("转换失败,请检查Markdown格式","error")}finally{r.value=!1}},ot=A=>{if(!A)return 0;let L=1;if(A.children&&A.children.length>0)for(const p of A.children)L+=ot(p);return L},Nt=A=>{const L=A.split(`
|
||
`);let p=null;const m=[];let w=0,D=[];if(L.forEach((j,V)=>{const I=j.trim(),se=I.match(/^(#{1,6})\s+(.+)$/);if(se){if(D.length>0&&m.length>0){const S=D.join(`
|
||
`).trim();if(S){const P=m[m.length-1],z=pe(S);P.topic=P.topic+`
|
||
|
||
`+z}D=[]}const g=se[1].length,k=se[2].trim(),C=pe(k),E={id:`node_${w++}`,topic:C,children:[],level:g,data:{}};if(D.length>0){const S=D.join(`
|
||
`).trim();if(S){const P=pe(S);E.topic=C+`
|
||
|
||
`+P}D=[]}if(g===1&&!p)p=E,m.length=0,m.push(p);else{for(;m.length>1&&m[m.length-1].level>=g;)m.pop();m.length>0&&m[m.length-1].children.push(E),m.push(E)}}else I&&D.push(I);const h=I.match(/^[-*+]\s+(.+)$/);if(h){const g=h[1].trim(),k=pe(g),C={id:`node_${w++}`,topic:k,children:[],level:m.length>0?m[m.length-1].level+1:1,data:{}};m.length>0?m[m.length-1].children.push(C):p||(p={id:`node_${w++}`,topic:"主题",children:[C],level:0,data:{}},m.push(p))}}),D.length>0&&m.length>0){const j=D.join(`
|
||
`).trim();if(j){const V=m[m.length-1],I=pe(j);V.topic=V.topic+`
|
||
|
||
`+I}}return p||(p={id:"root",topic:"根节点",children:[],data:{}}),p},gt=async()=>{if(!o.value){Z("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(o.value),Z("Markdown已复制到剪贴板","success")}catch{const L=document.createElement("textarea");L.value=o.value,document.body.appendChild(L),L.select(),document.execCommand("copy"),L.remove(),Z("Markdown已复制到剪贴板","success")}},bt=async()=>{try{await navigator.clipboard.writeText(i.value),Z("JSON已复制到剪贴板","success")}catch(A){console.error("复制失败:",A),Z("复制失败","error")}},Bt=async()=>{if(!i.value){Z("请先生成或转换JSON数据","error");return}d.value=!0,c.value="正在保存思维导图...";try{const A=JSON.parse(i.value),L=A.topic||A.title||`AI生成的思维导图_${new Date().toLocaleString()}`,p=new CustomEvent("save-preview-to-database",{detail:{data:A,title:L,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(p),console.log("💾 创建思维导图成功!标题:",L,"数据大小:",JSON.stringify(A).length,"字符"),console.log("📊 思维导图结构:",A),setTimeout(()=>{d.value=!1,c.value="",Z("思维导图已保存成功!","success"),n.value="",o.value="",i.value="",f.value=null,u.value&&(u.value.value="")},2e3)}catch(A){d.value=!1,c.value="",console.error("JSON解析失败:",A),Z("JSON格式错误,请检查数据","error")}},Z=(A,L="info")=>{const p=document.createElement("div");switch(p.className=`notification notification-${L}`,p.textContent=A,p.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;
|
||
`,L){case"success":p.style.background="#4CAF50",p.style.color="white";break;case"error":p.style.background="#f44336",p.style.color="white";break;case"info":default:p.style.background="#2196F3",p.style.color="white";break}if(!document.querySelector("#notification-styles")){const m=document.createElement("style");m.id="notification-styles",m.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(m)}document.body.appendChild(p),setTimeout(()=>{p.style.animation="slideOut 0.3s ease",setTimeout(()=>{p.parentNode&&p.parentNode.removeChild(p)},300)},3e3)},le=()=>{o.value="",i.value="",Z("内容已清空","info")},ee=()=>{n.value="",o.value="",i.value="",Z("所有内容已清空","info")},Je=()=>{const A={id:"node_0",topic:"数字教育平台设计要点",children:[{id:"node_1",topic:"用户体验设计",children:[{id:"node_2",topic:"界面交互设计",children:[{id:"node_3",topic:"核心功能入口应控制在3次点击内可达",children:[]},{id:"node_4",topic:"采用响应式设计适配多端设备",children:[]}]},{id:"node_5",topic:"内容架构规划",children:[{id:"node_6",topic:"合理的内容组织帮助用户构建知识体系",children:[]},{id:"node_7",topic:"课程结构设计",children:[]}]}]},{id:"node_8",topic:"互动功能开发",children:[{id:"node_9",topic:"学习互动设计",children:[{id:"node_10",topic:"平台应提供即时反馈机制",children:[]},{id:"node_11",topic:"开发协作学习工具",children:[]}]}]},{id:"node_12",topic:"数据安全保障",children:[{id:"node_13",topic:"隐私保护措施",children:[{id:"node_14",topic:"个人信息和学习数据采用AES-256加密存储",children:[]},{id:"node_15",topic:"实施基于角色的权限管理",children:[]}]}]}]};i.value=JSON.stringify(A,null,2),o.value=`# 数字教育平台设计要点
|
||
|
||
## 用户体验设计
|
||
|
||
### 界面交互设计
|
||
- 核心功能入口应控制在3次点击内可达
|
||
- 采用响应式设计适配多端设备
|
||
|
||
### 内容架构规划
|
||
- 合理的内容组织帮助用户构建知识体系
|
||
- 课程结构设计
|
||
|
||
## 互动功能开发
|
||
|
||
### 学习互动设计
|
||
- 平台应提供即时反馈机制
|
||
- 开发协作学习工具
|
||
|
||
## 数据安全保障
|
||
|
||
### 隐私保护措施
|
||
- 个人信息和学习数据采用AES-256加密存储
|
||
- 实施基于角色的权限管理
|
||
|
||
## 测试Markdown语法处理
|
||
|
||
### 粗体语法测试
|
||
- **街拍**: 抓拍方式捕捉自然瞬间
|
||
- **人像**: 专业人像摄影技巧
|
||
- **风景**: 自然风光拍摄要点
|
||
|
||
### 混合语法测试
|
||
- **重要提示**: 这是*斜体*和**粗体**的混合内容
|
||
- **代码示例**: 使用\`console.log\`进行调试
|
||
- **链接测试**: [点击这里](https://example.com)查看更多信息`,it("测试数据: 数字教育平台设计要点",o.value),Z("测试数据加载成功!","success")},it=(A,L,p=null)=>{const m={title:A,content:L,mindmapId:p,timestamp:new Date};l.value.unshift(m),l.value.length>10&&(l.value=l.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(l.value))},Ve=async A=>{A.mindmapId?(console.log("🎯 从历史记录加载思维导图ID:",A.mindmapId),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:A.mindmapId,title:A.title}})),Z(`正在加载: ${A.title}`,"info")):(o.value=A.content,await Ee(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:A.content,json:i.value,title:A.title}})),Z(`正在加载: ${A.title}`,"info"))},De=A=>new Date(A).toLocaleString("zh-CN");return ts(()=>{const A=localStorage.getItem("ai-sidebar-history");if(A)try{l.value=JSON.parse(A)}catch(L){console.error("加载历史记录失败:",L)}window.addEventListener("add-to-history",L=>{console.log("📝 收到添加历史记录事件:",L.detail);const{title:p,content:m,timestamp:w}=L.detail;it(p,m,null),console.log("✅ 已添加历史记录:",p)}),window.addEventListener("mindmap-saved",L=>{console.log("🎯 收到思维导图保存成功事件:",L.detail);const{mindmapId:p,title:m,timestamp:w}=L.detail,D=l.value.find(j=>j.title===m||j.timestamp&&Math.abs(j.timestamp-w)<5e3);D?(D.mindmapId=p,console.log("✅ 已更新历史记录,思维导图ID:",p),localStorage.setItem("ai-sidebar-history",JSON.stringify(l.value))):(console.log("⚠️ 未找到对应的历史记录,创建新的"),it(m,"",p))}),In(n,(L,p)=>{}),In(o,(L,p)=>{})}),(A,L)=>(be(),ye("div",om,[$("div",{class:"sidebar-toggle",onClick:y,title:t.value?"展开AI助手":"折叠AI助手",style:qn({left:t.value?"10px":"420px"})},[t.value?(be(),ye("svg",sm,[...L[1]||(L[1]=[$("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(be(),ye("svg",rm,[...L[2]||(L[2]=[$("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,im),$("div",{class:Gt(["ai-sidebar",{"sidebar-collapsed":t.value}])},[As($("div",lm,[L[13]||(L[13]=$("div",{class:"sidebar-header"},[$("h3",null,"🤖 AI 助手"),$("p",null,"文档转思维导图工具"),$("div",{class:"collapse-hint"},[$("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),$("div",am,[L[6]||(L[6]=$("h4",null,"📁 生成思维导图",-1)),$("div",cm,[L[4]||(L[4]=$("label",null,"上传文件:",-1)),$("div",{class:"file-upload-area",onDrop:x,onDragover:v,onDragleave:M},[$("input",{type:"file",ref_key:"fileInput",ref:u,onChange:b,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),$("div",{class:Gt(["file-upload-placeholder",{"drag-over":a.value}])},[...L[3]||(L[3]=[$("span",{class:"upload-icon"},"📎",-1),$("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),$("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),f.value?(be(),ye("div",dm,[$("div",um,[$("div",fm,[$("span",hm,"📄 "+vt(f.value.name),1),$("span",pm,"("+vt(O(f.value.size))+")",1)]),$("button",{onClick:R,class:"btn-remove",title:"删除文件"},[...L[5]||(L[5]=[$("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[$("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)])])])])):Rt("",!0),$("div",mm,[$("button",{onClick:T,disabled:!f.value||s.value,class:"btn-primary"},[s.value?(be(),ye("span",bm,"AI生成中...")):(be(),ye("span",ym,"AI生成思维导图"))],8,gm)])]),o.value?(be(),ye("div",vm,[L[8]||(L[8]=$("h4",null,"📝 AI生成的Markdown结果",-1)),$("div",xm,[L[7]||(L[7]=$("label",null,"Markdown内容:",-1)),As($("textarea",{"onUpdate:modelValue":L[0]||(L[0]=p=>o.value=p),placeholder:"AI生成的Markdown内容将显示在这里",rows:"8",readonly:"",class:"markdown-result"},null,512),[[lu,o.value]])]),$("div",wm,[$("button",{onClick:Ee,disabled:r.value,class:"btn-secondary"},[r.value?(be(),ye("span",_m,"转换中...")):(be(),ye("span",Em,"🔄 转换为JSON"))],8,km),$("button",{onClick:le,class:"btn-clear"},"清空"),$("button",{onClick:gt,class:"btn-copy"},"📋 复制Markdown")])])):Rt("",!0),i.value?(be(),ye("div",Cm,[L[10]||(L[10]=$("h4",null,"📊 转换结果",-1)),d.value?(be(),ye("div",Sm,[L[9]||(L[9]=$("div",{class:"spinner"},null,-1)),$("span",null,vt(c.value),1)])):Rt("",!0),$("div",Mm,[$("pre",Nm,vt(i.value),1),$("div",Tm,[$("button",{onClick:bt,class:"btn-copy"},"📋 复制JSON"),$("button",{onClick:Bt,disabled:d.value,class:"btn-copy"},vt(d.value?"处理中...":"👁️ 预览"),9,Am)])])])):Rt("",!0),$("div",{class:"section",style:{display:"none"}},[L[11]||(L[11]=$("h4",null,"🧪 快速测试",-1)),$("div",{class:"button-group"},[$("button",{onClick:Je,class:"btn-test"},"📊 加载测试数据"),$("button",{onClick:ee,class:"btn-clear"},"🗑️ 清空所有")])]),l.value.length>0?(be(),ye("div",Lm,[L[12]||(L[12]=$("h4",null,"📚 历史记录",-1)),$("div",$m,[(be(!0),ye(ft,null,Kc(l.value,(p,m)=>(be(),ye("div",{key:m,class:"history-item",onClick:w=>Ve(p)},[$("div",Om,vt(p.title),1),$("div",Im,vt(De(p.timestamp)),1)],8,Rm))),128))])])):Rt("",!0)],512),[[Wd,!t.value]])],2)]))}},Pm=Ta(Dm,[["__scopeId","data-v-1a94bb9b"]]);const jm={id:"app"},zm={class:"main-content"},Bm={__name:"App",setup(e){return(t,n)=>(be(),ye("div",jm,[Ke(Pm),$("div",zm,[Ke(y0,{ref:"mindMapRef"},null,512)])]))}};du(Bm).mount("#app");export{Tr as _};
|